[
  {
    "path": ".gitattributes",
    "content": "* text=auto eol=lf"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: kunitoki\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/workflows/build_linux.yml",
    "content": "name: Linux Builds\n\non:\n  push:\n    branches:\n      - '**'\n    paths:\n      - \"**/workflows/build_linux.yml\"\n      - \"**/cmake/**\"\n      - \"**/JUCE/**\"\n      - \"**/modules/**\"\n      - \"**/tests/**\"\n      - \".gitmodules\"\n      - \"CMakeLists.txt\"\n      - \"MANIFEST.in\"\n      - \"pyproject.toml\"\n      - \"setup.py\"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build-linux:\n    name: Build cp${{matrix.python}}-${{ matrix.platform_id }}\n    runs-on: ${{ matrix.os }}\n    continue-on-error: false\n\n    strategy:\n      fail-fast: true\n      matrix:\n        include:\n        - { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64 }\n        - { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64 }\n\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Set up QEMU\n        if: matrix.cibw_archs == 'aarch64'\n        uses: docker/setup-qemu-action@v3\n        with:\n          platforms: arm64\n\n      - name: Setup and install python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.11\"\n\n      - name: Build wheels\n        uses: pypa/cibuildwheel@v2.19.1\n        env:\n          CIBW_ARCHS: ${{matrix.cibw_archs}}\n          CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}\n          CIBW_TEST_SKIP: \"*-manylinux_aarch64\"\n\n      - name: Store failures artifacts\n        if: failure()\n        uses: actions/upload-artifact@v4\n        with:\n          name: compare-data\n          path: |\n            ./wheelhouse/compare_data/\n            !./wheelhouse/compare_data/.gitignore\n          if-no-files-found: ignore\n          retention-days: 5\n          compression-level: 0\n          overwrite: true\n"
  },
  {
    "path": ".github/workflows/build_macos.yml",
    "content": "name: macOS Builds\n\non:\n  push:\n    branches:\n      - '**'\n    paths:\n      - \"**/workflows/build_macos.yml\"\n      - \"**/cmake/**\"\n      - \"**/JUCE/**\"\n      - \"**/modules/**\"\n      - \"**/tests/**\"\n      - \".gitmodules\"\n      - \"CMakeLists.txt\"\n      - \"MANIFEST.in\"\n      - \"pyproject.toml\"\n      - \"setup.py\"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build-macos:\n    name: Build cp${{matrix.python}}-${{ matrix.platform_id }}\n    runs-on: ${{ matrix.os }}\n    continue-on-error: false\n\n    strategy:\n      fail-fast: true\n      matrix:\n        include:\n        - { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2 }\n\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Setup and install python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.11\"\n\n      - name: Build wheels\n        uses: pypa/cibuildwheel@v2.19.1\n        env:\n          CIBW_ARCHS: ${{matrix.cibw_archs}}\n          CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}\n          CIBW_TEST_SKIP: \"*-macosx_universal2:arm64\"\n          CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=10.15\n\n      - name: Store failures artifacts\n        if: failure()\n        uses: actions/upload-artifact@v4\n        with:\n          name: compare-data\n          path: |\n            tests/compare_data/\n            !tests/compare_data/.gitignore\n          if-no-files-found: ignore\n          retention-days: 5\n          compression-level: 0\n          overwrite: true\n"
  },
  {
    "path": ".github/workflows/build_windows.yml",
    "content": "name: Windows Builds\n\non:\n  push:\n    branches:\n      - '**'\n    paths:\n      - \"**/workflows/build_windows.yml\"\n      - \"**/cmake/**\"\n      - \"**/JUCE/**\"\n      - \"**/modules/**\"\n      - \"**/tests/**\"\n      - \".gitmodules\"\n      - \"CMakeLists.txt\"\n      - \"MANIFEST.in\"\n      - \"pyproject.toml\"\n      - \"setup.py\"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build-windows:\n    name: Build cp${{matrix.python}}-${{ matrix.platform_id }}\n    runs-on: ${{ matrix.os }}\n    continue-on-error: false\n\n    strategy:\n      fail-fast: true\n      matrix:\n        include:\n        - { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64 }\n        - { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64 }\n\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Setup and install python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.11\"\n\n      - name: Build wheels\n        uses: pypa/cibuildwheel@v2.19.1\n        env:\n          CIBW_ARCHS: ${{matrix.cibw_archs}}\n          CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}\n          CIBW_TEST_SKIP: \"*-win_arm64\"\n\n      - name: Store failures artifacts\n        if: failure()\n        uses: actions/upload-artifact@v4\n        with:\n          name: compare-data\n          path: |\n            tests/compare_data/\n            !tests/compare_data/.gitignore\n          if-no-files-found: ignore\n          retention-days: 5\n          compression-level: 0\n          overwrite: true\n"
  },
  {
    "path": ".github/workflows/coverage.yml",
    "content": "name: Code Coverage\n\non:\n  push:\n    branches:\n      - '**'\n    paths:\n      - \"**/workflows/coverage.yml\"\n      - \"**/cmake/**\"\n      - \"**/JUCE/**\"\n      - \"**/modules/**\"\n      - \"**/tests/**\"\n      - \".gitmodules\"\n      - \"CMakeLists.txt\"\n      - \"MANIFEST.in\"\n      - \"pyproject.toml\"\n      - \"setup.py\"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\n\njobs:\n  code-coverage:\n    name: Code Coverage\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Setup and install python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.11\"\n\n      - name: Build wheels and test\n        uses: pypa/cibuildwheel@v2.19.1\n        env:\n          CIBW_ARCHS: x86_64\n          CIBW_BUILD: cp311-manylinux_x86_64\n          CIBW_TEST_SKIP: \"*manylinux*\"\n          CIBW_ENVIRONMENT: POPSICLE_COVERAGE=1\n\n      - name: Coveralls\n        uses: coverallsapp/github-action@v2\n        with:\n          path-to-lcov: ./wheelhouse/lcov.info\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          #debug: true\n"
  },
  {
    "path": ".github/workflows/wheels.yml",
    "content": "name: Wheels Deploy\n\non:\n  push:\n    tags:\n      - 'v[0-9]+.[0-9]+.[0-9]+'\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\n\njobs:\n  build-wheels:\n    name: Build cp${{matrix.python}}-${{ matrix.platform_id }}\n    runs-on: ${{ matrix.os }}\n    continue-on-error: false\n\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n        - { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }\n        - { os: macos-latest, python: 311, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }\n        - { os: macos-latest, python: 312, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }\n        - { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }\n        - { os: windows-latest, python: 311, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }\n        - { os: windows-latest, python: 312, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }\n        - { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }\n        - { os: windows-latest, python: 311, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }\n        - { os: windows-latest, python: 312, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }\n        - { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }\n        - { os: ubuntu-latest, python: 311, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }\n        - { os: ubuntu-latest, python: 312, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }\n        - { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }\n        - { os: ubuntu-latest, python: 311, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }\n        - { os: ubuntu-latest, python: 312, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }\n\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Set up QEMU\n        if: matrix.cibw_archs == 'aarch64'\n        uses: docker/setup-qemu-action@v3\n        with:\n          platforms: arm64\n\n      - name: Setup and install python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.11\"\n\n      - name: Build wheels\n        uses: pypa/cibuildwheel@v2.19.1\n        env:\n          CIBW_ARCHS: ${{matrix.cibw_archs}}\n          CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}\n          CIBW_TEST_SKIP: \"*-manylinux_aarch64 *-macosx_universal2:arm64 *-win_arm64\"\n          CIBW_ENVIRONMENT: POPSICLE_LTO=${{matrix.lto}} POPSICLE_DISTRIBUTION=1\n\n      - name: Upload all the dists\n        uses: actions/upload-artifact@v4\n        with:\n          name: artifact-cp${{ matrix.python }}-${{ matrix.platform_id }}\n          path: ./wheelhouse/*.whl\n\n  upload-test-pypi:\n    name: Publish Wheels To Test PyPI\n    needs: [build-wheels]\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n\n    steps:\n      - name: Download all the dists\n        uses: actions/download-artifact@v4\n        with:\n          path: dist/\n          merge-multiple: true\n\n      - name: Publish distribution to Test PyPI\n        uses: pypa/gh-action-pypi-publish@release/v1\n        with:\n          repository-url: https://test.pypi.org/legacy/\n\n  upload-pypi:\n    name: Publish Wheels To PyPI\n    needs: [upload-test-pypi]\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n\n    steps:\n      - name: Download all the dists\n        uses: actions/download-artifact@v4\n        with:\n          path: dist/\n          merge-multiple: true\n\n      - name: Publish distribution to PyPI\n        uses: pypa/gh-action-pypi-publish@release/v1\n\n  github-release:\n    name: Sign And Upload Github Release\n    needs: [upload-pypi]\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      id-token: write\n\n    steps:\n      - name: Download all the dists\n        uses: actions/download-artifact@v4\n        with:\n          path: dist/\n          merge-multiple: true\n\n      - name: Sign the dists with Sigstore\n        uses: sigstore/gh-action-sigstore-python@v1.2.3\n        with:\n          inputs: ./dist/*.whl\n\n      - name: Create GitHub Release\n        env:\n          GITHUB_TOKEN: ${{ github.token }}\n        run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes \"\"\n\n      - name: Upload artifact signatures to GitHub Release\n        env:\n          GITHUB_TOKEN: ${{ github.token }}\n        run: gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'\n"
  },
  {
    "path": ".gitignore",
    "content": "__pycache__/\n.eggs/\n.vscode/\ncoverage/\ndist/\nbuild/\npopsicle/\n*.egg-info/\n\n.DS_Store\n*.pyc\n*.pyi\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"JUCE\"]\n\tpath = JUCE\n\turl = https://github.com/juce-framework/JUCE.git\n"
  },
  {
    "path": "CHANGES.md",
    "content": "## Master\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle)\n\nget_filename_component (ROOT_PATH \"${CMAKE_CURRENT_LIST_DIR}\" ABSOLUTE)\nfile (STRINGS \"${ROOT_PATH}/modules/juce_python/juce_python.h\" JUCE_PYTHON_MODULE)\nstring (REGEX REPLACE \"(.*)([0-9]+\\.[0-9]+\\.[0-9]+)(.*)\" \"\\\\2\" VERSION_NUMBER ${JUCE_PYTHON_MODULE})\nproject (${PROJECT_NAME} VERSION ${VERSION_NUMBER})\n\n# Find python\nif (\"${Python_INCLUDE_DIRS}\" STREQUAL \"\")\n    #set (Python_ROOT_DIR \"/Library/Frameworks/Python.framework/Versions/Current\")\n    set (Python_USE_STATIC_LIBS TRUE)\n    find_package (Python REQUIRED Development)\nelse()\n    message(STATUS \"${PROJECT_NAME} - Using python includes (provided): ${Python_INCLUDE_DIRS}\")\nendif()\n\n# Fix linux issue\nif (UNIX AND NOT APPLE)\n    set (CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -I/usr/include/freetype2\")\nendif()\n\n# Fetch/Include juce (set browsable modules in IDE)\nset_property (GLOBAL PROPERTY USE_FOLDERS YES)\noption (JUCE_ENABLE_MODULE_SOURCE_GROUPS \"Enable Module Source Groups\" ON)\nadd_subdirectory (JUCE)\n\n#include (FetchContent)\n#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)\n#FetchContent_Declare (JUCE\n#    GIT_REPOSITORY https://github.com/juce-framework/JUCE.git\n#    GIT_TAG origin/master\n#    GIT_SHALLOW TRUE\n#    GIT_PROGRESS TRUE\n#    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)\n#FetchContent_MakeAvailable (JUCE)\n\n# Add the internal modules\nadd_subdirectory (modules)\n\n# Configure the wheel library\nadd_library (${PROJECT_NAME} MODULE)\nset_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING \"App\")\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET \"hidden\")\nset_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)\nset_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)\nset_target_properties (${PROJECT_NAME} PROPERTIES OUTPUT_NAME \"${PROJECT_NAME}\")\nset_target_properties (${PROJECT_NAME} PROPERTIES PREFIX \"\")\n\nif (APPLE)\n    set_target_properties (${PROJECT_NAME} PROPERTIES LINK_FLAGS \"-undefined dynamic_lookup\")\n    target_link_options (${PROJECT_NAME} PRIVATE \"-Wl,-weak_reference_mismatches,weak\")\nelseif (WIN32)\n    target_compile_definitions (${PROJECT_NAME} PUBLIC $<$<CONFIG:Debug>:Py_DEBUG>)\n    set_target_properties (${PROJECT_NAME} PROPERTIES SUFFIX \".pyd\")\n    if (CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n        set_target_properties (${PROJECT_NAME} PROPERTIES OUTPUT_NAME \"${PROJECT_NAME}_d\")\n    endif()\nendif()\n\nif (ENABLE_DISTRIBUTION)\n    if (APPLE)\n        add_custom_command(\n            TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n            COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n            ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)\n    elseif (UNIX)\n        add_custom_command(\n            TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n            COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n            ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)\n    endif()\nendif()\n\nif (ENABLE_LTO)\n    set (LTO_CONFIGURATION \"juce::juce_recommended_lto_flags\")\nelse()\n    set (LTO_CONFIGURATION \"\")\nendif()\n\ntarget_include_directories (${PROJECT_NAME} PRIVATE \"${Python_INCLUDE_DIRS}\")\nif (NOT \"${Python_LIBRARY_DIRS}\" STREQUAL \"\")\n    target_link_directories (${PROJECT_NAME} PRIVATE \"${Python_LIBRARY_DIRS}\")\nendif()\n\ntarget_compile_definitions (${PROJECT_NAME} PRIVATE\n    JUCE_STANDALONE_APPLICATION=1\n    JUCE_DISABLE_JUCE_VERSION_PRINTING=1\n    JUCE_MODAL_LOOPS_PERMITTED=1\n    JUCE_CATCH_UNHANDLED_EXCEPTIONS=1\n    JUCE_LOG_ASSERTIONS=1\n    JUCE_ALLOW_STATIC_NULL_VARIABLES=0\n    JUCE_STRICT_REFCOUNTEDPOINTER=1\n    JUCE_WEB_BROWSER=0\n    JUCE_LOAD_CURL_SYMBOLS_LAZILY=1\n    #JUCE_GUI_BASICS_INCLUDE_XHEADERS=1\n    JUCE_SILENCE_XCODE_15_LINKER_WARNING=1\n    JUCE_PYTHON_EMBEDDED_INTERPRETER=0\n    JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION=0\n    PYBIND11_DETAILED_ERROR_MESSAGES=1)\n\ntarget_link_libraries (${PROJECT_NAME} PRIVATE\n    #juce::juce_analytics\n    juce::juce_audio_basics\n    juce::juce_audio_devices\n    juce::juce_audio_formats\n    juce::juce_audio_processors\n    juce::juce_audio_utils\n    juce::juce_core\n    #juce::juce_cryptography\n    juce::juce_data_structures\n    #juce::juce_dsp\n    juce::juce_events\n    juce::juce_graphics\n    juce::juce_gui_basics\n    juce::juce_gui_extra\n    #juce::juce_opengl\n    #juce::juce_osc\n    #juce::juce_video\n    juce::juce_recommended_config_flags\n    juce::juce_recommended_warning_flags\n    popsicle::juce_python\n    popsicle::juce_python_recommended_warning_flags\n    ${LTO_CONFIGURATION})\n\n_juce_initialise_target (${PROJECT_NAME} VERSION \"${VERSION_NUMBER}\")\n_juce_set_output_name (${PROJECT_NAME} $<TARGET_PROPERTY:${PROJECT_NAME},JUCE_PRODUCT_NAME>)\n\n# Configure code coverage\nif (ENABLE_COVERAGE)\n    include (cmake/CodeCoverage.cmake)\n\n    append_coverage_compiler_flags()\n\n    set (COVERAGE_TARGET ${PROJECT_NAME}_coverage)\n\n    set (COVERAGE_EXCLUDES\n        \"*_mac.*\"\n        \"*_windows.*\"\n        \"*_android.*\"\n        \"*_ios.*\"\n        \"*/juce_audio_basics/juce_audio_basics.*\"\n        \"*/juce_audio_devices/juce_audio_devices.*\"\n        \"*/juce_core/juce_core.*\"\n        \"*/juce_data_structures/juce_data_structures.*\"\n        \"*/juce_events/juce_events.*\"\n        \"*/juce_graphics/juce_graphics.*\"\n        \"*/juce_gui_basics/juce_gui_basics.*\"\n        \"*/juce_python/pybind11/*\")\n\n    if (APPLE)\n        list (APPEND COVERAGE_EXCLUDES \"/Applications/*\" \"/Library/*\")\n    endif()\n\n    if (APPLE OR UNIX)\n        list (APPEND COVERAGE_EXCLUDES \"/usr/*\" \"/opt/*\")\n    endif()\n\n    set (XVFB_RUN_EXEC \"\")\n    if (UNIX)\n        find_program (XVFB_RUN NAMES xvfb-run)\n        if (NOT ${XVFB_RUN} MATCHES \"XVFB_RUN-NOTFOUND\")\n            message (STATUS \"Using xvfb-run to perform graphics tests for coverage.\")\n            set (XVFB_RUN_EXEC ${XVFB_RUN} -a -s \"-screen 0 1024x768x24\")\n        endif()\n    endif()\n\n    setup_target_for_coverage_lcov (\n        NAME ${COVERAGE_TARGET}\n        EXECUTABLE ${XVFB_RUN_EXEC} pytest -s ${CMAKE_CURRENT_LIST_DIR}/tests\n        DEPENDENCIES ${PROJECT_NAME}\n        LCOV_ARGS\n            #\"--rc\" \"branch_coverage=1\"\n            #\"--branch-coverage\"\n            \"--keep-going\"\n            \"--ignore-errors\" \"inconsistent\"\n        GENHTML_ARGS\n            #\"--rc\" \"branch_coverage=1\"\n            #\"--branch-coverage\"\n            \"--keep-going\"\n            \"--ignore-errors\" \"inconsistent\"\n            \"--prefix\" \"${CMAKE_CURRENT_LIST_DIR}\")\nendif()\n"
  },
  {
    "path": "LICENSE",
    "content": "DUAL LICENSE NOTICE\n\nThis software is dually licensed:\n\n1. GPLv3 LICENSE:\n   - The GPLv3 License is applicable for open-source projects and non-commercial use. See LICENSE.GPLv3 for details.\n\n2. COMMERCIAL LICENSE:\n   - The Commercial License is applicable for closed-source projects and commercial use. See LICENSE.COMMERCIAL for details.\n\nBy using this software, you agree to adhere to the terms and conditions of either the GPLv3 License or the Commercial License, depending on your usage:\n\n- If you are developing an open-source project or using the software for non-commercial purposes, you must comply with the terms of the GPLv3 License as outlined in LICENSE.GPLv3.\n\n- If you are developing a closed-source application or using the software for commercial purposes, you must obtain a Commercial License as outlined in LICENSE.COMMERCIAL.\n\nPlease carefully review the respective license file applicable to your usage scenario.\n\nFor any inquiries regarding licensing or to obtain a Commercial License, please contact [kunitoki@gmail.com].\n"
  },
  {
    "path": "LICENSE.COMMERCIAL",
    "content": "COMMERCIAL LICENSE AGREEMENT\n\nThis Commercial License Agreement (the \"Agreement\") is entered into by and between popsicle, a corporation (\"Licensor\"), and the entity or individual licensing the Software (\"Licensee\"). This Agreement is effective as of the date of acceptance by Licensee.\n\n\n1. DEFINITIONS\n\n1.1 \"Software\" refers to the popsicle library, including any updates, modifications, or enhancements provided by Licensor.\n\n1.2 \"Closed Source App\" refers to an application that is not distributed with its source code.\n\n1.3 \"Embedded\" refers to the integration of the Software into a Closed Source App.\n\n1.4 \"JUCE\" refers to the JUCE framework developed by Raw Material Software Limited.\n\n\n2. LICENSE GRANT\n\n2.1 Open Source Use: The Software is provided under the terms of the MIT License for non-commercial and open-source projects.\n\n2.2 Commercial Use - Closed Source App:\n\n   2.2.1 Embedding: If the Software is embedded in a Closed Source App, Licensee must obtain a commercial license.\n\n   2.2.2 License Fee: Licensee agrees to pay the applicable license fee specified by Licensor for each Closed Source App that embeds the Software.\n\n   2.2.3 JUCE License: In case the Software is embedded in a Closed Source App, Licensee must also have a valid JUCE license from Raw Material Software Limited.\n\n\n3. RESTRICTIONS\n\n3.1 Licensee may not sublicense, assign, or transfer their rights under this Agreement without the express written consent of Licensor.\n\n3.2 Licensee may not use the Software in any mission-critical or life-safety systems, where the failure of the Software could lead to personal injury, death, or significant damage to property.\n\n3.3 Licensee may not remove or alter any copyright, trademark, or other proprietary notices present in the Software or its documentation.\n\n3.4 Licensee may not use the Software for any illegal, unethical, or malicious purposes, including but not limited to activities that infringe on intellectual property rights, engage in unauthorized access, or violate applicable laws and regulations.\n\n3.5 Licensee may not use the Software in connection with any projects or applications that promote or engage in illegal or discriminatory activities, or that violate human rights.\n\n3.6 Licensee may not use the Software in any way that would violate the terms of use or policies of any third-party platforms, app stores, or distribution channels through which the Closed Source App is made available.\n\n3.7 Licensee shall not attempt to circumvent any licensing mechanisms, security features, or access controls implemented in the Software.\n\n\n4. SUPPORT AND UPDATES\n\nLicensor may provide support and updates for the Software as specified in a separate support agreement, if applicable.\n\n\n5. DISCLAIMER OF WARRANTY\n\nTHE SOFTWARE IS PROVIDED \"AS IS,\" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. LICENSOR DISCLAIMS ALL WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\n\n6. LIMITATION OF LIABILITY\n\nIN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, INDIRECT, SPECIAL, OR PUNITIVE DAMAGES, INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, LOSS OF BUSINESS, OR DOWN TIME, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n\n7. GOVERNING LAW\n\nThis Agreement shall be governed by and construed in accordance with the laws.\n\n\n8. ACCEPTANCE\n\nBy using, downloading, or installing the Software, Licensee agrees to be bound by the terms and conditions of this Agreement.\n"
  },
  {
    "path": "LICENSE.GPLv3",
    "content": "\n                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    popsicle - Copyright (c) 2024 kunitoki <kunitoki@gmail.com>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    popsicle - Copyright (c) 2024 kunitoki <kunitoki@gmail.com>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>."
  },
  {
    "path": "MANIFEST.in",
    "content": "include README.rst\ninclude LICENSE LICENSE.GPLv3 LICENSE.COMMERCIAL\n\ngraft popsicle\ngraft popsicle.pyi\n\nglobal-exclude *.py[cod] __pycache__ .DS_Store CMakeLists.txt\n"
  },
  {
    "path": "README.rst",
    "content": ".. image:: popsicle.jpg\n    :alt: Popsicle: Python integration for JUCE with pybind11.\n    :target: https://github.com/kunitoki/popsicle\n\n\n===================================================\nPopsicle: Python integration for JUCE with pybind11\n===================================================\n\n|linux_builds| |macos_builds| |windows_builds| |pypi_version| |pypi_downloads|\n\n|coveralls| |pypi_status| |pypi_license| |commercial_license|\n\n\n--------\nOverview\n--------\n\nPopsicle is a groundbreaking project designed to extend the accessibility of `JUCE <https://juce.com/>`_ by seamlessly integrating it with Python. Leveraging the power of `pybind11 <https://pybind11.readthedocs.io/en/stable/>`_, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.\n\nPopsicle serves multiple purposes, each contributing to its significance in the development landscape.\n\n\n--------\nFeatures\n--------\n\n- **Effortless JUCE App Prototyping**: Effortlessly prototype JUCE apps. Popsicle streamlines the development process, allowing developers to focus on creativity by eliminating the need for intricate build configurations and setups.\n\n- **Python Scripting Integration**: Seamlessly integrate Python scripting by embedding Popsicle into existing JUCE applications as a dedicated module. Extend and enhance your JUCE projects with the flexibility and ease of Python within the familiar JUCE framework.\n\n- **Unit Testing Made Easy**: Ensure the robustness and reliability of JUCE classes with Popsicle's built-in unit testing support. Leverage Python's testing infrastructure for a seamless testing process.\n\n- **Cross-Platform Compatibility**: Enjoy cross-platform compatibility with Popsicle. Work consistently across Windows, macOS, and Linux environments for a unified development experience.\n\nPopsicle stands as a humble yet powerful solution, aimed at enriching the development experience with JUCE by simplifying, extending, and enhancing its integration with Python.\n\n\n-------------\nExample Usage\n-------------\n\nA single 80 lines script is better than thousand of words:\n\n.. code-block:: python\n\n  import popsicle as juce\n\n\n  class MainContentComponent(juce.Component, juce.Timer):\n      def __init__(self):\n          juce.Component.__init__(self)\n          juce.Timer.__init__(self)\n\n          self.setSize(600, 400)\n          self.startTimerHz(60)\n\n      def __del__(self):\n          self.stopTimer()\n\n      def paint(self, g):\n          g.fillAll(juce.Colours.black)\n\n          random = juce.Random.getSystemRandom()\n          rect = juce.Rectangle[int](0, 0, 20, 20)\n\n          for _ in range(100):\n              g.setColour(juce.Colour.fromRGBA(\n                  random.nextInt(256),\n                  random.nextInt(256),\n                  random.nextInt(256),\n                  255))\n\n              rect.setCentre(random.nextInt(self.getWidth()), random.nextInt(self.getHeight()))\n              g.drawRect(rect, 1)\n\n      def timerCallback(self):\n          if self.isVisible():\n              self.repaint()\n\n\n  class MainWindow(juce.DocumentWindow):\n      component = None\n\n      def __init__(self):\n          super().__init__(\n              juce.JUCEApplication.getInstance().getApplicationName(),\n              juce.Desktop.getInstance().getDefaultLookAndFeel()\n                  .findColour(juce.ResizableWindow.backgroundColourId),\n              juce.DocumentWindow.allButtons,\n              True)\n\n          self.component = MainContentComponent()\n\n          self.setResizable(True, True)\n          self.setContentNonOwned(self.component, True)\n          self.centreWithSize(800, 600)\n          self.setVisible(True)\n\n      def __del__(self):\n          if self.component:\n              del self.component\n\n      def closeButtonPressed(self):\n          juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n\n  class Application(juce.JUCEApplication):\n      window = None\n\n      def getApplicationName(self):\n          return \"JUCE-o-matic\"\n\n      def getApplicationVersion(self):\n          return \"1.0\"\n\n      def initialise(self, commandLine):\n          self.window = MainWindow()\n\n      def shutdown(self):\n          if self.window:\n              del self.window\n\n\n  if __name__ == \"__main__\":\n      juce.START_JUCE_APPLICATION(Application)\n\nAs easy as that ! You will find more example on JUCE usage in the *examples* folder.\n\n.. image:: images/juce_o_matic.png\n    :target: examples/juce_o_matic.py\n\n\n-------------------\nSupported Platforms\n-------------------\n\n.. list-table:: List of popsicle supported platforms\n   :widths: 40 10 10 10 20\n   :header-rows: 1\n\n   * - Platform\n     - Python 3.10\n     - Python 3.11\n     - Python 3.12\n     - Notes\n   * - macOS-universal2\n     - ✅\n     - ✅\n     - ✅\n     -\n   * - win_amd64\n     - ✅\n     - ✅\n     - ✅\n     -\n   * - win_arm64\n     - ✅\n     - ✅\n     - ✅\n     -\n   * - manylinux_2014-x86_64\n     - ✅\n     - ✅\n     - ✅\n     -\n   * - manylinux_2014-aarch64\n     - ⚠️\n     - ⚠️\n     - ⚠️\n     - Built but not tested exhaustively\n\n-----------------\nSupported Modules\n-----------------\n\n.. list-table:: List of popsicle supported JUCE modules\n   :widths: 40 8 12 40\n   :header-rows: 1\n\n   * - Module\n     - Supported\n     - Test Coverage\n     - Notes\n   * - juce_analytics\n     - ⛔️\n     - N/A\n     - Not Planned\n   * - juce_audio_basics\n     - ✅\n     - 0.87%\n     - In Progress\n   * - juce_audio_devices\n     - ✅\n     - 0.0%\n     - In Progress\n   * - juce_audio_formats\n     - ✅\n     - 0.0%\n     - In Progress\n   * - juce_audio_plugin_client\n     - ⛔️\n     - N/A\n     - Not planned\n   * - juce_audio_processors\n     - ✅\n     - 0.0%\n     - In Progress\n   * - juce_audio_utils\n     - ✅\n     - 0.0%\n     - In Progress\n   * - juce_box2d\n     - ⛔️\n     - N/A\n     - Planned\n   * - juce_core\n     - ✅\n     - 47.7%\n     - Ready\n   * - juce_cryptography\n     - ⛔️\n     - N/A\n     - Planned\n   * - juce_data_structures\n     - ✅\n     - 55.61%\n     - Ready\n   * - juce_dsp\n     - ⛔️\n     - N/A\n     - Planned\n   * - juce_events\n     - ✅\n     - 49.68%\n     - Ready\n   * - juce_graphics\n     - ✅\n     - 15.76%\n     - In Progress\n   * - juce_gui_basics\n     - ✅\n     - 9.77%\n     - In Progress, Basic Components Available\n   * - juce_gui_extra\n     - ✅\n     - 0.57%\n     - In Progress\n   * - juce_midi_ci\n     - ⛔️\n     - N/A\n     - Not Planned\n   * - juce_opengl\n     - ⛔️\n     - N/A\n     - Planned\n   * - juce_osc\n     - ⛔️\n     - N/A\n     - Not Planned\n   * - juce_product_unlocking\n     - ⛔️\n     - N/A\n     - Not Planned\n   * - juce_video\n     - ⛔️\n     - N/A\n     - Not planned\n\n\n--------------------\nExample Applications\n--------------------\n\nSome images of JUCE tutorials and other small apps ported to *popsicle*.\n\n- Hot Reloading (`hotreload_main.py <examples/hotreload_main.py>`_ and `hotreload_component.py <examples/hotreload_component.py>`_)\n\n   .. image:: images/hot_reloading_video.png\n       :target: https://www.youtube.com/watch?v=nZUL_1Tnyy8\n\n- Animated Component (https://docs.juce.com/master/tutorial_animation.html)\n\n   .. image:: images/animated_component.png\n       :target: examples/animated_component.py\n\n- Advanced GUI layout techniques (https://docs.juce.com/master/tutorial_rectangle_advanced.html)\n\n   .. image:: images/layout_rectangles.png\n       :target: examples/layout_rectangles.py\n\n- Responsive GUI layouts using FlexBox and Grid (https://docs.juce.com/master/tutorial_flex_box_grid.html)\n\n   .. image:: images/layout_flexgrid.png\n       :target: examples/layout_flexgrid.py\n\n- Table listbox (https://docs.juce.com/master/tutorial_table_list_box.html)\n\n   .. image:: images/table_list_box.png\n       :target: examples/table_list_box.py\n\n- Slider values example (https://docs.juce.com/master/tutorial_slider_values.html)\n\n   .. image:: images/slider_values.png\n       :target: examples/slider_values.py\n\n- Audio Player (https://docs.juce.com/master/tutorial_playing_sound_files.html)\n\n   .. image:: images/audio_player.png\n       :target: examples/audio_player.py\n\n- Audio Player with waveform (https://docs.juce.com/master/tutorial_audio_thumbnail.html)\n\n   .. image:: images/audio_player_waveform.png\n       :target: examples/audio_player_waveform.py\n\n- OpenCV Integration\n\n   .. image:: images/opencv_integration.png\n       :target: examples/opencv_integration.py\n\n- Matplotlib Integration\n\n   .. image:: images/matplotlib_integration.png\n       :target: examples/matplotlib_integration.py\n\n- Emojis Components (`emojis_component.py <examples/emojis_component.py>`_ and `emojis_font_component.py <examples/emojis_font_component.py>`_)\n\n   .. image:: images/emojis_component.png\n       :target: examples/emojis_font_component.py\n\n- Wgpu Triangle Rendering Embedded Component\n\n   .. image:: images/wgpu_triangle.png\n       :target: examples/webgpu/\n\n- Pygfx PBR Renderer Integration (`pbr2_embed.py <examples/webgpu/pbr2_embed.py>`_)\n\n   .. image:: images/pygfx_3d_video.png\n       :target: https://www.youtube.com/watch?v=8aV-wZtRkIg\n\n\n-------------\nCode Coverage\n-------------\n\n|coveralls|\n\n**The current code coverage of the project refers to the combined JUCE + popsicle**\n\nPopsicle places a strong emphasis on comprehensive code coverage to ensure the reliability and quality of the project. Our code coverage encompasses thorough testing of the JUCE framework, providing developers with confidence in the stability and performance of their applications.\n\nTo explore detailed information about the testing, refer to the `tests directory <tests/>`_ in our GitHub repository. This resource offers insights into the specific areas of the JUCE framework that have been rigorously tested, empowering developers to make informed decisions about the robustness of their implementations.\n\nAt Popsicle, we believe that extensive code coverage is essential for delivering software solutions that meet the highest standards of excellence. Feel free to delve into our testing documentation to gain a deeper understanding of the meticulous approach we take towards ensuring code quality and reliability.\n\n\n---------\nLicensing\n---------\n\nPopsicle is offered in two distinct licensed flavors to cater to diverse usage scenarios:\n\n- **GPLv3 License**: This license is applicable when utilizing Popsicle from Python through the PyPi-provided wheels or embedding it in an open-source (OSS) application. Embracing the principles of open-source development, the GPLv3 license ensures that Popsicle remains freely accessible and modifiable within the open-source community.\n\n- **Commercial License**: Tailored for scenarios where Popsicle is integrated into a closed-source application, the commercial license provides a flexible solution for proprietary software development. This option offers a streamlined approach for utilizing Popsicle within closed environments, with further details to be announced.\n\nPopsicle's dual licensing approach ensures compatibility with a wide range of projects, whether they align with open-source principles or require the flexibility of a commercial license for closed-source applications.\n\n**It's important to note that when Popsicle is employed in a closed-source application, a corresponding JUCE license is also required to ensure proper adherence to licensing requirements.**\n\n\n------------\nInstallation\n------------\n\nGetting started with Popsicle is a straightforward process, requiring just a few simple steps. Follow the instructions below to install Popsicle effortlessly:\n\n.. code-block:: bash\n\n  pip3 install popsicle\n\nEnsure that you have an up-to-date version of **pip** to ensure a smooth installation process.\n\nBe sure you follow the `quick start guide <docs/QuickStartGuide.rst>`_ to know more abut how to use **popsicle**.\n\n\n-----------------\nBuild From Source\n-----------------\n\nClone the repository recursively as JUCE is a submodule.\n\n.. code-block:: bash\n\n  git clone --recursive git@github.com:kunitoki/popsicle.git\n\nInstall python dependencies.\n\n.. code-block:: bash\n\n  # Build the binary distribution\n  python3 -m build --wheel\n\n  # Install the local wheel\n  pip3 install dist/popsicle-*.whl\n\n\n.. |linux_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_linux.yml/badge.svg?branch=master\n    :alt: Linux Builds Status\n    :target: https://github.com/kunitoki/popsicle/actions/workflows/build_linux.yml\n\n.. |macos_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_macos.yml/badge.svg?branch=master\n    :alt: macOS Builds Status\n    :target: https://github.com/kunitoki/popsicle/actions/workflows/build_macos.yml\n\n.. |windows_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_windows.yml/badge.svg?branch=master\n    :alt: Windows Builds Status\n    :target: https://github.com/kunitoki/popsicle/actions/workflows/build_windows.yml\n\n.. |coveralls| image:: https://coveralls.io/repos/github/kunitoki/popsicle/badge.svg\n    :alt: Coveralls - Code Coverage\n    :target: https://coveralls.io/github/kunitoki/popsicle\n\n.. |commercial_license| image:: https://img.shields.io/badge/license-Commercial-blue\n    :alt: Commercial License\n    :target: LICENSE.COMMERCIAL\n\n.. |pypi_license| image:: https://img.shields.io/pypi/l/popsicle\n    :alt: Open Source License\n    :target: LICENSE.GPLv3\n\n.. |pypi_status| image:: https://img.shields.io/pypi/status/popsicle\n    :alt: PyPI - Status\n    :target: https://pypi.org/project/popsicle/\n\n.. |pypi_version| image:: https://img.shields.io/pypi/pyversions/popsicle\n    :alt: PyPI - Python Version\n    :target: https://pypi.org/project/popsicle/\n\n.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/popsicle\n    :alt: PyPI - Downloads\n    :target: https://pypi.org/project/popsicle/\n"
  },
  {
    "path": "cmake/ArchivePythonStdlib.py",
    "content": "import os\nimport stat\nimport shutil\nimport hashlib\nimport zipfile\nfrom pathlib import Path\nfrom argparse import ArgumentParser\n\n\ndef file_hash(file):\n    h = hashlib.md5()\n\n    with open(file, \"rb\") as f:\n        h.update(f.read())\n\n    return h.hexdigest()\n\n\ndef make_archive(file, directory):\n    archived_files = []\n    for dirname, _, files in os.walk(directory):\n        for filename in files:\n            path = os.path.join(dirname, filename)\n            archived_files.append((path, os.path.relpath(path, directory)))\n\n    with zipfile.ZipFile(file, \"w\") as zf:\n        for path, archive_path in sorted(archived_files):\n            permission = 0o555 if os.access(path, os.X_OK) else 0o444\n\n            zip_info = zipfile.ZipInfo.from_file(path, archive_path)\n            zip_info.date_time = (1999, 1, 1, 0, 0, 0)\n            zip_info.external_attr = (stat.S_IFREG | permission) << 16\n\n            with open(path, \"rb\") as fp:\n                zf.writestr(zip_info, fp.read(), compress_type=zipfile.ZIP_DEFLATED, compresslevel=9)\n\n\nif __name__ == \"__main__\":\n    parser = ArgumentParser()\n    parser.add_argument(\"-b\", \"--base-folder\", type=Path, help=\"Path to the base folder.\")\n    parser.add_argument(\"-o\", \"--output-folder\", type=Path, help=\"Path to the output folder.\")\n    parser.add_argument(\"-M\", \"--version-major\", type=int, help=\"Major version number (integer).\")\n    parser.add_argument(\"-m\", \"--version-minor\", type=int, help=\"Minor version number (integer).\")\n    parser.add_argument(\"-x\", \"--exclude-patterns\", type=str, default=None, help=\"Excluded patterns (semicolon separated list).\")\n\n    args = parser.parse_args()\n\n    version = f\"{args.version_major}.{args.version_minor}\"\n    version_nodot = f\"{args.version_major}{args.version_minor}\"\n\n    final_location: Path = args.output_folder / \"python\"\n    site_packages = final_location / \"site-packages\"\n    base_python: Path = args.base_folder / \"lib\" / f\"python{version}\"\n    final_archive = args.output_folder / f\"python{version_nodot}.zip\"\n    temp_archive = args.output_folder / f\"temp{version_nodot}.zip\"\n\n    base_patterns = [\n        \"*.pyc\",\n        \"__pycache__\",\n        \"__phello__\",\n        \"*config-3*\",\n        \"*tcl*\",\n        \"*tdbc*\",\n        \"*tk*\",\n        \"Tk*\",\n        \"_tk*\",\n        \"_test*\",\n        \"libpython*\",\n        \"pkgconfig\",\n        \"idlelib\",\n        \"site-packages\",\n        \"test\",\n        \"turtledemo\",\n        \"LICENSE.txt\",\n    ]\n\n    if args.exclude_patterns:\n        custom_patterns = [x.strip() for x in args.exclude_patterns.split(\";\")]\n        base_patterns += custom_patterns\n\n    ignored_files = shutil.ignore_patterns(*base_patterns)\n\n    print(\"cleaning up...\")\n    if final_location.exists():\n        shutil.rmtree(final_location)\n\n    print(\"copying library...\")\n    shutil.copytree(base_python, final_location, ignore=ignored_files, dirs_exist_ok=True)\n    os.makedirs(site_packages, exist_ok=True)\n\n    print(\"making archive...\")\n    if os.path.exists(final_archive):\n        make_archive(temp_archive, final_location)\n        if file_hash(temp_archive) != file_hash(final_archive):\n            shutil.copy(temp_archive, final_archive)\n    else:\n        make_archive(final_archive, final_location)\n"
  },
  {
    "path": "cmake/CodeCoverage.cmake",
    "content": "# Copyright (c) 2012 - 2017, Lars Bilke\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this\n#    list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice,\n#    this list of conditions and the following disclaimer in the documentation\n#    and/or other materials provided with the distribution.\n#\n# 3. Neither the name of the copyright holder nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without\n#    specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# CHANGES:\n#\n# 2012-01-31, Lars Bilke\n# - Enable Code Coverage\n#\n# 2013-09-17, Joakim Söderberg\n# - Added support for Clang.\n# - Some additional usage instructions.\n#\n# 2016-02-03, Lars Bilke\n# - Refactored functions to use named parameters\n#\n# 2017-06-02, Lars Bilke\n# - Merged with modified version from github.com/ufz/ogs\n#\n# 2019-05-06, Anatolii Kurotych\n# - Remove unnecessary --coverage flag\n#\n# 2019-12-13, FeRD (Frank Dana)\n# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor\n#   of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments.\n# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY\n# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list\n# - Set lcov basedir with -b argument\n# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be\n#   overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().)\n# - Delete output dir, .info file on 'make clean'\n# - Remove Python detection, since version mismatches will break gcovr\n# - Minor cleanup (lowercase function names, update examples...)\n#\n# 2019-12-19, FeRD (Frank Dana)\n# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets\n#\n# 2020-01-19, Bob Apthorpe\n# - Added gfortran support\n#\n# 2020-02-17, FeRD (Frank Dana)\n# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters\n#   in EXCLUDEs, and remove manual escaping from gcovr targets\n#\n# 2021-01-19, Robin Mueller\n# - Add CODE_COVERAGE_VERBOSE option which will allow to print out commands which are run\n# - Added the option for users to set the GCOVR_ADDITIONAL_ARGS variable to supply additional\n#   flags to the gcovr command\n#\n# 2020-05-04, Mihchael Davis\n#     - Add -fprofile-abs-path to make gcno files contain absolute paths\n#     - Fix BASE_DIRECTORY not working when defined\n#     - Change BYPRODUCT from folder to index.html to stop ninja from complaining about double defines\n#\n# 2021-05-10, Martin Stump\n#     - Check if the generator is multi-config before warning about non-Debug builds\n#\n# 2022-02-22, Marko Wehle\n#     - Change gcovr output from -o <filename> for --xml <filename> and --html <filename> output respectively.\n#       This will allow for Multiple Output Formats at the same time by making use of GCOVR_ADDITIONAL_ARGS, e.g. GCOVR_ADDITIONAL_ARGS \"--txt\".\n#\n# 2022-09-28, Sebastian Mueller\n#     - fix append_coverage_compiler_flags_to_target to correctly add flags\n#     - replace \"-fprofile-arcs -ftest-coverage\" with \"--coverage\" (equivalent)\n#\n# USAGE:\n#\n# 1. Copy this file into your cmake modules path.\n#\n# 2. Add the following line to your CMakeLists.txt (best inside an if-condition\n#    using a CMake option() to enable it just optionally):\n#      include(CodeCoverage)\n#\n# 3. Append necessary compiler flags for all supported source files:\n#      append_coverage_compiler_flags()\n#    Or for specific target:\n#      append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME)\n#\n# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og\n#\n# 4. If you need to exclude additional directories from the report, specify them\n#    using full paths in the COVERAGE_EXCLUDES variable before calling\n#    setup_target_for_coverage_*().\n#    Example:\n#      set(COVERAGE_EXCLUDES\n#          '${PROJECT_SOURCE_DIR}/src/dir1/*'\n#          '/path/to/my/src/dir2/*')\n#    Or, use the EXCLUDE argument to setup_target_for_coverage_*().\n#    Example:\n#      setup_target_for_coverage_lcov(\n#          NAME coverage\n#          EXECUTABLE testrunner\n#          EXCLUDE \"${PROJECT_SOURCE_DIR}/src/dir1/*\" \"/path/to/my/src/dir2/*\")\n#\n# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set\n#     relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR)\n#     Example:\n#       set(COVERAGE_EXCLUDES \"dir1/*\")\n#       setup_target_for_coverage_gcovr_html(\n#           NAME coverage\n#           EXECUTABLE testrunner\n#           BASE_DIRECTORY \"${PROJECT_SOURCE_DIR}/src\"\n#           EXCLUDE \"dir2/*\")\n#\n# 5. Use the functions described below to create a custom make target which\n#    runs your test executable and produces a code coverage report.\n#\n# 6. Build a Debug build:\n#      cmake -DCMAKE_BUILD_TYPE=Debug ..\n#      make\n#      make my_coverage_target\n#\n\ninclude(CMakeParseArguments)\n\noption(CODE_COVERAGE_VERBOSE \"Verbose information\" FALSE)\n\n# Check prereqs\nfind_program( GCOV_PATH gcov )\nfind_program( LCOV_PATH  NAMES lcov lcov.bat lcov.exe lcov.perl)\nfind_program( FASTCOV_PATH NAMES fastcov fastcov.py )\nfind_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )\nfind_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)\nfind_program( CPPFILT_PATH NAMES c++filt )\n\nif(NOT GCOV_PATH)\n    message(FATAL_ERROR \"gcov not found! Aborting...\")\nendif() # NOT GCOV_PATH\n\n# Check supported compiler (Clang, GNU and Flang)\nget_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)\nforeach(LANG ${LANGUAGES})\n  if(\"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"(Apple)?[Cc]lang\")\n    if(\"${CMAKE_${LANG}_COMPILER_VERSION}\" VERSION_LESS 3)\n      message(FATAL_ERROR \"Clang version must be 3.0.0 or greater! Aborting...\")\n    endif()\n  elseif(NOT \"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"GNU\"\n         AND NOT \"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"(LLVM)?[Ff]lang\")\n    message(FATAL_ERROR \"Compiler is not GNU or Flang! Aborting...\")\n  endif()\nendforeach()\n\nset(COVERAGE_COMPILER_FLAGS \"-O0 -g --coverage\"\n    CACHE INTERNAL \"\")\nif(CMAKE_CXX_COMPILER_ID MATCHES \"(GNU|Clang)\")\n    include(CheckCXXCompilerFlag)\n    check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)\n    if(HAVE_cxx_fprofile_abs_path)\n        set(COVERAGE_CXX_COMPILER_FLAGS \"${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path\")\n    endif()\n    include(CheckCCompilerFlag)\n    check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)\n    if(HAVE_c_fprofile_abs_path)\n        set(COVERAGE_C_COMPILER_FLAGS \"${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path\")\n    endif()\nendif()\n\nset(CMAKE_Fortran_FLAGS_COVERAGE\n    ${COVERAGE_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the Fortran compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_CXX_FLAGS_COVERAGE\n    ${COVERAGE_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the C++ compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_C_FLAGS_COVERAGE\n    ${COVERAGE_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the C compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_EXE_LINKER_FLAGS_COVERAGE\n    \"\"\n    CACHE STRING \"Flags used for linking binaries during coverage builds.\"\n    FORCE )\nset(CMAKE_SHARED_LINKER_FLAGS_COVERAGE\n    \"\"\n    CACHE STRING \"Flags used by the shared libraries linker during coverage builds.\"\n    FORCE )\nmark_as_advanced(\n    CMAKE_Fortran_FLAGS_COVERAGE\n    CMAKE_CXX_FLAGS_COVERAGE\n    CMAKE_C_FLAGS_COVERAGE\n    CMAKE_EXE_LINKER_FLAGS_COVERAGE\n    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )\n\nget_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(NOT (CMAKE_BUILD_TYPE STREQUAL \"Debug\" OR GENERATOR_IS_MULTI_CONFIG))\n    message(WARNING \"Code coverage results with an optimised (non-Debug) build may be misleading\")\nendif() # NOT (CMAKE_BUILD_TYPE STREQUAL \"Debug\" OR GENERATOR_IS_MULTI_CONFIG)\n\nif(CMAKE_C_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_Fortran_COMPILER_ID STREQUAL \"GNU\")\n    link_libraries(gcov)\nendif()\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_lcov(\n#     NAME testrunner_coverage                    # New target name\n#     EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES testrunner                     # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                        # Base directory for report\n#                                                 #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"           # Patterns to exclude (can be relative\n#                                                 #  to BASE_DIRECTORY, with CMake 3.4+)\n#     NO_DEMANGLE                                 # Don't demangle C++ symbols\n#                                                 #  even if c++filt is found\n# )\nfunction(setup_target_for_coverage_lcov)\n\n    set(options NO_DEMANGLE SONARQUBE)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT LCOV_PATH)\n        message(FATAL_ERROR \"lcov not found! Aborting...\")\n    endif() # NOT LCOV_PATH\n\n    if(NOT GENHTML_PATH)\n        message(FATAL_ERROR \"genhtml not found! Aborting...\")\n    endif() # NOT GENHTML_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(LCOV_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_LCOV_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND LCOV_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES LCOV_EXCLUDES)\n\n    # Conditional arguments\n    if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})\n      set(GENHTML_EXTRA_ARGS \"--demangle-cpp\")\n    endif()\n\n    # Setting up commands which will be run to generate coverage data.\n    # Cleanup lcov\n    set(LCOV_CLEAN_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -directory .\n        -b ${BASEDIR} --zerocounters\n    )\n    # Create baseline to make sure untouched files show up in the report\n    set(LCOV_BASELINE_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c -i -d . -b\n        ${BASEDIR} -o ${Coverage_NAME}.base\n    )\n    # Run tests\n    set(LCOV_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Capturing lcov counters and generating report\n    set(LCOV_CAPTURE_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory . -b\n        ${BASEDIR} --capture --output-file ${Coverage_NAME}.capture\n    )\n    # add baseline counters\n    set(LCOV_BASELINE_COUNT_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -a ${Coverage_NAME}.base\n        -a ${Coverage_NAME}.capture --output-file ${Coverage_NAME}.total\n    )\n    # filter collected data to final coverage report\n    set(LCOV_FILTER_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove\n        ${Coverage_NAME}.total ${LCOV_EXCLUDES} --output-file ${Coverage_NAME}.info\n    )\n    # Generate HTML output\n    set(LCOV_GEN_HTML_CMD\n        ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} -o\n        ${Coverage_NAME} ${Coverage_NAME}.info\n    )\n    if(${Coverage_SONARQUBE})\n        # Generate SonarQube output\n        set(GCOVR_XML_CMD\n            ${GCOVR_PATH} --sonarqube ${Coverage_NAME}_sonarqube.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n            ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n        )\n        set(GCOVR_XML_CMD_COMMAND\n            COMMAND ${GCOVR_XML_CMD}\n        )\n        set(GCOVR_XML_CMD_BYPRODUCTS ${Coverage_NAME}_sonarqube.xml)\n        set(GCOVR_XML_CMD_COMMENT COMMENT \"SonarQube code coverage info report saved in ${Coverage_NAME}_sonarqube.xml.\")\n    endif()\n\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n        message(STATUS \"Command to clean up lcov: \")\n        string(REPLACE \";\" \" \" LCOV_CLEAN_CMD_SPACED \"${LCOV_CLEAN_CMD}\")\n        message(STATUS \"${LCOV_CLEAN_CMD_SPACED}\")\n\n        message(STATUS \"Command to create baseline: \")\n        string(REPLACE \";\" \" \" LCOV_BASELINE_CMD_SPACED \"${LCOV_BASELINE_CMD}\")\n        message(STATUS \"${LCOV_BASELINE_CMD_SPACED}\")\n\n        message(STATUS \"Command to run the tests: \")\n        string(REPLACE \";\" \" \" LCOV_EXEC_TESTS_CMD_SPACED \"${LCOV_EXEC_TESTS_CMD}\")\n        message(STATUS \"${LCOV_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to capture counters and generate report: \")\n        string(REPLACE \";\" \" \" LCOV_CAPTURE_CMD_SPACED \"${LCOV_CAPTURE_CMD}\")\n        message(STATUS \"${LCOV_CAPTURE_CMD_SPACED}\")\n\n        message(STATUS \"Command to add baseline counters: \")\n        string(REPLACE \";\" \" \" LCOV_BASELINE_COUNT_CMD_SPACED \"${LCOV_BASELINE_COUNT_CMD}\")\n        message(STATUS \"${LCOV_BASELINE_COUNT_CMD_SPACED}\")\n\n        message(STATUS \"Command to filter collected data: \")\n        string(REPLACE \";\" \" \" LCOV_FILTER_CMD_SPACED \"${LCOV_FILTER_CMD}\")\n        message(STATUS \"${LCOV_FILTER_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate lcov HTML output: \")\n        string(REPLACE \";\" \" \" LCOV_GEN_HTML_CMD_SPACED \"${LCOV_GEN_HTML_CMD}\")\n        message(STATUS \"${LCOV_GEN_HTML_CMD_SPACED}\")\n\n        if(${Coverage_SONARQUBE})\n            message(STATUS \"Command to generate SonarQube XML output: \")\n            string(REPLACE \";\" \" \" GCOVR_XML_CMD_SPACED \"${GCOVR_XML_CMD}\")\n            message(STATUS \"${GCOVR_XML_CMD_SPACED}\")\n        endif()\n    endif()\n\n    # Setup target\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${LCOV_CLEAN_CMD}\n        COMMAND ${LCOV_BASELINE_CMD}\n        COMMAND ${LCOV_EXEC_TESTS_CMD}\n        COMMAND ${LCOV_CAPTURE_CMD}\n        COMMAND ${LCOV_BASELINE_COUNT_CMD}\n        COMMAND ${LCOV_FILTER_CMD}\n        COMMAND ${LCOV_GEN_HTML_CMD}\n        ${GCOVR_XML_CMD_COMMAND}\n\n        # Set output files as GENERATED (will be removed on 'make clean')\n        BYPRODUCTS\n            ${Coverage_NAME}.base\n            ${Coverage_NAME}.capture\n            ${Coverage_NAME}.total\n            ${Coverage_NAME}.info\n            ${GCOVR_XML_CMD_BYPRODUCTS}\n            ${Coverage_NAME}/index.html\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Resetting code coverage counters to zero.\\nProcessing code coverage counters and generating report.\"\n    )\n\n    # Show where to find the lcov info report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ;\n        COMMENT \"Lcov code coverage info report saved in ${Coverage_NAME}.info.\"\n        ${GCOVR_XML_CMD_COMMENT}\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ;\n        COMMENT \"Open ./${Coverage_NAME}/index.html in your browser to view the coverage report.\"\n    )\n\nendfunction() # setup_target_for_coverage_lcov\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_gcovr_xml(\n#     NAME ctest_coverage                    # New target name\n#     EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES executable_target         # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                   # Base directory for report\n#                                            #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"      # Patterns to exclude (can be relative\n#                                            #  to BASE_DIRECTORY, with CMake 3.4+)\n# )\n# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the\n# GCVOR command.\nfunction(setup_target_for_coverage_gcovr_xml)\n\n    set(options NONE)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT GCOVR_PATH)\n        message(FATAL_ERROR \"gcovr not found! Aborting...\")\n    endif() # NOT GCOVR_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(GCOVR_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND GCOVR_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES GCOVR_EXCLUDES)\n\n    # Combine excludes to several -e arguments\n    set(GCOVR_EXCLUDE_ARGS \"\")\n    foreach(EXCLUDE ${GCOVR_EXCLUDES})\n        list(APPEND GCOVR_EXCLUDE_ARGS \"-e\")\n        list(APPEND GCOVR_EXCLUDE_ARGS \"${EXCLUDE}\")\n    endforeach()\n\n    # Set up commands which will be run to generate coverage data\n    # Run tests\n    set(GCOVR_XML_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Running gcovr\n    set(GCOVR_XML_CMD\n        ${GCOVR_PATH} --xml ${Coverage_NAME}.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n        ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n    )\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n\n        message(STATUS \"Command to run tests: \")\n        string(REPLACE \";\" \" \" GCOVR_XML_EXEC_TESTS_CMD_SPACED \"${GCOVR_XML_EXEC_TESTS_CMD}\")\n        message(STATUS \"${GCOVR_XML_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate gcovr XML coverage data: \")\n        string(REPLACE \";\" \" \" GCOVR_XML_CMD_SPACED \"${GCOVR_XML_CMD}\")\n        message(STATUS \"${GCOVR_XML_CMD_SPACED}\")\n    endif()\n\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${GCOVR_XML_EXEC_TESTS_CMD}\n        COMMAND ${GCOVR_XML_CMD}\n\n        BYPRODUCTS ${Coverage_NAME}.xml\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Running gcovr to produce Cobertura code coverage report.\"\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ;\n        COMMENT \"Cobertura code coverage report saved in ${Coverage_NAME}.xml.\"\n    )\nendfunction() # setup_target_for_coverage_gcovr_xml\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_gcovr_html(\n#     NAME ctest_coverage                    # New target name\n#     EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES executable_target         # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                   # Base directory for report\n#                                            #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"      # Patterns to exclude (can be relative\n#                                            #  to BASE_DIRECTORY, with CMake 3.4+)\n# )\n# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the\n# GCVOR command.\nfunction(setup_target_for_coverage_gcovr_html)\n\n    set(options NONE)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT GCOVR_PATH)\n        message(FATAL_ERROR \"gcovr not found! Aborting...\")\n    endif() # NOT GCOVR_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(GCOVR_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND GCOVR_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES GCOVR_EXCLUDES)\n\n    # Combine excludes to several -e arguments\n    set(GCOVR_EXCLUDE_ARGS \"\")\n    foreach(EXCLUDE ${GCOVR_EXCLUDES})\n        list(APPEND GCOVR_EXCLUDE_ARGS \"-e\")\n        list(APPEND GCOVR_EXCLUDE_ARGS \"${EXCLUDE}\")\n    endforeach()\n\n    # Set up commands which will be run to generate coverage data\n    # Run tests\n    set(GCOVR_HTML_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Create folder\n    set(GCOVR_HTML_FOLDER_CMD\n        ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/${Coverage_NAME}\n    )\n    # Running gcovr\n    set(GCOVR_HTML_CMD\n        ${GCOVR_PATH} --html ${Coverage_NAME}/index.html --html-details -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n        ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n    )\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n\n        message(STATUS \"Command to run tests: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_EXEC_TESTS_CMD_SPACED \"${GCOVR_HTML_EXEC_TESTS_CMD}\")\n        message(STATUS \"${GCOVR_HTML_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to create a folder: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_FOLDER_CMD_SPACED \"${GCOVR_HTML_FOLDER_CMD}\")\n        message(STATUS \"${GCOVR_HTML_FOLDER_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate gcovr HTML coverage data: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_CMD_SPACED \"${GCOVR_HTML_CMD}\")\n        message(STATUS \"${GCOVR_HTML_CMD_SPACED}\")\n    endif()\n\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${GCOVR_HTML_EXEC_TESTS_CMD}\n        COMMAND ${GCOVR_HTML_FOLDER_CMD}\n        COMMAND ${GCOVR_HTML_CMD}\n\n        BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html  # report directory\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Running gcovr to produce HTML code coverage report.\"\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ;\n        COMMENT \"Open ./${Coverage_NAME}/index.html in your browser to view the coverage report.\"\n    )\n\nendfunction() # setup_target_for_coverage_gcovr_html\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_fastcov(\n#     NAME testrunner_coverage                    # New target name\n#     EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES testrunner                     # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                        # Base directory for report\n#                                                 #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/\" \"src/dir2/\"             # Patterns to exclude.\n#     NO_DEMANGLE                                 # Don't demangle C++ symbols\n#                                                 #  even if c++filt is found\n#     SKIP_HTML                                   # Don't create html report\n#     POST_CMD perl -i -pe s!${PROJECT_SOURCE_DIR}/!!g ctest_coverage.json  # E.g. for stripping source dir from file paths\n# )\nfunction(setup_target_for_coverage_fastcov)\n\n    set(options NO_DEMANGLE SKIP_HTML)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES FASTCOV_ARGS GENHTML_ARGS POST_CMD)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT FASTCOV_PATH)\n        message(FATAL_ERROR \"fastcov not found! Aborting...\")\n    endif()\n\n    if(NOT Coverage_SKIP_HTML AND NOT GENHTML_PATH)\n        message(FATAL_ERROR \"genhtml not found! Aborting...\")\n    endif()\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (Patterns, not paths, for fastcov)\n    set(FASTCOV_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_FASTCOV_EXCLUDES})\n        list(APPEND FASTCOV_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES FASTCOV_EXCLUDES)\n\n    # Conditional arguments\n    if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})\n        set(GENHTML_EXTRA_ARGS \"--demangle-cpp\")\n    endif()\n\n    # Set up commands which will be run to generate coverage data\n    set(FASTCOV_EXEC_TESTS_CMD ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS})\n\n    set(FASTCOV_CAPTURE_CMD ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}\n        --search-directory ${BASEDIR}\n        --process-gcno\n        --output ${Coverage_NAME}.json\n        --exclude ${FASTCOV_EXCLUDES}\n    )\n\n    set(FASTCOV_CONVERT_CMD ${FASTCOV_PATH}\n        -C ${Coverage_NAME}.json --lcov --output ${Coverage_NAME}.info\n    )\n\n    if(Coverage_SKIP_HTML)\n        set(FASTCOV_HTML_CMD \";\")\n    else()\n        set(FASTCOV_HTML_CMD ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS}\n            -o ${Coverage_NAME} ${Coverage_NAME}.info\n        )\n    endif()\n\n    set(FASTCOV_POST_CMD \";\")\n    if(Coverage_POST_CMD)\n        set(FASTCOV_POST_CMD ${Coverage_POST_CMD})\n    endif()\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Code coverage commands for target ${Coverage_NAME} (fastcov):\")\n\n        message(\"   Running tests:\")\n        string(REPLACE \";\" \" \" FASTCOV_EXEC_TESTS_CMD_SPACED \"${FASTCOV_EXEC_TESTS_CMD}\")\n        message(\"     ${FASTCOV_EXEC_TESTS_CMD_SPACED}\")\n\n        message(\"   Capturing fastcov counters and generating report:\")\n        string(REPLACE \";\" \" \" FASTCOV_CAPTURE_CMD_SPACED \"${FASTCOV_CAPTURE_CMD}\")\n        message(\"     ${FASTCOV_CAPTURE_CMD_SPACED}\")\n\n        message(\"   Converting fastcov .json to lcov .info:\")\n        string(REPLACE \";\" \" \" FASTCOV_CONVERT_CMD_SPACED \"${FASTCOV_CONVERT_CMD}\")\n        message(\"     ${FASTCOV_CONVERT_CMD_SPACED}\")\n\n        if(NOT Coverage_SKIP_HTML)\n            message(\"   Generating HTML report: \")\n            string(REPLACE \";\" \" \" FASTCOV_HTML_CMD_SPACED \"${FASTCOV_HTML_CMD}\")\n            message(\"     ${FASTCOV_HTML_CMD_SPACED}\")\n        endif()\n        if(Coverage_POST_CMD)\n            message(\"   Running post command: \")\n            string(REPLACE \";\" \" \" FASTCOV_POST_CMD_SPACED \"${FASTCOV_POST_CMD}\")\n            message(\"     ${FASTCOV_POST_CMD_SPACED}\")\n        endif()\n    endif()\n\n    # Setup target\n    add_custom_target(${Coverage_NAME}\n\n        # Cleanup fastcov\n        COMMAND ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}\n            --search-directory ${BASEDIR}\n            --zerocounters\n\n        COMMAND ${FASTCOV_EXEC_TESTS_CMD}\n        COMMAND ${FASTCOV_CAPTURE_CMD}\n        COMMAND ${FASTCOV_CONVERT_CMD}\n        COMMAND ${FASTCOV_HTML_CMD}\n        COMMAND ${FASTCOV_POST_CMD}\n\n        # Set output files as GENERATED (will be removed on 'make clean')\n        BYPRODUCTS\n             ${Coverage_NAME}.info\n             ${Coverage_NAME}.json\n             ${Coverage_NAME}/index.html  # report directory\n\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Resetting code coverage counters to zero. Processing code coverage counters and generating report.\"\n    )\n\n    set(INFO_MSG \"fastcov code coverage info report saved in ${Coverage_NAME}.info and ${Coverage_NAME}.json.\")\n    if(NOT Coverage_SKIP_HTML)\n        string(APPEND INFO_MSG \" Open ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html in your browser to view the coverage report.\")\n    endif()\n    # Show where to find the fastcov info report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ${CMAKE_COMMAND} -E echo ${INFO_MSG}\n    )\n\nendfunction() # setup_target_for_coverage_fastcov\n\nfunction(append_coverage_compiler_flags)\n    set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}\" PARENT_SCOPE)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}\" PARENT_SCOPE)\n    set(CMAKE_Fortran_FLAGS \"${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}\" PARENT_SCOPE)\n    message(STATUS \"Appending code coverage C compiler flags: ${COVERAGE_C_COMPILER_FLAGS}\")\n    message(STATUS \"Appending code coverage CXX compiler flags: ${COVERAGE_CXX_COMPILER_FLAGS}\")\nendfunction() # append_coverage_compiler_flags\n\n# Setup coverage for specific library\nfunction(append_coverage_compiler_flags_to_target name)\n    separate_arguments(_flag_list NATIVE_COMMAND \"${COVERAGE_COMPILER_FLAGS}\")\n    target_compile_options(${name} PRIVATE ${_flag_list})\n    if(CMAKE_C_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_Fortran_COMPILER_ID STREQUAL \"GNU\")\n        target_link_libraries(${name} PRIVATE gcov)\n    endif()\nendfunction()\n"
  },
  {
    "path": "demos/plugin/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle_plugin_demo)\nget_filename_component (ROOT_PATH \"${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE)\nfile (STRINGS \"${ROOT_PATH}/modules/juce_python/juce_python.h\" JUCE_PYTHON_MODULE)\n#string (REGEX REPLACE \"(.*)([0-9]+\\.[0-9]+\\.[0-9]+)(.*)\" \"\\\\2\" VERSION_NUMBER ${JUCE_PYTHON_MODULE})\nset(VERSION_NUMBER \"0.0\")\nproject (${PROJECT_NAME} VERSION ${VERSION_NUMBER})\n\n# Set browsable modules in IDE\nset_property (GLOBAL PROPERTY USE_FOLDERS YES)\noption (JUCE_ENABLE_MODULE_SOURCE_GROUPS \"Enable Module Source Groups\" ON)\n\n# Configure fetching content\n#include (FetchContent)\n#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)\n\n# Add the juce modules\nadd_subdirectory (${ROOT_PATH}/JUCE JUCE)\n#FetchContent_Declare (JUCE\n#    GIT_REPOSITORY https://github.com/juce-framework/JUCE.git\n#    GIT_TAG origin/master\n#    GIT_SHALLOW TRUE\n#    GIT_PROGRESS TRUE\n#    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)\n#FetchContent_MakeAvailable (JUCE)\n\n# Add the popsicle modules\nget_filename_component (MODULES_PATH \"${ROOT_PATH}/modules\" ABSOLUTE)\nadd_subdirectory (${MODULES_PATH} ./modules)\n#FetchContent_Declare (popsicle\n#    GIT_REPOSITORY https://github.com/kunitoki/popsicle.git\n#    GIT_TAG origin/master\n#    GIT_SHALLOW TRUE\n#    GIT_PROGRESS TRUE\n#    SOURCE_SUBDIR modules\n#    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)\n#FetchContent_MakeAvailable (popsicle)\n\n# Configure python\nif (APPLE)\n    set (Python_ROOT_DIR \"/Library/Frameworks/Python.framework/Versions/Current\")\nendif()\nset (Python_USE_STATIC_LIBS TRUE)\nfind_package (Python REQUIRED Interpreter Development.Embed)\n\n# Setup the juce app\njuce_add_plugin (\"${PROJECT_NAME}\"\n    PRODUCT_NAME \"PopsiclePluginDemo\"\n    VERSION \"${VERSION_NUMBER}\"\n    BUNDLE_ID \"org.kunitoki.popsicleplugindemo\"\n    FORMATS Standalone AU VST3\n    PLUGIN_MANUFACTURER_CODE POPS\n    PLUGIN_CODE Ppd0\n    IS_SYNTH OFF\n    NEEDS_MIDI_INPUT OFF\n    NEEDS_MIDI_OUTPUT OFF\n    IS_MIDI_EFFECT OFF\n    APP_SANDBOX_ENABLED ON\n    COPY_PLUGIN_AFTER_BUILD ON)\njuce_generate_juce_header (${PROJECT_NAME})\n\n# Add the binary target for the python standard library\nset (ADDITIONAL_IGNORED_PYTHON_PATTERNS \"lib2to3\" \"pydoc_data\" \"_xxtestfuzz*\")\nset (PYTHON_STANDARD_LIBRARY \"${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip\")\n\nadd_custom_target (\n    ${PROJECT_NAME}_stdlib\n    ${Python_EXECUTABLE} ${ROOT_PATH}/cmake/ArchivePythonStdlib.py\n        -b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}\n        -x \"\\\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\\\"\"\n    BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})\nadd_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)\n\njuce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})\nadd_dependencies (BinaryData ${PROJECT_NAME}_stdlib)\n\n# Setup target properties\ntarget_sources (${PROJECT_NAME} PRIVATE\n    PopsiclePluginEditor.cpp\n    PopsiclePluginEditor.h\n    PopsiclePluginProcessor.cpp\n    PopsiclePluginProcessor.h)\n\n#set_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING \"App\")\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET \"hidden\")\nset_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)\nset_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)\n\nif (APPLE)\n    #set_target_properties (${PROJECT_NAME} PROPERTIES OSX_ARCHITECTURES \"arm64;x86_64\")\n    #set_target_properties (BinaryData PROPERTIES OSX_ARCHITECTURES \"arm64;x86_64\")\n    target_link_options (${PROJECT_NAME} PRIVATE \"-Wl,-weak_reference_mismatches,weak\")\n    #set (LTO_CONFIGURATION \"juce::juce_recommended_lto_flags\")\n    set (LTO_CONFIGURATION \"\")\nelse()\n    set (LTO_CONFIGURATION \"\")\nendif()\n\nif (APPLE)\n    add_custom_command(\n        TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n        COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n        ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)\nelseif (UNIX)\n    add_custom_command(\n        TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n        COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n        ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)\nendif()\n\ntarget_compile_definitions (${PROJECT_NAME} PRIVATE\n    #JUCE_STANDALONE_APPLICATION=1\n    JUCE_MODAL_LOOPS_PERMITTED=1\n    JUCE_CATCH_UNHANDLED_EXCEPTIONS=0\n    JUCE_LOG_ASSERTIONS=1\n    JUCE_ALLOW_STATIC_NULL_VARIABLES=0\n    JUCE_STRICT_REFCOUNTEDPOINTER=1\n    JUCE_WEB_BROWSER=0\n    JUCE_LOAD_CURL_SYMBOLS_LAZILY=1\n    JUCE_SILENCE_XCODE_15_LINKER_WARNING=1\n    PYBIND11_DETAILED_ERROR_MESSAGES=1)\n\ntarget_link_libraries (${PROJECT_NAME} PRIVATE\n    #juce::juce_analytics\n    juce::juce_audio_basics\n    juce::juce_audio_devices\n    juce::juce_audio_formats\n    juce::juce_audio_plugin_client\n    juce::juce_audio_processors\n    juce::juce_audio_utils\n    juce::juce_core\n    #juce::juce_cryptography\n    juce::juce_data_structures\n    #juce::juce_dsp\n    juce::juce_events\n    juce::juce_graphics\n    juce::juce_gui_basics\n    juce::juce_gui_extra\n    #juce::juce_opengl\n    #juce::juce_osc\n    #juce::juce_video\n    juce::juce_recommended_config_flags\n    juce::juce_recommended_warning_flags\n    Python::Python\n    popsicle::juce_python\n    popsicle::juce_python_recommended_warning_flags\n    BinaryData\n    ${LTO_CONFIGURATION})\n"
  },
  {
    "path": "demos/plugin/PopsiclePluginEditor.cpp",
    "content": "#include \"PopsiclePluginProcessor.h\"\n#include \"PopsiclePluginEditor.h\"\n\n//==============================================================================\nAudioPluginAudioProcessorEditor::AudioPluginAudioProcessorEditor (AudioPluginAudioProcessor& p)\n    : AudioProcessorEditor (&p), processorRef (p)\n{\n    juce::ignoreUnused (processorRef);\n    // Make sure that before the constructor has finished, you've set the\n    // editor's size to whatever you need it to be.\n    setSize (400, 300);\n}\n\nAudioPluginAudioProcessorEditor::~AudioPluginAudioProcessorEditor()\n{\n}\n\n//==============================================================================\nvoid AudioPluginAudioProcessorEditor::paint (juce::Graphics& g)\n{\n    // (Our component is opaque, so we must completely fill the background with a solid colour)\n    g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));\n\n    g.setColour (juce::Colours::white);\n    g.setFont (15.0f);\n    g.drawFittedText (\"Hello World!\", getLocalBounds(), juce::Justification::centred, 1);\n}\n\nvoid AudioPluginAudioProcessorEditor::resized()\n{\n    // This is generally where you'll want to lay out the positions of any\n    // subcomponents in your editor..\n}\n"
  },
  {
    "path": "demos/plugin/PopsiclePluginEditor.h",
    "content": "#pragma once\n\n#include \"PopsiclePluginProcessor.h\"\n\n//==============================================================================\nclass AudioPluginAudioProcessorEditor  : public juce::AudioProcessorEditor\n{\npublic:\n    explicit AudioPluginAudioProcessorEditor (AudioPluginAudioProcessor&);\n    ~AudioPluginAudioProcessorEditor() override;\n\n    //==============================================================================\n    void paint (juce::Graphics&) override;\n    void resized() override;\n\nprivate:\n    // This reference is provided as a quick way for your editor to\n    // access the processor object that created it.\n    AudioPluginAudioProcessor& processorRef;\n\n    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginAudioProcessorEditor)\n};\n"
  },
  {
    "path": "demos/plugin/PopsiclePluginProcessor.cpp",
    "content": "#include \"PopsiclePluginProcessor.h\"\n#include \"PopsiclePluginEditor.h\"\n\n// =================================================================================================\n\nPYBIND11_EMBEDDED_MODULE(custom, m)\n{\n    namespace py = pybind11;\n\n    //py::module_::import (popsicle::PythonModuleName);\n\n    //py::class_<AudioPluginAudioProcessor, juce::Component> (m, \"PopsicleDemo\")\n    //    .def_readwrite (\"text\", &PopsicleDemo::text);\n}\n\n// =================================================================================================\n\nAudioPluginAudioProcessor::AudioPluginAudioProcessor()\n    : AudioProcessor (BusesProperties()\n                     #if ! JucePlugin_IsMidiEffect\n                      #if ! JucePlugin_IsSynth\n                       .withInput  (\"Input\",  juce::AudioChannelSet::stereo(), true)\n                      #endif\n                       .withOutput (\"Output\", juce::AudioChannelSet::stereo(), true)\n                     #endif\n                       )\n/*    , engine (popsicle::ScriptEngine::prepareScriptingHome (\n        juce::JUCEApplication::getInstance()->getApplicationName(),\n        juce::File::getSpecialLocation (juce::File::tempDirectory),\n        [](const char* resourceName) -> juce::MemoryBlock\n        {\n            int dataSize = 0;\n            auto data = BinaryData::getNamedResource (resourceName, dataSize);\n            return { data, static_cast<size_t> (dataSize) };\n        }))*/\n{\n    pybind11::dict locals;\n    //locals[\"custom\"] = pybind11::module_::import (\"custom\");\n    locals[\"juce\"] = pybind11::module_::import (popsicle::PythonModuleName);\n    //locals[\"this\"] = pybind11::cast (this);\n\n    auto result = engine.runScript (R\"(\n# import sys\n\n# An example of scriptable self\nprint(\"Scripting JUCE!\")\n\n#this.text = \"Popsicle \" + sys.version.split(\" \")[0]\n#this.setOpaque(True)\n#this.setSize(600, 300)\n    )\", locals);\n\n    if (result.failed())\n        std::cout << result.getErrorMessage();\n}\n\nAudioPluginAudioProcessor::~AudioPluginAudioProcessor()\n{\n}\n\n// =================================================================================================\n\nconst juce::String AudioPluginAudioProcessor::getName() const\n{\n    return JucePlugin_Name;\n}\n\nbool AudioPluginAudioProcessor::acceptsMidi() const\n{\n   #if JucePlugin_WantsMidiInput\n    return true;\n   #else\n    return false;\n   #endif\n}\n\nbool AudioPluginAudioProcessor::producesMidi() const\n{\n   #if JucePlugin_ProducesMidiOutput\n    return true;\n   #else\n    return false;\n   #endif\n}\n\nbool AudioPluginAudioProcessor::isMidiEffect() const\n{\n   #if JucePlugin_IsMidiEffect\n    return true;\n   #else\n    return false;\n   #endif\n}\n\ndouble AudioPluginAudioProcessor::getTailLengthSeconds() const\n{\n    return 0.0;\n}\n\nint AudioPluginAudioProcessor::getNumPrograms()\n{\n    return 1;   // NB: some hosts don't cope very well if you tell them there are 0 programs,\n                // so this should be at least 1, even if you're not really implementing programs.\n}\n\nint AudioPluginAudioProcessor::getCurrentProgram()\n{\n    return 0;\n}\n\nvoid AudioPluginAudioProcessor::setCurrentProgram (int index)\n{\n    juce::ignoreUnused (index);\n}\n\nconst juce::String AudioPluginAudioProcessor::getProgramName (int index)\n{\n    juce::ignoreUnused (index);\n    return {};\n}\n\nvoid AudioPluginAudioProcessor::changeProgramName (int index, const juce::String& newName)\n{\n    juce::ignoreUnused (index, newName);\n}\n\n// =================================================================================================\n\nvoid AudioPluginAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)\n{\n    // Use this method as the place to do any pre-playback\n    // initialisation that you need..\n    juce::ignoreUnused (sampleRate, samplesPerBlock);\n}\n\nvoid AudioPluginAudioProcessor::releaseResources()\n{\n    // When playback stops, you can use this as an opportunity to free up any\n    // spare memory, etc.\n}\n\nbool AudioPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const\n{\n  #if JucePlugin_IsMidiEffect\n    juce::ignoreUnused (layouts);\n    return true;\n  #else\n    // This is the place where you check if the layout is supported.\n    // In this template code we only support mono or stereo.\n    // Some plugin hosts, such as certain GarageBand versions, will only\n    // load plugins that support stereo bus layouts.\n    if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono()\n     && layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo())\n        return false;\n\n    // This checks if the input layout matches the output layout\n   #if ! JucePlugin_IsSynth\n    if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet())\n        return false;\n   #endif\n\n    return true;\n  #endif\n}\n\nvoid AudioPluginAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer,\n                                              juce::MidiBuffer& midiMessages)\n{\n    juce::ignoreUnused (midiMessages);\n\n    juce::ScopedNoDenormals noDenormals;\n    auto totalNumInputChannels  = getTotalNumInputChannels();\n    auto totalNumOutputChannels = getTotalNumOutputChannels();\n\n    // In case we have more outputs than inputs, this code clears any output\n    // channels that didn't contain input data, (because these aren't\n    // guaranteed to be empty - they may contain garbage).\n    // This is here to avoid people getting screaming feedback\n    // when they first compile a plugin, but obviously you don't need to keep\n    // this code if your algorithm always overwrites all the output channels.\n    for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)\n        buffer.clear (i, 0, buffer.getNumSamples());\n\n    // This is the place where you'd normally do the guts of your plugin's\n    // audio processing...\n    // Make sure to reset the state if your inner loop is processing\n    // the samples and the outer loop is handling the channels.\n    // Alternatively, you can process the samples with the channels\n    // interleaved by keeping the same state.\n    for (int channel = 0; channel < totalNumInputChannels; ++channel)\n    {\n        auto* channelData = buffer.getWritePointer (channel);\n        juce::ignoreUnused (channelData);\n        // ..do something to the data...\n    }\n}\n\n// =================================================================================================\n\nbool AudioPluginAudioProcessor::hasEditor() const\n{\n    return true; // (change this to false if you choose to not supply an editor)\n}\n\njuce::AudioProcessorEditor* AudioPluginAudioProcessor::createEditor()\n{\n    return new AudioPluginAudioProcessorEditor (*this);\n}\n\n// =================================================================================================\n\nvoid AudioPluginAudioProcessor::getStateInformation (juce::MemoryBlock& destData)\n{\n    // You should use this method to store your parameters in the memory block.\n    // You could do that either as raw data, or use the XML or ValueTree classes\n    // as intermediaries to make it easy to save and load complex data.\n    juce::ignoreUnused (destData);\n}\n\nvoid AudioPluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)\n{\n    // You should use this method to restore your parameters from this memory block,\n    // whose contents will have been created by the getStateInformation() call.\n    juce::ignoreUnused (data, sizeInBytes);\n}\n\n// =================================================================================================\n\njuce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()\n{\n    return new AudioPluginAudioProcessor();\n}\n"
  },
  {
    "path": "demos/plugin/PopsiclePluginProcessor.h",
    "content": "#pragma once\n\n#include \"JuceHeader.h\"\n\n//==============================================================================\nclass AudioPluginAudioProcessor  : public juce::AudioProcessor\n{\npublic:\n    //==============================================================================\n    AudioPluginAudioProcessor();\n    ~AudioPluginAudioProcessor() override;\n\n    //==============================================================================\n    void prepareToPlay (double sampleRate, int samplesPerBlock) override;\n    void releaseResources() override;\n\n    bool isBusesLayoutSupported (const BusesLayout& layouts) const override;\n\n    void processBlock (juce::AudioBuffer<float>&, juce::MidiBuffer&) override;\n    using AudioProcessor::processBlock;\n\n    //==============================================================================\n    juce::AudioProcessorEditor* createEditor() override;\n    bool hasEditor() const override;\n\n    //==============================================================================\n    const juce::String getName() const override;\n\n    bool acceptsMidi() const override;\n    bool producesMidi() const override;\n    bool isMidiEffect() const override;\n    double getTailLengthSeconds() const override;\n\n    //==============================================================================\n    int getNumPrograms() override;\n    int getCurrentProgram() override;\n    void setCurrentProgram (int index) override;\n    const juce::String getProgramName (int index) override;\n    void changeProgramName (int index, const juce::String& newName) override;\n\n    //==============================================================================\n    void getStateInformation (juce::MemoryBlock& destData) override;\n    void setStateInformation (const void* data, int sizeInBytes) override;\n\nprivate:\n    popsicle::ScriptEngine engine;\n\n    //==============================================================================\n    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginAudioProcessor)\n};\n"
  },
  {
    "path": "demos/standalone/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle_standalone_demo)\nget_filename_component (ROOT_PATH \"${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE)\nfile (STRINGS \"${ROOT_PATH}/modules/juce_python/juce_python.h\" JUCE_PYTHON_MODULE)\nstring (REGEX REPLACE \"(.*)([0-9]+\\.[0-9]+\\.[0-9]+)(.*)\" \"\\\\2\" VERSION_NUMBER ${JUCE_PYTHON_MODULE})\nproject (${PROJECT_NAME} VERSION ${VERSION_NUMBER})\n\n# Set browsable modules in IDE\nset_property (GLOBAL PROPERTY USE_FOLDERS YES)\noption (JUCE_ENABLE_MODULE_SOURCE_GROUPS \"Enable Module Source Groups\" ON)\n\n# Configure fetching content\n#include (FetchContent)\n#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)\n\n# Add the juce modules\nadd_subdirectory (${ROOT_PATH}/JUCE JUCE)\n#FetchContent_Declare (JUCE\n#    GIT_REPOSITORY https://github.com/juce-framework/JUCE.git\n#    GIT_TAG origin/master\n#    GIT_SHALLOW TRUE\n#    GIT_PROGRESS TRUE\n#    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)\n#FetchContent_MakeAvailable (JUCE)\n\n# Add the popsicle modules\nget_filename_component (MODULES_PATH \"${ROOT_PATH}/modules\" ABSOLUTE)\nadd_subdirectory (${MODULES_PATH} ./modules)\n#FetchContent_Declare (popsicle\n#    GIT_REPOSITORY https://github.com/kunitoki/popsicle.git\n#    GIT_TAG origin/master\n#    GIT_SHALLOW TRUE\n#    GIT_PROGRESS TRUE\n#    SOURCE_SUBDIR modules\n#    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)\n#FetchContent_MakeAvailable (popsicle)\n\n# Configure python\nif (APPLE)\n    set (Python_ROOT_DIR \"/Library/Frameworks/Python.framework/Versions/Current\")\nendif()\nset (Python_USE_STATIC_LIBS TRUE)\nfind_package (Python REQUIRED Interpreter Development.Embed)\n\n# Setup the juce app\njuce_add_gui_app (${PROJECT_NAME}\n    PRODUCT_NAME \"PopsicleDemo\"\n    VERSION \"${VERSION_NUMBER}\"\n    BUNDLE_ID \"org.kunitoki.popsicledemo\")\njuce_generate_juce_header (${PROJECT_NAME})\n\n# Add the binary target for the python standard library\nset (ADDITIONAL_IGNORED_PYTHON_PATTERNS \"lib2to3\" \"pydoc_data\" \"_xxtestfuzz*\")\nset (PYTHON_STANDARD_LIBRARY \"${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip\")\n\nadd_custom_target (\n    ${PROJECT_NAME}_stdlib\n    ${Python_EXECUTABLE} ${ROOT_PATH}/cmake/ArchivePythonStdlib.py\n        -b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}\n        -x \"\\\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\\\"\"\n    BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})\nadd_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)\n\njuce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})\nadd_dependencies (BinaryData ${PROJECT_NAME}_stdlib)\n\n# Setup target properties\ntarget_sources (${PROJECT_NAME} PRIVATE\n    Main.cpp\n    PopsicleDemo.cpp\n    PopsicleDemo.h)\n\nset_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING \"App\")\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)\nset_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET \"hidden\")\nset_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)\nset_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)\n\nif (APPLE)\n    #set_target_properties (${PROJECT_NAME} PROPERTIES OSX_ARCHITECTURES \"arm64;x86_64\")\n    #set_target_properties (BinaryData PROPERTIES OSX_ARCHITECTURES \"arm64;x86_64\")\n    target_link_options (${PROJECT_NAME} PRIVATE \"-Wl,-weak_reference_mismatches,weak\")\n    #set (LTO_CONFIGURATION \"juce::juce_recommended_lto_flags\")\n    set (LTO_CONFIGURATION \"\")\nelse()\n    set (LTO_CONFIGURATION \"\")\nendif()\n\nif (APPLE)\n    add_custom_command(\n        TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n        COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n        ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)\nelseif (UNIX)\n    add_custom_command(\n        TARGET \"${PROJECT_NAME}\" POST_BUILD DEPENDS \"${PROJECT_NAME}\"\n        COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>\n        ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)\nendif()\n\ntarget_compile_definitions (${PROJECT_NAME} PRIVATE\n    JUCE_STANDALONE_APPLICATION=1\n    JUCE_MODAL_LOOPS_PERMITTED=1\n    JUCE_CATCH_UNHANDLED_EXCEPTIONS=0\n    JUCE_LOG_ASSERTIONS=1\n    JUCE_ALLOW_STATIC_NULL_VARIABLES=0\n    JUCE_STRICT_REFCOUNTEDPOINTER=1\n    JUCE_WEB_BROWSER=0\n    JUCE_LOAD_CURL_SYMBOLS_LAZILY=1\n    JUCE_SILENCE_XCODE_15_LINKER_WARNING=1\n    PYBIND11_DETAILED_ERROR_MESSAGES=1)\n\ntarget_link_libraries (${PROJECT_NAME} PRIVATE\n    #juce::juce_analytics\n    juce::juce_audio_basics\n    juce::juce_audio_devices\n    juce::juce_audio_formats\n    juce::juce_audio_processors\n    juce::juce_audio_utils\n    juce::juce_core\n    #juce::juce_cryptography\n    juce::juce_data_structures\n    #juce::juce_dsp\n    juce::juce_events\n    juce::juce_graphics\n    juce::juce_gui_basics\n    juce::juce_gui_extra\n    #juce::juce_opengl\n    #juce::juce_osc\n    #juce::juce_video\n    juce::juce_recommended_config_flags\n    juce::juce_recommended_warning_flags\n    Python::Python\n    popsicle::juce_python\n    popsicle::juce_python_recommended_warning_flags\n    BinaryData\n    ${LTO_CONFIGURATION})\n"
  },
  {
    "path": "demos/standalone/Main.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"JuceHeader.h\"\n#include \"PopsicleDemo.h\"\n\n// =================================================================================================\n\nclass PopsicleApplication : public juce::JUCEApplication\n{\npublic:\n    PopsicleApplication() = default;\n\n    const juce::String getApplicationName() override\n    {\n        return \"PopsicleDemo\";\n    }\n\n    const juce::String getApplicationVersion() override\n    {\n        return \"1.0.0\";\n    }\n\n    void initialise (const String&) override\n    {\n        mainWindow.reset (new MainWindow (\"PopsicleDemo\", new PopsicleDemo()));\n    }\n\n    void shutdown() override\n    {\n        mainWindow = nullptr;\n    }\n\nprivate:\n    class MainWindow : public juce::DocumentWindow\n    {\n    public:\n        MainWindow (const juce::String& name, juce::Component* c)\n            : juce::DocumentWindow (name, juce::Desktop::getInstance().getDefaultLookAndFeel()\n                                          .findColour (juce::ResizableWindow::backgroundColourId),\n                                    juce::DocumentWindow::allButtons)\n        {\n            setUsingNativeTitleBar (true);\n            setContentOwned (c, true);\n\n           #if JUCE_ANDROID || JUCE_IOS\n            setFullScreen (true);\n           #else\n            setResizable (true, false);\n            setResizeLimits (300, 250, 10000, 10000);\n            centreWithSize (getWidth(), getHeight());\n           #endif\n\n            juce::MessageManager::callAsync ([this]\n            {\n                juce::Process::makeForegroundProcess();\n\n                setVisible (true);\n                toFront (true);\n            });\n        }\n\n        void closeButtonPressed() override\n        {\n            juce::JUCEApplication::getInstance()->systemRequestedQuit();\n        }\n\n    private:\n        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)\n    };\n\n    std::unique_ptr<MainWindow> mainWindow;\n};\n\n// =================================================================================================\n\nSTART_JUCE_APPLICATION (PopsicleApplication)\n"
  },
  {
    "path": "demos/standalone/PopsicleDemo.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"PopsicleDemo.h\"\n\n// =================================================================================================\n\nPYBIND11_EMBEDDED_MODULE(custom, m)\n{\n    namespace py = pybind11;\n\n    py::module_::import (popsicle::PythonModuleName);\n\n    py::class_<PopsicleDemo, juce::Component> (m, \"PopsicleDemo\")\n        .def_readwrite (\"text\", &PopsicleDemo::text);\n}\n\n// =================================================================================================\n\nnamespace {\nvoid crashHandler ([[maybe_unused]] void* stack)\n{\n    DBG (juce::SystemStats::getStackBacktrace());\n}\n} // namespace\n\n// =================================================================================================\n\nPopsicleDemo::PopsicleDemo()\n    : text (\"Unkown\")\n    , engine (popsicle::ScriptEngine::prepareScriptingHome (\n        juce::JUCEApplication::getInstance()->getApplicationName(),\n        juce::File::getSpecialLocation (juce::File::tempDirectory),\n        [](const char* resourceName) -> juce::MemoryBlock\n        {\n            int dataSize = 0;\n            auto data = BinaryData::getNamedResource (resourceName, dataSize);\n            return { data, static_cast<size_t> (dataSize) };\n        }))\n{\n    juce::SystemStats::setApplicationCrashHandler (crashHandler);\n\n    pybind11::dict locals;\n    locals[\"custom\"] = pybind11::module_::import (\"custom\");\n    locals[\"juce\"] = pybind11::module_::import (popsicle::PythonModuleName);\n    locals[\"this\"] = pybind11::cast (this);\n\n    auto result = engine.runScript (R\"(\nimport sys\n\n# An example of scriptable self\nprint(\"Scripting JUCE!\")\n\nthis.text = \"Popsicle \" + sys.version.split(\" \")[0]\nthis.setOpaque(True)\nthis.setSize(600, 300)\n    )\", locals);\n\n    if (result.failed())\n        std::cout << result.getErrorMessage();\n}\n\nPopsicleDemo::~PopsicleDemo()\n{\n}\n\nvoid PopsicleDemo::paint (juce::Graphics& g)\n{\n    g.fillAll (findColour (juce::DocumentWindow::backgroundColourId));\n\n    g.setFont (juce::Font (16.0f));\n    g.setColour (juce::Colours::white);\n\n    juce::String finalText;\n    finalText << \"Hello, \" << text << \"!\";\n\n    g.drawText (finalText, getLocalBounds(), juce::Justification::centred, true);\n}\n\nvoid PopsicleDemo::resized()\n{\n}\n"
  },
  {
    "path": "demos/standalone/PopsicleDemo.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include \"JuceHeader.h\"\n\n// =================================================================================================\n\nclass PopsicleDemo : public juce::Component\n{\npublic:\n    PopsicleDemo();\n    ~PopsicleDemo() override;\n\n    // juce::Component\n    void paint (juce::Graphics& g) override;\n    void resized() override;\n\n    juce::String text;\n\nprivate:\n    popsicle::ScriptEngine engine;\n\n    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PopsicleDemo)\n};\n"
  },
  {
    "path": "docs/EmbeddingTutorial.rst",
    "content": "=========================\nPopsicle: Embedding Guide\n=========================\n\nTODO\n\n\n--------------------------------------\nAdding popsicle to the project (cmake)\n--------------------------------------\n\nWhen `cmake` is the preferred build system for a JUCE app, it's necessary to fetch the popsicle repository\n\n- Adding an in-tree checked out repository of popsicle (as a non recursive submodule of your project):\n\n   .. code-block:: cmake\n\n     add_subdirectory (${CMAKE_CURRENT_LIST_DIR}/popsicle/modules)\n\n- Adding an out-of-tree checked out repository of popsicle:\n\n   .. code-block:: cmake\n\n     add_subdirectory (${CMAKE_CURRENT_LIST_DIR}/../popsicle/modules popsicle)\n\n- Using `FetchContent` to add popsicle to your project:\n\n   .. code-block:: cmake\n\n     include (FetchContent)\n     set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)\n     FetchContent_Declare (popsicle\n         GIT_REPOSITORY https://github.com/kunitoki/popsicle.git\n         GIT_TAG origin/master # Eventually a tagged release\n         GIT_SHALLOW TRUE\n         GIT_PROGRESS TRUE\n         SOURCE_SUBDIR modules\n         SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)\n     FetchContent_MakeAvailable (popsicle)\n\nOnce this is done, it's also ncessary to find python interpreter and libraries to embed:\n\n.. code-block:: cmake\n\n  set (Python_USE_STATIC_LIBS TRUE)\n  find_package (Python REQUIRED Interpreter Development.Embed)\n\nIf you installed python globally using the official upstream installers, it's possible to force their location as well to simplify the selection of the desired python version, for example in macOS:\n\n.. code-block:: cmake\n\n  set (Python_ROOT_DIR \"/Library/Frameworks/Python.framework/Versions/Current\")\n  set (Python_USE_STATIC_LIBS TRUE)\n  find_package (Python REQUIRED Interpreter Development.Embed)\n\nAnd add the necessary modules to the target (application or plugin):\n\n.. code-block:: cmake\n\n  target_link_libraries (${PROJECT_NAME} PRIVATE\n    juce::juce_audio_basics\n    juce::juce_audio_devices\n    # More juce modules here ...\n    Python::Python                                    # << Add python library\n    popsicle::juce_python                             # << Add popsicle juce_python\n    popsicle::juce_python_recommended_warning_flags)  # << Add popsicle recommended warning flags\n\nIn order to be able to initialise correctly the embedded interpreter on the machine where the application will be deployed, we need to also zip and deploy the Python standard library or the interpreter bundled with the application will fail to initialise, requiring the final user to install the exact same python version.\n\nIn order to create a zip of the standard library we can add a new target which executes a script in `popsicle/cmake/ArchivePythonStdlib.py` (modify the path in case your location of popsicle is different):\n\n.. code-block:: cmake\n\n  set (ADDITIONAL_IGNORED_PYTHON_PATTERNS \"lib2to3\" \"pydoc_data\" \"_xxtestfuzz*\")\n  set (PYTHON_STANDARD_LIBRARY \"${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip\")\n\n  add_custom_target (\n      ${PROJECT_NAME}_stdlib\n      ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/popsicle/cmake/ArchivePythonStdlib.py\n          -b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}\n          -i \"\\\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\\\"\"\n      BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})\n  add_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)\n\nThis will compile a zip file in `CMAKE_CURRENT_BINARY_DIR` with the Python's standard library that can be then copied when the app is installed.\n\nThe zip file can also be embedded in the binary by using the `juce_add_binary_data`:\n\n.. code-block:: cmake\n\n  juce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})\n  add_dependencies (BinaryData ${PROJECT_NAME}_stdlib)\n\n  target_link_libraries (${PROJECT_NAME} PRIVATE\n    juce::juce_audio_basics\n    juce::juce_audio_devices\n    # More juce modules here ...\n    BinaryData)\n\n\n-----------------------------------------\nAdding popsicle to the project (projucer)\n-----------------------------------------\n\nTODO\n\n\n----------------------------------\nBoostrapping the interpreter (C++)\n----------------------------------\n\nTODO\n"
  },
  {
    "path": "docs/QuickStartGuide.rst",
    "content": "\n===========================\nPopsicle: Quick Start Guide\n===========================\n\nPopsicle is a groundbreaking project designed to extend the accessibility of `JUCE <https://juce.com/>`_ by seamlessly integrating it with Python. Leveraging the power of `pybind11 <https://pybind11.readthedocs.io/en/stable/>`_, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.\n\n\n--------------------------\nUsing the wheels in Python\n--------------------------\n\nIn order to use popsicle is necessary to install the wheels from pypi.\n\n.. code-block:: bash\n\n  pip3 install popsicle\n\n\n-----------------------------\nImporting the popsicle module\n-----------------------------\n\nTo make sure everything is setup correctly, execute the following command:\n\n.. code-block:: bash\n\n  python3 -c \"import popsicle as juce; print(juce.SystemStats.getJUCEVersion())\"\n\nWhich should print something like:\n\n.. code-block:: bash\n\n  JUCE v7.0.9\n\nNow you are ready to rock !\n\n\n------------------------------\nFirst hands on of JUCE classes\n------------------------------\n\nLet's grab a more convoluted example:\n\n.. code-block:: python\n\n  import popsicle as juce\n\n  el = juce.XmlElement(\"TEST\")\n  el.setAttribute(\"property1\", \"100\")\n  el.setAttribute(\"property2\", \"hallo\")\n  el.setAttribute(\"property3\", \"1\")\n\n  os = juce.MemoryOutputStream()\n\n  el.writeTo(os)\n\n  print(os.toString())\n\nWhich invoked should print:\n\n.. code-block:: bash\n\n  <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n  <TEST property1=\"100\" property2=\"hallo\" property3=\"1\"/>\n\n\n--------------------------\nOur first JUCE application\n--------------------------\n\nNow we would like to start a proper JUCE application with the Message Thread running and all the JUCE bell and whistles, but let's start with having our first JUCEApplication subclass:\n\n.. code-block:: python\n\n  import popsicle as juce\n\n  class MyFirstPopsicleApp(juce.JUCEApplication):\n    def __init__(self):\n      juce.JUCEApplication.__init__(self)\n\n    def getApplicationName(self):\n      return \"My First Popsicle App\"\n\n    def getApplicationVersion(self):\n      return \"1.0\"\n\n    def initialise(self, commandLineParameters):\n      print(\"We were called with:\", commandLineParameters)\n      juce.MessageManager.callAsync(lambda: self.systemRequestedQuit())\n\n    def shutdown(self):\n      print(\"We were told to shutdown\")\n\nNow that we have our application, we need to tell just to use it, let's add this at the end of the file:\n\n.. code-block:: python\n  if __name__ == \"__main__\":\n    juce.START_JUCE_APPLICATION(MyFirstPopsicleApp)\n\nAt this point, after saving the file (called `first_app.py` or whatever it suit best), when executed like this:\n\n.. code-block:: bash\n\n  python3 first_app.py 1 2 3 \"test\"\n\nWill start and immediately quit, producing this output:\n\n.. code-block:: bash\n\n  We were called with: 1 2 3 test\n  We were told to shutdown\n\n---------------\nAdding a window\n---------------\n\nIn order to show something on screen, we need to build a window with an empty component into it and show it.\n\n.. code-block:: python\n\n  import popsicle as juce\n\n  class MyFirstPopsicleComponent(juce.Component):\n    def __init__(self):\n      juce.Component.__init__(self)\n      self.setSize(600, 400)\n      self.setVisible(True)\n\n    def paint(self, g):\n      g.fillAll(juce.Colours.red)\n\n  class MyFirstPopsicleWindow(juce.DocumentWindow):\n    component = None\n\n    def __init__(self):\n      juce.DocumentWindow.__init__(\n        self,\n        juce.JUCEApplication.getInstance().getApplicationName(),\n        juce.Desktop.getInstance().getDefaultLookAndFeel()\n          .findColour(juce.ResizableWindow.backgroundColourId),\n        juce.DocumentWindow.allButtons,\n        True)\n\n        self.component = MyFirstPopsicleComponent()\n\n        self.setResizable(True, True)\n        self.setContentNonOwned(self.component, True)\n        self.centreWithSize(self.component.getWidth(), self.component.getHeight() + self.getTitleBarHeight())\n        self.setVisible(True)\n\n    def __del__(self):\n      self.clearContentComponent()\n\n      if self.component:\n        self.component.setVisible(False)\n        del self.component\n\n    def closeButtonPressed(self):\n      juce.JUCEApplication.getInstance().systemRequestedQuit()\n\nThen let's add it to the application:\n\n.. code-block:: python\n\n  class MyFirstPopsicleApp(juce.JUCEApplication):\n    window = None\n\n    def __init__(self):\n      juce.JUCEApplication.__init__(self)\n\n    def getApplicationName(self):\n      return \"My First Popsicle App\"\n\n    def getApplicationVersion(self):\n      return \"1.0\"\n\n    def initialise(self, commandLineParameters):\n      self.window = MyFirstPopsicleWindow()\n\n      juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n    def shutdown(self):\n      if self.window:\n        del self.window\n\nAt this point launching the app will show a window with a red component inside. Great progress !\n"
  },
  {
    "path": "docs/conf.py",
    "content": "# -*- coding: utf-8 -*-\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.insert(0, os.path.abspath('.'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.ifconfig']\n\n# 'sphinx.ext.coverage'\n# fancy extensions we don't need now...\n# 'sphinx.ext.viewcode'\n# 'sphinx.ext.intersphinx',\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'QuickStartGuide'\n\n# General information about the project.\nproject = u'Popsicle'\ncopyright = u'2024, Popsicle Project'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '1.0'\n# The full version, including alpha/beta/rc tags.\nrelease = '1.0.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\nhtml_show_copyright = False\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# If nonempty, this is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = ''\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'popsicledoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n#latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n#latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\n#latex_documents = []\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Additional stuff for the LaTeX preamble.\n#latex_preamble = ''\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\n#man_pages = []\n\n\n# -- Options for Epub output ---------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = u'Popsicle'\nepub_author = u'kunitoki'\nepub_publisher = u'kunitoki'\nepub_copyright = u'2024, kunitoki'\n\n# The language of the text. It defaults to the language option\n# or en if the language is not set.\n#epub_language = ''\n\n# The scheme of the identifier. Typical schemes are ISBN or URL.\n#epub_scheme = ''\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#epub_identifier = ''\n\n# A unique identification for the text.\n#epub_uid = ''\n\n# HTML files that should be inserted before the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_pre_files = []\n\n# HTML files shat should be inserted after the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_post_files = []\n\n# A list of files that should not be packed into the epub file.\n#epub_exclude_files = []\n\n# The depth of the table of contents in toc.ncx.\n#epub_tocdepth = 3\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {'http://docs.python.org/': None}\n"
  },
  {
    "path": "examples/.gitignore",
    "content": "emoji_cache/\n"
  },
  {
    "path": "examples/__init__.py",
    "content": ""
  },
  {
    "path": "examples/animated_component.py",
    "content": "import math\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.AnimatedAppComponent):\n    def __init__(self):\n        super().__init__()\n\n        self.setSize(800, 600)\n        self.setFramesPerSecond(60)\n\n    def update(self):\n        pass\n\n    def paint(self, g):\n        g.fillAll(self.getLookAndFeel().findColour(juce.ResizableWindow.backgroundColourId))\n\n        g.setColour(juce.Colours.turquoise) # self.getLookAndFeel().findColour(juce.Slider.thumbColourId)\n\n        fishLength = 15\n        spinePath = juce.Path()\n\n        for i in range(fishLength):\n            radius = 100 + 10 * math.sin(self.getFrameCounter() * 0.1 + i * 0.5)\n\n            p = juce.Point[float](\n                self.getWidth() / 2.0 + 1.5 * radius * math.sin(self.getFrameCounter() * 0.02 + i * 0.12),\n                self.getHeight() / 2.0 + 1.0 * radius * math.cos(self.getFrameCounter() * 0.04 + i * 0.12))\n\n            g.fillEllipse(p.x - i, p.y - i, 2.0 + 2.0 * i, 2.0 + 2.0 * i)\n\n            if i == 0:\n                spinePath.startNewSubPath(p)\n            else:\n                spinePath.lineTo(p)\n\n        g.strokePath(spinePath, juce.PathStrokeType(4.0))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Animated Component\")\n"
  },
  {
    "path": "examples/audio_device.py",
    "content": "import math\nimport random\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass AudioCallback(juce.AudioIODeviceCallback):\n    gain = 1.0\n    time = 0.0\n    device = None\n\n    def audioDeviceAboutToStart(self, device: juce.AudioIODevice):\n        print(\"starting\", device, \"at\", device.getCurrentSampleRate())\n        self.device = device\n\n    def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, outputs, numOutputChannels, numSamples, context):\n        for sample in range(numSamples):\n            noise = (random.random() * 2.0 - 1.0) * 0.025\n            sound = math.sin(math.radians(self.time))\n            self.time = (self.time + 2.0) % 360.0\n\n            for output in outputs:\n                output[sample] = (noise + sound) * self.gain\n\n    def audioDeviceError(self, errorMessage: str):\n        print(\"error\", errorMessage)\n\n    def audioDeviceStopped(self):\n        print(\"stopping\")\n\n\nclass MainContentComponent(juce.Component):\n    manager = juce.AudioDeviceManager()\n    audio_callback = AudioCallback()\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        width = 600\n        height = 400\n\n        self.manager.addAudioCallback(self.audio_callback)\n        result = self.manager.initialiseWithDefaultDevices(0, 2)\n        if result:\n            print(result)\n\n        self.button = juce.TextButton(\"Silence!\")\n        self.addAndMakeVisible(self.button)\n        self.button.onStateChange = lambda: self.onButtonStateChange()\n\n        self.setSize(int(width), int(height))\n        self.setOpaque(True)\n\n    def visibilityChanged(self):\n        if not self.isVisible() and self.manager:\n            self.manager.removeAudioCallback(self.audio_callback)\n            self.manager.closeAudioDevice()\n\n    def onButtonStateChange(self):\n        if self.button.getState() == juce.Button.ButtonState.buttonDown:\n            self.audio_callback.gain = 0.25\n        else:\n            self.audio_callback.gain = 1.0\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(juce.Colours.black)\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.button.setBounds(bounds.reduced(100))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Audio Device Example\")\n"
  },
  {
    "path": "examples/audio_player.py",
    "content": "from enum import Enum\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass TransportState(Enum):\n    Stopped = 0\n    Starting = 1\n    Playing = 2\n    Stopping = 3\n\n\nclass AudioSource(juce.AudioSource):\n    transportSource = juce.AudioTransportSource()\n    hasReader = juce.Atomic[bool](False)\n\n    def __init__(self):\n        juce.AudioSource.__init__(self)\n\n    def prepareToPlay(self, samplesPerBlockExpected, sampleRate):\n        self.transportSource.prepareToPlay(samplesPerBlockExpected, sampleRate)\n\n    def getNextAudioBlock(self, bufferToFill):\n        if not self.hasReader.get():\n            bufferToFill.clearActiveBufferRegion()\n        else:\n            self.transportSource.getNextAudioBlock(bufferToFill)\n\n    def releaseResources(self):\n        self.transportSource.releaseResources()\n\n\nclass MainContentComponent(juce.Component, juce.ChangeListener, juce.Timer):\n    openButton = juce.TextButton()\n    playButton = juce.TextButton()\n    stopButton = juce.TextButton()\n    loopingToggle = juce.ToggleButton()\n    currentPositionLabel = juce.Label()\n\n    audioSource = AudioSource()\n    audioSourcePlayer = juce.AudioSourcePlayer()\n    readerSource = None\n    isLooping = False\n\n    deviceManager = juce.AudioDeviceManager()\n    formatManager = juce.AudioFormatManager()\n    state = TransportState.Stopped\n\n    def __init__(self):\n        juce.Component.__init__(self)\n        juce.ChangeListener.__init__(self)\n        juce.Timer.__init__(self)\n\n        self.addAndMakeVisible(self.openButton)\n        self.openButton.setButtonText(\"Open...\")\n        self.openButton.onClick = self.openButtonClicked\n\n        self.addAndMakeVisible (self.playButton)\n        self.playButton.setButtonText (\"Play\")\n        self.playButton.onClick = self.playButtonClicked\n        self.playButton.setColour(juce.TextButton.buttonColourId, juce.Colours.green)\n        self.playButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.stopButton)\n        self.stopButton.setButtonText(\"Stop\")\n        self.stopButton.onClick = self.stopButtonClicked\n        self.stopButton.setColour(juce.TextButton.buttonColourId, juce.Colours.red)\n        self.stopButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.loopingToggle)\n        self.loopingToggle.setButtonText(\"Loop\")\n        self.loopingToggle.onClick = self.loopButtonChanged\n\n        self.addAndMakeVisible(self.currentPositionLabel)\n        self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n        self.formatManager.registerBasicFormats()\n        self.audioSource.transportSource.addChangeListener(self)\n\n        self.deviceManager.initialise(0, 2, None, True)\n        self.deviceManager.addAudioCallback(self.audioSourcePlayer)\n        self.audioSourcePlayer.setSource(self.audioSource)\n\n        self.setSize(400, 400)\n        self.startTimer(20)\n\n    def visibilityChanged(self):\n        if self.isVisible() or not self.deviceManager:\n            return\n\n        self.audioSource.hasReader.set(False)\n        self.deviceManager.removeAudioCallback(self.audioSourcePlayer)\n\n        self.audioSource.transportSource.setSource(None)\n        self.audioSourcePlayer.setSource(None)\n\n        self.deviceManager.closeAudioDevice()\n\n    def resized(self):\n        self.openButton.setBounds(10, 10, self.getWidth() - 20, 20)\n        self.playButton.setBounds(10, 40, self.getWidth() - 20, 20)\n        self.stopButton.setBounds(10, 70, self.getWidth() - 20, 20)\n        self.loopingToggle.setBounds(10, 100, self.getWidth() - 20, 20)\n        self.currentPositionLabel.setBounds(10, 130, self.getWidth() - 20, 20)\n\n    def changeListenerCallback(self, source):\n        print(\"changeListenerCallback\", source, self.audioSource.transportSource)\n        if source == self.audioSource.transportSource:\n            if self.audioSource.transportSource.isPlaying():\n                self.changeState(TransportState.Playing)\n            else:\n                self.changeState(TransportState.Stopped)\n\n    def timerCallback(self):\n        if self.audioSource.transportSource.isPlaying():\n            position = juce.RelativeTime(self.audioSource.transportSource.getCurrentPosition())\n\n            minutes = int(position.inMinutes()) % 60\n            seconds = int(position.inSeconds()) % 60\n            millis  = int(position.inMilliseconds()) % 1000\n\n            positionString = \"{:02d}:{:02d}:{:03d}\".format(minutes, seconds, millis)\n\n            self.currentPositionLabel.setText(positionString, juce.dontSendNotification)\n        else:\n            self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n    def updateLoopState(self, shouldLoop):\n        self.isLooping = shouldLoop\n\n        if self.readerSource:\n            self.readerSource.setLooping(self.isLooping)\n\n    def changeState (self, newState):\n        if self.state == newState:\n            return\n\n        self.state = newState\n        print(self.state)\n\n        if self.state == TransportState.Stopped:\n            self.stopButton.setEnabled(False)\n            self.playButton.setEnabled(True)\n            self.audioSource.transportSource.setPosition(0.0)\n\n        elif self.state == TransportState.Starting:\n            self.playButton.setEnabled(False)\n            self.audioSource.transportSource.start()\n\n        elif self.state == TransportState.Playing:\n            self.stopButton.setEnabled(True)\n\n        elif self.state == TransportState.Stopping:\n            self.audioSource.transportSource.stop()\n\n    def openButtonClicked(self):\n        chooser = juce.FileChooser(\"Select a Wave file to play...\", juce.File(), \"*.wav\")\n\n        if chooser.browseForFileToOpen():\n            self.reader = self.formatManager.createReaderFor(chooser.getResult())\n\n            if self.reader:\n                self.readerSource = juce.AudioFormatReaderSource(self.reader, False)\n                if self.isLooping:\n                    self.readerSource.setLooping(self.isLooping)\n\n                self.audioSource.transportSource.setSource(self.readerSource, 0, None, self.reader.sampleRate, 2)\n                self.audioSource.hasReader.set(True)\n\n                self.playButton.setEnabled(True)\n            else:\n                self.audioSource.hasReader.set(False)\n\n    def playButtonClicked(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n        self.changeState(TransportState.Starting)\n\n    def stopButtonClicked(self):\n        self.changeState(TransportState.Stopping)\n\n    def loopButtonChanged(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Audio Player\")\n"
  },
  {
    "path": "examples/audio_player_waveform.py",
    "content": "from enum import Enum\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass TransportState(Enum):\n    Stopped = 0\n    Starting = 1\n    Playing = 2\n    Stopping = 3\n\n\nclass AudioSource(juce.AudioSource):\n    transportSource = juce.AudioTransportSource()\n    hasReader = juce.Atomic[bool](False)\n\n    def __init__(self):\n        juce.AudioSource.__init__(self)\n\n    def prepareToPlay(self, samplesPerBlockExpected, sampleRate):\n        self.transportSource.prepareToPlay(samplesPerBlockExpected, sampleRate)\n\n    def getNextAudioBlock(self, bufferToFill):\n        if not self.hasReader.get():\n            bufferToFill.clearActiveBufferRegion()\n        else:\n            self.transportSource.getNextAudioBlock(bufferToFill)\n\n    def releaseResources(self):\n        self.transportSource.releaseResources()\n\n\nclass SimpleThumbnailComponent(juce.Component, juce.ChangeListener):\n    def __init__(self, sourceSamplesPerThumbnailSample, formatManager, cache):\n        juce.Component.__init__(self)\n        juce.ChangeListener.__init__(self)\n\n        self.thumbnail = juce.AudioThumbnail(sourceSamplesPerThumbnailSample, formatManager, cache)\n        self.thumbnail.addChangeListener(self)\n\n    def setFile(self, file):\n        source = juce.FileInputSource(file)\n        self.thumbnail.setSource(source)\n\n    def paint(self, g):\n        if self.thumbnail.getNumChannels() == 0:\n            self.paintIfNoFileLoaded(g)\n        else:\n            self.paintIfFileLoaded(g)\n\n    def paintIfNoFileLoaded(self, g):\n        g.fillAll(juce.Colours.white)\n        g.setColour(juce.Colours.darkgrey)\n        g.drawFittedText(\"No File Loaded\", self.getLocalBounds(), juce.Justification.centred, 1)\n\n    def paintIfFileLoaded(self, g):\n        g.fillAll(juce.Colours.white)\n\n        g.setColour(juce.Colours.red)\n        self.thumbnail.drawChannels(g, self.getLocalBounds(), 0.0, self.thumbnail.getTotalLength(), 1.0)\n\n    def changeListenerCallback(self, source):\n        if source == self.thumbnail:\n            self.thumbnailChanged()\n\n    def thumbnailChanged(self):\n        self.repaint()\n\n\nclass SimplePositionOverlay(juce.Component, juce.Timer):\n    def __init__(self, transportSourceToUse):\n        juce.Component.__init__(self)\n        juce.Timer.__init__(self)\n\n        self.transportSource = transportSourceToUse\n        self.startTimer(40)\n\n    def __del__(self):\n        self.stopTimer()\n\n    def paint(self, g):\n        duration = float(self.transportSource.getLengthInSeconds())\n\n        if duration > 0.0:\n            audioPosition = float(self.transportSource.getCurrentPosition())\n            drawPosition = (audioPosition / duration) * self.getWidth()\n\n            g.setColour(juce.Colours.green)\n            g.drawLine(drawPosition, 0.0, drawPosition, float(self.getHeight()), 2.0)\n\n    def mouseDown(self, event):\n        duration = self.transportSource.getLengthInSeconds()\n\n        if duration > 0.0:\n            clickPosition = event.position.x\n            audioPosition = (clickPosition / self.getWidth()) * duration\n\n            self.transportSource.setPosition(audioPosition)\n\n    def timerCallback(self):\n        self.repaint()\n\n\nclass MainContentComponent(juce.Component, juce.ChangeListener, juce.Timer):\n    openButton = juce.TextButton()\n    playButton = juce.TextButton()\n    stopButton = juce.TextButton()\n    loopingToggle = juce.ToggleButton()\n    currentPositionLabel = juce.Label()\n\n    audioSource = AudioSource()\n    audioSourcePlayer = juce.AudioSourcePlayer()\n    readerSource = None\n    isLooping = False\n\n    deviceManager = juce.AudioDeviceManager()\n    formatManager = juce.AudioFormatManager()\n    state = TransportState.Stopped\n\n    def __init__(self):\n        juce.Component.__init__(self)\n        juce.ChangeListener.__init__(self)\n        juce.Timer.__init__(self)\n\n        self.addAndMakeVisible(self.openButton)\n        self.openButton.setButtonText(\"Open...\")\n        self.openButton.onClick = self.openButtonClicked\n\n        self.addAndMakeVisible (self.playButton)\n        self.playButton.setButtonText (\"Play\")\n        self.playButton.onClick = self.playButtonClicked\n        self.playButton.setColour(juce.TextButton.buttonColourId, juce.Colours.green)\n        self.playButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.stopButton)\n        self.stopButton.setButtonText(\"Stop\")\n        self.stopButton.onClick = self.stopButtonClicked\n        self.stopButton.setColour(juce.TextButton.buttonColourId, juce.Colours.red)\n        self.stopButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.loopingToggle)\n        self.loopingToggle.setButtonText(\"Loop\")\n        self.loopingToggle.onClick = self.loopButtonChanged\n\n        self.addAndMakeVisible(self.currentPositionLabel)\n        self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n        self.formatManager.registerBasicFormats()\n        self.audioSource.transportSource.addChangeListener(self)\n\n        self.deviceManager.initialise(0, 2, None, True)\n        self.deviceManager.addAudioCallback(self.audioSourcePlayer)\n        self.audioSourcePlayer.setSource(self.audioSource)\n\n        self.thumbnailCache = juce.AudioThumbnailCache(10)\n\n        self.thumbnailComp = SimpleThumbnailComponent(512, self.formatManager, self.thumbnailCache)\n        self.addAndMakeVisible(self.thumbnailComp)\n\n        self.positionOverlay = SimplePositionOverlay(self.audioSource.transportSource)\n        self.addAndMakeVisible(self.positionOverlay)\n\n        self.setSize(400, 400)\n        self.startTimer(20)\n\n    def visibilityChanged(self):\n        if self.isVisible() or not self.deviceManager:\n            return\n\n        self.audioSource.hasReader.set(False)\n        self.deviceManager.removeAudioCallback(self.audioSourcePlayer)\n\n        self.audioSource.transportSource.setSource(None)\n        self.audioSourcePlayer.setSource(None)\n\n        self.deviceManager.closeAudioDevice()\n\n    def resized(self):\n        self.openButton.setBounds(10, 10, self.getWidth() - 20, 20)\n        self.playButton.setBounds(10, 40, self.getWidth() - 20, 20)\n        self.stopButton.setBounds(10, 70, self.getWidth() - 20, 20)\n        self.loopingToggle.setBounds(10, 100, self.getWidth() - 20, 20)\n        self.currentPositionLabel.setBounds(10, 130, self.getWidth() - 20, 20)\n\n        thumbnailBounds = juce.Rectangle[int](10, 170, self.getWidth() - 20, self.getHeight() - 190)\n        self.thumbnailComp.setBounds(thumbnailBounds)\n        self.positionOverlay.setBounds(thumbnailBounds)\n\n    def changeListenerCallback(self, source):\n        print(\"changeListenerCallback\", source, self.audioSource.transportSource)\n        if source == self.audioSource.transportSource:\n            if self.audioSource.transportSource.isPlaying():\n                self.changeState(TransportState.Playing)\n            else:\n                self.changeState(TransportState.Stopped)\n\n    def timerCallback(self):\n        if self.audioSource.transportSource.isPlaying():\n            position = juce.RelativeTime(self.audioSource.transportSource.getCurrentPosition())\n\n            minutes = int(position.inMinutes()) % 60\n            seconds = int(position.inSeconds()) % 60\n            millis  = int(position.inMilliseconds()) % 1000\n\n            positionString = \"{:02d}:{:02d}:{:03d}\".format(minutes, seconds, millis)\n\n            self.currentPositionLabel.setText(positionString, juce.dontSendNotification)\n        else:\n            self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n    def updateLoopState(self, shouldLoop):\n        self.isLooping = shouldLoop\n\n        if self.readerSource:\n            self.readerSource.setLooping(self.isLooping)\n\n    def changeState (self, newState):\n        if self.state == newState:\n            return\n\n        self.state = newState\n        print(self.state)\n\n        if self.state == TransportState.Stopped:\n            self.stopButton.setEnabled(False)\n            self.playButton.setEnabled(True)\n            self.audioSource.transportSource.setPosition(0.0)\n\n        elif self.state == TransportState.Starting:\n            self.playButton.setEnabled(False)\n            self.audioSource.transportSource.start()\n\n        elif self.state == TransportState.Playing:\n            self.stopButton.setEnabled(True)\n\n        elif self.state == TransportState.Stopping:\n            self.audioSource.transportSource.stop()\n\n    def openButtonClicked(self):\n        chooser = juce.FileChooser(\"Select a Wave file to play...\", juce.File(), \"*.wav\")\n\n        if chooser.browseForFileToOpen():\n            file = chooser.getResult()\n            self.reader = self.formatManager.createReaderFor(file)\n\n            if self.reader:\n                self.readerSource = juce.AudioFormatReaderSource(self.reader, False)\n                if self.isLooping:\n                    self.readerSource.setLooping(self.isLooping)\n\n                self.audioSource.transportSource.setSource(self.readerSource, 0, None, self.reader.sampleRate, 2)\n                self.audioSource.hasReader.set(True)\n                self.thumbnailComp.setFile(file)\n\n                self.playButton.setEnabled(True)\n            else:\n                self.audioSource.hasReader.set(False)\n\n    def playButtonClicked(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n        self.changeState(TransportState.Starting)\n\n    def stopButtonClicked(self):\n        self.changeState(TransportState.Stopping)\n\n    def loopButtonChanged(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Audio Player\")\n"
  },
  {
    "path": "examples/docs.py",
    "content": "import io\nfrom contextlib import redirect_stdout\n\nimport juce_init\nimport popsicle as juce\n\nwith io.StringIO() as buf, redirect_stdout(buf):\n    help(juce)\n    docs = buf.getvalue()\n\nprint(docs)\n"
  },
  {
    "path": "examples/drawables.py",
    "content": "\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\n\nclass MainContentComponent(juce.Component):\n\tdef __init__(self):\n\t\tsuper().__init__()\n\n\t\twidth = 600\n\t\theight = 400\n\n\t\tself.text = juce.DrawableText()\n\t\tself.text.setText(\"Ciao\")\n\t\tself.text.setColour(juce.Colours.white)\n\t\tself.text.setJustification(juce.Justification.centred)\n\t\tself.addAndMakeVisible(self.text)\n\n\t\tself.button = juce.TextButton(\"abc\")\n\t\tself.addAndMakeVisible(self.button)\n\t\tself.button.onClick = lambda: print(\"clicked\")\n\n\t\tself.setSize(int(width), int(height))\n\t\tself.setOpaque(True)\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.black)\n\n\tdef resized(self):\n\t\tbounds = self.getLocalBounds()\n\n\t\tself.text.setBounds(bounds.removeFromLeft(self.proportionOfWidth(0.5)))\n\n\t\tself.button.setBounds(bounds)\n\nif __name__ == \"__main__\":\n\tSTART_JUCE_COMPONENT(MainContentComponent, name=\"Drawables Example\")\n"
  },
  {
    "path": "examples/emojis_component.py",
    "content": "import re\nimport os\nimport hashlib\nfrom enum import Enum\nfrom io import BytesIO\nfrom textwrap import dedent\nfrom urllib.request import Request, urlopen\nfrom urllib.error import HTTPError\nfrom urllib.parse import quote_plus\nfrom typing import Any, Dict, Final, List, Optional, NamedTuple\n\nfrom emoji import unicode_codes\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nlanguage_pack: Dict[str, str] = unicode_codes.get_emoji_unicode_dict(\"en\")\nEMOJI_UNICODE_REGEX = \"|\".join(map(re.escape, sorted(language_pack.values(), key=len, reverse=True)))\n\nEMOJI_REGEX: Final[re.Pattern[str]] = re.compile(f'({EMOJI_UNICODE_REGEX})')\nEMOJI_REQUEST_KWARGS: Dict[str, Any] = { \"headers\": {\"User-Agent\": \"Mozilla/5.0\"} }\nEMOJI_BASE_CDN_URL: str = \"https://emojicdn.elk.sh/\"\nEMOJI_STYLE: str = \"google\"\n\n\ndef get_emoji(emoji: str) -> Optional[BytesIO]:\n    emoji_cache = juce.File(os.path.abspath(__file__)).getParentDirectory().getChildFile(\"emoji_cache\")\n    if not emoji_cache.isDirectory():\n        emoji_cache.createDirectory()\n\n    url = EMOJI_BASE_CDN_URL + quote_plus(emoji) + \"?style=\" + quote_plus(EMOJI_STYLE)\n    url_hash = hashlib.md5()\n    url_hash.update(url.encode(\"utf8\"))\n\n    emoji_file = emoji_cache.getChildFile(url_hash.hexdigest())\n    if emoji_file.existsAsFile():\n        with open(emoji_file.getFullPathName(), \"rb\") as f:\n            return BytesIO(f.read())\n\n    try:\n        req = Request(url, **EMOJI_REQUEST_KWARGS)\n        with urlopen(req) as response:\n            response = response.read()\n\n            with open(emoji_file.getFullPathName(), \"wb\") as f:\n                f.write(response)\n\n            return BytesIO(response)\n\n    except HTTPError:\n        pass\n\n    return None\n\n\nclass NodeType(Enum):\n    text          = 0\n    emoji         = 1\n\n\nclass Node(NamedTuple):\n    type: NodeType\n    content: str\n    emoji: Optional[BytesIO]\n\n\nclass EmojiComponent(juce.Component):\n    font: juce.Font = juce.Font(juce.FontOptions(12.0))\n    colour: juce.Colour = juce.Colours.black\n    nodes: List[List[Node]]\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        self.setOpaque(False)\n\n    def setFont(self, font: juce.Font):\n        self.font = font\n        self.repaint()\n\n    def setColour(self, colour: juce.Colour):\n        self.colour = colour\n        self.repaint()\n\n    def setText(self, text: str):\n        self.nodes = self.splitTextIntoNodes(text)\n        self.repaint()\n\n    def splitTextIntoNodes(self, text: str) -> List[List[Node]]:\n        lines = []\n\n        for line in text.splitlines():\n            nodes = []\n            for i, chunk in enumerate(EMOJI_REGEX.split(line)):\n                if not chunk:\n                    continue\n\n                if not i % 2:\n                    nodes.append(Node(NodeType.text, chunk, None))\n                    continue\n\n                nodes.append(Node(NodeType.emoji, chunk, get_emoji(chunk)))\n\n            lines.append(nodes)\n\n        return lines\n\n    def paint(self, g: juce.Graphics):\n        if not self.nodes:\n            return\n\n        font_height = self.font.getHeight()\n        emoji_size = int(font_height * 1.1)\n\n        g.setFont(self.font)\n        g.setColour(self.colour)\n\n        y = 0\n        for lines in self.nodes:\n            x = 0\n            y += font_height + 2.0\n            height = int(font_height)\n\n            for node in lines:\n                if node.type == NodeType.text:\n                    text_width = self.font.getStringWidthFloat(node.content)\n                    g.drawText(node.content,\n                               int(x), int(y), min(int(text_width), self.getWidth() - int(x)), height,\n                               juce.Justification.centredLeft, useEllipsesIfTooBig=False)\n                    x += text_width\n                elif node.emoji:\n                    emoji = juce.ImageCache.getFromMemory(node.emoji.getbuffer())\n                    if emoji and emoji.isValid():\n                        g.drawImageWithin(emoji, int(x), int(y), emoji_size, emoji_size, juce.RectanglePlacement.centred)\n                        x += emoji_size\n\n\nclass ExampleComponent(juce.Component):\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        self.emoji_one = EmojiComponent()\n        self.emoji_one.setFont(juce.Font(juce.FontOptions(16.0)))\n        self.emoji_one.setColour(juce.Colours.white)\n        self.emoji_one.setText(dedent(\"\"\"\n            I 🕴️ 100% 💶 agree 💯 that 👉💀🔕🐑 this automated 🏧 generator does 👩‍🦲 NOT 🚯🚯🚯 provide 👋 the same 😯\n            quality 👌 as hand 👊 crafted emoji 🤟 pasta. 🍝 But 😥 I 🤖 think 🤔 there's 🛒 something ❓❔ cool 🧊\n            about 🌈 being 😑 able 💪💪 to take 👏 a 10,000 word 📓 wikipedia 💻 article 📄 and instantly add 👈\n            emojis 🐅🐅🐢🦅🦅🦋🐒\n        \"\"\").strip())\n        self.addAndMakeVisible(self.emoji_one)\n\n        self.slider = juce.Slider()\n        self.slider.setRange(1.0, 100, 0.1)\n        self.slider.setValue(16.0)\n        self.slider.onValueChange = lambda: self.emoji_one.setFont(juce.Font(juce.FontOptions(self.slider.getValue())))\n        self.addAndMakeVisible(self.slider)\n\n        self.setOpaque(True)\n        self.setSize(600, 400)\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(self.findColour(juce.DocumentWindow.backgroundColourId, True))\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.emoji_one.setBounds(bounds)\n\n        self.slider.setBounds(bounds.removeFromBottom(20))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(ExampleComponent, name=\"Emoji Example\")\n"
  },
  {
    "path": "examples/emojis_font_component.py",
    "content": "import re\nimport os\nfrom enum import Enum\nfrom textwrap import dedent\nfrom typing import Dict, Final, List, NamedTuple\n\nfrom emoji import unicode_codes\nfrom PIL import Image, ImageDraw, ImageFont\nfrom pil_image import ImageJuce\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\nlanguage_pack: Dict[str, str] = unicode_codes.get_emoji_unicode_dict(\"en\")\nEMOJI_UNICODE_REGEX = \"|\".join(map(re.escape, sorted(language_pack.values(), key=len, reverse=True)))\nEMOJI_REGEX: Final[re.Pattern[str]] = re.compile(f'({EMOJI_UNICODE_REGEX})')\n\n\nclass NodeType(Enum):\n    text          = 0\n    emoji         = 1\n\n\nclass Node(NamedTuple):\n    type: NodeType\n    content: str\n\n\nclass EmojiComponent(juce.Component):\n    font: juce.Font = juce.Font(juce.FontOptions(12.0))\n    colour: juce.Colour = juce.Colours.black\n    nodes: List[List[Node]]\n    unicode_font = None\n    unicode_size = 109\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        font_file = juce.File(os.path.abspath(__file__)).getSiblingFile(\"NotoColorEmoji.ttf\")\n        self.unicode_font = ImageFont.truetype(font_file.getFullPathName(), self.unicode_size)\n\n        self.im = Image.new(\"RGBA\", (self.unicode_size + 20, self.unicode_size + 20))\n        self.draw = ImageDraw.Draw(self.im)\n\n        self.setOpaque(False)\n\n    def setFont(self, font: juce.Font):\n        self.font = font\n        self.repaint()\n\n    def setColour(self, colour: juce.Colour):\n        self.colour = colour\n        self.repaint()\n\n    def setText(self, text: str):\n        self.nodes = self.splitTextIntoNodes(text)\n        self.repaint()\n\n    def splitTextIntoNodes(self, text: str) -> List[List[Node]]:\n        lines = []\n\n        for line in text.splitlines():\n            nodes = []\n            for i, chunk in enumerate(EMOJI_REGEX.split(line)):\n                if not chunk:\n                    continue\n\n                if not i % 2:\n                    nodes.append(Node(NodeType.text, chunk))\n                    continue\n\n                nodes.append(Node(NodeType.emoji, chunk))\n\n            lines.append(nodes)\n\n        return lines\n\n    def paint(self, g: juce.Graphics):\n        if not self.nodes:\n            return\n\n        font_height = self.font.getHeight()\n        emoji_size = int(font_height * 1.1)\n\n        g.setFont(self.font)\n        g.setColour(self.colour)\n\n        def new_line(x, y):\n            return 0, y + font_height + 4.0\n\n        x = 0\n        y = 0\n        for lines in self.nodes:\n            x, y = new_line(x, y)\n\n            current_text = None\n\n            for node in lines:\n                if node.type == NodeType.text:\n                    current_text = node.content\n\n                    while current_text:\n                        remaining_text = []\n\n                        text_width = self.font.getStringWidthFloat(current_text)\n                        while current_text and text_width > self.getWidth() - int(x):\n                            words = current_text.split(\" \")\n                            current_text = \" \".join(words[:-1])\n                            if words:\n                                remaining_text.append(words[-1])\n                            text_width = self.font.getStringWidthFloat(current_text)\n\n                        if current_text:\n                            g.drawText(current_text,\n                                    int(x), int(y), min(int(text_width), self.getWidth() - int(x)), int(font_height),\n                                    juce.Justification.centredLeft, useEllipsesIfTooBig=False)\n\n                        x += text_width\n                        current_text = None\n\n                        if remaining_text:\n                            x, y = new_line(x, y)\n                            current_text = \" \".join(remaining_text)\n\n                else:\n                    self.draw.rectangle((0, 0, self.im.size[0], self.im.size[1]), fill=(0, 0, 0, 0))\n                    self.draw.text((0, 0), node.content, embedded_color=True, font=self.unicode_font)\n\n                    if emoji_size > self.getWidth() - int(x):\n                        x, y = new_line(x, y)\n\n                    g.drawImageWithin(ImageJuce(self.im), int(x), int(y), emoji_size, emoji_size,\n                                      juce.RectanglePlacement.centred | juce.RectanglePlacement.onlyReduceInSize)\n\n                    x += emoji_size\n\n\nclass ExampleComponent(juce.Component):\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        self.emoji_one = EmojiComponent()\n        self.emoji_one.setFont(juce.Font(juce.FontOptions(16.0)))\n        self.emoji_one.setColour(juce.Colours.white)\n        self.emoji_one.setText(dedent(\"\"\"\n            I 🕴️ 100% 💶 agree 💯 that 👉💀🔕🐑 this automated 🏧 generator does 👩‍🦲 NOT 🚯🚯🚯 provide 👋 the same 😯\n            quality 👌 as hand 👊 crafted emoji 🤟 pasta. 🍝 But 😥 I 🤖 think 🤔 there's 🛒 something ❓❔ cool 🧊\n            about 🌈 being 😑 able 💪💪 to take 👏 a 10,000 word 📓 wikipedia 💻 article 📄 and instantly add 👈\n            emojis 🐅🐅🐢🦅🦅🦋🐒\n        \"\"\").strip())\n        self.addAndMakeVisible(self.emoji_one)\n\n        self.slider = juce.Slider()\n        self.slider.setRange(1.0, 100, 0.1)\n        self.slider.setValue(16.0)\n        self.slider.onValueChange = lambda: self.emoji_one.setFont(juce.Font(juce.FontOptions(self.slider.getValue())))\n        self.addAndMakeVisible(self.slider)\n\n        self.setOpaque(True)\n        self.setSize(600, 400)\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(self.findColour(juce.DocumentWindow.backgroundColourId, True))\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.emoji_one.setBounds(bounds)\n\n        self.slider.setBounds(bounds.removeFromBottom(20))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(ExampleComponent, name=\"Emoji Example\")\n"
  },
  {
    "path": "examples/hotreload_component.py",
    "content": "import popsicle as juce\n\n__all__ = [\"TestComponent\"]\n\n\nclass TestComponent(juce.Component, juce.Timer):\n\ttime = 0.0\n\n\tdef __init__(self):\n\t\tjuce.Component.__init__(self)\n\t\tjuce.Timer.__init__(self)\n\n\t\tself.setOpaque(True)\n\t\tself.startTimerHz(25)\n\n\tdef timerCallback(self):\n\t\tself.time += juce.degreesToRadians(1)\n\t\tself.repaint()\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.red)\n\n\t\tb = self.getLocalBounds()\n\t\tcenter = juce.Point[float](b.getCentreX(), b.getCentreY())\n\n\t\tp = juce.Path()\n\t\tp.addStar(center, 20, 25, self.getWidth(), self.time)\n\n\t\tg.setColour(juce.Colours.yellow)\n\t\tg.fillPath(p)\n"
  },
  {
    "path": "examples/hotreload_main.py",
    "content": "import os\nimport importlib\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass HotReloadContentComponent(juce.Component, juce.Timer):\n    comp = None\n    module = None\n\n    moduleName = \"hotreload_component\"\n    fileToWatch = juce.File(os.path.abspath(__file__)).getSiblingFile(f\"{moduleName}.py\")\n    fileLastModificationTime = None\n\n    def __init__(self):\n        juce.Component.__init__(self)\n        juce.Timer.__init__(self)\n\n        width = 600\n        height = 400\n\n        self.setSize(int(width), int(height))\n        self.setOpaque(True)\n        self.startTimerHz(5)\n\n    def timerCallback(self):\n        fileLastModificationTime = self.fileToWatch.getLastModificationTime()\n\n        if not self.fileLastModificationTime or self.fileLastModificationTime < fileLastModificationTime:\n            self.instantiateComponent()\n            self.resized()\n\n        self.fileLastModificationTime = fileLastModificationTime\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(juce.Colours.black)\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n\n        if self.comp:\n            self.comp.setBounds(bounds)\n\n    def instantiateComponent(self):\n        try:\n            if not self.module:\n                self.module = importlib.import_module(self.moduleName)\n            else:\n                self.module = importlib.reload(self.module)\n\n            print(\"Module\", self.fileToWatch.getFileName(), \"reloaded correctly\")\n\n        except Exception as e:\n            print(e)\n            return\n\n        if self.comp:\n            self.removeChildComponent(self.comp)\n\n        self.comp = self.module.TestComponent()\n\n        self.addAndMakeVisible(self.comp)\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(HotReloadContentComponent, name=\"Hot Reload Example\", alwaysOnTop=True, catchExceptionsAndContinue=True)\n"
  },
  {
    "path": "examples/juce_init.py",
    "content": "import os\nimport sys\nimport glob\nimport time\nimport traceback\nfrom pathlib import Path\nfrom functools import wraps\n\n\ntry:\n\timport popsicle as juce\n\nexcept ImportError:\n    folder = (Path(__file__).parent.parent / \"build\")\n    for ext in [\"*.so\", \"*.pyd\"]:\n        path_to_search = folder / \"**\" / ext\n        for f in glob.iglob(str(path_to_search), recursive=True):\n            if os.path.isfile(f):\n                sys.path.append(str(Path(f).parent))\n                break\n\n    import popsicle as juce\n\n\ndef START_JUCE_COMPONENT(ComponentClass, name, **kwargs):\n    class DefaultWindow(juce.DocumentWindow):\n        component = None\n\n        def __init__(self):\n            super().__init__(\n                juce.JUCEApplication.getInstance().getApplicationName(),\n                juce.Desktop.getInstance().getDefaultLookAndFeel()\n                    .findColour(juce.ResizableWindow.backgroundColourId),\n                juce.DocumentWindow.allButtons,\n                True)\n\n            self.component = ComponentClass()\n\n            self.setResizable(True, True)\n            self.setContentNonOwned(self.component, True)\n            self.centreWithSize(self.component.getWidth(), self.component.getHeight() + self.getTitleBarHeight())\n            self.setAlwaysOnTop(kwargs.get(\"alwaysOnTop\", False))\n            self.setVisible(True)\n\n        def __del__(self):\n            self.clearContentComponent()\n\n            if self.component:\n                self.component.setVisible(False)\n                del self.component\n\n        def closeButtonPressed(self):\n            juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n    class DefaultApplication(juce.JUCEApplication):\n        window = None\n\n        def __init__(self):\n            super().__init__()\n\n        def getApplicationName(self):\n            return name\n\n        def getApplicationVersion(self):\n            return \"1.0\"\n\n        def initialise(self, commandLineParameters):\n            self.window = DefaultWindow()\n\n            juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n        def shutdown(self):\n            if self.window:\n                del self.window\n\n        def systemRequestedQuit(self):\n            self.quit()\n\n        # def unhandledException(self, ex: Exception, file: str, line: int):\n        #     if hasattr(ex, \"__traceback__\"):\n        #         print(\"Traceback (most recent call last):\")\n        #         traceback.print_tb(ex.__traceback__)\n        #     print(ex)\n        #     if isinstance(ex, KeyboardInterrupt):\n        #         juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n    juce.START_JUCE_APPLICATION(\n        DefaultApplication,\n        catchExceptionsAndContinue=kwargs.get(\"catchExceptionsAndContinue\", False))\n\n\ndef timeit(func):\n    @wraps(func)\n    def timeit_wrapper(*args, **kwargs):\n        start_time = time.perf_counter()\n        result = func(*args, **kwargs)\n        total_time = time.perf_counter() - start_time\n        print(f'Function {func.__name__} Took {total_time:.4f} seconds') # {args} {kwargs}\n        return result\n\n    return timeit_wrapper\n"
  },
  {
    "path": "examples/juce_o_matic.py",
    "content": "import juce_init\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component, juce.Timer):\n\tdef __init__(self):\n\t\tjuce.Component.__init__(self)\n\t\tjuce.Timer.__init__(self)\n\n\t\tself.setSize(600, 400)\n\t\tself.setOpaque(True)\n\t\tself.startTimerHz(60)\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.black)\n\n\t\trandom = juce.Random.getSystemRandom()\n\t\trect = juce.Rectangle[int](0, 0, 20, 20)\n\n\t\tfor _ in range(100):\n\t\t\tg.setColour(juce.Colour.fromRGBA(\n\t\t\t\trandom.nextInt(255),\n\t\t\t\trandom.nextInt(255),\n\t\t\t\trandom.nextInt(255),\n\t\t\t\t255))\n\n\t\t\trect.setCentre(random.nextInt(self.getWidth()), random.nextInt(self.getHeight()))\n\t\t\tg.drawRect(rect, 1)\n\n\tdef mouseDown(self, event: juce.MouseEvent):\n\t\tprint(\"mouseDown\", event)\n\n\tdef mouseMove(self, event: juce.MouseEvent):\n\t\tprint(\"mouseMove\", event.position.x, event.position.y)\n\n\tdef mouseUp(self, event: juce.MouseEvent):\n\t\tprint(\"mouseUp\", event)\n\n\tdef timerCallback(self):\n\t\tself.repaint()\n\n\nclass MainWindow(juce.DocumentWindow):\n\tcomponent = None\n\n\tdef __init__(self):\n\t\tsuper().__init__(\n\t\t\tjuce.JUCEApplication.getInstance().getApplicationName(),\n\t\t\tjuce.Desktop.getInstance().getDefaultLookAndFeel()\n\t\t\t\t.findColour(juce.ResizableWindow.backgroundColourId),\n\t\t\tjuce.DocumentWindow.allButtons,\n\t\t\tTrue)\n\n\t\tself.component = MainContentComponent()\n\n\t\tself.setResizable(True, True)\n\t\tself.setContentNonOwned(self.component, True)\n\t\tself.centreWithSize(800, 600)\n\t\tself.setVisible(True)\n\n\tdef __del__(self):\n\t\tself.clearContentComponent()\n\n\t\tif self.component:\n\t\t\tdel self.component\n\n\tdef closeButtonPressed(self):\n\t\tjuce.JUCEApplication.getInstance().systemRequestedQuit()\n\n\nclass Application(juce.JUCEApplication):\n\twindow = None\n\n\tdef __init__(self):\n\t\tsuper().__init__()\n\n\tdef getApplicationName(self):\n\t\treturn \"JUCE-o-matic\"\n\n\tdef getApplicationVersion(self):\n\t\treturn \"1.0\"\n\n\tdef initialise(self, commandLineParameters: str):\n\t\tself.window = MainWindow()\n\n\t\tjuce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n\tdef shutdown(self):\n\t\tif self.window:\n\t\t\tdel self.window\n\n\tdef systemRequestedQuit(self):\n\t\tself.quit()\n\n\nif __name__ == \"__main__\":\n\tjuce.START_JUCE_APPLICATION(Application)\n"
  },
  {
    "path": "examples/layout_flexgrid.py",
    "content": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass RightSidePanel(juce.Component):\n    backgroundColour = juce.Colours.lightblue\n    buttons = []\n\n    def __init__(self, colour=None):\n        super().__init__()\n\n        if colour:\n            self.backgroundColour = colour\n\n        for i in range(10):\n            button = juce.TextButton(str(i))\n\n            self.buttons.append(button)\n            self.addAndMakeVisible(button)\n\n    def paint(self, g):\n        g.fillAll(self.backgroundColour)\n\n    def resized(self):\n        fb = juce.FlexBox()\n        fb.flexWrap = juce.FlexBox.Wrap.wrap\n        fb.justifyContent = juce.FlexBox.JustifyContent.center\n        fb.alignContent = juce.FlexBox.AlignContent.center\n\n        for b in self.buttons:\n            fb.items.add(juce.FlexItem(b).withMinWidth(50.0).withMinHeight(50.0))\n\n        fb.performLayout(self.getLocalBounds().toFloat())\n\n\nclass LeftSidePanel(juce.Component):\n    backgroundColour = juce.Colours.lightgrey\n    knobs = []\n\n    def __init__(self, colour=None):\n        super().__init__()\n\n        if colour:\n            self.backgroundColour = colour\n\n        for _ in range(10):\n            slider = juce.Slider()\n            slider.setSliderStyle(juce.Slider.SliderStyle.Rotary)\n            slider.setTextBoxStyle(juce.Slider.NoTextBox, True, 0, 0)\n\n            self.knobs.append(slider)\n            self.addAndMakeVisible(slider)\n\n    def paint(self, g):\n        g.fillAll(self.backgroundColour)\n\n    def resized(self):\n        knobBox = juce.FlexBox()\n        knobBox.flexWrap = juce.FlexBox.Wrap.wrap\n        knobBox.justifyContent = juce.FlexBox.JustifyContent.spaceBetween\n\n        for k in self.knobs:\n            knobBox.items.add(juce.FlexItem(k).withMinHeight(50.0).withMinWidth(50.0).withFlex(1))\n\n        fb = juce.FlexBox()\n        fb.flexDirection = juce.FlexBox.Direction.column\n        fb.items.add(juce.FlexItem(knobBox).withFlex(2.5))\n        fb.performLayout(self.getLocalBounds().toFloat())\n\n\nclass MainPanel(juce.Component):\n    sliders = []\n\n    def __init__(self):\n        super().__init__()\n\n        for _ in range(5):\n            slider = juce.Slider()\n            slider.setTextBoxStyle(juce.Slider.TextEntryBoxPosition.NoTextBox, True, 0, 0)\n\n            self.sliders.append(slider)\n            self.addAndMakeVisible(slider)\n\n    def paint(self, g):\n        g.fillAll(juce.Colours.hotpink)\n\n    def resized(self):\n        isPortrait = self.getLocalBounds().getHeight() > self.getLocalBounds().getWidth()\n\n        fb = juce.FlexBox()\n        fb.flexDirection = juce.FlexBox.Direction.column if isPortrait else juce.FlexBox.Direction.row\n\n        for s in self.sliders:\n            if isPortrait:\n                s.setSliderStyle(juce.Slider.SliderStyle.LinearHorizontal)\n            else:\n                s.setSliderStyle(juce.Slider.SliderStyle.LinearVertical)\n\n            fb.items.add(juce.FlexItem(s).withFlex(0, 1, self.getHeight() / 5.0 if isPortrait else self.getWidth() / 5.0))\n\n        fb.performLayout(self.getLocalBounds().toFloat())\n\n\nclass MainContentComponent(juce.Component):\n    def __init__(self):\n        super().__init__()\n\n        self.rightPanel = RightSidePanel(juce.Colours.lightgrey)\n        self.leftPanel = LeftSidePanel(juce.Colours.lightblue)\n        self.mainPanel = MainPanel()\n\n        self.addAndMakeVisible(self.rightPanel)\n        self.addAndMakeVisible(self.leftPanel)\n        self.addAndMakeVisible(self.mainPanel)\n\n        self.setSize(600, 400)\n\n    def paint(self, g):\n        g.fillAll(self.getLookAndFeel().findColour(juce.ResizableWindow.backgroundColourId))\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.leftPanel.setBounds(bounds.removeFromLeft(self.proportionOfWidth(0.25)))\n        self.rightPanel.setBounds(bounds.removeFromRight(self.proportionOfWidth(0.25)))\n        self.mainPanel.setBounds(bounds)\n\n        \"\"\"\n        grid = juce.Grid()\n\n        grid.templateRows.add(juce.Grid.TrackInfo(juce.Grid.Fr(1)))\n        grid.templateColumns.add(juce.Grid.TrackInfo(juce.Grid.Fr(1)))\n        grid.templateColumns.add(juce.Grid.TrackInfo(juce.Grid.Fr(2)))\n        grid.templateColumns.add(juce.Grid.TrackInfo(juce.Grid.Fr(1)))\n\n        grid.items.add(juce.GridItem(self.leftPanel))\n        grid.items.add(juce.GridItem(self.mainPanel))\n        grid.items.add(juce.GridItem(self.rightPanel))\n\n        grid.performLayout(self.getLocalBounds())\n        \"\"\"\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Animated Component\")\n"
  },
  {
    "path": "examples/layout_rectangles.py",
    "content": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n    header = juce.TextButton()\n    sidebar = juce.TextButton()\n\n    limeContent = juce.TextButton()\n    grapefruitContent = juce.TextButton()\n    lemonContent = juce.TextButton()\n    orangeContent = juce.TextButton()\n    footer = juce.TextButton()\n\n    def __init__(self):\n        super().__init__()\n\n        self.header.setColour(juce.TextButton.buttonColourId, juce.Colours.cornflowerblue)\n        self.header.setButtonText(\"Header\")\n        self.addAndMakeVisible(self.header)\n\n        self.footer.setColour(juce.TextButton.buttonColourId, juce.Colours.cornflowerblue)\n        self.footer.setButtonText(\"Footer\")\n        self.addAndMakeVisible(self.footer)\n\n        self.sidebar.setColour(juce.TextButton.buttonColourId, juce.Colours.grey)\n        self.sidebar.setButtonText(\"Sidebar\")\n        self.addAndMakeVisible(self.sidebar)\n\n        self.limeContent.setColour(juce.TextButton.buttonColourId, juce.Colours.lime)\n        self.addAndMakeVisible(self.limeContent)\n\n        self.grapefruitContent.setColour(juce.TextButton.buttonColourId, juce.Colours.yellowgreen)\n        self.addAndMakeVisible(self.grapefruitContent)\n\n        self.lemonContent.setColour(juce.TextButton.buttonColourId, juce.Colours.yellow)\n        self.addAndMakeVisible(self.lemonContent)\n\n        self.orangeContent.setColour(juce.TextButton.buttonColourId, juce.Colours.orange)\n        self.addAndMakeVisible(self.orangeContent)\n\n        self.setSize(400, 400)\n\n    def paint(self, g):\n        g.fillAll(juce.Colours.darkgrey)\n\n    def resized(self):\n        area = self.getLocalBounds()\n\n        headerFooterHeight = 36\n        self.header.setBounds(area.removeFromTop(headerFooterHeight))\n        self.footer.setBounds(area.removeFromBottom(headerFooterHeight))\n\n        sidebarWidth = 80\n        self.sidebar.setBounds(area.removeFromLeft(sidebarWidth))\n\n        contentItemHeight = 24\n        self.limeContent.setBounds(area.removeFromTop(contentItemHeight))\n        self.grapefruitContent.setBounds(area.removeFromTop(contentItemHeight))\n        self.lemonContent.setBounds(area.removeFromTop(contentItemHeight))\n        self.orangeContent.setBounds(area.removeFromTop(contentItemHeight))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Advanced GUI layout techniques\")\n"
  },
  {
    "path": "examples/matplotlib_integration.py",
    "content": "import io\nimport multiprocessing\nimport queue\n\nimport numpy as np\nfrom matplotlib.figure import Figure\nfrom matplotlib.backends.backend_agg import FigureCanvasAgg\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\ndef make_plot(fig):\n\tx = np.linspace(0, 10, 11)\n\ty = [3.9, 4.4, 10.8, 10.3, 11.2, 13.1, 14.1,  9.9, 13.9, 15.1, 12.5]\n\n\ta, b = np.polyfit(x, y, deg=1)\n\ty_est = a * x + b\n\ty_err = x.std() * np.sqrt(1/len(x) + (x - x.mean())**2 / np.sum((x - x.mean())**2))\n\n\tax = fig.add_subplot(111)\n\tax.plot(x, y_est, '-')\n\tax.fill_between(x, y_est - y_err, y_est + y_err, alpha=0.2)\n\tax.plot(x, y, 'o', color='tab:brown')\n\n\ndef generate_plot_png(q, width, height):\n\tfig = Figure(figsize=(width / 100, height / 100), dpi=100)\n\tcanvas = FigureCanvasAgg(fig)\n\n\tmake_plot(fig)\n\tcanvas.draw()\n\n\twith io.BytesIO() as img_buf:\n\t\tcanvas.print_png(img_buf)\n\t\tq.put(img_buf.getbuffer().tobytes())\n\n\nclass MainContentComponent(juce.Component, juce.Timer):\n\timg = None\n\tq = multiprocessing.Queue()\n\tprocess = None\n\twidth = 600\n\theight = 400\n\ttime = 0.0\n\n\tdef __init__(self):\n\t\tjuce.Component.__init__(self)\n\t\tjuce.Timer.__init__(self)\n\n\t\tself.drawableImage = juce.DrawableImage()\n\t\tself.drawableImage.setOpaque(True)\n\t\tself.addChildComponent(self.drawableImage)\n\n\t\tself.setSize(int(self.width), int(self.height))\n\t\tself.setOpaque(True)\n\n\t\tself.process = multiprocessing.Process(target=generate_plot_png, args=[self.q, self.width, self.height])\n\t\tself.process.start()\n\n\t\tself.startTimerHz(24)\n\n\tdef timerCallback(self):\n\t\tif not self.drawableImage.getImage().isValid():\n\t\t\ttry:\n\t\t\t\timage_data = self.q.get_nowait()\n\n\t\t\t\tself.drawableImage.setImage(self.createImageFromBuffer(image_data))\n\n\t\t\t\tjuce.Desktop.getInstance().getAnimator().fadeIn(self.drawableImage, 1000)\n\n\t\t\texcept queue.Empty:\n\t\t\t\tpass\n\n\t\telse:\n\t\t\tif not juce.Desktop.getInstance().getAnimator().isAnimating(self.drawableImage):\n\t\t\t\tself.stopTimer()\n\n\t\tself.time += juce.degreesToRadians(6.0)\n\t\tself.repaint()\n\n\tdef createImageFromBuffer(self, image_data) -> juce.Image:\n\t\treturn juce.ImageCache.getFromMemory(image_data)\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.white)\n\n\t\tif not self.drawableImage.isVisible() or juce.Desktop.getInstance().getAnimator().isAnimating(self.drawableImage):\n\t\t\tb = self.getLocalBounds()\n\t\t\tcenter = juce.Point[float](b.getCentreX(), b.getCentreY())\n\n\t\t\tp = juce.Path()\n\t\t\tp.addStar(center, 5, 25, 60, self.time)\n\n\t\t\tg.setColour(juce.Colours.blueviolet)\n\t\t\tg.fillPath(p)\n\n\tdef resized(self):\n\t\tself.drawableImage.setBounds(self.getLocalBounds())\n\t\tself.drawableImage.setBoundingBox(self.getLocalBounds().toFloat())\n\n\nif __name__ == \"__main__\":\n\tSTART_JUCE_COMPONENT(MainContentComponent, name=\"Matplotlib Example\")\n"
  },
  {
    "path": "examples/nim_audio.nim",
    "content": "import nimpy\nimport nimpy/raw_buffers\nimport std/[math, random]\n\nproc `+`[T](a: ptr T, b: int): ptr T =\n    cast[ptr T](cast[uint](a) + cast[uint](b * a[].sizeof))\n\nproc process_output(a: PyObject, numSamples: int, gain: float, t: float): float {.exportpy.} =\n    var buffer: RawPyBuffer\n    a.getBuffer(buffer, PyBUF_WRITABLE or PyBUF_ND)\n\n    var p = cast[ptr float32](buffer.buf)\n    var time = t\n\n    for i in 0 ..< numSamples:\n        p[] = (time.degToRad().sin() + (rand(2.0) - 1.0) * 0.125) * 0.5 * gain\n        p = p + 1\n        time += 2.0\n\n    buffer.release()\n\n    return time\n"
  },
  {
    "path": "examples/nim_audio_integration.py",
    "content": "import nimporter\nimport nim_audio\nimport numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass AudioCallback(juce.AudioIODeviceCallback):\n    gain = 1.0\n    time = 0.0\n    device = None\n\n    def audioDeviceAboutToStart(self, device: juce.AudioIODevice):\n        print(\"starting\", device, \"at\", device.getCurrentSampleRate())\n        self.device = device\n\n    def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, outputs, numOutputChannels, numSamples, context):\n        time = self.time\n\n        for output in outputs:\n            nout = np.array(output, copy=False)\n            time = nim_audio.process_output(nout.data, numSamples, self.gain, self.time)\n\n        self.time = time\n\n    def audioDeviceError(self, errorMessage: str):\n        print(\"error\", errorMessage)\n\n    def audioDeviceStopped(self):\n        print(\"stopping\")\n\n\nclass MainContentComponent(juce.Component):\n    manager = juce.AudioDeviceManager()\n    audio_callback = AudioCallback()\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        width = 600\n        height = 400\n\n        self.manager.addAudioCallback(self.audio_callback)\n        result = self.manager.initialiseWithDefaultDevices(0, 2)\n        if result:\n            print(result)\n\n        self.button = juce.TextButton(\"Silence!\")\n        self.addAndMakeVisible(self.button)\n        self.button.onStateChange = lambda: self.onButtonStateChange()\n\n        self.setSize(int(width), int(height))\n        self.setOpaque(True)\n\n    def visibilityChanged(self):\n        if not self.isVisible() and self.manager:\n            self.manager.removeAudioCallback(self.audio_callback)\n            self.manager.closeAudioDevice()\n\n    def onButtonStateChange(self):\n        if self.button.getState() == juce.Button.ButtonState.buttonDown:\n            self.audio_callback.gain = 0.25\n        else:\n            self.audio_callback.gain = 1.0\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(juce.Colours.black)\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.button.setBounds(bounds.reduced(100))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Audio Device Example\")\n"
  },
  {
    "path": "examples/numpy_audio.py",
    "content": "import numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass AudioCallback(juce.AudioIODeviceCallback):\n    gain = 1.0\n    time = 0.0\n    device = None\n\n    def audioDeviceAboutToStart(self, device: juce.AudioIODevice):\n        print(\"starting\", device, \"at\", device.getCurrentSampleRate())\n        self.device = device\n        self.buffer = np.zeros(self.device.getCurrentBufferSizeSamples())\n\n    def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, outputs, numOutputChannels, numSamples, context):\n        start = self.time\n        end = start + 2.0 * numSamples\n\n        self.buffer[:] = (\n            (np.random.random(numSamples) * 2.0 - 1 * 0.025) + np.sin(np.deg2rad(np.linspace(start, end, numSamples)))\n        ) * self.gain * 0.005\n\n        self.time = end % 360.0\n\n        for output in outputs:\n            nout = np.array(output, copy=False)\n            nout[:] = self.buffer\n\n    def audioDeviceError(self, errorMessage: str):\n        print(\"error\", errorMessage)\n\n    def audioDeviceStopped(self):\n        print(\"stopping\")\n\n\nclass MainContentComponent(juce.Component):\n    manager = juce.AudioDeviceManager()\n    audio_callback = AudioCallback()\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        width = 600\n        height = 400\n\n        self.manager.addAudioCallback(self.audio_callback)\n        result = self.manager.initialiseWithDefaultDevices(0, 2)\n        if result:\n            print(result)\n\n        self.button = juce.TextButton(\"Silence!\")\n        self.addAndMakeVisible(self.button)\n        self.button.onStateChange = lambda: self.onButtonStateChange()\n\n        self.setSize(int(width), int(height))\n        self.setOpaque(True)\n\n    def visibilityChanged(self):\n        if not self.isVisible() and self.manager:\n            self.manager.removeAudioCallback(self.audio_callback)\n            self.manager.closeAudioDevice()\n\n    def onButtonStateChange(self):\n        if self.button.getState() == juce.Button.ButtonState.buttonDown:\n            self.audio_callback.gain = 0.25\n        else:\n            self.audio_callback.gain = 1.0\n\n    def paint(self, g: juce.Graphics):\n        g.fillAll(juce.Colours.black)\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n        self.button.setBounds(bounds.reduced(100))\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Audio Device Example\")\n"
  },
  {
    "path": "examples/opencv_integration.py",
    "content": "import os\nimport cv2\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n\tjuceImage = None\n\n\tdef __init__(self):\n\t\tjuce.Component.__init__(self)\n\n\t\tself.blurLabel = juce.Label()\n\t\tself.blurLabel.setText(\"Blur\", juce.dontSendNotification)\n\t\tself.addAndMakeVisible(self.blurLabel)\n\n\t\tself.blurSlider = juce.Slider()\n\t\tself.blurSlider.setRange(0.0, 255.0, 1.0)\n\t\tself.blurSlider.setValue(1.0, juce.dontSendNotification)\n\t\tself.blurSlider.onValueChange = lambda: self.updateImage()\n\t\tself.addAndMakeVisible(self.blurSlider)\n\n\t\tself.brightnessLabel = juce.Label()\n\t\tself.brightnessLabel.setText(\"Brightness\", juce.dontSendNotification)\n\t\tself.addAndMakeVisible(self.brightnessLabel)\n\n\t\tself.brightnessSlider = juce.Slider()\n\t\tself.brightnessSlider.setRange(0.0, 255.0, 1.0)\n\t\tself.brightnessSlider.setValue(20.0, juce.dontSendNotification)\n\t\tself.brightnessSlider.onValueChange = lambda: self.updateImage()\n\t\tself.addAndMakeVisible(self.brightnessSlider)\n\n\t\tself.cvImage = cv2.imread(juce.File(os.path.abspath(__file__)).withFileExtension(\".jpg\").getFullPathName())\n\t\tself.updateImage()\n\n\t\tself.setSize(self.juceImage.getWidth(), self.juceImage.getHeight() + 44 + 40)\n\t\tself.setOpaque(True)\n\n\tdef processBrightness(self, img, brightness):\n\t\thsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)\n\t\th, s, v = cv2.split(hsv)\n\t\tlim = 255 - brightness\n\t\tv[v > lim] = 255\n\t\tv[v <= lim] += brightness\n\t\tfinal_hsv = cv2.merge((h, s, v))\n\t\treturn cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR)\n\n\tdef processBlur(self, img, blur):\n\t\tkernel_size = (blur + 1, blur + 1)\n\t\treturn cv2.blur(img, kernel_size)\n\n\tdef updateImage(self):\n\t\timg = self.processBrightness(self.cvImage, int(self.brightnessSlider.getValue()))\n\t\timg = self.processBlur(img, int(self.blurSlider.getValue()))\n\n\t\tself.juceImage = self.convertCvImageToJuce(img, self.juceImage)\n\n\t\tself.repaint()\n\n\tdef convertCvImageToJuce(self, cvImage, juceImage = None):\n\t\theight, width, _ = cvImage.shape\n\n\t\tif juceImage is None or width != juceImage.getWidth() or height != juceImage.getHeight():\n\t\t\tjuceImage = juce.Image(juce.Image.ARGB, width, height, False)\n\n\t\tpixels = juce.Image.BitmapData(juceImage, 0, 0, width, height, juce.Image.BitmapData.writeOnly)\n\t\tcvImage = cv2.cvtColor(cvImage, cv2.COLOR_BGR2BGRA)\n\n\t\tpixels.data = cvImage.data\n\n\t\treturn juceImage\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.black)\n\n\t\tif self.juceImage:\n\t\t\tg.drawImageWithin(self.juceImage, 0, 0, self.getWidth(), self.getHeight() - 44 - 40, juce.RectanglePlacement.onlyReduceInSize)\n\n\tdef resized(self):\n\t\tbounds = self.getLocalBounds()\n\n\t\tbrightnessBounds = bounds.removeFromBottom(40).reduced(4)\n\t\tself.brightnessLabel.setBounds(brightnessBounds.removeFromLeft(100))\n\t\tself.brightnessSlider.setBounds(brightnessBounds)\n\n\t\tblurBounds = bounds.removeFromBottom(40).reduced(4)\n\t\tself.blurLabel.setBounds(blurBounds.removeFromLeft(100))\n\t\tself.blurSlider.setBounds(blurBounds)\n\n\nif __name__ == \"__main__\":\n\tSTART_JUCE_COMPONENT(MainContentComponent, name=\"OpenCV Example\")\n"
  },
  {
    "path": "examples/opencv_video.py",
    "content": "import os\nimport cv2\nimport threading\nimport queue\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\ndef captureCameraCallback(imageQ, paramsQ, faceDetector, shouldStop, scaleFactor, minNeighbors):\n\tcap = cv2.VideoCapture(0)\n\n\tcap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)\n\tcap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)\n\n\twhile cap.isOpened() and not shouldStop.is_set():\n\t\t# Capture camera frames\n\t\tret, frame = cap.read()\n\t\tif not ret:\n\t\t\tbreak\n\n\t\t# Get parameters\n\t\ttry:\n\t\t\twhile True:\n\t\t\t\tscaleFactor, minNeighbors = paramsQ.get_nowait()\n\t\texcept queue.Empty:\n\t\t\tpass\n\n\t\t# Detect the face\n\t\tframe = cv2.flip(frame, 1)\n\t\tgray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\n\n\t\tfaces = faceDetector.detectMultiScale(\n\t\t\tgray,\n\t\t\tscaleFactor=scaleFactor,\n\t\t\tminNeighbors=minNeighbors,\n\t\t\tminSize=(50, 50)\n\t\t)\n\n\t\t# Process effects\n\t\tblur = 20\n\t\tframe = cv2.blur(frame, (blur + 1, blur + 1))\n\n\t\t# Provide rects to juce\n\t\trects = []\n\t\tfor (x, y, w, h) in faces:\n\t\t\trects.append(juce.Rectangle[int](x, y, w, h))\n\n\t\timageQ.put((cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA), rects))\n\n\tcap.release()\n\n\nclass MainContentComponent(juce.Component, juce.Timer):\n\tjuceImage = None\n\timageQ = queue.Queue()\n\tparamsQ = queue.Queue()\n\tshouldStop = threading.Event()\n\trects = []\n\ttime = 0.0\n\n\tdef __init__(self):\n\t\tjuce.Component.__init__(self)\n\t\tjuce.Timer.__init__(self)\n\n\t\tself.blurLabel = juce.Label()\n\t\tself.blurLabel.setText(\"Scale Factor\", juce.dontSendNotification)\n\t\tself.addAndMakeVisible(self.blurLabel)\n\n\t\tself.blurSlider = juce.Slider()\n\t\tself.blurSlider.setRange(1.01, 5.0, 0.01)\n\t\tself.blurSlider.setValue(1.2, juce.dontSendNotification)\n\t\tself.blurSlider.onValueChange = lambda: self.updateParameters()\n\t\tself.addAndMakeVisible(self.blurSlider)\n\n\t\tself.brightnessLabel = juce.Label()\n\t\tself.brightnessLabel.setText(\"Min Neighbors\", juce.dontSendNotification)\n\t\tself.addAndMakeVisible(self.brightnessLabel)\n\n\t\tself.brightnessSlider = juce.Slider()\n\t\tself.brightnessSlider.setRange(1.0, 100.0, 1.0)\n\t\tself.brightnessSlider.setValue(10.0, juce.dontSendNotification)\n\t\tself.brightnessSlider.onValueChange = lambda: self.updateParameters()\n\t\tself.addAndMakeVisible(self.brightnessSlider)\n\n\t\tself.updateParameters()\n\n\t\tself.faceCascade = cv2.CascadeClassifier(juce.File(os.path.abspath(__file__)).withFileExtension(\".xml\").getFullPathName())\n\n\t\tself.thread = threading.Thread(target=captureCameraCallback, args=(\n\t\t\tself.imageQ, self.paramsQ, self.faceCascade, self.shouldStop, 1.2, 10))\n\t\tself.thread.start()\n\n\t\tself.startTimerHz(30)\n\n\t\tself.setSize(640, 480 + 44 + 40)\n\t\tself.setOpaque(True)\n\n\tdef updateParameters(self):\n\t\tself.paramsQ.put((\n\t\t\tself.blurSlider.getValue(),\n\t\t\tint(self.brightnessSlider.getValue()),\n\t\t))\n\n\tdef convertCvImageToJuce(self, cvImage, juceImage = None):\n\t\theight, width, _ = cvImage.shape\n\n\t\tif juceImage is None or width != juceImage.getWidth() or height != juceImage.getHeight():\n\t\t\tjuceImage = juce.Image(juce.Image.ARGB, width, height, False)\n\n\t\tpixels = juce.Image.BitmapData(juceImage, 0, 0, width, height, juce.Image.BitmapData.writeOnly)\n\t\tpixels.data = cvImage.data\n\n\t\treturn juceImage\n\n\tdef visibilityChanged(self):\n\t\tif not self.isVisible():\n\t\t\tself.shouldStop.set()\n\t\t\tself.thread.join()\n\n\tdef timerCallback(self):\n\t\timg = None\n\t\trects = []\n\n\t\ttry:\n\t\t\twhile True:\n\t\t\t\timg, rects = self.imageQ.get_nowait()\n\n\t\texcept queue.Empty:\n\t\t\tpass\n\n\t\tif img is not None:\n\t\t\tself.juceImage = self.convertCvImageToJuce(img, self.juceImage)\n\t\t\tself.rects = rects\n\n\t\tself.time += juce.degreesToRadians(2.0)\n\t\tself.repaint()\n\n\tdef paint(self, g: juce.Graphics):\n\t\tg.fillAll(juce.Colours.black)\n\n\t\tif self.juceImage:\n\t\t\tg.drawImageWithin(self.juceImage, 0, 0, self.getWidth(), self.getHeight() - 44 - 40, juce.RectanglePlacement.onlyReduceInSize)\n\n\t\tfor r in self.rects:\n\t\t\tcenter = juce.Point[float](r.getCentreX(), r.getCentreY())\n\n\t\t\tp = juce.Path()\n\t\t\tp.addStar(center, 6, 70, 160, self.time)\n\n\t\t\tgradient = juce.ColourGradient(\n\t\t\t\tjuce.Colours.greenyellow, r.getCentreX(), r.getCentreY(),\n\t\t\t\tjuce.Colours.cornflowerblue, r.getBottomRight().x, r.getBottomRight().y,\n\t\t\t\tisRadial=True)\n\t\t\tg.setGradientFill(gradient)\n\t\t\tg.fillPath(p)\n\n\t\t\tg.setColour(juce.Colours.black)\n\t\t\tg.strokePath(p, juce.PathStrokeType(2.0))\n\n\tdef resized(self):\n\t\tbounds = self.getLocalBounds()\n\n\t\tbrightnessBounds = bounds.removeFromBottom(40).reduced(4)\n\t\tself.brightnessLabel.setBounds(brightnessBounds.removeFromLeft(100))\n\t\tself.brightnessSlider.setBounds(brightnessBounds)\n\n\t\tblurBounds = bounds.removeFromBottom(40).reduced(4)\n\t\tself.blurLabel.setBounds(blurBounds.removeFromLeft(100))\n\t\tself.blurSlider.setBounds(blurBounds)\n\n\nif __name__ == \"__main__\":\n\tSTART_JUCE_COMPONENT(MainContentComponent, name=\"OpenCV Example\")\n"
  },
  {
    "path": "examples/opencv_video.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 24x24 discrete(?) adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's in binary form must reproduce the above copyright notice,\n     this list of conditions and the following disclaimer in the documentation\n     and/or other materials provided with the distribution.\n\n   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n-->\n<opencv_storage>\n<cascade type_id=\"opencv-cascade-classifier\"><stageType>BOOST</stageType>\n  <featureType>HAAR</featureType>\n  <height>24</height>\n  <width>24</width>\n  <stageParams>\n    <maxWeakCount>211</maxWeakCount></stageParams>\n  <featureParams>\n    <maxCatCount>0</maxCatCount></featureParams>\n  <stageNum>25</stageNum>\n  <stages>\n    <_>\n      <maxWeakCount>9</maxWeakCount>\n      <stageThreshold>-5.0425500869750977e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 0 -3.1511999666690826e-02</internalNodes>\n          <leafValues>\n            2.0875380039215088e+00 -2.2172100543975830e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1 1.2396000325679779e-02</internalNodes>\n          <leafValues>\n            -1.8633940219879150e+00 1.3272049427032471e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2 2.1927999332547188e-02</internalNodes>\n          <leafValues>\n            -1.5105249881744385e+00 1.0625729560852051e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 3 5.7529998011887074e-03</internalNodes>\n          <leafValues>\n            -8.7463897466659546e-01 1.1760339736938477e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 4 1.5014000236988068e-02</internalNodes>\n          <leafValues>\n            -7.7945697307586670e-01 1.2608419656753540e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 5 9.9371001124382019e-02</internalNodes>\n          <leafValues>\n            5.5751299858093262e-01 -1.8743000030517578e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 6 2.7340000960975885e-03</internalNodes>\n          <leafValues>\n            -1.6911929845809937e+00 4.4009700417518616e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 7 -1.8859000876545906e-02</internalNodes>\n          <leafValues>\n            -1.4769539833068848e+00 4.4350099563598633e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 8 5.9739998541772366e-03</internalNodes>\n          <leafValues>\n            -8.5909199714660645e-01 8.5255599021911621e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>16</maxWeakCount>\n      <stageThreshold>-4.9842400550842285e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 9 -2.1110000088810921e-02</internalNodes>\n          <leafValues>\n            1.2435649633407593e+00 -1.5713009834289551e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 10 2.0355999469757080e-02</internalNodes>\n          <leafValues>\n            -1.6204780340194702e+00 1.1817760467529297e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 11 2.1308999508619308e-02</internalNodes>\n          <leafValues>\n            -1.9415930509567261e+00 7.0069098472595215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 12 9.1660000383853912e-02</internalNodes>\n          <leafValues>\n            -5.5670100450515747e-01 1.7284419536590576e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 13 3.6288000643253326e-02</internalNodes>\n          <leafValues>\n            2.6763799786567688e-01 -2.1831810474395752e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 14 -1.9109999760985374e-02</internalNodes>\n          <leafValues>\n            -2.6730210781097412e+00 4.5670801401138306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 15 8.2539999857544899e-03</internalNodes>\n          <leafValues>\n            -1.0852910280227661e+00 5.3564202785491943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 16 1.8355000764131546e-02</internalNodes>\n          <leafValues>\n            -3.5200199484825134e-01 9.3339198827743530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 17 -7.0569999516010284e-03</internalNodes>\n          <leafValues>\n            9.2782098054885864e-01 -6.6349899768829346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 18 -9.8770000040531158e-03</internalNodes>\n          <leafValues>\n            1.1577470302581787e+00 -2.9774799942970276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 19 1.5814000740647316e-02</internalNodes>\n          <leafValues>\n            -4.1960600018501282e-01 1.3576040267944336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 20 -2.0700000226497650e-02</internalNodes>\n          <leafValues>\n            1.4590020179748535e+00 -1.9739399850368500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 21 -1.3760800659656525e-01</internalNodes>\n          <leafValues>\n            1.1186759471893311e+00 -5.2915501594543457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 22 1.4318999834358692e-02</internalNodes>\n          <leafValues>\n            -3.5127198696136475e-01 1.1440860033035278e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 23 1.0253000073134899e-02</internalNodes>\n          <leafValues>\n            -6.0850602388381958e-01 7.7098500728607178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 24 9.1508001089096069e-02</internalNodes>\n          <leafValues>\n            3.8817799091339111e-01 -1.5122940540313721e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>27</maxWeakCount>\n      <stageThreshold>-4.6551899909973145e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 25 6.9747000932693481e-02</internalNodes>\n          <leafValues>\n            -1.0130879878997803e+00 1.4687349796295166e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 26 3.1502999365329742e-02</internalNodes>\n          <leafValues>\n            -1.6463639736175537e+00 1.0000629425048828e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 27 1.4260999858379364e-02</internalNodes>\n          <leafValues>\n            4.6480301022529602e-01 -1.5959889888763428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 28 1.4453000389039516e-02</internalNodes>\n          <leafValues>\n            -6.5511900186538696e-01 8.3021801710128784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 29 -3.0509999487549067e-03</internalNodes>\n          <leafValues>\n            -1.3982310295104980e+00 4.2550599575042725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 30 3.2722998410463333e-02</internalNodes>\n          <leafValues>\n            -5.0702601671218872e-01 1.0526109933853149e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 31 -7.2960001416504383e-03</internalNodes>\n          <leafValues>\n            3.6356899142265320e-01 -1.3464889526367188e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 32 5.0425000488758087e-02</internalNodes>\n          <leafValues>\n            -3.0461400747299194e-01 1.4504129886627197e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 33 4.6879000961780548e-02</internalNodes>\n          <leafValues>\n            -4.0286201238632202e-01 1.2145609855651855e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 34 -6.9358997046947479e-02</internalNodes>\n          <leafValues>\n            1.0539360046386719e+00 -4.5719701051712036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 35 -4.9033999443054199e-02</internalNodes>\n          <leafValues>\n            -1.6253089904785156e+00 1.5378999710083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 36 8.4827996790409088e-02</internalNodes>\n          <leafValues>\n            2.8402999043464661e-01 -1.5662059783935547e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 37 -1.7229999648407102e-03</internalNodes>\n          <leafValues>\n            -1.0147459506988525e+00 2.3294800519943237e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 38 1.1562199890613556e-01</internalNodes>\n          <leafValues>\n            -1.6732899844646454e-01 1.2804069519042969e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 39 -5.1279999315738678e-02</internalNodes>\n          <leafValues>\n            1.5162390470504761e+00 -3.0271100997924805e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 40 -4.2706999927759171e-02</internalNodes>\n          <leafValues>\n            1.7631920576095581e+00 -5.1832001656293869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 41 3.7178099155426025e-01</internalNodes>\n          <leafValues>\n            -3.1389200687408447e-01 1.5357979536056519e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 42 1.9412999972701073e-02</internalNodes>\n          <leafValues>\n            -1.0017599910497665e-01 9.3655401468276978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 43 1.7439000308513641e-02</internalNodes>\n          <leafValues>\n            -4.0379899740219116e-01 9.6293002367019653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 44 3.9638999849557877e-02</internalNodes>\n          <leafValues>\n            1.7039099335670471e-01 -2.9602990150451660e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 45 -9.1469995677471161e-03</internalNodes>\n          <leafValues>\n            8.8786798715591431e-01 -4.3818700313568115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 46 1.7219999572262168e-03</internalNodes>\n          <leafValues>\n            -3.7218600511550903e-01 4.0018901228904724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 47 3.0231000855565071e-02</internalNodes>\n          <leafValues>\n            6.5924003720283508e-02 -2.6469180583953857e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 48 -7.8795999288558960e-02</internalNodes>\n          <leafValues>\n            -1.7491459846496582e+00 2.8475299477577209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 49 2.1110000088810921e-03</internalNodes>\n          <leafValues>\n            -9.3908101320266724e-01 2.3205199837684631e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 50 2.7091000229120255e-02</internalNodes>\n          <leafValues>\n            -5.2664000540971756e-02 1.0756820440292358e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 51 -4.4964998960494995e-02</internalNodes>\n          <leafValues>\n            -1.8294479846954346e+00 9.9561996757984161e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>32</maxWeakCount>\n      <stageThreshold>-4.4531588554382324e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 52 -6.5701000392436981e-02</internalNodes>\n          <leafValues>\n            1.1558510065078735e+00 -1.0716359615325928e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 53 1.5839999541640282e-02</internalNodes>\n          <leafValues>\n            -1.5634720325469971e+00 7.6877099275588989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 54 1.4570899307727814e-01</internalNodes>\n          <leafValues>\n            -5.7450097799301147e-01 1.3808720111846924e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 55 6.1389999464154243e-03</internalNodes>\n          <leafValues>\n            -1.4570560455322266e+00 5.1610302925109863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 56 6.7179999314248562e-03</internalNodes>\n          <leafValues>\n            -8.3533602952957153e-01 5.8522200584411621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 57 1.8518000841140747e-02</internalNodes>\n          <leafValues>\n            -3.1312099099159241e-01 1.1696679592132568e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 58 1.9958000630140305e-02</internalNodes>\n          <leafValues>\n            -4.3442600965499878e-01 9.5446902513504028e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 59 -2.7755001187324524e-01</internalNodes>\n          <leafValues>\n            1.4906179904937744e+00 -1.3815900683403015e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 60 9.1859996318817139e-03</internalNodes>\n          <leafValues>\n            -9.6361500024795532e-01 2.7665498852729797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 61 -3.7737999111413956e-02</internalNodes>\n          <leafValues>\n            -2.4464108943939209e+00 2.3619599640369415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 62 1.8463000655174255e-02</internalNodes>\n          <leafValues>\n            1.7539200186729431e-01 -1.3423130512237549e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 63 -1.1114999651908875e-02</internalNodes>\n          <leafValues>\n            4.8710799217224121e-01 -8.9851897954940796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 64 3.3927999436855316e-02</internalNodes>\n          <leafValues>\n            1.7874200642108917e-01 -1.6342279911041260e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 65 -3.5649001598358154e-02</internalNodes>\n          <leafValues>\n            -1.9607399702072144e+00 1.8102499842643738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 66 -1.1438000015914440e-02</internalNodes>\n          <leafValues>\n            9.9010699987411499e-01 -3.8103199005126953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 67 -6.5236002206802368e-02</internalNodes>\n          <leafValues>\n            -2.5794160366058350e+00 2.4753600358963013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 68 -4.2272001504898071e-02</internalNodes>\n          <leafValues>\n            1.4411840438842773e+00 -2.9508298635482788e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 69 1.9219999667257071e-03</internalNodes>\n          <leafValues>\n            -4.9608600139617920e-01 6.3173598051071167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 70 -1.2921799719333649e-01</internalNodes>\n          <leafValues>\n            -2.3314270973205566e+00 5.4496999830007553e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 71 2.2931000217795372e-02</internalNodes>\n          <leafValues>\n            -8.4447097778320312e-01 3.8738098740577698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 72 -3.4120000898838043e-02</internalNodes>\n          <leafValues>\n            -1.4431500434875488e+00 9.8422996699810028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 73 2.6223000138998032e-02</internalNodes>\n          <leafValues>\n            1.8223099410533905e-01 -1.2586519718170166e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 74 2.2236999124288559e-02</internalNodes>\n          <leafValues>\n            6.9807998836040497e-02 -2.3820950984954834e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 75 -5.8240001089870930e-03</internalNodes>\n          <leafValues>\n            3.9332500100135803e-01 -2.7542799711227417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 76 4.3653000146150589e-02</internalNodes>\n          <leafValues>\n            1.4832699298858643e-01 -1.1368780136108398e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 77 5.7266999036073685e-02</internalNodes>\n          <leafValues>\n            2.4628099799156189e-01 -1.2687400579452515e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 78 2.3409998975694180e-03</internalNodes>\n          <leafValues>\n            -7.5448900461196899e-01 2.7163800597190857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 79 1.2996000237762928e-02</internalNodes>\n          <leafValues>\n            -3.6394900083541870e-01 7.0959198474884033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 80 -2.6517000049352646e-02</internalNodes>\n          <leafValues>\n            -2.3221859931945801e+00 3.5744000226259232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 81 -5.8400002308189869e-03</internalNodes>\n          <leafValues>\n            4.2194300889968872e-01 -4.8184998333454132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 82 -1.6568999737501144e-02</internalNodes>\n          <leafValues>\n            1.1099940538406372e+00 -3.4849700331687927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 83 -6.8157002329826355e-02</internalNodes>\n          <leafValues>\n            -3.3269989490509033e+00 2.1299000084400177e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>52</maxWeakCount>\n      <stageThreshold>-4.3864588737487793e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 84 3.9974000304937363e-02</internalNodes>\n          <leafValues>\n            -1.2173449993133545e+00 1.0826710462570190e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 85 1.8819500505924225e-01</internalNodes>\n          <leafValues>\n            -4.8289400339126587e-01 1.4045250415802002e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 86 7.8027002513408661e-02</internalNodes>\n          <leafValues>\n            -1.0782150030136108e+00 7.4040299654006958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 87 1.1899999663000926e-04</internalNodes>\n          <leafValues>\n            -1.2019979953765869e+00 3.7749201059341431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 88 8.5056997835636139e-02</internalNodes>\n          <leafValues>\n            -4.3939098715782166e-01 1.2647340297698975e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 89 8.9720003306865692e-03</internalNodes>\n          <leafValues>\n            -1.8440499901771545e-01 4.5726400613784790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 90 8.8120000436902046e-03</internalNodes>\n          <leafValues>\n            3.0396699905395508e-01 -9.5991098880767822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 91 -2.3507999256253242e-02</internalNodes>\n          <leafValues>\n            1.2487529516220093e+00 4.6227999031543732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 92 7.0039997808635235e-03</internalNodes>\n          <leafValues>\n            -5.9442102909088135e-01 5.3963297605514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 93 3.3851999789476395e-02</internalNodes>\n          <leafValues>\n            2.8496098518371582e-01 -1.4895249605178833e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 94 -3.2530000898987055e-03</internalNodes>\n          <leafValues>\n            4.8120799660682678e-01 -5.2712398767471313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 95 2.9097000136971474e-02</internalNodes>\n          <leafValues>\n            2.6743900775909424e-01 -1.6007850170135498e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 96 -8.4790000692009926e-03</internalNodes>\n          <leafValues>\n            -1.3107639551162720e+00 1.5243099629878998e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 97 -1.0795000009238720e-02</internalNodes>\n          <leafValues>\n            4.5613598823547363e-01 -7.2050899267196655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 98 -2.4620000272989273e-02</internalNodes>\n          <leafValues>\n            -1.7320619821548462e+00 6.8363003432750702e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 99 3.7380000576376915e-03</internalNodes>\n          <leafValues>\n            -1.9303299486637115e-01 6.8243497610092163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 100 -1.2264000251889229e-02</internalNodes>\n          <leafValues>\n            -1.6095290184020996e+00 7.5268000364303589e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 101 -4.8670000396668911e-03</internalNodes>\n          <leafValues>\n            7.4286502599716187e-01 -2.1510200202465057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 102 7.6725997030735016e-02</internalNodes>\n          <leafValues>\n            -2.6835098862648010e-01 1.3094140291213989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 103 2.8578000143170357e-02</internalNodes>\n          <leafValues>\n            -5.8793000876903534e-02 1.2196329832077026e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 104 1.9694000482559204e-02</internalNodes>\n          <leafValues>\n            -3.5142898559570312e-01 8.4926998615264893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 105 -2.9093999415636063e-02</internalNodes>\n          <leafValues>\n            -1.0507299900054932e+00 2.9806300997734070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 106 -2.9144000262022018e-02</internalNodes>\n          <leafValues>\n            8.2547801733016968e-01 -3.2687199115753174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 107 1.9741000607609749e-02</internalNodes>\n          <leafValues>\n            2.0452600717544556e-01 -8.3760201930999756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 108 4.3299999088048935e-03</internalNodes>\n          <leafValues>\n            2.0577900111675262e-01 -6.6829800605773926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 109 -3.5500999540090561e-02</internalNodes>\n          <leafValues>\n            -1.2969900369644165e+00 1.3897499442100525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 110 -1.6172999516129494e-02</internalNodes>\n          <leafValues>\n            -1.3110569715499878e+00 7.5751997530460358e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 111 -2.2151000797748566e-02</internalNodes>\n          <leafValues>\n            -1.0524389743804932e+00 1.9241100549697876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 112 -2.2707000374794006e-02</internalNodes>\n          <leafValues>\n            -1.3735309839248657e+00 6.6780999302864075e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 113 1.6607999801635742e-02</internalNodes>\n          <leafValues>\n            -3.7135999649763107e-02 7.7846401929855347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 114 -1.3309000059962273e-02</internalNodes>\n          <leafValues>\n            -9.9850702285766602e-01 1.2248100340366364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 115 -3.3732000738382339e-02</internalNodes>\n          <leafValues>\n            1.4461359977722168e+00 1.3151999562978745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 116 1.6935000196099281e-02</internalNodes>\n          <leafValues>\n            -3.7121298909187317e-01 5.2842199802398682e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 117 3.3259999472647905e-03</internalNodes>\n          <leafValues>\n            -5.7568502426147461e-01 3.9261901378631592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 118 8.3644002676010132e-02</internalNodes>\n          <leafValues>\n            1.6116000711917877e-02 -2.1173279285430908e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 119 2.5785198807716370e-01</internalNodes>\n          <leafValues>\n            -8.1609003245830536e-02 9.8782497644424438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 120 -3.6566998809576035e-02</internalNodes>\n          <leafValues>\n            -1.1512110233306885e+00 9.6459001302719116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 121 -1.6445999965071678e-02</internalNodes>\n          <leafValues>\n            3.7315499782562256e-01 -1.4585399627685547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 122 -3.7519999314099550e-03</internalNodes>\n          <leafValues>\n            2.6179298758506775e-01 -5.8156698942184448e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 123 -6.3660000450909138e-03</internalNodes>\n          <leafValues>\n            7.5477397441864014e-01 -1.7055200040340424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 124 -3.8499999791383743e-03</internalNodes>\n          <leafValues>\n            2.2653999924659729e-01 -6.3876402378082275e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 125 -4.5494001358747482e-02</internalNodes>\n          <leafValues>\n            -1.2640299797058105e+00 2.5260698795318604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 126 -2.3941000923514366e-02</internalNodes>\n          <leafValues>\n            8.7068402767181396e-01 -2.7104699611663818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 127 -7.7558003365993500e-02</internalNodes>\n          <leafValues>\n            -1.3901610374450684e+00 2.3612299561500549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 128 2.3614000529050827e-02</internalNodes>\n          <leafValues>\n            6.6140003502368927e-02 -1.2645419836044312e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 129 -2.5750000495463610e-03</internalNodes>\n          <leafValues>\n            -5.3841698169708252e-01 3.0379098653793335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 130 1.2010800093412399e-01</internalNodes>\n          <leafValues>\n            -3.5343000292778015e-01 5.2866202592849731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 131 2.2899999748915434e-03</internalNodes>\n          <leafValues>\n            -5.8701997995376587e-01 2.4061000347137451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 132 6.9716997444629669e-02</internalNodes>\n          <leafValues>\n            -3.3348900079727173e-01 5.1916301250457764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 133 -4.6670001000165939e-02</internalNodes>\n          <leafValues>\n            6.9795399904251099e-01 -1.4895999804139137e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 134 -5.0129000097513199e-02</internalNodes>\n          <leafValues>\n            8.6146199703216553e-01 -2.5986000895500183e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 135 3.0147999525070190e-02</internalNodes>\n          <leafValues>\n            1.9332799315452576e-01 -5.9131097793579102e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>53</maxWeakCount>\n      <stageThreshold>-4.1299300193786621e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 136 9.1085001826286316e-02</internalNodes>\n          <leafValues>\n            -8.9233100414276123e-01 1.0434230566024780e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 137 1.2818999588489532e-02</internalNodes>\n          <leafValues>\n            -1.2597670555114746e+00 5.5317097902297974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 138 1.5931999310851097e-02</internalNodes>\n          <leafValues>\n            -8.6254400014877319e-01 6.3731801509857178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 139 2.2780001163482666e-03</internalNodes>\n          <leafValues>\n            -7.4639201164245605e-01 5.3155601024627686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 140 3.1840998679399490e-02</internalNodes>\n          <leafValues>\n            -1.2650489807128906e+00 3.6153900623321533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 141 2.6960000395774841e-03</internalNodes>\n          <leafValues>\n            -9.8290401697158813e-01 3.6013001203536987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 142 -1.2055000290274620e-02</internalNodes>\n          <leafValues>\n            6.4068400859832764e-01 -5.0125002861022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 143 2.1324999630451202e-02</internalNodes>\n          <leafValues>\n            -2.4034999310970306e-01 8.5448002815246582e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 144 3.0486000701785088e-02</internalNodes>\n          <leafValues>\n            -3.4273600578308105e-01 1.1428849697113037e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 145 -4.5079998672008514e-02</internalNodes>\n          <leafValues>\n            1.0976949930191040e+00 -1.7974600195884705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 146 -7.1700997650623322e-02</internalNodes>\n          <leafValues>\n            1.5735000371932983e+00 -3.1433498859405518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 147 5.9218000620603561e-02</internalNodes>\n          <leafValues>\n            -2.7582401037216187e-01 1.0448570251464844e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 148 6.7010000348091125e-03</internalNodes>\n          <leafValues>\n            -1.0974019765853882e+00 1.9801199436187744e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 149 4.1046999394893646e-02</internalNodes>\n          <leafValues>\n            3.0547699332237244e-01 -1.3287999629974365e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 150 -8.5499999113380909e-04</internalNodes>\n          <leafValues>\n            2.5807100534439087e-01 -7.0052897930145264e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 151 -3.0360000208020210e-02</internalNodes>\n          <leafValues>\n            -1.2306419610977173e+00 2.2609399259090424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 152 -1.2930000200867653e-02</internalNodes>\n          <leafValues>\n            4.0758600831031799e-01 -5.1234501600265503e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 153 3.7367999553680420e-02</internalNodes>\n          <leafValues>\n            -9.4755001366138458e-02 6.1765098571777344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 154 2.4434000253677368e-02</internalNodes>\n          <leafValues>\n            -4.1100600361824036e-01 4.7630500793457031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 155 5.7007998228073120e-02</internalNodes>\n          <leafValues>\n            2.5249299407005310e-01 -6.8669801950454712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 156 -1.6313999891281128e-02</internalNodes>\n          <leafValues>\n            -9.3928402662277222e-01 1.1448100209236145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 157 -1.7648899555206299e-01</internalNodes>\n          <leafValues>\n            1.2451089620590210e+00 -5.6519001722335815e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 158 1.7614600062370300e-01</internalNodes>\n          <leafValues>\n            -3.2528200745582581e-01 8.2791501283645630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 159 -7.3910001665353775e-03</internalNodes>\n          <leafValues>\n            3.4783700108528137e-01 -1.7929099500179291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 160 6.0890998691320419e-02</internalNodes>\n          <leafValues>\n            5.5098000913858414e-02 -1.5480779409408569e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 161 -2.9123000800609589e-02</internalNodes>\n          <leafValues>\n            -1.0255639553070068e+00 2.4106900393962860e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 162 -4.5648999512195587e-02</internalNodes>\n          <leafValues>\n            1.0301599502563477e+00 -3.1672099232673645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 163 3.7333000451326370e-02</internalNodes>\n          <leafValues>\n            2.1620599925518036e-01 -8.2589900493621826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 164 -2.4411000311374664e-02</internalNodes>\n          <leafValues>\n            -1.5957959890365601e+00 5.1139000803232193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 165 -5.9806998819112778e-02</internalNodes>\n          <leafValues>\n            -1.0312290191650391e+00 1.3092300295829773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 166 -3.0106000602245331e-02</internalNodes>\n          <leafValues>\n            -1.4781630039215088e+00 3.7211999297142029e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 167 7.4209999293088913e-03</internalNodes>\n          <leafValues>\n            -2.4024100601673126e-01 4.9333998560905457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 168 -2.1909999195486307e-03</internalNodes>\n          <leafValues>\n            2.8941500186920166e-01 -5.7259601354598999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 169 2.0860999822616577e-02</internalNodes>\n          <leafValues>\n            -2.3148399591445923e-01 6.3765901327133179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 170 -6.6990000195801258e-03</internalNodes>\n          <leafValues>\n            -1.2107750177383423e+00 6.4018003642559052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 171 1.8758000805974007e-02</internalNodes>\n          <leafValues>\n            2.4461300671100616e-01 -9.9786698818206787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 172 -4.4323001056909561e-02</internalNodes>\n          <leafValues>\n            -1.3699189424514771e+00 3.6051999777555466e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 173 2.2859999909996986e-02</internalNodes>\n          <leafValues>\n            2.1288399398326874e-01 -1.0397620201110840e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 174 -9.8600005730986595e-04</internalNodes>\n          <leafValues>\n            3.2443600893020630e-01 -5.4291802644729614e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 175 1.7239000648260117e-02</internalNodes>\n          <leafValues>\n            -2.8323900699615479e-01 4.4468200206756592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 176 -3.4531001001596451e-02</internalNodes>\n          <leafValues>\n            -2.3107020854949951e+00 -3.1399999279528856e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 177 6.7006997764110565e-02</internalNodes>\n          <leafValues>\n            2.8715699911117554e-01 -6.4481002092361450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 178 2.3776899278163910e-01</internalNodes>\n          <leafValues>\n            -2.7174800634384155e-01 8.0219101905822754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 179 -1.2903000228106976e-02</internalNodes>\n          <leafValues>\n            -1.5317620038986206e+00 2.1423600614070892e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 180 1.0514999739825726e-02</internalNodes>\n          <leafValues>\n            7.7037997543811798e-02 -1.0581140518188477e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 181 1.6969000920653343e-02</internalNodes>\n          <leafValues>\n            1.4306700229644775e-01 -8.5828399658203125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 182 -7.2460002265870571e-03</internalNodes>\n          <leafValues>\n            -1.1020129919052124e+00 6.4906999468803406e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 183 1.0556999593973160e-02</internalNodes>\n          <leafValues>\n            1.3964000158011913e-02 6.3601499795913696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 184 6.1380001716315746e-03</internalNodes>\n          <leafValues>\n            -3.4545901417732239e-01 5.6296801567077637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 185 1.3158000074326992e-02</internalNodes>\n          <leafValues>\n            1.9927300512790680e-01 -1.5040320158004761e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 186 3.1310000922530890e-03</internalNodes>\n          <leafValues>\n            -4.0903699398040771e-01 3.7796398997306824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 187 -1.0920699685811996e-01</internalNodes>\n          <leafValues>\n            -2.2227079868316650e+00 1.2178199738264084e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 188 8.1820003688335419e-03</internalNodes>\n          <leafValues>\n            -2.8652000427246094e-01 6.7890799045562744e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>62</maxWeakCount>\n      <stageThreshold>-4.0218091011047363e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 189 3.1346999108791351e-02</internalNodes>\n          <leafValues>\n            -8.8884598016738892e-01 9.4936800003051758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 190 3.1918000429868698e-02</internalNodes>\n          <leafValues>\n            -1.1146880388259888e+00 4.8888999223709106e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 191 6.5939999185502529e-03</internalNodes>\n          <leafValues>\n            -1.0097689628601074e+00 4.9723801016807556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 192 2.6148000732064247e-02</internalNodes>\n          <leafValues>\n            2.5991299748420715e-01 -1.2537480592727661e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 193 1.2845000252127647e-02</internalNodes>\n          <leafValues>\n            -5.7138597965240479e-01 5.9659498929977417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 194 2.6344999670982361e-02</internalNodes>\n          <leafValues>\n            -5.5203199386596680e-01 3.0217400193214417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 195 -1.5083000063896179e-02</internalNodes>\n          <leafValues>\n            -1.2871240377426147e+00 2.2354200482368469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 196 -3.8887001574039459e-02</internalNodes>\n          <leafValues>\n            1.7425049543380737e+00 -9.9747002124786377e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 197 -5.7029998861253262e-03</internalNodes>\n          <leafValues>\n            -1.0523240566253662e+00 1.8362599611282349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 198 -1.4860000228509307e-03</internalNodes>\n          <leafValues>\n            5.6784200668334961e-01 -4.6742001175880432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 199 -2.8486000373959541e-02</internalNodes>\n          <leafValues>\n            1.3082909584045410e+00 -2.6460900902748108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 200 6.6224999725818634e-02</internalNodes>\n          <leafValues>\n            -4.6210700273513794e-01 4.1749599575996399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 201 8.8569996878504753e-03</internalNodes>\n          <leafValues>\n            -4.1474899649620056e-01 5.9204798936843872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 202 1.1355999857187271e-02</internalNodes>\n          <leafValues>\n            3.6103099584579468e-01 -4.5781201124191284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 203 -2.7679998893290758e-03</internalNodes>\n          <leafValues>\n            -8.9238899946212769e-01 1.4199000597000122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 204 1.1246999725699425e-02</internalNodes>\n          <leafValues>\n            2.9353401064872742e-01 -9.7330600023269653e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 205 7.1970000863075256e-03</internalNodes>\n          <leafValues>\n            -7.9334902763366699e-01 1.8313400447368622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 206 3.1768999993801117e-02</internalNodes>\n          <leafValues>\n            1.5523099899291992e-01 -1.3245639801025391e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 207 2.5173999369144440e-02</internalNodes>\n          <leafValues>\n            3.4214999526739120e-02 -2.0948131084442139e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 208 7.5360001064836979e-03</internalNodes>\n          <leafValues>\n            -3.9450600743293762e-01 5.1333999633789062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 209 3.2873000949621201e-02</internalNodes>\n          <leafValues>\n            8.8372997939586639e-02 -1.2814120054244995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 210 -2.7379998937249184e-03</internalNodes>\n          <leafValues>\n            5.5286502838134766e-01 -4.6384999155998230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 211 -3.8075000047683716e-02</internalNodes>\n          <leafValues>\n            -1.8497270345687866e+00 4.5944001525640488e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 212 -3.8984000682830811e-02</internalNodes>\n          <leafValues>\n            -4.8223701119422913e-01 3.4760600328445435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 213 2.8029999230057001e-03</internalNodes>\n          <leafValues>\n            -4.5154699683189392e-01 4.2806300520896912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 214 -5.4145999252796173e-02</internalNodes>\n          <leafValues>\n            -8.4520798921585083e-01 1.6674900054931641e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 215 -8.3280000835657120e-03</internalNodes>\n          <leafValues>\n            3.5348299145698547e-01 -4.7163200378417969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 216 3.3778000622987747e-02</internalNodes>\n          <leafValues>\n            1.8463100492954254e-01 -1.6686669588088989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 217 -1.1238099634647369e-01</internalNodes>\n          <leafValues>\n            -1.2521569728851318e+00 3.5992000252008438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 218 -1.0408000089228153e-02</internalNodes>\n          <leafValues>\n            -8.1620401144027710e-01 2.3428599536418915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 219 -4.9439999274909496e-03</internalNodes>\n          <leafValues>\n            -9.2584699392318726e-01 1.0034800320863724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 220 -9.3029998242855072e-03</internalNodes>\n          <leafValues>\n            5.6499302387237549e-01 -1.8881900608539581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 221 -1.1749999597668648e-02</internalNodes>\n          <leafValues>\n            8.0302399396896362e-01 -3.8277000188827515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 222 -2.3217000067234039e-02</internalNodes>\n          <leafValues>\n            -8.4926998615264893e-01 1.9671200215816498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 223 1.6866000369191170e-02</internalNodes>\n          <leafValues>\n            -4.0591898560523987e-01 5.0695300102233887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 224 -2.4031000211834908e-02</internalNodes>\n          <leafValues>\n            -1.5297520160675049e+00 2.3344999551773071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 225 -3.6945998668670654e-02</internalNodes>\n          <leafValues>\n            6.3007700443267822e-01 -3.1780400872230530e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 226 -6.1563998460769653e-02</internalNodes>\n          <leafValues>\n            5.8627897500991821e-01 -1.2107999995350838e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 227 2.1661000326275826e-02</internalNodes>\n          <leafValues>\n            -2.5623700022697449e-01 1.0409849882125854e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 228 -3.6710000131279230e-03</internalNodes>\n          <leafValues>\n            2.9171100258827209e-01 -8.3287298679351807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 229 4.4849000871181488e-02</internalNodes>\n          <leafValues>\n            -3.9633199572563171e-01 4.5662000775337219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 230 5.7195000350475311e-02</internalNodes>\n          <leafValues>\n            2.1023899316787720e-01 -1.5004800558090210e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 231 -1.1342000216245651e-02</internalNodes>\n          <leafValues>\n            4.4071298837661743e-01 -3.8653799891471863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 232 -1.2004000134766102e-02</internalNodes>\n          <leafValues>\n            9.3954598903656006e-01 -1.0589499771595001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 233 2.2515999153256416e-02</internalNodes>\n          <leafValues>\n            9.4480002298951149e-03 -1.6799509525299072e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 234 -1.9809000194072723e-02</internalNodes>\n          <leafValues>\n            -1.0133639574050903e+00 2.4146600067615509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 235 1.5891000628471375e-02</internalNodes>\n          <leafValues>\n            -3.7507599592208862e-01 4.6614098548889160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 236 -9.1420002281665802e-03</internalNodes>\n          <leafValues>\n            -8.0484098196029663e-01 1.7816999554634094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 237 -4.4740000739693642e-03</internalNodes>\n          <leafValues>\n            -1.0562069416046143e+00 7.3305003345012665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 238 1.2742500007152557e-01</internalNodes>\n          <leafValues>\n            2.0165599882602692e-01 -1.5467929840087891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 239 4.7703001648187637e-02</internalNodes>\n          <leafValues>\n            -3.7937799096107483e-01 3.7885999679565430e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 240 5.3608000278472900e-02</internalNodes>\n          <leafValues>\n            2.1220499277114868e-01 -1.2399710416793823e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 241 -3.9680998772382736e-02</internalNodes>\n          <leafValues>\n            -1.0257550477981567e+00 5.1282998174428940e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 242 -6.7327000200748444e-02</internalNodes>\n          <leafValues>\n            -1.0304750204086304e+00 2.3005299270153046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 243 1.3337600231170654e-01</internalNodes>\n          <leafValues>\n            -2.0869000256061554e-01 1.2272510528564453e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 244 -2.0919300615787506e-01</internalNodes>\n          <leafValues>\n            8.7929898500442505e-01 -4.4254999607801437e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 245 -6.5589003264904022e-02</internalNodes>\n          <leafValues>\n            1.0443429946899414e+00 -2.1682099997997284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 246 6.1882998794317245e-02</internalNodes>\n          <leafValues>\n            1.3798199594020844e-01 -1.9009059667587280e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 247 -2.5578999891877174e-02</internalNodes>\n          <leafValues>\n            -1.6607600450515747e+00 5.8439997956156731e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 248 -3.4827001392841339e-02</internalNodes>\n          <leafValues>\n            7.9940402507781982e-01 -8.2406997680664062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 249 -1.8209999427199364e-02</internalNodes>\n          <leafValues>\n            -9.6073997020721436e-01 6.6320002079010010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 250 1.5070999972522259e-02</internalNodes>\n          <leafValues>\n            1.9899399578571320e-01 -7.6433002948760986e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>72</maxWeakCount>\n      <stageThreshold>-3.8832089900970459e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 251 4.6324998140335083e-02</internalNodes>\n          <leafValues>\n            -1.0362670421600342e+00 8.2201498746871948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 252 1.5406999737024307e-02</internalNodes>\n          <leafValues>\n            -1.2327589988708496e+00 2.9647698998451233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 253 1.2808999978005886e-02</internalNodes>\n          <leafValues>\n            -7.5852298736572266e-01 5.7985502481460571e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 254 4.9150999635457993e-02</internalNodes>\n          <leafValues>\n            -3.8983899354934692e-01 8.9680302143096924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 255 1.2621000409126282e-02</internalNodes>\n          <leafValues>\n            -7.1799302101135254e-01 5.0440901517868042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 256 -1.8768999725580215e-02</internalNodes>\n          <leafValues>\n            5.5147600173950195e-01 -7.0555400848388672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 257 4.1965000331401825e-02</internalNodes>\n          <leafValues>\n            -4.4782099127769470e-01 7.0985502004623413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 258 -5.1401998847723007e-02</internalNodes>\n          <leafValues>\n            -1.0932120084762573e+00 2.6701900362968445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 259 -7.0960998535156250e-02</internalNodes>\n          <leafValues>\n            8.3618402481079102e-01 -3.8318100571632385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 260 1.6745999455451965e-02</internalNodes>\n          <leafValues>\n            -2.5733101367950439e-01 2.5966501235961914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 261 -6.2400000169873238e-03</internalNodes>\n          <leafValues>\n            3.1631499528884888e-01 -5.8796900510787964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 262 -3.9397999644279480e-02</internalNodes>\n          <leafValues>\n            -1.0491210222244263e+00 1.6822400689125061e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 263 0.</internalNodes>\n          <leafValues>\n            1.6144199669361115e-01 -8.7876898050308228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 264 -2.2307999432086945e-02</internalNodes>\n          <leafValues>\n            -6.9053500890731812e-01 2.3607000708580017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 265 1.8919999711215496e-03</internalNodes>\n          <leafValues>\n            2.4989199638366699e-01 -5.6583297252655029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 266 1.0730000212788582e-03</internalNodes>\n          <leafValues>\n            -5.0415802001953125e-01 3.8374501466751099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 267 3.9230998605489731e-02</internalNodes>\n          <leafValues>\n            4.2619001120328903e-02 -1.3875889778137207e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 268 6.2238000333309174e-02</internalNodes>\n          <leafValues>\n            1.4119400084018707e-01 -1.0688860416412354e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 269 2.1399999968707561e-03</internalNodes>\n          <leafValues>\n            -8.9622402191162109e-01 1.9796399772167206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 270 9.1800000518560410e-04</internalNodes>\n          <leafValues>\n            -4.5337298512458801e-01 4.3532699346542358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 271 -6.9169998168945312e-03</internalNodes>\n          <leafValues>\n            3.3822798728942871e-01 -4.4793000817298889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 272 -2.3866999894380569e-02</internalNodes>\n          <leafValues>\n            -7.8908598423004150e-01 2.2511799633502960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 273 -1.0262800008058548e-01</internalNodes>\n          <leafValues>\n            -2.2831439971923828e+00 -5.3960001096129417e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 274 -9.5239998772740364e-03</internalNodes>\n          <leafValues>\n            3.9346700906753540e-01 -5.2242201566696167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 275 3.9877001196146011e-02</internalNodes>\n          <leafValues>\n            3.2799001783132553e-02 -1.5079489946365356e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 276 -1.3144999742507935e-02</internalNodes>\n          <leafValues>\n            -1.0839990377426147e+00 1.8482400476932526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 277 -5.0590999424457550e-02</internalNodes>\n          <leafValues>\n            -1.8822289705276489e+00 -2.2199999075382948e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 278 2.4917000904679298e-02</internalNodes>\n          <leafValues>\n            1.4593400061130524e-01 -2.2196519374847412e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 279 -7.6370001770555973e-03</internalNodes>\n          <leafValues>\n            -1.0164569616317749e+00 5.8797001838684082e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 280 4.2911998927593231e-02</internalNodes>\n          <leafValues>\n            1.5443000197410583e-01 -1.1843889951705933e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 281 2.3000000510364771e-04</internalNodes>\n          <leafValues>\n            -7.7305799722671509e-01 1.2189900130033493e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 282 9.0929996222257614e-03</internalNodes>\n          <leafValues>\n            -1.1450099945068359e-01 7.1091300249099731e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 283 1.1145000346004963e-02</internalNodes>\n          <leafValues>\n            7.0000998675823212e-02 -1.0534820556640625e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 284 -5.2453000098466873e-02</internalNodes>\n          <leafValues>\n            -1.7594360113143921e+00 1.9523799419403076e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 285 -2.3020699620246887e-01</internalNodes>\n          <leafValues>\n            9.5840299129486084e-01 -2.5045698881149292e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 286 -1.6365999355912209e-02</internalNodes>\n          <leafValues>\n            4.6731901168823242e-01 -2.1108399331569672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 287 -1.7208000645041466e-02</internalNodes>\n          <leafValues>\n            7.0835697650909424e-01 -2.8018298745155334e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 288 -3.6648001521825790e-02</internalNodes>\n          <leafValues>\n            -1.1013339757919312e+00 2.4341100454330444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 289 -1.0304999537765980e-02</internalNodes>\n          <leafValues>\n            -1.0933129787445068e+00 5.6258998811244965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 290 -1.3713000342249870e-02</internalNodes>\n          <leafValues>\n            -2.6438099145889282e-01 1.9821000099182129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 291 2.9308000579476357e-02</internalNodes>\n          <leafValues>\n            -2.2142399847507477e-01 1.0525950193405151e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 292 2.4077000096440315e-02</internalNodes>\n          <leafValues>\n            1.8485699594020844e-01 -1.7203969955444336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 293 6.1280000954866409e-03</internalNodes>\n          <leafValues>\n            -9.2721498012542725e-01 5.8752998709678650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 294 -2.2377999499440193e-02</internalNodes>\n          <leafValues>\n            1.9646559953689575e+00 2.7785999700427055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 295 -7.0440000854432583e-03</internalNodes>\n          <leafValues>\n            2.1427600085735321e-01 -4.8407599329948425e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 296 -4.0603000670671463e-02</internalNodes>\n          <leafValues>\n            -1.1754349470138550e+00 1.6061200201511383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 297 -2.4466000497341156e-02</internalNodes>\n          <leafValues>\n            -1.1239900588989258e+00 4.1110001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 298 2.5309999473392963e-03</internalNodes>\n          <leafValues>\n            -1.7169700562953949e-01 3.2178801298141479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 299 -1.9588999450206757e-02</internalNodes>\n          <leafValues>\n            8.2720202207565308e-01 -2.6376700401306152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 300 -2.9635999351739883e-02</internalNodes>\n          <leafValues>\n            -1.1524770259857178e+00 1.4999300241470337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 301 -1.5030000358819962e-02</internalNodes>\n          <leafValues>\n            -1.0491830110549927e+00 4.0160998702049255e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 302 -6.0715001076459885e-02</internalNodes>\n          <leafValues>\n            -1.0903840065002441e+00 1.5330800414085388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 303 -1.2790000066161156e-02</internalNodes>\n          <leafValues>\n            4.2248600721359253e-01 -4.2399200797080994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 304 -2.0247999578714371e-02</internalNodes>\n          <leafValues>\n            -9.1866999864578247e-01 1.8485699594020844e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 305 -3.0683999881148338e-02</internalNodes>\n          <leafValues>\n            -1.5958670377731323e+00 2.5760000571608543e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 306 -2.0718000829219818e-02</internalNodes>\n          <leafValues>\n            -6.6299998760223389e-01 3.1037199497222900e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 307 -1.7290000105276704e-03</internalNodes>\n          <leafValues>\n            1.9183400273323059e-01 -6.5084999799728394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 308 -3.1394001096487045e-02</internalNodes>\n          <leafValues>\n            -6.3643002510070801e-01 1.5408399701118469e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 309 1.9003000110387802e-02</internalNodes>\n          <leafValues>\n            -1.8919399380683899e-01 1.5294510126113892e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 310 6.1769997701048851e-03</internalNodes>\n          <leafValues>\n            -1.0597900301218033e-01 6.4859598875045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 311 -1.0165999643504620e-02</internalNodes>\n          <leafValues>\n            -1.0802700519561768e+00 3.7176001816987991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 312 -1.4169999631121755e-03</internalNodes>\n          <leafValues>\n            3.4157499670982361e-01 -9.7737997770309448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 313 -4.0799998678267002e-03</internalNodes>\n          <leafValues>\n            4.7624599933624268e-01 -3.4366300702095032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 314 -4.4096998870372772e-02</internalNodes>\n          <leafValues>\n            9.7634297609329224e-01 -1.9173000007867813e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 315 -6.0669999569654465e-02</internalNodes>\n          <leafValues>\n            -2.1752851009368896e+00 -2.8925999999046326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 316 -3.2931998372077942e-02</internalNodes>\n          <leafValues>\n            -6.4383101463317871e-01 1.6494099795818329e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 317 -1.4722800254821777e-01</internalNodes>\n          <leafValues>\n            -1.4745830297470093e+00 2.5839998852461576e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 318 -1.1930000036954880e-02</internalNodes>\n          <leafValues>\n            4.2441400885581970e-01 -1.7712600529193878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 319 1.4517900347709656e-01</internalNodes>\n          <leafValues>\n            2.5444999337196350e-02 -1.2779400348663330e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 320 5.1447998732328415e-02</internalNodes>\n          <leafValues>\n            1.5678399801254272e-01 -1.5188430547714233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 321 3.1479999888688326e-03</internalNodes>\n          <leafValues>\n            -4.0424400568008423e-01 3.2429701089859009e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 322 -4.3600000441074371e-02</internalNodes>\n          <leafValues>\n            -1.9932260513305664e+00 1.5018600225448608e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>83</maxWeakCount>\n      <stageThreshold>-3.8424909114837646e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 323 1.2899599969387054e-01</internalNodes>\n          <leafValues>\n            -6.2161999940872192e-01 1.1116520166397095e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 324 -9.1261997818946838e-02</internalNodes>\n          <leafValues>\n            1.0143059492111206e+00 -6.1335200071334839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 325 1.4271999709308147e-02</internalNodes>\n          <leafValues>\n            -1.0261659622192383e+00 3.9779999852180481e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 326 3.2889999449253082e-02</internalNodes>\n          <leafValues>\n            -1.1386079788208008e+00 2.8690800070762634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 327 1.2590000405907631e-02</internalNodes>\n          <leafValues>\n            -5.6645601987838745e-01 4.5172399282455444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 328 1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            3.0505999922752380e-01 -6.8129599094390869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 329 -3.3555999398231506e-02</internalNodes>\n          <leafValues>\n            -1.7208939790725708e+00 6.1439000070095062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 330 1.4252699911594391e-01</internalNodes>\n          <leafValues>\n            2.3192200064659119e-01 -1.7297149896621704e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 331 -6.2079997733235359e-03</internalNodes>\n          <leafValues>\n            -1.2163300514221191e+00 1.2160199880599976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 332 1.8178999423980713e-02</internalNodes>\n          <leafValues>\n            3.2553699612617493e-01 -8.1003999710083008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 333 2.5036999955773354e-02</internalNodes>\n          <leafValues>\n            -3.1698799133300781e-01 6.7361402511596680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 334 4.6560999006032944e-02</internalNodes>\n          <leafValues>\n            -1.1089800298213959e-01 8.4082502126693726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 335 -8.9999996125698090e-03</internalNodes>\n          <leafValues>\n            3.9574500918388367e-01 -4.7624599933624268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 336 4.0805999189615250e-02</internalNodes>\n          <leafValues>\n            -1.8000000272877514e-04 9.4570702314376831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 337 -3.4221999347209930e-02</internalNodes>\n          <leafValues>\n            7.5206297636032104e-01 -3.1531500816345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 338 -3.9716001600027084e-02</internalNodes>\n          <leafValues>\n            -8.3139598369598389e-01 1.7744399607181549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 339 2.5170000735670328e-03</internalNodes>\n          <leafValues>\n            -5.9377998113632202e-01 2.4657000601291656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 340 2.7428999543190002e-02</internalNodes>\n          <leafValues>\n            1.5998399257659912e-01 -4.2781999707221985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 341 3.4986000508069992e-02</internalNodes>\n          <leafValues>\n            3.5055998712778091e-02 -1.5988600254058838e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 342 4.4970000162720680e-03</internalNodes>\n          <leafValues>\n            -5.2034300565719604e-01 3.7828299403190613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 343 2.7699999045580626e-03</internalNodes>\n          <leafValues>\n            -5.3182601928710938e-01 2.4951000511646271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 344 3.5174001008272171e-02</internalNodes>\n          <leafValues>\n            1.9983400404453278e-01 -1.4446129798889160e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 345 2.5970999151468277e-02</internalNodes>\n          <leafValues>\n            4.4426999986171722e-02 -1.3622980117797852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 346 -1.5783999115228653e-02</internalNodes>\n          <leafValues>\n            -9.1020399332046509e-01 2.7190300822257996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 347 -7.5880000367760658e-03</internalNodes>\n          <leafValues>\n            9.2064999043941498e-02 -8.1628900766372681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 348 2.0754000172019005e-02</internalNodes>\n          <leafValues>\n            2.1185700595378876e-01 -7.4729001522064209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 349 5.9829000383615494e-02</internalNodes>\n          <leafValues>\n            -2.7301099896430969e-01 8.0923300981521606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 350 3.9039000868797302e-02</internalNodes>\n          <leafValues>\n            -1.0432299971580505e-01 8.6226201057434082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 351 2.1665999665856361e-02</internalNodes>\n          <leafValues>\n            6.2709003686904907e-02 -9.8894298076629639e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 352 -2.7496999129652977e-02</internalNodes>\n          <leafValues>\n            -9.2690998315811157e-01 1.5586300194263458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 353 1.0462000034749508e-02</internalNodes>\n          <leafValues>\n            1.3418099284172058e-01 -7.0386397838592529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 354 2.4870999157428741e-02</internalNodes>\n          <leafValues>\n            1.9706700742244720e-01 -4.0263301134109497e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 355 -1.6036000102758408e-02</internalNodes>\n          <leafValues>\n            -1.1409829854965210e+00 7.3997996747493744e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 356 4.8627000302076340e-02</internalNodes>\n          <leafValues>\n            1.6990399360656738e-01 -7.2152197360992432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 357 1.2619999470189214e-03</internalNodes>\n          <leafValues>\n            -4.7389799356460571e-01 2.6254999637603760e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 358 -8.8035002350807190e-02</internalNodes>\n          <leafValues>\n            -2.1606519222259521e+00 1.4554800093173981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 359 1.8356999382376671e-02</internalNodes>\n          <leafValues>\n            4.4750999659299850e-02 -1.0766370296478271e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 360 3.5275001078844070e-02</internalNodes>\n          <leafValues>\n            -3.2919000834226608e-02 1.2153890132904053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 361 -2.0392900705337524e-01</internalNodes>\n          <leafValues>\n            -1.3187999725341797e+00 1.5503999777138233e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 362 -1.6619000583887100e-02</internalNodes>\n          <leafValues>\n            3.6850199103355408e-01 -1.5283699333667755e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 363 3.7739001214504242e-02</internalNodes>\n          <leafValues>\n            -2.5727799534797668e-01 7.0655298233032227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 364 2.2720000706613064e-03</internalNodes>\n          <leafValues>\n            -7.7602997422218323e-02 3.3367800712585449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 365 -1.4802999794483185e-02</internalNodes>\n          <leafValues>\n            -7.8524798154830933e-01 7.6934002339839935e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 366 -4.8319000750780106e-02</internalNodes>\n          <leafValues>\n            1.7022320032119751e+00 4.9722000956535339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 367 -2.9539000242948532e-02</internalNodes>\n          <leafValues>\n            7.7670699357986450e-01 -2.4534299969673157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 368 -4.6169001609086990e-02</internalNodes>\n          <leafValues>\n            -1.4922779798507690e+00 1.2340000271797180e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 369 -2.8064999729394913e-02</internalNodes>\n          <leafValues>\n            -2.1345369815826416e+00 -2.5797000154852867e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 370 -5.7339998893439770e-03</internalNodes>\n          <leafValues>\n            5.6982600688934326e-01 -1.2056600302457809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 371 -1.0111000388860703e-02</internalNodes>\n          <leafValues>\n            6.7911398410797119e-01 -2.6638001203536987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 372 1.1359999887645245e-02</internalNodes>\n          <leafValues>\n            2.4789799749851227e-01 -6.4493000507354736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 373 5.1809001713991165e-02</internalNodes>\n          <leafValues>\n            1.4716000296175480e-02 -1.2395579814910889e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 374 3.3291999250650406e-02</internalNodes>\n          <leafValues>\n            -8.2559995353221893e-03 1.0168470144271851e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 375 -1.4494000002741814e-02</internalNodes>\n          <leafValues>\n            4.5066800713539124e-01 -3.6250999569892883e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 376 -3.4221999347209930e-02</internalNodes>\n          <leafValues>\n            -9.5292502641677856e-01 2.0684599876403809e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 377 -8.0654002726078033e-02</internalNodes>\n          <leafValues>\n            -2.0139501094818115e+00 -2.3084999993443489e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 378 -8.9399999706074595e-04</internalNodes>\n          <leafValues>\n            3.9572000503540039e-01 -2.9351300001144409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 379 9.7162000834941864e-02</internalNodes>\n          <leafValues>\n            -2.4980300664901733e-01 1.0859220027923584e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 380 3.6614000797271729e-02</internalNodes>\n          <leafValues>\n            -5.7844001799821854e-02 1.2162159681320190e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 381 5.1693998277187347e-02</internalNodes>\n          <leafValues>\n            4.3062999844551086e-02 -1.0636160373687744e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 382 -2.4557000026106834e-02</internalNodes>\n          <leafValues>\n            -4.8946800827980042e-01 1.7182900011539459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 383 3.2736799120903015e-01</internalNodes>\n          <leafValues>\n            -2.9688599705696106e-01 5.1798301935195923e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 384 7.6959999278187752e-03</internalNodes>\n          <leafValues>\n            -5.9805899858474731e-01 2.4803200364112854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 385 1.6172200441360474e-01</internalNodes>\n          <leafValues>\n            -2.9613999649882317e-02 -2.3162529468536377e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 386 -4.7889999113976955e-03</internalNodes>\n          <leafValues>\n            3.7457901239395142e-01 -3.2779198884963989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 387 -1.8402999266982079e-02</internalNodes>\n          <leafValues>\n            -9.9692702293395996e-01 7.2948001325130463e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 388 7.7665001153945923e-02</internalNodes>\n          <leafValues>\n            1.4175699651241302e-01 -1.7238730192184448e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 389 1.8921000882983208e-02</internalNodes>\n          <leafValues>\n            -2.1273100376129150e-01 1.0165189504623413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 390 -7.9397998750209808e-02</internalNodes>\n          <leafValues>\n            -1.3164349794387817e+00 1.4981999993324280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 391 -6.8037003278732300e-02</internalNodes>\n          <leafValues>\n            4.9421998858451843e-01 -2.9091000556945801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 392 -6.1010001227259636e-03</internalNodes>\n          <leafValues>\n            4.2430499196052551e-01 -3.3899301290512085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 393 3.1927000731229782e-02</internalNodes>\n          <leafValues>\n            -3.1046999618411064e-02 -2.3459999561309814e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 394 -2.9843999072909355e-02</internalNodes>\n          <leafValues>\n            -7.8989601135253906e-01 1.5417699515819550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 395 -8.0541998147964478e-02</internalNodes>\n          <leafValues>\n            -2.2509229183197021e+00 -3.0906999483704567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 396 3.8109999150037766e-03</internalNodes>\n          <leafValues>\n            -2.5577300786972046e-01 2.3785500228404999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 397 3.3647000789642334e-02</internalNodes>\n          <leafValues>\n            -2.2541399300098419e-01 9.2307400703430176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 398 8.2809999585151672e-03</internalNodes>\n          <leafValues>\n            -2.8896200656890869e-01 3.1046199798583984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 399 1.0104399919509888e-01</internalNodes>\n          <leafValues>\n            -3.4864000976085663e-02 -2.7102620601654053e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 400 -1.0009000077843666e-02</internalNodes>\n          <leafValues>\n            5.9715402126312256e-01 -3.3831000328063965e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 401 7.1919998154044151e-03</internalNodes>\n          <leafValues>\n            -4.7738000750541687e-01 2.2686000168323517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 402 2.4969000369310379e-02</internalNodes>\n          <leafValues>\n            2.2877700626850128e-01 -1.0435529947280884e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 403 2.7908000349998474e-01</internalNodes>\n          <leafValues>\n            -2.5818100571632385e-01 7.6780498027801514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 404 -4.4213000684976578e-02</internalNodes>\n          <leafValues>\n            -5.9798002243041992e-01 2.8039899468421936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 405 -1.4136999845504761e-02</internalNodes>\n          <leafValues>\n            7.0987302064895630e-01 -2.5645199418067932e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>91</maxWeakCount>\n      <stageThreshold>-3.6478610038757324e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 406 1.3771200180053711e-01</internalNodes>\n          <leafValues>\n            -5.5870598554611206e-01 1.0953769683837891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 407 3.4460999071598053e-02</internalNodes>\n          <leafValues>\n            -7.1171897649765015e-01 5.2899599075317383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 408 1.8580000847578049e-02</internalNodes>\n          <leafValues>\n            -1.1157519817352295e+00 4.0593999624252319e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 409 2.5041999295353889e-02</internalNodes>\n          <leafValues>\n            -4.0892499685287476e-01 7.4129998683929443e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 410 5.7179000228643417e-02</internalNodes>\n          <leafValues>\n            -3.8054299354553223e-01 7.3647701740264893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 411 1.4932000078260899e-02</internalNodes>\n          <leafValues>\n            -6.9945502281188965e-01 3.7950998544692993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 412 8.8900001719594002e-03</internalNodes>\n          <leafValues>\n            -5.4558598995208740e-01 3.6332499980926514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 413 3.0435999855399132e-02</internalNodes>\n          <leafValues>\n            -1.0124599933624268e-01 7.9585897922515869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 414 -4.4160000979900360e-02</internalNodes>\n          <leafValues>\n            8.4410899877548218e-01 -3.2976400852203369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 415 1.8461000174283981e-02</internalNodes>\n          <leafValues>\n            2.6326599717140198e-01 -9.6736502647399902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 416 1.0614999569952488e-02</internalNodes>\n          <leafValues>\n            1.5251900255680084e-01 -1.0589870214462280e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 417 -4.5974001288414001e-02</internalNodes>\n          <leafValues>\n            -1.9918340444564819e+00 1.3629099726676941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 418 8.2900002598762512e-02</internalNodes>\n          <leafValues>\n            -3.2037198543548584e-01 6.0304200649261475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 419 -8.9130001142621040e-03</internalNodes>\n          <leafValues>\n            5.9586602449417114e-01 -2.1139599382877350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 420 4.2814001441001892e-02</internalNodes>\n          <leafValues>\n            2.2925000637769699e-02 -1.4679330587387085e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 421 -8.7139997631311417e-03</internalNodes>\n          <leafValues>\n            -4.3989500403404236e-01 2.0439699292182922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 422 -4.3390002101659775e-03</internalNodes>\n          <leafValues>\n            -8.9066797494888306e-01 1.0469999909400940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 423 8.0749997869133949e-03</internalNodes>\n          <leafValues>\n            2.1164199709892273e-01 -4.0231600403785706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 424 9.6739001572132111e-02</internalNodes>\n          <leafValues>\n            1.3319999910891056e-02 -1.6085360050201416e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 425 -3.0536999925971031e-02</internalNodes>\n          <leafValues>\n            1.0063740015029907e+00 -1.3413299620151520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 426 -6.0855999588966370e-02</internalNodes>\n          <leafValues>\n            -1.4689979553222656e+00 9.4240000471472740e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 427 -3.8162000477313995e-02</internalNodes>\n          <leafValues>\n            -8.1636399030685425e-01 2.6171201467514038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 428 -9.6960002556443214e-03</internalNodes>\n          <leafValues>\n            1.1561699956655502e-01 -7.1693199872970581e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 429 4.8902999609708786e-02</internalNodes>\n          <leafValues>\n            1.3050499558448792e-01 -1.6448370218276978e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 430 -4.1611999273300171e-02</internalNodes>\n          <leafValues>\n            -1.1795840263366699e+00 2.5017000734806061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 431 -2.0188000053167343e-02</internalNodes>\n          <leafValues>\n            6.3188201189041138e-01 -1.0490400344133377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 432 -9.7900000400841236e-04</internalNodes>\n          <leafValues>\n            1.8507799506187439e-01 -5.3565901517868042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 433 -3.3622000366449356e-02</internalNodes>\n          <leafValues>\n            -9.3127602338790894e-01 2.0071500539779663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 434 1.9455999135971069e-02</internalNodes>\n          <leafValues>\n            3.8029000163078308e-02 -1.0112210512161255e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 435 -3.1800000579096377e-04</internalNodes>\n          <leafValues>\n            3.6457699537277222e-01 -2.7610900998115540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 436 -3.8899999344721437e-04</internalNodes>\n          <leafValues>\n            1.9665899872779846e-01 -5.3410500288009644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 437 -9.3496002256870270e-02</internalNodes>\n          <leafValues>\n            -1.6772350072860718e+00 2.0727099478244781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 438 -7.7877998352050781e-02</internalNodes>\n          <leafValues>\n            -3.0760629177093506e+00 -3.5803999751806259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 439 1.6947999596595764e-02</internalNodes>\n          <leafValues>\n            2.1447399258613586e-01 -7.1376299858093262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 440 -2.1459000185132027e-02</internalNodes>\n          <leafValues>\n            -1.1468060016632080e+00 1.5855999663472176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 441 -1.2865999713540077e-02</internalNodes>\n          <leafValues>\n            8.3812397718429565e-01 -6.5944001078605652e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 442 7.8220004215836525e-03</internalNodes>\n          <leafValues>\n            -2.8026801347732544e-01 7.9376900196075439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 443 1.0294400155544281e-01</internalNodes>\n          <leafValues>\n            1.7832300066947937e-01 -6.8412202596664429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 444 -3.7487998604774475e-02</internalNodes>\n          <leafValues>\n            9.6189999580383301e-01 -2.1735599637031555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 445 2.5505999103188515e-02</internalNodes>\n          <leafValues>\n            1.0103999637067318e-02 1.2461110353469849e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 446 6.6700001480057836e-04</internalNodes>\n          <leafValues>\n            -5.3488200902938843e-01 1.4746299386024475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 447 -2.8867900371551514e-01</internalNodes>\n          <leafValues>\n            8.2172799110412598e-01 -1.4948000200092793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 448 9.1294996440410614e-02</internalNodes>\n          <leafValues>\n            -1.9605399668216705e-01 1.0803170204162598e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 449 1.2056600302457809e-01</internalNodes>\n          <leafValues>\n            -2.3848999291658401e-02 1.1392610073089600e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 450 -7.3775000870227814e-02</internalNodes>\n          <leafValues>\n            -1.3583840131759644e+00 -4.2039998807013035e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 451 -3.3128000795841217e-02</internalNodes>\n          <leafValues>\n            -6.4483201503753662e-01 2.4142199754714966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 452 -4.3937001377344131e-02</internalNodes>\n          <leafValues>\n            8.4285402297973633e-01 -2.0624800026416779e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 453 1.8110199272632599e-01</internalNodes>\n          <leafValues>\n            1.9212099909782410e-01 -1.2222139835357666e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 454 -1.1850999668240547e-02</internalNodes>\n          <leafValues>\n            -7.2677397727966309e-01 5.2687998861074448e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 455 4.5920000411570072e-03</internalNodes>\n          <leafValues>\n            -3.6305201053619385e-01 2.9223799705505371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 456 7.0620002225041389e-03</internalNodes>\n          <leafValues>\n            5.8116000145673752e-02 -6.7161601781845093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 457 -2.3715000599622726e-02</internalNodes>\n          <leafValues>\n            4.7142100334167480e-01 1.8580000847578049e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 458 -6.7171998322010040e-02</internalNodes>\n          <leafValues>\n            -1.1331889629364014e+00 2.3780999705195427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 459 -6.5310001373291016e-02</internalNodes>\n          <leafValues>\n            9.8253500461578369e-01 2.8362000361084938e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 460 2.2791000083088875e-02</internalNodes>\n          <leafValues>\n            -2.8213700652122498e-01 5.8993399143218994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 461 -1.9037999212741852e-02</internalNodes>\n          <leafValues>\n            -6.3711500167846680e-01 2.6514598727226257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 462 -6.8689999170601368e-03</internalNodes>\n          <leafValues>\n            3.7487301230430603e-01 -3.3232098817825317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 463 -4.0146000683307648e-02</internalNodes>\n          <leafValues>\n            -1.3048729896545410e+00 1.5724299848079681e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 464 -4.0530998259782791e-02</internalNodes>\n          <leafValues>\n            -2.0458049774169922e+00 -2.6925999671220779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 465 -1.2253999710083008e-02</internalNodes>\n          <leafValues>\n            7.7649402618408203e-01 -4.2971000075340271e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 466 -2.7219999581575394e-02</internalNodes>\n          <leafValues>\n            1.7424400150775909e-01 -4.4600901007652283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 467 -8.8366001844406128e-02</internalNodes>\n          <leafValues>\n            -1.5036419630050659e+00 1.4289900660514832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 468 -7.9159997403621674e-03</internalNodes>\n          <leafValues>\n            2.8666698932647705e-01 -3.7923699617385864e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 469 -4.1960000991821289e-02</internalNodes>\n          <leafValues>\n            1.3846950531005859e+00 6.5026998519897461e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 470 4.5662999153137207e-02</internalNodes>\n          <leafValues>\n            -2.2452299296855927e-01 7.9521000385284424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 471 -1.4090600609779358e-01</internalNodes>\n          <leafValues>\n            -1.5879319906234741e+00 1.1359000205993652e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 472 -5.9216000139713287e-02</internalNodes>\n          <leafValues>\n            -1.1945960521697998e+00 -7.1640000678598881e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 473 4.3390002101659775e-03</internalNodes>\n          <leafValues>\n            -1.5528699755668640e-01 4.0664499998092651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 474 -2.0369999110698700e-03</internalNodes>\n          <leafValues>\n            2.5927901268005371e-01 -3.8368299603462219e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 475 2.7516499161720276e-01</internalNodes>\n          <leafValues>\n            -8.8497996330261230e-02 7.6787501573562622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 476 -2.6601999998092651e-02</internalNodes>\n          <leafValues>\n            7.5024497509002686e-01 -2.2621999680995941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 477 4.0906000882387161e-02</internalNodes>\n          <leafValues>\n            1.2158600240945816e-01 -1.4566910266876221e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 478 5.5320002138614655e-03</internalNodes>\n          <leafValues>\n            -3.6611500382423401e-01 2.5968599319458008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 479 3.1879000365734100e-02</internalNodes>\n          <leafValues>\n            -7.5019001960754395e-02 4.8484799265861511e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 480 -4.1482001543045044e-02</internalNodes>\n          <leafValues>\n            7.8220397233963013e-01 -2.1992200613021851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 481 -9.6130996942520142e-02</internalNodes>\n          <leafValues>\n            -8.9456301927566528e-01 1.4680700004100800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 482 -1.1568999849259853e-02</internalNodes>\n          <leafValues>\n            8.2714098691940308e-01 -2.0275600254535675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 483 1.8312999978661537e-02</internalNodes>\n          <leafValues>\n            1.6367999836802483e-02 2.7306801080703735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 484 -3.4166000783443451e-02</internalNodes>\n          <leafValues>\n            1.1307320594787598e+00 -1.8810899555683136e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 485 -2.4476999416947365e-02</internalNodes>\n          <leafValues>\n            -5.7791298627853394e-01 1.5812499821186066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 486 4.8957001417875290e-02</internalNodes>\n          <leafValues>\n            -2.2564999759197235e-02 -1.6373280286788940e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 487 -2.0702999085187912e-02</internalNodes>\n          <leafValues>\n            -5.4512101411819458e-01 2.4086999893188477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 488 -2.3002000525593758e-02</internalNodes>\n          <leafValues>\n            -1.2236540317535400e+00 -7.3440000414848328e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 489 6.4585000276565552e-02</internalNodes>\n          <leafValues>\n            1.4695599675178528e-01 -4.4967499375343323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 490 1.2666000053286552e-02</internalNodes>\n          <leafValues>\n            -2.7873900532722473e-01 4.3876600265502930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 491 -1.2002999894320965e-02</internalNodes>\n          <leafValues>\n            -2.4289099872112274e-01 2.5350099802017212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 492 -2.6443999260663986e-02</internalNodes>\n          <leafValues>\n            -8.5864800214767456e-01 2.6025999337434769e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 493 -2.5547999888658524e-02</internalNodes>\n          <leafValues>\n            6.9287902116775513e-01 -2.1160000469535589e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 494 3.9115000516176224e-02</internalNodes>\n          <leafValues>\n            -1.6589100658893585e-01 1.5209139585494995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 495 -6.0330000706017017e-03</internalNodes>\n          <leafValues>\n            4.3856900930404663e-01 -2.1613700687885284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 496 -3.3936999738216400e-02</internalNodes>\n          <leafValues>\n            -9.7998398542404175e-01 2.2133000195026398e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>99</maxWeakCount>\n      <stageThreshold>-3.8700489997863770e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 497 4.0672998875379562e-02</internalNodes>\n          <leafValues>\n            -9.0474700927734375e-01 6.4410597085952759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 498 2.5609999895095825e-02</internalNodes>\n          <leafValues>\n            -7.9216998815536499e-01 5.7489997148513794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 499 1.9959500432014465e-01</internalNodes>\n          <leafValues>\n            -3.0099600553512573e-01 1.3143850564956665e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 500 1.2404999695718288e-02</internalNodes>\n          <leafValues>\n            -8.9882999658584595e-01 2.9205799102783203e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 501 3.9207998663187027e-02</internalNodes>\n          <leafValues>\n            -4.1955199837684631e-01 5.3463298082351685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 502 -3.0843999236822128e-02</internalNodes>\n          <leafValues>\n            4.5793399214744568e-01 -4.4629099965095520e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 503 -3.5523001104593277e-02</internalNodes>\n          <leafValues>\n            9.1310501098632812e-01 -2.7373200654983521e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 504 -6.1650000512599945e-02</internalNodes>\n          <leafValues>\n            -1.4697799682617188e+00 2.0364099740982056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 505 -1.1739999987185001e-02</internalNodes>\n          <leafValues>\n            -1.0482879877090454e+00 6.7801997065544128e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 506 6.6933996975421906e-02</internalNodes>\n          <leafValues>\n            2.9274499416351318e-01 -5.2282899618148804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 507 -2.0631000399589539e-02</internalNodes>\n          <leafValues>\n            -1.2855139970779419e+00 4.4550999999046326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 508 -2.2357000038027763e-02</internalNodes>\n          <leafValues>\n            -8.5753798484802246e-01 1.8434000015258789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 509 1.1500000255182385e-03</internalNodes>\n          <leafValues>\n            1.6405500471591949e-01 -6.9125002622604370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 510 3.5872999578714371e-02</internalNodes>\n          <leafValues>\n            1.5756499767303467e-01 -8.4262597560882568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 511 3.0659999698400497e-02</internalNodes>\n          <leafValues>\n            2.1637000143527985e-02 -1.3634690046310425e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 512 5.5559999309480190e-03</internalNodes>\n          <leafValues>\n            -1.6737000644207001e-01 2.5888401269912720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 513 -6.1160000041127205e-03</internalNodes>\n          <leafValues>\n            -9.7271800041198730e-01 6.6100001335144043e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 514 -3.0316999182105064e-02</internalNodes>\n          <leafValues>\n            9.8474198579788208e-01 -1.6448000445961952e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 515 -9.7200004383921623e-03</internalNodes>\n          <leafValues>\n            4.7604700922966003e-01 -3.2516700029373169e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 516 -5.7126998901367188e-02</internalNodes>\n          <leafValues>\n            -9.5920699834823608e-01 1.9938200712203979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 517 4.0059997700154781e-03</internalNodes>\n          <leafValues>\n            -5.2612501382827759e-01 2.2428700327873230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 518 3.3734001219272614e-02</internalNodes>\n          <leafValues>\n            1.7070099711418152e-01 -1.0737580060958862e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 519 -3.4641999751329422e-02</internalNodes>\n          <leafValues>\n            -1.1343129873275757e+00 3.6540001630783081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 520 4.6923000365495682e-02</internalNodes>\n          <leafValues>\n            2.5832301378250122e-01 -7.1535801887512207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 521 -8.7660001590847969e-03</internalNodes>\n          <leafValues>\n            1.9640900194644928e-01 -5.3355097770690918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 522 6.5627999603748322e-02</internalNodes>\n          <leafValues>\n            -5.1194999366998672e-02 9.7610700130462646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 523 -4.4165000319480896e-02</internalNodes>\n          <leafValues>\n            1.0631920099258423e+00 -2.3462599515914917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 524 1.7304999753832817e-02</internalNodes>\n          <leafValues>\n            -1.8582899868488312e-01 4.5889899134635925e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 525 3.3135998994112015e-02</internalNodes>\n          <leafValues>\n            -2.9381999745965004e-02 -2.6651329994201660e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 526 -2.1029999479651451e-02</internalNodes>\n          <leafValues>\n            9.9979901313781738e-01 2.4937000125646591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 527 2.9783999547362328e-02</internalNodes>\n          <leafValues>\n            -2.9605999588966370e-02 -2.1695868968963623e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 528 5.5291999131441116e-02</internalNodes>\n          <leafValues>\n            -7.5599999399855733e-04 7.4651998281478882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 529 -3.3597998321056366e-02</internalNodes>\n          <leafValues>\n            -1.5274159908294678e+00 1.1060000397264957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 530 1.9602999091148376e-02</internalNodes>\n          <leafValues>\n            3.3574998378753662e-02 9.9526202678680420e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 531 -2.0787000656127930e-02</internalNodes>\n          <leafValues>\n            7.6612901687622070e-01 -2.4670800566673279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 532 3.2536000013351440e-02</internalNodes>\n          <leafValues>\n            1.6263400018215179e-01 -6.1134302616119385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 533 -1.0788000188767910e-02</internalNodes>\n          <leafValues>\n            -9.7839701175689697e-01 2.8969999402761459e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 534 -9.9560003727674484e-03</internalNodes>\n          <leafValues>\n            4.6145799756050110e-01 -1.3510499894618988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 535 -3.7489999085664749e-03</internalNodes>\n          <leafValues>\n            2.5458198785781860e-01 -5.1955598592758179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 536 -4.1779998689889908e-02</internalNodes>\n          <leafValues>\n            -8.0565100908279419e-01 1.5208500623703003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 537 -3.4221000969409943e-02</internalNodes>\n          <leafValues>\n            -1.3137799501419067e+00 -3.5800000187009573e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 538 1.0130000300705433e-02</internalNodes>\n          <leafValues>\n            2.0175799727439880e-01 -6.1339598894119263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 539 -8.9849002659320831e-02</internalNodes>\n          <leafValues>\n            9.7632801532745361e-01 -2.0884799957275391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 540 2.6097999885678291e-02</internalNodes>\n          <leafValues>\n            -1.8807999789714813e-01 4.7705799341201782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 541 -3.7539999466389418e-03</internalNodes>\n          <leafValues>\n            -6.7980402708053589e-01 1.1288800090551376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 542 3.1973000615835190e-02</internalNodes>\n          <leafValues>\n            1.8951700627803802e-01 -1.4967479705810547e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 543 1.9332999363541603e-02</internalNodes>\n          <leafValues>\n            -2.3609900474548340e-01 8.1320500373840332e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 544 1.9490000559017062e-03</internalNodes>\n          <leafValues>\n            2.4830399453639984e-01 -6.9211997091770172e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 545 -4.4146999716758728e-02</internalNodes>\n          <leafValues>\n            -1.0418920516967773e+00 4.8053000122308731e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 546 -4.4681999832391739e-02</internalNodes>\n          <leafValues>\n            5.1346302032470703e-01 -7.3799998499453068e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 547 -1.0757499933242798e-01</internalNodes>\n          <leafValues>\n            1.6202019453048706e+00 -1.8667599558830261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 548 -1.2846800684928894e-01</internalNodes>\n          <leafValues>\n            2.9869480133056641e+00 9.5427997410297394e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 549 -4.4757999479770660e-02</internalNodes>\n          <leafValues>\n            6.0405302047729492e-01 -2.7058699727058411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 550 -4.3990999460220337e-02</internalNodes>\n          <leafValues>\n            -6.1790502071380615e-01 1.5997199714183807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 551 -1.2268999963998795e-01</internalNodes>\n          <leafValues>\n            6.6327202320098877e-01 -2.3636999726295471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 552 -1.9982999190688133e-02</internalNodes>\n          <leafValues>\n            -1.1228660345077515e+00 1.9616700708866119e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 553 -1.5527999959886074e-02</internalNodes>\n          <leafValues>\n            -1.0770269632339478e+00 2.0693000406026840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 554 -4.8971001058816910e-02</internalNodes>\n          <leafValues>\n            8.1168299913406372e-01 -1.7252000048756599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 555 5.5975999683141708e-02</internalNodes>\n          <leafValues>\n            -2.2529000416398048e-02 -1.7356760501861572e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 556 -9.8580000922083855e-03</internalNodes>\n          <leafValues>\n            6.7881399393081665e-01 -5.8180000633001328e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 557 1.3481000438332558e-02</internalNodes>\n          <leafValues>\n            5.7847999036312103e-02 -7.7255302667617798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 558 6.5609999001026154e-03</internalNodes>\n          <leafValues>\n            -1.3146899640560150e-01 6.7055797576904297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 559 7.1149999275803566e-03</internalNodes>\n          <leafValues>\n            -3.7880599498748779e-01 3.0978998541831970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 560 4.8159998841583729e-03</internalNodes>\n          <leafValues>\n            -5.8470398187637329e-01 2.5602099299430847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 561 9.5319999381899834e-03</internalNodes>\n          <leafValues>\n            -3.0217000842094421e-01 4.1253298521041870e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 562 -2.7474999427795410e-02</internalNodes>\n          <leafValues>\n            5.9154701232910156e-01 1.7963999882340431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 563 -3.9519999176263809e-02</internalNodes>\n          <leafValues>\n            9.6913498640060425e-01 -2.1020300686359406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 564 -3.0658999457955360e-02</internalNodes>\n          <leafValues>\n            9.1155898571014404e-01 4.0550000965595245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 565 -1.4680000022053719e-03</internalNodes>\n          <leafValues>\n            -6.0489797592163086e-01 1.6960899531841278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 566 1.9077600538730621e-01</internalNodes>\n          <leafValues>\n            4.3515000492334366e-02 8.1892901659011841e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 567 5.1790000870823860e-03</internalNodes>\n          <leafValues>\n            -9.3617302179336548e-01 2.4937000125646591e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 568 2.4126000702381134e-02</internalNodes>\n          <leafValues>\n            1.8175500631332397e-01 -3.4185901284217834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 569 -2.6383999735116959e-02</internalNodes>\n          <leafValues>\n            -1.2912579774856567e+00 -3.4280000254511833e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 570 5.4139997810125351e-03</internalNodes>\n          <leafValues>\n            -4.6291999518871307e-02 2.5269600749015808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 571 5.4216001182794571e-02</internalNodes>\n          <leafValues>\n            -1.2848000042140484e-02 -1.4304540157318115e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 572 2.3799999326001853e-04</internalNodes>\n          <leafValues>\n            -2.6676699519157410e-01 3.3588299155235291e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 573 1.5216999687254429e-02</internalNodes>\n          <leafValues>\n            -5.1367300748825073e-01 1.3005100190639496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 574 1.7007999122142792e-02</internalNodes>\n          <leafValues>\n            4.1575899720191956e-01 -3.1241199374198914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 575 3.0496999621391296e-02</internalNodes>\n          <leafValues>\n            -2.4820999801158905e-01 7.0828497409820557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 576 6.5430002287030220e-03</internalNodes>\n          <leafValues>\n            -2.2637000679969788e-01 1.9184599816799164e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 577 1.4163999259471893e-01</internalNodes>\n          <leafValues>\n            6.5227001905441284e-02 -8.8809502124786377e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 578 1.9338000565767288e-02</internalNodes>\n          <leafValues>\n            1.8891200423240662e-01 -2.7397701144218445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 579 -1.7324000597000122e-02</internalNodes>\n          <leafValues>\n            -9.4866698980331421e-01 2.4196999147534370e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 580 -6.2069999985396862e-03</internalNodes>\n          <leafValues>\n            3.6938399076461792e-01 -1.7494900524616241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 581 -1.6109000891447067e-02</internalNodes>\n          <leafValues>\n            9.6159499883651733e-01 -2.0005300641059875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 582 -1.0122500360012054e-01</internalNodes>\n          <leafValues>\n            -3.0699110031127930e+00 1.1363799870014191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 583 -7.5509999878704548e-03</internalNodes>\n          <leafValues>\n            2.2921000421047211e-01 -4.5645099878311157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 584 4.4247999787330627e-02</internalNodes>\n          <leafValues>\n            -3.1599999056197703e-04 3.9225301146507263e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 585 -1.1636000126600266e-01</internalNodes>\n          <leafValues>\n            9.5233702659606934e-01 -2.0201599597930908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 586 4.7360002063214779e-03</internalNodes>\n          <leafValues>\n            -9.9177002906799316e-02 2.0370499789714813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 587 2.2459000349044800e-02</internalNodes>\n          <leafValues>\n            8.7280003353953362e-03 -1.0217070579528809e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 588 -1.2109000235795975e-02</internalNodes>\n          <leafValues>\n            6.4812600612640381e-01 -9.0149000287055969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 589 5.6120000779628754e-02</internalNodes>\n          <leafValues>\n            -3.6759998649358749e-02 -1.9275590181350708e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 590 -8.7379999458789825e-03</internalNodes>\n          <leafValues>\n            6.9261300563812256e-01 -6.8374998867511749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 591 6.6399998031556606e-03</internalNodes>\n          <leafValues>\n            -4.0569800138473511e-01 1.8625700473785400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 592 -1.8131999298930168e-02</internalNodes>\n          <leafValues>\n            -6.4518201351165771e-01 2.1976399421691895e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 593 -2.2718999534845352e-02</internalNodes>\n          <leafValues>\n            9.7776198387145996e-01 -1.8654300272464752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 594 1.2705000117421150e-02</internalNodes>\n          <leafValues>\n            -1.0546600073575974e-01 3.7404099106788635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 595 -1.3682999648153782e-02</internalNodes>\n          <leafValues>\n            6.1064100265502930e-01 -2.6881098747253418e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>115</maxWeakCount>\n      <stageThreshold>-3.7160909175872803e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 596 3.1357999891042709e-02</internalNodes>\n          <leafValues>\n            -1.0183910131454468e+00 5.7528597116470337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 597 9.3050003051757812e-02</internalNodes>\n          <leafValues>\n            -4.1297501325607300e-01 1.0091199874877930e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 598 2.5949999690055847e-02</internalNodes>\n          <leafValues>\n            -5.8587902784347534e-01 5.6606197357177734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 599 1.6472000628709793e-02</internalNodes>\n          <leafValues>\n            -9.2857497930526733e-01 3.0924499034881592e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 600 -1.8779999809339643e-03</internalNodes>\n          <leafValues>\n            1.1951000243425369e-01 -1.1180130243301392e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 601 -9.0129999443888664e-03</internalNodes>\n          <leafValues>\n            -5.7849502563476562e-01 3.3154401183128357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 602 2.2547999396920204e-02</internalNodes>\n          <leafValues>\n            -3.8325101137161255e-01 5.2462202310562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 603 -3.7780001759529114e-02</internalNodes>\n          <leafValues>\n            1.1790670156478882e+00 -3.4166999161243439e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 604 -5.3799999877810478e-03</internalNodes>\n          <leafValues>\n            -8.6265897750854492e-01 1.1867900192737579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 605 -2.3893000558018684e-02</internalNodes>\n          <leafValues>\n            -7.4950599670410156e-01 2.1011400222778320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 606 -2.6521999388933182e-02</internalNodes>\n          <leafValues>\n            9.2128598690032959e-01 -2.8252801299095154e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 607 1.2280000373721123e-02</internalNodes>\n          <leafValues>\n            2.6662799715995789e-01 -7.0013600587844849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 608 9.6594996750354767e-02</internalNodes>\n          <leafValues>\n            -2.8453999757766724e-01 7.3168998956680298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 609 -2.7414999902248383e-02</internalNodes>\n          <leafValues>\n            -6.1492699384689331e-01 1.5576200187206268e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 610 -1.5767000615596771e-02</internalNodes>\n          <leafValues>\n            5.7551199197769165e-01 -3.4362199902534485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 611 -2.1100000012665987e-03</internalNodes>\n          <leafValues>\n            3.2599699497222900e-01 -1.3008299469947815e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 612 1.2006999924778938e-02</internalNodes>\n          <leafValues>\n            8.9322999119758606e-02 -9.6025598049163818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 613 -1.5421999618411064e-02</internalNodes>\n          <leafValues>\n            3.4449499845504761e-01 -4.6711999177932739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 614 -4.1579999960958958e-03</internalNodes>\n          <leafValues>\n            2.3696300387382507e-01 -5.2563297748565674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 615 -2.1185999736189842e-02</internalNodes>\n          <leafValues>\n            -7.4267697334289551e-01 2.1702000498771667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 616 -1.7077000811696053e-02</internalNodes>\n          <leafValues>\n            -9.0471798181533813e-01 6.6012002527713776e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 617 -4.0849998593330383e-02</internalNodes>\n          <leafValues>\n            -3.4446600079536438e-01 2.1503700315952301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 618 -8.1930002197623253e-03</internalNodes>\n          <leafValues>\n            -9.3388599157333374e-01 5.0471000373363495e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 619 -1.9238000735640526e-02</internalNodes>\n          <leafValues>\n            -5.3203701972961426e-01 1.7240600287914276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 620 -4.4192001223564148e-02</internalNodes>\n          <leafValues>\n            9.2075002193450928e-01 -2.2148500382900238e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 621 -6.2392000108957291e-02</internalNodes>\n          <leafValues>\n            -7.1053802967071533e-01 1.8323899805545807e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 622 -1.0079999919980764e-03</internalNodes>\n          <leafValues>\n            -8.7063097953796387e-01 5.5330000817775726e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 623 2.3870000615715981e-02</internalNodes>\n          <leafValues>\n            -2.2854200005531311e-01 5.2415597438812256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 624 2.1391000598669052e-02</internalNodes>\n          <leafValues>\n            -3.0325898528099060e-01 5.5860602855682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 625 2.0254999399185181e-02</internalNodes>\n          <leafValues>\n            2.6901501417160034e-01 -7.0261800289154053e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 626 -2.8772000223398209e-02</internalNodes>\n          <leafValues>\n            -1.1835030317306519e+00 4.6512000262737274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 627 3.4199999645352364e-03</internalNodes>\n          <leafValues>\n            -5.4652100801467896e-01 2.5962498784065247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 628 5.6983001530170441e-02</internalNodes>\n          <leafValues>\n            -2.6982900500297546e-01 5.8170700073242188e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 629 -9.3892000615596771e-02</internalNodes>\n          <leafValues>\n            -9.1046398878097534e-01 1.9677700102329254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 630 1.7699999734759331e-02</internalNodes>\n          <leafValues>\n            -4.4003298878669739e-01 2.1349500119686127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 631 2.2844199836254120e-01</internalNodes>\n          <leafValues>\n            2.3605000227689743e-02 7.7171599864959717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 632 -1.8287500739097595e-01</internalNodes>\n          <leafValues>\n            7.9228597879409790e-01 -2.4644799530506134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 633 -6.9891996681690216e-02</internalNodes>\n          <leafValues>\n            8.0267798900604248e-01 -3.6072000861167908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 634 1.5297000296413898e-02</internalNodes>\n          <leafValues>\n            -2.0072300732135773e-01 1.1030600070953369e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 635 6.7500001750886440e-03</internalNodes>\n          <leafValues>\n            -4.5967999845743179e-02 7.2094500064849854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 636 -1.5983000397682190e-02</internalNodes>\n          <leafValues>\n            -9.0357202291488647e-01 4.4987998902797699e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 637 1.3088000006973743e-02</internalNodes>\n          <leafValues>\n            3.5297098755836487e-01 -3.7710601091384888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 638 1.3061000034213066e-02</internalNodes>\n          <leafValues>\n            -1.9583599269390106e-01 1.1198940277099609e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 639 -3.9907000958919525e-02</internalNodes>\n          <leafValues>\n            -1.3998429775238037e+00 1.9145099818706512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 640 1.5026999637484550e-02</internalNodes>\n          <leafValues>\n            2.3600000422447920e-03 -1.1611249446868896e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 641 -2.0517999306321144e-02</internalNodes>\n          <leafValues>\n            -4.8908099532127380e-01 1.6743400692939758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 642 -2.2359000518918037e-02</internalNodes>\n          <leafValues>\n            -1.2202980518341064e+00 -1.1975999921560287e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 643 -7.9150004312396049e-03</internalNodes>\n          <leafValues>\n            3.7228098511695862e-01 -8.5063003003597260e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 644 1.5258000232279301e-02</internalNodes>\n          <leafValues>\n            -2.9412600398063660e-01 5.9406399726867676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 645 -3.1665999442338943e-02</internalNodes>\n          <leafValues>\n            -1.4395569562911987e+00 1.3578799366950989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 646 -3.0773999169468880e-02</internalNodes>\n          <leafValues>\n            -2.2545371055603027e+00 -3.3971000462770462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 647 -1.5483000315725803e-02</internalNodes>\n          <leafValues>\n            3.7700700759887695e-01 1.5847999602556229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 648 3.5167001187801361e-02</internalNodes>\n          <leafValues>\n            -2.9446101188659668e-01 5.3159099817276001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 649 -1.7906000837683678e-02</internalNodes>\n          <leafValues>\n            -9.9788200855255127e-01 1.6235999763011932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 650 -3.1799999997019768e-03</internalNodes>\n          <leafValues>\n            4.7657001763582230e-02 -7.5249898433685303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 651 1.5720000490546227e-02</internalNodes>\n          <leafValues>\n            1.4873799681663513e-01 -6.5375399589538574e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 652 2.9864000156521797e-02</internalNodes>\n          <leafValues>\n            -1.4952000230550766e-02 -1.2275190353393555e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 653 2.9899999499320984e-03</internalNodes>\n          <leafValues>\n            -1.4263699948787689e-01 4.3272799253463745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 654 8.4749996662139893e-02</internalNodes>\n          <leafValues>\n            -1.9280999898910522e-02 -1.1946409940719604e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 655 -5.8724999427795410e-02</internalNodes>\n          <leafValues>\n            -1.7328219413757324e+00 1.4374700188636780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 656 4.4755998998880386e-02</internalNodes>\n          <leafValues>\n            -2.4140599370002747e-01 5.4019999504089355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 657 4.0369000285863876e-02</internalNodes>\n          <leafValues>\n            5.7680001482367516e-03 5.6578099727630615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 658 3.7735998630523682e-02</internalNodes>\n          <leafValues>\n            3.8180999457836151e-02 -7.9370397329330444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 659 6.0752999037504196e-02</internalNodes>\n          <leafValues>\n            7.6453000307083130e-02 1.4813209772109985e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 660 -1.9832000136375427e-02</internalNodes>\n          <leafValues>\n            -1.6971720457077026e+00 -2.7370000258088112e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 661 -1.6592699289321899e-01</internalNodes>\n          <leafValues>\n            6.2976002693176270e-01 3.1762998551130295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 662 6.9014996290206909e-02</internalNodes>\n          <leafValues>\n            -3.3463200926780701e-01 3.0076700448989868e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 663 1.1358000338077545e-02</internalNodes>\n          <leafValues>\n            2.2741499543190002e-01 -3.8224700093269348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 664 1.7000000225380063e-03</internalNodes>\n          <leafValues>\n            1.9223800301551819e-01 -5.2735102176666260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 665 7.9769000411033630e-02</internalNodes>\n          <leafValues>\n            9.1491997241973877e-02 2.1049048900604248e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 666 -5.7144001126289368e-02</internalNodes>\n          <leafValues>\n            -1.7452130317687988e+00 -4.0910001844167709e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 667 7.3830001056194305e-03</internalNodes>\n          <leafValues>\n            -2.4214799702167511e-01 3.5577800869941711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 668 -1.8040999770164490e-02</internalNodes>\n          <leafValues>\n            1.1779999732971191e+00 -1.7676700651645660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 669 9.4503000378608704e-02</internalNodes>\n          <leafValues>\n            1.3936099410057068e-01 -1.2993700504302979e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 670 5.4210000671446323e-03</internalNodes>\n          <leafValues>\n            -5.4608601331710815e-01 1.3916400074958801e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 671 7.0290002040565014e-03</internalNodes>\n          <leafValues>\n            -2.1597200632095337e-01 3.9258098602294922e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 672 3.4515999257564545e-02</internalNodes>\n          <leafValues>\n            6.3188999891281128e-02 -7.2108101844787598e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 673 -5.1924999803304672e-02</internalNodes>\n          <leafValues>\n            6.8667602539062500e-01 6.3272997736930847e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 674 -6.9162003695964813e-02</internalNodes>\n          <leafValues>\n            1.7411810159683228e+00 -1.6619299352169037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 675 -5.5229999125003815e-03</internalNodes>\n          <leafValues>\n            3.0694699287414551e-01 -1.6662900149822235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 676 6.8599998950958252e-02</internalNodes>\n          <leafValues>\n            -2.1405400335788727e-01 7.3185002803802490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 677 -6.7038998007774353e-02</internalNodes>\n          <leafValues>\n            -7.9360598325729370e-01 2.0525799691677094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 678 -2.1005000919103622e-02</internalNodes>\n          <leafValues>\n            3.7344399094581604e-01 -2.9618600010871887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 679 2.0278999581933022e-02</internalNodes>\n          <leafValues>\n            -1.5200000256299973e-02 4.0555301308631897e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 680 -4.7107998281717300e-02</internalNodes>\n          <leafValues>\n            1.2116849422454834e+00 -1.7464299499988556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 681 1.8768499791622162e-01</internalNodes>\n          <leafValues>\n            -2.2909000515937805e-02 6.9645798206329346e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 682 -4.3228998780250549e-02</internalNodes>\n          <leafValues>\n            -1.0602480173110962e+00 -5.5599998449906707e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 683 2.0004000514745712e-02</internalNodes>\n          <leafValues>\n            -3.2751001417636871e-02 5.3805100917816162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 684 8.0880001187324524e-03</internalNodes>\n          <leafValues>\n            3.7548001855611801e-02 -7.4768900871276855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 685 2.7101000770926476e-02</internalNodes>\n          <leafValues>\n            -8.1790000200271606e-02 3.3387100696563721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 686 -9.1746002435684204e-02</internalNodes>\n          <leafValues>\n            -1.9213509559631348e+00 -3.8952998816967010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 687 -1.2454999610781670e-02</internalNodes>\n          <leafValues>\n            4.8360601067543030e-01 1.8168000504374504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 688 1.4649000018835068e-02</internalNodes>\n          <leafValues>\n            -1.9906699657440186e-01 7.2815400362014771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 689 2.9101999476552010e-02</internalNodes>\n          <leafValues>\n            1.9871099293231964e-01 -4.9216800928115845e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 690 8.7799998000264168e-03</internalNodes>\n          <leafValues>\n            -1.9499599933624268e-01 7.7317398786544800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 691 -5.4740000516176224e-02</internalNodes>\n          <leafValues>\n            1.8087190389633179e+00 6.8323001265525818e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 692 -1.4798000454902649e-02</internalNodes>\n          <leafValues>\n            7.8064900636672974e-01 -1.8709599971771240e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 693 2.5012999773025513e-02</internalNodes>\n          <leafValues>\n            1.5285299718379974e-01 -1.6021020412445068e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 694 4.6548001468181610e-02</internalNodes>\n          <leafValues>\n            -1.6738200187683105e-01 1.1902060508728027e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 695 1.7624000087380409e-02</internalNodes>\n          <leafValues>\n            -1.0285499691963196e-01 3.9175900816917419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 696 1.6319599747657776e-01</internalNodes>\n          <leafValues>\n            -3.5624001175165176e-02 -1.6098170280456543e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 697 1.3137999922037125e-02</internalNodes>\n          <leafValues>\n            -5.6359000504016876e-02 5.4158902168273926e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 698 -1.5665000304579735e-02</internalNodes>\n          <leafValues>\n            2.8063100576400757e-01 -3.1708601117134094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 699 8.0554001033306122e-02</internalNodes>\n          <leafValues>\n            1.2640400230884552e-01 -1.0297529697418213e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 700 3.5363998264074326e-02</internalNodes>\n          <leafValues>\n            2.0752999931573868e-02 -7.9105597734451294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 701 3.2986998558044434e-02</internalNodes>\n          <leafValues>\n            1.9057099521160126e-01 -8.3839899301528931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 702 1.2195000424981117e-02</internalNodes>\n          <leafValues>\n            7.3729000985622406e-02 -6.2780702114105225e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 703 4.3065998703241348e-02</internalNodes>\n          <leafValues>\n            4.7384999692440033e-02 1.5712939500808716e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 704 3.0326999723911285e-02</internalNodes>\n          <leafValues>\n            -2.7314600348472595e-01 3.8572001457214355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 705 3.5493001341819763e-02</internalNodes>\n          <leafValues>\n            5.4593998938798904e-02 5.2583402395248413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 706 -1.4596999622881413e-02</internalNodes>\n          <leafValues>\n            3.8152599334716797e-01 -2.8332400321960449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 707 1.2606999836862087e-02</internalNodes>\n          <leafValues>\n            1.5455099940299988e-01 -3.0501499772071838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 708 1.0172000154852867e-02</internalNodes>\n          <leafValues>\n            2.3637000471353531e-02 -8.7217897176742554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 709 2.8843000531196594e-02</internalNodes>\n          <leafValues>\n            1.6090999543666840e-01 -2.0277599990367889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 710 5.5100000463426113e-04</internalNodes>\n          <leafValues>\n            -6.1545401811599731e-01 8.0935999751091003e-02</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>127</maxWeakCount>\n      <stageThreshold>-3.5645289421081543e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 711 4.8344001173973083e-02</internalNodes>\n          <leafValues>\n            -8.4904599189758301e-01 5.6974399089813232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 712 3.2460000365972519e-02</internalNodes>\n          <leafValues>\n            -8.1417298316955566e-01 4.4781699776649475e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 713 3.3339999616146088e-02</internalNodes>\n          <leafValues>\n            -3.6423799395561218e-01 6.7937397956848145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 714 6.4019998535513878e-03</internalNodes>\n          <leafValues>\n            -1.1885459423065186e+00 1.9238699972629547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 715 -5.6889997795224190e-03</internalNodes>\n          <leafValues>\n            3.3085298538208008e-01 -7.1334099769592285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 716 1.2698000296950340e-02</internalNodes>\n          <leafValues>\n            -5.0990802049636841e-01 1.1376299709081650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 717 6.0549997724592686e-03</internalNodes>\n          <leafValues>\n            -1.0470550060272217e+00 2.0222599804401398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 718 2.6420000940561295e-03</internalNodes>\n          <leafValues>\n            -5.0559401512145996e-01 3.6441200971603394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 719 -1.6925999894738197e-02</internalNodes>\n          <leafValues>\n            -9.9541902542114258e-01 1.2602199614048004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 720 2.8235999867320061e-02</internalNodes>\n          <leafValues>\n            -9.4137996435165405e-02 5.7780402898788452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 721 1.0428999550640583e-02</internalNodes>\n          <leafValues>\n            2.3272900283336639e-01 -5.2569699287414551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 722 9.8860003054141998e-03</internalNodes>\n          <leafValues>\n            -1.0316299647092819e-01 4.7657600045204163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 723 2.6015000417828560e-02</internalNodes>\n          <leafValues>\n            -1.0920000495389104e-03 -1.5581729412078857e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 724 -2.5537999346852303e-02</internalNodes>\n          <leafValues>\n            -6.5451401472091675e-01 1.8843199312686920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 725 -3.5310001112520695e-03</internalNodes>\n          <leafValues>\n            2.8140598535537720e-01 -4.4575300812721252e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 726 9.2449998483061790e-03</internalNodes>\n          <leafValues>\n            1.5612000226974487e-01 -2.1370999515056610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 727 2.1030999720096588e-02</internalNodes>\n          <leafValues>\n            -2.9170298576354980e-01 5.2234101295471191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 728 -5.1063001155853271e-02</internalNodes>\n          <leafValues>\n            1.3661290407180786e+00 3.0465999618172646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 729 -6.2330000102519989e-02</internalNodes>\n          <leafValues>\n            1.2207020521163940e+00 -2.2434400022029877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 730 -3.2963000237941742e-02</internalNodes>\n          <leafValues>\n            -8.2016801834106445e-01 1.4531899988651276e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 731 -3.7418000400066376e-02</internalNodes>\n          <leafValues>\n            -1.2218099832534790e+00 1.9448999315500259e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 732 1.2402799725532532e-01</internalNodes>\n          <leafValues>\n            1.2082300335168839e-01 -9.8729300498962402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 733 -8.9229997247457504e-03</internalNodes>\n          <leafValues>\n            -1.1688489913940430e+00 2.1105000749230385e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 734 -5.9879999607801437e-02</internalNodes>\n          <leafValues>\n            -1.0689330101013184e+00 1.9860200583934784e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 735 6.2620001845061779e-03</internalNodes>\n          <leafValues>\n            -3.6229598522186279e-01 3.8000801205635071e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 736 -1.7673000693321228e-02</internalNodes>\n          <leafValues>\n            4.9094098806381226e-01 -1.4606699347496033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 737 1.7579000443220139e-02</internalNodes>\n          <leafValues>\n            5.8728098869323730e-01 -2.7774399518966675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 738 5.1560001447796822e-03</internalNodes>\n          <leafValues>\n            -7.5194999575614929e-02 6.0193097591400146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 739 -1.0599999688565731e-02</internalNodes>\n          <leafValues>\n            2.7637401223182678e-01 -3.7794300913810730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 740 2.0884099602699280e-01</internalNodes>\n          <leafValues>\n            -5.3599998354911804e-03 1.0317809581756592e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 741 -2.6412999257445335e-02</internalNodes>\n          <leafValues>\n            8.2336401939392090e-01 -2.2480599582195282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 742 5.8892000466585159e-02</internalNodes>\n          <leafValues>\n            1.3098299503326416e-01 -1.1853699684143066e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 743 -1.1579000391066074e-02</internalNodes>\n          <leafValues>\n            -9.0667802095413208e-01 4.4126998633146286e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 744 4.5988000929355621e-02</internalNodes>\n          <leafValues>\n            1.0143999941647053e-02 1.0740900039672852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 745 -2.2838000208139420e-02</internalNodes>\n          <leafValues>\n            1.7791990041732788e+00 -1.7315499484539032e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 746 -8.1709995865821838e-03</internalNodes>\n          <leafValues>\n            5.7386302947998047e-01 -7.4106000363826752e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 747 3.5359999164938927e-03</internalNodes>\n          <leafValues>\n            -3.2072898745536804e-01 4.0182501077651978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 748 4.9444999545812607e-02</internalNodes>\n          <leafValues>\n            1.9288000464439392e-01 -1.2166700363159180e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 749 3.5139999818056822e-03</internalNodes>\n          <leafValues>\n            6.9568000733852386e-02 -7.1323698759078979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 750 -3.0996000394225121e-02</internalNodes>\n          <leafValues>\n            -3.8862198591232300e-01 1.8098799884319305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 751 8.6452998220920563e-02</internalNodes>\n          <leafValues>\n            -2.5792999193072319e-02 -1.5453219413757324e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 752 -1.3652600347995758e-01</internalNodes>\n          <leafValues>\n            -1.9199420213699341e+00 1.6613300144672394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 753 -5.7689999230206013e-03</internalNodes>\n          <leafValues>\n            -1.2822589874267578e+00 -1.5907999128103256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 754 -1.7899999395012856e-02</internalNodes>\n          <leafValues>\n            -4.0409898757934570e-01 2.3591600358486176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 755 -1.9969999790191650e-02</internalNodes>\n          <leafValues>\n            -7.2891902923583984e-01 5.6235000491142273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 756 -5.7493001222610474e-02</internalNodes>\n          <leafValues>\n            5.7830798625946045e-01 -1.5796000137925148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 757 -8.3056002855300903e-02</internalNodes>\n          <leafValues>\n            9.1511601209640503e-01 -2.1121400594711304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 758 -5.3771000355482101e-02</internalNodes>\n          <leafValues>\n            -5.1931297779083252e-01 1.8576000630855560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 759 -8.3670001477003098e-03</internalNodes>\n          <leafValues>\n            2.4109700322151184e-01 -3.9648601412773132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 760 5.5406998842954636e-02</internalNodes>\n          <leafValues>\n            1.6771200299263000e-01 -2.5664970874786377e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 761 -6.7180998623371124e-02</internalNodes>\n          <leafValues>\n            -1.3658570051193237e+00 -1.4232000336050987e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 762 -2.3900000378489494e-02</internalNodes>\n          <leafValues>\n            -1.7084569931030273e+00 1.6507799923419952e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 763 5.5949999950826168e-03</internalNodes>\n          <leafValues>\n            -3.1373998522758484e-01 3.2837900519371033e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 764 2.1294999867677689e-02</internalNodes>\n          <leafValues>\n            1.4953400194644928e-01 -4.8579800128936768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 765 -2.4613000452518463e-02</internalNodes>\n          <leafValues>\n            7.4346399307250977e-01 -2.2305199503898621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 766 -1.9626000896096230e-02</internalNodes>\n          <leafValues>\n            -4.0918299555778503e-01 1.8893200159072876e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 767 -5.3266000002622604e-02</internalNodes>\n          <leafValues>\n            8.1381601095199585e-01 -2.0853699743747711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 768 7.1290000341832638e-03</internalNodes>\n          <leafValues>\n            3.2996100187301636e-01 -5.9937399625778198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 769 -2.2486999630928040e-02</internalNodes>\n          <leafValues>\n            -1.2551610469818115e+00 -2.0413000136613846e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 770 -8.2310996949672699e-02</internalNodes>\n          <leafValues>\n            1.3821430206298828e+00 5.9308998286724091e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 771 1.3097000122070312e-01</internalNodes>\n          <leafValues>\n            -3.5843998193740845e-02 -1.5396369695663452e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 772 1.4293000102043152e-02</internalNodes>\n          <leafValues>\n            -1.8475200235843658e-01 3.7455001473426819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 773 6.3479999080300331e-03</internalNodes>\n          <leafValues>\n            -4.4901099801063538e-01 1.3876999914646149e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 774 -4.6055000275373459e-02</internalNodes>\n          <leafValues>\n            6.7832601070404053e-01 -1.7071999609470367e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 775 5.7693999260663986e-02</internalNodes>\n          <leafValues>\n            -1.1955999769270420e-02 -1.2261159420013428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 776 -6.0609998181462288e-03</internalNodes>\n          <leafValues>\n            3.3958598971366882e-01 6.2800000887364149e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 777 -5.2163001149892807e-02</internalNodes>\n          <leafValues>\n            -1.0621069669723511e+00 -1.3779999688267708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 778 4.6572998166084290e-02</internalNodes>\n          <leafValues>\n            1.4538800716400146e-01 -1.2384550571441650e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 779 7.5309998355805874e-03</internalNodes>\n          <leafValues>\n            -2.4467700719833374e-01 5.1377099752426147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 780 2.1615000441670418e-02</internalNodes>\n          <leafValues>\n            1.3072599470615387e-01 -7.0996797084808350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 781 -1.7864000052213669e-02</internalNodes>\n          <leafValues>\n            -1.0474660396575928e+00 4.9599999329075217e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 782 -3.7195000797510147e-02</internalNodes>\n          <leafValues>\n            -1.5126730203628540e+00 1.4801399409770966e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 783 -3.1100001069717109e-04</internalNodes>\n          <leafValues>\n            1.3971500098705292e-01 -4.6867498755455017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 784 2.5042999535799026e-02</internalNodes>\n          <leafValues>\n            2.8632000088691711e-01 -4.1794699430465698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 785 9.3449996784329414e-03</internalNodes>\n          <leafValues>\n            -2.7336201071739197e-01 4.3444699048995972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 786 3.2363999634981155e-02</internalNodes>\n          <leafValues>\n            1.8438899517059326e-01 -9.5019298791885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 787 -6.2299999408423901e-03</internalNodes>\n          <leafValues>\n            3.2581999897956848e-01 -3.0815601348876953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 788 5.1488999277353287e-02</internalNodes>\n          <leafValues>\n            1.1416000127792358e-01 -1.9795479774475098e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 789 -2.6449000462889671e-02</internalNodes>\n          <leafValues>\n            -1.1067299842834473e+00 -8.5519999265670776e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 790 -1.5420000068843365e-02</internalNodes>\n          <leafValues>\n            8.0138701200485229e-01 -3.2035000622272491e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 791 1.9456999376416206e-02</internalNodes>\n          <leafValues>\n            -2.6449498534202576e-01 3.8753899931907654e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 792 3.3620998263359070e-02</internalNodes>\n          <leafValues>\n            1.6052000224590302e-02 5.8840900659561157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 793 2.8906000778079033e-02</internalNodes>\n          <leafValues>\n            1.5216000378131866e-02 -9.4723600149154663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 794 2.0300000323913991e-04</internalNodes>\n          <leafValues>\n            -3.0766001343727112e-01 2.1235899627208710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 795 -4.9141999334096909e-02</internalNodes>\n          <leafValues>\n            -1.6058609485626221e+00 -3.1094999983906746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 796 7.6425999402999878e-02</internalNodes>\n          <leafValues>\n            7.4758999049663544e-02 1.1639410257339478e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 797 2.3897999897599220e-02</internalNodes>\n          <leafValues>\n            -6.4320000819861889e-03 -1.1150749921798706e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 798 3.8970001041889191e-03</internalNodes>\n          <leafValues>\n            -2.4105699360370636e-01 2.0858900249004364e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 799 -8.9445002377033234e-02</internalNodes>\n          <leafValues>\n            1.9157789945602417e+00 -1.5721100568771362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 800 -1.5008999966084957e-02</internalNodes>\n          <leafValues>\n            -2.5174099206924438e-01 1.8179899454116821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 801 -1.1145999655127525e-02</internalNodes>\n          <leafValues>\n            -6.9349497556686401e-01 4.4927999377250671e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 802 9.4578996300697327e-02</internalNodes>\n          <leafValues>\n            1.8102100491523743e-01 -7.4978601932525635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 803 5.5038899183273315e-01</internalNodes>\n          <leafValues>\n            -3.0974000692367554e-02 -1.6746139526367188e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 804 4.1381001472473145e-02</internalNodes>\n          <leafValues>\n            6.3910000026226044e-02 7.6561200618743896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 805 2.4771999567747116e-02</internalNodes>\n          <leafValues>\n            1.1380000039935112e-02 -8.8559401035308838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 806 5.0999000668525696e-02</internalNodes>\n          <leafValues>\n            1.4890299737453461e-01 -2.4634211063385010e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 807 -1.6893999651074409e-02</internalNodes>\n          <leafValues>\n            3.8870999217033386e-01 -2.9880300164222717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 808 -1.2162300199270248e-01</internalNodes>\n          <leafValues>\n            -1.5542800426483154e+00 1.6300800442695618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 809 -3.6049999762326479e-03</internalNodes>\n          <leafValues>\n            2.1842800080776215e-01 -3.7312099337577820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 810 1.1575400084257126e-01</internalNodes>\n          <leafValues>\n            -4.7061000019311905e-02 5.9403699636459351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 811 3.6903999745845795e-02</internalNodes>\n          <leafValues>\n            -2.5508600473403931e-01 5.5397301912307739e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 812 1.1483999900519848e-02</internalNodes>\n          <leafValues>\n            -1.8129499256610870e-01 4.0682798624038696e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 813 -2.0233999937772751e-02</internalNodes>\n          <leafValues>\n            5.4311197996139526e-01 -2.3822399973869324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 814 -2.8765000402927399e-02</internalNodes>\n          <leafValues>\n            -6.9172298908233643e-01 1.5943300724029541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 815 -5.8320001699030399e-03</internalNodes>\n          <leafValues>\n            2.9447799921035767e-01 -3.4005999565124512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 816 -5.5468998849391937e-02</internalNodes>\n          <leafValues>\n            9.2200797796249390e-01 9.4093002378940582e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 817 -1.4801000244915485e-02</internalNodes>\n          <leafValues>\n            -7.9539698362350464e-01 3.1521998345851898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 818 -7.0940000005066395e-03</internalNodes>\n          <leafValues>\n            3.3096000552177429e-01 -5.0886999815702438e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 819 -4.5124001801013947e-02</internalNodes>\n          <leafValues>\n            -1.3719749450683594e+00 -2.1408999338746071e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 820 6.4377002418041229e-02</internalNodes>\n          <leafValues>\n            6.3901998102664948e-02 9.1478300094604492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 821 -1.4727000147104263e-02</internalNodes>\n          <leafValues>\n            3.6050599813461304e-01 -2.8614500164985657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 822 4.5007001608610153e-02</internalNodes>\n          <leafValues>\n            -1.5619699656963348e-01 5.3160297870635986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 823 -1.1330000124871731e-03</internalNodes>\n          <leafValues>\n            1.3422900438308716e-01 -4.4358900189399719e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 824 4.9451000988483429e-02</internalNodes>\n          <leafValues>\n            1.0571800172328949e-01 -2.5589139461517334e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 825 2.9102999716997147e-02</internalNodes>\n          <leafValues>\n            -1.0088000446557999e-02 -1.1073939800262451e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 826 3.4786000847816467e-02</internalNodes>\n          <leafValues>\n            -2.7719999197870493e-03 5.6700998544692993e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 827 -6.1309998854994774e-03</internalNodes>\n          <leafValues>\n            -4.6889400482177734e-01 1.2636399269104004e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 828 1.5525000169873238e-02</internalNodes>\n          <leafValues>\n            -8.4279999136924744e-03 8.7469202280044556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 829 2.9249999206513166e-03</internalNodes>\n          <leafValues>\n            -3.4434300661087036e-01 2.0851600170135498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 830 -5.3571000695228577e-02</internalNodes>\n          <leafValues>\n            1.4982949495315552e+00 5.7328000664710999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 831 -1.9217999652028084e-02</internalNodes>\n          <leafValues>\n            -9.9234098196029663e-01 -9.3919998034834862e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 832 -5.5282998830080032e-02</internalNodes>\n          <leafValues>\n            -5.7682299613952637e-01 1.6860599815845490e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 833 5.6336000561714172e-02</internalNodes>\n          <leafValues>\n            -3.3775001764297485e-02 -1.3889650106430054e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 834 -2.3824000731110573e-02</internalNodes>\n          <leafValues>\n            4.0182098746299744e-01 1.8360000103712082e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 835 1.7810000572353601e-03</internalNodes>\n          <leafValues>\n            1.8145999312400818e-01 -4.1743400692939758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 836 -3.7689000368118286e-02</internalNodes>\n          <leafValues>\n            5.4683101177215576e-01 1.8219999969005585e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 837 -2.4144999682903290e-02</internalNodes>\n          <leafValues>\n            6.8352097272872925e-01 -1.9650200009346008e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>135</maxWeakCount>\n      <stageThreshold>-3.7025990486145020e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 838 2.7444999665021896e-02</internalNodes>\n          <leafValues>\n            -8.9984202384948730e-01 5.1876497268676758e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 839 1.1554100364446640e-01</internalNodes>\n          <leafValues>\n            -5.6524401903152466e-01 7.0551300048828125e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 840 -2.2297000512480736e-02</internalNodes>\n          <leafValues>\n            3.6079999804496765e-01 -6.6864597797393799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 841 1.3325000181794167e-02</internalNodes>\n          <leafValues>\n            -5.5573397874832153e-01 3.5789999365806580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 842 -3.8060001097619534e-03</internalNodes>\n          <leafValues>\n            -1.0713000297546387e+00 1.8850000202655792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 843 -2.6819999329745770e-03</internalNodes>\n          <leafValues>\n            -7.1584302186965942e-01 2.6344498991966248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 844 3.3819999080151320e-03</internalNodes>\n          <leafValues>\n            -4.6930798888206482e-01 2.6658400893211365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 845 3.7643000483512878e-02</internalNodes>\n          <leafValues>\n            2.1098700165748596e-01 -1.0804339647293091e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 846 -1.3861999846994877e-02</internalNodes>\n          <leafValues>\n            6.6912001371383667e-01 -2.7942800521850586e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 847 -2.7350001037120819e-03</internalNodes>\n          <leafValues>\n            -9.5332300662994385e-01 2.4051299691200256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 848 -3.8336999714374542e-02</internalNodes>\n          <leafValues>\n            8.1432801485061646e-01 -2.4919399619102478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 849 -3.4697998315095901e-02</internalNodes>\n          <leafValues>\n            1.2330100536346436e+00 6.8600000813603401e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 850 2.3360999301075935e-02</internalNodes>\n          <leafValues>\n            -3.0794700980186462e-01 7.0714497566223145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 851 3.5057999193668365e-02</internalNodes>\n          <leafValues>\n            2.1205900609493256e-01 -1.4399830102920532e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 852 -1.3256999664008617e-02</internalNodes>\n          <leafValues>\n            -9.0260702371597290e-01 4.8610001802444458e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 853 1.2740000151097775e-02</internalNodes>\n          <leafValues>\n            2.2655199468135834e-01 -4.4643801450729370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 854 3.6400000099092722e-03</internalNodes>\n          <leafValues>\n            -3.9817899465560913e-01 3.4665399789810181e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 855 1.0064700245857239e-01</internalNodes>\n          <leafValues>\n            1.8383599817752838e-01 -1.3410769701004028e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 856 0.</internalNodes>\n          <leafValues>\n            1.5536400675773621e-01 -5.1582497358322144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 857 1.1708999983966351e-02</internalNodes>\n          <leafValues>\n            2.1651400625705719e-01 -7.2705197334289551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 858 -3.5964999347925186e-02</internalNodes>\n          <leafValues>\n            -1.4789500236511230e+00 -2.4317000061273575e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 859 -2.1236000582575798e-02</internalNodes>\n          <leafValues>\n            -1.6844099760055542e-01 1.9526599347591400e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 860 1.4874000102281570e-02</internalNodes>\n          <leafValues>\n            3.7335999310016632e-02 -8.7557297945022583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 861 -5.1409997977316380e-03</internalNodes>\n          <leafValues>\n            3.3466500043869019e-01 -2.4109700322151184e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 862 2.3450000211596489e-02</internalNodes>\n          <leafValues>\n            5.5320002138614655e-03 -1.2509720325469971e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 863 -2.5062000378966331e-02</internalNodes>\n          <leafValues>\n            4.5212399959564209e-01 -8.4469996392726898e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 864 -7.7400001464411616e-04</internalNodes>\n          <leafValues>\n            1.5249900519847870e-01 -4.8486500978469849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 865 -4.0483999997377396e-02</internalNodes>\n          <leafValues>\n            -1.3024920225143433e+00 1.7983500659465790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 866 2.8170999139547348e-02</internalNodes>\n          <leafValues>\n            -2.4410900473594666e-01 6.2271100282669067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 867 4.5692998915910721e-02</internalNodes>\n          <leafValues>\n            2.8122000396251678e-02 9.2394399642944336e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 868 3.9707001298666000e-02</internalNodes>\n          <leafValues>\n            -2.2332799434661865e-01 7.7674001455307007e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 869 5.0517000257968903e-02</internalNodes>\n          <leafValues>\n            2.0319999754428864e-01 -1.0895930528640747e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 870 -1.7266999930143356e-02</internalNodes>\n          <leafValues>\n            6.8598401546478271e-01 -2.3304499685764313e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 871 8.0186001956462860e-02</internalNodes>\n          <leafValues>\n            -1.0292000137269497e-02 6.1881101131439209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 872 9.7676001489162445e-02</internalNodes>\n          <leafValues>\n            -2.0070299506187439e-01 1.0088349580764771e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 873 -1.5572000294923782e-02</internalNodes>\n          <leafValues>\n            4.7615298628807068e-01 4.5623999089002609e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 874 -1.5305000357329845e-02</internalNodes>\n          <leafValues>\n            -1.1077369451522827e+00 4.5239999890327454e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 875 -1.6485000029206276e-02</internalNodes>\n          <leafValues>\n            1.0152939558029175e+00 1.6327999532222748e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 876 -2.6141999289393425e-02</internalNodes>\n          <leafValues>\n            4.1723299026489258e-01 -2.8645500540733337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 877 8.8679995387792587e-03</internalNodes>\n          <leafValues>\n            2.1404999494552612e-01 -1.6772800683975220e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 878 -2.6886999607086182e-02</internalNodes>\n          <leafValues>\n            -1.1564220190048218e+00 -1.0324000380933285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 879 7.7789998613297939e-03</internalNodes>\n          <leafValues>\n            3.5359498858451843e-01 -2.9611301422119141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 880 -1.5974000096321106e-02</internalNodes>\n          <leafValues>\n            -1.5374109745025635e+00 -2.9958000406622887e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 881 2.0866999402642250e-02</internalNodes>\n          <leafValues>\n            2.0244100689888000e-01 -7.1270197629928589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 882 8.5482001304626465e-02</internalNodes>\n          <leafValues>\n            -2.5932999327778816e-02 -1.5156569480895996e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 883 2.3872999474406242e-02</internalNodes>\n          <leafValues>\n            1.6803400218486786e-01 -3.8806200027465820e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 884 -3.9105001837015152e-02</internalNodes>\n          <leafValues>\n            -1.1958349943161011e+00 -2.0361000671982765e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 885 -7.7946998178958893e-02</internalNodes>\n          <leafValues>\n            -1.0898950099945068e+00 1.4530299603939056e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 886 -1.6876000910997391e-02</internalNodes>\n          <leafValues>\n            2.8049701452255249e-01 -4.1336300969123840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 887 1.1875600367784500e-01</internalNodes>\n          <leafValues>\n            -4.3490998446941376e-02 4.1263699531555176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 888 1.5624199807643890e-01</internalNodes>\n          <leafValues>\n            -2.6429599523544312e-01 5.5127799510955811e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 889 -4.5908000320196152e-02</internalNodes>\n          <leafValues>\n            6.0189199447631836e-01 1.8921000882983208e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 890 -1.0309999808669090e-02</internalNodes>\n          <leafValues>\n            3.8152998685836792e-01 -2.9507899284362793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 891 9.5769003033638000e-02</internalNodes>\n          <leafValues>\n            1.3246500492095947e-01 -4.6266800165176392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 892 1.3686999678611755e-02</internalNodes>\n          <leafValues>\n            1.1738699674606323e-01 -5.1664102077484131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 893 2.3990001063793898e-03</internalNodes>\n          <leafValues>\n            -3.4007599949836731e-01 2.0953500270843506e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 894 3.3264998346567154e-02</internalNodes>\n          <leafValues>\n            -1.7052799463272095e-01 1.4366799592971802e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 895 -3.3206000924110413e-02</internalNodes>\n          <leafValues>\n            6.1295700073242188e-01 -4.1549999266862869e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 896 2.7979998849332333e-03</internalNodes>\n          <leafValues>\n            -4.8554301261901855e-01 1.3372699916362762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 897 -6.5792001783847809e-02</internalNodes>\n          <leafValues>\n            -4.0257668495178223e+00 1.0876700282096863e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 898 2.1430000197142363e-03</internalNodes>\n          <leafValues>\n            -3.9179998636245728e-01 2.2427099943161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 899 2.2363999858498573e-02</internalNodes>\n          <leafValues>\n            -8.6429998278617859e-02 3.7785199284553528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 900 -5.7410001754760742e-02</internalNodes>\n          <leafValues>\n            1.1454069614410400e+00 -1.9736599922180176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 901 6.6550001502037048e-03</internalNodes>\n          <leafValues>\n            -2.1105000749230385e-02 5.8453398942947388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 902 1.2326999567449093e-02</internalNodes>\n          <leafValues>\n            3.7817001342773438e-02 -6.6987001895904541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 903 -8.1869997084140778e-03</internalNodes>\n          <leafValues>\n            5.6366002559661865e-01 -7.6877996325492859e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 904 3.6681000143289566e-02</internalNodes>\n          <leafValues>\n            -1.7343300580978394e-01 1.1670149564743042e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 905 -4.0220400691032410e-01</internalNodes>\n          <leafValues>\n            1.2640819549560547e+00 4.3398998677730560e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 906 -2.2126000374555588e-02</internalNodes>\n          <leafValues>\n            6.6978102922439575e-01 -2.1605299413204193e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 907 -1.3156999833881855e-02</internalNodes>\n          <leafValues>\n            -4.1198599338531494e-01 2.0215000212192535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 908 -1.2860000133514404e-02</internalNodes>\n          <leafValues>\n            -9.1582697629928589e-01 3.9232999086380005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 909 2.1627999842166901e-02</internalNodes>\n          <leafValues>\n            3.8719999138265848e-03 3.5668200254440308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 910 1.1896000243723392e-02</internalNodes>\n          <leafValues>\n            -3.7303900718688965e-01 1.9235099852085114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 911 -1.9548999145627022e-02</internalNodes>\n          <leafValues>\n            -4.2374899983406067e-01 2.4429599940776825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 912 6.4444996416568756e-02</internalNodes>\n          <leafValues>\n            -1.6558900475502014e-01 1.2697030305862427e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 913 1.0898499935865402e-01</internalNodes>\n          <leafValues>\n            1.4894300699234009e-01 -2.1534640789031982e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 914 -3.4077998250722885e-02</internalNodes>\n          <leafValues>\n            1.3779460191726685e+00 -1.6198499500751495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 915 -3.7489999085664749e-03</internalNodes>\n          <leafValues>\n            -3.3828601241111755e-01 2.1152900159358978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 916 -1.0971999727189541e-02</internalNodes>\n          <leafValues>\n            7.6517897844314575e-01 -1.9692599773406982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 917 -1.1485000140964985e-02</internalNodes>\n          <leafValues>\n            -6.9271200895309448e-01 2.1657100319862366e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 918 2.5984000414609909e-02</internalNodes>\n          <leafValues>\n            -1.1983999982476234e-02 -9.9697297811508179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 919 4.2159999720752239e-03</internalNodes>\n          <leafValues>\n            -1.0205700248479843e-01 4.8884400725364685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 920 -4.7697000205516815e-02</internalNodes>\n          <leafValues>\n            1.0666010379791260e+00 -1.7576299607753754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 921 4.0300001273863018e-04</internalNodes>\n          <leafValues>\n            1.8524800240993500e-01 -7.4790000915527344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 922 1.1539600044488907e-01</internalNodes>\n          <leafValues>\n            -2.2019700706005096e-01 5.4509997367858887e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 923 1.6021000221371651e-02</internalNodes>\n          <leafValues>\n            2.5487500429153442e-01 -5.0740098953247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 924 5.6632000952959061e-02</internalNodes>\n          <leafValues>\n            -1.1256000027060509e-02 -9.5968097448348999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 925 -1.0726000182330608e-02</internalNodes>\n          <leafValues>\n            -2.8544700145721436e-01 1.6994799673557281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 926 1.2420000135898590e-01</internalNodes>\n          <leafValues>\n            -3.6139998584985733e-02 -1.3132710456848145e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 927 -5.3799999877810478e-03</internalNodes>\n          <leafValues>\n            3.3092701435089111e-01 1.3307999819517136e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 928 1.1908000335097313e-02</internalNodes>\n          <leafValues>\n            -3.4830299019813538e-01 2.4041900038719177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 929 -4.3007999658584595e-02</internalNodes>\n          <leafValues>\n            -1.4390469789505005e+00 1.5599599480628967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 930 -3.3149998635053635e-02</internalNodes>\n          <leafValues>\n            -1.1805850267410278e+00 -1.2347999960184097e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 931 -2.1341999992728233e-02</internalNodes>\n          <leafValues>\n            2.2119441032409668e+00 6.2737002968788147e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 932 -1.2218999676406384e-02</internalNodes>\n          <leafValues>\n            -1.8709750175476074e+00 -4.5499999076128006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 933 -1.6860999166965485e-02</internalNodes>\n          <leafValues>\n            -7.6912701129913330e-01 1.5330000221729279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 934 -2.4999999441206455e-03</internalNodes>\n          <leafValues>\n            -6.2987399101257324e-01 5.1600001752376556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 935 -4.5037999749183655e-02</internalNodes>\n          <leafValues>\n            8.5428899526596069e-01 6.2600001692771912e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 936 3.9057999849319458e-02</internalNodes>\n          <leafValues>\n            -3.2458998262882233e-02 -1.3325669765472412e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 937 6.6720000468194485e-03</internalNodes>\n          <leafValues>\n            -1.9423599541187286e-01 3.7328699231147766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 938 -1.6361000016331673e-02</internalNodes>\n          <leafValues>\n            2.0605869293212891e+00 -1.5042699873447418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 939 6.1719999648630619e-03</internalNodes>\n          <leafValues>\n            -1.1610999703407288e-01 2.5455400347709656e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 940 4.5722000300884247e-02</internalNodes>\n          <leafValues>\n            -1.6340000554919243e-02 -1.0449140071868896e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 941 4.1209999471902847e-03</internalNodes>\n          <leafValues>\n            -4.1997998952865601e-02 3.9680999517440796e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 942 -1.7800000205170363e-04</internalNodes>\n          <leafValues>\n            -6.6422599554061890e-01 3.3443000167608261e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 943 7.1109998971223831e-03</internalNodes>\n          <leafValues>\n            -5.8231998234987259e-02 3.7857300043106079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 944 -4.9864001572132111e-02</internalNodes>\n          <leafValues>\n            6.1019402742385864e-01 -2.1005700528621674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 945 -2.5011999532580376e-02</internalNodes>\n          <leafValues>\n            -5.7100099325180054e-01 1.7848399281501770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 946 3.0939999967813492e-02</internalNodes>\n          <leafValues>\n            5.6363001465797424e-02 -6.4731001853942871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 947 4.6271000057458878e-02</internalNodes>\n          <leafValues>\n            1.7482399940490723e-01 -9.8909401893615723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 948 -3.1870000530034304e-03</internalNodes>\n          <leafValues>\n            -6.6804802417755127e-01 3.2267000526189804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 949 -2.4351999163627625e-02</internalNodes>\n          <leafValues>\n            2.9444900155067444e-01 -1.3599999947473407e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 950 1.1974000371992588e-02</internalNodes>\n          <leafValues>\n            -2.8345099091529846e-01 4.7171199321746826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 951 1.3070000335574150e-02</internalNodes>\n          <leafValues>\n            -1.0834600031375885e-01 5.7193297147750854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 952 5.9163000434637070e-02</internalNodes>\n          <leafValues>\n            -5.0939001142978668e-02 -1.9059720039367676e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 953 -4.1094999760389328e-02</internalNodes>\n          <leafValues>\n            4.5104598999023438e-01 -9.7599998116493225e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 954 -8.3989001810550690e-02</internalNodes>\n          <leafValues>\n            -2.0349199771881104e+00 -5.1019001752138138e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 955 4.4619001448154449e-02</internalNodes>\n          <leafValues>\n            1.7041100561618805e-01 -1.2278720140457153e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 956 2.4419000372290611e-02</internalNodes>\n          <leafValues>\n            -2.1796999499201775e-02 -1.0822949409484863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 957 -4.3870001100003719e-03</internalNodes>\n          <leafValues>\n            3.0466699600219727e-01 -3.7066599726676941e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 958 2.4607999250292778e-02</internalNodes>\n          <leafValues>\n            -3.1169500946998596e-01 2.3657299578189850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 959 -8.5182003676891327e-02</internalNodes>\n          <leafValues>\n            -1.7982350587844849e+00 1.5254299342632294e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 960 2.1844999864697456e-02</internalNodes>\n          <leafValues>\n            -5.1888000220060349e-02 -1.9017189741134644e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 961 -1.6829000785946846e-02</internalNodes>\n          <leafValues>\n            2.1025900542736053e-01 2.1656999364495277e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 962 3.2547999173402786e-02</internalNodes>\n          <leafValues>\n            -2.0292599499225616e-01 6.0944002866744995e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 963 2.4709999561309814e-03</internalNodes>\n          <leafValues>\n            -9.5371198654174805e-01 1.8568399548530579e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 964 5.5415999144315720e-02</internalNodes>\n          <leafValues>\n            -1.4405299723148346e-01 2.1506340503692627e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 965 -1.0635499656200409e-01</internalNodes>\n          <leafValues>\n            -1.0911970138549805e+00 1.3228000700473785e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 966 -7.9889995977282524e-03</internalNodes>\n          <leafValues>\n            1.0253400355577469e-01 -5.1744902133941650e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 967 7.5567997992038727e-02</internalNodes>\n          <leafValues>\n            5.8965001255273819e-02 1.2354209423065186e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 968 -9.2805996537208557e-02</internalNodes>\n          <leafValues>\n            -1.3431650400161743e+00 -3.4462999552488327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 969 4.9431998282670975e-02</internalNodes>\n          <leafValues>\n            4.9601998180150986e-02 1.6054730415344238e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 970 -1.1772999539971352e-02</internalNodes>\n          <leafValues>\n            -1.0261050462722778e+00 -4.1559999808669090e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 971 8.5886001586914062e-02</internalNodes>\n          <leafValues>\n            8.4642998874187469e-02 9.5220798254013062e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 972 8.1031002104282379e-02</internalNodes>\n          <leafValues>\n            -1.4687100052833557e-01 1.9359990358352661e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>136</maxWeakCount>\n      <stageThreshold>-3.4265899658203125e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 973 -3.3840999007225037e-02</internalNodes>\n          <leafValues>\n            6.5889501571655273e-01 -6.9755297899246216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 974 1.5410000458359718e-02</internalNodes>\n          <leafValues>\n            -9.0728402137756348e-01 3.0478599667549133e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 975 5.4905999451875687e-02</internalNodes>\n          <leafValues>\n            -4.9774798750877380e-01 5.7132601737976074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 976 2.1390000358223915e-02</internalNodes>\n          <leafValues>\n            -4.2565199732780457e-01 5.8096802234649658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 977 7.8849997371435165e-03</internalNodes>\n          <leafValues>\n            -4.7905999422073364e-01 4.3016499280929565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 978 -3.7544999271631241e-02</internalNodes>\n          <leafValues>\n            5.0861597061157227e-01 -1.9985899329185486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 979 1.5925799310207367e-01</internalNodes>\n          <leafValues>\n            -2.3263600468635559e-01 1.0993319749832153e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 980 -6.8939998745918274e-02</internalNodes>\n          <leafValues>\n            4.0569001436233521e-01 5.6855000555515289e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 981 -3.3695001155138016e-02</internalNodes>\n          <leafValues>\n            4.5132800936698914e-01 -3.3332800865173340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 982 -6.3314996659755707e-02</internalNodes>\n          <leafValues>\n            -8.5015702247619629e-01 2.2341699898242950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 983 7.3699997738003731e-03</internalNodes>\n          <leafValues>\n            -9.3082201480865479e-01 5.9216998517513275e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 984 -9.5969997346401215e-03</internalNodes>\n          <leafValues>\n            -1.2794899940490723e+00 1.8447299301624298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 985 -1.3067999482154846e-01</internalNodes>\n          <leafValues>\n            5.8426898717880249e-01 -2.6007199287414551e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 986 5.7402998208999634e-02</internalNodes>\n          <leafValues>\n            -5.3789000958204269e-02 7.1175599098205566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 987 -7.2340001352131367e-03</internalNodes>\n          <leafValues>\n            -8.6962199211120605e-01 7.5214996933937073e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 988 3.1098999083042145e-02</internalNodes>\n          <leafValues>\n            -7.5006999075412750e-02 9.0781599283218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 989 3.5854000598192215e-02</internalNodes>\n          <leafValues>\n            -2.4795499444007874e-01 7.2272098064422607e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 990 -3.1534999608993530e-02</internalNodes>\n          <leafValues>\n            -1.1238329410552979e+00 2.0988300442695618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 991 -1.9437000155448914e-02</internalNodes>\n          <leafValues>\n            -1.4499390125274658e+00 -1.5100000426173210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 992 -7.2420001961290836e-03</internalNodes>\n          <leafValues>\n            5.3864902257919312e-01 -1.1375399678945541e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 993 8.1639997661113739e-03</internalNodes>\n          <leafValues>\n            6.6889002919197083e-02 -7.6872897148132324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 994 -4.3653000146150589e-02</internalNodes>\n          <leafValues>\n            1.1413530111312866e+00 4.0217000991106033e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 995 2.6569999754428864e-02</internalNodes>\n          <leafValues>\n            -2.4719099700450897e-01 5.9295099973678589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 996 3.2216999679803848e-02</internalNodes>\n          <leafValues>\n            -4.0024999529123306e-02 3.2688000798225403e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 997 -7.2236001491546631e-02</internalNodes>\n          <leafValues>\n            5.8729398250579834e-01 -2.5396001338958740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 998 3.1424999237060547e-02</internalNodes>\n          <leafValues>\n            1.5315100550651550e-01 -5.6042098999023438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 999 -4.7699999413453043e-04</internalNodes>\n          <leafValues>\n            1.6958899796009064e-01 -5.2626699209213257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1000 2.7189999818801880e-03</internalNodes>\n          <leafValues>\n            -1.4944599568843842e-01 2.9658699035644531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1001 3.2875001430511475e-02</internalNodes>\n          <leafValues>\n            -3.9943501353263855e-01 2.5156599283218384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1002 -1.4553000219166279e-02</internalNodes>\n          <leafValues>\n            2.7972599864006042e-01 -4.7203800082206726e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1003 3.8017999380826950e-02</internalNodes>\n          <leafValues>\n            -2.9200001154094934e-03 -1.1300059556961060e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1004 2.8659999370574951e-03</internalNodes>\n          <leafValues>\n            4.1111800074577332e-01 -2.6220801472663879e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1005 -4.1606999933719635e-02</internalNodes>\n          <leafValues>\n            -1.4293819665908813e+00 -1.9132999703288078e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1006 -2.4802999570965767e-02</internalNodes>\n          <leafValues>\n            -2.5013598799705505e-01 1.5978699922561646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1007 1.0098000057041645e-02</internalNodes>\n          <leafValues>\n            4.3738998472690582e-02 -6.9986099004745483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1008 -2.0947000011801720e-02</internalNodes>\n          <leafValues>\n            -9.4137799739837646e-01 2.3204000294208527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1009 2.2458000108599663e-02</internalNodes>\n          <leafValues>\n            -2.7185800671577454e-01 4.5319199562072754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1010 -3.7110999226570129e-02</internalNodes>\n          <leafValues>\n            -1.0314660072326660e+00 1.4421799778938293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1011 -1.0648000054061413e-02</internalNodes>\n          <leafValues>\n            6.3107001781463623e-01 -2.5520798563957214e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1012 5.5422998964786530e-02</internalNodes>\n          <leafValues>\n            1.6206599771976471e-01 -1.7722640037536621e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1013 2.1601999178528786e-02</internalNodes>\n          <leafValues>\n            -2.5016099214553833e-01 5.4119801521301270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1014 8.7000000348780304e-05</internalNodes>\n          <leafValues>\n            -2.9008901119232178e-01 3.3507999777793884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1015 1.4406000263988972e-02</internalNodes>\n          <leafValues>\n            -7.8840004280209541e-03 -1.1677219867706299e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1016 1.0777399688959122e-01</internalNodes>\n          <leafValues>\n            1.1292000114917755e-01 -2.4940319061279297e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1017 3.5943999886512756e-02</internalNodes>\n          <leafValues>\n            -1.9480599462985992e-01 9.5757502317428589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1018 -3.9510000497102737e-03</internalNodes>\n          <leafValues>\n            3.0927801132202148e-01 -2.5530201196670532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1019 2.0942000672221184e-02</internalNodes>\n          <leafValues>\n            -7.6319999061524868e-03 -1.0086350440979004e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1020 -2.9877999797463417e-02</internalNodes>\n          <leafValues>\n            -4.6027699112892151e-01 1.9507199525833130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1021 2.5971999391913414e-02</internalNodes>\n          <leafValues>\n            -1.2187999673187733e-02 -1.0035500526428223e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1022 1.0603000409901142e-02</internalNodes>\n          <leafValues>\n            -7.5969003140926361e-02 4.1669899225234985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1023 8.5819996893405914e-03</internalNodes>\n          <leafValues>\n            -2.6648598909378052e-01 3.9111500978469849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1024 2.1270999684929848e-02</internalNodes>\n          <leafValues>\n            1.8273900449275970e-01 -3.6052298545837402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1025 7.4518002569675446e-02</internalNodes>\n          <leafValues>\n            -1.8938399851322174e-01 9.2658001184463501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1026 4.6569998376071453e-03</internalNodes>\n          <leafValues>\n            -1.4506199955940247e-01 3.3294600248336792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1027 1.7119999974966049e-03</internalNodes>\n          <leafValues>\n            -5.2464002370834351e-01 8.9879997074604034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1028 9.8500004969537258e-04</internalNodes>\n          <leafValues>\n            -3.8381999731063843e-01 2.4392999708652496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1029 2.8233999386429787e-02</internalNodes>\n          <leafValues>\n            -5.7879998348653316e-03 -1.2617139816284180e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1030 -3.2678000628948212e-02</internalNodes>\n          <leafValues>\n            -5.7953298091888428e-01 1.6955299675464630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1031 2.2536000236868858e-02</internalNodes>\n          <leafValues>\n            2.2281000390648842e-02 -8.7869602441787720e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1032 -2.1657999604940414e-02</internalNodes>\n          <leafValues>\n            -6.5108501911163330e-01 1.2966899573802948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1033 7.6799998059868813e-03</internalNodes>\n          <leafValues>\n            -3.3965200185775757e-01 2.2013300657272339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1034 1.4592000283300877e-02</internalNodes>\n          <leafValues>\n            1.5077300369739532e-01 -5.0452399253845215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1035 2.7868000790476799e-02</internalNodes>\n          <leafValues>\n            -2.5045299530029297e-01 4.5741999149322510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1036 5.6940000504255295e-03</internalNodes>\n          <leafValues>\n            -1.0948500037193298e-01 5.5757802724838257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1037 -1.0002999566495419e-02</internalNodes>\n          <leafValues>\n            -9.7366297245025635e-01 1.8467999994754791e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1038 -4.0719998069107533e-03</internalNodes>\n          <leafValues>\n            3.8222199678421021e-01 -1.6921100020408630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1039 -2.2593999281525612e-02</internalNodes>\n          <leafValues>\n            -1.0391089916229248e+00 5.1839998923242092e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1040 -3.9579998701810837e-02</internalNodes>\n          <leafValues>\n            -5.5109229087829590e+00 1.1163999885320663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1041 -1.7537999898195267e-02</internalNodes>\n          <leafValues>\n            9.5485800504684448e-01 -1.8584500253200531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1042 9.0300003066658974e-03</internalNodes>\n          <leafValues>\n            1.0436000302433968e-02 8.2114797830581665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1043 -7.9539995640516281e-03</internalNodes>\n          <leafValues>\n            2.2632899880409241e-01 -3.4568199515342712e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1044 2.7091000229120255e-02</internalNodes>\n          <leafValues>\n            1.6430099308490753e-01 -1.3926379680633545e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1045 -2.0625999197363853e-02</internalNodes>\n          <leafValues>\n            -8.6366099119186401e-01 2.3880000226199627e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1046 -7.1989998221397400e-02</internalNodes>\n          <leafValues>\n            -2.8192629814147949e+00 1.1570499837398529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1047 -2.6964999735355377e-02</internalNodes>\n          <leafValues>\n            -1.2946130037307739e+00 -2.4661000818014145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1048 -4.7377999871969223e-02</internalNodes>\n          <leafValues>\n            -8.1306397914886475e-01 1.1831399798393250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1049 -1.0895600169897079e-01</internalNodes>\n          <leafValues>\n            6.5937900543212891e-01 -2.0843900740146637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1050 1.3574000447988510e-02</internalNodes>\n          <leafValues>\n            7.4240001849830151e-03 5.3152197599411011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1051 -6.6920001991093159e-03</internalNodes>\n          <leafValues>\n            3.0655801296234131e-01 -3.1084299087524414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1052 -3.9070001803338528e-03</internalNodes>\n          <leafValues>\n            2.5576499104499817e-01 -5.2932001650333405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1053 -3.7613000720739365e-02</internalNodes>\n          <leafValues>\n            -1.4350049495697021e+00 -1.5448000282049179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1054 8.6329998448491096e-03</internalNodes>\n          <leafValues>\n            -1.6884399950504303e-01 4.2124900221824646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1055 -3.2097000628709793e-02</internalNodes>\n          <leafValues>\n            -6.4979398250579834e-01 4.1110001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1056 5.8495998382568359e-02</internalNodes>\n          <leafValues>\n            -5.2963998168706894e-02 6.3368302583694458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1057 -4.0901999920606613e-02</internalNodes>\n          <leafValues>\n            -9.2101097106933594e-01 9.0640000998973846e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1058 -1.9925000146031380e-02</internalNodes>\n          <leafValues>\n            5.3759998083114624e-01 -6.2996998429298401e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1059 -4.6020001173019409e-03</internalNodes>\n          <leafValues>\n            -5.4333502054214478e-01 8.4104999899864197e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1060 1.6824999824166298e-02</internalNodes>\n          <leafValues>\n            1.5563699603080750e-01 -4.0171200037002563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1061 9.4790002331137657e-03</internalNodes>\n          <leafValues>\n            -2.4245299398899078e-01 5.1509499549865723e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1062 -1.9534999504685402e-02</internalNodes>\n          <leafValues>\n            -5.1118397712707520e-01 1.3831999897956848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1063 1.0746000334620476e-02</internalNodes>\n          <leafValues>\n            -2.1854999661445618e-01 6.2828701734542847e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1064 3.7927001714706421e-02</internalNodes>\n          <leafValues>\n            1.1640299856662750e-01 -2.7301959991455078e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1065 1.6390999779105186e-02</internalNodes>\n          <leafValues>\n            -1.4635999687016010e-02 -1.0797250270843506e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1066 -1.9785000011324883e-02</internalNodes>\n          <leafValues>\n            1.2166420221328735e+00 3.3275000751018524e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1067 1.1067000217735767e-02</internalNodes>\n          <leafValues>\n            -2.5388300418853760e-01 4.4038599729537964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1068 5.2479999139904976e-03</internalNodes>\n          <leafValues>\n            2.2496800124645233e-01 -2.4216499924659729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1069 -1.1141999624669552e-02</internalNodes>\n          <leafValues>\n            2.5018098950386047e-01 -3.0811500549316406e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1070 -1.0666999965906143e-02</internalNodes>\n          <leafValues>\n            -3.2729101181030273e-01 2.6168298721313477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1071 1.0545299947261810e-01</internalNodes>\n          <leafValues>\n            -5.5750001221895218e-02 -1.9605729579925537e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1072 5.4827999323606491e-02</internalNodes>\n          <leafValues>\n            -1.9519999623298645e-03 7.3866099119186401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1073 1.7760999500751495e-02</internalNodes>\n          <leafValues>\n            -3.0647200345993042e-01 2.6346999406814575e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1074 -3.1185999512672424e-02</internalNodes>\n          <leafValues>\n            -2.4600900709629059e-01 1.7082199454307556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1075 -5.7296000421047211e-02</internalNodes>\n          <leafValues>\n            4.7033500671386719e-01 -2.6048299670219421e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1076 -1.1312000453472137e-02</internalNodes>\n          <leafValues>\n            3.8628900051116943e-01 -2.8817000985145569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1077 3.0592000111937523e-02</internalNodes>\n          <leafValues>\n            -4.8826001584529877e-02 -1.7638969421386719e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1078 1.8489999929443002e-03</internalNodes>\n          <leafValues>\n            2.1099899709224701e-01 -2.5940999388694763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1079 1.1419000104069710e-02</internalNodes>\n          <leafValues>\n            -1.6829599440097809e-01 1.0278660058975220e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1080 8.1403002142906189e-02</internalNodes>\n          <leafValues>\n            1.1531999707221985e-01 -1.2482399940490723e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1081 5.3495999425649643e-02</internalNodes>\n          <leafValues>\n            -4.6303998678922653e-02 -1.7165969610214233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1082 -2.3948000743985176e-02</internalNodes>\n          <leafValues>\n            -4.0246599912643433e-01 2.0562100410461426e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1083 6.7690000869333744e-03</internalNodes>\n          <leafValues>\n            -3.3152300119400024e-01 2.0683400332927704e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1084 -3.2343998551368713e-02</internalNodes>\n          <leafValues>\n            -7.2632801532745361e-01 2.0073500275611877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1085 3.7863001227378845e-02</internalNodes>\n          <leafValues>\n            -1.5631000697612762e-01 1.6697460412979126e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1086 1.5440000221133232e-02</internalNodes>\n          <leafValues>\n            1.9487400352954865e-01 -3.5384199023246765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1087 -4.4376000761985779e-02</internalNodes>\n          <leafValues>\n            8.2093602418899536e-01 -1.8193599581718445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1088 -2.3102000355720520e-02</internalNodes>\n          <leafValues>\n            -4.3044099211692810e-01 1.2375400215387344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1089 1.9400000572204590e-02</internalNodes>\n          <leafValues>\n            -2.9726000502705574e-02 -1.1597590446472168e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1090 1.0385700315237045e-01</internalNodes>\n          <leafValues>\n            1.1149899661540985e-01 -4.6835222244262695e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1091 -1.8964000046253204e-02</internalNodes>\n          <leafValues>\n            2.1773819923400879e+00 -1.4544400572776794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1092 3.8750998675823212e-02</internalNodes>\n          <leafValues>\n            -4.9446001648902893e-02 3.4018298983573914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1093 2.2766999900341034e-02</internalNodes>\n          <leafValues>\n            -3.2802999019622803e-01 3.0531400442123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1094 -3.1357001513242722e-02</internalNodes>\n          <leafValues>\n            1.1520819664001465e+00 2.7305999770760536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1095 9.6909999847412109e-03</internalNodes>\n          <leafValues>\n            -3.8799500465393066e-01 2.1512599289417267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1096 -4.9284998327493668e-02</internalNodes>\n          <leafValues>\n            -1.6774909496307373e+00 1.5774199366569519e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1097 -3.9510998874902725e-02</internalNodes>\n          <leafValues>\n            -9.7647899389266968e-01 -1.0552000254392624e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1098 4.7997999936342239e-02</internalNodes>\n          <leafValues>\n            2.0843900740146637e-01 -6.8992799520492554e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1099 5.1422998309135437e-02</internalNodes>\n          <leafValues>\n            -1.6665300726890564e-01 1.2149239778518677e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1100 1.4279999770224094e-02</internalNodes>\n          <leafValues>\n            2.3627699911594391e-01 -4.1396799683570862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1101 -9.1611996293067932e-02</internalNodes>\n          <leafValues>\n            -9.2830902338027954e-01 -1.8345000222325325e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1102 6.5080001950263977e-03</internalNodes>\n          <leafValues>\n            -7.3647201061248779e-01 1.9497099518775940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1103 3.5723000764846802e-02</internalNodes>\n          <leafValues>\n            1.4197799563407898e-01 -4.2089301347732544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1104 5.0638001412153244e-02</internalNodes>\n          <leafValues>\n            1.1644000187516212e-02 7.8486597537994385e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1105 -1.4613999985158443e-02</internalNodes>\n          <leafValues>\n            -1.1909500360488892e+00 -3.5128001123666763e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1106 -3.8662999868392944e-02</internalNodes>\n          <leafValues>\n            2.4314730167388916e+00 6.5647996962070465e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1107 -4.0346998721361160e-02</internalNodes>\n          <leafValues>\n            7.1755301952362061e-01 -1.9108299911022186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1108 2.3902000859379768e-02</internalNodes>\n          <leafValues>\n            1.5646199882030487e-01 -7.9294800758361816e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>137</maxWeakCount>\n      <stageThreshold>-3.5125269889831543e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1109 8.5640000179409981e-03</internalNodes>\n          <leafValues>\n            -8.1450700759887695e-01 5.8875298500061035e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1110 -1.3292600214481354e-01</internalNodes>\n          <leafValues>\n            9.3213397264480591e-01 -2.9367300868034363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1111 9.8400004208087921e-03</internalNodes>\n          <leafValues>\n            -5.6462901830673218e-01 4.1647699475288391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1112 5.0889998674392700e-03</internalNodes>\n          <leafValues>\n            -7.9232800006866455e-01 1.6975000500679016e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1113 -6.1039000749588013e-02</internalNodes>\n          <leafValues>\n            -1.4169000387191772e+00 2.5020999833941460e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1114 -4.6599999768659472e-04</internalNodes>\n          <leafValues>\n            3.7982499599456787e-01 -4.1567099094390869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1115 3.3889999613165855e-03</internalNodes>\n          <leafValues>\n            -4.0768599510192871e-01 3.5548499226570129e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1116 2.1006999537348747e-02</internalNodes>\n          <leafValues>\n            -2.4080100655555725e-01 8.6112701892852783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1117 7.5559997931122780e-03</internalNodes>\n          <leafValues>\n            -8.7467199563980103e-01 9.8572000861167908e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1118 2.4779999628663063e-02</internalNodes>\n          <leafValues>\n            1.5566200017929077e-01 -6.9229799509048462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1119 -3.5620000213384628e-02</internalNodes>\n          <leafValues>\n            -1.1472270488739014e+00 3.6359999328851700e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1120 1.9810000434517860e-02</internalNodes>\n          <leafValues>\n            1.5516200661659241e-01 -6.9520097970962524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1121 1.5019999817013741e-02</internalNodes>\n          <leafValues>\n            4.1990000754594803e-02 -9.6622800827026367e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1122 -2.3137999698519707e-02</internalNodes>\n          <leafValues>\n            4.3396899104118347e-01 2.4160000029951334e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1123 -1.8743000924587250e-02</internalNodes>\n          <leafValues>\n            4.3481099605560303e-01 -3.2522499561309814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1124 4.5080000162124634e-01</internalNodes>\n          <leafValues>\n            -9.4573996961116791e-02 7.2421300411224365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1125 1.1854999698698521e-02</internalNodes>\n          <leafValues>\n            -3.8133099675178528e-01 3.0098399519920349e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1126 -2.4830000475049019e-02</internalNodes>\n          <leafValues>\n            8.9300602674484253e-01 -1.0295899957418442e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1127 -4.4743001461029053e-02</internalNodes>\n          <leafValues>\n            8.6280298233032227e-01 -2.1716499328613281e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1128 -1.4600000344216824e-02</internalNodes>\n          <leafValues>\n            6.0069400072097778e-01 -1.5906299650669098e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1129 -2.4527000263333321e-02</internalNodes>\n          <leafValues>\n            -1.5872869491577148e+00 -2.1817000582814217e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1130 2.3024000227451324e-02</internalNodes>\n          <leafValues>\n            1.6853399574756622e-01 -3.8106900453567505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1131 -2.4917000904679298e-02</internalNodes>\n          <leafValues>\n            5.0810897350311279e-01 -2.7279898524284363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1132 1.0130000300705433e-03</internalNodes>\n          <leafValues>\n            -4.3138799071311951e-01 2.6438099145889282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1133 1.5603000298142433e-02</internalNodes>\n          <leafValues>\n            -3.1624200940132141e-01 5.5715900659561157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1134 -2.6685999706387520e-02</internalNodes>\n          <leafValues>\n            1.0553920269012451e+00 2.9074000194668770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1135 1.3940000208094716e-03</internalNodes>\n          <leafValues>\n            -7.1873801946640015e-01 6.5390996634960175e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1136 -6.4799998654052615e-04</internalNodes>\n          <leafValues>\n            2.4884399771690369e-01 -2.0978200435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1137 -3.1888000667095184e-02</internalNodes>\n          <leafValues>\n            -6.8844497203826904e-01 6.3589997589588165e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1138 -4.9290000461041927e-03</internalNodes>\n          <leafValues>\n            -5.9152501821517944e-01 2.7943599224090576e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1139 3.1168000772595406e-02</internalNodes>\n          <leafValues>\n            4.5223999768495560e-02 -8.8639199733734131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1140 -3.3663000911474228e-02</internalNodes>\n          <leafValues>\n            -6.1590200662612915e-01 1.5749299526214600e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1141 1.1966999620199203e-02</internalNodes>\n          <leafValues>\n            -3.0606698989868164e-01 4.2293301224708557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1142 -3.4680001437664032e-02</internalNodes>\n          <leafValues>\n            -1.3734940290451050e+00 1.5908700227737427e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1143 9.9290004000067711e-03</internalNodes>\n          <leafValues>\n            -5.5860197544097900e-01 1.2119200080633163e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1144 5.9574998915195465e-02</internalNodes>\n          <leafValues>\n            4.9720001406967640e-03 8.2055401802062988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1145 -6.5428003668785095e-02</internalNodes>\n          <leafValues>\n            1.5651429891586304e+00 -1.6817499697208405e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1146 -9.2895999550819397e-02</internalNodes>\n          <leafValues>\n            -1.5794529914855957e+00 1.4661799371242523e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1147 -4.1184000670909882e-02</internalNodes>\n          <leafValues>\n            -1.5518720149993896e+00 -2.9969999566674232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1148 2.1447999402880669e-02</internalNodes>\n          <leafValues>\n            1.7196300625801086e-01 -6.9343197345733643e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1149 -2.5569999590516090e-02</internalNodes>\n          <leafValues>\n            -1.3061310052871704e+00 -2.4336999282240868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1150 -4.1200999170541763e-02</internalNodes>\n          <leafValues>\n            -1.3821059465408325e+00 1.4801800251007080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1151 -1.7668999731540680e-02</internalNodes>\n          <leafValues>\n            -7.0889997482299805e-01 3.6524001508951187e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1152 9.0060001239180565e-03</internalNodes>\n          <leafValues>\n            -4.0913999080657959e-02 8.0373102426528931e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1153 -1.1652999557554722e-02</internalNodes>\n          <leafValues>\n            5.7546800374984741e-01 -2.4991700053215027e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1154 -7.4780001305043697e-03</internalNodes>\n          <leafValues>\n            -4.9280899763107300e-01 1.9810900092124939e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1155 8.5499999113380909e-04</internalNodes>\n          <leafValues>\n            -4.8858100175857544e-01 1.3563099503517151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1156 -3.0538000166416168e-02</internalNodes>\n          <leafValues>\n            -6.0278397798538208e-01 1.8522000312805176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1157 -1.8846999853849411e-02</internalNodes>\n          <leafValues>\n            2.3565599322319031e-01 -3.5136300325393677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1158 -8.1129996106028557e-03</internalNodes>\n          <leafValues>\n            -8.1304997205734253e-02 2.1069599688053131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1159 -3.4830000251531601e-02</internalNodes>\n          <leafValues>\n            -1.2065670490264893e+00 -1.4251999557018280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1160 1.9021000713109970e-02</internalNodes>\n          <leafValues>\n            2.3349900543689728e-01 -4.5664900541305542e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1161 -1.9004000350832939e-02</internalNodes>\n          <leafValues>\n            -8.1075799465179443e-01 1.3140000402927399e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1162 -8.9057996869087219e-02</internalNodes>\n          <leafValues>\n            6.1542397737503052e-01 3.2983001321554184e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1163 6.8620000965893269e-03</internalNodes>\n          <leafValues>\n            -2.9583099484443665e-01 2.7003699541091919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1164 -2.8240999206900597e-02</internalNodes>\n          <leafValues>\n            -6.1102700233459473e-01 1.7357499897480011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1165 -3.2099999953061342e-04</internalNodes>\n          <leafValues>\n            -5.3322899341583252e-01 6.8539001047611237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1166 -1.0829100012779236e-01</internalNodes>\n          <leafValues>\n            -1.2879559993743896e+00 1.1801700294017792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1167 1.5878999605774879e-02</internalNodes>\n          <leafValues>\n            -1.7072600126266479e-01 1.1103910207748413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1168 8.6859995499253273e-03</internalNodes>\n          <leafValues>\n            -1.0995099693536758e-01 4.6010500192642212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1169 -2.5234999135136604e-02</internalNodes>\n          <leafValues>\n            1.0220669507980347e+00 -1.8694299459457397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1170 -1.3508999720215797e-02</internalNodes>\n          <leafValues>\n            -7.8316599130630493e-01 1.4202600717544556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1171 -7.7149998396635056e-03</internalNodes>\n          <leafValues>\n            -8.8060700893402100e-01 1.1060000397264957e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1172 7.1580000221729279e-02</internalNodes>\n          <leafValues>\n            1.1369399726390839e-01 -1.1032789945602417e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1173 -1.3554000295698643e-02</internalNodes>\n          <leafValues>\n            -8.1096500158309937e-01 3.4080001059919596e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1174 2.9450000729411840e-03</internalNodes>\n          <leafValues>\n            -7.2879999876022339e-02 3.4998100996017456e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1175 -5.0833001732826233e-02</internalNodes>\n          <leafValues>\n            -1.2868590354919434e+00 -2.8842000290751457e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1176 -8.7989997118711472e-03</internalNodes>\n          <leafValues>\n            4.7613599896430969e-01 -1.4690400660037994e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1177 2.1424399316310883e-01</internalNodes>\n          <leafValues>\n            -5.9702001512050629e-02 -2.4802260398864746e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1178 1.3962999917566776e-02</internalNodes>\n          <leafValues>\n            1.7420299351215363e-01 -4.3911001086235046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1179 4.2502000927925110e-02</internalNodes>\n          <leafValues>\n            -1.9965299963951111e-01 7.0654797554016113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1180 1.9827999174594879e-02</internalNodes>\n          <leafValues>\n            -6.9136001169681549e-02 6.1643397808074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1181 -3.3560000360012054e-02</internalNodes>\n          <leafValues>\n            -1.2740780115127563e+00 -2.5673000141978264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1182 6.3542999327182770e-02</internalNodes>\n          <leafValues>\n            1.2403500080108643e-01 -1.0776289701461792e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1183 2.1933000534772873e-02</internalNodes>\n          <leafValues>\n            1.4952000230550766e-02 -7.1023499965667725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1184 -7.8424997627735138e-02</internalNodes>\n          <leafValues>\n            6.2033998966217041e-01 3.3610999584197998e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1185 1.4390000142157078e-02</internalNodes>\n          <leafValues>\n            -3.6324599385261536e-01 1.7308300733566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1186 -6.7309997975826263e-02</internalNodes>\n          <leafValues>\n            5.2374100685119629e-01 1.2799999676644802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1187 1.3047499954700470e-01</internalNodes>\n          <leafValues>\n            -1.7122499644756317e-01 1.1235200166702271e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1188 -4.6245999634265900e-02</internalNodes>\n          <leafValues>\n            -1.1908329725265503e+00 1.7425599694252014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1189 -2.9842000454664230e-02</internalNodes>\n          <leafValues>\n            8.3930599689483643e-01 -1.8064199388027191e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1190 -3.8099999073892832e-04</internalNodes>\n          <leafValues>\n            3.5532799363136292e-01 -2.3842300474643707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1191 -2.2378999739885330e-02</internalNodes>\n          <leafValues>\n            -8.7943899631500244e-01 -7.8399997437372804e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1192 -1.5569999814033508e-03</internalNodes>\n          <leafValues>\n            -1.4253300428390503e-01 2.5876200199127197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1193 1.2013000436127186e-02</internalNodes>\n          <leafValues>\n            -2.9015499353408813e-01 2.6051101088523865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1194 2.4384999647736549e-02</internalNodes>\n          <leafValues>\n            -3.1438998878002167e-02 5.8695900440216064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1195 -4.7180999070405960e-02</internalNodes>\n          <leafValues>\n            6.9430100917816162e-01 -2.1816100180149078e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1196 -2.4893999099731445e-02</internalNodes>\n          <leafValues>\n            -6.4599299430847168e-01 1.5611599385738373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1197 2.1944999694824219e-02</internalNodes>\n          <leafValues>\n            -2.7742000296711922e-02 -1.1346880197525024e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1198 1.8809899687767029e-01</internalNodes>\n          <leafValues>\n            -1.0076000355184078e-02 1.2429029941558838e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1199 -7.7872000634670258e-02</internalNodes>\n          <leafValues>\n            8.5008001327514648e-01 -1.9015499949455261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1200 -4.8769000917673111e-02</internalNodes>\n          <leafValues>\n            -2.0763080120086670e+00 1.2179400026798248e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1201 -1.7115000635385513e-02</internalNodes>\n          <leafValues>\n            -8.5687297582626343e-01 7.8760003671050072e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1202 -2.7499999850988388e-03</internalNodes>\n          <leafValues>\n            3.8645499944686890e-01 -1.1391499638557434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1203 -9.8793998360633850e-02</internalNodes>\n          <leafValues>\n            -1.7233899831771851e+00 -5.6063000112771988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1204 -2.1936999633908272e-02</internalNodes>\n          <leafValues>\n            5.4749399423599243e-01 -4.2481999844312668e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1205 6.1096999794244766e-02</internalNodes>\n          <leafValues>\n            -3.8945000618696213e-02 -1.0807880163192749e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1206 -2.4563999846577644e-02</internalNodes>\n          <leafValues>\n            5.8311098814010620e-01 -9.7599998116493225e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1207 3.3752001821994781e-02</internalNodes>\n          <leafValues>\n            -1.3795999810099602e-02 -8.4730297327041626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1208 3.8199000060558319e-02</internalNodes>\n          <leafValues>\n            1.5114299952983856e-01 -7.9473400115966797e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1209 -2.0117999985814095e-02</internalNodes>\n          <leafValues>\n            5.1579099893569946e-01 -2.1445399522781372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1210 2.4734999984502792e-02</internalNodes>\n          <leafValues>\n            -2.2105000913143158e-02 4.2917698621749878e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1211 -2.4357000365853310e-02</internalNodes>\n          <leafValues>\n            -8.6201298236846924e-01 -3.6760000512003899e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1212 -2.6442000642418861e-02</internalNodes>\n          <leafValues>\n            -4.5397499203681946e-01 2.2462800145149231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1213 -3.4429999068379402e-03</internalNodes>\n          <leafValues>\n            1.3073000311851501e-01 -3.8622701168060303e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1214 1.0701700299978256e-01</internalNodes>\n          <leafValues>\n            1.3158600032329559e-01 -7.9306900501251221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1215 4.5152999460697174e-02</internalNodes>\n          <leafValues>\n            -2.5296801328659058e-01 4.0672400593757629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1216 4.4349998235702515e-02</internalNodes>\n          <leafValues>\n            2.2613000124692917e-02 7.9618102312088013e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1217 1.0839999886229634e-03</internalNodes>\n          <leafValues>\n            -3.9158400893211365e-01 1.1639100313186646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1218 7.1433000266551971e-02</internalNodes>\n          <leafValues>\n            8.2466997206211090e-02 1.2530590295791626e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1219 3.5838000476360321e-02</internalNodes>\n          <leafValues>\n            -1.8203300237655640e-01 7.7078700065612793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1220 -2.0839000120759010e-02</internalNodes>\n          <leafValues>\n            -6.1744397878646851e-01 1.5891399979591370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1221 4.2525801062583923e-01</internalNodes>\n          <leafValues>\n            -4.8978000879287720e-02 -1.8422030210494995e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1222 1.1408000253140926e-02</internalNodes>\n          <leafValues>\n            1.7918199300765991e-01 -1.5383499860763550e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1223 -1.5364999882876873e-02</internalNodes>\n          <leafValues>\n            -8.4016501903533936e-01 -1.0280000278726220e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1224 -1.5212000347673893e-02</internalNodes>\n          <leafValues>\n            -1.8995699286460876e-01 1.7130999267101288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1225 -1.8972000107169151e-02</internalNodes>\n          <leafValues>\n            -7.9541999101638794e-01 6.6800001077353954e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1226 -3.3330000005662441e-03</internalNodes>\n          <leafValues>\n            -2.3530800640583038e-01 2.4730099737644196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1227 9.3248002231121063e-02</internalNodes>\n          <leafValues>\n            -5.4758001118898392e-02 -1.8324300050735474e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1228 -1.2555000372231007e-02</internalNodes>\n          <leafValues>\n            2.6385200023651123e-01 -3.8526400923728943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1229 -2.7070000767707825e-02</internalNodes>\n          <leafValues>\n            -6.6929799318313599e-01 2.0340999588370323e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1230 -2.3677000775933266e-02</internalNodes>\n          <leafValues>\n            6.7265301942825317e-01 -1.4344000257551670e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1231 -1.4275000430643559e-02</internalNodes>\n          <leafValues>\n            3.0186399817466736e-01 -2.8514400124549866e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1232 2.8096999973058701e-02</internalNodes>\n          <leafValues>\n            1.4766000211238861e-01 -1.4078520536422729e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1233 5.0840001553297043e-02</internalNodes>\n          <leafValues>\n            -1.8613600730895996e-01 7.9953002929687500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1234 1.1505999602377415e-02</internalNodes>\n          <leafValues>\n            1.9118399918079376e-01 -8.5035003721714020e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1235 -1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            4.5239299535751343e-01 -2.2205199301242828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1236 2.2842499613761902e-01</internalNodes>\n          <leafValues>\n            1.3488399982452393e-01 -1.2894610166549683e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1237 1.1106900125741959e-01</internalNodes>\n          <leafValues>\n            -2.0753799378871918e-01 5.4561597108840942e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1238 3.2450000289827585e-03</internalNodes>\n          <leafValues>\n            3.2053700089454651e-01 -1.6403500735759735e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1239 8.5309997200965881e-02</internalNodes>\n          <leafValues>\n            -2.0210500061511993e-01 5.3296798467636108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1240 2.2048000246286392e-02</internalNodes>\n          <leafValues>\n            1.5698599815368652e-01 -1.7014099657535553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1241 -1.5676999464631081e-02</internalNodes>\n          <leafValues>\n            -6.2863498926162720e-01 4.0761999785900116e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1242 3.3112901449203491e-01</internalNodes>\n          <leafValues>\n            1.6609300673007965e-01 -1.0326379537582397e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1243 8.8470000773668289e-03</internalNodes>\n          <leafValues>\n            -2.5076198577880859e-01 3.1660598516464233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1244 4.6080000698566437e-02</internalNodes>\n          <leafValues>\n            1.5352100133895874e-01 -1.6333500146865845e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1245 -3.7703000009059906e-02</internalNodes>\n          <leafValues>\n            5.6873798370361328e-01 -2.0102599263191223e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>159</maxWeakCount>\n      <stageThreshold>-3.5939640998840332e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1246 -8.1808999180793762e-02</internalNodes>\n          <leafValues>\n            5.7124799489974976e-01 -6.7438799142837524e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1247 2.1761199831962585e-01</internalNodes>\n          <leafValues>\n            -3.8610199093818665e-01 9.0343999862670898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1248 1.4878000132739544e-02</internalNodes>\n          <leafValues>\n            2.2241599857807159e-01 -1.2779350280761719e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1249 5.2434999495744705e-02</internalNodes>\n          <leafValues>\n            -2.8690400719642639e-01 7.5742298364639282e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1250 9.1429995372891426e-03</internalNodes>\n          <leafValues>\n            -6.4880400896072388e-01 2.2268800437450409e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1251 7.9169999808073044e-03</internalNodes>\n          <leafValues>\n            -2.9253599047660828e-01 3.1030198931694031e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1252 -2.6084000244736671e-02</internalNodes>\n          <leafValues>\n            4.5532700419425964e-01 -3.8500601053237915e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1253 -2.9400000348687172e-03</internalNodes>\n          <leafValues>\n            -5.1264399290084839e-01 2.7432298660278320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1254 5.7130001485347748e-02</internalNodes>\n          <leafValues>\n            1.5788000077009201e-02 -1.2133100032806396e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1255 -6.1309998854994774e-03</internalNodes>\n          <leafValues>\n            3.9174601435661316e-01 -3.0866798758506775e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1256 -4.0405001491308212e-02</internalNodes>\n          <leafValues>\n            1.1901949644088745e+00 -2.0347100496292114e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1257 -2.0297000184655190e-02</internalNodes>\n          <leafValues>\n            -6.8239498138427734e-01 2.0458699762821198e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1258 -1.7188999801874161e-02</internalNodes>\n          <leafValues>\n            -8.4939897060394287e-01 3.8433000445365906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1259 -2.4215999990701675e-02</internalNodes>\n          <leafValues>\n            -1.1039420366287231e+00 1.5975099802017212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1260 5.6869000196456909e-02</internalNodes>\n          <leafValues>\n            -1.9595299661159515e-01 1.1806850433349609e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1261 3.6199999158270657e-04</internalNodes>\n          <leafValues>\n            -4.0847799181938171e-01 3.2938599586486816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1262 9.9790003150701523e-03</internalNodes>\n          <leafValues>\n            -2.9673001170158386e-01 4.1547900438308716e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1263 -5.2625000476837158e-02</internalNodes>\n          <leafValues>\n            -1.3069299459457397e+00 1.7862600088119507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1264 -1.3748999685049057e-02</internalNodes>\n          <leafValues>\n            2.3665800690650940e-01 -4.4536599516868591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1265 -3.0517000705003738e-02</internalNodes>\n          <leafValues>\n            2.9018300771713257e-01 -1.1210100352764130e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1266 -3.0037501454353333e-01</internalNodes>\n          <leafValues>\n            -2.4237680435180664e+00 -4.2830999940633774e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1267 -3.5990998148918152e-02</internalNodes>\n          <leafValues>\n            8.8206499814987183e-01 -4.7012999653816223e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1268 -5.5112000554800034e-02</internalNodes>\n          <leafValues>\n            8.0119001865386963e-01 -2.0490999519824982e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1269 3.3762000501155853e-02</internalNodes>\n          <leafValues>\n            1.4617599546909332e-01 -1.1349489688873291e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1270 -8.2710003480315208e-03</internalNodes>\n          <leafValues>\n            -8.1604897975921631e-01 1.8988000229001045e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1271 -5.4399999789893627e-03</internalNodes>\n          <leafValues>\n            -7.0980900526046753e-01 2.2343699634075165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1272 3.1059999018907547e-03</internalNodes>\n          <leafValues>\n            -7.2808599472045898e-01 4.0224999189376831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1273 5.3651999682188034e-02</internalNodes>\n          <leafValues>\n            1.7170900106430054e-01 -1.1163710355758667e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1274 -1.2541399896144867e-01</internalNodes>\n          <leafValues>\n            2.7680370807647705e+00 -1.4611500501632690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1275 9.2542000114917755e-02</internalNodes>\n          <leafValues>\n            1.1609800159931183e-01 -3.9635529518127441e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1276 3.8513999432325363e-02</internalNodes>\n          <leafValues>\n            -7.6399999670684338e-03 -9.8780900239944458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1277 -2.0200000144541264e-03</internalNodes>\n          <leafValues>\n            2.3059999942779541e-01 -7.4970299005508423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1278 9.7599998116493225e-03</internalNodes>\n          <leafValues>\n            -3.1137999892234802e-01 3.0287799239158630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1279 2.4095000699162483e-02</internalNodes>\n          <leafValues>\n            -4.9529999494552612e-02 5.2690100669860840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1280 -1.7982000485062599e-02</internalNodes>\n          <leafValues>\n            -1.1610640287399292e+00 -5.7000000961124897e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1281 -1.0555000044405460e-02</internalNodes>\n          <leafValues>\n            -2.7189099788665771e-01 2.3597699403762817e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1282 -7.2889998555183411e-03</internalNodes>\n          <leafValues>\n            -5.4219102859497070e-01 8.1914000213146210e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1283 2.3939000442624092e-02</internalNodes>\n          <leafValues>\n            1.7975799739360809e-01 -6.7049497365951538e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1284 -1.8365999683737755e-02</internalNodes>\n          <leafValues>\n            6.2664300203323364e-01 -2.0970100164413452e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1285 1.5715999528765678e-02</internalNodes>\n          <leafValues>\n            2.4193699657917023e-01 -1.0444309711456299e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1286 -4.8804000020027161e-02</internalNodes>\n          <leafValues>\n            -9.4060599803924561e-01 -3.7519999314099550e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1287 6.7130001261830330e-03</internalNodes>\n          <leafValues>\n            -7.5432002544403076e-02 6.1575299501419067e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1288 9.7770001739263535e-03</internalNodes>\n          <leafValues>\n            3.9285000413656235e-02 -8.4810298681259155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1289 1.4744999818503857e-02</internalNodes>\n          <leafValues>\n            1.6968999803066254e-01 -5.0906401872634888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1290 9.7079001367092133e-02</internalNodes>\n          <leafValues>\n            -3.3103000372648239e-02 -1.2706379890441895e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1291 4.8285998404026031e-02</internalNodes>\n          <leafValues>\n            9.4329997897148132e-02 2.7203190326690674e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1292 9.7810002043843269e-03</internalNodes>\n          <leafValues>\n            -3.9533400535583496e-01 1.5363800525665283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1293 -3.9893999695777893e-02</internalNodes>\n          <leafValues>\n            -2.2767400741577148e-01 1.3913999497890472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1294 2.2848000749945641e-02</internalNodes>\n          <leafValues>\n            -2.7391999959945679e-01 3.4199500083923340e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1295 6.7179999314248562e-03</internalNodes>\n          <leafValues>\n            -1.0874299705028534e-01 4.8125401139259338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1296 5.9599999338388443e-02</internalNodes>\n          <leafValues>\n            -4.9522001296281815e-02 -2.0117089748382568e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1297 6.9340001791715622e-03</internalNodes>\n          <leafValues>\n            1.5037499368190765e-01 -1.1271899938583374e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1298 1.5757000073790550e-02</internalNodes>\n          <leafValues>\n            -2.0885000005364418e-02 -1.1651979684829712e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1299 -4.9690000712871552e-02</internalNodes>\n          <leafValues>\n            -8.0213499069213867e-01 1.4372299611568451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1300 5.2347000688314438e-02</internalNodes>\n          <leafValues>\n            -2.0836700499057770e-01 6.1677598953247070e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1301 2.2430999204516411e-02</internalNodes>\n          <leafValues>\n            2.0305900275707245e-01 -7.5326198339462280e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1302 4.1142001748085022e-02</internalNodes>\n          <leafValues>\n            -1.8118199706077576e-01 1.0033359527587891e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1303 -2.1632000803947449e-02</internalNodes>\n          <leafValues>\n            4.9998998641967773e-01 -3.4662999212741852e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1304 -8.2808002829551697e-02</internalNodes>\n          <leafValues>\n            1.1711900234222412e+00 -1.8433600664138794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1305 8.5060000419616699e-03</internalNodes>\n          <leafValues>\n            -6.3225001096725464e-02 2.9024899005889893e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1306 7.8905001282691956e-02</internalNodes>\n          <leafValues>\n            -2.3274500668048859e-01 5.9695798158645630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1307 -9.0207003057003021e-02</internalNodes>\n          <leafValues>\n            -8.2211899757385254e-01 1.7772200703620911e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1308 -2.9269000515341759e-02</internalNodes>\n          <leafValues>\n            6.0860699415206909e-01 -2.1468900144100189e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1309 6.9499998353421688e-03</internalNodes>\n          <leafValues>\n            -4.2665999382734299e-02 6.0512101650238037e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1310 -8.0629996955394745e-03</internalNodes>\n          <leafValues>\n            -1.1508270502090454e+00 -2.7286000549793243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1311 1.9595999270677567e-02</internalNodes>\n          <leafValues>\n            -9.1880001127719879e-03 5.6857800483703613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1312 -1.4884999953210354e-02</internalNodes>\n          <leafValues>\n            3.7658798694610596e-01 -2.7149501442909241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1313 2.5217000395059586e-02</internalNodes>\n          <leafValues>\n            -9.9991001188755035e-02 2.4664700031280518e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1314 -1.5855999663472176e-02</internalNodes>\n          <leafValues>\n            6.6826701164245605e-01 -2.0614700019359589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1315 2.9441000893712044e-02</internalNodes>\n          <leafValues>\n            1.5832200646400452e-01 -7.6060897111892700e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1316 -8.5279997438192368e-03</internalNodes>\n          <leafValues>\n            3.8212299346923828e-01 -2.5407800078392029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1317 2.4421999230980873e-02</internalNodes>\n          <leafValues>\n            1.5105099976062775e-01 -2.8752899169921875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1318 -3.3886998891830444e-02</internalNodes>\n          <leafValues>\n            -6.8002802133560181e-01 3.4327000379562378e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1319 -2.0810000132769346e-03</internalNodes>\n          <leafValues>\n            2.5413900613784790e-01 -2.6859098672866821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1320 3.0358999967575073e-02</internalNodes>\n          <leafValues>\n            -3.0842000618577003e-02 -1.1476809978485107e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1321 4.0210001170635223e-03</internalNodes>\n          <leafValues>\n            -3.5253798961639404e-01 2.9868099093437195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1322 2.7681000530719757e-02</internalNodes>\n          <leafValues>\n            -3.8148999214172363e-02 -1.3262039422988892e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1323 7.9039996489882469e-03</internalNodes>\n          <leafValues>\n            -2.3737000301480293e-02 7.0503002405166626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1324 4.4031001627445221e-02</internalNodes>\n          <leafValues>\n            1.0674899816513062e-01 -4.5261201262474060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1325 -3.2370999455451965e-02</internalNodes>\n          <leafValues>\n            4.6674901247024536e-01 -6.1546999961137772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1326 2.0933000370860100e-02</internalNodes>\n          <leafValues>\n            -2.8447899222373962e-01 4.3845599889755249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1327 2.5227999314665794e-02</internalNodes>\n          <leafValues>\n            -2.2537000477313995e-02 7.0389097929000854e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1328 6.5520000644028187e-03</internalNodes>\n          <leafValues>\n            -3.2554900646209717e-01 2.4023699760437012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1329 -5.8557998389005661e-02</internalNodes>\n          <leafValues>\n            -1.2227720022201538e+00 1.1668799817562103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1330 3.1899999827146530e-02</internalNodes>\n          <leafValues>\n            -1.9305000081658363e-02 -1.0973169803619385e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1331 -3.0445000156760216e-02</internalNodes>\n          <leafValues>\n            6.5582501888275146e-01 7.5090996921062469e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1332 1.4933000318706036e-02</internalNodes>\n          <leafValues>\n            -5.2155798673629761e-01 1.1523099988698959e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1333 -4.9008000642061234e-02</internalNodes>\n          <leafValues>\n            -7.8303998708724976e-01 1.6657200455665588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1334 8.3158999681472778e-02</internalNodes>\n          <leafValues>\n            -2.6879999786615372e-03 -8.5282301902770996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1335 2.3902999237179756e-02</internalNodes>\n          <leafValues>\n            -5.1010999828577042e-02 4.1999098658561707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1336 1.6428999602794647e-02</internalNodes>\n          <leafValues>\n            1.9232999533414841e-02 -6.5049099922180176e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1337 -1.1838000267744064e-02</internalNodes>\n          <leafValues>\n            -6.2409800291061401e-01 1.5411199629306793e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1338 -1.6799999866634607e-04</internalNodes>\n          <leafValues>\n            1.7589199542999268e-01 -3.4338700771331787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1339 1.9193999469280243e-02</internalNodes>\n          <leafValues>\n            4.3418999761343002e-02 7.9069197177886963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1340 -1.0032000020146370e-02</internalNodes>\n          <leafValues>\n            4.5648899674415588e-01 -2.2494800388813019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1341 -1.4004000462591648e-02</internalNodes>\n          <leafValues>\n            3.3570998907089233e-01 -4.8799999058246613e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1342 -1.0319899767637253e-01</internalNodes>\n          <leafValues>\n            -2.3378000259399414e+00 -5.8933001011610031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1343 -9.5697000622749329e-02</internalNodes>\n          <leafValues>\n            -6.6153901815414429e-01 2.0098599791526794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1344 -4.1480999439954758e-02</internalNodes>\n          <leafValues>\n            4.5939201116561890e-01 -2.2314099967479706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1345 2.4099999573081732e-03</internalNodes>\n          <leafValues>\n            -2.6898598670959473e-01 2.4922999739646912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1346 1.0724999755620956e-01</internalNodes>\n          <leafValues>\n            -1.8640199303627014e-01 7.2769802808761597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1347 3.1870000530034304e-03</internalNodes>\n          <leafValues>\n            -2.4608999490737915e-02 2.8643900156021118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1348 2.9167000204324722e-02</internalNodes>\n          <leafValues>\n            -3.4683000296354294e-02 -1.1162580251693726e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1349 1.1287000030279160e-02</internalNodes>\n          <leafValues>\n            6.3760001212358475e-03 6.6632097959518433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1350 -1.2001000344753265e-02</internalNodes>\n          <leafValues>\n            4.2420101165771484e-01 -2.6279801130294800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1351 -1.2695999816060066e-02</internalNodes>\n          <leafValues>\n            -2.1957000717520714e-02 1.8936799466609955e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1352 2.4597000330686569e-02</internalNodes>\n          <leafValues>\n            -3.4963998943567276e-02 -1.0989320278167725e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1353 4.5953001827001572e-02</internalNodes>\n          <leafValues>\n            1.1109799891710281e-01 -2.9306049346923828e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1354 -2.7241000905632973e-02</internalNodes>\n          <leafValues>\n            2.9101699590682983e-01 -2.7407899498939514e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1355 4.0063999593257904e-02</internalNodes>\n          <leafValues>\n            1.1877900362014771e-01 -6.2801802158355713e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1356 2.3055000230669975e-02</internalNodes>\n          <leafValues>\n            1.4813800156116486e-01 -3.7007498741149902e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1357 -2.3737000301480293e-02</internalNodes>\n          <leafValues>\n            -5.3724801540374756e-01 1.9358199834823608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1358 7.7522002160549164e-02</internalNodes>\n          <leafValues>\n            -6.0194000601768494e-02 -1.9489669799804688e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1359 -1.3345000334084034e-02</internalNodes>\n          <leafValues>\n            -4.5229598879814148e-01 1.8741500377655029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1360 -2.1719999611377716e-02</internalNodes>\n          <leafValues>\n            1.2144249677658081e+00 -1.5365800261497498e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1361 -7.1474999189376831e-02</internalNodes>\n          <leafValues>\n            -2.3047130107879639e+00 1.0999900102615356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1362 -5.4999999701976776e-03</internalNodes>\n          <leafValues>\n            -7.1855199337005615e-01 2.0100999623537064e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1363 2.6740999892354012e-02</internalNodes>\n          <leafValues>\n            7.3545001447200775e-02 9.8786002397537231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1364 -3.9407998323440552e-02</internalNodes>\n          <leafValues>\n            -1.2227380275726318e+00 -4.3506998568773270e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1365 2.5888999924063683e-02</internalNodes>\n          <leafValues>\n            1.3409300148487091e-01 -1.1770780086517334e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1366 4.8925001174211502e-02</internalNodes>\n          <leafValues>\n            -3.0810000374913216e-02 -9.3479502201080322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1367 3.6892998963594437e-02</internalNodes>\n          <leafValues>\n            1.3333700597286224e-01 -1.4998290538787842e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1368 7.8929997980594635e-02</internalNodes>\n          <leafValues>\n            -1.4538800716400146e-01 1.5631790161132812e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1369 2.9006000608205795e-02</internalNodes>\n          <leafValues>\n            1.9383700191974640e-01 -6.7642802000045776e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1370 6.3089998438954353e-03</internalNodes>\n          <leafValues>\n            -3.7465399503707886e-01 1.0857500135898590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1371 -6.5830998122692108e-02</internalNodes>\n          <leafValues>\n            8.1059402227401733e-01 3.0201999470591545e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1372 -6.8965002894401550e-02</internalNodes>\n          <leafValues>\n            8.3772599697113037e-01 -1.7140999436378479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1373 -1.1669100075960159e-01</internalNodes>\n          <leafValues>\n            -9.4647198915481567e-01 1.3123199343681335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1374 -1.3060000492259860e-03</internalNodes>\n          <leafValues>\n            4.6007998287677765e-02 -5.2011597156524658e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1375 -4.4558998197317123e-02</internalNodes>\n          <leafValues>\n            -1.9423669576644897e+00 1.3200700283050537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1376 5.1033001393079758e-02</internalNodes>\n          <leafValues>\n            -2.1480999886989594e-01 4.8673900961875916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1377 -3.1578000634908676e-02</internalNodes>\n          <leafValues>\n            5.9989798069000244e-01 7.9159997403621674e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1378 2.1020000800490379e-02</internalNodes>\n          <leafValues>\n            -2.2069500386714935e-01 5.4046201705932617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1379 -1.3824200630187988e-01</internalNodes>\n          <leafValues>\n            6.2957501411437988e-01 -2.1712999790906906e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1380 5.2228998392820358e-02</internalNodes>\n          <leafValues>\n            -2.3360900580883026e-01 4.9760800600051880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1381 2.5884000584483147e-02</internalNodes>\n          <leafValues>\n            1.8041999638080597e-01 -2.2039200365543365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1382 -1.2138999998569489e-02</internalNodes>\n          <leafValues>\n            -6.9731897115707397e-01 1.5712000429630280e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1383 -2.4237999692559242e-02</internalNodes>\n          <leafValues>\n            3.4593299031257629e-01 7.1469999849796295e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1384 -2.5272000581026077e-02</internalNodes>\n          <leafValues>\n            -8.7583297491073608e-01 -9.8240002989768982e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1385 1.2597000226378441e-02</internalNodes>\n          <leafValues>\n            2.3649999499320984e-01 -2.8731200098991394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1386 5.7330999523401260e-02</internalNodes>\n          <leafValues>\n            -6.1530999839305878e-02 -2.2326040267944336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1387 1.6671000048518181e-02</internalNodes>\n          <leafValues>\n            -1.9850100576877594e-01 4.0810701251029968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1388 -2.2818999364972115e-02</internalNodes>\n          <leafValues>\n            9.6487599611282349e-01 -2.0245699584484100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1389 3.7000001611886546e-05</internalNodes>\n          <leafValues>\n            -5.8908998966217041e-02 2.7055400609970093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1390 -7.6700001955032349e-03</internalNodes>\n          <leafValues>\n            -4.5317101478576660e-01 8.9628003537654877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1391 9.4085998833179474e-02</internalNodes>\n          <leafValues>\n            1.1604599654674530e-01 -1.0951169729232788e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1392 -6.2267001718282700e-02</internalNodes>\n          <leafValues>\n            1.8096530437469482e+00 -1.4773200452327728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1393 1.7416000366210938e-02</internalNodes>\n          <leafValues>\n            2.3068200051784515e-01 -4.2417600750923157e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1394 -2.2066000849008560e-02</internalNodes>\n          <leafValues>\n            4.9270299077033997e-01 -2.0630900561809540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1395 -1.0404000058770180e-02</internalNodes>\n          <leafValues>\n            6.0924297571182251e-01 2.8130000457167625e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1396 -9.3670003116130829e-03</internalNodes>\n          <leafValues>\n            4.0171200037002563e-01 -2.1681700646877289e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1397 -2.9039999470114708e-02</internalNodes>\n          <leafValues>\n            -8.4876501560211182e-01 1.4246800541877747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1398 -2.1061999723315239e-02</internalNodes>\n          <leafValues>\n            -7.9198300838470459e-01 -1.2595999985933304e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1399 -3.7000998854637146e-02</internalNodes>\n          <leafValues>\n            -6.7488902807235718e-01 1.2830400466918945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1400 1.0735999792814255e-02</internalNodes>\n          <leafValues>\n            3.6779999732971191e-02 -6.3393002748489380e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1401 1.6367599368095398e-01</internalNodes>\n          <leafValues>\n            1.3803899288177490e-01 -4.7189000248908997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1402 9.4917997717857361e-02</internalNodes>\n          <leafValues>\n            -1.3855700194835663e-01 1.9492419958114624e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1403 3.5261999815702438e-02</internalNodes>\n          <leafValues>\n            1.3721899688243866e-01 -2.1186530590057373e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1404 1.2811000458896160e-02</internalNodes>\n          <leafValues>\n            -2.0008100569248199e-01 4.9507799744606018e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>155</maxWeakCount>\n      <stageThreshold>-3.3933560848236084e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1405 1.3904400169849396e-01</internalNodes>\n          <leafValues>\n            -4.6581199765205383e-01 7.6431602239608765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1406 1.1916999705135822e-02</internalNodes>\n          <leafValues>\n            -9.4398999214172363e-01 3.9726299047470093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1407 -1.0006999596953392e-02</internalNodes>\n          <leafValues>\n            3.2718798518180847e-01 -6.3367402553558350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1408 -6.0479999519884586e-03</internalNodes>\n          <leafValues>\n            2.7427899837493896e-01 -5.7446998357772827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1409 -1.2489999644458294e-03</internalNodes>\n          <leafValues>\n            2.3629300296306610e-01 -6.8593502044677734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1410 3.2382000237703323e-02</internalNodes>\n          <leafValues>\n            -5.7630199193954468e-01 2.7492699027061462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1411 -1.3957999646663666e-02</internalNodes>\n          <leafValues>\n            -6.1061501502990723e-01 2.4541600048542023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1412 1.1159999994561076e-03</internalNodes>\n          <leafValues>\n            -5.6539100408554077e-01 2.7179300785064697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1413 2.7000000045518391e-05</internalNodes>\n          <leafValues>\n            -8.0235999822616577e-01 1.1509100347757339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1414 -2.5700000696815550e-04</internalNodes>\n          <leafValues>\n            -8.1205898523330688e-01 2.3844699561595917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1415 4.0460000745952129e-03</internalNodes>\n          <leafValues>\n            1.3909600675106049e-01 -6.6163200139999390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1416 1.4356000348925591e-02</internalNodes>\n          <leafValues>\n            -1.6485199332237244e-01 4.1901698708534241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1417 -5.5374998599290848e-02</internalNodes>\n          <leafValues>\n            1.4425870180130005e+00 -1.8820199370384216e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1418 9.3594998121261597e-02</internalNodes>\n          <leafValues>\n            1.3548299670219421e-01 -9.1636097431182861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1419 2.6624999940395355e-02</internalNodes>\n          <leafValues>\n            -3.3748298883438110e-01 3.9233601093292236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1420 3.7469998933374882e-03</internalNodes>\n          <leafValues>\n            -1.1615400016307831e-01 4.4399300217628479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1421 -3.1886000186204910e-02</internalNodes>\n          <leafValues>\n            -9.9498301744461060e-01 1.6120000509545207e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1422 -2.2600000724196434e-02</internalNodes>\n          <leafValues>\n            -4.8067399859428406e-01 1.7007300257682800e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1423 2.5202000513672829e-02</internalNodes>\n          <leafValues>\n            3.5580001771450043e-02 -8.0215400457382202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1424 -3.1036999076604843e-02</internalNodes>\n          <leafValues>\n            -1.0895340442657471e+00 1.8081900477409363e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1425 -2.6475999504327774e-02</internalNodes>\n          <leafValues>\n            9.5671200752258301e-01 -2.1049399673938751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1426 -1.3853999786078930e-02</internalNodes>\n          <leafValues>\n            -1.0370320081710815e+00 2.2166700661182404e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1427 -6.2925003468990326e-02</internalNodes>\n          <leafValues>\n            9.0199398994445801e-01 -1.9085299968719482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1428 -4.4750999659299850e-02</internalNodes>\n          <leafValues>\n            -1.0119110345840454e+00 1.4691199362277985e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1429 -2.0428000018000603e-02</internalNodes>\n          <leafValues>\n            6.1624497175216675e-01 -2.3552699387073517e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1430 -8.0329999327659607e-03</internalNodes>\n          <leafValues>\n            -8.3279997110366821e-02 2.1728700399398804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1431 8.7280003353953362e-03</internalNodes>\n          <leafValues>\n            6.5458998084068298e-02 -6.0318702459335327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1432 -2.7202000841498375e-02</internalNodes>\n          <leafValues>\n            -9.3447399139404297e-01 1.5270000696182251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1433 -1.6471000388264656e-02</internalNodes>\n          <leafValues>\n            -8.4177100658416748e-01 1.3332000002264977e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1434 -1.3744000345468521e-02</internalNodes>\n          <leafValues>\n            6.0567200183868408e-01 -9.2021003365516663e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1435 2.9164999723434448e-02</internalNodes>\n          <leafValues>\n            -2.8114000335335732e-02 -1.4014569520950317e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1436 3.7457000464200974e-02</internalNodes>\n          <leafValues>\n            1.3080599904060364e-01 -4.9382498860359192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1437 -2.5070000439882278e-02</internalNodes>\n          <leafValues>\n            -1.1289390325546265e+00 -1.4600000344216824e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1438 -6.3812002539634705e-02</internalNodes>\n          <leafValues>\n            7.5871598720550537e-01 -1.8200000049546361e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1439 -9.3900002539157867e-03</internalNodes>\n          <leafValues>\n            2.9936400055885315e-01 -2.9487800598144531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1440 -7.6000002445653081e-04</internalNodes>\n          <leafValues>\n            1.9725000485777855e-02 1.9993899762630463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1441 -2.1740999072790146e-02</internalNodes>\n          <leafValues>\n            -8.5247898101806641e-01 4.9169998615980148e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1442 -1.7869999632239342e-02</internalNodes>\n          <leafValues>\n            -5.9985999017953873e-02 1.5222500264644623e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1443 -2.4831000715494156e-02</internalNodes>\n          <leafValues>\n            3.5603401064872742e-01 -2.6259899139404297e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1444 1.5715500712394714e-01</internalNodes>\n          <leafValues>\n            1.5599999460391700e-04 1.0428730249404907e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1445 6.9026999175548553e-02</internalNodes>\n          <leafValues>\n            -3.3006999641656876e-02 -1.1796669960021973e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1446 -1.1021999642252922e-02</internalNodes>\n          <leafValues>\n            5.8987700939178467e-01 -5.7647999376058578e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1447 -1.3834999874234200e-02</internalNodes>\n          <leafValues>\n            5.9502798318862915e-01 -2.4418599903583527e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1448 -3.0941000208258629e-02</internalNodes>\n          <leafValues>\n            -1.1723799705505371e+00 1.6907000541687012e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1449 2.1258000284433365e-02</internalNodes>\n          <leafValues>\n            -1.8900999799370766e-02 -1.0684759616851807e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1450 9.3079999089241028e-02</internalNodes>\n          <leafValues>\n            1.6305600106716156e-01 -1.3375270366668701e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1451 2.9635999351739883e-02</internalNodes>\n          <leafValues>\n            -2.2524799406528473e-01 4.5400100946426392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1452 -1.2199999764561653e-04</internalNodes>\n          <leafValues>\n            2.7409100532531738e-01 -3.7371399998664856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1453 -4.2098000645637512e-02</internalNodes>\n          <leafValues>\n            -7.5828802585601807e-01 1.7137000337243080e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1454 -2.2505000233650208e-02</internalNodes>\n          <leafValues>\n            -2.2759300470352173e-01 2.3698699474334717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1455 -1.2862999923527241e-02</internalNodes>\n          <leafValues>\n            1.9252400100231171e-01 -3.2127100229263306e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1456 2.7860000729560852e-02</internalNodes>\n          <leafValues>\n            1.6723699867725372e-01 -1.0209059715270996e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1457 -2.7807999402284622e-02</internalNodes>\n          <leafValues>\n            1.2824759483337402e+00 -1.7225299775600433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1458 -6.1630001291632652e-03</internalNodes>\n          <leafValues>\n            -5.4072898626327515e-01 2.3885700106620789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1459 -2.0436000078916550e-02</internalNodes>\n          <leafValues>\n            6.3355398178100586e-01 -2.1090599894523621e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1460 -1.2307999655604362e-02</internalNodes>\n          <leafValues>\n            -4.9778199195861816e-01 1.7402599751949310e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1461 -4.0493998676538467e-02</internalNodes>\n          <leafValues>\n            -1.1848740577697754e+00 -3.3890999853610992e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1462 2.9657000675797462e-02</internalNodes>\n          <leafValues>\n            2.1740999072790146e-02 1.0069919824600220e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1463 6.8379999138414860e-03</internalNodes>\n          <leafValues>\n            2.9217999428510666e-02 -5.9906297922134399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1464 1.6164999455213547e-02</internalNodes>\n          <leafValues>\n            -2.1000799536705017e-01 3.7637299299240112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1465 5.0193000584840775e-02</internalNodes>\n          <leafValues>\n            2.5319999549537897e-03 -7.1668201684951782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1466 1.9680000841617584e-03</internalNodes>\n          <leafValues>\n            -2.1921400725841522e-01 3.2298699021339417e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1467 2.4979999288916588e-02</internalNodes>\n          <leafValues>\n            -9.6840001642704010e-03 -7.7572900056838989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1468 -1.5809999778866768e-02</internalNodes>\n          <leafValues>\n            4.4637501239776611e-01 -6.1760000884532928e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1469 3.7206999957561493e-02</internalNodes>\n          <leafValues>\n            -2.0495399832725525e-01 5.7722198963165283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1470 -7.9264998435974121e-02</internalNodes>\n          <leafValues>\n            -7.6745402812957764e-01 1.2550400197505951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1471 -1.7152000218629837e-02</internalNodes>\n          <leafValues>\n            -1.4121830463409424e+00 -5.1704000681638718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1472 3.2740000635385513e-02</internalNodes>\n          <leafValues>\n            1.9334000349044800e-01 -6.3633698225021362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1473 -1.1756999790668488e-01</internalNodes>\n          <leafValues>\n            8.4325402975082397e-01 -1.8018600344657898e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1474 1.2057200074195862e-01</internalNodes>\n          <leafValues>\n            1.2530000507831573e-01 -2.1213600635528564e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1475 4.2779999785125256e-03</internalNodes>\n          <leafValues>\n            -4.6604400873184204e-01 8.9643999934196472e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1476 -7.2544999420642853e-02</internalNodes>\n          <leafValues>\n            5.1826500892639160e-01 1.6823999583721161e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1477 1.7710599303245544e-01</internalNodes>\n          <leafValues>\n            -3.0910000205039978e-02 -1.1046639680862427e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1478 8.4229996427893639e-03</internalNodes>\n          <leafValues>\n            2.4445800483226776e-01 -3.8613098859786987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1479 -1.3035000301897526e-02</internalNodes>\n          <leafValues>\n            9.8004400730133057e-01 -1.7016500234603882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1480 1.8912000581622124e-02</internalNodes>\n          <leafValues>\n            2.0248499512672424e-01 -3.8545900583267212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1481 2.1447999402880669e-02</internalNodes>\n          <leafValues>\n            -2.5717198848724365e-01 3.5181200504302979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1482 6.3357003033161163e-02</internalNodes>\n          <leafValues>\n            1.6994799673557281e-01 -9.1383802890777588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1483 -3.2435998320579529e-02</internalNodes>\n          <leafValues>\n            -8.5681599378585815e-01 -2.1680999547243118e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1484 -2.3564999923110008e-02</internalNodes>\n          <leafValues>\n            5.6115597486495972e-01 -2.2400000307243317e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1485 1.8789000809192657e-02</internalNodes>\n          <leafValues>\n            -2.5459799170494080e-01 3.4512901306152344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1486 3.1042000278830528e-02</internalNodes>\n          <leafValues>\n            7.5719999149441719e-03 3.4800198674201965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1487 -1.1226999573409557e-02</internalNodes>\n          <leafValues>\n            -6.0219800472259521e-01 4.2814999818801880e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1488 -1.2845999561250210e-02</internalNodes>\n          <leafValues>\n            4.2020401358604431e-01 -5.3801000118255615e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1489 -1.2791999615728855e-02</internalNodes>\n          <leafValues>\n            2.2724500298500061e-01 -3.2398000359535217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1490 6.8651996552944183e-02</internalNodes>\n          <leafValues>\n            9.3532003462314606e-02 10.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1491 5.2789999172091484e-03</internalNodes>\n          <leafValues>\n            -2.6926299929618835e-01 3.3303201198577881e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1492 -3.8779001682996750e-02</internalNodes>\n          <leafValues>\n            -7.2365301847457886e-01 1.7806500196456909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1493 6.1820000410079956e-03</internalNodes>\n          <leafValues>\n            -3.5119399428367615e-01 1.6586300730705261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1494 1.7515200376510620e-01</internalNodes>\n          <leafValues>\n            1.1623100191354752e-01 -1.5419290065765381e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1495 1.1627999693155289e-01</internalNodes>\n          <leafValues>\n            -9.1479998081922531e-03 -9.9842602014541626e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1496 -2.2964000701904297e-02</internalNodes>\n          <leafValues>\n            2.0565399527549744e-01 1.5432000160217285e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1497 -5.1410000771284103e-02</internalNodes>\n          <leafValues>\n            5.8072400093078613e-01 -2.0118400454521179e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1498 2.2474199533462524e-01</internalNodes>\n          <leafValues>\n            1.8728999421000481e-02 1.0829299688339233e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1499 9.4860000535845757e-03</internalNodes>\n          <leafValues>\n            -3.3171299099922180e-01 1.9902999699115753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1500 -1.1846300214529037e-01</internalNodes>\n          <leafValues>\n            1.3711010217666626e+00 6.8926997482776642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1501 3.7810999900102615e-02</internalNodes>\n          <leafValues>\n            -9.3600002583116293e-04 -8.3996999263763428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1502 2.2202000021934509e-02</internalNodes>\n          <leafValues>\n            -1.1963999830186367e-02 3.6673998832702637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1503 -3.6366000771522522e-02</internalNodes>\n          <leafValues>\n            3.7866500020027161e-01 -2.7714800834655762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1504 -1.3184699416160583e-01</internalNodes>\n          <leafValues>\n            -2.7481179237365723e+00 1.0666900128126144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1505 -4.1655998677015305e-02</internalNodes>\n          <leafValues>\n            4.7524300217628479e-01 -2.3249800503253937e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1506 -3.3151999115943909e-02</internalNodes>\n          <leafValues>\n            -5.7929402589797974e-01 1.7434400320053101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1507 1.5769999474287033e-02</internalNodes>\n          <leafValues>\n            -1.1284000240266323e-02 -8.3701401948928833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1508 -3.9363000541925430e-02</internalNodes>\n          <leafValues>\n            3.4821599721908569e-01 -1.7455400526523590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1509 -6.7849002778530121e-02</internalNodes>\n          <leafValues>\n            1.4225699901580811e+00 -1.4765599370002747e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1510 -2.6775000616908073e-02</internalNodes>\n          <leafValues>\n            2.3947000503540039e-01 1.3271999545395374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1511 3.9919000118970871e-02</internalNodes>\n          <leafValues>\n            -8.9999996125698090e-03 -7.5938898324966431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1512 1.0065600275993347e-01</internalNodes>\n          <leafValues>\n            -1.8685000017285347e-02 7.6245301961898804e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1513 -8.1022001802921295e-02</internalNodes>\n          <leafValues>\n            -9.0439099073410034e-01 -8.5880002006888390e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1514 -2.1258000284433365e-02</internalNodes>\n          <leafValues>\n            -2.1319599449634552e-01 2.1919700503349304e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1515 -1.0630999691784382e-02</internalNodes>\n          <leafValues>\n            1.9598099589347839e-01 -3.5768100619316101e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1516 8.1300002057105303e-04</internalNodes>\n          <leafValues>\n            -9.2794999480247498e-02 2.6145899295806885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1517 3.4650000743567944e-03</internalNodes>\n          <leafValues>\n            -5.5336099863052368e-01 2.7386000379920006e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1518 1.8835999071598053e-02</internalNodes>\n          <leafValues>\n            1.8446099758148193e-01 -6.6934299468994141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1519 -2.5631999596953392e-02</internalNodes>\n          <leafValues>\n            1.9382879734039307e+00 -1.4708900451660156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1520 -4.0939999744296074e-03</internalNodes>\n          <leafValues>\n            -2.6451599597930908e-01 2.0733200013637543e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1521 -8.9199998183175921e-04</internalNodes>\n          <leafValues>\n            -5.5031597614288330e-01 5.0374999642372131e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1522 -4.9518000334501266e-02</internalNodes>\n          <leafValues>\n            -2.5615389347076416e+00 1.3141700625419617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1523 1.1680999770760536e-02</internalNodes>\n          <leafValues>\n            -2.4819800257682800e-01 3.9982700347900391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1524 3.4563999623060226e-02</internalNodes>\n          <leafValues>\n            1.6178800165653229e-01 -7.1418899297714233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1525 -8.2909995689988136e-03</internalNodes>\n          <leafValues>\n            2.2180099785327911e-01 -2.9181700944900513e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1526 -2.2358000278472900e-02</internalNodes>\n          <leafValues>\n            3.1044098734855652e-01 -2.7280000504106283e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1527 -3.0801000073552132e-02</internalNodes>\n          <leafValues>\n            -9.5672702789306641e-01 -8.3400001749396324e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1528 4.3779000639915466e-02</internalNodes>\n          <leafValues>\n            1.2556900084018707e-01 -1.1759619712829590e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1529 4.3046001344919205e-02</internalNodes>\n          <leafValues>\n            -5.8876998722553253e-02 -1.8568470478057861e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1530 2.7188999578356743e-02</internalNodes>\n          <leafValues>\n            4.2858000844717026e-02 3.9036700129508972e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1531 9.4149997457861900e-03</internalNodes>\n          <leafValues>\n            -4.3567001819610596e-02 -1.1094470024108887e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1532 9.4311997294425964e-02</internalNodes>\n          <leafValues>\n            4.0256999433040619e-02 9.8442298173904419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1533 1.7025099694728851e-01</internalNodes>\n          <leafValues>\n            2.9510000720620155e-02 -6.9509297609329224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1534 -4.7148000448942184e-02</internalNodes>\n          <leafValues>\n            1.0338569879531860e+00 6.7602001130580902e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1535 1.1186300218105316e-01</internalNodes>\n          <leafValues>\n            -6.8682998418807983e-02 -2.4985830783843994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1536 -1.4353999868035316e-02</internalNodes>\n          <leafValues>\n            -5.9481900930404663e-01 1.5001699328422546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1537 3.4024000167846680e-02</internalNodes>\n          <leafValues>\n            -6.4823001623153687e-02 -2.1382639408111572e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1538 2.1601999178528786e-02</internalNodes>\n          <leafValues>\n            5.5309999734163284e-02 7.8292900323867798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1539 2.1771999076008797e-02</internalNodes>\n          <leafValues>\n            -7.1279997937381268e-03 -7.2148102521896362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1540 8.2416996359825134e-02</internalNodes>\n          <leafValues>\n            1.4609499275684357e-01 -1.3636670112609863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1541 8.4671996533870697e-02</internalNodes>\n          <leafValues>\n            -1.7784699797630310e-01 7.2857701778411865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1542 -5.5128000676631927e-02</internalNodes>\n          <leafValues>\n            -5.9402400255203247e-01 1.9357800483703613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1543 -6.4823001623153687e-02</internalNodes>\n          <leafValues>\n            -1.0783840417861938e+00 -4.0734000504016876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1544 -2.2769000381231308e-02</internalNodes>\n          <leafValues>\n            7.7900201082229614e-01 3.4960000775754452e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1545 5.4756000638008118e-02</internalNodes>\n          <leafValues>\n            -6.5683998167514801e-02 -1.8188409805297852e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1546 -8.9000001025851816e-05</internalNodes>\n          <leafValues>\n            -1.7891999334096909e-02 2.0768299698829651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1547 9.8361998796463013e-02</internalNodes>\n          <leafValues>\n            -5.5946998298168182e-02 -1.4153920412063599e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1548 -7.0930002257227898e-03</internalNodes>\n          <leafValues>\n            3.4135299921035767e-01 -1.2089899927377701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1549 5.0278000533580780e-02</internalNodes>\n          <leafValues>\n            -2.6286700367927551e-01 2.5797298550605774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1550 -5.7870000600814819e-03</internalNodes>\n          <leafValues>\n            -1.3178600370883942e-01 1.7350199818611145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1551 1.3973999768495560e-02</internalNodes>\n          <leafValues>\n            2.8518000617623329e-02 -6.1152201890945435e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1552 2.1449999883770943e-02</internalNodes>\n          <leafValues>\n            2.6181999593973160e-02 3.0306598544120789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1553 -2.9214000329375267e-02</internalNodes>\n          <leafValues>\n            4.4940599799156189e-01 -2.2803099453449249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1554 4.8099999548867345e-04</internalNodes>\n          <leafValues>\n            -1.9879999756813049e-01 2.0744499564170837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1555 1.7109999898821115e-03</internalNodes>\n          <leafValues>\n            -5.4037201404571533e-01 6.7865997552871704e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1556 8.6660003289580345e-03</internalNodes>\n          <leafValues>\n            -1.3128000311553478e-02 5.2297902107238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1557 6.3657999038696289e-02</internalNodes>\n          <leafValues>\n            6.8299002945423126e-02 -4.9235099554061890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1558 -2.7968000620603561e-02</internalNodes>\n          <leafValues>\n            6.8183898925781250e-01 7.8781001269817352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1559 4.8953998833894730e-02</internalNodes>\n          <leafValues>\n            -2.0622399449348450e-01 5.0388097763061523e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>169</maxWeakCount>\n      <stageThreshold>-3.2396929264068604e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1560 -2.9312999919056892e-02</internalNodes>\n          <leafValues>\n            7.1284699440002441e-01 -5.8230698108673096e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1561 1.2415099889039993e-01</internalNodes>\n          <leafValues>\n            -3.6863499879837036e-01 6.0067200660705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1562 7.9349996522068977e-03</internalNodes>\n          <leafValues>\n            -8.6008298397064209e-01 2.1724699437618256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1563 3.0365999788045883e-02</internalNodes>\n          <leafValues>\n            -2.7186998724937439e-01 6.1247897148132324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1564 2.5218000635504723e-02</internalNodes>\n          <leafValues>\n            -3.4748300909996033e-01 5.0427699089050293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1565 1.0014000348746777e-02</internalNodes>\n          <leafValues>\n            -3.1898999214172363e-01 4.1376799345016479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1566 -1.6775000840425491e-02</internalNodes>\n          <leafValues>\n            -6.9048100709915161e-01 9.4830997288227081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1567 -2.6950000319629908e-03</internalNodes>\n          <leafValues>\n            -2.0829799771308899e-01 2.3737199604511261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1568 4.2257998138666153e-02</internalNodes>\n          <leafValues>\n            -4.9366700649261475e-01 1.8170599639415741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1569 -4.8505000770092010e-02</internalNodes>\n          <leafValues>\n            1.3429640531539917e+00 3.9769001305103302e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1570 2.8992999345064163e-02</internalNodes>\n          <leafValues>\n            4.6496000140905380e-02 -8.1643497943878174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1571 -4.0089000016450882e-02</internalNodes>\n          <leafValues>\n            -7.1197801828384399e-01 2.2553899884223938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1572 -4.1021998971700668e-02</internalNodes>\n          <leafValues>\n            1.0057929754257202e+00 -1.9690200686454773e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1573 1.1838000267744064e-02</internalNodes>\n          <leafValues>\n            -1.2600000016391277e-02 8.0767101049423218e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1574 -2.1328000351786613e-02</internalNodes>\n          <leafValues>\n            -8.2023900747299194e-01 2.0524999126791954e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1575 -2.3904999718070030e-02</internalNodes>\n          <leafValues>\n            5.4210501909255981e-01 -7.4767000973224640e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1576 1.8008999526500702e-02</internalNodes>\n          <leafValues>\n            -3.3827701210975647e-01 4.2358601093292236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1577 -4.3614000082015991e-02</internalNodes>\n          <leafValues>\n            -1.1983489990234375e+00 1.5566200017929077e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1578 -9.2449998483061790e-03</internalNodes>\n          <leafValues>\n            -8.9029997587203979e-01 1.1003999970853329e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1579 4.7485001385211945e-02</internalNodes>\n          <leafValues>\n            1.6664099693298340e-01 -9.0764498710632324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1580 -1.4233999885618687e-02</internalNodes>\n          <leafValues>\n            6.2695199251174927e-01 -2.5791200995445251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1581 3.8010000716894865e-03</internalNodes>\n          <leafValues>\n            -2.8229999542236328e-01 2.6624599099159241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1582 3.4330000635236502e-03</internalNodes>\n          <leafValues>\n            -6.3771998882293701e-01 9.8422996699810028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1583 -2.9221000149846077e-02</internalNodes>\n          <leafValues>\n            -7.6769900321960449e-01 2.2634500265121460e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1584 -6.4949998632073402e-03</internalNodes>\n          <leafValues>\n            4.5600101351737976e-01 -2.6528900861740112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1585 -3.0034000054001808e-02</internalNodes>\n          <leafValues>\n            -7.6551097631454468e-01 1.4009299874305725e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1586 7.8360000625252724e-03</internalNodes>\n          <leafValues>\n            4.6755999326705933e-02 -7.2356200218200684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1587 8.8550001382827759e-03</internalNodes>\n          <leafValues>\n            -4.9141999334096909e-02 5.1472699642181396e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1588 9.5973998308181763e-02</internalNodes>\n          <leafValues>\n            -2.0068999379873276e-02 -1.0850950479507446e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1589 -3.2876998186111450e-02</internalNodes>\n          <leafValues>\n            -9.5875298976898193e-01 1.4543600380420685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1590 -1.3384000398218632e-02</internalNodes>\n          <leafValues>\n            -7.0013600587844849e-01 2.9157999902963638e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1591 1.5235999599099159e-02</internalNodes>\n          <leafValues>\n            -2.8235700726509094e-01 2.5367999076843262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1592 1.2054000049829483e-02</internalNodes>\n          <leafValues>\n            -2.5303399562835693e-01 4.6526700258255005e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1593 -7.6295003294944763e-02</internalNodes>\n          <leafValues>\n            -6.9915801286697388e-01 1.3217200338840485e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1594 -1.2040000408887863e-02</internalNodes>\n          <leafValues>\n            4.5894598960876465e-01 -2.3856499791145325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1595 2.1916000172495842e-02</internalNodes>\n          <leafValues>\n            1.8268600106239319e-01 -6.1629700660705566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1596 -2.7330000884830952e-03</internalNodes>\n          <leafValues>\n            -6.3257902860641479e-01 3.4219000488519669e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1597 -4.8652000725269318e-02</internalNodes>\n          <leafValues>\n            -1.0297729969024658e+00 1.7386500537395477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1598 -1.0463999584317207e-02</internalNodes>\n          <leafValues>\n            3.4757301211357117e-01 -2.7464100718498230e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1599 -6.6550001502037048e-03</internalNodes>\n          <leafValues>\n            -2.8980299830436707e-01 2.4037900567054749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1600 8.5469996556639671e-03</internalNodes>\n          <leafValues>\n            -4.4340500235557556e-01 1.4267399907112122e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1601 1.9913999363780022e-02</internalNodes>\n          <leafValues>\n            1.7740400135517120e-01 -2.4096299707889557e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1602 2.2012999281287193e-02</internalNodes>\n          <leafValues>\n            -1.0812000371515751e-02 -9.4690799713134766e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1603 -5.2179001271724701e-02</internalNodes>\n          <leafValues>\n            1.6547499895095825e+00 9.6487000584602356e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1604 1.9698999822139740e-02</internalNodes>\n          <leafValues>\n            -6.7560002207756042e-03 -8.6311501264572144e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1605 2.3040000349283218e-02</internalNodes>\n          <leafValues>\n            -2.3519999813288450e-03 3.8531300425529480e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1606 -1.5038000419735909e-02</internalNodes>\n          <leafValues>\n            -6.1905699968338013e-01 3.1077999621629715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1607 -4.9956001341342926e-02</internalNodes>\n          <leafValues>\n            7.0657497644424438e-01 4.7880999743938446e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1608 -6.9269999861717224e-02</internalNodes>\n          <leafValues>\n            3.9212900400161743e-01 -2.3848000168800354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1609 4.7399997711181641e-03</internalNodes>\n          <leafValues>\n            -2.4309000000357628e-02 2.5386300683021545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1610 -3.3923998475074768e-02</internalNodes>\n          <leafValues>\n            4.6930399537086487e-01 -2.3321899771690369e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1611 -1.6231000423431396e-02</internalNodes>\n          <leafValues>\n            3.2319200038909912e-01 -2.0545600354671478e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1612 -5.0193000584840775e-02</internalNodes>\n          <leafValues>\n            -1.2277870178222656e+00 -4.0798000991344452e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1613 5.6944001466035843e-02</internalNodes>\n          <leafValues>\n            4.5184001326560974e-02 6.0197502374649048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1614 4.0936999022960663e-02</internalNodes>\n          <leafValues>\n            -1.6772800683975220e-01 8.9819300174713135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1615 -3.0839999672025442e-03</internalNodes>\n          <leafValues>\n            3.3716198801994324e-01 -2.7240800857543945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1616 -3.2600000500679016e-02</internalNodes>\n          <leafValues>\n            -8.5446500778198242e-01 1.9664999097585678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1617 9.8480999469757080e-02</internalNodes>\n          <leafValues>\n            5.4742000997066498e-02 6.3827300071716309e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1618 -3.8185000419616699e-02</internalNodes>\n          <leafValues>\n            5.2274698019027710e-01 -2.3384800553321838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1619 -4.5917000621557236e-02</internalNodes>\n          <leafValues>\n            6.2829202413558960e-01 3.2859001308679581e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1620 -1.1955499649047852e-01</internalNodes>\n          <leafValues>\n            -6.1572700738906860e-01 3.4680001437664032e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1621 -1.2044399976730347e-01</internalNodes>\n          <leafValues>\n            -8.4380000829696655e-01 1.6530700027942657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1622 7.0619001984596252e-02</internalNodes>\n          <leafValues>\n            -6.3261002302169800e-02 -1.9863929748535156e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1623 8.4889996796846390e-03</internalNodes>\n          <leafValues>\n            -1.7663399875164032e-01 3.8011199235916138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1624 2.2710999473929405e-02</internalNodes>\n          <leafValues>\n            -2.7605999261140823e-02 -9.1921401023864746e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1625 4.9700000090524554e-04</internalNodes>\n          <leafValues>\n            -2.4293200671672821e-01 2.2878900170326233e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1626 3.4651998430490494e-02</internalNodes>\n          <leafValues>\n            -2.3705999553203583e-01 5.4010999202728271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1627 -4.4700000435113907e-03</internalNodes>\n          <leafValues>\n            3.9078998565673828e-01 -1.2693800032138824e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1628 2.3643000051379204e-02</internalNodes>\n          <leafValues>\n            -2.6663699746131897e-01 3.2312598824501038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1629 1.2813000008463860e-02</internalNodes>\n          <leafValues>\n            1.7540800571441650e-01 -6.0787999629974365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1630 -1.1250999756157398e-02</internalNodes>\n          <leafValues>\n            -1.0852589607238770e+00 -2.8046000748872757e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1631 -4.1535001248121262e-02</internalNodes>\n          <leafValues>\n            7.1887397766113281e-01 2.7982000261545181e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1632 -9.3470998108386993e-02</internalNodes>\n          <leafValues>\n            -1.1906319856643677e+00 -4.4810999184846878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1633 -2.7249999344348907e-02</internalNodes>\n          <leafValues>\n            6.2942498922348022e-01 9.5039997249841690e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1634 -2.1759999915957451e-02</internalNodes>\n          <leafValues>\n            1.3233649730682373e+00 -1.5027000010013580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1635 -9.6890004351735115e-03</internalNodes>\n          <leafValues>\n            -3.3947101235389709e-01 1.7085799574851990e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1636 6.9395996630191803e-02</internalNodes>\n          <leafValues>\n            -2.5657799839973450e-01 4.7652098536491394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1637 3.1208999454975128e-02</internalNodes>\n          <leafValues>\n            1.4154000580310822e-01 -3.4942001104354858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1638 -4.9727000296115875e-02</internalNodes>\n          <leafValues>\n            -1.1675560474395752e+00 -4.0757998824119568e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1639 -2.0301999524235725e-02</internalNodes>\n          <leafValues>\n            -3.9486399292945862e-01 1.5814900398254395e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1640 -1.5367000363767147e-02</internalNodes>\n          <leafValues>\n            4.9300000071525574e-01 -2.0092099905014038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1641 -5.0735000520944595e-02</internalNodes>\n          <leafValues>\n            1.8736059665679932e+00 8.6730003356933594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1642 -2.0726000890135765e-02</internalNodes>\n          <leafValues>\n            -8.8938397169113159e-01 -7.3199998587369919e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1643 -3.0993999913334846e-02</internalNodes>\n          <leafValues>\n            -1.1664899587631226e+00 1.4274600148200989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1644 -4.4269999489188194e-03</internalNodes>\n          <leafValues>\n            -6.6815102100372314e-01 4.4120000675320625e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1645 -4.5743998140096664e-02</internalNodes>\n          <leafValues>\n            -4.7955200076103210e-01 1.5121999382972717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1646 1.6698999330401421e-02</internalNodes>\n          <leafValues>\n            1.2048599869012833e-01 -4.5235899090766907e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1647 3.2210000790655613e-03</internalNodes>\n          <leafValues>\n            -7.7615000307559967e-02 2.7846598625183105e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1648 2.4434000253677368e-02</internalNodes>\n          <leafValues>\n            -1.9987100362777710e-01 6.7253702878952026e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1649 -7.9677999019622803e-02</internalNodes>\n          <leafValues>\n            9.2222398519515991e-01 9.2557996511459351e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1650 4.4530000537633896e-02</internalNodes>\n          <leafValues>\n            -2.6690500974655151e-01 3.3320501446723938e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1651 -1.2528300285339355e-01</internalNodes>\n          <leafValues>\n            -5.4253101348876953e-01 1.3976299762725830e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1652 1.7971999943256378e-02</internalNodes>\n          <leafValues>\n            1.8219999969005585e-02 -6.8048501014709473e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1653 1.9184000790119171e-02</internalNodes>\n          <leafValues>\n            -1.2583999894559383e-02 5.4126697778701782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1654 4.0024001151323318e-02</internalNodes>\n          <leafValues>\n            -1.7638799548149109e-01 7.8810399770736694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1655 1.3558999635279179e-02</internalNodes>\n          <leafValues>\n            2.0737600326538086e-01 -4.7744300961494446e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1656 1.6220999881625175e-02</internalNodes>\n          <leafValues>\n            2.3076999932527542e-02 -6.1182099580764771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1657 1.1229000054299831e-02</internalNodes>\n          <leafValues>\n            -1.7728000879287720e-02 4.1764199733734131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1658 3.9193000644445419e-02</internalNodes>\n          <leafValues>\n            -1.8948499858379364e-01 7.4019300937652588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1659 -9.5539996400475502e-03</internalNodes>\n          <leafValues>\n            4.0947100520133972e-01 -1.3508899509906769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1660 2.7878999710083008e-02</internalNodes>\n          <leafValues>\n            -2.0350700616836548e-01 6.1625397205352783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1661 -2.3600999265909195e-02</internalNodes>\n          <leafValues>\n            -1.6967060565948486e+00 1.4633199572563171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1662 2.6930000633001328e-02</internalNodes>\n          <leafValues>\n            -3.0401999130845070e-02 -1.0909470319747925e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1663 2.8999999631196260e-04</internalNodes>\n          <leafValues>\n            -2.0076000690460205e-01 2.2314099967479706e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1664 -4.1124999523162842e-02</internalNodes>\n          <leafValues>\n            -4.5242199301719666e-01 5.7392001152038574e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1665 6.6789998672902584e-03</internalNodes>\n          <leafValues>\n            2.3824900388717651e-01 -2.1262100338935852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1666 4.7864999622106552e-02</internalNodes>\n          <leafValues>\n            -1.8194800615310669e-01 6.1918401718139648e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1667 -3.1679999083280563e-03</internalNodes>\n          <leafValues>\n            -2.7393200993537903e-01 2.5017300248146057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1668 -8.6230002343654633e-03</internalNodes>\n          <leafValues>\n            -4.6280300617218018e-01 4.2397998273372650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1669 -7.4350000359117985e-03</internalNodes>\n          <leafValues>\n            4.1796800494194031e-01 -1.7079999670386314e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1670 -1.8769999733194709e-03</internalNodes>\n          <leafValues>\n            1.4602300524711609e-01 -3.3721101284027100e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1671 -8.6226001381874084e-02</internalNodes>\n          <leafValues>\n            7.5143402814865112e-01 1.0711999610066414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1672 4.6833999454975128e-02</internalNodes>\n          <leafValues>\n            -1.9119599461555481e-01 4.8414900898933411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1673 -9.2000002041459084e-05</internalNodes>\n          <leafValues>\n            3.5220399498939514e-01 -1.7333300411701202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1674 -1.6343999654054642e-02</internalNodes>\n          <leafValues>\n            -6.4397698640823364e-01 9.0680001303553581e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1675 4.5703999698162079e-02</internalNodes>\n          <leafValues>\n            1.8216000869870186e-02 3.1970798969268799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1676 -2.7382999658584595e-02</internalNodes>\n          <leafValues>\n            1.0564049482345581e+00 -1.7276400327682495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1677 -2.7602000162005424e-02</internalNodes>\n          <leafValues>\n            2.9715499281883240e-01 -9.4600003212690353e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1678 7.6939999125897884e-03</internalNodes>\n          <leafValues>\n            -2.1660299599170685e-01 4.7385200858116150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1679 -7.0500001311302185e-04</internalNodes>\n          <leafValues>\n            2.4048799276351929e-01 -2.6776000857353210e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1680 1.1054199934005737e-01</internalNodes>\n          <leafValues>\n            -3.3539000898599625e-02 -1.0233880281448364e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1681 6.8765997886657715e-02</internalNodes>\n          <leafValues>\n            -4.3239998631179333e-03 5.7153397798538208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1682 1.7999999690800905e-03</internalNodes>\n          <leafValues>\n            7.7574998140335083e-02 -4.2092698812484741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1683 1.9232000410556793e-01</internalNodes>\n          <leafValues>\n            8.2021996378898621e-02 2.8810169696807861e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1684 1.5742099285125732e-01</internalNodes>\n          <leafValues>\n            -1.3708199560642242e-01 2.0890059471130371e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1685 -4.9387000501155853e-02</internalNodes>\n          <leafValues>\n            -1.8610910177230835e+00 1.4332099258899689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1686 5.1929000765085220e-02</internalNodes>\n          <leafValues>\n            -1.8737000226974487e-01 5.4231601953506470e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1687 4.9965001642704010e-02</internalNodes>\n          <leafValues>\n            1.4175300300121307e-01 -1.5625779628753662e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1688 -4.2633000761270523e-02</internalNodes>\n          <leafValues>\n            1.6059479713439941e+00 -1.4712899923324585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1689 -3.7553999572992325e-02</internalNodes>\n          <leafValues>\n            -8.0974900722503662e-01 1.3256999850273132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1690 -3.7174999713897705e-02</internalNodes>\n          <leafValues>\n            -1.3945020437240601e+00 -5.7055000215768814e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1691 1.3945999555289745e-02</internalNodes>\n          <leafValues>\n            3.3427000045776367e-02 5.7474797964096069e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1692 -4.4800000614486635e-04</internalNodes>\n          <leafValues>\n            -5.5327498912811279e-01 2.1952999755740166e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1693 3.1993001699447632e-02</internalNodes>\n          <leafValues>\n            2.0340999588370323e-02 3.7459200620651245e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1694 -4.2799999937415123e-03</internalNodes>\n          <leafValues>\n            4.4428700208663940e-01 -2.2999699413776398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1695 9.8550003021955490e-03</internalNodes>\n          <leafValues>\n            1.8315799534320831e-01 -4.0964999794960022e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1696 9.3356996774673462e-02</internalNodes>\n          <leafValues>\n            -6.3661001622676849e-02 -1.6929290294647217e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1697 1.7209999263286591e-02</internalNodes>\n          <leafValues>\n            2.0153899490833282e-01 -4.6061098575592041e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1698 8.4319999441504478e-03</internalNodes>\n          <leafValues>\n            -3.2003998756408691e-01 1.5312199294567108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1699 -1.4054999686777592e-02</internalNodes>\n          <leafValues>\n            8.6882400512695312e-01 3.2575000077486038e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1700 -7.7180000953376293e-03</internalNodes>\n          <leafValues>\n            6.3686698675155640e-01 -1.8425500392913818e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1701 2.8005000203847885e-02</internalNodes>\n          <leafValues>\n            1.7357499897480011e-01 -4.7883599996566772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1702 -1.8884999677538872e-02</internalNodes>\n          <leafValues>\n            2.4101600050926208e-01 -2.6547598838806152e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1703 -1.8585000187158585e-02</internalNodes>\n          <leafValues>\n            5.4232501983642578e-01 5.3633000701665878e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1704 -3.6437001079320908e-02</internalNodes>\n          <leafValues>\n            2.3908898830413818e+00 -1.3634699583053589e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1705 3.2455001026391983e-02</internalNodes>\n          <leafValues>\n            1.5910699963569641e-01 -6.7581498622894287e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1706 5.9781998395919800e-02</internalNodes>\n          <leafValues>\n            -2.3479999508708715e-03 -7.3053699731826782e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1707 9.8209995776414871e-03</internalNodes>\n          <leafValues>\n            -1.1444099992513657e-01 3.0570301413536072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1708 -3.5163998603820801e-02</internalNodes>\n          <leafValues>\n            -1.0511469841003418e+00 -3.3103000372648239e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1709 2.7429999317973852e-03</internalNodes>\n          <leafValues>\n            -2.0135399699211121e-01 3.2754099369049072e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1710 8.1059997901320457e-03</internalNodes>\n          <leafValues>\n            -2.1383500099182129e-01 4.3362098932266235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1711 8.8942997157573700e-02</internalNodes>\n          <leafValues>\n            1.0940899699926376e-01 -4.7609338760375977e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1712 -3.0054999515414238e-02</internalNodes>\n          <leafValues>\n            -1.7169300317764282e+00 -6.0919001698493958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1713 -2.1734999492764473e-02</internalNodes>\n          <leafValues>\n            6.4778900146484375e-01 -3.2830998301506042e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1714 3.7648998200893402e-02</internalNodes>\n          <leafValues>\n            -1.0060000233352184e-02 -7.6569098234176636e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1715 2.7189999818801880e-03</internalNodes>\n          <leafValues>\n            1.9888900220394135e-01 -8.2479000091552734e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1716 -1.0548000223934650e-02</internalNodes>\n          <leafValues>\n            -8.6613601446151733e-01 -2.5986000895500183e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1717 1.2966300547122955e-01</internalNodes>\n          <leafValues>\n            1.3911999762058258e-01 -2.2271950244903564e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1718 -1.7676999792456627e-02</internalNodes>\n          <leafValues>\n            3.3967700600624084e-01 -2.3989599943161011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1719 -7.7051997184753418e-02</internalNodes>\n          <leafValues>\n            -2.5017969608306885e+00 1.2841999530792236e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1720 -1.9230000674724579e-02</internalNodes>\n          <leafValues>\n            5.0641202926635742e-01 -1.9751599431037903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1721 -5.1222998648881912e-02</internalNodes>\n          <leafValues>\n            -2.9333369731903076e+00 1.3858500123023987e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1722 2.0830000285059214e-03</internalNodes>\n          <leafValues>\n            -6.0043597221374512e-01 2.9718000441789627e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1723 2.5418000295758247e-02</internalNodes>\n          <leafValues>\n            3.3915799856185913e-01 -1.4392000436782837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1724 -2.3905999958515167e-02</internalNodes>\n          <leafValues>\n            -1.1082680225372314e+00 -4.7377001494169235e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1725 -6.3740001060068607e-03</internalNodes>\n          <leafValues>\n            4.4533699750900269e-01 -6.7052997648715973e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1726 -3.7698999047279358e-02</internalNodes>\n          <leafValues>\n            -1.0406579971313477e+00 -4.1790001094341278e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1727 2.1655100584030151e-01</internalNodes>\n          <leafValues>\n            3.3863000571727753e-02 8.2017302513122559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1728 -1.3400999829173088e-02</internalNodes>\n          <leafValues>\n            5.2903497219085693e-01 -1.9133000075817108e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>196</maxWeakCount>\n      <stageThreshold>-3.2103500366210938e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1729 7.1268998086452484e-02</internalNodes>\n          <leafValues>\n            -5.3631198406219482e-01 6.0715299844741821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1730 5.6111000478267670e-02</internalNodes>\n          <leafValues>\n            -5.0141602754592896e-01 4.3976101279258728e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1731 4.0463998913764954e-02</internalNodes>\n          <leafValues>\n            -3.2922199368476868e-01 5.4834699630737305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1732 6.3155002892017365e-02</internalNodes>\n          <leafValues>\n            -3.1701698899269104e-01 4.6152999997138977e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1733 1.0320999659597874e-02</internalNodes>\n          <leafValues>\n            1.0694999992847443e-01 -9.8243898153305054e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1734 6.2606997787952423e-02</internalNodes>\n          <leafValues>\n            -1.4329700171947479e-01 7.1095001697540283e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1735 -3.9416000247001648e-02</internalNodes>\n          <leafValues>\n            9.4380199909210205e-01 -2.1572099626064301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1736 -5.3960001096129417e-03</internalNodes>\n          <leafValues>\n            -5.4611998796463013e-01 2.5303798913955688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1737 1.0773199796676636e-01</internalNodes>\n          <leafValues>\n            1.2496000155806541e-02 -1.0809199810028076e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1738 1.6982000321149826e-02</internalNodes>\n          <leafValues>\n            -3.1536400318145752e-01 5.1239997148513794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1739 3.1216999515891075e-02</internalNodes>\n          <leafValues>\n            -4.5199999585747719e-03 -1.2443480491638184e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1740 -2.3106999695301056e-02</internalNodes>\n          <leafValues>\n            -7.6492899656295776e-01 2.0640599727630615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1741 -1.1203999631106853e-02</internalNodes>\n          <leafValues>\n            2.4092699587345123e-01 -3.5142099857330322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1742 -4.7479998320341110e-03</internalNodes>\n          <leafValues>\n            -9.7007997334003448e-02 2.0638099312782288e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1743 -1.7358999699354172e-02</internalNodes>\n          <leafValues>\n            -7.9020297527313232e-01 2.1852999925613403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1744 1.8851999193429947e-02</internalNodes>\n          <leafValues>\n            -1.0394600033760071e-01 5.4844200611114502e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1745 7.2249998338520527e-03</internalNodes>\n          <leafValues>\n            -4.0409401059150696e-01 2.6763799786567688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1746 1.8915999680757523e-02</internalNodes>\n          <leafValues>\n            2.0508000254631042e-01 -1.0206340551376343e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1747 3.1156999990344048e-02</internalNodes>\n          <leafValues>\n            1.2400000123307109e-03 -8.7293499708175659e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1748 2.0951999351382256e-02</internalNodes>\n          <leafValues>\n            -5.5559999309480190e-03 8.0356198549270630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1749 1.1291000060737133e-02</internalNodes>\n          <leafValues>\n            -3.6478400230407715e-01 2.2767899930477142e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1750 -5.7011000812053680e-02</internalNodes>\n          <leafValues>\n            -1.4295619726181030e+00 1.4322000741958618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1751 7.2194002568721771e-02</internalNodes>\n          <leafValues>\n            -4.1850000619888306e-02 -1.9111829996109009e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1752 -1.9874000921845436e-02</internalNodes>\n          <leafValues>\n            2.6425498723983765e-01 -3.2617700099945068e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1753 -1.6692999750375748e-02</internalNodes>\n          <leafValues>\n            -8.3907800912857056e-01 4.0799999260343611e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1754 -3.9834998548030853e-02</internalNodes>\n          <leafValues>\n            -4.8858499526977539e-01 1.6436100006103516e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1755 2.7009999379515648e-02</internalNodes>\n          <leafValues>\n            -1.8862499296665192e-01 8.3419400453567505e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1756 -3.9420002140104771e-03</internalNodes>\n          <leafValues>\n            2.3231500387191772e-01 -7.2360001504421234e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1757 2.2833000868558884e-02</internalNodes>\n          <leafValues>\n            -3.5884000360965729e-02 -1.1549400091171265e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1758 -6.8888001143932343e-02</internalNodes>\n          <leafValues>\n            -1.7837309837341309e+00 1.5159000456333160e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1759 4.3097000569105148e-02</internalNodes>\n          <leafValues>\n            -2.1608099341392517e-01 5.0624102354049683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1760 8.6239995434880257e-03</internalNodes>\n          <leafValues>\n            -1.7795599997043610e-01 2.8957900404930115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1761 1.4561000280082226e-02</internalNodes>\n          <leafValues>\n            -1.1408000253140926e-02 -8.9402002096176147e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1762 -1.1501000262796879e-02</internalNodes>\n          <leafValues>\n            3.0171999335289001e-01 -4.3659001588821411e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1763 -1.0971499979496002e-01</internalNodes>\n          <leafValues>\n            -9.5147097110748291e-01 -1.9973000511527061e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1764 4.5228000730276108e-02</internalNodes>\n          <leafValues>\n            3.3110998570919037e-02 9.6619802713394165e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1765 -2.7047999203205109e-02</internalNodes>\n          <leafValues>\n            9.7963601350784302e-01 -1.7261900007724762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1766 1.8030999228358269e-02</internalNodes>\n          <leafValues>\n            -2.0801000297069550e-02 2.7385899424552917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1767 5.0524998456239700e-02</internalNodes>\n          <leafValues>\n            -5.6802999228239059e-02 -1.7775089740753174e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1768 -2.9923999682068825e-02</internalNodes>\n          <leafValues>\n            6.5329200029373169e-01 -2.3537000641226768e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1769 3.8058001548051834e-02</internalNodes>\n          <leafValues>\n            2.6317000389099121e-02 -7.0665699243545532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1770 1.8563899397850037e-01</internalNodes>\n          <leafValues>\n            -5.6039998307824135e-03 3.2873699069023132e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1771 -4.0670000016689301e-03</internalNodes>\n          <leafValues>\n            3.4204798936843872e-01 -3.0171599984169006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1772 1.0108999907970428e-02</internalNodes>\n          <leafValues>\n            -7.3600001633167267e-03 5.7981598377227783e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1773 -1.1567000299692154e-02</internalNodes>\n          <leafValues>\n            -5.2722197771072388e-01 4.6447999775409698e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1774 -6.5649999305605888e-03</internalNodes>\n          <leafValues>\n            -5.8529102802276611e-01 1.9101899862289429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1775 1.0582000017166138e-02</internalNodes>\n          <leafValues>\n            2.1073000505566597e-02 -6.8892598152160645e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1776 -2.0304000005125999e-02</internalNodes>\n          <leafValues>\n            -3.6400699615478516e-01 1.5338799357414246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1777 2.3529999889433384e-03</internalNodes>\n          <leafValues>\n            3.6164000630378723e-02 -5.9825098514556885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1778 -1.4690000098198652e-03</internalNodes>\n          <leafValues>\n            -1.4707699418067932e-01 3.7507998943328857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1779 8.6449999362230301e-03</internalNodes>\n          <leafValues>\n            -2.1708500385284424e-01 5.1936799287796021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1780 -2.4326000362634659e-02</internalNodes>\n          <leafValues>\n            -1.0846769809722900e+00 1.4084799587726593e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1781 7.4418999254703522e-02</internalNodes>\n          <leafValues>\n            -1.5513800084590912e-01 1.1822769641876221e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1782 1.7077999189496040e-02</internalNodes>\n          <leafValues>\n            4.4231001287698746e-02 9.1561102867126465e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1783 -2.4577999487519264e-02</internalNodes>\n          <leafValues>\n            -1.5504100322723389e+00 -5.4745998233556747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1784 3.0205000191926956e-02</internalNodes>\n          <leafValues>\n            1.6662800312042236e-01 -1.0001239776611328e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1785 1.2136000208556652e-02</internalNodes>\n          <leafValues>\n            -7.7079099416732788e-01 -4.8639997839927673e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1786 8.6717002093791962e-02</internalNodes>\n          <leafValues>\n            1.1061699688434601e-01 -1.6857999563217163e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1787 -4.2309001088142395e-02</internalNodes>\n          <leafValues>\n            1.1075930595397949e+00 -1.5438599884510040e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1788 -2.6420000940561295e-03</internalNodes>\n          <leafValues>\n            2.7451899647712708e-01 -1.8456199765205383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1789 -5.6662000715732574e-02</internalNodes>\n          <leafValues>\n            -8.0625599622726440e-01 -1.6928000375628471e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1790 2.3475000634789467e-02</internalNodes>\n          <leafValues>\n            1.4187699556350708e-01 -2.5500899553298950e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1791 -2.0803000777959824e-02</internalNodes>\n          <leafValues>\n            1.9826300442218781e-01 -3.1171199679374695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1792 7.2599998675286770e-03</internalNodes>\n          <leafValues>\n            -5.0590999424457550e-02 4.1923800110816956e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1793 3.4160000085830688e-01</internalNodes>\n          <leafValues>\n            -1.6674900054931641e-01 9.2748600244522095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1794 6.2029999680817127e-03</internalNodes>\n          <leafValues>\n            -1.2625899910926819e-01 4.0445300936698914e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1795 3.2692000269889832e-02</internalNodes>\n          <leafValues>\n            -3.2634999603033066e-02 -9.8939800262451172e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1796 2.1100000594742596e-04</internalNodes>\n          <leafValues>\n            -6.4534001052379608e-02 2.5473698973655701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1797 7.2100001852959394e-04</internalNodes>\n          <leafValues>\n            -3.6618599295616150e-01 1.1973100155591965e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1798 5.4490998387336731e-02</internalNodes>\n          <leafValues>\n            1.2073499709367752e-01 -1.0291390419006348e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1799 -1.0141000151634216e-02</internalNodes>\n          <leafValues>\n            -5.2177202701568604e-01 3.3734999597072601e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1800 -1.8815999850630760e-02</internalNodes>\n          <leafValues>\n            6.5181797742843628e-01 1.3399999588727951e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1801 -5.3480002097785473e-03</internalNodes>\n          <leafValues>\n            1.7370699346065521e-01 -3.4132000803947449e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1802 -1.0847000405192375e-02</internalNodes>\n          <leafValues>\n            -1.9699899852275848e-01 1.5045499801635742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1803 -4.9926001578569412e-02</internalNodes>\n          <leafValues>\n            -5.0888502597808838e-01 3.0762000009417534e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1804 1.2160000391304493e-02</internalNodes>\n          <leafValues>\n            -6.9251999258995056e-02 1.8745499849319458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1805 -2.2189998999238014e-03</internalNodes>\n          <leafValues>\n            -4.0849098563194275e-01 7.9954996705055237e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1806 3.1580000650137663e-03</internalNodes>\n          <leafValues>\n            -2.1124599874019623e-01 2.2366400063037872e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1807 4.1439998894929886e-03</internalNodes>\n          <leafValues>\n            -4.9900299310684204e-01 6.2917001545429230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1808 -7.3730000294744968e-03</internalNodes>\n          <leafValues>\n            -2.0553299784660339e-01 2.2096699476242065e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1809 5.1812000572681427e-02</internalNodes>\n          <leafValues>\n            1.8096800148487091e-01 -4.3495801091194153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1810 1.8340000882744789e-02</internalNodes>\n          <leafValues>\n            1.5200000256299973e-02 3.7991699576377869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1811 1.7490799725055695e-01</internalNodes>\n          <leafValues>\n            -2.0920799672603607e-01 4.0013000369071960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1812 5.3993999958038330e-02</internalNodes>\n          <leafValues>\n            2.4751600623130798e-01 -2.6712900400161743e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1813 -3.2033199071884155e-01</internalNodes>\n          <leafValues>\n            -1.9094380140304565e+00 -6.6960997879505157e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1814 -2.7060000225901604e-02</internalNodes>\n          <leafValues>\n            -7.1371299028396606e-01 1.5904599428176880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1815 7.7463999390602112e-02</internalNodes>\n          <leafValues>\n            -1.6970199346542358e-01 7.7552998065948486e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1816 2.3771999403834343e-02</internalNodes>\n          <leafValues>\n            1.9021899998188019e-01 -6.0162097215652466e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1817 1.1501000262796879e-02</internalNodes>\n          <leafValues>\n            7.7039999887347221e-03 -6.1730301380157471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1818 3.2616000622510910e-02</internalNodes>\n          <leafValues>\n            1.7159199714660645e-01 -7.0978200435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1819 -4.4383000582456589e-02</internalNodes>\n          <leafValues>\n            -2.2606229782104492e+00 -7.3276996612548828e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1820 -5.8476001024246216e-02</internalNodes>\n          <leafValues>\n            2.4087750911712646e+00 8.3091996610164642e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1821 1.9303999841213226e-02</internalNodes>\n          <leafValues>\n            -2.7082300186157227e-01 2.7369999885559082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1822 -4.4705998152494431e-02</internalNodes>\n          <leafValues>\n            3.1355598568916321e-01 -6.2492001801729202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1823 -6.0334999114274979e-02</internalNodes>\n          <leafValues>\n            -1.4515119791030884e+00 -5.8761000633239746e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1824 1.1667000129818916e-02</internalNodes>\n          <leafValues>\n            -1.8084999173879623e-02 5.0479698181152344e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1825 2.8009999543428421e-02</internalNodes>\n          <leafValues>\n            -2.3302899301052094e-01 3.0708700418472290e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1826 6.5397001802921295e-02</internalNodes>\n          <leafValues>\n            1.4135900139808655e-01 -5.0010901689529419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1827 9.6239997074007988e-03</internalNodes>\n          <leafValues>\n            -2.2054600715637207e-01 3.9191201329231262e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1828 2.5510000996291637e-03</internalNodes>\n          <leafValues>\n            -1.1381500214338303e-01 2.0032300055027008e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1829 3.1847000122070312e-02</internalNodes>\n          <leafValues>\n            2.5476999580860138e-02 -5.3326398134231567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1830 3.3055000007152557e-02</internalNodes>\n          <leafValues>\n            1.7807699739933014e-01 -6.2793898582458496e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1831 4.7600999474525452e-02</internalNodes>\n          <leafValues>\n            -1.4747899770736694e-01 1.4204180240631104e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1832 -1.9571999087929726e-02</internalNodes>\n          <leafValues>\n            -5.2693498134613037e-01 1.5838600695133209e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1833 -5.4730001837015152e-02</internalNodes>\n          <leafValues>\n            8.8231599330902100e-01 -1.6627800464630127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1834 -2.2686000913381577e-02</internalNodes>\n          <leafValues>\n            -4.8386898636817932e-01 1.5000100433826447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1835 1.0713200271129608e-01</internalNodes>\n          <leafValues>\n            -2.1336199343204498e-01 4.2333900928497314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1836 -3.6380000412464142e-02</internalNodes>\n          <leafValues>\n            -7.4198000133037567e-02 1.4589400589466095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1837 1.3935999944806099e-02</internalNodes>\n          <leafValues>\n            -2.4911600351333618e-01 2.6771199703216553e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1838 2.0991999655961990e-02</internalNodes>\n          <leafValues>\n            8.7959999218583107e-03 4.3064999580383301e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1839 4.9118999391794205e-02</internalNodes>\n          <leafValues>\n            -1.7591999471187592e-01 6.9282901287078857e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1840 3.6315999925136566e-02</internalNodes>\n          <leafValues>\n            1.3145299255847931e-01 -3.3597299456596375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1841 4.1228000074625015e-02</internalNodes>\n          <leafValues>\n            -4.5692000538110733e-02 -1.3515930175781250e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1842 1.5672000125050545e-02</internalNodes>\n          <leafValues>\n            1.7544099688529968e-01 -6.0550000518560410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1843 -1.6286000609397888e-02</internalNodes>\n          <leafValues>\n            -1.1308189630508423e+00 -3.9533000439405441e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1844 -3.0229999683797359e-03</internalNodes>\n          <leafValues>\n            -2.2454300522804260e-01 2.3628099262714386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1845 -1.3786299526691437e-01</internalNodes>\n          <leafValues>\n            4.5376899838447571e-01 -2.1098700165748596e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1846 -9.6760001033544540e-03</internalNodes>\n          <leafValues>\n            -1.5105099976062775e-01 2.0781700313091278e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1847 -2.4839999154210091e-02</internalNodes>\n          <leafValues>\n            -6.8350297212600708e-01 -8.0040004104375839e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1848 -1.3964399695396423e-01</internalNodes>\n          <leafValues>\n            6.5011298656463623e-01 4.6544000506401062e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1849 -8.2153998315334320e-02</internalNodes>\n          <leafValues>\n            4.4887199997901917e-01 -2.3591999709606171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1850 3.8449999410659075e-03</internalNodes>\n          <leafValues>\n            -8.8173002004623413e-02 2.7346798777580261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1851 -6.6579999402165413e-03</internalNodes>\n          <leafValues>\n            -4.6866598725318909e-01 7.7001996338367462e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1852 -1.5898000448942184e-02</internalNodes>\n          <leafValues>\n            2.9268398880958557e-01 -2.1941000595688820e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1853 -5.0946000963449478e-02</internalNodes>\n          <leafValues>\n            -1.2093789577484131e+00 -4.2109999805688858e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1854 1.6837999224662781e-02</internalNodes>\n          <leafValues>\n            -4.5595999807119370e-02 5.0180697441101074e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1855 1.5918999910354614e-02</internalNodes>\n          <leafValues>\n            -2.6904299855232239e-01 2.6516300439834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1856 3.6309999413788319e-03</internalNodes>\n          <leafValues>\n            -1.3046100735664368e-01 3.1807100772857666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1857 -8.6144998669624329e-02</internalNodes>\n          <leafValues>\n            1.9443659782409668e+00 -1.3978299498558044e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1858 3.3140998333692551e-02</internalNodes>\n          <leafValues>\n            1.5266799926757812e-01 -3.0866000801324844e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1859 -3.9679999463260174e-03</internalNodes>\n          <leafValues>\n            -7.1202301979064941e-01 -1.3844000175595284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1860 -2.4008000269532204e-02</internalNodes>\n          <leafValues>\n            9.2007797956466675e-01 4.6723999083042145e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1861 8.7320003658533096e-03</internalNodes>\n          <leafValues>\n            -2.2567300498485565e-01 3.1931799650192261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1862 -2.7786999940872192e-02</internalNodes>\n          <leafValues>\n            -7.2337102890014648e-01 1.7018599808216095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1863 -1.9455300271511078e-01</internalNodes>\n          <leafValues>\n            1.2461860179901123e+00 -1.4736199378967285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1864 -1.0869699716567993e-01</internalNodes>\n          <leafValues>\n            -1.4465179443359375e+00 1.2145300209522247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1865 -1.9494999200105667e-02</internalNodes>\n          <leafValues>\n            -7.8153097629547119e-01 -2.3732999339699745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1866 3.0650000553578138e-03</internalNodes>\n          <leafValues>\n            -8.5471397638320923e-01 1.6686999797821045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1867 5.9193998575210571e-02</internalNodes>\n          <leafValues>\n            -1.4853699505329132e-01 1.1273469924926758e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1868 -5.4207999259233475e-02</internalNodes>\n          <leafValues>\n            5.4726999998092651e-01 3.5523999482393265e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1869 -3.9324998855590820e-02</internalNodes>\n          <leafValues>\n            3.6642599105834961e-01 -2.0543999969959259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1870 8.2278996706008911e-02</internalNodes>\n          <leafValues>\n            -3.5007998347282410e-02 5.3994202613830566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1871 -7.4479999020695686e-03</internalNodes>\n          <leafValues>\n            -6.1537498235702515e-01 -3.5319998860359192e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1872 7.3770000599324703e-03</internalNodes>\n          <leafValues>\n            -6.5591000020503998e-02 4.1961398720741272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1873 7.0779998786747456e-03</internalNodes>\n          <leafValues>\n            -3.4129500389099121e-01 1.2536799907684326e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1874 -1.5581999905407429e-02</internalNodes>\n          <leafValues>\n            -3.0240398645401001e-01 2.1511000394821167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1875 -2.7399999089539051e-03</internalNodes>\n          <leafValues>\n            7.6553001999855042e-02 -4.1060501337051392e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1876 -7.0600003004074097e-02</internalNodes>\n          <leafValues>\n            -9.7356200218200684e-01 1.1241800338029861e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1877 -1.1706000193953514e-02</internalNodes>\n          <leafValues>\n            1.8560700118541718e-01 -2.9755198955535889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1878 7.1499997284263372e-04</internalNodes>\n          <leafValues>\n            -5.9650000184774399e-02 2.4824699759483337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1879 -3.6866001784801483e-02</internalNodes>\n          <leafValues>\n            3.2751700282096863e-01 -2.3059600591659546e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1880 -3.2526999711990356e-02</internalNodes>\n          <leafValues>\n            -2.9320299625396729e-01 1.5427699685096741e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1881 -7.4813999235630035e-02</internalNodes>\n          <leafValues>\n            -1.2143570184707642e+00 -5.2244000136852264e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1882 4.1469998657703400e-02</internalNodes>\n          <leafValues>\n            1.3062499463558197e-01 -2.3274369239807129e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1883 -2.8880000114440918e-02</internalNodes>\n          <leafValues>\n            -6.6074597835540771e-01 -9.0960003435611725e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1884 4.6381998807191849e-02</internalNodes>\n          <leafValues>\n            1.6630199551582336e-01 -6.6949498653411865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1885 2.5424998998641968e-01</internalNodes>\n          <leafValues>\n            -5.4641999304294586e-02 -1.2676080465316772e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1886 2.4000001139938831e-03</internalNodes>\n          <leafValues>\n            2.0276799798011780e-01 1.4667999930679798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1887 -8.2805998623371124e-02</internalNodes>\n          <leafValues>\n            -7.8713601827621460e-01 -2.4468999356031418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1888 -1.1438000015914440e-02</internalNodes>\n          <leafValues>\n            2.8623399138450623e-01 -3.0894000083208084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1889 -1.2913399934768677e-01</internalNodes>\n          <leafValues>\n            1.7292929887771606e+00 -1.4293900132179260e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1890 3.8552999496459961e-02</internalNodes>\n          <leafValues>\n            1.9232999533414841e-02 3.7732601165771484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1891 1.0191400349140167e-01</internalNodes>\n          <leafValues>\n            -7.4533998966217041e-02 -3.3868899345397949e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1892 -1.9068000838160515e-02</internalNodes>\n          <leafValues>\n            3.1814101338386536e-01 1.9261000677943230e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1893 -6.0775000602006912e-02</internalNodes>\n          <leafValues>\n            7.6936298608779907e-01 -1.7644000053405762e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1894 2.4679999798536301e-02</internalNodes>\n          <leafValues>\n            1.8396499752998352e-01 -3.0868801474571228e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1895 2.6759000495076180e-02</internalNodes>\n          <leafValues>\n            -2.3454900085926056e-01 3.3056598901748657e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1896 1.4969999901950359e-02</internalNodes>\n          <leafValues>\n            1.7213599383831024e-01 -1.8248899281024933e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1897 2.6142999529838562e-02</internalNodes>\n          <leafValues>\n            -4.6463999897241592e-02 -1.1318379640579224e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1898 -3.7512000650167465e-02</internalNodes>\n          <leafValues>\n            8.0404001474380493e-01 6.9660000503063202e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1899 -5.3229997865855694e-03</internalNodes>\n          <leafValues>\n            -8.1884402036666870e-01 -1.8224999308586121e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1900 1.7813000828027725e-02</internalNodes>\n          <leafValues>\n            1.4957800507545471e-01 -1.8667200207710266e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1901 -3.4010000526905060e-02</internalNodes>\n          <leafValues>\n            -7.2852301597595215e-01 -1.6615999862551689e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1902 -1.5953000634908676e-02</internalNodes>\n          <leafValues>\n            5.6944000720977783e-01 1.3832000084221363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1903 1.9743999466300011e-02</internalNodes>\n          <leafValues>\n            4.0525000542402267e-02 -4.1773399710655212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1904 -1.0374800115823746e-01</internalNodes>\n          <leafValues>\n            -1.9825149774551392e+00 1.1960200220346451e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1905 -1.9285000860691071e-02</internalNodes>\n          <leafValues>\n            5.0230598449707031e-01 -1.9745899736881256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1906 -1.2780000455677509e-02</internalNodes>\n          <leafValues>\n            4.0195000171661377e-01 -2.6957999914884567e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1907 -1.6352999955415726e-02</internalNodes>\n          <leafValues>\n            -7.6608800888061523e-01 -2.4209000170230865e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1908 -1.2763699889183044e-01</internalNodes>\n          <leafValues>\n            8.6578500270843506e-01 6.4205996692180634e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1909 1.9068999215960503e-02</internalNodes>\n          <leafValues>\n            -5.5929797887802124e-01 -1.6880000475794077e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1910 3.2480999827384949e-02</internalNodes>\n          <leafValues>\n            4.0722001343965530e-02 4.8925098776817322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1911 9.4849998131394386e-03</internalNodes>\n          <leafValues>\n            -1.9231900572776794e-01 5.1139700412750244e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1912 5.0470000132918358e-03</internalNodes>\n          <leafValues>\n            1.8706800043582916e-01 -1.6113600134849548e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1913 4.1267998516559601e-02</internalNodes>\n          <leafValues>\n            -4.8817999660968781e-02 -1.1326299905776978e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1914 -7.6358996331691742e-02</internalNodes>\n          <leafValues>\n            1.4169390201568604e+00 8.7319999933242798e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1915 -7.2834998369216919e-02</internalNodes>\n          <leafValues>\n            1.3189860582351685e+00 -1.4819100499153137e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1916 5.9576999396085739e-02</internalNodes>\n          <leafValues>\n            4.8376999795436859e-02 8.5611802339553833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1917 2.0263999700546265e-02</internalNodes>\n          <leafValues>\n            -2.1044099330902100e-01 3.3858999609947205e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1918 -8.0301001667976379e-02</internalNodes>\n          <leafValues>\n            -1.2464400529861450e+00 1.1857099831104279e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1919 -1.7835000529885292e-02</internalNodes>\n          <leafValues>\n            2.5782299041748047e-01 -2.4564799666404724e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1920 1.1431000195443630e-02</internalNodes>\n          <leafValues>\n            2.2949799895286560e-01 -2.9497599601745605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1921 -2.5541000068187714e-02</internalNodes>\n          <leafValues>\n            -8.6252999305725098e-01 -7.0400000549852848e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1922 -7.6899997657164931e-04</internalNodes>\n          <leafValues>\n            3.1511399149894714e-01 -1.4349000155925751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1923 -1.4453999698162079e-02</internalNodes>\n          <leafValues>\n            2.5148499011993408e-01 -2.8232899308204651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1924 8.6730001494288445e-03</internalNodes>\n          <leafValues>\n            2.6601400971412659e-01 -2.8190800547599792e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>197</maxWeakCount>\n      <stageThreshold>-3.2772979736328125e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 1925 5.4708998650312424e-02</internalNodes>\n          <leafValues>\n            -5.4144299030303955e-01 6.1043000221252441e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1926 -1.0838799923658371e-01</internalNodes>\n          <leafValues>\n            7.1739900112152100e-01 -4.1196098923683167e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1927 2.2996999323368073e-02</internalNodes>\n          <leafValues>\n            -5.8269798755645752e-01 2.9645600914955139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1928 2.7540000155568123e-03</internalNodes>\n          <leafValues>\n            -7.4243897199630737e-01 1.4183300733566284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1929 -2.1520000882446766e-03</internalNodes>\n          <leafValues>\n            1.7879900336265564e-01 -6.8548601865768433e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1930 -2.2559000179171562e-02</internalNodes>\n          <leafValues>\n            -1.0775549411773682e+00 1.2388999760150909e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1931 8.3025000989437103e-02</internalNodes>\n          <leafValues>\n            2.4500999599695206e-02 -1.0251879692077637e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1932 -6.6740000620484352e-03</internalNodes>\n          <leafValues>\n            -4.5283100008964539e-01 2.1230199933052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1933 7.6485000550746918e-02</internalNodes>\n          <leafValues>\n            -2.6972699165344238e-01 4.8580199480056763e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1934 5.4910001344978809e-03</internalNodes>\n          <leafValues>\n            -4.8871201276779175e-01 3.1616398692131042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1935 -1.0414999909698963e-02</internalNodes>\n          <leafValues>\n            4.1512900590896606e-01 -3.0044800043106079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1936 2.7607999742031097e-02</internalNodes>\n          <leafValues>\n            1.6203799843788147e-01 -9.9868500232696533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1937 -2.3272000253200531e-02</internalNodes>\n          <leafValues>\n            -1.1024399995803833e+00 2.1124999970197678e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1938 -5.5619999766349792e-02</internalNodes>\n          <leafValues>\n            6.5033102035522461e-01 -2.7938000857830048e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1939 -4.0631998330354691e-02</internalNodes>\n          <leafValues>\n            4.2117300629615784e-01 -2.6763799786567688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1940 -7.3560001328587532e-03</internalNodes>\n          <leafValues>\n            3.5277798771858215e-01 -3.7854000926017761e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1941 1.7007000744342804e-02</internalNodes>\n          <leafValues>\n            -2.9189500212669373e-01 4.1053798794746399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1942 -3.7034001201391220e-02</internalNodes>\n          <leafValues>\n            -1.3216309547424316e+00 1.2966500222682953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1943 -1.9633000716567039e-02</internalNodes>\n          <leafValues>\n            -8.7702298164367676e-01 1.0799999581649899e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1944 -2.3546999320387840e-02</internalNodes>\n          <leafValues>\n            2.6106101274490356e-01 -2.1481400728225708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1945 -4.3352998793125153e-02</internalNodes>\n          <leafValues>\n            -9.9089699983596802e-01 -9.9560003727674484e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1946 -2.2183999419212341e-02</internalNodes>\n          <leafValues>\n            6.3454401493072510e-01 -5.6547001004219055e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1947 1.6530999913811684e-02</internalNodes>\n          <leafValues>\n            2.4664999917149544e-02 -7.3326802253723145e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1948 -3.2744001597166061e-02</internalNodes>\n          <leafValues>\n            -5.6297200918197632e-01 1.6640299558639526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1949 7.1415998041629791e-02</internalNodes>\n          <leafValues>\n            -3.0000001424923539e-04 -9.3286401033401489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1950 8.0999999772757292e-04</internalNodes>\n          <leafValues>\n            -9.5380000770092010e-02 2.5184699892997742e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1951 -8.4090000018477440e-03</internalNodes>\n          <leafValues>\n            -6.5496802330017090e-01 6.7300997674465179e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1952 -1.7254000529646873e-02</internalNodes>\n          <leafValues>\n            -4.6492999792098999e-01 1.6070899367332458e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1953 -1.8641000613570213e-02</internalNodes>\n          <leafValues>\n            -1.0594010353088379e+00 -1.9617000594735146e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1954 -9.1979997232556343e-03</internalNodes>\n          <leafValues>\n            5.0716197490692139e-01 -1.5339200198650360e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1955 1.8538000062108040e-02</internalNodes>\n          <leafValues>\n            -3.0498200654983521e-01 7.3506200313568115e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1956 -5.0335001200437546e-02</internalNodes>\n          <leafValues>\n            -1.1140480041503906e+00 1.8000100553035736e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1957 -2.3529000580310822e-02</internalNodes>\n          <leafValues>\n            -8.6907899379730225e-01 -1.2459999881684780e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1958 -2.7100000530481339e-02</internalNodes>\n          <leafValues>\n            6.5942901372909546e-01 -3.5323999822139740e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1959 6.5879998728632927e-03</internalNodes>\n          <leafValues>\n            -2.2953400015830994e-01 4.2425099015235901e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1960 2.3360000923275948e-02</internalNodes>\n          <leafValues>\n            1.8356199562549591e-01 -9.8587298393249512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1961 1.2946999631822109e-02</internalNodes>\n          <leafValues>\n            -3.3147400617599487e-01 2.1323199570178986e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1962 -6.6559999249875546e-03</internalNodes>\n          <leafValues>\n            -1.1951400339603424e-01 2.9752799868583679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1963 -2.2570999339222908e-02</internalNodes>\n          <leafValues>\n            3.8499400019645691e-01 -2.4434499442577362e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1964 -6.3813999295234680e-02</internalNodes>\n          <leafValues>\n            -8.9383500814437866e-01 1.4217500388622284e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1965 -4.9945000559091568e-02</internalNodes>\n          <leafValues>\n            5.3864401578903198e-01 -2.0485299825668335e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1966 6.8319998681545258e-03</internalNodes>\n          <leafValues>\n            -5.6678999215364456e-02 3.9970999956130981e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1967 -5.5835999548435211e-02</internalNodes>\n          <leafValues>\n            -1.5239470005035400e+00 -5.1183000206947327e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1968 3.1957000494003296e-01</internalNodes>\n          <leafValues>\n            7.4574001133441925e-02 1.2447799444198608e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1969 8.0955997109413147e-02</internalNodes>\n          <leafValues>\n            -1.9665500521659851e-01 5.9889698028564453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1970 -1.4911999925971031e-02</internalNodes>\n          <leafValues>\n            -6.4020597934722900e-01 1.5807600319385529e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1971 4.6709001064300537e-02</internalNodes>\n          <leafValues>\n            8.5239000618457794e-02 -4.5487201213836670e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1972 6.0539999976754189e-03</internalNodes>\n          <leafValues>\n            -4.3184000253677368e-01 2.2452600300312042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1973 -3.4375999122858047e-02</internalNodes>\n          <leafValues>\n            4.0202501416206360e-01 -2.3903599381446838e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1974 -3.4924000501632690e-02</internalNodes>\n          <leafValues>\n            5.2870100736618042e-01 3.9709001779556274e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1975 3.0030000489205122e-03</internalNodes>\n          <leafValues>\n            -3.8754299283027649e-01 1.4192600548267365e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1976 -1.4132999815046787e-02</internalNodes>\n          <leafValues>\n            8.7528401613235474e-01 8.5507996380329132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1977 -6.7940000444650650e-03</internalNodes>\n          <leafValues>\n            -1.1649219989776611e+00 -3.3943001180887222e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1978 -5.2886001765727997e-02</internalNodes>\n          <leafValues>\n            1.0930680036544800e+00 5.1187001168727875e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1979 -2.1079999860376120e-03</internalNodes>\n          <leafValues>\n            1.3696199655532837e-01 -3.3849999308586121e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1980 1.8353000283241272e-02</internalNodes>\n          <leafValues>\n            1.3661600649356842e-01 -4.0777799487113953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1981 1.2671999633312225e-02</internalNodes>\n          <leafValues>\n            -1.4936000108718872e-02 -8.1707501411437988e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1982 1.2924999929964542e-02</internalNodes>\n          <leafValues>\n            1.7625099420547485e-01 -3.2491698861122131e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1983 -1.7921000719070435e-02</internalNodes>\n          <leafValues>\n            -5.2745401859283447e-01 4.4443000108003616e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1984 1.9160000374540687e-03</internalNodes>\n          <leafValues>\n            -1.0978599637746811e-01 2.2067500650882721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1985 -1.4697999693453312e-02</internalNodes>\n          <leafValues>\n            3.9067798852920532e-01 -2.2224999964237213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1986 -1.4972999691963196e-02</internalNodes>\n          <leafValues>\n            -2.5450900197029114e-01 1.7790000140666962e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1987 1.4636999927461147e-02</internalNodes>\n          <leafValues>\n            -2.5125000625848770e-02 -8.7121301889419556e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1988 -1.0974000208079815e-02</internalNodes>\n          <leafValues>\n            7.9082798957824707e-01 2.0121000707149506e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1989 -9.1599998995661736e-03</internalNodes>\n          <leafValues>\n            -4.7906899452209473e-01 5.2232000976800919e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1990 4.6179997734725475e-03</internalNodes>\n          <leafValues>\n            -1.7244599759578705e-01 3.4527799487113953e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1991 2.3476999253034592e-02</internalNodes>\n          <leafValues>\n            3.7760001141577959e-03 -6.5333700180053711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1992 3.1766999512910843e-02</internalNodes>\n          <leafValues>\n            1.6364000737667084e-02 5.8723700046539307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1993 -1.8419999629259109e-02</internalNodes>\n          <leafValues>\n            1.9993899762630463e-01 -3.2056498527526855e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1994 1.9543999806046486e-02</internalNodes>\n          <leafValues>\n            1.8450200557708740e-01 -2.3793600499629974e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1995 4.1159498691558838e-01</internalNodes>\n          <leafValues>\n            -6.0382001101970673e-02 -1.6072119474411011e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1996 -4.1595999151468277e-02</internalNodes>\n          <leafValues>\n            -3.2756200432777405e-01 1.5058000385761261e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1997 -1.0335999540984631e-02</internalNodes>\n          <leafValues>\n            -6.2394398450851440e-01 1.3112000189721584e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1998 1.2392999604344368e-02</internalNodes>\n          <leafValues>\n            -3.3114999532699585e-02 5.5579900741577148e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 1999 -8.7270000949501991e-03</internalNodes>\n          <leafValues>\n            1.9883200526237488e-01 -3.7635600566864014e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2000 1.6295000910758972e-02</internalNodes>\n          <leafValues>\n            2.0373000204563141e-01 -4.2800799012184143e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2001 -1.0483999736607075e-02</internalNodes>\n          <leafValues>\n            -5.6847000122070312e-01 4.4199001044034958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2002 -1.2431999668478966e-02</internalNodes>\n          <leafValues>\n            7.4641901254653931e-01 4.3678998947143555e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2003 -5.0374999642372131e-02</internalNodes>\n          <leafValues>\n            8.5090100765228271e-01 -1.7773799598217010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2004 4.9548000097274780e-02</internalNodes>\n          <leafValues>\n            1.6784900426864624e-01 -2.9877498745918274e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2005 -4.1085001081228256e-02</internalNodes>\n          <leafValues>\n            -1.3302919864654541e+00 -4.9182001501321793e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2006 1.0069999843835831e-03</internalNodes>\n          <leafValues>\n            -6.0538999736309052e-02 1.8483200669288635e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2007 -5.0142999738454819e-02</internalNodes>\n          <leafValues>\n            7.6447701454162598e-01 -1.8356999754905701e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2008 -8.7879998609423637e-03</internalNodes>\n          <leafValues>\n            2.2655999660491943e-01 -6.3156999647617340e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2009 -5.0170999020338058e-02</internalNodes>\n          <leafValues>\n            -1.5899070501327515e+00 -6.1255000531673431e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2010 1.0216099768877029e-01</internalNodes>\n          <leafValues>\n            1.2071800231933594e-01 -1.4120110273361206e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2011 -1.4372999779880047e-02</internalNodes>\n          <leafValues>\n            -1.3116970062255859e+00 -5.1936000585556030e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2012 1.0281999595463276e-02</internalNodes>\n          <leafValues>\n            -2.1639999467879534e-03 4.4247201085090637e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2013 -1.1814000084996223e-02</internalNodes>\n          <leafValues>\n            6.5378099679946899e-01 -1.8723699450492859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2014 7.2114996612071991e-02</internalNodes>\n          <leafValues>\n            7.1846999228000641e-02 8.1496298313140869e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2015 -1.9001999869942665e-02</internalNodes>\n          <leafValues>\n            -6.7427200078964233e-01 -4.3200000072829425e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2016 -4.6990001574158669e-03</internalNodes>\n          <leafValues>\n            3.3311501145362854e-01 5.5794000625610352e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2017 -5.8157000690698624e-02</internalNodes>\n          <leafValues>\n            4.5572298765182495e-01 -2.0305100083351135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2018 1.1360000353306532e-03</internalNodes>\n          <leafValues>\n            -4.4686999171972275e-02 2.2681899368762970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2019 -4.9414999783039093e-02</internalNodes>\n          <leafValues>\n            2.6694598793983459e-01 -2.6116999983787537e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2020 -1.1913800239562988e-01</internalNodes>\n          <leafValues>\n            -8.3017998933792114e-01 1.3248500227928162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2021 -1.8303999677300453e-02</internalNodes>\n          <leafValues>\n            -6.7499202489852905e-01 1.7092000693082809e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2022 -7.9199997708201408e-03</internalNodes>\n          <leafValues>\n            -7.2287000715732574e-02 1.4425800740718842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2023 5.1925998181104660e-02</internalNodes>\n          <leafValues>\n            3.0921999365091324e-02 -5.5860602855682373e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2024 6.6724002361297607e-02</internalNodes>\n          <leafValues>\n            1.3666400313377380e-01 -2.9411000013351440e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2025 -1.3778000138700008e-02</internalNodes>\n          <leafValues>\n            -5.9443902969360352e-01 1.5300000086426735e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2026 -1.7760999500751495e-02</internalNodes>\n          <leafValues>\n            4.0496501326560974e-01 -3.3559999428689480e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2027 -4.2234998196363449e-02</internalNodes>\n          <leafValues>\n            -1.0897940397262573e+00 -4.0224999189376831e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2028 -1.3524999842047691e-02</internalNodes>\n          <leafValues>\n            2.8921899199485779e-01 -2.5194799900054932e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2029 -1.1106000281870365e-02</internalNodes>\n          <leafValues>\n            6.5312802791595459e-01 -1.8053700029850006e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2030 -1.2284599989652634e-01</internalNodes>\n          <leafValues>\n            -1.9570649862289429e+00 1.4815400540828705e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2031 4.7715999186038971e-02</internalNodes>\n          <leafValues>\n            -2.2875599563121796e-01 3.4233701229095459e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2032 3.1817000359296799e-02</internalNodes>\n          <leafValues>\n            1.5976299345493317e-01 -1.0091969966888428e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2033 4.2570000514388084e-03</internalNodes>\n          <leafValues>\n            -3.8881298899650574e-01 8.4210000932216644e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2034 -6.1372999101877213e-02</internalNodes>\n          <leafValues>\n            1.7152810096740723e+00 5.9324998408555984e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2035 -2.7030000928789377e-03</internalNodes>\n          <leafValues>\n            -3.8161700963973999e-01 8.5127003490924835e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2036 -6.8544000387191772e-02</internalNodes>\n          <leafValues>\n            -3.0925889015197754e+00 1.1788000166416168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2037 1.0372500121593475e-01</internalNodes>\n          <leafValues>\n            -1.3769300282001495e-01 1.9009410142898560e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2038 1.5799000859260559e-02</internalNodes>\n          <leafValues>\n            -6.2660001218318939e-02 2.5917699933052063e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2039 -9.8040001466870308e-03</internalNodes>\n          <leafValues>\n            -5.6291598081588745e-01 4.3923001736402512e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2040 -9.0229995548725128e-03</internalNodes>\n          <leafValues>\n            2.5287100672721863e-01 -4.1225999593734741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2041 -6.3754998147487640e-02</internalNodes>\n          <leafValues>\n            -2.6178569793701172e+00 -7.4005998671054840e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2042 3.8954999297857285e-02</internalNodes>\n          <leafValues>\n            5.9032998979091644e-02 8.5945600271224976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2043 -3.9802998304367065e-02</internalNodes>\n          <leafValues>\n            9.3600499629974365e-01 -1.5639400482177734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2044 5.0301998853683472e-02</internalNodes>\n          <leafValues>\n            1.3725900650024414e-01 -2.5549728870391846e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2045 4.6250000596046448e-02</internalNodes>\n          <leafValues>\n            -1.3964000158011913e-02 -7.1026200056076050e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2046 6.2196001410484314e-02</internalNodes>\n          <leafValues>\n            5.9526000171899796e-02 1.6509100198745728e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2047 -6.4776003360748291e-02</internalNodes>\n          <leafValues>\n            7.1368998289108276e-01 -1.7270000278949738e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2048 2.7522999793291092e-02</internalNodes>\n          <leafValues>\n            1.4631600677967072e-01 -8.1428997218608856e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2049 3.9900001138448715e-04</internalNodes>\n          <leafValues>\n            -3.7144500017166138e-01 1.0152699798345566e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2050 -4.3299999088048935e-03</internalNodes>\n          <leafValues>\n            -2.3756299912929535e-01 2.6798400282859802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2051 4.7297000885009766e-02</internalNodes>\n          <leafValues>\n            -2.7682000771164894e-02 -8.4910297393798828e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2052 1.2508999556303024e-02</internalNodes>\n          <leafValues>\n            1.8730199337005615e-01 -5.6001102924346924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2053 4.5899000018835068e-02</internalNodes>\n          <leafValues>\n            -1.5601199865341187e-01 9.7073000669479370e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2054 1.9853399693965912e-01</internalNodes>\n          <leafValues>\n            1.4895500242710114e-01 -1.1015529632568359e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2055 1.6674999147653580e-02</internalNodes>\n          <leafValues>\n            -1.6615299880504608e-01 8.2210999727249146e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2056 1.9829999655485153e-03</internalNodes>\n          <leafValues>\n            -7.1249999105930328e-02 2.8810900449752808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2057 2.2447999566793442e-02</internalNodes>\n          <leafValues>\n            -2.0981000736355782e-02 -7.8416502475738525e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2058 -1.3913000002503395e-02</internalNodes>\n          <leafValues>\n            -1.8165799975395203e-01 2.0491799712181091e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2059 -7.7659999951720238e-03</internalNodes>\n          <leafValues>\n            -4.5595899224281311e-01 6.3576996326446533e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2060 -1.3209000229835510e-02</internalNodes>\n          <leafValues>\n            2.6632300019264221e-01 -1.7795999348163605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2061 4.9052998423576355e-02</internalNodes>\n          <leafValues>\n            -1.5476800501346588e-01 1.1069979667663574e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2062 2.0263999700546265e-02</internalNodes>\n          <leafValues>\n            6.8915002048015594e-02 6.9867497682571411e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2063 -1.6828000545501709e-02</internalNodes>\n          <leafValues>\n            2.7607199549674988e-01 -2.5139200687408447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2064 -1.6939499974250793e-01</internalNodes>\n          <leafValues>\n            -3.0767529010772705e+00 1.1617500334978104e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2065 -1.1336100101470947e-01</internalNodes>\n          <leafValues>\n            -1.4639229774475098e+00 -5.1447000354528427e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2066 -7.7685996890068054e-02</internalNodes>\n          <leafValues>\n            8.8430202007293701e-01 4.3306998908519745e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2067 -1.5568000264465809e-02</internalNodes>\n          <leafValues>\n            1.3672499358654022e-01 -3.4505501389503479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2068 -6.6018998622894287e-02</internalNodes>\n          <leafValues>\n            -1.0300110578536987e+00 1.1601399630308151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2069 8.3699999377131462e-03</internalNodes>\n          <leafValues>\n            7.6429001986980438e-02 -4.4002500176429749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2070 3.5402998328208923e-02</internalNodes>\n          <leafValues>\n            1.1979500204324722e-01 -7.2668302059173584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2071 -3.9051000028848648e-02</internalNodes>\n          <leafValues>\n            6.7375302314758301e-01 -1.8196000158786774e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2072 -9.7899995744228363e-03</internalNodes>\n          <leafValues>\n            2.1264599263668060e-01 3.6756001412868500e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2073 -2.3047000169754028e-02</internalNodes>\n          <leafValues>\n            4.4742199778556824e-01 -2.0986700057983398e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2074 3.1169999856501818e-03</internalNodes>\n          <leafValues>\n            3.7544000893831253e-02 2.7808201313018799e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2075 1.3136000372469425e-02</internalNodes>\n          <leafValues>\n            -1.9842399656772614e-01 5.4335701465606689e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2076 1.4782000333070755e-02</internalNodes>\n          <leafValues>\n            1.3530600070953369e-01 -1.1153600364923477e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2077 -6.0139000415802002e-02</internalNodes>\n          <leafValues>\n            8.4039300680160522e-01 -1.6711600124835968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2078 5.1998998969793320e-02</internalNodes>\n          <leafValues>\n            1.7372000217437744e-01 -7.8547602891921997e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2079 2.4792000651359558e-02</internalNodes>\n          <leafValues>\n            -1.7739200592041016e-01 6.6752600669860840e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2080 -1.2014999985694885e-02</internalNodes>\n          <leafValues>\n            -1.4263699948787689e-01 1.6070500016212463e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2081 -9.8655998706817627e-02</internalNodes>\n          <leafValues>\n            1.0429769754409790e+00 -1.5770199894905090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2082 1.1758299916982651e-01</internalNodes>\n          <leafValues>\n            1.0955700278282166e-01 -4.4920377731323242e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2083 -1.8922999501228333e-02</internalNodes>\n          <leafValues>\n            -7.8543400764465332e-01 1.2984000146389008e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2084 -2.8390999883413315e-02</internalNodes>\n          <leafValues>\n            -6.0569900274276733e-01 1.2903499603271484e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2085 1.3182999566197395e-02</internalNodes>\n          <leafValues>\n            -1.4415999874472618e-02 -7.3210501670837402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2086 -1.1653000116348267e-01</internalNodes>\n          <leafValues>\n            -2.0442469120025635e+00 1.4053100347518921e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2087 -3.8880000356584787e-03</internalNodes>\n          <leafValues>\n            -4.1861599683761597e-01 7.8704997897148132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2088 3.1229000538587570e-02</internalNodes>\n          <leafValues>\n            2.4632999673485756e-02 4.1870400309562683e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2089 2.5198999792337418e-02</internalNodes>\n          <leafValues>\n            -1.7557799816131592e-01 6.4710599184036255e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2090 -2.8124000877141953e-02</internalNodes>\n          <leafValues>\n            -2.2005599737167358e-01 1.4121000468730927e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2091 3.6499001085758209e-02</internalNodes>\n          <leafValues>\n            -6.8426996469497681e-02 -2.3410849571228027e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2092 -7.2292998433113098e-02</internalNodes>\n          <leafValues>\n            1.2898750305175781e+00 8.4875002503395081e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2093 -4.1671000421047211e-02</internalNodes>\n          <leafValues>\n            -1.1630970239639282e+00 -5.3752999752759933e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2094 4.7703001648187637e-02</internalNodes>\n          <leafValues>\n            7.0101000368595123e-02 7.3676502704620361e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2095 6.5793000161647797e-02</internalNodes>\n          <leafValues>\n            -1.7755299806594849e-01 6.9780498743057251e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2096 1.3904999941587448e-02</internalNodes>\n          <leafValues>\n            2.1936799585819244e-01 -2.0390799641609192e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2097 -2.7730999514460564e-02</internalNodes>\n          <leafValues>\n            6.1867898702621460e-01 -1.7804099619388580e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2098 -1.5879999846220016e-02</internalNodes>\n          <leafValues>\n            -4.6484100818634033e-01 1.8828600645065308e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2099 7.4128001928329468e-02</internalNodes>\n          <leafValues>\n            -1.2858100235462189e-01 3.2792479991912842e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2100 -8.9000002481043339e-04</internalNodes>\n          <leafValues>\n            -3.0117601156234741e-01 2.3818799853324890e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2101 1.7965000122785568e-02</internalNodes>\n          <leafValues>\n            -2.2284999489784241e-01 2.9954001307487488e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2102 -2.5380000006407499e-03</internalNodes>\n          <leafValues>\n            2.5064399838447571e-01 -1.3665600121021271e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2103 -9.0680001303553581e-03</internalNodes>\n          <leafValues>\n            2.9017499089241028e-01 -2.8929701447486877e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2104 4.9169998615980148e-02</internalNodes>\n          <leafValues>\n            1.9156399369239807e-01 -6.8328702449798584e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2105 -3.0680999159812927e-02</internalNodes>\n          <leafValues>\n            -7.5677001476287842e-01 -1.3279999606311321e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2106 1.0017400234937668e-01</internalNodes>\n          <leafValues>\n            8.4453999996185303e-02 1.0888710021972656e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2107 3.1950001139193773e-03</internalNodes>\n          <leafValues>\n            -2.6919400691986084e-01 1.9537900388240814e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2108 3.5503000020980835e-02</internalNodes>\n          <leafValues>\n            1.3632300496101379e-01 -5.6917202472686768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2109 4.5900000259280205e-04</internalNodes>\n          <leafValues>\n            -4.0443998575210571e-01 1.4074799418449402e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2110 2.5258999317884445e-02</internalNodes>\n          <leafValues>\n            1.6243200004100800e-01 -5.5741798877716064e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2111 -5.1549999043345451e-03</internalNodes>\n          <leafValues>\n            3.1132599711418152e-01 -2.2756099700927734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2112 1.5869999770075083e-03</internalNodes>\n          <leafValues>\n            -2.6867699623107910e-01 1.9565400481224060e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2113 -1.6204999759793282e-02</internalNodes>\n          <leafValues>\n            1.5486499667167664e-01 -3.4057798981666565e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2114 -2.9624000191688538e-02</internalNodes>\n          <leafValues>\n            1.1466799974441528e+00 9.0557999908924103e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2115 -1.5930000226944685e-03</internalNodes>\n          <leafValues>\n            -7.1257501840591431e-01 -7.0400000549852848e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2116 -5.4019000381231308e-02</internalNodes>\n          <leafValues>\n            4.1537499427795410e-01 2.7246000245213509e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2117 -6.6211000084877014e-02</internalNodes>\n          <leafValues>\n            -1.3340090513229370e+00 -4.7352999448776245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2118 2.7940999716520309e-02</internalNodes>\n          <leafValues>\n            1.4446300268173218e-01 -5.1518398523330688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2119 2.8957000002264977e-02</internalNodes>\n          <leafValues>\n            -4.9966000020503998e-02 -1.1929039955139160e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2120 -2.0424999296665192e-02</internalNodes>\n          <leafValues>\n            6.3881301879882812e-01 3.8141001015901566e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2121 1.2416999787092209e-02</internalNodes>\n          <leafValues>\n            -2.1547000110149384e-01 4.9477699398994446e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>181</maxWeakCount>\n      <stageThreshold>-3.3196411132812500e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2122 4.3274000287055969e-02</internalNodes>\n          <leafValues>\n            -8.0494397878646851e-01 3.9897298812866211e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2123 1.8615500628948212e-01</internalNodes>\n          <leafValues>\n            -3.1655299663543701e-01 6.8877297639846802e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2124 3.1860999763011932e-02</internalNodes>\n          <leafValues>\n            -6.4266198873519897e-01 2.5550898909568787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2125 1.4022000133991241e-02</internalNodes>\n          <leafValues>\n            -4.5926600694656372e-01 3.1171199679374695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2126 -6.3029997982084751e-03</internalNodes>\n          <leafValues>\n            4.6026900410652161e-01 -2.7438500523567200e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2127 -5.4310001432895660e-03</internalNodes>\n          <leafValues>\n            3.6608600616455078e-01 -2.7205801010131836e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2128 1.6822999343276024e-02</internalNodes>\n          <leafValues>\n            2.3476999253034592e-02 -8.8443797826766968e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2129 2.6039000600576401e-02</internalNodes>\n          <leafValues>\n            1.7488799989223480e-01 -5.4564702510833740e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2130 -2.6720000430941582e-02</internalNodes>\n          <leafValues>\n            -9.6396499872207642e-01 2.3524999618530273e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2131 -1.7041999846696854e-02</internalNodes>\n          <leafValues>\n            -7.0848798751831055e-01 2.1468099951744080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2132 5.9569999575614929e-03</internalNodes>\n          <leafValues>\n            7.3601000010967255e-02 -6.8225598335266113e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2133 -2.8679999522864819e-03</internalNodes>\n          <leafValues>\n            -7.4935001134872437e-01 2.3803399503231049e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2134 -4.3774999678134918e-02</internalNodes>\n          <leafValues>\n            6.8323302268981934e-01 -2.1380299329757690e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2135 5.1633000373840332e-02</internalNodes>\n          <leafValues>\n            -1.2566499412059784e-01 6.7523801326751709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2136 8.1780003383755684e-03</internalNodes>\n          <leafValues>\n            7.0689998567104340e-02 -8.0665898323059082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2137 -5.2841998636722565e-02</internalNodes>\n          <leafValues>\n            9.5433902740478516e-01 1.6548000276088715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2138 5.2583999931812286e-02</internalNodes>\n          <leafValues>\n            -2.8414401412010193e-01 4.7129800915718079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2139 -1.2659000232815742e-02</internalNodes>\n          <leafValues>\n            3.8445401191711426e-01 -6.2288001179695129e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2140 1.1694000102579594e-02</internalNodes>\n          <leafValues>\n            5.6000000768108293e-05 -1.0173139572143555e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2141 -2.3918999359011650e-02</internalNodes>\n          <leafValues>\n            8.4921300411224365e-01 5.7399999350309372e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2142 -6.1673998832702637e-02</internalNodes>\n          <leafValues>\n            -9.2571401596069336e-01 -1.7679999582469463e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2143 -1.8279999494552612e-03</internalNodes>\n          <leafValues>\n            -5.4372298717498779e-01 2.4932399392127991e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2144 3.5257998853921890e-02</internalNodes>\n          <leafValues>\n            -7.3719997890293598e-03 -9.3963998556137085e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2145 -1.8438000231981277e-02</internalNodes>\n          <leafValues>\n            7.2136700153350830e-01 1.0491999797523022e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2146 -3.8389001041650772e-02</internalNodes>\n          <leafValues>\n            1.9272600114345551e-01 -3.5832101106643677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2147 9.9720999598503113e-02</internalNodes>\n          <leafValues>\n            1.1354199796915054e-01 -1.6304190158843994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2148 8.4462001919746399e-02</internalNodes>\n          <leafValues>\n            -5.3420998156070709e-02 -1.6981120109558105e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2149 4.0270000696182251e-02</internalNodes>\n          <leafValues>\n            -1.0783199965953827e-01 5.1926600933074951e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2150 5.8935999870300293e-02</internalNodes>\n          <leafValues>\n            -1.8053700029850006e-01 9.5119798183441162e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2151 1.4957000315189362e-01</internalNodes>\n          <leafValues>\n            1.6785299777984619e-01 -1.1591869592666626e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2152 6.9399998756125569e-04</internalNodes>\n          <leafValues>\n            2.0491400361061096e-01 -3.3118200302124023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2153 -3.3369001001119614e-02</internalNodes>\n          <leafValues>\n            9.3468099832534790e-01 -2.9639999847859144e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2154 9.3759996816515923e-03</internalNodes>\n          <leafValues>\n            3.7000000011175871e-03 -7.7549797296524048e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2155 4.3193999677896500e-02</internalNodes>\n          <leafValues>\n            -2.2040000185370445e-03 7.4589699506759644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2156 -6.7555002868175507e-02</internalNodes>\n          <leafValues>\n            7.2292101383209229e-01 -1.8404200673103333e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2157 -3.1168600916862488e-01</internalNodes>\n          <leafValues>\n            1.0014270544052124e+00 3.4003000706434250e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2158 2.9743999242782593e-02</internalNodes>\n          <leafValues>\n            -4.6356000006198883e-02 -1.2781809568405151e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2159 1.0737000033259392e-02</internalNodes>\n          <leafValues>\n            1.4812000095844269e-02 6.6649997234344482e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2160 -2.8841000050306320e-02</internalNodes>\n          <leafValues>\n            -9.4222599267959595e-01 -2.0796999335289001e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2161 -5.7649998925626278e-03</internalNodes>\n          <leafValues>\n            -4.3541899323463440e-01 2.3386000096797943e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2162 2.8410999104380608e-02</internalNodes>\n          <leafValues>\n            -1.7615799605846405e-01 8.5765302181243896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2163 -2.9007999226450920e-02</internalNodes>\n          <leafValues>\n            5.7978099584579468e-01 2.8565999120473862e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2164 2.4965999647974968e-02</internalNodes>\n          <leafValues>\n            -2.2729000076651573e-02 -9.6773099899291992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2165 1.2036000378429890e-02</internalNodes>\n          <leafValues>\n            -1.4214700460433960e-01 5.1687997579574585e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2166 -4.2514000087976456e-02</internalNodes>\n          <leafValues>\n            9.7273802757263184e-01 -1.8119800090789795e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2167 1.0276000015437603e-02</internalNodes>\n          <leafValues>\n            -8.3099998533725739e-02 3.1762799620628357e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2168 -6.9191999733448029e-02</internalNodes>\n          <leafValues>\n            -2.0668580532073975e+00 -6.0173999518156052e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2169 -4.6769999898970127e-03</internalNodes>\n          <leafValues>\n            4.4131800532341003e-01 2.3209000006318092e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2170 -1.3923999853432178e-02</internalNodes>\n          <leafValues>\n            2.8606700897216797e-01 -2.9152700304985046e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2171 -1.5333999879658222e-02</internalNodes>\n          <leafValues>\n            -5.7414501905441284e-01 2.3063300549983978e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2172 -1.0239000432193279e-02</internalNodes>\n          <leafValues>\n            3.4479200839996338e-01 -2.6080399751663208e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2173 -5.0988998264074326e-02</internalNodes>\n          <leafValues>\n            5.6154102087020874e-01 6.1218999326229095e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2174 3.0689999461174011e-02</internalNodes>\n          <leafValues>\n            -1.4772799611091614e-01 1.6378489732742310e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2175 -1.1223999783396721e-02</internalNodes>\n          <leafValues>\n            2.4006199836730957e-01 -4.4864898920059204e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2176 -6.2899999320507050e-03</internalNodes>\n          <leafValues>\n            4.3119499087333679e-01 -2.3808999359607697e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2177 7.8590996563434601e-02</internalNodes>\n          <leafValues>\n            1.9865000620484352e-02 8.0853801965713501e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2178 -1.0178999975323677e-02</internalNodes>\n          <leafValues>\n            1.8193200230598450e-01 -3.2877799868583679e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2179 3.1227000057697296e-02</internalNodes>\n          <leafValues>\n            1.4973899722099304e-01 -1.4180339574813843e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2180 4.0196999907493591e-02</internalNodes>\n          <leafValues>\n            -1.9760499894618988e-01 5.8508199453353882e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2181 1.6138000413775444e-02</internalNodes>\n          <leafValues>\n            5.0000002374872565e-04 3.9050000905990601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2182 -4.5519001781940460e-02</internalNodes>\n          <leafValues>\n            1.2646820545196533e+00 -1.5632599592208862e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2183 -1.8130000680685043e-02</internalNodes>\n          <leafValues>\n            6.5148502588272095e-01 1.0235999710857868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2184 -1.4001999981701374e-02</internalNodes>\n          <leafValues>\n            -1.0344820022583008e+00 -3.2182998955249786e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2185 -3.8816001266241074e-02</internalNodes>\n          <leafValues>\n            -4.7874298691749573e-01 1.6290700435638428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2186 3.1656000763177872e-02</internalNodes>\n          <leafValues>\n            -2.0983399450778961e-01 5.4575902223587036e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2187 -1.0839999653398991e-02</internalNodes>\n          <leafValues>\n            5.1898801326751709e-01 -1.5080000273883343e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2188 1.2032999657094479e-02</internalNodes>\n          <leafValues>\n            -2.1107600629329681e-01 7.5937002897262573e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2189 7.0772998034954071e-02</internalNodes>\n          <leafValues>\n            1.8048800528049469e-01 -7.4048501253128052e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2190 5.3139799833297729e-01</internalNodes>\n          <leafValues>\n            -1.4491699635982513e-01 1.5360039472579956e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2191 -1.4774000272154808e-02</internalNodes>\n          <leafValues>\n            -2.8153699636459351e-01 2.0407299697399139e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2192 -2.2410000674426556e-03</internalNodes>\n          <leafValues>\n            -4.4876301288604736e-01 5.3989000618457794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2193 4.9968000501394272e-02</internalNodes>\n          <leafValues>\n            4.1514001786708832e-02 2.9417100548744202e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2194 -4.7701999545097351e-02</internalNodes>\n          <leafValues>\n            3.9674299955368042e-01 -2.8301799297332764e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2195 -9.1311000287532806e-02</internalNodes>\n          <leafValues>\n            2.1994259357452393e+00 8.7964996695518494e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2196 3.8070000708103180e-02</internalNodes>\n          <leafValues>\n            -2.8025600314140320e-01 2.5156199932098389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2197 -1.5538999810814857e-02</internalNodes>\n          <leafValues>\n            3.4157499670982361e-01 1.7924999818205833e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2198 -1.5445999801158905e-02</internalNodes>\n          <leafValues>\n            2.8680199384689331e-01 -2.5135898590087891e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2199 -5.7388000190258026e-02</internalNodes>\n          <leafValues>\n            6.3830000162124634e-01 8.8597998023033142e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2200 -5.9440000914037228e-03</internalNodes>\n          <leafValues>\n            7.9016998410224915e-02 -4.0774899721145630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2201 -6.9968998432159424e-02</internalNodes>\n          <leafValues>\n            -4.4644200801849365e-01 1.7219600081443787e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2202 -2.5064999237656593e-02</internalNodes>\n          <leafValues>\n            -9.8270201683044434e-01 -3.5388000309467316e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2203 1.7216000705957413e-02</internalNodes>\n          <leafValues>\n            2.2705900669097900e-01 -8.0550098419189453e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2204 -4.4279001653194427e-02</internalNodes>\n          <leafValues>\n            8.3951997756958008e-01 -1.7429600656032562e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2205 4.3988998979330063e-02</internalNodes>\n          <leafValues>\n            1.1557199805974960e-01 -1.9666889905929565e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2206 1.5907000750303268e-02</internalNodes>\n          <leafValues>\n            -3.7576001137495041e-02 -1.0311100482940674e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2207 -9.2754997313022614e-02</internalNodes>\n          <leafValues>\n            -1.3530019521713257e+00 1.2141299992799759e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2208 7.1037001907825470e-02</internalNodes>\n          <leafValues>\n            -1.7684300243854523e-01 7.4485200643539429e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2209 5.7762000709772110e-02</internalNodes>\n          <leafValues>\n            1.2835599482059479e-01 -4.4444200396537781e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2210 -1.6432000324130058e-02</internalNodes>\n          <leafValues>\n            8.0152702331542969e-01 -1.7491699755191803e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2211 2.3939000442624092e-02</internalNodes>\n          <leafValues>\n            1.6144999861717224e-01 -1.2364500015974045e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2212 1.2636000290513039e-02</internalNodes>\n          <leafValues>\n            1.5411999821662903e-01 -3.3293798565864563e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2213 -5.4347999393939972e-02</internalNodes>\n          <leafValues>\n            -1.8400700092315674e+00 1.4835999906063080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2214 -1.3261999934911728e-02</internalNodes>\n          <leafValues>\n            -8.0838799476623535e-01 -2.7726000174880028e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2215 6.1340001411736012e-03</internalNodes>\n          <leafValues>\n            -1.3785000145435333e-01 3.2858499884605408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2216 2.8991000726819038e-02</internalNodes>\n          <leafValues>\n            -2.5516999885439873e-02 -8.3387202024459839e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2217 -2.1986000239849091e-02</internalNodes>\n          <leafValues>\n            -7.3739999532699585e-01 1.7887100577354431e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2218 5.3269998170435429e-03</internalNodes>\n          <leafValues>\n            -4.5449298620223999e-01 6.8791002035140991e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2219 8.6047999560832977e-02</internalNodes>\n          <leafValues>\n            2.1008500456809998e-01 -3.7808901071548462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2220 -8.5549997165799141e-03</internalNodes>\n          <leafValues>\n            4.0134999155998230e-01 -2.1074099838733673e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2221 6.7790001630783081e-03</internalNodes>\n          <leafValues>\n            -2.1648999303579330e-02 4.5421499013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2222 -6.3959998078644276e-03</internalNodes>\n          <leafValues>\n            -4.9818599224090576e-01 7.5907997786998749e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2223 8.9469999074935913e-03</internalNodes>\n          <leafValues>\n            1.7857700586318970e-01 -2.8454899787902832e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2224 3.2589999027550220e-03</internalNodes>\n          <leafValues>\n            4.6624999493360519e-02 -5.5206298828125000e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2225 4.1476998478174210e-02</internalNodes>\n          <leafValues>\n            1.7550499737262726e-01 -2.0703999698162079e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2226 -6.7449999041855335e-03</internalNodes>\n          <leafValues>\n            -4.6392598748207092e-01 6.9303996860980988e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2227 3.0564999207854271e-02</internalNodes>\n          <leafValues>\n            5.1734998822212219e-02 7.5550502538681030e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2228 -7.4780001305043697e-03</internalNodes>\n          <leafValues>\n            1.4893899857997894e-01 -3.1906801462173462e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2229 8.9088998734951019e-02</internalNodes>\n          <leafValues>\n            1.3738800585269928e-01 -1.1379710435867310e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2230 7.3230001144111156e-03</internalNodes>\n          <leafValues>\n            -2.8829199075698853e-01 1.9088600575923920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2231 -1.8205000087618828e-02</internalNodes>\n          <leafValues>\n            -3.0178600549697876e-01 1.6795800626277924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2232 -2.5828000158071518e-02</internalNodes>\n          <leafValues>\n            -9.8137998580932617e-01 -1.9860999658703804e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2233 1.0936199873685837e-01</internalNodes>\n          <leafValues>\n            4.8790000379085541e-02 5.3118300437927246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2234 -1.1424999684095383e-02</internalNodes>\n          <leafValues>\n            2.3705999553203583e-01 -2.7925300598144531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2235 -5.7565998286008835e-02</internalNodes>\n          <leafValues>\n            4.7255399823188782e-01 6.5171003341674805e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2236 1.0278300195932388e-01</internalNodes>\n          <leafValues>\n            -2.0765100419521332e-01 5.0947701930999756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2237 2.7041999623179436e-02</internalNodes>\n          <leafValues>\n            1.6421200335025787e-01 -1.4508620500564575e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2238 -1.3635000213980675e-02</internalNodes>\n          <leafValues>\n            -5.6543898582458496e-01 2.3788999766111374e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2239 -3.2158198952674866e-01</internalNodes>\n          <leafValues>\n            -3.5602829456329346e+00 1.1801300197839737e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2240 2.0458100736141205e-01</internalNodes>\n          <leafValues>\n            -3.7016000598669052e-02 -1.0225499868392944e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2241 -7.0347003638744354e-02</internalNodes>\n          <leafValues>\n            -5.6491899490356445e-01 1.8525199592113495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2242 3.7831000983715057e-02</internalNodes>\n          <leafValues>\n            -2.9901999980211258e-02 -8.2921499013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2243 -7.0298001170158386e-02</internalNodes>\n          <leafValues>\n            -5.3172302246093750e-01 1.4430199563503265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2244 6.3221000134944916e-02</internalNodes>\n          <leafValues>\n            -2.2041200101375580e-01 4.7952198982238770e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2245 3.6393001675605774e-02</internalNodes>\n          <leafValues>\n            1.4222699403762817e-01 -6.1193901300430298e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2246 4.0099998004734516e-03</internalNodes>\n          <leafValues>\n            -3.4560799598693848e-01 1.1738699674606323e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2247 -4.9106001853942871e-02</internalNodes>\n          <leafValues>\n            9.5984101295471191e-01 6.4934998750686646e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2248 -7.1583002805709839e-02</internalNodes>\n          <leafValues>\n            1.7385669946670532e+00 -1.4252899587154388e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2249 -3.8008999079465866e-02</internalNodes>\n          <leafValues>\n            1.3872820138931274e+00 6.6188000142574310e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2250 -3.1570000573992729e-03</internalNodes>\n          <leafValues>\n            5.3677000105381012e-02 -5.4048001766204834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2251 1.9458999857306480e-02</internalNodes>\n          <leafValues>\n            -9.3620002269744873e-02 3.9131000638008118e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2252 1.1293999850749969e-02</internalNodes>\n          <leafValues>\n            3.7223998457193375e-02 -5.4251801967620850e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2253 -3.3495001494884491e-02</internalNodes>\n          <leafValues>\n            9.5307898521423340e-01 3.7696998566389084e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2254 9.2035003006458282e-02</internalNodes>\n          <leafValues>\n            -1.3488399982452393e-01 2.2897069454193115e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2255 3.7529999390244484e-03</internalNodes>\n          <leafValues>\n            2.2824199497699738e-01 -5.9983700513839722e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2256 1.2848000042140484e-02</internalNodes>\n          <leafValues>\n            -2.2005200386047363e-01 3.7221899628639221e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2257 -1.4316199719905853e-01</internalNodes>\n          <leafValues>\n            1.2855789661407471e+00 4.7237001359462738e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2258 -9.6879996359348297e-02</internalNodes>\n          <leafValues>\n            -3.9550929069519043e+00 -7.2903998196125031e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2259 -8.8459998369216919e-03</internalNodes>\n          <leafValues>\n            3.7674999237060547e-01 -4.6484000980854034e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2260 1.5900000929832458e-02</internalNodes>\n          <leafValues>\n            -2.4457000195980072e-02 -8.0034798383712769e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2261 7.0372000336647034e-02</internalNodes>\n          <leafValues>\n            1.7019000649452209e-01 -6.3068997859954834e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2262 -3.7953998893499374e-02</internalNodes>\n          <leafValues>\n            -9.3667197227478027e-01 -4.1214000433683395e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2263 5.1597899198532104e-01</internalNodes>\n          <leafValues>\n            1.3080599904060364e-01 -1.5802290439605713e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2264 -3.2843001186847687e-02</internalNodes>\n          <leafValues>\n            -1.1441620588302612e+00 -4.9173999577760696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2265 -3.6357000470161438e-02</internalNodes>\n          <leafValues>\n            4.9606400728225708e-01 -3.4458998590707779e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2266 6.8080001510679722e-03</internalNodes>\n          <leafValues>\n            -3.0997800827026367e-01 1.7054800689220428e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2267 -1.6114000231027603e-02</internalNodes>\n          <leafValues>\n            -3.7904599308967590e-01 1.6078999638557434e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2268 8.4530003368854523e-03</internalNodes>\n          <leafValues>\n            -1.8655499815940857e-01 5.6367701292037964e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2269 -1.3752399384975433e-01</internalNodes>\n          <leafValues>\n            -5.8989900350570679e-01 1.1749500036239624e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2270 1.7688000202178955e-01</internalNodes>\n          <leafValues>\n            -1.5424899756908417e-01 9.2911100387573242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2271 7.9309996217489243e-03</internalNodes>\n          <leafValues>\n            3.2190701365470886e-01 -1.6392600536346436e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2272 1.0971800237894058e-01</internalNodes>\n          <leafValues>\n            -1.5876500308513641e-01 1.0186259746551514e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2273 -3.0293000862002373e-02</internalNodes>\n          <leafValues>\n            7.5587302446365356e-01 3.1794998794794083e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2274 -2.3118000477552414e-02</internalNodes>\n          <leafValues>\n            -8.8451498746871948e-01 -9.5039997249841690e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2275 -3.0900000128895044e-03</internalNodes>\n          <leafValues>\n            2.3838299512863159e-01 -1.1606200039386749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2276 -3.3392000943422318e-02</internalNodes>\n          <leafValues>\n            -1.8738139867782593e+00 -6.8502999842166901e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2277 1.3190000317990780e-02</internalNodes>\n          <leafValues>\n            1.2919899821281433e-01 -6.7512202262878418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2278 1.4661000110208988e-02</internalNodes>\n          <leafValues>\n            -2.4829000234603882e-02 -7.4396800994873047e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2279 -1.3248000293970108e-02</internalNodes>\n          <leafValues>\n            4.6820199489593506e-01 -2.4165000766515732e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2280 -1.6218999400734901e-02</internalNodes>\n          <leafValues>\n            4.0083798766136169e-01 -2.1255700290203094e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2281 -2.9052000492811203e-02</internalNodes>\n          <leafValues>\n            -1.5650019645690918e+00 1.4375899732112885e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2282 -1.0153199732303619e-01</internalNodes>\n          <leafValues>\n            -1.9220689535140991e+00 -6.9559998810291290e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2283 3.7753999233245850e-02</internalNodes>\n          <leafValues>\n            1.3396799564361572e-01 -2.2639141082763672e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2284 -2.8555598855018616e-01</internalNodes>\n          <leafValues>\n            1.0215270519256592e+00 -1.5232199430465698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2285 1.5360699594020844e-01</internalNodes>\n          <leafValues>\n            -9.7409002482891083e-02 4.1662400960922241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2286 -2.1199999901000410e-04</internalNodes>\n          <leafValues>\n            1.1271899938583374e-01 -4.1653999686241150e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2287 -2.0597999915480614e-02</internalNodes>\n          <leafValues>\n            6.0540497303009033e-01 6.2467999756336212e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2288 3.7353999912738800e-02</internalNodes>\n          <leafValues>\n            -1.8919000029563904e-01 4.6464699506759644e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2289 5.7275000959634781e-02</internalNodes>\n          <leafValues>\n            1.1565300077199936e-01 -1.3213009834289551e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2290 5.1029999740421772e-03</internalNodes>\n          <leafValues>\n            -2.8061500191688538e-01 1.9313399493694305e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2291 -5.4644998162984848e-02</internalNodes>\n          <leafValues>\n            7.2428500652313232e-01 7.5447998940944672e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2292 2.5349000468850136e-02</internalNodes>\n          <leafValues>\n            -1.9481800496578217e-01 4.6032801270484924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2293 2.4311000481247902e-02</internalNodes>\n          <leafValues>\n            1.5564100444316864e-01 -4.9913901090621948e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2294 3.5962000489234924e-02</internalNodes>\n          <leafValues>\n            -5.8573000133037567e-02 -1.5418399572372437e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2295 -1.0000699758529663e-01</internalNodes>\n          <leafValues>\n            -1.6100039482116699e+00 1.1450500041246414e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2296 8.4435999393463135e-02</internalNodes>\n          <leafValues>\n            -6.1406999826431274e-02 -1.4673349857330322e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2297 1.5947999432682991e-02</internalNodes>\n          <leafValues>\n            1.6287900507450104e-01 -1.1026400327682495e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2298 3.3824000507593155e-02</internalNodes>\n          <leafValues>\n            -1.7932699620723724e-01 5.7218402624130249e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2299 -6.1996001750230789e-02</internalNodes>\n          <leafValues>\n            4.6511812210083008e+00 9.4534002244472504e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2300 6.9876998662948608e-02</internalNodes>\n          <leafValues>\n            -1.6985900700092316e-01 8.7028998136520386e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2301 -2.7916999533772469e-02</internalNodes>\n          <leafValues>\n            9.1042500734329224e-01 5.6827001273632050e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2302 -1.2764000333845615e-02</internalNodes>\n          <leafValues>\n            2.2066700458526611e-01 -2.7769100666046143e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>199</maxWeakCount>\n      <stageThreshold>-3.2573320865631104e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2303 2.1662000566720963e-02</internalNodes>\n          <leafValues>\n            -8.9868897199630737e-01 2.9436299204826355e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2304 1.0044500231742859e-01</internalNodes>\n          <leafValues>\n            -3.7659201025962830e-01 6.0891002416610718e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2305 2.6003999635577202e-02</internalNodes>\n          <leafValues>\n            -3.8128501176834106e-01 3.9217400550842285e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2306 2.8441000729799271e-02</internalNodes>\n          <leafValues>\n            -1.8182300031185150e-01 5.8927202224731445e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2307 3.8612000644207001e-02</internalNodes>\n          <leafValues>\n            -2.2399599850177765e-01 6.3779997825622559e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2308 -4.6594999730587006e-02</internalNodes>\n          <leafValues>\n            7.0812201499938965e-01 -1.4666199684143066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2309 -4.2791999876499176e-02</internalNodes>\n          <leafValues>\n            4.7680398821830750e-01 -2.9233199357986450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2310 3.7960000336170197e-03</internalNodes>\n          <leafValues>\n            -1.8510299921035767e-01 5.2626699209213257e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2311 4.2348999530076981e-02</internalNodes>\n          <leafValues>\n            3.9244998246431351e-02 -8.9197701215744019e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2312 1.9598999992012978e-02</internalNodes>\n          <leafValues>\n            -2.3358400166034698e-01 4.4146499037742615e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2313 8.7400001939386129e-04</internalNodes>\n          <leafValues>\n            -4.6063598990440369e-01 1.7689600586891174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2314 -4.3629999272525311e-03</internalNodes>\n          <leafValues>\n            3.3493199944496155e-01 -2.9893401265144348e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2315 1.6973000019788742e-02</internalNodes>\n          <leafValues>\n            -1.6408699750900269e-01 1.5993679761886597e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2316 3.6063998937606812e-02</internalNodes>\n          <leafValues>\n            2.2601699829101562e-01 -5.3186100721359253e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2317 -7.0864997804164886e-02</internalNodes>\n          <leafValues>\n            1.5220500528812408e-01 -4.1914600133895874e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2318 -6.3075996935367584e-02</internalNodes>\n          <leafValues>\n            -1.4874019622802734e+00 1.2953700125217438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2319 2.9670000076293945e-02</internalNodes>\n          <leafValues>\n            -1.9145900011062622e-01 9.8184901475906372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2320 3.7873998284339905e-02</internalNodes>\n          <leafValues>\n            1.3459500670433044e-01 -5.6316298246383667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2321 -3.3289000391960144e-02</internalNodes>\n          <leafValues>\n            -1.0828030109405518e+00 -1.1504000052809715e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2322 -3.1608998775482178e-02</internalNodes>\n          <leafValues>\n            -5.9224498271942139e-01 1.3394799828529358e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2323 1.0740000288933516e-03</internalNodes>\n          <leafValues>\n            -4.9185800552368164e-01 9.4446003437042236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2324 -7.1556001901626587e-02</internalNodes>\n          <leafValues>\n            5.9710198640823364e-01 -3.9553001523017883e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2325 -8.1170000135898590e-02</internalNodes>\n          <leafValues>\n            -1.1817820072174072e+00 -2.8254000470042229e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2326 4.4860001653432846e-03</internalNodes>\n          <leafValues>\n            -6.1028099060058594e-01 2.2619099915027618e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2327 -4.2176000773906708e-02</internalNodes>\n          <leafValues>\n            -1.1435619592666626e+00 -2.9001999646425247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2328 -6.5640002489089966e-02</internalNodes>\n          <leafValues>\n            -1.6470279693603516e+00 1.2810300290584564e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2329 1.8188999965786934e-02</internalNodes>\n          <leafValues>\n            -3.1149399280548096e-01 2.5739601254463196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2330 -5.1520001143217087e-02</internalNodes>\n          <leafValues>\n            -6.9206899404525757e-01 1.5270799398422241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2331 -4.7150999307632446e-02</internalNodes>\n          <leafValues>\n            -7.1868300437927246e-01 2.6879999786615372e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2332 1.7488999292254448e-02</internalNodes>\n          <leafValues>\n            2.2371199727058411e-01 -5.5381798744201660e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2333 -2.5264000520110130e-02</internalNodes>\n          <leafValues>\n            1.0319819450378418e+00 -1.7496499419212341e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2334 -4.0745001286268234e-02</internalNodes>\n          <leafValues>\n            4.4961598515510559e-01 3.9349000900983810e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2335 -3.7666998803615570e-02</internalNodes>\n          <leafValues>\n            -8.5475701093673706e-01 -1.2463999912142754e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2336 -1.3411000370979309e-02</internalNodes>\n          <leafValues>\n            5.7845598459243774e-01 -1.7467999830842018e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2337 -7.8999997640494257e-05</internalNodes>\n          <leafValues>\n            -3.7749201059341431e-01 1.3961799442768097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2338 -1.1415000073611736e-02</internalNodes>\n          <leafValues>\n            -2.6186600327491760e-01 2.3712499439716339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2339 3.7200000137090683e-02</internalNodes>\n          <leafValues>\n            -2.8626000508666039e-02 -1.2945239543914795e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2340 3.4050000831484795e-03</internalNodes>\n          <leafValues>\n            2.0531399548053741e-01 -1.8747499585151672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2341 -2.2483000531792641e-02</internalNodes>\n          <leafValues>\n            6.7027199268341064e-01 -1.9594000279903412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2342 2.3274999111890793e-02</internalNodes>\n          <leafValues>\n            1.7405399680137634e-01 -3.2746300101280212e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2343 -1.3917000032961369e-02</internalNodes>\n          <leafValues>\n            -8.3954298496246338e-01 -6.3760001212358475e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2344 7.5429999269545078e-03</internalNodes>\n          <leafValues>\n            -3.4194998443126678e-02 5.8998197317123413e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2345 -1.1539000086486340e-02</internalNodes>\n          <leafValues>\n            4.2142799496650696e-01 -2.3510499298572540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2346 5.2501998841762543e-02</internalNodes>\n          <leafValues>\n            6.9303996860980988e-02 7.3226499557495117e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2347 5.2715998142957687e-02</internalNodes>\n          <leafValues>\n            -1.5688100457191467e-01 1.0907289981842041e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2348 -1.1726000346243382e-02</internalNodes>\n          <leafValues>\n            -7.0934301614761353e-01 1.6828800737857819e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2349 9.5945999026298523e-02</internalNodes>\n          <leafValues>\n            -1.6192899644374847e-01 1.0072519779205322e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2350 -1.5871999785304070e-02</internalNodes>\n          <leafValues>\n            3.9008399844169617e-01 -5.3777001798152924e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2351 3.4818001091480255e-02</internalNodes>\n          <leafValues>\n            1.7179999500513077e-02 -9.3941801786422729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2352 3.4791998565196991e-02</internalNodes>\n          <leafValues>\n            5.0462998449802399e-02 5.4465699195861816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2353 1.6284000128507614e-02</internalNodes>\n          <leafValues>\n            -2.6981300115585327e-01 4.0365299582481384e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2354 -4.4319000095129013e-02</internalNodes>\n          <leafValues>\n            8.4399998188018799e-01 3.2882999628782272e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2355 -5.5689997971057892e-03</internalNodes>\n          <leafValues>\n            1.5309399366378784e-01 -3.4959799051284790e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2356 -6.5842002630233765e-02</internalNodes>\n          <leafValues>\n            -9.2711198329925537e-01 1.6800999641418457e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2357 -7.3337003588676453e-02</internalNodes>\n          <leafValues>\n            5.1614499092102051e-01 -2.0236000418663025e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2358 1.6450000926852226e-02</internalNodes>\n          <leafValues>\n            1.3950599730014801e-01 -4.9301299452781677e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2359 -9.2630004510283470e-03</internalNodes>\n          <leafValues>\n            -9.0101999044418335e-01 -1.6116000711917877e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2360 5.9139998629689217e-03</internalNodes>\n          <leafValues>\n            1.9858199357986450e-01 -1.6731299459934235e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2361 -8.4699998842552304e-04</internalNodes>\n          <leafValues>\n            9.4005003571510315e-02 -4.1570898890495300e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2362 2.0532900094985962e-01</internalNodes>\n          <leafValues>\n            -6.0022000223398209e-02 7.0993602275848389e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2363 -1.6883000731468201e-02</internalNodes>\n          <leafValues>\n            2.4392199516296387e-01 -3.0551800131797791e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2364 -1.9111000001430511e-02</internalNodes>\n          <leafValues>\n            6.1229902505874634e-01 2.4252999573945999e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2365 -2.5962999090552330e-02</internalNodes>\n          <leafValues>\n            9.0764999389648438e-01 -1.6722099483013153e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2366 -2.1762000396847725e-02</internalNodes>\n          <leafValues>\n            -3.1384700536727905e-01 2.0134599506855011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2367 -2.4119999259710312e-02</internalNodes>\n          <leafValues>\n            -6.6588401794433594e-01 7.4559999629855156e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2368 4.7129999846220016e-02</internalNodes>\n          <leafValues>\n            5.9533998370170593e-02 8.7804502248764038e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2369 -4.5984998345375061e-02</internalNodes>\n          <leafValues>\n            8.0067998170852661e-01 -1.7252300679683685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2370 2.6507999747991562e-02</internalNodes>\n          <leafValues>\n            1.8774099647998810e-01 -6.0850602388381958e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2371 -4.8615001142024994e-02</internalNodes>\n          <leafValues>\n            5.8644098043441772e-01 -1.9427700340747833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2372 -1.8562000244855881e-02</internalNodes>\n          <leafValues>\n            -2.5587901473045349e-01 1.6326199471950531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2373 1.2678000144660473e-02</internalNodes>\n          <leafValues>\n            -1.4228000305593014e-02 -7.6738101243972778e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2374 -1.1919999960809946e-03</internalNodes>\n          <leafValues>\n            2.0495000481605530e-01 -1.1404299736022949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2375 -4.9088999629020691e-02</internalNodes>\n          <leafValues>\n            -1.0740849971771240e+00 -3.8940999656915665e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2376 -1.7436999827623367e-02</internalNodes>\n          <leafValues>\n            -5.7973802089691162e-01 1.8584500253200531e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2377 -1.4770000241696835e-02</internalNodes>\n          <leafValues>\n            -6.6150301694869995e-01 5.3119999356567860e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2378 -2.2905200719833374e-01</internalNodes>\n          <leafValues>\n            -4.8305100202560425e-01 1.2326399981975555e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2379 -1.2707099318504333e-01</internalNodes>\n          <leafValues>\n            5.7452601194381714e-01 -1.9420400261878967e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2380 1.0339000262320042e-02</internalNodes>\n          <leafValues>\n            -5.4641999304294586e-02 2.4501800537109375e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2381 6.9010001607239246e-03</internalNodes>\n          <leafValues>\n            1.2180600315332413e-01 -3.8797399401664734e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2382 2.9025399684906006e-01</internalNodes>\n          <leafValues>\n            1.0966199636459351e-01 -30.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2383 -2.3804999887943268e-01</internalNodes>\n          <leafValues>\n            -1.7352679967880249e+00 -6.3809998333454132e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2384 6.2481001019477844e-02</internalNodes>\n          <leafValues>\n            1.3523000478744507e-01 -7.0301097631454468e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2385 4.7109997831285000e-03</internalNodes>\n          <leafValues>\n            -4.6984100341796875e-01 6.0341998934745789e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2386 -2.7815999463200569e-02</internalNodes>\n          <leafValues>\n            6.9807600975036621e-01 1.3719999697059393e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2387 -1.7020000144839287e-02</internalNodes>\n          <leafValues>\n            1.6870440244674683e+00 -1.4314800500869751e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2388 -4.9754999577999115e-02</internalNodes>\n          <leafValues>\n            7.9497700929641724e-01 7.7199999941512942e-04</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2389 -7.4732996523380280e-02</internalNodes>\n          <leafValues>\n            -1.0132360458374023e+00 -1.9388999789953232e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2390 3.2009001821279526e-02</internalNodes>\n          <leafValues>\n            1.4412100613117218e-01 -4.2139101028442383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2391 -9.4463996589183807e-02</internalNodes>\n          <leafValues>\n            5.0682598352432251e-01 -2.0478899776935577e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2392 -1.5426999889314175e-02</internalNodes>\n          <leafValues>\n            -1.5811300277709961e-01 1.7806899547576904e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2393 -4.0540001355111599e-03</internalNodes>\n          <leafValues>\n            -5.4366701841354370e-01 3.1235000118613243e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2394 3.0080000869929790e-03</internalNodes>\n          <leafValues>\n            -1.7376799881458282e-01 3.0441701412200928e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2395 -1.0091999545693398e-02</internalNodes>\n          <leafValues>\n            2.5103801488876343e-01 -2.6224100589752197e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2396 -3.8818001747131348e-02</internalNodes>\n          <leafValues>\n            9.3226701021194458e-01 7.2659999132156372e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2397 3.4651998430490494e-02</internalNodes>\n          <leafValues>\n            -3.3934999257326126e-02 -8.5707902908325195e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2398 -4.6729999594390392e-03</internalNodes>\n          <leafValues>\n            3.4969300031661987e-01 -4.8517998307943344e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2399 6.8499997723847628e-04</internalNodes>\n          <leafValues>\n            6.6573001444339752e-02 -4.4973799586296082e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2400 3.5317000001668930e-02</internalNodes>\n          <leafValues>\n            1.4275799691677094e-01 -4.6726399660110474e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2401 -2.3569999262690544e-02</internalNodes>\n          <leafValues>\n            -1.0286079645156860e+00 -4.5288000255823135e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2402 -1.9109999993816018e-03</internalNodes>\n          <leafValues>\n            -1.9652199745178223e-01 2.8661000728607178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2403 -1.6659000888466835e-02</internalNodes>\n          <leafValues>\n            -7.7532202005386353e-01 -8.3280000835657120e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2404 6.6062200069427490e-01</internalNodes>\n          <leafValues>\n            1.3232499361038208e-01 -3.5266680717468262e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2405 1.0970599949359894e-01</internalNodes>\n          <leafValues>\n            -1.5547199547290802e-01 1.4674140214920044e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2406 1.3500999659299850e-02</internalNodes>\n          <leafValues>\n            1.5233400464057922e-01 -1.3020930290222168e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2407 -2.2871999070048332e-02</internalNodes>\n          <leafValues>\n            -7.1325999498367310e-01 -8.7040001526474953e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2408 -8.1821002066135406e-02</internalNodes>\n          <leafValues>\n            1.1127580404281616e+00 8.3219997584819794e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2409 -5.2728001028299332e-02</internalNodes>\n          <leafValues>\n            9.3165099620819092e-01 -1.7103999853134155e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2410 -2.5242000818252563e-02</internalNodes>\n          <leafValues>\n            -1.9733799993991852e-01 2.5359401106834412e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2411 -4.3818999081850052e-02</internalNodes>\n          <leafValues>\n            4.1815200448036194e-01 -2.4585500359535217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2412 -1.8188999965786934e-02</internalNodes>\n          <leafValues>\n            -5.1743197441101074e-01 2.0174199342727661e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2413 2.3466000333428383e-02</internalNodes>\n          <leafValues>\n            -4.3071001768112183e-02 -1.0636579990386963e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2414 3.4216001629829407e-02</internalNodes>\n          <leafValues>\n            5.3780999034643173e-02 4.9707201123237610e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2415 2.5692999362945557e-02</internalNodes>\n          <leafValues>\n            -2.3800100386142731e-01 4.1651499271392822e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2416 -2.6565000414848328e-02</internalNodes>\n          <leafValues>\n            -8.8574802875518799e-01 1.3365900516510010e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2417 6.0942001640796661e-02</internalNodes>\n          <leafValues>\n            -2.0669700205326080e-01 5.8309000730514526e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2418 1.4474500715732574e-01</internalNodes>\n          <leafValues>\n            1.3282300531864166e-01 -3.1449348926544189e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2419 5.3410999476909637e-02</internalNodes>\n          <leafValues>\n            -1.7325200140476227e-01 6.9190698862075806e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2420 1.1408000253140926e-02</internalNodes>\n          <leafValues>\n            5.4822001606225967e-02 3.0240398645401001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2421 -2.3179999552667141e-03</internalNodes>\n          <leafValues>\n            1.5820899605751038e-01 -3.1973201036453247e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2422 -2.9695000499486923e-02</internalNodes>\n          <leafValues>\n            7.1274799108505249e-01 5.8136001229286194e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2423 2.7249999344348907e-02</internalNodes>\n          <leafValues>\n            -1.5754100680351257e-01 9.2143797874450684e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2424 -3.6200000904500484e-03</internalNodes>\n          <leafValues>\n            -3.4548398852348328e-01 2.0220999419689178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2425 -1.2578999623656273e-02</internalNodes>\n          <leafValues>\n            -5.5650299787521362e-01 2.0388999953866005e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2426 -8.8849000632762909e-02</internalNodes>\n          <leafValues>\n            -3.6100010871887207e+00 1.3164199888706207e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2427 -1.9256999716162682e-02</internalNodes>\n          <leafValues>\n            5.1908999681472778e-01 -1.9284300506114960e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2428 -1.6666999086737633e-02</internalNodes>\n          <leafValues>\n            -8.7499998509883881e-02 1.5812499821186066e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2429 1.2931999750435352e-02</internalNodes>\n          <leafValues>\n            2.7405999600887299e-02 -5.5123901367187500e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2430 -1.3431999832391739e-02</internalNodes>\n          <leafValues>\n            2.3457799851894379e-01 -4.3235000222921371e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2431 1.8810000270605087e-02</internalNodes>\n          <leafValues>\n            -3.9680998772382736e-02 -9.4373297691345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2432 -6.4349998719990253e-03</internalNodes>\n          <leafValues>\n            4.5703700184822083e-01 -4.0520001202821732e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2433 -2.4249000474810600e-02</internalNodes>\n          <leafValues>\n            -7.6248002052307129e-01 -1.9857000559568405e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2434 -2.9667999595403671e-02</internalNodes>\n          <leafValues>\n            -3.7412509918212891e+00 1.1250600218772888e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2435 5.1150000654160976e-03</internalNodes>\n          <leafValues>\n            -6.3781797885894775e-01 1.1223999783396721e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2436 -5.7819997891783714e-03</internalNodes>\n          <leafValues>\n            1.9374400377273560e-01 -8.2042001187801361e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2437 1.6606999561190605e-02</internalNodes>\n          <leafValues>\n            -1.6192099452018738e-01 1.1334990262985229e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2438 3.8228001445531845e-02</internalNodes>\n          <leafValues>\n            2.1105000749230385e-02 7.6264202594757080e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2439 -5.7094000279903412e-02</internalNodes>\n          <leafValues>\n            -1.6974929571151733e+00 -5.9762001037597656e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2440 -5.3883001208305359e-02</internalNodes>\n          <leafValues>\n            1.1850190162658691e+00 9.0966999530792236e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2441 -2.6110000908374786e-03</internalNodes>\n          <leafValues>\n            -4.0941199660301208e-01 8.3820998668670654e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2442 2.9714399576187134e-01</internalNodes>\n          <leafValues>\n            1.5529899299144745e-01 -1.0995409488677979e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2443 -8.9063003659248352e-02</internalNodes>\n          <leafValues>\n            4.8947200179100037e-01 -2.0041200518608093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2444 -5.6193001568317413e-02</internalNodes>\n          <leafValues>\n            -2.4581399559974670e-01 1.4365500211715698e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2445 3.7004999816417694e-02</internalNodes>\n          <leafValues>\n            -4.8168998211622238e-02 -1.2310709953308105e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2446 -8.4840003401041031e-03</internalNodes>\n          <leafValues>\n            4.3372601270675659e-01 1.3779999688267708e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2447 -2.4379999376833439e-03</internalNodes>\n          <leafValues>\n            1.8949699401855469e-01 -3.2294198870658875e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2448 -7.1639999747276306e-02</internalNodes>\n          <leafValues>\n            -4.3979001045227051e-01 2.2730199992656708e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2449 5.2260002121329308e-03</internalNodes>\n          <leafValues>\n            -2.0548400282859802e-01 5.0933301448822021e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2450 -6.1360001564025879e-03</internalNodes>\n          <leafValues>\n            3.1157198548316956e-01 7.0680998265743256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2451 1.5595000237226486e-02</internalNodes>\n          <leafValues>\n            -3.0934798717498779e-01 1.5627700090408325e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2452 2.5995999574661255e-02</internalNodes>\n          <leafValues>\n            1.3821600377559662e-01 -1.7616599798202515e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2453 -1.2085000053048134e-02</internalNodes>\n          <leafValues>\n            -5.1070201396942139e-01 5.8440998196601868e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2454 -6.7836001515388489e-02</internalNodes>\n          <leafValues>\n            4.7757101058959961e-01 -7.1446001529693604e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2455 -1.4715000055730343e-02</internalNodes>\n          <leafValues>\n            4.5238900184631348e-01 -1.9861400127410889e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2456 2.5118999183177948e-02</internalNodes>\n          <leafValues>\n            1.2954899668693542e-01 -8.6266398429870605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2457 1.8826000392436981e-02</internalNodes>\n          <leafValues>\n            -4.1570000350475311e-02 -1.1354700326919556e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2458 -2.1263999864459038e-02</internalNodes>\n          <leafValues>\n            -3.4738001227378845e-01 1.5779499709606171e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2459 9.4609996303915977e-03</internalNodes>\n          <leafValues>\n            4.8639997839927673e-03 -6.1654800176620483e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2460 2.2957700490951538e-01</internalNodes>\n          <leafValues>\n            8.1372998654842377e-02 6.9841402769088745e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2461 -3.8061998784542084e-02</internalNodes>\n          <leafValues>\n            1.1616369485855103e+00 -1.4976699650287628e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2462 -1.3484999537467957e-02</internalNodes>\n          <leafValues>\n            -3.2036399841308594e-01 1.7365099489688873e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2463 3.6238998174667358e-02</internalNodes>\n          <leafValues>\n            -1.8158499896526337e-01 6.1956697702407837e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2464 6.7210001870989799e-03</internalNodes>\n          <leafValues>\n            7.9600000753998756e-04 4.2441400885581970e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2465 9.6525996923446655e-02</internalNodes>\n          <leafValues>\n            -1.4696800708770752e-01 1.2525680065155029e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2466 -3.5656999796628952e-02</internalNodes>\n          <leafValues>\n            -3.9781698584556580e-01 1.4191399514675140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2467 1.0772000066936016e-02</internalNodes>\n          <leafValues>\n            -1.8194000422954559e-01 5.9762197732925415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2468 7.9279996454715729e-02</internalNodes>\n          <leafValues>\n            1.4642499387264252e-01 -7.8836899995803833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2469 3.2841000705957413e-02</internalNodes>\n          <leafValues>\n            -6.2408000230789185e-02 -1.4227490425109863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2470 -2.7781000360846519e-02</internalNodes>\n          <leafValues>\n            3.4033098816871643e-01 3.0670000240206718e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2471 -4.0339999832212925e-03</internalNodes>\n          <leafValues>\n            3.1084701418876648e-01 -2.2595700621604919e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2472 7.4260002002120018e-03</internalNodes>\n          <leafValues>\n            -3.8936998695135117e-02 3.1702101230621338e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2473 1.1213999986648560e-01</internalNodes>\n          <leafValues>\n            -1.7578299343585968e-01 6.5056598186492920e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2474 -1.1878100037574768e-01</internalNodes>\n          <leafValues>\n            -1.0092990398406982e+00 1.1069700121879578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2475 -4.1584998369216919e-02</internalNodes>\n          <leafValues>\n            -5.3806400299072266e-01 1.9905000925064087e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2476 -2.7966000139713287e-02</internalNodes>\n          <leafValues>\n            4.8143199086189270e-01 3.3590998500585556e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2477 -1.2506400048732758e-01</internalNodes>\n          <leafValues>\n            2.6352199912071228e-01 -2.5737899541854858e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2478 2.3666900396347046e-01</internalNodes>\n          <leafValues>\n            3.6508001387119293e-02 9.0655601024627686e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2479 -2.9475999996066093e-02</internalNodes>\n          <leafValues>\n            -6.0048800706863403e-01 9.5880003646016121e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2480 3.7792999297380447e-02</internalNodes>\n          <leafValues>\n            1.5506200492382050e-01 -9.5733499526977539e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2481 7.2044000029563904e-02</internalNodes>\n          <leafValues>\n            -1.4525899291038513e-01 1.3676730394363403e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2482 9.7759999334812164e-03</internalNodes>\n          <leafValues>\n            1.2915999628603458e-02 2.1640899777412415e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2483 5.2154000848531723e-02</internalNodes>\n          <leafValues>\n            -1.6359999775886536e-02 -8.8356298208236694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2484 -4.3790999799966812e-02</internalNodes>\n          <leafValues>\n            3.5829600691795349e-01 6.5131001174449921e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2485 -3.8378998637199402e-02</internalNodes>\n          <leafValues>\n            1.1961040496826172e+00 -1.4971500635147095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2486 -9.8838999867439270e-02</internalNodes>\n          <leafValues>\n            -6.1834001541137695e-01 1.2786200642585754e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2487 -1.2190700322389603e-01</internalNodes>\n          <leafValues>\n            -1.8276120424270630e+00 -6.4862996339797974e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2488 -1.1981700360774994e-01</internalNodes>\n          <leafValues>\n            -30. 1.1323300004005432e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2489 3.0910000205039978e-02</internalNodes>\n          <leafValues>\n            -2.3934000730514526e-01 3.6332899332046509e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2490 1.0800999589264393e-02</internalNodes>\n          <leafValues>\n            -3.5140000283718109e-02 2.7707898616790771e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2491 5.6844998151063919e-02</internalNodes>\n          <leafValues>\n            -1.5524299442768097e-01 1.0802700519561768e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2492 1.0280000278726220e-03</internalNodes>\n          <leafValues>\n            -6.1202999204397202e-02 2.0508000254631042e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2493 -2.8273999691009521e-02</internalNodes>\n          <leafValues>\n            -6.4778000116348267e-01 2.3917000740766525e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2494 -1.6013599932193756e-01</internalNodes>\n          <leafValues>\n            1.0892050266265869e+00 5.8389000594615936e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2495 4.9629998393356800e-03</internalNodes>\n          <leafValues>\n            -2.5806298851966858e-01 2.0834599435329437e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2496 4.6937000006437302e-02</internalNodes>\n          <leafValues>\n            1.3886299729347229e-01 -1.5662620067596436e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2497 2.4286000058054924e-02</internalNodes>\n          <leafValues>\n            -2.0728300511837006e-01 5.2430999279022217e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2498 7.0202000439167023e-02</internalNodes>\n          <leafValues>\n            1.4796899259090424e-01 -1.3095090389251709e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2499 9.8120002076029778e-03</internalNodes>\n          <leafValues>\n            2.7906000614166260e-02 -5.0864601135253906e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2500 -5.6200999766588211e-02</internalNodes>\n          <leafValues>\n            1.2618130445480347e+00 6.3801996409893036e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2501 1.0982800275087357e-01</internalNodes>\n          <leafValues>\n            -1.2850099802017212e-01 3.0776169300079346e+00</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>211</maxWeakCount>\n      <stageThreshold>-3.3703000545501709e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2502 2.0910000428557396e-02</internalNodes>\n          <leafValues>\n            -6.8559402227401733e-01 3.8984298706054688e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2503 3.5032000392675400e-02</internalNodes>\n          <leafValues>\n            -4.7724398970603943e-01 4.5027199387550354e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2504 3.9799001067876816e-02</internalNodes>\n          <leafValues>\n            -4.7011101245880127e-01 4.2702499032020569e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2505 -4.8409998416900635e-03</internalNodes>\n          <leafValues>\n            2.5614300370216370e-01 -6.6556298732757568e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2506 2.3439999204128981e-03</internalNodes>\n          <leafValues>\n            -4.8083499073982239e-01 2.8013798594474792e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2507 2.5312999263405800e-02</internalNodes>\n          <leafValues>\n            -2.3948200047016144e-01 4.4191798567771912e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2508 -3.2193001359701157e-02</internalNodes>\n          <leafValues>\n            7.6086699962615967e-01 -2.5059100985527039e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2509 7.5409002602100372e-02</internalNodes>\n          <leafValues>\n            -3.4974598884582520e-01 3.4380298852920532e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2510 -1.8469000235199928e-02</internalNodes>\n          <leafValues>\n            -7.9085600376129150e-01 3.4788001328706741e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2511 -1.2802000157535076e-02</internalNodes>\n          <leafValues>\n            4.7107800841331482e-01 -6.0006000101566315e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2512 -2.6598000898957253e-02</internalNodes>\n          <leafValues>\n            6.7116099596023560e-01 -2.4257500469684601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2513 2.1988999098539352e-02</internalNodes>\n          <leafValues>\n            2.4717499315738678e-01 -4.8301699757575989e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2514 1.4654099941253662e-01</internalNodes>\n          <leafValues>\n            -2.1504099667072296e-01 7.2055900096893311e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2515 3.5310001112520695e-03</internalNodes>\n          <leafValues>\n            2.7930998802185059e-01 -3.4339898824691772e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2516 9.4010001048445702e-03</internalNodes>\n          <leafValues>\n            5.5861998349428177e-02 -8.2143598794937134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2517 -8.6390003561973572e-03</internalNodes>\n          <leafValues>\n            -9.9620598554611206e-01 1.8874999880790710e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2518 -3.9193000644445419e-02</internalNodes>\n          <leafValues>\n            -1.1945559978485107e+00 -2.9198000207543373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2519 2.4855000898241997e-02</internalNodes>\n          <leafValues>\n            1.4987599849700928e-01 -5.4137802124023438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2520 -3.4995000809431076e-02</internalNodes>\n          <leafValues>\n            -1.4210180044174194e+00 -4.2314000427722931e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2521 -1.8378999084234238e-02</internalNodes>\n          <leafValues>\n            -2.8242599964141846e-01 1.5581800043582916e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2522 -1.3592000119388103e-02</internalNodes>\n          <leafValues>\n            4.7317099571228027e-01 -2.1937200427055359e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2523 6.2629999592900276e-03</internalNodes>\n          <leafValues>\n            -5.9714000672101974e-02 6.0625898838043213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2524 -1.8478000536561012e-02</internalNodes>\n          <leafValues>\n            -8.5647201538085938e-01 -1.3783999718725681e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2525 1.4236000366508961e-02</internalNodes>\n          <leafValues>\n            1.6654799878597260e-01 -2.7713999152183533e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2526 -3.2547000795602798e-02</internalNodes>\n          <leafValues>\n            -1.1728240251541138e+00 -4.0185000747442245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2527 -2.6410000864416361e-03</internalNodes>\n          <leafValues>\n            2.6514300704002380e-01 -5.6343000382184982e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2528 -8.7799999164417386e-04</internalNodes>\n          <leafValues>\n            3.6556001752614975e-02 -5.5075198411941528e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2529 4.7371998429298401e-02</internalNodes>\n          <leafValues>\n            -4.2614001780748367e-02 4.8194900155067444e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2530 -7.0790001191198826e-03</internalNodes>\n          <leafValues>\n            2.8698998689651489e-01 -3.2923001050949097e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2531 -4.3145999312400818e-02</internalNodes>\n          <leafValues>\n            -1.4065419435501099e+00 1.2836399674415588e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2532 2.0592000335454941e-02</internalNodes>\n          <leafValues>\n            -2.1435299515724182e-01 5.3981798887252808e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2533 -2.2367000579833984e-02</internalNodes>\n          <leafValues>\n            3.3718299865722656e-01 4.5212000608444214e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2534 5.0039999186992645e-02</internalNodes>\n          <leafValues>\n            -2.5121700763702393e-01 4.1750499606132507e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2535 6.1794999986886978e-02</internalNodes>\n          <leafValues>\n            4.0084999054670334e-02 6.8779802322387695e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2536 -4.1861999779939651e-02</internalNodes>\n          <leafValues>\n            5.3027397394180298e-01 -2.2901999950408936e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2537 -3.1959998887032270e-03</internalNodes>\n          <leafValues>\n            2.5161498785018921e-01 -2.1514600515365601e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2538 2.4255000054836273e-02</internalNodes>\n          <leafValues>\n            7.2320001199841499e-03 -7.2519099712371826e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2539 -1.7303999513387680e-02</internalNodes>\n          <leafValues>\n            -4.9958199262619019e-01 1.8394500017166138e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2540 -4.1470001451671124e-03</internalNodes>\n          <leafValues>\n            8.5211999714374542e-02 -4.6364700794219971e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2541 -1.4369999989867210e-02</internalNodes>\n          <leafValues>\n            -5.2258902788162231e-01 2.3892599344253540e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2542 -9.0399999171495438e-03</internalNodes>\n          <leafValues>\n            -6.3250398635864258e-01 3.2551001757383347e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2543 -1.2373100221157074e-01</internalNodes>\n          <leafValues>\n            1.2856210470199585e+00 7.6545000076293945e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2544 -8.2221999764442444e-02</internalNodes>\n          <leafValues>\n            8.3208197355270386e-01 -1.8590599298477173e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2545 6.5659001469612122e-02</internalNodes>\n          <leafValues>\n            1.1298800259828568e-01 -30.</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2546 -3.1582999974489212e-02</internalNodes>\n          <leafValues>\n            -1.3485900163650513e+00 -4.7097001224756241e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2547 -7.9636000096797943e-02</internalNodes>\n          <leafValues>\n            -1.3533639907836914e+00 1.5668800473213196e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2548 -1.8880000337958336e-02</internalNodes>\n          <leafValues>\n            4.0300300717353821e-01 -2.5148901343345642e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2549 -5.0149997696280479e-03</internalNodes>\n          <leafValues>\n            -2.6287099719047546e-01 1.8582500517368317e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2550 -1.2218000367283821e-02</internalNodes>\n          <leafValues>\n            5.8692401647567749e-01 -1.9427700340747833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2551 1.2710000155493617e-03</internalNodes>\n          <leafValues>\n            -1.6688999533653259e-01 2.3006899654865265e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2552 2.9743999242782593e-02</internalNodes>\n          <leafValues>\n            1.2520000338554382e-02 -6.6723597049713135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2553 2.8175000101327896e-02</internalNodes>\n          <leafValues>\n            -1.7060000449419022e-02 6.4579397439956665e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2554 3.0345000326633453e-02</internalNodes>\n          <leafValues>\n            -2.4178700149059296e-01 3.4878900647163391e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2555 -1.7325999215245247e-02</internalNodes>\n          <leafValues>\n            -5.3599399328231812e-01 2.0995999872684479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2556 -8.4178000688552856e-02</internalNodes>\n          <leafValues>\n            7.5093299150466919e-01 -1.7593200504779816e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2557 7.4950000271201134e-03</internalNodes>\n          <leafValues>\n            -1.6188099980354309e-01 3.0657500028610229e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2558 5.6494999676942825e-02</internalNodes>\n          <leafValues>\n            -1.7318800091743469e-01 1.0016150474548340e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2559 -5.2939997985959053e-03</internalNodes>\n          <leafValues>\n            2.3417599499225616e-01 -6.5347000956535339e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2560 -1.4945000410079956e-02</internalNodes>\n          <leafValues>\n            2.5018900632858276e-01 -3.0591198801994324e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2561 5.4919000715017319e-02</internalNodes>\n          <leafValues>\n            1.3121999800205231e-01 -9.3765097856521606e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2562 -1.9721999764442444e-02</internalNodes>\n          <leafValues>\n            -8.3978497982025146e-01 -2.3473000153899193e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2563 -6.7158997058868408e-02</internalNodes>\n          <leafValues>\n            2.3586840629577637e+00 8.2970999181270599e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2564 -1.4325999654829502e-02</internalNodes>\n          <leafValues>\n            1.8814499676227570e-01 -3.1221601366996765e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2565 2.9841000214219093e-02</internalNodes>\n          <leafValues>\n            1.4825099706649780e-01 -8.4681701660156250e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2566 5.1883000880479813e-02</internalNodes>\n          <leafValues>\n            -4.3731000274419785e-02 -1.3366169929504395e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2567 4.1127000004053116e-02</internalNodes>\n          <leafValues>\n            1.7660099267959595e-01 -6.0904097557067871e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2568 -1.2865099310874939e-01</internalNodes>\n          <leafValues>\n            -9.8701000213623047e-01 -3.7785001099109650e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2569 2.4170000106096268e-03</internalNodes>\n          <leafValues>\n            -1.6119599342346191e-01 3.2675701379776001e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2570 7.7030002139508724e-03</internalNodes>\n          <leafValues>\n            -2.3841500282287598e-01 2.9319399595260620e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2571 4.5520000159740448e-02</internalNodes>\n          <leafValues>\n            1.4424599707126617e-01 -1.5010160207748413e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2572 -7.8700996935367584e-02</internalNodes>\n          <leafValues>\n            -1.0394560098648071e+00 -4.5375999063253403e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2573 7.8619997948408127e-03</internalNodes>\n          <leafValues>\n            1.9633600115776062e-01 -1.4472399652004242e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2574 -1.3458999805152416e-02</internalNodes>\n          <leafValues>\n            -9.0634697675704956e-01 -3.8049001246690750e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2575 2.8827000409364700e-02</internalNodes>\n          <leafValues>\n            -2.9473999515175819e-02 6.0058397054672241e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2576 -2.7365999296307564e-02</internalNodes>\n          <leafValues>\n            -9.9804002046585083e-01 -3.8653001189231873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2577 -7.2917997837066650e-02</internalNodes>\n          <leafValues>\n            7.3361498117446899e-01 5.7440001517534256e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2578 -1.3988999649882317e-02</internalNodes>\n          <leafValues>\n            2.7892601490020752e-01 -2.6516300439834595e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2579 4.3242998421192169e-02</internalNodes>\n          <leafValues>\n            4.7760000452399254e-03 3.5925900936126709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2580 2.9533000662922859e-02</internalNodes>\n          <leafValues>\n            -2.0083999633789062e-01 5.1202899217605591e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2581 -3.1897000968456268e-02</internalNodes>\n          <leafValues>\n            6.4721697568893433e-01 -1.3760000001639128e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2582 3.7868998944759369e-02</internalNodes>\n          <leafValues>\n            -1.8363800644874573e-01 6.1343097686767578e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2583 -2.2417999804019928e-02</internalNodes>\n          <leafValues>\n            -2.9187899827957153e-01 1.8194800615310669e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2584 5.8958999812602997e-02</internalNodes>\n          <leafValues>\n            -6.6451996564865112e-02 -1.9290030002593994e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2585 3.1222999095916748e-02</internalNodes>\n          <leafValues>\n            -1.2732000090181828e-02 6.1560797691345215e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2586 3.7484999746084213e-02</internalNodes>\n          <leafValues>\n            -2.0856900513172150e-01 4.4363999366760254e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2587 -2.0966000854969025e-02</internalNodes>\n          <leafValues>\n            -3.5712799429893494e-01 2.4252200126647949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2588 -2.5477999821305275e-02</internalNodes>\n          <leafValues>\n            1.0846560001373291e+00 -1.5054400265216827e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2589 -7.2570000775158405e-03</internalNodes>\n          <leafValues>\n            2.1302600204944611e-01 -1.8308199942111969e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2590 -5.0983000546693802e-02</internalNodes>\n          <leafValues>\n            5.1736801862716675e-01 -1.8833099305629730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2591 -2.0640000700950623e-02</internalNodes>\n          <leafValues>\n            -4.4030201435089111e-01 2.2745999693870544e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2592 1.0672999545931816e-02</internalNodes>\n          <leafValues>\n            3.5059999674558640e-02 -5.1665002107620239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2593 3.1895998865365982e-02</internalNodes>\n          <leafValues>\n            1.3228000141680241e-02 3.4915199875831604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2594 -2.3824999108910561e-02</internalNodes>\n          <leafValues>\n            3.4118801355361938e-01 -2.1510200202465057e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2595 -6.0680001042783260e-03</internalNodes>\n          <leafValues>\n            3.2937398552894592e-01 -2.8523799777030945e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2596 2.3881999775767326e-02</internalNodes>\n          <leafValues>\n            -2.5333800911903381e-01 2.6296100020408630e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2597 2.7966000139713287e-02</internalNodes>\n          <leafValues>\n            1.4049099385738373e-01 -4.9887099862098694e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2598 1.4603000134229660e-02</internalNodes>\n          <leafValues>\n            -1.5395999886095524e-02 -7.6958000659942627e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2599 1.0872399806976318e-01</internalNodes>\n          <leafValues>\n            1.9069600105285645e-01 -3.2393100857734680e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2600 -1.4038000255823135e-02</internalNodes>\n          <leafValues>\n            3.4924700856208801e-01 -2.2358700633049011e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2601 4.0440000593662262e-03</internalNodes>\n          <leafValues>\n            -3.8329001516103745e-02 5.1177299022674561e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2602 -4.9769999459385872e-03</internalNodes>\n          <leafValues>\n            -4.2888298630714417e-01 4.9173999577760696e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2603 -8.5183002054691315e-02</internalNodes>\n          <leafValues>\n            6.6624599695205688e-01 7.8079998493194580e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2604 2.1559998858720064e-03</internalNodes>\n          <leafValues>\n            -4.9135199189186096e-01 6.9555997848510742e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2605 3.6384499073028564e-01</internalNodes>\n          <leafValues>\n            1.2997099757194519e-01 -1.8949509859085083e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2606 2.2082500159740448e-01</internalNodes>\n          <leafValues>\n            -5.7211998850107193e-02 -1.4281120300292969e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2607 -1.6140000894665718e-02</internalNodes>\n          <leafValues>\n            -5.7589399814605713e-01 1.8062500655651093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2608 -4.8330001533031464e-02</internalNodes>\n          <leafValues>\n            9.7308498620986938e-01 -1.6513000428676605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2609 1.7529999837279320e-02</internalNodes>\n          <leafValues>\n            1.7932699620723724e-01 -2.7948901057243347e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2610 -3.4309998154640198e-02</internalNodes>\n          <leafValues>\n            -8.1072497367858887e-01 -1.6596000641584396e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2611 -4.5830002054572105e-03</internalNodes>\n          <leafValues>\n            2.7908998727798462e-01 -7.4519999325275421e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2612 1.2896400690078735e-01</internalNodes>\n          <leafValues>\n            -1.3508500158786774e-01 2.5411539077758789e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2613 3.0361000448465347e-02</internalNodes>\n          <leafValues>\n            -6.8419001996517181e-02 2.8734099864959717e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2614 4.4086001813411713e-02</internalNodes>\n          <leafValues>\n            -1.8135899305343628e-01 6.5413200855255127e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2615 3.0159999150782824e-03</internalNodes>\n          <leafValues>\n            -1.5690499544143677e-01 2.6963800191879272e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2616 -2.6336999610066414e-02</internalNodes>\n          <leafValues>\n            2.9175600409507751e-01 -2.5274100899696350e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2617 -2.7866000309586525e-02</internalNodes>\n          <leafValues>\n            4.4387501478195190e-01 5.5038001388311386e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2618 1.1725000105798244e-02</internalNodes>\n          <leafValues>\n            -1.9346499443054199e-01 4.6656700968742371e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2619 1.5689999563619494e-03</internalNodes>\n          <leafValues>\n            -8.2360003143548965e-03 2.5700899958610535e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2620 -3.5550000611692667e-03</internalNodes>\n          <leafValues>\n            -4.2430898547172546e-01 7.1174003183841705e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2621 -3.1695000827312469e-02</internalNodes>\n          <leafValues>\n            -8.5393500328063965e-01 1.6916200518608093e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2622 -3.2097000628709793e-02</internalNodes>\n          <leafValues>\n            8.3784902095794678e-01 -1.7597299814224243e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2623 1.5544199943542480e-01</internalNodes>\n          <leafValues>\n            9.9550001323223114e-02 2.3873300552368164e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2624 8.8045999407768250e-02</internalNodes>\n          <leafValues>\n            -1.8725299835205078e-01 6.2384301424026489e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2625 -1.6720000421628356e-03</internalNodes>\n          <leafValues>\n            2.5008699297904968e-01 -6.5118998289108276e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2626 9.3409996479749680e-03</internalNodes>\n          <leafValues>\n            -3.5378900170326233e-01 1.0715000331401825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2627 3.7138000130653381e-02</internalNodes>\n          <leafValues>\n            1.6387000679969788e-01 -9.1718399524688721e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2628 8.0183997750282288e-02</internalNodes>\n          <leafValues>\n            -1.4812999963760376e-01 1.4895190000534058e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2629 -7.9100002767518163e-04</internalNodes>\n          <leafValues>\n            -2.1326899528503418e-01 1.9676400721073151e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2630 -5.0400001928210258e-03</internalNodes>\n          <leafValues>\n            -7.1318697929382324e-01 1.8240000354126096e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2631 1.1962399631738663e-01</internalNodes>\n          <leafValues>\n            3.3098999410867691e-02 1.0441709756851196e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2632 -4.5280000194907188e-03</internalNodes>\n          <leafValues>\n            -2.7308499813079834e-01 2.7229800820350647e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2633 -2.9639000073075294e-02</internalNodes>\n          <leafValues>\n            3.6225798726081848e-01 5.6795001029968262e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2634 2.6650000363588333e-02</internalNodes>\n          <leafValues>\n            -4.8041000962257385e-02 -9.6723502874374390e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2635 4.4422000646591187e-02</internalNodes>\n          <leafValues>\n            1.3052900135517120e-01 -3.5077300667762756e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2636 -2.4359999224543571e-02</internalNodes>\n          <leafValues>\n            -1.0766899585723877e+00 -5.1222998648881912e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2637 1.9734999164938927e-02</internalNodes>\n          <leafValues>\n            2.6238000020384789e-02 2.8070500493049622e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2638 5.4930001497268677e-03</internalNodes>\n          <leafValues>\n            -2.6111298799514771e-01 2.1011400222778320e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2639 -2.3200300335884094e-01</internalNodes>\n          <leafValues>\n            -1.7748440504074097e+00 1.1482600122690201e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2640 -2.5614000856876373e-02</internalNodes>\n          <leafValues>\n            2.9900801181793213e-01 -2.2502499818801880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2641 -6.4949998632073402e-03</internalNodes>\n          <leafValues>\n            1.9563800096511841e-01 -9.9762998521327972e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2642 3.9840000681579113e-03</internalNodes>\n          <leafValues>\n            -4.3021500110626221e-01 8.1261001527309418e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2643 -3.5813000053167343e-02</internalNodes>\n          <leafValues>\n            -5.0987398624420166e-01 1.6345900297164917e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2644 -1.4169000089168549e-02</internalNodes>\n          <leafValues>\n            7.7978098392486572e-01 -1.7476299405097961e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2645 -1.2642100453376770e-01</internalNodes>\n          <leafValues>\n            -6.3047897815704346e-01 1.2728300690650940e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2646 6.8677999079227448e-02</internalNodes>\n          <leafValues>\n            -4.6447999775409698e-02 -1.1128979921340942e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2647 8.5864998400211334e-02</internalNodes>\n          <leafValues>\n            1.1835400015115738e-01 -4.8235158920288086e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2648 1.5511999838054180e-02</internalNodes>\n          <leafValues>\n            -1.7467999830842018e-02 -6.3693398237228394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2649 8.1091001629829407e-02</internalNodes>\n          <leafValues>\n            8.6133003234863281e-02 2.4559431076049805e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2650 1.8495000898838043e-02</internalNodes>\n          <leafValues>\n            4.0229000151157379e-02 -5.0858199596405029e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2651 -8.6320996284484863e-02</internalNodes>\n          <leafValues>\n            -1.9006760120391846e+00 1.1019100248813629e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2652 7.2355002164840698e-02</internalNodes>\n          <leafValues>\n            -6.2111999839544296e-02 -1.4165179729461670e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2653 -7.8179001808166504e-02</internalNodes>\n          <leafValues>\n            8.8849300146102905e-01 4.2369998991489410e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2654 9.6681997179985046e-02</internalNodes>\n          <leafValues>\n            -2.2094200551509857e-01 3.3575099706649780e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2655 -3.9875999093055725e-02</internalNodes>\n          <leafValues>\n            5.7804799079895020e-01 4.5347999781370163e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2656 -9.5349997282028198e-03</internalNodes>\n          <leafValues>\n            -5.4175698757171631e-01 3.2399999909102917e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2657 4.0600000647827983e-04</internalNodes>\n          <leafValues>\n            -8.1549003720283508e-02 3.5837900638580322e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2658 1.2107999995350838e-02</internalNodes>\n          <leafValues>\n            -2.0280399918556213e-01 4.3768000602722168e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2659 -2.0873999223113060e-02</internalNodes>\n          <leafValues>\n            4.1469898819923401e-01 -4.5568000525236130e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2660 5.7888001203536987e-02</internalNodes>\n          <leafValues>\n            -2.9009999707341194e-02 -9.1822302341461182e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2661 1.3200000103097409e-04</internalNodes>\n          <leafValues>\n            -1.1772400140762329e-01 2.0000000298023224e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2662 -1.7137000337243080e-02</internalNodes>\n          <leafValues>\n            3.3004799485206604e-01 -2.3055200278759003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2663 3.0655000358819962e-02</internalNodes>\n          <leafValues>\n            -2.1545000374317169e-02 2.6878198981285095e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2664 -7.8699999721720815e-04</internalNodes>\n          <leafValues>\n            -4.4100698828697205e-01 4.9157999455928802e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2665 8.8036999106407166e-02</internalNodes>\n          <leafValues>\n            1.1782000213861465e-01 -2.8293309211730957e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2666 -3.9028998464345932e-02</internalNodes>\n          <leafValues>\n            9.1777199506759644e-01 -1.5827399492263794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2667 8.0105997622013092e-02</internalNodes>\n          <leafValues>\n            1.1289200186729431e-01 -1.9937280416488647e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2668 3.9538998156785965e-02</internalNodes>\n          <leafValues>\n            -1.4357399940490723e-01 1.3085240125656128e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2669 2.0684000104665756e-02</internalNodes>\n          <leafValues>\n            2.0048099756240845e-01 -4.4186998158693314e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2670 -6.7037999629974365e-02</internalNodes>\n          <leafValues>\n            3.2618600130081177e-01 -2.0550400018692017e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2671 4.6815000474452972e-02</internalNodes>\n          <leafValues>\n            1.5825299918651581e-01 -9.5535099506378174e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2672 7.8443996608257294e-02</internalNodes>\n          <leafValues>\n            -7.4651002883911133e-02 -2.1161499023437500e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2673 6.6380001604557037e-02</internalNodes>\n          <leafValues>\n            1.1641900241374969e-01 -1.6113519668579102e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2674 3.0053999274969101e-02</internalNodes>\n          <leafValues>\n            -1.6562600433826447e-01 7.0025402307510376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2675 1.7119999974966049e-02</internalNodes>\n          <leafValues>\n            2.2627699375152588e-01 -4.0114998817443848e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2676 2.0073000341653824e-02</internalNodes>\n          <leafValues>\n            -1.9389699399471283e-01 4.4420298933982849e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2677 3.3101998269557953e-02</internalNodes>\n          <leafValues>\n            1.1637499928474426e-01 -1.5771679878234863e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2678 -1.4882000163197517e-02</internalNodes>\n          <leafValues>\n            -8.9680302143096924e-01 -4.2010001838207245e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2679 -1.0281000286340714e-02</internalNodes>\n          <leafValues>\n            3.5602998733520508e-01 -1.3124000281095505e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2680 -2.8695000335574150e-02</internalNodes>\n          <leafValues>\n            -4.6039599180221558e-01 2.6801999658346176e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2681 -4.7189998440444469e-03</internalNodes>\n          <leafValues>\n            2.3788799345493317e-01 -6.5518997609615326e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2682 3.2201600074768066e-01</internalNodes>\n          <leafValues>\n            -2.8489999473094940e-02 -8.4234601259231567e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2683 -1.7045000568032265e-02</internalNodes>\n          <leafValues>\n            -5.0938802957534790e-01 1.6057600080966949e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2684 -7.3469998314976692e-03</internalNodes>\n          <leafValues>\n            -5.4154998064041138e-01 4.7320001758635044e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2685 -3.0001999810338020e-02</internalNodes>\n          <leafValues>\n            -8.8785797357559204e-01 1.3621799647808075e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2686 -1.1292999610304832e-02</internalNodes>\n          <leafValues>\n            8.0615198612213135e-01 -1.6159500181674957e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2687 4.7749998047947884e-03</internalNodes>\n          <leafValues>\n            1.2968000024557114e-02 5.5079901218414307e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2688 5.0710001960396767e-03</internalNodes>\n          <leafValues>\n            -4.5728001743555069e-02 -1.0766259431838989e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2689 1.9344100356101990e-01</internalNodes>\n          <leafValues>\n            7.1262001991271973e-02 1.1694519519805908e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2690 5.3750001825392246e-03</internalNodes>\n          <leafValues>\n            -1.9736200571060181e-01 3.8206899166107178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2691 -6.8276003003120422e-02</internalNodes>\n          <leafValues>\n            -5.4372339248657227e+00 1.1151900142431259e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2692 -3.4933000802993774e-02</internalNodes>\n          <leafValues>\n            4.4793400168418884e-01 -1.8657900393009186e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2693 5.1219998858869076e-03</internalNodes>\n          <leafValues>\n            -1.4871999621391296e-02 1.8413899838924408e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2694 9.5311999320983887e-02</internalNodes>\n          <leafValues>\n            -1.5117099881172180e-01 9.4991499185562134e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2695 -6.2849000096321106e-02</internalNodes>\n          <leafValues>\n            4.6473601460456848e-01 3.8405001163482666e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2696 -1.7040699720382690e-01</internalNodes>\n          <leafValues>\n            -1.6499999761581421e+00 -6.3236996531486511e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2697 1.0583999566733837e-02</internalNodes>\n          <leafValues>\n            -3.8348998874425888e-02 4.1913801431655884e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2698 -4.1579000651836395e-02</internalNodes>\n          <leafValues>\n            3.4461900591850281e-01 -2.1187700331211090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2699 1.2718600034713745e-01</internalNodes>\n          <leafValues>\n            1.2398199737071991e-01 -2.1254889965057373e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2700 8.2557000219821930e-02</internalNodes>\n          <leafValues>\n            -6.2024001032114029e-02 -1.4875819683074951e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2701 8.5293002426624298e-02</internalNodes>\n          <leafValues>\n            1.7087999731302261e-02 3.2076600193977356e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2702 5.5544000118970871e-02</internalNodes>\n          <leafValues>\n            -2.7414000034332275e-01 1.8976399302482605e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2703 4.5650000683963299e-03</internalNodes>\n          <leafValues>\n            -1.7920200526714325e-01 2.7967301011085510e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2704 1.2997999787330627e-02</internalNodes>\n          <leafValues>\n            -3.2297500967979431e-01 2.6941800117492676e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2705 5.7891998440027237e-02</internalNodes>\n          <leafValues>\n            1.2644399702548981e-01 -6.0713499784469604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2706 -2.2824000567197800e-02</internalNodes>\n          <leafValues>\n            -4.9682098627090454e-01 2.2376999258995056e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2707 4.8312000930309296e-02</internalNodes>\n          <leafValues>\n            4.3607000261545181e-02 4.8537799715995789e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2708 2.5714000687003136e-02</internalNodes>\n          <leafValues>\n            -4.2950998991727829e-02 -9.3023502826690674e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2709 6.9269998930394650e-03</internalNodes>\n          <leafValues>\n            -2.9680000152438879e-03 3.4296301007270813e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2710 -3.4446999430656433e-02</internalNodes>\n          <leafValues>\n            -1.5299769639968872e+00 -6.1014998704195023e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2711 2.9387999325990677e-02</internalNodes>\n          <leafValues>\n            3.7595998495817184e-02 6.4172399044036865e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2712 -2.4319998919963837e-03</internalNodes>\n          <leafValues>\n            9.9088996648788452e-02 -3.9688101410865784e-01</leafValues></_></weakClassifiers></_>\n    <_>\n      <maxWeakCount>200</maxWeakCount>\n      <stageThreshold>-2.9928278923034668e+00</stageThreshold>\n      <weakClassifiers>\n        <_>\n          <internalNodes>\n            0 -1 2713 -9.5944002270698547e-02</internalNodes>\n          <leafValues>\n            6.2419098615646362e-01 -4.5875200629234314e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2714 1.6834000125527382e-02</internalNodes>\n          <leafValues>\n            -9.3072801828384399e-01 2.1563600003719330e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2715 2.6049999520182610e-02</internalNodes>\n          <leafValues>\n            -4.0532299876213074e-01 4.2256599664688110e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2716 3.6500001442618668e-04</internalNodes>\n          <leafValues>\n            9.5288001000881195e-02 -6.3298100233078003e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2717 -6.6940002143383026e-03</internalNodes>\n          <leafValues>\n            3.7243801355361938e-01 -3.0332401394844055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2718 1.8874000757932663e-02</internalNodes>\n          <leafValues>\n            -2.3357200622558594e-01 4.0330699086189270e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2719 -1.6300000424962491e-04</internalNodes>\n          <leafValues>\n            4.2886998504400253e-02 -7.7796798944473267e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2720 -7.6259002089500427e-02</internalNodes>\n          <leafValues>\n            -4.9628499150276184e-01 1.6335399448871613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2721 5.0149001181125641e-02</internalNodes>\n          <leafValues>\n            3.2747000455856323e-02 -8.0047899484634399e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2722 -2.9239999130368233e-03</internalNodes>\n          <leafValues>\n            -5.0002801418304443e-01 2.5480601191520691e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2723 1.6243999823927879e-02</internalNodes>\n          <leafValues>\n            3.8913000375032425e-02 -7.0724898576736450e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2724 3.7811998277902603e-02</internalNodes>\n          <leafValues>\n            -6.6267997026443481e-02 7.3868799209594727e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2725 -1.2319999746978283e-02</internalNodes>\n          <leafValues>\n            4.8696398735046387e-01 -2.4485599994659424e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2726 5.8003999292850494e-02</internalNodes>\n          <leafValues>\n            1.3459099829196930e-01 -1.3232100009918213e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2727 4.8630000092089176e-03</internalNodes>\n          <leafValues>\n            -4.4172900915145874e-01 1.4005599915981293e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2728 4.5690998435020447e-02</internalNodes>\n          <leafValues>\n            3.1217999756336212e-02 8.9818298816680908e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2729 2.1321000531315804e-02</internalNodes>\n          <leafValues>\n            1.2008000165224075e-02 -8.6066198348999023e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2730 1.5679100155830383e-01</internalNodes>\n          <leafValues>\n            1.4055999927222729e-02 8.5332900285720825e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2731 -1.0328999720513821e-02</internalNodes>\n          <leafValues>\n            2.9022800922393799e-01 -2.9478800296783447e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2732 2.4290001019835472e-03</internalNodes>\n          <leafValues>\n            -4.0439900755882263e-01 1.9400200247764587e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2733 -2.3338999599218369e-02</internalNodes>\n          <leafValues>\n            3.2945200800895691e-01 -2.5712698698043823e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2734 -6.8970001302659512e-03</internalNodes>\n          <leafValues>\n            -5.3352999687194824e-01 2.1635200083255768e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2735 -3.4403000026941299e-02</internalNodes>\n          <leafValues>\n            -1.4425489902496338e+00 -4.4682998210191727e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2736 -2.1235000342130661e-02</internalNodes>\n          <leafValues>\n            -7.9017502069473267e-01 1.9084100425243378e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2737 2.0620001014322042e-03</internalNodes>\n          <leafValues>\n            -2.6931199431419373e-01 3.1488001346588135e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2738 -4.2190002277493477e-03</internalNodes>\n          <leafValues>\n            -5.4464399814605713e-01 1.6574600338935852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2739 -1.4334999956190586e-02</internalNodes>\n          <leafValues>\n            2.2105000913143158e-02 -6.2342500686645508e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2740 -8.2120001316070557e-03</internalNodes>\n          <leafValues>\n            -4.9884998798370361e-01 1.9237099587917328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2741 -9.3350000679492950e-03</internalNodes>\n          <leafValues>\n            -7.9131197929382324e-01 -1.4143999665975571e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2742 -3.7937998771667480e-02</internalNodes>\n          <leafValues>\n            7.9841297864913940e-01 -3.3799000084400177e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2743 4.7059999778866768e-03</internalNodes>\n          <leafValues>\n            -3.3163401484489441e-01 2.0726299285888672e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2744 -4.4499998912215233e-03</internalNodes>\n          <leafValues>\n            -2.7256301045417786e-01 1.8402199447154999e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2745 5.2189999260008335e-03</internalNodes>\n          <leafValues>\n            -5.3096002340316772e-01 5.2607998251914978e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2746 -9.5399999991059303e-03</internalNodes>\n          <leafValues>\n            -5.6485402584075928e-01 1.9269399344921112e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2747 4.4969998300075531e-02</internalNodes>\n          <leafValues>\n            -1.7411500215530396e-01 9.5382601022720337e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2748 1.4209000393748283e-02</internalNodes>\n          <leafValues>\n            -9.1949000954627991e-02 2.4836100637912750e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2749 1.6380199790000916e-01</internalNodes>\n          <leafValues>\n            -5.8497000485658646e-02 -1.6404409408569336e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2750 2.5579999200999737e-03</internalNodes>\n          <leafValues>\n            2.3447999358177185e-01 -9.2734001576900482e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2751 -3.8499999791383743e-03</internalNodes>\n          <leafValues>\n            1.7880700528621674e-01 -3.5844099521636963e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2752 -2.5221999734640121e-02</internalNodes>\n          <leafValues>\n            -4.2903000116348267e-01 2.0244500041007996e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2753 -1.9415000453591347e-02</internalNodes>\n          <leafValues>\n            5.8016300201416016e-01 -1.8806399405002594e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2754 1.4419999904930592e-02</internalNodes>\n          <leafValues>\n            3.2846998423337936e-02 8.1980502605438232e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2755 5.1582999527454376e-02</internalNodes>\n          <leafValues>\n            6.9176003336906433e-02 -4.5866298675537109e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2756 -3.7960000336170197e-02</internalNodes>\n          <leafValues>\n            -1.2553000450134277e+00 1.4332899451255798e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2757 -2.9560999944806099e-02</internalNodes>\n          <leafValues>\n            5.3151798248291016e-01 -2.0596499741077423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2758 -3.9110999554395676e-02</internalNodes>\n          <leafValues>\n            1.1658719778060913e+00 5.3897000849246979e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2759 -2.9159000143408775e-02</internalNodes>\n          <leafValues>\n            3.9307600259780884e-01 -2.2184500098228455e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2760 -8.3617001771926880e-02</internalNodes>\n          <leafValues>\n            -7.3744499683380127e-01 1.4268200099468231e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2761 4.2004001140594482e-01</internalNodes>\n          <leafValues>\n            -1.4277400076389313e-01 1.7894840240478516e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2762 6.0005001723766327e-02</internalNodes>\n          <leafValues>\n            1.1976700276136398e-01 -1.8886189460754395e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2763 -1.8981000408530235e-02</internalNodes>\n          <leafValues>\n            -1.4148449897766113e+00 -5.6522998958826065e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2764 -6.0049998573958874e-03</internalNodes>\n          <leafValues>\n            4.4170799851417542e-01 -1.0200800001621246e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2765 -5.8214001357555389e-02</internalNodes>\n          <leafValues>\n            -1.3918470144271851e+00 -4.8268999904394150e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2766 -1.2271000072360039e-02</internalNodes>\n          <leafValues>\n            5.1317697763442993e-01 -9.3696996569633484e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2767 4.6585999429225922e-02</internalNodes>\n          <leafValues>\n            -5.7484000921249390e-02 -1.4283169507980347e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2768 1.2110000243410468e-03</internalNodes>\n          <leafValues>\n            -8.0891996622085571e-02 3.2333201169967651e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2769 -8.8642001152038574e-02</internalNodes>\n          <leafValues>\n            -8.6449098587036133e-01 -3.3146999776363373e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2770 -2.3184999823570251e-02</internalNodes>\n          <leafValues>\n            5.2162200212478638e-01 -1.6168000176548958e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2771 4.3090000748634338e-02</internalNodes>\n          <leafValues>\n            -1.6153800487518311e-01 1.0915000438690186e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2772 2.0599999697878957e-04</internalNodes>\n          <leafValues>\n            -1.7091499269008636e-01 3.1236699223518372e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2773 8.9159999042749405e-03</internalNodes>\n          <leafValues>\n            -6.7039998248219490e-03 -6.8810397386550903e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2774 -1.7752999439835548e-02</internalNodes>\n          <leafValues>\n            6.3292801380157471e-01 -4.2360001243650913e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2775 6.2299999408423901e-03</internalNodes>\n          <leafValues>\n            -3.3637198805809021e-01 1.2790599465370178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2776 2.2770000621676445e-02</internalNodes>\n          <leafValues>\n            -3.4703999757766724e-02 3.9141800999641418e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2777 -2.1534999832510948e-02</internalNodes>\n          <leafValues>\n            6.4765101671218872e-01 -2.0097799599170685e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2778 6.1758998781442642e-02</internalNodes>\n          <leafValues>\n            5.4297000169754028e-02 9.0700101852416992e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2779 -7.8069999814033508e-02</internalNodes>\n          <leafValues>\n            6.5523397922515869e-01 -1.9754399359226227e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2780 1.1315000243484974e-02</internalNodes>\n          <leafValues>\n            1.9385300576686859e-01 -5.1707297563552856e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2781 -2.5590000674128532e-02</internalNodes>\n          <leafValues>\n            -9.3096500635147095e-01 -3.1546998769044876e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2782 -3.8058999925851822e-02</internalNodes>\n          <leafValues>\n            -6.8326902389526367e-01 1.2709100544452667e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2783 9.7970003262162209e-03</internalNodes>\n          <leafValues>\n            1.5523999929428101e-02 -6.3347899913787842e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2784 -1.3841999694705009e-02</internalNodes>\n          <leafValues>\n            1.0060529708862305e+00 6.2812998890876770e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2785 8.3459997549653053e-03</internalNodes>\n          <leafValues>\n            -2.3383200168609619e-01 3.0982699990272522e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2786 -7.1439996361732483e-02</internalNodes>\n          <leafValues>\n            -7.2505402565002441e-01 1.7148299515247345e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2787 1.0006000287830830e-02</internalNodes>\n          <leafValues>\n            -2.2071999311447144e-01 3.5266199707984924e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2788 1.1005300283432007e-01</internalNodes>\n          <leafValues>\n            1.6662000119686127e-01 -7.4318999052047729e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2789 3.5310998558998108e-02</internalNodes>\n          <leafValues>\n            -2.3982700705528259e-01 4.1435998678207397e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2790 -1.1174699664115906e-01</internalNodes>\n          <leafValues>\n            5.1045399904251099e-01 2.2319999989122152e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2791 -1.1367800086736679e-01</internalNodes>\n          <leafValues>\n            9.0475201606750488e-01 -1.6615299880504608e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2792 1.6667999327182770e-02</internalNodes>\n          <leafValues>\n            1.4024500548839569e-01 -5.2178502082824707e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2793 -8.0340001732110977e-03</internalNodes>\n          <leafValues>\n            -6.6178399324417114e-01 3.7640000227838755e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2794 -3.3096998929977417e-02</internalNodes>\n          <leafValues>\n            8.0185902118682861e-01 5.9385001659393311e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2795 1.2547999620437622e-02</internalNodes>\n          <leafValues>\n            -3.3545500040054321e-01 1.4578600227832794e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2796 -4.2073998600244522e-02</internalNodes>\n          <leafValues>\n            -5.5509102344512939e-01 1.3266600668430328e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2797 2.5221999734640121e-02</internalNodes>\n          <leafValues>\n            -6.1631999909877777e-02 -1.3678770065307617e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2798 -2.4268999695777893e-02</internalNodes>\n          <leafValues>\n            3.4185099601745605e-01 -7.4160001240670681e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2799 -1.2280000373721123e-02</internalNodes>\n          <leafValues>\n            2.7745801210403442e-01 -3.1033900380134583e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2800 -1.1377099901437759e-01</internalNodes>\n          <leafValues>\n            1.1719540357589722e+00 8.3681002259254456e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2801 -8.4771998226642609e-02</internalNodes>\n          <leafValues>\n            8.1694799661636353e-01 -1.7837500572204590e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2802 -2.4552000686526299e-02</internalNodes>\n          <leafValues>\n            -1.8627299368381500e-01 1.4340099692344666e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2803 -9.0269995853304863e-03</internalNodes>\n          <leafValues>\n            3.2659199833869934e-01 -2.3541299998760223e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2804 1.1177999898791313e-02</internalNodes>\n          <leafValues>\n            1.9761200249195099e-01 -2.1701000630855560e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2805 -2.9366999864578247e-02</internalNodes>\n          <leafValues>\n            -9.3414801359176636e-01 -2.1704999729990959e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2806 6.3640000298619270e-03</internalNodes>\n          <leafValues>\n            2.5573000311851501e-02 4.6412798762321472e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2807 1.4026000164449215e-02</internalNodes>\n          <leafValues>\n            -2.1228599548339844e-01 4.0078800916671753e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2808 -1.3341999612748623e-02</internalNodes>\n          <leafValues>\n            7.4202698469161987e-01 2.9001999646425247e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2809 2.8422799706459045e-01</internalNodes>\n          <leafValues>\n            -1.9243599474430084e-01 4.3631199002265930e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2810 -2.3724000155925751e-01</internalNodes>\n          <leafValues>\n            6.9736397266387939e-01 6.9307997822761536e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2811 -1.1169700324535370e-01</internalNodes>\n          <leafValues>\n            3.9147201180458069e-01 -2.0922000706195831e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2812 1.2787500023841858e-01</internalNodes>\n          <leafValues>\n            -7.2555996477603912e-02 3.6088201403617859e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2813 -6.2900997698307037e-02</internalNodes>\n          <leafValues>\n            9.5424997806549072e-01 -1.5402799844741821e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2814 1.7439000308513641e-02</internalNodes>\n          <leafValues>\n            -5.1134999841451645e-02 2.7750301361083984e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2815 1.2319999514147639e-03</internalNodes>\n          <leafValues>\n            7.5627997517585754e-02 -3.6456099152565002e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2816 2.7495000511407852e-02</internalNodes>\n          <leafValues>\n            5.1844000816345215e-02 4.1562598943710327e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2817 -4.3543998152017593e-02</internalNodes>\n          <leafValues>\n            7.1969997882843018e-01 -1.7132200300693512e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2818 1.1025999672710896e-02</internalNodes>\n          <leafValues>\n            1.4354600012302399e-01 -6.5403002500534058e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2819 2.0865999162197113e-02</internalNodes>\n          <leafValues>\n            4.0089000016450882e-02 -4.5743298530578613e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2820 -2.2304000332951546e-02</internalNodes>\n          <leafValues>\n            5.3855001926422119e-01 7.1662999689579010e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2821 3.2492000609636307e-02</internalNodes>\n          <leafValues>\n            -4.5991998165845871e-02 -1.0047069787979126e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2822 1.2269999831914902e-02</internalNodes>\n          <leafValues>\n            3.4334998577833176e-02 4.2431798577308655e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2823 8.3820000290870667e-03</internalNodes>\n          <leafValues>\n            -2.5850600004196167e-01 2.6263499259948730e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2824 3.7353999912738800e-02</internalNodes>\n          <leafValues>\n            1.5692499279975891e-01 -1.0429090261459351e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2825 -1.4111000113189220e-02</internalNodes>\n          <leafValues>\n            -7.3177701234817505e-01 -2.0276999101042747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2826 5.7066999375820160e-02</internalNodes>\n          <leafValues>\n            8.3360001444816589e-02 1.5661499500274658e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2827 4.9680001102387905e-03</internalNodes>\n          <leafValues>\n            -3.5318198800086975e-01 1.4698399603366852e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2828 -2.4492999538779259e-02</internalNodes>\n          <leafValues>\n            2.8325900435447693e-01 -3.4640000667423010e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2829 -1.1254999786615372e-02</internalNodes>\n          <leafValues>\n            -8.4017497301101685e-01 -3.6251999437808990e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2830 3.4533001482486725e-02</internalNodes>\n          <leafValues>\n            1.4998500049114227e-01 -8.7367099523544312e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2831 2.4303000420331955e-02</internalNodes>\n          <leafValues>\n            -1.8787500262260437e-01 5.9483999013900757e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2832 -7.8790001571178436e-03</internalNodes>\n          <leafValues>\n            4.4315698742866516e-01 -5.6570999324321747e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2833 3.5142000764608383e-02</internalNodes>\n          <leafValues>\n            -5.6494999676942825e-02 -1.3617190122604370e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2834 4.6259998343884945e-03</internalNodes>\n          <leafValues>\n            -3.1161698698997498e-01 2.5447699427604675e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2835 -8.3131000399589539e-02</internalNodes>\n          <leafValues>\n            1.6424349546432495e+00 -1.4429399371147156e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2836 -1.4015999622642994e-02</internalNodes>\n          <leafValues>\n            -7.7819502353668213e-01 1.7173300683498383e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2837 1.2450000504031777e-03</internalNodes>\n          <leafValues>\n            -2.3191399872303009e-01 2.8527900576591492e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2838 -1.6803000122308731e-02</internalNodes>\n          <leafValues>\n            -3.5965099930763245e-01 2.0412999391555786e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2839 -7.6747998595237732e-02</internalNodes>\n          <leafValues>\n            7.8050500154495239e-01 -1.5612800419330597e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2840 -2.3671999573707581e-01</internalNodes>\n          <leafValues>\n            1.1813700199127197e+00 7.8111998736858368e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2841 -1.0057400166988373e-01</internalNodes>\n          <leafValues>\n            -4.7104099392890930e-01 7.9172998666763306e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2842 1.3239999534562230e-03</internalNodes>\n          <leafValues>\n            2.2262699902057648e-01 -3.7099799513816833e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2843 2.2152999415993690e-02</internalNodes>\n          <leafValues>\n            -3.8649000227451324e-02 -9.2274999618530273e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2844 -1.1246199905872345e-01</internalNodes>\n          <leafValues>\n            4.1899600625038147e-01 8.0411002039909363e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2845 1.6481000930070877e-02</internalNodes>\n          <leafValues>\n            -1.6756699979305267e-01 7.1842402219772339e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2846 6.8113997578620911e-02</internalNodes>\n          <leafValues>\n            1.5719899535179138e-01 -8.7681102752685547e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2847 1.6011999920010567e-02</internalNodes>\n          <leafValues>\n            -4.1600000113248825e-03 -5.9327799081802368e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2848 4.6640001237392426e-03</internalNodes>\n          <leafValues>\n            -3.0153999105095863e-02 4.8345300555229187e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2849 6.7579997703433037e-03</internalNodes>\n          <leafValues>\n            -2.2667400538921356e-01 3.3662301301956177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2850 4.7289999201893806e-03</internalNodes>\n          <leafValues>\n            -6.0373999178409576e-02 3.1458100676536560e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2851 2.5869999080896378e-03</internalNodes>\n          <leafValues>\n            -2.9872599244117737e-01 1.7787499725818634e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2852 2.8989999555051327e-03</internalNodes>\n          <leafValues>\n            2.1890200674533844e-01 -2.9567098617553711e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2853 -3.0053999274969101e-02</internalNodes>\n          <leafValues>\n            1.2150429487228394e+00 -1.4354999363422394e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2854 1.4181000180542469e-02</internalNodes>\n          <leafValues>\n            1.2451999820768833e-02 5.5490100383758545e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2855 -6.0527000576257706e-02</internalNodes>\n          <leafValues>\n            -1.4933999776840210e+00 -6.5227001905441284e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2856 -1.9882999360561371e-02</internalNodes>\n          <leafValues>\n            -3.8526400923728943e-01 1.9761200249195099e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2857 3.1218999996781349e-02</internalNodes>\n          <leafValues>\n            -2.1281200647354126e-01 2.9446500539779663e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2858 1.8271999433636665e-02</internalNodes>\n          <leafValues>\n            9.7200000891461968e-04 6.6814202070236206e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2859 1.1089999461546540e-03</internalNodes>\n          <leafValues>\n            -6.2467902898788452e-01 -1.6599999507889152e-03</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2860 -3.6713998764753342e-02</internalNodes>\n          <leafValues>\n            -4.2333900928497314e-01 1.2084700167179108e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2861 1.2044000439345837e-02</internalNodes>\n          <leafValues>\n            2.5882000103592873e-02 -5.0732398033142090e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2862 7.4749000370502472e-02</internalNodes>\n          <leafValues>\n            1.3184699416160583e-01 -2.1739600598812103e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2863 -2.3473200201988220e-01</internalNodes>\n          <leafValues>\n            1.1775610446929932e+00 -1.5114699304103851e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2864 1.4096499979496002e-01</internalNodes>\n          <leafValues>\n            3.3991001546382904e-02 3.9923098683357239e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2865 6.1789997853338718e-03</internalNodes>\n          <leafValues>\n            -3.1806701421737671e-01 1.1681699752807617e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2866 -5.7216998189687729e-02</internalNodes>\n          <leafValues>\n            8.4399098157882690e-01 8.3889000117778778e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2867 -5.5227000266313553e-02</internalNodes>\n          <leafValues>\n            3.6888301372528076e-01 -1.8913400173187256e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2868 -2.1583000198006630e-02</internalNodes>\n          <leafValues>\n            -5.2161800861358643e-01 1.5772600471973419e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2869 2.5747999548912048e-02</internalNodes>\n          <leafValues>\n            -5.9921998530626297e-02 -1.0674990415573120e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2870 -1.3098999857902527e-02</internalNodes>\n          <leafValues>\n            7.8958398103713989e-01 5.2099999040365219e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2871 2.2799998987466097e-03</internalNodes>\n          <leafValues>\n            -1.1704430580139160e+00 -5.9356998652219772e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2872 8.8060004636645317e-03</internalNodes>\n          <leafValues>\n            4.1717998683452606e-02 6.6352599859237671e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2873 -8.9699998497962952e-03</internalNodes>\n          <leafValues>\n            -3.5862699151039124e-01 6.0458000749349594e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2874 4.0230001322925091e-03</internalNodes>\n          <leafValues>\n            2.0979399979114532e-01 -2.4806000292301178e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2875 2.5017000734806061e-02</internalNodes>\n          <leafValues>\n            -1.8795900046825409e-01 3.9547100663185120e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2876 -5.9009999968111515e-03</internalNodes>\n          <leafValues>\n            2.5663900375366211e-01 -9.4919003546237946e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2877 4.3850000947713852e-03</internalNodes>\n          <leafValues>\n            3.3139001578092575e-02 -4.6075400710105896e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2878 -3.3771999180316925e-02</internalNodes>\n          <leafValues>\n            -9.8881602287292480e-01 1.4636899530887604e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2879 4.4523000717163086e-02</internalNodes>\n          <leafValues>\n            -1.3286699354648590e-01 1.5796790122985840e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2880 -4.0929000824689865e-02</internalNodes>\n          <leafValues>\n            3.3877098560333252e-01 7.4970997869968414e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2881 3.9351999759674072e-02</internalNodes>\n          <leafValues>\n            -1.8327899277210236e-01 4.6980699896812439e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2882 -7.0322997868061066e-02</internalNodes>\n          <leafValues>\n            -9.8322701454162598e-01 1.1808100342750549e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2883 3.5743001848459244e-02</internalNodes>\n          <leafValues>\n            -3.3050999045372009e-02 -8.3610898256301880e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2884 -4.2961999773979187e-02</internalNodes>\n          <leafValues>\n            1.1670809984207153e+00 8.0692000687122345e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2885 -2.1007999777793884e-02</internalNodes>\n          <leafValues>\n            6.3869798183441162e-01 -1.7626300454139709e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2886 -1.5742200613021851e-01</internalNodes>\n          <leafValues>\n            -2.3302499949932098e-01 1.2517499923706055e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2887 7.8659998252987862e-03</internalNodes>\n          <leafValues>\n            -2.2037999331951141e-01 2.7196800708770752e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2888 2.3622000589966774e-02</internalNodes>\n          <leafValues>\n            1.6127300262451172e-01 -4.3329000473022461e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2889 7.4692003428936005e-02</internalNodes>\n          <leafValues>\n            -1.6991999745368958e-01 5.8884900808334351e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2890 -6.4799998654052615e-04</internalNodes>\n          <leafValues>\n            2.5842899084091187e-01 -3.5911999642848969e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2891 -1.6290999948978424e-02</internalNodes>\n          <leafValues>\n            -7.6764398813247681e-01 -2.0472999662160873e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2892 -3.3133998513221741e-02</internalNodes>\n          <leafValues>\n            -2.7180099487304688e-01 1.4325700700283051e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2893 4.8797998577356339e-02</internalNodes>\n          <leafValues>\n            7.6408997178077698e-02 -4.1445198655128479e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2894 2.2869999520480633e-03</internalNodes>\n          <leafValues>\n            -3.8628999143838882e-02 2.0753799378871918e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2895 4.5304000377655029e-02</internalNodes>\n          <leafValues>\n            -1.7777900397777557e-01 6.3461399078369141e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2896 1.0705800354480743e-01</internalNodes>\n          <leafValues>\n            1.8972299993038177e-01 -5.1236200332641602e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2897 -4.0525000542402267e-02</internalNodes>\n          <leafValues>\n            7.0614999532699585e-01 -1.7803299427032471e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2898 3.1968999654054642e-02</internalNodes>\n          <leafValues>\n            6.8149998784065247e-02 6.8733102083206177e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2899 -5.7617001235485077e-02</internalNodes>\n          <leafValues>\n            7.5170499086380005e-01 -1.5764999389648438e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2900 1.3593999668955803e-02</internalNodes>\n          <leafValues>\n            1.9411900639533997e-01 -2.4561899900436401e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2901 7.1396000683307648e-02</internalNodes>\n          <leafValues>\n            -4.6881001442670822e-02 -8.8198298215866089e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2902 -1.4895999804139137e-02</internalNodes>\n          <leafValues>\n            -4.4532400369644165e-01 1.7679899930953979e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2903 -1.0026000440120697e-02</internalNodes>\n          <leafValues>\n            6.5122699737548828e-01 -1.6709999740123749e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2904 3.7589999847114086e-03</internalNodes>\n          <leafValues>\n            -5.8301001787185669e-02 3.4483298659324646e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2905 1.6263000667095184e-02</internalNodes>\n          <leafValues>\n            -1.5581500530242920e-01 8.6432701349258423e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2906 -4.0176000446081161e-02</internalNodes>\n          <leafValues>\n            -6.1028599739074707e-01 1.1796399950981140e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2907 2.7080999687314034e-02</internalNodes>\n          <leafValues>\n            -4.9601998180150986e-02 -8.9990001916885376e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2908 5.2420001477003098e-02</internalNodes>\n          <leafValues>\n            1.1297199875116348e-01 -1.0833640098571777e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2909 -1.9160000607371330e-02</internalNodes>\n          <leafValues>\n            -7.9880100488662720e-01 -3.4079000353813171e-02</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2910 -3.7730000913143158e-03</internalNodes>\n          <leafValues>\n            -1.9124099612236023e-01 2.1535199880599976e-01</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2911 7.5762003660202026e-02</internalNodes>\n          <leafValues>\n            -1.3421699404716492e-01 1.6807060241699219e+00</leafValues></_>\n        <_>\n          <internalNodes>\n            0 -1 2912 -2.2173000499606133e-02</internalNodes>\n          <leafValues>\n            4.8600998520851135e-01 3.6160000599920750e-03</leafValues></_></weakClassifiers></_></stages>\n  <features>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 7 -1.</_>\n        <_>\n          10 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 9 -1.</_>\n        <_>\n          3 12 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 6 -1.</_>\n        <_>\n          8 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 4 19 -1.</_>\n        <_>\n          5 5 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 16 -1.</_>\n        <_>\n          6 13 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 11 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 7 6 -1.</_>\n        <_>\n          4 3 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 7 -1.</_>\n        <_>\n          10 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 19 12 -1.</_>\n        <_>\n          1 12 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          8 2 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 15 -1.</_>\n        <_>\n          9 14 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 10 -1.</_>\n        <_>\n          5 11 14 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 9 -1.</_>\n        <_>\n          5 3 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 6 -1.</_>\n        <_>\n          16 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 4 9 -1.</_>\n        <_>\n          4 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 11 -1.</_>\n        <_>\n          20 0 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 13 -1.</_>\n        <_>\n          8 6 8 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 10 6 -1.</_>\n        <_>\n          7 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 12 -1.</_>\n        <_>\n          5 13 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          8 3 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 15 6 -1.</_>\n        <_>\n          5 11 15 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 14 -1.</_>\n        <_>\n          9 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 10 -1.</_>\n        <_>\n          11 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 3 12 -1.</_>\n        <_>\n          6 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 13 6 -1.</_>\n        <_>\n          5 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 15 -1.</_>\n        <_>\n          18 1 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 15 -1.</_>\n        <_>\n          4 1 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 15 -1.</_>\n        <_>\n          8 8 8 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 12 -1.</_>\n        <_>\n          5 6 7 6 2.</_>\n        <_>\n          12 12 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 21 12 -1.</_>\n        <_>\n          2 16 21 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          10 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 20 10 -1.</_>\n        <_>\n          2 13 10 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 13 -1.</_>\n        <_>\n          2 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 13 -1.</_>\n        <_>\n          20 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 22 19 -1.</_>\n        <_>\n          11 5 11 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          20 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 11 -1.</_>\n        <_>\n          2 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 19 3 -1.</_>\n        <_>\n          0 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          12 5 7 7 2.</_>\n        <_>\n          5 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 13 4 11 -1.</_>\n        <_>\n          17 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          0 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 5 -1.</_>\n        <_>\n          8 1 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 18 6 -1.</_>\n        <_>\n          4 12 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 12 6 -1.</_>\n        <_>\n          2 17 6 3 2.</_>\n        <_>\n          8 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 4 13 -1.</_>\n        <_>\n          19 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 4 13 -1.</_>\n        <_>\n          3 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 23 -1.</_>\n        <_>\n          8 1 8 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 12 -1.</_>\n        <_>\n          1 11 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 14 -1.</_>\n        <_>\n          14 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 16 6 -1.</_>\n        <_>\n          3 12 8 3 2.</_>\n        <_>\n          11 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 12 -1.</_>\n        <_>\n          8 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 12 -1.</_>\n        <_>\n          4 10 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 20 -1.</_>\n        <_>\n          2 1 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 14 -1.</_>\n        <_>\n          1 5 10 7 2.</_>\n        <_>\n          11 12 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 12 -1.</_>\n        <_>\n          5 12 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 7 9 -1.</_>\n        <_>\n          3 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 9 6 -1.</_>\n        <_>\n          1 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 8 10 -1.</_>\n        <_>\n          15 6 4 5 2.</_>\n        <_>\n          11 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          5 5 7 7 2.</_>\n        <_>\n          12 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 5 -1.</_>\n        <_>\n          10 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          9 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 4 -1.</_>\n        <_>\n          9 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 9 -1.</_>\n        <_>\n          6 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 6 -1.</_>\n        <_>\n          8 0 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 16 12 -1.</_>\n        <_>\n          4 11 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 6 -1.</_>\n        <_>\n          11 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 3 -1.</_>\n        <_>\n          8 20 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 4 -1.</_>\n        <_>\n          9 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 22 18 2 -1.</_>\n        <_>\n          1 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 10 -1.</_>\n        <_>\n          6 12 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 4 -1.</_>\n        <_>\n          0 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 3 -1.</_>\n        <_>\n          1 2 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 15 -1.</_>\n        <_>\n          5 4 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 10 -1.</_>\n        <_>\n          20 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 10 -1.</_>\n        <_>\n          2 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 20 6 -1.</_>\n        <_>\n          12 16 10 3 2.</_>\n        <_>\n          2 19 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 8 9 -1.</_>\n        <_>\n          4 12 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 12 6 -1.</_>\n        <_>\n          17 8 6 3 2.</_>\n        <_>\n          11 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 10 -1.</_>\n        <_>\n          12 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 12 3 -1.</_>\n        <_>\n          9 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 20 2 -1.</_>\n        <_>\n          2 11 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 18 12 -1.</_>\n        <_>\n          2 9 9 6 2.</_>\n        <_>\n          11 15 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 24 -1.</_>\n        <_>\n          3 0 9 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 10 -1.</_>\n        <_>\n          5 6 7 5 2.</_>\n        <_>\n          12 11 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 12 -1.</_>\n        <_>\n          14 5 5 6 2.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 12 -1.</_>\n        <_>\n          4 5 6 6 2.</_>\n        <_>\n          10 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 18 3 -1.</_>\n        <_>\n          4 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 8 8 -1.</_>\n        <_>\n          6 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 6 -1.</_>\n        <_>\n          3 19 18 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 18 -1.</_>\n        <_>\n          10 6 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 4 14 -1.</_>\n        <_>\n          8 1 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 19 2 -1.</_>\n        <_>\n          3 3 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 22 13 -1.</_>\n        <_>\n          12 8 11 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 11 4 -1.</_>\n        <_>\n          8 11 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 15 10 -1.</_>\n        <_>\n          5 12 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 6 -1.</_>\n        <_>\n          4 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 5 12 -1.</_>\n        <_>\n          19 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          6 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 9 6 -1.</_>\n        <_>\n          10 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 22 15 -1.</_>\n        <_>\n          0 12 22 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 17 9 -1.</_>\n        <_>\n          4 4 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 8 -1.</_>\n        <_>\n          18 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 7 -1.</_>\n        <_>\n          3 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 22 -1.</_>\n        <_>\n          18 0 3 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 22 -1.</_>\n        <_>\n          3 0 3 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 16 -1.</_>\n        <_>\n          16 7 4 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 19 6 -1.</_>\n        <_>\n          2 12 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 17 6 -1.</_>\n        <_>\n          2 17 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 14 -1.</_>\n        <_>\n          14 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 8 10 -1.</_>\n        <_>\n          5 6 4 5 2.</_>\n        <_>\n          9 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 11 -1.</_>\n        <_>\n          18 8 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 11 -1.</_>\n        <_>\n          3 8 3 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 10 18 -1.</_>\n        <_>\n          8 15 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 14 -1.</_>\n        <_>\n          7 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 8 -1.</_>\n        <_>\n          8 14 8 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 14 -1.</_>\n        <_>\n          10 10 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 6 6 -1.</_>\n        <_>\n          14 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 16 -1.</_>\n        <_>\n          7 0 5 8 2.</_>\n        <_>\n          12 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          12 3 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 20 4 -1.</_>\n        <_>\n          1 1 10 2 2.</_>\n        <_>\n          11 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 9 6 -1.</_>\n        <_>\n          13 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 6 -1.</_>\n        <_>\n          8 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 10 6 -1.</_>\n        <_>\n          8 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 9 -1.</_>\n        <_>\n          8 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 6 -1.</_>\n        <_>\n          7 5 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 3 -1.</_>\n        <_>\n          0 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 8 8 -1.</_>\n        <_>\n          9 11 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 6 6 -1.</_>\n        <_>\n          12 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 11 6 -1.</_>\n        <_>\n          7 12 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 4 -1.</_>\n        <_>\n          0 13 12 2 2.</_>\n        <_>\n          12 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 22 12 -1.</_>\n        <_>\n          13 4 11 6 2.</_>\n        <_>\n          2 10 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 17 -1.</_>\n        <_>\n          12 0 10 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 24 -1.</_>\n        <_>\n          14 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 24 -1.</_>\n        <_>\n          9 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 2 22 -1.</_>\n        <_>\n          14 1 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 2 22 -1.</_>\n        <_>\n          9 1 1 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 6 3 18 -1.</_>\n        <_>\n          18 6 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 6 -1.</_>\n        <_>\n          6 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 9 4 -1.</_>\n        <_>\n          13 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          3 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 8 18 -1.</_>\n        <_>\n          13 4 4 9 2.</_>\n        <_>\n          9 13 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 4 -1.</_>\n        <_>\n          6 2 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 14 6 -1.</_>\n        <_>\n          6 11 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          10 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 16 -1.</_>\n        <_>\n          10 13 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 9 16 -1.</_>\n        <_>\n          4 4 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 9 -1.</_>\n        <_>\n          5 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 5 8 -1.</_>\n        <_>\n          9 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 9 -1.</_>\n        <_>\n          20 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 3 -1.</_>\n        <_>\n          2 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 22 19 2 -1.</_>\n        <_>\n          5 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 9 -1.</_>\n        <_>\n          2 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 19 18 -1.</_>\n        <_>\n          5 12 19 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 12 -1.</_>\n        <_>\n          13 5 7 6 2.</_>\n        <_>\n          6 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 2 -1.</_>\n        <_>\n          0 2 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 3 -1.</_>\n        <_>\n          1 3 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 7 9 -1.</_>\n        <_>\n          2 11 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 22 4 -1.</_>\n        <_>\n          13 12 11 2 2.</_>\n        <_>\n          2 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 12 11 2 2.</_>\n        <_>\n          11 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 11 -1.</_>\n        <_>\n          11 7 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          10 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 10 -1.</_>\n        <_>\n          11 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          6 10 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 15 -1.</_>\n        <_>\n          18 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 18 3 -1.</_>\n        <_>\n          3 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 6 -1.</_>\n        <_>\n          1 5 8 3 2.</_>\n        <_>\n          9 8 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 14 -1.</_>\n        <_>\n          0 4 12 7 2.</_>\n        <_>\n          12 11 12 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 13 -1.</_>\n        <_>\n          13 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 13 -1.</_>\n        <_>\n          9 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 6 9 -1.</_>\n        <_>\n          13 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 9 6 -1.</_>\n        <_>\n          13 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 14 6 -1.</_>\n        <_>\n          2 18 7 3 2.</_>\n        <_>\n          9 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 4 -1.</_>\n        <_>\n          12 18 9 2 2.</_>\n        <_>\n          3 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 15 4 -1.</_>\n        <_>\n          5 20 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 15 9 -1.</_>\n        <_>\n          14 15 5 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 4 -1.</_>\n        <_>\n          4 6 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 15 10 -1.</_>\n        <_>\n          5 14 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 14 -1.</_>\n        <_>\n          12 9 5 7 2.</_>\n        <_>\n          7 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 3 -1.</_>\n        <_>\n          0 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 4 -1.</_>\n        <_>\n          12 16 9 2 2.</_>\n        <_>\n          3 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_>\n        <_>\n          11 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 2 18 -1.</_>\n        <_>\n          13 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 2 18 -1.</_>\n        <_>\n          10 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 10 -1.</_>\n        <_>\n          10 7 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 4 -1.</_>\n        <_>\n          8 20 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 5 18 -1.</_>\n        <_>\n          10 14 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 6 -1.</_>\n        <_>\n          0 2 12 3 2.</_>\n        <_>\n          12 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 8 -1.</_>\n        <_>\n          12 1 11 4 2.</_>\n        <_>\n          1 5 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 9 -1.</_>\n        <_>\n          4 3 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 19 -1.</_>\n        <_>\n          8 0 8 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 21 18 3 -1.</_>\n        <_>\n          11 21 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 6 16 -1.</_>\n        <_>\n          20 8 3 8 2.</_>\n        <_>\n          17 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 20 4 -1.</_>\n        <_>\n          1 15 10 2 2.</_>\n        <_>\n          11 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 9 -1.</_>\n        <_>\n          3 3 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 7 15 -1.</_>\n        <_>\n          15 11 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 13 -1.</_>\n        <_>\n          11 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 6 14 -1.</_>\n        <_>\n          17 2 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 12 10 -1.</_>\n        <_>\n          3 14 6 5 2.</_>\n        <_>\n          9 19 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 14 -1.</_>\n        <_>\n          4 2 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 5 12 -1.</_>\n        <_>\n          10 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 24 5 -1.</_>\n        <_>\n          8 17 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 12 -1.</_>\n        <_>\n          15 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 12 -1.</_>\n        <_>\n          3 1 3 6 2.</_>\n        <_>\n          6 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 13 6 6 -1.</_>\n        <_>\n          12 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 6 6 -1.</_>\n        <_>\n          6 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 3 16 -1.</_>\n        <_>\n          14 14 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 13 6 -1.</_>\n        <_>\n          1 14 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 9 -1.</_>\n        <_>\n          13 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 6 -1.</_>\n        <_>\n          10 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 9 -1.</_>\n        <_>\n          12 2 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 9 -1.</_>\n        <_>\n          9 2 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 12 6 -1.</_>\n        <_>\n          6 20 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 21 -1.</_>\n        <_>\n          8 10 8 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 12 -1.</_>\n        <_>\n          7 8 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 2 20 -1.</_>\n        <_>\n          15 2 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 2 21 -1.</_>\n        <_>\n          15 3 1 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 23 -1.</_>\n        <_>\n          8 0 1 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 4 -1.</_>\n        <_>\n          15 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 4 -1.</_>\n        <_>\n          0 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 4 -1.</_>\n        <_>\n          9 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 19 -1.</_>\n        <_>\n          8 0 8 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 8 12 -1.</_>\n        <_>\n          9 7 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 10 -1.</_>\n        <_>\n          12 6 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 12 -1.</_>\n        <_>\n          12 9 5 6 2.</_>\n        <_>\n          7 15 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 19 -1.</_>\n        <_>\n          6 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 10 -1.</_>\n        <_>\n          16 0 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 12 -1.</_>\n        <_>\n          2 0 3 6 2.</_>\n        <_>\n          5 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 2 -1.</_>\n        <_>\n          0 12 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 13 4 -1.</_>\n        <_>\n          4 11 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 9 -1.</_>\n        <_>\n          9 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 16 4 -1.</_>\n        <_>\n          0 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 9 -1.</_>\n        <_>\n          18 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 9 -1.</_>\n        <_>\n          0 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 6 15 -1.</_>\n        <_>\n          14 3 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 6 15 -1.</_>\n        <_>\n          8 3 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 4 -1.</_>\n        <_>\n          15 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 7 -1.</_>\n        <_>\n          8 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 10 -1.</_>\n        <_>\n          9 19 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 5 8 -1.</_>\n        <_>\n          7 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 16 -1.</_>\n        <_>\n          14 13 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          2 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 19 3 -1.</_>\n        <_>\n          5 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 3 18 -1.</_>\n        <_>\n          13 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 18 -1.</_>\n        <_>\n          10 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 9 -1.</_>\n        <_>\n          9 3 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 14 -1.</_>\n        <_>\n          8 1 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 9 6 -1.</_>\n        <_>\n          12 19 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 20 16 -1.</_>\n        <_>\n          1 3 10 8 2.</_>\n        <_>\n          11 11 10 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 6 12 -1.</_>\n        <_>\n          15 5 3 6 2.</_>\n        <_>\n          12 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 16 -1.</_>\n        <_>\n          1 2 11 8 2.</_>\n        <_>\n          12 10 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 5 10 -1.</_>\n        <_>\n          10 19 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 10 -1.</_>\n        <_>\n          12 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 12 -1.</_>\n        <_>\n          5 12 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 8 10 -1.</_>\n        <_>\n          4 14 4 5 2.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 5 14 -1.</_>\n        <_>\n          11 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 3 16 -1.</_>\n        <_>\n          7 14 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 8 -1.</_>\n        <_>\n          9 7 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 2 -1.</_>\n        <_>\n          2 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 19 6 -1.</_>\n        <_>\n          3 14 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 6 14 -1.</_>\n        <_>\n          16 6 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 12 -1.</_>\n        <_>\n          9 9 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 6 6 18 -1.</_>\n        <_>\n          21 6 3 9 2.</_>\n        <_>\n          18 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 18 -1.</_>\n        <_>\n          0 6 3 9 2.</_>\n        <_>\n          3 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 15 6 -1.</_>\n        <_>\n          3 20 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 2 -1.</_>\n        <_>\n          5 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 6 -1.</_>\n        <_>\n          6 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 13 6 -1.</_>\n        <_>\n          3 8 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 15 -1.</_>\n        <_>\n          5 5 3 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 6 -1.</_>\n        <_>\n          11 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          8 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 4 -1.</_>\n        <_>\n          9 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 19 -1.</_>\n        <_>\n          13 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 19 -1.</_>\n        <_>\n          9 1 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 9 6 9 -1.</_>\n        <_>\n          18 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 18 3 -1.</_>\n        <_>\n          1 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 10 9 -1.</_>\n        <_>\n          14 16 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 4 -1.</_>\n        <_>\n          1 13 11 2 2.</_>\n        <_>\n          12 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          12 6 8 3 2.</_>\n        <_>\n          4 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 22 -1.</_>\n        <_>\n          1 0 9 11 2.</_>\n        <_>\n          10 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 8 14 -1.</_>\n        <_>\n          14 7 4 7 2.</_>\n        <_>\n          10 14 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 20 -1.</_>\n        <_>\n          0 4 3 10 2.</_>\n        <_>\n          3 14 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 9 -1.</_>\n        <_>\n          17 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 6 12 -1.</_>\n        <_>\n          18 12 3 6 2.</_>\n        <_>\n          15 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 12 -1.</_>\n        <_>\n          3 12 3 6 2.</_>\n        <_>\n          6 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 19 3 -1.</_>\n        <_>\n          4 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 19 3 -1.</_>\n        <_>\n          2 14 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 12 -1.</_>\n        <_>\n          6 0 5 6 2.</_>\n        <_>\n          11 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 12 -1.</_>\n        <_>\n          20 1 3 6 2.</_>\n        <_>\n          17 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          1 1 3 6 2.</_>\n        <_>\n          4 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 9 12 -1.</_>\n        <_>\n          7 9 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 12 -1.</_>\n        <_>\n          12 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 8 -1.</_>\n        <_>\n          4 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 3 -1.</_>\n        <_>\n          8 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 21 23 -1.</_>\n        <_>\n          7 1 7 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 17 4 -1.</_>\n        <_>\n          6 11 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 11 18 -1.</_>\n        <_>\n          1 6 11 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 13 6 -1.</_>\n        <_>\n          6 17 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 15 4 -1.</_>\n        <_>\n          13 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 9 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 18 3 -1.</_>\n        <_>\n          12 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 4 -1.</_>\n        <_>\n          8 14 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 3 12 -1.</_>\n        <_>\n          16 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          0 4 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 10 6 -1.</_>\n        <_>\n          14 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 18 3 -1.</_>\n        <_>\n          7 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 9 -1.</_>\n        <_>\n          5 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 9 -1.</_>\n        <_>\n          4 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 12 -1.</_>\n        <_>\n          16 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 4 -1.</_>\n        <_>\n          6 7 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 10 -1.</_>\n        <_>\n          11 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 21 -1.</_>\n        <_>\n          12 1 9 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 7 -1.</_>\n        <_>\n          6 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 9 -1.</_>\n        <_>\n          10 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 5 12 -1.</_>\n        <_>\n          14 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 12 -1.</_>\n        <_>\n          5 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 17 -1.</_>\n        <_>\n          3 1 3 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 19 9 -1.</_>\n        <_>\n          3 4 19 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 19 -1.</_>\n        <_>\n          20 4 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 7 -1.</_>\n        <_>\n          5 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 12 -1.</_>\n        <_>\n          13 7 5 6 2.</_>\n        <_>\n          8 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 4 -1.</_>\n        <_>\n          8 20 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 9 6 -1.</_>\n        <_>\n          9 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 6 -1.</_>\n        <_>\n          10 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 14 -1.</_>\n        <_>\n          13 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 14 -1.</_>\n        <_>\n          9 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 18 5 -1.</_>\n        <_>\n          8 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 11 -1.</_>\n        <_>\n          20 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 14 -1.</_>\n        <_>\n          6 12 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          7 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 9 -1.</_>\n        <_>\n          0 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 9 4 -1.</_>\n        <_>\n          9 6 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 22 19 2 -1.</_>\n        <_>\n          0 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 14 6 9 -1.</_>\n        <_>\n          17 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 6 9 -1.</_>\n        <_>\n          1 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 4 9 -1.</_>\n        <_>\n          14 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 4 9 -1.</_>\n        <_>\n          8 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 7 -1.</_>\n        <_>\n          9 9 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 10 -1.</_>\n        <_>\n          9 17 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 11 12 -1.</_>\n        <_>\n          10 12 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 6 7 3 2.</_>\n        <_>\n          12 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 4 -1.</_>\n        <_>\n          5 6 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 2 -1.</_>\n        <_>\n          0 1 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 24 -1.</_>\n        <_>\n          8 0 8 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          10 15 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 9 -1.</_>\n        <_>\n          6 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 7 12 -1.</_>\n        <_>\n          4 16 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 6 -1.</_>\n        <_>\n          12 2 11 3 2.</_>\n        <_>\n          1 5 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 14 3 -1.</_>\n        <_>\n          12 20 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 16 -1.</_>\n        <_>\n          12 0 12 8 2.</_>\n        <_>\n          0 8 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          3 13 9 2 2.</_>\n        <_>\n          12 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 22 2 -1.</_>\n        <_>\n          2 11 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 11 8 -1.</_>\n        <_>\n          6 7 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 6 -1.</_>\n        <_>\n          14 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 6 -1.</_>\n        <_>\n          0 9 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 10 -1.</_>\n        <_>\n          19 0 5 5 2.</_>\n        <_>\n          14 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 10 -1.</_>\n        <_>\n          0 0 5 5 2.</_>\n        <_>\n          5 5 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 4 -1.</_>\n        <_>\n          12 1 12 2 2.</_>\n        <_>\n          0 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 16 6 -1.</_>\n        <_>\n          13 15 8 3 2.</_>\n        <_>\n          5 18 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 16 6 -1.</_>\n        <_>\n          3 15 8 3 2.</_>\n        <_>\n          11 18 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 21 10 -1.</_>\n        <_>\n          0 18 21 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 24 -1.</_>\n        <_>\n          15 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 6 11 -1.</_>\n        <_>\n          9 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 2 20 -1.</_>\n        <_>\n          1 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 24 -1.</_>\n        <_>\n          15 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 24 -1.</_>\n        <_>\n          7 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 6 14 -1.</_>\n        <_>\n          19 7 3 7 2.</_>\n        <_>\n          16 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 4 12 -1.</_>\n        <_>\n          6 7 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 14 -1.</_>\n        <_>\n          8 5 8 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 10 6 -1.</_>\n        <_>\n          5 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 14 -1.</_>\n        <_>\n          2 7 3 7 2.</_>\n        <_>\n          5 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 15 -1.</_>\n        <_>\n          18 2 3 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          2 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 10 14 -1.</_>\n        <_>\n          17 2 5 7 2.</_>\n        <_>\n          12 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 2 18 -1.</_>\n        <_>\n          12 6 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 15 6 -1.</_>\n        <_>\n          14 5 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 10 -1.</_>\n        <_>\n          10 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 9 7 -1.</_>\n        <_>\n          6 3 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 3 -1.</_>\n        <_>\n          6 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 8 6 -1.</_>\n        <_>\n          11 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 12 -1.</_>\n        <_>\n          12 13 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 13 -1.</_>\n        <_>\n          6 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 21 3 -1.</_>\n        <_>\n          9 2 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 12 -1.</_>\n        <_>\n          5 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 10 -1.</_>\n        <_>\n          10 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 8 -1.</_>\n        <_>\n          8 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 9 -1.</_>\n        <_>\n          6 3 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 5 -1.</_>\n        <_>\n          8 0 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 23 6 -1.</_>\n        <_>\n          1 12 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 21 6 -1.</_>\n        <_>\n          3 8 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 12 -1.</_>\n        <_>\n          2 5 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 8 10 -1.</_>\n        <_>\n          8 12 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 12 -1.</_>\n        <_>\n          10 7 5 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 10 6 -1.</_>\n        <_>\n          0 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 9 6 -1.</_>\n        <_>\n          14 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 18 9 6 -1.</_>\n        <_>\n          14 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 9 6 -1.</_>\n        <_>\n          1 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 9 9 6 -1.</_>\n        <_>\n          15 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 9 6 -1.</_>\n        <_>\n          0 11 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 9 -1.</_>\n        <_>\n          19 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 18 3 -1.</_>\n        <_>\n          2 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 21 6 -1.</_>\n        <_>\n          3 17 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 9 -1.</_>\n        <_>\n          18 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 10 -1.</_>\n        <_>\n          12 0 8 5 2.</_>\n        <_>\n          4 5 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 16 -1.</_>\n        <_>\n          2 0 5 8 2.</_>\n        <_>\n          7 8 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 5 -1.</_>\n        <_>\n          14 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 5 -1.</_>\n        <_>\n          5 0 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 10 -1.</_>\n        <_>\n          18 3 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 11 6 3 2.</_>\n        <_>\n          11 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 0 3 18 -1.</_>\n        <_>\n          22 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 7 -1.</_>\n        <_>\n          11 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 8 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_>\n        <_>\n          11 17 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          21 0 3 18 -1.</_>\n        <_>\n          22 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 3 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 9 -1.</_>\n        <_>\n          13 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 10 -1.</_>\n        <_>\n          9 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 12 -1.</_>\n        <_>\n          14 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 12 -1.</_>\n        <_>\n          6 10 12 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 2 21 -1.</_>\n        <_>\n          14 3 1 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 8 -1.</_>\n        <_>\n          6 5 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 8 -1.</_>\n        <_>\n          3 4 18 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 3 -1.</_>\n        <_>\n          3 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 4 -1.</_>\n        <_>\n          12 13 12 2 2.</_>\n        <_>\n          0 15 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          12 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 6 9 -1.</_>\n        <_>\n          13 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 22 -1.</_>\n        <_>\n          8 2 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 15 -1.</_>\n        <_>\n          3 9 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 8 14 -1.</_>\n        <_>\n          0 10 4 7 2.</_>\n        <_>\n          4 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 11 6 -1.</_>\n        <_>\n          10 17 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 9 -1.</_>\n        <_>\n          8 7 8 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 16 -1.</_>\n        <_>\n          13 1 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 16 -1.</_>\n        <_>\n          9 1 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 16 8 -1.</_>\n        <_>\n          13 5 8 4 2.</_>\n        <_>\n          5 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 6 9 -1.</_>\n        <_>\n          0 12 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 9 -1.</_>\n        <_>\n          3 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 8 10 -1.</_>\n        <_>\n          2 13 4 5 2.</_>\n        <_>\n          6 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 18 -1.</_>\n        <_>\n          15 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 3 -1.</_>\n        <_>\n          3 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 5 6 11 -1.</_>\n        <_>\n          19 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 6 11 -1.</_>\n        <_>\n          3 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 4 9 -1.</_>\n        <_>\n          19 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 9 -1.</_>\n        <_>\n          3 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 18 9 -1.</_>\n        <_>\n          4 15 9 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 2 9 6 -1.</_>\n        <_>\n          15 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 9 6 -1.</_>\n        <_>\n          0 4 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 17 -1.</_>\n        <_>\n          17 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 17 -1.</_>\n        <_>\n          5 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 9 4 -1.</_>\n        <_>\n          8 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 18 -1.</_>\n        <_>\n          6 11 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 12 -1.</_>\n        <_>\n          5 8 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 12 -1.</_>\n        <_>\n          10 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 14 15 -1.</_>\n        <_>\n          10 12 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 14 15 -1.</_>\n        <_>\n          0 12 14 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 14 -1.</_>\n        <_>\n          14 6 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 15 -1.</_>\n        <_>\n          14 6 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 15 -1.</_>\n        <_>\n          8 6 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 8 9 -1.</_>\n        <_>\n          15 3 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 21 -1.</_>\n        <_>\n          3 0 3 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 8 12 -1.</_>\n        <_>\n          11 13 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          0 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 18 3 -1.</_>\n        <_>\n          3 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 10 -1.</_>\n        <_>\n          3 14 4 5 2.</_>\n        <_>\n          7 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 4 -1.</_>\n        <_>\n          12 12 12 2 2.</_>\n        <_>\n          0 14 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 3 20 -1.</_>\n        <_>\n          1 2 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 9 -1.</_>\n        <_>\n          7 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          8 0 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 15 4 -1.</_>\n        <_>\n          3 10 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 14 6 -1.</_>\n        <_>\n          5 16 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 7 -1.</_>\n        <_>\n          3 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 6 -1.</_>\n        <_>\n          18 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 3 -1.</_>\n        <_>\n          3 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 14 18 -1.</_>\n        <_>\n          9 12 14 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 3 -1.</_>\n        <_>\n          8 20 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 7 -1.</_>\n        <_>\n          13 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 6 -1.</_>\n        <_>\n          4 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 7 -1.</_>\n        <_>\n          8 11 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 11 12 -1.</_>\n        <_>\n          7 8 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 10 4 -1.</_>\n        <_>\n          6 17 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 15 -1.</_>\n        <_>\n          11 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 10 6 -1.</_>\n        <_>\n          13 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 6 11 -1.</_>\n        <_>\n          5 7 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 10 9 -1.</_>\n        <_>\n          10 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 9 -1.</_>\n        <_>\n          10 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 4 -1.</_>\n        <_>\n          14 3 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_>\n        <_>\n          12 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 8 10 -1.</_>\n        <_>\n          12 8 4 5 2.</_>\n        <_>\n          8 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 16 -1.</_>\n        <_>\n          7 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 4 -1.</_>\n        <_>\n          8 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 9 -1.</_>\n        <_>\n          5 5 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 19 8 -1.</_>\n        <_>\n          3 20 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 8 -1.</_>\n        <_>\n          5 0 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 16 18 -1.</_>\n        <_>\n          5 2 8 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 11 -1.</_>\n        <_>\n          8 11 8 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 5 -1.</_>\n        <_>\n          3 3 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 18 3 -1.</_>\n        <_>\n          5 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 6 -1.</_>\n        <_>\n          1 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 23 10 -1.</_>\n        <_>\n          1 14 23 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 3 -1.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 3 22 -1.</_>\n        <_>\n          7 2 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 10 6 -1.</_>\n        <_>\n          14 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 10 6 -1.</_>\n        <_>\n          1 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 6 12 -1.</_>\n        <_>\n          13 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 9 6 -1.</_>\n        <_>\n          15 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 9 -1.</_>\n        <_>\n          5 11 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 19 -1.</_>\n        <_>\n          15 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 6 -1.</_>\n        <_>\n          6 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 3 19 -1.</_>\n        <_>\n          15 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 18 3 -1.</_>\n        <_>\n          5 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 4 -1.</_>\n        <_>\n          7 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 8 10 -1.</_>\n        <_>\n          17 4 4 5 2.</_>\n        <_>\n          13 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 6 -1.</_>\n        <_>\n          10 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 9 8 -1.</_>\n        <_>\n          15 9 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 5 12 -1.</_>\n        <_>\n          0 10 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 6 -1.</_>\n        <_>\n          14 6 7 3 2.</_>\n        <_>\n          7 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 3 19 -1.</_>\n        <_>\n          8 5 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 15 20 -1.</_>\n        <_>\n          13 4 5 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 15 20 -1.</_>\n        <_>\n          6 4 5 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 6 -1.</_>\n        <_>\n          13 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 6 -1.</_>\n        <_>\n          8 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 14 -1.</_>\n        <_>\n          17 2 3 7 2.</_>\n        <_>\n          14 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 14 -1.</_>\n        <_>\n          4 2 3 7 2.</_>\n        <_>\n          7 9 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 4 6 7 -1.</_>\n        <_>\n          12 4 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 9 -1.</_>\n        <_>\n          11 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 8 10 -1.</_>\n        <_>\n          11 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 8 10 -1.</_>\n        <_>\n          9 4 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 10 6 -1.</_>\n        <_>\n          8 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 21 6 -1.</_>\n        <_>\n          1 20 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 12 6 -1.</_>\n        <_>\n          9 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 12 6 -1.</_>\n        <_>\n          9 2 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 12 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_>\n        <_>\n          12 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 9 -1.</_>\n        <_>\n          8 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 20 6 -1.</_>\n        <_>\n          2 9 20 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 8 10 -1.</_>\n        <_>\n          18 14 4 5 2.</_>\n        <_>\n          14 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 8 10 -1.</_>\n        <_>\n          2 14 4 5 2.</_>\n        <_>\n          6 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 13 -1.</_>\n        <_>\n          2 11 10 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 5 -1.</_>\n        <_>\n          12 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 6 -1.</_>\n        <_>\n          13 6 8 3 2.</_>\n        <_>\n          5 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 9 4 -1.</_>\n        <_>\n          1 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 5 -1.</_>\n        <_>\n          11 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 14 12 -1.</_>\n        <_>\n          3 5 7 6 2.</_>\n        <_>\n          10 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 9 6 -1.</_>\n        <_>\n          12 4 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 19 3 -1.</_>\n        <_>\n          2 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 10 6 9 -1.</_>\n        <_>\n          18 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 2 -1.</_>\n        <_>\n          3 8 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 18 -1.</_>\n        <_>\n          22 2 2 9 2.</_>\n        <_>\n          20 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 20 3 -1.</_>\n        <_>\n          2 19 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 22 3 -1.</_>\n        <_>\n          1 10 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 18 -1.</_>\n        <_>\n          0 2 2 9 2.</_>\n        <_>\n          2 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 4 23 -1.</_>\n        <_>\n          19 0 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 19 -1.</_>\n        <_>\n          3 3 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          20 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 12 12 -1.</_>\n        <_>\n          13 0 6 6 2.</_>\n        <_>\n          7 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 6 -1.</_>\n        <_>\n          0 3 12 3 2.</_>\n        <_>\n          12 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 4 15 -1.</_>\n        <_>\n          8 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 17 6 -1.</_>\n        <_>\n          4 14 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 8 -1.</_>\n        <_>\n          2 5 9 4 2.</_>\n        <_>\n          11 9 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 6 -1.</_>\n        <_>\n          14 6 7 3 2.</_>\n        <_>\n          7 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 6 -1.</_>\n        <_>\n          3 6 7 3 2.</_>\n        <_>\n          10 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 3 18 -1.</_>\n        <_>\n          17 5 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 3 18 -1.</_>\n        <_>\n          6 5 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 14 4 -1.</_>\n        <_>\n          10 12 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 9 4 -1.</_>\n        <_>\n          4 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 18 9 -1.</_>\n        <_>\n          2 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 8 -1.</_>\n        <_>\n          10 3 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 5 -1.</_>\n        <_>\n          5 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 7 8 -1.</_>\n        <_>\n          12 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 14 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 15 -1.</_>\n        <_>\n          15 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 7 8 -1.</_>\n        <_>\n          5 11 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 4 -1.</_>\n        <_>\n          8 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 4 -1.</_>\n        <_>\n          1 4 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 17 -1.</_>\n        <_>\n          19 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 18 -1.</_>\n        <_>\n          8 11 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 12 -1.</_>\n        <_>\n          20 0 3 6 2.</_>\n        <_>\n          17 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 9 12 -1.</_>\n        <_>\n          15 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 22 18 2 -1.</_>\n        <_>\n          2 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 12 6 -1.</_>\n        <_>\n          16 10 6 3 2.</_>\n        <_>\n          10 13 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 11 -1.</_>\n        <_>\n          2 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 10 -1.</_>\n        <_>\n          20 0 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 17 -1.</_>\n        <_>\n          3 3 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 9 -1.</_>\n        <_>\n          0 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 6 12 -1.</_>\n        <_>\n          16 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 6 12 -1.</_>\n        <_>\n          2 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 19 3 -1.</_>\n        <_>\n          1 6 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 9 7 -1.</_>\n        <_>\n          14 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 12 9 -1.</_>\n        <_>\n          3 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 12 -1.</_>\n        <_>\n          10 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 14 -1.</_>\n        <_>\n          3 9 9 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 4 9 -1.</_>\n        <_>\n          2 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 4 18 -1.</_>\n        <_>\n          12 5 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 4 18 -1.</_>\n        <_>\n          10 5 2 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 10 -1.</_>\n        <_>\n          12 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 4 11 -1.</_>\n        <_>\n          11 4 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 18 3 -1.</_>\n        <_>\n          4 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 20 3 -1.</_>\n        <_>\n          0 17 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 8 8 -1.</_>\n        <_>\n          8 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 3 12 -1.</_>\n        <_>\n          13 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 14 -1.</_>\n        <_>\n          5 9 7 7 2.</_>\n        <_>\n          12 16 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 10 -1.</_>\n        <_>\n          12 0 12 5 2.</_>\n        <_>\n          0 5 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 18 2 -1.</_>\n        <_>\n          1 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 5 5 12 -1.</_>\n        <_>\n          19 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 12 -1.</_>\n        <_>\n          0 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 8 18 -1.</_>\n        <_>\n          20 6 4 9 2.</_>\n        <_>\n          16 15 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 8 18 -1.</_>\n        <_>\n          0 6 4 9 2.</_>\n        <_>\n          4 15 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 5 12 12 -1.</_>\n        <_>\n          18 5 6 6 2.</_>\n        <_>\n          12 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          9 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 12 12 -1.</_>\n        <_>\n          0 5 6 6 2.</_>\n        <_>\n          6 11 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 23 3 -1.</_>\n        <_>\n          1 3 23 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 19 3 -1.</_>\n        <_>\n          1 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 11 4 -1.</_>\n        <_>\n          13 19 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 5 -1.</_>\n        <_>\n          4 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 4 -1.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 9 -1.</_>\n        <_>\n          4 9 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 20 8 -1.</_>\n        <_>\n          13 10 10 4 2.</_>\n        <_>\n          3 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 18 -1.</_>\n        <_>\n          5 0 3 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 10 -1.</_>\n        <_>\n          16 11 3 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 5 -1.</_>\n        <_>\n          5 2 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 21 6 -1.</_>\n        <_>\n          10 4 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          7 0 5 7 2.</_>\n        <_>\n          12 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 12 4 -1.</_>\n        <_>\n          12 19 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 23 4 -1.</_>\n        <_>\n          0 8 23 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 8 10 -1.</_>\n        <_>\n          17 10 4 5 2.</_>\n        <_>\n          13 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 4 -1.</_>\n        <_>\n          15 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 4 -1.</_>\n        <_>\n          0 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 6 -1.</_>\n        <_>\n          12 3 12 3 2.</_>\n        <_>\n          0 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 18 3 -1.</_>\n        <_>\n          2 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          12 0 12 2 2.</_>\n        <_>\n          0 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 10 -1.</_>\n        <_>\n          10 8 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 8 -1.</_>\n        <_>\n          8 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 11 -1.</_>\n        <_>\n          8 5 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 8 9 -1.</_>\n        <_>\n          13 9 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 21 6 -1.</_>\n        <_>\n          1 9 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 5 3 12 -1.</_>\n        <_>\n          15 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 11 12 -1.</_>\n        <_>\n          6 13 11 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 10 8 -1.</_>\n        <_>\n          18 8 5 4 2.</_>\n        <_>\n          13 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          11 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 18 4 -1.</_>\n        <_>\n          12 11 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 22 -1.</_>\n        <_>\n          0 11 22 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 6 8 -1.</_>\n        <_>\n          11 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 6 14 -1.</_>\n        <_>\n          8 3 3 7 2.</_>\n        <_>\n          11 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 8 -1.</_>\n        <_>\n          9 10 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 3 14 -1.</_>\n        <_>\n          10 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 20 -1.</_>\n        <_>\n          4 13 16 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 10 -1.</_>\n        <_>\n          11 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 16 4 -1.</_>\n        <_>\n          5 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 4 -1.</_>\n        <_>\n          8 5 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 8 5 -1.</_>\n        <_>\n          12 4 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 4 -1.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 10 4 -1.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 12 5 -1.</_>\n        <_>\n          11 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 8 -1.</_>\n        <_>\n          14 12 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 24 3 -1.</_>\n        <_>\n          8 21 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          9 20 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 9 6 -1.</_>\n        <_>\n          1 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 10 4 -1.</_>\n        <_>\n          11 19 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 4 12 -1.</_>\n        <_>\n          9 18 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 9 6 -1.</_>\n        <_>\n          12 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 6 9 -1.</_>\n        <_>\n          1 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 12 4 -1.</_>\n        <_>\n          6 18 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 20 3 -1.</_>\n        <_>\n          1 6 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 9 -1.</_>\n        <_>\n          8 4 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 9 4 -1.</_>\n        <_>\n          2 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 18 -1.</_>\n        <_>\n          11 7 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 12 -1.</_>\n        <_>\n          7 2 4 6 2.</_>\n        <_>\n          11 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 9 8 -1.</_>\n        <_>\n          14 10 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 5 -1.</_>\n        <_>\n          9 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          14 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 9 -1.</_>\n        <_>\n          7 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 12 -1.</_>\n        <_>\n          4 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 6 -1.</_>\n        <_>\n          9 0 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 15 -1.</_>\n        <_>\n          11 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 2 -1.</_>\n        <_>\n          2 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 8 6 -1.</_>\n        <_>\n          8 20 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 6 -1.</_>\n        <_>\n          11 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 5 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          2 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 4 9 -1.</_>\n        <_>\n          20 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 9 -1.</_>\n        <_>\n          2 2 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 4 -1.</_>\n        <_>\n          12 1 12 2 2.</_>\n        <_>\n          0 3 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 19 3 -1.</_>\n        <_>\n          0 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 12 -1.</_>\n        <_>\n          12 5 11 6 2.</_>\n        <_>\n          1 11 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 6 6 -1.</_>\n        <_>\n          8 13 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 20 3 -1.</_>\n        <_>\n          4 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 10 -1.</_>\n        <_>\n          10 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 16 6 -1.</_>\n        <_>\n          14 12 8 3 2.</_>\n        <_>\n          6 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 8 9 -1.</_>\n        <_>\n          2 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 6 14 -1.</_>\n        <_>\n          14 8 3 7 2.</_>\n        <_>\n          11 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 16 6 -1.</_>\n        <_>\n          2 12 8 3 2.</_>\n        <_>\n          10 15 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 16 8 -1.</_>\n        <_>\n          5 20 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 12 -1.</_>\n        <_>\n          9 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 10 -1.</_>\n        <_>\n          12 2 4 5 2.</_>\n        <_>\n          8 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          6 6 6 3 2.</_>\n        <_>\n          12 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 9 -1.</_>\n        <_>\n          12 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 9 -1.</_>\n        <_>\n          18 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 6 -1.</_>\n        <_>\n          5 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 21 3 -1.</_>\n        <_>\n          10 21 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 16 6 -1.</_>\n        <_>\n          2 3 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 6 -1.</_>\n        <_>\n          13 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 14 -1.</_>\n        <_>\n          6 11 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 14 -1.</_>\n        <_>\n          7 8 3 7 2.</_>\n        <_>\n          10 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 4 16 -1.</_>\n        <_>\n          18 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 10 -1.</_>\n        <_>\n          11 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 23 3 -1.</_>\n        <_>\n          0 13 23 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 12 -1.</_>\n        <_>\n          15 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 12 5 -1.</_>\n        <_>\n          4 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 10 4 -1.</_>\n        <_>\n          13 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 12 -1.</_>\n        <_>\n          7 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 6 -1.</_>\n        <_>\n          14 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 6 -1.</_>\n        <_>\n          7 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 18 13 -1.</_>\n        <_>\n          12 11 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 18 13 -1.</_>\n        <_>\n          6 11 6 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 21 3 -1.</_>\n        <_>\n          0 7 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 12 6 -1.</_>\n        <_>\n          16 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 6 14 -1.</_>\n        <_>\n          5 14 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 19 2 -1.</_>\n        <_>\n          5 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 4 -1.</_>\n        <_>\n          5 6 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 4 -1.</_>\n        <_>\n          9 18 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 9 -1.</_>\n        <_>\n          9 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 11 4 -1.</_>\n        <_>\n          13 5 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 6 -1.</_>\n        <_>\n          5 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 4 23 -1.</_>\n        <_>\n          19 1 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 4 23 -1.</_>\n        <_>\n          3 1 2 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 18 3 -1.</_>\n        <_>\n          5 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 11 4 -1.</_>\n        <_>\n          0 5 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 20 3 -1.</_>\n        <_>\n          2 17 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 13 4 -1.</_>\n        <_>\n          5 5 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 22 15 -1.</_>\n        <_>\n          1 9 11 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 14 3 -1.</_>\n        <_>\n          10 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 4 -1.</_>\n        <_>\n          11 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 6 9 -1.</_>\n        <_>\n          12 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          4 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          12 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 6 -1.</_>\n        <_>\n          3 6 8 3 2.</_>\n        <_>\n          11 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 9 14 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 9 6 -1.</_>\n        <_>\n          4 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 18 2 -1.</_>\n        <_>\n          6 4 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          10 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 10 6 -1.</_>\n        <_>\n          0 19 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          3 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 6 16 -1.</_>\n        <_>\n          2 5 3 8 2.</_>\n        <_>\n          5 13 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 11 6 -1.</_>\n        <_>\n          7 8 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 22 -1.</_>\n        <_>\n          5 13 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 4 18 -1.</_>\n        <_>\n          9 6 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 9 -1.</_>\n        <_>\n          18 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 15 10 -1.</_>\n        <_>\n          9 7 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 9 -1.</_>\n        <_>\n          12 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 10 -1.</_>\n        <_>\n          11 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 10 -1.</_>\n        <_>\n          13 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 6 10 -1.</_>\n        <_>\n          9 14 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 16 9 -1.</_>\n        <_>\n          4 11 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 3 -1.</_>\n        <_>\n          2 12 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 13 -1.</_>\n        <_>\n          13 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 13 -1.</_>\n        <_>\n          9 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 7 -1.</_>\n        <_>\n          9 1 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 6 9 -1.</_>\n        <_>\n          1 14 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 6 -1.</_>\n        <_>\n          8 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 15 6 -1.</_>\n        <_>\n          3 11 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 19 2 -1.</_>\n        <_>\n          5 11 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 7 16 -1.</_>\n        <_>\n          8 14 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 6 -1.</_>\n        <_>\n          9 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 12 -1.</_>\n        <_>\n          0 11 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 3 -1.</_>\n        <_>\n          6 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 12 6 -1.</_>\n        <_>\n          4 16 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 9 4 -1.</_>\n        <_>\n          13 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 14 14 -1.</_>\n        <_>\n          5 8 7 7 2.</_>\n        <_>\n          12 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 22 6 -1.</_>\n        <_>\n          12 16 11 3 2.</_>\n        <_>\n          1 19 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 10 -1.</_>\n        <_>\n          14 5 5 5 2.</_>\n        <_>\n          9 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 10 10 -1.</_>\n        <_>\n          5 5 5 5 2.</_>\n        <_>\n          10 10 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 6 -1.</_>\n        <_>\n          12 6 8 3 2.</_>\n        <_>\n          4 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          0 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 10 8 14 -1.</_>\n        <_>\n          20 10 4 7 2.</_>\n        <_>\n          16 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 12 -1.</_>\n        <_>\n          12 10 4 6 2.</_>\n        <_>\n          8 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 16 -1.</_>\n        <_>\n          14 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 6 -1.</_>\n        <_>\n          7 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 14 -1.</_>\n        <_>\n          12 6 7 7 2.</_>\n        <_>\n          5 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 20 2 -1.</_>\n        <_>\n          2 12 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 4 16 -1.</_>\n        <_>\n          18 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 12 10 -1.</_>\n        <_>\n          1 11 6 5 2.</_>\n        <_>\n          7 16 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 7 -1.</_>\n        <_>\n          12 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 16 -1.</_>\n        <_>\n          14 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 16 -1.</_>\n        <_>\n          6 4 4 8 2.</_>\n        <_>\n          10 12 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 6 -1.</_>\n        <_>\n          11 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 16 12 -1.</_>\n        <_>\n          1 5 8 6 2.</_>\n        <_>\n          9 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 8 -1.</_>\n        <_>\n          9 9 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 9 5 14 -1.</_>\n        <_>\n          17 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 5 14 -1.</_>\n        <_>\n          2 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 10 6 -1.</_>\n        <_>\n          7 7 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 23 18 -1.</_>\n        <_>\n          1 9 23 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 21 3 -1.</_>\n        <_>\n          8 1 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 16 -1.</_>\n        <_>\n          20 8 4 8 2.</_>\n        <_>\n          16 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 24 4 -1.</_>\n        <_>\n          8 19 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 16 -1.</_>\n        <_>\n          20 8 4 8 2.</_>\n        <_>\n          16 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 16 -1.</_>\n        <_>\n          0 8 4 8 2.</_>\n        <_>\n          4 16 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 12 8 10 -1.</_>\n        <_>\n          8 17 8 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 5 8 -1.</_>\n        <_>\n          5 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 19 2 -1.</_>\n        <_>\n          4 2 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 9 -1.</_>\n        <_>\n          8 12 8 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 8 -1.</_>\n        <_>\n          6 4 13 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          0 1 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 3 4 11 -1.</_>\n        <_>\n          20 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 8 -1.</_>\n        <_>\n          12 11 6 4 2.</_>\n        <_>\n          6 15 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 3 4 9 -1.</_>\n        <_>\n          20 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 9 -1.</_>\n        <_>\n          2 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 19 -1.</_>\n        <_>\n          18 0 3 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 19 -1.</_>\n        <_>\n          3 0 3 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 8 -1.</_>\n        <_>\n          13 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 8 -1.</_>\n        <_>\n          8 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 19 3 -1.</_>\n        <_>\n          5 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          9 20 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 16 6 -1.</_>\n        <_>\n          6 8 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 9 6 -1.</_>\n        <_>\n          9 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 4 14 -1.</_>\n        <_>\n          10 10 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 15 12 -1.</_>\n        <_>\n          1 11 15 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 5 -1.</_>\n        <_>\n          11 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 8 -1.</_>\n        <_>\n          5 5 6 4 2.</_>\n        <_>\n          11 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 11 6 -1.</_>\n        <_>\n          13 14 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 21 3 -1.</_>\n        <_>\n          0 14 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 12 -1.</_>\n        <_>\n          12 1 4 6 2.</_>\n        <_>\n          8 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          1 0 3 6 2.</_>\n        <_>\n          4 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 21 2 -1.</_>\n        <_>\n          2 3 21 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 19 3 -1.</_>\n        <_>\n          2 3 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 10 6 14 -1.</_>\n        <_>\n          20 10 3 7 2.</_>\n        <_>\n          17 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 14 -1.</_>\n        <_>\n          1 10 3 7 2.</_>\n        <_>\n          4 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 14 14 -1.</_>\n        <_>\n          14 6 7 7 2.</_>\n        <_>\n          7 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 9 -1.</_>\n        <_>\n          15 17 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          1 1 11 2 2.</_>\n        <_>\n          12 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 6 -1.</_>\n        <_>\n          9 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          0 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 7 9 -1.</_>\n        <_>\n          16 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          12 3 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 10 -1.</_>\n        <_>\n          12 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 10 -1.</_>\n        <_>\n          10 1 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 6 9 -1.</_>\n        <_>\n          15 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 3 19 -1.</_>\n        <_>\n          16 1 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 9 -1.</_>\n        <_>\n          3 3 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 3 19 -1.</_>\n        <_>\n          16 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 4 -1.</_>\n        <_>\n          12 3 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          10 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 19 -1.</_>\n        <_>\n          7 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 3 12 -1.</_>\n        <_>\n          11 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 5 -1.</_>\n        <_>\n          11 7 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 18 -1.</_>\n        <_>\n          12 3 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 6 12 -1.</_>\n        <_>\n          11 3 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 19 3 -1.</_>\n        <_>\n          3 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 3 -1.</_>\n        <_>\n          2 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          12 13 9 2 2.</_>\n        <_>\n          3 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 6 9 -1.</_>\n        <_>\n          5 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 20 4 -1.</_>\n        <_>\n          14 1 10 2 2.</_>\n        <_>\n          4 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 20 4 -1.</_>\n        <_>\n          0 1 10 2 2.</_>\n        <_>\n          10 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 6 -1.</_>\n        <_>\n          10 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 8 -1.</_>\n        <_>\n          8 2 8 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 18 3 -1.</_>\n        <_>\n          5 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 6 -1.</_>\n        <_>\n          11 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 8 5 -1.</_>\n        <_>\n          11 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 8 5 -1.</_>\n        <_>\n          9 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 6 -1.</_>\n        <_>\n          5 2 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 5 12 -1.</_>\n        <_>\n          10 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 8 14 -1.</_>\n        <_>\n          7 9 4 7 2.</_>\n        <_>\n          11 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 22 6 -1.</_>\n        <_>\n          12 5 11 3 2.</_>\n        <_>\n          1 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 19 3 -1.</_>\n        <_>\n          2 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 3 -1.</_>\n        <_>\n          0 1 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 4 -1.</_>\n        <_>\n          5 2 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 6 -1.</_>\n        <_>\n          6 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 13 4 -1.</_>\n        <_>\n          5 22 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 12 -1.</_>\n        <_>\n          9 13 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 21 3 -1.</_>\n        <_>\n          8 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 9 6 -1.</_>\n        <_>\n          11 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 7 -1.</_>\n        <_>\n          6 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 8 -1.</_>\n        <_>\n          17 10 5 4 2.</_>\n        <_>\n          12 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 24 3 -1.</_>\n        <_>\n          8 15 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 6 -1.</_>\n        <_>\n          8 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 9 -1.</_>\n        <_>\n          4 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 6 -1.</_>\n        <_>\n          9 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 14 10 -1.</_>\n        <_>\n          16 9 7 5 2.</_>\n        <_>\n          9 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 14 10 -1.</_>\n        <_>\n          1 9 7 5 2.</_>\n        <_>\n          8 14 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 17 -1.</_>\n        <_>\n          11 7 3 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 20 -1.</_>\n        <_>\n          3 4 3 10 2.</_>\n        <_>\n          6 14 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 9 -1.</_>\n        <_>\n          12 7 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 6 16 -1.</_>\n        <_>\n          3 8 3 8 2.</_>\n        <_>\n          6 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 4 -1.</_>\n        <_>\n          12 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 9 4 -1.</_>\n        <_>\n          3 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 9 6 -1.</_>\n        <_>\n          13 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 4 10 -1.</_>\n        <_>\n          5 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 12 6 -1.</_>\n        <_>\n          11 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 9 8 -1.</_>\n        <_>\n          9 4 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          12 0 12 2 2.</_>\n        <_>\n          0 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          0 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 6 -1.</_>\n        <_>\n          12 4 12 3 2.</_>\n        <_>\n          0 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 11 4 -1.</_>\n        <_>\n          5 2 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          12 1 11 2 2.</_>\n        <_>\n          1 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 18 -1.</_>\n        <_>\n          9 15 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 20 4 -1.</_>\n        <_>\n          2 11 20 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 14 -1.</_>\n        <_>\n          5 9 14 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 16 6 -1.</_>\n        <_>\n          4 5 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 19 3 -1.</_>\n        <_>\n          2 4 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 4 -1.</_>\n        <_>\n          7 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 4 15 -1.</_>\n        <_>\n          0 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 21 3 -1.</_>\n        <_>\n          2 11 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 6 -1.</_>\n        <_>\n          6 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 14 9 -1.</_>\n        <_>\n          6 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 9 -1.</_>\n        <_>\n          11 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 9 -1.</_>\n        <_>\n          15 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 4 21 -1.</_>\n        <_>\n          8 7 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 19 2 -1.</_>\n        <_>\n          3 23 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 20 3 -1.</_>\n        <_>\n          2 16 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 4 13 -1.</_>\n        <_>\n          19 0 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 8 8 -1.</_>\n        <_>\n          1 11 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 6 9 -1.</_>\n        <_>\n          14 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 6 9 -1.</_>\n        <_>\n          4 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 4 10 -1.</_>\n        <_>\n          14 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 4 10 -1.</_>\n        <_>\n          8 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 6 -1.</_>\n        <_>\n          14 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 6 -1.</_>\n        <_>\n          4 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 21 -1.</_>\n        <_>\n          8 2 8 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 6 13 -1.</_>\n        <_>\n          3 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 0 4 21 -1.</_>\n        <_>\n          20 0 2 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 20 -1.</_>\n        <_>\n          2 4 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 6 -1.</_>\n        <_>\n          8 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 7 9 -1.</_>\n        <_>\n          16 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 14 3 -1.</_>\n        <_>\n          12 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          11 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 10 -1.</_>\n        <_>\n          12 5 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 9 -1.</_>\n        <_>\n          10 5 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 10 4 -1.</_>\n        <_>\n          14 16 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 14 -1.</_>\n        <_>\n          5 5 7 7 2.</_>\n        <_>\n          12 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 12 -1.</_>\n        <_>\n          6 6 6 6 2.</_>\n        <_>\n          12 12 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 6 10 -1.</_>\n        <_>\n          13 13 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 8 -1.</_>\n        <_>\n          1 10 10 4 2.</_>\n        <_>\n          11 14 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 9 6 -1.</_>\n        <_>\n          15 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          9 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 5 14 -1.</_>\n        <_>\n          10 8 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 16 6 -1.</_>\n        <_>\n          3 6 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 8 9 -1.</_>\n        <_>\n          16 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 6 10 -1.</_>\n        <_>\n          9 13 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 9 6 -1.</_>\n        <_>\n          15 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 9 6 -1.</_>\n        <_>\n          0 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 16 9 6 -1.</_>\n        <_>\n          13 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 9 6 -1.</_>\n        <_>\n          2 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 18 3 -1.</_>\n        <_>\n          5 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 18 3 -1.</_>\n        <_>\n          1 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 3 -1.</_>\n        <_>\n          5 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 19 2 -1.</_>\n        <_>\n          1 2 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 11 -1.</_>\n        <_>\n          16 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 15 6 -1.</_>\n        <_>\n          9 15 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 6 11 -1.</_>\n        <_>\n          16 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 6 11 -1.</_>\n        <_>\n          6 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 4 -1.</_>\n        <_>\n          1 2 11 2 2.</_>\n        <_>\n          12 4 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 12 -1.</_>\n        <_>\n          9 0 7 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 18 3 -1.</_>\n        <_>\n          0 13 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 9 -1.</_>\n        <_>\n          14 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 3 -1.</_>\n        <_>\n          3 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 3 8 9 -1.</_>\n        <_>\n          16 6 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 9 -1.</_>\n        <_>\n          11 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 9 -1.</_>\n        <_>\n          11 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 18 -1.</_>\n        <_>\n          15 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 18 -1.</_>\n        <_>\n          8 0 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 7 9 -1.</_>\n        <_>\n          17 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 9 6 -1.</_>\n        <_>\n          3 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 21 3 -1.</_>\n        <_>\n          3 19 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 7 9 -1.</_>\n        <_>\n          0 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 22 3 -1.</_>\n        <_>\n          2 8 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 16 -1.</_>\n        <_>\n          0 3 12 8 2.</_>\n        <_>\n          12 11 12 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 17 9 4 -1.</_>\n        <_>\n          13 19 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 12 8 -1.</_>\n        <_>\n          5 5 6 4 2.</_>\n        <_>\n          11 9 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 14 6 -1.</_>\n        <_>\n          5 16 7 3 2.</_>\n        <_>\n          12 19 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 20 10 -1.</_>\n        <_>\n          13 4 10 5 2.</_>\n        <_>\n          3 9 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 9 8 -1.</_>\n        <_>\n          5 13 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 15 -1.</_>\n        <_>\n          9 1 7 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 14 8 -1.</_>\n        <_>\n          12 12 7 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          6 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 6 -1.</_>\n        <_>\n          9 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 2 -1.</_>\n        <_>\n          6 5 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          2 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 15 -1.</_>\n        <_>\n          20 0 2 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 13 -1.</_>\n        <_>\n          2 0 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 18 4 -1.</_>\n        <_>\n          12 13 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 3 -1.</_>\n        <_>\n          11 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 19 3 -1.</_>\n        <_>\n          4 15 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 20 -1.</_>\n        <_>\n          10 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 9 6 -1.</_>\n        <_>\n          8 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 15 4 -1.</_>\n        <_>\n          7 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 12 7 -1.</_>\n        <_>\n          12 4 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 9 -1.</_>\n        <_>\n          0 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 16 6 -1.</_>\n        <_>\n          0 18 8 3 2.</_>\n        <_>\n          8 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 14 6 -1.</_>\n        <_>\n          16 18 7 3 2.</_>\n        <_>\n          9 21 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 20 4 -1.</_>\n        <_>\n          1 20 10 2 2.</_>\n        <_>\n          11 22 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          12 8 10 3 2.</_>\n        <_>\n          2 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 9 -1.</_>\n        <_>\n          9 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 12 8 -1.</_>\n        <_>\n          12 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 12 8 -1.</_>\n        <_>\n          8 5 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 16 -1.</_>\n        <_>\n          4 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 6 12 -1.</_>\n        <_>\n          15 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 12 -1.</_>\n        <_>\n          3 8 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 22 -1.</_>\n        <_>\n          4 11 15 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 9 6 -1.</_>\n        <_>\n          0 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 8 10 -1.</_>\n        <_>\n          14 0 4 5 2.</_>\n        <_>\n          10 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 4 16 -1.</_>\n        <_>\n          3 0 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 4 10 -1.</_>\n        <_>\n          10 17 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 10 6 -1.</_>\n        <_>\n          8 6 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 22 18 2 -1.</_>\n        <_>\n          12 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 11 6 -1.</_>\n        <_>\n          7 9 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 10 -1.</_>\n        <_>\n          0 0 6 5 2.</_>\n        <_>\n          6 5 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 12 6 -1.</_>\n        <_>\n          16 1 6 3 2.</_>\n        <_>\n          10 4 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 4 -1.</_>\n        <_>\n          7 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 15 16 -1.</_>\n        <_>\n          10 7 5 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 13 -1.</_>\n        <_>\n          11 10 6 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 6 -1.</_>\n        <_>\n          12 2 6 3 2.</_>\n        <_>\n          6 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 12 9 -1.</_>\n        <_>\n          3 12 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 8 6 -1.</_>\n        <_>\n          16 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 8 6 -1.</_>\n        <_>\n          0 5 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 11 -1.</_>\n        <_>\n          0 3 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 10 -1.</_>\n        <_>\n          0 13 4 5 2.</_>\n        <_>\n          4 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 21 -1.</_>\n        <_>\n          10 9 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 15 9 -1.</_>\n        <_>\n          4 7 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 6 -1.</_>\n        <_>\n          8 1 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 5 16 -1.</_>\n        <_>\n          9 14 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 3 12 -1.</_>\n        <_>\n          6 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 8 -1.</_>\n        <_>\n          8 6 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 20 2 -1.</_>\n        <_>\n          4 4 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 3 -1.</_>\n        <_>\n          8 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 10 6 -1.</_>\n        <_>\n          7 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 4 18 -1.</_>\n        <_>\n          1 4 2 9 2.</_>\n        <_>\n          3 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 9 6 -1.</_>\n        <_>\n          9 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 2 -1.</_>\n        <_>\n          3 1 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 20 4 -1.</_>\n        <_>\n          0 10 10 2 2.</_>\n        <_>\n          10 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 12 -1.</_>\n        <_>\n          10 8 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 6 12 -1.</_>\n        <_>\n          6 5 3 6 2.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 22 -1.</_>\n        <_>\n          15 0 9 11 2.</_>\n        <_>\n          6 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 22 -1.</_>\n        <_>\n          0 0 9 11 2.</_>\n        <_>\n          9 11 9 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 11 -1.</_>\n        <_>\n          20 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          2 2 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 20 3 -1.</_>\n        <_>\n          0 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 2 -1.</_>\n        <_>\n          2 3 20 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 7 6 9 -1.</_>\n        <_>\n          18 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 22 9 -1.</_>\n        <_>\n          0 3 22 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 9 -1.</_>\n        <_>\n          17 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 6 9 -1.</_>\n        <_>\n          0 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 6 -1.</_>\n        <_>\n          0 8 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 10 -1.</_>\n        <_>\n          2 2 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 9 -1.</_>\n        <_>\n          17 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 9 -1.</_>\n        <_>\n          5 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 23 6 -1.</_>\n        <_>\n          0 17 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 18 3 -1.</_>\n        <_>\n          5 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 15 6 -1.</_>\n        <_>\n          8 7 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 12 -1.</_>\n        <_>\n          8 0 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 6 9 -1.</_>\n        <_>\n          10 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 12 4 -1.</_>\n        <_>\n          11 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 10 -1.</_>\n        <_>\n          7 8 4 5 2.</_>\n        <_>\n          11 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 10 6 14 -1.</_>\n        <_>\n          14 10 3 7 2.</_>\n        <_>\n          11 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 19 -1.</_>\n        <_>\n          12 5 3 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 12 6 -1.</_>\n        <_>\n          12 12 6 3 2.</_>\n        <_>\n          6 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 6 -1.</_>\n        <_>\n          1 9 9 3 2.</_>\n        <_>\n          10 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 8 10 -1.</_>\n        <_>\n          20 14 4 5 2.</_>\n        <_>\n          16 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 22 8 -1.</_>\n        <_>\n          0 9 11 4 2.</_>\n        <_>\n          11 13 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 6 -1.</_>\n        <_>\n          14 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 18 -1.</_>\n        <_>\n          0 6 10 9 2.</_>\n        <_>\n          10 15 10 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 20 12 -1.</_>\n        <_>\n          13 6 10 6 2.</_>\n        <_>\n          3 12 10 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 8 -1.</_>\n        <_>\n          0 16 5 4 2.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 19 3 -1.</_>\n        <_>\n          0 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 22 4 -1.</_>\n        <_>\n          1 7 11 2 2.</_>\n        <_>\n          12 9 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 7 12 -1.</_>\n        <_>\n          13 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 11 9 -1.</_>\n        <_>\n          4 10 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 10 8 -1.</_>\n        <_>\n          17 10 5 4 2.</_>\n        <_>\n          12 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 7 -1.</_>\n        <_>\n          5 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 14 6 9 -1.</_>\n        <_>\n          16 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 6 12 -1.</_>\n        <_>\n          3 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 6 -1.</_>\n        <_>\n          14 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 23 -1.</_>\n        <_>\n          11 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 18 3 -1.</_>\n        <_>\n          4 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 14 -1.</_>\n        <_>\n          5 9 13 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 8 12 -1.</_>\n        <_>\n          19 0 4 6 2.</_>\n        <_>\n          15 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 12 -1.</_>\n        <_>\n          0 0 4 6 2.</_>\n        <_>\n          4 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 8 7 -1.</_>\n        <_>\n          8 2 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 9 -1.</_>\n        <_>\n          3 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 6 12 -1.</_>\n        <_>\n          17 8 3 6 2.</_>\n        <_>\n          14 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 12 -1.</_>\n        <_>\n          4 8 3 6 2.</_>\n        <_>\n          7 14 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 5 5 15 -1.</_>\n        <_>\n          16 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 5 15 -1.</_>\n        <_>\n          3 10 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 6 15 -1.</_>\n        <_>\n          1 12 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 15 12 8 -1.</_>\n        <_>\n          17 15 6 4 2.</_>\n        <_>\n          11 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          0 2 12 2 2.</_>\n        <_>\n          12 4 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 2 19 -1.</_>\n        <_>\n          15 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 2 19 -1.</_>\n        <_>\n          8 1 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          22 1 2 20 -1.</_>\n        <_>\n          22 1 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 2 20 -1.</_>\n        <_>\n          1 1 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 11 6 12 -1.</_>\n        <_>\n          20 11 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 6 12 -1.</_>\n        <_>\n          2 11 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 14 -1.</_>\n        <_>\n          3 13 18 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 7 8 -1.</_>\n        <_>\n          6 14 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 12 12 -1.</_>\n        <_>\n          7 13 12 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 5 -1.</_>\n        <_>\n          11 18 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 21 20 3 -1.</_>\n        <_>\n          4 22 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 12 3 6 2.</_>\n        <_>\n          12 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 18 3 -1.</_>\n        <_>\n          4 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 9 -1.</_>\n        <_>\n          18 7 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 9 6 -1.</_>\n        <_>\n          2 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 18 4 -1.</_>\n        <_>\n          13 14 9 2 2.</_>\n        <_>\n          4 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 14 -1.</_>\n        <_>\n          7 7 3 7 2.</_>\n        <_>\n          10 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 12 6 -1.</_>\n        <_>\n          13 13 6 3 2.</_>\n        <_>\n          7 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 9 -1.</_>\n        <_>\n          10 7 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 6 -1.</_>\n        <_>\n          12 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 4 10 -1.</_>\n        <_>\n          0 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 9 6 -1.</_>\n        <_>\n          11 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 12 6 -1.</_>\n        <_>\n          2 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 6 9 -1.</_>\n        <_>\n          13 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 6 9 -1.</_>\n        <_>\n          5 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 9 6 -1.</_>\n        <_>\n          9 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 16 12 6 -1.</_>\n        <_>\n          5 19 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 20 3 -1.</_>\n        <_>\n          3 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 12 6 -1.</_>\n        <_>\n          6 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 3 24 -1.</_>\n        <_>\n          12 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 15 4 -1.</_>\n        <_>\n          8 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 18 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 12 8 -1.</_>\n        <_>\n          1 15 6 4 2.</_>\n        <_>\n          7 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 8 14 -1.</_>\n        <_>\n          19 10 4 7 2.</_>\n        <_>\n          15 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 8 14 -1.</_>\n        <_>\n          1 9 4 7 2.</_>\n        <_>\n          5 16 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 9 10 -1.</_>\n        <_>\n          9 16 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 6 -1.</_>\n        <_>\n          6 9 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 7 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 4 8 10 -1.</_>\n        <_>\n          14 4 4 5 2.</_>\n        <_>\n          10 9 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 6 9 -1.</_>\n        <_>\n          4 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 12 -1.</_>\n        <_>\n          8 6 8 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 14 -1.</_>\n        <_>\n          6 7 3 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 5 8 -1.</_>\n        <_>\n          19 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 8 -1.</_>\n        <_>\n          0 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 6 6 -1.</_>\n        <_>\n          17 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 6 -1.</_>\n        <_>\n          1 6 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 9 -1.</_>\n        <_>\n          18 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 6 -1.</_>\n        <_>\n          3 5 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 9 6 -1.</_>\n        <_>\n          2 5 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 10 8 -1.</_>\n        <_>\n          14 3 5 4 2.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 10 8 -1.</_>\n        <_>\n          5 3 5 4 2.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 6 12 -1.</_>\n        <_>\n          10 11 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 6 11 -1.</_>\n        <_>\n          11 11 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 7 -1.</_>\n        <_>\n          12 6 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 3 -1.</_>\n        <_>\n          5 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 6 9 -1.</_>\n        <_>\n          10 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 7 -1.</_>\n        <_>\n          11 1 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 6 6 -1.</_>\n        <_>\n          9 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 4 11 -1.</_>\n        <_>\n          14 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 4 11 -1.</_>\n        <_>\n          8 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 12 18 -1.</_>\n        <_>\n          12 0 4 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 10 5 -1.</_>\n        <_>\n          7 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 20 22 3 -1.</_>\n        <_>\n          2 21 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 2 20 -1.</_>\n        <_>\n          1 4 1 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 4 -1.</_>\n        <_>\n          8 2 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 8 10 -1.</_>\n        <_>\n          6 7 4 5 2.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 14 -1.</_>\n        <_>\n          17 0 3 7 2.</_>\n        <_>\n          14 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 11 5 8 -1.</_>\n        <_>\n          4 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 9 -1.</_>\n        <_>\n          2 3 20 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 8 -1.</_>\n        <_>\n          6 7 6 4 2.</_>\n        <_>\n          12 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 6 6 -1.</_>\n        <_>\n          9 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 10 10 4 -1.</_>\n        <_>\n          7 12 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 9 -1.</_>\n        <_>\n          10 5 4 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 8 -1.</_>\n        <_>\n          8 11 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 17 -1.</_>\n        <_>\n          18 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 4 17 -1.</_>\n        <_>\n          18 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 4 17 -1.</_>\n        <_>\n          4 4 2 17 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 19 3 -1.</_>\n        <_>\n          5 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 2 18 -1.</_>\n        <_>\n          11 9 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 2 18 -1.</_>\n        <_>\n          15 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 2 18 -1.</_>\n        <_>\n          7 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 10 8 -1.</_>\n        <_>\n          12 11 5 4 2.</_>\n        <_>\n          7 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 16 8 -1.</_>\n        <_>\n          2 9 8 4 2.</_>\n        <_>\n          10 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 6 9 -1.</_>\n        <_>\n          10 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 12 6 -1.</_>\n        <_>\n          3 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 9 6 -1.</_>\n        <_>\n          14 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 22 6 -1.</_>\n        <_>\n          1 9 22 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 4 6 6 -1.</_>\n        <_>\n          18 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 6 6 -1.</_>\n        <_>\n          0 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 16 6 -1.</_>\n        <_>\n          5 14 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 9 4 -1.</_>\n        <_>\n          6 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 9 -1.</_>\n        <_>\n          4 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 23 -1.</_>\n        <_>\n          17 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 24 3 -1.</_>\n        <_>\n          8 21 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 24 4 -1.</_>\n        <_>\n          8 20 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 23 -1.</_>\n        <_>\n          5 1 2 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 22 4 -1.</_>\n        <_>\n          12 16 11 2 2.</_>\n        <_>\n          1 18 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 21 3 -1.</_>\n        <_>\n          9 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 6 -1.</_>\n        <_>\n          2 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 4 -1.</_>\n        <_>\n          0 7 24 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 6 12 -1.</_>\n        <_>\n          10 13 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 9 -1.</_>\n        <_>\n          8 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 6 9 -1.</_>\n        <_>\n          11 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 20 3 -1.</_>\n        <_>\n          2 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 4 13 -1.</_>\n        <_>\n          13 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          12 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 4 13 -1.</_>\n        <_>\n          10 1 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 3 18 -1.</_>\n        <_>\n          7 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 5 -1.</_>\n        <_>\n          14 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 12 8 -1.</_>\n        <_>\n          10 15 4 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 9 -1.</_>\n        <_>\n          11 10 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 9 -1.</_>\n        <_>\n          10 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 14 -1.</_>\n        <_>\n          20 0 3 7 2.</_>\n        <_>\n          17 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 14 -1.</_>\n        <_>\n          1 0 3 7 2.</_>\n        <_>\n          4 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 16 -1.</_>\n        <_>\n          17 0 3 8 2.</_>\n        <_>\n          14 8 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 4 10 -1.</_>\n        <_>\n          9 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 6 -1.</_>\n        <_>\n          12 17 9 3 2.</_>\n        <_>\n          3 20 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 22 4 -1.</_>\n        <_>\n          12 20 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 10 5 -1.</_>\n        <_>\n          14 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 10 5 -1.</_>\n        <_>\n          5 3 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 12 16 -1.</_>\n        <_>\n          16 6 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 12 16 -1.</_>\n        <_>\n          4 6 4 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 5 15 -1.</_>\n        <_>\n          10 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 21 2 -1.</_>\n        <_>\n          1 19 21 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 4 -1.</_>\n        <_>\n          12 1 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 12 -1.</_>\n        <_>\n          12 0 6 6 2.</_>\n        <_>\n          6 6 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 12 -1.</_>\n        <_>\n          8 10 4 6 2.</_>\n        <_>\n          12 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 10 8 -1.</_>\n        <_>\n          19 16 5 4 2.</_>\n        <_>\n          14 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 8 -1.</_>\n        <_>\n          0 16 5 4 2.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 12 5 -1.</_>\n        <_>\n          14 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 10 8 -1.</_>\n        <_>\n          6 16 5 4 2.</_>\n        <_>\n          11 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 6 -1.</_>\n        <_>\n          13 6 6 3 2.</_>\n        <_>\n          7 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 18 -1.</_>\n        <_>\n          9 6 2 9 2.</_>\n        <_>\n          11 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 6 14 -1.</_>\n        <_>\n          13 9 3 7 2.</_>\n        <_>\n          10 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 14 -1.</_>\n        <_>\n          8 9 3 7 2.</_>\n        <_>\n          11 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 11 12 -1.</_>\n        <_>\n          7 10 11 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 6 16 -1.</_>\n        <_>\n          4 8 3 8 2.</_>\n        <_>\n          7 16 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 3 4 21 -1.</_>\n        <_>\n          17 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 4 21 -1.</_>\n        <_>\n          3 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 8 18 -1.</_>\n        <_>\n          14 1 4 9 2.</_>\n        <_>\n          10 10 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 16 8 -1.</_>\n        <_>\n          2 5 8 4 2.</_>\n        <_>\n          10 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 12 -1.</_>\n        <_>\n          3 10 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 12 -1.</_>\n        <_>\n          4 14 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 8 20 -1.</_>\n        <_>\n          19 4 4 10 2.</_>\n        <_>\n          15 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 6 -1.</_>\n        <_>\n          10 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 4 8 20 -1.</_>\n        <_>\n          19 4 4 10 2.</_>\n        <_>\n          15 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 8 20 -1.</_>\n        <_>\n          1 4 4 10 2.</_>\n        <_>\n          5 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 8 8 14 -1.</_>\n        <_>\n          15 8 4 7 2.</_>\n        <_>\n          11 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 8 14 -1.</_>\n        <_>\n          5 8 4 7 2.</_>\n        <_>\n          9 15 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 5 8 -1.</_>\n        <_>\n          10 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 7 9 -1.</_>\n        <_>\n          4 16 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 10 -1.</_>\n        <_>\n          0 18 24 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 8 11 -1.</_>\n        <_>\n          8 2 4 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 8 16 -1.</_>\n        <_>\n          14 2 4 8 2.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 6 -1.</_>\n        <_>\n          0 2 12 3 2.</_>\n        <_>\n          12 5 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 9 -1.</_>\n        <_>\n          6 3 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 12 12 -1.</_>\n        <_>\n          1 2 6 6 2.</_>\n        <_>\n          7 8 6 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 8 10 -1.</_>\n        <_>\n          4 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 21 18 3 -1.</_>\n        <_>\n          6 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 12 9 -1.</_>\n        <_>\n          2 11 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 9 6 -1.</_>\n        <_>\n          7 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 7 12 -1.</_>\n        <_>\n          9 14 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 6 -1.</_>\n        <_>\n          7 13 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 18 4 -1.</_>\n        <_>\n          12 15 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 16 -1.</_>\n        <_>\n          7 4 2 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 12 10 -1.</_>\n        <_>\n          15 11 6 5 2.</_>\n        <_>\n          9 16 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 14 6 -1.</_>\n        <_>\n          3 8 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 17 8 -1.</_>\n        <_>\n          4 6 17 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 21 -1.</_>\n        <_>\n          6 9 12 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 9 9 -1.</_>\n        <_>\n          8 4 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 3 -1.</_>\n        <_>\n          12 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 9 10 -1.</_>\n        <_>\n          11 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 18 3 -1.</_>\n        <_>\n          2 12 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 16 9 4 -1.</_>\n        <_>\n          8 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 6 -1.</_>\n        <_>\n          0 13 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 9 20 6 -1.</_>\n        <_>\n          2 12 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 16 12 -1.</_>\n        <_>\n          12 5 8 6 2.</_>\n        <_>\n          4 11 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 10 4 -1.</_>\n        <_>\n          7 5 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 8 -1.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 7 10 -1.</_>\n        <_>\n          17 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 10 -1.</_>\n        <_>\n          0 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 6 12 -1.</_>\n        <_>\n          19 1 3 6 2.</_>\n        <_>\n          16 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 19 8 -1.</_>\n        <_>\n          1 4 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 9 4 -1.</_>\n        <_>\n          12 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 9 4 -1.</_>\n        <_>\n          3 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 10 6 -1.</_>\n        <_>\n          12 4 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 2 -1.</_>\n        <_>\n          12 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 4 9 -1.</_>\n        <_>\n          12 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 9 -1.</_>\n        <_>\n          10 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          14 5 4 5 2.</_>\n        <_>\n          10 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 13 -1.</_>\n        <_>\n          10 4 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 6 6 -1.</_>\n        <_>\n          13 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 3 -1.</_>\n        <_>\n          7 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 10 6 -1.</_>\n        <_>\n          7 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 5 -1.</_>\n        <_>\n          9 0 7 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 9 -1.</_>\n        <_>\n          0 11 9 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 7 -1.</_>\n        <_>\n          3 3 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          2 8 10 3 2.</_>\n        <_>\n          12 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 10 4 -1.</_>\n        <_>\n          13 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 5 18 -1.</_>\n        <_>\n          4 11 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 9 -1.</_>\n        <_>\n          20 4 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 14 -1.</_>\n        <_>\n          8 13 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 6 -1.</_>\n        <_>\n          12 1 12 3 2.</_>\n        <_>\n          0 4 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 9 -1.</_>\n        <_>\n          2 4 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 16 6 -1.</_>\n        <_>\n          3 19 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 6 9 -1.</_>\n        <_>\n          13 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          5 6 7 3 2.</_>\n        <_>\n          12 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 5 8 10 -1.</_>\n        <_>\n          17 5 4 5 2.</_>\n        <_>\n          13 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 3 -1.</_>\n        <_>\n          2 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 3 4 11 -1.</_>\n        <_>\n          12 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 11 -1.</_>\n        <_>\n          10 3 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          12 3 4 5 2.</_>\n        <_>\n          8 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 2 18 -1.</_>\n        <_>\n          12 1 1 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 9 6 -1.</_>\n        <_>\n          12 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 19 3 -1.</_>\n        <_>\n          0 3 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 6 -1.</_>\n        <_>\n          9 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 18 5 -1.</_>\n        <_>\n          7 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 6 4 15 -1.</_>\n        <_>\n          13 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 18 3 -1.</_>\n        <_>\n          1 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 14 6 -1.</_>\n        <_>\n          9 9 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 3 -1.</_>\n        <_>\n          2 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 12 6 -1.</_>\n        <_>\n          0 8 6 3 2.</_>\n        <_>\n          6 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 7 8 -1.</_>\n        <_>\n          9 17 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 20 3 -1.</_>\n        <_>\n          2 18 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 15 4 -1.</_>\n        <_>\n          4 2 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 2 6 6 -1.</_>\n        <_>\n          17 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          0 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 13 8 10 -1.</_>\n        <_>\n          20 13 4 5 2.</_>\n        <_>\n          16 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 4 -1.</_>\n        <_>\n          8 14 8 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 6 6 -1.</_>\n        <_>\n          13 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 8 10 -1.</_>\n        <_>\n          0 13 4 5 2.</_>\n        <_>\n          4 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 6 -1.</_>\n        <_>\n          0 17 24 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 8 -1.</_>\n        <_>\n          5 2 6 4 2.</_>\n        <_>\n          11 6 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 9 6 -1.</_>\n        <_>\n          11 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 4 -1.</_>\n        <_>\n          4 5 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 10 -1.</_>\n        <_>\n          10 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 4 5 8 -1.</_>\n        <_>\n          8 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 9 12 -1.</_>\n        <_>\n          11 9 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 9 12 -1.</_>\n        <_>\n          4 9 9 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 12 -1.</_>\n        <_>\n          2 8 20 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 17 16 -1.</_>\n        <_>\n          4 12 17 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 7 6 -1.</_>\n        <_>\n          8 10 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 23 2 -1.</_>\n        <_>\n          1 10 23 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 9 -1.</_>\n        <_>\n          13 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 6 13 -1.</_>\n        <_>\n          10 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 22 18 2 -1.</_>\n        <_>\n          4 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 6 -1.</_>\n        <_>\n          6 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 2 24 -1.</_>\n        <_>\n          14 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 2 24 -1.</_>\n        <_>\n          9 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 18 10 -1.</_>\n        <_>\n          9 2 6 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 15 6 -1.</_>\n        <_>\n          9 13 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 11 -1.</_>\n        <_>\n          11 1 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 10 4 -1.</_>\n        <_>\n          9 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 18 -1.</_>\n        <_>\n          12 0 5 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 6 16 -1.</_>\n        <_>\n          14 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 16 -1.</_>\n        <_>\n          8 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 2 -1.</_>\n        <_>\n          3 6 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 6 -1.</_>\n        <_>\n          18 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 6 -1.</_>\n        <_>\n          0 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 11 6 -1.</_>\n        <_>\n          13 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 10 4 -1.</_>\n        <_>\n          10 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 10 7 -1.</_>\n        <_>\n          11 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 10 7 -1.</_>\n        <_>\n          8 9 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 6 6 -1.</_>\n        <_>\n          16 4 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 6 5 4 2.</_>\n        <_>\n          10 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 21 16 3 -1.</_>\n        <_>\n          7 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 16 3 -1.</_>\n        <_>\n          9 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 14 -1.</_>\n        <_>\n          13 5 11 7 2.</_>\n        <_>\n          2 12 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 12 -1.</_>\n        <_>\n          20 0 3 6 2.</_>\n        <_>\n          17 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 6 18 -1.</_>\n        <_>\n          7 2 2 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 7 9 -1.</_>\n        <_>\n          0 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 8 10 -1.</_>\n        <_>\n          19 13 4 5 2.</_>\n        <_>\n          15 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 12 -1.</_>\n        <_>\n          1 0 3 6 2.</_>\n        <_>\n          4 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 8 10 -1.</_>\n        <_>\n          1 13 4 5 2.</_>\n        <_>\n          5 18 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 19 2 -1.</_>\n        <_>\n          3 22 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 4 13 -1.</_>\n        <_>\n          8 3 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 3 -1.</_>\n        <_>\n          5 11 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 12 -1.</_>\n        <_>\n          9 7 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 4 15 -1.</_>\n        <_>\n          11 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 4 -1.</_>\n        <_>\n          4 3 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 8 -1.</_>\n        <_>\n          5 1 5 4 2.</_>\n        <_>\n          10 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 18 12 6 -1.</_>\n        <_>\n          17 18 6 3 2.</_>\n        <_>\n          11 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 12 3 -1.</_>\n        <_>\n          11 15 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 4 -1.</_>\n        <_>\n          1 10 11 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 9 6 -1.</_>\n        <_>\n          10 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 7 -1.</_>\n        <_>\n          11 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 8 10 -1.</_>\n        <_>\n          11 2 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 8 10 -1.</_>\n        <_>\n          9 2 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 18 6 -1.</_>\n        <_>\n          15 4 9 3 2.</_>\n        <_>\n          6 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 9 -1.</_>\n        <_>\n          0 8 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 21 6 -1.</_>\n        <_>\n          2 9 21 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 22 16 -1.</_>\n        <_>\n          0 4 11 8 2.</_>\n        <_>\n          11 12 11 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 22 -1.</_>\n        <_>\n          9 11 6 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 12 -1.</_>\n        <_>\n          9 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 18 -1.</_>\n        <_>\n          18 0 6 9 2.</_>\n        <_>\n          12 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 18 -1.</_>\n        <_>\n          0 0 6 9 2.</_>\n        <_>\n          6 9 6 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 22 4 -1.</_>\n        <_>\n          12 1 11 2 2.</_>\n        <_>\n          1 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 4 -1.</_>\n        <_>\n          3 2 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 6 -1.</_>\n        <_>\n          2 7 22 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          5 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 6 9 -1.</_>\n        <_>\n          12 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 9 -1.</_>\n        <_>\n          10 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 3 -1.</_>\n        <_>\n          5 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 13 -1.</_>\n        <_>\n          9 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 4 12 4 -1.</_>\n        <_>\n          7 4 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 12 6 -1.</_>\n        <_>\n          9 2 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 18 3 -1.</_>\n        <_>\n          4 2 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 12 -1.</_>\n        <_>\n          0 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 13 -1.</_>\n        <_>\n          11 10 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 2 -1.</_>\n        <_>\n          6 18 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 6 9 -1.</_>\n        <_>\n          11 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 10 8 -1.</_>\n        <_>\n          5 6 5 4 2.</_>\n        <_>\n          10 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 5 8 -1.</_>\n        <_>\n          14 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 5 8 -1.</_>\n        <_>\n          5 13 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 11 9 6 -1.</_>\n        <_>\n          14 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 23 15 -1.</_>\n        <_>\n          0 7 23 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 12 -1.</_>\n        <_>\n          16 6 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 15 6 9 -1.</_>\n        <_>\n          4 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 9 4 -1.</_>\n        <_>\n          8 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 11 6 -1.</_>\n        <_>\n          13 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 11 6 -1.</_>\n        <_>\n          0 13 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 6 -1.</_>\n        <_>\n          12 9 12 3 2.</_>\n        <_>\n          0 12 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 8 8 -1.</_>\n        <_>\n          6 20 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 14 6 -1.</_>\n        <_>\n          10 18 14 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 21 3 -1.</_>\n        <_>\n          1 2 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 2 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 8 5 -1.</_>\n        <_>\n          6 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 21 3 -1.</_>\n        <_>\n          9 11 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 4 10 -1.</_>\n        <_>\n          7 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 12 -1.</_>\n        <_>\n          9 12 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 9 6 -1.</_>\n        <_>\n          10 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 19 2 -1.</_>\n        <_>\n          3 15 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 10 -1.</_>\n        <_>\n          7 7 5 5 2.</_>\n        <_>\n          12 12 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 12 -1.</_>\n        <_>\n          3 12 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 12 -1.</_>\n        <_>\n          10 0 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 17 9 -1.</_>\n        <_>\n          3 3 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 11 -1.</_>\n        <_>\n          10 0 4 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 6 13 -1.</_>\n        <_>\n          4 0 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 16 6 -1.</_>\n        <_>\n          5 11 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 5 12 -1.</_>\n        <_>\n          8 14 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          9 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 3 -1.</_>\n        <_>\n          2 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 15 10 -1.</_>\n        <_>\n          9 6 5 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 6 -1.</_>\n        <_>\n          7 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 16 -1.</_>\n        <_>\n          19 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 16 -1.</_>\n        <_>\n          3 1 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 9 -1.</_>\n        <_>\n          0 3 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          9 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 6 -1.</_>\n        <_>\n          6 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 3 16 -1.</_>\n        <_>\n          14 15 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 14 12 -1.</_>\n        <_>\n          4 10 7 6 2.</_>\n        <_>\n          11 16 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 6 -1.</_>\n        <_>\n          7 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 4 20 -1.</_>\n        <_>\n          9 2 2 20 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 6 9 -1.</_>\n        <_>\n          14 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 14 4 -1.</_>\n        <_>\n          5 22 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 12 -1.</_>\n        <_>\n          4 10 16 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 21 4 -1.</_>\n        <_>\n          3 2 21 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 9 -1.</_>\n        <_>\n          4 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 5 8 -1.</_>\n        <_>\n          16 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 16 -1.</_>\n        <_>\n          4 0 8 8 2.</_>\n        <_>\n          12 8 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 15 -1.</_>\n        <_>\n          10 10 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 12 8 -1.</_>\n        <_>\n          15 15 6 4 2.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 4 -1.</_>\n        <_>\n          12 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 10 -1.</_>\n        <_>\n          3 6 9 5 2.</_>\n        <_>\n          12 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 21 -1.</_>\n        <_>\n          12 0 6 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 21 -1.</_>\n        <_>\n          8 0 8 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 19 2 -1.</_>\n        <_>\n          4 4 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 2 -1.</_>\n        <_>\n          0 4 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 4 -1.</_>\n        <_>\n          15 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 4 -1.</_>\n        <_>\n          0 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 15 18 2 -1.</_>\n        <_>\n          6 16 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 3 23 -1.</_>\n        <_>\n          13 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 8 6 -1.</_>\n        <_>\n          6 3 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 3 23 -1.</_>\n        <_>\n          10 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 10 -1.</_>\n        <_>\n          10 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 12 -1.</_>\n        <_>\n          7 12 10 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 14 -1.</_>\n        <_>\n          17 9 3 7 2.</_>\n        <_>\n          14 16 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 10 9 -1.</_>\n        <_>\n          2 3 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 5 12 -1.</_>\n        <_>\n          11 7 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 12 10 -1.</_>\n        <_>\n          1 4 6 5 2.</_>\n        <_>\n          7 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 9 4 -1.</_>\n        <_>\n          15 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 8 10 -1.</_>\n        <_>\n          1 2 4 5 2.</_>\n        <_>\n          5 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 5 12 -1.</_>\n        <_>\n          10 5 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 14 24 -1.</_>\n        <_>\n          11 0 7 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 17 10 4 -1.</_>\n        <_>\n          7 19 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 9 -1.</_>\n        <_>\n          15 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 6 9 -1.</_>\n        <_>\n          15 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 6 9 -1.</_>\n        <_>\n          7 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 6 11 -1.</_>\n        <_>\n          9 3 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 9 4 -1.</_>\n        <_>\n          15 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 14 8 -1.</_>\n        <_>\n          5 8 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 15 9 -1.</_>\n        <_>\n          8 4 15 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 8 10 -1.</_>\n        <_>\n          7 2 4 5 2.</_>\n        <_>\n          11 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 6 12 -1.</_>\n        <_>\n          12 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 12 -1.</_>\n        <_>\n          9 2 3 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 4 -1.</_>\n        <_>\n          7 7 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 12 10 -1.</_>\n        <_>\n          10 3 4 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 16 6 -1.</_>\n        <_>\n          13 6 8 3 2.</_>\n        <_>\n          5 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 9 -1.</_>\n        <_>\n          9 1 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 5 -1.</_>\n        <_>\n          9 8 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 22 -1.</_>\n        <_>\n          0 0 12 11 2.</_>\n        <_>\n          12 11 12 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 9 6 -1.</_>\n        <_>\n          14 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 8 -1.</_>\n        <_>\n          0 20 24 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 22 4 -1.</_>\n        <_>\n          12 19 11 2 2.</_>\n        <_>\n          1 21 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 9 6 -1.</_>\n        <_>\n          1 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 9 -1.</_>\n        <_>\n          11 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 12 6 -1.</_>\n        <_>\n          16 18 6 3 2.</_>\n        <_>\n          10 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 12 6 -1.</_>\n        <_>\n          2 18 6 3 2.</_>\n        <_>\n          8 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 16 9 -1.</_>\n        <_>\n          8 6 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 18 3 -1.</_>\n        <_>\n          5 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 9 6 -1.</_>\n        <_>\n          2 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 10 9 -1.</_>\n        <_>\n          14 5 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 3 -1.</_>\n        <_>\n          3 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 15 6 -1.</_>\n        <_>\n          9 4 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 8 15 6 -1.</_>\n        <_>\n          4 10 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 4 -1.</_>\n        <_>\n          12 5 12 2 2.</_>\n        <_>\n          0 7 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 12 -1.</_>\n        <_>\n          9 8 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          0 12 3 6 2.</_>\n        <_>\n          3 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 9 -1.</_>\n        <_>\n          2 10 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 10 9 -1.</_>\n        <_>\n          11 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 8 -1.</_>\n        <_>\n          7 6 5 4 2.</_>\n        <_>\n          12 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 9 7 -1.</_>\n        <_>\n          7 13 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 10 6 12 -1.</_>\n        <_>\n          17 10 3 6 2.</_>\n        <_>\n          14 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 6 12 -1.</_>\n        <_>\n          4 10 3 6 2.</_>\n        <_>\n          7 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 6 -1.</_>\n        <_>\n          13 9 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 4 14 -1.</_>\n        <_>\n          10 3 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 3 18 -1.</_>\n        <_>\n          18 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 12 -1.</_>\n        <_>\n          12 12 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 14 -1.</_>\n        <_>\n          17 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 14 -1.</_>\n        <_>\n          5 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 12 20 -1.</_>\n        <_>\n          16 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 20 -1.</_>\n        <_>\n          4 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 6 17 -1.</_>\n        <_>\n          18 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 17 -1.</_>\n        <_>\n          4 0 2 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 9 6 -1.</_>\n        <_>\n          15 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          0 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 13 -1.</_>\n        <_>\n          20 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 13 -1.</_>\n        <_>\n          2 1 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 4 9 -1.</_>\n        <_>\n          16 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 12 7 -1.</_>\n        <_>\n          9 10 4 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 12 6 -1.</_>\n        <_>\n          12 11 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 11 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 14 9 -1.</_>\n        <_>\n          5 10 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 20 3 -1.</_>\n        <_>\n          0 16 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 8 10 -1.</_>\n        <_>\n          12 10 4 5 2.</_>\n        <_>\n          8 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 13 9 -1.</_>\n        <_>\n          5 7 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 6 18 -1.</_>\n        <_>\n          10 8 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 4 -1.</_>\n        <_>\n          6 11 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 12 -1.</_>\n        <_>\n          3 6 15 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 12 5 -1.</_>\n        <_>\n          16 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          6 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 24 5 -1.</_>\n        <_>\n          8 14 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 3 18 -1.</_>\n        <_>\n          6 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 14 -1.</_>\n        <_>\n          10 0 2 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 4 9 -1.</_>\n        <_>\n          11 3 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 12 6 -1.</_>\n        <_>\n          14 2 6 3 2.</_>\n        <_>\n          8 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 17 4 -1.</_>\n        <_>\n          0 6 17 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 16 5 8 -1.</_>\n        <_>\n          16 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 5 8 -1.</_>\n        <_>\n          3 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 12 5 -1.</_>\n        <_>\n          4 0 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 3 6 12 -1.</_>\n        <_>\n          17 3 3 6 2.</_>\n        <_>\n          14 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          2 12 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 21 3 -1.</_>\n        <_>\n          2 4 21 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 6 12 -1.</_>\n        <_>\n          4 3 3 6 2.</_>\n        <_>\n          7 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 12 6 -1.</_>\n        <_>\n          18 8 6 3 2.</_>\n        <_>\n          12 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 16 9 -1.</_>\n        <_>\n          8 15 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 13 18 5 -1.</_>\n        <_>\n          6 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 15 6 -1.</_>\n        <_>\n          6 6 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 9 6 -1.</_>\n        <_>\n          14 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 15 11 -1.</_>\n        <_>\n          8 0 5 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 3 3 18 -1.</_>\n        <_>\n          15 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 3 18 -1.</_>\n        <_>\n          6 9 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 10 8 -1.</_>\n        <_>\n          14 5 5 4 2.</_>\n        <_>\n          9 9 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 8 -1.</_>\n        <_>\n          4 4 8 4 2.</_>\n        <_>\n          12 8 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 9 13 -1.</_>\n        <_>\n          8 0 3 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 10 9 -1.</_>\n        <_>\n          8 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 18 2 -1.</_>\n        <_>\n          0 3 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 14 6 -1.</_>\n        <_>\n          17 13 7 3 2.</_>\n        <_>\n          10 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 14 6 -1.</_>\n        <_>\n          0 13 7 3 2.</_>\n        <_>\n          7 16 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 3 21 -1.</_>\n        <_>\n          21 2 1 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 5 12 -1.</_>\n        <_>\n          0 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 12 6 -1.</_>\n        <_>\n          12 8 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 20 3 -1.</_>\n        <_>\n          1 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 19 3 -1.</_>\n        <_>\n          5 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 9 6 -1.</_>\n        <_>\n          1 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 14 12 -1.</_>\n        <_>\n          6 14 14 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 18 -1.</_>\n        <_>\n          5 12 14 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 7 -1.</_>\n        <_>\n          14 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 18 4 -1.</_>\n        <_>\n          1 17 18 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 6 9 -1.</_>\n        <_>\n          11 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 4 -1.</_>\n        <_>\n          0 8 9 2 2.</_>\n        <_>\n          9 10 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 20 6 -1.</_>\n        <_>\n          13 10 10 3 2.</_>\n        <_>\n          3 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 20 6 -1.</_>\n        <_>\n          1 10 10 3 2.</_>\n        <_>\n          11 13 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 2 -1.</_>\n        <_>\n          0 9 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 20 8 -1.</_>\n        <_>\n          1 12 10 4 2.</_>\n        <_>\n          11 16 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 9 7 -1.</_>\n        <_>\n          14 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 7 -1.</_>\n        <_>\n          7 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 8 5 -1.</_>\n        <_>\n          12 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 8 5 -1.</_>\n        <_>\n          8 12 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 4 10 -1.</_>\n        <_>\n          13 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 20 2 -1.</_>\n        <_>\n          11 15 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 6 -1.</_>\n        <_>\n          9 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 21 3 -1.</_>\n        <_>\n          7 1 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 13 9 -1.</_>\n        <_>\n          6 7 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 5 -1.</_>\n        <_>\n          10 5 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 10 6 -1.</_>\n        <_>\n          10 12 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 5 8 -1.</_>\n        <_>\n          6 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 10 18 6 -1.</_>\n        <_>\n          8 10 6 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 9 4 -1.</_>\n        <_>\n          11 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 21 3 -1.</_>\n        <_>\n          8 20 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 2 -1.</_>\n        <_>\n          1 11 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 9 -1.</_>\n        <_>\n          15 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 20 -1.</_>\n        <_>\n          20 2 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 20 -1.</_>\n        <_>\n          2 2 2 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 7 6 14 -1.</_>\n        <_>\n          14 7 3 7 2.</_>\n        <_>\n          11 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 4 9 -1.</_>\n        <_>\n          2 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 9 4 -1.</_>\n        <_>\n          12 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 4 -1.</_>\n        <_>\n          1 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 15 6 -1.</_>\n        <_>\n          7 8 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 3 18 -1.</_>\n        <_>\n          8 8 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 6 -1.</_>\n        <_>\n          12 6 6 3 2.</_>\n        <_>\n          6 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 19 20 4 -1.</_>\n        <_>\n          2 19 10 2 2.</_>\n        <_>\n          12 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 6 9 -1.</_>\n        <_>\n          14 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 14 -1.</_>\n        <_>\n          3 5 9 7 2.</_>\n        <_>\n          12 12 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 18 -1.</_>\n        <_>\n          17 6 2 9 2.</_>\n        <_>\n          15 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 4 18 -1.</_>\n        <_>\n          5 6 2 9 2.</_>\n        <_>\n          7 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 6 9 -1.</_>\n        <_>\n          13 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 9 -1.</_>\n        <_>\n          13 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 6 -1.</_>\n        <_>\n          12 1 8 3 2.</_>\n        <_>\n          4 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 6 12 -1.</_>\n        <_>\n          20 1 3 6 2.</_>\n        <_>\n          17 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 18 3 -1.</_>\n        <_>\n          1 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 10 8 -1.</_>\n        <_>\n          7 17 10 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 10 6 -1.</_>\n        <_>\n          6 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 9 4 -1.</_>\n        <_>\n          9 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 6 12 -1.</_>\n        <_>\n          1 1 3 6 2.</_>\n        <_>\n          4 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 5 12 -1.</_>\n        <_>\n          19 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 8 -1.</_>\n        <_>\n          4 0 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 19 3 -1.</_>\n        <_>\n          3 6 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 12 6 -1.</_>\n        <_>\n          1 5 6 3 2.</_>\n        <_>\n          7 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 8 -1.</_>\n        <_>\n          9 1 7 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 8 -1.</_>\n        <_>\n          4 5 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 14 -1.</_>\n        <_>\n          4 11 10 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 4 10 -1.</_>\n        <_>\n          15 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 18 3 -1.</_>\n        <_>\n          9 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 12 6 -1.</_>\n        <_>\n          12 18 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          6 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 6 8 -1.</_>\n        <_>\n          15 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 6 8 -1.</_>\n        <_>\n          3 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 18 6 -1.</_>\n        <_>\n          14 9 9 3 2.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 12 6 -1.</_>\n        <_>\n          1 15 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 10 6 -1.</_>\n        <_>\n          14 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 6 -1.</_>\n        <_>\n          0 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 13 6 9 -1.</_>\n        <_>\n          15 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 6 9 -1.</_>\n        <_>\n          3 16 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 8 8 -1.</_>\n        <_>\n          9 5 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 18 12 6 -1.</_>\n        <_>\n          1 18 6 3 2.</_>\n        <_>\n          7 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 19 10 4 -1.</_>\n        <_>\n          13 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 19 10 4 -1.</_>\n        <_>\n          1 21 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 18 3 -1.</_>\n        <_>\n          6 20 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 4 10 -1.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 6 -1.</_>\n        <_>\n          0 2 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          0 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 20 6 -1.</_>\n        <_>\n          14 9 10 3 2.</_>\n        <_>\n          4 12 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 15 19 8 -1.</_>\n        <_>\n          1 19 19 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 6 -1.</_>\n        <_>\n          14 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 21 14 -1.</_>\n        <_>\n          8 10 7 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 10 8 8 -1.</_>\n        <_>\n          10 10 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 10 4 -1.</_>\n        <_>\n          11 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          10 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 4 13 -1.</_>\n        <_>\n          14 4 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 4 13 -1.</_>\n        <_>\n          8 4 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 6 -1.</_>\n        <_>\n          11 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 16 6 -1.</_>\n        <_>\n          3 6 8 3 2.</_>\n        <_>\n          11 9 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 16 14 -1.</_>\n        <_>\n          13 4 8 7 2.</_>\n        <_>\n          5 11 8 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 4 -1.</_>\n        <_>\n          0 0 12 2 2.</_>\n        <_>\n          12 2 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 14 4 -1.</_>\n        <_>\n          11 1 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 7 9 -1.</_>\n        <_>\n          10 17 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 3 8 10 -1.</_>\n        <_>\n          8 3 4 5 2.</_>\n        <_>\n          12 8 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 4 13 -1.</_>\n        <_>\n          10 2 2 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 19 -1.</_>\n        <_>\n          12 2 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          10 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 22 20 2 -1.</_>\n        <_>\n          4 22 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 4 -1.</_>\n        <_>\n          0 16 12 2 2.</_>\n        <_>\n          12 18 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 8 14 -1.</_>\n        <_>\n          1 10 4 7 2.</_>\n        <_>\n          5 17 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 6 -1.</_>\n        <_>\n          11 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 10 24 -1.</_>\n        <_>\n          6 0 5 12 2.</_>\n        <_>\n          11 12 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 14 14 -1.</_>\n        <_>\n          14 5 7 7 2.</_>\n        <_>\n          7 12 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 8 -1.</_>\n        <_>\n          7 8 5 4 2.</_>\n        <_>\n          12 12 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          12 6 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 12 5 -1.</_>\n        <_>\n          11 3 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 22 4 -1.</_>\n        <_>\n          1 13 11 2 2.</_>\n        <_>\n          12 15 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 12 6 -1.</_>\n        <_>\n          9 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 9 6 -1.</_>\n        <_>\n          0 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 23 6 -1.</_>\n        <_>\n          1 7 23 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 12 -1.</_>\n        <_>\n          1 10 19 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 21 -1.</_>\n        <_>\n          9 8 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 19 18 3 -1.</_>\n        <_>\n          9 19 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 14 6 9 -1.</_>\n        <_>\n          11 14 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 4 12 -1.</_>\n        <_>\n          11 6 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 6 9 -1.</_>\n        <_>\n          18 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 9 -1.</_>\n        <_>\n          4 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 22 -1.</_>\n        <_>\n          15 1 2 11 2.</_>\n        <_>\n          13 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 8 12 -1.</_>\n        <_>\n          1 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 7 7 9 -1.</_>\n        <_>\n          14 10 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 18 4 -1.</_>\n        <_>\n          3 12 9 2 2.</_>\n        <_>\n          12 14 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 4 22 -1.</_>\n        <_>\n          15 1 2 11 2.</_>\n        <_>\n          13 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 4 22 -1.</_>\n        <_>\n          7 1 2 11 2.</_>\n        <_>\n          9 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 20 4 -1.</_>\n        <_>\n          14 7 10 2 2.</_>\n        <_>\n          4 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 7 -1.</_>\n        <_>\n          12 10 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 4 -1.</_>\n        <_>\n          7 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 4 15 -1.</_>\n        <_>\n          0 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 8 12 -1.</_>\n        <_>\n          19 0 4 6 2.</_>\n        <_>\n          15 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 8 12 -1.</_>\n        <_>\n          1 0 4 6 2.</_>\n        <_>\n          5 6 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 16 -1.</_>\n        <_>\n          16 5 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 6 16 -1.</_>\n        <_>\n          6 5 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 16 -1.</_>\n        <_>\n          17 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 16 -1.</_>\n        <_>\n          5 0 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 24 3 -1.</_>\n        <_>\n          0 3 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 10 4 -1.</_>\n        <_>\n          7 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 23 8 -1.</_>\n        <_>\n          1 4 23 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 19 3 -1.</_>\n        <_>\n          1 18 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 2 -1.</_>\n        <_>\n          6 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 17 9 6 -1.</_>\n        <_>\n          1 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 6 9 -1.</_>\n        <_>\n          15 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 6 9 -1.</_>\n        <_>\n          3 18 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 20 6 -1.</_>\n        <_>\n          4 17 20 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 6 14 -1.</_>\n        <_>\n          0 10 3 7 2.</_>\n        <_>\n          3 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 7 -1.</_>\n        <_>\n          7 12 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 18 5 -1.</_>\n        <_>\n          12 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 18 5 -1.</_>\n        <_>\n          6 10 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 18 9 -1.</_>\n        <_>\n          9 2 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 10 10 -1.</_>\n        <_>\n          4 6 5 5 2.</_>\n        <_>\n          9 11 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 14 4 9 -1.</_>\n        <_>\n          20 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 4 9 -1.</_>\n        <_>\n          2 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 21 12 3 -1.</_>\n        <_>\n          12 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 16 10 8 -1.</_>\n        <_>\n          1 16 5 4 2.</_>\n        <_>\n          6 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 3 19 -1.</_>\n        <_>\n          2 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 9 -1.</_>\n        <_>\n          2 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 19 4 -1.</_>\n        <_>\n          3 9 19 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 9 6 -1.</_>\n        <_>\n          7 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 1 7 6 -1.</_>\n        <_>\n          17 4 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 14 8 -1.</_>\n        <_>\n          5 4 14 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 8 6 -1.</_>\n        <_>\n          16 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 6 -1.</_>\n        <_>\n          0 4 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 4 -1.</_>\n        <_>\n          15 0 9 2 2.</_>\n        <_>\n          6 2 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 8 -1.</_>\n        <_>\n          9 7 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 6 9 -1.</_>\n        <_>\n          4 11 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 6 9 -1.</_>\n        <_>\n          12 5 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 1 4 20 -1.</_>\n        <_>\n          13 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 20 -1.</_>\n        <_>\n          9 1 2 10 2.</_>\n        <_>\n          11 11 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 18 6 -1.</_>\n        <_>\n          14 9 9 3 2.</_>\n        <_>\n          5 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 6 9 -1.</_>\n        <_>\n          8 4 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 8 6 -1.</_>\n        <_>\n          10 16 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 8 -1.</_>\n        <_>\n          0 0 9 4 2.</_>\n        <_>\n          9 4 9 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 14 12 -1.</_>\n        <_>\n          13 5 7 6 2.</_>\n        <_>\n          6 11 7 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 15 7 -1.</_>\n        <_>\n          9 3 5 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 4 10 -1.</_>\n        <_>\n          0 16 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 22 3 -1.</_>\n        <_>\n          1 11 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 6 10 -1.</_>\n        <_>\n          10 9 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 2 6 12 -1.</_>\n        <_>\n          16 2 3 6 2.</_>\n        <_>\n          13 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 16 -1.</_>\n        <_>\n          12 8 5 8 2.</_>\n        <_>\n          7 16 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 12 -1.</_>\n        <_>\n          8 1 4 6 2.</_>\n        <_>\n          12 7 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 12 14 -1.</_>\n        <_>\n          13 1 6 7 2.</_>\n        <_>\n          7 8 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 12 6 -1.</_>\n        <_>\n          2 16 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 16 6 6 -1.</_>\n        <_>\n          11 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 6 6 -1.</_>\n        <_>\n          7 19 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 4 10 -1.</_>\n        <_>\n          13 4 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 19 3 -1.</_>\n        <_>\n          0 20 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 8 22 -1.</_>\n        <_>\n          8 12 8 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 6 8 -1.</_>\n        <_>\n          6 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 6 9 -1.</_>\n        <_>\n          14 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 4 -1.</_>\n        <_>\n          0 8 24 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 10 6 -1.</_>\n        <_>\n          14 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 10 6 -1.</_>\n        <_>\n          0 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 19 3 -1.</_>\n        <_>\n          4 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 19 3 -1.</_>\n        <_>\n          1 7 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 16 9 -1.</_>\n        <_>\n          4 3 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 5 -1.</_>\n        <_>\n          8 1 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 6 15 -1.</_>\n        <_>\n          3 11 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 22 18 2 -1.</_>\n        <_>\n          6 23 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 9 -1.</_>\n        <_>\n          2 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 9 -1.</_>\n        <_>\n          18 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 9 -1.</_>\n        <_>\n          0 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 4 10 -1.</_>\n        <_>\n          11 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 10 -1.</_>\n        <_>\n          7 12 10 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 13 -1.</_>\n        <_>\n          3 3 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 13 -1.</_>\n        <_>\n          18 1 3 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 9 -1.</_>\n        <_>\n          7 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 2 6 11 -1.</_>\n        <_>\n          18 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 11 -1.</_>\n        <_>\n          3 2 3 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 15 6 -1.</_>\n        <_>\n          9 14 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 3 -1.</_>\n        <_>\n          2 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          10 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 14 -1.</_>\n        <_>\n          5 6 6 7 2.</_>\n        <_>\n          11 13 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 9 6 -1.</_>\n        <_>\n          10 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 9 -1.</_>\n        <_>\n          12 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 12 20 -1.</_>\n        <_>\n          4 1 6 10 2.</_>\n        <_>\n          10 11 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 18 3 -1.</_>\n        <_>\n          6 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 18 3 -1.</_>\n        <_>\n          9 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 3 -1.</_>\n        <_>\n          9 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 12 15 -1.</_>\n        <_>\n          10 2 4 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 18 3 -1.</_>\n        <_>\n          2 4 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 19 3 -1.</_>\n        <_>\n          0 2 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 15 4 -1.</_>\n        <_>\n          5 2 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 14 5 -1.</_>\n        <_>\n          12 2 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 22 14 -1.</_>\n        <_>\n          1 2 11 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 17 18 3 -1.</_>\n        <_>\n          6 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 18 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 20 3 -1.</_>\n        <_>\n          2 1 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 5 12 -1.</_>\n        <_>\n          5 8 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 12 5 -1.</_>\n        <_>\n          12 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 12 -1.</_>\n        <_>\n          9 12 3 6 2.</_>\n        <_>\n          12 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 8 10 -1.</_>\n        <_>\n          18 14 4 5 2.</_>\n        <_>\n          14 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 14 8 10 -1.</_>\n        <_>\n          2 14 4 5 2.</_>\n        <_>\n          6 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 18 12 6 -1.</_>\n        <_>\n          16 18 6 3 2.</_>\n        <_>\n          10 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 6 9 -1.</_>\n        <_>\n          1 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 3 20 -1.</_>\n        <_>\n          12 3 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 14 6 -1.</_>\n        <_>\n          4 6 7 3 2.</_>\n        <_>\n          11 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 13 -1.</_>\n        <_>\n          10 5 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 4 15 -1.</_>\n        <_>\n          5 9 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 16 15 4 -1.</_>\n        <_>\n          14 16 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 6 14 -1.</_>\n        <_>\n          7 8 3 7 2.</_>\n        <_>\n          10 15 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 6 -1.</_>\n        <_>\n          7 8 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 18 3 -1.</_>\n        <_>\n          2 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 15 8 -1.</_>\n        <_>\n          5 5 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 8 18 -1.</_>\n        <_>\n          7 10 8 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 3 -1.</_>\n        <_>\n          0 11 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 13 -1.</_>\n        <_>\n          2 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 10 -1.</_>\n        <_>\n          20 0 4 5 2.</_>\n        <_>\n          16 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 10 9 -1.</_>\n        <_>\n          5 4 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 18 3 -1.</_>\n        <_>\n          5 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 6 11 -1.</_>\n        <_>\n          13 4 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 10 -1.</_>\n        <_>\n          0 0 4 5 2.</_>\n        <_>\n          4 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 16 18 3 -1.</_>\n        <_>\n          4 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 18 3 -1.</_>\n        <_>\n          2 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 18 10 -1.</_>\n        <_>\n          12 0 9 5 2.</_>\n        <_>\n          3 5 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 3 20 21 -1.</_>\n        <_>\n          12 3 10 21 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 14 3 -1.</_>\n        <_>\n          6 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 9 6 3 2.</_>\n        <_>\n          6 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 21 4 -1.</_>\n        <_>\n          10 14 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 21 4 -1.</_>\n        <_>\n          7 14 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 21 18 3 -1.</_>\n        <_>\n          11 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 21 18 3 -1.</_>\n        <_>\n          7 21 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 7 18 3 -1.</_>\n        <_>\n          3 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 4 4 18 -1.</_>\n        <_>\n          21 4 2 9 2.</_>\n        <_>\n          19 13 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 10 6 -1.</_>\n        <_>\n          7 17 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 11 9 -1.</_>\n        <_>\n          9 16 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 4 10 -1.</_>\n        <_>\n          0 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 6 -1.</_>\n        <_>\n          15 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 4 18 -1.</_>\n        <_>\n          1 5 2 9 2.</_>\n        <_>\n          3 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 8 10 -1.</_>\n        <_>\n          13 8 4 5 2.</_>\n        <_>\n          9 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 8 10 -1.</_>\n        <_>\n          7 8 4 5 2.</_>\n        <_>\n          11 13 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 9 7 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 7 -1.</_>\n        <_>\n          10 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 12 5 -1.</_>\n        <_>\n          13 8 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 18 -1.</_>\n        <_>\n          10 11 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 14 12 -1.</_>\n        <_>\n          5 11 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 11 4 -1.</_>\n        <_>\n          0 3 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 10 -1.</_>\n        <_>\n          11 10 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 17 11 6 -1.</_>\n        <_>\n          2 19 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 16 9 6 -1.</_>\n        <_>\n          15 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 18 2 -1.</_>\n        <_>\n          1 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 13 -1.</_>\n        <_>\n          10 4 4 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 3 -1.</_>\n        <_>\n          0 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 18 3 -1.</_>\n        <_>\n          6 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 9 6 -1.</_>\n        <_>\n          0 18 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 9 6 -1.</_>\n        <_>\n          13 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 6 -1.</_>\n        <_>\n          2 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 1 6 16 -1.</_>\n        <_>\n          13 1 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 6 16 -1.</_>\n        <_>\n          8 1 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 6 10 -1.</_>\n        <_>\n          13 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 10 -1.</_>\n        <_>\n          9 5 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 24 -1.</_>\n        <_>\n          12 0 2 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 4 20 -1.</_>\n        <_>\n          3 4 2 10 2.</_>\n        <_>\n          5 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 6 9 -1.</_>\n        <_>\n          6 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 18 5 -1.</_>\n        <_>\n          10 5 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 6 9 -1.</_>\n        <_>\n          7 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 15 8 -1.</_>\n        <_>\n          12 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 15 8 -1.</_>\n        <_>\n          7 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 6 12 -1.</_>\n        <_>\n          3 4 3 6 2.</_>\n        <_>\n          6 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 18 -1.</_>\n        <_>\n          16 0 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 8 18 -1.</_>\n        <_>\n          4 0 4 18 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 24 6 -1.</_>\n        <_>\n          0 9 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 14 3 -1.</_>\n        <_>\n          11 7 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 8 15 -1.</_>\n        <_>\n          10 8 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          12 0 5 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 10 8 10 -1.</_>\n        <_>\n          17 10 4 5 2.</_>\n        <_>\n          13 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 4 9 -1.</_>\n        <_>\n          5 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 1 6 8 -1.</_>\n        <_>\n          16 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 6 8 -1.</_>\n        <_>\n          5 1 3 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 12 -1.</_>\n        <_>\n          3 10 18 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 4 -1.</_>\n        <_>\n          4 14 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 16 15 -1.</_>\n        <_>\n          4 14 16 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 8 10 -1.</_>\n        <_>\n          3 10 4 5 2.</_>\n        <_>\n          7 15 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 16 6 -1.</_>\n        <_>\n          16 18 8 3 2.</_>\n        <_>\n          8 21 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 12 5 -1.</_>\n        <_>\n          6 16 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 9 4 -1.</_>\n        <_>\n          14 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 14 9 6 -1.</_>\n        <_>\n          7 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 12 -1.</_>\n        <_>\n          4 14 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 19 6 -1.</_>\n        <_>\n          0 15 19 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 13 9 6 -1.</_>\n        <_>\n          10 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 23 -1.</_>\n        <_>\n          6 0 1 23 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 24 6 -1.</_>\n        <_>\n          0 10 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 5 12 -1.</_>\n        <_>\n          0 9 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 19 18 -1.</_>\n        <_>\n          3 9 19 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 6 12 -1.</_>\n        <_>\n          9 11 3 6 2.</_>\n        <_>\n          12 17 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 24 8 -1.</_>\n        <_>\n          12 5 12 4 2.</_>\n        <_>\n          0 9 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 18 9 4 -1.</_>\n        <_>\n          6 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          8 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 20 3 -1.</_>\n        <_>\n          2 8 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 7 20 -1.</_>\n        <_>\n          12 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 20 -1.</_>\n        <_>\n          5 10 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 2 2 18 -1.</_>\n        <_>\n          14 11 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 12 -1.</_>\n        <_>\n          10 8 5 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 12 8 -1.</_>\n        <_>\n          12 9 6 4 2.</_>\n        <_>\n          6 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 3 14 -1.</_>\n        <_>\n          7 14 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 12 16 -1.</_>\n        <_>\n          17 2 6 8 2.</_>\n        <_>\n          11 10 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 6 9 -1.</_>\n        <_>\n          9 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 9 4 -1.</_>\n        <_>\n          13 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 22 4 -1.</_>\n        <_>\n          0 12 11 2 2.</_>\n        <_>\n          11 14 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 22 6 -1.</_>\n        <_>\n          12 12 11 3 2.</_>\n        <_>\n          1 15 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 9 6 -1.</_>\n        <_>\n          9 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 4 9 -1.</_>\n        <_>\n          10 0 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 18 7 -1.</_>\n        <_>\n          9 8 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 6 -1.</_>\n        <_>\n          0 8 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 24 10 -1.</_>\n        <_>\n          8 11 8 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 18 21 -1.</_>\n        <_>\n          9 3 6 21 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 4 10 -1.</_>\n        <_>\n          9 12 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 16 10 8 -1.</_>\n        <_>\n          15 16 5 4 2.</_>\n        <_>\n          10 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 6 12 -1.</_>\n        <_>\n          15 10 3 6 2.</_>\n        <_>\n          12 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 6 12 -1.</_>\n        <_>\n          6 10 3 6 2.</_>\n        <_>\n          9 16 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 12 6 12 -1.</_>\n        <_>\n          19 12 3 6 2.</_>\n        <_>\n          16 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 6 12 -1.</_>\n        <_>\n          2 12 3 6 2.</_>\n        <_>\n          5 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 6 9 -1.</_>\n        <_>\n          12 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 20 10 4 -1.</_>\n        <_>\n          14 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 10 4 -1.</_>\n        <_>\n          5 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 17 9 6 -1.</_>\n        <_>\n          11 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 14 4 -1.</_>\n        <_>\n          3 4 14 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 10 4 -1.</_>\n        <_>\n          10 3 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 10 4 -1.</_>\n        <_>\n          5 15 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 3 19 -1.</_>\n        <_>\n          20 2 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 9 8 -1.</_>\n        <_>\n          7 12 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 12 -1.</_>\n        <_>\n          4 11 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          8 1 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 4 -1.</_>\n        <_>\n          6 10 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 3 4 10 -1.</_>\n        <_>\n          19 3 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 9 6 -1.</_>\n        <_>\n          3 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 22 -1.</_>\n        <_>\n          20 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 22 -1.</_>\n        <_>\n          2 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 15 19 3 -1.</_>\n        <_>\n          5 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 7 4 15 -1.</_>\n        <_>\n          10 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 18 3 -1.</_>\n        <_>\n          0 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 10 15 -1.</_>\n        <_>\n          7 8 10 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 18 3 -1.</_>\n        <_>\n          1 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 24 14 -1.</_>\n        <_>\n          0 17 24 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 10 -1.</_>\n        <_>\n          17 9 4 5 2.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 4 9 -1.</_>\n        <_>\n          12 5 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 9 8 10 -1.</_>\n        <_>\n          17 9 4 5 2.</_>\n        <_>\n          13 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 11 10 10 -1.</_>\n        <_>\n          7 11 5 5 2.</_>\n        <_>\n          12 16 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 19 2 -1.</_>\n        <_>\n          0 1 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 24 6 -1.</_>\n        <_>\n          8 18 8 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 8 16 -1.</_>\n        <_>\n          6 12 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 10 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 9 -1.</_>\n        <_>\n          0 6 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 7 9 -1.</_>\n        <_>\n          13 18 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 12 6 -1.</_>\n        <_>\n          3 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 14 6 9 -1.</_>\n        <_>\n          12 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 15 8 -1.</_>\n        <_>\n          2 19 15 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 16 -1.</_>\n        <_>\n          9 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 7 12 -1.</_>\n        <_>\n          6 10 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 14 6 9 -1.</_>\n        <_>\n          5 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 4 18 -1.</_>\n        <_>\n          6 6 2 9 2.</_>\n        <_>\n          8 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 9 6 12 -1.</_>\n        <_>\n          17 9 3 6 2.</_>\n        <_>\n          14 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 12 -1.</_>\n        <_>\n          4 9 3 6 2.</_>\n        <_>\n          7 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 15 9 6 -1.</_>\n        <_>\n          14 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 18 4 -1.</_>\n        <_>\n          0 20 9 2 2.</_>\n        <_>\n          9 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 18 9 6 -1.</_>\n        <_>\n          13 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 9 6 -1.</_>\n        <_>\n          2 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 2 4 22 -1.</_>\n        <_>\n          21 2 2 11 2.</_>\n        <_>\n          19 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 2 4 22 -1.</_>\n        <_>\n          1 2 2 11 2.</_>\n        <_>\n          3 13 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 24 -1.</_>\n        <_>\n          15 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 16 4 -1.</_>\n        <_>\n          11 20 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 18 -1.</_>\n        <_>\n          13 6 2 9 2.</_>\n        <_>\n          11 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 14 -1.</_>\n        <_>\n          7 9 5 7 2.</_>\n        <_>\n          12 16 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 6 6 9 -1.</_>\n        <_>\n          14 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 7 9 -1.</_>\n        <_>\n          3 9 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 20 -1.</_>\n        <_>\n          22 4 2 10 2.</_>\n        <_>\n          20 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 6 9 -1.</_>\n        <_>\n          7 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 14 -1.</_>\n        <_>\n          12 0 5 7 2.</_>\n        <_>\n          7 7 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 18 6 -1.</_>\n        <_>\n          11 1 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 2 24 -1.</_>\n        <_>\n          15 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 2 24 -1.</_>\n        <_>\n          8 0 1 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 12 6 7 -1.</_>\n        <_>\n          13 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 12 6 7 -1.</_>\n        <_>\n          8 12 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 19 -1.</_>\n        <_>\n          9 5 6 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 9 6 -1.</_>\n        <_>\n          8 6 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 10 8 -1.</_>\n        <_>\n          3 16 5 4 2.</_>\n        <_>\n          8 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 8 5 15 -1.</_>\n        <_>\n          19 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 5 15 -1.</_>\n        <_>\n          0 13 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 4 4 20 -1.</_>\n        <_>\n          22 4 2 10 2.</_>\n        <_>\n          20 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 4 20 -1.</_>\n        <_>\n          0 4 2 10 2.</_>\n        <_>\n          2 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 10 4 -1.</_>\n        <_>\n          7 7 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 19 14 4 -1.</_>\n        <_>\n          11 19 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 11 12 3 -1.</_>\n        <_>\n          10 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          0 2 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 14 20 -1.</_>\n        <_>\n          14 2 7 10 2.</_>\n        <_>\n          7 12 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 6 9 -1.</_>\n        <_>\n          2 13 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 19 -1.</_>\n        <_>\n          13 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 14 3 -1.</_>\n        <_>\n          8 11 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 16 20 -1.</_>\n        <_>\n          15 1 8 10 2.</_>\n        <_>\n          7 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 21 9 -1.</_>\n        <_>\n          7 10 7 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 19 15 5 -1.</_>\n        <_>\n          11 19 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 10 6 6 -1.</_>\n        <_>\n          11 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 1 16 20 -1.</_>\n        <_>\n          15 1 8 10 2.</_>\n        <_>\n          7 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 16 20 -1.</_>\n        <_>\n          1 1 8 10 2.</_>\n        <_>\n          9 11 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 3 12 -1.</_>\n        <_>\n          16 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 3 12 -1.</_>\n        <_>\n          5 10 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 8 -1.</_>\n        <_>\n          12 6 5 4 2.</_>\n        <_>\n          7 10 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 9 6 6 -1.</_>\n        <_>\n          4 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 4 -1.</_>\n        <_>\n          6 7 12 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 5 15 -1.</_>\n        <_>\n          9 7 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 9 6 -1.</_>\n        <_>\n          15 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 11 10 -1.</_>\n        <_>\n          6 5 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 12 -1.</_>\n        <_>\n          12 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 9 4 -1.</_>\n        <_>\n          7 4 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 13 6 -1.</_>\n        <_>\n          6 2 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          10 6 2 9 2.</_>\n        <_>\n          12 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 18 10 6 -1.</_>\n        <_>\n          3 20 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 20 3 -1.</_>\n        <_>\n          4 15 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 9 6 -1.</_>\n        <_>\n          2 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 19 -1.</_>\n        <_>\n          13 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 19 -1.</_>\n        <_>\n          9 0 2 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 2 -1.</_>\n        <_>\n          1 5 22 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 9 6 -1.</_>\n        <_>\n          0 2 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 24 18 -1.</_>\n        <_>\n          0 9 24 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 16 8 -1.</_>\n        <_>\n          3 6 16 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 6 18 6 -1.</_>\n        <_>\n          3 8 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 10 -1.</_>\n        <_>\n          5 1 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 9 6 -1.</_>\n        <_>\n          16 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 9 6 -1.</_>\n        <_>\n          5 0 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 7 10 -1.</_>\n        <_>\n          6 5 7 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 20 4 -1.</_>\n        <_>\n          12 2 10 2 2.</_>\n        <_>\n          2 4 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 19 3 -1.</_>\n        <_>\n          2 12 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 8 6 9 -1.</_>\n        <_>\n          12 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 6 9 -1.</_>\n        <_>\n          10 8 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 4 9 -1.</_>\n        <_>\n          13 8 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 11 9 9 -1.</_>\n        <_>\n          6 11 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 5 -1.</_>\n        <_>\n          9 9 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 2 20 -1.</_>\n        <_>\n          2 14 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 17 8 6 -1.</_>\n        <_>\n          14 20 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 2 -1.</_>\n        <_>\n          3 22 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 15 6 -1.</_>\n        <_>\n          10 4 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 15 12 6 -1.</_>\n        <_>\n          2 17 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 8 6 9 -1.</_>\n        <_>\n          17 11 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 20 4 -1.</_>\n        <_>\n          2 12 10 2 2.</_>\n        <_>\n          12 14 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 24 6 -1.</_>\n        <_>\n          0 19 24 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 16 9 4 -1.</_>\n        <_>\n          7 18 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 4 22 -1.</_>\n        <_>\n          17 1 2 11 2.</_>\n        <_>\n          15 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 4 22 -1.</_>\n        <_>\n          5 1 2 11 2.</_>\n        <_>\n          7 12 2 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 13 8 9 -1.</_>\n        <_>\n          11 16 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 6 9 -1.</_>\n        <_>\n          8 1 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 4 3 18 -1.</_>\n        <_>\n          11 10 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 12 6 -1.</_>\n        <_>\n          5 8 6 3 2.</_>\n        <_>\n          11 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 7 5 8 -1.</_>\n        <_>\n          15 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 5 8 -1.</_>\n        <_>\n          4 11 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          15 6 3 6 2.</_>\n        <_>\n          12 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 6 3 6 2.</_>\n        <_>\n          9 12 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 14 8 -1.</_>\n        <_>\n          12 9 7 4 2.</_>\n        <_>\n          5 13 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 14 -1.</_>\n        <_>\n          9 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          12 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 5 4 18 -1.</_>\n        <_>\n          4 5 2 9 2.</_>\n        <_>\n          6 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 16 18 -1.</_>\n        <_>\n          4 12 16 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 7 20 -1.</_>\n        <_>\n          5 14 7 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 8 8 12 -1.</_>\n        <_>\n          14 14 8 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 6 14 -1.</_>\n        <_>\n          9 10 3 7 2.</_>\n        <_>\n          12 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 9 6 -1.</_>\n        <_>\n          12 5 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 4 3 18 -1.</_>\n        <_>\n          10 4 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 22 14 -1.</_>\n        <_>\n          12 4 11 7 2.</_>\n        <_>\n          1 11 11 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 18 2 -1.</_>\n        <_>\n          2 8 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 6 12 -1.</_>\n        <_>\n          12 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 9 7 -1.</_>\n        <_>\n          9 5 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 7 4 12 -1.</_>\n        <_>\n          12 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 4 12 -1.</_>\n        <_>\n          8 13 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 2 10 22 -1.</_>\n        <_>\n          7 13 10 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 3 20 -1.</_>\n        <_>\n          1 1 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 18 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_>\n        <_>\n          4 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 13 18 4 -1.</_>\n        <_>\n          2 13 9 2 2.</_>\n        <_>\n          11 15 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 6 -1.</_>\n        <_>\n          15 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 6 -1.</_>\n        <_>\n          0 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 24 -1.</_>\n        <_>\n          15 0 9 12 2.</_>\n        <_>\n          6 12 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 6 12 -1.</_>\n        <_>\n          6 10 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 4 -1.</_>\n        <_>\n          8 9 10 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 9 18 6 -1.</_>\n        <_>\n          1 9 9 3 2.</_>\n        <_>\n          10 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 18 3 -1.</_>\n        <_>\n          6 7 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 8 -1.</_>\n        <_>\n          10 7 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 12 6 12 -1.</_>\n        <_>\n          12 12 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 18 3 -1.</_>\n        <_>\n          3 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 10 6 -1.</_>\n        <_>\n          1 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 3 3 19 -1.</_>\n        <_>\n          11 3 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 11 9 -1.</_>\n        <_>\n          6 4 11 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 11 6 -1.</_>\n        <_>\n          6 8 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 5 -1.</_>\n        <_>\n          16 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 20 19 -1.</_>\n        <_>\n          12 4 10 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 21 6 -1.</_>\n        <_>\n          9 1 7 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 14 -1.</_>\n        <_>\n          6 5 6 7 2.</_>\n        <_>\n          12 12 6 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 8 5 -1.</_>\n        <_>\n          6 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 5 -1.</_>\n        <_>\n          16 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 5 -1.</_>\n        <_>\n          4 7 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 7 -1.</_>\n        <_>\n          18 17 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 10 -1.</_>\n        <_>\n          8 6 4 5 2.</_>\n        <_>\n          12 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 15 9 9 -1.</_>\n        <_>\n          18 15 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 9 9 -1.</_>\n        <_>\n          3 15 3 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 10 9 7 -1.</_>\n        <_>\n          15 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 9 7 -1.</_>\n        <_>\n          6 10 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 15 10 8 -1.</_>\n        <_>\n          18 15 5 4 2.</_>\n        <_>\n          13 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 12 -1.</_>\n        <_>\n          0 1 3 6 2.</_>\n        <_>\n          3 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 12 -1.</_>\n        <_>\n          13 0 3 6 2.</_>\n        <_>\n          10 6 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 10 12 -1.</_>\n        <_>\n          7 0 5 6 2.</_>\n        <_>\n          12 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 1 16 8 -1.</_>\n        <_>\n          4 1 8 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 21 19 3 -1.</_>\n        <_>\n          0 22 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 18 4 -1.</_>\n        <_>\n          15 9 9 2 2.</_>\n        <_>\n          6 11 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 9 6 -1.</_>\n        <_>\n          3 6 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 15 -1.</_>\n        <_>\n          9 6 6 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 6 6 -1.</_>\n        <_>\n          8 9 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 1 14 9 -1.</_>\n        <_>\n          5 4 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 8 20 -1.</_>\n        <_>\n          3 0 4 10 2.</_>\n        <_>\n          7 10 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 7 9 -1.</_>\n        <_>\n          5 3 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 12 5 -1.</_>\n        <_>\n          10 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 8 14 -1.</_>\n        <_>\n          4 1 4 14 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 12 22 4 -1.</_>\n        <_>\n          2 14 22 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 17 6 6 -1.</_>\n        <_>\n          8 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 7 -1.</_>\n        <_>\n          18 1 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 6 -1.</_>\n        <_>\n          3 0 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 17 18 -1.</_>\n        <_>\n          4 12 17 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 12 6 -1.</_>\n        <_>\n          6 0 6 3 2.</_>\n        <_>\n          12 3 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 10 6 -1.</_>\n        <_>\n          4 14 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 10 12 -1.</_>\n        <_>\n          12 9 5 6 2.</_>\n        <_>\n          7 15 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 3 -1.</_>\n        <_>\n          8 1 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 6 6 -1.</_>\n        <_>\n          13 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 6 6 -1.</_>\n        <_>\n          8 11 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 19 3 -1.</_>\n        <_>\n          3 11 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 9 -1.</_>\n        <_>\n          0 5 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 16 10 6 -1.</_>\n        <_>\n          14 18 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 10 6 -1.</_>\n        <_>\n          0 18 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 9 6 -1.</_>\n        <_>\n          0 20 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 6 9 -1.</_>\n        <_>\n          8 2 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 12 -1.</_>\n        <_>\n          15 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 13 8 8 -1.</_>\n        <_>\n          8 17 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 20 18 3 -1.</_>\n        <_>\n          10 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 12 -1.</_>\n        <_>\n          7 8 2 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 12 3 -1.</_>\n        <_>\n          7 7 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 9 -1.</_>\n        <_>\n          12 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 20 18 3 -1.</_>\n        <_>\n          11 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 18 3 -1.</_>\n        <_>\n          7 20 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 1 6 20 -1.</_>\n        <_>\n          21 1 3 10 2.</_>\n        <_>\n          18 11 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 6 20 -1.</_>\n        <_>\n          0 1 3 10 2.</_>\n        <_>\n          3 11 3 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 3 4 18 -1.</_>\n        <_>\n          15 3 2 9 2.</_>\n        <_>\n          13 12 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 6 12 -1.</_>\n        <_>\n          0 6 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 9 12 6 -1.</_>\n        <_>\n          18 9 6 3 2.</_>\n        <_>\n          12 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 3 4 18 -1.</_>\n        <_>\n          7 3 2 9 2.</_>\n        <_>\n          9 12 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 6 9 -1.</_>\n        <_>\n          16 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 12 6 -1.</_>\n        <_>\n          0 9 6 3 2.</_>\n        <_>\n          6 12 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 4 8 20 -1.</_>\n        <_>\n          18 4 4 10 2.</_>\n        <_>\n          14 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 8 20 -1.</_>\n        <_>\n          2 4 4 10 2.</_>\n        <_>\n          6 14 4 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 13 9 6 -1.</_>\n        <_>\n          14 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 9 6 -1.</_>\n        <_>\n          1 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 18 3 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 13 9 6 -1.</_>\n        <_>\n          5 15 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 18 3 -1.</_>\n        <_>\n          5 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 7 -1.</_>\n        <_>\n          11 2 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 9 6 -1.</_>\n        <_>\n          12 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 9 6 -1.</_>\n        <_>\n          9 1 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 14 6 -1.</_>\n        <_>\n          12 6 7 3 2.</_>\n        <_>\n          5 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 6 13 -1.</_>\n        <_>\n          10 2 2 13 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 6 -1.</_>\n        <_>\n          12 11 6 3 2.</_>\n        <_>\n          6 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 15 -1.</_>\n        <_>\n          9 1 6 15 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 6 7 -1.</_>\n        <_>\n          13 0 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 16 6 -1.</_>\n        <_>\n          3 6 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 6 9 -1.</_>\n        <_>\n          9 7 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 0 4 24 -1.</_>\n        <_>\n          13 0 2 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 4 24 -1.</_>\n        <_>\n          9 0 2 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 5 12 -1.</_>\n        <_>\n          11 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 15 9 6 -1.</_>\n        <_>\n          7 17 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 7 18 6 -1.</_>\n        <_>\n          5 9 18 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 5 12 -1.</_>\n        <_>\n          8 13 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 17 17 6 -1.</_>\n        <_>\n          4 19 17 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 14 -1.</_>\n        <_>\n          0 3 9 7 2.</_>\n        <_>\n          9 10 9 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 24 2 -1.</_>\n        <_>\n          0 2 24 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 15 18 3 -1.</_>\n        <_>\n          0 16 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 9 -1.</_>\n        <_>\n          11 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 3 14 12 -1.</_>\n        <_>\n          3 9 14 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 6 10 -1.</_>\n        <_>\n          12 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 6 9 -1.</_>\n        <_>\n          7 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 21 7 -1.</_>\n        <_>\n          9 0 7 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 12 5 -1.</_>\n        <_>\n          10 11 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 9 8 -1.</_>\n        <_>\n          11 7 3 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 18 -1.</_>\n        <_>\n          9 6 3 9 2.</_>\n        <_>\n          12 15 3 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 8 10 -1.</_>\n        <_>\n          19 14 4 5 2.</_>\n        <_>\n          15 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 8 10 -1.</_>\n        <_>\n          1 14 4 5 2.</_>\n        <_>\n          5 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 0 8 10 -1.</_>\n        <_>\n          15 0 4 5 2.</_>\n        <_>\n          11 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 8 10 -1.</_>\n        <_>\n          5 0 4 5 2.</_>\n        <_>\n          9 5 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 5 -1.</_>\n        <_>\n          6 1 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 12 18 2 -1.</_>\n        <_>\n          10 12 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 6 -1.</_>\n        <_>\n          12 8 10 3 2.</_>\n        <_>\n          2 11 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 7 -1.</_>\n        <_>\n          10 6 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 16 -1.</_>\n        <_>\n          14 5 4 8 2.</_>\n        <_>\n          10 13 4 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 16 8 -1.</_>\n        <_>\n          3 9 8 4 2.</_>\n        <_>\n          11 13 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 10 4 -1.</_>\n        <_>\n          7 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 12 10 8 -1.</_>\n        <_>\n          7 12 5 4 2.</_>\n        <_>\n          12 16 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 19 15 4 -1.</_>\n        <_>\n          14 19 5 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          7 0 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 4 10 8 -1.</_>\n        <_>\n          18 4 5 4 2.</_>\n        <_>\n          13 8 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 16 18 4 -1.</_>\n        <_>\n          9 16 6 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 7 10 12 -1.</_>\n        <_>\n          13 7 5 6 2.</_>\n        <_>\n          8 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 10 12 -1.</_>\n        <_>\n          6 7 5 6 2.</_>\n        <_>\n          11 13 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 18 7 -1.</_>\n        <_>\n          10 6 6 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 18 3 -1.</_>\n        <_>\n          0 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 18 3 -1.</_>\n        <_>\n          3 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 4 6 10 -1.</_>\n        <_>\n          4 4 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 24 -1.</_>\n        <_>\n          16 0 4 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 8 15 -1.</_>\n        <_>\n          8 0 4 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 8 24 -1.</_>\n        <_>\n          16 0 4 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 4 18 9 -1.</_>\n        <_>\n          7 4 6 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 12 9 6 -1.</_>\n        <_>\n          15 14 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 6 -1.</_>\n        <_>\n          3 9 9 3 2.</_>\n        <_>\n          12 12 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 5 6 9 -1.</_>\n        <_>\n          18 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 6 9 -1.</_>\n        <_>\n          0 8 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 12 20 -1.</_>\n        <_>\n          2 1 6 10 2.</_>\n        <_>\n          8 11 6 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 23 -1.</_>\n        <_>\n          17 0 3 23 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 2 18 -1.</_>\n        <_>\n          1 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 8 10 6 -1.</_>\n        <_>\n          8 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 20 6 -1.</_>\n        <_>\n          0 6 10 3 2.</_>\n        <_>\n          10 9 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 12 12 5 -1.</_>\n        <_>\n          15 12 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 3 19 -1.</_>\n        <_>\n          1 4 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 1 3 18 -1.</_>\n        <_>\n          20 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 3 18 -1.</_>\n        <_>\n          3 1 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 18 3 -1.</_>\n        <_>\n          9 10 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 10 9 -1.</_>\n        <_>\n          9 4 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 13 14 7 -1.</_>\n        <_>\n          7 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 13 14 7 -1.</_>\n        <_>\n          10 13 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 9 6 -1.</_>\n        <_>\n          11 15 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 14 8 10 -1.</_>\n        <_>\n          4 14 4 5 2.</_>\n        <_>\n          8 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 14 4 10 -1.</_>\n        <_>\n          10 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 5 16 -1.</_>\n        <_>\n          3 16 5 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 9 6 -1.</_>\n        <_>\n          15 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 10 9 6 -1.</_>\n        <_>\n          0 12 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 12 9 -1.</_>\n        <_>\n          6 10 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 10 5 8 -1.</_>\n        <_>\n          9 14 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 15 6 9 -1.</_>\n        <_>\n          10 15 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 6 7 6 -1.</_>\n        <_>\n          16 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 1 4 22 -1.</_>\n        <_>\n          10 1 2 22 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 3 -1.</_>\n        <_>\n          6 6 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 19 3 -1.</_>\n        <_>\n          0 19 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 6 24 -1.</_>\n        <_>\n          17 0 3 24 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 15 6 -1.</_>\n        <_>\n          5 13 5 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 10 14 -1.</_>\n        <_>\n          14 6 5 7 2.</_>\n        <_>\n          9 13 5 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 8 10 -1.</_>\n        <_>\n          1 6 4 5 2.</_>\n        <_>\n          5 11 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 9 6 -1.</_>\n        <_>\n          10 7 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 8 14 14 -1.</_>\n        <_>\n          14 8 7 7 2.</_>\n        <_>\n          7 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 14 14 -1.</_>\n        <_>\n          3 8 7 7 2.</_>\n        <_>\n          10 15 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 13 4 -1.</_>\n        <_>\n          9 10 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 6 12 -1.</_>\n        <_>\n          3 2 3 6 2.</_>\n        <_>\n          6 8 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 10 17 6 -1.</_>\n        <_>\n          6 13 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 17 6 -1.</_>\n        <_>\n          1 13 17 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 7 8 9 -1.</_>\n        <_>\n          16 10 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 7 8 9 -1.</_>\n        <_>\n          0 10 8 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 9 24 10 -1.</_>\n        <_>\n          12 9 12 5 2.</_>\n        <_>\n          0 14 12 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 15 8 -1.</_>\n        <_>\n          8 2 5 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 18 8 -1.</_>\n        <_>\n          10 2 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 1 18 4 -1.</_>\n        <_>\n          0 1 9 2 2.</_>\n        <_>\n          9 3 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          20 2 3 18 -1.</_>\n        <_>\n          21 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 3 3 19 -1.</_>\n        <_>\n          2 3 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 16 -1.</_>\n        <_>\n          20 8 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 16 -1.</_>\n        <_>\n          2 8 2 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 18 11 6 -1.</_>\n        <_>\n          8 20 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 5 -1.</_>\n        <_>\n          8 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          11 6 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 9 6 -1.</_>\n        <_>\n          9 3 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 12 5 -1.</_>\n        <_>\n          7 6 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 8 6 7 -1.</_>\n        <_>\n          12 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 6 9 -1.</_>\n        <_>\n          8 17 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 2 9 6 -1.</_>\n        <_>\n          11 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 16 20 -1.</_>\n        <_>\n          4 3 8 10 2.</_>\n        <_>\n          12 13 8 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 10 12 -1.</_>\n        <_>\n          12 6 5 6 2.</_>\n        <_>\n          7 12 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 7 12 -1.</_>\n        <_>\n          0 6 7 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 11 6 -1.</_>\n        <_>\n          12 19 11 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 12 8 -1.</_>\n        <_>\n          4 7 6 4 2.</_>\n        <_>\n          10 11 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 11 8 10 -1.</_>\n        <_>\n          12 11 4 5 2.</_>\n        <_>\n          8 16 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 4 9 -1.</_>\n        <_>\n          11 1 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 3 22 -1.</_>\n        <_>\n          15 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 0 3 22 -1.</_>\n        <_>\n          8 0 1 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 7 18 4 -1.</_>\n        <_>\n          13 7 9 2 2.</_>\n        <_>\n          4 9 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 4 15 -1.</_>\n        <_>\n          10 7 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 13 -1.</_>\n        <_>\n          9 0 9 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 0 3 24 -1.</_>\n        <_>\n          17 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 24 -1.</_>\n        <_>\n          6 0 1 24 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 15 5 8 -1.</_>\n        <_>\n          10 19 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 18 18 2 -1.</_>\n        <_>\n          2 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 8 20 3 -1.</_>\n        <_>\n          2 9 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 6 9 6 -1.</_>\n        <_>\n          7 8 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 19 10 -1.</_>\n        <_>\n          3 7 19 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 7 19 3 -1.</_>\n        <_>\n          2 8 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 6 9 4 -1.</_>\n        <_>\n          15 8 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 2 18 8 -1.</_>\n        <_>\n          8 2 6 8 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 9 14 4 -1.</_>\n        <_>\n          10 9 7 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 6 16 -1.</_>\n        <_>\n          7 4 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 9 16 -1.</_>\n        <_>\n          18 8 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 9 16 -1.</_>\n        <_>\n          3 8 3 16 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 0 6 14 -1.</_>\n        <_>\n          20 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 6 14 -1.</_>\n        <_>\n          2 0 2 14 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 0 6 22 -1.</_>\n        <_>\n          17 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 6 22 -1.</_>\n        <_>\n          5 0 2 22 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 2 12 20 -1.</_>\n        <_>\n          16 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 2 12 20 -1.</_>\n        <_>\n          4 2 4 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 4 9 -1.</_>\n        <_>\n          11 6 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 6 16 -1.</_>\n        <_>\n          12 0 3 16 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 1 3 12 -1.</_>\n        <_>\n          12 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 4 18 6 -1.</_>\n        <_>\n          3 4 9 3 2.</_>\n        <_>\n          12 7 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 5 16 8 -1.</_>\n        <_>\n          13 5 8 4 2.</_>\n        <_>\n          5 9 8 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 10 6 -1.</_>\n        <_>\n          0 15 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 9 6 -1.</_>\n        <_>\n          8 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 2 9 6 -1.</_>\n        <_>\n          9 2 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 1 10 8 -1.</_>\n        <_>\n          19 1 5 4 2.</_>\n        <_>\n          14 5 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 3 12 -1.</_>\n        <_>\n          9 7 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 9 -1.</_>\n        <_>\n          6 7 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 12 6 -1.</_>\n        <_>\n          10 5 4 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 1 8 5 -1.</_>\n        <_>\n          5 1 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 12 6 8 -1.</_>\n        <_>\n          12 16 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 12 12 6 -1.</_>\n        <_>\n          3 14 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 18 12 6 -1.</_>\n        <_>\n          15 18 6 3 2.</_>\n        <_>\n          9 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 13 6 6 -1.</_>\n        <_>\n          4 16 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 3 7 18 -1.</_>\n        <_>\n          11 12 7 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 18 3 -1.</_>\n        <_>\n          9 9 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 19 2 -1.</_>\n        <_>\n          5 4 19 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 2 12 6 -1.</_>\n        <_>\n          4 2 6 3 2.</_>\n        <_>\n          10 5 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 6 9 -1.</_>\n        <_>\n          11 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 6 9 -1.</_>\n        <_>\n          10 6 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 9 5 15 -1.</_>\n        <_>\n          16 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 9 5 15 -1.</_>\n        <_>\n          3 14 5 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 6 14 6 -1.</_>\n        <_>\n          13 6 7 3 2.</_>\n        <_>\n          6 9 7 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 3 14 -1.</_>\n        <_>\n          8 13 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 5 -1.</_>\n        <_>\n          8 16 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 20 20 3 -1.</_>\n        <_>\n          10 20 10 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 10 18 2 -1.</_>\n        <_>\n          5 11 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 6 10 -1.</_>\n        <_>\n          2 6 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 1 20 3 -1.</_>\n        <_>\n          2 2 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 13 6 11 -1.</_>\n        <_>\n          11 13 2 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 15 6 8 -1.</_>\n        <_>\n          9 19 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 9 -1.</_>\n        <_>\n          9 15 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 18 2 -1.</_>\n        <_>\n          5 12 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 15 6 -1.</_>\n        <_>\n          2 8 15 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 18 3 -1.</_>\n        <_>\n          6 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 3 18 -1.</_>\n        <_>\n          6 0 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 3 6 10 -1.</_>\n        <_>\n          20 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 6 10 -1.</_>\n        <_>\n          2 3 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 9 -1.</_>\n        <_>\n          10 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 5 8 9 -1.</_>\n        <_>\n          10 5 4 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 2 20 3 -1.</_>\n        <_>\n          3 3 20 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 4 -1.</_>\n        <_>\n          5 4 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          17 0 7 14 -1.</_>\n        <_>\n          17 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 7 14 -1.</_>\n        <_>\n          0 7 7 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 11 10 6 -1.</_>\n        <_>\n          9 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 10 6 -1.</_>\n        <_>\n          10 11 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 6 3 18 -1.</_>\n        <_>\n          11 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 16 18 3 -1.</_>\n        <_>\n          6 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 9 10 -1.</_>\n        <_>\n          4 11 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 7 15 4 -1.</_>\n        <_>\n          9 9 15 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 6 12 6 -1.</_>\n        <_>\n          5 6 6 3 2.</_>\n        <_>\n          11 9 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 1 12 9 -1.</_>\n        <_>\n          6 4 12 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 9 6 12 -1.</_>\n        <_>\n          7 9 3 6 2.</_>\n        <_>\n          10 15 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 5 13 6 -1.</_>\n        <_>\n          11 7 13 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 11 22 13 -1.</_>\n        <_>\n          12 11 11 13 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 8 6 6 -1.</_>\n        <_>\n          18 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 6 6 -1.</_>\n        <_>\n          0 11 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 6 24 3 -1.</_>\n        <_>\n          0 7 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 10 6 -1.</_>\n        <_>\n          0 7 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 7 18 3 -1.</_>\n        <_>\n          6 8 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 6 -1.</_>\n        <_>\n          0 2 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 0 3 19 -1.</_>\n        <_>\n          20 0 1 19 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 6 12 16 -1.</_>\n        <_>\n          4 6 6 8 2.</_>\n        <_>\n          10 14 6 8 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          19 6 4 18 -1.</_>\n        <_>\n          21 6 2 9 2.</_>\n        <_>\n          19 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 4 18 -1.</_>\n        <_>\n          1 6 2 9 2.</_>\n        <_>\n          3 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 21 18 3 -1.</_>\n        <_>\n          3 22 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 19 9 4 -1.</_>\n        <_>\n          0 21 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 18 12 6 -1.</_>\n        <_>\n          18 18 6 3 2.</_>\n        <_>\n          12 21 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 18 9 4 -1.</_>\n        <_>\n          7 20 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 16 10 8 -1.</_>\n        <_>\n          17 16 5 4 2.</_>\n        <_>\n          12 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 16 10 8 -1.</_>\n        <_>\n          2 16 5 4 2.</_>\n        <_>\n          7 20 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 0 10 12 -1.</_>\n        <_>\n          19 0 5 6 2.</_>\n        <_>\n          14 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 10 12 -1.</_>\n        <_>\n          0 0 5 6 2.</_>\n        <_>\n          5 6 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 14 9 6 -1.</_>\n        <_>\n          15 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 9 6 -1.</_>\n        <_>\n          0 16 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 14 10 6 -1.</_>\n        <_>\n          14 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 10 6 -1.</_>\n        <_>\n          0 16 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 18 18 2 -1.</_>\n        <_>\n          5 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 3 -1.</_>\n        <_>\n          0 19 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 5 18 12 -1.</_>\n        <_>\n          12 5 9 6 2.</_>\n        <_>\n          3 11 9 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 3 7 9 -1.</_>\n        <_>\n          5 6 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 19 15 -1.</_>\n        <_>\n          4 5 19 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 0 16 4 -1.</_>\n        <_>\n          3 2 16 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 12 16 12 -1.</_>\n        <_>\n          4 12 8 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 3 12 15 -1.</_>\n        <_>\n          10 3 6 15 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 4 2 19 -1.</_>\n        <_>\n          16 4 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 2 19 -1.</_>\n        <_>\n          7 4 1 19 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 14 8 10 -1.</_>\n        <_>\n          17 14 4 5 2.</_>\n        <_>\n          13 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 14 8 10 -1.</_>\n        <_>\n          3 14 4 5 2.</_>\n        <_>\n          7 19 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 11 12 6 -1.</_>\n        <_>\n          5 11 6 3 2.</_>\n        <_>\n          11 14 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 8 10 -1.</_>\n        <_>\n          14 5 4 5 2.</_>\n        <_>\n          10 10 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 4 12 10 -1.</_>\n        <_>\n          6 4 6 5 2.</_>\n        <_>\n          12 9 6 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 18 10 -1.</_>\n        <_>\n          15 8 9 5 2.</_>\n        <_>\n          6 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 18 10 -1.</_>\n        <_>\n          0 8 9 5 2.</_>\n        <_>\n          9 13 9 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 14 18 3 -1.</_>\n        <_>\n          0 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 6 3 18 -1.</_>\n        <_>\n          12 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 6 3 18 -1.</_>\n        <_>\n          9 12 3 6 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 18 3 -1.</_>\n        <_>\n          6 15 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 5 18 3 -1.</_>\n        <_>\n          0 6 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 5 22 3 -1.</_>\n        <_>\n          2 6 22 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 21 10 -1.</_>\n        <_>\n          7 0 7 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 3 18 17 -1.</_>\n        <_>\n          12 3 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 18 17 -1.</_>\n        <_>\n          6 3 6 17 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 24 11 -1.</_>\n        <_>\n          8 12 8 11 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 10 16 6 -1.</_>\n        <_>\n          4 13 16 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 8 6 8 -1.</_>\n        <_>\n          12 12 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 8 7 -1.</_>\n        <_>\n          10 14 4 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 10 6 14 -1.</_>\n        <_>\n          18 10 3 7 2.</_>\n        <_>\n          15 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 6 14 -1.</_>\n        <_>\n          3 10 3 7 2.</_>\n        <_>\n          6 17 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 12 18 2 -1.</_>\n        <_>\n          6 13 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 10 6 -1.</_>\n        <_>\n          5 10 10 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 11 9 4 -1.</_>\n        <_>\n          12 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 11 9 6 -1.</_>\n        <_>\n          0 13 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 2 3 18 -1.</_>\n        <_>\n          12 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 2 3 18 -1.</_>\n        <_>\n          11 2 1 18 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 12 6 10 -1.</_>\n        <_>\n          11 12 2 10 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 10 6 9 -1.</_>\n        <_>\n          1 13 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 16 6 -1.</_>\n        <_>\n          14 9 8 3 2.</_>\n        <_>\n          6 12 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 8 9 6 -1.</_>\n        <_>\n          1 10 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 7 16 6 -1.</_>\n        <_>\n          7 9 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 0 18 3 -1.</_>\n        <_>\n          0 1 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 0 6 9 -1.</_>\n        <_>\n          12 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 5 6 6 -1.</_>\n        <_>\n          12 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 0 6 9 -1.</_>\n        <_>\n          10 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 9 -1.</_>\n        <_>\n          9 4 6 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 0 18 9 -1.</_>\n        <_>\n          1 3 18 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 3 24 3 -1.</_>\n        <_>\n          0 4 24 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 14 9 4 -1.</_>\n        <_>\n          6 16 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 9 8 10 -1.</_>\n        <_>\n          12 9 4 5 2.</_>\n        <_>\n          8 14 4 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 13 9 -1.</_>\n        <_>\n          5 5 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 16 9 -1.</_>\n        <_>\n          4 7 16 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 4 14 9 -1.</_>\n        <_>\n          4 7 14 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 9 6 -1.</_>\n        <_>\n          8 7 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 7 16 6 -1.</_>\n        <_>\n          1 9 16 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 5 13 9 -1.</_>\n        <_>\n          10 8 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 5 13 9 -1.</_>\n        <_>\n          1 8 13 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 4 24 6 -1.</_>\n        <_>\n          12 4 12 3 2.</_>\n        <_>\n          0 7 12 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 14 10 9 -1.</_>\n        <_>\n          1 17 10 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 17 18 3 -1.</_>\n        <_>\n          5 18 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 18 3 -1.</_>\n        <_>\n          0 17 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 17 9 6 -1.</_>\n        <_>\n          9 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 20 22 4 -1.</_>\n        <_>\n          1 20 11 2 2.</_>\n        <_>\n          12 22 11 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 14 8 6 -1.</_>\n        <_>\n          8 17 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 6 8 15 -1.</_>\n        <_>\n          8 11 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 4 18 3 -1.</_>\n        <_>\n          5 5 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 3 5 10 -1.</_>\n        <_>\n          9 8 5 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 8 12 3 -1.</_>\n        <_>\n          6 8 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 6 18 6 -1.</_>\n        <_>\n          2 6 9 3 2.</_>\n        <_>\n          11 9 9 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 6 4 18 -1.</_>\n        <_>\n          12 6 2 9 2.</_>\n        <_>\n          10 15 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          7 5 6 6 -1.</_>\n        <_>\n          10 5 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 5 2 18 -1.</_>\n        <_>\n          14 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          8 5 2 18 -1.</_>\n        <_>\n          8 14 2 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 2 10 6 -1.</_>\n        <_>\n          9 2 5 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 18 12 -1.</_>\n        <_>\n          12 1 9 12 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 2 17 22 -1.</_>\n        <_>\n          5 13 17 11 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          4 0 12 6 -1.</_>\n        <_>\n          4 2 12 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 9 16 6 -1.</_>\n        <_>\n          14 9 8 3 2.</_>\n        <_>\n          6 12 8 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 0 5 18 -1.</_>\n        <_>\n          9 9 5 9 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 0 6 9 -1.</_>\n        <_>\n          14 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 0 6 9 -1.</_>\n        <_>\n          8 0 2 9 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 12 -1.</_>\n        <_>\n          11 1 2 12 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 9 13 4 -1.</_>\n        <_>\n          5 11 13 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 19 3 -1.</_>\n        <_>\n          5 9 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 9 6 8 -1.</_>\n        <_>\n          9 13 6 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 9 4 15 -1.</_>\n        <_>\n          11 14 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 0 6 14 -1.</_>\n        <_>\n          2 0 3 7 2.</_>\n        <_>\n          5 7 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 1 6 14 -1.</_>\n        <_>\n          18 1 3 7 2.</_>\n        <_>\n          15 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 1 6 14 -1.</_>\n        <_>\n          3 1 3 7 2.</_>\n        <_>\n          6 8 3 7 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 20 18 4 -1.</_>\n        <_>\n          12 20 9 2 2.</_>\n        <_>\n          3 22 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 0 4 20 -1.</_>\n        <_>\n          5 0 2 10 2.</_>\n        <_>\n          7 10 2 10 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 8 8 12 -1.</_>\n        <_>\n          20 8 4 6 2.</_>\n        <_>\n          16 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 8 8 12 -1.</_>\n        <_>\n          0 8 4 6 2.</_>\n        <_>\n          4 14 4 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 13 10 8 -1.</_>\n        <_>\n          18 13 5 4 2.</_>\n        <_>\n          13 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 13 10 8 -1.</_>\n        <_>\n          1 13 5 4 2.</_>\n        <_>\n          6 17 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 8 4 15 -1.</_>\n        <_>\n          15 13 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          5 8 4 15 -1.</_>\n        <_>\n          5 13 4 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 11 16 12 -1.</_>\n        <_>\n          6 15 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          2 11 16 12 -1.</_>\n        <_>\n          2 15 16 4 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          14 12 7 9 -1.</_>\n        <_>\n          14 15 7 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          10 1 3 21 -1.</_>\n        <_>\n          10 8 3 7 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 11 9 4 -1.</_>\n        <_>\n          13 13 9 2 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 10 17 9 -1.</_>\n        <_>\n          3 13 17 3 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          13 8 8 15 -1.</_>\n        <_>\n          13 13 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 8 8 15 -1.</_>\n        <_>\n          3 13 8 5 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          11 14 10 8 -1.</_>\n        <_>\n          16 14 5 4 2.</_>\n        <_>\n          11 18 5 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 22 6 -1.</_>\n        <_>\n          0 18 11 3 2.</_>\n        <_>\n          11 21 11 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 16 24 4 -1.</_>\n        <_>\n          0 16 12 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          6 20 12 3 -1.</_>\n        <_>\n          12 20 6 3 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          18 12 6 12 -1.</_>\n        <_>\n          21 12 3 6 2.</_>\n        <_>\n          18 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 12 6 12 -1.</_>\n        <_>\n          0 12 3 6 2.</_>\n        <_>\n          3 18 3 6 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          1 6 22 10 -1.</_>\n        <_>\n          1 6 11 5 2.</_>\n        <_>\n          12 11 11 5 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 18 18 2 -1.</_>\n        <_>\n          0 19 18 1 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 15 19 3 -1.</_>\n        <_>\n          3 16 19 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 18 3 -1.</_>\n        <_>\n          0 14 18 1 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          15 17 9 6 -1.</_>\n        <_>\n          15 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 17 9 6 -1.</_>\n        <_>\n          0 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          12 17 9 6 -1.</_>\n        <_>\n          12 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          3 17 9 6 -1.</_>\n        <_>\n          3 19 9 2 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          16 2 3 20 -1.</_>\n        <_>\n          17 2 1 20 3.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          0 13 24 8 -1.</_>\n        <_>\n          0 17 24 4 2.</_></rects></_>\n    <_>\n      <rects>\n        <_>\n          9 1 6 22 -1.</_>\n        <_>\n          12 1 3 11 2.</_>\n        <_>\n          9 12 3 11 2.</_></rects></_></features></cascade>\n</opencv_storage>\n"
  },
  {
    "path": "examples/pil_image.py",
    "content": "\nimport popsicle as juce\n\n\nclass ImageJuce(juce.Image):\n    def __init__(self, im):\n        \"\"\"\n        An PIL image wrapper for JUCE. This is a subclass of JUCE's Image class.\n\n        :param im: A PIL Image object.\n        \"\"\"\n        if im.mode == \"RGB\":\n            im = im.convert(\"RGBA\")\n            data = im.tobytes(\"raw\", \"BGRA\")\n            format = juce.Image.ARGB\n        elif im.mode == \"RGBA\":\n            data = im.tobytes(\"raw\", \"BGRA\")\n            format = juce.Image.ARGB\n        else:\n            raise ValueError(f\"Unsupported image format: {im.mode}\")\n\n        juce.Image.__init__(self, format, im.size[0], im.size[1], False)\n\n        pixels = juce.Image.BitmapData(self, 0, 0, im.size[0], im.size[1], juce.Image.BitmapData.writeOnly)\n        pixels.data = data\n"
  },
  {
    "path": "examples/radio_buttons_checkboxes.py",
    "content": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n    genderLabel = juce.Label(\"\", \"I identify my gender as...\")\n    maleButton = juce.ToggleButton(\"Male\")\n    femaleButton = juce.ToggleButton(\"Female\")\n\n    hobbiesLabel = juce.Label(\"\", \"My hobbies are...\")\n    sportButton = juce.ToggleButton(\"Sport\")\n    artButton = juce.ToggleButton(\"Art\")\n    filmButton = juce.ToggleButton(\"Film\")\n\n    GenderButtons = 1001\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        self.addAndMakeVisible(self.genderLabel)\n        self.addAndMakeVisible(self.maleButton)\n        self.addAndMakeVisible(self.femaleButton)\n        self.maleButton.onClick = lambda: self.updateToggleState(self.maleButton, \"Male\")\n        self.femaleButton.onClick = lambda: self.updateToggleState(self.femaleButton, \"Female\")\n        self.maleButton.setRadioGroupId(self.GenderButtons, juce.dontSendNotification)\n        self.femaleButton.setRadioGroupId(self.GenderButtons, juce.dontSendNotification)\n\n        self.addAndMakeVisible(self.hobbiesLabel)\n        self.addAndMakeVisible(self.sportButton)\n        self.addAndMakeVisible(self.artButton)\n        self.addAndMakeVisible(self.filmButton)\n        self.sportButton.onClick = lambda: self.updateToggleState(self.sportButton, \"Sport\")\n        self.artButton.onClick = lambda: self.updateToggleState(self.artButton, \"Art\")\n        self.filmButton.onClick = lambda: self.updateToggleState(self.filmButton, \"Film\")\n\n        self.maleButton.setClickingTogglesState(True)\n        self.femaleButton.setClickingTogglesState(True)\n        self.sportButton.setClickingTogglesState(True)\n        self.artButton.setClickingTogglesState(True)\n        self.filmButton.setClickingTogglesState(True)\n\n        self.setSize(400, 300)\n\n    def resized(self):\n        self.genderLabel.setBounds (10, 10, self.getWidth() - 20, 20)\n        self.maleButton.setBounds (20, 40, self.getWidth() - 30, 20)\n        self.femaleButton.setBounds (20, 70, self.getWidth() - 30, 20)\n\n        self.hobbiesLabel.setBounds (10, 110, self.getWidth() - 20, 20)\n        self.sportButton.setBounds (20, 140, self.getWidth() - 30, 20)\n        self.artButton.setBounds (20, 170, self.getWidth() - 30, 20)\n        self.filmButton.setBounds (20, 200, self.getWidth() - 30, 20)\n\n    def updateToggleState(self, button, name):\n        state = button.getToggleState()\n        stateString = \"ON\" if state else \"OFF\"\n        selectedString = \" (selected)\" if state else \"\"\n\n        print(name, \"Button changed to\", stateString)\n        button.setButtonText(name + selectedString)\n\n\nif __name__ == \"__main__\":\n\tSTART_JUCE_COMPONENT(MainContentComponent, name=\"Radio Button And Checkboxes\")\n"
  },
  {
    "path": "examples/slider_decibels.py",
    "content": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass DecibelSlider(juce.Slider):\n    def __init__(self):\n        juce.Slider.__init__(self)\n\n    def getValueFromText(self, text):\n        minusInfinitydB = -100.0\n\n        decibelText = text.upToFirstOccurrenceOf(\"dB\", False, False).trim()\n\n        return minusInfinitydB if decibelText.equalsIgnoreCase(\"-INF\") else decibelText.getDoubleValue()\n\n    def getTextFromValue(self, value):\n        return juce.Decibels.toString(value)\n\n\nclass MainContentComponent(juce.AudioAppComponent):\n    decibelSlider = juce.Slider()\n    decibelLabel = juce.Label()\n    random = juce.Random()\n    level = 0.0\n\n    def __init__(self):\n        juce.AudioAppComponent.__init__(self)\n\n        self.decibelSlider.setRange(-100, -12)\n        self.decibelSlider.setTextBoxStyle(juce.Slider.TextBoxRight, False, 100, 20)\n\n        def valueChanged():\n            self.level = juce.Decibels.decibelsToGain(float(self.decibelSlider.getValue()))\n\n        self.decibelSlider.onValueChange = valueChanged\n        self.decibelSlider.setValue(juce.Decibels.gainToDecibels(self.level))\n        self.decibelLabel.setText(\"Noise Level in dB\", juce.dontSendNotification)\n\n        self.addAndMakeVisible(self.decibelSlider)\n        self.addAndMakeVisible(self.decibelLabel)\n\n        self.setSize(600, 100)\n        self.setAudioChannels(0, 2)\n\n    def visibilityChanged(self):\n        if not self.isVisible():\n            self.shutdownAudio()\n\n    def prepareToPlay(self, blockSize, sampleRate):\n        pass\n\n    def getNextAudioBlock(self, bufferToFill):\n        currentLevel = self.level\n        levelScale = currentLevel * 2.0\n\n        for channel in range(bufferToFill.buffer.getNumChannels()):\n            buffer = bufferToFill.buffer.getWritePointer(channel, bufferToFill.startSample)\n\n            for sample in range(bufferToFill.numSamples):\n                buffer[sample] = self.random.nextFloat() * levelScale - currentLevel\n\n    def releaseResources(self):\n        pass\n\n    def resized(self):\n        self.decibelLabel .setBounds(10, 10, 120, 20);\n        self.decibelSlider.setBounds(130, 10, self.getWidth() - 140, 20);\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Slider Decibels Example\")\n"
  },
  {
    "path": "examples/slider_values.py",
    "content": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n    frequencySlider = juce.Slider()\n    frequencyLabel = juce.Label()\n    durationSlider = juce.Slider()\n    durationLabel = juce.Label()\n\n    def __init__(self):\n        juce.Component.__init__(self)\n\n        self.addAndMakeVisible(self.frequencySlider)\n        self.frequencySlider.setRange(50.0, 5000.0)\n        self.frequencySlider.setTextValueSuffix(\" Hz\")\n        self.frequencySlider.onValueChange = lambda: self.durationSlider.setValue(1.0 / self.frequencySlider.getValue(), juce.dontSendNotification)\n\n        self.addAndMakeVisible(self.frequencyLabel)\n        self.frequencyLabel.setText(\"Frequency\", juce.dontSendNotification)\n        self.frequencyLabel.attachToComponent(self.frequencySlider, True)\n\n        self.addAndMakeVisible(self.durationSlider)\n        self.durationSlider.setRange(1.0 / self.frequencySlider.getMaximum(), 1.0 / self.frequencySlider.getMinimum())\n        self.durationSlider.setTextValueSuffix(\" s\")\n        self.durationSlider.onValueChange = lambda: self.frequencySlider.setValue (1.0 / self.durationSlider.getValue(), juce.dontSendNotification)\n\n        self.addAndMakeVisible(self.durationLabel)\n        self.durationLabel.setText(\"Duration\", juce.dontSendNotification)\n        self.durationLabel.attachToComponent(self.durationSlider, True)\n\n        self.frequencySlider.setValue(500.0)\n\n        self.frequencySlider.setTextBoxStyle(juce.Slider.TextBoxLeft, False, 160, self.frequencySlider.getTextBoxHeight())\n        self.durationSlider.setTextBoxStyle(juce.Slider.TextBoxLeft, False, 160, self.durationSlider.getTextBoxHeight())\n\n        self.frequencySlider.setSkewFactorFromMidPoint(500)\n        self.durationSlider.setSkewFactorFromMidPoint(0.002)\n\n        self.setSize(600, 90)\n\n    def resized(self):\n        sliderLeft = 120\n        self.frequencySlider.setBounds(sliderLeft, 20, self.getWidth() - sliderLeft - 10, 20)\n        self.durationSlider.setBounds(sliderLeft, 50, self.getWidth() - sliderLeft - 10, 20)\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Slider Values Example\")\n"
  },
  {
    "path": "examples/table_list_box.py",
    "content": "import os\nimport re\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\ndef forEachXmlChildElement(parentXmlElement):\n    childElementVariableName = parentXmlElement.getFirstChildElement()\n    while childElementVariableName:\n        yield childElementVariableName\n        childElementVariableName = childElementVariableName.getNextElement()\n\n\ndef compareNatural(x, y):\n     x = [int(c) if c.isdigit() else c for c in re.split(r'(\\d+)', x)]\n     y = [int(c) if c.isdigit() else c for c in re.split(r'(\\d+)', y)]\n     if x == y:\n          return 0\n     elif x > y:\n          return 1\n     else:\n          return -1\n\n\nclass EditableLabel(juce.Label):\n    def __init__(self, td):\n        super().__init__()\n\n        self.owner = td\n        self.row = 0\n        self.columnId = 0\n\n        self.setEditable(False, True, False)\n\n    def mouseDown(self, event):\n        self.owner.table.selectRowsBasedOnModifierKeys(self.row, event.mods, False)\n\n        super().mouseDown(event)\n\n    def textWasEdited(self):\n        self.owner.setText(self.columnId, self.row, self.getText())\n\n    def setRowAndColumn(self, newRow, newColumn):\n        self.row = newRow\n        self.columnId = newColumn\n\n        text = self.owner.getText(self.columnId, self.row)\n        self.setText(text, juce.dontSendNotification)\n\n\nclass EditableTextCustomComponent(juce.Component):\n    def __init__(self, td):\n        super().__init__()\n\n        self.label = EditableLabel(td)\n        self.addAndMakeVisible(self.label)\n\n    def resized(self):\n        self.label.setBounds(self.getLocalBounds())\n\n    def setRowAndColumn(self, newRow, newColumn):\n        self.label.setRowAndColumn(newRow, newColumn)\n\n\nclass SelectionColumnCustomComponent(juce.Component):\n    def __init__(self, td):\n        super().__init__()\n\n        self.owner = td\n        self.row = 0\n        self.columnId = 0\n\n        self.toggleButton = juce.ToggleButton()\n        self.toggleButton.onClick = lambda: self.owner.setSelection(self.row, self.toggleButton.getToggleState())\n        self.addAndMakeVisible(self.toggleButton)\n\n    def resized(self):\n        self.toggleButton.setBoundsInset(juce.BorderSize[int](2))\n\n    def setRowAndColumn(self, newRow, newColumn):\n        self.row = newRow\n        self.columnId = newColumn\n\n        self.toggleButton.setToggleState(self.owner.getSelection(self.row), juce.dontSendNotification)\n\n\nclass TutorialDataSorter(juce.XmlElement.Comparator):\n    def __init__(self, attributeToSortBy, forwards):\n        super().__init__()\n        self.attributeToSort = attributeToSortBy\n        self.direction = 1 if forwards else -1\n\n    def compareElements(self, first, second):\n        sortWith = second.getStringAttribute(self.attributeToSort)\n        result = compareNatural(first.getStringAttribute(self.attributeToSort), sortWith)\n\n        if result == 0:\n            result = compareNatural(first.getStringAttribute(\"ID\"), second.getStringAttribute(\"ID\"))\n\n        return self.direction * result\n\n\nclass TableTutorialComponent(juce.Component, juce.TableListBoxModel):\n    font = juce.Font(juce.FontOptions(14.0))\n    numRows = 0\n    columnList = None\n    dataList = None\n\n    def __init__(self):\n        juce.Component.__init__(self)\n        juce.TableListBoxModel.__init__(self)\n\n        if not self.loadData():\n            print(\"Failed loading data\")\n            return\n\n        self.table = juce.TableListBox(\"Table\", self)\n        self.addAndMakeVisible(self.table)\n\n        header = self.table.getHeader()\n\n        if self.columnList:\n            for columnXml in forEachXmlChildElement(self.columnList):\n                header.addColumn(\n                    columnXml.getStringAttribute(\"name\"),\n                    columnXml.getIntAttribute(\"columnId\"),\n                    columnXml.getIntAttribute(\"width\"),\n                    50,\n                    400,\n                    juce.TableHeaderComponent.defaultFlags)\n\n        header.setSortColumnId(1, True)\n\n        self.table.setMultipleSelectionEnabled(True)\n        self.table.setColour(juce.ListBox.outlineColourId, juce.Colours.grey)\n        self.table.setOutlineThickness(1)\n\n    def getNumRows(self):\n        return self.numRows\n\n    def paintRowBackground(self, g, rowNumber, width, height, rowIsSelected):\n        alternateColour = self.getLookAndFeel().findColour(juce.ListBox.backgroundColourId) \\\n            .interpolatedWith(self.getLookAndFeel().findColour(juce.ListBox.textColourId), 0.03)\n\n        if rowIsSelected:\n            g.fillAll(juce.Colours.lightblue)\n        elif rowNumber % 2:\n            g.fillAll(alternateColour)\n\n    def paintCell(self, g, rowNumber, columnId, width, height, rowIsSelected):\n        g.setColour(juce.Colours.darkblue if rowIsSelected else self.getLookAndFeel().findColour(juce.ListBox.textColourId))\n        g.setFont(self.font)\n\n        if self.dataList is None or rowNumber >= self.numRows:\n            return\n\n        rowElement = self.dataList.getChildElement(rowNumber)\n        if rowElement:\n            text = rowElement.getStringAttribute(self.getAttributeNameForColumnId(columnId))\n\n            g.drawText(text, 2, 0, width - 4, height, juce.Justification.centredLeft, True)\n\n        g.setColour(self.getLookAndFeel().findColour(juce.ListBox.backgroundColourId))\n        g.fillRect(width - 1, 0, 1, height)\n\n    def sortOrderChanged(self, newSortColumnId, isForwards):\n        if newSortColumnId != 0 and self.dataList:\n            sorter = TutorialDataSorter(self.getAttributeNameForColumnId(newSortColumnId), isForwards)\n\n            self.dataList.sortChildElements(sorter, True)\n\n            self.table.updateContent()\n\n    def refreshComponentForCell(self, rowNumber, columnId, isRowSelected, existingComponentToUpdate):\n        if columnId == 9:\n            if existingComponentToUpdate:\n                selectionBox = existingComponentToUpdate\n            else:\n                selectionBox = SelectionColumnCustomComponent(self)\n\n            selectionBox.setRowAndColumn(rowNumber, columnId)\n            return selectionBox\n\n        if columnId == 8:\n            if existingComponentToUpdate:\n                textLabel = existingComponentToUpdate\n            else:\n                textLabel = EditableTextCustomComponent(self)\n\n            textLabel.setRowAndColumn(rowNumber, columnId)\n            return textLabel\n\n        assert not existingComponentToUpdate\n        return None\n\n    def getColumnAutoSizeWidth(self, columnId):\n        if columnId == 9:\n            return 50\n\n        widest = 32\n\n        for i in range(self.numRows, 0, -1):\n            rowElement = self.dataList.getChildElement(i)\n            if rowElement:\n                text = rowElement.getStringAttribute(self.getAttributeNameForColumnId(columnId))\n\n                widest = juce.jmax(widest, self.font.getStringWidth(text))\n\n        return widest + 8\n\n    def getSelection(self, rowNumber):\n        return self.dataList.getChildElement(rowNumber).getIntAttribute(\"Select\")\n\n    def setSelection(self, rowNumber, newSelection):\n        self.dataList.getChildElement(rowNumber).setAttribute(\"Select\", newSelection)\n\n    def getText(self, columnNumber, rowNumber):\n        el = self.dataList.getChildElement(rowNumber)\n        attr = self.getAttributeNameForColumnId(columnNumber)\n        return el.getStringAttribute(attr)\n\n    def setText(self, columnNumber, rowNumber, newText):\n        columnName = self.table.getHeader().getColumnName(columnNumber)\n        self.dataList.getChildElement(rowNumber).setAttribute(columnName, newText)\n\n    def resized(self):\n        self.table.setBoundsInset(juce.BorderSize[int](8))\n\n    def loadData(self):\n        tableFile = juce.File(os.path.abspath(__file__)).getSiblingFile(\"table_list_box.xml\")\n\n        if not tableFile.existsAsFile():\n            return False\n\n        self.tutorialData = juce.XmlDocument.parse(tableFile)\n        self.dataList = self.tutorialData.getChildByName(\"DATA\")\n        self.columnList = self.tutorialData.getChildByName(\"HEADERS\")\n        self.numRows = self.dataList.getNumChildElements()\n        return True\n\n    def getAttributeNameForColumnId(self, columnId):\n        for columnXml in forEachXmlChildElement(self.columnList):\n            if columnXml.getIntAttribute(\"columnId\") == columnId:\n                return columnXml.getStringAttribute(\"name\")\n\n        return \"\"\n\n\nclass MainContentComponent(juce.Component):\n    def __init__(self):\n        super().__init__()\n\n        self.table = TableTutorialComponent()\n        self.addAndMakeVisible(self.table)\n\n        self.setSize(1200, 600)\n\n    def paint(self, g):\n        g.fillAll(self.getLookAndFeel().findColour(juce.ResizableWindow.backgroundColourId))\n\n    def resized(self):\n        self.table.setBounds(self.getLocalBounds())\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Table List Box\")\n"
  },
  {
    "path": "examples/table_list_box.xml",
    "content": "<TABLE_DATA>\n    <HEADERS>\n        <COLUMN columnId=\"1\" name=\"ID\" width=\"50\"/>\n        <COLUMN columnId=\"2\" name=\"Module\" width=\"200\"/>\n        <COLUMN columnId=\"3\" name=\"Name\" width=\"200\"/>\n        <COLUMN columnId=\"4\" name=\"Version\" width=\"100\"/>\n        <COLUMN columnId=\"5\" name=\"License\" width=\"100\"/>\n        <COLUMN columnId=\"6\" name=\"Groups\" width=\"50\"/>\n        <COLUMN columnId=\"7\" name=\"Dependencies\" width=\"50\"/>\n        <COLUMN columnId=\"8\" name=\"Description\" width=\"300\"/>\n        <COLUMN columnId=\"9\" name=\"Select\" width=\"50\"/>\n    </HEADERS>\n    <DATA>\n        <ITEM ID=\"01\" Module=\"juce_analytics\" Name=\"JUCE analytics classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"2\" Dependencies=\"1\" Description=\"Classes to collect analytics and send to destinations.\" Select=\"0\"/>\n        <ITEM ID=\"02\" Module=\"juce_audio_basics\" Name=\"JUCE audio and MIDI data classes\" Version=\"5.2.0\" License=\"ISC\" Groups=\"7\" Dependencies=\"1\" Description=\"Classes for audio buffer manipulation, midi message handling, synthesis, etc.\" Select=\"0\"/>\n        <ITEM ID=\"03\" Module=\"juce_audio_devices\" Name=\"JUCE audio and MIDI I/O device classes\" Version=\"5.2.0\" License=\"ISC\" Groups=\"3\" Dependencies=\"2\" Description=\"Classes to play and record from audio and MIDI I/O devices.\" Select=\"0\"/>\n        <ITEM ID=\"04\" Module=\"juce_audio_formats\" Name=\"JUCE audio file format codecs\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"3\" Dependencies=\"1\" Description=\"Classes for reading and writing various audio file formats.\" Select=\"0\"/>\n        <ITEM ID=\"05\" Module=\"juce_audio_plugin_client\" Name=\"JUCE audio plugin wrapper classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"7\" Dependencies=\"3\" Description=\"Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins.\" Select=\"0\"/>\n        <ITEM ID=\"06\" Module=\"juce_audio_processors\" Name=\"JUCE audio processor classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"5\" Dependencies=\"2\" Description=\"Classes for loading and playing VST, AU, or internally-generated audio processors.\" Select=\"0\"/>\n        <ITEM ID=\"07\" Module=\"juce_audio_utils\" Name=\"JUCE extra audio utility classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"3\" Dependencies=\"4\" Description=\"Classes for audio-related GUI and miscellaneous tasks.\" Select=\"0\"/>\n        <ITEM ID=\"08\" Module=\"juce_blocks_basics\" Name=\"Provides low-level control over ROLI BLOCKS devices\" Version=\"5.2.0\" License=\"ISC\" Groups=\"6\" Dependencies=\"2\" Description=\"JUCE wrapper for low-level control over ROLI BLOCKS devices.\" Select=\"0\"/>\n        <ITEM ID=\"09\" Module=\"juce_box2d\" Name=\"JUCE wrapper for the Box2D physics engine\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"2\" Dependencies=\"1\" Description=\"The Box2D physics engine and some utility classes.\" Select=\"0\"/>\n        <ITEM ID=\"10\" Module=\"juce_core\" Name=\"JUCE core classes\" Version=\"5.2.0\" License=\"ISC\" Groups=\"16\" Dependencies=\"0\" Description=\"The essential set of basic JUCE classes, as required by all the other JUCE modules.\" Select=\"1\"/>\n        <ITEM ID=\"11\" Module=\"juce_cryptography\" Name=\"JUCE cryptography classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"2\" Dependencies=\"1\" Description=\"Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.\" Select=\"0\"/>\n        <ITEM ID=\"12\" Module=\"juce_data_structures\" Name=\"JUCE data model helper classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"3\" Dependencies=\"1\" Description=\"Classes for undo/redo management, and smart data structures.\" Select=\"1\"/>\n        <ITEM ID=\"13\" Module=\"juce_dsp\" Name=\"JUCE DSP classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"5\" Dependencies=\"3\" Description=\"Classes for audio buffer manipulation, digital audio processing, filtering, oversampling, fast math functions etc.\" Select=\"0\"/>\n        <ITEM ID=\"14\" Module=\"juce_events\" Name=\"JUCE message and event handling classes\" Version=\"5.2.0\" License=\"ISC\" Groups=\"4\" Dependencies=\"1\" Description=\"Classes for running an application's main event loop and sending/receiving messages, timers, etc.\" Select=\"1\"/>\n        <ITEM ID=\"15\" Module=\"juce_graphics\" Name=\"JUCE graphics classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"8\" Dependencies=\"1\" Description=\"Classes for 2D vector graphics, image loading/saving, font handling, etc.\" Select=\"1\"/>\n        <ITEM ID=\"16\" Module=\"juce_gui_basics\" Name=\"JUCE GUI core classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"16\" Dependencies=\"3\" Description=\"Basic user-interface components and related classes.\" Select=\"1\"/>\n        <ITEM ID=\"17\" Module=\"juce_gui_extra\" Name=\"JUCE extended GUI classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"4\" Dependencies=\"1\" Description=\"Miscellaneous GUI classes for specialised tasks.\" Select=\"0\"/>\n        <ITEM ID=\"18\" Module=\"juce_opengl\" Name=\"JUCE OpenGL classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"3\" Dependencies=\"1\" Description=\"Classes for rendering OpenGL in a JUCE window.\" Select=\"0\"/>\n        <ITEM ID=\"19\" Module=\"juce_osc\" Name=\"JUCE OSC classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"1\" Dependencies=\"2\" Description=\"Open Sound Control implementation.\" Select=\"0\"/>\n        <ITEM ID=\"20\" Module=\"juce_product_unlocking\" Name=\"JUCE Online marketplace support\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"2\" Dependencies=\"2\" Description=\"Classes for online product authentication.\" Select=\"0\"/>\n        <ITEM ID=\"21\" Module=\"juce_video\" Name=\"JUCE video playback and capture classes\" Version=\"5.2.0\" License=\"GPL/Commercial\" Groups=\"2\" Dependencies=\"2\" Description=\"Classes for playing video and capturing camera input.\" Select=\"0\"/>\n    </DATA>\n</TABLE_DATA>\n"
  },
  {
    "path": "examples/wavetable_oscillator.py",
    "content": "import math\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass WavetableOscillator(object):\n    wavetable = None\n    tableSize = 0\n    currentIndex = 0.0\n    tableDelta = 0.0\n\n    def __init__(self, wavetableToUse):\n        self.wavetable = wavetableToUse\n        self.tableSize = self.wavetable.getNumSamples() - 1\n\n        assert self.wavetable.getNumChannels() == 1\n\n    def setFrequency(self, frequency, sampleRate):\n        tableSizeOverSampleRate = float(self.tableSize) / sampleRate\n        self.tableDelta = frequency * tableSizeOverSampleRate\n\n    def getNextSample(self):\n        index0 = int(self.currentIndex)\n        index1 = index0 + 1\n\n        frac = self.currentIndex - float(index0)\n\n        table = self.wavetable.getReadPointer(0)\n        value0 = table[index0]\n        value1 = table[index1]\n\n        currentSample = value0 + frac * (value1 - value0)\n\n        self.currentIndex += self.tableDelta\n        if self.currentIndex > self.tableSize:\n            self.currentIndex -= self.tableSize\n\n        return currentSample\n\n\nclass MainContentComponent(juce.AudioAppComponent, juce.Timer):\n    cpuUsageLabel = juce.Label()\n    cpuUsageText = juce.Label()\n\n    tableSize = 1 << 7\n    level = 0.0\n\n    sineTable = juce.AudioSampleBuffer()\n    oscillators = []\n\n    def __init__(self):\n        juce.AudioAppComponent.__init__(self)\n        juce.Timer.__init__(self)\n\n        self.cpuUsageLabel.setText(\"CPU Usage\", juce.dontSendNotification)\n        self.cpuUsageText.setJustificationType(juce.Justification.right)\n        self.addAndMakeVisible(self.cpuUsageLabel)\n        self.addAndMakeVisible(self.cpuUsageText)\n\n        self.createWavetable()\n\n        self.setSize(400, 200)\n        self.setAudioChannels(0, 2)\n        self.startTimer(50)\n\n    def visibilityChanged(self):\n        if not self.isVisible():\n            self.shutdownAudio()\n\n    def resized(self):\n        self.cpuUsageLabel.setBounds(10, 10, self.getWidth() - 20, 20)\n        self.cpuUsageText.setBounds(10, 10, self.getWidth() - 20, 20)\n\n    def timerCallback(self):\n        cpu = self.deviceManager.getCpuUsage() * 100\n        self.cpuUsageText.setText(f\"{cpu:.1f} %\", juce.dontSendNotification)\n\n    def createWavetable(self):\n        self.sineTable.setSize(1, int(self.tableSize) + 1)\n        self.sineTable.clear()\n\n        samples = self.sineTable.getWritePointer(0)\n\n        harmonics = [1, 3, 5, 6, 7, 9, 13, 15]\n        harmonicWeights = [0.5, 0.1, 0.05, 0.125, 0.09, 0.005, 0.002, 0.001]\n        assert len(harmonics) == len(harmonicWeights)\n\n        for harmonic in range(len(harmonics)):\n            angleDelta = juce.MathConstants[float].twoPi / float(self.tableSize - 1) * harmonics[harmonic]\n            currentAngle = 0.0\n\n            for i in range(self.tableSize):\n                sample = math.sin(currentAngle)\n                samples[i] += sample * harmonicWeights[harmonic]\n                currentAngle += angleDelta\n\n        samples[self.tableSize] = samples[0]\n\n    def prepareToPlay (self, samplePerBlock, sampleRate):\n        numberOfOscillators = 10\n\n        for i in range(numberOfOscillators):\n            oscillator = WavetableOscillator(self.sineTable)\n\n            #midiNote = float(i * 4) + 48.0\n            midiNote = juce.Random.getSystemRandom().nextDouble() * 36.0 + 48.0\n            frequency = 440.0 * math.pow(2.0, (midiNote - 69.0) / 12.0)\n\n            oscillator.setFrequency(frequency, sampleRate)\n            self.oscillators.append(oscillator)\n\n        self.level = 0.25 / float(numberOfOscillators)\n\n    def releaseResources(self):\n        pass\n\n    def getNextAudioBlock(self, bufferToFill):\n        leftBuffer  = bufferToFill.buffer.getWritePointer(0, bufferToFill.startSample)\n        rightBuffer = bufferToFill.buffer.getWritePointer(1, bufferToFill.startSample)\n\n        bufferToFill.clearActiveBufferRegion()\n\n        for oscillator in self.oscillators:\n            for sample in range(bufferToFill.numSamples):\n                levelSample = oscillator.getNextSample() * self.level\n\n                leftBuffer[sample] += levelSample\n                rightBuffer[sample] += levelSample\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Wavetable Oscillator\")\n"
  },
  {
    "path": "examples/wavetable_oscillator_numpy.py",
    "content": "import math\nimport numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass WavetableOscillator(object):\n    wavetable = None\n    tableSize = 0\n    currentIndex = 0.0\n    tableDelta = 0.0\n\n    def __init__(self, wavetableToUse, samplePerBlock):\n        assert wavetableToUse.getNumChannels() == 1\n\n        self.wavetable = wavetableToUse\n        self.tableSize = self.wavetable.getNumSamples() - 1\n\n    def setFrequency(self, frequency, sampleRate):\n        tableSizeOverSampleRate = float(self.tableSize) / sampleRate\n        self.tableDelta = frequency * tableSizeOverSampleRate\n\n    def getNextBlock(self, numSamples):\n        indexI = np.linspace(self.currentIndex, self.currentIndex + self.tableDelta * (numSamples - 1), numSamples)\n        indexI = np.remainder(indexI, float(self.tableSize))\n        index0 = np.floor(indexI).astype(int)\n        index1 = index0 + 1\n        frac = indexI - index0.astype(float)\n\n        table = np.array(self.wavetable.getReadPointer(0), copy=False)\n        value0 = table[index0]\n        value1 = table[index1]\n\n        block = value0 + frac * (value1 - value0)\n\n        self.currentIndex = (self.currentIndex + self.tableDelta * numSamples) % self.tableSize\n\n        return block\n\n\nclass MainContentComponent(juce.AudioAppComponent, juce.Timer):\n    cpuUsageLabel = juce.Label()\n    cpuUsageText = juce.Label()\n\n    tableSize = 1 << 7\n    level = 0.0\n\n    sineTable = juce.AudioSampleBuffer()\n    oscillators = []\n\n    def __init__(self):\n        juce.AudioAppComponent.__init__(self)\n        juce.Timer.__init__(self)\n\n        self.cpuUsageLabel.setText(\"CPU Usage\", juce.dontSendNotification)\n        self.cpuUsageText.setJustificationType(juce.Justification.right)\n        self.addAndMakeVisible(self.cpuUsageLabel)\n        self.addAndMakeVisible(self.cpuUsageText)\n\n        self.createWavetable()\n\n        self.setSize(400, 200)\n        self.setAudioChannels(0, 2)\n        self.startTimer(50)\n\n    def visibilityChanged(self):\n        if not self.isVisible():\n            self.shutdownAudio()\n\n    def resized(self):\n        self.cpuUsageLabel.setBounds(10, 10, self.getWidth() - 20, 20)\n        self.cpuUsageText.setBounds(10, 10, self.getWidth() - 20, 20)\n\n    def timerCallback(self):\n        cpu = self.deviceManager.getCpuUsage() * 100\n        self.cpuUsageText.setText(f\"{cpu:.1f} %\", juce.dontSendNotification)\n\n    def createWavetable(self):\n        self.sineTable.setSize(1, int(self.tableSize) + 1)\n        self.sineTable.clear()\n\n        harmonics = np.array([1, 3, 5, 6, 7, 9, 13, 15])\n        harmonicWeights = np.array([0.5, 0.1, 0.05, 0.125, 0.09, 0.005, 0.002, 0.001])\n        assert len(harmonics) == len(harmonicWeights)\n\n        def computeHarmonic(index):\n            angleDelta = 2 * np.pi / float(self.tableSize - 1) * harmonics[index]\n            return np.sin(np.linspace(0.0, angleDelta * float(self.tableSize - 1), int(self.tableSize))) * harmonicWeights[index]\n\n        harm = computeHarmonic(0)\n        for harmonic in range(1, len(harmonics)):\n            harm += computeHarmonic(harmonic)\n\n        samples = np.array(self.sineTable.getWritePointer(0), copy=False)\n        samples[0:len(harm)] = harm\n        samples[self.tableSize] = samples[0]\n\n    def prepareToPlay (self, samplePerBlock, sampleRate):\n        numberOfOscillators = 10\n\n        for i in range(numberOfOscillators):\n            oscillator = WavetableOscillator(self.sineTable, samplePerBlock)\n\n            #midiNote = float(i * 4) + 48.0\n            midiNote = juce.Random.getSystemRandom().nextDouble() * 36.0 + 48.0\n            frequency = 440.0 * math.pow(2.0, (midiNote - 69.0) / 12.0)\n\n            oscillator.setFrequency(frequency, sampleRate)\n            self.oscillators.append(oscillator)\n\n        self.level = 0.25 / float(numberOfOscillators)\n\n    def releaseResources(self):\n        pass\n\n    def getNextAudioBlock(self, bufferToFill):\n        bufferToFill.clearActiveBufferRegion()\n\n        leftBuffer  = np.array(bufferToFill.buffer.getWritePointer(0, bufferToFill.startSample), copy=False)\n        rightBuffer = np.array(bufferToFill.buffer.getWritePointer(1, bufferToFill.startSample), copy=False)\n\n        for oscillator in self.oscillators:\n            block = oscillator.getNextBlock(bufferToFill.numSamples)\n\n            leftBuffer += block * self.level\n            rightBuffer += block * self.level\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Wavetable Oscillator\")\n"
  },
  {
    "path": "examples/webgpu/__init__.py",
    "content": ""
  },
  {
    "path": "examples/webgpu/cube_popsicle.py",
    "content": "\"\"\"\nImport the viz from triangle.py and run it using popsicle.\n\n# run_example = false\n\"\"\"\n\nimport sys\nimport time\nimport wgpu\nimport numpy as np\n\nfrom pathlib import Path\n\nfrom pop import WgpuCanvas, run\n\nsys.path.insert(0, str(Path(__file__).parent))\n\n\ndef main(canvas):\n    # Create a wgpu device\n    adapter = wgpu.gpu.request_adapter(power_preference=\"high-performance\")\n    device = adapter.request_device()\n\n    # Prepare present context\n    present_context = canvas.get_context()\n    render_texture_format = present_context.get_preferred_format(device.adapter)\n    present_context.configure(device=device, format=render_texture_format)\n\n    # Generate data\n    # pos         texcoord\n    # x, y, z, w, u, v\n    vertex_data = np.array(\n        [\n            # top (0, 0, 1)\n            [-1, -1, 1, 1, 0, 0],\n            [1, -1, 1, 1, 1, 0],\n            [1, 1, 1, 1, 1, 1],\n            [-1, 1, 1, 1, 0, 1],\n            # bottom (0, 0, -1)\n            [-1, 1, -1, 1, 1, 0],\n            [1, 1, -1, 1, 0, 0],\n            [1, -1, -1, 1, 0, 1],\n            [-1, -1, -1, 1, 1, 1],\n            # right (1, 0, 0)\n            [1, -1, -1, 1, 0, 0],\n            [1, 1, -1, 1, 1, 0],\n            [1, 1, 1, 1, 1, 1],\n            [1, -1, 1, 1, 0, 1],\n            # left (-1, 0, 0)\n            [-1, -1, 1, 1, 1, 0],\n            [-1, 1, 1, 1, 0, 0],\n            [-1, 1, -1, 1, 0, 1],\n            [-1, -1, -1, 1, 1, 1],\n            # front (0, 1, 0)\n            [1, 1, -1, 1, 1, 0],\n            [-1, 1, -1, 1, 0, 0],\n            [-1, 1, 1, 1, 0, 1],\n            [1, 1, 1, 1, 1, 1],\n            # back (0, -1, 0)\n            [1, -1, 1, 1, 0, 0],\n            [-1, -1, 1, 1, 1, 0],\n            [-1, -1, -1, 1, 1, 1],\n            [1, -1, -1, 1, 0, 1],\n        ],\n        dtype=np.float32,\n    )\n\n    index_data = np.array(\n        [\n            [0, 1, 2, 2, 3, 0],  # top\n            [4, 5, 6, 6, 7, 4],  # bottom\n            [8, 9, 10, 10, 11, 8],  # right\n            [12, 13, 14, 14, 15, 12],  # left\n            [16, 17, 18, 18, 19, 16],  # front\n            [20, 21, 22, 22, 23, 20],  # back\n        ],\n        dtype=np.uint32,\n    ).flatten()\n\n    # Create texture data (srgb gray values)\n    texture_data = np.array(\n        [\n            [50, 100, 150, 200],\n            [100, 150, 200, 50],\n            [150, 200, 50, 100],\n            [200, 50, 100, 150],\n        ],\n        dtype=np.uint8,\n    )\n    texture_data = np.repeat(texture_data, 64, 0)\n    texture_data = np.repeat(texture_data, 64, 1)\n    texture_size = texture_data.shape[1], texture_data.shape[0], 1\n\n    # Use numpy to create a struct for the uniform\n    uniform_dtype = [(\"transform\", \"float32\", (4, 4))]\n    uniform_data = np.zeros((), dtype=uniform_dtype)\n\n    # Create resource objects (buffers, textures, samplers)\n    # Create vertex buffer, and upload data\n    vertex_buffer = device.create_buffer_with_data(\n        data=vertex_data, usage=wgpu.BufferUsage.VERTEX\n    )\n\n    # Create index buffer, and upload data\n    index_buffer = device.create_buffer_with_data(\n        data=index_data, usage=wgpu.BufferUsage.INDEX\n    )\n\n    # Create uniform buffer - data is uploaded each frame\n    uniform_buffer = device.create_buffer(\n        size=uniform_data.nbytes, usage=wgpu.BufferUsage.UNIFORM | wgpu.BufferUsage.COPY_DST\n    )\n\n    # Create texture, and upload data\n    texture = device.create_texture(\n        size=texture_size,\n        usage=wgpu.TextureUsage.COPY_DST | wgpu.TextureUsage.TEXTURE_BINDING,\n        dimension=wgpu.TextureDimension.d2,\n        format=wgpu.TextureFormat.r8unorm,\n        mip_level_count=1,\n        sample_count=1,\n    )\n    texture_view = texture.create_view()\n\n    device.queue.write_texture(\n        {\n            \"texture\": texture,\n            \"mip_level\": 0,\n            \"origin\": (0, 0, 0),\n        },\n        texture_data,\n        {\n            \"offset\": 0,\n            \"bytes_per_row\": texture_data.strides[0],\n        },\n        texture_size,\n    )\n\n    # Create a sampler\n    sampler = device.create_sampler()\n\n    # The shaders\n    shader_source = \"\"\"\n    struct Locals {\n        transform: mat4x4<f32>,\n    };\n    @group(0) @binding(0)\n    var<uniform> r_locals: Locals;\n\n    struct VertexInput {\n        @location(0) pos : vec4<f32>,\n        @location(1) texcoord: vec2<f32>,\n    };\n    struct VertexOutput {\n        @location(0) texcoord: vec2<f32>,\n        @builtin(position) pos: vec4<f32>,\n    };\n    struct FragmentOutput {\n        @location(0) color : vec4<f32>,\n    };\n\n\n    @vertex\n    fn vs_main(in: VertexInput) -> VertexOutput {\n        let ndc: vec4<f32> = r_locals.transform * in.pos;\n        var out: VertexOutput;\n        out.pos = vec4<f32>(ndc.x, ndc.y, 0.0, 1.0);\n        out.texcoord = in.texcoord;\n        return out;\n    }\n\n    @group(0) @binding(1)\n    var r_tex: texture_2d<f32>;\n\n    @group(0) @binding(2)\n    var r_sampler: sampler;\n\n    @fragment\n    fn fs_main(in: VertexOutput) -> FragmentOutput {\n        let value = textureSample(r_tex, r_sampler, in.texcoord).r;\n        let physical_color = vec3<f32>(pow(value, 2.2));  // gamma correct\n        var out: FragmentOutput;\n        out.color = vec4<f32>(physical_color.rgb, 1.0);\n        return out;\n    }\n    \"\"\"\n\n    shader = device.create_shader_module(code=shader_source)\n\n    # The bind groups\n    # We always have two bind groups, so we can play distributing our\n    # resources over these two groups in different configurations.\n    bind_groups_entries = [[]]\n    bind_groups_layout_entries = [[]]\n\n    bind_groups_entries[0].append(\n        {\n            \"binding\": 0,\n            \"resource\": {\n                \"buffer\": uniform_buffer,\n                \"offset\": 0,\n                \"size\": uniform_buffer.size,\n            },\n        }\n    )\n    bind_groups_layout_entries[0].append(\n        {\n            \"binding\": 0,\n            \"visibility\": wgpu.ShaderStage.VERTEX | wgpu.ShaderStage.FRAGMENT,\n            \"buffer\": {\"type\": wgpu.BufferBindingType.uniform},\n        }\n    )\n\n    bind_groups_entries[0].append({\"binding\": 1, \"resource\": texture_view})\n    bind_groups_layout_entries[0].append(\n        {\n            \"binding\": 1,\n            \"visibility\": wgpu.ShaderStage.FRAGMENT,\n            \"texture\": {\n                \"sample_type\": wgpu.TextureSampleType.float,\n                \"view_dimension\": wgpu.TextureViewDimension.d2,\n            },\n        }\n    )\n\n    bind_groups_entries[0].append({\"binding\": 2, \"resource\": sampler})\n    bind_groups_layout_entries[0].append(\n        {\n            \"binding\": 2,\n            \"visibility\": wgpu.ShaderStage.FRAGMENT,\n            \"sampler\": {\"type\": wgpu.SamplerBindingType.filtering},\n        }\n    )\n\n    # Create the wgou binding objects\n    bind_group_layouts = []\n    bind_groups = []\n\n    for entries, layout_entries in zip(bind_groups_entries, bind_groups_layout_entries):\n        bind_group_layout = device.create_bind_group_layout(entries=layout_entries)\n        bind_group_layouts.append(bind_group_layout)\n        bind_groups.append(\n            device.create_bind_group(layout=bind_group_layout, entries=entries)\n        )\n\n    pipeline_layout = device.create_pipeline_layout(bind_group_layouts=bind_group_layouts)\n\n    # The render pipeline\n    render_pipeline = device.create_render_pipeline(\n        layout=pipeline_layout,\n        vertex={\n            \"module\": shader,\n            \"entry_point\": \"vs_main\",\n            \"buffers\": [\n                {\n                    \"array_stride\": 4 * 6,\n                    \"step_mode\": wgpu.VertexStepMode.vertex,\n                    \"attributes\": [\n                        {\n                            \"format\": wgpu.VertexFormat.float32x4,\n                            \"offset\": 0,\n                            \"shader_location\": 0,\n                        },\n                        {\n                            \"format\": wgpu.VertexFormat.float32x2,\n                            \"offset\": 4 * 4,\n                            \"shader_location\": 1,\n                        },\n                    ],\n                },\n            ],\n        },\n        primitive={\n            \"topology\": wgpu.PrimitiveTopology.triangle_list,\n            \"front_face\": wgpu.FrontFace.ccw,\n            \"cull_mode\": wgpu.CullMode.back,\n        },\n        depth_stencil=None,\n        multisample=None,\n        fragment={\n            \"module\": shader,\n            \"entry_point\": \"fs_main\",\n            \"targets\": [\n                {\n                    \"format\": render_texture_format,\n                    \"blend\": {\n                        \"alpha\": (\n                            wgpu.BlendFactor.one,\n                            wgpu.BlendFactor.zero,\n                            wgpu.BlendOperation.add,\n                        ),\n                        \"color\": (\n                            wgpu.BlendFactor.one,\n                            wgpu.BlendFactor.zero,\n                            wgpu.BlendOperation.add,\n                        ),\n                    },\n                }\n            ],\n        },\n    )\n\n    # The render function\n    def draw_frame():\n        # Update uniform transform\n        a1 = -0.3\n        a2 = time.time()\n        s = 0.6\n        ortho = np.array(\n            [\n                [s, 0, 0, 0],\n                [0, s, 0, 0],\n                [0, 0, s, 0],\n                [0, 0, 0, 1],\n            ],\n        )\n        rot1 = np.array(\n            [\n                [1, 0, 0, 0],\n                [0, np.cos(a1), -np.sin(a1), 0],\n                [0, np.sin(a1), +np.cos(a1), 0],\n                [0, 0, 0, 1],\n            ],\n        )\n        rot2 = np.array(\n            [\n                [np.cos(a2), 0, np.sin(a2), 0],\n                [0, 1, 0, 0],\n                [-np.sin(a2), 0, np.cos(a2), 0],\n                [0, 0, 0, 1],\n            ],\n        )\n        uniform_data[\"transform\"] = rot2 @ rot1 @ ortho\n\n        # Upload the uniform struct\n        tmp_buffer = device.create_buffer_with_data(\n            data=uniform_data, usage=wgpu.BufferUsage.COPY_SRC\n        )\n\n        command_encoder = device.create_command_encoder()\n        command_encoder.copy_buffer_to_buffer(\n            tmp_buffer, 0, uniform_buffer, 0, uniform_data.nbytes\n        )\n\n        current_texture_view = present_context.get_current_texture().create_view()\n        render_pass = command_encoder.begin_render_pass(\n            color_attachments=[\n                {\n                    \"view\": current_texture_view,\n                    \"resolve_target\": None,\n                    \"clear_value\": (1, 1, 1, 1),\n                    \"load_op\": wgpu.LoadOp.clear,\n                    \"store_op\": wgpu.StoreOp.store,\n                }\n            ],\n        )\n\n        render_pass.set_pipeline(render_pipeline)\n        render_pass.set_index_buffer(index_buffer, wgpu.IndexFormat.uint32)\n        render_pass.set_vertex_buffer(0, vertex_buffer)\n        for bind_group_id, bind_group in enumerate(bind_groups):\n            render_pass.set_bind_group(bind_group_id, bind_group, [], 0, 99)\n        render_pass.draw_indexed(index_data.size, 1, 0, 0, 0)\n        render_pass.end()\n\n        device.queue.submit([command_encoder.finish()])\n\n        canvas.request_draw()\n\n    canvas.request_draw(draw_frame)\n\n\nif __name__ == \"__main__\":\n    canvas = WgpuCanvas(size=(640, 480), title=\"wgpu triangle\")\n    run(canvas, main)\n"
  },
  {
    "path": "examples/webgpu/pbr2.py",
    "content": "\"\"\"\n\nPBR Rendering 2\n===============\n\nThis example shows the lighting rendering affect of materials with different\nmetalness and roughness. Every second sphere has an IBL environment map on it.\n\"\"\"\n\n# run_example = false\n# sphinx_gallery_pygfx_animate = True\n# sphinx_gallery_pygfx_duration = 3\n# sphinx_gallery_pygfx_lossless = False\n\nimport math\nfrom colorsys import hls_to_rgb\nfrom itertools import count\n\nimport imageio.v3 as iio\nimport numpy as np\nfrom pop import WgpuCanvas, run\n\nimport pygfx as gfx\nimport pylinalg as la\n\n\ndef main(canvas):\n    frame_idx = count()  # counter for animation\n    renderer = gfx.renderers.WgpuRenderer(canvas)\n    scene = gfx.Scene()\n\n    # Lights\n    scene.add(gfx.AmbientLight(\"#fff\", 0.2))\n    directional_light = gfx.DirectionalLight(\"#fff\", 3)\n    directional_light.local.position = la.vec_normalize((1, 1, 1))\n    scene.add(directional_light)\n    point_light = gfx.PointLight(\"#fff\", 3)\n    scene.add(point_light)\n    point_light.add(gfx.PointLightHelper(4))\n\n    # Read cube image and turn it into a 3D image (a 4d array)\n    env_img = iio.imread(\"imageio:meadow_cube.jpg\")\n    cube_size = env_img.shape[1]\n    env_img.shape = 6, cube_size, cube_size, env_img.shape[-1]\n\n    # Create environment map\n    env_tex = gfx.Texture(\n        env_img, dim=2, size=(cube_size, cube_size, 6), generate_mipmaps=True\n    )\n\n    # Apply env map to skybox\n    background = gfx.Background(None, gfx.BackgroundSkyboxMaterial(map=env_tex))\n    scene.add(background)\n\n    # Now create spheres ...\n    cube_width = 400\n    numbers_per_side = 5\n    sphere_radius = (cube_width / numbers_per_side) * 0.8 * 0.5\n    step_size = 1.0 / numbers_per_side\n\n    geometry = gfx.sphere_geometry(sphere_radius, 32, 16)\n\n    index = 0\n    alpha = 0.0\n    while alpha <= 1.0:\n        beta = 0.0\n        while beta <= 1.0:\n            gamma = 0.0\n            while gamma <= 1.0:\n                material = gfx.MeshStandardMaterial(\n                    color=hls_to_rgb(alpha, 0.5, gamma * 0.5 + 0.1),\n                    metalness=beta,\n                    roughness=1.0 - alpha,\n                )\n\n                if index % 2 != 0:\n                    material.env_map = env_tex\n\n                mesh = gfx.Mesh(geometry, material)\n\n                mesh.local.position = (\n                    alpha * 400 - 200,\n                    beta * 400 - 200,\n                    gamma * 400 - 200,\n                )\n                scene.add(mesh)\n                index += 1\n\n                gamma += step_size\n            beta += step_size\n        alpha += step_size\n\n    # Create camera and controls\n    camera = gfx.PerspectiveCamera(45, 640 / 480)\n    camera.show_object(scene, view_dir=(-2, -1.5, -3), scale=1.2)\n\n    controller = gfx.OrbitController(camera, register_events=renderer)\n\n    def animate():\n        timer = next(frame_idx) / 30\n\n        point_light.local.position = (\n            math.sin(timer / 30 * (2 * np.pi)) * 300,\n            math.cos(timer * 2 / 30 * (2 * np.pi)) * 400,\n            math.cos(timer / 30 * (2 * np.pi)) * 300,\n        )\n\n        renderer.render(scene, camera)\n        renderer.request_draw()\n\n    renderer.request_draw(animate)\n\n\nif __name__ == \"__main__\":\n    canvas = WgpuCanvas(size=(640, 480), title=\"gfx_pbr\")\n    run(canvas, main)\n"
  },
  {
    "path": "examples/webgpu/pbr2_embed.py",
    "content": "\"\"\"\n\nPBR Rendering 2\n===============\n\nThis example shows the lighting rendering affect of materials with different\nmetalness and roughness. Every second sphere has an IBL environment map on it.\n\"\"\"\n\n# run_example = false\n# sphinx_gallery_pygfx_animate = True\n# sphinx_gallery_pygfx_duration = 3\n# sphinx_gallery_pygfx_lossless = False\n\nimport math\nfrom colorsys import hls_to_rgb\nfrom itertools import count\n\nimport imageio.v3 as iio\nimport numpy as np\nfrom pop import WgpuWidget\n\nimport popsicle as juce\nimport pygfx as gfx\nimport pylinalg as la\n\n\nclass WgpuComponent(juce.Component):\n    canvas = None\n\n    def __init__(self):\n        super().__init__()\n\n        self.canvas = WgpuWidget()\n        self.addAndMakeVisible(self.canvas)\n\n        self.slider = juce.Slider()\n        self.slider.setRange(1.0, 100.0, 0.1)\n        self.slider.onValueChange = lambda: self.sliderChanged()\n        self.addAndMakeVisible(self.slider)\n\n        self.setSize(640, 480)\n        self.setVisible(True)\n\n    def __del__(self):\n        if self.renderer:\n            del self.renderer\n\n        if self.canvas:\n            del self.canvas\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n\n        sliderBounds = bounds.removeFromBottom(40).reduced(10)\n        self.slider.setBounds(sliderBounds)\n\n        self.canvas.setBounds(bounds.reduced(10))\n\n    def sliderChanged(self):\n        value = self.slider.getValue()\n\n        if self.point_light:\n            self.point_light.intensity = value\n\n    def attachToWindow(self, window):\n        self.canvas.reparentToWindow(window)\n\n        self.frame_idx = count()  # counter for animation\n        self.renderer = gfx.renderers.WgpuRenderer(self.canvas)\n        self.scene = gfx.Scene()\n\n        # Lights\n        self.scene.add(gfx.AmbientLight(\"#fff\", 0.2))\n        self.directional_light = gfx.DirectionalLight(\"#fff\", 3)\n        self.directional_light.local.position = la.vec_normalize((1, 1, 1))\n        self.scene.add(self.directional_light)\n        self.point_light = gfx.PointLight(\"#fff\", 3)\n        self.scene.add(self.point_light)\n        self.point_light.add(gfx.PointLightHelper(4))\n\n        # Read cube image and turn it into a 3D image (a 4d array)\n        env_img = iio.imread(\"imageio:meadow_cube.jpg\")\n        self.cube_size = env_img.shape[1]\n        env_img.shape = 6, self.cube_size, self.cube_size, env_img.shape[-1]\n\n        # Create environment map\n        env_tex = gfx.Texture(env_img, dim=2, size=(self.cube_size, self.cube_size, 6), generate_mipmaps=True)\n\n        # Apply env map to skybox\n        self.background = gfx.Background(None, gfx.BackgroundSkyboxMaterial(map=env_tex))\n        self.scene.add(self.background)\n\n        # Now create spheres ...\n        cube_width = 400\n        numbers_per_side = 5\n        sphere_radius = (cube_width / numbers_per_side) * 0.8 * 0.5\n        step_size = 1.0 / numbers_per_side\n\n        self.geometry = gfx.sphere_geometry(sphere_radius, 32, 16)\n\n        index = 0\n        alpha = 0.0\n        while alpha <= 1.0:\n            beta = 0.0\n            while beta <= 1.0:\n                gamma = 0.0\n                while gamma <= 1.0:\n                    material = gfx.MeshStandardMaterial(\n                        color=hls_to_rgb(alpha, 0.5, gamma * 0.5 + 0.1),\n                        metalness=beta,\n                        roughness=1.0 - alpha,\n                    )\n\n                    if index % 2 != 0:\n                        material.env_map = env_tex\n\n                    mesh = gfx.Mesh(self.geometry, material)\n\n                    mesh.local.position = (\n                        alpha * 400 - 200,\n                        beta * 400 - 200,\n                        gamma * 400 - 200,\n                    )\n\n                    self.scene.add(mesh)\n                    index += 1\n\n                    gamma += step_size\n                beta += step_size\n            alpha += step_size\n\n        # Create camera and controls\n        self.camera = gfx.PerspectiveCamera(45, self.getWidth() / self.getHeight())\n        self.camera.show_object(self.scene, view_dir=(-2, -1.5, -3), scale=1.2)\n        self.controller = gfx.OrbitController(self.camera, register_events=self.renderer)\n\n        def animate():\n            timer = next(self.frame_idx) / 30\n\n            self.point_light.local.position = (\n                math.sin(timer / 30 * (2 * np.pi)) * 300,\n                math.cos(timer * 2 / 30 * (2 * np.pi)) * 400,\n                math.cos(timer / 30 * (2 * np.pi)) * 300,\n            )\n\n            self.renderer.render(self.scene, self.camera)\n            self.renderer.request_draw()\n\n        self.renderer.request_draw(animate)\n\n    def detach(self):\n        if self.canvas:\n            self.canvas.removeFromDesktop()\n\n\nclass WgpuWindow(juce.DocumentWindow):\n    component = None\n\n    def __init__(self):\n        super().__init__(\n            \"wgpu triangle embedded in a popsicle app\",\n            juce.Desktop.getInstance().getDefaultLookAndFeel()\n                .findColour(juce.ResizableWindow.backgroundColourId),\n            juce.DocumentWindow.allButtons,\n            True)\n\n        self.component = WgpuComponent()\n\n        self.setUsingNativeTitleBar(True)\n        self.setResizable(True, True)\n        self.setContentNonOwned(self.component, True)\n        self.centreWithSize(self.component.getWidth(), self.component.getHeight())\n        self.setVisible(True)\n\n        self.component.attachToWindow(self)\n        self.getContentComponent().resized()\n\n    def __del__(self):\n        self.clearContentComponent()\n\n        if self.component:\n            self.component.detach()\n            del self.component\n\n    def closeButtonPressed(self):\n        juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n\nclass WgpuApplication(juce.JUCEApplication):\n    window = None\n\n    def getApplicationName(self):\n        return \"triangle-embed-juce\"\n\n    def getApplicationVersion(self):\n        return \"1.0\"\n\n    def initialise(self, commandLineParameters: str):\n        self.window = WgpuWindow()\n\n        juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n    def shutdown(self):\n        if self.window:\n            del self.window\n\n    def systemRequestedQuit(self):\n        self.quit()\n\n\nif __name__ == \"__main__\":\n    juce.START_JUCE_APPLICATION(WgpuApplication)\n"
  },
  {
    "path": "examples/webgpu/pop.py",
    "content": "\"\"\"\nSupport for rendering in a JUCE component. Provides a component subclass that\ncan be used as a standalone window or in a larger GUI.\n\"\"\"\n\nimport sys\nimport ctypes\n\nfrom wgpu.gui.base import WgpuCanvasBase, WgpuAutoGui\nfrom wgpu.gui._gui_utils import get_alt_x11_display, get_alt_wayland_display, weakbind\n\nimport popsicle as juce\n\n\nis_wayland = False  # We force Qt to use X11 in _gui_utils.py\n\n\ndef enable_hidpi():\n    \"\"\"Enable high-res displays.\"\"\"\n    try:\n        ctypes.windll.shcore.SetProcessDpiAwareness(1)\n        ctypes.windll.shcore.SetProcessDpiAwareness(2)\n    except Exception:\n        pass  # fail on non-windows\n\n\nenable_hidpi()\n\n\ndef convert_buttons(event: juce.MouseEvent):\n    button = 0\n    buttons = []\n    if event.mods.isLeftButtonDown():\n        button = 1\n        buttons.append(1)\n    if event.mods.isRightButtonDown():\n        button = 2\n        buttons.append(2)\n    if event.mods.isMiddleButtonDown():\n        button = 3\n        buttons.append(3)\n\n    modifiers = []\n    if event.mods.getCurrentModifiers() == juce.ModifierKeys.altModifier:\n        modifiers.append(\"Alt\")\n    if event.mods.getCurrentModifiers() == juce.ModifierKeys.shiftModifier:\n        modifiers.append(\"Shift\")\n    if event.mods.getCurrentModifiers() == juce.ModifierKeys.ctrlModifier:\n        modifiers.append(\"Control\")\n    if event.mods.getCurrentModifiers() == juce.ModifierKeys.commandModifier:\n        modifiers.append(\"Meta\")\n\n    return button, buttons, modifiers\n\n\ndef call_later(delay, callback, *args):\n    juce.MessageManager.callAsync(lambda: callback(*args)) # int(delay * 1000)\n\n\nclass JUCECallbackTimer(juce.Timer):\n    def __init__(self, callback):\n        juce.Timer.__init__(self)\n        self._callback = callback\n\n    def timerCallback(self):\n        self._callback()\n        self.stopTimer()\n\n\nclass JUCEWgpuComponentBase(juce.Component):\n    def __init__(self, *args, **kwargs):\n        juce.Component.__init__(self)\n\n\nclass JUCEWgpuComponent(WgpuAutoGui, WgpuCanvasBase, JUCEWgpuComponentBase):\n    \"\"\"A JUCE Component representing a wgpu canvas that can be embedded in a Popsicle application.\"\"\"\n\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n        if size := kwargs.get(\"size\", None):\n            self.setSize(*size)\n\n        # A timer for limiting fps\n        self._request_draw_timer = JUCECallbackTimer(lambda: self.repaint())\n\n    def paint(self, g): # noqa: N802 - this is a Popsicle method\n        self._draw_frame_and_present()\n\n    def resized(self):\n        ev = {\n            \"event_type\": \"resize\",\n            \"width\": float(self.getWidth()),\n            \"height\": float(self.getHeight()),\n            \"pixel_ratio\": self.get_pixel_ratio(),\n        }\n        self._handle_event_and_flush(ev)\n\n    # Methods that we add from wgpu (snake_case)\n\n    def get_surface_info(self):\n        if sys.platform.startswith(\"win\") or sys.platform.startswith(\"darwin\"):\n            return {\n                \"window\": int(self.getWindowHandle()),\n            }\n        elif sys.platform.startswith(\"linux\"):\n            # The trick to use an alt display pointer works for X11, but results in a segfault on Wayland ...\n            if is_wayland:\n                return {\n                    \"platform\": \"wayland\",\n                    \"window\": int(self.getWindowHandle()),\n                    \"display\": int(get_alt_wayland_display()),\n                }\n            else:\n                return {\n                    \"platform\": \"x11\",\n                    \"window\": int(self.getWindowHandle()),\n                    \"display\": int(get_alt_x11_display()),\n                }\n        else:\n            raise RuntimeError(f\"Cannot get JUCE surface info on {sys.platform}.\")\n\n    def get_pixel_ratio(self):\n        return juce.Desktop.getInstance().getGlobalScaleFactor()\n\n    def get_logical_size(self):\n        lsize = self.getWidth(), self.getHeight()\n        return float(lsize[0]), float(lsize[1])\n\n    def get_physical_size(self):\n        lsize = self.getWidth(), self.getHeight()\n        lsize = float(lsize[0]), float(lsize[1])\n        ratio = juce.Desktop.getInstance().getGlobalScaleFactor()\n        return round(lsize[0] * ratio + 0.01), round(lsize[1] * ratio + 0.01)\n\n    def set_logical_size(self, width, height):\n        if width < 0 or height < 0:\n            raise ValueError(\"Window width and height must not be negative\")\n        self.setSize(width, height)\n\n    def _request_draw(self):\n        if not self._request_draw_timer.isTimerRunning():\n            self._request_draw_timer.startTimer(int(self._get_draw_wait_time() * 1000))\n\n    def is_closed(self):\n        return not self.isVisible()\n\n    # User events to jupyter_rfb events\n\n    def _mouse_event(self, event_type, event, touches=True):\n        button, buttons, modifiers = convert_buttons(event)\n\n        ev = {\n            \"event_type\": event_type,\n            \"x\": event.getPosition().x,\n            \"y\": event.getPosition().y,\n            \"button\": button,\n            \"buttons\": buttons,\n            \"modifiers\": modifiers,\n        }\n\n        if touches:\n            ev.update({\n                \"ntouches\": 0,\n                \"touches\": {}\n            })\n\n        if event_type == \"pointer_move\":\n            match_keys = {\"buttons\", \"modifiers\", \"ntouches\"}\n            accum_keys = {}\n            self._handle_event_rate_limited(ev, call_later, match_keys, accum_keys)\n        else:\n            self._handle_event_and_flush(ev)\n\n    def mouseDown(self, event):  # noqa: N802\n        self._mouse_event(\"pointer_down\", event)\n\n    def mouseMove(self, event):  # noqa: N802\n        self._mouse_event(\"pointer_move\", event)\n\n    def mouseDrag(self, event):  # noqa: N802\n        self._mouse_event(\"pointer_move\", event)\n\n    def mouseUp(self, event):  # noqa: N802\n        self._mouse_event(\"pointer_up\", event)\n\n    def mouseDoubleClick(self, event):  # noqa: N802\n        self._mouse_event(\"double_click\", event, touches=False)\n\n    def mouseWheelMove(self, event, wheel):\n        _, buttons, modifiers = convert_buttons(event)\n\n        ev = {\n            \"event_type\": \"wheel\",\n            \"dx\": -wheel.deltaX * 200,\n            \"dy\": -wheel.deltaY * 200,\n            \"x\": event.getPosition().x,\n            \"y\": event.getPosition().y,\n            \"buttons\": buttons,\n            \"modifiers\": modifiers\n        }\n\n        match_keys = {\"modifiers\"}\n        accum_keys = {\"dx\", \"dy\"}\n\n        self._handle_event_rate_limited(ev, call_later, match_keys, accum_keys)\n\n    # Custom methods to make Component work when used standalone\n\n    def reparentToWindow(self, window):\n        self.addToDesktop(juce.ComponentPeer.windowIsTemporary, window.getWindowHandle())\n\n\nclass JUCEWgpuWindow(juce.DocumentWindow):\n    def __init__(self, title=None, *args, **kwargs):\n        juce.DocumentWindow.__init__(\n            self,\n            title or \"wgpu-juce\",\n            juce.Desktop.getInstance().getDefaultLookAndFeel()\n                .findColour(juce.ResizableWindow.backgroundColourId),\n            juce.DocumentWindow.allButtons,\n            True)\n\n\nclass JUCEWgpuCanvas(WgpuAutoGui, WgpuCanvasBase, JUCEWgpuWindow):\n    \"\"\"A toplevel JUCE window providing a wgpu canvas.\"\"\"\n\n    _subwidget = None\n\n    def __init__(self, size=None, title=None, max_fps=30, **kwargs):\n        super().__init__(title=title, max_fps=max_fps, **kwargs)\n\n        size = size or (640, 480)\n        self.set_logical_size(*size)\n\n        self._subwidget = JUCEWgpuComponent(self, size=size, max_fps=max_fps)\n        self._subwidget.add_event_handler(weakbind(self.handle_event), \"*\")\n\n        self.setUsingNativeTitleBar(True)\n        self.setResizable(True, True)\n        self.setContentNonOwned(self._subwidget, True)\n        self.centreWithSize(*size)\n        self.setVisible(True)\n\n    # Methods that we add from juce\n\n    def __del__(self):\n        self.clearContentComponent()\n        if self._subwidget:\n            del self._subwidget\n\n    def closeButtonPressed(self):\n        juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n    # Methods that we add from wgpu (snake_case)\n\n    @property\n    def draw_frame(self):\n        return self._subwidget.draw_frame\n\n    @draw_frame.setter\n    def draw_frame(self, f):\n        self._subwidget.draw_frame = f\n\n    def get_surface_info(self):\n        return self._subwidget.get_surface_info()\n\n    def get_pixel_ratio(self):\n        return self._subwidget.get_pixel_ratio()\n\n    def get_logical_size(self):\n        return self._subwidget.get_logical_size()\n\n    def get_physical_size(self):\n        return self._subwidget.get_physical_size()\n\n    def set_logical_size(self, width, height):\n        if width < 0 or height < 0:\n            raise ValueError(\"Window width and height must not be negative\")\n        self.setSize(width, height)  # See comment on pixel ratio\n\n    def _request_draw(self):\n        return self._subwidget._request_draw()\n\n    def is_closed(self):\n        return not self.isVisible()\n\n    # Methods that we need to explicitly delegate to the subwidget\n\n    def get_context(self, *args, **kwargs):\n        return self._subwidget.get_context(*args, **kwargs)\n\n    def request_draw(self, *args, **kwargs):\n        return self._subwidget.request_draw(*args, **kwargs)\n\n    # Custom methods used by the run() function\n\n    def getSubwidget(self):\n        return self._subwidget\n\n\n# Make available under a name that is the same for all gui backends\nWgpuWidget = JUCEWgpuComponent\nWgpuCanvas = JUCEWgpuCanvas\n\n\ndef run(canvas, make_device, **kwargs):\n    class WgpuApplication(juce.JUCEApplication):\n        window = None\n\n        def getApplicationName(self):\n            return kwargs.get(\"appName\", \"wgpu-juce\")\n\n        def getApplicationVersion(self):\n            return kwargs.get(\"appVersion\", \"1.0\")\n\n        def initialise(self, commandLineParameters: str):\n            self.window = canvas\n\n            make_device(canvas.getSubwidget())\n\n            juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n        def shutdown(self):\n            if self.window:\n                del self.window\n\n        def systemRequestedQuit(self):\n            self.quit()\n\n    juce.START_JUCE_APPLICATION(WgpuApplication)\n"
  },
  {
    "path": "examples/webgpu/triangle.py",
    "content": "\"\"\"\nExample use of the wgpu API to draw a triangle. This example is set up\nso it can be run on canvases provided by any backend. Running this file\nas a script will use the auto-backend (using either glfw or jupyter).\n\n\nSimilar example in other languages / API's:\n\n* Rust wgpu:\n  https://github.com/gfx-rs/wgpu-rs/blob/master/examples/hello-triangle/main.rs\n* C wgpu:\n  https://github.com/gfx-rs/wgpu/blob/master/examples/triangle/main.c\n* Python Vulkan:\n  https://github.com/realitix/vulkan/blob/master/example/contribs/example_glfw.py\n\n\"\"\"\n\nimport wgpu\n\n\n# %% Shaders\n\n\nshader_source = \"\"\"\nstruct VertexInput {\n    @builtin(vertex_index) vertex_index : u32,\n};\n\nstruct VertexOutput {\n    @location(0) color : vec4<f32>,\n    @builtin(position) pos: vec4<f32>,\n};\n\n@vertex\nfn vs_main(in: VertexInput) -> VertexOutput {\n    var positions = array<vec2<f32>, 3>(\n        vec2<f32>(0.0, -0.5),\n        vec2<f32>(0.5, 0.5),\n        vec2<f32>(-0.5, 0.75),\n    );\n    var colors = array<vec3<f32>, 3>(  // srgb colors\n        vec3<f32>(1.0, 1.0, 0.0),\n        vec3<f32>(1.0, 0.0, 1.0),\n        vec3<f32>(0.0, 1.0, 1.0),\n    );\n    let index = i32(in.vertex_index);\n    var out: VertexOutput;\n    out.pos = vec4<f32>(positions[index], 0.0, 1.0);\n    out.color = vec4<f32>(colors[index], 1.0);\n    return out;\n}\n\n@fragment\nfn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {\n    let physical_color = pow(in.color.rgb, vec3<f32>(2.2));  // gamma correct\n    return vec4<f32>(physical_color, in.color.a);\n}\n\"\"\"\n\n\n# %% The wgpu calls\n\n\ndef main(canvas, power_preference=\"high-performance\", limits=None):\n    \"\"\"Regular function to setup a viz on the given canvas.\"\"\"\n    adapter = wgpu.gpu.request_adapter(power_preference=power_preference)\n    device = adapter.request_device(required_limits=limits)\n    return _main(canvas, device)\n\n\nasync def main_async(canvas):\n    \"\"\"Async function to setup a viz on the given canvas.\"\"\"\n    adapter = await wgpu.gpu.request_adapter_async(power_preference=\"high-performance\")\n    device = await adapter.request_device_async(required_limits={})\n    return _main(canvas, device)\n\n\ndef _main(canvas, device):\n    shader = device.create_shader_module(code=shader_source)\n\n    # No bind group and layout, we should not create empty ones.\n    pipeline_layout = device.create_pipeline_layout(bind_group_layouts=[])\n\n    present_context = canvas.get_context()\n    render_texture_format = present_context.get_preferred_format(device.adapter)\n    present_context.configure(device=device, format=render_texture_format)\n\n    render_pipeline = device.create_render_pipeline(\n        layout=pipeline_layout,\n        vertex={\n            \"module\": shader,\n            \"entry_point\": \"vs_main\",\n            \"buffers\": [],\n        },\n        primitive={\n            \"topology\": wgpu.PrimitiveTopology.triangle_list,\n            \"front_face\": wgpu.FrontFace.ccw,\n            \"cull_mode\": wgpu.CullMode.none,\n        },\n        depth_stencil=None,\n        multisample=None,\n        fragment={\n            \"module\": shader,\n            \"entry_point\": \"fs_main\",\n            \"targets\": [\n                {\n                    \"format\": render_texture_format,\n                    \"blend\": {\n                        \"color\": (\n                            wgpu.BlendFactor.one,\n                            wgpu.BlendFactor.zero,\n                            wgpu.BlendOperation.add,\n                        ),\n                        \"alpha\": (\n                            wgpu.BlendFactor.one,\n                            wgpu.BlendFactor.zero,\n                            wgpu.BlendOperation.add,\n                        ),\n                    },\n                },\n            ],\n        },\n    )\n\n    def draw_frame():\n        current_texture = present_context.get_current_texture()\n        command_encoder = device.create_command_encoder()\n\n        render_pass = command_encoder.begin_render_pass(\n            color_attachments=[\n                {\n                    \"view\": current_texture.create_view(),\n                    \"resolve_target\": None,\n                    \"clear_value\": (0, 0, 0, 1),\n                    \"load_op\": wgpu.LoadOp.clear,\n                    \"store_op\": wgpu.StoreOp.store,\n                }\n            ],\n        )\n\n        render_pass.set_pipeline(render_pipeline)\n        # render_pass.set_bind_group(0, no_bind_group, [], 0, 1)\n        render_pass.draw(3, 1, 0, 0)\n        render_pass.end()\n        device.queue.submit([command_encoder.finish()])\n\n    canvas.request_draw(draw_frame)\n    return device\n\n\nif __name__ == \"__main__\":\n    from wgpu.gui.auto import WgpuCanvas, run\n\n    canvas = WgpuCanvas(size=(640, 480), title=\"wgpu triangle\")\n    main(canvas)\n    run()\n"
  },
  {
    "path": "examples/webgpu/triangle_popsicle.py",
    "content": "\"\"\"\nImport the viz from triangle.py and run it using popsicle.\n\n# run_example = false\n\"\"\"\n\nimport sys\nimport wgpu\n\nfrom pathlib import Path\n\nfrom pop import WgpuCanvas, run\n\nsys.path.insert(0, str(Path(__file__).parent))\n\nfrom triangle import main  # noqa: E402, The function to call to run the visualization\n\n\nif __name__ == \"__main__\":\n    canvas = WgpuCanvas(size=(640, 480), title=\"wgpu triangle\", max_fps=60)\n    run(canvas, main)\n"
  },
  {
    "path": "examples/webgpu/triangle_popsicle_embed.py",
    "content": "\"\"\"\nAn example demonstrating a popsicle app with a wgpu viz inside.\n\"\"\"\n\n# run_example = false\n\nimport popsicle as juce\nfrom pop import WgpuWidget\n\nfrom triangle import main\n\n\nclass Example(juce.Component):\n    def __init__(self):\n        super().__init__()\n\n        self.canvas1 = WgpuWidget()\n        self.addAndMakeVisible(self.canvas1)\n\n        self.canvas2 = WgpuWidget()\n        self.addAndMakeVisible(self.canvas2)\n\n        self.slider = juce.Slider()\n        self.addAndMakeVisible(self.slider)\n\n        self.setSize(640, 480)\n        self.setVisible(True)\n\n    def resized(self):\n        bounds = self.getLocalBounds()\n\n        sliderBounds = bounds.removeFromBottom(40).reduced(5)\n        self.slider.setBounds(sliderBounds)\n\n        bounds1 = bounds.removeFromTop(int(bounds.getHeight() / 2)).reduced(5)\n        bounds2 = bounds.reduced(5)\n\n        self.canvas1.setBounds(bounds1)\n        self.canvas2.setBounds(bounds2)\n\n    def getCanvas1(self):\n        return self.canvas1\n\n    def getCanvas2(self):\n        return self.canvas2\n\n\nclass WgpuWindow(juce.DocumentWindow):\n    component = None\n\n    def __init__(self):\n        super().__init__(\n            \"wgpu triangle embedded in a popsicle app\",\n            juce.Desktop.getInstance().getDefaultLookAndFeel()\n                .findColour(juce.ResizableWindow.backgroundColourId),\n            juce.DocumentWindow.allButtons,\n            True)\n\n        self.component = Example()\n\n        self.setUsingNativeTitleBar(True)\n        self.setResizable(True, True)\n        self.setContentNonOwned(self.component, True)\n        self.centreWithSize(self.component.getWidth(), self.component.getHeight())\n        self.setVisible(True)\n\n    def __del__(self):\n        self.clearContentComponent()\n        if self.component:\n            del self.component\n\n    def closeButtonPressed(self):\n        juce.JUCEApplication.getInstance().systemRequestedQuit()\n\n    def getCanvas1(self):\n        return self.component.getCanvas1()\n\n    def getCanvas2(self):\n        return self.component.getCanvas2()\n\n\nclass WgpuApplication(juce.JUCEApplication):\n    window = None\n\n    def getApplicationName(self):\n        return \"triangle-embed-juce\"\n\n    def getApplicationVersion(self):\n        return \"1.0\"\n\n    def initialise(self, commandLineParameters: str):\n        self.window = WgpuWindow()\n\n        self.window.getCanvas1().reparentToWindow(self.window)\n        main(self.window.getCanvas1())\n\n        self.window.getCanvas2().reparentToWindow(self.window)\n        main(self.window.getCanvas2())\n\n        self.window.getContentComponent().resized()\n\n        juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())\n\n    def shutdown(self):\n        if self.window:\n            del self.window\n\n    def systemRequestedQuit(self):\n        self.quit()\n\n\njuce.START_JUCE_APPLICATION(WgpuApplication)\n"
  },
  {
    "path": "examples/wip/audio_callback_cpp.py",
    "content": "import sys\nsys.path.insert(0, \"../\")\n\nimport cppyy\n\nfrom popsicle import juce_gui_basics, juce_audio_utils\nfrom popsicle import juce, juce_multi, START_JUCE_COMPONENT\n\n\ncppyy.cppdef(\"\"\"\nclass AudioCallback : public juce::AudioIODeviceCallback\n{\n    void audioDeviceIOCallback(\n        const float* const* inputChannelData,\n        int numInputChannels,\n        float* const* outputChannelData,\n        int numOutputChannels,\n        int numSamples,\n        const juce::AudioIODeviceCallbackContext& context)\n    {\n        for (int channel = 0; channel < numOutputChannels; ++channel)\n        {\n            float* data = outputChannelData[channel];\n\n            for (int sample = 0; sample < numSamples; ++sample)\n                *data++ = rand() / (float)RAND_MAX;\n        }\n    }\n\n    void audioDeviceAboutToStart(juce::AudioIODevice* device)\n    {\n    }\n\n    void audioDeviceStopped()\n    {\n    }\n};\n\"\"\")\n\n\nclass MainContentComponent2(juce.Component):\n    deviceManager = juce.AudioDeviceManager()\n    audioCallback = cppyy.gbl.AudioCallback()\n\n    def __init__(self):\n        super().__init__()\n\n        result = self.deviceManager.initialiseWithDefaultDevices(0, 2)\n        if result.isNotEmpty():\n            print(result.toRawUTF8())\n\n        self.deviceManager.addAudioCallback(self.audioCallback)\n\n        self.setSize(800, 600)\n\n    def __del__(self):\n        if not self.deviceManager:\n            return\n\n        self.deviceManager.removeAudioCallback(self.audioCallback)\n\n        self.deviceManager.closeAudioDevice()\n        self.deviceManager = None\n\n    def paint(self, g):\n        g.fillAll(juce.Colours.slategrey)\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent2, name=\"C++ Audio Callback\")\n"
  },
  {
    "path": "examples/wip/audio_player_cpp.py",
    "content": "import sys\nsys.path.insert(0, \"../\")\n\nimport math\nimport cppyy\nfrom enum import Enum\n\nfrom popsicle import juce_gui_basics, juce_audio_utils\nfrom popsicle import juce, juce_multi, START_JUCE_COMPONENT\n\ncppyy.cppdef(\"\"\"\n\nclass AudioAppComponent : public juce::Component, public juce::AudioSource\n{\npublic:\n    AudioAppComponent() = default;\n\n    void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override\n    {\n        transportSource.prepareToPlay(samplesPerBlockExpected, sampleRate);\n    }\n\n    void getNextAudioBlock(const juce::AudioSourceChannelInfo& bufferToFill) override\n    {\n        if (!hasReader.get())\n            bufferToFill.clearActiveBufferRegion();\n        else\n            transportSource.getNextAudioBlock(bufferToFill);\n    }\n\n    void releaseResources() override\n    {\n        transportSource.releaseResources();\n    }\n\n    juce::AudioTransportSource transportSource;\n    juce::AudioSourcePlayer audioSourcePlayer;\n    juce::Atomic<bool> hasReader{ false };\n};\n\"\"\")\n\n\nclass TransportState(Enum):\n    Stopped = 0\n    Starting = 1\n    Playing = 2\n    Stopping = 3\n\n\nclass MainContentComponent(juce_multi(cppyy.gbl.AudioAppComponent, juce.ChangeListener, juce.Timer)):\n    openButton = juce.TextButton()\n    playButton = juce.TextButton()\n    stopButton = juce.TextButton()\n    loopingToggle = juce.ToggleButton()\n    currentPositionLabel = juce.Label()\n\n    deviceManager = juce.AudioDeviceManager()\n    formatManager = juce.AudioFormatManager()\n    state = TransportState.Stopped\n\n    def __init__(self):\n        super().__init__((), (), ())\n\n        self.addAndMakeVisible(self.openButton)\n        self.openButton.setButtonText(\"Open...\")\n        self.openButton.onClick = self.openButtonClicked\n\n        self.addAndMakeVisible (self.playButton)\n        self.playButton.setButtonText (\"Play\")\n        self.playButton.onClick = self.playButtonClicked\n        self.playButton.setColour(juce.TextButton.buttonColourId, juce.Colours.green)\n        self.playButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.stopButton)\n        self.stopButton.setButtonText(\"Stop\")\n        self.stopButton.onClick = self.stopButtonClicked\n        self.stopButton.setColour(juce.TextButton.buttonColourId, juce.Colours.red)\n        self.stopButton.setEnabled(False)\n\n        self.addAndMakeVisible(self.loopingToggle)\n        self.loopingToggle.setButtonText(\"Loop\")\n        self.loopingToggle.onClick = self.loopButtonChanged\n\n        self.addAndMakeVisible(self.currentPositionLabel)\n        self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n        self.formatManager.registerBasicFormats()\n        self.transportSource.addChangeListener(self)\n\n        self.deviceManager.initialise(0, 2, cppyy.nullptr, True)\n        self.deviceManager.addAudioCallback(self.audioSourcePlayer)\n        self.audioSourcePlayer.setSource(self)\n\n        self.setSize(400, 400)\n        self.startTimer(20)\n\n    def __del__(self):\n        if not self.deviceManager:\n            return\n\n        self.hasReader.set(False)\n        self.deviceManager.removeAudioCallback(self.audioSourcePlayer)\n\n        self.transportSource.setSource(cppyy.nullptr)\n        self.audioSourcePlayer.setSource(cppyy.nullptr)\n\n        self.deviceManager.closeAudioDevice()\n        self.deviceManager = None\n\n    def resized(self):\n        self.openButton.setBounds(10, 10, self.getWidth() - 20, 20)\n        self.playButton.setBounds(10, 40, self.getWidth() - 20, 20)\n        self.stopButton.setBounds(10, 70, self.getWidth() - 20, 20)\n        self.loopingToggle.setBounds(10, 100, self.getWidth() - 20, 20)\n        self.currentPositionLabel.setBounds(10, 130, self.getWidth() - 20, 20)\n\n    def changeListenerCallback(self, source):\n        if source == self.transportSource:\n            if self.transportSource.isPlaying():\n                self.changeState(TransportState.Playing)\n            else:\n                self.changeState(TransportState.Stopped)\n\n    def timerCallback(self):\n        if self.transportSource.isPlaying():\n            position = juce.RelativeTime(self.transportSource.getCurrentPosition())\n\n            minutes = int(position.inMinutes()) % 60\n            seconds = int(position.inSeconds()) % 60\n            millis  = int(position.inMilliseconds()) % 1000\n\n            positionString = \"{:02d}:{:02d}:{:03d}\".format(minutes, seconds, millis)\n\n            self.currentPositionLabel.setText(positionString, juce.dontSendNotification)\n        else:\n            self.currentPositionLabel.setText(\"Stopped\", juce.dontSendNotification)\n\n    def updateLoopState(self, shouldLoop):\n        if self.readerSource:\n            self.readerSource.setLooping(shouldLoop)\n\n    def changeState (self, newState):\n        if self.state == newState:\n            return\n\n        self.state = newState\n\n        if self.state == TransportState.Stopped:\n            self.stopButton.setEnabled(False)\n            self.playButton.setEnabled(True)\n            self.transportSource.setPosition(0.0)\n\n        elif self.state == TransportState.Starting:\n            self.playButton.setEnabled(False)\n            self.transportSource.start()\n\n        elif self.state == TransportState.Playing:\n            self.stopButton.setEnabled(True)\n\n        elif self.state == TransportState.Stopping:\n            self.transportSource.stop()\n\n    def openButtonClicked(self):\n        chooser = juce.FileChooser(\"Select a Wave file to play...\", juce.File(), \"*.wav\")\n\n        if chooser.browseForFileToOpen():\n            reader = self.formatManager.createReaderFor(chooser.getResult())\n\n            if reader:\n                self.readerSource = juce.AudioFormatReaderSource(reader, True)\n                self.transportSource.setSource(self.readerSource, 0, cppyy.nullptr, reader.sampleRate, 2)\n                self.hasReader.set(True)\n\n                self.playButton.setEnabled(True)\n            else:\n                self.hasReader.set(False)\n\n    def playButtonClicked(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n        self.changeState(TransportState.Starting)\n\n    def stopButtonClicked(self):\n        self.changeState(TransportState.Stopping)\n\n    def loopButtonChanged(self):\n        self.updateLoopState(self.loopingToggle.getToggleState())\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"C++ Audio Player\")\n"
  },
  {
    "path": "examples/wip/copy_image_pixels.py",
    "content": "import popsicle as juce\n\ndef createImageFromBuffer(image_data: bytes, width: int, height: int) -> juce.Image:\n    img = juce.Image(juce.Image.ARGB, width, height, True)\n\n    pixels = juce.Image.BitmapData(img, 0, 0, width, height, juce.Image.BitmapData.writeOnly)\n    for y in range(height):\n        line_stride = y * pixels.lineStride\n        for x in range(width):\n            pixel_stride = line_stride + x * pixels.pixelStride\n            pixels.data[pixel_stride + 2] = image_data[pixel_stride + 0]\n            pixels.data[pixel_stride + 1] = image_data[pixel_stride + 1]\n            pixels.data[pixel_stride + 0] = image_data[pixel_stride + 2]\n            pixels.data[pixel_stride + 3] = image_data[pixel_stride + 3]\n\n    return img\n"
  },
  {
    "path": "examples/wip/synth_midi_input.py",
    "content": "import sys\nsys.path.insert(0, \"../\")\n\nimport math\nimport cppyy\nimport cppyy.ll\n\nfrom popsicle import juce_gui_basics, juce_audio_utils\nfrom popsicle import juce, juce_multi, START_JUCE_COMPONENT\n\n\nclass SineWaveSound(juce.SynthesiserSound):\n    def __init__(self):\n        super().__init__()\n\n    def appliesToNote(self, channel):\n        return True\n\n    def appliesToChannel(self, channel):\n        return True\n\n\nclass SineWaveVoice(juce.SynthesiserVoice):\n    def __init__(self):\n        super().__init__()\n\n        self.currentAngle = 0.0\n        self.angleDelta = 0.0\n        self.level = 0.0\n        self.tailOff = 0.0\n\n    def canPlaySound(self, sound):\n        return cppyy.ll.dynamic_cast[SineWaveSound](sound) != cppyy.nullptr\n\n    def startNote(self, midiNoteNumber, velocity, sound, currentPitchWheelPosition):\n        self.currentAngle = 0.0\n        self.level = velocity * 0.15\n        self.tailOff = 0.0\n\n        cyclesPerSecond = juce.MidiMessage.getMidiNoteInHertz(midiNoteNumber)\n        cyclesPerSample = cyclesPerSecond / self.getSampleRate()\n\n        self.angleDelta = cyclesPerSample * 2.0 * math.pi\n\n    def stopNote(self, velocity, allowTailOff):\n        if allowTailOff:\n            if self.tailOff == 0.0:\n                self.tailOff = 1.0\n        else:\n            self.clearCurrentNote()\n            self.angleDelta = 0.0\n\n    def pitchWheelMoved(self, value):\n        pass\n\n    def controllerMoved(self, controller, value):\n        pass\n\n    def renderNextBlock(self, outputBuffer, startSample, numSamples):\n        if self.angleDelta == 0.0:\n            return\n\n        if self.tailOff > 0.0:\n            for _ in range(numSamples):\n                currentSample = float(math.sin(self.currentAngle) * self.level * self.tailOff)\n\n                for i in reversed(range(outputBuffer.getNumChannels())):\n                    outputBuffer.addSample(i, startSample, currentSample)\n\n                self.currentAngle += self.angleDelta\n                startSample += 1\n\n                self.tailOff *= 0.99\n                if self.tailOff <= 0.005:\n                    self.clearCurrentNote()\n                    self.angleDelta = 0.0\n                    break\n\n        else:\n            for _ in range(numSamples):\n                currentSample = float(math.sin(self.currentAngle) * self.level)\n\n                for i in reversed(range(outputBuffer.getNumChannels())):\n                    outputBuffer.addSample(i, startSample, currentSample)\n\n                self.currentAngle += self.angleDelta\n                startSample += 1\n\n\nclass SynthAudioSource(juce.AudioSource):\n    synth = juce.Synthesiser()\n    midiCollector = juce.MidiMessageCollector()\n    voices = []\n\n    def __init__(self, keyState):\n        super().__init__()\n\n        self.keyboardState = keyState\n\n        for _ in range(8):\n            voice = SineWaveVoice()\n            self.voices.append(voice)\n\n            self.synth.addVoice(voice)\n\n        self.synth.addSound(SineWaveSound())\n\n    def setUsingSineWaveSound(self):\n        self.synth.clearSounds()\n\n    def prepareToPlay(self, samplesPerBlockExpected, sampleRate):\n        self.synth.setCurrentPlaybackSampleRate(sampleRate)\n        self.midiCollector.reset(sampleRate)\n\n    def releaseResources(self):\n        pass\n\n    def getNextAudioBlock(self, bufferToFill):\n        bufferToFill.clearActiveBufferRegion()\n\n        incomingMidi = juce.MidiBuffer()\n        self.midiCollector.removeNextBlockOfMessages(incomingMidi, bufferToFill.numSamples)\n\n        self.keyboardState.processNextMidiBuffer(incomingMidi, bufferToFill.startSample, bufferToFill.numSamples, True)\n\n        #self.synth.renderNextBlock(bufferToFill.buffer, incomingMidi, bufferToFill.startSample, bufferToFill.numSamples)\n\n    def getMidiCollector(self):\n        return self.midiCollector\n\n\nclass MainContentComponent(juce_multi(juce.AudioAppComponent, juce.Timer)):\n    keyboardState = juce.MidiKeyboardState()\n    midiInputList = juce.ComboBox()\n    midiInputListLabel = juce.Label()\n    lastInputIndex = 0\n\n    def __init__(self):\n        super().__init__((), ())\n\n        self.synthAudioSource = SynthAudioSource(self.keyboardState)\n        self.keyboardComponent = juce.MidiKeyboardComponent(self.keyboardState, juce.MidiKeyboardComponent.horizontalKeyboard)\n\n        self.addAndMakeVisible(self.midiInputListLabel)\n        self.midiInputListLabel.setText(\"MIDI Input:\", juce.dontSendNotification)\n        self.midiInputListLabel.attachToComponent(self.midiInputList, True)\n\n        midiInputs = juce.MidiInput.getAvailableDevices()\n        self.addAndMakeVisible(self.midiInputList)\n        self.midiInputList.setTextWhenNoChoicesAvailable(\"No MIDI Inputs Enabled\")\n\n        midiInputNames = juce.StringArray()\n        for midiInput in midiInputs:\n            midiInputNames.add(midiInput.name)\n\n        self.midiInputList.addItemList(midiInputNames, 1)\n\n        def onChange():\n            self.setMidiInput(self.midiInputList.getSelectedItemIndex())\n        self.midiInputList.onChange = onChange\n\n        for midiInput in midiInputs:\n            if self.deviceManager.isMidiInputDeviceEnabled(midiInput.identifier):\n                self.setMidiInput(midiInputs.indexOf(midiInput))\n                break\n\n        if self.midiInputList.getSelectedId() == 0:\n            self.setMidiInput(0)\n\n        self.addAndMakeVisible(self.keyboardComponent)\n        self.setAudioChannels(0, 2)\n\n        self.setSize(600, 190)\n        self.startTimer(400)\n\n    def __del__(self):\n        self.keyboardComponent = None\n\n        self.stopTimer()\n        self.shutdownAudio()\n\n    def resized(self):\n        self.midiInputList.setBounds(200, 10, self.getWidth() - 210, 20)\n        self.keyboardComponent.setBounds(10, 40, self.getWidth() - 20, self.getHeight() - 50)\n\n    def prepareToPlay(self, samplesPerBlockExpected, sampleRate):\n        self.synthAudioSource.prepareToPlay(samplesPerBlockExpected, sampleRate)\n\n    def getNextAudioBlock(self, bufferToFill):\n        self.synthAudioSource.getNextAudioBlock(bufferToFill)\n\n    def releaseResources(self):\n        self.synthAudioSource.releaseResources()\n\n    def timerCallback(self):\n        self.keyboardComponent.grabKeyboardFocus()\n        self.stopTimer()\n\n    def setMidiInput(self, index):\n        availableDevices = juce.MidiInput.getAvailableDevices()\n\n        self.deviceManager.removeMidiInputDeviceCallback(availableDevices[self.lastInputIndex].identifier,\n                                                         self.synthAudioSource.getMidiCollector())\n\n        newInput = availableDevices[index]\n\n        if not self.deviceManager.isMidiInputDeviceEnabled(newInput.identifier):\n            self.deviceManager.setMidiInputDeviceEnabled(newInput.identifier, True)\n\n        self.deviceManager.addMidiInputDeviceCallback(newInput.identifier, self.synthAudioSource.getMidiCollector())\n        self.midiInputList.setSelectedId(index + 1, juce.dontSendNotification)\n\n        self.lastInputIndex = index\n\n\nif __name__ == \"__main__\":\n    START_JUCE_COMPONENT(MainContentComponent, name=\"Midi Synth\")\n"
  },
  {
    "path": "justfile",
    "content": "wheel:\n    python -m build --wheel -n && just install\n\ninstall:\n    pip install --force-reinstall dist/popsicle-*.whl\n\nuninstall:\n    pip uninstall -y popsicle\n\ntest *TEST_OPTS:\n    pytest -s {{TEST_OPTS}}\n"
  },
  {
    "path": "modules/CMakeLists.txt",
    "content": "juce_add_modules(juce_python)\n\nadd_library(juce_python_recommended_warning_flags INTERFACE)\nif((CMAKE_CXX_COMPILER_ID STREQUAL \"MSVC\") OR (CMAKE_CXX_SIMULATE_ID STREQUAL \"MSVC\"))\n    #target_compile_options(juce_python_recommended_warning_flags INTERFACE \"/W4\")\nelseif((CMAKE_CXX_COMPILER_ID STREQUAL \"Clang\") OR (CMAKE_CXX_COMPILER_ID STREQUAL \"AppleClang\"))\n    target_compile_options(juce_python_recommended_warning_flags INTERFACE\n        -Wno-shadow-field-in-constructor\n        -Wno-shadow-field\n        -Wno-shadow-uncaptured-local\n        -Wno-shadow\n        -Wno-self-assign-overloaded\n        -Wno-zero-as-null-pointer-constant\n        -Wno-gnu-zero-variadic-macro-arguments\n        -Wno-float-conversion\n        -Wno-float-equal\n        -Wno-extra-semi)\nelseif(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n    target_compile_options(juce_python_recommended_warning_flags INTERFACE\n        -Wno-shadow\n        -Wno-zero-as-null-pointer-constant\n        -Wno-redundant-decls\n        -Wno-float-equal)\nendif()\n\nadd_library(popsicle::juce_python ALIAS juce_python)\nadd_library(popsicle::juce_python_recommended_warning_flags ALIAS juce_python_recommended_warning_flags)\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceAudioBasicsBindings.h\"\n#include \"../utilities/ClassDemangling.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#include \"../utilities/PyBind11Includes.h\"\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace pybind11::literals;\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerAudioBuffer (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"AudioBuffer\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8(), py::buffer_protocol())\n            .def (py::init<>())\n            .def (py::init<int, int>(), \"numChannels\"_a, \"numSamples\"_a)\n        //.def (py::init ([](py::buffer dataToReferTo, int numChannelsToUse, int startSample, int numSamples) {})\n            .def (\"getNumChannels\", &T::getNumChannels)\n            .def (\"getNumSamples\", &T::getNumSamples)\n            .def (\"getReadPointer\", [](const T& self, int channelNumber)\n            {\n                return PyArrayView<const ValueType> (self.getReadPointer (channelNumber), static_cast<size_t> (self.getNumSamples()));\n            }, \"channelNumber\"_a)\n            .def (\"getReadPointer\", [](const T& self, int channelNumber, int sampleIndex)\n            {\n                return PyArrayView<const ValueType> (self.getReadPointer (channelNumber, sampleIndex), static_cast<size_t> (self.getNumSamples() - sampleIndex));\n            }, \"channelNumber\"_a, \"sampleIndex\"_a)\n            .def (\"getWritePointer\", [](T& self, int channelNumber)\n            {\n                return PyArrayView<ValueType> (self.getWritePointer (channelNumber), static_cast<size_t> (self.getNumSamples()));\n            }, \"channelNumber\"_a)\n            .def (\"getWritePointer\", [](T& self, int channelNumber, int sampleIndex)\n            {\n                return PyArrayView<ValueType> (self.getWritePointer (channelNumber, sampleIndex), static_cast<size_t> (self.getNumSamples() - sampleIndex));\n            }, \"channelNumber\"_a, \"sampleIndex\"_a)\n            .def (\"getArrayOfReadPointers\", [](const T& self)\n            {\n                py::list result (self.getNumChannels());\n\n                auto pointersArray = self.getArrayOfReadPointers();\n                for (size_t i = 0; i < static_cast<size_t> (self.getNumChannels()); ++i)\n                    result[i] = PyArrayView<const ValueType> (pointersArray[i], static_cast<size_t> (self.getNumSamples()));\n\n                return result;\n            })\n            .def (\"getArrayOfWritePointers\", [](T& self)\n            {\n                py::list result (self.getNumChannels());\n\n                auto pointersArray = self.getArrayOfWritePointers();\n                for (size_t i = 0; i < static_cast<size_t> (self.getNumChannels()); ++i)\n                    result[i] = PyArrayView<ValueType> (pointersArray[i], static_cast<size_t> (self.getNumSamples()));\n\n                return result;\n            })\n            .def (\"setSize\", &T::setSize,\n                \"newNumChannels\"_a, \"newNumSamples\"_a, \"keepExistingContent\"_a = false, \"clearExtraSpace\"_a = false, \"avoidReallocating\"_a = false)\n        //.def (\"setDataToReferTo\", py::overload_cast<ValueType* const*, int, int, int> (&T::setDataToReferTo))\n        //.def (\"setDataToReferTo\", py::overload_cast<ValueType* const*, int, int> (&T::setDataToReferTo))\n            .def (\"makeCopyOf\", &T::template makeCopyOf<ValueType>, \"other\"_a, \"avoidReallocating\"_a = false)\n            .def (\"clear\", py::overload_cast<> (&T::clear))\n            .def (\"clear\", py::overload_cast<int, int> (&T::clear), \"startSample\"_a, \"numSamples\"_a)\n            .def (\"clear\", py::overload_cast<int, int, int> (&T::clear), \"channel\"_a, \"startSample\"_a, \"numSamples\"_a)\n            .def (\"hasBeenCleared\", &T::hasBeenCleared)\n            .def (\"setNotClear\", &T::setNotClear)\n            .def (\"getSample\", &T::getSample, \"channel\"_a, \"sampleIndex\"_a)\n            .def (\"setSample\", &T::setSample, \"destChannel\"_a, \"destSample\"_a, \"newValue\"_a)\n            .def (\"addSample\", &T::addSample, \"destChannel\"_a, \"destSample\"_a, \"valueToAdd\"_a)\n            .def (\"applyGain\", py::overload_cast<int, int, int, ValueType> (&T::applyGain), \"channel\"_a, \"startSample\"_a, \"numSamples\"_a, \"gain\"_a)\n            .def (\"applyGain\", py::overload_cast<int, int, ValueType> (&T::applyGain), \"startSample\"_a, \"numSamples\"_a, \"gain\"_a)\n            .def (\"applyGain\", py::overload_cast<ValueType> (&T::applyGain), \"gain\"_a)\n            .def (\"applyGainRamp\", py::overload_cast<int, int, int, ValueType, ValueType> (&T::applyGainRamp), \"channel\"_a, \"startSample\"_a, \"numSamples\"_a, \"startGain\"_a, \"endGain\"_a)\n            .def (\"applyGainRamp\", py::overload_cast<int, int, ValueType, ValueType> (&T::applyGainRamp), \"startSample\"_a, \"numSamples\"_a, \"startGain\"_a, \"endGain\"_a)\n            .def (\"addFrom\", py::overload_cast<int, int, const T&, int, int, int, ValueType> (&T::addFrom),\n                \"destChannel\"_a, \"destStartSample\"_a, \"source\"_a, \"sourceChannel\"_a, \"sourceStartSample\"_a, \"numSamples\"_a, \"gainToApplyToSource\"_a = ValueType (1))\n        //.def (\"addFrom\", py::overload_cast<int, int, const ValueType*, int, ValueType> (&T::addFrom))\n        //.def (\"addFromWithRamp\", &T::addFromWithRamp)\n            .def (\"copyFrom\", py::overload_cast<int, int, const T&, int, int, int> (&T::copyFrom),\n                \"destChannel\"_a, \"destStartSample\"_a, \"source\"_a, \"sourceChannel\"_a, \"sourceStartSample\"_a, \"numSamples\"_a)\n        //.def (\"copyFrom\", py::overload_cast<int, int, const ValueType*, int> (&T::copyFrom))\n        //.def (\"copyFrom\", py::overload_cast<int, int, const ValueType*, int, ValueType> (&T::copyFrom))\n        //.def (\"copyFromWithRamp\", &T::copyFromWithRamp)\n            .def (\"findMinMax\", &T::findMinMax, \"channel\"_a, \"startSample\"_a, \"numSamples\"_a)\n            .def (\"getMagnitude\", py::overload_cast<int, int, int> (&T::getMagnitude, py::const_), \"channel\"_a, \"startSample\"_a, \"numSamples\"_a)\n            .def (\"getMagnitude\", py::overload_cast<int, int> (&T::getMagnitude, py::const_), \"startSample\"_a, \"numSamples\"_a)\n            .def (\"getRMSLevel\", &T::getRMSLevel, \"channel\"_a, \"startSample\"_a, \"numSamples\"_a)\n            .def (\"reverse\", py::overload_cast<int, int, int> (&T::reverse, py::const_), \"channel\"_a, \"startSample\"_a, \"numSamples\"_a)\n            .def (\"reverse\", py::overload_cast<int, int> (&T::reverse, py::const_), \"startSample\"_a, \"numSamples\"_a)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getNumChannels() << \", \" << self.getNumSamples() << \")\";\n                return result;\n            })\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"AudioBuffer\", type);\n}\n\n// ============================================================================================\n\nvoid registerJuceAudioBasicsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::FloatArrayView\n\n    py::class_<PyArrayView<const float>> classConstFloatArrayView (m, \"ConstFloatArrayView\", py::buffer_protocol());\n\n    classConstFloatArrayView\n        .def (\"__getitem__\", [](PyArrayView<const float>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__len__\", &PyArrayView<const float>::size)\n        .def (\"__iter__\", [](PyArrayView<const float>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<const float>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), true);\n        })\n    ;\n\n    py::class_<PyArrayView<float>> classFloatArrayView (m, \"FloatArrayView\", py::buffer_protocol());\n\n    classFloatArrayView\n        .def (\"__getitem__\", [](PyArrayView<float>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__setitem__\", [](PyArrayView<float>& self, size_t index, float value)\n        {\n            if (index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of channel data\");\n\n            *(self.data() + index) = value;\n        })\n        .def (\"__len__\", &PyArrayView<float>::size)\n        .def (\"__iter__\", [](PyArrayView<float>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<float>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), false);\n        })\n    ;\n\n    // ============================================================================================ juce::DoubleArrayView\n\n    py::class_<PyArrayView<const double>> classConstDoubleArrayView (m, \"ConstDoubleArrayView\", py::buffer_protocol());\n\n    classConstDoubleArrayView\n        .def (\"__getitem__\", [](PyArrayView<const double>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__len__\", &PyArrayView<const double>::size)\n        .def (\"__iter__\", [](PyArrayView<const double>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<const double>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), true);\n        })\n    ;\n\n    py::class_<PyArrayView<double>> classDoubleArrayView (m, \"DoubleArrayView\", py::buffer_protocol());\n\n    classDoubleArrayView\n        .def (\"__getitem__\", [](PyArrayView<double>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__setitem__\", [](PyArrayView<double>& self, size_t index, double value)\n        {\n            if (index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of channel data\");\n\n            *(self.data() + index) = value;\n        })\n        .def (\"__len__\", &PyArrayView<double>::size)\n        .def (\"__iter__\", [](PyArrayView<double>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<double>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), false);\n        })\n    ;\n\n    // ============================================================================================ juce::IntArrayView\n\n    py::class_<PyArrayView<const int>> classConstIntArrayView (m, \"ConstIntArrayView\", py::buffer_protocol());\n\n    classConstIntArrayView\n        .def (\"__getitem__\", [](PyArrayView<const int>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__len__\", &PyArrayView<const int>::size)\n        .def (\"__iter__\", [](PyArrayView<const int>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<const int>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), true);\n        })\n    ;\n\n    py::class_<PyArrayView<int>> classIntArrayView (m, \"IntArrayView\", py::buffer_protocol());\n\n    classIntArrayView\n        .def (\"__getitem__\", [](PyArrayView<int>& self, size_t index)\n        {\n            if (self.data() == nullptr || index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of array data\");\n\n            return *(self.data() + index);\n        })\n        .def (\"__setitem__\", [](PyArrayView<int>& self, size_t index, int value)\n        {\n            if (index >= self.size())\n                pybind11::pybind11_fail (\"Out of bound access of channel data\");\n\n            *(self.data() + index) = value;\n        })\n        .def (\"__len__\", &PyArrayView<int>::size)\n        .def (\"__iter__\", [](PyArrayView<int>& self)\n        {\n            if (self.data() == nullptr)\n                pybind11::pybind11_fail (\"Invalid empty array\");\n\n            return py::make_iterator (self.data(), self.data() + self.size());\n        })\n        .def_buffer ([](PyArrayView<int>& self) -> py::buffer_info\n        {\n            return py::buffer_info (self.data(), static_cast<ssize_t> (self.size()), false);\n        })\n    ;\n\n    // ============================================================================================ juce::AudioBuffer\n\n    registerAudioBuffer<AudioBuffer, float, double>(m);\n\n    m.attr (\"AudioSampleBuffer\") = m.attr (\"AudioBuffer\")[py::type::of (py::cast (float{}))];\n\n    // ============================================================================================ juce::AudioChannelSet\n\n    py::class_<AudioChannelSet> classAudioChannelSet (m, \"AudioChannelSet\");\n\n    py::enum_<AudioChannelSet::ChannelType> (classAudioChannelSet, \"ChannelType\")\n        .value (\"unknown\", AudioChannelSet::ChannelType::unknown)\n        .value (\"left\", AudioChannelSet::ChannelType::left)\n        .value (\"right\", AudioChannelSet::ChannelType::right)\n        .value (\"centre\", AudioChannelSet::ChannelType::centre)\n        .value (\"LFE\", AudioChannelSet::ChannelType::LFE)\n        .value (\"leftSurround\", AudioChannelSet::ChannelType::leftSurround)\n        .value (\"rightSurround\", AudioChannelSet::ChannelType::rightSurround)\n        .value (\"leftCentre\", AudioChannelSet::ChannelType::leftCentre)\n        .value (\"rightCentre\", AudioChannelSet::ChannelType::rightCentre)\n        .value (\"centreSurround\", AudioChannelSet::ChannelType::centreSurround)\n        .value (\"surround\", AudioChannelSet::ChannelType::surround)\n        .value (\"leftSurroundSide\", AudioChannelSet::ChannelType::leftSurroundSide)\n        .value (\"rightSurroundSide\", AudioChannelSet::ChannelType::rightSurroundSide)\n        .value (\"topMiddle\", AudioChannelSet::ChannelType::topMiddle)\n        .value (\"topFrontLeft\", AudioChannelSet::ChannelType::topFrontLeft)\n        .value (\"topFrontCentre\", AudioChannelSet::ChannelType::topFrontCentre)\n        .value (\"topFrontRight\", AudioChannelSet::ChannelType::topFrontRight)\n        .value (\"topRearLeft\", AudioChannelSet::ChannelType::topRearLeft)\n        .value (\"topRearCentre\", AudioChannelSet::ChannelType::topRearCentre)\n        .value (\"topRearRight\", AudioChannelSet::ChannelType::topRearRight)\n        .value (\"LFE2\", AudioChannelSet::ChannelType::LFE2)\n        .value (\"leftSurroundRear\", AudioChannelSet::ChannelType::leftSurroundRear)\n        .value (\"rightSurroundRear\", AudioChannelSet::ChannelType::rightSurroundRear)\n        .value (\"wideLeft\", AudioChannelSet::ChannelType::wideLeft)\n        .value (\"wideRight\", AudioChannelSet::ChannelType::wideRight)\n        .value (\"topSideLeft\", AudioChannelSet::ChannelType::topSideLeft)\n        .value (\"topSideRight\", AudioChannelSet::ChannelType::topSideRight)\n        .value (\"ambisonicACN0\", AudioChannelSet::ChannelType::ambisonicACN0)\n        .value (\"ambisonicACN1\", AudioChannelSet::ChannelType::ambisonicACN1)\n        .value (\"ambisonicACN2\", AudioChannelSet::ChannelType::ambisonicACN2)\n        .value (\"ambisonicACN3\", AudioChannelSet::ChannelType::ambisonicACN3)\n        .value (\"ambisonicACN4\", AudioChannelSet::ChannelType::ambisonicACN4)\n        .value (\"ambisonicACN5\", AudioChannelSet::ChannelType::ambisonicACN5)\n        .value (\"ambisonicACN6\", AudioChannelSet::ChannelType::ambisonicACN6)\n        .value (\"ambisonicACN7\", AudioChannelSet::ChannelType::ambisonicACN7)\n        .value (\"ambisonicACN8\", AudioChannelSet::ChannelType::ambisonicACN8)\n        .value (\"ambisonicACN9\", AudioChannelSet::ChannelType::ambisonicACN9)\n        .value (\"ambisonicACN10\", AudioChannelSet::ChannelType::ambisonicACN10)\n        .value (\"ambisonicACN11\", AudioChannelSet::ChannelType::ambisonicACN11)\n        .value (\"ambisonicACN12\", AudioChannelSet::ChannelType::ambisonicACN12)\n        .value (\"ambisonicACN13\", AudioChannelSet::ChannelType::ambisonicACN13)\n        .value (\"ambisonicACN14\", AudioChannelSet::ChannelType::ambisonicACN14)\n        .value (\"ambisonicACN15\", AudioChannelSet::ChannelType::ambisonicACN15)\n        .value (\"ambisonicACN16\", AudioChannelSet::ChannelType::ambisonicACN16)\n        .value (\"ambisonicACN17\", AudioChannelSet::ChannelType::ambisonicACN17)\n        .value (\"ambisonicACN18\", AudioChannelSet::ChannelType::ambisonicACN18)\n        .value (\"ambisonicACN19\", AudioChannelSet::ChannelType::ambisonicACN19)\n        .value (\"ambisonicACN20\", AudioChannelSet::ChannelType::ambisonicACN20)\n        .value (\"ambisonicACN21\", AudioChannelSet::ChannelType::ambisonicACN21)\n        .value (\"ambisonicACN22\", AudioChannelSet::ChannelType::ambisonicACN22)\n        .value (\"ambisonicACN23\", AudioChannelSet::ChannelType::ambisonicACN23)\n        .value (\"ambisonicACN24\", AudioChannelSet::ChannelType::ambisonicACN24)\n        .value (\"ambisonicACN25\", AudioChannelSet::ChannelType::ambisonicACN25)\n        .value (\"ambisonicACN26\", AudioChannelSet::ChannelType::ambisonicACN26)\n        .value (\"ambisonicACN27\", AudioChannelSet::ChannelType::ambisonicACN27)\n        .value (\"ambisonicACN28\", AudioChannelSet::ChannelType::ambisonicACN28)\n        .value (\"ambisonicACN29\", AudioChannelSet::ChannelType::ambisonicACN29)\n        .value (\"ambisonicACN30\", AudioChannelSet::ChannelType::ambisonicACN30)\n        .value (\"ambisonicACN31\", AudioChannelSet::ChannelType::ambisonicACN31)\n        .value (\"ambisonicACN32\", AudioChannelSet::ChannelType::ambisonicACN32)\n        .value (\"ambisonicACN33\", AudioChannelSet::ChannelType::ambisonicACN33)\n        .value (\"ambisonicACN34\", AudioChannelSet::ChannelType::ambisonicACN34)\n        .value (\"ambisonicACN35\", AudioChannelSet::ChannelType::ambisonicACN35)\n        .value (\"ambisonicW\", AudioChannelSet::ChannelType::ambisonicW)\n        .value (\"ambisonicX\", AudioChannelSet::ChannelType::ambisonicX)\n        .value (\"ambisonicY\", AudioChannelSet::ChannelType::ambisonicY)\n        .value (\"ambisonicZ\", AudioChannelSet::ChannelType::ambisonicZ)\n        .value (\"bottomFrontLeft\", AudioChannelSet::ChannelType::bottomFrontLeft)\n        .value (\"bottomFrontCentre\", AudioChannelSet::ChannelType::bottomFrontCentre)\n        .value (\"bottomFrontRight\", AudioChannelSet::ChannelType::bottomFrontRight)\n        .value (\"proximityLeft\", AudioChannelSet::ChannelType::proximityLeft)\n        .value (\"proximityRight\", AudioChannelSet::ChannelType::proximityRight)\n        .value (\"bottomSideLeft\", AudioChannelSet::ChannelType::bottomSideLeft)\n        .value (\"bottomSideRight\", AudioChannelSet::ChannelType::bottomSideRight)\n        .value (\"bottomRearLeft\", AudioChannelSet::ChannelType::bottomRearLeft)\n        .value (\"bottomRearCentre\", AudioChannelSet::ChannelType::bottomRearCentre)\n        .value (\"bottomRearRight\", AudioChannelSet::ChannelType::bottomRearRight)\n        .value (\"ambisonicACN36\", AudioChannelSet::ChannelType::ambisonicACN36)\n        .value (\"ambisonicACN37\", AudioChannelSet::ChannelType::ambisonicACN37)\n        .value (\"ambisonicACN38\", AudioChannelSet::ChannelType::ambisonicACN38)\n        .value (\"ambisonicACN39\", AudioChannelSet::ChannelType::ambisonicACN39)\n        .value (\"ambisonicACN40\", AudioChannelSet::ChannelType::ambisonicACN40)\n        .value (\"ambisonicACN41\", AudioChannelSet::ChannelType::ambisonicACN41)\n        .value (\"ambisonicACN42\", AudioChannelSet::ChannelType::ambisonicACN42)\n        .value (\"ambisonicACN43\", AudioChannelSet::ChannelType::ambisonicACN43)\n        .value (\"ambisonicACN44\", AudioChannelSet::ChannelType::ambisonicACN44)\n        .value (\"ambisonicACN45\", AudioChannelSet::ChannelType::ambisonicACN45)\n        .value (\"ambisonicACN46\", AudioChannelSet::ChannelType::ambisonicACN46)\n        .value (\"ambisonicACN47\", AudioChannelSet::ChannelType::ambisonicACN47)\n        .value (\"ambisonicACN48\", AudioChannelSet::ChannelType::ambisonicACN48)\n        .value (\"ambisonicACN49\", AudioChannelSet::ChannelType::ambisonicACN49)\n        .value (\"ambisonicACN50\", AudioChannelSet::ChannelType::ambisonicACN50)\n        .value (\"ambisonicACN51\", AudioChannelSet::ChannelType::ambisonicACN51)\n        .value (\"ambisonicACN52\", AudioChannelSet::ChannelType::ambisonicACN52)\n        .value (\"ambisonicACN53\", AudioChannelSet::ChannelType::ambisonicACN53)\n        .value (\"ambisonicACN54\", AudioChannelSet::ChannelType::ambisonicACN54)\n        .value (\"ambisonicACN55\", AudioChannelSet::ChannelType::ambisonicACN55)\n        .value (\"ambisonicACN56\", AudioChannelSet::ChannelType::ambisonicACN56)\n        .value (\"ambisonicACN57\", AudioChannelSet::ChannelType::ambisonicACN57)\n        .value (\"ambisonicACN58\", AudioChannelSet::ChannelType::ambisonicACN58)\n        .value (\"ambisonicACN59\", AudioChannelSet::ChannelType::ambisonicACN59)\n        .value (\"ambisonicACN60\", AudioChannelSet::ChannelType::ambisonicACN60)\n        .value (\"ambisonicACN61\", AudioChannelSet::ChannelType::ambisonicACN61)\n        .value (\"ambisonicACN62\", AudioChannelSet::ChannelType::ambisonicACN62)\n        .value (\"ambisonicACN63\", AudioChannelSet::ChannelType::ambisonicACN63)\n        .value (\"discreteChannel0\", AudioChannelSet::ChannelType::discreteChannel0)\n        .export_values();\n\n    classAudioChannelSet\n        .def (py::init<>())\n        .def_static (\"disabled\", &AudioChannelSet::disabled)\n        .def_static (\"mono\", &AudioChannelSet::mono)\n        .def_static (\"stereo\", &AudioChannelSet::stereo)\n        .def_static (\"createLCR\", &AudioChannelSet::createLCR)\n        .def_static (\"createLRS\", &AudioChannelSet::createLRS)\n        .def_static (\"createLCRS\", &AudioChannelSet::createLCRS)\n        .def_static (\"create5point0\", &AudioChannelSet::create5point0)\n        .def_static (\"create5point1\", &AudioChannelSet::create5point1)\n        .def_static (\"create6point0\", &AudioChannelSet::create6point0)\n        .def_static (\"create6point1\", &AudioChannelSet::create6point1)\n        .def_static (\"create6point0Music\", &AudioChannelSet::create6point0Music)\n        .def_static (\"create6point1Music\", &AudioChannelSet::create6point1Music)\n        .def_static (\"create7point0\", &AudioChannelSet::create7point0)\n        .def_static (\"create7point0SDDS\", &AudioChannelSet::create7point0SDDS)\n        .def_static (\"create7point1\", &AudioChannelSet::create7point1)\n        .def_static (\"create7point1SDDS\", &AudioChannelSet::create7point1SDDS)\n        .def_static (\"create5point0point2\", &AudioChannelSet::create5point0point2)\n        .def_static (\"create5point1point2\", &AudioChannelSet::create5point1point2)\n        .def_static (\"create5point0point4\", &AudioChannelSet::create5point0point4)\n        .def_static (\"create5point1point4\", &AudioChannelSet::create5point1point4)\n        .def_static (\"create7point0point2\", &AudioChannelSet::create7point0point2)\n        .def_static (\"create7point1point2\", &AudioChannelSet::create7point1point2)\n        .def_static (\"create7point0point4\", &AudioChannelSet::create7point0point4)\n        .def_static (\"create7point1point4\", &AudioChannelSet::create7point1point4)\n        .def_static (\"create7point0point6\", &AudioChannelSet::create7point0point6)\n        .def_static (\"create7point1point6\", &AudioChannelSet::create7point1point6)\n        .def_static (\"create9point0point4\", &AudioChannelSet::create9point0point4)\n        .def_static (\"create9point1point4\", &AudioChannelSet::create9point1point4)\n        .def_static (\"create9point0point6\", &AudioChannelSet::create9point0point6)\n        .def_static (\"create9point1point6\", &AudioChannelSet::create9point1point6)\n        .def_static (\"quadraphonic\", &AudioChannelSet::quadraphonic)\n        .def_static (\"pentagonal\", &AudioChannelSet::pentagonal)\n        .def_static (\"hexagonal\", &AudioChannelSet::hexagonal)\n        .def_static (\"octagonal\", &AudioChannelSet::octagonal)\n        .def_static (\"ambisonic\", &AudioChannelSet::ambisonic, \"order\"_a = 1)\n        .def (\"getAmbisonicOrder\", &AudioChannelSet::getAmbisonicOrder)\n        .def_static (\"discreteChannels\", &AudioChannelSet::discreteChannels)\n        .def_static (\"canonicalChannelSet\", &AudioChannelSet::canonicalChannelSet)\n        .def_static (\"namedChannelSet\", &AudioChannelSet::namedChannelSet)\n        .def_static (\"channelSetsWithNumberOfChannels\", &AudioChannelSet::channelSetsWithNumberOfChannels)\n        .def_static (\"getChannelTypeName\", &AudioChannelSet::getChannelTypeName)\n        .def_static (\"getAbbreviatedChannelTypeName\", &AudioChannelSet::getAbbreviatedChannelTypeName)\n        .def_static (\"getChannelTypeFromAbbreviation\", &AudioChannelSet::getChannelTypeFromAbbreviation)\n        .def (\"addChannel\", &AudioChannelSet::addChannel)\n        .def (\"removeChannel\", &AudioChannelSet::removeChannel)\n        .def (\"size\", &AudioChannelSet::size)\n        .def (\"isDisabled\", &AudioChannelSet::isDisabled)\n        .def (\"getChannelTypes\", &AudioChannelSet::getChannelTypes)\n        .def (\"getTypeOfChannel\", &AudioChannelSet::getTypeOfChannel)\n        .def (\"getChannelIndexForType\", &AudioChannelSet::getChannelIndexForType)\n        .def (\"getSpeakerArrangementAsString\", &AudioChannelSet::getSpeakerArrangementAsString)\n        .def_static (\"fromAbbreviatedString\", &AudioChannelSet::fromAbbreviatedString)\n        .def (\"getDescription\", &AudioChannelSet::getDescription)\n        .def (\"isDiscreteLayout\", &AudioChannelSet::isDiscreteLayout)\n        .def (\"intersect\", &AudioChannelSet::intersect)\n        .def_static (\"channelSetWithChannels\", &AudioChannelSet::channelSetWithChannels)\n        .def_static (\"fromWaveChannelMask\", &AudioChannelSet::fromWaveChannelMask)\n        .def (\"getWaveChannelMask\", &AudioChannelSet::getWaveChannelMask)\n        .def_static (\"getAmbisonicOrderForNumChannels\", &AudioChannelSet::getAmbisonicOrderForNumChannels)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self < py::self)\n    ;\n\n    classAudioChannelSet.attr (\"maxChannelsOfNamedLayout\") = py::int_ (static_cast<int> (AudioChannelSet::maxChannelsOfNamedLayout));\n\n    // ============================================================================================ juce::AudioProcessLoadMeasurer\n\n    py::class_<AudioProcessLoadMeasurer> classAudioProcessLoadMeasurer (m, \"AudioProcessLoadMeasurer\");\n\n    py::class_<AudioProcessLoadMeasurer::ScopedTimer> classAudioProcessLoadMeasurerScopedTimer (classAudioProcessLoadMeasurer, \"ScopedTimer\");\n\n    classAudioProcessLoadMeasurerScopedTimer\n        .def (py::init<AudioProcessLoadMeasurer&>())\n        .def (py::init<AudioProcessLoadMeasurer&, int>())\n        // TODO __enter__ __exit__\n    ;\n\n    classAudioProcessLoadMeasurer\n        .def (py::init<>())\n        .def (\"reset\", py::overload_cast<> (&AudioProcessLoadMeasurer::reset))\n        .def (\"reset\", py::overload_cast<double, int> (&AudioProcessLoadMeasurer::reset))\n        .def (\"getLoadAsProportion\", &AudioProcessLoadMeasurer::getLoadAsProportion)\n        .def (\"getLoadAsPercentage\", &AudioProcessLoadMeasurer::getLoadAsPercentage)\n        .def (\"getXRunCount\", &AudioProcessLoadMeasurer::getXRunCount)\n        .def (\"registerBlockRenderTime\", &AudioProcessLoadMeasurer::registerBlockRenderTime)\n        .def (\"registerRenderTime\", &AudioProcessLoadMeasurer::registerRenderTime)\n    ;\n\n    // ============================================================================================ juce::AudioSourceChannelInfo\n\n    py::class_<AudioSourceChannelInfo> classAudioSourceChannelInfo (m, \"AudioSourceChannelInfo\");\n\n    classAudioSourceChannelInfo\n        .def (py::init<>())\n        .def (py::init<AudioBuffer<float>*, int, int>(), \"bufferToUse\"_a, \"startSampleOffset\"_a, \"numSamplesToUse\"_a)\n        .def (py::init<AudioBuffer<float>&>(), \"bufferToUse\"_a)\n        .def_readwrite (\"buffer\", &AudioSourceChannelInfo::buffer, py::return_value_policy::reference_internal)\n        .def_readwrite (\"startSample\", &AudioSourceChannelInfo::startSample)\n        .def_readwrite (\"numSamples\", &AudioSourceChannelInfo::numSamples)\n        .def (\"clearActiveBufferRegion\", &AudioSourceChannelInfo::clearActiveBufferRegion)\n    ;\n\n    // ============================================================================================ juce::AudioSource\n\n    py::class_<AudioSource, PyAudioSource<>> classAudioSource (m, \"AudioSource\");\n\n    classAudioSource\n        .def (py::init<>())\n        .def (\"prepareToPlay\", &AudioSource::prepareToPlay)\n        .def (\"releaseResources\", &AudioSource::releaseResources)\n        .def (\"getNextAudioBlock\", &AudioSource::getNextAudioBlock)\n    ;\n\n    py::class_<PositionableAudioSource, AudioSource, PyPositionableAudioSource<>> classPositionableAudioSource (m, \"PositionableAudioSource\");\n\n    classPositionableAudioSource\n        .def (py::init<>())\n        .def (\"setNextReadPosition\", &PositionableAudioSource::setNextReadPosition)\n        .def (\"getNextReadPosition\", &PositionableAudioSource::getNextReadPosition)\n        .def (\"getTotalLength\", &PositionableAudioSource::getTotalLength)\n        .def (\"isLooping\", &PositionableAudioSource::isLooping)\n        .def (\"setLooping\", &PositionableAudioSource::setLooping)\n    ;\n\n    py::class_<BufferingAudioSource, PositionableAudioSource, PyPositionableAudioSource<BufferingAudioSource>> classBufferingAudioSource (m, \"BufferingAudioSource\");\n\n    classBufferingAudioSource\n        .def (py::init<PositionableAudioSource*, TimeSliceThread&, bool, int, int, bool>(),\n            \"source\"_a, \"backgroundThread\"_a, \"deleteSourceWhenDeleted\"_a, \"numberOfSamplesToBuffer\"_a, \"numberOfChannels\"_a = 2, \"prefillBufferOnPrepareToPlay\"_a = true)\n        .def (\"waitForNextAudioBlockReady\", &BufferingAudioSource::waitForNextAudioBlockReady)\n    ;\n\n    py::class_<ChannelRemappingAudioSource, AudioSource, PyAudioSource<ChannelRemappingAudioSource>> classChannelRemappingAudioSource (m, \"ChannelRemappingAudioSource\");\n\n    classChannelRemappingAudioSource\n        .def (py::init<AudioSource*, bool>(), \"source\"_a, \"deleteSourceWhenDeleted\"_a = false)\n        .def (\"setNumberOfChannelsToProduce\", &ChannelRemappingAudioSource::setNumberOfChannelsToProduce)\n        .def (\"clearAllMappings\", &ChannelRemappingAudioSource::clearAllMappings)\n        .def (\"setInputChannelMapping\", &ChannelRemappingAudioSource::setInputChannelMapping)\n        .def (\"setOutputChannelMapping\", &ChannelRemappingAudioSource::setOutputChannelMapping)\n        .def (\"getRemappedInputChannel\", &ChannelRemappingAudioSource::getRemappedInputChannel)\n        .def (\"getRemappedOutputChannel\", &ChannelRemappingAudioSource::getRemappedOutputChannel)\n        .def (\"createXml\", &ChannelRemappingAudioSource::createXml)\n        .def (\"restoreFromXml\", &ChannelRemappingAudioSource::restoreFromXml)\n    ;\n\n    py::class_<IIRFilterAudioSource, AudioSource, PyAudioSource<IIRFilterAudioSource>> classIIRFilterAudioSource (m, \"IIRFilterAudioSource\");\n\n    classIIRFilterAudioSource\n        .def (py::init<AudioSource*, bool>(), \"source\"_a, \"deleteSourceWhenDeleted\"_a = false)\n    //.def (\"setCoefficients\", &IIRFilterAudioSource::setCoefficients)\n        .def (\"makeInactive\", &IIRFilterAudioSource::makeInactive)\n    ;\n\n    py::class_<MemoryAudioSource, PositionableAudioSource, PyPositionableAudioSource<MemoryAudioSource>> classMemoryAudioSource (m, \"MemoryAudioSource\");\n\n    classMemoryAudioSource\n        .def (py::init<AudioBuffer<float>&, bool, bool>(), \"audioBuffer\"_a, \"copyMemory\"_a, \"shouldLoop\"_a = false)\n    ;\n\n    py::class_<MixerAudioSource, AudioSource, PyAudioSource<MixerAudioSource>> classMixerAudioSource (m, \"MixerAudioSource\");\n\n    classMixerAudioSource\n        .def (py::init<>())\n        .def (\"addInputSource\", &MixerAudioSource::addInputSource)\n        .def (\"removeInputSource\", &MixerAudioSource::removeInputSource)\n        .def (\"removeAllInputs\", &MixerAudioSource::removeAllInputs)\n    ;\n\n    py::class_<ResamplingAudioSource, AudioSource, PyAudioSource<ResamplingAudioSource>> classResamplingAudioSource (m, \"ResamplingAudioSource\");\n\n    classResamplingAudioSource\n        .def (py::init<AudioSource*, bool, int>(), \"inputSource\"_a, \"deleteSourceWhenDeleted\"_a = false, \"numChannels\"_a = 2)\n        .def (\"setResamplingRatio\", &ResamplingAudioSource::setResamplingRatio)\n        .def (\"getResamplingRatio\", &ResamplingAudioSource::getResamplingRatio)\n        .def (\"flushBuffers\", &ResamplingAudioSource::flushBuffers)\n    ;\n\n    py::class_<ReverbAudioSource, AudioSource, PyAudioSource<ReverbAudioSource>> classReverbAudioSource (m, \"ReverbAudioSource\");\n\n    classReverbAudioSource\n        .def (py::init<AudioSource*, bool>(), \"inputSource\"_a, \"deleteSourceWhenDeleted\"_a = false)\n    //.def (\"getParameters\", &ReverbAudioSource::getParameters)\n    //.def (\"setParameters\", &ReverbAudioSource::setParameters)\n        .def (\"setBypassed\", &ReverbAudioSource::setBypassed)\n        .def (\"isBypassed\", &ReverbAudioSource::isBypassed)\n    ;\n\n    py::class_<ToneGeneratorAudioSource, AudioSource, PyAudioSource<ToneGeneratorAudioSource>> classToneGeneratorAudioSource (m, \"ToneGeneratorAudioSource\");\n\n    classToneGeneratorAudioSource\n        .def (py::init<>())\n        .def (\"setAmplitude\", &ToneGeneratorAudioSource::setAmplitude)\n        .def (\"setFrequency\", &ToneGeneratorAudioSource::setFrequency)\n    ;\n\n    // ============================================================================================ juce::AudioPlayHead\n\n    py::class_<AudioPlayHead, PyAudioPlayHead> classAudioPlayHead (m, \"AudioPlayHead\");\n\n    py::enum_<AudioPlayHead::FrameRateType> (classAudioPlayHead, \"FrameRateType\")\n        .value (\"fps23976\", AudioPlayHead::FrameRateType::fps23976)\n        .value (\"fps24\", AudioPlayHead::FrameRateType::fps24)\n        .value (\"fps25\", AudioPlayHead::FrameRateType::fps25)\n        .value (\"fps2997\", AudioPlayHead::FrameRateType::fps2997)\n        .value (\"fps30\", AudioPlayHead::FrameRateType::fps30)\n        .value (\"fps2997drop\", AudioPlayHead::FrameRateType::fps2997drop)\n        .value (\"fps30drop\", AudioPlayHead::FrameRateType::fps30drop)\n        .value (\"fps60\", AudioPlayHead::FrameRateType::fps60)\n        .value (\"fps60drop\", AudioPlayHead::FrameRateType::fps60drop)\n        .value (\"fpsUnknown\", AudioPlayHead::FrameRateType::fpsUnknown)\n        .export_values();\n\n    py::class_<AudioPlayHead::FrameRate> classAudioPlayHeadFrameRate (classAudioPlayHead, \"FrameRate\");\n\n    classAudioPlayHeadFrameRate\n        .def (py::init<>())\n        .def (py::init<AudioPlayHead::FrameRateType>())\n        .def (\"getType\", &AudioPlayHead::FrameRate::getType)\n        .def (\"getBaseRate\", &AudioPlayHead::FrameRate::getBaseRate)\n        .def (\"isDrop\", &AudioPlayHead::FrameRate::isDrop)\n        .def (\"isPullDown\", &AudioPlayHead::FrameRate::isPullDown)\n        .def (\"getEffectiveRate\", &AudioPlayHead::FrameRate::getEffectiveRate)\n        .def (\"withBaseRate\", &AudioPlayHead::FrameRate::withBaseRate)\n        .def (\"withDrop\", &AudioPlayHead::FrameRate::withDrop)\n        .def (\"withPullDown\", &AudioPlayHead::FrameRate::withPullDown)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    py::class_<AudioPlayHead::TimeSignature> classAudioPlayHeadTimeSignature (classAudioPlayHead, \"TimeSignature\");\n\n    classAudioPlayHeadTimeSignature\n        .def (py::init<>())\n        .def_readwrite (\"numerator\", &AudioPlayHead::TimeSignature::numerator)\n        .def_readwrite (\"denominator\", &AudioPlayHead::TimeSignature::denominator)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    py::class_<AudioPlayHead::LoopPoints> classAudioPlayHeadLoopPoints (classAudioPlayHead, \"LoopPoints\");\n\n    classAudioPlayHeadLoopPoints\n        .def (py::init<>())\n        .def_readwrite (\"ppqStart\", &AudioPlayHead::LoopPoints::ppqStart)\n        .def_readwrite (\"ppqEnd\", &AudioPlayHead::LoopPoints::ppqEnd)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    py::class_<AudioPlayHead::CurrentPositionInfo> classAudioPlayHeadCurrentPositionInfo (classAudioPlayHead, \"CurrentPositionInfo\");\n\n    classAudioPlayHeadCurrentPositionInfo\n        .def (py::init<>())\n        .def_readwrite (\"bpm\", &AudioPlayHead::CurrentPositionInfo::bpm)\n        .def_readwrite (\"timeSigNumerator\", &AudioPlayHead::CurrentPositionInfo::timeSigNumerator)\n        .def_readwrite (\"timeSigDenominator\", &AudioPlayHead::CurrentPositionInfo::timeSigDenominator)\n        .def_readwrite (\"timeInSamples\", &AudioPlayHead::CurrentPositionInfo::timeInSamples)\n        .def_readwrite (\"timeInSeconds\", &AudioPlayHead::CurrentPositionInfo::timeInSeconds)\n        .def_readwrite (\"editOriginTime\", &AudioPlayHead::CurrentPositionInfo::editOriginTime)\n        .def_readwrite (\"ppqPosition\", &AudioPlayHead::CurrentPositionInfo::ppqPosition)\n        .def_readwrite (\"ppqPositionOfLastBarStart\", &AudioPlayHead::CurrentPositionInfo::ppqPositionOfLastBarStart)\n        .def_readwrite (\"frameRate\", &AudioPlayHead::CurrentPositionInfo::frameRate)\n        .def_readwrite (\"isPlaying\", &AudioPlayHead::CurrentPositionInfo::isPlaying)\n        .def_readwrite (\"isRecording\", &AudioPlayHead::CurrentPositionInfo::isRecording)\n        .def_readwrite (\"ppqLoopStart\", &AudioPlayHead::CurrentPositionInfo::ppqLoopStart)\n        .def_readwrite (\"ppqLoopEnd\", &AudioPlayHead::CurrentPositionInfo::ppqLoopEnd)\n        .def_readwrite (\"isLooping\", &AudioPlayHead::CurrentPositionInfo::isLooping)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"resetToDefault\", &AudioPlayHead::CurrentPositionInfo::resetToDefault)\n    ;\n\n    py::class_<AudioPlayHead::PositionInfo> classAudioPlayHeadPositionInfo (classAudioPlayHead, \"PositionInfo\");\n\n    classAudioPlayHeadPositionInfo\n        .def (py::init<>())\n        .def (\"getTimeInSamples\", &AudioPlayHead::PositionInfo::getTimeInSamples)\n        .def (\"setTimeInSamples\", &AudioPlayHead::PositionInfo::setTimeInSamples)\n        .def (\"getTimeInSeconds\", &AudioPlayHead::PositionInfo::getTimeInSeconds)\n        .def (\"setTimeInSeconds\", &AudioPlayHead::PositionInfo::setTimeInSeconds)\n        .def (\"getBpm\", &AudioPlayHead::PositionInfo::getBpm)\n        .def (\"setBpm\", &AudioPlayHead::PositionInfo::setBpm)\n        .def (\"getTimeSignature\", &AudioPlayHead::PositionInfo::getTimeSignature)\n        .def (\"setTimeSignature\", &AudioPlayHead::PositionInfo::setTimeSignature)\n        .def (\"getLoopPoints\", &AudioPlayHead::PositionInfo::getLoopPoints)\n        .def (\"setLoopPoints\", &AudioPlayHead::PositionInfo::setLoopPoints)\n        .def (\"getBarCount\", &AudioPlayHead::PositionInfo::getBarCount)\n        .def (\"setBarCount\", &AudioPlayHead::PositionInfo::setBarCount)\n        .def (\"getPpqPositionOfLastBarStart\", &AudioPlayHead::PositionInfo::getPpqPositionOfLastBarStart)\n        .def (\"setPpqPositionOfLastBarStart\", &AudioPlayHead::PositionInfo::setPpqPositionOfLastBarStart)\n        .def (\"getFrameRate\", &AudioPlayHead::PositionInfo::getFrameRate)\n        .def (\"setFrameRate\", &AudioPlayHead::PositionInfo::setFrameRate)\n        .def (\"getPpqPosition\", &AudioPlayHead::PositionInfo::getPpqPosition)\n        .def (\"setPpqPosition\", &AudioPlayHead::PositionInfo::setPpqPosition)\n        .def (\"getEditOriginTime\", &AudioPlayHead::PositionInfo::getEditOriginTime)\n        .def (\"setEditOriginTime\", &AudioPlayHead::PositionInfo::setEditOriginTime)\n        .def (\"getHostTimeNs\", &AudioPlayHead::PositionInfo::getHostTimeNs)\n        .def (\"setHostTimeNs\", &AudioPlayHead::PositionInfo::setHostTimeNs)\n        .def (\"getIsPlaying\", &AudioPlayHead::PositionInfo::getIsPlaying)\n        .def (\"setIsPlaying\", &AudioPlayHead::PositionInfo::setIsPlaying)\n        .def (\"getIsRecording\", &AudioPlayHead::PositionInfo::getIsRecording)\n        .def (\"setIsRecording\", &AudioPlayHead::PositionInfo::setIsRecording)\n        .def (\"getIsLooping\", &AudioPlayHead::PositionInfo::getIsLooping)\n        .def (\"setIsLooping\", &AudioPlayHead::PositionInfo::setIsLooping)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    classAudioPlayHead\n        .def (py::init<>())\n    //.def (\"getCurrentPosition\", &AudioPlayHead::getCurrentPosition)\n        .def (\"getPosition\", &AudioPlayHead::getPosition)\n        .def (\"canControlTransport\", &AudioPlayHead::canControlTransport)\n        .def (\"transportPlay\", &AudioPlayHead::transportPlay)\n        .def (\"transportRecord\", &AudioPlayHead::transportRecord)\n        .def (\"transportRewind\", &AudioPlayHead::transportRewind)\n    ;\n\n    // ============================================================================================ juce::Decibels\n\n    py::class_<Decibels> classDecibels (m, \"Decibels\");\n\n    classDecibels\n        .def_static (\"decibelsToGain\", &Decibels::template decibelsToGain<float>, \"decibels\"_a, \"minusInfinityDb\"_a = -100.0f)\n        .def_static (\"gainToDecibels\", &Decibels::template gainToDecibels<float>, \"gain\"_a, \"minusInfinityDb\"_a = -100.0f)\n        .def_static (\"gainWithLowerBound\", &Decibels::template gainWithLowerBound<float>, \"gain\"_a, \"lowerBoundDb\"_a)\n        .def_static (\"toString\", &Decibels::template toString<float>, \"decibels\"_a, \"decimalPlaces\"_a = 2, \"minusInfinityDb\"_a = -100.0f, \"shouldIncludeSuffix\"_a = true, \"customMinusInfinityString\"_a = String())\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_audio_basics\n #error This binding file requires adding the juce_audio_basics module in the project\n#else\n #include <juce_audio_basics/juce_audio_basics.h>\n#endif\n\n#include \"../utilities/PyBind11Includes.h\"\n\n// #include \"ScriptJuceGuiBasicsBindings.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceAudioBasicsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\ntemplate <class T>\nstruct PyArrayView\n{\n    PyArrayView() = default;\n\n    PyArrayView (T* values, size_t numValues) noexcept\n        : values (values)\n        , numValues (numValues)\n    {\n    }\n\n    T* data() noexcept\n    {\n        return values;\n    }\n\n    template <class U = T>\n    auto data() const noexcept -> std::enable_if_t<! std::is_const_v<U>, const T*>\n    {\n        return values;\n    }\n\n    size_t size() const noexcept\n    {\n        return numValues;\n    }\n\nprivate:\n    T* values = nullptr;\n    size_t numValues = 0;\n};\n\n// =================================================================================================\n\nstruct PyAudioPlayHead : juce::AudioPlayHead\n{\n    using juce::AudioPlayHead::AudioPlayHead;\n\n    juce::Optional<juce::AudioPlayHead::PositionInfo> getPosition() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Optional<juce::AudioPlayHead::PositionInfo>, juce::AudioPlayHead, getPosition);\n    }\n\n    bool canControlTransport() override\n    {\n        PYBIND11_OVERRIDE (bool, juce::AudioPlayHead, canControlTransport);\n    }\n\n    void transportPlay (bool shouldStartPlaying) override\n    {\n        PYBIND11_OVERRIDE (void, juce::AudioPlayHead, transportPlay, shouldStartPlaying);\n    }\n\n    void transportRecord (bool shouldStartRecording) override\n    {\n        PYBIND11_OVERRIDE (void, juce::AudioPlayHead, transportRecord, shouldStartRecording);\n    }\n\n    void transportRewind() override\n    {\n        PYBIND11_OVERRIDE (void, juce::AudioPlayHead, transportRewind);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioSource>\nstruct PyAudioSource : Base\n{\n    using Base::Base;\n\n    void prepareToPlay (int newSamplesPerBlockExpected, double newSampleRate) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, prepareToPlay, newSamplesPerBlockExpected, newSampleRate);\n    }\n\n    void releaseResources() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, releaseResources);\n    }\n\n    void getNextAudioBlock (const juce::AudioSourceChannelInfo& bufferToFill) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, getNextAudioBlock, bufferToFill);\n    }\n};\n\ntemplate <class Base = juce::PositionableAudioSource>\nstruct PyPositionableAudioSource : PyAudioSource<Base>\n{\n    using PyAudioSource<Base>::PyAudioSource;\n\n    void setNextReadPosition (juce::int64 newPosition) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, PyAudioSource<Base>, setNextReadPosition, newPosition);\n    }\n\n    juce::int64 getNextReadPosition() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, PyAudioSource<Base>, getNextReadPosition);\n    }\n\n    juce::int64 getTotalLength() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, PyAudioSource<Base>, getTotalLength);\n    }\n\n    bool isLooping() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, PyAudioSource<Base>, isLooping);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceAudioDevicesBindings.h\"\n#include \"../utilities/ClassDemangling.h\"\n\n#include \"ScriptJuceEventsBindings.h\"\n\n#include <functional>\n#include <string_view>\n#include <typeinfo>\n#include <tuple>\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceAudioDevicesBindings (py::module_& m)\n{\n    // ============================================================================================ juce::WASAPIDeviceMode\n\n    py::enum_<WASAPIDeviceMode> (m, \"WASAPIDeviceMode\")\n        .value (\"shared\", WASAPIDeviceMode::shared)\n        .value (\"exclusive\", WASAPIDeviceMode::exclusive)\n        .value (\"sharedLowLatency\", WASAPIDeviceMode::sharedLowLatency)\n    ;\n\n    // ============================================================================================ juce::AudioIODeviceType\n\n    py::class_<AudioIODeviceType, PyAudioIODeviceType> classAudioIODeviceType (m, \"AudioIODeviceType\");\n\n    classAudioIODeviceType\n        .def (py::init<const String&>())\n        .def (\"getTypeName\", &AudioIODeviceType::getTypeName)\n        .def (\"scanForDevices\", &AudioIODeviceType::scanForDevices)\n        .def (\"getDeviceNames\", &AudioIODeviceType::getDeviceNames)\n        .def (\"getDefaultDeviceIndex\", &AudioIODeviceType::getDefaultDeviceIndex)\n        .def (\"getIndexOfDevice\", &AudioIODeviceType::getIndexOfDevice)\n        .def (\"hasSeparateInputsAndOutputs\", &AudioIODeviceType::hasSeparateInputsAndOutputs)\n        .def (\"createDevice\", &AudioIODeviceType::createDevice)\n        .def (\"addListener\", &AudioIODeviceType::addListener)\n        .def (\"removeListener\", &AudioIODeviceType::removeListener)\n        .def_static (\"createAudioIODeviceType_CoreAudio\", &AudioIODeviceType::createAudioIODeviceType_CoreAudio)\n        .def_static (\"createAudioIODeviceType_iOSAudio\", &AudioIODeviceType::createAudioIODeviceType_iOSAudio)\n        .def_static (\"createAudioIODeviceType_WASAPI\", static_cast<AudioIODeviceType* (*)(WASAPIDeviceMode)> (&AudioIODeviceType::createAudioIODeviceType_WASAPI))\n        .def_static (\"createAudioIODeviceType_DirectSound\", &AudioIODeviceType::createAudioIODeviceType_DirectSound)\n        .def_static (\"createAudioIODeviceType_ASIO\", &AudioIODeviceType::createAudioIODeviceType_ASIO)\n        .def_static (\"createAudioIODeviceType_ALSA\", &AudioIODeviceType::createAudioIODeviceType_ALSA)\n        .def_static (\"createAudioIODeviceType_JACK\", &AudioIODeviceType::createAudioIODeviceType_JACK)\n        .def_static (\"createAudioIODeviceType_Android\", &AudioIODeviceType::createAudioIODeviceType_Android)\n        .def_static (\"createAudioIODeviceType_OpenSLES\", &AudioIODeviceType::createAudioIODeviceType_OpenSLES)\n        .def_static (\"createAudioIODeviceType_Oboe\", &AudioIODeviceType::createAudioIODeviceType_Oboe)\n        .def_static (\"createAudioIODeviceType_Bela\", &AudioIODeviceType::createAudioIODeviceType_Bela)\n    ;\n\n    // ============================================================================================ juce::AudioIODeviceType\n\n    py::class_<AudioIODeviceCallbackContext> classAudioIODeviceCallbackContext (m, \"AudioIODeviceCallbackContext\");\n\n    classAudioIODeviceCallbackContext\n        .def (py::init<>())\n        .def_readonly (\"hostTimeNs\", &AudioIODeviceCallbackContext::hostTimeNs)\n    ;\n\n    // ============================================================================================ juce::AudioIODeviceCallback\n\n    py::class_<AudioIODeviceCallback, PyAudioIODeviceCallback<>> classAudioIODeviceCallback (m, \"AudioIODeviceCallback\");\n\n    classAudioIODeviceCallback\n        .def (py::init<>())\n        //.def (\"audioDeviceIOCallbackWithContext\", [](AudioIODeviceCallback& self, py::buffer inputs, int numInputs, py::buffer outputs, int numOutputs, int numSamples, const AudioIODeviceCallbackContext& ctx)\n        //{\n        //})\n        .def (\"audioDeviceAboutToStart\", &AudioIODeviceCallback::audioDeviceAboutToStart, \"device\"_a)\n        .def (\"audioDeviceStopped\", &AudioIODeviceCallback::audioDeviceStopped)\n        .def (\"audioDeviceError\", &AudioIODeviceCallback::audioDeviceError, \"errorMessage\"_a)\n    ;\n\n    // ============================================================================================ juce::AudioIODeviceCallback\n\n    py::class_<AudioIODevice, PyAudioIODevice> classAudioIODevice (m, \"AudioIODevice\");\n\n    classAudioIODevice\n        .def (py::init<const String&, const String&>())\n        .def (\"getName\", &AudioIODevice::getName)\n        .def (\"getTypeName\", &AudioIODevice::getTypeName)\n        .def (\"getOutputChannelNames\", &AudioIODevice::getOutputChannelNames)\n        .def (\"getOutputChannelNames\", &AudioIODevice::getOutputChannelNames)\n        .def (\"getInputChannelNames\", &AudioIODevice::getInputChannelNames)\n        .def (\"getDefaultOutputChannels\", &AudioIODevice::getDefaultOutputChannels)\n        .def (\"getDefaultInputChannels\", &AudioIODevice::getDefaultInputChannels)\n        .def (\"getAvailableSampleRates\", &AudioIODevice::getAvailableSampleRates)\n        .def (\"getAvailableBufferSizes\", &AudioIODevice::getAvailableBufferSizes)\n        .def (\"getDefaultBufferSize\", &AudioIODevice::getDefaultBufferSize)\n        .def (\"open\", &AudioIODevice::open)\n        .def (\"close\", &AudioIODevice::close)\n        .def (\"isOpen\", &AudioIODevice::isOpen)\n        .def (\"start\", &AudioIODevice::start)\n        .def (\"stop\", &AudioIODevice::stop)\n        .def (\"isPlaying\", &AudioIODevice::isPlaying)\n        .def (\"getLastError\", &AudioIODevice::getLastError)\n        .def (\"getCurrentBufferSizeSamples\", &AudioIODevice::getCurrentBufferSizeSamples)\n        .def (\"getCurrentSampleRate\", &AudioIODevice::getCurrentSampleRate)\n        .def (\"getCurrentBitDepth\", &AudioIODevice::getCurrentBitDepth)\n        .def (\"getActiveOutputChannels\", &AudioIODevice::getActiveOutputChannels)\n        .def (\"getActiveInputChannels\", &AudioIODevice::getActiveInputChannels)\n        .def (\"getOutputLatencyInSamples\", &AudioIODevice::getOutputLatencyInSamples)\n        .def (\"getInputLatencyInSamples\", &AudioIODevice::getInputLatencyInSamples)\n    //.def (\"getWorkgroup\", &AudioIODevice::getWorkgroup)\n        .def (\"hasControlPanel\", &AudioIODevice::hasControlPanel)\n        .def (\"showControlPanel\", &AudioIODevice::showControlPanel)\n        .def (\"getXRunCount\", &AudioIODevice::getXRunCount)\n    ;\n\n    // ============================================================================================ juce::AudioDeviceManager\n\n    py::class_<AudioDeviceManager, ChangeBroadcaster> classAudioDeviceManager (m, \"AudioDeviceManager\");\n\n    py::class_<AudioDeviceManager::AudioDeviceSetup> classAudioDeviceManagerAudioDeviceSetup (classAudioDeviceManager, \"AudioDeviceSetup\");\n\n    classAudioDeviceManagerAudioDeviceSetup\n        .def (py::init<>())\n        .def_readwrite (\"outputDeviceName\", &AudioDeviceManager::AudioDeviceSetup::outputDeviceName)\n        .def_readwrite (\"inputDeviceName\", &AudioDeviceManager::AudioDeviceSetup::inputDeviceName)\n        .def_readwrite (\"sampleRate\", &AudioDeviceManager::AudioDeviceSetup::sampleRate)\n        .def_readwrite (\"bufferSize\", &AudioDeviceManager::AudioDeviceSetup::bufferSize)\n        .def_readwrite (\"inputChannels\", &AudioDeviceManager::AudioDeviceSetup::inputChannels)\n        .def_readwrite (\"useDefaultInputChannels\", &AudioDeviceManager::AudioDeviceSetup::useDefaultInputChannels)\n        .def_readwrite (\"outputChannels\", &AudioDeviceManager::AudioDeviceSetup::outputChannels)\n        .def_readwrite (\"useDefaultOutputChannels\", &AudioDeviceManager::AudioDeviceSetup::useDefaultOutputChannels)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    py::class_<AudioDeviceManager::LevelMeter> classAudioDeviceManagerLevelMeter (classAudioDeviceManager, \"LevelMeter\");\n\n    classAudioDeviceManagerLevelMeter\n        .def (py::init<>())\n        .def (\"getCurrentLevel\", &AudioDeviceManager::LevelMeter::getCurrentLevel)\n    ;\n\n    classAudioDeviceManager\n        .def (py::init<>())\n        .def (\"initialise\", &AudioDeviceManager::initialise,\n            \"numInputChannelsNeeded\"_a, \"numOutputChannelsNeeded\"_a, \"savedState\"_a, \"selectDefaultDeviceOnFailure\"_a, \"preferredDefaultDeviceName\"_a = String(), \"preferredSetupOptions\"_a = nullptr, py::call_guard<py::gil_scoped_release>())\n        .def (\"initialiseWithDefaultDevices\", &AudioDeviceManager::initialiseWithDefaultDevices, py::call_guard<py::gil_scoped_release>())\n        .def (\"createStateXml\", &AudioDeviceManager::createStateXml)\n        .def (\"getAudioDeviceSetup\", py::overload_cast<> (&AudioDeviceManager::getAudioDeviceSetup, py::const_))\n        .def (\"getAudioDeviceSetup\", py::overload_cast<AudioDeviceManager::AudioDeviceSetup&> (&AudioDeviceManager::getAudioDeviceSetup, py::const_))\n        .def (\"setAudioDeviceSetup\", &AudioDeviceManager::setAudioDeviceSetup)\n        .def (\"getCurrentAudioDevice\", &AudioDeviceManager::getCurrentAudioDevice, py::return_value_policy::reference)\n        .def (\"getCurrentAudioDeviceType\", &AudioDeviceManager::getCurrentAudioDeviceType)\n        .def (\"getCurrentDeviceTypeObject\", &AudioDeviceManager::getCurrentDeviceTypeObject, py::return_value_policy::reference)\n        .def (\"setCurrentAudioDeviceType\", &AudioDeviceManager::setCurrentAudioDeviceType)\n        .def (\"getDeviceAudioWorkgroup\", &AudioDeviceManager::getDeviceAudioWorkgroup)\n        .def (\"closeAudioDevice\", &AudioDeviceManager::closeAudioDevice, py::call_guard<py::gil_scoped_release>())\n        .def (\"restartLastAudioDevice\", &AudioDeviceManager::restartLastAudioDevice, py::call_guard<py::gil_scoped_release>())\n        .def (\"addAudioCallback\", &AudioDeviceManager::addAudioCallback, py::call_guard<py::gil_scoped_release>())\n        .def (\"removeAudioCallback\", &AudioDeviceManager::removeAudioCallback, py::call_guard<py::gil_scoped_release>())\n        .def (\"getCpuUsage\", &AudioDeviceManager::getCpuUsage)\n        .def (\"setMidiInputDeviceEnabled\", &AudioDeviceManager::setMidiInputDeviceEnabled)\n        .def (\"isMidiInputDeviceEnabled\", &AudioDeviceManager::isMidiInputDeviceEnabled)\n    //.def (\"addMidiInputDeviceCallback\", &AudioDeviceManager::addMidiInputDeviceCallback)\n    //.def (\"removeMidiInputDeviceCallback\", &AudioDeviceManager::removeMidiInputDeviceCallback)\n        .def (\"setDefaultMidiOutputDevice\", &AudioDeviceManager::setDefaultMidiOutputDevice)\n        .def (\"getDefaultMidiOutputIdentifier\", &AudioDeviceManager::getDefaultMidiOutputIdentifier)\n    //.def (\"getDefaultMidiOutput\", &AudioDeviceManager::getDefaultMidiOutput)\n    //.def (\"getAvailableDeviceTypes\", &AudioDeviceManager::getAvailableDeviceTypes)\n    //.def (\"createAudioDeviceTypes\", &AudioDeviceManager::createAudioDeviceTypes)\n    //.def (\"addAudioDeviceType\", &AudioDeviceManager::addAudioDeviceType)\n    //.def (\"removeAudioDeviceType\", &AudioDeviceManager::removeAudioDeviceType)\n        .def (\"playTestSound\", &AudioDeviceManager::playTestSound, py::call_guard<py::gil_scoped_release>())\n        .def (\"getInputLevelGetter\", &AudioDeviceManager::getInputLevelGetter)\n        .def (\"getOutputLevelGetter\", &AudioDeviceManager::getOutputLevelGetter)\n        .def (\"getAudioCallbackLock\", &AudioDeviceManager::getAudioCallbackLock, py::return_value_policy::reference_internal)\n        .def (\"getMidiCallbackLock\", &AudioDeviceManager::getMidiCallbackLock, py::return_value_policy::reference_internal)\n        .def (\"getXRunCount\", &AudioDeviceManager::getXRunCount)\n    ;\n\n    // ============================================================================================ juce::AudioSourcePlayer\n\n    py::class_<AudioSourcePlayer, AudioIODeviceCallback, PyAudioIODeviceCallback<AudioSourcePlayer>> classAudioSourcePlayer (m, \"AudioSourcePlayer\");\n\n    classAudioSourcePlayer\n        .def (py::init<>())\n        .def (\"setSource\", &AudioSourcePlayer::setSource, py::call_guard<py::gil_scoped_release>())\n        .def (\"setSource\", [](AudioSourcePlayer& self, py::none) { self.setSource (nullptr); }, py::call_guard<py::gil_scoped_release>())\n        .def (\"getCurrentSource\", &AudioSourcePlayer::getCurrentSource, py::return_value_policy::reference)\n        .def (\"setGain\", &AudioSourcePlayer::setGain)\n        .def (\"getGain\", &AudioSourcePlayer::getGain)\n    ;\n\n    // ============================================================================================ juce::AudioTransportSource\n\n    py::class_<AudioTransportSource, PositionableAudioSource, ChangeBroadcaster, PyPositionableAudioSource<AudioTransportSource>> classAudioTransportSource (m, \"AudioTransportSource\");\n\n    classAudioTransportSource\n        .def (py::init<>())\n        .def (\"setSource\", &AudioTransportSource::setSource,\n            \"newSource\"_a, \"readAheadBufferSize\"_a = 0, \"readAheadThread\"_a = static_cast<TimeSliceThread*>(nullptr), \"sourceSampleRateToCorrectFor\"_a = 0.0, \"maxNumChannels\"_a = 2, py::call_guard<py::gil_scoped_release>())\n        .def (\"setSource\", [](AudioTransportSource& self, py::none, int readAheadSize, TimeSliceThread* readAheadThread, double sourceSampleRateToCorrectFor, int maxNumChannels)\n        {\n            self.setSource (nullptr, readAheadSize, readAheadThread, sourceSampleRateToCorrectFor, maxNumChannels);\n        }, \"newSource\"_a, \"readAheadBufferSize\"_a = 0, \"readAheadThread\"_a = static_cast<TimeSliceThread*>(nullptr), \"sourceSampleRateToCorrectFor\"_a = 0.0, \"maxNumChannels\"_a = 2, py::call_guard<py::gil_scoped_release>())\n        .def (\"setSource\", [](AudioTransportSource& self, PositionableAudioSource* newSource, int readAheadSize, py::none, double sourceSampleRateToCorrectFor, int maxNumChannels)\n        {\n            self.setSource (newSource, readAheadSize, nullptr, sourceSampleRateToCorrectFor, maxNumChannels);\n        }, \"newSource\"_a, \"readAheadBufferSize\"_a = 0, \"readAheadThread\"_a = static_cast<TimeSliceThread*>(nullptr), \"sourceSampleRateToCorrectFor\"_a = 0.0, \"maxNumChannels\"_a = 2, py::call_guard<py::gil_scoped_release>())\n        .def (\"setSource\", [](AudioTransportSource& self, py::none, int readAheadSize, py::none, double sourceSampleRateToCorrectFor, int maxNumChannels)\n        {\n            self.setSource (nullptr, readAheadSize, nullptr, sourceSampleRateToCorrectFor, maxNumChannels);\n        }, \"newSource\"_a, \"readAheadBufferSize\"_a = 0, \"readAheadThread\"_a = static_cast<TimeSliceThread*>(nullptr), \"sourceSampleRateToCorrectFor\"_a = 0.0, \"maxNumChannels\"_a = 2, py::call_guard<py::gil_scoped_release>())\n        .def (\"setPosition\", &AudioTransportSource::setPosition)\n        .def (\"getCurrentPosition\", &AudioTransportSource::getCurrentPosition)\n        .def (\"getLengthInSeconds\", &AudioTransportSource::getLengthInSeconds)\n        .def (\"hasStreamFinished\", &AudioTransportSource::hasStreamFinished)\n        .def (\"start\", &AudioTransportSource::start, py::call_guard<py::gil_scoped_release>())\n        .def (\"stop\", &AudioTransportSource::stop, py::call_guard<py::gil_scoped_release>())\n        .def (\"isPlaying\", &AudioTransportSource::isPlaying)\n        .def (\"setGain\", &AudioTransportSource::setGain)\n        .def (\"getGain\", &AudioTransportSource::getGain)\n    ;\n\n    // ============================================================================================ juce::SystemAudioVolume\n\n    py::class_<SystemAudioVolume> classSystemAudioVolume (m, \"SystemAudioVolume\");\n\n    classSystemAudioVolume\n        .def_static (\"getGain\", &SystemAudioVolume::getGain)\n        .def_static (\"setGain\", &SystemAudioVolume::setGain)\n        .def_static (\"isMuted\", &SystemAudioVolume::isMuted)\n        .def_static (\"setMuted\", &SystemAudioVolume::setMuted)\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_audio_devices\n #error This binding file requires adding the juce_audio_devices module in the project\n#else\n #include <juce_audio_devices/juce_audio_devices.h>\n#endif\n\n#include \"ScriptJuceAudioBasicsBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/PythonInterop.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceAudioDevicesBindings (pybind11::module_& m);\n\n// =================================================================================================\n\nstruct PyAudioIODeviceType : juce::AudioIODeviceType\n{\n    using juce::AudioIODeviceType::AudioIODeviceType;\n\n    explicit PyAudioIODeviceType (const juce::String& typeName)\n        : juce::AudioIODeviceType (typeName)\n    {\n    }\n\n    void scanForDevices() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioIODeviceType, scanForDevices);\n    }\n\n    juce::StringArray getDeviceNames (bool wantInputNames = false) const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::StringArray, juce::AudioIODeviceType, getDeviceNames, wantInputNames);\n    }\n\n    int getDefaultDeviceIndex (bool forInput) const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODeviceType, getDefaultDeviceIndex, forInput);\n    }\n\n    int getIndexOfDevice (juce::AudioIODevice* device, bool asInput) const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODeviceType, getIndexOfDevice, device, asInput);\n    }\n\n    bool hasSeparateInputsAndOutputs() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODeviceType, hasSeparateInputsAndOutputs);\n    }\n\n    juce::AudioIODevice* createDevice (const juce::String& outputDeviceName, const juce::String& inputDeviceName) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::AudioIODevice*, juce::AudioIODeviceType, createDevice, outputDeviceName, inputDeviceName);\n    }\n};\n\nstruct PyAudioIODeviceTypeListener : juce::AudioIODeviceType::Listener\n{\n    using juce::AudioIODeviceType::Listener::Listener;\n\n    void audioDeviceListChanged() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioIODeviceType::Listener, audioDeviceListChanged);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioIODeviceCallback>\nstruct PyAudioIODeviceCallback : Base\n{\n    using Base::Base;\n\n    void audioDeviceIOCallbackWithContext (const float* const* inputChannelData,\n                                           int numInputChannels,\n                                           float* const* outputChannelData,\n                                           int numOutputChannels,\n                                           int numSamples,\n                                           const juce::AudioIODeviceCallbackContext& context) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (! override_)\n        {\n            override_ = pybind11::get_override (static_cast<Base*> (this), \"audioDeviceIOCallbackWithContext\");\n            if (! override_)\n                return;\n        }\n\n        const auto numInputs = static_cast<size_t> (numInputChannels);\n\n        pybind11::list inputs (numInputs);\n        for (size_t i = 0; i < numInputs; ++i)\n            inputs[i] = PyArrayView<const float> (inputChannelData[i], static_cast<size_t> (numSamples));\n\n        const auto numOutputs = static_cast<size_t> (numOutputChannels);\n\n        pybind11::list outputs (numOutputs);\n        for (size_t i = 0; i < numOutputs; ++i)\n            outputs[i] = PyArrayView<float> (outputChannelData[i], static_cast<size_t> (numSamples));\n\n        override_ (inputs, numInputChannels, outputs, numOutputChannels, numSamples, context);\n    }\n\n    void audioDeviceAboutToStart (juce::AudioIODevice* device) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, audioDeviceAboutToStart, device);\n    }\n\n    void audioDeviceStopped() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, audioDeviceStopped);\n    }\n\n    void audioDeviceError (const juce::String& errorMessage) override\n    {\n        PYBIND11_OVERRIDE (void, Base, audioDeviceError, errorMessage);\n    }\n\nprivate:\n    pybind11::function override_;\n};\n\n// =================================================================================================\n\nstruct PyAudioIODevice : juce::AudioIODevice\n{\n    using juce::AudioIODevice::AudioIODevice;\n\n    PyAudioIODevice (const juce::String& deviceName, const juce::String& typeName)\n        : juce::AudioIODevice (deviceName, typeName)\n    {\n    }\n\n    juce::StringArray getOutputChannelNames() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::StringArray, juce::AudioIODevice, getOutputChannelNames);\n    }\n\n    juce::StringArray getInputChannelNames() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::StringArray, juce::AudioIODevice, getInputChannelNames);\n    }\n\n    std::optional<juce::BigInteger> getDefaultOutputChannels() const override\n    {\n        PYBIND11_OVERRIDE (std::optional<juce::BigInteger>, juce::AudioIODevice, getDefaultOutputChannels);\n    }\n\n    std::optional<juce::BigInteger> getDefaultInputChannels() const override\n    {\n        PYBIND11_OVERRIDE (std::optional<juce::BigInteger>, juce::AudioIODevice, getDefaultInputChannels);\n    }\n\n    juce::Array<double> getAvailableSampleRates() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Array<double>, juce::AudioIODevice, getAvailableSampleRates);\n    }\n\n    juce::Array<int> getAvailableBufferSizes() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Array<int>, juce::AudioIODevice, getAvailableBufferSizes);\n    }\n\n    int getDefaultBufferSize() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODevice, getDefaultBufferSize);\n    }\n\n    juce::String open (const juce::BigInteger& inputChannels, const juce::BigInteger& outputChannels, double sampleRate, int bufferSizeSamples) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::String, juce::AudioIODevice, open, inputChannels, outputChannels, sampleRate, bufferSizeSamples);\n    }\n\n    void close() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioIODevice, close);\n    }\n\n    bool isOpen() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODevice, isOpen);\n    }\n\n    void start (juce::AudioIODeviceCallback* callback) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioIODevice, start, callback);\n    }\n\n    void stop() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioIODevice, stop);\n    }\n\n    bool isPlaying() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODevice, isPlaying);\n    }\n\n    juce::String getLastError() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::String, juce::AudioIODevice, getLastError);\n    }\n\n    int getCurrentBufferSizeSamples() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODevice, getCurrentBufferSizeSamples);\n    }\n\n    double getCurrentSampleRate() override\n    {\n        PYBIND11_OVERRIDE_PURE (double, juce::AudioIODevice, getCurrentSampleRate);\n    }\n\n    int getCurrentBitDepth() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODevice, getCurrentBitDepth);\n    }\n\n    juce::BigInteger getActiveOutputChannels() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::BigInteger, juce::AudioIODevice, getActiveOutputChannels);\n    }\n\n    juce::BigInteger getActiveInputChannels() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::BigInteger, juce::AudioIODevice, getActiveInputChannels);\n    }\n\n    int getOutputLatencyInSamples() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODevice, getOutputLatencyInSamples);\n    }\n\n    int getInputLatencyInSamples() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::AudioIODevice, getInputLatencyInSamples);\n    }\n\n    juce::AudioWorkgroup getWorkgroup() const override\n    {\n        PYBIND11_OVERRIDE (juce::AudioWorkgroup, juce::AudioIODevice, getWorkgroup);\n    }\n\n    bool hasControlPanel() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODevice, hasControlPanel);\n    }\n\n    bool showControlPanel() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODevice, showControlPanel);\n    }\n\n    bool setAudioPreprocessingEnabled (bool shouldBeEnabled) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::AudioIODevice, setAudioPreprocessingEnabled, shouldBeEnabled);\n    }\n\n    int getXRunCount() const noexcept override\n    {\n        PYBIND11_OVERRIDE (int, juce::AudioIODevice, getXRunCount);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceAudioFormatsBindings.h\"\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceAudioFormatsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::AudioFormatReader\n\n    py::class_<AudioFormatReader, PyAudioFormatReader<>> classAudioFormatReader (m, \"AudioFormatReader\");\n\n    classAudioFormatReader\n        .def (py::init<InputStream*, const String&>())\n        .def (\"getFormatName\", &AudioFormatReader::getFormatName)\n    //.def (\"read\", py::overload_cast<float* const*, int, juce::int64, int> (&AudioFormatReader::read))\n    //.def (\"read\", py::overload_cast<int* const*, int, juce::int64, int, bool> (&AudioFormatReader::read))\n        .def (\"read\", py::overload_cast<AudioBuffer<float>*, int, int, juce::int64, bool, bool> (&AudioFormatReader::read))\n        .def (\"readMaxLevels\", py::overload_cast<juce::int64, juce::int64, Range<float>*, int> (&AudioFormatReader::readMaxLevels))\n    //.def (\"readMaxLevels\", py::overload_cast<juce::int64, juce::int64, float&, float&, float&, float&> (&AudioFormatReader::readMaxLevels))\n        .def (\"searchForLevel\", &AudioFormatReader::searchForLevel)\n        .def_readwrite (\"sampleRate\", &AudioFormatReader::sampleRate)\n        .def_readwrite (\"bitsPerSample\", &AudioFormatReader::bitsPerSample)\n        .def_readwrite (\"lengthInSamples\", &AudioFormatReader::lengthInSamples)\n        .def_readwrite (\"numChannels\", &AudioFormatReader::numChannels)\n        .def_readwrite (\"usesFloatingPointData\", &AudioFormatReader::usesFloatingPointData)\n        .def_readwrite (\"metadataValues\", &AudioFormatReader::metadataValues)\n        .def_readwrite (\"input\", &AudioFormatReader::input)\n        .def (\"getChannelLayout\", &AudioFormatReader::getChannelLayout)\n    //.def (\"readSamples\", &AudioFormatReader::readSamples)\n    ;\n\n    // ============================================================================================ juce::AudioSubsectionReader\n\n    py::class_<AudioSubsectionReader, AudioFormatReader, PyAudioFormatReader<AudioSubsectionReader>> classAudioSubsectionReader (m, \"AudioSubsectionReader\");\n\n    classAudioSubsectionReader\n        .def (py::init<AudioFormatReader*, int64, int64, bool>(),\n            \"sourceReader\"_a, \"subsectionStartSample\"_a, \"subsectionLength\"_a, \"deleteSourceWhenDeleted\"_a = false)\n    ;\n\n    // ============================================================================================ juce::BufferingAudioReader\n\n    py::class_<BufferingAudioReader, AudioFormatReader, PyAudioFormatReader<BufferingAudioReader>> classBufferingAudioReader (m, \"BufferingAudioReader\");\n\n    classBufferingAudioReader\n        .def (py::init<AudioFormatReader*, TimeSliceThread&, int>(),\n            \"sourceReader\"_a, \"timeSliceThread\"_a, \"samplesToBuffer\"_a)\n        .def (\"setReadTimeout\", &BufferingAudioReader::setReadTimeout)\n    ;\n\n    // ============================================================================================ juce::MemoryMappedAudioFormatReader\n\n    py::class_<MemoryMappedAudioFormatReader, AudioFormatReader, PyMemoryMappedAudioFormatReader<>> classMemoryMappedAudioFormatReader (m, \"MemoryMappedAudioFormatReader\");\n\n    classMemoryMappedAudioFormatReader\n        .def (py::init<const File&, const AudioFormatReader&, int64, int64, int>(),\n            \"file\"_a, \"details\"_a, \"dataChunkStart\"_a, \"dataChunkLength\"_a, \"bytesPerFrame\"_a)\n        .def (\"getFile\", &MemoryMappedAudioFormatReader::getFile, py::return_value_policy::reference)\n        .def (\"mapEntireFile\", &MemoryMappedAudioFormatReader::mapEntireFile)\n        .def (\"mapSectionOfFile\", &MemoryMappedAudioFormatReader::mapSectionOfFile)\n        .def (\"getMappedSection\", &MemoryMappedAudioFormatReader::getMappedSection)\n        .def (\"touchSample\", &MemoryMappedAudioFormatReader::touchSample)\n        .def (\"touchSample\", &MemoryMappedAudioFormatReader::touchSample)\n    //.def (\"getSample\", &MemoryMappedAudioFormatReader::getSample)\n        .def (\"getNumBytesUsed\", &MemoryMappedAudioFormatReader::getNumBytesUsed)\n    ;\n\n    // ============================================================================================ juce::AudioFormatReaderSource\n\n    py::class_<AudioFormatReaderSource, PositionableAudioSource, PyPositionableAudioSource<AudioFormatReaderSource>> classAudioFormatReaderSource (m, \"AudioFormatReaderSource\");\n\n    classAudioFormatReaderSource\n        .def (py::init<AudioFormatReader*, bool>(),\n            \"sourceReader\"_a, \"deleteReaderWhenThisIsDeleted\"_a = false)\n        .def (\"getAudioFormatReader\", &AudioFormatReaderSource::getAudioFormatReader, py::return_value_policy::reference)\n    ;\n\n    // ============================================================================================ juce::AudioFormatWriter\n\n    py::class_<AudioFormatWriter, PyAudioFormatWriter<>> classAudioFormatWriter (m, \"AudioFormatWriter\");\n\n    classAudioFormatWriter\n        .def (py::init<OutputStream*, const String&, double, unsigned int, unsigned int>(),\n            \"destStream\"_a, \"formatName\"_a, \"sampleRate\"_a, \"numberOfChannels\"_a, \"bitsPerSample\"_a)\n        .def (py::init<OutputStream*, const String&, double, const AudioChannelSet&, unsigned int>(),\n            \"destStream\"_a, \"formatName\"_a, \"sampleRate\"_a, \"audioChannelLayout\"_a, \"bitsPerSample\"_a)\n        .def (\"getFormatName\", &AudioFormatWriter::getFormatName)\n    //.def (\"write\", &AudioFormatWriter::write)\n        .def (\"flush\", &AudioFormatWriter::flush)\n        .def (\"writeFromAudioReader\", &AudioFormatWriter::writeFromAudioReader, \"reader\"_a, \"startSample\"_a, \"numSamplesToRead\"_a)\n        .def (\"writeFromAudioSource\", &AudioFormatWriter::writeFromAudioSource, \"source\"_a, \"numSamplesToRead\"_a, \"samplesPerBlock\"_a = 2048)\n        .def (\"writeFromAudioSampleBuffer\", &AudioFormatWriter::writeFromAudioSampleBuffer, \"source\"_a, \"startSample\"_a, \"numSamples\"_a)\n    //.def (\"writeFromFloatArrays\", &AudioFormatWriter::writeFromFloatArrays)\n        .def (\"getSampleRate\", &AudioFormatWriter::getSampleRate)\n        .def (\"getNumChannels\", &AudioFormatWriter::getNumChannels)\n        .def (\"getBitsPerSample\", &AudioFormatWriter::getBitsPerSample)\n        .def (\"isFloatingPoint\", &AudioFormatWriter::isFloatingPoint)\n        .def (\"writeFromAudioSampleBuffer\", &AudioFormatWriter::writeFromAudioSampleBuffer)\n    ;\n\n    // ============================================================================================ juce::AudioFormat\n\n    py::class_<AudioFormat, PyAudioFormat<>> classAudioFormat (m, \"AudioFormat\");\n\n    classAudioFormat\n        .def (py::init<String, StringArray>())\n        .def (py::init<StringRef, StringRef>())\n        .def (\"getFormatName\", &AudioFormat::getFormatName)\n        .def (\"getFileExtensions\", &AudioFormat::getFileExtensions)\n        .def (\"canHandleFile\", &AudioFormat::canHandleFile)\n        .def (\"getPossibleSampleRates\", &AudioFormat::getPossibleSampleRates)\n        .def (\"getPossibleBitDepths\", &AudioFormat::getPossibleBitDepths)\n        .def (\"canDoStereo\", &AudioFormat::canDoStereo)\n        .def (\"canDoMono\", &AudioFormat::canDoMono)\n        .def (\"isCompressed\", &AudioFormat::isCompressed)\n        .def (\"isChannelLayoutSupported\", &AudioFormat::isChannelLayoutSupported)\n        .def (\"getQualityOptions\", &AudioFormat::getQualityOptions)\n        .def (\"createReaderFor\", &AudioFormat::createReaderFor)\n        .def (\"createMemoryMappedReader\", py::overload_cast<const File&> (&AudioFormat::createMemoryMappedReader))\n        .def (\"createMemoryMappedReader\", py::overload_cast<FileInputStream*> (&AudioFormat::createMemoryMappedReader))\n        .def (\"createWriterFor\", py::overload_cast<OutputStream*, double, unsigned int, int, const StringPairArray&, int> (&AudioFormat::createWriterFor))\n        .def (\"createWriterFor\", py::overload_cast<OutputStream*, double, const AudioChannelSet&, int, const StringPairArray&, int> (&AudioFormat::createWriterFor))\n    ;\n\n    // ============================================================================================ juce::WavAudioFormat\n\n    py::class_<WavAudioFormat, AudioFormat, PyAudioFormat<WavAudioFormat>> classWavAudioFormat (m, \"WavAudioFormat\");\n\n    classWavAudioFormat\n        .def (py::init<>())\n        .def (\"createBWAVMetadata\", &WavAudioFormat::createBWAVMetadata)\n        .def (\"replaceMetadataInFile\", &WavAudioFormat::replaceMetadataInFile)\n    ;\n\n    classWavAudioFormat.attr (\"bwavDescription\") = py::str (WavAudioFormat::bwavDescription);\n    classWavAudioFormat.attr (\"bwavOriginator\") = py::str (WavAudioFormat::bwavOriginator);\n    classWavAudioFormat.attr (\"bwavOriginatorRef\") = py::str (WavAudioFormat::bwavOriginatorRef);\n    classWavAudioFormat.attr (\"bwavOriginationDate\") = py::str (WavAudioFormat::bwavOriginationDate);\n    classWavAudioFormat.attr (\"bwavOriginationTime\") = py::str (WavAudioFormat::bwavOriginationTime);\n    classWavAudioFormat.attr (\"bwavCodingHistory\") = py::str (WavAudioFormat::bwavCodingHistory);\n    classWavAudioFormat.attr (\"bwavTimeReference\") = py::str (WavAudioFormat::bwavTimeReference);\n    // TODO - missing chunk properties\n\n    // ============================================================================================ juce::AiffAudioFormat\n\n    py::class_<AiffAudioFormat, AudioFormat, PyAudioFormat<AiffAudioFormat>> classAiffAudioFormat (m, \"AiffAudioFormat\");\n\n    classAiffAudioFormat\n        .def (py::init<>())\n    ;\n\n    classAiffAudioFormat.attr (\"appleOneShot\") = py::str (AiffAudioFormat::appleOneShot);\n    classAiffAudioFormat.attr (\"appleRootSet\") = py::str (AiffAudioFormat::appleRootSet);\n    classAiffAudioFormat.attr (\"appleRootNote\") = py::str (AiffAudioFormat::appleRootNote);\n    classAiffAudioFormat.attr (\"appleBeats\") = py::str (AiffAudioFormat::appleBeats);\n    classAiffAudioFormat.attr (\"appleDenominator\") = py::str (AiffAudioFormat::appleDenominator);\n    classAiffAudioFormat.attr (\"appleNumerator\") = py::str (AiffAudioFormat::appleNumerator);\n    classAiffAudioFormat.attr (\"appleTag\") = py::str (AiffAudioFormat::appleTag);\n    classAiffAudioFormat.attr (\"appleKey\") = py::str (AiffAudioFormat::appleKey);\n\n#if JUCE_USE_MP3AUDIOFORMAT\n    // ============================================================================================ juce::MP3AudioFormat\n\n    py::class_<MP3AudioFormat, AudioFormat, PyAudioFormat<MP3AudioFormat>> classMP3AudioFormat (m, \"MP3AudioFormat\");\n\n    classMP3AudioFormat\n        .def (py::init<>())\n    ;\n#endif\n\n#if JUCE_USE_LAME_AUDIO_FORMAT\n    // ============================================================================================ juce::LAMEEncoderAudioFormat\n\n    py::class_<LAMEEncoderAudioFormat, AudioFormat, PyAudioFormat<LAMEEncoderAudioFormat>> classLAMEEncoderAudioFormat (m, \"LAMEEncoderAudioFormat\");\n\n    classLAMEEncoderAudioFormat\n        .def (py::init<const File&>(), \"lameExecutableToUse\"_a)\n    ;\n#endif\n\n#if JUCE_USE_OGGVORBIS\n    // ============================================================================================ juce::OggVorbisAudioFormat\n\n    py::class_<OggVorbisAudioFormat, AudioFormat, PyAudioFormat<OggVorbisAudioFormat>> classOggVorbisAudioFormat (m, \"OggVorbisAudioFormat\");\n\n    classOggVorbisAudioFormat\n        .def (py::init<>())\n        .def (\"estimateOggFileQuality\", &OggVorbisAudioFormat::estimateOggFileQuality)\n    ;\n\n    classOggVorbisAudioFormat.attr (\"encoderName\") = py::str (OggVorbisAudioFormat::encoderName);\n    classOggVorbisAudioFormat.attr (\"id3title\") = py::str (OggVorbisAudioFormat::id3title);\n    classOggVorbisAudioFormat.attr (\"id3artist\") = py::str (OggVorbisAudioFormat::id3artist);\n    classOggVorbisAudioFormat.attr (\"id3album\") = py::str (OggVorbisAudioFormat::id3album);\n    classOggVorbisAudioFormat.attr (\"id3comment\") = py::str (OggVorbisAudioFormat::id3comment);\n    classOggVorbisAudioFormat.attr (\"id3date\") = py::str (OggVorbisAudioFormat::id3date);\n    classOggVorbisAudioFormat.attr (\"id3genre\") = py::str (OggVorbisAudioFormat::id3genre);\n    classOggVorbisAudioFormat.attr (\"id3trackNumber\") = py::str (OggVorbisAudioFormat::id3trackNumber);\n#endif\n\n#if JUCE_USE_FLAC\n    // ============================================================================================ juce::FlacAudioFormat\n\n    py::class_<FlacAudioFormat, AudioFormat, PyAudioFormat<FlacAudioFormat>> classFlacAudioFormat (m, \"FlacAudioFormat\");\n\n    classFlacAudioFormat\n        .def (py::init<>())\n    ;\n#endif\n\n#if JUCE_MAC\n    // ============================================================================================ juce::CoreAudioFormat\n\n    py::class_<CoreAudioFormat, AudioFormat, PyAudioFormat<CoreAudioFormat>> classCoreAudioFormat (m, \"CoreAudioFormat\");\n\n    py::enum_<CoreAudioFormat::StreamKind> (classCoreAudioFormat, \"StreamKind\")\n        .value (\"kNone\", CoreAudioFormat::StreamKind::kNone)\n        .value (\"kAiff\", CoreAudioFormat::StreamKind::kAiff)\n        .value (\"kAifc\", CoreAudioFormat::StreamKind::kAifc)\n        .value (\"kWave\", CoreAudioFormat::StreamKind::kWave)\n        .value (\"kSoundDesigner2\", CoreAudioFormat::StreamKind::kSoundDesigner2)\n        .value (\"kNext\", CoreAudioFormat::StreamKind::kNext)\n        .value (\"kMp3\", CoreAudioFormat::StreamKind::kMp3)\n        .value (\"kMp2\", CoreAudioFormat::StreamKind::kMp2)\n        .value (\"kMp1\", CoreAudioFormat::StreamKind::kMp1)\n        .value (\"kAc3\", CoreAudioFormat::StreamKind::kAc3)\n        .value (\"kAacAdts\", CoreAudioFormat::StreamKind::kAacAdts)\n        .value (\"kMpeg4\", CoreAudioFormat::StreamKind::kMpeg4)\n        .value (\"kM4a\", CoreAudioFormat::StreamKind::kM4a)\n        .value (\"kM4b\", CoreAudioFormat::StreamKind::kM4b)\n        .value (\"kCaf\", CoreAudioFormat::StreamKind::kCaf)\n        .value (\"k3gp\", CoreAudioFormat::StreamKind::k3gp)\n        .value (\"k3gp2\", CoreAudioFormat::StreamKind::k3gp2)\n        .value (\"kAmr\", CoreAudioFormat::StreamKind::kAmr)\n    ;\n\n    classCoreAudioFormat\n        .def (py::init<>())\n        .def (py::init<CoreAudioFormat::StreamKind>())\n    ;\n\n    classCoreAudioFormat.attr (\"midiDataBase64\") = py::str (CoreAudioFormat::midiDataBase64);\n    classCoreAudioFormat.attr (\"tempo\") = py::str (CoreAudioFormat::tempo);\n    classCoreAudioFormat.attr (\"timeSig\") = py::str (CoreAudioFormat::timeSig);\n    classCoreAudioFormat.attr (\"keySig\") = py::str (CoreAudioFormat::keySig);\n#endif\n\n#if JUCE_WINDOWS\n    // ============================================================================================ juce::WindowsMediaAudioFormat\n\n    py::class_<WindowsMediaAudioFormat, AudioFormat, PyAudioFormat<WindowsMediaAudioFormat>> classWindowsMediaAudioFormat (m, \"WindowsMediaAudioFormat\");\n\n    classWindowsMediaAudioFormat\n        .def (py::init<>())\n    ;\n#endif\n\n    // ============================================================================================ juce::AudioFormatManager\n\n    py::class_<AudioFormatManager> classAudioFormatManager (m, \"AudioFormatManager\");\n\n    classAudioFormatManager\n        .def (py::init<>())\n        .def (\"registerFormat\", &AudioFormatManager::registerFormat)\n        .def (\"registerBasicFormats\", &AudioFormatManager::registerBasicFormats)\n        .def (\"clearFormats\", &AudioFormatManager::clearFormats)\n        .def (\"getNumKnownFormats\", &AudioFormatManager::getNumKnownFormats)\n        .def (\"getKnownFormat\", &AudioFormatManager::getKnownFormat, py::return_value_policy::reference)\n        .def (\"__iter__\", [](AudioFormatManager& self)\n        {\n            return py::make_iterator (self.begin(), self.end());\n        }, py::return_value_policy::reference)\n        .def (\"findFormatForFileExtension\", &AudioFormatManager::findFormatForFileExtension, py::return_value_policy::reference)\n        .def (\"getDefaultFormat\", &AudioFormatManager::getDefaultFormat, py::return_value_policy::reference)\n        .def (\"getWildcardForAllFormats\", &AudioFormatManager::getWildcardForAllFormats)\n        .def (\"createReaderFor\", py::overload_cast<const File&> (&AudioFormatManager::createReaderFor))\n    //.def (\"createReaderFor\", py::overload_cast<std::unique_ptr<InputStream>> (&AudioFormatManager::createReaderFor))\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_audio_formats\n #error This binding file requires adding the juce_audio_formats module in the project\n#else\n #include <juce_audio_formats/juce_audio_formats.h>\n#endif\n\n#include \"ScriptJuceAudioBasicsBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/PythonInterop.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceAudioFormatsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioFormatReader>\nstruct PyAudioFormatReader : Base\n{\n    using Base::Base;\n\n    PyAudioFormatReader (juce::InputStream* sourceStream, const juce::String& formatName)\n        : Base (sourceStream, formatName)\n    {\n    }\n\n    void readMaxLevels (juce::int64 startOffset, juce::int64 numSamples,\n                        juce::Range<float>* results, int numChannelsToRead) override\n    {\n        PYBIND11_OVERRIDE (void, Base, readMaxLevels, startOffset, numSamples, results, numChannelsToRead);\n    }\n\n    void readMaxLevels (juce::int64 startOffset, juce::int64 numSamples,\n                        float& lowestLeft,  float& highestLeft,\n                        float& lowestRight, float& highestRight) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"readMaxLevels\"); override_)\n        {\n            auto results = override_ (startOffset, numSamples).cast<pybind11::tuple>();\n\n            if (results.size() != 4)\n                pybind11::pybind11_fail(\"Invalid return type of function \\\"AudioFormatReader::readMaxLevels\\\" must be tuple[float, 4]\");\n\n            lowestLeft = results[0].cast<float>();\n            highestLeft = results[1].cast<float>();\n            lowestRight = results[2].cast<float>();\n            highestRight = results[3].cast<float>();\n\n            return;\n        }\n\n        Base::readMaxLevels (startOffset, numSamples, lowestLeft, highestLeft, lowestRight, highestRight);\n    }\n\n    juce::AudioChannelSet getChannelLayout() override\n    {\n        PYBIND11_OVERRIDE (juce::AudioChannelSet, Base, getChannelLayout);\n    }\n\n    bool readSamples (int* const* destChannels,\n                      int numDestChannels,\n                      int startOffsetInDestBuffer,\n                      juce::int64 startSampleInFile,\n                      int numSamples) override\n    {\n        juce::ignoreUnused (destChannels, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples);\n\n        //PYBIND11_OVERRIDE_PURE (bool, Base, readSamples, destChannels, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples);\n\n        return false;\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::MemoryMappedAudioFormatReader>\nstruct PyMemoryMappedAudioFormatReader : PyAudioFormatReader<Base>\n{\n    using PyAudioFormatReader<Base>::PyAudioFormatReader;\n\n    PyMemoryMappedAudioFormatReader (const juce::File& file, const juce::AudioFormatReader& details,\n                                     juce::int64 dataChunkStart, juce::int64 dataChunkLength, int bytesPerFrame)\n        : PyAudioFormatReader<Base> (file, details, dataChunkStart, dataChunkLength, bytesPerFrame)\n    {\n    }\n\n    bool mapSectionOfFile (juce::Range<juce::int64> samplesToMap) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, mapSectionOfFile, samplesToMap);\n    }\n\n    void getSample (juce::int64 sampleIndex, float* result) const noexcept override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<const PyAudioFormatReader<Base>*> (this), \"compareElements\"); override_)\n        {\n            auto sample = override_ (sampleIndex);\n\n            *result = sample.cast<float>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"MemoryMappedAudioFormatReader::getSample\\\"\");\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioFormatWriter>\nstruct PyAudioFormatWriter : Base\n{\n    using Base::Base;\n\n    PyAudioFormatWriter (juce::OutputStream* destStream,\n                         const juce::String& formatName,\n                         double sampleRate,\n                         unsigned int numberOfChannels,\n                         unsigned int bitsPerSample)\n        : Base (destStream, formatName, sampleRate, numberOfChannels, bitsPerSample)\n    {\n    }\n\n    PyAudioFormatWriter (juce::OutputStream* destStream,\n                         const juce::String& formatName,\n                         double sampleRate,\n                         const juce::AudioChannelSet& audioChannelLayout,\n                         unsigned int bitsPerSample)\n        : Base (destStream, formatName, sampleRate, audioChannelLayout, bitsPerSample)\n    {\n    }\n\n    bool write (const int** samplesToWrite, int numSamples) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<const Base*> (this), \"write\"); override_)\n        {\n            pybind11::list channelSamples;\n\n            auto samplesByChannel = samplesToWrite;\n            while (*samplesByChannel != nullptr)\n            {\n                channelSamples.append (PyArrayView<const int> (*samplesByChannel, static_cast<size_t> (numSamples)));\n                ++samplesByChannel;\n            }\n\n            return override_ (channelSamples, numSamples).cast<bool>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"AudioFormatWriter::write\\\"\");\n    }\n};\n\nstruct PyAudioFormatWriterIncomingDataReceiver : juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver\n{\n    using juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver::IncomingDataReceiver;\n\n    void reset (int numChannels, double sampleRate, juce::int64 totalSamplesInSource) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver, reset, numChannels, sampleRate, totalSamplesInSource);\n    }\n\n    void addBlock (juce::int64 sampleNumberInSource, const juce::AudioBuffer<float>& newData, int startOffsetInBuffer, int numSamples) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver, addBlock, sampleNumberInSource, newData, startOffsetInBuffer, numSamples);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioFormat>\nstruct PyAudioFormat : Base\n{\n    using Base::Base;\n\n    PyAudioFormat (juce::String formatName, juce::StringArray fileExtensions)\n        : Base (std::move (formatName), std::move (fileExtensions))\n    {\n    }\n\n    PyAudioFormat (juce::StringRef formatName, juce::StringRef fileExtensions)\n        : Base (std::move (formatName), std::move (fileExtensions))\n    {\n    }\n\n    juce::StringArray getFileExtensions() const override\n    {\n        PYBIND11_OVERRIDE (juce::StringArray, Base, getFileExtensions);\n    }\n\n    bool canHandleFile (const juce::File& fileToTest) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, canHandleFile, fileToTest);\n    }\n\n    juce::Array<int> getPossibleSampleRates() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Array<int>, Base, getPossibleSampleRates);\n    }\n\n    juce::Array<int> getPossibleBitDepths() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Array<int>, Base, getPossibleBitDepths);\n    }\n\n    bool canDoStereo() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, canDoStereo);\n    }\n\n    bool canDoMono() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, canDoMono);\n    }\n\n    bool isCompressed() override\n    {\n        PYBIND11_OVERRIDE (bool, Base, isCompressed);\n    }\n\n    bool isChannelLayoutSupported (const juce::AudioChannelSet& channelSet) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, isChannelLayoutSupported, channelSet);\n    }\n\n    juce::StringArray getQualityOptions() override\n    {\n        PYBIND11_OVERRIDE (juce::StringArray, Base, getQualityOptions);\n    }\n\n    juce::AudioFormatReader* createReaderFor (juce::InputStream* sourceStream, bool deleteStreamIfOpeningFails) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::AudioFormatReader*, Base, createReaderFor, sourceStream, deleteStreamIfOpeningFails);\n    }\n\n    juce::MemoryMappedAudioFormatReader* createMemoryMappedReader (const juce::File& file) override\n    {\n        PYBIND11_OVERRIDE (juce::MemoryMappedAudioFormatReader*, Base, createMemoryMappedReader, file);\n    }\n\n    juce::MemoryMappedAudioFormatReader* createMemoryMappedReader (juce::FileInputStream* fin) override\n    {\n        PYBIND11_OVERRIDE (juce::MemoryMappedAudioFormatReader*, Base, createMemoryMappedReader, fin);\n    }\n\n    juce::AudioFormatWriter* createWriterFor (juce::OutputStream* streamToWriteTo,\n                                              double sampleRateToUse,\n                                              unsigned int numberOfChannels,\n                                              int bitsPerSample,\n                                              const juce::StringPairArray& metadataValues,\n                                              int qualityOptionIndex) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::AudioFormatWriter*, Base, createWriterFor, streamToWriteTo, sampleRateToUse, numberOfChannels, bitsPerSample, metadataValues, qualityOptionIndex);\n    }\n\n    juce::AudioFormatWriter* createWriterFor (juce::OutputStream* streamToWriteTo,\n                                              double sampleRateToUse,\n                                              const juce::AudioChannelSet& channelLayout,\n                                              int bitsPerSample,\n                                              const juce::StringPairArray& metadataValues,\n                                              int qualityOptionIndex) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::AudioFormatWriter*, Base, createWriterFor, streamToWriteTo, sampleRateToUse, channelLayout, bitsPerSample, metadataValues, qualityOptionIndex);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceAudioProcessorsBindings.h\"\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceAudioProcessorsBindings ([[maybe_unused]] py::module_& m)\n{\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_audio_processors\n #error This binding file requires adding the juce_audio_processors module in the project\n#else\n #include <juce_audio_processors/juce_audio_processors.h>\n#endif\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/PythonInterop.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceAudioProcessorsBindings (pybind11::module_& m);\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceAudioUtilsBindings.h\"\n\n#include \"ScriptJuceAudioDevicesBindings.h\"\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceAudioUtilsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::AudioAppComponent\n\n    py::class_<AudioAppComponent, Component, PyAudioAppComponent<>> classAudioAppComponent (m, \"AudioAppComponent\");\n\n    classAudioAppComponent\n        .def (py::init<>())\n        .def (py::init<AudioDeviceManager&>())\n        .def (\"setAudioChannels\", &AudioAppComponent::setAudioChannels,\n            \"numInputChannels\"_a, \"numOutputChannels\"_a, \"storedSettings\"_a = nullptr)\n        .def (\"prepareToPlay\", &AudioAppComponent::prepareToPlay)\n        .def (\"releaseResources\", &AudioAppComponent::releaseResources)\n        .def (\"getNextAudioBlock\", &AudioAppComponent::getNextAudioBlock)\n        .def (\"shutdownAudio\", &AudioAppComponent::shutdownAudio)\n        .def_property_readonly(\"deviceManager\", [](const AudioAppComponent& self)\n        {\n            return std::addressof (self.deviceManager);\n        }, py::return_value_policy::reference)\n    ;\n\n    // ============================================================================================ juce::AudioThumbnailBase\n\n    py::class_<AudioThumbnailBase, ChangeBroadcaster, PyAudioThumbnailBase<>> classAudioThumbnailBase (m, \"AudioThumbnailBase\");\n\n    classAudioThumbnailBase\n        .def (py::init<>())\n        .def (\"clear\", &AudioThumbnailBase::clear)\n        .def (\"setSource\", &AudioThumbnailBase::setSource)\n        .def (\"setReader\", &AudioThumbnailBase::setReader)\n        .def (\"loadFrom\", &AudioThumbnailBase::loadFrom)\n        .def (\"saveTo\", &AudioThumbnailBase::saveTo)\n        .def (\"getNumChannels\", &AudioThumbnailBase::getNumChannels)\n        .def (\"getTotalLength\", &AudioThumbnailBase::getTotalLength)\n        .def (\"drawChannel\", &AudioThumbnailBase::drawChannel)\n        .def (\"drawChannels\", &AudioThumbnailBase::drawChannels)\n        .def (\"isFullyLoaded\", &AudioThumbnailBase::isFullyLoaded)\n        .def (\"getNumSamplesFinished\", &AudioThumbnailBase::getNumSamplesFinished)\n        .def (\"getApproximatePeak\", &AudioThumbnailBase::getApproximatePeak)\n    //.def (\"getApproximateMinMax\", &AudioThumbnailBase::getApproximateMinMax)\n        .def (\"getHashCode\", &AudioThumbnailBase::getHashCode)\n        .def (\"reset\", &AudioThumbnailBase::reset, \"numChannels\"_a, \"sampleRate\"_a, \"totalSamplesInSource\"_a = 0)\n        .def (\"addBlock\", &AudioThumbnailBase::addBlock, \"sampleNumberInSource\"_a, \"newData\"_a, \"startOffsetInBuffer\"_a, \"numSamples\"_a)\n    ;\n\n    // ============================================================================================ juce::AudioThumbnailCache\n\n    py::class_<AudioThumbnailCache> classAudioThumbnailCache (m, \"AudioThumbnailCache\");\n\n    classAudioThumbnailCache\n        .def (py::init<int>(), \"maxNumThumbsToStore\"_a)\n        .def (\"clear\", &AudioThumbnailCache::clear)\n        .def (\"loadThumb\", &AudioThumbnailCache::loadThumb)\n        .def (\"storeThumb\", &AudioThumbnailCache::storeThumb)\n        .def (\"removeThumb\", &AudioThumbnailCache::removeThumb)\n        .def (\"readFromStream\", &AudioThumbnailCache::readFromStream)\n        .def (\"writeToStream\", &AudioThumbnailCache::writeToStream)\n        .def (\"getTimeSliceThread\", &AudioThumbnailCache::getTimeSliceThread)\n    ;\n\n    // ============================================================================================ juce::AudioThumbnail\n\n    py::class_<AudioThumbnail, AudioThumbnailBase, PyAudioThumbnailBase<AudioThumbnail>> classAudioThumbnail (m, \"AudioThumbnail\");\n\n    classAudioThumbnail\n        .def (py::init<int, AudioFormatManager&, AudioThumbnailCache&>(), \"sourceSamplesPerThumbnailSample\"_a, \"formatManagerToUse\"_a, \"cacheToUse\"_a)\n        .def (\"clear\", &AudioThumbnail::clear)\n        .def (\"setSource\", [](AudioThumbnail& self, py::object newSource) { self.setSource (newSource.release().cast<InputSource*>()); }, \"newSource\"_a)\n        .def (\"setReader\", [](AudioThumbnail& self, py::object newReader, int64 hashCode) { self.setReader (newReader.release().cast<AudioFormatReader*>(), hashCode); }, \"newReader\"_a, \"hashCode\"_a)\n        .def (\"setSource\", py::overload_cast<const AudioBuffer<float>*, double, int64> (&AudioThumbnail::setSource), \"newSource\"_a, \"sampleRate\"_a, \"hashCode\"_a)\n        .def (\"setSource\", py::overload_cast<const AudioBuffer<int>*, double, int64> (&AudioThumbnail::setSource), \"newSource\"_a, \"sampleRate\"_a, \"hashCode\"_a)\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_audio_utils\n #error This binding file requires adding the juce_audio_utils module in the project\n#else\n #include <juce_audio_utils/juce_audio_utils.h>\n#endif\n\n#include \"ScriptJuceGuiBasicsBindings.h\"\n#include \"ScriptJuceAudioBasicsBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/PythonInterop.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceAudioUtilsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioAppComponent>\nstruct PyAudioAppComponent : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, prepareToPlay, samplesPerBlockExpected, sampleRate);\n    }\n\n    void releaseResources() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, releaseResources);\n    }\n\n    void getNextAudioBlock (const juce::AudioSourceChannelInfo& bufferToFill) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, getNextAudioBlock, bufferToFill);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::AudioThumbnailBase>\nstruct PyAudioThumbnailBase : Base\n{\n    using Base::Base;\n\n    void clear() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, clear);\n    }\n\n    bool setSource (juce::InputSource* newSource) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, setSource, newSource);\n    }\n\n    void setReader (juce::AudioFormatReader* newReader, juce::int64 hashCode) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setReader, newReader, hashCode);\n    }\n\n    bool loadFrom (juce::InputStream& input) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, loadFrom, input);\n    }\n\n    void saveTo (juce::OutputStream& output) const override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, saveTo, output);\n    }\n\n    int getNumChannels() const noexcept override\n    {\n        PYBIND11_OVERRIDE_PURE (int, Base, getNumChannels);\n    }\n\n    double getTotalLength() const noexcept override\n    {\n        PYBIND11_OVERRIDE_PURE (double, Base, getTotalLength);\n    }\n\n    void drawChannel (juce::Graphics& g,\n                      const juce::Rectangle<int>& area,\n                      double startTimeSeconds,\n                      double endTimeSeconds,\n                      int channelNum,\n                      float verticalZoomFactor) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawChannel\"); override_)\n        {\n            override_ (std::addressof (g), area, startTimeSeconds, endTimeSeconds, channelNum, verticalZoomFactor);\n\n            return;\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"AudioThumbnailBase::drawChannel\\\"\");\n    }\n\n    void drawChannels (juce::Graphics& g,\n                       const juce::Rectangle<int>& area,\n                       double startTimeSeconds,\n                       double endTimeSeconds,\n                       float verticalZoomFactor) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawChannels\"); override_)\n        {\n            override_ (std::addressof (g), area, startTimeSeconds, endTimeSeconds, verticalZoomFactor);\n\n            return;\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"AudioThumbnailBase::drawChannels\\\"\");\n    }\n\n    bool isFullyLoaded() const noexcept override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isFullyLoaded);\n    }\n\n    juce::int64 getNumSamplesFinished() const noexcept override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, getNumSamplesFinished);\n    }\n\n    float getApproximatePeak() const override\n    {\n        PYBIND11_OVERRIDE_PURE (float, Base, getApproximatePeak);\n    }\n\n    void getApproximateMinMax (double startTime, double endTime, int channelIndex,\n                               float& minValue, float& maxValue) const noexcept override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<const Base*> (this), \"getApproximateMinMax\"); override_)\n        {\n            auto results = override_ (startTime, endTime, channelIndex).cast<pybind11::tuple>();\n\n            if (results.size() != 2)\n                pybind11::pybind11_fail(\"Invalid return type of function \\\"AudioThumbnailBase::getApproximateMinMax\\\" must be tuple[float, 2]\");\n\n            minValue = results[0].cast<float>();\n            maxValue = results[1].cast<float>();\n\n            return;\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"AudioThumbnailBase::getApproximateMinMax\\\"\");\n    }\n\n    juce::int64 getHashCode() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, getHashCode);\n    }\n\n    void reset (int channels, double sampleRate, juce::int64 totalSamplesInSource) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, reset, channels, sampleRate, totalSamplesInSource);\n    }\n\n    void addBlock (juce::int64 sampleNumberInSource, const juce::AudioBuffer<float>& newData, int startOffsetInBuffer, int numSamples) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, addBlock, sampleNumberInSource, newData, startOffsetInBuffer, numSamples);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"ScriptJuceCoreBindings.h\"\n\n#if JUCE_MODULE_AVAILABLE_juce_events\n#include \"ScriptJuceEventsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_data_structures\n#include \"ScriptJuceDataStructuresBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_graphics\n#include \"ScriptJuceGraphicsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n#include \"ScriptJuceGuiBasicsBindings.h\"\n#include \"ScriptJuceGuiEntryPointsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_extra\n#include \"ScriptJuceGuiExtraBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_basics\n#include \"ScriptJuceAudioBasicsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_devices\n#include \"ScriptJuceAudioDevicesBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_processors\n#include \"ScriptJuceAudioProcessorsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_formats\n#include \"ScriptJuceAudioFormatsBindings.h\"\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_utils\n#include \"ScriptJuceAudioUtilsBindings.h\"\n#endif\n\n// =================================================================================================\n#if JUCE_PYTHON_EMBEDDED_INTERPRETER\nPYBIND11_EMBEDDED_MODULE (JUCE_PYTHON_MODULE_NAME, m)\n#else\nPYBIND11_MODULE (JUCE_PYTHON_MODULE_NAME, m)\n#endif\n{\n#if JUCE_MAC\n    juce::Process::setDockIconVisible (false);\n#endif\n\n    popsicle::Bindings::registerJuceCoreBindings (m);\n\n#if JUCE_MODULE_AVAILABLE_juce_events\n    popsicle::Bindings::registerJuceEventsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_data_structures\n    popsicle::Bindings::registerJuceDataStructuresBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_graphics\n    popsicle::Bindings::registerJuceGraphicsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n    popsicle::Bindings::registerJuceGuiBasicsBindings (m);\n    popsicle::Bindings::registerJuceGuiEntryPointsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_extra\n    popsicle::Bindings::registerJuceGuiExtraBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_basics\n    popsicle::Bindings::registerJuceAudioBasicsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_devices\n    popsicle::Bindings::registerJuceAudioDevicesBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_processors\n    popsicle::Bindings::registerJuceAudioProcessorsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_formats\n    popsicle::Bindings::registerJuceAudioFormatsBindings (m);\n#endif\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_utils\n    popsicle::Bindings::registerJuceAudioUtilsBindings (m);\n#endif\n}\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceCoreBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceCoreBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/CrashHandling.h\"\n\n#include <optional>\n#include <string_view>\n\nnamespace PYBIND11_NAMESPACE {\nnamespace detail {\n\n// =================================================================================================\n\nbool type_caster<juce::StringRef>::load (handle src, bool convert)\n{\n    juce::ignoreUnused (convert);\n\n    if (! src)\n        return false;\n\n    if (! PyUnicode_Check (src.ptr()))\n        return load_raw(src);\n\n    Py_ssize_t size = -1;\n    const auto* buffer = reinterpret_cast<const char*> (PyUnicode_AsUTF8AndSize (src.ptr(), &size));\n    if (buffer == nullptr)\n        return false;\n\n    value = buffer;\n\n    loader_life_support::add_patient (src);\n\n    return true;\n}\n\nhandle type_caster<juce::StringRef>::cast (const juce::StringRef& src, return_value_policy policy, handle parent)\n{\n    juce::ignoreUnused (policy, parent);\n\n    return PyUnicode_FromStringAndSize (static_cast<const char*> (src.text), static_cast<Py_ssize_t> (src.length()));\n}\n\nbool type_caster<juce::StringRef>::load_raw (handle src)\n{\n    if (PYBIND11_BYTES_CHECK (src.ptr()))\n    {\n        const char* bytes = PYBIND11_BYTES_AS_STRING (src.ptr());\n        if (! bytes)\n            pybind11_fail (\"Unexpected PYBIND11_BYTES_AS_STRING() failure.\");\n\n        value = bytes;\n        return true;\n    }\n\n    if (PyByteArray_Check (src.ptr()))\n    {\n        const char* bytearray = PyByteArray_AsString (src.ptr());\n        if (! bytearray)\n            pybind11_fail (\"Unexpected PyByteArray_AsString() failure.\");\n\n        value = bytearray;\n        return true;\n    }\n\n    return false;\n}\n\n// =================================================================================================\n\nbool type_caster<juce::String>::load (handle src, bool convert)\n{\n    juce::ignoreUnused (convert);\n\n    if (! src)\n        return false;\n\n    if (! PyUnicode_Check (src.ptr()))\n        return load_raw(src);\n\n    Py_ssize_t size = -1;\n    const auto* buffer = reinterpret_cast<const char*> (PyUnicode_AsUTF8AndSize (src.ptr(), &size));\n    if (buffer == nullptr)\n        return false;\n\n    value = juce::String::fromUTF8 (buffer, static_cast<int> (size));\n    return true;\n}\n\nhandle type_caster<juce::String>::cast (const juce::String& src, return_value_policy policy, handle parent)\n{\n    juce::ignoreUnused (policy, parent);\n\n    return PyUnicode_FromStringAndSize (src.toRawUTF8(), static_cast<Py_ssize_t> (src.getNumBytesAsUTF8()));\n}\n\nbool type_caster<juce::String>::load_raw (handle src)\n{\n    if (PYBIND11_BYTES_CHECK (src.ptr()))\n    {\n        const char* bytes = PYBIND11_BYTES_AS_STRING (src.ptr());\n        if (! bytes)\n            pybind11_fail (\"Unexpected PYBIND11_BYTES_AS_STRING() failure.\");\n\n        value = juce::String::fromUTF8 (bytes, static_cast<int> (PYBIND11_BYTES_SIZE (src.ptr())));\n        return true;\n    }\n\n    if (PyByteArray_Check (src.ptr()))\n    {\n        const char* bytearray = PyByteArray_AsString (src.ptr());\n        if (! bytearray)\n            pybind11_fail (\"Unexpected PyByteArray_AsString() failure.\");\n\n        value = juce::String::fromUTF8 (bytearray, static_cast<int> (PyByteArray_Size (src.ptr())));\n        return true;\n    }\n\n    return false;\n}\n\n// =================================================================================================\n\nbool type_caster<juce::Identifier>::load (handle src, bool convert)\n{\n    if (! src)\n        return false;\n\n    if (base_type::load (src, convert))\n    {\n        value = *reinterpret_cast<juce::Identifier*> (base_type::value);\n        return true;\n    }\n\n    if (! PyUnicode_Check (src.ptr()))\n        return load_raw(src);\n\n    Py_ssize_t size = -1;\n    const auto* buffer = reinterpret_cast<const char*> (PyUnicode_AsUTF8AndSize (src.ptr(), &size));\n    if (buffer == nullptr)\n        return false;\n\n    value = juce::Identifier (juce::String::fromUTF8 (buffer, static_cast<int> (size)));\n    return true;\n}\n\nhandle type_caster<juce::Identifier>::cast (const juce::Identifier& src, return_value_policy policy, handle parent)\n{\n    juce::ignoreUnused (policy, parent);\n\n    if (auto result = base_type::cast (src, policy, parent))\n        return result;\n\n    return make_caster<juce::String>::cast (src.toString(), policy, parent);\n}\n\nbool type_caster<juce::Identifier>::load_raw (handle src)\n{\n    if (PYBIND11_BYTES_CHECK (src.ptr()))\n    {\n        const char* bytes = PYBIND11_BYTES_AS_STRING (src.ptr());\n        if (! bytes)\n            pybind11_fail (\"Unexpected PYBIND11_BYTES_AS_STRING() failure.\");\n\n        value = juce::Identifier (juce::String::fromUTF8 (bytes, static_cast<int> (PYBIND11_BYTES_SIZE (src.ptr()))));\n        return true;\n    }\n\n    if (PyByteArray_Check (src.ptr()))\n    {\n        const char* bytearray = PyByteArray_AsString (src.ptr());\n        if (! bytearray)\n            pybind11_fail (\"Unexpected PyByteArray_AsString() failure.\");\n\n        value = juce::Identifier (juce::String::fromUTF8 (bytearray, static_cast<int> (PyByteArray_Size (src.ptr()))));\n        return true;\n    }\n\n    return false;\n}\n\n// =================================================================================================\n\nbool type_caster<juce::var>::load (handle src, bool convert)\n{\n    PyObject* source = src.ptr();\n\n    if (PyNone_Check(source))\n        value = juce::var::undefined();\n\n    else if (PyBool_Check(source))\n        value = PyObject_IsTrue (source) ? true : false;\n\n    else if (PyLong_Check (source))\n        value = static_cast<int> (PyLong_AsLong (source));\n\n    else if (PyFloat_Check (source))\n        value = PyFloat_AsDouble (source);\n\n    else if (PyUnicode_Check (source))\n    {\n        Py_ssize_t size = -1;\n        const auto* buffer = reinterpret_cast<const char*> (PyUnicode_AsUTF8AndSize (src.ptr(), &size));\n        if (buffer == nullptr)\n            return false;\n\n        value = juce::String::fromUTF8 (buffer, static_cast<int> (size));\n    }\n\n    else if (PYBIND11_BYTES_CHECK (source))\n    {\n        const char* bytes = PYBIND11_BYTES_AS_STRING (source);\n        if (! bytes)\n            return false;\n\n        value = juce::var (bytes, static_cast<size_t> (PYBIND11_BYTES_SIZE (source)));\n    }\n\n    else if (PyByteArray_Check (source))\n    {\n        const char* bytearray = PyByteArray_AsString (source);\n        if (! bytearray)\n            return false;\n\n        value = juce::var (bytearray, static_cast<size_t> (PyByteArray_Size (source)));\n    }\n\n    else if (PyTuple_Check (source))\n    {\n        value = juce::var();\n\n        const auto tupleSize = PyTuple_Size(source);\n        for (Py_ssize_t i = 0; i < tupleSize; ++i)\n        {\n            make_caster<juce::var> conv;\n\n            if (! conv.load (PyTuple_GetItem(source, i), convert))\n                return false;\n\n            value.append (cast_op<juce::var&&> (std::move (conv)));\n        }\n    }\n\n    else if (PyList_Check (source))\n    {\n        value = juce::var();\n\n        const auto tupleSize = PyList_Size(source);\n        for (Py_ssize_t i = 0; i < tupleSize; ++i)\n        {\n            make_caster<juce::var> conv;\n\n            if (! conv.load (PyList_GetItem(source, i), convert))\n                return false;\n\n            value.append (cast_op<juce::var&&> (std::move (conv)));\n        }\n    }\n\n    else if (PyDict_Check (source))\n    {\n        juce::DynamicObject::Ptr obj = new juce::DynamicObject;\n\n        value = juce::var (obj.get());\n\n        PyObject* key;\n        PyObject* val;\n        Py_ssize_t pos = 0;\n\n        while (PyDict_Next (source, &pos, &key, &val))\n        {\n            make_caster<juce::Identifier> convKey;\n            make_caster<juce::var> convValue;\n\n            if (! convKey.load (key, convert) || ! convValue.load (val, convert))\n                return false;\n\n            obj->setProperty (\n                cast_op<juce::Identifier&&> (std::move (convKey)),\n                cast_op<juce::var&&> (std::move (convValue)));\n        }\n    }\n\n    else if (isinstance<juce::MemoryBlock&> (src))\n    {\n        value = juce::var (src.cast<juce::MemoryBlock&>());\n    }\n\n    else\n    {\n        value = juce::var::undefined();\n    }\n\n    // TODO - raise\n\n    return !PyErr_Occurred();\n}\n\nhandle type_caster<juce::var>::cast (const juce::var& src, return_value_policy policy, handle parent)\n{\n    if (src.isVoid() || src.isUndefined())\n        return Py_None;\n\n    if (src.isBool())\n        return PyBool_FromLong (static_cast<bool> (src));\n\n    if (src.isInt())\n        return PyLong_FromLong (static_cast<int> (src));\n\n    if (src.isInt64())\n        return PyLong_FromLongLong (static_cast<juce::int64> (src));\n\n    if (src.isDouble())\n        return PyFloat_FromDouble (static_cast<double> (src));\n\n    if (src.isString())\n        return make_caster<juce::String>::cast (src, policy, parent);\n\n    if (src.isArray())\n    {\n        list list;\n\n        if (auto array = src.getArray())\n        {\n            for (const auto& value : *array)\n                list.append (value);\n        }\n\n        return list.release();\n    }\n\n    auto dynamicObject = src.getDynamicObject();\n    if (src.isObject() && dynamicObject != nullptr)\n    {\n        dict result;\n\n        for (const auto& props : dynamicObject->getProperties())\n            result [make_caster<juce::String>::cast (props.name.toString(), policy, parent)] = props.value;\n\n        return result.release();\n    }\n\n    if (src.isBinaryData())\n    {\n        if (auto data = src.getBinaryData())\n            return bytes (static_cast<const char*> (data->getData()), static_cast<Py_ssize_t> (data->getSize())).release();\n    }\n\n    if (src.isMethod())\n    {\n        return cpp_function ([src]\n        {\n            juce::var::NativeFunctionArgs args (juce::var(), nullptr, 0);\n            return src.getNativeFunction() (args);\n        }).release();\n    }\n\n    return Py_None;\n}\n\n}} // namespace PYBIND11_NAMESPACE::detail\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerMathConstants (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"MathConstants\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def_readonly_static (\"pi\", &T::pi)\n            .def_readonly_static (\"twoPi\", &T::twoPi)\n            .def_readonly_static (\"halfPi\", &T::halfPi)\n            .def_readonly_static (\"euler\", &T::euler)\n            .def_readonly_static (\"sqrt2\", &T::sqrt2)\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"MathConstants\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerRange (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = underlying_type_t<Types>;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Range\", typeid (ValueType).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType, ValueType>())\n            .def_static (\"between\", &T::between)\n            .def_static (\"withStartAndLength\", &T::withStartAndLength)\n            .def_static (\"emptyRange\", &T::emptyRange)\n            .def (\"getStart\", &T::getStart)\n            .def (\"getLength\", &T::getLength)\n            .def (\"getEnd\", &T::getEnd)\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"setStart\", &T::setStart)\n            .def (\"withStart\", &T::withStart)\n            .def (\"movedToStartAt\", &T::movedToStartAt)\n            .def (\"setEnd\", &T::setEnd)\n            .def (\"withEnd\", &T::withEnd)\n            .def (\"movedToEndAt\", &T::movedToEndAt)\n            .def (\"setLength\", &T::setLength)\n            .def (\"expanded\", &T::expanded)\n            .def (py::self += ValueType())\n            .def (py::self -= ValueType())\n            .def (py::self + ValueType())\n            .def (py::self - ValueType())\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"contains\", py::overload_cast<const ValueType> (&T::contains, py::const_))\n            .def (\"clipValue\", &T::clipValue)\n            .def (\"contains\", py::overload_cast<T> (&T::contains, py::const_))\n            .def (\"intersects\", &T::intersects)\n            .def (\"getIntersectionWith\", &T::getIntersectionWith)\n            .def (\"getUnionWith\", py::overload_cast<T> (&T::getUnionWith, py::const_))\n            .def (\"getUnionWith\", py::overload_cast<const ValueType> (&T::getUnionWith, py::const_))\n            .def (\"constrainRange\", &T::constrainRange)\n        //.def_static (\"findMinAndMax\", [](const T& self, py::buffer values, int numValues)\n        //{\n        //  auto info = values.request();\n        //  return self.findMinAndMax (reinterpret_cast<ValueType*> (info.ptr), numValues);\n        //})\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getStart() << \", \" << self.getEnd() << \")\";\n                return result;\n            })\n        ;\n\n        if constexpr (! std::is_same_v<ValueType, Types>)\n            class_.def (py::init ([](Types start, Types end) { return T (static_cast<ValueType> (start), static_cast<ValueType> (end)); }));\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Range\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerNormalisableRange (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = underlying_type_t<Types>;\n        using T = Class<ValueType>;\n        using ValueRemapFunction = typename T::ValueRemapFunction;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"NormalisableRange\", typeid (ValueType).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType, ValueType>(), \"rangeStart\"_a, \"rangeEnd\"_a)\n            .def (py::init<ValueType, ValueType, ValueType, ValueType, bool>(), \"rangeStart\"_a, \"rangeEnd\"_a, \"intervalValue\"_a, \"skewFactor\"_a, \"useSymmetricSkew\"_a = false)\n            .def (py::init<ValueType, ValueType, ValueType>(), \"rangeStart\"_a, \"rangeEnd\"_a, \"intervalValue\"_a)\n            .def (py::init<Range<ValueType>>(), \"range\"_a)\n            .def (py::init<Range<ValueType>, ValueType>(), \"range\"_a, \"intervalValue\"_a)\n            .def (py::init<ValueType, ValueType, ValueRemapFunction, ValueRemapFunction, ValueRemapFunction>(), \"rangeStart\"_a, \"rangeEnd\"_a, \"convertFrom0To1Func\"_a, \"convertTo0To1Func\"_a, \"snapToLegalValueFunc\"_a = ValueRemapFunction())\n            .def (py::init<const T&>())\n            .def (\"convertTo0to1\", &T::convertTo0to1)\n            .def (\"convertFrom0to1\", &T::convertFrom0to1)\n            .def (\"snapToLegalValue\", &T::snapToLegalValue)\n            .def (\"getRange\", &T::getRange)\n            .def (\"setSkewForCentre\", &T::setSkewForCentre)\n            .def_readwrite (\"start\", &T::start)\n            .def_readwrite (\"end\", &T::end)\n            .def_readwrite (\"interval\", &T::interval)\n            .def_readwrite (\"skew\", &T::skew)\n            .def_readwrite (\"symmetricSkew\", &T::symmetricSkew)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.start << \", \" << self.end << \", \" << self.interval << \", \" << self.skew << \", \" << (self.symmetricSkew ? \"True\" : \"False\") << \")\";\n                return result;\n            })\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"NormalisableRange\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerAtomic (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = underlying_type_t<Types>;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Atomic\", typeid (ValueType).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType>())\n            .def (py::init<const T&>())\n            .def (\"get\", &T::get)\n            .def (\"set\", &T::set)\n            .def (\"exchange\", &T::exchange)\n            .def (\"compareAndSetBool\", &T::compareAndSetBool)\n            .def (\"memoryBarrier\", &T::memoryBarrier)\n        ;\n\n        if constexpr (! std::is_same_v<ValueType, Types>)\n            class_.def (py::init ([](Types value) { return T (static_cast<ValueType> (value)); }));\n\n        if constexpr (!std::is_same_v<ValueType, bool> && !std::is_floating_point_v<ValueType>)\n        {\n            class_\n                .def (\"__iadd__\", &T::operator+=)\n                .def (\"__isub__\", &T::operator-=)\n            ;\n        }\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Atomic\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerSparseSet (pybind11::module_& m)\n{\n    using namespace juce;\n\n    namespace py = pybind11;\n    using namespace py::literals;\n\n    auto type = py::hasattr (m, \"SparseSet\") ? m.attr (\"SparseSet\").cast<py::dict>() : py::dict{};\n\n    ([&]\n    {\n        using ValueType = underlying_type_t<Types>;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"SparseSet\", typeid (ValueType).name());\n\n        py::class_<T> class_ (m, className.toRawUTF8());\n\n        class_\n            .def (py::init<>())\n            .def (py::init<const T&>())\n            .def (\"clear\", &T::clear)\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"size\", &T::size)\n            .def (\"__getitem__\", &T::operator[])\n            .def (\"contains\", &T::contains)\n            .def (\"getNumRanges\", &T::getNumRanges)\n            .def (\"getRange\", &T::getRange)\n            .def (\"getTotalRange\", &T::getTotalRange)\n            .def (\"addRange\", &T::addRange)\n            .def (\"removeRange\", &T::removeRange)\n            .def (\"invertRange\", &T::invertRange)\n            .def (\"overlapsRange\", &T::overlapsRange)\n            .def (\"containsRange\", &T::containsRange)\n            .def (\"__len__\", &T::size)\n            .def (\"__repr__\", [className](T& self)\n            {\n                String result;\n                result\n                    << \"<\" << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (T).name(), 1)\n                    << \" object at \" << String::formatted (\"%p\", std::addressof (self)) << \">\";\n                return result;\n            })\n        ;\n\n        if constexpr (isEqualityComparable<ValueType>::value)\n        {\n            class_\n                .def (py::self == py::self)\n                .def (py::self != py::self)\n            ;\n        }\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.attr (\"SparseSet\") = type;\n}\n\nvoid registerJuceCoreBindings (py::module_& m)\n{\n#if !JUCE_PYTHON_EMBEDDED_INTERPRETER\n    juce::SystemStats::setApplicationCrashHandler (Helpers::applicationCrashHandler);\n#endif\n\n    // ============================================================================================ GenericInteger<T>\n\n    py::class_<GenericInteger<int8>> (m, \"int8\")\n        .def (py::init<int8>())\n        .def (\"get\", &GenericInteger<int8>::get);\n\n    py::class_<GenericInteger<uint8>> (m, \"uint8\")\n        .def (py::init<uint8>())\n        .def (\"get\", &GenericInteger<uint8>::get);\n\n    py::class_<GenericInteger<int16>> (m, \"int16\")\n        .def (py::init<int16>())\n        .def (\"get\", &GenericInteger<int16>::get);\n\n    py::class_<GenericInteger<uint16>> (m, \"uint16\")\n        .def (py::init<uint16>())\n        .def (\"get\", &GenericInteger<uint16>::get);\n\n    py::class_<GenericInteger<int32>> (m, \"int32\")\n        .def (py::init<int32>())\n        .def (\"get\", &GenericInteger<int32>::get);\n\n    py::class_<GenericInteger<uint32>> (m, \"uint32\")\n        .def (py::init<uint32>())\n        .def (\"get\", &GenericInteger<uint32>::get);\n\n    py::class_<GenericInteger<int64>> (m, \"int64\")\n        .def (py::init<int64>())\n        .def (\"get\", &GenericInteger<int64>::get);\n\n    py::class_<GenericInteger<uint64>> (m, \"uint64\")\n        .def (py::init<uint64>())\n        .def (\"get\", &GenericInteger<uint64>::get);\n\n    // ============================================================================================ juce::Math\n\n    m.def (\"juce_hypot\", &juce_hypot<float>);\n    m.def (\"juce_hypot\", &juce_hypot<double>);\n    m.def (\"degreesToRadians\", &degreesToRadians<float>);\n    m.def (\"degreesToRadians\", &degreesToRadians<double>);\n    m.def (\"radiansToDegrees\", &radiansToDegrees<float>);\n    m.def (\"radiansToDegrees\", &radiansToDegrees<double>);\n    m.def (\"juce_isfinite\", &juce_isfinite<float>);\n    m.def (\"juce_isfinite\", &juce_isfinite<double>);\n    m.def (\"exactlyEqual\", &exactlyEqual<float>);\n    m.def (\"exactlyEqual\", &exactlyEqual<double>);\n    m.def (\"absoluteTolerance\", &absoluteTolerance<float>);\n    m.def (\"absoluteTolerance\", &absoluteTolerance<double>);\n    m.def (\"relativeTolerance\", &relativeTolerance<float>);\n    m.def (\"relativeTolerance\", &relativeTolerance<double>);\n    m.def (\"approximatelyEqual\", [](int a, int b) { return approximatelyEqual (a, b); });\n    m.def (\"approximatelyEqual\", [](int64 a, int64 b) { return approximatelyEqual (a, b); });\n    m.def (\"approximatelyEqual\", [](float a, float b) { return approximatelyEqual (a, b); });\n    m.def (\"approximatelyEqual\", [](double a, double b) { return approximatelyEqual (a, b); });\n    m.def (\"nextFloatUp\", &nextFloatUp<float>);\n    m.def (\"nextFloatUp\", &nextFloatUp<double>);\n    m.def (\"nextFloatDown\", &nextFloatDown<float>);\n    m.def (\"nextFloatDown\", &nextFloatDown<double>);\n    m.def (\"mapToLog10\", &mapToLog10<float>);\n    m.def (\"mapToLog10\", &mapToLog10<double>);\n    m.def (\"mapFromLog10\", &mapFromLog10<float>);\n    m.def (\"mapFromLog10\", &mapFromLog10<double>);\n    //m.def (\"findMinimum\", &findMinimum<float, int>);\n    //m.def (\"findMaximum\", &findMaximum<float, int>);\n    //m.def (\"findMinAndMax\", &findMaximum<float>);\n    //m.def (\"jlimit\", &jlimit<?>);\n    //m.def (\"isPositiveAndBelow\", &isPositiveAndBelow<?>);\n    //m.def (\"isPositiveAndNotGreaterThan\", &isPositiveAndNotGreaterThan<?>);\n    //m.def (\"isWithin\", &isWithin<?>);\n    m.def (\"roundToInt\", &roundToInt<int>);\n    m.def (\"roundToInt\", &roundToInt<float>);\n    m.def (\"roundToInt\", &roundToInt<double>);\n    m.def (\"roundToIntAccurate\", &roundToIntAccurate);\n    m.def (\"truncatePositiveToUnsignedInt\", &truncatePositiveToUnsignedInt<float>);\n    m.def (\"truncatePositiveToUnsignedInt\", &truncatePositiveToUnsignedInt<double>);\n    m.def (\"isPowerOfTwo\", &isPowerOfTwo<int>);\n    m.def (\"isPowerOfTwo\", &isPowerOfTwo<int64>);\n    m.def (\"nextPowerOfTwo\", &nextPowerOfTwo);\n    m.def (\"nextPowerOfTwo\", &nextPowerOfTwo);\n    m.def (\"findHighestSetBit\", &findHighestSetBit);\n    m.def (\"countNumberOfBits\", static_cast<int (*)(uint32) noexcept> (&countNumberOfBits));\n    m.def (\"countNumberOfBits\", static_cast<int (*)(uint64) noexcept> (&countNumberOfBits));\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<char>);\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<uint8>);\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<short>);\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<int>);\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<int64>);\n    m.def (\"negativeAwareModulo\", &negativeAwareModulo<int64>);\n    //m.def (\"square\", &square<?>);\n    m.def (\"writeLittleEndianBitsInBuffer\", [](py::buffer target, uint32 startBit, uint32 numBits, uint32 value)\n    {\n        auto info = target.request (true);\n        if ((startBit + numBits) >= static_cast<uint32> (info.size) * 8)\n             py::pybind11_fail (\"Insufficient bytes to write into provided buffer\");\n        writeLittleEndianBitsInBuffer (info.ptr, startBit, numBits, value);\n    });\n    m.def (\"readLittleEndianBitsInBuffer\", [](py::buffer target, uint32 startBit, uint32 numBits)\n    {\n        auto info = target.request();\n        if ((startBit + numBits) >= static_cast<uint32> (info.size) * 8)\n             py::pybind11_fail (\"Insufficient bytes to write into provided buffer\");\n        return readLittleEndianBitsInBuffer (info.ptr, startBit, numBits);\n    });\n\n    // ============================================================================================ juce::MathConstants\n\n    registerMathConstants<MathConstants, float, double> (m);\n\n    // ============================================================================================ juce::Range<>\n\n    registerRange<Range, int, GenericInteger<int64>, float> (m);\n\n    // ============================================================================================ juce::NormalisableRange<>\n\n    registerNormalisableRange<NormalisableRange, float> (m);\n\n    // ============================================================================================ juce::Atomic\n\n    registerAtomic<Atomic, bool, int, float> (m);\n\n    // ============================================================================================ juce::Identifier\n\n    py::class_<Identifier> classIdentifier (m, \"Identifier\");\n\n    classIdentifier\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (py::init<const Identifier&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self > py::self)\n        .def (py::self >= py::self)\n        .def (py::self < py::self)\n        .def (py::self <= py::self)\n        .def (\"toString\", &Identifier::toString)\n        .def (\"isValid\", &Identifier::isValid)\n        .def (\"isNull\", &Identifier::isNull)\n        .def_static (\"isValidIdentifier\", &Identifier::isValidIdentifier)\n        .def (\"__repr__\", Helpers::makeRepr<Identifier> (&Identifier::toString))\n        .def (\"__str__\", &Identifier::toString)\n    ;\n\n    // ============================================================================================ juce::ByteOrder\n\n    py::class_<ByteOrder> classByteOrder (m, \"ByteOrder\");\n\n    classByteOrder\n        .def_static (\"swap\", static_cast<uint16 (*)(uint16)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<int16 (*)(int16)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<uint32 (*)(uint32)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<int32 (*)(int32)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<uint64 (*)(uint64)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<int64 (*)(int64)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<float (*)(float)> (&ByteOrder::swap))\n        .def_static (\"swap\", static_cast<double (*)(double)> (&ByteOrder::swap))\n        .def_static (\"littleEndianInt\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (int))\n                py::pybind11_fail (\"Insufficient bytes to construct an 32bit integer\");\n            return ByteOrder::littleEndianInt (info.ptr);\n        })\n        .def_static (\"littleEndianInt64\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (int64))\n                py::pybind11_fail (\"Insufficient bytes to construct an 64bit integer\");\n            return ByteOrder::littleEndianInt64 (info.ptr);\n        })\n        .def_static (\"littleEndianShort\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (short))\n                py::pybind11_fail (\"Insufficient bytes to construct an 16bit integer\");\n            return ByteOrder::littleEndianShort (info.ptr);\n        })\n        .def_static (\"littleEndian24Bit\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (int8) * 3)\n                py::pybind11_fail (\"Insufficient bytes to construct an 24bit integer\");\n            return ByteOrder::littleEndian24Bit (info.ptr);\n        })\n    //.def_static (\"littleEndian24BitToChars\", &ByteOrder::littleEndian24BitToChars)\n        .def_static (\"bigEndianInt\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (int))\n                py::pybind11_fail (\"Insufficient bytes to construct an 32bit integer\");\n            return ByteOrder::bigEndianInt (info.ptr);\n        })\n        .def_static (\"bigEndianInt64\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (int64))\n                py::pybind11_fail (\"Insufficient bytes to construct an 64bit integer\");\n            return ByteOrder::bigEndianInt64 (info.ptr);\n        })\n        .def_static (\"bigEndianShort\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (short))\n                py::pybind11_fail (\"Insufficient bytes to construct an 16bit integer\");\n            return ByteOrder::bigEndianShort (info.ptr);\n        })\n        .def_static (\"bigEndian24Bit\", [](py::buffer data)\n        {\n            auto info = data.request();\n            if (static_cast <size_t> (info.size) < sizeof (char) * 3)\n                py::pybind11_fail (\"Insufficient bytes to construct an 24bit integer\");\n            return ByteOrder::bigEndian24Bit (info.ptr);\n        })\n    //.def_static (\"bigEndian24BitToChars\", [](py::buffer data) { auto info = data.request(); return ByteOrder::bigEndian24BitToChars (info.ptr); })\n        .def_static (\"makeInt\", static_cast<uint16 (*)(uint8, uint8)> (&ByteOrder::makeInt))\n        .def_static (\"makeInt\", static_cast<uint32 (*)(uint8, uint8, uint8, uint8)> (&ByteOrder::makeInt))\n        .def_static (\"makeInt\", static_cast<uint64 (*)(uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8)> (&ByteOrder::makeInt))\n        .def_static (\"isBigEndian\", &ByteOrder::isBigEndian)\n    ;\n\n    // ============================================================================================ juce::StringArray\n\n    py::class_<StringArray> classStringArray (m, \"StringArray\");\n\n    classStringArray\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (py::init<const StringArray&>())\n        .def (py::init ([](const String& firstValue, py::args values)\n        {\n            auto result = StringArray();\n            result.add (firstValue);\n\n            for (auto value : values)\n                result.add (static_cast<std::string> (value.cast<py::str>()).c_str());\n\n            return result;\n        }))\n        .def (py::init ([](py::list values)\n        {\n            auto result = StringArray();\n\n            for (auto value : values)\n                result.add (static_cast<std::string> (value.cast<py::str>()).c_str());\n\n            return result;\n        }))\n        .def (\"swapWith\", &StringArray::swapWith)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"__getitem__\", [](const StringArray& self, int index) { return self[index]; })\n        .def (\"__setitem__\", [](StringArray& self, int index, const String& value) { return self.set (index, value); })\n        .def(\"__iter__\", [](const StringArray& self)\n        {\n            return py::make_iterator (self.begin(), self.end());\n        }, py::keep_alive<0, 1>())\n        .def (\"__len__\", &StringArray::size)\n        .def (\"size\", &StringArray::size)\n        .def (\"isEmpty\", &StringArray::isEmpty)\n        .def (\"getReference\", py::overload_cast<int> (&StringArray::getReference), py::return_value_policy::reference)\n        .def (\"contains\", &StringArray::contains, \"stringToLookFor\"_a, \"ignoreCase\"_a = false)\n        .def (\"indexOf\", &StringArray::indexOf, \"stringToLookFor\"_a, \"ignoreCase\"_a = false, \"startIndex\"_a = 0)\n        .def (\"add\", &StringArray::add)\n        .def (\"insert\", &StringArray::insert)\n        .def (\"addIfNotAlreadyThere\", &StringArray::addIfNotAlreadyThere, \"stringToAdd\"_a, \"ignoreCase\"_a = false)\n        .def (\"set\", &StringArray::set)\n        .def (\"addArray\", [](StringArray& self, const StringArray& other, int startIndex, int numElementsToAdd)\n        {\n            self.addArray (other, startIndex, numElementsToAdd);\n        }, \"other\"_a, \"startIndex\"_a = 0, \"numElementsToAdd\"_a = -1)\n        .def (\"addArray\", [](StringArray& self, py::list other, int startIndex, int numElementsToAdd)\n        {\n            numElementsToAdd = numElementsToAdd < 0 ? static_cast<int> (other.size()) : (startIndex + numElementsToAdd);\n            for (int i = startIndex; i < numElementsToAdd; ++i)\n                self.add (static_cast<std::string> (other[static_cast<size_t> (i)].cast<py::str>()).c_str());\n        }, \"other\"_a, \"startIndex\"_a = 0, \"numElementsToAdd\"_a = -1)\n        .def (\"mergeArray\", &StringArray::mergeArray, \"other\"_a, \"ignoreCase\"_a = false)\n        .def (\"addTokens\", py::overload_cast<StringRef, bool> (&StringArray::addTokens),\n            \"stringToTokenise\"_a, \"preserveQuotedStrings\"_a)\n        .def (\"addTokens\", py::overload_cast<StringRef, StringRef, StringRef> (&StringArray::addTokens),\n            \"stringToTokenise\"_a, \"breakCharacters\"_a, \"quoteCharacters\"_a)\n        .def (\"addLines\", &StringArray::addLines)\n        .def_static (\"fromTokens\", static_cast<StringArray (*)(StringRef, bool)> (&StringArray::fromTokens),\n            \"stringToTokenise\"_a, \"preserveQuotedStrings\"_a)\n        .def_static (\"fromTokens\", static_cast<StringArray (*)(StringRef, StringRef, StringRef)> (&StringArray::fromTokens),\n            \"stringToTokenise\"_a, \"breakCharacters\"_a, \"quoteCharacters\"_a)\n        .def_static (\"fromLines\", &StringArray::fromLines)\n        .def (\"clear\", &StringArray::clear)\n        .def (\"clearQuick\", &StringArray::clearQuick)\n        .def (\"remove\", &StringArray::remove)\n        .def (\"removeString\", &StringArray::removeString, \"stringToRemove\"_a, \"ignoreCase\"_a = false)\n        .def (\"removeRange\", &StringArray::removeRange)\n        .def (\"removeDuplicates\", &StringArray::removeDuplicates)\n        .def (\"removeEmptyStrings\", &StringArray::removeEmptyStrings, \"removeWhitespaceStrings\"_a = true)\n        .def (\"move\", &StringArray::move)\n        .def (\"trim\", &StringArray::trim)\n        .def (\"appendNumbersToDuplicates\", [](StringArray& self, bool ignoreCaseWhenComparing, bool appendNumberToFirstInstance, const String* preNumberString, const String* postNumberString)\n        {\n            self.appendNumbersToDuplicates (ignoreCaseWhenComparing, appendNumberToFirstInstance,\n                preNumberString != nullptr ? preNumberString->toUTF8() : CharPointer_UTF8(nullptr),\n                postNumberString != nullptr ? postNumberString->toUTF8() : CharPointer_UTF8(nullptr));\n        }, \"ignoreCaseWhenComparing\"_a, \"appendNumberToFirstInstance\"_a, \"preNumberString\"_a = static_cast<const String*> (nullptr), \"postNumberString\"_a = static_cast<const String*> (nullptr))\n        .def (\"joinIntoString\", &StringArray::joinIntoString, \"separatorString\"_a, \"startIndex\"_a = 0, \"numberOfElements\"_a = -1)\n        .def (\"sort\", &StringArray::sort, \"ignoreCase\"_a)\n        .def (\"sortNatural\", &StringArray::sortNatural)\n        .def (\"ensureStorageAllocated\", &StringArray::ensureStorageAllocated)\n        .def (\"minimiseStorageOverheads\", &StringArray::minimiseStorageOverheads)\n        .def_readwrite (\"strings\", &StringArray::strings)\n    ;\n\n    // ============================================================================================ juce::StringPairArray\n\n    py::class_<StringPairArray> classStringPairArray (m, \"StringPairArray\");\n\n    classStringPairArray\n        .def (py::init<bool>(), \"ignoreCaseWhenComparingKeys\"_a = true)\n        .def (py::init<const StringPairArray&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"__len__\", &StringPairArray::size)\n        .def (\"__getitem__\", [](const StringPairArray& self, StringRef key) { return self[ key]; }, \"key\"_a)\n        .def (\"getValue\", &StringPairArray::getValue, \"key\"_a, \"defaultReturnValue\"_a)\n        .def (\"containsKey\", &StringPairArray::containsKey)\n        .def (\"getAllKeys\", &StringPairArray::getAllKeys)\n        .def (\"getAllValues\", &StringPairArray::getAllValues)\n        .def (\"size\", &StringPairArray::size)\n        .def (\"set\", &StringPairArray::set, \"key\"_a, \"value\"_a)\n        .def (\"addArray\", &StringPairArray::addArray, \"other\"_a)\n        .def (\"clear\", &StringPairArray::clear)\n        .def (\"remove\", py::overload_cast<StringRef> (&StringPairArray::remove), \"key\"_a)\n        .def (\"remove\", py::overload_cast<int> (&StringPairArray::remove), \"index\"_a)\n        .def (\"setIgnoresCase\", &StringPairArray::setIgnoresCase, \"shouldIgnoreCase\"_a)\n        .def (\"getIgnoresCase\", &StringPairArray::getIgnoresCase)\n        .def (\"getDescription\", &StringPairArray::getDescription)\n        .def (\"minimiseStorageOverheads\", &StringPairArray::minimiseStorageOverheads)\n        .def (\"addMap\", &StringPairArray::addMap)\n        .def (\"addUnorderedMap\", &StringPairArray::addUnorderedMap)\n    ;\n\n    // ============================================================================================ juce::NamedValueSet\n\n    py::class_<NamedValueSet> classNamedValueSet (m, \"NamedValueSet\");\n\n    py::class_<NamedValueSet::NamedValue> classNamedValueSetNamedValue (classNamedValueSet, \"NamedValue\");\n\n    classNamedValueSetNamedValue\n        .def (py::init<>())\n        .def (py::init<const Identifier&, const var&>())\n        .def (py::init<const NamedValueSet::NamedValue&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def_readwrite (\"name\", &NamedValueSet::NamedValue::name)\n        .def_readwrite (\"value\", &NamedValueSet::NamedValue::value)\n    ;\n\n    classNamedValueSet\n        .def (py::init<>())\n        .def (py::init<const NamedValueSet&>())\n        .def (py::init ([](py::list list)\n        {\n            auto result = NamedValueSet();\n\n            for (auto item : list)\n            {\n                py::detail::make_caster<NamedValueSet::NamedValue> conv;\n\n                if (! conv.load (item, true))\n                    py::pybind11_fail(\"Invalid property type of a \\\"NamedValueSet\\\", needs to be \\\"NamedValueSet::NamedValue\\\"\");\n\n                auto namedValue = py::detail::cast_op<NamedValueSet::NamedValue&&> (std::move (conv));\n\n                result.set(namedValue.name, namedValue.value);\n            }\n\n            return result;\n        }))\n        .def (py::init ([](py::dict dict)\n        {\n            auto result = NamedValueSet();\n\n            for (auto item : dict)\n            {\n                py::detail::make_caster<Identifier> convKey;\n                py::detail::make_caster<var> convValue;\n\n                if (! convKey.load (item.first, true))\n                    py::pybind11_fail(\"Invalid property type of a \\\"NamedValueSet\\\", needs to be \\\"str\\\" or \\\"Identifier\\\"\");\n\n                if (! convValue.load (item.second, true))\n                    py::pybind11_fail(\"Invalid property type of a \\\"NamedValueSet\\\", needs to be a \\\"var\\\" convertible\");\n\n                result.set(\n                    py::detail::cast_op<juce::Identifier&&> (std::move (convKey)),\n                    py::detail::cast_op<juce::var&&> (std::move (convValue)));\n            }\n\n            return result;\n        }))\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def(\"__iter__\", [](const NamedValueSet& self)\n        {\n            return py::make_iterator (self.begin(), self.end());\n        }, py::keep_alive<0, 1>())\n        .def (\"size\", &NamedValueSet::size)\n        .def (\"isEmpty\", &NamedValueSet::isEmpty)\n        .def (\"__getitem__\", [](const NamedValueSet& self, const Identifier& name) { return self[name]; }, py::return_value_policy::reference)\n        .def (\"__setitem__\", [](NamedValueSet& self, const Identifier& name, juce::var value) { return self.set (name, std::move (value)); })\n        .def (\"getWithDefault\", &NamedValueSet::getWithDefault)\n        .def (\"set\", py::overload_cast<const Identifier&, const var&> (&NamedValueSet::set))\n        .def (\"contains\", &NamedValueSet::contains)\n        .def (\"remove\", &NamedValueSet::remove)\n        .def (\"getName\", &NamedValueSet::getName)\n        .def (\"getVarPointer\", py::overload_cast<const Identifier&> (&NamedValueSet::getVarPointer), py::return_value_policy::reference)\n        .def (\"getValueAt\", &NamedValueSet::getValueAt, py::return_value_policy::reference)\n        .def (\"getVarPointerAt\", py::overload_cast<int> (&NamedValueSet::getVarPointerAt), py::return_value_policy::reference)\n        .def (\"indexOf\", &NamedValueSet::indexOf)\n        .def (\"clear\", &NamedValueSet::clear)\n        .def (\"setFromXmlAttributes\", &NamedValueSet::setFromXmlAttributes)\n        .def (\"copyToXmlAttributes\", &NamedValueSet::copyToXmlAttributes)\n    ;\n\n    // ============================================================================================ juce::BigInteger\n\n    py::class_<BigInteger> classBigInteger (m, \"BigInteger\");\n\n    classBigInteger\n        .def (py::init<>())\n        .def (py::init<int32>())\n        .def (py::init<int64>())\n        .def (py::init<const BigInteger&>())\n        .def (\"swapWith\", &BigInteger::swapWith)\n        .def (\"isZero\", &BigInteger::isZero)\n        .def (\"isOne\", &BigInteger::isOne)\n        .def (\"toInteger\", &BigInteger::toInteger)\n        .def (\"toInt64\", &BigInteger::toInt64)\n        .def (\"clear\", &BigInteger::clear, py::return_value_policy::reference)\n        .def (\"clearBit\", &BigInteger::clearBit, py::return_value_policy::reference)\n        .def (\"setBit\", py::overload_cast<int> (&BigInteger::setBit), py::return_value_policy::reference)\n        .def (\"setBit\", py::overload_cast<int, bool> (&BigInteger::setBit), py::return_value_policy::reference)\n        .def (\"setRange\", &BigInteger::setRange, py::return_value_policy::reference)\n        .def (\"insertBit\", &BigInteger::insertBit, py::return_value_policy::reference)\n        .def (\"getBitRange\", &BigInteger::getBitRange, py::return_value_policy::reference)\n        .def (\"getBitRangeAsInt\", &BigInteger::getBitRangeAsInt, py::return_value_policy::reference)\n        .def (\"setBitRangeAsInt\", &BigInteger::setBitRangeAsInt, py::return_value_policy::reference)\n        .def (\"shiftBits\", &BigInteger::shiftBits, py::return_value_policy::reference)\n        .def (\"countNumberOfSetBits\", &BigInteger::countNumberOfSetBits)\n        .def (\"findNextSetBit\", &BigInteger::findNextSetBit)\n        .def (\"findNextClearBit\", &BigInteger::findNextClearBit)\n        .def (\"getHighestBit\", &BigInteger::getHighestBit)\n        .def (\"isNegative\", &BigInteger::isNegative)\n        .def (\"setNegative\", &BigInteger::setNegative)\n        .def (\"negate\", &BigInteger::negate)\n        .def (py::self += py::self)\n        .def (py::self -= py::self)\n        .def (py::self *= py::self)\n        .def (py::self /= py::self)\n        .def (py::self |= py::self)\n        .def (py::self &= py::self)\n        .def (py::self ^= py::self)\n        .def (py::self %= py::self)\n        .def (py::self <<= int())\n        .def (py::self >>= int())\n        .def (-py::self)\n        .def (py::self + py::self)\n        .def (py::self - py::self)\n        .def (py::self * py::self)\n        .def (py::self / py::self)\n        .def (py::self | py::self)\n        .def (py::self & py::self)\n        .def (py::self ^ py::self)\n        .def (py::self % py::self)\n        .def (py::self << int())\n        .def (py::self >> int())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self < py::self)\n        .def (py::self <= py::self)\n        .def (py::self > py::self)\n        .def (py::self >= py::self)\n        .def (py::self == int())\n        .def (py::self != int())\n        .def (py::self < int())\n        .def (py::self <= int())\n        .def (py::self > int())\n        .def (py::self >= int())\n        .def (\"compare\", &BigInteger::compare)\n        .def (\"compareAbsolute\", &BigInteger::compareAbsolute)\n        .def (\"divideBy\", &BigInteger::divideBy)\n        .def (\"findGreatestCommonDivisor\", &BigInteger::findGreatestCommonDivisor)\n        .def (\"exponentModulo\", &BigInteger::exponentModulo)\n        .def (\"inverseModulo\", &BigInteger::inverseModulo)\n        .def (\"montgomeryMultiplication\", &BigInteger::montgomeryMultiplication)\n        .def (\"extendedEuclidean\", &BigInteger::extendedEuclidean)\n        .def (\"toString\", &BigInteger::toString)\n        .def (\"parseString\", &BigInteger::parseString)\n        .def (\"toMemoryBlock\", &BigInteger::toMemoryBlock)\n        .def (\"loadFromMemoryBlock\", &BigInteger::loadFromMemoryBlock)\n        .def (\"__repr__\", [](const BigInteger& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.toString (16) << \"')\";\n            return result;\n        })\n        .def (\"__str__\", &BigInteger::toString)\n    ;\n\n    // ============================================================================================ juce::Base64\n\n    py::class_<Base64> classBase64 (m, \"Base64\");\n\n    classBase64\n        .def_static (\"convertToBase64\", [](OutputStream& base64Result, py::buffer data)\n        {\n            auto info = data.request();\n            return Base64::convertToBase64 (base64Result, info.ptr, static_cast<size_t> (info.size));\n        })\n        .def_static (\"convertFromBase64\", &Base64::convertFromBase64)\n        .def_static (\"toBase64\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return Base64::toBase64 (info.ptr, static_cast<size_t> (info.size));\n        })\n        .def_static (\"toBase64\", static_cast<String (*)(const String &)> (&Base64::toBase64))\n    ;\n\n    // ============================================================================================ juce::Result\n\n    py::class_<Result> classResult (m, \"Result\");\n\n    classResult\n        .def (py::init<const Result&>())\n        .def_static (\"ok\", &Result::ok)\n        .def_static (\"fail\", &Result::fail)\n        .def (\"wasOk\", &Result::wasOk)\n        .def (\"failed\", &Result::failed)\n        .def (\"getErrorMessage\", &Result::getErrorMessage)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (!py::self)\n    ;\n\n    // ============================================================================================ juce::Uuid\n\n    py::class_<Uuid> classUuid (m, \"Uuid\");\n\n    classUuid\n        .def (py::init<>())\n        .def (py::init<const Uuid&>())\n        .def (py::init ([](py::buffer data)\n        {\n            auto info = data.request();\n\n            if (info.size != 16)\n                py::pybind11_fail (\"Invalid length of bytes to construct a Uuid class, needs to be 16\");\n\n            return Uuid (static_cast<const uint8*> (info.ptr));\n        }))\n        .def (py::init<const String&>())\n        .def (py::init ([](py::object obj)\n        {\n            auto uuid = py::module_::import (\"uuid\").attr (\"UUID\");\n            if (! py::isinstance (obj, uuid))\n                py::pybind11_fail (\"Invalid object to construct a Uuid class, only uuid.UUID is supported\");\n\n            auto buffer = obj.attr (\"bytes\").cast<py::bytes>();\n            return Uuid (reinterpret_cast<const uint8*> (static_cast<std::string_view> (buffer).data()));\n        }))\n        .def (\"isNull\", &Uuid::isNull)\n        .def_static (\"null\", &Uuid::null)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self == String())\n        .def (py::self != String())\n        .def (py::self < py::self)\n        .def (py::self > py::self)\n        .def (py::self <= py::self)\n        .def (py::self >= py::self)\n        .def (\"toString\", &Uuid::toString)\n        .def (\"toDashedString\", &Uuid::toDashedString)\n        .def (\"getTimeLow\", &Uuid::getTimeLow)\n        .def (\"getTimeMid\", &Uuid::getTimeMid)\n        .def (\"getTimeHighAndVersion\", &Uuid::getTimeHighAndVersion)\n        .def (\"getClockSeqAndReserved\", &Uuid::getClockSeqAndReserved)\n        .def (\"getClockSeqLow\", &Uuid::getClockSeqLow)\n        .def (\"getNode\", &Uuid::getNode)\n        .def (\"hash\", &Uuid::hash)\n        .def (\"getRawData\", [](const Uuid& self)\n        {\n            return py::memoryview::from_memory (self.getRawData(), 16);\n        }, py::return_value_policy::reference_internal)\n        .def (\"__repr__\", [](const Uuid& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('{\" << self.toDashedString () << \"}')\";\n            return result;\n        })\n        .def (\"__str__\", &Uuid::toDashedString)\n    ;\n\n    // ============================================================================================ juce::RelativeTime\n\n    py::class_<RelativeTime> classRelativeTime (m, \"RelativeTime\");\n\n    classRelativeTime\n        .def (py::init<double>(), \"seconds\"_a = 0.0)\n        .def (py::init<const RelativeTime&>())\n        .def_static (\"milliseconds\", static_cast<RelativeTime (*)(int64)> (&RelativeTime::milliseconds))\n        .def_static (\"seconds\", &RelativeTime::seconds)\n        .def_static (\"minutes\", &RelativeTime::minutes)\n        .def_static (\"hours\", &RelativeTime::hours)\n        .def_static (\"days\", &RelativeTime::days)\n        .def_static (\"weeks\", &RelativeTime::weeks)\n        .def (\"inMilliseconds\", &RelativeTime::inMilliseconds)\n        .def (\"inSeconds\", &RelativeTime::inSeconds)\n        .def (\"inMinutes\", &RelativeTime::inMinutes)\n        .def (\"inHours\", &RelativeTime::inHours)\n        .def (\"inDays\", &RelativeTime::inDays)\n        .def (\"inWeeks\", &RelativeTime::inWeeks)\n        .def (\"getDescription\", &RelativeTime::getDescription, \"returnValueForZeroTime\"_a = \"0\")\n        .def (\"getApproximateDescription\", &RelativeTime::getApproximateDescription)\n        .def (py::self + py::self)\n        .def (py::self - py::self)\n        .def (py::self += py::self)\n        .def (py::self -= py::self)\n        .def (py::self += double())\n        .def (py::self -= double())\n        .def (\"__repr__\", [](const RelativeTime& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.getDescription() << \"')\";\n            return result;\n        })\n        .def (\"__str__\", [](const RelativeTime& self) { return self.getDescription(); })\n    ;\n\n    // ============================================================================================ juce::Time\n\n    py::class_<Time> classTime (m, \"Time\");\n\n    classTime\n        .def (py::init<>())\n        .def (py::init<int64>())\n        .def (py::init<const Time&>())\n        .def (py::init<int, int, int, int, int, int, int, bool>(),\n            \"year\"_a, \"month\"_a, \"day\"_a, \"hours\"_a, \"minutes\"_a, \"seconds\"_a = 0, \"milliseconds\"_a = 0, \"useLocalTime\"_a = true)\n        .def_static (\"getCurrentTime\", &Time::getCurrentTime)\n        .def (\"toMilliseconds\", &Time::toMilliseconds)\n        .def (\"getYear\", &Time::getYear)\n        .def (\"getMonth\", &Time::getMonth)\n        .def (\"getMonthName\", py::overload_cast<bool> (&Time::getMonthName, py::const_))\n    //.def_static (\"getMonthName\", static_cast<String (*)(int, bool)> (&Time::getMonthName))\n        .def (\"getDayOfMonth\", &Time::getDayOfMonth)\n        .def (\"getDayOfWeek\", &Time::getDayOfWeek)\n        .def (\"getDayOfYear\", &Time::getDayOfYear)\n        .def (\"getWeekdayName\", py::overload_cast<bool> (&Time::getWeekdayName, py::const_))\n    //.def_static (\"getWeekdayName\", static_cast<String (*)(int, bool)> (&Time::getWeekdayName))\n        .def (\"getHours\", &Time::getHours)\n        .def (\"isAfternoon\", &Time::isAfternoon)\n        .def (\"getHoursInAmPmFormat\", &Time::getHoursInAmPmFormat)\n        .def (\"getMinutes\", &Time::getMinutes)\n        .def (\"getSeconds\", &Time::getSeconds)\n        .def (\"getMilliseconds\", &Time::getMilliseconds)\n        .def (\"isDaylightSavingTime\", &Time::isDaylightSavingTime)\n        .def (\"getTimeZone\", &Time::getTimeZone)\n        .def (\"getUTCOffsetSeconds\", &Time::getUTCOffsetSeconds)\n        .def (\"getUTCOffsetString\", &Time::getUTCOffsetString)\n        .def (\"toString\", &Time::toString, \"includeDate\"_a, \"includeTime\"_a, \"includeSeconds\"_a = true, \"use24HourClock\"_a = false)\n        .def (\"formatted\", &Time::formatted)\n        .def (\"toISO8601\", &Time::toISO8601, \"includeDividerCharacters\"_a)\n        .def_static (\"fromISO8601\", &Time::fromISO8601)\n        .def (py::self + RelativeTime())\n        .def (py::self - RelativeTime())\n        .def (py::self += RelativeTime())\n        .def (py::self -= RelativeTime())\n        .def (\"setSystemTimeToThisTime\", &Time::setSystemTimeToThisTime)\n        .def_static (\"currentTimeMillis\", &Time::currentTimeMillis)\n        .def_static (\"getMillisecondCounter\", &Time::getMillisecondCounter)\n        .def_static (\"getMillisecondCounterHiRes\", &Time::getMillisecondCounterHiRes)\n        .def_static (\"waitForMillisecondCounter\", &Time::waitForMillisecondCounter)\n        .def_static (\"getApproximateMillisecondCounter\", &Time::getApproximateMillisecondCounter)\n        .def_static (\"getHighResolutionTicks\", &Time::getHighResolutionTicks)\n        .def_static (\"getHighResolutionTicksPerSecond\", &Time::getHighResolutionTicksPerSecond)\n        .def_static (\"highResolutionTicksToSeconds\", &Time::highResolutionTicksToSeconds)\n        .def_static (\"secondsToHighResolutionTicks\", &Time::secondsToHighResolutionTicks)\n        .def_static (\"getCompilationDate\", &Time::getCompilationDate)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self < py::self)\n        .def (py::self <= py::self)\n        .def (py::self > py::self)\n        .def (py::self >= py::self)\n        .def (\"__repr__\", [](const Time& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.toISO8601 (false) << \"')\";\n            return result;\n        })\n        .def (\"__str__\", [](const Time& self) { return self.toISO8601 (false); })\n    ;\n\n    // ============================================================================================ juce::MemoryBlock\n\n    py::class_<MemoryBlock> classMemoryBlock (m, \"MemoryBlock\");\n\n    classMemoryBlock\n        .def (py::init<>())\n        .def (py::init<const size_t, bool>(), \"initialSize\"_a, \"initialiseToZero\"_a = false)\n        .def (py::init ([](py::list list)\n        {\n            auto mb = MemoryBlock (list.size());\n\n            if (list.size() > 0)\n            {\n                char* data = reinterpret_cast<char*> (mb.getData());\n\n                if (py::isinstance<py::int_> (list[0]))\n                    for (const auto& item : list)\n                        *data++ = static_cast<char> (item.cast<int>());\n                else\n                    for (const auto& item : list)\n                        *data++ = item.cast<char>();\n            }\n\n            return mb;\n        }))\n        .def (py::init ([](py::buffer data)\n        {\n            auto info = data.request();\n            return MemoryBlock (info.ptr, static_cast<size_t> (info.size));\n        }))\n        .def (py::init<const MemoryBlock&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"matches\", Helpers::makeVoidPointerAndSizeCallable<MemoryBlock> (&MemoryBlock::matches))\n        .def (\"getData\", [](MemoryBlock* self)\n        {\n            return py::memoryview::from_memory (self->getData(), static_cast<Py_ssize_t> (self->getSize()));\n        }, py::return_value_policy::reference_internal)\n        .def (\"getData\", [](const MemoryBlock* self)\n        {\n            return py::memoryview::from_memory (self->getData(), static_cast<Py_ssize_t> (self->getSize()));\n        }, py::return_value_policy::reference_internal)\n        .def (\"__getitem__\", [](const MemoryBlock& self, int index) { return self[index]; })\n        .def (\"__setitem__\", [](MemoryBlock* self, int index, char value) { self->operator[] (index) = value; })\n        .def (\"__setitem__\", [](MemoryBlock* self, int index, int value) { self->operator[] (index) = static_cast<char> (value); })\n        .def (\"isEmpty\", &MemoryBlock::isEmpty)\n        .def (\"getSize\", &MemoryBlock::getSize)\n        .def (\"setSize\", &MemoryBlock::setSize, \"newSize\"_a, \"initialiseNewSpaceToZero\"_a = false)\n        .def (\"ensureSize\", &MemoryBlock::ensureSize, \"newSize\"_a, \"initialiseNewSpaceToZero\"_a = false)\n        .def (\"reset\", &MemoryBlock::reset)\n        .def (\"fillWith\", &MemoryBlock::fillWith)\n        .def (\"append\", Helpers::makeVoidPointerAndSizeCallable<MemoryBlock> (&MemoryBlock::append))\n        .def (\"replaceAll\", Helpers::makeVoidPointerAndSizeCallable<MemoryBlock> (&MemoryBlock::replaceAll))\n        .def (\"insert\", [](MemoryBlock* self, py::buffer data, size_t insertPosition)\n        {\n            auto info = data.request();\n            self->insert (info.ptr, static_cast<size_t> (info.size), insertPosition);\n        })\n        .def (\"removeSection\", &MemoryBlock::removeSection)\n        .def (\"copyFrom\", [](MemoryBlock* self, py::buffer data, int destinationOffset)\n        {\n            auto info = data.request();\n            self->copyFrom (info.ptr, destinationOffset, static_cast<size_t> (info.size));\n        })\n        .def (\"copyTo\", [](const MemoryBlock* self, py::buffer data, int sourceOffset)\n        {\n            auto info = data.request (true);\n            self->copyTo (info.ptr, sourceOffset, static_cast<size_t> (info.size));\n        })\n        .def (\"swapWith\", &MemoryBlock::swapWith)\n        .def (\"toString\", &MemoryBlock::toString)\n        .def (\"loadFromHexString\", &MemoryBlock::loadFromHexString)\n        .def (\"setBitRange\", &MemoryBlock::setBitRange)\n        .def (\"getBitRange\", &MemoryBlock::getBitRange)\n        .def (\"toBase64Encoding\", &MemoryBlock::toBase64Encoding)\n        .def (\"fromBase64Encoding\", &MemoryBlock::fromBase64Encoding)\n        .def (\"__repr__\", [](const MemoryBlock& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"(b'\";\n\n            for (size_t index = 0; index < jmin (size_t (8), self.getSize()); ++index)\n                result << \"\\\\x\" << String::toHexString (self[index]).paddedLeft(L'0', 2);\n\n            if (self.getSize() > 8)\n                result << \"...\";\n\n            result << \"')\";\n            return result;\n        })\n        .def (\"__str__\", &MemoryBlock::toString)\n    ;\n\n    // ============================================================================================ juce::InputStream\n\n    py::class_<InputStream, PyInputStream<>> classInputStream (m, \"InputStream\");\n\n    classInputStream\n        .def (py::init<>())\n        .def (\"getTotalLength\", &InputStream::getTotalLength)\n        .def (\"getNumBytesRemaining\", &InputStream::getNumBytesRemaining)\n        .def (\"isExhausted\", &InputStream::isExhausted)\n        .def (\"read\", [](InputStream& self, py::buffer data)\n        {\n            auto info = data.request(false);\n            return self.read (info.ptr, static_cast<size_t> (info.size));\n        }, \"buffer\"_a)\n        .def (\"readByte\", &InputStream::readByte)\n        .def (\"readBool\", &InputStream::readBool)\n        .def (\"readShort\", &InputStream::readShort)\n        .def (\"readShortBigEndian\", &InputStream::readShortBigEndian)\n        .def (\"readInt\", &InputStream::readInt)\n        .def (\"readIntBigEndian\", &InputStream::readIntBigEndian)\n        .def (\"readInt64\", &InputStream::readInt64)\n        .def (\"readInt64BigEndian\", &InputStream::readInt64BigEndian)\n        .def (\"readFloat\", &InputStream::readFloat)\n        .def (\"readFloatBigEndian\", &InputStream::readFloatBigEndian)\n        .def (\"readDouble\", &InputStream::readDouble)\n        .def (\"readDoubleBigEndian\", &InputStream::readDoubleBigEndian)\n        .def (\"readCompressedInt\", &InputStream::readCompressedInt)\n        .def (\"readNextLine\", &InputStream::readNextLine)\n        .def (\"readString\", &InputStream::readString)\n        .def (\"readEntireStreamAsString\", &InputStream::readEntireStreamAsString)\n        .def (\"readIntoMemoryBlock\", &InputStream::readIntoMemoryBlock, \"destBlock\"_a, \"maxNumBytesToRead\"_a = -1)\n        .def (\"getPosition\", &InputStream::getPosition)\n        .def (\"setPosition\", &InputStream::setPosition, \"pos\"_a)\n        .def (\"skipNextBytes\", &InputStream::skipNextBytes, \"numBytesToSkip\"_a)\n    ;\n\n    py::class_<BufferedInputStream, InputStream, PyInputStream<BufferedInputStream>> classBufferedInputStream (m, \"BufferedInputStream\");\n\n    classBufferedInputStream\n        .def (py::init<InputStream&, int>(), \"sourceStream\"_a, \"bufferSize\"_a)\n        .def (\"peekByte\", &BufferedInputStream::peekByte)\n    ;\n\n    py::class_<MemoryInputStream, InputStream, PyInputStream<MemoryInputStream>> classMemoryInputStream (m, \"MemoryInputStream\");\n\n    classMemoryInputStream\n        .def (py::init<const MemoryBlock&, bool>(), \"data\"_a, \"keepInternalCopyOfData\"_a)\n        .def (py::init ([](py::buffer data, bool keepInternalCopyOfData)\n        {\n            auto info = data.request();\n            return new MemoryInputStream (info.ptr, static_cast<size_t> (info.size), keepInternalCopyOfData);\n        }), \"data\"_a, \"keepInternalCopyOfData\"_a)\n        .def (\"getData\", [](const MemoryInputStream& self)\n        {\n            return py::memoryview::from_memory (self.getData(), static_cast<Py_ssize_t> (self.getDataSize()));\n        }, py::return_value_policy::reference_internal)\n        .def (\"getDataSize\", &MemoryInputStream::getDataSize)\n    ;\n\n    py::class_<SubregionStream, InputStream, PyInputStream<SubregionStream>> classSubregionStream (m, \"SubregionStream\");\n\n    classSubregionStream\n        .def (py::init<InputStream*, int64, int64, bool>(),\n            \"sourceStream\"_a, \"startPositionInSourceStream\"_a, \"lengthOfSourceStream\"_a, \"deleteSourceWhenDestroyed\"_a)\n    ;\n\n    py::class_<GZIPDecompressorInputStream, InputStream, PyInputStream<GZIPDecompressorInputStream>> classGZIPDecompressorInputStream (m, \"GZIPDecompressorInputStream\");\n\n    py::enum_<GZIPDecompressorInputStream::Format> (classGZIPDecompressorInputStream, \"Format\")\n        .value (\"zlibFormat\", GZIPDecompressorInputStream::Format::zlibFormat)\n        .value (\"deflateFormat\", GZIPDecompressorInputStream::Format::deflateFormat)\n        .value (\"gzipFormat\", GZIPDecompressorInputStream::Format::gzipFormat)\n        .export_values();\n\n    classGZIPDecompressorInputStream\n        .def (py::init<InputStream*, bool, GZIPDecompressorInputStream::Format, int64>(),\n            \"sourceStream\"_a, \"deleteSourceWhenDestroyed\"_a = false, \"sourceFormat\"_a = GZIPDecompressorInputStream::zlibFormat, \"uncompressedStreamLength\"_a = -1)\n        .def (py::init<InputStream&>(), \"sourceStream\"_a)\n    ;\n\n    // ============================================================================================ juce::InputSource\n\n    py::class_<InputSource, PyInputSource<>> classInputSource (m, \"InputSource\");\n\n    classInputSource\n        .def (py::init<>())\n        .def (\"createInputStream\", &InputSource::createInputStream)\n        .def (\"createInputStreamFor\", &InputSource::createInputStreamFor)\n        .def (\"hashCode\", &InputSource::hashCode)\n    ;\n\n    // ============================================================================================ juce::OutputStream\n\n    py::class_<OutputStream, PyOutputStream<>> classOutputStream (m, \"OutputStream\");\n\n    classOutputStream\n        .def (py::init<>())\n        .def (\"flush\", &OutputStream::flush)\n        .def (\"setPosition\", &OutputStream::setPosition, \"pos\"_a)\n        .def (\"getPosition\", &OutputStream::getPosition)\n        .def (\"write\", popsicle::Helpers::makeVoidPointerAndSizeCallable<OutputStream> (&OutputStream::write))\n        .def (\"writeByte\", &OutputStream::writeByte)\n        .def (\"writeBool\", &OutputStream::writeBool)\n        .def (\"writeShort\", &OutputStream::writeShort)\n        .def (\"writeShortBigEndian\", &OutputStream::writeShortBigEndian)\n        .def (\"writeInt\", &OutputStream::writeInt)\n        .def (\"writeIntBigEndian\", &OutputStream::writeIntBigEndian)\n        .def (\"writeInt64\", &OutputStream::writeInt64)\n        .def (\"writeInt64BigEndian\", &OutputStream::writeInt64BigEndian)\n        .def (\"writeFloat\", &OutputStream::writeFloat)\n        .def (\"writeFloatBigEndian\", &OutputStream::writeFloatBigEndian)\n        .def (\"writeDouble\", &OutputStream::writeDouble)\n        .def (\"writeDoubleBigEndian\", &OutputStream::writeDoubleBigEndian)\n        .def (\"writeRepeatedByte\", &OutputStream::writeRepeatedByte)\n        .def (\"writeCompressedInt\", &OutputStream::writeCompressedInt)\n        .def (\"writeString\", &OutputStream::writeString)\n        .def (\"writeText\", &OutputStream::writeText)\n        .def (\"writeFromInputStream\", &OutputStream::writeFromInputStream)\n        .def (\"setNewLineString\", &OutputStream::setNewLineString)\n        .def (\"getNewLineString\", &OutputStream::getNewLineString, py::return_value_policy::reference_internal)\n    ;\n\n    py::class_<MemoryOutputStream, OutputStream, PyOutputStream<MemoryOutputStream>> classMemoryOutputStream (m, \"MemoryOutputStream\");\n\n    classMemoryOutputStream\n        .def (py::init<size_t>(), \"initialSize\"_a = 256)\n        .def (py::init<MemoryBlock&, bool>(), \"memoryBlockToWriteTo\"_a, \"appendToExistingBlockContent\"_a)\n        .def (py::init ([](py::buffer data)\n        {\n            auto info = data.request();\n            return new MemoryOutputStream (info.ptr, static_cast<size_t> (info.size));\n        }), \"destBuffer\"_a)\n        .def (\"getData\", [](const MemoryOutputStream* self)\n        {\n            return py::memoryview::from_memory (self->getData(), static_cast<Py_ssize_t> (self->getDataSize()));\n        }, py::return_value_policy::reference_internal)\n        .def (\"getDataSize\", &MemoryOutputStream::getDataSize)\n        .def (\"reset\", &MemoryOutputStream::reset)\n        .def (\"preallocate\", &MemoryOutputStream::preallocate, \"bytesToPreallocate\"_a)\n        .def (\"appendUTF8Char\", &MemoryOutputStream::appendUTF8Char, \"c\"_a)\n        .def (\"toUTF8\", &MemoryOutputStream::toUTF8)\n        .def (\"toString\", &MemoryOutputStream::toString)\n        .def (\"getMemoryBlock\", &MemoryOutputStream::getMemoryBlock)\n        .def (\"flush\", &MemoryOutputStream::flush)\n        .def (\"__str__\", &MemoryOutputStream::toString)\n    ;\n\n    py::class_<GZIPCompressorOutputStream, OutputStream, PyOutputStream<GZIPCompressorOutputStream>> classGZIPCompressorOutputStream (m, \"GZIPCompressorOutputStream\");\n\n    py::enum_<GZIPCompressorOutputStream::WindowBitsValues> (classGZIPCompressorOutputStream, \"WindowBitsValues\")\n        .value (\"windowBitsRaw\", GZIPCompressorOutputStream::WindowBitsValues::windowBitsRaw)\n        .value (\"windowBitsGZIP\", GZIPCompressorOutputStream::WindowBitsValues::windowBitsGZIP)\n        .export_values();\n\n    classGZIPCompressorOutputStream\n        .def (py::init<OutputStream&, int, int>(), \"destStream\"_a, \"compressionLevel\"_a = -1, \"windowBits\"_a = 0)\n        .def (py::init<OutputStream*, int, bool, int>(), \"destStream\"_a, \"compressionLevel\"_a = -1, \"deleteDestStreamWhenDestroyed\"_a = false, \"windowBits\"_a = 0)\n    ;\n\n    // ============================================================================================ juce::Random\n\n    py::class_<Random> classRandom (m, \"Random\");\n\n    classRandom\n        .def (py::init<>())\n        .def (py::init<int64>(), \"seedValue\"_a)\n        .def (\"nextInt\", py::overload_cast<> (&Random::nextInt))\n        .def (\"nextInt\", py::overload_cast<int> (&Random::nextInt), \"maxValue\"_a)\n        .def (\"nextInt\", py::overload_cast<Range<int>> (&Random::nextInt), \"range\"_a)\n        .def (\"nextInt64\", &Random::nextInt64)\n        .def (\"nextFloat\", &Random::nextFloat)\n        .def (\"nextDouble\", &Random::nextDouble)\n        .def (\"nextBool\", &Random::nextBool)\n        .def (\"nextLargeNumber\", &Random::nextLargeNumber, \"maximumValue\"_a)\n        .def (\"fillBitsRandomly\", [](Random& self, py::buffer data)\n        {\n            auto info = data.request (true);\n            self.fillBitsRandomly (info.ptr, static_cast<size_t> (info.size));\n        }, \"bufferToFill\"_a)\n        .def (\"fillBitsRandomly\", py::overload_cast<BigInteger&, int, int> (&Random::fillBitsRandomly), \"arrayToChange\"_a, \"startBit\"_a, \"numBits\"_a)\n        .def (\"setSeed\", &Random::setSeed, \"newSeed\"_a)\n        .def (\"getSeed\", &Random::getSeed)\n        .def (\"combineSeed\", &Random::combineSeed)\n        .def (\"setSeedRandomly\", &Random::setSeedRandomly)\n        .def_static (\"getSystemRandom\", &Random::getSystemRandom, py::return_value_policy::reference)\n    ;\n\n    // ============================================================================================ juce::File\n\n    py::class_<File> classFile (m, \"File\");\n\n    py::enum_<File::SpecialLocationType> (classFile, \"SpecialLocationType\")\n        .value (\"commonApplicationDataDirectory\", File::SpecialLocationType::commonApplicationDataDirectory)\n        .value (\"commonDocumentsDirectory\", File::SpecialLocationType::commonDocumentsDirectory)\n        .value (\"currentApplicationFile\", File::SpecialLocationType::currentApplicationFile)\n        .value (\"currentExecutableFile\", File::SpecialLocationType::currentExecutableFile)\n        .value (\"globalApplicationsDirectory\", File::SpecialLocationType::globalApplicationsDirectory)\n        .value (\"hostApplicationPath\", File::SpecialLocationType::hostApplicationPath)\n        .value (\"invokedExecutableFile\", File::SpecialLocationType::invokedExecutableFile)\n        .value (\"tempDirectory\", File::SpecialLocationType::tempDirectory)\n        .value (\"userApplicationDataDirectory\", File::SpecialLocationType::userApplicationDataDirectory)\n        .value (\"userDesktopDirectory\", File::SpecialLocationType::userDesktopDirectory)\n        .value (\"userDocumentsDirectory\", File::SpecialLocationType::userDocumentsDirectory)\n        .value (\"userHomeDirectory\", File::SpecialLocationType::userHomeDirectory)\n        .value (\"userMoviesDirectory\", File::SpecialLocationType::userMoviesDirectory)\n        .value (\"userMusicDirectory\", File::SpecialLocationType::userMusicDirectory)\n        .value (\"userPicturesDirectory\", File::SpecialLocationType::userPicturesDirectory)\n        .export_values();\n\n    py::enum_<File::TypesOfFileToFind> (classFile, \"TypesOfFileToFind\")\n        .value (\"findDirectories\", File::TypesOfFileToFind::findDirectories)\n        .value (\"findFiles\", File::TypesOfFileToFind::findFiles)\n        .value (\"findFilesAndDirectories\", File::TypesOfFileToFind::findFilesAndDirectories)\n        .value (\"ignoreHiddenFiles\", File::TypesOfFileToFind::ignoreHiddenFiles)\n        .export_values();\n\n    py::enum_<File::FollowSymlinks> (classFile, \"FollowSymlinks\")\n        .value (\"no\", File::FollowSymlinks::no)\n        .value (\"noCycles\", File::FollowSymlinks::noCycles)\n        .value (\"yes\", File::FollowSymlinks::yes);\n\n    classFile\n        .def (py::init<>())\n        .def (py::init<const String&>(), \"absolutePath\"_a)\n        .def (py::init<const File&>(), \"other\"_a)\n        .def (\"exists\", &File::exists)\n        .def (\"existsAsFile\", &File::existsAsFile)\n        .def (\"isDirectory\", &File::isDirectory)\n        .def (\"isRoot\", &File::isRoot)\n        .def (\"getSize\", &File::getSize)\n        .def_static (\"descriptionOfSizeInBytes\", &File::descriptionOfSizeInBytes, \"bytes\"_a)\n        .def (\"getFullPathName\", &File::getFullPathName)\n        .def (\"getFileName\", &File::getFileName)\n        .def (\"getRelativePathFrom\", &File::getRelativePathFrom, \"directoryToBeRelativeTo\"_a)\n        .def (\"getFileExtension\", &File::getFileExtension)\n        .def (\"hasFileExtension\", &File::hasFileExtension, \"extensionToTest\"_a)\n        .def (\"withFileExtension\", &File::withFileExtension, \"newExtension\"_a)\n        .def (\"getFileNameWithoutExtension\", &File::getFileNameWithoutExtension)\n        .def (\"hashCode\", &File::hashCode)\n        .def (\"hashCode64\", &File::hashCode64)\n        .def (\"getChildFile\", &File::getChildFile, \"relativeOrAbsolutePath\"_a)\n        .def (\"getSiblingFile\", &File::getSiblingFile, \"siblingFileName\"_a)\n        .def (\"getParentDirectory\", &File::getParentDirectory)\n        .def (\"isAChildOf\", &File::isAChildOf, \"potentialParentDirectory\"_a)\n        .def (\"getNonexistentChildFile\", &File::getNonexistentChildFile, \"prefix\"_a, \"suffix\"_a, \"putNumbersInBrackets\"_a = true)\n        .def (\"getNonexistentSibling\", &File::getNonexistentSibling, \"putNumbersInBrackets\"_a = true)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self < py::self)\n        .def (py::self > py::self)\n        .def (\"hasWriteAccess\", &File::hasWriteAccess)\n        .def (\"hasReadAccess\", &File::hasReadAccess)\n        .def (\"setReadOnly\", &File::setReadOnly, \"shouldBeReadOnly\"_a, \"applyRecursively\"_a = false)\n        .def (\"setExecutePermission\", &File::setExecutePermission, \"shouldBeExecutable\"_a)\n        .def (\"isHidden\", &File::isHidden)\n        .def (\"getFileIdentifier\", &File::getFileIdentifier)\n        .def (\"getLastModificationTime\", &File::getLastModificationTime)\n        .def (\"getLastAccessTime\", &File::getLastAccessTime)\n        .def (\"getCreationTime\", &File::getCreationTime)\n        .def (\"setLastModificationTime\", &File::setLastModificationTime, \"newTime\"_a)\n        .def (\"setLastAccessTime\", &File::setLastAccessTime, \"newTime\"_a)\n        .def (\"setCreationTime\", &File::setCreationTime, \"newTime\"_a)\n        .def (\"getVersion\", &File::getVersion)\n        .def (\"create\", &File::create)\n        .def (\"createDirectory\", &File::createDirectory)\n        .def (\"deleteFile\", &File::deleteFile)\n        .def (\"deleteRecursively\", &File::deleteRecursively, \"followSymlinks\"_a = false)\n        .def (\"moveToTrash\", &File::moveToTrash)\n        .def (\"moveFileTo\", &File::moveFileTo, \"targetLocation\"_a)\n        .def (\"copyFileTo\", &File::copyFileTo, \"targetLocation\"_a)\n        .def (\"replaceFileIn\", &File::replaceFileIn, \"targetLocation\"_a)\n        .def (\"copyDirectoryTo\", &File::copyDirectoryTo, \"newDirectory\"_a)\n        .def (\"findChildFiles\", py::overload_cast<int, bool, const String &, File::FollowSymlinks> (&File::findChildFiles, py::const_),\n            \"whatToLookFor\"_a, \"searchRecursively\"_a, \"wildCardPattern\"_a = \"*\", \"followSymlinks\"_a = File::FollowSymlinks::yes)\n        .def (\"findChildFiles\", py::overload_cast<Array<File>&, int, bool, const String &, File::FollowSymlinks> (&File::findChildFiles, py::const_),\n             \"results\"_a, \"whatToLookFor\"_a, \"searchRecursively\"_a, \"wildCardPattern\"_a = \"*\", \"followSymlinks\"_a = File::FollowSymlinks::yes)\n        .def (\"getNumberOfChildFiles\", &File::getNumberOfChildFiles, \"whatToLookFor\"_a, \"wildCardPattern\"_a = \"*\")\n        .def (\"containsSubDirectories\", &File::containsSubDirectories)\n        .def (\"createInputStream\", &File::createInputStream)\n        .def (\"createOutputStream\", &File::createOutputStream, \"bufferSize\"_a = 0x8000)\n        .def (\"loadFileAsData\", &File::loadFileAsData, \"result\"_a)\n        .def (\"loadFileAsString\", &File::loadFileAsString)\n        .def (\"readLines\", &File::readLines, \"destLines\"_a)\n        .def (\"appendData\", [](const File& self, py::buffer data)\n        {\n            auto info = data.request();\n            return self.appendData (info.ptr, static_cast<size_t> (info.size));\n        }, \"dataToAppend\"_a)\n        .def (\"replaceWithData\", [](const File& self, py::buffer data)\n        {\n            auto info = data.request();\n            return self.replaceWithData (info.ptr, static_cast<size_t> (info.size));\n        }, \"dataToWrite\"_a)\n        .def (\"appendText\", &File::appendText,\n            \"textToAppend\"_a, \"asUnicode\"_a = false, \"writeUnicodeHeaderBytes\"_a = false, \"lineEndings\"_a = \"\\r\\n\")\n        .def (\"replaceWithText\", &File::replaceWithText,\n            \"textToWrite\"_a, \"asUnicode\"_a = false, \"writeUnicodeHeaderBytes\"_a = false, \"lineEndings\"_a = \"\\r\\n\")\n        .def (\"hasIdenticalContentTo\", &File::hasIdenticalContentTo, \"other\"_a)\n        .def_static (\"findFileSystemRoots\", &File::findFileSystemRoots)\n        .def (\"getVolumeLabel\", &File::getVolumeLabel)\n        .def (\"getVolumeSerialNumber\", &File::getVolumeSerialNumber)\n        .def (\"getBytesFreeOnVolume\", &File::getBytesFreeOnVolume)\n        .def (\"getVolumeTotalSize\", &File::getVolumeTotalSize)\n        .def (\"isOnCDRomDrive\", &File::isOnCDRomDrive)\n        .def (\"isOnHardDisk\", &File::isOnHardDisk)\n        .def (\"isOnRemovableDrive\", &File::isOnRemovableDrive)\n        .def (\"startAsProcess\", &File::startAsProcess, \"parameters\"_a = String())\n        .def (\"revealToUser\", &File::revealToUser)\n        .def_static (\"getSpecialLocation\", &File::getSpecialLocation, \"type\"_a)\n        .def_static (\"createTempFile\", &File::createTempFile, \"fileNameEnding\"_a)\n        .def_static (\"getCurrentWorkingDirectory\", &File::getCurrentWorkingDirectory)\n        .def (\"setAsCurrentWorkingDirectory\", &File::setAsCurrentWorkingDirectory)\n        .def_static (\"getSeparatorChar\", [] { return static_cast<uint32> (File::getSeparatorChar()); })\n        .def_static (\"getSeparatorString\", &File::getSeparatorString)\n        .def_static (\"createLegalFileName\", &File::createLegalFileName, \"fileNameToFix\"_a)\n        .def_static (\"createLegalPathName\", &File::createLegalPathName, \"pathNameToFix\"_a)\n        .def_static (\"areFileNamesCaseSensitive\", &File::areFileNamesCaseSensitive)\n        .def_static (\"isAbsolutePath\", &File::isAbsolutePath, \"path\"_a)\n        .def_static (\"createFileWithoutCheckingPath\", &File::createFileWithoutCheckingPath, \"absolutePath\"_a)\n        .def_static (\"addTrailingSeparator\", &File::addTrailingSeparator, \"path\"_a)\n        .def (\"createSymbolicLink\", py::overload_cast<const File&, bool> (&File::createSymbolicLink, py::const_), \"linkFileToCreate\"_a, \"overwriteExisting\"_a)\n    //.def_static (\"createSymbolicLink\", [](const File& linkFileToCreate, const String& nativePathOfTarget, bool overwriteExisting) {\n    //    return File::createSymbolicLink (linkFileToCreate, nativePathOfTarget, overwriteExisting);\n    //}, \"linkFileToCreate\"_a, \"nativePathOfTarget\"_a, \"overwriteExisting\"_a)\n        .def (\"isSymbolicLink\", &File::isSymbolicLink)\n        .def (\"getLinkedTarget\", &File::getLinkedTarget)\n        .def (\"getNativeLinkedTarget\", &File::getNativeLinkedTarget)\n#if JUCE_WINDOWS\n        .def (\"createShortcut\", &File::createShortcut, \"description\"_a, \"linkFileToCreate\"_a)\n        .def (\"isShortcut\", &File::isShortcut)\n#elif JUCE_MAC\n        .def (\"getMacOSType\", &File::getMacOSType)\n        .def (\"isBundle\", &File::isBundle)\n        .def (\"addToDock\", &File::addToDock)\n        .def_static (\"getContainerForSecurityApplicationGroupIdentifier\", &File::getContainerForSecurityApplicationGroupIdentifier, \"appGroup\"_a)\n#endif\n        .def (\"__repr__\", [](const File& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.getFullPathName() << \"')\";\n            return result;\n        })\n    ;\n\n    // ============================================================================================ juce::File*Stream\n\n    py::class_<FileInputStream, InputStream, PyInputStream<FileInputStream>> classFileInputStream (m, \"FileInputStream\");\n\n    classFileInputStream\n        .def (py::init<const File&>(), \"fileToRead\"_a)\n        .def (\"getFile\", &FileInputStream::getFile, py::return_value_policy::reference_internal)\n        .def (\"getStatus\", &FileInputStream::getStatus, py::return_value_policy::reference_internal)\n        .def (\"failedToOpen\", &FileInputStream::failedToOpen)\n        .def (\"openedOk\", &FileInputStream::openedOk)\n    ;\n\n    py::class_<FileInputSource, InputSource> classFileInputSource (m, \"FileInputSource\");\n\n    classFileInputSource\n        .def (py::init<const File&, bool>(), \"file\"_a, \"useFileTimeInHashGeneration\"_a = false)\n    ;\n\n    py::class_<FileOutputStream, OutputStream, PyOutputStream<FileOutputStream>> classFileOutputStream (m, \"FileOutputStream\");\n\n    classFileOutputStream\n        .def (py::init<const File&, size_t>(), \"fileToWriteTo\"_a, \"bufferSizeToUse\"_a = 16384)\n        .def (\"getFile\", &FileOutputStream::getFile, py::return_value_policy::reference_internal)\n        .def (\"getStatus\", &FileOutputStream::getStatus, py::return_value_policy::reference_internal)\n        .def (\"failedToOpen\", &FileOutputStream::failedToOpen)\n        .def (\"openedOk\", &FileOutputStream::openedOk)\n        .def (\"truncate\", &FileOutputStream::truncate)\n    ;\n\n    // ============================================================================================ juce::MemoryMappedFile\n\n    py::class_<MemoryMappedFile> classMemoryMappedFile (m, \"MemoryMappedFile\");\n\n    py::enum_<MemoryMappedFile::AccessMode> (classMemoryMappedFile, \"AccessMode\")\n        .value (\"readOnly\", MemoryMappedFile::AccessMode::readOnly)\n        .value (\"readWrite\", MemoryMappedFile::AccessMode::readWrite)\n        .export_values();\n\n    classMemoryMappedFile\n        .def (py::init<const File&, MemoryMappedFile::AccessMode, bool>(), \"file\"_a, \"mode\"_a, \"exclusive\"_a = false)\n        .def (py::init<const File&, const Range<int64>&, MemoryMappedFile::AccessMode, bool>(), \"file\"_a, \"fileRange\"_a, \"mode\"_a, \"exclusive\"_a = false)\n        .def (\"getData\", [](const MemoryMappedFile& self) -> std::optional<py::memoryview>\n        {\n            if (self.getData() == nullptr)\n                return std::nullopt;\n\n            return py::memoryview::from_memory (self.getData(), static_cast<Py_ssize_t> (self.getSize()));\n        }, py::return_value_policy::reference_internal)\n        .def (\"getSize\", &MemoryMappedFile::getSize)\n        .def (\"getRange\", &MemoryMappedFile::getRange)\n    ;\n\n    // ============================================================================================ juce::FileFilter\n\n    py::class_<FileSearchPath> classFileSearchPath (m, \"FileSearchPath\");\n\n    classFileSearchPath\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (\"getNumPaths\", &FileSearchPath::getNumPaths)\n        .def (\"__getitem__\", [](const FileSearchPath& self, int index) { return self[index]; })\n        .def (\"getRawString\", &FileSearchPath::getRawString)\n        .def (\"toString\", &FileSearchPath::toString)\n        .def (\"toStringWithSeparator\", &FileSearchPath::toStringWithSeparator)\n        .def (\"add\", &FileSearchPath::add)\n        .def (\"addIfNotAlreadyThere\", &FileSearchPath::addIfNotAlreadyThere)\n        .def (\"remove\", &FileSearchPath::remove)\n        .def (\"addPath\", &FileSearchPath::addPath)\n        .def (\"removeRedundantPaths\", &FileSearchPath::removeRedundantPaths)\n        .def (\"removeNonExistentPaths\", &FileSearchPath::removeNonExistentPaths)\n        .def (\"findChildFiles\", py::overload_cast<int, bool, const String&> (&FileSearchPath::findChildFiles, py::const_),\n            \"whatToLookFor\"_a, \"searchRecursively\"_a, \"wildCardPattern\"_a = \"*\")\n        //.def (\"findChildFiles\", [](const FileSearchPath& self, int whatToLookFor, bool searchRecursively, const String& wildCardPattern)\n        //{\n        //}, \"whatToLookFor\"_a, \"searchRecursively\"_a, \"wildCardPattern\"_a = \"*\")\n        .def (\"isFileInPath\", &FileSearchPath::isFileInPath)\n    ;\n\n    // ============================================================================================ juce::FileFilter\n\n    py::class_<FileFilter, PyFileFilter<>> classFileFilter (m, \"FileFilter\");\n\n    classFileFilter\n        .def (py::init<const String&>())\n        .def (\"getDescription\", &FileFilter::getDescription, py::return_value_policy::reference_internal)\n        .def (\"isFileSuitable\", &FileFilter::isFileSuitable)\n        .def (\"isDirectorySuitable\", &FileFilter::isDirectorySuitable)\n    ;\n\n    py::class_<WildcardFileFilter, FileFilter, PyFileFilter<WildcardFileFilter>> classWildcardFileFilter (m, \"WildcardFileFilter\");\n\n    classWildcardFileFilter\n        .def (py::init<const String&, const String&, const String&>())\n    ;\n\n    // ============================================================================================ juce::TemporaryFile\n\n    py::class_<TemporaryFile> classTemporaryFile (m, \"TemporaryFile\");\n\n    py::enum_<TemporaryFile::OptionFlags> (classTemporaryFile, \"OptionFlags\", py::arithmetic())\n        .value (\"useHiddenFile\", TemporaryFile::OptionFlags::useHiddenFile)\n        .value (\"putNumbersInBrackets\", TemporaryFile::OptionFlags::putNumbersInBrackets)\n        .export_values();\n\n    classTemporaryFile\n        .def (py::init<const String&, int>(), \"suffix\"_a = String(), \"optionFlags\"_a = 0)\n        .def (py::init<const File&, int>(), \"targetFile\"_a, \"optionFlags\"_a = 0)\n        .def (py::init<const File&, const File&>(), \"targetFile\"_a, \"temporaryFile\"_a)\n        .def (\"getFile\", &TemporaryFile::getFile)\n        .def (\"getTargetFile\", &TemporaryFile::getTargetFile)\n        .def (\"overwriteTargetFileWithTemporary\", &TemporaryFile::overwriteTargetFileWithTemporary)\n        .def (\"deleteTemporaryFile\", &TemporaryFile::deleteTemporaryFile)\n        .def (\"__enter__\", [](TemporaryFile& self)\n        {\n            return std::addressof(self);\n        }, py::return_value_policy::reference)\n        .def (\"__exit__\", [](TemporaryFile& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.overwriteTargetFileWithTemporary();\n        })\n    ;\n\n    // ============================================================================================ juce::URL\n\n    py::class_<DirectoryEntry> classDirectoryEntry (m, \"DirectoryEntry\");\n\n    classDirectoryEntry\n        .def (py::init<>())\n        .def (\"getFile\", &DirectoryEntry::getFile)\n        .def (\"getModificationTime\", &DirectoryEntry::getModificationTime)\n        .def (\"getCreationTime\", &DirectoryEntry::getCreationTime)\n        .def (\"getFileSize\", &DirectoryEntry::getFileSize)\n        .def (\"isDirectory\", &DirectoryEntry::isDirectory)\n        .def (\"isHidden\", &DirectoryEntry::isHidden)\n        .def (\"isReadOnly\", &DirectoryEntry::isReadOnly)\n        .def (\"getEstimatedProgress\", &DirectoryEntry::getEstimatedProgress)\n    ;\n\n    py::class_<RangedDirectoryIterator> classRangedDirectoryIterator (m, \"RangedDirectoryIterator\");\n\n    classRangedDirectoryIterator\n        .def (py::init<>())\n        .def (py::init<const File&, bool, const String&, int, File::FollowSymlinks>(),\n            \"directory\"_a, \"isRecursive\"_a, \"wildCard\"_a = \"*\", \"whatToLookFor\"_a = File::findFiles, \"followSymlinks\"_a = File::FollowSymlinks::yes)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"__iter__\", [](const RangedDirectoryIterator& self)\n        {\n            return py::make_iterator (begin (self), end (self));\n        }, py::keep_alive<0, 1>())\n    ;\n\n    // ============================================================================================ juce::JSON\n\n    py::class_<JSON> classJSON (m, \"JSON\");\n\n    py::enum_<JSON::Spacing> (classJSON, \"Spacing\")\n        .value (\"none\", JSON::Spacing::none)\n        .value (\"singleLine\", JSON::Spacing::singleLine)\n        .value (\"multiLine\", JSON::Spacing::multiLine);\n\n    py::class_<JSON::FormatOptions> classJSONFormatOptions (classJSON, \"FormatOptions\");\n\n    classJSONFormatOptions\n        .def (py::init<>())\n        .def (\"withSpacing\", &JSON::FormatOptions::withSpacing)\n        .def (\"withMaxDecimalPlaces\", &JSON::FormatOptions::withMaxDecimalPlaces)\n        .def (\"withIndentLevel\", &JSON::FormatOptions::withIndentLevel)\n        .def (\"getSpacing\", &JSON::FormatOptions::getSpacing)\n        .def (\"getMaxDecimalPlaces\", &JSON::FormatOptions::getMaxDecimalPlaces)\n        .def (\"getIndentLevel\", &JSON::FormatOptions::getIndentLevel)\n    ;\n\n    classJSON\n        .def_static (\"parse\", static_cast<Result (*)(const String&, var&)> (&JSON::parse))\n        .def_static (\"parse\", static_cast<var (*)(const String&)> (&JSON::parse))\n        .def_static (\"parse\", static_cast<var (*)(const File&)> (&JSON::parse))\n        .def_static (\"parse\", static_cast<var (*)(InputStream&)> (&JSON::parse))\n        .def_static (\"toString\", static_cast<String (*)(const var&, bool, int)> (&JSON::toString),\n            \"objectToFormat\"_a, \"allOnOneLine\"_a = false, \"maximumDecimalPlaces\"_a = 15)\n        .def_static (\"toString\", static_cast<String (*)(const var&, const JSON::FormatOptions&)> (&JSON::toString))\n        .def_static (\"fromString\", &JSON::fromString)\n        .def_static (\"writeToStream\", static_cast<void (*)(OutputStream&, const var&, bool, int)> (&JSON::writeToStream),\n            \"output\"_a, \"objectToFormat\"_a, \"allOnOneLine\"_a = false, \"maximumDecimalPlaces\"_a = 15)\n        .def_static (\"writeToStream\", static_cast<void (*)(OutputStream&, const var&, const JSON::FormatOptions&)> (&JSON::writeToStream))\n        .def_static (\"escapeString\", &JSON::escapeString)\n    //.def_static (\"parseQuotedString\", &JSON::parseQuotedString)\n    ;\n\n    // ============================================================================================ juce::URL\n\n    py::class_<URL> classURL (m, \"URL\");\n\n    py::enum_<URL::ParameterHandling> (classURL, \"ParameterHandling\")\n        .value (\"inAddress\", URL::ParameterHandling::inAddress)\n        .value (\"inPostData\", URL::ParameterHandling::inPostData);\n\n    classURL\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (py::init<File>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"toString\", &URL::toString, \"includeGetParameters\"_a)\n        .def (\"isEmpty\", &URL::isEmpty)\n        .def (\"isWellFormed\", &URL::isWellFormed)\n        .def (\"getDomain\", &URL::getDomain)\n        .def (\"getSubPath\", &URL::getSubPath)\n        .def (\"getQueryString\", &URL::getQueryString)\n        .def (\"getAnchorString\", &URL::getAnchorString)\n        .def (\"getScheme\", &URL::getScheme)\n        .def (\"isLocalFile\", &URL::isLocalFile)\n        .def (\"getLocalFile\", &URL::getLocalFile)\n        .def (\"getFileName\", &URL::getFileName)\n        .def (\"getPort\", &URL::getPort)\n        .def (\"withNewDomainAndPath\", &URL::withNewDomainAndPath)\n        .def (\"withNewSubPath\", &URL::withNewSubPath)\n        .def (\"getParentURL\", &URL::getParentURL)\n        .def (\"getChildURL\", &URL::getChildURL)\n        .def (\"withParameter\", &URL::withParameter)\n        .def (\"withParameters\", &URL::withParameters)\n        .def (\"withAnchor\", &URL::withAnchor)\n        .def (\"withFileToUpload\", &URL::withFileToUpload)\n        .def (\"withDataToUpload\", &URL::withDataToUpload)\n        .def (\"getParameterNames\", &URL::getParameterNames)\n        .def (\"getParameterValues\", &URL::getParameterValues)\n        .def (\"withPOSTData\", py::overload_cast<const String &> (&URL::withPOSTData, py::const_))\n        .def (\"withPOSTData\", py::overload_cast<const MemoryBlock &> (&URL::withPOSTData, py::const_))\n        .def (\"getPostData\", &URL::getPostData)\n        .def (\"getPostDataAsMemoryBlock\", &URL::getPostDataAsMemoryBlock)\n        .def (\"launchInDefaultBrowser\", &URL::launchInDefaultBrowser)\n        .def_static (\"isProbablyAWebsiteURL\", &URL::isProbablyAWebsiteURL)\n        .def_static (\"isProbablyAnEmailAddress\", &URL::isProbablyAnEmailAddress)\n        .def (\"createInputStream\", py::overload_cast<const URL::InputStreamOptions &> (&URL::createInputStream, py::const_))\n        .def (\"createOutputStream\", &URL::createOutputStream)\n        .def (\"downloadToFile\", py::overload_cast<const File &, const URL::DownloadTaskOptions &> (&URL::downloadToFile))\n        .def (\"readEntireBinaryStream\", &URL::readEntireBinaryStream)\n        .def (\"readEntireTextStream\", &URL::readEntireTextStream)\n        .def (\"readEntireXmlStream\", &URL::readEntireXmlStream)\n        .def_static (\"addEscapeChars\", &URL::addEscapeChars)\n        .def_static (\"removeEscapeChars\", &URL::removeEscapeChars)\n        .def_static (\"createWithoutParsing\", &URL::createWithoutParsing)\n        .def (\"__repr__\", [](const URL& self)\n        {\n            String result;\n            result << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.toString (true) << \"')\";\n            return result;\n        })\n        .def (\"__str__\", [](const URL& self) { return self.toString (true); })\n    ;\n\n    py::class_<URL::InputStreamOptions> classURLInputStreamOptions (classURL, \"InputStreamOptions\");\n\n    classURLInputStreamOptions\n        .def (py::init<URL::ParameterHandling>())\n        .def (\"withProgressCallback\", &URL::InputStreamOptions::withProgressCallback)\n        .def (\"withExtraHeaders\", &URL::InputStreamOptions::withExtraHeaders)\n        .def (\"withConnectionTimeoutMs\", &URL::InputStreamOptions::withConnectionTimeoutMs)\n        .def (\"withResponseHeaders\", &URL::InputStreamOptions::withResponseHeaders)\n        .def (\"withStatusCode\", &URL::InputStreamOptions::withStatusCode)\n        .def (\"withNumRedirectsToFollow\", &URL::InputStreamOptions::withNumRedirectsToFollow)\n        .def (\"withHttpRequestCmd\", &URL::InputStreamOptions::withHttpRequestCmd)\n        .def (\"getParameterHandling\", &URL::InputStreamOptions::getParameterHandling)\n        .def (\"getProgressCallback\", &URL::InputStreamOptions::getProgressCallback)\n        .def (\"getExtraHeaders\", &URL::InputStreamOptions::getExtraHeaders)\n        .def (\"getConnectionTimeoutMs\", &URL::InputStreamOptions::getConnectionTimeoutMs)\n        .def (\"getResponseHeaders\", &URL::InputStreamOptions::getResponseHeaders)\n        .def (\"getStatusCode\", &URL::InputStreamOptions::getStatusCode)\n        .def (\"getNumRedirectsToFollow\", &URL::InputStreamOptions::getNumRedirectsToFollow)\n        .def (\"getHttpRequestCmd\", &URL::InputStreamOptions::getHttpRequestCmd)\n    ;\n\n    py::class_<URL::DownloadTask> classURLDownloadTask (classURL, \"DownloadTask\");\n    py::class_<URL::DownloadTaskListener, PyURLDownloadTaskListener> classURLDownloadTaskListener (classURL, \"DownloadTaskListener\");\n\n    classURLDownloadTaskListener\n        .def (py::init<>())\n        .def (\"finished\", &URL::DownloadTaskListener::finished)\n        .def (\"progress\", &URL::DownloadTaskListener::progress)\n    ;\n\n    classURLDownloadTask\n        .def (\"getTotalLength\", &URL::DownloadTask::getTotalLength)\n        .def (\"getLengthDownloaded\", &URL::DownloadTask::getLengthDownloaded)\n        .def (\"isFinished\", &URL::DownloadTask::isFinished)\n        .def (\"statusCode\", &URL::DownloadTask::statusCode)\n        .def (\"hadError\", &URL::DownloadTask::hadError)\n        .def (\"getTargetLocation\", &URL::DownloadTask::getTargetLocation)\n        .def_property_readonly(\"Listener\", [classURLDownloadTaskListener](const URL::DownloadTask&) { return classURLDownloadTaskListener; })\n    ;\n\n    py::class_<URL::DownloadTaskOptions> classURLDownloadTaskOptions (classURL, \"DownloadTaskOptions\");\n\n    classURLDownloadTaskOptions\n        .def (py::init<>())\n        .def (\"withExtraHeaders\", &URL::DownloadTaskOptions::withExtraHeaders)\n        .def (\"withSharedContainer\", &URL::DownloadTaskOptions::withSharedContainer)\n        .def (\"withListener\", &URL::DownloadTaskOptions::withListener)\n        .def (\"withUsePost\", &URL::DownloadTaskOptions::withUsePost)\n        .def_readwrite (\"extraHeaders\", &URL::DownloadTaskOptions::extraHeaders)\n        .def_readwrite (\"sharedContainer\", &URL::DownloadTaskOptions::sharedContainer)\n        .def_readwrite (\"listener\", &URL::DownloadTaskOptions::listener)\n        .def_readwrite (\"usePost\", &URL::DownloadTaskOptions::usePost)\n    ;\n\n    // ============================================================================================ juce::URLInputSource\n\n    py::class_<URLInputSource, InputSource, PyInputSource<URLInputSource>> classURLInputSource (m, \"URLInputSource\");\n\n    classURLInputSource\n        .def (py::init<const URL&>())\n    ;\n\n    // ============================================================================================ juce::PerformanceCounter\n\n    py::class_<PerformanceCounter> classPerformanceCounter (m, \"PerformanceCounter\");\n    py::class_<PerformanceCounter::Statistics> classPerformanceCounterStatistics (classPerformanceCounter, \"Statistics\");\n\n    classPerformanceCounterStatistics\n        .def (py::init<>())\n        .def (\"clear\", &PerformanceCounter::Statistics::clear)\n        .def (\"toString\", &PerformanceCounter::Statistics::toString)\n        .def (\"addResult\", &PerformanceCounter::Statistics::addResult)\n        .def_readwrite (\"name\", &PerformanceCounter::Statistics::name)\n        .def_readwrite (\"averageSeconds\", &PerformanceCounter::Statistics::averageSeconds)\n        .def_readwrite (\"maximumSeconds\", &PerformanceCounter::Statistics::maximumSeconds)\n        .def_readwrite (\"minimumSeconds\", &PerformanceCounter::Statistics::minimumSeconds)\n        .def_readwrite (\"totalSeconds\", &PerformanceCounter::Statistics::totalSeconds)\n        .def_readwrite (\"numRuns\", &PerformanceCounter::Statistics::numRuns)\n        .def (\"__str__\", &PerformanceCounter::Statistics::toString)\n    ;\n\n    classPerformanceCounter\n        .def (py::init<const String&, int, const File&>(), \"counterName\"_a, \"runsPerPrintout\"_a = 100, \"loggingFile\"_a = File())\n        .def (\"start\", &PerformanceCounter::start)\n        .def (\"stop\", &PerformanceCounter::stop)\n        .def (\"printStatistics\", &PerformanceCounter::printStatistics)\n        .def (\"getStatisticsAndReset\", &PerformanceCounter::getStatisticsAndReset)\n        .def (\"__enter__\", [](PerformanceCounter& self)\n        {\n            self.start();\n        }, py::return_value_policy::reference)\n        .def (\"__exit__\", [](PerformanceCounter& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.stop();\n            return self.getStatisticsAndReset();\n        })\n    ;\n\n    // ============================================================================================ juce::CriticalSection\n\n    py::class_<CriticalSection> classCriticalSection (m, \"CriticalSection\");\n\n    classCriticalSection\n        .def (py::init<>())\n        .def (\"enter\", &CriticalSection::enter, py::call_guard<py::gil_scoped_release>())\n        .def (\"tryEnter\", &CriticalSection::tryEnter)\n        .def (\"exit\", &CriticalSection::exit)\n    ;\n\n    py::class_<PyGenericScopedLock<CriticalSection>> classScopedLockCriticalSection (classCriticalSection, \"ScopedLockType\");\n\n    classScopedLockCriticalSection\n        .def (py::init<CriticalSection&>(), \"lock\"_a)\n        .def (\"__enter__\", [](PyGenericScopedLock<CriticalSection>& self) -> PyGenericScopedLock<CriticalSection>*\n        {\n            self.enter();\n            return std::addressof (self);\n        }, py::return_value_policy::reference, py::call_guard<py::gil_scoped_release>())\n        .def (\"__exit__\", [](PyGenericScopedLock<CriticalSection>& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.exit();\n        })\n    ;\n\n    py::class_<PyGenericScopedUnlock<CriticalSection>> classScopedUnlockCriticalSection (classCriticalSection, \"ScopedUnlockType\");\n\n    classScopedUnlockCriticalSection\n        .def (py::init<CriticalSection&>(), \"lock\"_a)\n        .def (\"__enter__\", [](PyGenericScopedUnlock<CriticalSection>& self) -> PyGenericScopedUnlock<CriticalSection>*\n        {\n            self.enter();\n            return std::addressof (self);\n        }, py::return_value_policy::reference, py::call_guard<py::gil_scoped_release>())\n        .def (\"__exit__\", [](PyGenericScopedUnlock<CriticalSection>& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.exit();\n        })\n    ;\n\n    py::class_<PyGenericScopedTryLock<CriticalSection>> classScopedTryLockCriticalSection (classCriticalSection, \"ScopedTryLock\");\n\n    classScopedTryLockCriticalSection\n        .def (py::init<CriticalSection&, int>(), \"lock\"_a, \"acquireLockOnInitialisation\"_a = true)\n        .def (\"__enter__\", [](PyGenericScopedTryLock<CriticalSection>& self) -> PyGenericScopedTryLock<CriticalSection>*\n        {\n            self.enter();\n            return std::addressof (self);\n        }, py::return_value_policy::reference, py::call_guard<py::gil_scoped_release>())\n        .def (\"__exit__\", [](PyGenericScopedTryLock<CriticalSection>& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.exit();\n        })\n    ;\n\n    // ============================================================================================ juce::SpinLock\n\n    py::class_<SpinLock> classSpinLock (m, \"SpinLock\");\n\n    classSpinLock\n        .def (py::init<>())\n        .def (\"enter\", &SpinLock::enter, py::call_guard<py::gil_scoped_release>())\n        .def (\"tryEnter\", &SpinLock::tryEnter)\n        .def (\"exit\", &SpinLock::exit)\n    ;\n\n    // ============================================================================================ juce::WaitableEvent\n\n    py::class_<WaitableEvent> classWaitableEvent (m, \"WaitableEvent\");\n\n    classWaitableEvent\n        .def (py::init<bool>(), \"manualReset\"_a = false)\n        .def (\"wait\", &WaitableEvent::wait, \"timeOutMilliseconds\"_a = -1.0, py::call_guard<py::gil_scoped_release>())\n        .def (\"signal\", &WaitableEvent::signal)\n        .def (\"reset\", &WaitableEvent::reset)\n    ;\n\n    // ============================================================================================ juce::ReadWriteLock\n\n    py::class_<ReadWriteLock> classReadWriteLock (m, \"ReadWriteLock\");\n\n    classReadWriteLock\n        .def (py::init<>())\n        .def (\"enterRead\", &ReadWriteLock::enterRead, py::call_guard<py::gil_scoped_release>())\n        .def (\"tryEnterRead\", &ReadWriteLock::tryEnterRead)\n        .def (\"exitRead\", &ReadWriteLock::exitRead, py::call_guard<py::gil_scoped_release>())\n        .def (\"enterWrite\", &ReadWriteLock::enterWrite, py::call_guard<py::gil_scoped_release>())\n        .def (\"tryEnterWrite\", &ReadWriteLock::tryEnterWrite)\n        .def (\"exitWrite\", &ReadWriteLock::exitWrite, py::call_guard<py::gil_scoped_release>())\n    ;\n\n    // ============================================================================================ juce::InterProcessLock\n\n    py::class_<InterProcessLock> classInterProcessLock (m, \"InterProcessLock\");\n\n    classInterProcessLock\n        .def (py::init<const String&>())\n        .def (\"enter\", &InterProcessLock::enter, \"timeOutMillisecs\"_a = -1, py::call_guard<py::gil_scoped_release>())\n        .def (\"exit\", &InterProcessLock::exit)\n    ;\n\n    // ============================================================================================ juce::HighResolutionTimer\n\n    py::class_<HighResolutionTimer, PyHighResolutionTimer> classHighResolutionTimer (m, \"HighResolutionTimer\");\n\n    classHighResolutionTimer\n        .def (py::init<>())\n        .def (\"hiResTimerCallback\", &HighResolutionTimer::hiResTimerCallback)\n        .def (\"startTimer\", &HighResolutionTimer::startTimer)\n        .def (\"stopTimer\", &HighResolutionTimer::stopTimer)\n        .def (\"isTimerRunning\", &HighResolutionTimer::isTimerRunning)\n        .def (\"getTimerInterval\", &HighResolutionTimer::getTimerInterval)\n    ;\n\n    // ============================================================================================ juce::ChildProcess\n\n    py::class_<ChildProcess> classChildProcess (m, \"ChildProcess\");\n\n    py::enum_<ChildProcess::StreamFlags> (classChildProcess, \"StreamFlags\", py::arithmetic())\n        .value (\"wantStdOut\", ChildProcess::StreamFlags::wantStdOut)\n        .value (\"wantStdErr\", ChildProcess::StreamFlags::wantStdErr);\n\n    classChildProcess\n        .def (py::init<>())\n        .def (\"start\", py::overload_cast<const String&, int> (&ChildProcess::start), \"command\"_a, \"streamFlags\"_a = ChildProcess::wantStdOut | ChildProcess::wantStdErr)\n        .def (\"start\", py::overload_cast<const StringArray&, int> (&ChildProcess::start), \"command\"_a, \"streamFlags\"_a = ChildProcess::wantStdOut | ChildProcess::wantStdErr)\n        .def (\"start\", [](ChildProcess& self, const String& command, ChildProcess::StreamFlags streamFlags)\n            { return self.start (command, streamFlags); }, \"command\"_a, \"streamFlags\"_a)\n        .def (\"start\", [](ChildProcess& self, const StringArray& command, ChildProcess::StreamFlags streamFlags)\n            { return self.start (command, streamFlags); }, \"command\"_a, \"streamFlags\"_a)\n        .def (\"isRunning\", &ChildProcess::isRunning)\n        .def (\"readProcessOutput\", [](ChildProcess& self, py::buffer data)\n        {\n            auto info = data.request();\n            return self.readProcessOutput (info.ptr, static_cast<int> (info.size));\n        })\n        .def (\"readAllProcessOutput\", &ChildProcess::readAllProcessOutput)\n        .def (\"waitForProcessToFinish\", &ChildProcess::waitForProcessToFinish)\n        .def (\"getExitCode\", &ChildProcess::getExitCode)\n        .def (\"kill\", &ChildProcess::kill)\n    ;\n\n    // ============================================================================================ juce::Thread\n\n    py::class_<Thread, PyThread<>> classThread (m, \"Thread\");\n\n    py::enum_<Thread::Priority> (classThread, \"Priority\")\n        .value (\"highest\", Thread::Priority::highest)\n        .value (\"high\", Thread::Priority::high)\n        .value (\"normal\", Thread::Priority::normal)\n        .value (\"low\", Thread::Priority::low)\n        .value (\"background\", Thread::Priority::background);\n\n    py::class_<Thread::RealtimeOptions> classThreadRealtimeOptions (classThread, \"RealtimeOptions\");\n\n    classThreadRealtimeOptions\n        .def (py::init<>())\n        .def (\"withPriority\", [](Thread::RealtimeOptions& self, Thread::Priority priority) { return self.withPriority (static_cast<int> (priority)); })\n        .def (\"withProcessingTimeMs\", &Thread::RealtimeOptions::withProcessingTimeMs)\n        .def (\"withMaximumProcessingTimeMs\", &Thread::RealtimeOptions::withMaximumProcessingTimeMs)\n        .def (\"withApproximateAudioProcessingTime\", &Thread::RealtimeOptions::withApproximateAudioProcessingTime)\n        .def (\"withPeriodMs\", &Thread::RealtimeOptions::withPeriodMs)\n        .def (\"withPeriodHz\", &Thread::RealtimeOptions::withPeriodHz)\n        .def (\"getPriority\", [](Thread::RealtimeOptions& self) { return static_cast<Thread::Priority> (self.getPriority()); })\n        .def (\"getProcessingTimeMs\", &Thread::RealtimeOptions::getProcessingTimeMs)\n        .def (\"getMaximumProcessingTimeMs\", &Thread::RealtimeOptions::getMaximumProcessingTimeMs)\n        .def (\"getPeriodMs\", &Thread::RealtimeOptions::getPeriodMs)\n    ;\n\n    py::class_<Thread::Listener, PyThreadListener> classThreadListener (classThread, \"Listener\");\n\n    classThreadListener\n        .def (py::init<>())\n        .def (\"exitSignalSent\", &Thread::Listener::exitSignalSent)\n    ;\n\n    classThread\n        .def (py::init<const String&, size_t>(), \"threadName\"_a, \"threadStackSize\"_a = Thread::osDefaultStackSize)\n        .def (\"run\", &Thread::run)\n        .def (\"startThread\", py::overload_cast<> (&Thread::startThread))\n        .def (\"startThread\", py::overload_cast<Thread::Priority> (&Thread::startThread))\n        .def (\"startRealtimeThread\", &Thread::startRealtimeThread)\n        .def (\"stopThread\", &Thread::stopThread, py::call_guard<py::gil_scoped_release>())\n    //.def_static (\"launch\", static_cast<bool (*)(std::function<void()>)> (&Thread::launch))\n    //.def_static (\"launch\", static_cast<bool (*)(Thread::Priority priority, std::function<void()>)> (&Thread::launch))\n        .def (\"isThreadRunning\", &Thread::isThreadRunning)\n        .def (\"signalThreadShouldExit\", &Thread::signalThreadShouldExit)\n        .def (\"threadShouldExit\", &Thread::threadShouldExit)\n        .def_static (\"currentThreadShouldExit\", &Thread::currentThreadShouldExit)\n        .def (\"waitForThreadToExit\", &Thread::waitForThreadToExit, py::call_guard<py::gil_scoped_release>())\n        .def (\"addListener\", &Thread::addListener)\n        .def (\"removeListener\", &Thread::removeListener)\n        .def (\"isRealtime\", &Thread::isRealtime)\n        .def (\"setAffinityMask\", &Thread::setAffinityMask)\n        .def_static (\"setCurrentThreadAffinityMask\", &Thread::setCurrentThreadAffinityMask)\n        .def_static (\"sleep\", &Thread::sleep, py::call_guard<py::gil_scoped_release>())\n        .def_static (\"yield\", &Thread::yield, py::call_guard<py::gil_scoped_release>())\n        .def (\"wait\", &Thread::wait, py::call_guard<py::gil_scoped_release>())\n        .def (\"notify\", &Thread::notify)\n        .def_static (\"getCurrentThreadId\", [] { return PyThreadID (Thread::getCurrentThreadId()); })\n        .def_static (\"getCurrentThread\", &Thread::getCurrentThread, py::return_value_policy::reference)\n        .def (\"getThreadId\", [](const Thread& self) { return PyThreadID (self.getThreadId()); })\n        .def (\"getThreadName\", &Thread::getThreadName)\n        .def_static (\"setCurrentThreadName\", &Thread::setCurrentThreadName)\n    //.def (\"getPriority\", &Thread::getPriority)\n    //.def (\"setPriority\", &Thread::setPriority)\n    ;\n\n    py::class_<PyThreadID> classThreadID (classThread, \"ThreadID\");\n\n    classThreadID\n        .def (py::init([](Thread::ThreadID value)\n        {\n            return PyThreadID (value);\n        }))\n        .def (py::init([](const PyThreadID& other)\n        {\n            return PyThreadID (static_cast<Thread::ThreadID> (other));\n        }))\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"__str__\", [](const PyThreadID& self)\n        {\n            return String::formatted (\"%p\", static_cast<Thread::ThreadID> (self));\n        })\n    ;\n\n    // ============================================================================================ juce::ThreadPool\n\n    py::class_<ThreadPoolJob, PyThreadPoolJob> classThreadPoolJob (m, \"ThreadPoolJob\");\n\n    py::enum_<ThreadPoolJob::JobStatus> (classThreadPoolJob, \"JobStatus\")\n        .value (\"jobHasFinished\", ThreadPoolJob::JobStatus::jobHasFinished)\n        .value (\"jobNeedsRunningAgain\", ThreadPoolJob::JobStatus::jobNeedsRunningAgain)\n        .export_values();\n\n    classThreadPoolJob\n        .def (py::init<const String&>())\n        .def (\"getJobName\", &ThreadPoolJob::getJobName)\n        .def (\"setJobName\", &ThreadPoolJob::setJobName)\n        .def (\"runJob\", &ThreadPoolJob::runJob)\n        .def (\"isRunning\", &ThreadPoolJob::isRunning)\n        .def (\"shouldExit\", &ThreadPoolJob::shouldExit)\n        .def (\"signalJobShouldExit\", &ThreadPoolJob::signalJobShouldExit)\n        .def (\"addListener\", &ThreadPoolJob::addListener)\n        .def (\"removeListener\", &ThreadPoolJob::removeListener)\n        .def_static (\"getCurrentThreadPoolJob\", &ThreadPoolJob::getCurrentThreadPoolJob, py::return_value_policy::reference)\n    ;\n\n    py::class_<ThreadPoolOptions> classThreadPoolOptions (m, \"ThreadPoolOptions\");\n\n    classThreadPoolOptions\n        .def (py::init<>())\n        .def (\"withThreadName\", &ThreadPoolOptions::withThreadName)\n        .def (\"withNumberOfThreads\", &ThreadPoolOptions::withNumberOfThreads)\n        .def (\"withThreadStackSizeBytes\", &ThreadPoolOptions::withThreadStackSizeBytes)\n        .def (\"withDesiredThreadPriority\", &ThreadPoolOptions::withDesiredThreadPriority)\n        .def_readwrite (\"threadName\", &ThreadPoolOptions::threadName)\n        .def_readwrite (\"numberOfThreads\", &ThreadPoolOptions::numberOfThreads)\n        .def_readwrite (\"threadStackSizeBytes\", &ThreadPoolOptions::threadStackSizeBytes)\n        .def_readwrite (\"desiredThreadPriority\", &ThreadPoolOptions::desiredThreadPriority)\n    ;\n\n    py::class_<ThreadPool> classThreadPool (m, \"ThreadPool\");\n\n    py::class_<ThreadPool::JobSelector, PyThreadPoolJobSelector> classThreadPoolJobSelector (classThreadPool, \"JobSelector\");\n\n    classThreadPoolJobSelector\n        .def (py::init<>())\n        .def (\"isJobSuitable\", &ThreadPool::JobSelector::isJobSuitable)\n    ;\n\n    classThreadPool\n        .def (py::init<>())\n        .def (py::init<const ThreadPoolOptions&>(), \"options\"_a)\n        .def (py::init<int, size_t, Thread::Priority>(),\n            \"numberOfThreads\"_a, \"threadStackSizeBytes\"_a = Thread::osDefaultStackSize, \"desiredThreadPriority\"_a = Thread::Priority::normal)\n        .def (\"addJob\", [](ThreadPool& self, ThreadPoolJob* job) { return self.addJob (job, false); })\n        .def (\"addJob\", py::overload_cast<std::function<ThreadPoolJob::JobStatus()>> (&ThreadPool::addJob))\n        .def (\"addJob\", py::overload_cast<std::function<void()>> (&ThreadPool::addJob))\n        .def (\"removeJob\", &ThreadPool::removeJob, py::call_guard<py::gil_scoped_release>())\n        .def (\"removeAllJobs\", [](ThreadPool& self, bool interruptRunningJobs, int timeOutMilliseconds, ThreadPool::JobSelector* selectedJobsToRemove)\n        {\n            self.removeAllJobs (interruptRunningJobs, timeOutMilliseconds, selectedJobsToRemove);\n        }, \"interruptRunningJobs\"_a, \"timeOutMilliseconds\"_a, \"selectedJobsToRemove\"_a = nullptr, py::call_guard<py::gil_scoped_release>())\n        .def (\"getNumJobs\", &ThreadPool::getNumJobs)\n        .def (\"getNumThreads\", &ThreadPool::getNumThreads)\n        .def (\"getJob\", &ThreadPool::getJob, py::return_value_policy::reference)\n        .def (\"contains\", &ThreadPool::contains)\n        .def (\"isJobRunning\", &ThreadPool::isJobRunning)\n        .def (\"waitForJobToFinish\", &ThreadPool::waitForJobToFinish, py::call_guard<py::gil_scoped_release>())\n        .def (\"moveJobToFront\", &ThreadPool::moveJobToFront, py::call_guard<py::gil_scoped_release>())\n        .def (\"getNamesOfAllJobs\", &ThreadPool::getNamesOfAllJobs)\n    ;\n\n    // ============================================================================================ juce::TimeSliceThread\n\n    py::class_<TimeSliceThread, Thread, PyThread<TimeSliceThread>> classTimeSliceThread (m, \"TimeSliceThread\");\n    py::class_<TimeSliceClient, PyTimeSliceClient> classTimeSliceClient (m, \"TimeSliceClient\");\n\n    classTimeSliceClient\n        .def (py::init<>())\n        .def (\"useTimeSlice\", &TimeSliceClient::useTimeSlice)\n    ;\n\n    classTimeSliceThread\n        .def (py::init<const String&>(), \"threadName\"_a)\n        .def (\"addTimeSliceClient\", &TimeSliceThread::addTimeSliceClient)\n        .def (\"moveToFrontOfQueue\", &TimeSliceThread::moveToFrontOfQueue)\n        .def (\"removeTimeSliceClient\", &TimeSliceThread::removeTimeSliceClient)\n        .def (\"removeAllClients\", &TimeSliceThread::removeAllClients)\n        .def (\"getNumClients\", &TimeSliceThread::getNumClients)\n        .def (\"getClient\", &TimeSliceThread::getClient, py::return_value_policy::reference)\n        .def (\"contains\", &TimeSliceThread::contains)\n    ;\n\n    // ============================================================================================ juce::Process\n\n    py::class_<Process> classProcess (m, \"Process\");\n\n    py::enum_<Process::ProcessPriority> (classProcess, \"ProcessPriority\")\n        .value (\"LowPriority\", Process::ProcessPriority::LowPriority)\n        .value (\"NormalPriority\", Process::ProcessPriority::NormalPriority)\n        .value (\"HighPriority\", Process::ProcessPriority::HighPriority)\n        .value (\"RealtimePriority\", Process::ProcessPriority::RealtimePriority)\n        .export_values();\n\n    classProcess\n        .def_static (\"setPriority\", &Process::setPriority)\n        .def_static (\"terminate\", &Process::terminate)\n        .def_static (\"isForegroundProcess\", &Process::isForegroundProcess)\n        .def_static (\"makeForegroundProcess\", &Process::makeForegroundProcess)\n        .def_static (\"hide\", &Process::hide)\n        .def_static (\"raisePrivilege\", &Process::raisePrivilege)\n        .def_static (\"lowerPrivilege\", &Process::lowerPrivilege)\n        .def_static (\"isRunningUnderDebugger\", &Process::isRunningUnderDebugger)\n        .def_static (\"openDocument\", &Process::openDocument)\n        .def_static (\"openEmailWithAttachments\", &Process::openEmailWithAttachments)\n#if JUCE_MAC\n        .def_static (\"setDockIconVisible\", &Process::setDockIconVisible)\n#endif\n#if JUCE_MAC || JUCE_LINUX || JUCE_BSD\n        .def_static (\"setMaxNumberOfFileHandles\", &Process::setMaxNumberOfFileHandles)\n#endif\n    ;\n\n    // ============================================================================================ juce::XmlElement\n\n    py::class_<XmlElement, std::unique_ptr<XmlElement>> classXmlElement (m, \"XmlElement\");\n    py::class_<XmlElement::TextFormat> classXmlElementTextFormat (classXmlElement, \"TextFormat\");\n    py::class_<PyXmlElementComparator> classXmlElementComparator (classXmlElement, \"Comparator\");\n\n    classXmlElementComparator\n        .def (py::init<>())\n        .def (\"compareElements\", &PyXmlElementComparator::compareElements)\n    ;\n\n    classXmlElementTextFormat\n        .def (py::init<>())\n        .def_readwrite (\"dtd\", &XmlElement::TextFormat::dtd)\n        .def_readwrite (\"customHeader\", &XmlElement::TextFormat::customHeader)\n        .def_readwrite (\"customEncoding\", &XmlElement::TextFormat::customEncoding)\n        .def_readwrite (\"addDefaultHeader\", &XmlElement::TextFormat::addDefaultHeader)\n        .def_readwrite (\"lineWrapLength\", &XmlElement::TextFormat::lineWrapLength)\n        .def_readwrite (\"newLineChars\", &XmlElement::TextFormat::newLineChars)\n        .def (\"singleLine\", &XmlElement::TextFormat::singleLine)\n        .def (\"withoutHeader\", &XmlElement::TextFormat::withoutHeader)\n    ;\n\n    classXmlElement\n        .def (py::init<const char*>())\n        .def (py::init<const String&>())\n        .def (py::init<const Identifier&>())\n        .def (py::init<const XmlElement&>())\n        .def (\"isEquivalentTo\", &XmlElement::isEquivalentTo, \"other\"_a, \"ignoreOrderOfAttributes\"_a)\n        .def (\"toString\", &XmlElement::toString, \"format\"_a = XmlElement::TextFormat())\n        .def (\"writeTo\", py::overload_cast<OutputStream&, const XmlElement::TextFormat&> (&XmlElement::writeTo, py::const_), \"output\"_a, \"format\"_a = XmlElement::TextFormat())\n        .def (\"writeTo\", py::overload_cast<const File& , const XmlElement::TextFormat&> (&XmlElement::writeTo, py::const_), \"output\"_a, \"format\"_a = XmlElement::TextFormat())\n        .def (\"getTagName\", &XmlElement::getTagName)\n        .def (\"getNamespace\", &XmlElement::getNamespace)\n        .def (\"getTagNameWithoutNamespace\", &XmlElement::getTagNameWithoutNamespace)\n        .def (\"hasTagName\", &XmlElement::hasTagName)\n        .def (\"hasTagNameIgnoringNamespace\", &XmlElement::hasTagNameIgnoringNamespace)\n        .def (\"setTagName\", &XmlElement::setTagName)\n        .def (\"getNumAttributes\", &XmlElement::getNumAttributes)\n        .def (\"getAttributeName\", &XmlElement::getAttributeName)\n        .def (\"getAttributeValue\", &XmlElement::getAttributeValue)\n        .def (\"hasAttribute\", &XmlElement::hasAttribute)\n        .def (\"getStringAttribute\", py::overload_cast<StringRef> (&XmlElement::getStringAttribute, py::const_))\n        .def (\"getStringAttribute\", py::overload_cast<StringRef, const String&> (&XmlElement::getStringAttribute, py::const_))\n        .def (\"compareAttribute\", &XmlElement::compareAttribute, \"attributeName\"_a, \"stringToCompareAgainst\"_a, \"ignoreCase\"_a = false)\n        .def (\"getIntAttribute\", &XmlElement::getIntAttribute, \"attributeName\"_a, \"defaultReturnValue\"_a = 0)\n        .def (\"getDoubleAttribute\", &XmlElement::getDoubleAttribute, \"attributeName\"_a, \"defaultReturnValue\"_a = 0.0)\n        .def (\"getBoolAttribute\", &XmlElement::getBoolAttribute, \"attributeName\"_a, \"defaultReturnValue\"_a = false)\n        .def (\"setAttribute\", py::overload_cast<const Identifier&, const String&> (&XmlElement::setAttribute))\n        .def (\"setAttribute\", [](XmlElement& self, const String& name, const String& value) { self.setAttribute (name, value); })\n        .def (\"setAttribute\", py::overload_cast<const Identifier&, int> (&XmlElement::setAttribute))\n        .def (\"setAttribute\", [](XmlElement& self, const String& name, int value) { self.setAttribute (name, value); })\n        .def (\"setAttribute\", py::overload_cast<const Identifier&, double> (&XmlElement::setAttribute))\n        .def (\"setAttribute\", [](XmlElement& self, const String& name, double value) { self.setAttribute (name, value); })\n        .def (\"removeAttribute\", &XmlElement::removeAttribute)\n        .def (\"removeAttribute\", [](XmlElement& self, const String& name) { self.removeAttribute (name); })\n        .def (\"removeAllAttributes\", &XmlElement::removeAllAttributes)\n        .def (\"getFirstChildElement\", &XmlElement::getFirstChildElement, py::return_value_policy::reference_internal)\n        .def (\"getNextElement\", &XmlElement::getNextElement, py::return_value_policy::reference_internal)\n        .def (\"getNextElementWithTagName\", &XmlElement::getNextElementWithTagName, py::return_value_policy::reference_internal)\n        .def (\"getNumChildElements\", &XmlElement::getNumChildElements)\n        .def (\"getChildElement\", &XmlElement::getChildElement, py::return_value_policy::reference_internal)\n        .def (\"getChildByName\", &XmlElement::getChildByName, py::return_value_policy::reference_internal)\n        .def (\"getChildByAttribute\", &XmlElement::getChildByAttribute, py::return_value_policy::reference_internal)\n        .def (\"addChildElement\", [](XmlElement& self, py::object newChildElement)\n            { self.addChildElement (newChildElement.release().cast<XmlElement*>()); })\n        .def (\"insertChildElement\", [](XmlElement& self, py::object newChildElement, int index)\n            { self.insertChildElement (newChildElement.release().cast<XmlElement*>(), index); })\n        .def (\"prependChildElement\", [](XmlElement& self, py::object newChildElement)\n            { self.prependChildElement (newChildElement.release().cast<XmlElement*>()); })\n        .def (\"createNewChildElement\", &XmlElement::createNewChildElement, py::return_value_policy::reference_internal)\n        .def (\"replaceChildElement\", [](XmlElement& self, XmlElement* currentChildElement, py::object newChildElement)\n            { self.replaceChildElement (currentChildElement, newChildElement.release().cast<XmlElement*>()); })\n        .def (\"removeChildElement\", &XmlElement::removeChildElement)\n        .def (\"deleteAllChildElements\", &XmlElement::deleteAllChildElements)\n        .def (\"deleteAllChildElementsWithTagName\", &XmlElement::deleteAllChildElementsWithTagName)\n        .def (\"containsChildElement\", &XmlElement::containsChildElement)\n        .def (\"findParentElementOf\", &XmlElement::findParentElementOf, py::return_value_policy::reference_internal)\n        .def (\"sortChildElements\", &XmlElement::template sortChildElements<PyXmlElementComparator>, \"comparator\"_a, \"retainOrderOfEquivalentItems\"_a = false)\n        .def (\"sortChildElements\", [](XmlElement& self, py::function fn, bool retainOrderOfEquivalentItems)\n        {\n            PyXmlElementCallableComparator comparator (std::move (fn));\n            return self.sortChildElements (comparator, retainOrderOfEquivalentItems);\n        }, \"comparator\"_a, \"retainOrderOfEquivalentItems\"_a = false)\n        .def (\"isTextElement\", &XmlElement::isTextElement)\n        .def (\"getText\", &XmlElement::getText)\n        .def (\"setText\", &XmlElement::setText)\n        .def (\"getAllSubText\", &XmlElement::getAllSubText)\n        .def (\"getChildElementAllSubText\", &XmlElement::getChildElementAllSubText, \"childTagName\"_a, \"defaultReturnValue\"_a)\n        .def (\"addTextElement\", &XmlElement::addTextElement)\n        .def (\"deleteAllTextElements\", &XmlElement::deleteAllTextElements)\n        .def_static (\"createTextElement\", &XmlElement::createTextElement)\n        .def_static (\"isValidXmlName\", &XmlElement::isValidXmlName)\n        .def (\"getChildIterator\", [](const XmlElement& self)\n        {\n            auto range = self.getChildIterator();\n            return py::make_iterator (std::begin (range), std::end (range));\n        })\n        .def (\"getChildIterator\", [](const XmlElement& self, StringRef name)\n        {\n            auto range = self.getChildWithTagNameIterator (name);\n            return py::make_iterator (std::begin (range), std::end (range));\n        })\n    ;\n\n    // ============================================================================================ juce::XmlDocument\n\n    py::class_<XmlDocument> classXmlDocument (m, \"XmlDocument\");\n\n    classXmlDocument\n        .def (py::init<const File&>(), \"file\"_a)\n        .def (py::init<const String&>(), \"textToParse\"_a)\n        .def (\"getDocumentElement\", &XmlDocument::getDocumentElement, \"onlyReadOuterDocumentElement\"_a = false)\n        .def (\"getDocumentElementIfTagMatches\", &XmlDocument::getDocumentElementIfTagMatches, \"requiredTag\"_a)\n        .def (\"getLastParseError\", &XmlDocument::getLastParseError)\n        .def (\"setInputSource\", [](XmlDocument& self, py::object source) { self.setInputSource (source.release().cast<InputSource*>()); })\n        .def (\"setEmptyTextElementsIgnored\", &XmlDocument::setEmptyTextElementsIgnored, \"shouldBeIgnored\"_a)\n        .def_static (\"parse\", static_cast<std::unique_ptr<XmlElement> (*)(const File&)> (&XmlDocument::parse), \"file\"_a)\n        .def_static (\"parse\", static_cast<std::unique_ptr<XmlElement> (*)(const String&)> (&XmlDocument::parse), \"textToParse\"_a)\n    ;\n\n    // ============================================================================================ juce::PropertySet\n\n    py::class_<PropertySet> classPropertySet (m, \"PropertySet\");\n\n    classPropertySet\n        .def (py::init<>())\n        .def (py::init<const PropertySet&>())\n        .def (\"getValue\", &PropertySet::getValue, \"keyName\"_a, \"defaultReturnValue\"_a = String())\n        .def (\"getIntValue\", &PropertySet::getIntValue, \"keyName\"_a, \"defaultReturnValue\"_a = 0)\n        .def (\"getDoubleValue\", &PropertySet::getDoubleValue, \"keyName\"_a, \"defaultReturnValue\"_a = 0.0)\n        .def (\"getBoolValue\", &PropertySet::getBoolValue, \"keyName\"_a, \"defaultReturnValue\"_a = false)\n        .def (\"getXmlValue\", &PropertySet::getXmlValue, \"keyName\"_a)\n        .def (\"setValue\", py::overload_cast<StringRef, const var&> (&PropertySet::setValue), \"keyName\"_a, \"value\"_a)\n        .def (\"setValue\", py::overload_cast<StringRef, const XmlElement*> (&PropertySet::setValue), \"keyName\"_a, \"xml\"_a)\n        .def (\"addAllPropertiesFrom\", &PropertySet::addAllPropertiesFrom, \"source\"_a)\n        .def (\"removeValue\", &PropertySet::removeValue, \"keyName\"_a)\n        .def (\"containsKey\", &PropertySet::containsKey, \"keyName\"_a)\n        .def (\"clear\", &PropertySet::clear)\n        .def (\"getAllProperties\", &PropertySet::getAllProperties, py::return_value_policy::reference_internal)\n        .def (\"getLock\", &PropertySet::getLock, py::return_value_policy::reference_internal)\n        .def (\"createXml\", &PropertySet::createXml, \"nodeName\"_a)\n        .def (\"restoreFromXml\", &PropertySet::restoreFromXml, \"xml\"_a)\n        .def (\"setFallbackPropertySet\", &PropertySet::setFallbackPropertySet, \"fallbackProperties\"_a)\n        .def (\"getFallbackPropertySet\", &PropertySet::getFallbackPropertySet, py::return_value_policy::reference_internal)\n    ;\n\n    // ============================================================================================ juce::ZipFile\n\n    py::class_<ZipFile> classZipFile (m, \"ZipFile\");\n    py::class_<ZipFile::ZipEntry> classZipFileZipEntry (classZipFile, \"ZipEntry\");\n    py::class_<ZipFile::Builder> classZipFileBuilder (classZipFile, \"Builder\");\n\n    py::enum_<ZipFile::OverwriteFiles> (classZipFile, \"OverwriteFiles\")\n        .value (\"no\", ZipFile::OverwriteFiles::no)\n        .value (\"yes\", ZipFile::OverwriteFiles::yes);\n\n    py::enum_<ZipFile::FollowSymlinks> (classZipFile, \"FollowSymlinks\")\n        .value (\"no\", ZipFile::FollowSymlinks::no)\n        .value (\"yes\", ZipFile::FollowSymlinks::yes);\n\n    classZipFileZipEntry\n        .def (py::init<>())\n        .def_readwrite (\"filename\", &ZipFile::ZipEntry::filename)\n        .def_readwrite (\"uncompressedSize\", &ZipFile::ZipEntry::uncompressedSize)\n        .def_readwrite (\"fileTime\", &ZipFile::ZipEntry::fileTime)\n        .def_readwrite (\"isSymbolicLink\", &ZipFile::ZipEntry::isSymbolicLink)\n        .def_readwrite (\"externalFileAttributes\", &ZipFile::ZipEntry::externalFileAttributes)\n    ;\n\n    classZipFileBuilder\n        .def (py::init<>())\n        .def (\"addFile\", &ZipFile::Builder::addFile, \"fileToAdd\"_a, \"compressionLevel\"_a, \"storedPathName\"_a = String())\n        .def (\"addEntry\", [](ZipFile::Builder& self, py::object stream, int compression, const String& path, Time time)\n        {\n            self.addEntry (stream.release().cast<InputStream*>(), compression, path, time);\n        }, \"streamToRead\"_a, \"compressionLevel\"_a, \"storedPathName\"_a, \"fileModificationTime\"_a)\n        .def (\"writeToStream\", [](const ZipFile::Builder& self, OutputStream& target) { return self.writeToStream (target, nullptr); }, \"target\"_a)\n    ;\n\n    classZipFile\n        .def (py::init<const File&>(), \"file\"_a)\n        .def (py::init<InputStream&>(), \"inputStream\"_a)\n        .def (py::init ([](py::object inputSource)\n        {\n            return new ZipFile (inputSource.release().cast<InputSource*>());\n        }), \"inputSource\"_a)\n        .def (\"getNumEntries\", &ZipFile::getNumEntries)\n        .def (\"getIndexOfFileName\", &ZipFile::getIndexOfFileName, \"fileName\"_a, \"ignoreCase\"_a = false)\n        .def (\"getEntry\", py::overload_cast<int> (&ZipFile::getEntry, py::const_), \"index\"_a, py::return_value_policy::reference_internal)\n        .def (\"getEntry\", py::overload_cast<const String&, bool> (&ZipFile::getEntry, py::const_), \"fileName\"_a, \"ignoreCase\"_a = false, py::return_value_policy::reference_internal)\n        .def (\"sortEntriesByFilename\", &ZipFile::sortEntriesByFilename)\n        .def (\"createStreamForEntry\", py::overload_cast<int> (&ZipFile::createStreamForEntry))\n        .def (\"createStreamForEntry\", py::overload_cast<const ZipFile::ZipEntry&> (&ZipFile::createStreamForEntry))\n        .def (\"uncompressTo\", &ZipFile::uncompressTo, \"targetDirectory\"_a, \"shouldOverwriteFiles\"_a = true)\n        .def (\"uncompressEntry\", py::overload_cast<int, const File&, bool> (&ZipFile::uncompressEntry), \"index\"_a, \"targetDirectory\"_a, \"shouldOverwriteFiles\"_a = true)\n        .def (\"uncompressEntry\", py::overload_cast<int, const File&, ZipFile::OverwriteFiles, ZipFile::FollowSymlinks> (&ZipFile::uncompressEntry), \"index\"_a, \"targetDirectory\"_a, \"overwriteFiles\"_a, \"followSymlinks\"_a)\n    ;\n\n    // ============================================================================================ juce::SystemStats\n\n    py::class_<SystemStats> classSystemStats (m, \"SystemStats\");\n\n    Helpers::makeArithmeticEnum<SystemStats::OperatingSystemType> (classSystemStats, \"OperatingSystemType\")\n        .value (\"UnknownOS\", SystemStats::OperatingSystemType::UnknownOS)\n        .value (\"MacOSX\", SystemStats::OperatingSystemType::MacOSX)\n        .value (\"Windows\", SystemStats::OperatingSystemType::Windows)\n        .value (\"Linux\", SystemStats::OperatingSystemType::Linux)\n        .value (\"Android\", SystemStats::OperatingSystemType::Android)\n        .value (\"iOS\", SystemStats::OperatingSystemType::iOS)\n        .value (\"WASM\", SystemStats::OperatingSystemType::WASM)\n        .value (\"MacOSX_10_7\", SystemStats::OperatingSystemType::MacOSX_10_7)\n        .value (\"MacOSX_10_8\", SystemStats::OperatingSystemType::MacOSX_10_8)\n        .value (\"MacOSX_10_9\", SystemStats::OperatingSystemType::MacOSX_10_9)\n        .value (\"MacOSX_10_10\", SystemStats::OperatingSystemType::MacOSX_10_10)\n        .value (\"MacOSX_10_11\", SystemStats::OperatingSystemType::MacOSX_10_11)\n        .value (\"MacOSX_10_12\", SystemStats::OperatingSystemType::MacOSX_10_12)\n        .value (\"MacOSX_10_13\", SystemStats::OperatingSystemType::MacOSX_10_13)\n        .value (\"MacOSX_10_14\", SystemStats::OperatingSystemType::MacOSX_10_14)\n        .value (\"MacOSX_10_15\", SystemStats::OperatingSystemType::MacOSX_10_15)\n        .value (\"MacOS_11\", SystemStats::OperatingSystemType::MacOS_11)\n        .value (\"MacOS_12\", SystemStats::OperatingSystemType::MacOS_12)\n        .value (\"MacOS_13\", SystemStats::OperatingSystemType::MacOS_13)\n        .value (\"Win2000\", SystemStats::OperatingSystemType::Win2000)\n        .value (\"WinXP\", SystemStats::OperatingSystemType::WinXP)\n        .value (\"WinVista\", SystemStats::OperatingSystemType::WinVista)\n        .value (\"Windows7\", SystemStats::OperatingSystemType::Windows7)\n        .value (\"Windows8_0\", SystemStats::OperatingSystemType::Windows8_0)\n        .value (\"Windows8_1\", SystemStats::OperatingSystemType::Windows8_1)\n        .value (\"Windows10\", SystemStats::OperatingSystemType::Windows10)\n        .value (\"Windows11\", SystemStats::OperatingSystemType::Windows11)\n        .export_values();\n\n    py::enum_<SystemStats::MachineIdFlags> (classSystemStats, \"MachineIdFlags\")\n        .value (\"macAddresses\", SystemStats::MachineIdFlags::macAddresses)\n        .value (\"fileSystemId\", SystemStats::MachineIdFlags::fileSystemId)\n        .value (\"legacyUniqueId\", SystemStats::MachineIdFlags::legacyUniqueId)\n        .value (\"uniqueId\", SystemStats::MachineIdFlags::uniqueId)\n        .export_values();\n\n    classSystemStats\n        .def_static (\"getJUCEVersion\", &SystemStats::getJUCEVersion)\n        .def_static (\"getOperatingSystemType\", &SystemStats::getOperatingSystemType)\n        .def_static (\"getOperatingSystemName\", &SystemStats::getOperatingSystemName)\n        .def_static (\"isOperatingSystem64Bit\", &SystemStats::isOperatingSystem64Bit)\n        .def_static (\"getEnvironmentVariable\", &SystemStats::getEnvironmentVariable)\n        .def_static (\"getLogonName\", &SystemStats::getLogonName)\n        .def_static (\"getFullUserName\", &SystemStats::getFullUserName)\n        .def_static (\"getComputerName\", &SystemStats::getComputerName)\n        .def_static (\"getUserLanguage\", &SystemStats::getUserLanguage)\n        .def_static (\"getUserRegion\", &SystemStats::getUserRegion)\n        .def_static (\"getDisplayLanguage\", &SystemStats::getDisplayLanguage)\n        .def_static (\"getDeviceDescription\", &SystemStats::getDeviceDescription)\n        .def_static (\"getDeviceManufacturer\", &SystemStats::getDeviceManufacturer)\n        .def_static (\"getUniqueDeviceID\", &SystemStats::getUniqueDeviceID)\n        .def_static (\"getMachineIdentifiers\", &SystemStats::getMachineIdentifiers)\n        .def_static (\"getNumCpus\", &SystemStats::getNumCpus)\n        .def_static (\"getNumPhysicalCpus\", &SystemStats::getNumPhysicalCpus)\n        .def_static (\"getCpuSpeedInMegahertz\", &SystemStats::getCpuSpeedInMegahertz)\n        .def_static (\"getCpuVendor\", &SystemStats::getCpuVendor)\n        .def_static (\"getCpuModel\", &SystemStats::getCpuModel)\n        .def_static (\"hasMMX\", &SystemStats::hasMMX)\n        .def_static (\"has3DNow\", &SystemStats::has3DNow)\n        .def_static (\"hasFMA3\", &SystemStats::hasFMA3)\n        .def_static (\"hasFMA4\", &SystemStats::hasFMA4)\n        .def_static (\"hasSSE\", &SystemStats::hasSSE)\n        .def_static (\"hasSSE2\", &SystemStats::hasSSE2)\n        .def_static (\"hasSSE3\", &SystemStats::hasSSE3)\n        .def_static (\"hasSSSE3\", &SystemStats::hasSSSE3)\n        .def_static (\"hasSSE41\", &SystemStats::hasSSE41)\n        .def_static (\"hasSSE42\", &SystemStats::hasSSE42)\n        .def_static (\"hasAVX\", &SystemStats::hasAVX)\n        .def_static (\"hasAVX2\", &SystemStats::hasAVX2)\n        .def_static (\"hasAVX512F\", &SystemStats::hasAVX512F)\n        .def_static (\"hasAVX512BW\", &SystemStats::hasAVX512BW)\n        .def_static (\"hasAVX512CD\", &SystemStats::hasAVX512CD)\n        .def_static (\"hasAVX512DQ\", &SystemStats::hasAVX512DQ)\n        .def_static (\"hasAVX512ER\", &SystemStats::hasAVX512ER)\n        .def_static (\"hasAVX512IFMA\", &SystemStats::hasAVX512IFMA)\n        .def_static (\"hasAVX512PF\", &SystemStats::hasAVX512PF)\n        .def_static (\"hasAVX512VBMI\", &SystemStats::hasAVX512VBMI)\n        .def_static (\"hasAVX512VL\", &SystemStats::hasAVX512VL)\n        .def_static (\"hasAVX512VPOPCNTDQ\", &SystemStats::hasAVX512VPOPCNTDQ)\n        .def_static (\"hasNeon\", &SystemStats::hasNeon)\n        .def_static (\"getMemorySizeInMegabytes\", &SystemStats::getMemorySizeInMegabytes)\n        .def_static (\"getPageSize\", &SystemStats::getPageSize)\n        .def_static (\"getStackBacktrace\", &SystemStats::getStackBacktrace)\n    //.def_static (\"setApplicationCrashHandler\", &SystemStats::setApplicationCrashHandler)\n    ;\n\n    // ============================================================================================ juce::Array<>\n\n    registerArray<Array, bool, int, float, String, File> (m);\n\n    // ============================================================================================ juce::SparseSet<>\n\n    registerSparseSet<SparseSet, int> (m);\n\n    // ============================================================================================ testing\n\n    m.def (\"__raise_cpp_exception__\", [](const juce::String& what) { throw std::runtime_error (what.toStdString()); });\n    m.def (\"__terminate__\", [] { std::terminate(); });\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceCoreBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../utilities/ClassDemangling.h\"\n#include \"../utilities/PythonInterop.h\"\n#include \"../utilities/PythonTypes.h\"\n\n#include <cstddef>\n#include <functional>\n#include <memory>\n#include <typeinfo>\n#include <type_traits>\n#include <utility>\n\nnamespace PYBIND11_NAMESPACE {\nnamespace detail {\n\n// =================================================================================================\n\ntemplate <>\nstruct type_caster<juce::StringRef>\n{\npublic:\n    PYBIND11_TYPE_CASTER (juce::StringRef, const_name (PYBIND11_STRING_NAME));\n\n    bool load (handle src, bool convert);\n\n    static handle cast (const juce::StringRef& src, return_value_policy policy, handle parent);\n\nprivate:\n    bool load_raw (handle src);\n};\n\n// =================================================================================================\n\ntemplate <>\nstruct type_caster<juce::String>\n{\npublic:\n    PYBIND11_TYPE_CASTER (juce::String, const_name (PYBIND11_STRING_NAME));\n\n    bool load (handle src, bool convert);\n\n    static handle cast (const juce::String& src, return_value_policy policy, handle parent);\n\nprivate:\n    bool load_raw (handle src);\n};\n\n// =================================================================================================\n\ntemplate <>\nstruct type_caster<juce::Identifier> : public type_caster_base<juce::Identifier>\n{\n    using base_type = type_caster_base<juce::Identifier>;\n\npublic:\n    PYBIND11_TYPE_CASTER (juce::Identifier, const_name (\"popsicle.Identifier\"));\n\n    bool load (handle src, bool convert);\n\n    static handle cast (const juce::Identifier& src, return_value_policy policy, handle parent);\n\nprivate:\n    bool load_raw (handle src);\n};\n\n// =================================================================================================\n\ntemplate <>\nstruct type_caster<juce::var>\n{\npublic:\n    PYBIND11_TYPE_CASTER (juce::var, const_name (\"popsicle.var\"));\n\n    bool load (handle src, bool convert);\n\n    static handle cast (const juce::var& src, return_value_policy policy, handle parent);\n};\n\n} // namespace detail\n} // namespace PYBIND11_NAMESPACE\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceCoreBindings (pybind11::module_& m);\n\n// ============================================================================================\n\ntemplate <class T, class = void>\nstruct isEqualityComparable : std::false_type {};\n\ntemplate <class T>\nstruct isEqualityComparable<T, std::void_t<decltype(std::declval<T>() == std::declval<T>())>> : std::true_type {};\n\n// =================================================================================================\n\ntemplate <class T>\nstruct PyArrayElementComparator\n{\n    PyArrayElementComparator() = default;\n\n    int compareElements (const T& first, const T& second)\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<PyArrayElementComparator*> (this), \"compareElements\"); override_)\n        {\n            auto result = override_ (first, second);\n\n            return result.template cast<int>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"Array.Comparator.compareElements\\\"\");\n    }\n};\n\n// ============================================================================================\n\ntemplate <template <class, class, int> class Class, class... Types>\nvoid registerArray (pybind11::module_& m)\n{\n    using namespace juce;\n\n    namespace py = pybind11;\n    using namespace py::literals;\n\n    auto type = py::hasattr (m, \"Array\") ? m.attr (\"Array\").cast<py::dict>() : py::dict{};\n\n    ([&]\n    {\n        using ValueType = underlying_type_t<Types>;\n        using T = Class<ValueType, DummyCriticalSection, 0>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Array\", typeid (ValueType).name());\n\n        py::class_<T> class_ (m, className.toRawUTF8());\n        py::class_<PyArrayElementComparator<ValueType>> classComparator_ (class_, \"Comparator\");\n\n        classComparator_\n            .def (py::init<>())\n            .def (\"compareElements\", &PyArrayElementComparator<ValueType>::compareElements)\n        ;\n\n        class_\n            .def (py::init<>())\n            .def (py::init<const ValueType&>())\n            .def (py::init<const T&>())\n            .def (py::init ([](py::list list)\n            {\n                auto result = T();\n                result.ensureStorageAllocated (static_cast<int> (list.size()));\n\n                for (auto item : list)\n                {\n                    py::detail::make_caster<ValueType> conv;\n\n                    if (! conv.load (item, true))\n                        py::pybind11_fail(\"Invalid value type used to feed \\\"Array\\\" constructor\");\n\n                    result.add (py::detail::cast_op<ValueType&&> (std::move (conv)));\n                }\n\n                return result;\n            }))\n            .def (py::init ([](py::args args)\n            {\n                auto result = T();\n                result.ensureStorageAllocated (static_cast<int> (args.size()));\n\n                for (auto item : args)\n                {\n                    py::detail::make_caster<ValueType> conv;\n\n                    if (! conv.load (item, true))\n                        py::pybind11_fail(\"Invalid value type used to feed \\\"Array\\\" constructor\");\n\n                    result.add (py::detail::cast_op<ValueType&&> (std::move (conv)));\n                }\n\n                return result;\n            }))\n            .def (\"clear\", &T::clear)\n            .def (\"clearQuick\", &T::clearQuick)\n            .def (\"fill\", &T::fill)\n            .def (\"size\", &T::size)\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"__getitem__\", &T::operator[])\n            .def (\"__setitem__\", &T::set)\n            .def (\"getUnchecked\", &T::getUnchecked)\n            .def (\"getReference\", py::overload_cast<int> (&T::getReference), py::return_value_policy::reference)\n            .def (\"getFirst\", &T::getFirst)\n            .def (\"getLast\", &T::getLast)\n        //.def (\"getRawDataPointer\", &T::getRawDataPointer)\n            .def(\"__iter__\", [](T& self)\n            {\n                return py::make_iterator (self.begin(), self.end());\n            }, py::keep_alive<0, 1>())\n            .def (\"add\", [](T& self, const ValueType& arg)\n            {\n                self.add (arg);\n            })\n            .def (\"add\", [](T& self, py::list list)\n            {\n                self.ensureStorageAllocated (self.size() + static_cast<int> (list.size()));\n\n                for (auto item : list)\n                {\n                    py::detail::make_caster<ValueType> conv;\n\n                    if (! conv.load (item, true))\n                        py::pybind11_fail(\"Invalid value type used to feed \\\"Array.add\\\"\");\n\n                    self.add (py::detail::cast_op<ValueType&&> (std::move (conv)));\n                }\n            })\n            .def (\"add\", [](T& self, py::args args)\n            {\n                self.ensureStorageAllocated (self.size() + static_cast<int> (args.size()));\n\n                for (auto item : args)\n                {\n                    py::detail::make_caster<ValueType> conv;\n\n                    if (! conv.load (item, true))\n                        py::pybind11_fail(\"Invalid value type used to feed \\\"Array.add\\\"\");\n\n                    self.add (py::detail::cast_op<ValueType&&> (std::move (conv)));\n                }\n            })\n            .def (\"insert\", &T::insert)\n            .def (\"insertMultiple\", &T::insertMultiple)\n        //.def (\"insertArray\", &T::insertArray)\n            .def (\"set\", &T::set)\n            .def (\"setUnchecked\", &T::setUnchecked)\n        //.def (\"addArray\", &T::addArray)\n            .def (\"addArray\", [](T& self, py::list list)\n            {\n                for (auto item : list)\n                {\n                    py::detail::make_caster<ValueType> conv;\n\n                    if (! conv.load (item, true))\n                        py::pybind11_fail(\"Invalid value type used to feed \\\"Array.addArray\\\"\");\n\n                    self.add (py::detail::cast_op<ValueType&&> (std::move (conv)));\n                }\n            })\n            .def (\"swapWith\", &T::template swapWith<T>)\n            .def (\"addArray\", py::overload_cast<const T&> (&T::template addArray<T>))\n            .def (\"resize\", &T::resize)\n            .def (\"remove\", py::overload_cast<int> (&T::remove))\n            .def (\"removeAndReturn\", &T::removeAndReturn)\n            .def (\"remove\", py::overload_cast<const ValueType*> (&T::remove))\n            .def (\"removeIf\", [](T& self, py::function predicate)\n            {\n                return self.removeIf ([&predicate](const ValueType& value)\n                {\n                    return predicate (py::cast (value)).template cast<bool>();\n                });\n            })\n            .def (\"removeRange\", &T::removeRange)\n            .def (\"removeLast\", &T::removeLast)\n            .def (\"swap\", &T::swap)\n            .def (\"move\", &T::move, \"currentIndex\"_a, \"newIndex\"_a)\n            .def (\"minimiseStorageOverheads\", &T::minimiseStorageOverheads)\n            .def (\"ensureStorageAllocated\", &T::ensureStorageAllocated, \"minNumElements\"_a)\n            .def (\"getLock\", &T::getLock)\n            .def (\"__len__\", &T::size)\n            .def (\"__repr__\", [className](T& self)\n            {\n                String result;\n                result\n                    << \"<\" << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (T).name(), 1)\n                    << \" object at \" << String::formatted (\"%p\", std::addressof (self)) << \">\";\n                return result;\n            })\n        ;\n\n        if constexpr (! std::is_same_v<ValueType, Types>)\n            class_.def (py::init ([](Types value) { return T (static_cast<ValueType> (value)); }));\n\n        if constexpr (isEqualityComparable<ValueType>::value)\n        {\n            class_\n                .def (py::self == py::self)\n                .def (py::self != py::self)\n                .def (\"indexOf\", &T::indexOf)\n                .def (\"contains\", &T::contains)\n                .def (\"addIfNotAlreadyThere\", &T::addIfNotAlreadyThere)\n                .def (\"addUsingDefaultSort\", &T::addUsingDefaultSort)\n                .def (\"addSorted\", [](T& self, PyArrayElementComparator<ValueType>& comparator, ValueType value)\n                {\n                    self.addSorted (comparator, value);\n                })\n                .def (\"indexOfSorted\", [](const T& self, PyArrayElementComparator<ValueType>& comparator, ValueType value)\n                {\n                    return self.indexOfSorted (comparator, value);\n                })\n                .def (\"removeValuesIn\", &T::template removeValuesIn<T>)\n                .def (\"removeValuesNotIn\", &T::template removeValuesNotIn<T>)\n                .def (\"removeFirstMatchingValue\", &T::removeFirstMatchingValue)\n                .def (\"removeAllInstancesOf\", &T::removeAllInstancesOf)\n                .def (\"sort\", [](T& self) { self.sort(); })\n                .def (\"sort\", [](T& self, PyArrayElementComparator<ValueType>& comparator, int retainOrderOfEquivalentItems)\n                {\n                    self.sort (comparator, retainOrderOfEquivalentItems);\n                }, \"comparator\"_a, \"retainOrderOfEquivalentItems\"_a = false)\n            ;\n        }\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.attr (\"Array\") = type;\n}\n\n// =================================================================================================\n\nstruct PyThreadID\n{\n    explicit PyThreadID (juce::Thread::ThreadID value) noexcept\n        : value (value)\n    {\n    }\n\n    operator juce::Thread::ThreadID() const noexcept\n    {\n        return value;\n    }\n\n    bool operator==(const PyThreadID& other) const noexcept\n    {\n        return value == other.value;\n    }\n\n    bool operator!=(const PyThreadID& other) const noexcept\n    {\n        return value != other.value;\n    }\n\nprivate:\n    juce::Thread::ThreadID value;\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::InputStream>\nstruct PyInputStream : Base\n{\nprivate:\n#if JUCE_WINDOWS && ! JUCE_MINGW\n    using ssize_t = juce::pointer_sized_int;\n#endif\n\npublic:\n    using Base::Base;\n\n    juce::int64 getTotalLength() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, getTotalLength);\n    }\n\n    bool isExhausted() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isExhausted);\n    }\n\n    int read (void* destBuffer, int maxBytesToRead) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"read\"); override_)\n        {\n            auto result = override_ (pybind11::memoryview::from_memory (destBuffer, static_cast<ssize_t> (maxBytesToRead)));\n\n            return result.cast<int>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"InputStream.read\\\"\");\n    }\n\n    char readByte() override\n    {\n        PYBIND11_OVERRIDE (char, Base, readByte);\n    }\n\n    short readShort() override\n    {\n        PYBIND11_OVERRIDE (short, Base, readShort);\n    }\n\n    short readShortBigEndian() override\n    {\n        PYBIND11_OVERRIDE (short, Base, readShortBigEndian);\n    }\n\n    int readInt() override\n    {\n        PYBIND11_OVERRIDE (int, Base, readInt);\n    }\n\n    int readIntBigEndian() override\n    {\n        PYBIND11_OVERRIDE (int, Base, readIntBigEndian);\n    }\n\n    juce::int64 readInt64() override\n    {\n        PYBIND11_OVERRIDE (juce::int64, Base, readInt64);\n    }\n\n    juce::int64 readInt64BigEndian() override\n    {\n        PYBIND11_OVERRIDE (juce::int64, Base, readInt64BigEndian);\n    }\n\n    float readFloat() override\n    {\n        PYBIND11_OVERRIDE (float, Base, readFloat);\n    }\n\n    float readFloatBigEndian() override\n    {\n        PYBIND11_OVERRIDE (float, Base, readFloatBigEndian);\n    }\n\n    double readDouble() override\n    {\n        PYBIND11_OVERRIDE (double, Base, readDouble);\n    }\n\n    double readDoubleBigEndian() override\n    {\n        PYBIND11_OVERRIDE (double, Base, readDoubleBigEndian);\n    }\n\n    int readCompressedInt() override\n    {\n        PYBIND11_OVERRIDE (int, Base, readCompressedInt);\n    }\n\n    juce::String readNextLine() override\n    {\n        PYBIND11_OVERRIDE (juce::String, Base, readNextLine);\n    }\n\n    juce::String readString() override\n    {\n        PYBIND11_OVERRIDE (juce::String, Base, readString);\n    }\n\n    juce::String readEntireStreamAsString() override\n    {\n        PYBIND11_OVERRIDE (juce::String, Base, readEntireStreamAsString);\n    }\n\n    size_t readIntoMemoryBlock (juce::MemoryBlock& destBlock, ssize_t maxNumBytesToRead) override\n    {\n        PYBIND11_OVERRIDE (size_t, Base, readIntoMemoryBlock, destBlock, maxNumBytesToRead);\n    }\n\n    juce::int64 getPosition() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, getPosition);\n    }\n\n    bool setPosition (juce::int64 newPosition) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, setPosition, newPosition);\n    }\n\n    void skipNextBytes (juce::int64 newPosition) override\n    {\n        PYBIND11_OVERRIDE (void, Base, skipNextBytes, newPosition);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::InputSource>\nstruct PyInputSource : Base\n{\n    using Base::Base;\n\n    juce::InputStream* createInputStream() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::InputStream*, Base, createInputStream);\n    }\n\n    juce::InputStream* createInputStreamFor (const juce::String& relatedItemPath) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::InputStream*, Base, createInputStreamFor, relatedItemPath);\n    }\n\n    juce::int64 hashCode() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, hashCode);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::OutputStream>\nstruct PyOutputStream : Base\n{\nprivate:\n#if JUCE_WINDOWS && ! JUCE_MINGW\n    using ssize_t = juce::pointer_sized_int;\n#endif\n\npublic:\n    using Base::Base;\n\n    void flush() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, flush);\n    }\n\n    bool setPosition (juce::int64 newPosition) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, setPosition, newPosition);\n    }\n\n    juce::int64 getPosition() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::int64, Base, getPosition);\n    }\n\n    bool write (const void* dataToWrite, size_t numberOfBytes) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"write\"); override_)\n        {\n            auto result = override_ (pybind11::memoryview::from_memory (dataToWrite, static_cast<ssize_t> (numberOfBytes)));\n\n            return result.cast<bool>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"OutputStream.write\\\"\");\n    }\n\n    bool writeByte (char value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeByte, value);\n    }\n\n    bool writeBool (bool value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeBool, value);\n    }\n\n    bool writeShort (short value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeShort, value);\n    }\n\n    bool writeShortBigEndian (short value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeShortBigEndian, value);\n    }\n\n    bool writeInt (int value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeInt, value);\n    }\n\n    bool writeIntBigEndian (int value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeIntBigEndian, value);\n    }\n\n    bool writeInt64 (juce::int64 value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeInt64, value);\n    }\n\n    bool writeInt64BigEndian (juce::int64 value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeInt64BigEndian, value);\n    }\n\n    bool writeFloat (float value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeFloat, value);\n    }\n\n    bool writeFloatBigEndian (float value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeFloatBigEndian, value);\n    }\n\n    bool writeDouble (double value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeDouble, value);\n    }\n\n    bool writeDoubleBigEndian (double value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeDoubleBigEndian, value);\n    }\n\n    bool writeRepeatedByte (juce::uint8 byte, size_t numTimesToRepeat) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeRepeatedByte, byte, numTimesToRepeat);\n    }\n\n    bool writeCompressedInt (int value) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeCompressedInt, value);\n    }\n\n    bool writeString (const juce::String& text) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeString, text);\n    }\n\n    bool writeText (const juce::String& text, bool asUTF16, bool writeUTF16ByteOrderMark, const char* lineEndings) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, writeText, text, asUTF16, writeUTF16ByteOrderMark, lineEndings);\n    }\n\n    juce::int64 writeFromInputStream (juce::InputStream& source, juce::int64 maxNumBytesToWrite) override\n    {\n        PYBIND11_OVERRIDE (juce::int64, Base, writeFromInputStream, source, maxNumBytesToWrite);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::FileFilter>\nstruct PyFileFilter : Base\n{\n    using Base::Base;\n\n    bool isFileSuitable (const juce::File& file) const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isFileSuitable, file);\n    }\n\n    bool isDirectorySuitable (const juce::File& file) const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isDirectorySuitable, file);\n    }\n};\n\n// =================================================================================================\n\nstruct PyURLDownloadTaskListener : public juce::URL::DownloadTaskListener\n{\n    void finished (juce::URL::DownloadTask* task, bool success) override\n    {\n        PYBIND11_OVERRIDE_PURE(void, juce::URL::DownloadTaskListener, finished, task, success);\n    }\n\n    void progress (juce::URL::DownloadTask* task, juce::int64 bytesDownloaded, juce::int64 totalLength) override\n    {\n        PYBIND11_OVERRIDE_PURE(void, juce::URL::DownloadTaskListener, progress, task, bytesDownloaded, totalLength);\n    }\n};\n\n// =================================================================================================\n\nstruct PyXmlElementComparator\n{\n    PyXmlElementComparator() = default;\n\n    int compareElements (const juce::XmlElement* first, const juce::XmlElement* second)\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<PyXmlElementComparator*> (this), \"compareElements\"); override_)\n        {\n            auto result = override_ (first, second);\n\n            return result.cast<int>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"XmlElement.Comparator.compareElements\\\"\");\n    }\n};\n\nstruct PyXmlElementCallableComparator\n{\n    explicit PyXmlElementCallableComparator(pybind11::function f)\n        : fn (std::move (f))\n    {\n    }\n\n    int compareElements (const juce::XmlElement* first, const juce::XmlElement* second)\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (fn)\n        {\n            auto result = fn (first, second);\n\n            return result.cast<int>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call function \\\"XmlElement.Comparator.compareElements\\\" without a callable\");\n    }\n\nprivate:\n    pybind11::function fn;\n};\n\n// =================================================================================================\n\nstruct PyHighResolutionTimer : public juce::HighResolutionTimer\n{\n    void hiResTimerCallback() override\n    {\n        PYBIND11_OVERRIDE_PURE(void, juce::HighResolutionTimer, hiResTimerCallback);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class T>\nstruct PyGenericScopedLock\n{\n    PyGenericScopedLock (const T& mutex)\n        : mutex (mutex)\n    {\n    }\n\n    PyGenericScopedLock (const PyGenericScopedLock&) = delete;\n    PyGenericScopedLock (PyGenericScopedLock&&) = default;\n\n    ~PyGenericScopedLock()\n    {\n        exit();\n    }\n\n    void enter()\n    {\n        mutex.enter();\n    }\n\n    void exit()\n    {\n        mutex.exit();\n    }\n\nprivate:\n    const T& mutex;\n};\n\ntemplate <class T>\nstruct PyGenericScopedUnlock\n{\n    PyGenericScopedUnlock (const T& mutex)\n        : mutex (mutex)\n    {\n    }\n\n    PyGenericScopedUnlock (const PyGenericScopedUnlock&) = delete;\n    PyGenericScopedUnlock (PyGenericScopedUnlock&&) = default;\n\n    ~PyGenericScopedUnlock()\n    {\n        exit();\n    }\n\n    void enter()\n    {\n        mutex.exit();\n    }\n\n    void exit()\n    {\n        mutex.enter();\n    }\n\nprivate:\n    const T& mutex;\n};\n\ntemplate <class T>\nstruct PyGenericScopedTryLock\n{\n    PyGenericScopedTryLock (const T& mutex, bool acquireLockOnInitialisation = true)\n        : mutex (mutex)\n        , lockWasSuccessful (acquireLockOnInitialisation && mutex.tryEnter())\n        , acquireLockOnInitialisation (acquireLockOnInitialisation)\n    {\n    }\n\n    PyGenericScopedTryLock (const PyGenericScopedTryLock&) = delete;\n    PyGenericScopedTryLock (PyGenericScopedTryLock&&) = default;\n\n    ~PyGenericScopedTryLock()\n    {\n        exit();\n    }\n\n    bool isLocked() const noexcept\n    {\n        return lockWasSuccessful;\n    }\n\n    bool retryLock() const\n    {\n        lockWasSuccessful = mutex.tryEnter();\n        return lockWasSuccessful;\n    }\n\n    void enter()\n    {\n        if (! acquireLockOnInitialisation)\n            retryLock();\n    }\n\n    void exit()\n    {\n        if (lockWasSuccessful)\n            mutex.exit();\n    }\n\nprivate:\n    const T& mutex;\n    mutable bool lockWasSuccessful;\n    bool acquireLockOnInitialisation;\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Thread>\nstruct PyThread : Base\n{\n    using Base::Base;\n\n    void run() override\n    {\n#if JUCE_PYTHON_THREAD_CATCH_EXCEPTION\n        try\n        {\n#endif\n            PYBIND11_OVERRIDE_PURE (void, Base, run);\n\n#if JUCE_PYTHON_THREAD_CATCH_EXCEPTION\n        }\n        catch (const pybind11::error_already_set& e)\n        {\n            pybind11::gil_scoped_acquire acquire;\n            pybind11::print (\"The \\\"Thread.run\\\" method mustn't throw any exceptions!\");\n            pybind11::module_::import (\"traceback\").attr (\"print_exception\") (e.type(), e.value(), e.trace());\n        }\n        catch (const std::exception& e)\n        {\n            pybind11::gil_scoped_acquire acquire;\n            auto exception = juce::String (\"The \\\"Thread.run\\\" method mustn't throw any exceptions: \") + e.what();\n            pybind11::print (exception);\n        }\n        catch (...)\n        {\n            pybind11::gil_scoped_acquire acquire;\n            auto exception = juce::String (\"The \\\"Thread.run\\\" method mustn't throw any exceptions: Unhandled python exeption\");\n            pybind11::print (exception);\n        }\n#endif\n    }\n};\n\n// =================================================================================================\n\nstruct PyThreadListener : juce::Thread::Listener\n{\n    using juce::Thread::Listener::Listener;\n\n    void exitSignalSent() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Thread::Listener, exitSignalSent);\n    }\n};\n\n// =================================================================================================\n\nstruct PyThreadPoolJob : juce::ThreadPoolJob\n{\n    using juce::ThreadPoolJob::ThreadPoolJob;\n\n    JobStatus runJob() override\n    {\n        PYBIND11_OVERRIDE_PURE (JobStatus, juce::ThreadPoolJob, runJob);\n    }\n};\n\n// =================================================================================================\n\nstruct PyThreadPoolJobSelector : juce::ThreadPool::JobSelector\n{\n    using juce::ThreadPool::JobSelector::JobSelector;\n\n    bool isJobSuitable (juce::ThreadPoolJob* job) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::ThreadPool::JobSelector, isJobSuitable, job);\n    }\n};\n\n// =================================================================================================\n\nstruct PyTimeSliceClient : juce::TimeSliceClient\n{\n    using juce::TimeSliceClient::TimeSliceClient;\n\n    int useTimeSlice() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::TimeSliceClient, useTimeSlice);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceDataStructuresBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceDataStructuresBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <functional>\n#include <string_view>\n#include <typeinfo>\n#include <tuple>\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// =================================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerCachedValue (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"CachedValue\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueTree&, const Identifier&, UndoManager*>(),\n                \"tree\"_a.none(false), \"propertyID\"_a.none(false), \"undoManager\"_a)\n            .def (py::init<ValueTree&, const Identifier&, UndoManager*, const ValueType&>(),\n                \"tree\"_a.none(false), \"propertyID\"_a.none(false), \"undoManager\"_a, \"defaultToUse\"_a.none(false))\n            .def (\"get\", &T::get)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"getPropertyAsValue\", &T::getPropertyAsValue)\n            .def (\"isUsingDefault\", &T::isUsingDefault)\n            .def (\"getDefault\", &T::getDefault)\n            .def (\"setValue\", &T::setValue)\n            .def (\"resetToDefault\", py::overload_cast<> (&T::resetToDefault))\n            .def (\"resetToDefault\", py::overload_cast<UndoManager*> (&T::resetToDefault))\n            .def (\"setDefault\", &T::setDefault)\n            .def (\"referTo\", py::overload_cast<ValueTree&, const Identifier&, UndoManager*> (&T::referTo),\n                \"tree\"_a.none(false), \"propertyID\"_a.none(false), \"undoManager\"_a)\n            .def (\"referTo\", py::overload_cast<ValueTree&, const Identifier&, UndoManager*, const ValueType&> (&T::referTo),\n                \"tree\"_a.none(false), \"propertyID\"_a.none(false), \"undoManager\"_a, \"defaultToUse\"_a.none(false))\n            .def (\"forceUpdateOfCachedValue\", &T::forceUpdateOfCachedValue)\n            .def (\"getValueTree\", &T::getValueTree, py::return_value_policy::reference)\n            .def (\"getPropertyID\", &T::getPropertyID, py::return_value_policy::reference)\n            .def (\"getUndoManager\", &T::getUndoManager, py::return_value_policy::reference)\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"CachedValue\", type);\n}\n\nvoid registerJuceDataStructuresBindings (py::module_& m)\n{\n    // ============================================================================================ juce::UndoableAction\n\n    py::class_<UndoableAction, PyUndoableAction> classUndoableAction (m, \"UndoableAction\");\n\n    classUndoableAction\n        .def (py::init<>())\n        .def (\"perform\", &UndoableAction::perform)\n        .def (\"undo\", &UndoableAction::undo)\n        .def (\"getSizeInUnits\", &UndoableAction::getSizeInUnits)\n        .def (\"createCoalescedAction\", &UndoableAction::createCoalescedAction)\n    ;\n\n    // ============================================================================================ juce::UndoManager\n\n    py::class_<UndoManager> classUndoManager (m, \"UndoManager\");\n\n    classUndoManager\n        .def (py::init<int, int>(), \"maxNumberOfUnitsToKeep\"_a = 30000, \"minimumTransactionsToKeep\"_a = 30)\n        .def (\"clearUndoHistory\", &UndoManager::clearUndoHistory)\n        .def (\"getNumberOfUnitsTakenUpByStoredCommands\", &UndoManager::getNumberOfUnitsTakenUpByStoredCommands)\n        .def (\"setMaxNumberOfStoredUnits\", &UndoManager::setMaxNumberOfStoredUnits)\n        .def (\"perform\", [](UndoManager& self, py::object action)\n        {\n            auto pyActionPtr = action.cast<PyUndoableAction*>();\n            if (pyActionPtr->isOwnershipTaken())\n                py::pybind11_fail (\"Ownership of the action has already been taken by an UndoManager\");\n\n            auto actionPtr = action.cast<UndoableAction*>();\n            pyActionPtr->markOwnershipTaken();\n            action.release();\n\n            return self.perform (actionPtr);\n        })\n        .def (\"perform\", [](UndoManager& self, py::object action, const String& transactionName)\n        {\n            auto pyActionPtr = action.cast<PyUndoableAction*>();\n            if (pyActionPtr->isOwnershipTaken())\n                py::pybind11_fail (\"Ownership of the action has already been taken by an UndoManager\");\n\n            auto actionPtr = action.cast<UndoableAction*>();\n            pyActionPtr->markOwnershipTaken();\n            action.release();\n\n            return self.perform (actionPtr, transactionName);\n        })\n        .def (\"beginNewTransaction\", py::overload_cast<> (&UndoManager::beginNewTransaction))\n        .def (\"beginNewTransaction\", py::overload_cast<const String&> (&UndoManager::beginNewTransaction))\n        .def (\"setCurrentTransactionName\", &UndoManager::setCurrentTransactionName)\n        .def (\"getCurrentTransactionName\", &UndoManager::getCurrentTransactionName)\n        .def (\"canUndo\", &UndoManager::canUndo)\n        .def (\"undo\", &UndoManager::undo)\n        .def (\"undoCurrentTransactionOnly\", &UndoManager::undoCurrentTransactionOnly)\n        .def (\"getUndoDescription\", &UndoManager::getUndoDescription)\n        .def (\"getUndoDescriptions\", &UndoManager::getUndoDescriptions)\n        .def (\"getTimeOfUndoTransaction\", &UndoManager::getTimeOfUndoTransaction)\n        .def (\"getActionsInCurrentTransaction\", [](const UndoManager& self)\n        {\n            Array<const UndoableAction*> actions;\n            self.getActionsInCurrentTransaction (actions);\n\n            py::list list;\n            for (const auto* action : actions)\n                list.append (action);\n\n            return list;\n        }, py::return_value_policy::reference_internal)\n        .def (\"getNumActionsInCurrentTransaction\", &UndoManager::getNumActionsInCurrentTransaction)\n        .def (\"canRedo\", &UndoManager::canRedo)\n        .def (\"redo\", &UndoManager::redo)\n        .def (\"getRedoDescription\", &UndoManager::getRedoDescription)\n        .def (\"getRedoDescriptions\", &UndoManager::getRedoDescriptions)\n        .def (\"getTimeOfRedoTransaction\", &UndoManager::getTimeOfRedoTransaction)\n        .def (\"isPerformingUndoRedo\", &UndoManager::isPerformingUndoRedo)\n    ;\n\n    // ============================================================================================ juce::Value\n\n    py::class_<Value> classValue (m, \"Value\");\n    py::class_<Value::ValueSource, ReferenceCountedObjectPtr<Value::ValueSource>, PyValueValueSource> classValueValueSource (classValue, \"ValueSource\");\n    py::class_<Value::Listener, PyValueListener> classValueListener (classValue, \"Listener\");\n\n    classValue\n        .def (py::init<>())\n        .def (py::init<Value::ValueSource*>())\n        .def (py::init<const var&>())\n        .def (py::init<const Value&>())\n        .def (\"getValue\", &Value::getValue)\n        .def (\"toString\", &Value::toString)\n        .def (\"setValue\", &Value::setValue)\n        .def (\"referTo\", &Value::referTo)\n        .def (\"refersToSameSourceAs\", &Value::refersToSameSourceAs)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"addListener\", &Value::addListener)\n        .def (\"removeListener\", &Value::removeListener)\n        .def (\"getValueSource\", &Value::getValueSource, py::return_value_policy::reference)\n        // Custom\n        .def (\"asVar\", [](const Value& self) { return static_cast<var> (self); })\n    ;\n\n    classValueValueSource\n        .def (py::init([] { return ReferenceCountedObjectPtr<Value::ValueSource> (new PyValueValueSource()); }))\n        .def (\"getValue\", &Value::ValueSource::getValue)\n        .def (\"setValue\", &Value::ValueSource::setValue)\n        .def (\"sendChangeMessage\", &Value::ValueSource::sendChangeMessage)\n    ;\n\n    classValueListener\n        .def (py::init<>())\n        .def (\"valueChanged\", &Value::Listener::valueChanged)\n    ;\n\n    // ============================================================================================ juce::ValueTree\n\n    py::class_<ValueTree> classValueTree (m, \"ValueTree\");\n    py::class_<ValueTree::Listener, PyValueTreeListener> classValueTreeListener (classValueTree, \"Listener\");\n    py::class_<PyValueTreeComparator> classValueTreeComparator (classValueTree, \"Comparator\");\n\n    classValueTreeListener.def (py::init<>());\n\n    classValueTreeComparator\n        .def (py::init<>())\n        .def (\"compareElements\", &PyValueTreeComparator::compareElements)\n    ;\n\n    classValueTree\n        .def (py::init<>())\n        .def (py::init<const Identifier&>(), \"type\"_a)\n        .def (py::init ([](const String& type) { return ValueTree (type); }), \"type\"_a)\n        .def (py::init ([](py::str type, py::dict dict)\n        {\n            auto result = ValueTree (Identifier (static_cast<std::string> (type)));\n\n            for (auto item : dict)\n            {\n                py::detail::make_caster<Identifier> convKey;\n                py::detail::make_caster<var> convValue;\n\n                if (! convKey.load (item.first, true))\n                    py::pybind11_fail(\"Invalid property type of a \\\"ValueTree\\\", needs to be \\\"str\\\" or \\\"Identifier\\\"\");\n\n                if (! convValue.load (item.second, true))\n                    py::pybind11_fail(\"Invalid property type of a \\\"ValueTree\\\", needs to be a \\\"var\\\" convertible\");\n\n                result.setProperty (\n                    py::detail::cast_op<juce::Identifier&&> (std::move (convKey)),\n                    py::detail::cast_op<juce::var&&> (std::move (convValue)),\n                    nullptr);\n            }\n\n            return result;\n        }), \"type\"_a, \"dictionary\"_a)\n        .def (py::init<const ValueTree&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"isEquivalentTo\", &ValueTree::isEquivalentTo)\n        .def (\"isValid\", &ValueTree::isValid)\n        .def (\"createCopy\", &ValueTree::createCopy)\n        .def (\"copyPropertiesFrom\", &ValueTree::copyPropertiesFrom, \"source\"_a, \"undoManager\"_a)\n        .def (\"copyPropertiesAndChildrenFrom\", &ValueTree::copyPropertiesAndChildrenFrom, \"source\"_a, \"undoManager\"_a)\n        .def (\"getType\", &ValueTree::getType)\n        .def (\"hasType\", &ValueTree::hasType, \"typeName\"_a)\n        .def (\"hasType\", [](const ValueTree& self, const String& type) { return self.hasType (type); }, \"typeName\"_a)\n        .def (\"getProperty\", py::overload_cast<const Identifier&> (&ValueTree::getProperty, py::const_), \"name\"_a, py::return_value_policy::reference)\n        .def (\"getProperty\", [](const ValueTree& self, const String& name) { return self.getProperty (name); }, \"name\"_a, py::return_value_policy::reference)\n        .def (\"getProperty\", py::overload_cast<const Identifier&, const var&> (&ValueTree::getProperty, py::const_), \"name\"_a, \"defaultReturnValue\"_a, py::return_value_policy::reference)\n        .def (\"getProperty\", [](const ValueTree& self, const String& name, const var& defaultReturnValue) { return self.getProperty (name, defaultReturnValue); }, \"name\"_a, \"defaultReturnValue\"_a, py::return_value_policy::reference)\n        .def (\"__getitem__\", [](const ValueTree& self, const Identifier& name) { return self[name]; })\n        .def (\"__getitem__\", [](const ValueTree& self, const String& name) { return self[name]; })\n        .def (\"setProperty\", &ValueTree::setProperty, \"name\"_a, \"newValue\"_a, \"undoManager\"_a, py::return_value_policy::reference)\n        .def (\"setProperty\", [](ValueTree& self, const String& name, const var& newValue, UndoManager* undoManager) { return self.setProperty (name, newValue, undoManager); }, \"name\"_a, \"newValue\"_a, \"undoManager\"_a, py::return_value_policy::reference)\n        .def (\"hasProperty\", &ValueTree::hasProperty, \"name\"_a)\n        .def (\"hasProperty\", [](const ValueTree& self, const String& name) { return self.hasProperty (name); }, \"name\"_a)\n        .def (\"removeProperty\", &ValueTree::removeProperty, \"name\"_a, \"undoManager\"_a)\n        .def (\"removeProperty\", [](ValueTree& self, const String& name, UndoManager* undoManager) { self.removeProperty (name, undoManager); }, \"name\"_a, \"undoManager\"_a)\n        .def (\"removeAllProperties\", &ValueTree::removeAllProperties, \"undoManager\"_a)\n        .def (\"getNumProperties\", &ValueTree::getNumProperties)\n        .def (\"getPropertyName\", &ValueTree::getPropertyName, \"index\"_a)\n        .def (\"getPropertyAsValue\", &ValueTree::getPropertyAsValue, \"name\"_a, \"undoManager\"_a, \"shouldUpdateSynchronously\"_a = false)\n        .def (\"getNumChildren\", &ValueTree::getNumChildren)\n        .def (\"getChild\", &ValueTree::getChild, \"index\"_a)\n        .def (\"getChildWithName\", &ValueTree::getChildWithName, \"type\"_a)\n        .def (\"getChildWithName\", [](const ValueTree& self, const String& name) { return self.getChildWithName (name); }, \"type\"_a)\n        .def (\"getOrCreateChildWithName\", &ValueTree::getOrCreateChildWithName, \"type\"_a, \"undoManager\"_a)\n        .def (\"getOrCreateChildWithName\", [](ValueTree& self, const String& name, UndoManager* undoManager) { return self.getOrCreateChildWithName (name, undoManager); }, \"type\"_a, \"undoManager\"_a)\n        .def (\"getChildWithProperty\", &ValueTree::getChildWithProperty, \"propertyName\"_a, \"propertyValue\"_a)\n        .def (\"getChildWithProperty\", [](const ValueTree& self, const String& propertyName, const var& propertyValue) { return self.getChildWithProperty (propertyName, propertyValue); }, \"propertyName\"_a, \"propertyValue\"_a)\n        .def (\"addChild\", &ValueTree::addChild, \"child\"_a, \"index\"_a, \"undoManager\"_a)\n        .def (\"appendChild\", &ValueTree::appendChild, \"child\"_a, \"undoManager\"_a)\n        .def (\"removeChild\", py::overload_cast<const ValueTree&, UndoManager*> (&ValueTree::removeChild), \"child\"_a, \"undoManager\"_a)\n        .def (\"removeChild\", py::overload_cast<int, UndoManager*> (&ValueTree::removeChild), \"childIndex\"_a, \"undoManager\"_a)\n        .def (\"removeAllChildren\", &ValueTree::removeAllChildren, \"undoManager\"_a)\n        .def (\"moveChild\", &ValueTree::moveChild, \"currentIndex\"_a, \"newIndex\"_a, \"undoManager\"_a)\n        .def (\"isAChildOf\", &ValueTree::isAChildOf, \"possibleParent\"_a)\n        .def (\"indexOf\", &ValueTree::indexOf, \"child\"_a)\n        .def (\"getParent\", &ValueTree::getParent)\n        .def (\"getRoot\", &ValueTree::getRoot)\n        .def (\"getSibling\", &ValueTree::getSibling, \"delta\"_a)\n        .def (\"__iter__\", [](const ValueTree& self) { return py::make_iterator (self.begin(), self.end()); }, py::keep_alive<0, 1>())\n        .def (\"createXml\", &ValueTree::createXml)\n        .def_static (\"fromXml\", static_cast<ValueTree (*)(const XmlElement&)> (&ValueTree::fromXml), \"xml\"_a)\n        .def_static (\"fromXml\", static_cast<ValueTree (*)(const String&)> (&ValueTree::fromXml), \"xmlText\"_a)\n        .def (\"toXmlString\", &ValueTree::toXmlString, \"format\"_a = XmlElement::TextFormat())\n        .def (\"writeToStream\", &ValueTree::writeToStream, \"output\"_a)\n        .def_static (\"readFromStream\", &ValueTree::readFromStream, \"input\"_a)\n        .def_static (\"readFromData\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return ValueTree::readFromData (info.ptr, static_cast<size_t> (info.size));\n        }, \"data\"_a)\n        .def_static (\"readFromGZIPData\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return ValueTree::readFromGZIPData (info.ptr, static_cast<size_t> (info.size));\n        }, \"data\"_a)\n        .def (\"addListener\", &ValueTree::addListener, \"listener\"_a)\n        .def (\"removeListener\", &ValueTree::removeListener, \"listener\"_a)\n        .def (\"setPropertyExcludingListener\", &ValueTree::setPropertyExcludingListener,\n            \"listenerToExclude\"_a, \"name\"_a, \"newValue\"_a, \"undoManager\"_a, py::return_value_policy::reference)\n        .def (\"sendPropertyChangeMessage\", &ValueTree::sendPropertyChangeMessage, \"property\"_a)\n        .def (\"sendPropertyChangeMessage\", [](ValueTree& self, const String& property) { self.sendPropertyChangeMessage (property); }, \"property\"_a)\n        .def (\"sort\", &ValueTree::template sort<PyValueTreeComparator>,\n            \"comparator\"_a, \"undoManager\"_a, \"retainOrderOfEquivalentItems\"_a)\n        .def (\"getReferenceCount\", &ValueTree::getReferenceCount)\n    ;\n\n    // ============================================================================================ juce::CachedValue\n\n    registerCachedValue<CachedValue, bool, int, float, String> (m);\n\n    // ============================================================================================ juce::ValueTreeSynchroniser\n\n    py::class_<ValueTreeSynchroniser, PyValueTreeSynchroniser> classValueTreeSynchroniser (m, \"ValueTreeSynchroniser\");\n\n    classValueTreeSynchroniser\n        .def (py::init<const ValueTree&>())\n        .def (\"stateChanged\", popsicle::Helpers::makeVoidPointerAndSizeCallable<ValueTreeSynchroniser> (&ValueTreeSynchroniser::stateChanged))\n        .def (\"sendFullSyncCallback\", &ValueTreeSynchroniser::sendFullSyncCallback)\n        .def_static (\"applyChange\", [](ValueTree& root, py::buffer data, UndoManager* undoManager)\n        {\n            auto info = data.request();\n            return ValueTreeSynchroniser::applyChange (root, info.ptr, static_cast<size_t> (info.size), undoManager);\n        }, \"root\"_a, \"data\"_a, \"undoManager\"_a)\n        .def (\"getRoot\", &ValueTreeSynchroniser::getRoot, py::return_value_policy::reference)\n    ;\n\n    // ============================================================================================ juce::ValueTreeSynchroniser\n\n    py::class_<ValueTreePropertyWithDefault> classValueTreePropertyWithDefault (m, \"ValueTreePropertyWithDefault\");\n\n    classValueTreePropertyWithDefault\n        .def (py::init<>())\n        .def (py::init<ValueTree&, const Identifier&, UndoManager*>())\n        .def (py::init<ValueTree&, const Identifier&, UndoManager*, var>())\n        .def (py::init<ValueTree&, const Identifier&, UndoManager*, var, StringRef>())\n        .def (\"get\", &ValueTreePropertyWithDefault::get)\n        .def (\"getPropertyAsValue\", &ValueTreePropertyWithDefault::getPropertyAsValue)\n        .def (\"getDefault\", &ValueTreePropertyWithDefault::getDefault)\n        .def (\"setDefault\", &ValueTreePropertyWithDefault::setDefault)\n        .def (\"isUsingDefault\", &ValueTreePropertyWithDefault::isUsingDefault)\n        .def (\"resetToDefault\", &ValueTreePropertyWithDefault::resetToDefault)\n        .def_readwrite (\"onDefaultChange\", &ValueTreePropertyWithDefault::onDefaultChange)\n        .def (\"setValue\", &ValueTreePropertyWithDefault::setValue)\n        .def (\"referTo\", py::overload_cast<ValueTree, const Identifier&, UndoManager*> (&ValueTreePropertyWithDefault::referTo))\n        .def (\"referTo\", py::overload_cast<ValueTree, const Identifier&, UndoManager*, var> (&ValueTreePropertyWithDefault::referTo))\n        .def (\"referTo\", py::overload_cast<ValueTree, const Identifier&, UndoManager*, var, StringRef> (&ValueTreePropertyWithDefault::referTo))\n        .def (\"getValueTree\", &ValueTreePropertyWithDefault::getValueTree, py::return_value_policy::reference)\n        .def (\"getPropertyID\", &ValueTreePropertyWithDefault::getPropertyID, py::return_value_policy::reference)\n        .def (\"getUndoManager\", &ValueTreePropertyWithDefault::getUndoManager, py::return_value_policy::reference)\n    ;\n\n    // ============================================================================================ juce::PropertiesFile\n\n    py::class_<PropertiesFile, PropertySet, ChangeBroadcaster> classPropertiesFile (m, \"PropertiesFile\");\n\n    py::enum_<PropertiesFile::StorageFormat> (classPropertiesFile, \"StorageFormat\")\n        .value (\"storeAsBinary\", PropertiesFile::StorageFormat::storeAsBinary)\n        .value (\"storeAsCompressedBinary\", PropertiesFile::StorageFormat::storeAsCompressedBinary)\n        .value (\"storeAsXML\", PropertiesFile::StorageFormat::storeAsXML)\n        .export_values();\n\n    py::class_<PropertiesFile::Options> classPropertiesFileOptions (classPropertiesFile, \"Options\");\n\n    classPropertiesFileOptions\n        .def (py::init<>())\n        .def_readwrite (\"applicationName\", &PropertiesFile::Options::applicationName)\n        .def_readwrite (\"filenameSuffix\", &PropertiesFile::Options::filenameSuffix)\n        .def_readwrite (\"folderName\", &PropertiesFile::Options::folderName)\n        .def_readwrite (\"osxLibrarySubFolder\", &PropertiesFile::Options::osxLibrarySubFolder)\n        .def_readwrite (\"commonToAllUsers\", &PropertiesFile::Options::commonToAllUsers)\n        .def_readwrite (\"ignoreCaseOfKeyNames\", &PropertiesFile::Options::ignoreCaseOfKeyNames)\n        .def_readwrite (\"doNotSave\", &PropertiesFile::Options::doNotSave)\n        .def_readwrite (\"millisecondsBeforeSaving\", &PropertiesFile::Options::millisecondsBeforeSaving)\n        .def_readwrite (\"storageFormat\", &PropertiesFile::Options::storageFormat)\n        .def_readwrite (\"processLock\", &PropertiesFile::Options::processLock)\n        .def (\"getDefaultFile\", &PropertiesFile::Options::getDefaultFile)\n    ;\n\n    classPropertiesFile\n        .def (py::init<const PropertiesFile::Options&>())\n        .def (py::init<const File&, const PropertiesFile::Options&>())\n        .def (\"isValidFile\", &PropertiesFile::isValidFile)\n        .def (\"saveIfNeeded\", &PropertiesFile::saveIfNeeded)\n        .def (\"save\", &PropertiesFile::save)\n        .def (\"needsToBeSaved\", &PropertiesFile::needsToBeSaved)\n        .def (\"setNeedsToBeSaved\", &PropertiesFile::setNeedsToBeSaved)\n        .def (\"reload\", &PropertiesFile::reload)\n        .def (\"getFile\", &PropertiesFile::getFile)\n    ;\n\n    // ============================================================================================ juce::ApplicationProperties\n\n    py::class_<ApplicationProperties> classApplicationProperties (m, \"ApplicationProperties\");\n\n    classApplicationProperties\n        .def (py::init<>())\n        .def (\"setStorageParameters\", &ApplicationProperties::setStorageParameters)\n        .def (\"getStorageParameters\", &ApplicationProperties::getStorageParameters)\n        .def (\"getUserSettings\", &ApplicationProperties::getUserSettings, py::return_value_policy::reference)\n        .def (\"getCommonSettings\", &ApplicationProperties::getCommonSettings, py::return_value_policy::reference)\n        .def (\"saveIfNeeded\", &ApplicationProperties::saveIfNeeded)\n        .def (\"closeFiles\", &ApplicationProperties::closeFiles)\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceDataStructuresBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_data_structures\n #error This binding file requires adding the juce_data_structures module in the project\n#else\n #include <juce_data_structures/juce_data_structures.h>\n#endif\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <cstddef>\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceDataStructuresBindings (pybind11::module_& m);\n\n// =================================================================================================\n\nstruct PyUndoableAction : public juce::UndoableAction\n{\n    using juce::UndoableAction::UndoableAction;\n\n    bool perform() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::UndoableAction, perform);\n    }\n\n    bool undo() override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::UndoableAction, undo);\n    }\n\n    int getSizeInUnits() override\n    {\n        PYBIND11_OVERRIDE (int, juce::UndoableAction, getSizeInUnits);\n    }\n\n    juce::UndoableAction* createCoalescedAction (juce::UndoableAction* nextAction) override\n    {\n        PYBIND11_OVERRIDE (juce::UndoableAction*, juce::UndoableAction, createCoalescedAction, nextAction);\n    }\n\n    bool isOwnershipTaken() const noexcept\n    {\n        return takenOwnership;\n    }\n\n    void markOwnershipTaken() noexcept\n    {\n        takenOwnership = true;\n    }\n\nprivate:\n    bool takenOwnership = false;\n};\n\n// =================================================================================================\n\nstruct PyValueValueSource : public juce::Value::ValueSource\n{\n    using juce::Value::ValueSource::ValueSource;\n\n    juce::var getValue () const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::var, juce::Value::ValueSource, getValue);\n    }\n\n    void setValue (const juce::var& newValue) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Value::ValueSource, setValue, newValue);\n    }\n};\n\n// =================================================================================================\n\nstruct PyValueListener : public juce::Value::Listener\n{\n    using juce::Value::Listener::Listener;\n\n    void valueChanged (juce::Value& value) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Value::Listener, valueChanged, value);\n    }\n};\n\n// =================================================================================================\n\nstruct PyValueTreeListener : public juce::ValueTree::Listener\n{\n    using juce::ValueTree::Listener::Listener;\n\n    void valueTreePropertyChanged (juce::ValueTree& treeWhosePropertyHasChanged, const juce::Identifier& property) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreePropertyChanged, treeWhosePropertyHasChanged, property);\n    }\n\n    void valueTreeChildAdded (juce::ValueTree& parentTree, juce::ValueTree& childWhichHasBeenAdded) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreeChildAdded, parentTree, childWhichHasBeenAdded);\n    }\n\n    void valueTreeChildRemoved (juce::ValueTree& parentTree, juce::ValueTree& childWhichHasBeenRemoved, int indexFromWhichChildWasRemoved) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreeChildRemoved, parentTree, childWhichHasBeenRemoved, indexFromWhichChildWasRemoved);\n    }\n\n    void valueTreeChildOrderChanged (juce::ValueTree& parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreeChildOrderChanged, parentTreeWhoseChildrenHaveMoved, oldIndex, newIndex);\n    }\n\n    void valueTreeParentChanged (juce::ValueTree& treeWhoseParentHasChanged) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreeParentChanged, treeWhoseParentHasChanged);\n    }\n\n    void valueTreeRedirected (juce::ValueTree& treeWhichHasBeenChanged) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ValueTree::Listener, valueTreeRedirected, treeWhichHasBeenChanged);\n    }\n};\n\n// =================================================================================================\n\nstruct PyValueTreeComparator\n{\n    PyValueTreeComparator() = default;\n\n    int compareElements (const juce::ValueTree& first, const juce::ValueTree& second)\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<PyValueTreeComparator*> (this), \"compareElements\"); override_)\n        {\n            auto result = override_ (first, second);\n\n            return result.cast<int>();\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"ValueTree::Comparator::compareElements\\\"\");\n    }\n};\n\n// =================================================================================================\n\nstruct PyValueTreeSynchroniser : public juce::ValueTreeSynchroniser\n{\n    using juce::ValueTreeSynchroniser::ValueTreeSynchroniser;\n\n    void stateChanged (const void* encodedChange, size_t encodedChangeSize) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<juce::ValueTreeSynchroniser*> (this), \"stateChanged\"); override_)\n        {\n            auto change = pybind11::memoryview::from_memory (encodedChange, static_cast<Py_ssize_t> (encodedChangeSize));\n\n            override_ (change);\n\n            return;\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"ValueTreeSynchroniser::stateChanged\\\"\");\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceEventsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceCoreBindings.h\"\n#include \"ScriptJuceEventsBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <atomic>\n#include <functional>\n\n// =================================================================================================\n\nnamespace juce {\n\n#if JUCE_MAC\n extern void initialiseNSApplication();\n#endif\n\n} // namespace juce\n\n// =================================================================================================\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\nvoid registerJuceEventsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::NotificationType\n\n    py::enum_<NotificationType> (m, \"NotificationType\")\n        .value (\"dontSendNotification\", NotificationType::dontSendNotification)\n        .value (\"sendNotification\", NotificationType::sendNotification)\n        .value (\"sendNotificationSync\", NotificationType::sendNotificationSync)\n        .value (\"sendNotificationAsync\", NotificationType::sendNotificationAsync)\n        .export_values();\n\n    // ============================================================================================ juce::ActionListener\n\n    py::class_<ActionListener, PyActionListener> classActionListener (m, \"ActionListener\");\n\n    classActionListener\n        .def (py::init<>())\n        .def (\"actionListenerCallback\", &ActionListener::actionListenerCallback)\n    ;\n\n    // ============================================================================================ juce::ActionBroadcaster\n\n    py::class_<ActionBroadcaster> classActionBroadcaster (m, \"ActionBroadcaster\");\n\n    classActionBroadcaster\n        .def (py::init<>())\n        .def (\"addActionListener\", &ActionBroadcaster::addActionListener)\n        .def (\"removeActionListener\", &ActionBroadcaster::removeActionListener)\n        .def (\"removeAllActionListeners\", &ActionBroadcaster::removeAllActionListeners)\n        .def (\"sendActionMessage\", &ActionBroadcaster::sendActionMessage)\n    ;\n\n    // ============================================================================================ juce::AsyncUpdater\n\n    py::class_<AsyncUpdater, PyAsyncUpdater> classAsyncUpdater (m, \"AsyncUpdater\");\n\n    classAsyncUpdater\n        .def (py::init<>())\n        .def (\"handleAsyncUpdate\", &AsyncUpdater::handleAsyncUpdate)\n        .def (\"triggerAsyncUpdate\", &AsyncUpdater::triggerAsyncUpdate)\n        .def (\"cancelPendingUpdate\", &AsyncUpdater::cancelPendingUpdate)\n        .def (\"handleUpdateNowIfNeeded\", &AsyncUpdater::handleUpdateNowIfNeeded)\n        .def (\"isUpdatePending\", &AsyncUpdater::isUpdatePending)\n    ;\n\n    // ============================================================================================ juce::LockingAsyncUpdater\n\n    py::class_<LockingAsyncUpdater> classLockingAsyncUpdater (m, \"LockingAsyncUpdater\");\n\n    classLockingAsyncUpdater\n        .def (py::init<std::function<void()>>())\n        .def (\"triggerAsyncUpdate\", &LockingAsyncUpdater::triggerAsyncUpdate)\n        .def (\"cancelPendingUpdate\", &LockingAsyncUpdater::cancelPendingUpdate)\n        .def (\"handleUpdateNowIfNeeded\", &LockingAsyncUpdater::handleUpdateNowIfNeeded)\n        .def (\"isUpdatePending\", &LockingAsyncUpdater::isUpdatePending)\n    ;\n\n    // ============================================================================================ juce::AsyncUpdater\n\n    py::class_<ChangeListener, PyChangeListener> classChangeListener (m, \"ChangeListener\");\n\n    classChangeListener\n        .def (py::init<>())\n        .def (\"changeListenerCallback\", &ChangeListener::changeListenerCallback)\n    ;\n\n    py::class_<ChangeBroadcaster> classChangeBroadcaster (m, \"ChangeBroadcaster\");\n\n    classChangeBroadcaster\n        .def (py::init<>())\n        .def (\"addChangeListener\", &ChangeBroadcaster::addChangeListener)\n        .def (\"removeChangeListener\", &ChangeBroadcaster::removeChangeListener)\n        .def (\"removeAllChangeListeners\", &ChangeBroadcaster::removeAllChangeListeners)\n        .def (\"sendChangeMessage\", &ChangeBroadcaster::sendChangeMessage)\n        .def (\"sendSynchronousChangeMessage\", &ChangeBroadcaster::sendSynchronousChangeMessage)\n        .def (\"dispatchPendingMessages\", &ChangeBroadcaster::dispatchPendingMessages)\n    ;\n\n    // ============================================================================================ juce::MessageManager\n\n    py::class_<MessageManager> classMessageManager (m, \"MessageManager\");\n\n    py::class_<MessageManager::MessageBase, PyMessageBase<>> classMessageManagerMessageBase (classMessageManager, \"MessageBase\");\n\n    py::class_<MessageManager::Lock> classMessageManagerInnerLock (classMessageManager, \"Lock\");\n\n    classMessageManagerMessageBase\n        .def (py::init<>())\n        .def (\"messageCallback\", &MessageManager::MessageBase::messageCallback)\n        .def (\"post\", [](py::object self) { return self.release().cast<MessageManager::MessageBase*>()->post(); })\n    ;\n\n    classMessageManagerInnerLock\n        .def (py::init<>())\n        .def (\"enter\", &MessageManager::Lock::enter)\n        .def (\"tryEnter\", &MessageManager::Lock::tryEnter)\n        .def (\"exit\", &MessageManager::Lock::exit)\n        .def (\"abort\", &MessageManager::Lock::abort)\n    ;\n\n    classMessageManager\n        .def_static (\"getInstance\", &MessageManager::getInstance, py::return_value_policy::reference)\n        .def_static (\"getInstanceWithoutCreating\", &MessageManager::getInstanceWithoutCreating, py::return_value_policy::reference)\n        .def_static (\"deleteInstance\", &MessageManager::deleteInstance)\n        .def (\"runDispatchLoop\", &MessageManager::runDispatchLoop)\n        .def (\"stopDispatchLoop\", &MessageManager::stopDispatchLoop)\n        .def (\"hasStopMessageBeenSent\", &MessageManager::hasStopMessageBeenSent)\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def (\"runDispatchLoopUntil\", &MessageManager::runDispatchLoopUntil)\n#endif\n        .def_static (\"callAsync\", &MessageManager::callAsync)\n        .def (\"callFunctionOnMessageThread\", [](MessageManager& self, py::function func) -> py::object\n        {\n            void* result = nullptr;\n\n            if (func.is_none())\n                py::pybind11_fail (\"Invalid specified function to \\\"MessageManager::callFunctionOnMessageThread\\\"\");\n\n            {\n                py::gil_scoped_release release;\n\n                result = self.callFunctionOnMessageThread (+[](void* data) -> void*\n                {\n                    py::gil_scoped_acquire acquire;\n\n                    auto func = *reinterpret_cast<py::function*> (data);\n\n                    return func().ptr();\n                }, std::addressof (func));\n            }\n\n            if (result == nullptr)\n                return py::none();\n\n            return py::reinterpret_borrow<py::object> (reinterpret_cast<PyObject*> (result));\n        })\n        .def (\"isThisTheMessageThread\", &MessageManager::isThisTheMessageThread)\n        .def (\"setCurrentThreadAsMessageThread\", &MessageManager::setCurrentThreadAsMessageThread)\n        .def (\"getCurrentMessageThread\", [](const MessageManager& self) { return PyThreadID (self.getCurrentMessageThread()); })\n        .def (\"currentThreadHasLockedMessageManager\", &MessageManager::currentThreadHasLockedMessageManager)\n        .def_static (\"existsAndIsLockedByCurrentThread\", &MessageManager::existsAndIsLockedByCurrentThread)\n        .def_static (\"existsAndIsCurrentThread\", &MessageManager::existsAndIsCurrentThread)\n        .def_static (\"broadcastMessage\", &MessageManager::broadcastMessage)\n        .def (\"registerBroadcastListener\", &MessageManager::registerBroadcastListener)\n        .def (\"deregisterBroadcastListener\", &MessageManager::deregisterBroadcastListener)\n        .def (\"deliverBroadcastMessage\", &MessageManager::deliverBroadcastMessage)\n    ;\n\n    // ============================================================================================ juce::Message\n\n    py::class_<Message, MessageManager::MessageBase, PyMessageBase<Message>> classMessage (m, \"Message\");\n\n    classMessage\n        .def (py::init<>())\n    ;\n\n    py::class_<CallbackMessage, MessageManager::MessageBase, PyCallbackMessage<>> classCallbackMessage (classMessageManager, \"CallbackMessage\");\n\n    classCallbackMessage\n        .def (py::init<>())\n        .def (\"messageCallback\", &CallbackMessage::messageCallback)\n    ;\n\n    // ============================================================================================ juce::Message\n\n    py::class_<MessageListener, PyMessageListener> classMessageListener (m, \"MessageListener\");\n\n    classMessageListener\n        .def (py::init<>())\n        .def (\"handleMessage\", &MessageListener::handleMessage)\n        .def (\"postMessage\", [](MessageListener& self, py::object message)\n        {\n            if (message.is_none() || ! py::isinstance<Message> (message))\n                py::pybind11_fail (\"Invalid specified message type in \\\"MessageListener::postMessage\\\"\");\n\n            return self.postMessage (message.release().cast<Message*>());\n        }, \"message\"_a)\n    ;\n\n    // ============================================================================================ juce::MessageManagerLock\n\n    py::class_<PyMessageManagerLock> classMessageManagerLock (m, \"MessageManagerLock\");\n\n    classMessageManagerLock\n        .def (py::init<Thread*>(), \"threadToCheckForExitSignal\"_a = nullptr)\n        .def (py::init<ThreadPoolJob*>())\n        .def (\"__enter__\", [](PyMessageManagerLock& self)\n        {\n            if (self.thread != nullptr)\n                self.state.emplace<MessageManagerLock> (self.thread);\n\n            else if (self.threadPoolJob != nullptr)\n                self.state.emplace<MessageManagerLock> (self.threadPoolJob);\n\n            else\n                py::pybind11_fail (\"Invalid constructed \\\"MessageManagerLock\\\", either \\\"Thread\\\" or \\\"ThreadPoolJob\\\" must be provided\");\n\n            return std::addressof (std::as_const (self));\n        }, py::return_value_policy::reference)\n        .def (\"__exit__\", [](PyMessageManagerLock& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.state.emplace<std::monostate>();\n        })\n        .def (\"lockWasGained\", [](const PyMessageManagerLock& self)\n        {\n            if (auto lock = std::get_if<MessageManagerLock> (std::addressof (self.state)))\n                return lock->lockWasGained();\n\n            return false;\n        })\n    ;\n\n    // ============================================================================================ juce::Timer\n\n    py::class_<Timer, PyTimer> classTimer (m, \"Timer\");\n\n    classTimer\n        .def (py::init<>())\n        .def (\"timerCallback\", &Timer::timerCallback)\n        .def (\"startTimer\", &Timer::startTimer)\n        .def (\"startTimerHz\", &Timer::startTimerHz)\n        .def (\"stopTimer\", &Timer::stopTimer)\n        .def (\"isTimerRunning\", &Timer::isTimerRunning)\n        .def (\"getTimerInterval\", &Timer::getTimerInterval)\n        .def_static (\"callAfterDelay\", &Timer::callAfterDelay)\n        .def_static (\"callPendingTimersSynchronously\", &Timer::callPendingTimersSynchronously)\n    ;\n\n    // ============================================================================================ juce::MultiTimer\n\n    py::class_<MultiTimer, PyMultiTimer> classMultiTimer (m, \"MultiTimer\");\n\n    classMultiTimer\n        .def (py::init<>())\n        .def (\"timerCallback\", &MultiTimer::timerCallback)\n        .def (\"startTimer\", &MultiTimer::startTimer)\n        .def (\"stopTimer\", &MultiTimer::stopTimer)\n        .def (\"isTimerRunning\", &MultiTimer::isTimerRunning)\n        .def (\"getTimerInterval\", &MultiTimer::getTimerInterval)\n    ;\n\n    // ============================================================================================ initialiseJuce_GUI\n\n#if ! JUCE_PYTHON_EMBEDDED_INTERPRETER\n    static std::atomic_int numScopedInitInstances = 0;\n\n    if (numScopedInitInstances.fetch_add(1) == 0)\n    {\n        initialiseJuce_GUI();\n\n        JUCEApplicationBase::createInstance = +[]() -> JUCEApplicationBase* { return nullptr; };\n\n#if JUCE_MAC\n        initialiseNSApplication();\n#endif\n    }\n\n#if 1\n    py::cpp_function cleanupCallback ([](py::handle weakref)\n    {\n        if (numScopedInitInstances.fetch_sub(1) == 1)\n            shutdownJuce_GUI();\n\n        weakref.dec_ref();\n    });\n\n    (void) py::weakref (m.attr (\"MessageManager\"), cleanupCallback).release();\n\n#else\n    auto atexit = py::module_::import (\"atexit\");\n    atexit.attr (\"register\") (py::cpp_function([]\n    {\n        if (numScopedInitInstances.fetch_sub(1) == 1)\n            shutdownJuce_GUI();\n    }));\n\n#endif\n#endif\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceEventsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_events\n #error This binding file requires adding the juce_events module in the project\n#else\n #include <juce_events/juce_events.h>\n#endif\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <variant>\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceEventsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\nstruct PyActionListener : public juce::ActionListener\n{\n    void actionListenerCallback (const juce::String& message) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::ActionListener, actionListenerCallback, message);\n    }\n};\n\n// =================================================================================================\n\nstruct PyAsyncUpdater : public juce::AsyncUpdater\n{\n    void handleAsyncUpdate() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::AsyncUpdater, handleAsyncUpdate);\n    }\n};\n\n// =================================================================================================\n\nstruct PyChangeListener : public juce::ChangeListener\n{\n    void changeListenerCallback (juce::ChangeBroadcaster* source) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::ChangeListener, changeListenerCallback, source);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::MessageManager::MessageBase>\nstruct PyMessageBase : public Base\n{\n    using Base::Base;\n\n    void messageCallback() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, messageCallback);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::CallbackMessage>\nstruct PyCallbackMessage : public PyMessageBase<Base>\n{\n    using PyMessageBase<Base>::PyMessageBase;\n\n    void messageCallback() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, messageCallback);\n    }\n};\n\n// =================================================================================================\n\nstruct PyMessageListener : public juce::MessageListener\n{\n    void handleMessage (const juce::Message& message) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MessageListener, handleMessage, message);\n    }\n};\n\n// =================================================================================================\n\nstruct PyMessageManagerLock\n{\n    explicit PyMessageManagerLock (juce::Thread* thread)\n        : thread (thread)\n    {\n    }\n\n    explicit PyMessageManagerLock (juce::ThreadPoolJob* threadPoolJob)\n        : threadPoolJob (threadPoolJob)\n    {\n    }\n\n    juce::Thread* thread = nullptr;\n    juce::ThreadPoolJob* threadPoolJob = nullptr;\n    std::variant<std::monostate, juce::MessageManagerLock> state;\n};\n\n// =================================================================================================\n\nstruct PyTimer : public juce::Timer\n{\n    using juce::Timer::Timer;\n\n    void timerCallback() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Timer, timerCallback);\n    }\n};\n\n// =================================================================================================\n\nstruct PyMultiTimer : public juce::MultiTimer\n{\n    using juce::MultiTimer::MultiTimer;\n\n    void timerCallback (int timerID) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MultiTimer, timerCallback, timerID);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGraphicsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceCoreBindings.h\"\n#include \"ScriptJuceGraphicsBindings.h\"\n#include \"../utilities/ClassDemangling.h\"\n#include \"../utilities/PythonInterop.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"../pybind11/operators.h\"\n\n#include <functional>\n#include <memory>\n#include <string_view>\n#include <tuple>\n#include <variant>\n#include <vector>\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerPoint (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Point\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType, ValueType>())\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"isOrigin\", &T::isOrigin)\n            .def (\"isFinite\", &T::isFinite)\n            .def (\"getX\", &T::getX)\n            .def (\"getY\", &T::getY)\n            .def (\"setX\", &T::setX)\n            .def (\"setY\", &T::setY)\n            .def (\"withX\", &T::withX)\n            .def (\"withY\", &T::withY)\n            .def (\"setXY\", &T::setXY)\n            .def (\"addXY\", &T::addXY)\n            .def (\"translated\", &T::translated)\n            .def (py::self + py::self)\n            .def (py::self += py::self)\n            .def (py::self - py::self)\n            .def (py::self -= py::self)\n            .def (py::self * py::self)\n            .def (py::self *= py::self)\n            .def (py::self * float())\n            .def (py::self *= float())\n            .def (py::self / py::self)\n            .def (py::self /= py::self)\n            .def (py::self / float())\n            .def (py::self /= float())\n            .def (-py::self)\n            .def (\"getDistanceFromOrigin\", &T::getDistanceFromOrigin)\n            .def (\"getDistanceFrom\", &T::getDistanceFrom)\n            .def (\"getDistanceSquaredFromOrigin\", &T::getDistanceSquaredFromOrigin)\n            .def (\"getDistanceSquaredFrom\", &T::getDistanceSquaredFrom)\n            .def (\"getAngleToPoint\", &T::getAngleToPoint)\n            .def (\"getPointOnCircumference\", py::overload_cast<float, float>(&T::getPointOnCircumference, py::const_))\n            .def (\"getPointOnCircumference\", py::overload_cast<float, float, float>(&T::getPointOnCircumference, py::const_))\n            .def (\"getDotProduct\", &T::getDotProduct)\n            .def (\"applyTransform\", &T::applyTransform)\n            .def (\"transformedBy\", &T::transformedBy)\n            .def (\"toInt\", &T::toInt)\n            .def (\"toFloat\", &T::toFloat)\n            .def (\"toDouble\", &T::toDouble)\n            .def (\"roundToInt\", &T::roundToInt)\n            .def (\"toString\", &T::toString)\n            .def_property(\"x\", &T::getX, &T::setX)\n            .def_property(\"y\", &T::getY, &T::setY)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getX() << \", \" << self.getY() << \")\";\n                return result;\n            })\n            .def (\"__str__\", &T::toString)\n        ;\n\n        if constexpr (std::is_floating_point_v<ValueType>)\n        {\n            class_\n                .def (\"rotatedAboutOrigin\", [](const T& self, float angleRadians) { return self.rotatedAboutOrigin (angleRadians); });\n        }\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Point\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerLine (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Line\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType, ValueType, ValueType, ValueType>())\n            .def (py::init<Point<ValueType>, Point<ValueType>>())\n            .def (py::init<const T&>())\n            .def (\"getStartX\", &T::getStartX)\n            .def (\"getStartY\", &T::getStartY)\n            .def (\"getEndX\", &T::getEndX)\n            .def (\"getEndY\", &T::getEndY)\n            .def (\"getStart\", &T::getStart)\n            .def (\"getEnd\", &T::getEnd)\n            .def (\"setStart\", py::overload_cast<ValueType, ValueType> (&T::setStart))\n            .def (\"setStart\", py::overload_cast<const Point<ValueType>> (&T::setStart))\n            .def (\"setEnd\", py::overload_cast<ValueType, ValueType> (&T::setEnd))\n            .def (\"setEnd\", py::overload_cast<const Point<ValueType>> (&T::setEnd))\n            .def (\"reversed\", &T::reversed)\n            .def (\"applyTransform\", &T::applyTransform)\n            .def (\"getLength\", &T::getLength)\n            .def (\"getLengthSquared\", &T::getLengthSquared)\n            .def (\"isVertical\", &T::isVertical)\n            .def (\"isHorizontal\", &T::isHorizontal)\n            .def (\"getAngle\", &T::getAngle)\n        //.def_static (\"fromStartAndAngle\", &T::fromStartAndAngle) // Fails for int\n            .def (\"toFloat\", &T::toFloat)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"getIntersection\", &T::getIntersection)\n            .def (\"intersects\", py::overload_cast<T, Point<ValueType>&> (&T::intersects, py::const_))\n            .def (\"intersects\", py::overload_cast<T> (&T::intersects, py::const_))\n            .def (\"getPointAlongLine\", py::overload_cast<ValueType> (&T::getPointAlongLine, py::const_))\n            .def (\"getPointAlongLine\", py::overload_cast<ValueType, ValueType> (&T::getPointAlongLine, py::const_))\n            .def (\"getPointAlongLineProportionally\", &T::getPointAlongLineProportionally)\n            .def (\"getDistanceFromPoint\", &T::getDistanceFromPoint)\n            .def (\"findNearestProportionalPositionTo\", &T::findNearestProportionalPositionTo)\n            .def (\"findNearestPointTo\", &T::findNearestPointTo)\n            .def (\"isPointAbove\", &T::isPointAbove)\n            .def (\"withLengthenedStart\", &T::withLengthenedStart)\n            .def (\"withShortenedStart\", &T::withShortenedStart)\n            .def (\"withLengthenedEnd\", &T::withLengthenedEnd)\n            .def (\"withShortenedEnd\", &T::withShortenedEnd)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getStartX() << \", \" << self.getStartY() << \", \" << self.getEndX() << \", \" << self.getEndY() << \")\";\n                return result;\n            })\n            .def (\"__str__\", [](const T& self)\n            {\n                String result;\n                result\n                    << \"(\" << self.getStartX() << \", \" << self.getStartY() << \"), (\" << self.getEndX() << \", \" << self.getEndY() << \")\";\n                return result;\n            })\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Line\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerRectangle (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Rectangle\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType, ValueType>())\n            .def (py::init<ValueType, ValueType, ValueType, ValueType>())\n            .def (py::init<Point<ValueType>, Point<ValueType>>())\n            .def (py::init<const T&>())\n            .def_static (\"leftTopRightBottom\", &T::leftTopRightBottom)\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"isFinite\", &T::isFinite)\n            .def (\"getX\", &T::getX)\n            .def (\"getY\", &T::getY)\n            .def (\"getWidth\", &T::getWidth)\n            .def (\"getHeight\", &T::getHeight)\n            .def (\"getRight\", &T::getRight)\n            .def (\"getBottom\", &T::getBottom)\n            .def (\"getCentreX\", &T::getCentreX)\n            .def (\"getCentreY\", &T::getCentreY)\n            .def (\"getAspectRatio\", &T::getAspectRatio)\n            .def (\"getPosition\", &T::getPosition)\n            .def (\"setPosition\", py::overload_cast<Point<ValueType>> (&T::setPosition))\n            .def (\"setPosition\", py::overload_cast<ValueType, ValueType> (&T::setPosition))\n            .def (\"getTopLeft\", &T::getTopLeft)\n            .def (\"getTopRight\", &T::getTopRight)\n            .def (\"getBottomLeft\", &T::getBottomLeft)\n            .def (\"getBottomRight\", &T::getBottomRight)\n            .def (\"getHorizontalRange\", &T::getHorizontalRange)\n            .def (\"getVerticalRange\", &T::getVerticalRange)\n            .def (\"setSize\", &T::setSize)\n            .def (\"setBounds\", &T::setBounds)\n            .def (\"setX\", &T::setX)\n            .def (\"setY\", &T::setY)\n            .def (\"setWidth\", &T::setWidth)\n            .def (\"setHeight\", &T::setHeight)\n            .def (\"setCentre\", py::overload_cast<Point<ValueType>> (&T::setCentre))\n            .def (\"setCentre\", py::overload_cast<ValueType, ValueType> (&T::setCentre))\n            .def (\"setHorizontalRange\", &T::setHorizontalRange)\n            .def (\"setVerticalRange\", &T::setVerticalRange)\n            .def (\"withX\", &T::withX)\n            .def (\"withY\", &T::withY)\n            .def (\"withRightX\", &T::withRightX)\n            .def (\"withBottomY\", &T::withBottomY)\n            .def (\"withPosition\", py::overload_cast<Point<ValueType>> (&T::withPosition, py::const_))\n            .def (\"withPosition\", py::overload_cast<ValueType, ValueType> (&T::withPosition, py::const_))\n            .def (\"withZeroOrigin\", &T::withZeroOrigin)\n            .def (\"withCentre\", &T::withCentre)\n            .def (\"withWidth\", &T::withWidth)\n            .def (\"withHeight\", &T::withHeight)\n            .def (\"withSize\", &T::withSize)\n            .def (\"withSizeKeepingCentre\", &T::withSizeKeepingCentre)\n            .def (\"setLeft\", &T::setLeft)\n            .def (\"withLeft\", &T::withLeft)\n            .def (\"setTop\", &T::setTop)\n            .def (\"withTop\", &T::withTop)\n            .def (\"setRight\", &T::setRight)\n            .def (\"withRight\", &T::withRight)\n            .def (\"setBottom\", &T::setBottom)\n            .def (\"withBottom\", &T::withBottom)\n            .def (\"withTrimmedLeft\", &T::withTrimmedLeft)\n            .def (\"withTrimmedRight\", &T::withTrimmedRight)\n            .def (\"withTrimmedTop\", &T::withTrimmedTop)\n            .def (\"withTrimmedBottom\", &T::withTrimmedBottom)\n            .def (\"translate\", &T::translate)\n            .def (\"translated\", &T::translated)\n            .def (py::self + Point<ValueType>())\n            .def (py::self += Point<ValueType>())\n            .def (py::self - Point<ValueType>())\n            .def (py::self -= Point<ValueType>())\n            .def (py::self * float())\n            .def (py::self *= float())\n            .def (py::self * Point<float>())\n            .def (py::self *= Point<float>())\n            .def (py::self / float())\n            .def (py::self /= float())\n            .def (py::self / Point<float>())\n            .def (py::self /= Point<float>())\n            .def (\"expand\", &T::expand)\n            .def (\"expanded\", py::overload_cast<ValueType> (&T::expanded, py::const_))\n            .def (\"expanded\", py::overload_cast<ValueType, ValueType> (&T::expanded, py::const_))\n            .def (\"reduce\", &T::reduce)\n            .def (\"reduced\", py::overload_cast<ValueType> (&T::reduced, py::const_))\n            .def (\"reduced\", py::overload_cast<ValueType, ValueType> (&T::reduced, py::const_))\n            .def (\"removeFromTop\", &T::removeFromTop)\n            .def (\"removeFromLeft\", &T::removeFromLeft)\n            .def (\"removeFromRight\", &T::removeFromRight)\n            .def (\"removeFromBottom\", &T::removeFromBottom)\n            .def (\"getConstrainedPoint\", &T::getConstrainedPoint)\n            .def (\"getRelativePoint\", &T::template getRelativePoint<float>)\n            .def (\"proportionOfWidth\", &T::template proportionOfWidth<float>)\n            .def (\"proportionOfHeight\", &T::template proportionOfHeight<float>)\n            .def (\"getProportion\", &T::template getProportion<float>)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"contains\", py::overload_cast<ValueType, ValueType> (&T::contains, py::const_))\n            .def (\"contains\", py::overload_cast<Point<ValueType>> (&T::contains, py::const_))\n            .def (\"contains\", py::overload_cast<T> (&T::contains, py::const_))\n            .def (\"intersects\", py::overload_cast<T> (&T::intersects, py::const_))\n            .def (\"intersects\", py::overload_cast<const Line<ValueType>&> (&T::intersects, py::const_))\n            .def (\"getIntersection\", &T::getIntersection)\n        //.def (\"intersectRectangle\", &T::intersectRectangle)\n            .def (\"intersectRectangle\",py::overload_cast<T&> (&T::intersectRectangle, py::const_))\n            .def (\"getUnion\", &T::getUnion)\n            .def (\"enlargeIfAdjacent\", &T::enlargeIfAdjacent)\n            .def (\"reduceIfPartlyContainedIn\", &T::reduceIfPartlyContainedIn)\n            .def (\"constrainedWithin\", &T::constrainedWithin)\n            .def (\"transformedBy\", &T::transformedBy)\n            .def (\"getSmallestIntegerContainer\", &T::getSmallestIntegerContainer)\n            .def (\"toNearestInt\", &T::toNearestInt)\n            .def (\"toNearestIntEdges\", &T::toNearestIntEdges)\n            .def (\"toFloat\", &T::toFloat)\n        //.def (\"toType\", ...)\n        //.def_static (\"findAreaContainingPoints\", &T::findAreaContainingPoints)\n        //.def_static (\"intersectRectangles\", &T::intersectRectangles)\n            .def (\"toString\", &T::toString)\n            .def_static (\"fromString\", &T::fromString)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getX() << \", \" << self.getY() << \", \" << self.getWidth() << \", \" << self.getHeight() << \")\";\n                return result;\n            })\n            .def (\"__str__\", &T::toString)\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Rectangle\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerRectangleList (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"RectangleList\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<Rectangle<ValueType>>())\n            .def (py::init<const T&>())\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"getNumRectangles\", &T::getNumRectangles)\n            .def (\"getRectangle\", &T::getRectangle)\n            .def (\"clear\", &T::clear)\n            .def (\"add\", py::overload_cast<Rectangle<ValueType>> (&T::add))\n            .def (\"add\", py::overload_cast<ValueType, ValueType, ValueType, ValueType> (&T::add))\n            .def (\"addWithoutMerging\", &T::addWithoutMerging)\n            .def (\"add\", py::overload_cast<const T&> (&T::add))\n            .def (\"subtract\", py::overload_cast<const Rectangle<ValueType>> (&T::subtract))\n            .def (\"subtract\", py::overload_cast<const T&> (&T::subtract))\n            .def (\"clipTo\", static_cast<bool (T::*)(Rectangle<ValueType>)> (&T::clipTo))\n            .def (\"clipTo\", py::overload_cast<const Class<int>&> (&T::template clipTo<int>))\n            .def (\"clipTo\", py::overload_cast<const Class<float>&> (&T::template clipTo<float>))\n            .def (\"getIntersectionWith\", &T::getIntersectionWith)\n            .def (\"swapWith\", &T::swapWith)\n            .def (\"containsPoint\", py::overload_cast<Point<ValueType>> (&T::containsPoint, py::const_))\n            .def (\"containsPoint\", py::overload_cast<ValueType, ValueType> (&T::containsPoint, py::const_))\n            .def (\"containsRectangle\", &T::containsRectangle)\n            .def (\"intersectsRectangle\", &T::intersectsRectangle)\n            .def (\"intersects\", &T::intersects)\n            .def (\"getBounds\", &T::getBounds)\n            .def (\"consolidate\", &T::consolidate)\n            .def (\"offsetAll\", py::overload_cast<Point<ValueType>> (&T::offsetAll))\n            .def (\"offsetAll\", py::overload_cast<ValueType, ValueType> (&T::offsetAll))\n            .def (\"scaleAll\", py::overload_cast<int> (&T::template scaleAll<int>))\n            .def (\"scaleAll\", py::overload_cast<float> (&T::template scaleAll<float>))\n            .def (\"transformAll\", &T::transformAll)\n            .def (\"toPath\", &T::toPath)\n            .def(\"__iter__\", [](const T& self)\n            {\n                return py::make_iterator (self.begin(), self.end());\n            }, py::keep_alive<0, 1>())\n            .def (\"ensureStorageAllocated\", &T::ensureStorageAllocated)\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"RectangleList\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerParallelogram (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"Parallelogram\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<Point<ValueType>, Point<ValueType>, Point<ValueType>>())\n            .def (py::init ([](ValueType x1, ValueType y1, ValueType x2, ValueType y2, ValueType x3, ValueType y3)\n            {\n                return T (Point<ValueType>(x1, y1), Point<ValueType>(x2, y2), Point<ValueType>(x3, y3));\n            }))\n            .def (py::init<Rectangle<ValueType>>())\n            .def (py::init<const T&>())\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"isFinite\", &T::isFinite)\n            .def (\"getWidth\", &T::getWidth)\n            .def (\"getHeight\", &T::getHeight)\n            .def (\"getTopLeft\", &T::getTopLeft)\n            .def (\"getTopRight\", &T::getTopRight)\n            .def (\"getBottomLeft\", &T::getBottomLeft)\n            .def (\"getBottomRight\", &T::getBottomRight)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (py::self + Point<ValueType>())\n            .def (py::self += Point<ValueType>())\n            .def (py::self - Point<ValueType>())\n        //.def (py::self -= Point<ValueType>()) // TODO - JUCE Bug\n            .def (py::self * float())\n            .def (py::self *= float())\n            .def (py::self * Point<float>())\n            .def (py::self *= Point<float>())\n            .def (\"getRelativePoint\", &T::getRelativePoint)\n            .def (\"transformedBy\", &T::transformedBy)\n            .def (\"getBoundingBox\", &T::getBoundingBox)\n            .def_readwrite(\"topLeft\", &T::topLeft)\n            .def_readwrite(\"topRight\", &T::topRight)\n            .def_readwrite(\"bottomLeft\", &T::bottomLeft)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.topLeft.getX() << \", \" << self.topLeft.getY() << \", \"\n                        << self.topRight.getX() << \", \" << self.topRight.getY() << \", \"\n                        << self.bottomLeft.getX() << \", \" << self.bottomLeft.getY() << \")\";\n                return result;\n            })\n        //.def (\"__str__\", &T::toString)\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"Parallelogram\", type);\n}\n\n// ============================================================================================\n\ntemplate <template <class> class Class, class... Types>\nvoid registerBorderSize (py::module_& m)\n{\n    py::dict type;\n\n    ([&]\n    {\n        using ValueType = Types;\n        using T = Class<ValueType>;\n\n        const auto className = popsicle::Helpers::pythonizeCompoundClassName (\"BorderSize\", typeid (Types).name());\n\n        auto class_ = py::class_<T> (m, className.toRawUTF8())\n            .def (py::init<>())\n            .def (py::init<ValueType>())\n            .def (py::init<ValueType, ValueType, ValueType, ValueType>())\n            .def (\"getTop\", &T::getTop)\n            .def (\"getLeft\", &T::getLeft)\n            .def (\"getBottom\", &T::getBottom)\n            .def (\"getRight\", &T::getRight)\n            .def (\"getTopAndBottom\", &T::getTopAndBottom)\n            .def (\"getLeftAndRight\", &T::getLeftAndRight)\n            .def (\"isEmpty\", &T::isEmpty)\n            .def (\"setTop\", &T::setTop)\n            .def (\"setLeft\", &T::setLeft)\n            .def (\"setBottom\", &T::setBottom)\n            .def (\"setRight\", &T::setRight)\n            .def (\"subtractedFrom\", py::overload_cast<const Rectangle<ValueType>&> (&T::subtractedFrom, py::const_))\n            .def (\"subtractFrom\", &T::subtractFrom)\n            .def (\"addedTo\", py::overload_cast<const Rectangle<ValueType>&> (&T::addedTo, py::const_))\n            .def (\"addTo\", &T::addTo)\n            .def (\"subtractedFrom\", py::overload_cast<const T&> (&T::subtractedFrom, py::const_))\n            .def (\"addedTo\", py::overload_cast<const T&> (&T::addedTo, py::const_))\n            .def (\"multipliedBy\", &T::template multipliedBy<int>)\n            .def (\"multipliedBy\", &T::template multipliedBy<float>)\n            .def (py::self == py::self)\n            .def (py::self != py::self)\n            .def (\"__repr__\", [](const T& self)\n            {\n                String result;\n                result\n                    << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                    << \"(\" << self.getTop() << \", \" << self.getLeft() << \", \" << self.getBottom() << \", \" << self.getRight() << \")\";\n                return result;\n            })\n        ;\n\n        type[py::type::of (py::cast (Types{}))] = class_;\n\n        return true;\n    }() && ...);\n\n    m.add_object (\"BorderSize\", type);\n}\n\n// ============================================================================================\n\nvoid registerJuceGraphicsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::Justification\n\n    py::class_<Justification> classJustification (m, \"Justification\");\n\n    Helpers::makeArithmeticEnum<Justification::Flags> (classJustification, \"Flags\")\n        .value (\"left\", Justification::Flags::left)\n        .value (\"right\", Justification::Flags::right)\n        .value (\"horizontallyCentred\", Justification::Flags::horizontallyCentred)\n        .value (\"top\", Justification::Flags::top)\n        .value (\"bottom\", Justification::Flags::bottom)\n        .value (\"verticallyCentred\", Justification::Flags::verticallyCentred)\n        .value (\"horizontallyJustified\", Justification::Flags::horizontallyJustified)\n        .value (\"centred\", Justification::Flags::centred)\n        .value (\"centredLeft\", Justification::Flags::centredLeft)\n        .value (\"centredRight\", Justification::Flags::centredRight)\n        .value (\"centredTop\", Justification::Flags::centredTop)\n        .value (\"centredBottom\", Justification::Flags::centredBottom)\n        .value (\"topLeft\", Justification::Flags::topLeft)\n        .value (\"topRight\", Justification::Flags::topRight)\n        .value (\"bottomLeft\", Justification::Flags::bottomLeft)\n        .value (\"bottomRight\", Justification::Flags::bottomRight)\n        .export_values();\n\n    classJustification\n        .def (py::init<int>())\n        .def (py::init ([](Justification::Flags flags) { return Justification (static_cast<int> (flags)); }))\n        .def (py::init<const Justification&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self == Justification::Flags())\n        .def (py::self != Justification::Flags())\n        .def (py::self == int())\n        .def (py::self != int())\n        .def (\"getFlags\", &Justification::getFlags)\n        .def (\"testFlags\", &Justification::testFlags)\n        .def (\"testFlags\", [](const Justification& self, Justification::Flags flags) { return self.testFlags (static_cast<int> (flags)); })\n        .def (\"getOnlyVerticalFlags\", &Justification::getOnlyVerticalFlags)\n        .def (\"getOnlyHorizontalFlags\", &Justification::getOnlyHorizontalFlags)\n    //.def (\"applyToRectangle\", &Justification::template applyToRectangle<int>)\n    //.def (\"applyToRectangle\", &Justification::template applyToRectangle<float>)\n        .def (\"appliedToRectangle\", &Justification::template appliedToRectangle<int>)\n        .def (\"appliedToRectangle\", &Justification::template appliedToRectangle<float>)\n    ;\n\n    //py::implicitly_convertible<Justification::Flags, Justification>();\n\n    // ============================================================================================ juce::AffineTransform\n\n    py::class_<AffineTransform> classAffineTransform (m, \"AffineTransform\");\n\n    classAffineTransform\n        .def (py::init<>())\n        .def (py::init<float, float, float, float, float, float>())\n        .def (py::init<const AffineTransform&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"transformPoint\", [](const AffineTransform& self, int x, int y) { self.transformPoint (x, y); return py::make_tuple(x, y); })\n        .def (\"transformPoint\", [](const AffineTransform& self, float x, float y) { self.transformPoint (x, y); return py::make_tuple(x, y); })\n        .def (\"transformPoints\", [](const AffineTransform& self, int x1, int y1, int x2, int y2) { self.transformPoints (x1, y1, x2, y2); return py::make_tuple(x1, y1, x2, y2); })\n        .def (\"transformPoints\", [](const AffineTransform& self, float x1, float y1, float x2, float y2) { self.transformPoints (x1, y1, x2, y2); return py::make_tuple(x1, y1, x2, y2); })\n        .def (\"transformPoints\", [](const AffineTransform& self, int x1, int y1, int x2, int y2, int x3, int y3) { self.transformPoints (x1, y1, x2, y2, x3, y3); return py::make_tuple(x1, y1, x2, y2, x3, y3); })\n        .def (\"transformPoints\", [](const AffineTransform& self, float x1, float y1, float x2, float y2, float x3, float y3) { self.transformPoints (x1, y1, x2, y2, x3, y3); return py::make_tuple(x1, y1, x2, y2, x3, y3); })\n        .def (\"translated\", static_cast<AffineTransform (AffineTransform::*)(float, float) const> (&AffineTransform::translated))\n        .def (\"translated\", &AffineTransform::template translated<Point<int>>)\n        .def (\"translated\", &AffineTransform::template translated<Point<float>>)\n        .def_static (\"translation\", static_cast<AffineTransform (*)(float, float)> (&AffineTransform::translation))\n        .def (\"withAbsoluteTranslation\", &AffineTransform::withAbsoluteTranslation)\n        .def (\"rotated\", py::overload_cast<float> (&AffineTransform::rotated, py::const_))\n        .def (\"rotated\", py::overload_cast<float, float, float> (&AffineTransform::rotated, py::const_))\n        .def_static (\"rotation\", py::overload_cast<float> (&AffineTransform::rotation))\n        .def_static (\"rotation\", py::overload_cast<float, float, float> (&AffineTransform::rotation))\n        .def (\"scaled\", py::overload_cast<float, float> (&AffineTransform::scaled, py::const_))\n        .def (\"scaled\", py::overload_cast<float> (&AffineTransform::scaled, py::const_))\n        .def (\"scaled\", py::overload_cast<float, float, float, float> (&AffineTransform::scaled, py::const_))\n        .def_static (\"scale\", py::overload_cast<float, float> (&AffineTransform::scale))\n        .def_static (\"scale\", py::overload_cast<float> (&AffineTransform::scale))\n        .def_static (\"scale\", py::overload_cast<float, float, float, float> (&AffineTransform::scale))\n        .def (\"sheared\", &AffineTransform::sheared)\n        .def_static (\"shear\", &AffineTransform::shear)\n        .def_static (\"verticalFlip\", &AffineTransform::verticalFlip)\n        .def (\"inverted\", &AffineTransform::inverted)\n        .def_static (\"fromTargetPoints\", [](float x00, float y00, float x10, float y10, float x01, float y01)\n        {\n            return AffineTransform::fromTargetPoints (x00, y00, x10, y10, x01, y01);\n        })\n        .def_static (\"fromTargetPoints\", [](float sourceX1, float sourceY1, float targetX1, float targetY1,\n                                            float sourceX2, float sourceY2, float targetX2, float targetY2,\n                                            float sourceX3, float sourceY3, float targetX3, float targetY3)\n        {\n            return AffineTransform::fromTargetPoints (sourceX1, sourceY1, targetX1, targetY1,\n                                                      sourceX2, sourceY2, targetX2, targetY2,\n                                                      sourceX3, sourceY3, targetX3, targetY3);\n        })\n        .def_static (\"fromTargetPoints\", &AffineTransform::template fromTargetPoints<Point<int>>)\n        .def_static (\"fromTargetPoints\", &AffineTransform::template fromTargetPoints<Point<float>>)\n        .def (\"followedBy\", &AffineTransform::followedBy)\n        .def (\"isIdentity\", &AffineTransform::isIdentity)\n        .def (\"isSingularity\", &AffineTransform::isSingularity)\n        .def (\"isOnlyTranslation\", &AffineTransform::isOnlyTranslation)\n        .def (\"getTranslationX\", &AffineTransform::getTranslationX)\n        .def (\"getTranslationY\", &AffineTransform::getTranslationY)\n        .def (\"getDeterminant\", &AffineTransform::getDeterminant)\n        .def_readwrite (\"mat00\", &AffineTransform::mat00)\n        .def_readwrite (\"mat01\", &AffineTransform::mat01)\n        .def_readwrite (\"mat02\", &AffineTransform::mat02)\n        .def_readwrite (\"mat10\", &AffineTransform::mat10)\n        .def_readwrite (\"mat11\", &AffineTransform::mat11)\n        .def_readwrite (\"mat12\", &AffineTransform::mat12)\n        .def (\"__repr__\", [](const AffineTransform& self)\n        {\n            String repr;\n            repr\n                << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                << \"(\" << self.mat00 << \", \" << self.mat01 << \", \" << self.mat02 << \", \" << self.mat10 << \", \" << self.mat11 << \", \" << self.mat12 << \")\";\n            return repr;\n        })\n    ;\n\n    // ============================================================================================ juce::Point<>\n\n    registerPoint<Point, int, float> (m);\n\n    // ============================================================================================ juce::Line<>\n\n    registerLine<Line, int, float> (m);\n\n    // ============================================================================================ juce::Rectangle<>\n\n    registerRectangle<Rectangle, int, float> (m);\n\n    // ============================================================================================ juce::RectangleList<>\n\n    registerRectangleList<RectangleList, int, float> (m);\n\n    // ============================================================================================ juce::RectangleList<>\n\n    registerParallelogram<Parallelogram, int, float> (m);\n\n    // ============================================================================================ juce::BorderSize<>\n\n    registerBorderSize<BorderSize, int, float> (m);\n\n    // ============================================================================================ juce::Path\n\n    py::class_<Path> classPath (m, \"Path\");\n\n    py::class_<Path::Iterator> classPathIterator (classPath, \"Iterator\");\n\n    py::enum_<Path::Iterator::PathElementType> (classPathIterator, \"PathElementType\")\n        .value (\"startNewSubPath\", Path::Iterator::PathElementType::startNewSubPath)\n        .value (\"lineTo\", Path::Iterator::PathElementType::lineTo)\n        .value (\"quadraticTo\", Path::Iterator::PathElementType::quadraticTo)\n        .value (\"cubicTo\", Path::Iterator::PathElementType::cubicTo)\n        .value (\"closePath\", Path::Iterator::PathElementType::closePath)\n        .export_values();\n\n    classPathIterator\n        .def (py::init<const Path&>())\n        .def (\"next\", &Path::Iterator::next)\n        .def_readwrite (\"elementType\", &Path::Iterator::elementType)\n        .def_readwrite (\"x1\", &Path::Iterator::x1)\n        .def_readwrite (\"y1\", &Path::Iterator::y1)\n        .def_readwrite (\"x2\", &Path::Iterator::x2)\n        .def_readwrite (\"y2\", &Path::Iterator::y2)\n        .def_readwrite (\"x3\", &Path::Iterator::x3)\n        .def_readwrite (\"y3\", &Path::Iterator::y3)\n    ;\n\n    classPath\n        .def (py::init<>())\n        .def (py::init ([](py::str data) { Path result; result.restoreFromString (data.cast<std::string>().c_str()); return result; }))\n        .def (py::init<const Path&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"isEmpty\", &Path::isEmpty)\n        .def (\"getBounds\", &Path::getBounds)\n        .def (\"getBoundsTransformed\", &Path::getBoundsTransformed, \"transform\"_a)\n        .def (\"contains\", py::overload_cast<float, float, float> (&Path::contains, py::const_), \"x\"_a, \"y\"_a, \"tolerance\"_a = Path::defaultToleranceForTesting)\n        .def (\"contains\", py::overload_cast<Point<float>, float> (&Path::contains, py::const_), \"point\"_a, \"tolerance\"_a = Path::defaultToleranceForTesting)\n        .def (\"intersectsLine\", &Path::intersectsLine, \"line\"_a, \"tolerance\"_a = Path::defaultToleranceForTesting)\n        .def (\"getClippedLine\", &Path::getClippedLine, \"line\"_a, \"keepSectionOutsidePath\"_a)\n        .def (\"getLength\", &Path::getLength, \"transform\"_a = AffineTransform(), \"tolerance\"_a = Path::defaultToleranceForMeasurement)\n        .def (\"getPointAlongPath\", &Path::getPointAlongPath, \"distanceFromStart\"_a, \"transform\"_a = AffineTransform(), \"tolerance\"_a = Path::defaultToleranceForMeasurement)\n        .def (\"getNearestPoint\", &Path::getNearestPoint, \"targetPoint\"_a, \"pointOnPath\"_a, \"transform\"_a = AffineTransform(), \"tolerance\"_a = Path::defaultToleranceForMeasurement)\n        .def (\"clear\", &Path::clear)\n        .def (\"startNewSubPath\", py::overload_cast<float, float> (&Path::startNewSubPath), \"startX\"_a, \"startY\"_a)\n        .def (\"startNewSubPath\", py::overload_cast<Point<float>> (&Path::startNewSubPath), \"start\"_a)\n        .def (\"closeSubPath\", &Path::closeSubPath)\n        .def (\"lineTo\", py::overload_cast<float, float> (&Path::lineTo), \"endX\"_a, \"endY\"_a)\n        .def (\"lineTo\", py::overload_cast<Point<float>> (&Path::lineTo), \"end\"_a)\n        .def (\"quadraticTo\", py::overload_cast<float, float, float, float> (&Path::quadraticTo), \"controlPointX\"_a, \"controlPointY\"_a, \"endPointX\"_a, \"endPointX\"_a)\n        .def (\"quadraticTo\", py::overload_cast<Point<float>, Point<float>> (&Path::quadraticTo), \"controlPoint\"_a, \"endPoint\"_a)\n        .def (\"cubicTo\", py::overload_cast<float, float, float, float, float, float> (&Path::cubicTo))\n        .def (\"cubicTo\", py::overload_cast<Point<float>, Point<float>, Point<float>> (&Path::cubicTo))\n        .def (\"getCurrentPosition\", &Path::getCurrentPosition)\n        .def (\"addRectangle\", static_cast<void (Path::*)(float, float, float, float)> (&Path::addRectangle))\n        .def (\"addRectangle\", static_cast<void (Path::*)(Rectangle<int>)> (&Path::template addRectangle<int>))\n        .def (\"addRectangle\", static_cast<void (Path::*)(Rectangle<float>)> (&Path::template addRectangle<float>))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(float, float, float, float, float)> (&Path::addRoundedRectangle))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(float, float, float, float, float, float)> (&Path::addRoundedRectangle))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(float, float, float, float, float, float, bool, bool, bool, bool)> (&Path::addRoundedRectangle))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(Rectangle<int>, float)> (&Path::template addRoundedRectangle<int>))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(Rectangle<float>, float)> (&Path::template addRoundedRectangle<float>))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(Rectangle<int>, float, float)> (&Path::template addRoundedRectangle<int>))\n        .def (\"addRoundedRectangle\", static_cast<void (Path::*)(Rectangle<float>, float, float)> (&Path::template addRoundedRectangle<float>))\n        .def (\"addTriangle\", py::overload_cast<float, float, float, float, float, float> (&Path::addTriangle))\n        .def (\"addTriangle\", py::overload_cast<Point<float>, Point<float>, Point<float>> (&Path::addTriangle))\n        .def (\"addQuadrilateral\", &Path::addQuadrilateral)\n        .def (\"addEllipse\", py::overload_cast<float, float, float, float> (&Path::addEllipse))\n        .def (\"addEllipse\", py::overload_cast<Rectangle<float>> (&Path::addEllipse))\n        .def (\"addArc\", &Path::addArc,\n            \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"fromRadians\"_a, \"toRadians\"_a, \"startAsNewSubPath\"_a = false)\n        .def (\"addCentredArc\", &Path::addCentredArc,\n            \"centreX\"_a, \"centreY\"_a, \"radiusX\"_a, \"radiusY\"_a, \"rotationOfEllipse\"_a, \"fromRadians\"_a, \"toRadians\"_a, \"startAsNewSubPath\"_a = false)\n        .def (\"addPieSegment\", py::overload_cast<float, float, float, float, float, float, float> (&Path::addPieSegment))\n        .def (\"addPieSegment\", py::overload_cast<Rectangle<float>, float, float, float> (&Path::addPieSegment))\n        .def (\"addLineSegment\", &Path::addLineSegment)\n        .def (\"addArrow\", &Path::addArrow)\n        .def (\"addPolygon\", &Path::addPolygon)\n        .def (\"addStar\", &Path::addStar)\n        .def (\"addBubble\", &Path::addBubble)\n        .def (\"addPath\", py::overload_cast<const Path&> (&Path::addPath))\n        .def (\"addPath\", py::overload_cast<const Path&, const AffineTransform&> (&Path::addPath))\n        .def (\"swapWithPath\", &Path::swapWithPath)\n        .def (\"preallocateSpace\", &Path::preallocateSpace)\n        .def (\"applyTransform\", &Path::applyTransform)\n        .def (\"scaleToFit\", &Path::scaleToFit)\n    //.def (\"getTransformToScaleToFit\", py::overload_cast<float, float, float, float, bool, Justification> (&Path::getTransformToScaleToFit))\n    //.def (\"getTransformToScaleToFit\", py::overload_cast<Rectangle<float>, bool, Justification> (&Path::getTransformToScaleToFit))\n        .def (\"createPathWithRoundedCorners\", &Path::createPathWithRoundedCorners)\n        .def (\"setUsingNonZeroWinding\", &Path::setUsingNonZeroWinding)\n        .def (\"isUsingNonZeroWinding\", &Path::isUsingNonZeroWinding)\n        .def (\"loadPathFromStream\", &Path::loadPathFromStream)\n        .def (\"loadPathFromData\", [](Path& self, py::buffer data)\n        {\n            auto info = data.request();\n            self.loadPathFromData (info.ptr, static_cast<size_t> (info.size));\n        })\n        .def (\"writePathToStream\", &Path::writePathToStream)\n        .def (\"toString\", &Path::toString)\n        .def (\"restoreFromString\", &Path::restoreFromString)\n        .def (\"__repr__\", [](const Path& self)\n        {\n            String repr;\n            repr << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.toString() << \"')\";\n            return repr;\n        })\n        .def (\"__str__\", &Path::toString)\n    ;\n\n    classPath.attr (\"defaultToleranceForTesting\") = py::float_ (Path::defaultToleranceForTesting);\n    classPath.attr (\"defaultToleranceForMeasurement\") = py::float_ (Path::defaultToleranceForMeasurement);\n\n    // ============================================================================================ juce::PathFlatteningIterator\n\n    py::class_<PathFlatteningIterator> classPathFlatteningIterator (m, \"PathFlatteningIterator\");\n\n    classPathFlatteningIterator\n        .def (py::init<const Path&, const AffineTransform&, float>(), \"path\"_a, \"transform\"_a = AffineTransform(), \"tolerance\"_a = Path::defaultToleranceForMeasurement)\n        .def (\"next\", &PathFlatteningIterator::next)\n        .def (\"isLastInSubpath\", &PathFlatteningIterator::isLastInSubpath)\n        .def_readwrite (\"x1\", &PathFlatteningIterator::x1)\n        .def_readwrite (\"y1\", &PathFlatteningIterator::y1)\n        .def_readwrite (\"x2\", &PathFlatteningIterator::x2)\n        .def_readwrite (\"y2\", &PathFlatteningIterator::y2)\n        .def_readwrite (\"closesSubPath\", &PathFlatteningIterator::closesSubPath)\n        .def_readwrite (\"subPathIndex\", &PathFlatteningIterator::subPathIndex)\n    ;\n\n    // ============================================================================================ juce::Path\n\n    py::class_<PathStrokeType> classPathStrokeType (m, \"PathStrokeType\");\n\n    py::enum_<PathStrokeType::JointStyle> (classPathStrokeType, \"JointStyle\")\n        .value (\"mitered\", PathStrokeType::mitered)\n        .value (\"curved\", PathStrokeType::curved)\n        .value (\"beveled\", PathStrokeType::beveled)\n        .export_values();\n\n    py::enum_<PathStrokeType::EndCapStyle> (classPathStrokeType, \"EndCapStyle\")\n        .value (\"butt\", PathStrokeType::butt)\n        .value (\"square\", PathStrokeType::square)\n        .value (\"rounded\", PathStrokeType::rounded)\n        .export_values();\n\n    classPathStrokeType\n        .def (py::init<float>(), \"strokeThickness\"_a)\n        .def (py::init<float, PathStrokeType::JointStyle, PathStrokeType::EndCapStyle>(), \"strokeThickness\"_a, \"jointStyle\"_a, \"endStyle\"_a = PathStrokeType::butt)\n        .def (py::init<const PathStrokeType&>())\n        .def (\"createStrokedPath\", &PathStrokeType::createStrokedPath,\n            \"destPath\"_a, \"sourcePath\"_a, \"transform\"_a = AffineTransform(), \"extraAccuracy\"_a = 1.0f)\n        .def (\"createDashedStroke\", [](const PathStrokeType& self, Path* destPath, const Path& sourcePath, py::list dashLengths, const AffineTransform& transform, float extraAccuracy)\n        {\n            std::vector<float> dashes;\n            dashes.reserve (static_cast<size_t> (dashLengths.size()));\n\n            for (const auto& item : dashLengths)\n                dashes.push_back (item.cast<float>());\n\n            self.createDashedStroke (*destPath, sourcePath, dashes.data(), static_cast<int> (dashes.size()), transform, extraAccuracy);\n        }, \"destPath\"_a, \"sourcePath\"_a, \"dashLengths\"_a, \"transform\"_a = AffineTransform(), \"extraAccuracy\"_a = 1.0f)\n        .def (\"createStrokeWithArrowheads\", &PathStrokeType::createStrokeWithArrowheads,\n            \"destPath\"_a, \"sourcePath\"_a, \"arrowheadStartWidth\"_a, \"arrowheadStartLength\"_a, \"arrowheadEndWidth\"_a, \"arrowheadEndLength\"_a, \"transform\"_a = AffineTransform(), \"extraAccuracy\"_a = 1.0f)\n        .def (\"getStrokeThickness\", &PathStrokeType::getStrokeThickness)\n        .def (\"setStrokeThickness\", &PathStrokeType::setStrokeThickness)\n        .def (\"getJointStyle\", &PathStrokeType::getJointStyle)\n        .def (\"setJointStyle\", &PathStrokeType::setJointStyle)\n        .def (\"getEndStyle\", &PathStrokeType::getEndStyle)\n        .def (\"setEndStyle\", &PathStrokeType::setEndStyle)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    // ============================================================================================ juce::PixelARGB\n\n    py::class_<PixelARGB> classPixelARGB (m, \"PixelARGB\");\n\n    classPixelARGB\n        .def (py::init<>())\n        .def (py::init<uint8, uint8, uint8, uint8>())\n        .def (\"getNativeARGB\", &PixelARGB::getNativeARGB)\n        .def (\"getInARGBMaskOrder\", &PixelARGB::getInARGBMaskOrder)\n        .def (\"getInARGBMemoryOrder\", &PixelARGB::getInARGBMemoryOrder)\n        .def (\"getEvenBytes\", &PixelARGB::getEvenBytes)\n        .def (\"getOddBytes\", &PixelARGB::getOddBytes)\n        .def (\"getAlpha\", &PixelARGB::getAlpha)\n        .def (\"getRed\", &PixelARGB::getRed)\n        .def (\"getGreen\", &PixelARGB::getGreen)\n        .def (\"getBlue\", &PixelARGB::getBlue)\n        .def (\"set\", &PixelARGB::template set<PixelRGB>)\n        .def (\"set\", &PixelARGB::template set<PixelARGB>)\n        .def (\"set\", &PixelARGB::template set<PixelAlpha>)\n        .def (\"setARGB\", &PixelARGB::setARGB)\n        .def (\"blend\", static_cast<void (PixelARGB::*)(PixelRGB)> (&PixelARGB::blend))\n        .def (\"blend\", py::overload_cast<const PixelARGB&> (&PixelARGB::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&> (&PixelARGB::template blend<PixelAlpha>))\n        .def (\"blend\", py::overload_cast<const PixelRGB&, uint32> (&PixelARGB::template blend<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&, uint32> (&PixelARGB::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&, uint32> (&PixelARGB::template blend<PixelAlpha>))\n        .def (\"tween\", py::overload_cast<const PixelRGB&, uint32> (&PixelARGB::template tween<PixelRGB>))\n        .def (\"tween\", py::overload_cast<const PixelARGB&, uint32> (&PixelARGB::template tween<PixelARGB>))\n        .def (\"tween\", py::overload_cast<const PixelAlpha&, uint32> (&PixelARGB::template tween<PixelAlpha>))\n        .def (\"setAlpha\", &PixelARGB::setAlpha)\n        .def (\"multiplyAlpha\", py::overload_cast<int> (&PixelARGB::multiplyAlpha))\n        .def (\"multiplyAlpha\", py::overload_cast<float> (&PixelARGB::multiplyAlpha))\n        .def (\"getUnpremultiplied\", &PixelARGB::getUnpremultiplied)\n        .def (\"premultiply\", &PixelARGB::premultiply)\n        .def (\"unpremultiply\", &PixelARGB::unpremultiply)\n        .def (\"desaturate\", &PixelARGB::desaturate)\n    ;\n\n    classPixelARGB.attr (\"indexA\") = py::int_ (static_cast<int> (PixelARGB::indexA));\n    classPixelARGB.attr (\"indexR\") = py::int_ (static_cast<int> (PixelARGB::indexR));\n    classPixelARGB.attr (\"indexG\") = py::int_ (static_cast<int> (PixelARGB::indexG));\n    classPixelARGB.attr (\"indexB\") = py::int_ (static_cast<int> (PixelARGB::indexB));\n\n    py::class_<PixelRGB> classPixelRGB (m, \"PixelRGB\");\n\n    classPixelRGB\n        .def (py::init<>())\n        .def (py::init ([](uint8 red, uint8 green, uint8 blue)\n        {\n            auto c = PixelRGB();\n            c.setARGB (255, red, green, blue);\n            return c;\n        }))\n        .def (\"getNativeARGB\", &PixelRGB::getNativeARGB)\n        .def (\"getInARGBMaskOrder\", &PixelRGB::getInARGBMaskOrder)\n        .def (\"getInARGBMemoryOrder\", &PixelRGB::getInARGBMemoryOrder)\n        .def (\"getEvenBytes\", &PixelRGB::getEvenBytes)\n        .def (\"getOddBytes\", &PixelRGB::getOddBytes)\n        .def (\"getAlpha\", &PixelRGB::getAlpha)\n        .def (\"getRed\", &PixelRGB::getRed)\n        .def (\"getGreen\", &PixelRGB::getGreen)\n        .def (\"getBlue\", &PixelRGB::getBlue)\n        .def (\"set\", &PixelRGB::template set<PixelRGB>)\n        .def (\"set\", &PixelRGB::template set<PixelARGB>)\n        .def (\"set\", &PixelRGB::template set<PixelAlpha>)\n        .def (\"setARGB\", &PixelRGB::setARGB)\n        .def (\"blend\", static_cast<void (PixelRGB::*)(PixelRGB)> (&PixelRGB::blend))\n        .def (\"blend\", py::overload_cast<const PixelARGB&> (&PixelRGB::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&> (&PixelRGB::template blend<PixelAlpha>))\n        .def (\"blend\", py::overload_cast<const PixelRGB&, uint32> (&PixelRGB::template blend<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&, uint32> (&PixelRGB::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&, uint32> (&PixelRGB::template blend<PixelAlpha>))\n        .def (\"blend\", py::overload_cast<const PixelRGB&, uint32> (&PixelRGB::template tween<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&, uint32> (&PixelRGB::template tween<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&, uint32> (&PixelRGB::template tween<PixelAlpha>))\n        .def (\"tween\", py::overload_cast<const PixelRGB&, uint32> (&PixelRGB::template tween<PixelRGB>))\n        .def (\"tween\", py::overload_cast<const PixelARGB&, uint32> (&PixelRGB::template tween<PixelARGB>))\n        .def (\"tween\", py::overload_cast<const PixelAlpha&, uint32> (&PixelRGB::template tween<PixelAlpha>))\n        .def (\"setAlpha\", &PixelRGB::setAlpha)\n        .def (\"multiplyAlpha\", py::overload_cast<int> (&PixelRGB::multiplyAlpha))\n        .def (\"multiplyAlpha\", py::overload_cast<float> (&PixelRGB::multiplyAlpha))\n        .def (\"premultiply\", &PixelRGB::premultiply)\n        .def (\"unpremultiply\", &PixelRGB::unpremultiply)\n        .def (\"desaturate\", &PixelRGB::desaturate)\n    ;\n\n    classPixelRGB.attr (\"indexR\") = py::int_ (static_cast<int> (PixelRGB::indexR));\n    classPixelRGB.attr (\"indexG\") = py::int_ (static_cast<int> (PixelRGB::indexG));\n    classPixelRGB.attr (\"indexB\") = py::int_ (static_cast<int> (PixelRGB::indexB));\n\n    py::class_<PixelAlpha> classPixelAlpha (m, \"PixelAlpha\");\n\n    classPixelAlpha\n        .def (py::init<>())\n        .def (py::init ([](uint8 alpha) { auto c = PixelAlpha(); c.setAlpha (alpha); return c; }))\n        .def (\"getNativeARGB\", &PixelAlpha::getNativeARGB)\n        .def (\"getInARGBMaskOrder\", &PixelAlpha::getInARGBMaskOrder)\n        .def (\"getInARGBMemoryOrder\", &PixelAlpha::getInARGBMemoryOrder)\n        .def (\"getEvenBytes\", &PixelAlpha::getEvenBytes)\n        .def (\"getOddBytes\", &PixelAlpha::getOddBytes)\n        .def (\"getAlpha\", &PixelAlpha::getAlpha)\n        .def (\"getRed\", &PixelAlpha::getRed)\n        .def (\"getGreen\", &PixelAlpha::getGreen)\n        .def (\"getBlue\", &PixelAlpha::getBlue)\n        .def (\"set\", &PixelAlpha::template set<PixelRGB>)\n        .def (\"set\", &PixelAlpha::template set<PixelARGB>)\n        .def (\"set\", &PixelAlpha::template set<PixelAlpha>)\n        .def (\"setARGB\", &PixelAlpha::setARGB)\n        .def (\"blend\", py::overload_cast<const PixelRGB&> (&PixelAlpha::template blend<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&> (&PixelAlpha::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&> (&PixelAlpha::template blend<PixelAlpha>))\n        .def (\"blend\", py::overload_cast<const PixelRGB&, uint32> (&PixelAlpha::template blend<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&, uint32> (&PixelAlpha::template blend<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&, uint32> (&PixelAlpha::template blend<PixelAlpha>))\n        .def (\"blend\", py::overload_cast<const PixelRGB&, uint32> (&PixelAlpha::template tween<PixelRGB>))\n        .def (\"blend\", py::overload_cast<const PixelARGB&, uint32> (&PixelAlpha::template tween<PixelARGB>))\n        .def (\"blend\", py::overload_cast<const PixelAlpha&, uint32> (&PixelAlpha::template tween<PixelAlpha>))\n        .def (\"tween\", py::overload_cast<const PixelRGB&, uint32> (&PixelAlpha::template tween<PixelRGB>))\n        .def (\"tween\", py::overload_cast<const PixelARGB&, uint32> (&PixelAlpha::template tween<PixelARGB>))\n        .def (\"tween\", py::overload_cast<const PixelAlpha&, uint32> (&PixelAlpha::template tween<PixelAlpha>))\n        .def (\"setAlpha\", &PixelAlpha::setAlpha)\n        .def (\"multiplyAlpha\", py::overload_cast<int> (&PixelAlpha::multiplyAlpha))\n        .def (\"multiplyAlpha\", py::overload_cast<float> (&PixelAlpha::multiplyAlpha))\n        .def (\"premultiply\", &PixelAlpha::premultiply)\n        .def (\"unpremultiply\", &PixelAlpha::unpremultiply)\n        .def (\"desaturate\", &PixelAlpha::desaturate)\n    ;\n\n    classPixelAlpha.attr (\"indexA\") = py::int_ (static_cast<int> (PixelAlpha::indexA));\n\n    // ============================================================================================ juce::Colour\n\n    py::class_<Colour> (m, \"Colour\")\n        .def (py::init<>())\n        .def (py::init<uint32>(), \"argb\"_a.noconvert())\n        .def (py::init<uint8, uint8, uint8>(), \"red\"_a.noconvert(), \"green\"_a.noconvert(), \"blue\"_a.noconvert())\n        .def (py::init<uint8, uint8, uint8, uint8>(), \"red\"_a.noconvert(), \"green\"_a.noconvert(), \"blue\"_a.noconvert(), \"alpha\"_a.noconvert())\n        .def (py::init<uint8, uint8, uint8, float>(), \"red\"_a.noconvert(), \"green\"_a.noconvert(), \"blue\"_a.noconvert(), \"alpha\"_a.noconvert())\n        .def (py::init<float, float, float, uint8>(), \"hue\"_a.noconvert(), \"saturation\"_a.noconvert(), \"brightness\"_a.noconvert(), \"alpha\"_a.noconvert())\n        .def (py::init<float, float, float, float>(), \"hue\"_a.noconvert(), \"saturation\"_a.noconvert(), \"brightness\"_a.noconvert(), \"alpha\"_a.noconvert())\n        .def (py::init<PixelARGB>())\n        .def (py::init<PixelRGB>())\n        .def (py::init<PixelAlpha>())\n        .def (py::init<const Colour&>())\n        .def_static (\"fromRGB\", &Colour::fromRGB)\n        .def_static (\"fromRGBA\", &Colour::fromRGBA)\n        .def_static (\"fromFloatRGBA\", &Colour::fromFloatRGBA)\n        .def_static (\"fromHSV\", &Colour::fromHSV)\n        .def_static (\"fromHSL\", &Colour::fromHSL)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"getRed\", &Colour::getRed)\n        .def (\"getGreen\", &Colour::getGreen)\n        .def (\"getBlue\", &Colour::getBlue)\n        .def (\"getFloatRed\", &Colour::getFloatRed)\n        .def (\"getFloatGreen\", &Colour::getFloatGreen)\n        .def (\"getFloatBlue\", &Colour::getFloatBlue)\n        .def (\"getPixelARGB\", &Colour::getPixelARGB)\n        .def (\"getNonPremultipliedPixelARGB\", &Colour::getNonPremultipliedPixelARGB)\n        .def (\"getARGB\", &Colour::getARGB)\n        .def (\"getAlpha\", &Colour::getAlpha)\n        .def (\"getFloatAlpha\", &Colour::getFloatAlpha)\n        .def (\"isOpaque\", &Colour::isOpaque)\n        .def (\"isTransparent\", &Colour::isTransparent)\n        .def (\"withAlpha\", py::overload_cast<uint8> (&Colour::withAlpha, py::const_), \"alpha\"_a.noconvert())\n        .def (\"withAlpha\", py::overload_cast<float> (&Colour::withAlpha, py::const_), \"alpha\"_a.noconvert())\n        .def (\"withMultipliedAlpha\", &Colour::withMultipliedAlpha)\n        .def (\"overlaidWith\", &Colour::overlaidWith)\n        .def (\"interpolatedWith\", &Colour::interpolatedWith)\n        .def (\"getHue\", &Colour::getHue)\n        .def (\"getSaturation\", &Colour::getSaturation)\n        .def (\"getSaturationHSL\", &Colour::getSaturationHSL)\n        .def (\"getBrightness\", &Colour::getBrightness)\n        .def (\"getLightness\", &Colour::getLightness)\n        .def (\"getPerceivedBrightness\", &Colour::getPerceivedBrightness)\n        .def (\"getHSB\", [](const Colour& self) { float h, s, b; self.getHSB (h, s, b); return py::make_tuple(h, s, b); })\n        .def (\"getHSL\", [](const Colour& self) { float h, s, l; self.getHSL (h, s, l); return py::make_tuple(h, s, l); })\n        .def (\"withHue\", &Colour::withHue)\n        .def (\"withSaturation\", &Colour::withSaturation)\n        .def (\"withSaturationHSL\", &Colour::withSaturationHSL)\n        .def (\"withBrightness\", &Colour::withBrightness)\n        .def (\"withLightness\", &Colour::withLightness)\n        .def (\"withRotatedHue\", &Colour::withRotatedHue)\n        .def (\"withMultipliedSaturation\", &Colour::withMultipliedSaturation)\n        .def (\"withMultipliedSaturationHSL\", &Colour::withMultipliedSaturationHSL)\n        .def (\"withMultipliedBrightness\", &Colour::withMultipliedBrightness)\n        .def (\"withMultipliedLightness\", &Colour::withMultipliedLightness)\n        .def (\"brighter\", &Colour::brighter)\n        .def (\"darker\", &Colour::darker)\n        .def (\"contrasting\", py::overload_cast<float> (&Colour::contrasting, py::const_))\n        .def (\"contrasting\", py::overload_cast<Colour, float> (&Colour::contrasting, py::const_))\n    //.def_static (\"contrasting\", static_cast<Colour (*)(Colour, Colour)>(&Colour::contrasting)) // Not supported by pybind11\n        .def_static (\"greyLevel\", &Colour::greyLevel)\n        .def (\"toString\", &Colour::toString)\n        .def_static (\"fromString\", &Colour::fromString)\n        .def (\"toDisplayString\", &Colour::toDisplayString)\n        .def (\"__repr__\", [](const Colour& self)\n        {\n            String repr;\n            repr\n                << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())\n                << \"(\" << self.getRed() << \", \" << self.getGreen() << \", \" << self.getBlue() << \", \" << self.getAlpha() << \")\";\n            return repr;\n        })\n        .def (\"__str__\", &Colour::toString)\n    ;\n\n    // ============================================================================================ juce::Colour\n\n    py::class_<ColourGradient> (m, \"ColourGradient\")\n        .def (py::init<>())\n        .def (py::init<Colour, float, float, Colour, float, float, bool>(),\n            \"colour1\"_a, \"x1\"_a, \"y1\"_a, \"colour2\"_a, \"x2\"_a, \"y2\"_a, \"isRadial\"_a)\n        .def (py::init<Colour, Point<float>, Colour, Point<float>, bool>(),\n            \"colour1\"_a, \"point1\"_a, \"colour2\"_a, \"point2\"_a, \"isRadial\"_a)\n        .def (py::init<const ColourGradient&>())\n        .def_static (\"vertical\", [](Colour c1, float y1, Colour c2, float y2) { return ColourGradient::vertical (c1, y1, c2, y2); },\n            \"colour1\"_a, \"y1\"_a, \"colour2\"_a, \"y2\"_a)\n        .def_static (\"vertical\", [](Colour top, Colour bottom, Rectangle<int> area) { return ColourGradient::vertical (top, bottom, area); },\n            \"colourTop\"_a, \"colourBottom\"_a, \"area\"_a)\n        .def_static (\"vertical\", [](Colour top, Colour bottom, Rectangle<float> area) { return ColourGradient::vertical (top, bottom, area); },\n            \"colourTop\"_a, \"colourBottom\"_a, \"area\"_a)\n        .def_static (\"horizontal\", [](Colour c1, float x1, Colour c2, float x2) { return ColourGradient::horizontal (c1, x1, c2, x2); },\n            \"colour1\"_a, \"x1\"_a, \"colour2\"_a, \"x2\"_a)\n        .def_static (\"horizontal\", [](Colour left, Colour right, Rectangle<int> area) { return ColourGradient::horizontal (left, right, area); },\n            \"colourLeft\"_a, \"colourRight\"_a, \"area\"_a)\n        .def_static (\"horizontal\", [](Colour left, Colour right, Rectangle<float> area) { return ColourGradient::horizontal (left, right, area); },\n            \"colourLeft\"_a, \"colourRight\"_a, \"area\"_a)\n        .def (\"clearColours\", &ColourGradient::clearColours)\n        .def (\"addColour\", &ColourGradient::addColour, \"proportionAlongGradient\"_a, \"colour\"_a)\n        .def (\"removeColour\", &ColourGradient::removeColour, \"index\"_a)\n        .def (\"multiplyOpacity\", &ColourGradient::multiplyOpacity, \"multiplier\"_a)\n        .def (\"getNumColours\", &ColourGradient::getNumColours)\n        .def (\"getColourPosition\", &ColourGradient::getColourPosition, \"index\"_a)\n        .def (\"getColour\", &ColourGradient::getColour, \"index\"_a)\n        .def (\"setColour\", &ColourGradient::setColour, \"index\"_a, \"colour\"_a)\n        .def (\"getColourAtPosition\", &ColourGradient::getColourAtPosition, \"position\"_a)\n    //.def (\"createLookupTable\", &ColourGradient::createLookupTable)\n    //.def (\"createLookupTable\", &ColourGradient::createLookupTable)\n        .def (\"isOpaque\", &ColourGradient::isOpaque)\n        .def (\"isInvisible\", &ColourGradient::isInvisible)\n        .def_readwrite (\"point1\", &ColourGradient::point1)\n        .def_readwrite (\"point2\", &ColourGradient::point2)\n        .def_readwrite (\"isRadial\", &ColourGradient::isRadial)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    // ============================================================================================ juce::Image\n\n    py::class_<Image> classImage (m, \"Image\");\n\n    py::enum_<Image::PixelFormat> (classImage, \"PixelFormat\")\n        .value (\"UnknownFormat\", Image::PixelFormat::UnknownFormat)\n        .value (\"RGB\", Image::PixelFormat::RGB)\n        .value (\"ARGB\", Image::PixelFormat::ARGB)\n        .value (\"SingleChannel\", Image::PixelFormat::SingleChannel)\n        .export_values();\n\n    py::class_<Image::BitmapData> classImageBitmapData (classImage, \"BitmapData\", py::buffer_protocol());\n\n    py::enum_<Image::BitmapData::ReadWriteMode> (classImageBitmapData, \"ReadWriteMode\")\n        .value (\"readOnly\", Image::BitmapData::ReadWriteMode::readOnly)\n        .value (\"writeOnly\", Image::BitmapData::ReadWriteMode::writeOnly)\n        .value (\"readWrite\", Image::BitmapData::ReadWriteMode::readWrite)\n        .export_values();\n\n    classImageBitmapData\n        .def (py::init<Image&, int, int, int, int, Image::BitmapData::ReadWriteMode>())\n        .def (py::init<const Image&, int, int, int, int>())\n        .def (py::init<const Image&, Image::BitmapData::ReadWriteMode>())\n        .def (\"getLinePointer\", [](const Image::BitmapData& self, int y)\n            { return py::memoryview::from_memory (self.getLinePointer(y), static_cast<Py_ssize_t> (self.size) - y * self.lineStride); })\n        .def (\"getPixelPointer\", [](const Image::BitmapData& self, int x, int y)\n            { return py::memoryview::from_memory (self.getPixelPointer(x, y), static_cast<Py_ssize_t> (self.size) - (y * self.lineStride + x * self.pixelStride)); })\n        .def (\"getPixelColour\", &Image::BitmapData::getPixelColour)\n        .def (\"setPixelColour\", &Image::BitmapData::setPixelColour)\n        .def (\"getBounds\", &Image::BitmapData::getBounds)\n        .def_property (\"data\",\n            [](const Image::BitmapData& self)\n                { return py::memoryview::from_memory (self.data, static_cast<Py_ssize_t> (self.size)); },\n            [](Image::BitmapData& self, py::buffer data)\n                { auto info = data.request(); std::memcpy (self.data, info.ptr, static_cast<size_t> (std::min (info.size, static_cast<Py_ssize_t> (self.size)))); })\n        .def_readwrite (\"size\", &Image::BitmapData::size)\n        .def_readwrite (\"pixelFormat\", &Image::BitmapData::pixelFormat)\n        .def_readwrite (\"lineStride\", &Image::BitmapData::lineStride)\n        .def_readwrite (\"pixelStride\", &Image::BitmapData::pixelStride)\n        .def_readwrite (\"width\", &Image::BitmapData::width)\n        .def_readwrite (\"height\", &Image::BitmapData::height)\n        .def_buffer ([](Image::BitmapData& self)\n        {\n            return py::buffer_info\n            (\n                self.data,\n                sizeof (unsigned char),\n                py::format_descriptor<unsigned char>::format(),\n                self.pixelStride,\n                {\n                    self.height,\n                    self.width,\n                    self.pixelStride\n                },\n                {\n                    sizeof (unsigned char) * static_cast<size_t> (self.pixelStride) * static_cast<size_t> (self.width),\n                    sizeof (unsigned char) * static_cast<size_t> (self.pixelStride),\n                    sizeof (unsigned char)\n                }\n            );\n        });\n    ;\n\n    classImage\n        .def (py::init<>())\n        .def (py::init<Image::PixelFormat, int, int, bool>())\n        .def (py::init<Image::PixelFormat, int, int, bool, const ImageType&>())\n        .def (py::init<const Image&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"isValid\", &Image::isValid)\n        .def (\"isNull\", &Image::isNull)\n        .def (\"getWidth\", &Image::getWidth)\n        .def (\"getHeight\", &Image::getHeight)\n        .def (\"getBounds\", &Image::getBounds)\n        .def (\"getFormat\", &Image::getFormat)\n        .def (\"isARGB\", &Image::isARGB)\n        .def (\"isRGB\", &Image::isRGB)\n        .def (\"isSingleChannel\", &Image::isSingleChannel)\n        .def (\"hasAlphaChannel\", &Image::hasAlphaChannel)\n        .def (\"clear\", &Image::clear)\n        .def (\"rescaled\", &Image::rescaled)\n        .def (\"createCopy\", &Image::createCopy)\n        .def (\"convertedToFormat\", &Image::convertedToFormat)\n        .def (\"duplicateIfShared\", &Image::duplicateIfShared)\n        .def (\"getClippedImage\", &Image::getClippedImage)\n        .def (\"getPixelAt\", &Image::getPixelAt)\n        .def (\"setPixelAt\", &Image::setPixelAt)\n        .def (\"multiplyAlphaAt\", &Image::multiplyAlphaAt)\n        .def (\"multiplyAllAlphas\", &Image::multiplyAllAlphas)\n        .def (\"desaturate\", &Image::desaturate)\n        .def (\"moveImageSection\", &Image::moveImageSection)\n        .def (\"createSolidAreaMask\", &Image::createSolidAreaMask)\n        .def (\"getProperties\", &Image::getProperties, py::return_value_policy::reference_internal)\n    //.def (\"createLowLevelContext\", &Image::createLowLevelContext)\n        .def (\"getReferenceCount\", &Image::getReferenceCount)\n        .def (\"getPixelData\", &Image::getPixelData, py::return_value_policy::reference_internal)\n    ;\n\n    // ============================================================================================ juce::ImagePixelData\n\n    py::class_<ImagePixelData> classImagePixelData (m, \"ImagePixelData\");\n\n    classImagePixelData\n    //.def (py::init<Image::PixelFormat, int, int>())\n    //.def (\"createLowLevelContext\", &ImagePixelData::createLowLevelContext)\n    //.def (\"clone\", &ImagePixelData::clone)\n    //.def (\"createType\", &ImagePixelData::createType)\n    //.def (\"initialiseBitmapData\", &ImagePixelData::initialiseBitmapData)\n        .def (\"getSharedCount\", &ImagePixelData::getSharedCount)\n        .def_readonly (\"pixelFormat\", &ImagePixelData::pixelFormat)\n        .def_readonly (\"width\", &ImagePixelData::width)\n        .def_readonly (\"height\", &ImagePixelData::height)\n        .def_readwrite (\"userData\", &ImagePixelData::userData)\n    //.def_readwrite (\"listeners\", &ImagePixelData::listeners)\n        .def (\"sendDataChangeMessage\", &ImagePixelData::sendDataChangeMessage)\n    ;\n\n    // ============================================================================================ juce::ImageType\n\n    py::class_<ImageType, PyImageType> classImageType (m, \"ImageType\");\n\n    classImageType\n        .def (py::init<>())\n        .def (\"create\", &ImageType::create)\n        .def (\"getTypeID\", &ImageType::getTypeID)\n        .def (\"convert\", &ImageType::convert)\n    ;\n\n    py::class_<SoftwareImageType, ImageType> classSoftwareImageType (m, \"SoftwareImageType\");\n\n    classSoftwareImageType\n        .def (py::init<>())\n    ;\n\n    py::class_<NativeImageType, ImageType> classNativeImageType (m, \"NativeImageType\");\n\n    classNativeImageType\n        .def (py::init<>())\n    ;\n\n    // ============================================================================================ juce::ImageCache\n\n    py::class_<ImageCache, std::unique_ptr<ImageCache, py::nodelete>> classImageCache (m, \"ImageCache\");\n\n    classImageCache\n        .def_static (\"getFromFile\", &ImageCache::getFromFile)\n        .def_static (\"getFromMemory\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return ImageCache::getFromMemory (info.ptr, static_cast<int> (info.size));\n        })\n        .def_static (\"getFromHashCode\", &ImageCache::getFromHashCode)\n        .def_static (\"addImageToCache\", &ImageCache::addImageToCache)\n        .def_static (\"setCacheTimeout\", &ImageCache::setCacheTimeout)\n        .def_static (\"releaseUnusedImages\", &ImageCache::releaseUnusedImages)\n    ;\n\n    // ============================================================================================ juce::ImageCache\n\n    py::class_<ImageFileFormat, PyImageFileFormat> classImageFileFormat (m, \"ImageFileFormat\");\n\n    classImageFileFormat\n        .def (py::init<>())\n        .def (\"getFormatName\", &ImageFileFormat::getFormatName)\n        .def (\"canUnderstand\", &ImageFileFormat::canUnderstand)\n        .def (\"usesFileExtension\", &ImageFileFormat::usesFileExtension)\n        .def (\"decodeImage\", &ImageFileFormat::decodeImage)\n        .def (\"writeImageToStream\", &ImageFileFormat::writeImageToStream)\n        .def_static (\"findImageFormatForStream\", &ImageFileFormat::findImageFormatForStream, py::return_value_policy::reference_internal)\n        .def_static (\"findImageFormatForFileExtension\", &ImageFileFormat::findImageFormatForFileExtension, py::return_value_policy::reference_internal)\n        .def_static (\"loadFrom\", static_cast<Image (*)(InputStream&)> (&ImageFileFormat::loadFrom))\n        .def_static (\"loadFrom\", static_cast<Image (*)(const File&)> (&ImageFileFormat::loadFrom))\n        .def_static (\"loadFrom\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return ImageFileFormat::loadFrom (info.ptr, static_cast<size_t> (info.size));\n        })\n    ;\n\n    py::class_<PNGImageFormat, ImageFileFormat> classPNGImageFormat (m, \"PNGImageFormat\");\n    classPNGImageFormat\n        .def (py::init<>());\n\n    py::class_<JPEGImageFormat, ImageFileFormat> classJPEGImageFormat (m, \"JPEGImageFormat\");\n    classJPEGImageFormat\n        .def (py::init<>());\n\n    py::class_<GIFImageFormat, ImageFileFormat> classGIFImageFormat (m, \"GIFImageFormat\");\n    classGIFImageFormat\n        .def (py::init<>());\n\n    // ============================================================================================ juce::ScaledImage\n\n    py::class_<ScaledImage> classScaledImage (m, \"ScaledImage\");\n\n    classScaledImage\n        .def (py::init<>())\n        .def (py::init<const Image&>())\n        .def (py::init<const Image&, double>())\n        .def (py::init<const ScaledImage&>())\n        .def (\"getImage\", &ScaledImage::getImage)\n        .def (\"getScale\", &ScaledImage::getScale)\n        .def (\"getScaledBounds\", &ScaledImage::getScaledBounds)\n    ;\n\n    // ============================================================================================ juce::ScaledImage\n\n    py::class_<ImageConvolutionKernel> classImageConvolutionKernel (m, \"ImageConvolutionKernel\");\n\n    classImageConvolutionKernel\n        .def (py::init<int>(), \"size\"_a)\n        .def (\"clear\", &ImageConvolutionKernel::clear)\n        .def (\"getKernelValue\", &ImageConvolutionKernel::getKernelValue)\n        .def (\"setKernelValue\", &ImageConvolutionKernel::setKernelValue)\n        .def (\"setOverallSum\", &ImageConvolutionKernel::setOverallSum)\n        .def (\"rescaleAllValues\", &ImageConvolutionKernel::rescaleAllValues)\n        .def (\"createGaussianBlur\", &ImageConvolutionKernel::createGaussianBlur)\n        .def (\"getKernelSize\", &ImageConvolutionKernel::getKernelSize)\n        .def (\"applyToImage\", &ImageConvolutionKernel::applyToImage)\n    ;\n\n    // ============================================================================================ juce::Font\n\n    py::class_<Font> classFont (m, \"Font\");\n    py::class_<FontOptions> classFontOptions (m, \"FontOptions\");\n\n    Helpers::makeArithmeticEnum<Font::FontStyleFlags> (classFont, \"FontStyleFlags\")\n        .value (\"plain\", Font::FontStyleFlags::plain)\n        .value (\"bold\", Font::FontStyleFlags::bold)\n        .value (\"italic\", Font::FontStyleFlags::italic)\n        .value (\"underlined\", Font::FontStyleFlags::underlined)\n        .export_values();\n\n    classFontOptions\n        .def (py::init<>())\n        .def (py::init<float>(), \"fontHeight\"_a)\n        .def (py::init<float, int>(), \"fontHeight\"_a, \"styleFlags\"_a = Font::plain)\n        .def (py::init<float, Font::FontStyleFlags>(), \"fontHeight\"_a, \"styleFlags\"_a)\n        .def (py::init<const String&, float, Font::FontStyleFlags>(), \"typefaceName\"_a, \"fontHeight\"_a, \"styleFlags\"_a)\n        .def (py::init<const String&, const String&, float>(), \"typefaceName\"_a, \"typefaceStyle\"_a, \"styleFlags\"_a)\n    //.def (py::init<const Typeface::Ptr&>())\n        .def (py::init<const FontOptions&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self < py::self)\n        .def (py::self <= py::self)\n        .def (py::self > py::self)\n        .def (py::self >= py::self)\n        .def (\"withName\", &FontOptions::withName)\n        .def (\"withStyle\", &FontOptions::withStyle)\n        .def (\"withTypeface\", &FontOptions::withTypeface)\n        .def (\"withFallbacks\", &FontOptions::withFallbacks)\n        .def (\"withFallbackEnabled\", &FontOptions::withFallbackEnabled, \"x\"_a = true)\n        .def (\"withHeight\", &FontOptions::withHeight, \"x\"_a)\n        .def (\"withPointHeight\", &FontOptions::withPointHeight, \"x\"_a)\n        .def (\"withKerningFactor\", &FontOptions::withKerningFactor, \"x\"_a)\n        .def (\"withHorizontalScale\", &FontOptions::withHorizontalScale, \"x\"_a)\n        .def (\"withUnderline\", &FontOptions::withUnderline, \"x\"_a = true)\n    //.def (\"withMetricsKind\", &FontOptions::withMetricsKind)\n        .def (\"getName\", &FontOptions::getName)\n        .def (\"getStyle\", &FontOptions::getStyle)\n        .def (\"getTypeface\", &FontOptions::getTypeface)\n        .def (\"getFallbacks\", &FontOptions::getFallbacks)\n        .def (\"getHeight\", &FontOptions::getHeight)\n        .def (\"getPointHeight\", &FontOptions::getPointHeight)\n        .def (\"getKerningFactor\", &FontOptions::getKerningFactor)\n        .def (\"getHorizontalScale\", &FontOptions::getHorizontalScale)\n        .def (\"getFallbackEnabled\", &FontOptions::getFallbackEnabled)\n        .def (\"getUnderline\", &FontOptions::getUnderline)\n    //.def (\"getMetricsKind\", &FontOptions::getMetricsKind)\n    ;\n\n    classFont\n        .def (py::init<FontOptions>(), \"fontOptions\"_a)\n        .def (py::init<const Font&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"setTypefaceName\", &Font::setTypefaceName)\n        .def (\"getTypefaceName\", &Font::getTypefaceName)\n        .def (\"getTypefaceStyle\", &Font::getTypefaceStyle)\n        .def (\"setTypefaceStyle\", &Font::setTypefaceStyle)\n        .def (\"withTypefaceStyle\", &Font::withTypefaceStyle)\n        .def_static (\"getDefaultSansSerifFontName\", &Font::getDefaultSansSerifFontName)\n        .def_static (\"getDefaultSerifFontName\", &Font::getDefaultSerifFontName)\n        .def_static (\"getDefaultMonospacedFontName\", &Font::getDefaultMonospacedFontName)\n        .def_static (\"getDefaultStyle\", &Font::getDefaultStyle)\n        .def (\"withHeight\", &Font::withHeight)\n        .def (\"withPointHeight\", &Font::withPointHeight)\n        .def (\"setHeight\", &Font::setHeight)\n        .def (\"setHeightWithoutChangingWidth\", &Font::setHeightWithoutChangingWidth)\n        .def (\"getHeight\", &Font::getHeight)\n        .def (\"getHeightInPoints\", &Font::getHeightInPoints)\n        .def (\"getAscent\", &Font::getAscent)\n        .def (\"getAscentInPoints\", &Font::getAscentInPoints)\n        .def (\"getDescent\", &Font::getDescent)\n        .def (\"getDescentInPoints\", &Font::getDescentInPoints)\n        .def (\"getStyleFlags\", &Font::getStyleFlags)\n        .def (\"withStyle\", &Font::withStyle)\n        .def (\"withStyle\", [](const Font& self, Font::FontStyleFlags flags) { return self.withStyle (static_cast<int> (flags)); })\n        .def (\"setStyleFlags\", &Font::setStyleFlags)\n        .def (\"setStyleFlags\", [](Font& self, Font::FontStyleFlags flags) { self.setStyleFlags (static_cast<int> (flags)); })\n        .def (\"setBold\", &Font::setBold)\n        .def (\"boldened\", &Font::boldened)\n        .def (\"isBold\", &Font::isBold)\n        .def (\"setItalic\", &Font::setItalic)\n        .def (\"italicised\", &Font::italicised)\n        .def (\"isItalic\", &Font::isItalic)\n        .def (\"setUnderline\", &Font::setUnderline)\n        .def (\"isUnderlined\", &Font::isUnderlined)\n        .def (\"getHorizontalScale\", &Font::getHorizontalScale)\n        .def (\"withHorizontalScale\", &Font::withHorizontalScale)\n        .def (\"setHorizontalScale\", &Font::setHorizontalScale)\n        .def_static (\"getDefaultMinimumHorizontalScaleFactor\", &Font::getDefaultMinimumHorizontalScaleFactor)\n        .def_static (\"setDefaultMinimumHorizontalScaleFactor\", &Font::setDefaultMinimumHorizontalScaleFactor)\n        .def (\"getExtraKerningFactor\", &Font::getExtraKerningFactor)\n        .def (\"withExtraKerningFactor\", &Font::withExtraKerningFactor)\n        .def (\"setExtraKerningFactor\", &Font::setExtraKerningFactor)\n        .def (\"setSizeAndStyle\", py::overload_cast<float, int, float, float> (&Font::setSizeAndStyle))\n        .def (\"setSizeAndStyle\", [](Font& self, float newHeight, Font::FontStyleFlags newStyleFlags, float newHorizontalScale, float newKerningAmount)\n        {\n            self.setSizeAndStyle (newHeight, static_cast<int> (newStyleFlags), newHorizontalScale, newKerningAmount);\n        })\n        .def (\"setSizeAndStyle\", py::overload_cast<float, const String&, float, float> (&Font::setSizeAndStyle))\n        .def (\"getStringWidth\", &Font::getStringWidth)\n        .def (\"getStringWidthFloat\", &Font::getStringWidthFloat)\n    //.def (\"getGlyphPositions\", &Font::getGlyphPositions)\n    //.def (\"getTypefacePtr\", &Font::getTypefacePtr)\n    //.def_static (\"findFonts\", &Font::findFonts)\n        .def_static (\"findAllTypefaceNames\", &Font::findAllTypefaceNames)\n        .def_static (\"findAllTypefaceStyles\", &Font::findAllTypefaceStyles)\n    //.def_static (\"getFallbackFontName\", &Font::getFallbackFontName)\n    //.def_static (\"setFallbackFontName\", &Font::setFallbackFontName)\n    //.def_static (\"getFallbackFontStyle\", &Font::getFallbackFontStyle)\n    //.def_static (\"setFallbackFontStyle\", &Font::setFallbackFontStyle)\n        .def (\"toString\", &Font::toString)\n        .def_static (\"fromString\", &Font::fromString)\n        .def (\"__repr__\", [](const Font& self)\n        {\n            String repr;\n            repr << Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name()) << \"('\" << self.toString() << \")\";\n            return repr;\n        })\n        .def (\"__str__\", &Font::toString)\n    ;\n\n    // ============================================================================================ juce::AttributedString\n\n    py::class_<AttributedString> classAttributedString (m, \"AttributedString\");\n\n    py::enum_<AttributedString::WordWrap> (classAttributedString, \"WordWrap\")\n        .value(\"none\", AttributedString::WordWrap::none)\n        .value(\"byWord\", AttributedString::WordWrap::byWord)\n        .value(\"byChar\", AttributedString::WordWrap::byChar)\n        .export_values();\n\n    py::enum_<AttributedString::ReadingDirection> (classAttributedString, \"ReadingDirection\")\n        .value(\"natural\", AttributedString::ReadingDirection::natural)\n        .value(\"leftToRight\", AttributedString::ReadingDirection::leftToRight)\n        .value(\"rightToLeft\", AttributedString::ReadingDirection::rightToLeft)\n        .export_values();\n\n    py::class_<AttributedString::Attribute> (classAttributedString, \"Attribute\")\n        .def (py::init<>())\n        .def (py::init<Range<int>, const Font&, Colour>())\n        .def (py::init<const AttributedString::Attribute&>())\n        .def_readwrite (\"range\", &AttributedString::Attribute::range)\n        .def_readwrite (\"font\", &AttributedString::Attribute::font)\n        .def_readwrite (\"colour\", &AttributedString::Attribute::colour)\n    ;\n\n    classAttributedString\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (py::init<const AttributedString&>())\n        .def (\"getText\", &AttributedString::getText)\n        .def (\"setText\", &AttributedString::setText)\n        .def (\"append\", py::overload_cast<const String&> (&AttributedString::append))\n        .def (\"append\", py::overload_cast<const String&, const Font&> (&AttributedString::append))\n        .def (\"append\", py::overload_cast<const String&, Colour> (&AttributedString::append))\n        .def (\"append\", py::overload_cast<const String&, const Font&, Colour> (&AttributedString::append))\n        .def (\"append\", py::overload_cast<const AttributedString&> (&AttributedString::append))\n        .def (\"clear\", &AttributedString::clear)\n        .def (\"draw\", &AttributedString::draw)\n        .def (\"getJustification\", &AttributedString::getJustification)\n        .def (\"getWordWrap\", &AttributedString::getWordWrap)\n        .def (\"setWordWrap\", &AttributedString::setWordWrap)\n        .def (\"getReadingDirection\", &AttributedString::getReadingDirection)\n        .def (\"setReadingDirection\", &AttributedString::setReadingDirection)\n        .def (\"getLineSpacing\", &AttributedString::getLineSpacing)\n        .def (\"setLineSpacing\", &AttributedString::setLineSpacing)\n        .def (\"getNumAttributes\", &AttributedString::getNumAttributes)\n        .def (\"getAttribute\", &AttributedString::getAttribute, py::return_value_policy::reference)\n        .def (\"setColour\", py::overload_cast<Range<int>, Colour> (&AttributedString::setColour))\n        .def (\"setColour\", py::overload_cast<Colour> (&AttributedString::setColour))\n        .def (\"setFont\", py::overload_cast<Range<int>, const Font&> (&AttributedString::setFont))\n        .def (\"setFont\", py::overload_cast<const Font&> (&AttributedString::setFont))\n    ;\n\n    // ============================================================================================ juce::FillType\n\n    py::class_<FillType> classFillType (m, \"FillType\");\n\n    classFillType\n        .def (py::init<>())\n        .def (py::init<Colour>())\n        .def (py::init<const ColourGradient&>())\n        .def (py::init<const Image&, const AffineTransform&>())\n        .def (py::init<const FillType&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"isColour\", &FillType::isColour)\n        .def (\"isGradient\", &FillType::isGradient)\n        .def (\"isTiledImage\", &FillType::isTiledImage)\n        .def (\"setColour\", &FillType::setColour)\n        .def (\"setGradient\", &FillType::setGradient)\n        .def (\"setTiledImage\", &FillType::setTiledImage)\n        .def (\"setOpacity\", &FillType::setOpacity)\n        .def (\"getOpacity\", &FillType::getOpacity)\n        .def (\"isInvisible\", &FillType::isInvisible)\n        .def (\"transformed\", &FillType::transformed)\n        .def_readwrite(\"colour\", &FillType::colour)\n        .def_property(\"gradient\",\n                      [](const FillType& self) { return self.gradient.get(); },\n                      [](FillType& self, ColourGradient* v) { self.gradient.reset(); if (v != nullptr) self.gradient = std::make_unique<ColourGradient>(*v); },\n                      py::return_value_policy::reference_internal)\n        .def_readwrite(\"image\", &FillType::image)\n        .def_readwrite(\"transform\", &FillType::transform)\n    ;\n\n    // ============================================================================================ juce::RectanglePlacement\n\n    py::class_<RectanglePlacement> classRectanglePlacement (m, \"RectanglePlacement\");\n\n    Helpers::makeArithmeticEnum<RectanglePlacement::Flags> (classRectanglePlacement, \"Flags\")\n        .value (\"xLeft\", RectanglePlacement::Flags::xLeft)\n        .value (\"xRight\", RectanglePlacement::Flags::xRight)\n        .value (\"xMid\", RectanglePlacement::Flags::xMid)\n        .value (\"yTop\", RectanglePlacement::Flags::yTop)\n        .value (\"yBottom\", RectanglePlacement::Flags::yBottom)\n        .value (\"yMid\", RectanglePlacement::Flags::yMid)\n        .value (\"stretchToFit\", RectanglePlacement::Flags::stretchToFit)\n        .value (\"fillDestination\", RectanglePlacement::Flags::fillDestination)\n        .value (\"onlyReduceInSize\", RectanglePlacement::Flags::onlyReduceInSize)\n        .value (\"onlyIncreaseInSize\", RectanglePlacement::Flags::onlyIncreaseInSize)\n        .value (\"doNotResize\", RectanglePlacement::Flags::doNotResize)\n        .value (\"centred\", RectanglePlacement::Flags::centred)\n        .export_values();\n\n    classRectanglePlacement\n        .def (py::init<>())\n        .def (py::init<int>())\n        .def (py::init<RectanglePlacement::Flags>())\n        .def (py::init<const RectanglePlacement&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"getFlags\", &RectanglePlacement::getFlags)\n        .def (\"testFlags\", &RectanglePlacement::testFlags)\n        .def (\"testFlags\", [](const RectanglePlacement& self, RectanglePlacement::Flags flags) { return self.testFlags (static_cast<int> (flags)); })\n        .def (\"applyTo\", [](const RectanglePlacement& self, double& sourceX, double& sourceY, double& sourceW, double& sourceH, double destinationX, double destinationY, double destinationW, double destinationH)\n        {\n            self.applyTo (sourceX, sourceY, sourceW, sourceH, destinationX, destinationY, destinationW, destinationH);\n            return py::make_tuple (sourceX, sourceY, sourceW, sourceH);\n        })\n        .def (\"appliedTo\", &RectanglePlacement::template appliedTo<int>)\n        .def (\"appliedTo\", &RectanglePlacement::template appliedTo<float>)\n        .def (\"getTransformToFit\", &RectanglePlacement::getTransformToFit)\n    ;\n\n    py::implicitly_convertible<RectanglePlacement::Flags, RectanglePlacement>();\n\n    // ============================================================================================ juce::LowLevelGraphicsContext\n\n    py::class_<LowLevelGraphicsContext, PyLowLevelGraphicsContext<>> classLowLevelGraphicsContext (m, \"LowLevelGraphicsContext\");\n\n    classLowLevelGraphicsContext\n        .def (py::init<>())\n        // TODO\n    ;\n\n    // ============================================================================================ juce::LowLevelGraphicsSoftwareRenderer\n\n    py::class_<LowLevelGraphicsSoftwareRenderer, LowLevelGraphicsContext, PyLowLevelGraphicsContext<LowLevelGraphicsSoftwareRenderer>>\n        classLowLevelGraphicsSoftwareRenderer (m, \"LowLevelGraphicsSoftwareRenderer\");\n\n    classLowLevelGraphicsSoftwareRenderer\n        .def (py::init<const Image&>(), \"imageToRenderOnto\"_a)\n        .def (py::init<const Image&, Point<int>, const RectangleList<int>&>(), \"imageToRenderOnto\"_a, \"origin\"_a, \"initialClip\"_a)\n    ;\n\n    // ============================================================================================ juce::Graphics\n\n    py::class_<Graphics> classGraphics (m, \"Graphics\");\n\n    py::enum_<Graphics::ResamplingQuality> (classGraphics, \"ResamplingQuality\")\n        .value(\"lowResamplingQuality\", Graphics::ResamplingQuality::lowResamplingQuality)\n        .value(\"mediumResamplingQuality\", Graphics::ResamplingQuality::mediumResamplingQuality)\n        .value(\"highResamplingQuality\", Graphics::ResamplingQuality::highResamplingQuality)\n        .export_values();\n\n    classGraphics\n        .def (py::init<const Image&>())\n        .def (py::init<LowLevelGraphicsContext&>())\n        .def (\"setColour\", &Graphics::setColour)\n        .def (\"setOpacity\", &Graphics::setOpacity)\n        .def (\"setGradientFill\", py::overload_cast<const ColourGradient&> (&Graphics::setGradientFill))\n        .def (\"setTiledImageFill\", &Graphics::setTiledImageFill)\n        .def (\"setFillType\", &Graphics::setFillType)\n        .def (\"setFont\", py::overload_cast<const Font&>(&Graphics::setFont))\n        .def (\"setFont\", py::overload_cast<float>(&Graphics::setFont))\n        .def (\"getCurrentFont\", &Graphics::getCurrentFont)\n        .def (\"drawSingleLineText\", &Graphics::drawSingleLineText,\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"justification\"_a = Justification::left)\n        .def (\"drawSingleLineText\", [](const Graphics& g, const String& text, int startX, int baselineY, Justification::Flags justification)\n            { g.drawSingleLineText (text, startX, baselineY, justification); },\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"justification\"_a = Justification::left)\n        .def (\"drawSingleLineText\", [](const Graphics& g, const String& text, int startX, int baselineY, int justification)\n            { g.drawSingleLineText (text, startX, baselineY, justification); },\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"justification\"_a = Justification::left)\n        .def (\"drawMultiLineText\", &Graphics::drawMultiLineText,\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"maximumLineWidth\"_a, \"justification\"_a = Justification::left, \"loading\"_a = 0.0f)\n        .def (\"drawMultiLineText\", [](const Graphics& g, const String& text, int startX, int baselineY, int maximumLineWidth, Justification::Flags justification, float leading)\n            { g.drawMultiLineText (text, startX, baselineY, maximumLineWidth, justification, leading); },\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"maximumLineWidth\"_a, \"justification\"_a = Justification::left, \"loading\"_a = 0.0f)\n        .def (\"drawMultiLineText\", [](const Graphics& g, const String& text, int startX, int baselineY, int maximumLineWidth, int justification, float leading)\n            { g.drawMultiLineText (text, startX, baselineY, maximumLineWidth, justification, leading); },\n            \"text\"_a, \"startX\"_a, \"baselineY\"_a, \"maximumLineWidth\"_a, \"justification\"_a = Justification::left, \"loading\"_a = 0.0f)\n        .def (\"drawText\", py::overload_cast<const String&, int, int, int, int, Justification, bool> (&Graphics::drawText, py::const_),\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, int x, int y, int width, int height, Justification::Flags justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, x, y, width, height, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, int x, int y, int width, int height, int justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, x, y, width, height, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", py::overload_cast<const String&, Rectangle<int>, Justification, bool> (&Graphics::drawText, py::const_),\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, Rectangle<int> area, Justification::Flags justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, area, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, Rectangle<int> area, int justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, area, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", py::overload_cast<const String&, Rectangle<float>, Justification, bool> (&Graphics::drawText, py::const_),\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, Rectangle<float> area, Justification::Flags justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, area, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawText\", [](const Graphics& g, const String& text, Rectangle<float> area, int justificationType, bool useEllipsesIfTooBig)\n            { g.drawText (text, area, justificationType, useEllipsesIfTooBig); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"useEllipsesIfTooBig\"_a = true)\n        .def (\"drawFittedText\", py::overload_cast<const String&, int, int, int, int, Justification, int, float> (&Graphics::drawFittedText, py::const_),\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"drawFittedText\", [](const Graphics& g, const String& text, int x, int y, int width, int height, Justification::Flags justificationType, int maximumNumberOfLines, float minimumHorizontalScale)\n            { g.drawFittedText (text, x, y, width, height, justificationType, maximumNumberOfLines, minimumHorizontalScale); },\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"drawFittedText\", [](const Graphics& g, const String& text, int x, int y, int width, int height, int justificationType, int maximumNumberOfLines, float minimumHorizontalScale)\n            { g.drawFittedText (text, x, y, width, height, justificationType, maximumNumberOfLines, minimumHorizontalScale); },\n            \"text\"_a, \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"drawFittedText\", py::overload_cast<const String&, Rectangle<int>, Justification, int, float> (&Graphics::drawFittedText, py::const_),\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"drawFittedText\", [](const Graphics& g, const String& text, Rectangle<int> area, Justification::Flags justificationType, int maximumNumberOfLines, float minimumHorizontalScale)\n            { g.drawFittedText (text, area, justificationType, maximumNumberOfLines, minimumHorizontalScale); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"drawFittedText\", [](const Graphics& g, const String& text, Rectangle<int> area, int justificationType, int maximumNumberOfLines, float minimumHorizontalScale)\n            { g.drawFittedText (text, area, justificationType, maximumNumberOfLines, minimumHorizontalScale); },\n            \"text\"_a, \"area\"_a, \"justificationType\"_a, \"maximumNumberOfLines\"_a, \"minimumHorizontalScale\"_a = 0.0f)\n        .def (\"fillAll\", py::overload_cast<> (&Graphics::fillAll, py::const_))\n        .def (\"fillAll\", py::overload_cast<Colour> (&Graphics::fillAll, py::const_))\n        .def (\"fillRect\", py::overload_cast<Rectangle<int>> (&Graphics::fillRect, py::const_))\n        .def (\"fillRect\", py::overload_cast<Rectangle<float>> (&Graphics::fillRect, py::const_))\n        .def (\"fillRect\", py::overload_cast<int, int, int, int> (&Graphics::fillRect, py::const_))\n        .def (\"fillRect\", py::overload_cast<float, float, float, float> (&Graphics::fillRect, py::const_))\n        .def (\"fillRectList\", py::overload_cast<const RectangleList<float>&> (&Graphics::fillRectList, py::const_))\n        .def (\"fillRectList\", py::overload_cast<const RectangleList<int>&> (&Graphics::fillRectList, py::const_))\n        .def (\"fillRoundedRectangle\", py::overload_cast<float, float, float, float, float> (&Graphics::fillRoundedRectangle, py::const_))\n        .def (\"fillRoundedRectangle\", py::overload_cast<Rectangle<float>, float> (&Graphics::fillRoundedRectangle, py::const_))\n        .def (\"fillCheckerBoard\", &Graphics::fillCheckerBoard)\n        .def (\"drawRect\", py::overload_cast<int, int, int, int, int> (&Graphics::drawRect, py::const_), \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"lineThickness\"_a = 1)\n        .def (\"drawRect\", py::overload_cast<float, float, float, float, float> (&Graphics::drawRect, py::const_), \"x\"_a, \"y\"_a, \"width\"_a, \"height\"_a, \"lineThickness\"_a = 1.0f)\n        .def (\"drawRect\", py::overload_cast<Rectangle<int>, int> (&Graphics::drawRect, py::const_), \"rectangle\"_a, \"lineThickness\"_a = 1)\n        .def (\"drawRect\", py::overload_cast<Rectangle<float>, float> (&Graphics::drawRect, py::const_), \"rectangle\"_a, \"lineThickness\"_a = 1.0f)\n        .def (\"drawRoundedRectangle\", py::overload_cast<float, float, float, float, float, float> (&Graphics::drawRoundedRectangle, py::const_))\n        .def (\"drawRoundedRectangle\", py::overload_cast<Rectangle<float>, float, float> (&Graphics::drawRoundedRectangle, py::const_))\n        .def (\"fillEllipse\", py::overload_cast<float, float, float, float> (&Graphics::fillEllipse, py::const_))\n        .def (\"fillEllipse\", py::overload_cast<Rectangle<float>> (&Graphics::fillEllipse, py::const_))\n        .def (\"drawEllipse\", py::overload_cast<float, float, float, float, float> (&Graphics::drawEllipse, py::const_))\n        .def (\"drawEllipse\", py::overload_cast<Rectangle<float>, float> (&Graphics::drawEllipse, py::const_))\n        .def (\"drawLine\", py::overload_cast<float, float, float, float> (&Graphics::drawLine, py::const_))\n        .def (\"drawLine\", py::overload_cast<float, float, float, float, float> (&Graphics::drawLine, py::const_))\n        .def (\"drawLine\", py::overload_cast<Line<float>> (&Graphics::drawLine, py::const_))\n        .def (\"drawLine\", py::overload_cast<Line<float>, float> (&Graphics::drawLine, py::const_))\n    //.def (\"drawDashedLine\", &Graphics::drawDashedLine\n    //, \"line\"_a, \"dashLengths\"_a, \"numDashLengths\"_a, \"lineThickness\"_a = 1.0f, \"dashIndexToStartFrom\"_a = 0)\n        .def (\"drawVerticalLine\", &Graphics::drawVerticalLine)\n        .def (\"drawHorizontalLine\", &Graphics::drawHorizontalLine)\n        .def (\"fillPath\", py::overload_cast<const Path&> (&Graphics::fillPath, py::const_))\n        .def (\"fillPath\", py::overload_cast<const Path&, const AffineTransform&> (&Graphics::fillPath, py::const_))\n        .def (\"strokePath\", &Graphics::strokePath, \"path\"_a, \"strokeType\"_a, \"transform\"_a = AffineTransform())\n        .def (\"drawArrow\", &Graphics::drawArrow)\n        .def (\"setImageResamplingQuality\", &Graphics::setImageResamplingQuality)\n        .def (\"drawImageAt\", &Graphics::drawImageAt, \"imageToDraw\"_a, \"topLeftX\"_a, \"topLeftY\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImage\", py::overload_cast<const Image&, int, int, int, int, int, int, int, int, bool> (&Graphics::drawImage, py::const_),\n            \"imageToDraw\"_a, \"destX\"_a, \"destY\"_a, \"destWidth\"_a, \"destHeight\"_a, \"sourceX\"_a, \"sourceY\"_a, \"sourceWidth\"_a, \"sourceHeight\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImageTransformed\", &Graphics::drawImageTransformed, \"imageToDraw\"_a, \"transform\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImage\", py::overload_cast<const Image&, Rectangle<float>, RectanglePlacement, bool> (&Graphics::drawImage, py::const_),\n            \"imageToDraw\"_a, \"targetArea\"_a, \"placementWithinTarget\"_a = RectanglePlacement::stretchToFit, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImage\", [](const Graphics& g, const Image& imageToDraw, Rectangle<float> targetArea, RectanglePlacement::Flags placementWithinTarget, bool fillAlphaChannelWithCurrentBrush)\n            { g.drawImage (imageToDraw, targetArea, placementWithinTarget, fillAlphaChannelWithCurrentBrush); },\n            \"imageToDraw\"_a, \"targetArea\"_a, \"placementWithinTarget\"_a = RectanglePlacement::stretchToFit, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImage\", [](const Graphics& g, const Image& imageToDraw, Rectangle<float> targetArea, int placementWithinTarget, bool fillAlphaChannelWithCurrentBrush)\n            { g.drawImage (imageToDraw, targetArea, placementWithinTarget, fillAlphaChannelWithCurrentBrush); },\n            \"imageToDraw\"_a, \"targetArea\"_a, \"placementWithinTarget\"_a = RectanglePlacement::stretchToFit, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImageWithin\", &Graphics::drawImageWithin,\n            \"imageToDraw\"_a, \"destX\"_a, \"destY\"_a, \"destWidth\"_a, \"destHeight\"_a, \"placementWithinTarget\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImageWithin\", [](const Graphics& g, const Image& imageToDraw, float destX, float destY, float destWidth, float destHeight, RectanglePlacement::Flags placementWithinTarget, bool fillAlphaChannelWithCurrentBrush)\n            { g.drawImageWithin (imageToDraw, destX, destY, destWidth, destHeight, placementWithinTarget, fillAlphaChannelWithCurrentBrush); },\n            \"imageToDraw\"_a, \"destX\"_a, \"destY\"_a, \"destWidth\"_a, \"destHeight\"_a, \"placementWithinTarget\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"drawImageWithin\", [](const Graphics& g, const Image& imageToDraw, float destX, float destY, float destWidth, float destHeight, int placementWithinTarget, bool fillAlphaChannelWithCurrentBrush)\n            { g.drawImageWithin (imageToDraw, destX, destY, destWidth, destHeight, placementWithinTarget, fillAlphaChannelWithCurrentBrush); },\n            \"imageToDraw\"_a, \"destX\"_a, \"destY\"_a, \"destWidth\"_a, \"destHeight\"_a, \"placementWithinTarget\"_a, \"fillAlphaChannelWithCurrentBrush\"_a = false)\n        .def (\"getClipBounds\", &Graphics::getClipBounds)\n        .def (\"clipRegionIntersects\", &Graphics::clipRegionIntersects)\n        .def (\"reduceClipRegion\", py::overload_cast<int, int, int, int> (&Graphics::reduceClipRegion))\n        .def (\"reduceClipRegion\", py::overload_cast<Rectangle<int>> (&Graphics::reduceClipRegion))\n        .def (\"reduceClipRegion\", py::overload_cast<const RectangleList<int>&> (&Graphics::reduceClipRegion))\n        .def (\"reduceClipRegion\", py::overload_cast<const Path&, const AffineTransform&> (&Graphics::reduceClipRegion), \"path\"_a, \"transform\"_a = AffineTransform())\n        .def (\"reduceClipRegion\", py::overload_cast<const Image&, const AffineTransform&> (&Graphics::reduceClipRegion))\n        .def (\"excludeClipRegion\", &Graphics::excludeClipRegion)\n        .def (\"isClipEmpty\", &Graphics::isClipEmpty)\n        .def (\"saveState\", &Graphics::saveState)\n        .def (\"restoreState\", &Graphics::restoreState)\n        .def (\"beginTransparencyLayer\", &Graphics::beginTransparencyLayer)\n        .def (\"endTransparencyLayer\", &Graphics::endTransparencyLayer)\n        .def (\"setOrigin\", py::overload_cast<Point<int>> (&Graphics::setOrigin))\n        .def (\"setOrigin\", py::overload_cast<int, int> (&Graphics::setOrigin))\n        .def (\"addTransform\", &Graphics::addTransform)\n        .def (\"resetToDefaultState\", &Graphics::resetToDefaultState)\n        .def (\"isVectorDevice\", &Graphics::isVectorDevice)\n    ;\n\n    struct PyGraphicsScopedSaveState\n    {\n        PyGraphicsScopedSaveState (Graphics& g)\n            : g (g)\n        {\n        }\n\n        Graphics& g;\n        std::variant<std::monostate, Graphics::ScopedSaveState> state;\n    };\n\n    py::class_<PyGraphicsScopedSaveState> (classGraphics, \"ScopedSaveState\")\n        .def (py::init<Graphics&>())\n        .def (\"__enter__\", [](PyGraphicsScopedSaveState& self)\n        {\n            self.state.emplace<Graphics::ScopedSaveState> (self.g);\n        })\n        .def (\"__exit__\", [](PyGraphicsScopedSaveState& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.state.emplace<std::monostate>();\n        })\n    ;\n\n    // ============================================================================================ juce::Colours\n\n    auto submoduleColours = m.def_submodule (\"Colours\");\n    submoduleColours.def (\"findColourForName\", &Colours::findColourForName);\n    submoduleColours.attr (\"transparentBlack\") = Colours::transparentBlack;\n    submoduleColours.attr (\"transparentWhite\") = Colours::transparentWhite;\n    submoduleColours.attr (\"aliceblue\") = Colours::aliceblue;\n    submoduleColours.attr (\"antiquewhite\") = Colours::antiquewhite;\n    submoduleColours.attr (\"aqua\") = Colours::aqua;\n    submoduleColours.attr (\"aquamarine\") = Colours::aquamarine;\n    submoduleColours.attr (\"azure\") = Colours::azure;\n    submoduleColours.attr (\"beige\") = Colours::beige;\n    submoduleColours.attr (\"bisque\") = Colours::bisque;\n    submoduleColours.attr (\"black\") = Colours::black;\n    submoduleColours.attr (\"blanchedalmond\") = Colours::blanchedalmond;\n    submoduleColours.attr (\"blue\") = Colours::blue;\n    submoduleColours.attr (\"blueviolet\") = Colours::blueviolet;\n    submoduleColours.attr (\"brown\") = Colours::brown;\n    submoduleColours.attr (\"burlywood\") = Colours::burlywood;\n    submoduleColours.attr (\"cadetblue\") = Colours::cadetblue;\n    submoduleColours.attr (\"chartreuse\") = Colours::chartreuse;\n    submoduleColours.attr (\"chocolate\") = Colours::chocolate;\n    submoduleColours.attr (\"coral\") = Colours::coral;\n    submoduleColours.attr (\"cornflowerblue\") = Colours::cornflowerblue;\n    submoduleColours.attr (\"cornsilk\") = Colours::cornsilk;\n    submoduleColours.attr (\"crimson\") = Colours::crimson;\n    submoduleColours.attr (\"cyan\") = Colours::cyan;\n    submoduleColours.attr (\"darkblue\") = Colours::darkblue;\n    submoduleColours.attr (\"darkcyan\") = Colours::darkcyan;\n    submoduleColours.attr (\"darkgoldenrod\") = Colours::darkgoldenrod;\n    submoduleColours.attr (\"darkgrey\") = Colours::darkgrey;\n    submoduleColours.attr (\"darkgreen\") = Colours::darkgreen;\n    submoduleColours.attr (\"darkkhaki\") = Colours::darkkhaki;\n    submoduleColours.attr (\"darkmagenta\") = Colours::darkmagenta;\n    submoduleColours.attr (\"darkolivegreen\") = Colours::darkolivegreen;\n    submoduleColours.attr (\"darkorange\") = Colours::darkorange;\n    submoduleColours.attr (\"darkorchid\") = Colours::darkorchid;\n    submoduleColours.attr (\"darkred\") = Colours::darkred;\n    submoduleColours.attr (\"darksalmon\") = Colours::darksalmon;\n    submoduleColours.attr (\"darkseagreen\") = Colours::darkseagreen;\n    submoduleColours.attr (\"darkslateblue\") = Colours::darkslateblue;\n    submoduleColours.attr (\"darkslategrey\") = Colours::darkslategrey;\n    submoduleColours.attr (\"darkturquoise\") = Colours::darkturquoise;\n    submoduleColours.attr (\"darkviolet\") = Colours::darkviolet;\n    submoduleColours.attr (\"deeppink\") = Colours::deeppink;\n    submoduleColours.attr (\"deepskyblue\") = Colours::deepskyblue;\n    submoduleColours.attr (\"dimgrey\") = Colours::dimgrey;\n    submoduleColours.attr (\"dodgerblue\") = Colours::dodgerblue;\n    submoduleColours.attr (\"firebrick\") = Colours::firebrick;\n    submoduleColours.attr (\"floralwhite\") = Colours::floralwhite;\n    submoduleColours.attr (\"forestgreen\") = Colours::forestgreen;\n    submoduleColours.attr (\"fuchsia\") = Colours::fuchsia;\n    submoduleColours.attr (\"gainsboro\") = Colours::gainsboro;\n    submoduleColours.attr (\"ghostwhite\") = Colours::ghostwhite;\n    submoduleColours.attr (\"gold\") = Colours::gold;\n    submoduleColours.attr (\"goldenrod\") = Colours::goldenrod;\n    submoduleColours.attr (\"grey\") = Colours::grey;\n    submoduleColours.attr (\"green\") = Colours::green;\n    submoduleColours.attr (\"greenyellow\") = Colours::greenyellow;\n    submoduleColours.attr (\"honeydew\") = Colours::honeydew;\n    submoduleColours.attr (\"hotpink\") = Colours::hotpink;\n    submoduleColours.attr (\"indianred\") = Colours::indianred;\n    submoduleColours.attr (\"indigo\") = Colours::indigo;\n    submoduleColours.attr (\"ivory\") = Colours::ivory;\n    submoduleColours.attr (\"khaki\") = Colours::khaki;\n    submoduleColours.attr (\"lavender\") = Colours::lavender;\n    submoduleColours.attr (\"lavenderblush\") = Colours::lavenderblush;\n    submoduleColours.attr (\"lawngreen\") = Colours::lawngreen;\n    submoduleColours.attr (\"lemonchiffon\") = Colours::lemonchiffon;\n    submoduleColours.attr (\"lightblue\") = Colours::lightblue;\n    submoduleColours.attr (\"lightcoral\") = Colours::lightcoral;\n    submoduleColours.attr (\"lightcyan\") = Colours::lightcyan;\n    submoduleColours.attr (\"lightgoldenrodyellow\") = Colours::lightgoldenrodyellow;\n    submoduleColours.attr (\"lightgreen\") = Colours::lightgreen;\n    submoduleColours.attr (\"lightgrey\") = Colours::lightgrey;\n    submoduleColours.attr (\"lightpink\") = Colours::lightpink;\n    submoduleColours.attr (\"lightsalmon\") = Colours::lightsalmon;\n    submoduleColours.attr (\"lightseagreen\") = Colours::lightseagreen;\n    submoduleColours.attr (\"lightskyblue\") = Colours::lightskyblue;\n    submoduleColours.attr (\"lightslategrey\") = Colours::lightslategrey;\n    submoduleColours.attr (\"lightsteelblue\") = Colours::lightsteelblue;\n    submoduleColours.attr (\"lightyellow\") = Colours::lightyellow;\n    submoduleColours.attr (\"lime\") = Colours::lime;\n    submoduleColours.attr (\"limegreen\") = Colours::limegreen;\n    submoduleColours.attr (\"linen\") = Colours::linen;\n    submoduleColours.attr (\"magenta\") = Colours::magenta;\n    submoduleColours.attr (\"maroon\") = Colours::maroon;\n    submoduleColours.attr (\"mediumaquamarine\") = Colours::mediumaquamarine;\n    submoduleColours.attr (\"mediumblue\") = Colours::mediumblue;\n    submoduleColours.attr (\"mediumorchid\") = Colours::mediumorchid;\n    submoduleColours.attr (\"mediumpurple\") = Colours::mediumpurple;\n    submoduleColours.attr (\"mediumseagreen\") = Colours::mediumseagreen;\n    submoduleColours.attr (\"mediumslateblue\") = Colours::mediumslateblue;\n    submoduleColours.attr (\"mediumspringgreen\") = Colours::mediumspringgreen;\n    submoduleColours.attr (\"mediumturquoise\") = Colours::mediumturquoise;\n    submoduleColours.attr (\"mediumvioletred\") = Colours::mediumvioletred;\n    submoduleColours.attr (\"midnightblue\") = Colours::midnightblue;\n    submoduleColours.attr (\"mintcream\") = Colours::mintcream;\n    submoduleColours.attr (\"mistyrose\") = Colours::mistyrose;\n    submoduleColours.attr (\"moccasin\") = Colours::moccasin;\n    submoduleColours.attr (\"navajowhite\") = Colours::navajowhite;\n    submoduleColours.attr (\"navy\") = Colours::navy;\n    submoduleColours.attr (\"oldlace\") = Colours::oldlace;\n    submoduleColours.attr (\"olive\") = Colours::olive;\n    submoduleColours.attr (\"olivedrab\") = Colours::olivedrab;\n    submoduleColours.attr (\"orange\") = Colours::orange;\n    submoduleColours.attr (\"orangered\") = Colours::orangered;\n    submoduleColours.attr (\"orchid\") = Colours::orchid;\n    submoduleColours.attr (\"palegoldenrod\") = Colours::palegoldenrod;\n    submoduleColours.attr (\"palegreen\") = Colours::palegreen;\n    submoduleColours.attr (\"paleturquoise\") = Colours::paleturquoise;\n    submoduleColours.attr (\"palevioletred\") = Colours::palevioletred;\n    submoduleColours.attr (\"papayawhip\") = Colours::papayawhip;\n    submoduleColours.attr (\"peachpuff\") = Colours::peachpuff;\n    submoduleColours.attr (\"peru\") = Colours::peru;\n    submoduleColours.attr (\"pink\") = Colours::pink;\n    submoduleColours.attr (\"plum\") = Colours::plum;\n    submoduleColours.attr (\"powderblue\") = Colours::powderblue;\n    submoduleColours.attr (\"purple\") = Colours::purple;\n    submoduleColours.attr (\"rebeccapurple\") = Colours::rebeccapurple;\n    submoduleColours.attr (\"red\") = Colours::red;\n    submoduleColours.attr (\"rosybrown\") = Colours::rosybrown;\n    submoduleColours.attr (\"royalblue\") = Colours::royalblue;\n    submoduleColours.attr (\"saddlebrown\") = Colours::saddlebrown;\n    submoduleColours.attr (\"salmon\") = Colours::salmon;\n    submoduleColours.attr (\"sandybrown\") = Colours::sandybrown;\n    submoduleColours.attr (\"seagreen\") = Colours::seagreen;\n    submoduleColours.attr (\"seashell\") = Colours::seashell;\n    submoduleColours.attr (\"sienna\") = Colours::sienna;\n    submoduleColours.attr (\"silver\") = Colours::silver;\n    submoduleColours.attr (\"skyblue\") = Colours::skyblue;\n    submoduleColours.attr (\"slateblue\") = Colours::slateblue;\n    submoduleColours.attr (\"slategrey\") = Colours::slategrey;\n    submoduleColours.attr (\"snow\") = Colours::snow;\n    submoduleColours.attr (\"springgreen\") = Colours::springgreen;\n    submoduleColours.attr (\"steelblue\") = Colours::steelblue;\n    submoduleColours.attr (\"tan\") = Colours::tan;\n    submoduleColours.attr (\"teal\") = Colours::teal;\n    submoduleColours.attr (\"thistle\") = Colours::thistle;\n    submoduleColours.attr (\"tomato\") = Colours::tomato;\n    submoduleColours.attr (\"turquoise\") = Colours::turquoise;\n    submoduleColours.attr (\"violet\") = Colours::violet;\n    submoduleColours.attr (\"wheat\") = Colours::wheat;\n    submoduleColours.attr (\"white\") = Colours::white;\n    submoduleColours.attr (\"whitesmoke\") = Colours::whitesmoke;\n    submoduleColours.attr (\"yellow\") = Colours::yellow;\n    submoduleColours.attr (\"yellowgreen\") = Colours::yellowgreen;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGraphicsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_graphics\n #error This binding file requires adding the juce_graphics module in the project\n#else\n #include <juce_core/juce_core.h>\n\n JUCE_BEGIN_IGNORE_WARNINGS_MSVC(4244)\n #include <juce_graphics/juce_graphics.h>\n JUCE_END_IGNORE_WARNINGS_MSVC\n#endif\n\n#include \"../utilities/PyBind11Includes.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceGraphicsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\nstruct PyImageType : juce::ImageType\n{\n    juce::ImagePixelData::Ptr create (juce::Image::PixelFormat format, int width, int height, bool shouldClearImage) const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::ImagePixelData::Ptr, juce::ImageType, create, format, width, height, shouldClearImage);\n    }\n\n    int getTypeID() const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::ImageType, getTypeID);\n    }\n\n    juce::Image convert (const juce::Image& source) const override\n    {\n        PYBIND11_OVERRIDE (juce::Image, juce::ImageType, convert, source);\n    }\n};\n\n// =================================================================================================\n\nstruct PyImageFileFormat : juce::ImageFileFormat\n{\n    using juce::ImageFileFormat::ImageFileFormat;\n\n    juce::String getFormatName() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::String, juce::ImageFileFormat, getFormatName);\n    }\n\n    bool canUnderstand (juce::InputStream& input) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::ImageFileFormat, canUnderstand, input);\n    }\n\n    bool usesFileExtension (const juce::File& possibleFile) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::ImageFileFormat, usesFileExtension, possibleFile);\n    }\n\n    juce::Image decodeImage (juce::InputStream& input) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Image, juce::ImageFileFormat, decodeImage, input);\n    }\n\n    bool writeImageToStream (const juce::Image& sourceImage, juce::OutputStream& destStream) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::ImageFileFormat, writeImageToStream, sourceImage, destStream);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::LowLevelGraphicsContext>\nstruct PyLowLevelGraphicsContext : Base\n{\n    using Base::Base;\n\n    bool isVectorDevice() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isVectorDevice);\n    }\n\n    void setOrigin (juce::Point<int> origin) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setOrigin, origin);\n    }\n\n    void addTransform (const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, addTransform, transform);\n    }\n\n    float getPhysicalPixelScaleFactor() const override\n    {\n        PYBIND11_OVERRIDE_PURE (float, Base, getPhysicalPixelScaleFactor);\n    }\n\n    bool clipToRectangle (const juce::Rectangle<int>& rect) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, clipToRectangle, rect);\n    }\n\n    bool clipToRectangleList (const juce::RectangleList<int>& rects) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, clipToRectangleList, rects);\n    }\n\n    void excludeClipRectangle (const juce::Rectangle<int>& rect) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, excludeClipRectangle, rect);\n    }\n\n    void clipToPath (const juce::Path& path, const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, clipToPath, path, transform);\n    }\n\n    void clipToImageAlpha (const juce::Image& image, const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, clipToImageAlpha, image, transform);\n    }\n\n    bool clipRegionIntersects (const juce::Rectangle<int>& rect) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, clipRegionIntersects, rect);\n    }\n\n    juce::Rectangle<int> getClipBounds() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Rectangle<int>, Base, getClipBounds);\n    }\n\n    bool isClipEmpty() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isClipEmpty);\n    }\n\n    void saveState() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, saveState);\n    }\n\n    void restoreState() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, restoreState);\n    }\n\n    void beginTransparencyLayer (float opacity) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, beginTransparencyLayer, opacity);\n    }\n\n    void endTransparencyLayer() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, endTransparencyLayer);\n    }\n\n    void setFill (const juce::FillType& fill) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setFill, fill);\n    }\n\n    void setOpacity (float opacity) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setOpacity, opacity);\n    }\n\n    void setInterpolationQuality (juce::Graphics::ResamplingQuality quality) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setInterpolationQuality, quality);\n    }\n\n    void fillAll() override\n    {\n        PYBIND11_OVERRIDE (void, Base, fillAll);\n    }\n\n    void fillRect (const juce::Rectangle<int>& rect, bool replaceExistingContents) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, fillRect, rect, replaceExistingContents);\n    }\n\n    void fillRect (const juce::Rectangle<float>& rect) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, fillRect, rect);\n    }\n\n    void fillRectList (const juce::RectangleList<float>& rects) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, fillRectList, rects);\n    }\n\n    void fillPath (const juce::Path& path, const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, fillPath, path, transform);\n    }\n\n    void drawImage (const juce::Image& image, const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, drawImage, image, transform);\n    }\n\n    void drawLine (const juce::Line<float>& line) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, drawLine, line);\n    }\n\n    void setFont (const juce::Font& font) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setFont, font);\n    }\n\n    const juce::Font& getFont() override\n    {\n        PYBIND11_OVERRIDE_PURE (const juce::Font&, Base, getFont);\n    }\n\n    void drawGlyphs (juce::Span<const uint16_t> glyphs,\n                     juce::Span<const juce::Point<float>> glyphsPositions,\n                     const juce::AffineTransform& transform) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, drawGlyphs, glyphs, glyphsPositions, transform);\n    }\n\n    uint64_t getFrameId() const override\n    {\n        PYBIND11_OVERRIDE_PURE (uint64_t, Base, getFrameId);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceGuiBasicsBindings.h\"\n#include \"../scripting/ScriptBindings.h\"\n#include \"../utilities/ClassDemangling.h\"\n\n#include <string_view>\n#include <typeinfo>\n#include <tuple>\n\n// =================================================================================================\n\nnamespace PYBIND11_NAMESPACE {\n\ntemplate <>\nstruct polymorphic_type_hook<juce::Component>\n{\n    static const void* get (const juce::Component* src, const std::type_info*& type)\n    {\n        if (src == nullptr)\n            return src;\n\n        auto& map = popsicle::Bindings::getComponentTypeMap();\n        auto demangledName = popsicle::Helpers::demangleClassName (typeid (*src).name());\n\n        auto it = map.typeMap.find (demangledName);\n        if (it != map.typeMap.end())\n            return it->second (src, type);\n\n        return src;\n    }\n};\n\n} // namespace PYBIND11_NAMESPACE\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceGuiBasicsBindings (py::module_& m)\n{\n    // ============================================================================================ juce::JUCEApplication\n\n    py::class_<JUCEApplication, PyJUCEApplication> classJUCEApplication (m, \"JUCEApplication\");\n\n    classJUCEApplication\n        .def (py::init<>())\n        .def_static (\"getInstance\", &JUCEApplication::getInstance, py::return_value_policy::reference)\n        .def (\"getApplicationName\", &JUCEApplication::getApplicationName)\n        .def (\"getApplicationVersion\", &JUCEApplication::getApplicationVersion)\n        .def (\"moreThanOneInstanceAllowed\", &JUCEApplication::moreThanOneInstanceAllowed)\n        .def (\"initialise\", &JUCEApplication::initialise, \"commandLineParameters\"_a)\n        .def (\"shutdown\", &JUCEApplication::shutdown)\n        .def (\"anotherInstanceStarted\", &JUCEApplication::anotherInstanceStarted)\n        .def (\"systemRequestedQuit\", &JUCEApplication::systemRequestedQuit)\n        .def (\"suspended\", &JUCEApplication::suspended)\n        .def (\"resumed\", &JUCEApplication::resumed)\n        .def (\"unhandledException\", &JUCEApplication::unhandledException)\n        .def (\"memoryWarningReceived\", &JUCEApplication::memoryWarningReceived)\n        .def_static (\"quit\", &JUCEApplication::quit)\n        .def_static (\"getCommandLineParameterArray\", &JUCEApplication::getCommandLineParameterArray)\n        .def_static (\"getCommandLineParameters\", &JUCEApplication::getCommandLineParameters)\n        .def (\"setApplicationReturnValue\", [](JUCEApplication& self, int value) { self.setApplicationReturnValue (value); })\n        .def (\"getApplicationReturnValue\", [](const JUCEApplication& self) { return self.getApplicationReturnValue(); })\n        .def_static (\"isStandaloneApp\", &JUCEApplication::isStandaloneApp)\n        .def (\"isInitialising\", &JUCEApplication::isInitialising)\n    ;\n\n    // ============================================================================================ juce::ModifierKeys\n\n    py::class_<ModifierKeys> classModifierKeys (m, \"ModifierKeys\");\n\n    Helpers::makeArithmeticEnum<ModifierKeys::Flags> (classModifierKeys, \"Flags\")\n        .value (\"noModifiers\", ModifierKeys::Flags::noModifiers)\n        .value (\"shiftModifier\", ModifierKeys::Flags::shiftModifier)\n        .value (\"ctrlModifier\", ModifierKeys::Flags::ctrlModifier)\n        .value (\"altModifier\", ModifierKeys::Flags::altModifier)\n        .value (\"leftButtonModifier\", ModifierKeys::Flags::leftButtonModifier)\n        .value (\"rightButtonModifier\", ModifierKeys::Flags::rightButtonModifier)\n        .value (\"middleButtonModifier\", ModifierKeys::Flags::middleButtonModifier)\n        .value (\"commandModifier\", ModifierKeys::Flags::commandModifier)\n        .value (\"popupMenuClickModifier\", ModifierKeys::Flags::popupMenuClickModifier)\n        .value (\"allKeyboardModifiers\", ModifierKeys::Flags::allKeyboardModifiers)\n        .value (\"allMouseButtonModifiers\", ModifierKeys::Flags::allMouseButtonModifiers)\n        .value (\"ctrlAltCommandModifiers\", ModifierKeys::Flags::ctrlAltCommandModifiers)\n        .export_values();\n\n    classModifierKeys\n        .def (py::init<>())\n        .def (py::init<int>())\n        .def (py::init<ModifierKeys::Flags>())\n        .def (py::init<const ModifierKeys&>())\n        .def (\"isCommandDown\", &ModifierKeys::isCommandDown)\n        .def (\"isPopupMenu\", &ModifierKeys::isPopupMenu)\n        .def (\"isLeftButtonDown\", &ModifierKeys::isLeftButtonDown)\n        .def (\"isRightButtonDown\", &ModifierKeys::isRightButtonDown)\n        .def (\"isMiddleButtonDown\", &ModifierKeys::isMiddleButtonDown)\n        .def (\"isAnyMouseButtonDown\", &ModifierKeys::isAnyMouseButtonDown)\n        .def (\"isAnyModifierKeyDown\", &ModifierKeys::isAnyModifierKeyDown)\n        .def (\"isShiftDown\", &ModifierKeys::isShiftDown)\n        .def (\"isCtrlDown\", &ModifierKeys::isCtrlDown)\n        .def (\"isAltDown\", &ModifierKeys::isAltDown)\n        .def (\"withOnlyMouseButtons\", &ModifierKeys::withOnlyMouseButtons)\n        .def (\"withoutMouseButtons\", &ModifierKeys::withoutMouseButtons)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (\"getRawFlags\", &ModifierKeys::getRawFlags)\n        .def (\"withoutFlags\", &ModifierKeys::withoutFlags)\n        .def (\"withoutFlags\", [](const ModifierKeys& self, ModifierKeys::Flags flags) { return self.withoutFlags (static_cast<int> (flags)); })\n        .def (\"withFlags\", &ModifierKeys::withFlags)\n        .def (\"withFlags\", [](const ModifierKeys& self, ModifierKeys::Flags flags) { return self.withFlags (static_cast<int> (flags)); })\n        .def (\"testFlags\", &ModifierKeys::testFlags)\n        .def (\"testFlags\", [](const ModifierKeys& self, ModifierKeys::Flags flags) { return self.testFlags (static_cast<int> (flags)); })\n        .def (\"getNumMouseButtonsDown\", &ModifierKeys::getNumMouseButtonsDown)\n        .def_readonly_static (\"currentModifiers\", &ModifierKeys::currentModifiers, py::return_value_policy::copy)\n        .def_static (\"getCurrentModifiers\", &ModifierKeys::getCurrentModifiers)\n        .def_static (\"getCurrentModifiersRealtime\", &ModifierKeys::getCurrentModifiersRealtime)\n    ;\n\n    // ============================================================================================ juce::KeyPress\n\n    py::class_<KeyPress> classKeyPress (m, \"KeyPress\");\n\n    classKeyPress\n        .def (py::init<>())\n        .def (py::init<int>(), \"keyCode\"_a)\n        .def (py::init ([](char keyCode) { return KeyPress (static_cast<int> (keyCode)); }), \"keyCode\"_a)\n        .def (py::init ([](int keyCode, int modifiers, char32_t textCharacter)\n            { return new KeyPress (keyCode, static_cast<ModifierKeys> (modifiers), static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init ([](int keyCode, ModifierKeys modifiers, char32_t textCharacter)\n            { return new KeyPress (keyCode, modifiers, static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init ([](int keyCode, ModifierKeys::Flags modifiers, char32_t textCharacter)\n            { return new KeyPress (keyCode, modifiers, static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init ([](char keyCode, int modifiers, char32_t textCharacter)\n            { return new KeyPress (static_cast<int> (keyCode), modifiers, static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init ([](char keyCode, ModifierKeys modifiers, char32_t textCharacter)\n            { return new KeyPress (static_cast<int> (keyCode), modifiers, static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init ([](char keyCode, ModifierKeys::Flags modifiers, char32_t textCharacter)\n            { return new KeyPress (static_cast<int> (keyCode), modifiers, static_cast<juce_wchar> (textCharacter)); }), \"keyCode\"_a, \"modifiers\"_a, \"textCharacter\"_a)\n        .def (py::init<const KeyPress&>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self == int())\n        .def (py::self != int())\n        .def (\"isValid\", &KeyPress::isValid)\n        .def (\"getKeyCode\", &KeyPress::getKeyCode)\n        .def (\"getModifiers\", &KeyPress::getModifiers)\n        .def (\"getTextCharacter\", [](const KeyPress& self) { return static_cast<char32_t> (self.getTextCharacter()); })\n        .def (\"isKeyCode\", &KeyPress::isKeyCode)\n        .def_static (\"createFromDescription\", &KeyPress::createFromDescription)\n        .def (\"getTextDescription\", &KeyPress::getTextDescription)\n        .def (\"getTextDescriptionWithIcons\", &KeyPress::getTextDescriptionWithIcons)\n        .def (\"isCurrentlyDown\", &KeyPress::isCurrentlyDown)\n        .def_static (\"isKeyCurrentlyDown\", &KeyPress::isKeyCurrentlyDown)\n    ;\n\n    classKeyPress.attr (\"spaceKey\") = py::int_ (KeyPress::spaceKey);\n    classKeyPress.attr (\"escapeKey\") = py::int_ (KeyPress::escapeKey);\n    classKeyPress.attr (\"returnKey\") = py::int_ (KeyPress::returnKey);\n    classKeyPress.attr (\"tabKey\") = py::int_ (KeyPress::tabKey);\n    classKeyPress.attr (\"deleteKey\") = py::int_ (KeyPress::deleteKey);\n    classKeyPress.attr (\"backspaceKey\") = py::int_ (KeyPress::backspaceKey);\n    classKeyPress.attr (\"insertKey\") = py::int_ (KeyPress::insertKey);\n    classKeyPress.attr (\"upKey\") = py::int_ (KeyPress::upKey);\n    classKeyPress.attr (\"downKey\") = py::int_ (KeyPress::downKey);\n    classKeyPress.attr (\"leftKey\") = py::int_ (KeyPress::leftKey);\n    classKeyPress.attr (\"rightKey\") = py::int_ (KeyPress::rightKey);\n    classKeyPress.attr (\"pageUpKey\") = py::int_ (KeyPress::pageUpKey);\n    classKeyPress.attr (\"pageDownKey\") = py::int_ (KeyPress::pageDownKey);\n    classKeyPress.attr (\"homeKey\") = py::int_ (KeyPress::homeKey);\n    classKeyPress.attr (\"endKey\") = py::int_ (KeyPress::endKey);\n    classKeyPress.attr (\"F1Key\") = py::int_ (KeyPress::F1Key);\n    classKeyPress.attr (\"F2Key\") = py::int_ (KeyPress::F2Key);\n    classKeyPress.attr (\"F3Key\") = py::int_ (KeyPress::F3Key);\n    classKeyPress.attr (\"F4Key\") = py::int_ (KeyPress::F4Key);\n    classKeyPress.attr (\"F5Key\") = py::int_ (KeyPress::F5Key);\n    classKeyPress.attr (\"F6Key\") = py::int_ (KeyPress::F6Key);\n    classKeyPress.attr (\"F7Key\") = py::int_ (KeyPress::F7Key);\n    classKeyPress.attr (\"F8Key\") = py::int_ (KeyPress::F8Key);\n    classKeyPress.attr (\"F9Key\") = py::int_ (KeyPress::F9Key);\n    classKeyPress.attr (\"F10Key\") = py::int_ (KeyPress::F10Key);\n    classKeyPress.attr (\"F11Key\") = py::int_ (KeyPress::F11Key);\n    classKeyPress.attr (\"F12Key\") = py::int_ (KeyPress::F12Key);\n    classKeyPress.attr (\"F13Key\") = py::int_ (KeyPress::F13Key);\n    classKeyPress.attr (\"F14Key\") = py::int_ (KeyPress::F14Key);\n    classKeyPress.attr (\"F15Key\") = py::int_ (KeyPress::F15Key);\n    classKeyPress.attr (\"F16Key\") = py::int_ (KeyPress::F16Key);\n    classKeyPress.attr (\"F17Key\") = py::int_ (KeyPress::F17Key);\n    classKeyPress.attr (\"F18Key\") = py::int_ (KeyPress::F18Key);\n    classKeyPress.attr (\"F19Key\") = py::int_ (KeyPress::F19Key);\n    classKeyPress.attr (\"F20Key\") = py::int_ (KeyPress::F20Key);\n    classKeyPress.attr (\"F21Key\") = py::int_ (KeyPress::F21Key);\n    classKeyPress.attr (\"F22Key\") = py::int_ (KeyPress::F22Key);\n    classKeyPress.attr (\"F23Key\") = py::int_ (KeyPress::F23Key);\n    classKeyPress.attr (\"F24Key\") = py::int_ (KeyPress::F24Key);\n    classKeyPress.attr (\"F25Key\") = py::int_ (KeyPress::F25Key);\n    classKeyPress.attr (\"F26Key\") = py::int_ (KeyPress::F26Key);\n    classKeyPress.attr (\"F27Key\") = py::int_ (KeyPress::F27Key);\n    classKeyPress.attr (\"F28Key\") = py::int_ (KeyPress::F28Key);\n    classKeyPress.attr (\"F29Key\") = py::int_ (KeyPress::F29Key);\n    classKeyPress.attr (\"F30Key\") = py::int_ (KeyPress::F30Key);\n    classKeyPress.attr (\"F31Key\") = py::int_ (KeyPress::F31Key);\n    classKeyPress.attr (\"F32Key\") = py::int_ (KeyPress::F32Key);\n    classKeyPress.attr (\"F33Key\") = py::int_ (KeyPress::F33Key);\n    classKeyPress.attr (\"F34Key\") = py::int_ (KeyPress::F34Key);\n    classKeyPress.attr (\"F35Key\") = py::int_ (KeyPress::F35Key);\n    classKeyPress.attr (\"numberPad0\") = py::int_ (KeyPress::numberPad0);\n    classKeyPress.attr (\"numberPad1\") = py::int_ (KeyPress::numberPad1);\n    classKeyPress.attr (\"numberPad2\") = py::int_ (KeyPress::numberPad2);\n    classKeyPress.attr (\"numberPad3\") = py::int_ (KeyPress::numberPad3);\n    classKeyPress.attr (\"numberPad4\") = py::int_ (KeyPress::numberPad4);\n    classKeyPress.attr (\"numberPad5\") = py::int_ (KeyPress::numberPad5);\n    classKeyPress.attr (\"numberPad6\") = py::int_ (KeyPress::numberPad6);\n    classKeyPress.attr (\"numberPad7\") = py::int_ (KeyPress::numberPad7);\n    classKeyPress.attr (\"numberPad8\") = py::int_ (KeyPress::numberPad8);\n    classKeyPress.attr (\"numberPad9\") = py::int_ (KeyPress::numberPad9);\n    classKeyPress.attr (\"numberPadAdd\") = py::int_ (KeyPress::numberPadAdd);\n    classKeyPress.attr (\"numberPadSubtract\") = py::int_ (KeyPress::numberPadSubtract);\n    classKeyPress.attr (\"numberPadMultiply\") = py::int_ (KeyPress::numberPadMultiply);\n    classKeyPress.attr (\"numberPadDivide\") = py::int_ (KeyPress::numberPadDivide);\n    classKeyPress.attr (\"numberPadSeparator\") = py::int_ (KeyPress::numberPadSeparator);\n    classKeyPress.attr (\"numberPadDecimalPoint\") = py::int_ (KeyPress::numberPadDecimalPoint);\n    classKeyPress.attr (\"numberPadEquals\") = py::int_ (KeyPress::numberPadEquals);\n    classKeyPress.attr (\"numberPadDelete\") = py::int_ (KeyPress::numberPadDelete);\n    classKeyPress.attr (\"playKey\") = py::int_ (KeyPress::playKey);\n    classKeyPress.attr (\"stopKey\") = py::int_ (KeyPress::stopKey);\n    classKeyPress.attr (\"fastForwardKey\") = py::int_ (KeyPress::fastForwardKey);\n    classKeyPress.attr (\"rewindKey\") = py::int_ (KeyPress::rewindKey);\n\n    // ============================================================================================ juce::KeyListener\n\n    py::class_<KeyListener, PyKeyListener> classKeyListener (m, \"KeyListener\");\n\n    classKeyListener\n        .def (py::init<>())\n        .def (\"keyPressed\", &KeyListener::keyPressed)\n        .def (\"keyStateChanged\", &KeyListener::keyStateChanged)\n    ;\n\n    // ============================================================================================ juce::TextInputTarget\n\n    py::class_<TextInputTarget, PyTextInputTarget<>> classTextInputTarget (m, \"TextInputTarget\");\n\n    classTextInputTarget\n        .def (py::init<>())\n        .def (\"isTextInputActive\", &TextInputTarget::isTextInputActive)\n        .def (\"getHighlightedRegion\", &TextInputTarget::getHighlightedRegion)\n        .def (\"setHighlightedRegion\", &TextInputTarget::setHighlightedRegion)\n        .def (\"setTemporaryUnderlining\", &TextInputTarget::setTemporaryUnderlining)\n        .def (\"getTextInRange\", &TextInputTarget::getTextInRange)\n        .def (\"insertTextAtCaret\", &TextInputTarget::insertTextAtCaret)\n        .def (\"getCaretPosition\", &TextInputTarget::getCaretPosition)\n        .def (\"getCaretRectangleForCharIndex\", &TextInputTarget::getCaretRectangleForCharIndex)\n        .def (\"getTotalNumChars\", &TextInputTarget::getTotalNumChars)\n        .def (\"getCharIndexForPoint\", &TextInputTarget::getCharIndexForPoint)\n        .def (\"getTextBounds\", &TextInputTarget::getTextBounds)\n        .def (\"getKeyboardType\", &TextInputTarget::getKeyboardType)\n    ;\n\n    // ============================================================================================ juce::SystemClipboard\n\n    py::class_<SystemClipboard> classSystemClipboard (m, \"SystemClipboard\");\n\n    classSystemClipboard\n        .def_static (\"copyTextToClipboard\", &SystemClipboard::copyTextToClipboard)\n        .def_static (\"getTextFromClipboard\", &SystemClipboard::getTextFromClipboard)\n    ;\n\n    // ============================================================================================ juce::MouseInputSource\n\n    py::class_<MouseInputSource> classMouseInputSource (m, \"MouseInputSource\");\n\n    py::enum_<MouseInputSource::InputSourceType> (classMouseInputSource, \"InputSourceType\")\n        .value (\"mouse\", MouseInputSource::InputSourceType::mouse)\n        .value (\"touch\", MouseInputSource::InputSourceType::touch)\n        .value (\"pen\", MouseInputSource::InputSourceType::pen)\n        .export_values();\n\n    classMouseInputSource\n        .def (\"getType\", &MouseInputSource::getType)\n        .def (\"isMouse\", &MouseInputSource::isMouse)\n        .def (\"isTouch\", &MouseInputSource::isTouch)\n        .def (\"isPen\", &MouseInputSource::isPen)\n        .def (\"canHover\", &MouseInputSource::canHover)\n        .def (\"hasMouseWheel\", &MouseInputSource::hasMouseWheel)\n        .def (\"getIndex\", &MouseInputSource::getIndex)\n        .def (\"isDragging\", &MouseInputSource::isDragging)\n        .def (\"getScreenPosition\", &MouseInputSource::getScreenPosition)\n        .def (\"getRawScreenPosition\", &MouseInputSource::getRawScreenPosition)\n        .def (\"getCurrentModifiers\", &MouseInputSource::getCurrentModifiers)\n        .def (\"getCurrentPressure\", &MouseInputSource::getCurrentPressure)\n        .def (\"getCurrentOrientation\", &MouseInputSource::getCurrentOrientation)\n        .def (\"getCurrentRotation\", &MouseInputSource::getCurrentRotation)\n        .def (\"getCurrentTilt\", &MouseInputSource::getCurrentTilt)\n        .def (\"isPressureValid\", &MouseInputSource::isPressureValid)\n        .def (\"isOrientationValid\", &MouseInputSource::isOrientationValid)\n        .def (\"isRotationValid\", &MouseInputSource::isRotationValid)\n        .def (\"isTiltValid\", &MouseInputSource::isTiltValid)\n        .def (\"getComponentUnderMouse\", &MouseInputSource::getComponentUnderMouse, py::return_value_policy::reference)\n        .def (\"triggerFakeMove\", &MouseInputSource::triggerFakeMove)\n        .def (\"getNumberOfMultipleClicks\", &MouseInputSource::getNumberOfMultipleClicks)\n        .def (\"getLastMouseDownTime\", &MouseInputSource::getLastMouseDownTime)\n        .def (\"getLastMouseDownPosition\", &MouseInputSource::getLastMouseDownPosition)\n        .def (\"isLongPressOrDrag\", &MouseInputSource::isLongPressOrDrag)\n        .def (\"hasMovedSignificantlySincePressed\", &MouseInputSource::hasMovedSignificantlySincePressed)\n        .def (\"hasMouseCursor\", &MouseInputSource::hasMouseCursor)\n        .def (\"showMouseCursor\", &MouseInputSource::showMouseCursor)\n        .def (\"hideCursor\", &MouseInputSource::hideCursor)\n        .def (\"revealCursor\", &MouseInputSource::revealCursor)\n        .def (\"forceMouseCursorUpdate\", &MouseInputSource::forceMouseCursorUpdate)\n        .def (\"canDoUnboundedMovement\", &MouseInputSource::canDoUnboundedMovement)\n        .def (\"enableUnboundedMouseMovement\", &MouseInputSource::enableUnboundedMouseMovement)\n        .def (\"isUnboundedMouseMovementEnabled\", &MouseInputSource::isUnboundedMouseMovementEnabled)\n        .def (\"setScreenPosition\", &MouseInputSource::setScreenPosition)\n        .def_readonly_static (\"defaultPressure\", &MouseInputSource::defaultPressure)\n        .def_readonly_static (\"defaultRotation\", &MouseInputSource::defaultRotation)\n        .def_readonly_static (\"defaultTiltX\", &MouseInputSource::defaultTiltX)\n        .def_readonly_static (\"defaultTiltY\", &MouseInputSource::defaultTiltY)\n        .def_readonly_static (\"offscreenMousePos\", &MouseInputSource::offscreenMousePos)\n    ;\n\n    // ============================================================================================ juce::MouseEvent\n\n    py::class_<MouseEvent> classMouseEvent (m, \"MouseEvent\");\n\n    classMouseEvent\n        .def (py::init<MouseInputSource, Point<float>, ModifierKeys, float, float, float, float, float, Component*, Component*, Time, Point<float>, Time, int, bool>(),\n            \"source\"_a, \"position\"_a, \"modifiers\"_a, \"pressure\"_a, \"orientation\"_a, \"rotation\"_a, \"tiltX\"_a, \"tiltY\"_a,\n            \"eventComponent\"_a, \"originator\"_a, \"eventTime\"_a, \"mouseDownPos\"_a, \"mouseDownTime\"_a, \"numberOfClicks\"_a, \"mouseWasDragged\"_a)\n        .def_readonly (\"position\", &MouseEvent::position)\n        .def_readonly (\"x\", &MouseEvent::x)\n        .def_readonly (\"y\", &MouseEvent::y)\n        .def_readonly (\"mods\", &MouseEvent::mods)\n        .def_readonly (\"pressure\", &MouseEvent::pressure)\n        .def_readonly (\"orientation\", &MouseEvent::orientation)\n        .def_readonly (\"rotation\", &MouseEvent::rotation)\n        .def_readonly (\"tiltX\", &MouseEvent::tiltX)\n        .def_readonly (\"tiltY\", &MouseEvent::tiltY)\n        .def_readonly (\"mouseDownPosition\", &MouseEvent::mouseDownPosition)\n        .def_readonly (\"eventComponent\", &MouseEvent::eventComponent, py::return_value_policy::reference)\n        .def_readonly (\"originalComponent\", &MouseEvent::originalComponent, py::return_value_policy::reference)\n        .def_readonly (\"eventTime\", &MouseEvent::eventTime)\n        .def_readonly (\"mouseDownTime\", &MouseEvent::mouseDownTime)\n        .def_readonly (\"source\", &MouseEvent::source)\n        .def (\"getMouseDownX\", &MouseEvent::getMouseDownX)\n        .def (\"getMouseDownY\", &MouseEvent::getMouseDownY)\n        .def (\"getMouseDownPosition\", &MouseEvent::getMouseDownPosition)\n        .def (\"getDistanceFromDragStart\", &MouseEvent::getDistanceFromDragStart)\n        .def (\"getDistanceFromDragStartX\", &MouseEvent::getDistanceFromDragStartX)\n        .def (\"getDistanceFromDragStartY\", &MouseEvent::getDistanceFromDragStartY)\n        .def (\"getOffsetFromDragStart\", &MouseEvent::getOffsetFromDragStart)\n        .def (\"mouseWasDraggedSinceMouseDown\", &MouseEvent::mouseWasDraggedSinceMouseDown)\n        .def (\"mouseWasClicked\", &MouseEvent::mouseWasClicked)\n        .def (\"getNumberOfClicks\", &MouseEvent::getNumberOfClicks)\n        .def (\"getLengthOfMousePress\", &MouseEvent::getLengthOfMousePress)\n        .def (\"isPressureValid\", &MouseEvent::isPressureValid)\n        .def (\"isOrientationValid\", &MouseEvent::isOrientationValid)\n        .def (\"isRotationValid\", &MouseEvent::isRotationValid)\n        .def (\"isTiltValid\", &MouseEvent::isTiltValid)\n        .def (\"getPosition\", &MouseEvent::getPosition)\n        .def (\"getScreenX\", &MouseEvent::getScreenX)\n        .def (\"getScreenY\", &MouseEvent::getScreenY)\n        .def (\"getScreenPosition\", &MouseEvent::getScreenPosition)\n        .def (\"getMouseDownScreenX\", &MouseEvent::getMouseDownScreenX)\n        .def (\"getMouseDownScreenY\", &MouseEvent::getMouseDownScreenY)\n        .def (\"getMouseDownScreenPosition\", &MouseEvent::getMouseDownScreenPosition)\n        .def (\"getEventRelativeTo\", &MouseEvent::getEventRelativeTo)\n        .def (\"withNewPosition\", py::overload_cast<Point<float>> (&MouseEvent::withNewPosition, py::const_))\n        .def (\"withNewPosition\", py::overload_cast<Point<int>> (&MouseEvent::withNewPosition, py::const_))\n        .def_static (\"setDoubleClickTimeout\", &MouseEvent::setDoubleClickTimeout)\n        .def_static (\"getDoubleClickTimeout\", &MouseEvent::getDoubleClickTimeout)\n    ;\n\n    py::class_<MouseWheelDetails> classMouseWheelDetails (m, \"MouseWheelDetails\");\n\n    classMouseWheelDetails\n        .def (py::init<>())\n        .def_readwrite (\"deltaX\", &MouseWheelDetails::deltaX)\n        .def_readwrite (\"deltaY\", &MouseWheelDetails::deltaY)\n        .def_readwrite (\"isReversed\", &MouseWheelDetails::isReversed)\n        .def_readwrite (\"isSmooth\", &MouseWheelDetails::isSmooth)\n        .def_readwrite (\"isInertial\", &MouseWheelDetails::isInertial)\n    ;\n\n    py::class_<PenDetails> classPenDetails (m, \"PenDetails\");\n\n    classPenDetails\n        .def (py::init<>())\n        .def_readwrite (\"rotation\", &PenDetails::rotation)\n        .def_readwrite (\"tiltX\", &PenDetails::tiltX)\n        .def_readwrite (\"tiltY\", &PenDetails::tiltY)\n    ;\n\n    // ============================================================================================ juce::MouseListener\n\n    py::class_<MouseListener, PyMouseListener<>> classMouseListener (m, \"MouseListener\");\n\n    classMouseListener\n        .def (py::init<>())\n        .def (\"mouseMove\", &MouseListener::mouseMove)\n        .def (\"mouseEnter\", &MouseListener::mouseEnter)\n        .def (\"mouseExit\", &MouseListener::mouseExit)\n        .def (\"mouseDown\", &MouseListener::mouseDown)\n        .def (\"mouseDrag\", &MouseListener::mouseDrag)\n        .def (\"mouseUp\", &MouseListener::mouseUp)\n        .def (\"mouseDoubleClick\", &MouseListener::mouseDoubleClick)\n        .def (\"mouseWheelMove\", &MouseListener::mouseWheelMove)\n        .def (\"mouseMagnify\", &MouseListener::mouseMagnify)\n    ;\n\n    // ============================================================================================ juce::MouseCursor\n\n    py::class_<MouseCursor> classMouseCursor (m, \"MouseCursor\");\n\n    py::enum_<MouseCursor::StandardCursorType> (classMouseCursor, \"StandardCursorType\")\n        .value (\"ParentCursor\", MouseCursor::StandardCursorType::ParentCursor)\n        .value (\"NoCursor\", MouseCursor::StandardCursorType::NoCursor)\n        .value (\"NormalCursor\", MouseCursor::StandardCursorType::NormalCursor)\n        .value (\"WaitCursor\", MouseCursor::StandardCursorType::WaitCursor)\n        .value (\"IBeamCursor\", MouseCursor::StandardCursorType::IBeamCursor)\n        .value (\"CrosshairCursor\", MouseCursor::StandardCursorType::CrosshairCursor)\n        .value (\"CopyingCursor\", MouseCursor::StandardCursorType::CopyingCursor)\n        .value (\"PointingHandCursor\", MouseCursor::StandardCursorType::PointingHandCursor)\n        .value (\"DraggingHandCursor\", MouseCursor::StandardCursorType::DraggingHandCursor)\n        .value (\"LeftRightResizeCursor\", MouseCursor::StandardCursorType::LeftRightResizeCursor)\n        .value (\"UpDownResizeCursor\", MouseCursor::StandardCursorType::UpDownResizeCursor)\n        .value (\"UpDownLeftRightResizeCursor\", MouseCursor::StandardCursorType::UpDownLeftRightResizeCursor)\n        .value (\"TopEdgeResizeCursor\", MouseCursor::StandardCursorType::TopEdgeResizeCursor)\n        .value (\"BottomEdgeResizeCursor\", MouseCursor::StandardCursorType::BottomEdgeResizeCursor)\n        .value (\"LeftEdgeResizeCursor\", MouseCursor::StandardCursorType::LeftEdgeResizeCursor)\n        .value (\"RightEdgeResizeCursor\", MouseCursor::StandardCursorType::RightEdgeResizeCursor)\n        .value (\"TopLeftCornerResizeCursor\", MouseCursor::StandardCursorType::TopLeftCornerResizeCursor)\n        .value (\"TopRightCornerResizeCursor\", MouseCursor::StandardCursorType::TopRightCornerResizeCursor)\n        .value (\"BottomLeftCornerResizeCursor\", MouseCursor::StandardCursorType::BottomLeftCornerResizeCursor)\n        .value (\"BottomRightCornerResizeCursor\", MouseCursor::StandardCursorType::BottomRightCornerResizeCursor)\n        .value (\"NumStandardCursorTypes\", MouseCursor::StandardCursorType::NumStandardCursorTypes)\n        .export_values();\n\n    classMouseCursor\n        .def (py::init<>())\n        .def (py::init<MouseCursor::StandardCursorType>())\n        .def (py::init<const Image&, int, int>())\n        .def (py::init<const Image&, int, int, float>())\n        .def (py::init<const ScaledImage&, Point<int>>())\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n        .def (py::self == MouseCursor::StandardCursorType())\n        .def (py::self != MouseCursor::StandardCursorType())\n        .def_static (\"showWaitCursor\", &MouseCursor::showWaitCursor)\n        .def_static (\"hideWaitCursor\", &MouseCursor::hideWaitCursor)\n    ;\n\n    // ============================================================================================ juce::Desktop\n\n    py::class_<Displays> classDisplays (m, \"Displays\");\n\n    classDisplays\n        .def (\"physicalToLogical\", static_cast<Rectangle<int> (Displays::*)(Rectangle<int>, const Displays::Display*) const> (&Displays::physicalToLogical))\n        .def (\"physicalToLogical\", static_cast<Rectangle<float> (Displays::*)(Rectangle<float>, const Displays::Display*) const> (&Displays::physicalToLogical))\n        .def (\"physicalToLogical\", py::overload_cast<Point<int>, const Displays::Display*> (&Displays::template physicalToLogical<int>, py::const_))\n        .def (\"physicalToLogical\", py::overload_cast<Point<float>, const Displays::Display*> (&Displays::template physicalToLogical<float>, py::const_))\n        .def (\"logicalToPhysical\", static_cast<Rectangle<int> (Displays::*)(Rectangle<int>, const Displays::Display*) const> (&Displays::logicalToPhysical))\n        .def (\"logicalToPhysical\", static_cast<Rectangle<float> (Displays::*)(Rectangle<float>, const Displays::Display*) const> (&Displays::logicalToPhysical))\n        .def (\"logicalToPhysical\", py::overload_cast<Point<int>, const Displays::Display*> (&Displays::template logicalToPhysical<int>, py::const_))\n        .def (\"logicalToPhysical\", py::overload_cast<Point<float>, const Displays::Display*> (&Displays::template logicalToPhysical<float>, py::const_))\n        .def (\"getDisplayForRect\", &Displays::getDisplayForRect, py::return_value_policy::reference)\n        .def (\"getDisplayForPoint\", &Displays::getDisplayForPoint, py::return_value_policy::reference)\n        .def (\"getPrimaryDisplay\", &Displays::getPrimaryDisplay, py::return_value_policy::reference)\n        .def (\"getRectangleList\", &Displays::getRectangleList)\n        .def (\"getTotalBounds\", &Displays::getTotalBounds)\n        .def (\"refresh\", &Displays::refresh)\n    ;\n\n    py::class_<Displays::Display> classDisplay (classDisplays, \"Display\");\n\n    classDisplay\n        .def_readwrite (\"isMain\", &Displays::Display::isMain)\n        .def_readwrite (\"totalArea\", &Displays::Display::totalArea)\n        .def_readwrite (\"userArea\", &Displays::Display::userArea)\n        .def_readwrite (\"safeAreaInsets\", &Displays::Display::safeAreaInsets)\n        .def_readwrite (\"keyboardInsets\", &Displays::Display::keyboardInsets)\n        .def_readwrite (\"topLeftPhysical\", &Displays::Display::topLeftPhysical)\n        .def_readwrite (\"scale\", &Displays::Display::scale)\n        .def_readwrite (\"dpi\", &Displays::Display::dpi)\n        .def_readwrite (\"verticalFrequencyHz\", &Displays::Display::verticalFrequencyHz)\n    ;\n\n    // ============================================================================================ juce::LookAndFeel\n\n    py::class_<LookAndFeel, PyLookAndFeel<>> classLookAndFeel (m, \"LookAndFeel\");\n\n    classLookAndFeel\n    //.def (py::init<>())\n        .def_static (\"getDefaultLookAndFeel\", &LookAndFeel::getDefaultLookAndFeel, py::return_value_policy::reference)\n        .def_static (\"setDefaultLookAndFeel\", &LookAndFeel::setDefaultLookAndFeel)\n        .def (\"findColour\", &LookAndFeel::findColour)\n        .def (\"setColour\", &LookAndFeel::setColour)\n        .def (\"isColourSpecified\", &LookAndFeel::isColourSpecified)\n    //.def (\"getTypefaceForFont\", &LookAndFeel::getTypefaceForFont)\n    //.def (\"setDefaultSansSerifTypeface\", &LookAndFeel::setDefaultSansSerifTypeface)\n        .def (\"setDefaultSansSerifTypefaceName\", &LookAndFeel::setDefaultSansSerifTypefaceName)\n        .def (\"setUsingNativeAlertWindows\", &LookAndFeel::setUsingNativeAlertWindows)\n        .def (\"isUsingNativeAlertWindows\", &LookAndFeel::isUsingNativeAlertWindows)\n        .def (\"drawSpinningWaitAnimation\", &LookAndFeel::drawSpinningWaitAnimation)\n        .def (\"getTickShape\", &LookAndFeel::getTickShape)\n        .def (\"getCrossShape\", &LookAndFeel::getCrossShape)\n    //.def (\"createDropShadowerForComponent\", &LookAndFeel::createDropShadowerForComponent)\n    //.def (\"createFocusOutlineForComponent\", &LookAndFeel::createFocusOutlineForComponent)\n        .def (\"getMouseCursorFor\", &LookAndFeel::getMouseCursorFor)\n    //.def (\"createGraphicsContext\", &LookAndFeel::createGraphicsContext)\n        .def (\"playAlertSound\", &LookAndFeel::playAlertSound)\n    ;\n\n    py::class_<LookAndFeel_V2, LookAndFeel, PyLookAndFeel_V2<>> classLookAndFeel_V2 (m, \"LookAndFeel_V2\");\n    py::class_<LookAndFeel_V1, LookAndFeel_V2> classLookAndFeel_V1  (m, \"LookAndFeel_V1\");\n    py::class_<LookAndFeel_V3, LookAndFeel_V2> classLookAndFeel_V3 (m, \"LookAndFeel_V3\");\n    py::class_<LookAndFeel_V4, LookAndFeel_V3> classLookAndFeel_V4 (m, \"LookAndFeel_V4\");\n\n    py::class_<LookAndFeel_V4::ColourScheme> classLookAndFeel_V4ColourScheme (classLookAndFeel_V4, \"ColourScheme\");\n\n    classLookAndFeel_V4ColourScheme\n        .def (py::init ([](py::args coloursToUse)\n        {\n            if (coloursToUse.size() != static_cast<size_t> (LookAndFeel_V4::ColourScheme::numColours))\n                py::pybind11_fail (\"Must supply one colour for each UIColour item\");\n\n            std::tuple<Colour, Colour, Colour, Colour, Colour, Colour, Colour, Colour, Colour> colours;\n\n            std::get<0> (colours) = coloursToUse[0].cast<Colour>();\n            std::get<1> (colours) = coloursToUse[1].cast<Colour>();\n            std::get<2> (colours) = coloursToUse[2].cast<Colour>();\n            std::get<3> (colours) = coloursToUse[3].cast<Colour>();\n            std::get<4> (colours) = coloursToUse[4].cast<Colour>();\n            std::get<5> (colours) = coloursToUse[5].cast<Colour>();\n            std::get<6> (colours) = coloursToUse[6].cast<Colour>();\n            std::get<7> (colours) = coloursToUse[7].cast<Colour>();\n            std::get<8> (colours) = coloursToUse[8].cast<Colour>();\n\n            return std::apply ([](auto... c) { return LookAndFeel_V4::ColourScheme (c...); }, colours);\n        }))\n        .def (py::init<const LookAndFeel_V4::ColourScheme&>())\n        .def (\"getUIColour\", &LookAndFeel_V4::ColourScheme::getUIColour)\n        .def (\"setUIColour\", &LookAndFeel_V4::ColourScheme::setUIColour)\n        .def (py::self == py::self)\n        .def (py::self != py::self)\n    ;\n\n    classLookAndFeel_V4ColourScheme.attr (\"windowBackground\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::windowBackground));\n    classLookAndFeel_V4ColourScheme.attr (\"widgetBackground\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::widgetBackground));\n    classLookAndFeel_V4ColourScheme.attr (\"menuBackground\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::menuBackground));\n    classLookAndFeel_V4ColourScheme.attr (\"outline\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::outline));\n    classLookAndFeel_V4ColourScheme.attr (\"defaultText\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::defaultText));\n    classLookAndFeel_V4ColourScheme.attr (\"defaultFill\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::defaultFill));\n    classLookAndFeel_V4ColourScheme.attr (\"highlightedText\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::highlightedText));\n    classLookAndFeel_V4ColourScheme.attr (\"highlightedFill\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::highlightedFill));\n    classLookAndFeel_V4ColourScheme.attr (\"menuText\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::menuText));\n    classLookAndFeel_V4ColourScheme.attr (\"numColours\") = py::int_ (static_cast<int> (LookAndFeel_V4::ColourScheme::numColours));\n\n    classLookAndFeel_V4\n        .def (py::init<>())\n        .def (py::init<LookAndFeel_V4::ColourScheme>())\n        .def (\"setColourScheme\", &LookAndFeel_V4::setColourScheme)\n        .def (\"getCurrentColourScheme\", &LookAndFeel_V4::getCurrentColourScheme, py::return_value_policy::reference)\n        .def_static (\"getDarkColourScheme\", &LookAndFeel_V4::getDarkColourScheme)\n        .def_static (\"getMidnightColourScheme\", &LookAndFeel_V4::getMidnightColourScheme)\n        .def_static (\"getGreyColourScheme\", &LookAndFeel_V4::getGreyColourScheme)\n        .def_static (\"getLightColourScheme\", &LookAndFeel_V4::getLightColourScheme)\n    ;\n\n    // ============================================================================================ juce::Desktop\n\n    py::class_<Desktop, std::unique_ptr<Desktop, py::nodelete>> classDesktop (m, \"Desktop\");\n\n    Helpers::makeArithmeticEnum<Desktop::DisplayOrientation> (classDesktop, \"DisplayOrientation\")\n        .value (\"upright\", Desktop::upright)\n        .value (\"upsideDown\", Desktop::upsideDown)\n        .value (\"rotatedClockwise\", Desktop::rotatedClockwise)\n        .value (\"rotatedAntiClockwise\", Desktop::rotatedAntiClockwise)\n        .value (\"allOrientations\", Desktop::allOrientations)\n        .export_values();\n\n    classDesktop\n        .def_static (\"getInstance\", &Desktop::getInstance, py::return_value_policy::reference)\n        .def_static (\"getMousePosition\", &Desktop::getMousePosition)\n        .def_static (\"setMousePosition\", &Desktop::setMousePosition)\n        .def_static (\"getLastMouseDownPosition\", &Desktop::getLastMouseDownPosition)\n        .def (\"getMouseButtonClickCounter\", &Desktop::getMouseButtonClickCounter)\n        .def (\"getMouseWheelMoveCounter\", &Desktop::getMouseWheelMoveCounter)\n        .def_static (\"setScreenSaverEnabled\", &Desktop::setScreenSaverEnabled)\n        .def_static (\"isScreenSaverEnabled\", &Desktop::isScreenSaverEnabled)\n        .def (\"addGlobalMouseListener\", &Desktop::addGlobalMouseListener)\n        .def (\"removeGlobalMouseListener\", &Desktop::removeGlobalMouseListener)\n    //.def (\"addFocusChangeListener\", &Desktop::addFocusChangeListener)\n    //.def (\"removeFocusChangeListener\", &Desktop::removeFocusChangeListener)\n    //.def (\"addDarkModeSettingListener\", &Desktop::addDarkModeSettingListener)\n    //.def (\"removeDarkModeSettingListener\", &Desktop::removeDarkModeSettingListener)\n        .def (\"isDarkModeActive\", &Desktop::isDarkModeActive)\n        .def (\"setKioskModeComponent\", &Desktop::setKioskModeComponent)\n        .def (\"getKioskModeComponent\", &Desktop::getKioskModeComponent)\n        .def (\"getNumComponents\", &Desktop::getNumComponents)\n        .def (\"getComponent\", &Desktop::getComponent, py::return_value_policy::reference)\n        .def (\"findComponentAt\", &Desktop::findComponentAt, py::return_value_policy::reference)\n        .def (\"getAnimator\", &Desktop::getAnimator, py::return_value_policy::reference)\n        .def (\"getDefaultLookAndFeel\", &Desktop::getDefaultLookAndFeel, py::return_value_policy::reference)\n        .def (\"setDefaultLookAndFeel\", &Desktop::setDefaultLookAndFeel)\n        .def (\"getMouseSources\", [](const Desktop& self)\n        {\n            py::list result;\n            for (auto& source : self.getMouseSources())\n                result.append (source);\n            return result;\n        })\n        .def (\"getNumMouseSources\", &Desktop::getNumMouseSources)\n        .def (\"getMouseSource\", &Desktop::getMouseSource, py::return_value_policy::reference)\n        .def (\"getMainMouseSource\", &Desktop::getMainMouseSource)\n        .def (\"getNumDraggingMouseSources\", &Desktop::getNumDraggingMouseSources)\n        .def (\"getDraggingMouseSource\", &Desktop::getDraggingMouseSource, py::return_value_policy::reference)\n        .def (\"beginDragAutoRepeat\", &Desktop::beginDragAutoRepeat)\n        .def (\"getCurrentOrientation\", &Desktop::getCurrentOrientation)\n        .def (\"setOrientationsEnabled\", &Desktop::setOrientationsEnabled)\n        .def (\"getOrientationsEnabled\", &Desktop::getOrientationsEnabled)\n        .def (\"isOrientationEnabled\", &Desktop::isOrientationEnabled)\n        .def (\"getDisplays\", &Desktop::getDisplays)\n        .def (\"setGlobalScaleFactor\", &Desktop::setGlobalScaleFactor)\n        .def (\"getGlobalScaleFactor\", &Desktop::getGlobalScaleFactor)\n        .def_static (\"canUseSemiTransparentWindows\", &Desktop::canUseSemiTransparentWindows)\n        .def (\"isHeadless\", &Desktop::isHeadless)\n    ;\n\n    // ============================================================================================ juce::Desktop\n\n    py::class_<ComponentAnimator, ChangeBroadcaster> classComponentAnimator (m, \"ComponentAnimator\");\n\n    classComponentAnimator\n        .def (py::init<>())\n        .def (\"animateComponent\", &ComponentAnimator::animateComponent)\n        .def (\"fadeOut\", &ComponentAnimator::fadeOut)\n        .def (\"fadeIn\", &ComponentAnimator::fadeIn)\n        .def (\"cancelAnimation\", &ComponentAnimator::cancelAnimation)\n        .def (\"cancelAllAnimations\", &ComponentAnimator::cancelAllAnimations)\n        .def (\"getComponentDestination\", &ComponentAnimator::getComponentDestination)\n        .def (\"isAnimating\", py::overload_cast<Component*> (&ComponentAnimator::isAnimating, py::const_))\n        .def (\"isAnimating\", py::overload_cast<> (&ComponentAnimator::isAnimating, py::const_))\n    ;\n\n    // ============================================================================================ juce::ComponentTraverser\n\n    py::class_<ComponentTraverser, PyComponentTraverser<>> classComponentTraverser (m, \"ComponentTraverser\");\n\n    classComponentTraverser\n        .def (py::init<>())\n        .def (\"getDefaultComponent\", &ComponentTraverser::getDefaultComponent, py::return_value_policy::reference)\n        .def (\"getNextComponent\", &ComponentTraverser::getNextComponent, py::return_value_policy::reference)\n        .def (\"getPreviousComponent\", &ComponentTraverser::getPreviousComponent, py::return_value_policy::reference)\n        .def (\"getDefaultComponent\", [](ComponentTraverser& self, Component* parentComponent)\n        {\n            py::list allComponents;\n\n            for (auto component : self.getAllComponents (parentComponent))\n                allComponents.append (py::cast (component, py::return_value_policy::reference));\n\n            return allComponents;\n        })\n    ;\n\n    py::class_<FocusTraverser, ComponentTraverser, PyFocusTraverser<FocusTraverser>> (m, \"FocusTraverser\");\n    py::class_<KeyboardFocusTraverser, ComponentTraverser, PyFocusTraverser<KeyboardFocusTraverser>> (m, \"KeyboardFocusTraverser\");\n\n    // ============================================================================================ juce::ModalComponentManager\n\n    py::class_<ModalComponentManager, std::unique_ptr<ModalComponentManager, py::nodelete>> classModalComponentManager (m, \"ModalComponentManager\");\n\n    py::class_<ModalComponentManager::Callback, PyModalComponentManagerCallback> classModalComponentManagerCallback (classModalComponentManager, \"Callback\");\n\n    classModalComponentManagerCallback\n        .def (py::init<>())\n        .def (\"modalStateFinished\", &ModalComponentManager::Callback::modalStateFinished)\n    ;\n\n    classModalComponentManager\n        .def_static (\"getInstance\", &ModalComponentManager::getInstance, py::return_value_policy::reference)\n        .def_static (\"getInstanceWithoutCreating\", &ModalComponentManager::getInstanceWithoutCreating, py::return_value_policy::reference)\n        .def_static (\"deleteInstance\", &ModalComponentManager::deleteInstance)\n        .def (\"getNumModalComponents\", &ModalComponentManager::getNumModalComponents)\n        .def (\"getModalComponent\", &ModalComponentManager::getModalComponent, py::return_value_policy::reference)\n        .def (\"getNumModalComponents\", &ModalComponentManager::getNumModalComponents)\n        .def (\"isModal\", &ModalComponentManager::isModal)\n        .def (\"isFrontModalComponent\", &ModalComponentManager::isFrontModalComponent)\n        .def (\"attachCallback\", [](ModalComponentManager& self, Component* component, py::function callback)\n        {\n            self.attachCallback (component, new PyModalComponentManagerCallbackCallable (std::move (callback)));\n        })\n        .def (\"bringModalComponentsToFront\", &ModalComponentManager::bringModalComponentsToFront, \"topOneShouldGrabFocus\"_a = true)\n        .def (\"cancelAllModalComponents\", &ModalComponentManager::cancelAllModalComponents)\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def (\"runEventLoopForCurrentComponent\", &ModalComponentManager::runEventLoopForCurrentComponent, py::call_guard<py::gil_scoped_release>())\n#endif\n    ;\n\n    // ============================================================================================ juce::ComponentListener\n\n    py::class_<ComponentListener, PyComponentListener> classComponentListener (m, \"ComponentListener\");\n\n    classComponentListener\n        .def (py::init<>())\n        .def (\"componentMovedOrResized\", &ComponentListener::componentMovedOrResized)\n        .def (\"componentBroughtToFront\", &ComponentListener::componentBroughtToFront)\n        .def (\"componentVisibilityChanged\", &ComponentListener::componentVisibilityChanged)\n        .def (\"componentChildrenChanged\", &ComponentListener::componentChildrenChanged)\n        .def (\"componentParentHierarchyChanged\", &ComponentListener::componentParentHierarchyChanged)\n        .def (\"componentNameChanged\", &ComponentListener::componentNameChanged)\n        .def (\"componentBeingDeleted\", &ComponentListener::componentBeingDeleted)\n        .def (\"componentEnablementChanged\", &ComponentListener::componentEnablementChanged)\n    ;\n\n    // ============================================================================================ juce::ComponentPeer\n\n    py::class_<ComponentPeer> classComponentPeer (m, \"ComponentPeer\");\n\n    Helpers::makeArithmeticEnum<ComponentPeer::StyleFlags> (classComponentPeer, \"StyleFlags\")\n        .value (\"windowAppearsOnTaskbar\", ComponentPeer::StyleFlags::windowAppearsOnTaskbar)\n        .value (\"windowIsTemporary\", ComponentPeer::StyleFlags::windowIsTemporary)\n        .value (\"windowIgnoresMouseClicks\", ComponentPeer::StyleFlags::windowIgnoresMouseClicks)\n        .value (\"windowHasTitleBar\", ComponentPeer::StyleFlags::windowHasTitleBar)\n        .value (\"windowIsResizable\", ComponentPeer::StyleFlags::windowIsResizable)\n        .value (\"windowHasMinimiseButton\", ComponentPeer::StyleFlags::windowHasMinimiseButton)\n        .value (\"windowHasMaximiseButton\", ComponentPeer::StyleFlags::windowHasMaximiseButton)\n        .value (\"windowHasCloseButton\", ComponentPeer::StyleFlags::windowHasCloseButton)\n        .value (\"windowHasDropShadow\", ComponentPeer::StyleFlags::windowHasDropShadow)\n        .value (\"windowIgnoresKeyPresses\", ComponentPeer::StyleFlags::windowIgnoresKeyPresses)\n        .value (\"windowRequiresSynchronousCoreGraphicsRendering\", ComponentPeer::StyleFlags::windowRequiresSynchronousCoreGraphicsRendering)\n        .value (\"windowIsSemiTransparent\", ComponentPeer::StyleFlags::windowIsSemiTransparent)\n        .export_values();\n\n    classComponentPeer\n        .def (\"getComponent\", &ComponentPeer::getComponent, py::return_value_policy::reference)\n        .def (\"getStyleFlags\", &ComponentPeer::getStyleFlags)\n        .def (\"getUniqueID\", &ComponentPeer::getUniqueID)\n        .def (\"getNativeHandle\", [](const ComponentPeer& self) { return reinterpret_cast<std::intptr_t> (self.getNativeHandle()); })\n        .def (\"setVisible\", &ComponentPeer::setVisible)\n        .def (\"setTitle\", &ComponentPeer::setTitle)\n        .def (\"setDocumentEditedStatus\", &ComponentPeer::setDocumentEditedStatus)\n        .def (\"setRepresentedFile\", &ComponentPeer::setRepresentedFile)\n        .def (\"setBounds\", &ComponentPeer::setBounds)\n        .def (\"updateBounds\", &ComponentPeer::updateBounds)\n        .def (\"getBounds\", &ComponentPeer::getBounds)\n        .def (\"localToGlobal\", py::overload_cast<Point<float>> (&ComponentPeer::localToGlobal))\n        .def (\"globalToLocal\", py::overload_cast<Point<float>> (&ComponentPeer::globalToLocal))\n        .def (\"localToGlobal\", py::overload_cast<Point<int>> (&ComponentPeer::localToGlobal))\n        .def (\"globalToLocal\", py::overload_cast<Point<int>> (&ComponentPeer::globalToLocal))\n        .def (\"localToGlobal\", py::overload_cast<const Rectangle<int>&> (&ComponentPeer::localToGlobal))\n        .def (\"globalToLocal\", py::overload_cast<const Rectangle<int>&> (&ComponentPeer::globalToLocal))\n        .def (\"localToGlobal\", py::overload_cast<const Rectangle<float>&> (&ComponentPeer::localToGlobal))\n        .def (\"globalToLocal\", py::overload_cast<const Rectangle<float>&> (&ComponentPeer::globalToLocal))\n        .def (\"getAreaCoveredBy\", &ComponentPeer::getAreaCoveredBy)\n        .def (\"setMinimised\", &ComponentPeer::setMinimised)\n        .def (\"isMinimised\", &ComponentPeer::isMinimised)\n        .def (\"setFullScreen\", &ComponentPeer::setFullScreen)\n        .def (\"isFullScreen\", &ComponentPeer::isFullScreen)\n        .def (\"isKioskMode\", &ComponentPeer::isKioskMode)\n        .def (\"setNonFullScreenBounds\", &ComponentPeer::setNonFullScreenBounds)\n        .def (\"getNonFullScreenBounds\", &ComponentPeer::getNonFullScreenBounds)\n        .def (\"setIcon\", &ComponentPeer::setIcon)\n    //.def (\"setConstrainer\", &ComponentPeer::setConstrainer)\n    //.def (\"startHostManagedResize\", &ComponentPeer::startHostManagedResize)\n    //.def (\"getConstrainer\", &ComponentPeer::getConstrainer)\n        .def (\"contains\", &ComponentPeer::contains)\n        .def (\"getFrameSizeIfPresent\", &ComponentPeer::getFrameSizeIfPresent)\n        .def (\"setAlwaysOnTop\", &ComponentPeer::setAlwaysOnTop)\n        .def (\"toFront\", &ComponentPeer::toFront)\n        .def (\"toBehind\", &ComponentPeer::toBehind)\n        .def (\"handleBroughtToFront\", &ComponentPeer::handleBroughtToFront)\n        .def (\"isFocused\", &ComponentPeer::isFocused)\n        .def (\"grabFocus\", &ComponentPeer::grabFocus)\n        .def (\"getLastFocusedSubcomponent\", &ComponentPeer::getLastFocusedSubcomponent, py::return_value_policy::reference)\n        .def (\"closeInputMethodContext\", &ComponentPeer::closeInputMethodContext)\n        .def (\"refreshTextInputTarget\", &ComponentPeer::refreshTextInputTarget)\n    //.def (\"findCurrentTextInputTarget\", &ComponentPeer::findCurrentTextInputTarget)\n        .def (\"repaint\", &ComponentPeer::repaint)\n        .def (\"performAnyPendingRepaintsNow\", &ComponentPeer::performAnyPendingRepaintsNow)\n        .def (\"setAlpha\", &ComponentPeer::setAlpha)\n        .def_static (\"getNumPeers\", &ComponentPeer::getNumPeers)\n        .def_static (\"getPeer\", &ComponentPeer::getPeer, py::return_value_policy::reference)\n        .def_static (\"getPeerFor\", &ComponentPeer::getPeerFor, py::return_value_policy::reference)\n        .def_static (\"isValidPeer\", &ComponentPeer::isValidPeer)\n        .def (\"getAvailableRenderingEngines\", &ComponentPeer::getAvailableRenderingEngines)\n        .def (\"getCurrentRenderingEngine\", &ComponentPeer::getCurrentRenderingEngine)\n        .def (\"setCurrentRenderingEngine\", &ComponentPeer::setCurrentRenderingEngine)\n        .def_static (\"getCurrentModifiersRealtime\", &ComponentPeer::getCurrentModifiersRealtime)\n    //.def (\"addScaleFactorListener\", &ComponentPeer::addScaleFactorListener)\n    //.def (\"removeScaleFactorListener\", &ComponentPeer::removeScaleFactorListener)\n    //.def (\"addVBlankListener\", &ComponentPeer::addVBlankListener)\n    //.def (\"removeVBlankListener\", &ComponentPeer::removeVBlankListener)\n        .def (\"getPlatformScaleFactor\", &ComponentPeer::getPlatformScaleFactor)\n        .def (\"setHasChangedSinceSaved\", &ComponentPeer::setHasChangedSinceSaved)\n    //.def (\"setAppStyle\", &ComponentPeer::setAppStyle)\n    //.def (\"getAppStyle\", &ComponentPeer::getAppStyle)\n    ;\n\n    // ============================================================================================ juce::Component\n\n    py::class_<Component, PyComponent<>> classComponent (m, \"Component\");\n\n    py::enum_<Component::FocusChangeType> (classComponent, \"FocusChangeType\")\n        .value (\"focusChangedByMouseClick\", Component::FocusChangeType::focusChangedByMouseClick)\n        .value (\"focusChangedByTabKey\", Component::FocusChangeType::focusChangedByTabKey)\n        .value (\"focusChangedDirectly\", Component::FocusChangeType::focusChangedDirectly)\n        .export_values();\n\n    py::enum_<Component::FocusContainerType> (classComponent, \"FocusContainerType\")\n        .value (\"none\", Component::FocusContainerType::none)\n        .value (\"focusContainer\", Component::FocusContainerType::focusContainer)\n        .value (\"keyboardFocusContainer\", Component::FocusContainerType::keyboardFocusContainer);\n\n    py::enum_<Component::FocusChangeDirection> (classComponent, \"FocusChangeDirection\")\n        .value (\"unknown\", Component::FocusChangeDirection::unknown)\n        .value (\"forward\", Component::FocusChangeDirection::forward)\n        .value (\"backward\", Component::FocusChangeDirection::backward);\n\n    classComponent\n        .def (py::init_alias<>())\n        .def (py::init_alias<const String&>())\n        .def (\"setName\", &Component::setName)\n        .def (\"getName\", &Component::getName)\n        .def (\"getComponentID\", &Component::getComponentID)\n        .def (\"setVisible\", &Component::setVisible)\n        .def (\"isVisible\", &Component::isVisible)\n        .def (\"visibilityChanged\", &Component::visibilityChanged)\n        .def (\"isShowing\", &Component::isShowing)\n        .def (\"addToDesktop\", [](Component& self, ComponentPeer::StyleFlags windowStyleFlags, std::optional<std::intptr_t> nativeWindowToAttachTo)\n        {\n            self.addToDesktop (static_cast<int> (windowStyleFlags), nativeWindowToAttachTo ? reinterpret_cast<void*>(*nativeWindowToAttachTo) : nullptr);\n        }, \"windowStyleFlags\"_a, \"nativeWindowToAttachTo\"_a = std::optional<std::intptr_t>())\n        .def (\"addToDesktop\", [](Component& self, int windowStyleFlags, std::optional<std::intptr_t> nativeWindowToAttachTo)\n        {\n            self.addToDesktop (windowStyleFlags, nativeWindowToAttachTo ? reinterpret_cast<void*>(*nativeWindowToAttachTo) : nullptr);\n        }, \"windowStyleFlags\"_a, \"nativeWindowToAttachTo\"_a = std::optional<std::intptr_t>())\n        .def (\"removeFromDesktop\", &Component::removeFromDesktop)\n        .def (\"isOnDesktop\", &Component::isOnDesktop)\n        .def (\"getDesktopScaleFactor\", &Component::getDesktopScaleFactor)\n        .def (\"getPeer\", &Component::getPeer, py::return_value_policy::reference)\n        .def (\"userTriedToCloseWindow\", &Component::userTriedToCloseWindow)\n        .def (\"minimisationStateChanged\", &Component::minimisationStateChanged)\n        .def (\"getDesktopScaleFactor\", &Component::getDesktopScaleFactor)\n        .def (\"toFront\", &Component::toFront)\n        .def (\"toBack\", &Component::toBack)\n        .def (\"toBehind\", &Component::toBehind)\n        .def (\"setAlwaysOnTop\", &Component::setAlwaysOnTop)\n        .def (\"isAlwaysOnTop\", &Component::isAlwaysOnTop)\n        .def (\"getX\", &Component::getX)\n        .def (\"getY\", &Component::getY)\n        .def (\"getWidth\", &Component::getWidth)\n        .def (\"getHeight\", &Component::getHeight)\n        .def (\"getRight\", &Component::getRight)\n        .def (\"getBottom\", &Component::getBottom)\n        .def (\"getPosition\", &Component::getPosition)\n        .def (\"getBounds\", &Component::getBounds)\n        .def (\"getLocalBounds\", &Component::getLocalBounds)\n        .def (\"getBoundsInParent\", &Component::getBoundsInParent)\n        .def (\"getScreenX\", &Component::getScreenX)\n        .def (\"getScreenY\", &Component::getScreenY)\n        .def (\"getScreenPosition\", &Component::getScreenPosition)\n        .def (\"getScreenBounds\", &Component::getScreenBounds)\n        .def (\"setTopLeftPosition\", py::overload_cast<int, int> (&Component::setTopLeftPosition))\n        .def (\"setTopLeftPosition\", py::overload_cast<Point<int>> (&Component::setTopLeftPosition))\n        .def (\"setTopRightPosition\", &Component::setTopRightPosition)\n        .def (\"setSize\", &Component::setSize)\n        .def (\"setBounds\", py::overload_cast<int, int, int, int> (&Component::setBounds))\n        .def (\"setBounds\", py::overload_cast<Rectangle<int>> (&Component::setBounds))\n        .def (\"setBoundsRelative\", py::overload_cast<float, float, float, float> (&Component::setBoundsRelative))\n        .def (\"setBoundsRelative\", py::overload_cast<Rectangle<float>> (&Component::setBoundsRelative))\n        .def (\"setBoundsInset\", &Component::setBoundsInset)\n        .def (\"setBoundsToFit\", &Component::setBoundsToFit)\n        .def (\"setCentrePosition\", py::overload_cast<int, int> (&Component::setCentrePosition))\n        .def (\"setCentrePosition\", py::overload_cast<Point<int>> (&Component::setCentrePosition))\n        .def (\"setCentreRelative\", &Component::setCentreRelative)\n        .def (\"centreWithSize\", &Component::centreWithSize)\n        .def (\"setTransform\", &Component::setTransform)\n        .def (\"getTransform\", &Component::getTransform)\n        .def (\"isTransformed\", &Component::isTransformed)\n        .def_static (\"getApproximateScaleFactorForComponent\", &Component::getApproximateScaleFactorForComponent)\n        .def (\"proportionOfWidth\", &Component::proportionOfWidth)\n        .def (\"proportionOfHeight\", &Component::proportionOfHeight)\n        .def (\"getParentWidth\", &Component::getParentWidth)\n        .def (\"getParentHeight\", &Component::getParentHeight)\n        .def (\"getParentMonitorArea\", &Component::getParentMonitorArea)\n        .def (\"getNumChildComponents\", &Component::getNumChildComponents)\n        .def (\"getChildComponent\", &Component::getChildComponent, py::return_value_policy::reference)\n        .def (\"getIndexOfChildComponent\", &Component::getIndexOfChildComponent)\n        .def (\"findChildWithID\", &Component::findChildWithID, py::return_value_policy::reference)\n        .def (\"addChildComponent\", [](Component* self, Component* toAdd) { self->addChildComponent (toAdd); })\n        .def (\"addChildComponent\", py::overload_cast<Component*, int> (&Component::addChildComponent))\n        .def (\"addAndMakeVisible\", [](Component* self, Component* toAdd) { self->addAndMakeVisible (toAdd); })\n        .def (\"addAndMakeVisible\", py::overload_cast<Component*, int> (&Component::addAndMakeVisible))\n        .def (\"addChildAndSetID\", &Component::addChildAndSetID)\n        .def (\"removeChildComponent\", py::overload_cast<Component*> (&Component::removeChildComponent))\n        .def (\"removeChildComponent\", py::overload_cast<int> (&Component::removeChildComponent), py::return_value_policy::reference)\n        .def (\"removeAllChildren\", &Component::removeAllChildren)\n        .def (\"deleteAllChildren\", &Component::deleteAllChildren)\n        .def (\"getParentComponent\", &Component::getParentComponent, py::return_value_policy::reference)\n        .def (\"getTopLevelComponent\", &Component::getTopLevelComponent, py::return_value_policy::reference)\n        .def (\"isParentOf\", &Component::isParentOf)\n        .def (\"parentHierarchyChanged\", &Component::parentHierarchyChanged)\n        .def (\"childrenChanged\", &Component::childrenChanged)\n        .def (\"hitTest\", &Component::hitTest)\n        .def (\"setInterceptsMouseClicks\", &Component::setInterceptsMouseClicks)\n        .def (\"getInterceptsMouseClicks\", [](const Component& self) { bool a, b; self.getInterceptsMouseClicks (a, b); return py::make_tuple(a, b); })\n        .def (\"contains\", py::overload_cast<Point<float>> (&Component::contains))\n        .def (\"reallyContains\", py::overload_cast<Point<float>, bool> (&Component::reallyContains))\n        .def (\"getComponentAt\", py::overload_cast<int, int> (&Component::getComponentAt), py::return_value_policy::reference)\n        .def (\"getComponentAt\", py::overload_cast<Point<int>> (&Component::getComponentAt), py::return_value_policy::reference)\n        .def (\"getComponentAt\", py::overload_cast<Point<float>> (&Component::getComponentAt), py::return_value_policy::reference)\n        .def (\"repaint\", py::overload_cast<> (&Component::repaint))\n        .def (\"repaint\", py::overload_cast<int, int, int, int> (&Component::repaint))\n        .def (\"repaint\", py::overload_cast<Rectangle<int>> (&Component::repaint))\n        .def (\"setBufferedToImage\", &Component::setBufferedToImage)\n        .def (\"createComponentSnapshot\", &Component::createComponentSnapshot, \"areaToGrab\"_a, \"clipImageToComponentBounds\"_a = true, \"scaleFactor\"_a = 1.0f)\n        .def (\"paintEntireComponent\", &Component::paintEntireComponent)\n        .def (\"setPaintingIsUnclipped\", &Component::setPaintingIsUnclipped)\n        .def (\"isPaintingUnclipped\", &Component::isPaintingUnclipped)\n    //.def (\"setComponentEffect\", &Component::setComponentEffect)\n    //.def (\"getComponentEffect\", &Component::getComponentEffect)\n        .def (\"getLookAndFeel\", &Component::getLookAndFeel, py::return_value_policy::reference)\n        .def (\"setLookAndFeel\", &Component::setLookAndFeel)\n        .def (\"lookAndFeelChanged\", &Component::lookAndFeelChanged)\n        .def (\"sendLookAndFeelChange\", &Component::sendLookAndFeelChange)\n        .def (\"setOpaque\", &Component::setOpaque)\n        .def (\"isOpaque\", &Component::isOpaque)\n        .def (\"setBroughtToFrontOnMouseClick\", &Component::setBroughtToFrontOnMouseClick)\n        .def (\"isBroughtToFrontOnMouseClick\", &Component::isBroughtToFrontOnMouseClick)\n        .def (\"setExplicitFocusOrder\", &Component::setExplicitFocusOrder)\n        .def (\"getExplicitFocusOrder\", &Component::getExplicitFocusOrder)\n        .def (\"setFocusContainerType\", &Component::setFocusContainerType)\n        .def (\"isFocusContainer\", &Component::isFocusContainer)\n        .def (\"isKeyboardFocusContainer\", &Component::isKeyboardFocusContainer)\n        .def (\"findFocusContainer\", &Component::findFocusContainer, py::return_value_policy::reference)\n        .def (\"findKeyboardFocusContainer\", &Component::findKeyboardFocusContainer, py::return_value_policy::reference)\n        .def (\"setWantsKeyboardFocus\", &Component::setWantsKeyboardFocus)\n        .def (\"getWantsKeyboardFocus\", &Component::getWantsKeyboardFocus)\n        .def (\"setMouseClickGrabsKeyboardFocus\", &Component::setMouseClickGrabsKeyboardFocus)\n        .def (\"getMouseClickGrabsKeyboardFocus\", &Component::getMouseClickGrabsKeyboardFocus)\n        .def (\"grabKeyboardFocus\", &Component::grabKeyboardFocus)\n        .def (\"giveAwayKeyboardFocus\", &Component::giveAwayKeyboardFocus)\n        .def (\"hasKeyboardFocus\", &Component::hasKeyboardFocus)\n        .def (\"moveKeyboardFocusToSibling\", &Component::moveKeyboardFocusToSibling)\n        .def_static (\"getCurrentlyFocusedComponent\", &Component::getCurrentlyFocusedComponent, py::return_value_policy::reference)\n        .def_static (\"unfocusAllComponents\", &Component::unfocusAllComponents)\n        .def (\"createFocusTraverser\", &Component::createFocusTraverser)\n        .def (\"createKeyboardFocusTraverser\", &Component::createKeyboardFocusTraverser)\n        .def (\"setHasFocusOutline\", &Component::setHasFocusOutline)\n        .def (\"hasFocusOutline\", &Component::hasFocusOutline)\n        .def (\"isEnabled\", &Component::isEnabled)\n        .def (\"setEnabled\", &Component::setEnabled)\n        .def (\"enablementChanged\", &Component::enablementChanged)\n        .def (\"getAlpha\", &Component::getAlpha)\n        .def (\"setAlpha\", &Component::setAlpha)\n        .def (\"alphaChanged\", &Component::alphaChanged)\n        .def (\"setMouseCursor\", &Component::setMouseCursor)\n        .def (\"getMouseCursor\", &Component::getMouseCursor)\n        .def (\"updateMouseCursor\", &Component::updateMouseCursor)\n        .def (\"paint\", &Component::paint)\n        .def (\"paintOverChildren\", &Component::paintOverChildren)\n        .def (\"mouseMove\", &Component::mouseMove)\n        .def (\"mouseEnter\", &Component::mouseEnter)\n        .def (\"mouseExit\", &Component::mouseExit)\n        .def (\"mouseDown\", &Component::mouseDown)\n        .def (\"mouseDrag\", &Component::mouseDrag)\n        .def (\"mouseUp\", &Component::mouseUp)\n        .def (\"mouseDoubleClick\", &Component::mouseDoubleClick)\n        .def (\"mouseWheelMove\", &Component::mouseWheelMove)\n        .def (\"mouseMagnify\", &Component::mouseMagnify)\n        .def_static (\"beginDragAutoRepeat\", &Component::beginDragAutoRepeat)\n        .def (\"setRepaintsOnMouseActivity\", &Component::setRepaintsOnMouseActivity)\n        .def (\"addMouseListener\", &Component::addMouseListener)\n        .def (\"removeMouseListener\", &Component::removeMouseListener)\n        .def (\"addKeyListener\", &Component::addKeyListener)\n        .def (\"removeKeyListener\", &Component::removeKeyListener)\n        .def (\"keyPressed\", &Component::keyPressed)\n        .def (\"keyStateChanged\", &Component::keyStateChanged)\n        .def (\"modifierKeysChanged\", &Component::modifierKeysChanged)\n        .def (\"isMouseOver\", &Component::isMouseOver)\n        .def (\"isMouseButtonDown\", &Component::isMouseButtonDown)\n        .def (\"isMouseOverOrDragging\", &Component::isMouseOverOrDragging)\n        .def_static (\"isMouseButtonDownAnywhere\", &Component::isMouseButtonDownAnywhere)\n        .def (\"getMouseXYRelative\", &Component::getMouseXYRelative)\n        .def (\"resized\", &Component::resized)\n        .def (\"moved\", &Component::moved)\n        .def (\"childBoundsChanged\", &Component::childBoundsChanged)\n        .def (\"parentSizeChanged\", &Component::parentSizeChanged)\n        .def (\"broughtToFront\", &Component::broughtToFront)\n        .def (\"addComponentListener\", &Component::addComponentListener)\n        .def (\"removeComponentListener\", &Component::removeComponentListener)\n        .def (\"postCommandMessage\", &Component::postCommandMessage)\n        .def (\"handleCommandMessage\", &Component::handleCommandMessage)\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def (\"runModalLoop\", &Component::runModalLoop, py::call_guard<py::gil_scoped_release>())\n#endif\n        .def (\"enterModalState\", [](Component& self, bool takeKeyboardFocus, py::function callback, bool deleteWhenDismissed)\n        {\n            self.enterModalState (takeKeyboardFocus, new PyModalComponentManagerCallbackCallable (std::move (callback)), deleteWhenDismissed);\n        }, \"takeKeyboardFocus\"_a = true, \"callback\"_a = py::none(), \"deleteWhenDismissed\"_a = false)\n        .def (\"exitModalState\", &Component::exitModalState)\n        .def (\"isCurrentlyModal\", &Component::isCurrentlyModal)\n        .def_static (\"getNumCurrentlyModalComponents\", &Component::getNumCurrentlyModalComponents)\n        .def_static (\"getCurrentlyModalComponent\", &Component::getCurrentlyModalComponent)\n        .def (\"isCurrentlyBlockedByAnotherModalComponent\", &Component::isCurrentlyBlockedByAnotherModalComponent)\n        .def (\"canModalEventBeSentToComponent\", &Component::canModalEventBeSentToComponent)\n        .def (\"inputAttemptWhenModal\", &Component::inputAttemptWhenModal)\n        .def (\"getProperties\", py::overload_cast<> (&Component::getProperties))\n        .def (\"getProperties\", py::overload_cast<> (&Component::getProperties, py::const_))\n        .def (\"findColour\", &Component::findColour, \"colourID\"_a, \"inheritFromParent\"_a = false)\n        .def (\"setColour\", &Component::setColour)\n        .def (\"removeColour\", &Component::removeColour)\n        .def (\"isColourSpecified\", &Component::isColourSpecified)\n        .def (\"copyAllExplicitColoursTo\", [](const Component& self, Component* target) { self.copyAllExplicitColoursTo (*target); })\n        .def (\"colourChanged\", &Component::colourChanged)\n        .def (\"getWindowHandle\", [](const Component& self) { return reinterpret_cast<std::intptr_t> (self.getWindowHandle()); })\n    //.def (\"getPositioner\", &Component::getPositioner)\n    //.def (\"setPositioner\", &Component::setPositioner)\n    //.def (\"setCachedComponentImage\", &Component::setCachedComponentImage)\n    //.def (\"getCachedComponentImage\", &Component::getCachedComponentImage)\n        .def (\"setViewportIgnoreDragFlag\", &Component::setViewportIgnoreDragFlag)\n        .def (\"getViewportIgnoreDragFlag\", &Component::getViewportIgnoreDragFlag)\n        .def (\"getTitle\", &Component::getTitle)\n        .def (\"setTitle\", &Component::setTitle)\n        .def (\"getDescription\", &Component::getDescription)\n        .def (\"setDescription\", &Component::setDescription)\n        .def (\"getHelpText\", &Component::getHelpText)\n        .def (\"setHelpText\", &Component::setHelpText)\n        .def (\"setAccessible\", &Component::setAccessible)\n        .def (\"isAccessible\", &Component::isAccessible)\n    //.def (\"getAccessibilityHandler\", &Component::getAccessibilityHandler)\n        .def (\"invalidateAccessibilityHandler\", &Component::invalidateAccessibilityHandler)\n    //.def (\"createAccessibilityHandler\", &Component::createAccessibilityHandler)\n        .def (\"getChildren\", [](const juce::Component& self)\n        {\n            py::list list;\n            for (const auto& comp : self.getChildren())\n                list.append (comp);\n            return list;\n        })\n        .def (\"releaseOwnership\", [](py::object self) { return self.release(); })\n        .def (\"typeName\", [](const juce::Component* self)\n        {\n            return Helpers::pythonizeClassName (typeid (*self).name());\n        })\n    ;\n\n    // ============================================================================================ juce::Drawable\n\n    py::class_<Drawable, Component, PyDrawable<>> classDrawable (m, \"Drawable\");\n\n    classDrawable\n        .def (py::init<>())\n        .def (\"draw\", &Drawable::draw, \"g\"_a, \"opacity\"_a, \"transform\"_a = AffineTransform())\n        .def (\"drawAt\", &Drawable::drawAt)\n        .def (\"drawWithin\", &Drawable::drawWithin)\n        .def (\"setOriginWithOriginalSize\", &Drawable::setOriginWithOriginalSize)\n        .def (\"setTransformToFit\", &Drawable::setTransformToFit)\n        .def (\"getParent\", &Drawable::getParent, py::return_value_policy::reference)\n    //.def (\"setClipPath\", &Drawable::setClipPath)\n        .def_static (\"createFromImageData\", [](py::buffer data)\n        {\n            auto info = data.request();\n            return Drawable::createFromImageData (info.ptr, static_cast<size_t> (info.size)).release();\n        })\n        .def_static (\"createFromImageDataStream\", &Drawable::createFromImageDataStream)\n        .def_static (\"createFromImageFile\", &Drawable::createFromImageFile)\n        .def_static (\"createFromSVG\", &Drawable::createFromSVG)\n        .def_static (\"createFromSVGFile\", &Drawable::createFromSVGFile)\n        .def_static (\"parseSVGPath\", &Drawable::parseSVGPath)\n        .def (\"getDrawableBounds\", &Drawable::getDrawableBounds)\n        .def (\"replaceColour\", &Drawable::replaceColour)\n        .def (\"setDrawableTransform\", &Drawable::setDrawableTransform)\n    ;\n\n    py::class_<DrawableComposite, Drawable, PyDrawableComposite<>> classDrawableComposite (m, \"DrawableComposite\");\n\n    classDrawableComposite\n        .def (py::init<>())\n        .def (py::init<const PyDrawableComposite<>&>())\n        .def (\"setBoundingBox\", py::overload_cast<Parallelogram<float>> (&DrawableComposite::setBoundingBox))\n        .def (\"setBoundingBox\", py::overload_cast<Rectangle<float>> (&DrawableComposite::setBoundingBox))\n        .def (\"getBoundingBox\", &DrawableComposite::getBoundingBox)\n        .def (\"resetBoundingBoxToContentArea\", &DrawableComposite::resetBoundingBoxToContentArea)\n        .def (\"getContentArea\", &DrawableComposite::getContentArea)\n        .def (\"setContentArea\", &DrawableComposite::setContentArea)\n        .def (\"resetContentAreaAndBoundingBoxToFitChildren\", &DrawableComposite::resetContentAreaAndBoundingBoxToFitChildren)\n    ;\n\n    py::class_<DrawableImage, Drawable, PyDrawable<DrawableImage>> classDrawableImage (m, \"DrawableImage\");\n\n    classDrawableImage\n        .def (py::init<>())\n        .def (py::init<const Image&>())\n        .def (py::init<const PyDrawable<DrawableImage>&>())\n        .def (\"setImage\", &DrawableImage::setImage)\n        .def (\"getImage\", &DrawableImage::getImage)\n        .def (\"setOpacity\", &DrawableImage::setOpacity)\n        .def (\"getOpacity\", &DrawableImage::getOpacity)\n        .def (\"setOverlayColour\", &DrawableImage::setOverlayColour)\n        .def (\"getOverlayColour\", &DrawableImage::getOverlayColour)\n        .def (\"setBoundingBox\", py::overload_cast<Parallelogram<float>> (&DrawableImage::setBoundingBox))\n        .def (\"setBoundingBox\", py::overload_cast<Rectangle<float>> (&DrawableImage::setBoundingBox))\n        .def (\"getBoundingBox\", &DrawableImage::getBoundingBox)\n    ;\n\n    py::class_<DrawablePath, Drawable, PyDrawablePath<>> classDrawablePath (m, \"DrawablePath\");\n\n    classDrawablePath\n        .def (py::init<>())\n        .def (py::init<const PyDrawablePath<>&>())\n        .def (\"setPath\", py::overload_cast<const Path&> (&DrawablePath::setPath))\n        .def (\"getPath\", &DrawablePath::getPath)\n        .def (\"getStrokePath\", &DrawablePath::getStrokePath)\n    ;\n\n    py::class_<DrawableRectangle, Drawable, PyDrawable<DrawableRectangle>> classDrawableRectangle (m, \"DrawableRectangle\");\n\n    classDrawableRectangle\n        .def (py::init<>())\n        .def (py::init<const PyDrawable<DrawableRectangle>&>())\n        .def (\"setRectangle\", &DrawableRectangle::setRectangle)\n        .def (\"getRectangle\", &DrawableRectangle::getRectangle)\n        .def (\"getCornerSize\", &DrawableRectangle::getCornerSize)\n        .def (\"setCornerSize\", &DrawableRectangle::setCornerSize)\n    ;\n\n    py::class_<DrawableShape, Drawable, PyDrawableShape<>> classDrawableShape (m, \"DrawableShape\");\n\n    classDrawableShape\n        .def (py::init<>())\n        .def (py::init<const PyDrawableShape<>&>())\n        .def (\"setFill\", &DrawableShape::setFill)\n        .def (\"getFill\", &DrawableShape::getFill)\n        .def (\"setStrokeFill\", &DrawableShape::setStrokeFill)\n        .def (\"getStrokeFill\", &DrawableShape::getStrokeFill)\n        .def (\"setStrokeType\", &DrawableShape::setStrokeType)\n        .def (\"setStrokeThickness\", &DrawableShape::setStrokeThickness)\n        .def (\"getStrokeType\", &DrawableShape::getStrokeType)\n        .def (\"setDashLengths\", &DrawableShape::setDashLengths)\n        .def (\"getDashLengths\", &DrawableShape::getDashLengths)\n    ;\n\n    py::class_<DrawableText, Drawable, PyDrawableText<>> classDrawableText (m, \"DrawableText\");\n\n    classDrawableText\n        .def (py::init<>())\n        .def (py::init<const PyDrawableText<>&>())\n        .def (\"setText\", &DrawableText::setText)\n        .def (\"getText\", &DrawableText::getText)\n        .def (\"setColour\", &DrawableText::setColour)\n        .def (\"getColour\", &DrawableText::getColour)\n        .def (\"setFont\", &DrawableText::setFont)\n        .def (\"getFont\", &DrawableText::getFont)\n        .def (\"setJustification\", &DrawableText::setJustification)\n        .def (\"setJustification\", [](DrawableText& self, Justification::Flags flags) { self.setJustification (flags); })\n        .def (\"setJustification\", [](DrawableText& self, int flags) { self.setJustification (Justification (flags)); })\n        .def (\"getJustification\", &DrawableText::getJustification)\n        .def (\"getBoundingBox\", &DrawableText::getBoundingBox)\n        .def (\"setBoundingBox\", &DrawableText::setBoundingBox)\n        .def (\"getFontHeight\", &DrawableText::getFontHeight)\n        .def (\"setFontHeight\", &DrawableText::setFontHeight)\n        .def (\"getFontHorizontalScale\", &DrawableText::getFontHorizontalScale)\n        .def (\"setFontHorizontalScale\", &DrawableText::setFontHorizontalScale)\n    ;\n\n    // ============================================================================================ juce::Button\n\n    py::class_<Button, Component, PyButton<>> classButton (m, \"Button\");\n\n    Helpers::makeArithmeticEnum<Button::ConnectedEdgeFlags> (classButton, \"ConnectedEdgeFlags\")\n        .value (\"ConnectedOnLeft\", Button::ConnectedEdgeFlags::ConnectedOnLeft)\n        .value (\"ConnectedOnRight\", Button::ConnectedEdgeFlags::ConnectedOnRight)\n        .value (\"ConnectedOnTop\", Button::ConnectedEdgeFlags::ConnectedOnTop)\n        .value (\"ConnectedOnBottom\", Button::ConnectedEdgeFlags::ConnectedOnBottom)\n        .export_values();\n\n    py::enum_<Button::ButtonState> (classButton, \"ButtonState\")\n        .value (\"buttonNormal\", Button::ButtonState::buttonNormal)\n        .value (\"buttonOver\", Button::ButtonState::buttonOver)\n        .value (\"buttonDown\", Button::ButtonState::buttonDown)\n        .export_values();\n\n    py::class_<Button::Listener, PyButtonListener> classButtonListener (classButton, \"Listener\");\n\n    classButtonListener\n        .def (py::init<>())\n        .def (\"buttonClicked\", &Button::Listener::buttonClicked)\n        .def (\"buttonStateChanged\", &Button::Listener::buttonStateChanged)\n    ;\n\n    classButton\n        .def (py::init<const String&>())\n        .def (\"setButtonText\", &Button::setButtonText)\n        .def (\"getButtonText\", &Button::getButtonText)\n        .def (\"isDown\", &Button::isDown)\n        .def (\"isOver\", &Button::isOver)\n        .def (\"setToggleable\", &Button::setToggleable)\n        .def (\"isToggleable\", &Button::isToggleable)\n        .def (\"setToggleState\", py::overload_cast<bool, NotificationType> (&Button::setToggleState))\n        .def (\"getToggleState\", &Button::getToggleState)\n        .def (\"getToggleStateValue\", &Button::getToggleStateValue, py::return_value_policy::reference)\n        .def (\"setClickingTogglesState\", &Button::setClickingTogglesState)\n        .def (\"getClickingTogglesState\", &Button::getClickingTogglesState)\n        .def (\"setRadioGroupId\", &Button::setRadioGroupId)\n        .def (\"getRadioGroupId\", &Button::getRadioGroupId)\n        .def (\"addListener\", &Button::addListener)\n        .def (\"removeListener\", &Button::removeListener)\n        .def_readwrite (\"onClick\", &Button::onClick)\n        .def_readwrite (\"onStateChange\", &Button::onStateChange)\n        .def (\"triggerClick\", &Button::triggerClick)\n    //.def (\"setCommandToTrigger\", &Button::setCommandToTrigger)\n        .def (\"getCommandID\", &Button::getCommandID)\n        .def (\"addShortcut\", &Button::addShortcut)\n        .def (\"clearShortcuts\", &Button::clearShortcuts)\n        .def (\"isRegisteredForShortcut\", &Button::isRegisteredForShortcut)\n        .def (\"setRepeatSpeed\", &Button::setRepeatSpeed)\n        .def (\"setTriggeredOnMouseDown\", &Button::setTriggeredOnMouseDown)\n        .def (\"getTriggeredOnMouseDown\", &Button::getTriggeredOnMouseDown)\n        .def (\"getMillisecondsSinceButtonDown\", &Button::getMillisecondsSinceButtonDown)\n        .def (\"setConnectedEdges\", &Button::setConnectedEdges)\n        .def (\"setConnectedEdges\", [](Button& self, Button::ConnectedEdgeFlags flags) { self.setConnectedEdges (static_cast<int> (flags)); })\n        .def (\"getConnectedEdgeFlags\", &Button::getConnectedEdgeFlags)\n        .def (\"isConnectedOnLeft\", &Button::isConnectedOnLeft)\n        .def (\"isConnectedOnRight\", &Button::isConnectedOnRight)\n        .def (\"isConnectedOnTop\", &Button::isConnectedOnTop)\n        .def (\"isConnectedOnBottom\", &Button::isConnectedOnBottom)\n        .def (\"setState\", &Button::setState)\n        .def (\"getState\", &Button::getState)\n    ;\n\n    // ============================================================================================ juce::ArrowButton\n\n    py::class_<ArrowButton, Button, PyButton<ArrowButton>> classArrowButton (m, \"ArrowButton\");\n\n    classArrowButton\n        .def (py::init<const String&, float, Colour>())\n    ;\n\n    // ============================================================================================ juce::DrawableButton\n\n    py::class_<DrawableButton, Button, PyDrawableButton<>> classDrawableButton (m, \"DrawableButton\");\n\n    py::enum_<DrawableButton::ButtonStyle> (classDrawableButton, \"ButtonStyle\")\n        .value (\"ImageFitted\", DrawableButton::ButtonStyle::ImageFitted)\n        .value (\"ImageRaw\", DrawableButton::ButtonStyle::ImageRaw)\n        .value (\"ImageAboveTextLabel\", DrawableButton::ButtonStyle::ImageAboveTextLabel)\n        .value (\"ImageOnButtonBackground\", DrawableButton::ButtonStyle::ImageOnButtonBackground)\n        .value (\"ImageOnButtonBackgroundOriginalSize\", DrawableButton::ButtonStyle::ImageOnButtonBackgroundOriginalSize)\n        .value (\"ImageStretched\", DrawableButton::ButtonStyle::ImageStretched)\n        .export_values();\n\n    classDrawableButton\n        .def (py::init<const String&, DrawableButton::ButtonStyle>())\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage) { self->setImages (normalImage); })\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage, const Drawable* downImage) { self->setImages (normalImage, downImage); })\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage, const Drawable* downImage, const Drawable* disabledImage) { self->setImages (normalImage, downImage, disabledImage); })\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage, const Drawable* downImage, const Drawable* disabledImage, const Drawable* normalImageOn) { self->setImages (normalImage, downImage, disabledImage, normalImageOn); })\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage, const Drawable* downImage, const Drawable* disabledImage, const Drawable* normalImageOn, const Drawable* overImageOn) { self->setImages (normalImage, downImage, disabledImage, normalImageOn, overImageOn); })\n        .def (\"setImages\", [](DrawableButton* self, const Drawable* normalImage, const Drawable* downImage, const Drawable* disabledImage, const Drawable* normalImageOn, const Drawable* overImageOn, const Drawable* downImageOn) { self->setImages (normalImage, downImage, disabledImage, normalImageOn, overImageOn, downImageOn); })\n        .def (\"setImages\", &DrawableButton::setImages)\n        .def (\"setButtonStyle\", &DrawableButton::setButtonStyle)\n        .def (\"getStyle\", &DrawableButton::getStyle)\n        .def (\"setEdgeIndent\", &DrawableButton::setEdgeIndent)\n        .def (\"getEdgeIndent\", &DrawableButton::getEdgeIndent)\n        .def (\"getCurrentImage\", &DrawableButton::getCurrentImage, py::return_value_policy::reference)\n        .def (\"getNormalImage\", &DrawableButton::getNormalImage, py::return_value_policy::reference)\n        .def (\"getOverImage\", &DrawableButton::getOverImage, py::return_value_policy::reference)\n        .def (\"getDownImage\", &DrawableButton::getDownImage, py::return_value_policy::reference)\n        .def (\"getImageBounds\", &DrawableButton::getImageBounds)\n    ;\n\n    classDrawableButton.attr (\"textColourId\") = py::int_ (static_cast<int> (DrawableButton::textColourId));\n    classDrawableButton.attr (\"textColourOnId\") = py::int_ (static_cast<int> (DrawableButton::textColourOnId));\n    classDrawableButton.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (DrawableButton::backgroundColourId));\n    classDrawableButton.attr (\"backgroundOnColourId\") = py::int_ (static_cast<int> (DrawableButton::backgroundOnColourId));\n\n    // ============================================================================================ juce::HyperlinkButton\n\n    py::class_<HyperlinkButton, Button, PyButton<HyperlinkButton>> classHyperlinkButton (m, \"HyperlinkButton\");\n\n    classHyperlinkButton\n        .def (py::init<>())\n        .def (py::init<const String&, const URL&>())\n        .def (\"setFont\", &HyperlinkButton::setFont)\n        .def (\"setURL\", &HyperlinkButton::setURL)\n        .def (\"getURL\", &HyperlinkButton::getURL)\n        .def (\"changeWidthToFitText\", &HyperlinkButton::changeWidthToFitText)\n        .def (\"setJustificationType\", &HyperlinkButton::setJustificationType)\n        .def (\"setJustificationType\", [](HyperlinkButton& self, Justification::Flags flags) { self.setJustificationType (flags); })\n        .def (\"setJustificationType\", [](HyperlinkButton& self, int flags) { self.setJustificationType (Justification (flags)); })\n        .def (\"getJustificationType\", &HyperlinkButton::getJustificationType)\n    //.def (\"createAccessibilityHandler\", &ToggleButton::createAccessibilityHandler)\n    ;\n\n    classHyperlinkButton.attr (\"textColourId\") = py::int_ (static_cast<int> (HyperlinkButton::textColourId));\n\n    // ============================================================================================ juce::ImageButton\n\n    py::class_<ImageButton, Button, PyButton<ImageButton>> classImageButton (m, \"ImageButton\");\n\n    classImageButton\n        .def (py::init<const String&>(), \"name\"_a = String())\n        .def (\"setImages\", &ImageButton::setImages)\n        .def (\"getNormalImage\", &ImageButton::getNormalImage)\n        .def (\"getOverImage\", &ImageButton::getOverImage)\n        .def (\"getDownImage\", &ImageButton::getDownImage)\n    ;\n\n    // ============================================================================================ juce::ShapeButton\n\n    py::class_<ShapeButton, Button, PyButton<ShapeButton>> classShapeButton (m, \"ShapeButton\");\n\n    classShapeButton\n        .def (py::init<const String&, Colour, Colour, Colour>())\n        .def (\"setShape\", &ShapeButton::setShape)\n        .def (\"setColours\", &ShapeButton::setColours)\n        .def (\"setOnColours\", &ShapeButton::setOnColours)\n        .def (\"shouldUseOnColours\", &ShapeButton::shouldUseOnColours)\n        .def (\"setOutline\", &ShapeButton::setOutline)\n        .def (\"setBorderSize\", &ShapeButton::setBorderSize)\n    ;\n\n    // ============================================================================================ juce::TextButton\n\n    py::class_<TextButton, Button, PyButton<TextButton>> classTextButton (m, \"TextButton\");\n\n    classTextButton\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (py::init<const String&, const String&>())\n        .def (\"changeWidthToFitText\", py::overload_cast<> (&TextButton::changeWidthToFitText))\n        .def (\"changeWidthToFitText\", py::overload_cast<int> (&TextButton::changeWidthToFitText))\n        .def (\"getBestWidthForHeight\", &TextButton::getBestWidthForHeight)\n    ;\n\n    classTextButton.attr (\"buttonColourId\") = py::int_ (static_cast<int> (TextButton::buttonColourId));\n    classTextButton.attr (\"buttonOnColourId\") = py::int_ (static_cast<int> (TextButton::buttonOnColourId));\n    classTextButton.attr (\"textColourOffId\") = py::int_ (static_cast<int> (TextButton::textColourOffId));\n    classTextButton.attr (\"textColourOnId\") = py::int_ (static_cast<int> (TextButton::textColourOnId));\n\n    // ============================================================================================ juce::ToggleButton\n\n    py::class_<ToggleButton, Button, PyButton<ToggleButton>> classToggleButton (m, \"ToggleButton\");\n\n    classToggleButton\n        .def (py::init<>())\n        .def (py::init<const String&>())\n        .def (\"changeWidthToFitText\", &ToggleButton::changeWidthToFitText)\n    //.def (\"createAccessibilityHandler\", &ToggleButton::createAccessibilityHandler)\n    ;\n\n    classToggleButton.attr (\"textColourId\") = py::int_ (static_cast<int> (ToggleButton::textColourId));\n    classToggleButton.attr (\"tickColourId\") = py::int_ (static_cast<int> (ToggleButton::tickColourId));\n    classToggleButton.attr (\"tickDisabledColourId\") = py::int_ (static_cast<int> (ToggleButton::tickDisabledColourId));\n\n    // ============================================================================================ juce::ToolbarItemFactory\n\n    py::class_<ToolbarItemFactory, PyToolbarItemFactory> classToolbarItemFactory (m, \"ToolbarItemFactory\");\n\n    py::enum_<ToolbarItemFactory::SpecialItemIds> (classToolbarItemFactory, \"SpecialItemIds\")\n        .value (\"separatorBarId\", ToolbarItemFactory::SpecialItemIds::separatorBarId)\n        .value (\"spacerId\", ToolbarItemFactory::SpecialItemIds::spacerId)\n        .value (\"flexibleSpacerId\", ToolbarItemFactory::SpecialItemIds::flexibleSpacerId)\n        .export_values();\n\n    classToolbarItemFactory\n        .def (py::init<>())\n        .def (\"getAllToolbarItemIds\", &ToolbarItemFactory::getAllToolbarItemIds)\n        .def (\"getDefaultItemSet\", &ToolbarItemFactory::getDefaultItemSet)\n        .def (\"createItem\", &ToolbarItemFactory::createItem)\n    ;\n\n    // ============================================================================================ juce::Toolbar\n\n    py::class_<Toolbar, Component, PyComponent<Toolbar>> classToolbar (m, \"Toolbar\");\n\n    py::enum_<Toolbar::ToolbarItemStyle> (classToolbar, \"ToolbarItemStyle\")\n        .value (\"iconsOnly\", Toolbar::ToolbarItemStyle::iconsOnly)\n        .value (\"iconsWithText\", Toolbar::ToolbarItemStyle::iconsWithText)\n        .value (\"textOnly\", Toolbar::ToolbarItemStyle::textOnly)\n        .export_values();\n\n    py::enum_<Toolbar::CustomisationFlags> (classToolbar, \"CustomisationFlags\")\n        .value (\"allowIconsOnlyChoice\", Toolbar::CustomisationFlags::allowIconsOnlyChoice)\n        .value (\"allowIconsWithTextChoice\", Toolbar::CustomisationFlags::allowIconsWithTextChoice)\n        .value (\"allowTextOnlyChoice\", Toolbar::CustomisationFlags::allowTextOnlyChoice)\n        .value (\"showResetToDefaultsButton\", Toolbar::CustomisationFlags::showResetToDefaultsButton)\n        .value (\"allCustomisationOptionsEnabled\", Toolbar::CustomisationFlags::allCustomisationOptionsEnabled)\n        .export_values();\n\n    classToolbar\n        .def (py::init<>())\n        .def (\"setVertical\", &Toolbar::setVertical)\n        .def (\"isVertical\", &Toolbar::isVertical)\n        .def (\"getThickness\", &Toolbar::getThickness)\n        .def (\"getLength\", &Toolbar::getLength)\n        .def (\"clear\", &Toolbar::clear)\n        .def (\"addItem\", &Toolbar::addItem)\n        .def (\"removeToolbarItem\", &Toolbar::removeToolbarItem)\n        .def (\"removeAndReturnItem\", &Toolbar::removeAndReturnItem, py::return_value_policy::reference)\n        .def (\"getNumItems\", &Toolbar::getNumItems)\n        .def (\"getItemId\", &Toolbar::getItemId)\n        .def (\"getItemComponent\", &Toolbar::getItemComponent, py::return_value_policy::reference)\n        .def (\"addDefaultItems\", &Toolbar::addDefaultItems)\n        .def (\"getStyle\", &Toolbar::getStyle)\n        .def (\"setStyle\", &Toolbar::setStyle)\n        .def (\"showCustomisationDialog\", &Toolbar::showCustomisationDialog)\n        .def (\"setEditingActive\", &Toolbar::setEditingActive)\n        .def (\"toString\", &Toolbar::toString)\n        .def (\"restoreFromString\", &Toolbar::restoreFromString)\n    ;\n\n    classToolbar.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (Toolbar::backgroundColourId));\n    classToolbar.attr (\"separatorColourId\") = py::int_ (static_cast<int> (Toolbar::separatorColourId));\n    classToolbar.attr (\"buttonMouseOverBackgroundColourId\") = py::int_ (static_cast<int> (Toolbar::buttonMouseOverBackgroundColourId));\n    classToolbar.attr (\"buttonMouseDownBackgroundColourId\") = py::int_ (static_cast<int> (Toolbar::buttonMouseDownBackgroundColourId));\n    classToolbar.attr (\"labelTextColourId\") = py::int_ (static_cast<int> (Toolbar::labelTextColourId));\n    classToolbar.attr (\"editingModeOutlineColourId\") = py::int_ (static_cast<int> (Toolbar::editingModeOutlineColourId));\n\n    // ============================================================================================ juce::ToolbarItemComponent\n\n    py::class_<ToolbarItemComponent, Button, PyToolbarItemComponent<>> classToolbarItemComponent (m, \"ToolbarItemComponent\");\n\n    py::enum_<ToolbarItemComponent::ToolbarEditingMode> (classToolbarItemComponent, \"ToolbarEditingMode\")\n        .value (\"normalMode\", ToolbarItemComponent::ToolbarEditingMode::normalMode)\n        .value (\"editableOnToolbar\", ToolbarItemComponent::ToolbarEditingMode::editableOnToolbar)\n        .value (\"editableOnPalette\", ToolbarItemComponent::ToolbarEditingMode::editableOnPalette)\n        .export_values();\n\n    classToolbarItemComponent\n        .def (py::init<int, const String&, bool>())\n        .def (\"getItemId\", &ToolbarItemComponent::getItemId)\n        .def (\"getToolbar\", &ToolbarItemComponent::getToolbar, py::return_value_policy::reference)\n        .def (\"isToolbarVertical\", &ToolbarItemComponent::isToolbarVertical)\n        .def (\"getStyle\", &ToolbarItemComponent::getStyle)\n        .def (\"setStyle\", &ToolbarItemComponent::setStyle)\n        .def (\"getContentArea\", &ToolbarItemComponent::getContentArea)\n        .def (\"getToolbarItemSizes\", &ToolbarItemComponent::getToolbarItemSizes)\n        .def (\"paintButtonArea\", &ToolbarItemComponent::paintButtonArea)\n        .def (\"contentAreaChanged\", &ToolbarItemComponent::contentAreaChanged)\n        .def (\"setEditingMode\", &ToolbarItemComponent::setEditingMode)\n        .def (\"getEditingMode\", &ToolbarItemComponent::getEditingMode)\n    ;\n\n    // ============================================================================================ juce::MenuBarModel\n\n    py::class_<MenuBarModel, PyMenuBarModel> classMenuBarModel (m, \"MenuBarModel\");\n\n    py::class_<MenuBarModel::Listener, PyMenuBarModelListener> classMenuBarModelListener (m, \"Listener\");\n\n    classMenuBarModelListener\n        .def (py::init<>())\n        .def (\"menuBarItemsChanged\", &MenuBarModel::Listener::menuBarItemsChanged)\n        .def (\"menuCommandInvoked\", &MenuBarModel::Listener::menuCommandInvoked)\n        .def (\"menuBarActivated\", &MenuBarModel::Listener::menuBarActivated)\n    ;\n\n    classMenuBarModel\n        .def (py::init<>())\n        .def (\"menuItemsChanged\", &MenuBarModel::menuItemsChanged)\n    //.def (\"setApplicationCommandManagerToWatch\", &MenuBarModel::setApplicationCommandManagerToWatch)\n        .def (\"addListener\", &MenuBarModel::addListener)\n        .def (\"removeListener\", &MenuBarModel::removeListener)\n        .def (\"getMenuBarNames\", &MenuBarModel::getMenuBarNames)\n        .def (\"getMenuForIndex\", &MenuBarModel::getMenuForIndex)\n        .def (\"menuItemSelected\", &MenuBarModel::menuItemSelected)\n        .def (\"menuBarActivated\", &MenuBarModel::menuBarActivated)\n#if JUCE_MAC\n        .def_static (\"setMacMainMenu\", &MenuBarModel::setMacMainMenu)\n        .def_static (\"getMacMainMenu\", &MenuBarModel::getMacMainMenu, py::return_value_policy::reference)\n    //.def_static (\"getMacExtraAppleItemsMenu\", &MenuBarModel::getMacExtraAppleItemsMenu, py::return_value_policy::reference)\n#endif\n    ;\n\n    // ============================================================================================ juce::Label\n\n    py::class_<Label, Component, PyLabel<>> classLabel (m, \"Label\");\n    py::class_<Label::Listener, PyLabelListener> classLabelListener (classLabel, \"Listener\");\n\n    classLabelListener\n        .def (py::init<>())\n        .def (\"labelTextChanged\", &Label::Listener::labelTextChanged)\n        .def (\"editorShown\", &Label::Listener::editorShown)\n        .def (\"editorHidden\", &Label::Listener::editorHidden)\n    ;\n\n    classLabel\n        .def (py::init<const String&, const String&>(), \"componentName\"_a = String(), \"labelText\"_a = String())\n        .def (\"setText\", &Label::setText)\n        .def (\"getText\", &Label::getText, \"returnActiveEditorContents\"_a = false)\n        .def (\"getTextValue\", &Label::getTextValue, py::return_value_policy::reference_internal)\n        .def (\"setFont\", &Label::setFont)\n        .def (\"getFont\", &Label::getFont)\n        .def (\"setJustificationType\", &Label::setJustificationType)\n        .def (\"setJustificationType\", [](Label& self, Justification::Flags flags) { self.setJustificationType (flags); })\n        .def (\"setJustificationType\", [](Label& self, int flags) { self.setJustificationType (Justification (flags)); })\n        .def (\"getJustificationType\", &Label::getJustificationType)\n        .def (\"setBorderSize\", &Label::setBorderSize)\n        .def (\"getBorderSize\", &Label::getBorderSize)\n        .def (\"attachToComponent\", &Label::attachToComponent)\n        .def (\"getAttachedComponent\", &Label::getAttachedComponent, py::return_value_policy::reference)\n        .def (\"isAttachedOnLeft\", &Label::isAttachedOnLeft)\n        .def (\"setMinimumHorizontalScale\", &Label::setMinimumHorizontalScale)\n        .def (\"getMinimumHorizontalScale\", &Label::getMinimumHorizontalScale)\n    //.def (\"setKeyboardType\", &Label::setKeyboardType)\n        .def (\"addListener\", &Label::addListener)\n        .def (\"removeListener\", &Label::removeListener)\n        .def_readwrite (\"onTextChange\", &Label::onTextChange)\n        .def_readwrite (\"onEditorShow\", &Label::onEditorShow)\n        .def_readwrite (\"onEditorHide\", &Label::onEditorHide)\n        .def (\"setEditable\", &Label::setEditable, \"editOnSingleClick\"_a, \"editOnDoubleClick\"_a = false, \"lossOfFocusDiscardsChanges\"_a = false)\n        .def (\"isEditableOnSingleClick\", &Label::isEditableOnSingleClick)\n        .def (\"isEditableOnDoubleClick\", &Label::isEditableOnDoubleClick)\n        .def (\"doesLossOfFocusDiscardChanges\", &Label::doesLossOfFocusDiscardChanges)\n        .def (\"isEditable\", &Label::isEditable)\n        .def (\"showEditor\", &Label::showEditor)\n        .def (\"hideEditor\", &Label::hideEditor)\n        .def (\"isBeingEdited\", &Label::isBeingEdited)\n    //.def (\"getCurrentTextEditor\", &Label::getCurrentTextEditor, py::return_value_policy::reference_internal)\n    //.def (\"createAccessibilityHandler\", &Label::createAccessibilityHandler)\n    ;\n\n    classLabel.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (Label::backgroundColourId));\n    classLabel.attr (\"textColourId\") = py::int_ (static_cast<int> (Label::textColourId));\n    classLabel.attr (\"outlineColourId\") = py::int_ (static_cast<int> (Label::outlineColourId));\n    classLabel.attr (\"backgroundWhenEditingColourId\") = py::int_ (static_cast<int> (Label::backgroundWhenEditingColourId));\n    classLabel.attr (\"textWhenEditingColourId\") = py::int_ (static_cast<int> (Label::textWhenEditingColourId));\n    classLabel.attr (\"outlineWhenEditingColourId\") = py::int_ (static_cast<int> (Label::outlineWhenEditingColourId));\n\n    // ============================================================================================ juce::Label\n\n    py::class_<TextEditor, TextInputTarget, Component, PyTextEditor<>> classTextEditor (m, \"TextEditor\", py::multiple_inheritance());\n    py::class_<TextEditor::Listener, PyTextEditorListener> classTextEditorListener (classTextEditor, \"Listener\");\n    py::class_<TextEditor::InputFilter, PyTextEditorInputFilter<>> classTextEditorInputFilter (classTextEditor, \"InputFilter\");\n    py::class_<TextEditor::LengthAndCharacterRestriction, TextEditor::InputFilter, PyTextEditorInputFilter<TextEditor::LengthAndCharacterRestriction>>\n        classTextEditorLengthAndCharacterRestriction (classTextEditor, \"LengthAndCharacterRestriction\");\n\n    classTextEditorListener\n        .def (py::init<>())\n        .def (\"textEditorTextChanged\", &TextEditor::Listener::textEditorTextChanged)\n        .def (\"textEditorReturnKeyPressed\", &TextEditor::Listener::textEditorReturnKeyPressed)\n        .def (\"textEditorEscapeKeyPressed\", &TextEditor::Listener::textEditorEscapeKeyPressed)\n        .def (\"textEditorFocusLost\", &TextEditor::Listener::textEditorFocusLost)\n    ;\n\n    classTextEditorInputFilter\n        .def (py::init<>())\n        .def (\"filterNewText\", &TextEditor::InputFilter::filterNewText)\n    ;\n\n    classTextEditorLengthAndCharacterRestriction\n        .def (py::init<int, const String&>())\n    ;\n\n    classTextEditor\n        .def (py::init<const String&, juce_wchar>(), \"componentName\"_a = String(), \"passwordCharacter\"_a = L'\\0')\n    //.def (py::init([](const String& componentName, const String& passwordCharacter)\n    //    { return new TextEditor (componentName, passwordCharacter.isNotEmpty() ? passwordCharacter[0] : 0); }),\n    //    \"componentName\"_a = String(), \"passwordCharacter\"_a = \"\\0\")\n        .def (\"setMultiLine\", &TextEditor::setMultiLine, \"shouldBeMultiLine\"_a, \"shouldWordWrap\"_a = true)\n        .def (\"isMultiLine\", &TextEditor::isMultiLine)\n        .def (\"setReturnKeyStartsNewLine\", &TextEditor::setReturnKeyStartsNewLine)\n        .def (\"getReturnKeyStartsNewLine\", &TextEditor::getReturnKeyStartsNewLine)\n        .def (\"setTabKeyUsedAsCharacter\", &TextEditor::setTabKeyUsedAsCharacter)\n        .def (\"isTabKeyUsedAsCharacter\", &TextEditor::isTabKeyUsedAsCharacter)\n        .def (\"setEscapeAndReturnKeysConsumed\", &TextEditor::setEscapeAndReturnKeysConsumed)\n        .def (\"setReadOnly\", &TextEditor::setReadOnly)\n        .def (\"isReadOnly\", &TextEditor::isReadOnly)\n        .def (\"setCaretVisible\", &TextEditor::setCaretVisible)\n        .def (\"isCaretVisible\", &TextEditor::isCaretVisible)\n        .def (\"setScrollbarsShown\", &TextEditor::setScrollbarsShown)\n        .def (\"areScrollbarsShown\", &TextEditor::areScrollbarsShown)\n    //.def (\"setPasswordCharacter\", &TextEditor::setPasswordCharacter)\n    //.def (\"getPasswordCharacter\", &TextEditor::getPasswordCharacter)\n        .def (\"setPopupMenuEnabled\", &TextEditor::setPopupMenuEnabled)\n        .def (\"isPopupMenuEnabled\", &TextEditor::isPopupMenuEnabled)\n        .def (\"isPopupMenuCurrentlyActive\", &TextEditor::isPopupMenuCurrentlyActive)\n        .def (\"setFont\", &TextEditor::setFont)\n        .def (\"applyFontToAllText\", &TextEditor::applyFontToAllText, \"newFont\"_a, \"changeCurrentFont\"_a = true)\n        .def (\"getFont\", &TextEditor::getFont)\n        .def (\"applyColourToAllText\", &TextEditor::applyColourToAllText, \"newColour\"_a, \"changeCurrentTextColour\"_a = true)\n        .def (\"setWhitespaceUnderlined\", &TextEditor::setWhitespaceUnderlined)\n        .def (\"isWhitespaceUnderlined\", &TextEditor::isWhitespaceUnderlined)\n        .def (\"setSelectAllWhenFocused\", &TextEditor::setSelectAllWhenFocused)\n        .def (\"setTextToShowWhenEmpty\", &TextEditor::setTextToShowWhenEmpty)\n        .def (\"getTextToShowWhenEmpty\", &TextEditor::getTextToShowWhenEmpty)\n        .def (\"setScrollBarThickness\", &TextEditor::setScrollBarThickness)\n        .def (\"addListener\", &TextEditor::addListener)\n        .def (\"removeListener\", &TextEditor::removeListener)\n        .def_readwrite (\"onTextChange\", &TextEditor::onTextChange)\n        .def_readwrite (\"onReturnKey\", &TextEditor::onReturnKey)\n        .def_readwrite (\"onEscapeKey\", &TextEditor::onEscapeKey)\n        .def_readwrite (\"onFocusLost\", &TextEditor::onFocusLost)\n        .def (\"getText\", &TextEditor::getText)\n        .def (\"getTextInRange\", &TextEditor::getTextInRange)\n        .def (\"isEmpty\", &TextEditor::isEmpty)\n        .def (\"setText\", &TextEditor::setText, \"newText\"_a, \"sendTextChangeMessage\"_a = true)\n        .def (\"getTextValue\", &TextEditor::getTextValue)\n        .def (\"insertTextAtCaret\", &TextEditor::insertTextAtCaret)\n        .def (\"clear\", &TextEditor::clear)\n        .def (\"cut\", &TextEditor::cut)\n        .def (\"copy\", &TextEditor::copy)\n        .def (\"paste\", &TextEditor::paste)\n        .def (\"getCaretPosition\", &TextEditor::getCaretPosition)\n        .def (\"setCaretPosition\", &TextEditor::setCaretPosition)\n        .def (\"scrollEditorToPositionCaret\", &TextEditor::scrollEditorToPositionCaret)\n        .def (\"getCaretRectangleForCharIndex\", &TextEditor::getCaretRectangleForCharIndex)\n        .def (\"setHighlightedRegion\", &TextEditor::setHighlightedRegion)\n        .def (\"getHighlightedRegion\", &TextEditor::getHighlightedRegion)\n        .def (\"getHighlightedText\", &TextEditor::getHighlightedText)\n    //.def (\"getTextIndexAt\", &TextEditor::getTextIndexAt)\n    //.def (\"getTextIndexAt\", &TextEditor::getTextIndexAt)\n        .def (\"getCharIndexForPoint\", &TextEditor::getCharIndexForPoint)\n        .def (\"getTotalNumChars\", &TextEditor::getTotalNumChars)\n        .def (\"getTextWidth\", &TextEditor::getTextWidth)\n        .def (\"getTextHeight\", &TextEditor::getTextHeight)\n        .def (\"setIndents\", &TextEditor::setIndents)\n        .def (\"getTopIndent\", &TextEditor::getTopIndent)\n        .def (\"getLeftIndent\", &TextEditor::getLeftIndent)\n        .def (\"setBorder\", &TextEditor::setBorder)\n        .def (\"getBorder\", &TextEditor::getBorder)\n        .def (\"setScrollToShowCursor\", &TextEditor::setScrollToShowCursor)\n        .def (\"setJustification\", &TextEditor::setJustification)\n        .def (\"setJustification\", [](TextEditor& self, Justification::Flags flags) { self.setJustification (flags); })\n        .def (\"setJustification\", [](TextEditor& self, int flags) { self.setJustification (Justification (flags)); })\n        .def (\"getJustificationType\", &TextEditor::getJustificationType)\n        .def (\"setLineSpacing\", &TextEditor::setLineSpacing)\n        .def (\"getLineSpacing\", &TextEditor::getLineSpacing)\n        .def (\"getTextBounds\", &TextEditor::getTextBounds)\n        .def (\"moveCaretToEnd\", py::overload_cast<> (&TextEditor::moveCaretToEnd))\n        .def (\"moveCaretLeft\", &TextEditor::moveCaretLeft)\n        .def (\"moveCaretRight\", &TextEditor::moveCaretRight)\n        .def (\"moveCaretUp\", &TextEditor::moveCaretUp)\n        .def (\"moveCaretDown\", &TextEditor::moveCaretDown)\n        .def (\"pageUp\", &TextEditor::pageUp)\n        .def (\"pageDown\", &TextEditor::pageDown)\n        .def (\"scrollDown\", &TextEditor::scrollDown)\n        .def (\"scrollUp\", &TextEditor::scrollUp)\n        .def (\"moveCaretToTop\", &TextEditor::moveCaretToTop)\n        .def (\"moveCaretToStartOfLine\", &TextEditor::moveCaretToStartOfLine)\n        .def (\"moveCaretToEnd\", py::overload_cast<bool> (&TextEditor::moveCaretToEnd))\n        .def (\"moveCaretToEndOfLine\", &TextEditor::moveCaretToEndOfLine)\n        .def (\"deleteBackwards\", &TextEditor::deleteBackwards)\n        .def (\"deleteForwards\", &TextEditor::deleteForwards)\n        .def (\"copyToClipboard\", &TextEditor::copyToClipboard)\n        .def (\"cutToClipboard\", &TextEditor::cutToClipboard)\n        .def (\"pasteFromClipboard\", &TextEditor::pasteFromClipboard)\n        .def (\"selectAll\", &TextEditor::selectAll)\n        .def (\"undo\", &TextEditor::undo)\n        .def (\"redo\", &TextEditor::redo)\n    //.def (\"addPopupMenuItems\", &TextEditor::addPopupMenuItems)\n    //.def (\"performPopupMenuAction\", &TextEditor::performPopupMenuAction)\n        .def (\"setInputFilter\", &TextEditor::setInputFilter)\n        .def (\"getInputFilter\", &TextEditor::getInputFilter, py::return_value_policy::reference)\n        .def (\"setInputRestrictions\", &TextEditor::setInputRestrictions, \"maxTextLength\"_a, \"allowedCharacters\"_a = String())\n    //.def (\"setKeyboardType\", &TextEditor::setKeyboardType)\n        .def (\"setClicksOutsideDismissVirtualKeyboard\", &TextEditor::setClicksOutsideDismissVirtualKeyboard)\n        .def (\"getClicksOutsideDismissVirtualKeyboard\", &TextEditor::getClicksOutsideDismissVirtualKeyboard)\n    ;\n\n    // ============================================================================================ juce::GroupComponent\n\n    py::class_<GroupComponent, PyComponent<GroupComponent>> classGroupComponent (m, \"GroupComponent\");\n\n    classGroupComponent\n        .def (py::init<const String&, const String&>(), \"componentName\"_a, \"labelText\"_a)\n        .def (\"setText\", &GroupComponent::setText, \"newText\"_a)\n        .def (\"getText\", &GroupComponent::getText)\n        .def (\"setTextLabelPosition\", &GroupComponent::setTextLabelPosition, \"justification\"_a)\n        .def (\"setTextLabelPosition\", [](GroupComponent& self, Justification::Flags flags) { self.setTextLabelPosition (flags); }, \"justification\"_a)\n        .def (\"setTextLabelPosition\", [](GroupComponent& self, int flags) { self.setTextLabelPosition (Justification (flags)); }, \"justification\"_a)\n        .def (\"getTextLabelPosition\", &GroupComponent::getTextLabelPosition)\n    ;\n\n    classGroupComponent.attr (\"outlineColourId\") = py::int_ (static_cast<int> (GroupComponent::outlineColourId));\n    classGroupComponent.attr (\"textColourId\") = py::int_ (static_cast<int> (GroupComponent::textColourId));\n\n    // ============================================================================================ juce::ListBox\n\n    py::class_<ListBoxModel, PyListBoxModel> classListBoxModel (m, \"ListBoxModel\");\n\n    classListBoxModel\n        .def (py::init<>())\n        .def (\"getNumRows\", &ListBoxModel::getNumRows)\n        .def (\"paintListBoxItem\", &ListBoxModel::paintListBoxItem)\n        .def (\"refreshComponentForRow\", &ListBoxModel::refreshComponentForRow, py::return_value_policy::reference_internal)\n        .def (\"getNameForRow\", &ListBoxModel::getNameForRow)\n        .def (\"listBoxItemClicked\", &ListBoxModel::listBoxItemClicked)\n        .def (\"listBoxItemDoubleClicked\", &ListBoxModel::listBoxItemDoubleClicked)\n        .def (\"backgroundClicked\", &ListBoxModel::backgroundClicked)\n        .def (\"selectedRowsChanged\", &ListBoxModel::selectedRowsChanged)\n        .def (\"deleteKeyPressed\", &ListBoxModel::deleteKeyPressed)\n        .def (\"returnKeyPressed\", &ListBoxModel::returnKeyPressed)\n        .def (\"listWasScrolled\", &ListBoxModel::listWasScrolled)\n        .def (\"getDragSourceDescription\", &ListBoxModel::getDragSourceDescription)\n        .def (\"mayDragToExternalWindows\", &ListBoxModel::mayDragToExternalWindows)\n        .def (\"getTooltipForRow\", &ListBoxModel::getTooltipForRow)\n        .def (\"getMouseCursorForRow\", &ListBoxModel::getMouseCursorForRow)\n    ;\n\n    py::class_<ListBox, Component, PyListBox<>> classListBox (m, \"ListBox\");\n\n    classListBox\n        .def (py::init<const String&, ListBoxModel*>(), \"componentName\"_a = String(), \"model\"_a = nullptr)\n        .def (\"setModel\", &ListBox::setModel)\n        .def (\"getListBoxModel\", &ListBox::getListBoxModel, py::return_value_policy::reference)\n        .def (\"updateContent\", &ListBox::updateContent)\n        .def (\"setMultipleSelectionEnabled\", &ListBox::setMultipleSelectionEnabled)\n        .def (\"setClickingTogglesRowSelection\", &ListBox::setClickingTogglesRowSelection)\n        .def (\"setRowSelectedOnMouseDown\", &ListBox::setRowSelectedOnMouseDown)\n        .def (\"getRowSelectedOnMouseDown\", &ListBox::getRowSelectedOnMouseDown)\n        .def (\"setMouseMoveSelectsRows\", &ListBox::setMouseMoveSelectsRows)\n        .def (\"selectRow\", &ListBox::selectRow, \"rowNumber\"_a, \"dontScrollToShowThisRow\"_a = false, \"deselectOthersFirst\"_a = true)\n        .def (\"selectRangeOfRows\", &ListBox::selectRangeOfRows, \"firstRow\"_a, \"lastRow\"_a, \"dontScrollToShowThisRange\"_a = false)\n        .def (\"deselectRow\", &ListBox::deselectRow)\n        .def (\"deselectAllRows\", &ListBox::deselectAllRows)\n        .def (\"flipRowSelection\", &ListBox::flipRowSelection)\n        .def (\"getSelectedRows\", &ListBox::getSelectedRows)\n        .def (\"setSelectedRows\", py::overload_cast<const SparseSet<int>&, NotificationType> (&ListBox::setSelectedRows), \"setOfRowsToBeSelected\"_a, \"sendNotificationEventToModel\"_a = sendNotification)\n        .def (\"isRowSelected\", &ListBox::isRowSelected)\n        .def (\"getNumSelectedRows\", &ListBox::getNumSelectedRows)\n        .def (\"getSelectedRow\", &ListBox::getSelectedRow, \"index\"_a = 0)\n        .def (\"getLastRowSelected\", &ListBox::getLastRowSelected)\n        .def (\"selectRowsBasedOnModifierKeys\", &ListBox::selectRowsBasedOnModifierKeys)\n        .def (\"setVerticalPosition\", &ListBox::setVerticalPosition)\n        .def (\"getVerticalPosition\", &ListBox::getVerticalPosition)\n        .def (\"scrollToEnsureRowIsOnscreen\", &ListBox::scrollToEnsureRowIsOnscreen)\n    //.def (\"getVerticalScrollBar\", &ListBox::getVerticalScrollBar, py::return_value_policy::reference_internal)\n    //.def (\"getHorizontalScrollBar\", &ListBox::getHorizontalScrollBar, py::return_value_policy::reference_internal)\n        .def (\"getRowContainingPosition\", &ListBox::getRowContainingPosition)\n        .def (\"getInsertionIndexForPosition\", &ListBox::getInsertionIndexForPosition)\n        .def (\"getRowPosition\", &ListBox::getRowPosition)\n        .def (\"getComponentForRowNumber\", &ListBox::getComponentForRowNumber, py::return_value_policy::reference_internal)\n        .def (\"getRowNumberOfComponent\", &ListBox::getRowNumberOfComponent)\n        .def (\"getVisibleRowWidth\", &ListBox::getVisibleRowWidth)\n        .def (\"setRowHeight\", &ListBox::setRowHeight)\n        .def (\"getRowHeight\", &ListBox::getRowHeight)\n        .def (\"getNumRowsOnScreen\", &ListBox::getNumRowsOnScreen)\n        .def (\"setOutlineThickness\", &ListBox::setOutlineThickness)\n        .def (\"getOutlineThickness\", &ListBox::getOutlineThickness)\n    //.def (\"setHeaderComponent\", &ListBox::setHeaderComponent)\n    //.def (\"getHeaderComponent\", &ListBox::getHeaderComponent, py::return_value_policy::reference_internal)\n        .def (\"setMinimumContentWidth\", &ListBox::setMinimumContentWidth)\n        .def (\"getVisibleContentWidth\", &ListBox::getVisibleContentWidth)\n        .def (\"repaintRow\", &ListBox::repaintRow)\n    //.def (\"createSnapshotOfRows\", &ListBox::createSnapshotOfRows)\n    //.def (\"getViewport\", &ListBox::getViewport, py::return_value_policy::reference_internal)\n    ;\n\n    classListBox.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (ListBox::backgroundColourId));\n    classListBox.attr (\"outlineColourId\") = py::int_ (static_cast<int> (ListBox::outlineColourId));\n    classListBox.attr (\"textColourId\") = py::int_ (static_cast<int> (ListBox::textColourId));\n\n    // ============================================================================================ juce::TableHeaderComponent\n\n    py::class_<TableHeaderComponent, Component, PyTableHeaderComponent<>> classTableHeaderComponent (m, \"TableHeaderComponent\");\n\n    Helpers::makeArithmeticEnum<TableHeaderComponent::ColumnPropertyFlags> (classTableHeaderComponent, \"ColumnPropertyFlags\")\n        .value (\"visible\", TableHeaderComponent::ColumnPropertyFlags::visible)\n        .value (\"resizable\", TableHeaderComponent::ColumnPropertyFlags::resizable)\n        .value (\"draggable\", TableHeaderComponent::ColumnPropertyFlags::draggable)\n        .value (\"appearsOnColumnMenu\", TableHeaderComponent::ColumnPropertyFlags::appearsOnColumnMenu)\n        .value (\"sortable\", TableHeaderComponent::ColumnPropertyFlags::sortable)\n        .value (\"sortedForwards\", TableHeaderComponent::ColumnPropertyFlags::sortedForwards)\n        .value (\"sortedBackwards\", TableHeaderComponent::ColumnPropertyFlags::sortedBackwards)\n        .value (\"defaultFlags\", TableHeaderComponent::ColumnPropertyFlags::defaultFlags)\n        .value (\"notResizable\", TableHeaderComponent::ColumnPropertyFlags::notResizable)\n        .value (\"notResizableOrSortable\", TableHeaderComponent::ColumnPropertyFlags::notResizableOrSortable)\n        .value (\"notSortable\", TableHeaderComponent::ColumnPropertyFlags::notSortable)\n        .export_values();\n\n    py::class_<TableHeaderComponent::Listener, PyTableHeaderComponentListener> classTableHeaderComponentListener (classTableHeaderComponent, \"Listener\");\n\n    classTableHeaderComponentListener\n        .def (py::init<>())\n        // TODO\n    ;\n\n    classTableHeaderComponent\n        .def (py::init<>())\n        .def (\"addColumn\", &TableHeaderComponent::addColumn,\n            \"columnName\"_a, \"columnId\"_a, \"width\"_a, \"minimumWidth\"_a = 30, \"maximumWidth\"_a = -1, \"propertyFlags\"_a = TableHeaderComponent::defaultFlags, \"insertIndex\"_a = -1)\n        .def (\"addColumn\", [](TableHeaderComponent& self, const String& columnName, int columnId, int width, int minimumWidth, int maximumWidth, TableHeaderComponent::ColumnPropertyFlags propertyFlags, int insertIndex)\n        {\n            self.addColumn (columnName, columnId, width, minimumWidth, maximumWidth, static_cast<int> (propertyFlags), insertIndex);\n        }, \"columnName\"_a, \"columnId\"_a, \"width\"_a, \"minimumWidth\"_a = 30, \"maximumWidth\"_a = -1, \"propertyFlags\"_a = TableHeaderComponent::defaultFlags, \"insertIndex\"_a = -1)\n        .def (\"removeColumn\", &TableHeaderComponent::removeColumn)\n        .def (\"removeAllColumns\", &TableHeaderComponent::removeAllColumns)\n        .def (\"getNumColumns\", &TableHeaderComponent::getNumColumns)\n        .def (\"getColumnName\", &TableHeaderComponent::getColumnName)\n        .def (\"setColumnName\", &TableHeaderComponent::setColumnName)\n        .def (\"moveColumn\", &TableHeaderComponent::moveColumn)\n        .def (\"getColumnWidth\", &TableHeaderComponent::getColumnWidth)\n        .def (\"setColumnWidth\", &TableHeaderComponent::setColumnWidth)\n        .def (\"setColumnVisible\", &TableHeaderComponent::setColumnVisible)\n        .def (\"isColumnVisible\", &TableHeaderComponent::isColumnVisible)\n        .def (\"setSortColumnId\", &TableHeaderComponent::setSortColumnId)\n        .def (\"getSortColumnId\", &TableHeaderComponent::getSortColumnId)\n        .def (\"isSortedForwards\", &TableHeaderComponent::isSortedForwards)\n        .def (\"reSortTable\", &TableHeaderComponent::reSortTable)\n        .def (\"getTotalWidth\", &TableHeaderComponent::getTotalWidth)\n        .def (\"getIndexOfColumnId\", &TableHeaderComponent::getIndexOfColumnId)\n        .def (\"getColumnIdOfIndex\", &TableHeaderComponent::getColumnIdOfIndex)\n        .def (\"getColumnPosition\", &TableHeaderComponent::getColumnPosition)\n        .def (\"getColumnIdAtX\", &TableHeaderComponent::getColumnIdAtX)\n        .def (\"setStretchToFitActive\", &TableHeaderComponent::setStretchToFitActive)\n        .def (\"isStretchToFitActive\", &TableHeaderComponent::isStretchToFitActive)\n        .def (\"resizeAllColumnsToFit\", &TableHeaderComponent::resizeAllColumnsToFit)\n        .def (\"setPopupMenuActive\", &TableHeaderComponent::setPopupMenuActive)\n        .def (\"isPopupMenuActive\", &TableHeaderComponent::isPopupMenuActive)\n        .def (\"toString\", &TableHeaderComponent::toString)\n        .def (\"restoreFromString\", &TableHeaderComponent::restoreFromString)\n        .def (\"addListener\", &TableHeaderComponent::addListener)\n        .def (\"removeListener\", &TableHeaderComponent::removeListener)\n        .def (\"columnClicked\", &TableHeaderComponent::columnClicked)\n    //.def (\"addMenuItems\", &TableHeaderComponent::addMenuItems)\n        .def (\"reactToMenuItem\", &TableHeaderComponent::reactToMenuItem)\n        .def (\"showColumnChooserMenu\", &TableHeaderComponent::showColumnChooserMenu)\n    ;\n\n    classTableHeaderComponent.attr (\"textColourId\") = py::int_ (static_cast<int> (TableHeaderComponent::textColourId));\n    classTableHeaderComponent.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (TableHeaderComponent::backgroundColourId));\n    classTableHeaderComponent.attr (\"outlineColourId\") = py::int_ (static_cast<int> (TableHeaderComponent::outlineColourId));\n    classTableHeaderComponent.attr (\"highlightColourId\") = py::int_ (static_cast<int> (TableHeaderComponent::highlightColourId));\n\n    // ============================================================================================ juce::TableListBox\n\n    py::class_<TableListBoxModel, PyTableListBoxModel> classTableListBoxModel (m, \"TableListBoxModel\");\n\n    classTableListBoxModel\n        .def (py::init<>())\n        // TODO\n    ;\n\n    py::class_<TableListBox, ListBox, PyListBox<TableListBox>> classTableListBox (m, \"TableListBox\");\n\n    classTableListBox\n        .def (py::init<const String&, TableListBoxModel*>(), \"componentName\"_a = String(), \"model\"_a = nullptr)\n        .def (\"setModel\", &TableListBox::setModel)\n        .def (\"getTableListBoxModel\", &TableListBox::getTableListBoxModel, py::return_value_policy::reference)\n        .def (\"getHeader\", &TableListBox::getHeader, py::return_value_policy::reference_internal)\n        .def (\"setHeader\", [](TableListBox& self, py::object header)\n        {\n            if (header.is_none() || ! py::isinstance<TableHeaderComponent> (header))\n                py::pybind11_fail (\"Invalid specified message type in \\\"TableListBox::setHeader\\\"\");\n\n            self.setHeader (std::unique_ptr<TableHeaderComponent> (header.release().cast<TableHeaderComponent*>()));\n        })\n        .def (\"setHeaderHeight\", &TableListBox::setHeaderHeight)\n        .def (\"getHeaderHeight\", &TableListBox::getHeaderHeight)\n        .def (\"autoSizeColumn\", &TableListBox::autoSizeColumn)\n        .def (\"autoSizeAllColumns\", &TableListBox::autoSizeAllColumns)\n        .def (\"setAutoSizeMenuOptionShown\", &TableListBox::setAutoSizeMenuOptionShown)\n        .def (\"isAutoSizeMenuOptionShown\", &TableListBox::isAutoSizeMenuOptionShown)\n        .def (\"getCellPosition\", &TableListBox::getCellPosition)\n        .def (\"getCellComponent\", &TableListBox::getCellComponent, py::return_value_policy::reference)\n        .def (\"scrollToEnsureColumnIsOnscreen\", &TableListBox::scrollToEnsureColumnIsOnscreen)\n    ;\n\n    // ============================================================================================ juce::Slider\n\n    py::class_<Slider, Component, PySlider<>> classSlider (m, \"Slider\");\n\n    py::enum_<Slider::SliderStyle> (classSlider, \"SliderStyle\")\n        .value (\"LinearHorizontal\", Slider::SliderStyle::LinearHorizontal)\n        .value (\"LinearVertical\", Slider::SliderStyle::LinearVertical)\n        .value (\"LinearBar\", Slider::SliderStyle::LinearBar)\n        .value (\"LinearBarVertical\", Slider::SliderStyle::LinearBarVertical)\n        .value (\"Rotary\", Slider::SliderStyle::Rotary)\n        .value (\"RotaryHorizontalDrag\", Slider::SliderStyle::RotaryHorizontalDrag)\n        .value (\"RotaryVerticalDrag\", Slider::SliderStyle::RotaryVerticalDrag)\n        .value (\"RotaryHorizontalVerticalDrag\", Slider::SliderStyle::RotaryHorizontalVerticalDrag)\n        .value (\"IncDecButtons\", Slider::SliderStyle::IncDecButtons)\n        .value (\"TwoValueHorizontal\", Slider::SliderStyle::TwoValueHorizontal)\n        .value (\"TwoValueVertical\", Slider::SliderStyle::TwoValueVertical)\n        .value (\"ThreeValueHorizontal\", Slider::SliderStyle::ThreeValueHorizontal)\n        .value (\"ThreeValueVertical\", Slider::SliderStyle::ThreeValueVertical)\n        .export_values();\n\n    py::enum_<Slider::TextEntryBoxPosition> (classSlider, \"TextEntryBoxPosition\")\n        .value (\"NoTextBox\", Slider::TextEntryBoxPosition::NoTextBox)\n        .value (\"TextBoxLeft\", Slider::TextEntryBoxPosition::TextBoxLeft)\n        .value (\"TextBoxRight\", Slider::TextEntryBoxPosition::TextBoxRight)\n        .value (\"TextBoxAbove\", Slider::TextEntryBoxPosition::TextBoxAbove)\n        .value (\"TextBoxBelow\", Slider::TextEntryBoxPosition::TextBoxBelow)\n        .export_values();\n\n    py::enum_<Slider::DragMode> (classSlider, \"DragMode\")\n        .value (\"notDragging\", Slider::DragMode::notDragging)\n        .value (\"absoluteDrag\", Slider::DragMode::absoluteDrag)\n        .value (\"velocityDrag\", Slider::DragMode::velocityDrag)\n        .export_values();\n\n    py::enum_<Slider::IncDecButtonMode> (classSlider, \"IncDecButtonMode\")\n        .value (\"incDecButtonsNotDraggable\", Slider::IncDecButtonMode::incDecButtonsNotDraggable)\n        .value (\"incDecButtonsDraggable_AutoDirection\", Slider::IncDecButtonMode::incDecButtonsDraggable_AutoDirection)\n        .value (\"incDecButtonsDraggable_Horizontal\", Slider::IncDecButtonMode::incDecButtonsDraggable_Horizontal)\n        .value (\"incDecButtonsDraggable_Vertical\", Slider::IncDecButtonMode::incDecButtonsDraggable_Vertical)\n        .export_values();\n\n    py::class_<Slider::Listener, PySliderListener> classSliderListener (classSlider, \"Listener\");\n\n    classSliderListener\n        .def (py::init<>())\n        .def (\"sliderValueChanged\", &Slider::Listener::sliderValueChanged)\n        .def (\"sliderDragStarted\", &Slider::Listener::sliderDragStarted)\n        .def (\"sliderDragEnded\", &Slider::Listener::sliderDragEnded)\n    ;\n\n    py::class_<Slider::RotaryParameters> classSliderRotaryParameters (classSlider, \"RotaryParameters\");\n\n    classSliderRotaryParameters\n        .def (py::init<>())\n        .def_readwrite (\"startAngleRadians\", &Slider::RotaryParameters::startAngleRadians)\n        .def_readwrite (\"endAngleRadians\", &Slider::RotaryParameters::endAngleRadians)\n        .def_readwrite (\"stopAtEnd\", &Slider::RotaryParameters::stopAtEnd)\n    ;\n\n    py::class_<Slider::SliderLayout> classSliderSliderLayout (classSlider, \"SliderLayout\");\n\n    classSliderSliderLayout\n        .def (py::init<>())\n        .def_readwrite (\"sliderBounds\", &Slider::SliderLayout::sliderBounds)\n        .def_readwrite (\"textBoxBounds\", &Slider::SliderLayout::textBoxBounds)\n    ;\n\n    classSlider\n        .def (py::init<>())\n        .def (py::init<const String&>(), \"componentName\"_a)\n        .def (py::init<Slider::SliderStyle, Slider::TextEntryBoxPosition>(), \"style\"_a, \"textBoxPosition\"_a)\n        .def (\"setSliderStyle\", &Slider::setSliderStyle, \"newStyle\"_a)\n        .def (\"getSliderStyle\", &Slider::getSliderStyle)\n        .def (\"setRotaryParameters\", py::overload_cast<Slider::RotaryParameters> (&Slider::setRotaryParameters), \"newParameters\"_a)\n        .def (\"setRotaryParameters\", py::overload_cast<float, float, bool> (&Slider::setRotaryParameters), \"startAngleRadians\"_a, \"endAngleRadians\"_a, \"stopAtEnd\"_a)\n        .def (\"getRotaryParameters\", &Slider::getRotaryParameters)\n        .def (\"setMouseDragSensitivity\", &Slider::setMouseDragSensitivity, \"distanceForFullScaleDrag\"_a)\n        .def (\"getMouseDragSensitivity\", &Slider::getMouseDragSensitivity)\n        .def (\"setVelocityBasedMode\", &Slider::setVelocityBasedMode, \"isVelocityBased\"_a)\n        .def (\"getVelocityBasedMode\", &Slider::getVelocityBasedMode)\n        .def (\"setVelocityModeParameters\", &Slider::setVelocityModeParameters,\n            \"sensitivity\"_a = 1.0, \"threshold\"_a = 1, \"offset\"_a = 0.0, \"userCanPressKeyToSwapMode\"_a = true, \"modifiersToSwapModes\"_a = ModifierKeys::ctrlAltCommandModifiers)\n        .def (\"getVelocitySensitivity\", &Slider::getVelocitySensitivity)\n        .def (\"getVelocityThreshold\", &Slider::getVelocityThreshold)\n        .def (\"getVelocityOffset\", &Slider::getVelocityOffset)\n        .def (\"getVelocityModeIsSwappable\", &Slider::getVelocityModeIsSwappable)\n        .def (\"setSkewFactor\", &Slider::setSkewFactor, \"factor\"_a, \"symmetricSkew\"_a = false)\n        .def (\"setSkewFactorFromMidPoint\", &Slider::setSkewFactorFromMidPoint, \"sliderValueToShowAtMidPoint\"_a)\n        .def (\"getSkewFactor\", &Slider::getSkewFactor)\n        .def (\"isSymmetricSkew\", &Slider::isSymmetricSkew)\n        .def (\"setIncDecButtonsMode\", &Slider::setIncDecButtonsMode)\n        .def (\"setTextBoxStyle\", &Slider::setTextBoxStyle, \"newPosition\"_a, \"isReadOnly\"_a, \"textEntryBoxWidth\"_a, \"textEntryBoxHeight\"_a)\n        .def (\"getTextBoxPosition\", &Slider::getTextBoxPosition)\n        .def (\"getTextBoxWidth\", &Slider::getTextBoxWidth)\n        .def (\"getTextBoxHeight\", &Slider::getTextBoxHeight)\n        .def (\"setTextBoxIsEditable\", &Slider::setTextBoxIsEditable, \"shouldBeEditable\"_a)\n        .def (\"isTextBoxEditable\", &Slider::isTextBoxEditable)\n        .def (\"showTextBox\", &Slider::showTextBox)\n        .def (\"hideTextBox\", &Slider::hideTextBox, \"discardCurrentEditorContents\"_a)\n        .def (\"setValue\", py::overload_cast<double, NotificationType> (&Slider::setValue), \"newValue\"_a, \"notification\"_a = sendNotificationAsync)\n        .def (\"getValue\", &Slider::getValue)\n        .def (\"getValueObject\", &Slider::getValueObject, py::return_value_policy::reference_internal)\n        .def (\"setRange\", py::overload_cast<double, double, double> (&Slider::setRange), \"newMinimum\"_a, \"newMaximum\"_a, \"newInterval\"_a = 0.0)\n        .def (\"setRange\", py::overload_cast<Range<double>, double> (&Slider::setRange), \"newRange\"_a, \"newInterval\"_a)\n    //.def (\"setNormalisableRange\", &Slider::setNormalisableRange)\n    //.def (\"getNormalisableRange\", &Slider::getNormalisableRange)\n        .def (\"getRange\", &Slider::getRange)\n        .def (\"getMaximum\", &Slider::getMaximum)\n        .def (\"getMinimum\", &Slider::getMinimum)\n        .def (\"getInterval\", &Slider::getInterval)\n        .def (\"getMinValue\", &Slider::getMinValue)\n        .def (\"getMinValueObject\", &Slider::getMinValueObject, py::return_value_policy::reference_internal)\n        .def (\"setMinValue\", py::overload_cast<double, NotificationType, bool> (&Slider::setMinValue), \"newValue\"_a, \"notification\"_a = sendNotificationAsync, \"allowNudgingOfOtherValues\"_a = false)\n        .def (\"getMaxValue\", &Slider::getMaxValue)\n        .def (\"getMaxValueObject\", &Slider::getMaxValueObject, py::return_value_policy::reference_internal)\n        .def (\"setMaxValue\", py::overload_cast<double, NotificationType, bool> (&Slider::setMaxValue), \"newValue\"_a, \"notification\"_a = sendNotificationAsync, \"allowNudgingOfOtherValues\"_a = false)\n        .def (\"setMinAndMaxValues\", py::overload_cast<double, double, NotificationType> (&Slider::setMinAndMaxValues), \"newMinValue\"_a, \"newMaxValue\"_a, \"notification\"_a = sendNotificationAsync)\n        .def (\"addListener\", &Slider::addListener)\n        .def (\"removeListener\", &Slider::removeListener)\n        .def_readwrite (\"onValueChange\", &Slider::onValueChange)\n        .def_readwrite (\"onDragStart\", &Slider::onDragStart)\n        .def_readwrite (\"onDragEnd\", &Slider::onDragEnd)\n        .def_readwrite (\"valueFromTextFunction\", &Slider::valueFromTextFunction)\n        .def_readwrite (\"textFromValueFunction\", &Slider::textFromValueFunction)\n        .def (\"setDoubleClickReturnValue\", &Slider::setDoubleClickReturnValue)\n        .def (\"getDoubleClickReturnValue\", &Slider::getDoubleClickReturnValue)\n        .def (\"isDoubleClickReturnEnabled\", &Slider::isDoubleClickReturnEnabled)\n        .def (\"setChangeNotificationOnlyOnRelease\", &Slider::setChangeNotificationOnlyOnRelease)\n        .def (\"setSliderSnapsToMousePosition\", &Slider::setSliderSnapsToMousePosition)\n        .def (\"getSliderSnapsToMousePosition\", &Slider::getSliderSnapsToMousePosition)\n        .def (\"setPopupDisplayEnabled\", &Slider::setPopupDisplayEnabled)\n        .def (\"getCurrentPopupDisplay\", &Slider::getCurrentPopupDisplay, py::return_value_policy::reference)\n        .def (\"setPopupMenuEnabled\", &Slider::setPopupMenuEnabled)\n        .def (\"setScrollWheelEnabled\", &Slider::setScrollWheelEnabled)\n        .def (\"isScrollWheelEnabled\", &Slider::isScrollWheelEnabled)\n        .def (\"getThumbBeingDragged\", &Slider::getThumbBeingDragged)\n        .def (\"startedDragging\", &Slider::startedDragging)\n        .def (\"stoppedDragging\", &Slider::stoppedDragging)\n        .def (\"valueChanged\", &Slider::valueChanged)\n        .def (\"getValueFromText\", &Slider::getValueFromText)\n        .def (\"getTextFromValue\", &Slider::getTextFromValue)\n        .def (\"setTextValueSuffix\", &Slider::setTextValueSuffix)\n        .def (\"getTextValueSuffix\", &Slider::getTextValueSuffix)\n        .def (\"getNumDecimalPlacesToDisplay\", &Slider::getNumDecimalPlacesToDisplay)\n        .def (\"setNumDecimalPlacesToDisplay\", &Slider::setNumDecimalPlacesToDisplay)\n        .def (\"proportionOfLengthToValue\", &Slider::proportionOfLengthToValue)\n        .def (\"valueToProportionOfLength\", &Slider::valueToProportionOfLength)\n        .def (\"getPositionOfValue\", &Slider::getPositionOfValue)\n        .def (\"snapValue\", &Slider::snapValue)\n        .def (\"updateText\", &Slider::updateText)\n        .def (\"isHorizontal\", &Slider::isHorizontal)\n        .def (\"isVertical\", &Slider::isVertical)\n        .def (\"isRotary\", &Slider::isRotary)\n        .def (\"isBar\", &Slider::isBar)\n        .def (\"isTwoValue\", &Slider::isTwoValue)\n        .def (\"isThreeValue\", &Slider::isThreeValue)\n    ;\n\n    classSlider.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (Slider::backgroundColourId));\n    classSlider.attr (\"thumbColourId\") = py::int_ (static_cast<int> (Slider::thumbColourId));\n    classSlider.attr (\"trackColourId\") = py::int_ (static_cast<int> (Slider::trackColourId));\n    classSlider.attr (\"rotarySliderFillColourId\") = py::int_ (static_cast<int> (Slider::rotarySliderFillColourId));\n    classSlider.attr (\"rotarySliderOutlineColourId\") = py::int_ (static_cast<int> (Slider::rotarySliderOutlineColourId));\n    classSlider.attr (\"textBoxTextColourId\") = py::int_ (static_cast<int> (Slider::textBoxTextColourId));\n    classSlider.attr (\"textBoxBackgroundColourId\") = py::int_ (static_cast<int> (Slider::textBoxBackgroundColourId));\n    classSlider.attr (\"textBoxHighlightColourId\") = py::int_ (static_cast<int> (Slider::textBoxHighlightColourId));\n    classSlider.attr (\"textBoxOutlineColourId\") = py::int_ (static_cast<int> (Slider::textBoxOutlineColourId));\n\n    // ============================================================================================ juce::TopLevelWindow\n\n    py::class_<TopLevelWindow, Component, PyComponent<TopLevelWindow>> classTopLevelWindow (m, \"TopLevelWindow\");\n\n    classTopLevelWindow\n        .def (py::init<const String&, bool>())\n        .def (\"isActiveWindow\", &TopLevelWindow::isActiveWindow)\n        .def (\"centreAroundComponent\", &TopLevelWindow::centreAroundComponent)\n        .def (\"setDropShadowEnabled\", &TopLevelWindow::setDropShadowEnabled)\n        .def (\"isDropShadowEnabled\", &TopLevelWindow::isDropShadowEnabled)\n        .def (\"setUsingNativeTitleBar\", &TopLevelWindow::setUsingNativeTitleBar)\n        .def (\"isUsingNativeTitleBar\", &TopLevelWindow::isUsingNativeTitleBar)\n        .def_static (\"getNumTopLevelWindows\", &TopLevelWindow::getNumTopLevelWindows)\n        .def_static (\"getTopLevelWindow\", &TopLevelWindow::getTopLevelWindow, py::return_value_policy::reference)\n        .def_static (\"getActiveTopLevelWindow\", &TopLevelWindow::getActiveTopLevelWindow, py::return_value_policy::reference)\n        .def (\"addToDesktop\", py::overload_cast<>(&TopLevelWindow::addToDesktop))\n    ;\n\n    // ============================================================================================ juce::ResizableWindow\n\n    py::class_<ResizableWindow, TopLevelWindow, PyComponent<ResizableWindow>> classResizableWindow (m, \"ResizableWindow\");\n\n    classResizableWindow\n        .def (py::init<const String&, bool>())\n        .def (py::init<const String&, Colour, bool>())\n        .def (\"getBackgroundColour\", &ResizableWindow::getBackgroundColour)\n        .def (\"setBackgroundColour\", &ResizableWindow::setBackgroundColour)\n        .def (\"setResizable\", &ResizableWindow::setResizable)\n        .def (\"isResizable\", &ResizableWindow::isResizable)\n        .def (\"setResizeLimits\", &ResizableWindow::setResizeLimits)\n        .def (\"setDraggable\", &ResizableWindow::setDraggable)\n        .def (\"isDraggable\", &ResizableWindow::isDraggable)\n    //.def (\"getConstrainer\", &ResizableWindow::getConstrainer)\n    //.def (\"setConstrainer\", &ResizableWindow::setConstrainer)\n        .def (\"setBoundsConstrained\", &ResizableWindow::setBoundsConstrained)\n        .def (\"isFullScreen\", &ResizableWindow::isFullScreen)\n        .def (\"setFullScreen\", &ResizableWindow::setFullScreen)\n        .def (\"isMinimised\", &ResizableWindow::isMinimised)\n        .def (\"setMinimised\", &ResizableWindow::setMinimised)\n        .def (\"isKioskMode\", &ResizableWindow::isKioskMode)\n        .def (\"getWindowStateAsString\", &ResizableWindow::getWindowStateAsString)\n        .def (\"restoreWindowStateFromString\", &ResizableWindow::restoreWindowStateFromString)\n        .def (\"getContentComponent\", &ResizableWindow::getContentComponent, py::return_value_policy::reference)\n        .def (\"setContentOwned\", &ResizableWindow::setContentOwned)\n        .def (\"setContentNonOwned\", &ResizableWindow::setContentNonOwned)\n        .def (\"clearContentComponent\", &ResizableWindow::clearContentComponent)\n        .def (\"setContentComponentSize\", &ResizableWindow::setContentComponentSize)\n    //.def (\"getBorderThickness\", &ResizableWindow::getBorderThickness)\n    //.def (\"getContentComponentBorder\", &ResizableWindow::getContentComponentBorder)\n    ;\n\n    classResizableWindow.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (ResizableWindow::backgroundColourId));\n\n    // ============================================================================================ juce::DocumentWindow\n\n    py::class_<DocumentWindow, ResizableWindow, PyDocumentWindow<>> classDocumentWindow (m, \"DocumentWindow\");\n\n    Helpers::makeArithmeticEnum<DocumentWindow::TitleBarButtons> (classDocumentWindow, \"TitleBarButtons\")\n        .value (\"minimiseButton\", DocumentWindow::minimiseButton)\n        .value (\"maximiseButton\", DocumentWindow::maximiseButton)\n        .value (\"closeButton\", DocumentWindow::closeButton)\n        .value (\"allButtons\", DocumentWindow::allButtons)\n        .export_values();\n\n    classDocumentWindow\n        .def (py::init(\n            [](const String& name, Colour backgroundColour, DocumentWindow::TitleBarButtons requiredButtons, bool addToDesktop)\n                { return new DocumentWindow (name, backgroundColour, static_cast<int> (requiredButtons), addToDesktop); },\n            [](const String& name, Colour backgroundColour, DocumentWindow::TitleBarButtons requiredButtons, bool addToDesktop)\n                { return new PyDocumentWindow<> (name, backgroundColour, static_cast<int> (requiredButtons), addToDesktop); }),\n            \"name\"_a, \"backgroundColour\"_a, \"requiredButtons\"_a, \"addToDesktop\"_a = true)\n        .def (py::init(\n            [](const String& name, Colour backgroundColour, int requiredButtons, bool addToDesktop)\n                { return new DocumentWindow (name, backgroundColour, requiredButtons, addToDesktop); },\n            [](const String& name, Colour backgroundColour, int requiredButtons, bool addToDesktop)\n                { return new PyDocumentWindow<> (name, backgroundColour, requiredButtons, addToDesktop); }),\n            \"name\"_a, \"backgroundColour\"_a, \"requiredButtons\"_a, \"addToDesktop\"_a = true)\n        .def (\"setName\", &DocumentWindow::setName)\n        .def (\"setIcon\", &DocumentWindow::setIcon)\n        .def (\"setTitleBarHeight\", &DocumentWindow::setTitleBarHeight)\n        .def (\"getTitleBarHeight\", &DocumentWindow::getTitleBarHeight)\n        .def (\"setTitleBarButtonsRequired\", [](DocumentWindow& self, DocumentWindow::TitleBarButtons requiredButtons, bool positionTitleBarButtonsOnLeft)\n        {\n            self.setTitleBarButtonsRequired (static_cast<int> (requiredButtons), positionTitleBarButtonsOnLeft);\n        })\n        .def (\"setTitleBarTextCentred\", &DocumentWindow::setTitleBarTextCentred)\n        .def (\"setMenuBar\", &DocumentWindow::setMenuBar)\n        .def (\"getMenuBarComponent\", &DocumentWindow::getMenuBarComponent, py::return_value_policy::reference)\n        .def (\"setMenuBarComponent\", &DocumentWindow::setMenuBarComponent)\n        .def (\"closeButtonPressed\", &DocumentWindow::closeButtonPressed)\n        .def (\"minimiseButtonPressed\", &DocumentWindow::minimiseButtonPressed)\n        .def (\"maximiseButtonPressed\", &DocumentWindow::maximiseButtonPressed)\n        .def (\"getCloseButton\", &DocumentWindow::getCloseButton, py::return_value_policy::reference)\n        .def (\"getMinimiseButton\", &DocumentWindow::getMinimiseButton, py::return_value_policy::reference)\n        .def (\"getMaximiseButton\", &DocumentWindow::getMaximiseButton, py::return_value_policy::reference)\n    ;\n\n    classDocumentWindow.attr (\"textColourId\") = py::int_ (static_cast<int> (DocumentWindow::textColourId));\n\n    // ============================================================================================ juce::DialogWindow\n\n    py::class_<DialogWindow, DocumentWindow, PyDocumentWindow<DialogWindow>> classDialogWindow (m, \"DialogWindow\");\n\n    py::class_<DialogWindow::LaunchOptions> classDialogWindowLaunchOptions (classDialogWindow, \"LaunchOptions\");\n\n    classDialogWindowLaunchOptions\n        .def (py::init<>())\n        .def_readwrite (\"dialogTitle\", &DialogWindow::LaunchOptions::dialogTitle)\n        .def_readwrite (\"dialogBackgroundColour\", &DialogWindow::LaunchOptions::dialogBackgroundColour)\n    //.def_readwrite (\"content\", &DialogWindow::LaunchOptions::content)\n        .def_readwrite (\"componentToCentreAround\", &DialogWindow::LaunchOptions::componentToCentreAround)\n        .def_readwrite (\"escapeKeyTriggersCloseButton\", &DialogWindow::LaunchOptions::escapeKeyTriggersCloseButton)\n        .def_readwrite (\"useNativeTitleBar\", &DialogWindow::LaunchOptions::useNativeTitleBar)\n        .def_readwrite (\"resizable\", &DialogWindow::LaunchOptions::resizable)\n        .def_readwrite (\"useBottomRightCornerResizer\", &DialogWindow::LaunchOptions::useBottomRightCornerResizer)\n        .def (\"launchAsync\", &DialogWindow::LaunchOptions::launchAsync)\n        .def (\"create\", &DialogWindow::LaunchOptions::create)\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def (\"runModal\", &DialogWindow::LaunchOptions::runModal)\n#endif\n    ;\n\n    classDialogWindow\n        .def (py::init<const String&, Colour, bool, bool, float>(),\n            \"name\"_a, \"backgroundColour\"_a, \"escapeKeyTriggersCloseButton\"_a, \"addToDesktop\"_a = true, \"desktopScale\"_a = 1.0f)\n        .def_static (\"showDialog\", &DialogWindow::showDialog,\n            \"dialogTitle\"_a, \"contentComponent\"_a, \"componentToCentreAround\"_a, \"backgroundColour\"_a, \"escapeKeyTriggersCloseButton\"_a, \"shouldBeResizable\"_a = false, \"useBottomRightCornerResizer\"_a = false)\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def_static (\"showModalDialog\", &DialogWindow::showModalDialog,\n            \"dialogTitle\"_a, \"contentComponent\"_a, \"componentToCentreAround\"_a, \"backgroundColour\"_a, \"escapeKeyTriggersCloseButton\"_a, \"shouldBeResizable\"_a = false, \"useBottomRightCornerResizer\"_a = false)\n#endif\n    ;\n\n    // ============================================================================================ juce::TooltipWindow\n\n    py::class_<TooltipWindow, Component, PyTooltipWindow<>> classTooltipWindow (m, \"TooltipWindow\");\n\n    classTooltipWindow\n        .def (py::init<Component*, int>(), \"parentComponent\"_a = static_cast<Component*>(nullptr), \"millisecondsBeforeTipAppears\"_a = 700)\n        .def (\"setMillisecondsBeforeTipAppears\", &TooltipWindow::setMillisecondsBeforeTipAppears, \"newTimeMs\"_a = 700)\n        .def (\"displayTip\", &TooltipWindow::displayTip)\n        .def (\"hideTip\", &TooltipWindow::hideTip)\n        .def (\"getTipFor\", &TooltipWindow::getTipFor)\n        .def (\"displayTip\", &TooltipWindow::displayTip)\n    ;\n\n    classTooltipWindow.attr (\"backgroundColourId\") = py::int_ (static_cast<int> (TooltipWindow::backgroundColourId));\n    classTooltipWindow.attr (\"textColourId\") = py::int_ (static_cast<int> (TooltipWindow::textColourId));\n    classTooltipWindow.attr (\"outlineColourId\") = py::int_ (static_cast<int> (TooltipWindow::outlineColourId));\n\n    // ============================================================================================ juce::ThreadWithProgressWindow\n\n    py::class_<ThreadWithProgressWindow, Thread, PyThreadWithProgressWindow<>> classThreadWithProgressWindow (m, \"ThreadWithProgressWindow\");\n\n    classThreadWithProgressWindow\n        .def (py::init<const String&, bool, bool, int, const String&, Component*>(),\n            \"windowTitle\"_a, \"hasProgressBar\"_a, \"hasCancelButton\"_a, \"timeOutMsWhenCancelling\"_a = 10000, \"cancelButtonText\"_a = String(), \"componentToCentreAround\"_a = static_cast<Component*>(nullptr))\n#if JUCE_MODAL_LOOPS_PERMITTED\n        .def (\"runThread\", &ThreadWithProgressWindow::runThread)\n#endif\n        .def (\"launchThread\", &ThreadWithProgressWindow::launchThread)\n        .def (\"setProgress\", &ThreadWithProgressWindow::setProgress)\n        .def (\"setStatusMessage\", &ThreadWithProgressWindow::setStatusMessage)\n    //.def (\"getAlertWindow\", &ThreadWithProgressWindow::getAlertWindow)\n        .def (\"threadComplete\", &ThreadWithProgressWindow::threadComplete)\n    ;\n\n    // ============================================================================================ juce::FileChooser\n\n    py::class_<FileChooser> classFileChooser (m, \"FileChooser\");\n\n    classFileChooser\n        .def (py::init<const String&, const File&, const String&, bool, bool, Component*>(),\n            \"dialogBoxTitle\"_a, \"initialFileOrDirectory\"_a = File(), \"filePatternsAllowed\"_a = String(), \"useOSNativeDialogBox\"_a = true, \"treatFilePackagesAsDirectories\"_a = false, \"parentComponent\"_a = static_cast<Component*> (nullptr))\n#if JUCE_MODAL_LOOPS_PERMITTED\n    //.def (\"browseForFileToOpen\", &FileChooser::browseForFileToOpen, py::call_guard<py::gil_scoped_release>())\n        .def (\"browseForFileToOpen\", [](FileChooser& self) { return self.browseForFileToOpen(); }, py::call_guard<py::gil_scoped_release>())\n    //.def (\"browseForMultipleFilesToOpen\", &FileChooser::browseForFileToOpen, py::call_guard<py::gil_scoped_release>())\n        .def (\"browseForMultipleFilesToOpen\", [](FileChooser& self) { return self.browseForMultipleFilesToOpen(); }, py::call_guard<py::gil_scoped_release>())\n        .def (\"browseForFileToSave\", &FileChooser::browseForFileToSave, \"warnAboutOverwritingExistingFiles\"_a, py::call_guard<py::gil_scoped_release>())\n        .def (\"browseForDirectory\", &FileChooser::browseForDirectory, py::call_guard<py::gil_scoped_release>())\n    //.def (\"browseForMultipleFilesOrDirectories\", &FileChooser::browseForMultipleFilesOrDirectories, py::call_guard<py::gil_scoped_release>())\n        .def (\"browseForMultipleFilesOrDirectories\", [](FileChooser& self) { return self.browseForMultipleFilesOrDirectories(); }, py::call_guard<py::gil_scoped_release>())\n    //.def (\"showDialog\", &FileChooser::showDialog, py::call_guard<py::gil_scoped_release>())\n        .def (\"showDialog\", [](FileChooser& self, int flags) { return self.showDialog (flags, nullptr); }, py::call_guard<py::gil_scoped_release>())\n#endif\n    //.def (\"launchAsync\", &FileChooser::launchAsync)\n        .def (\"launchAsync\", [](FileChooser& self, int flags, std::function<void (const FileChooser&)> callback) { self.launchAsync (flags, std::move (callback), nullptr); })\n        .def (\"getResult\", &FileChooser::getResult)\n        .def (\"getResults\", &FileChooser::getResults)\n        .def (\"getURLResult\", &FileChooser::getURLResult)\n        .def (\"getURLResults\", &FileChooser::getURLResults)\n        .def_static (\"isPlatformDialogAvailable\", &FileChooser::isPlatformDialogAvailable)\n        .def_static (\"registerCustomMimeTypeForFileExtension\", &FileChooser::registerCustomMimeTypeForFileExtension)\n    ;\n\n    // ============================================================================================ juce::FlexBox\n\n    py::class_<FlexBox> classFlexBox (m, \"FlexBox\");\n\n    py::enum_<FlexBox::Direction> (classFlexBox, \"Direction\")\n        .value (\"row\", FlexBox::Direction::row)\n        .value (\"rowReverse\", FlexBox::Direction::rowReverse)\n        .value (\"column\", FlexBox::Direction::column)\n        .value (\"columnReverse\", FlexBox::Direction::columnReverse);\n\n    py::enum_<FlexBox::Wrap> (classFlexBox, \"Wrap\")\n        .value (\"noWrap\", FlexBox::Wrap::noWrap)\n        .value (\"wrap\", FlexBox::Wrap::wrap)\n        .value (\"wrapReverse\", FlexBox::Wrap::wrapReverse);\n\n    py::enum_<FlexBox::AlignContent> (classFlexBox, \"AlignContent\")\n        .value (\"stretch\", FlexBox::AlignContent::stretch)\n        .value (\"flexStart\", FlexBox::AlignContent::flexStart)\n        .value (\"flexEnd\", FlexBox::AlignContent::flexEnd)\n        .value (\"center\", FlexBox::AlignContent::center)\n        .value (\"spaceBetween\", FlexBox::AlignContent::spaceBetween)\n        .value (\"spaceAround\", FlexBox::AlignContent::spaceAround);\n\n    py::enum_<FlexBox::AlignItems> (classFlexBox, \"AlignItems\")\n        .value (\"stretch\", FlexBox::AlignItems::stretch)\n        .value (\"flexStart\", FlexBox::AlignItems::flexStart)\n        .value (\"flexEnd\", FlexBox::AlignItems::flexEnd)\n        .value (\"center\", FlexBox::AlignItems::center);\n\n    py::enum_<FlexBox::JustifyContent> (classFlexBox, \"JustifyContent\")\n        .value (\"flexStart\", FlexBox::JustifyContent::flexStart)\n        .value (\"flexEnd\", FlexBox::JustifyContent::flexEnd)\n        .value (\"center\", FlexBox::JustifyContent::center)\n        .value (\"spaceBetween\", FlexBox::JustifyContent::spaceBetween)\n        .value (\"spaceAround\", FlexBox::JustifyContent::spaceAround);\n\n    py::class_<FlexItem> classFlexItem (m, \"FlexItem\");\n\n    py::class_<FlexItem::Margin> classFlexItemMargin (classFlexItem, \"Margin\");\n\n    py::enum_<FlexItem::AlignSelf> (classFlexItem, \"AlignSelf\")\n        .value (\"autoAlign\", FlexItem::AlignSelf::autoAlign)\n        .value (\"flexStart\", FlexItem::AlignSelf::flexStart)\n        .value (\"flexEnd\", FlexItem::AlignSelf::flexEnd)\n        .value (\"center\", FlexItem::AlignSelf::center)\n        .value (\"stretch\", FlexItem::AlignSelf::stretch);\n\n    classFlexBox\n        .def (py::init<>())\n        .def (py::init<FlexBox::Direction, FlexBox::Wrap, FlexBox::AlignContent, FlexBox::AlignItems, FlexBox::JustifyContent>())\n        .def (py::init<FlexBox::JustifyContent>())\n        .def (\"performLayout\", py::overload_cast<Rectangle<float>> (&FlexBox::performLayout))\n        .def (\"performLayout\", py::overload_cast<Rectangle<int>> (&FlexBox::performLayout))\n        .def_readwrite (\"flexDirection\", &FlexBox::flexDirection)\n        .def_readwrite (\"flexWrap\", &FlexBox::flexWrap)\n        .def_readwrite (\"alignContent\", &FlexBox::alignContent)\n        .def_readwrite (\"alignItems\", &FlexBox::alignItems)\n        .def_readwrite (\"justifyContent\", &FlexBox::justifyContent)\n        .def_readwrite (\"items\", &FlexBox::items)\n    ;\n\n    classFlexItemMargin\n        .def (py::init<>())\n        .def (py::init<float>())\n        .def (py::init<float, float, float, float>())\n        .def_readwrite (\"left\", &FlexItem::Margin::left)\n        .def_readwrite (\"right\", &FlexItem::Margin::right)\n        .def_readwrite (\"top\", &FlexItem::Margin::top)\n        .def_readwrite (\"bottom\", &FlexItem::Margin::bottom)\n    ;\n\n    classFlexItem\n        .def (py::init<>())\n        .def (py::init<float, float>())\n        .def (py::init<float, float, Component&>())\n        .def (py::init<float, float, FlexBox&>())\n        .def (py::init<Component&>())\n        .def (py::init<FlexBox&>())\n        .def_readwrite (\"currentBounds\", &FlexItem::currentBounds)\n        .def_readwrite (\"associatedComponent\", &FlexItem::associatedComponent, py::return_value_policy::reference)\n        .def_readwrite (\"associatedFlexBox\", &FlexItem::associatedFlexBox, py::return_value_policy::reference)\n        .def_readwrite (\"order\", &FlexItem::order)\n        .def_readwrite (\"flexGrow\", &FlexItem::flexGrow)\n        .def_readwrite (\"flexShrink\", &FlexItem::flexShrink)\n        .def_readwrite (\"flexBasis\", &FlexItem::flexBasis)\n        .def_readwrite (\"alignSelf\", &FlexItem::alignSelf)\n    //.def_property_readonly_static (\"autoValue\", [] { return FlexItem::autoValue; })\n    //.def_property_readonly_static (\"notAssigned\", [] { return FlexItem::notAssigned; })\n        .def_readwrite (\"width\", &FlexItem::width)\n        .def_readwrite (\"minWidth\", &FlexItem::minWidth)\n        .def_readwrite (\"maxWidth\", &FlexItem::maxWidth)\n        .def_readwrite (\"height\", &FlexItem::height)\n        .def_readwrite (\"minHeight\", &FlexItem::minHeight)\n        .def_readwrite (\"maxHeight\", &FlexItem::maxHeight)\n        .def_readwrite (\"margin\", &FlexItem::margin)\n        .def (\"withFlex\", py::overload_cast<float> (&FlexItem::withFlex, py::const_))\n        .def (\"withFlex\", py::overload_cast<float, float> (&FlexItem::withFlex, py::const_))\n        .def (\"withFlex\", py::overload_cast<float, float, float> (&FlexItem::withFlex, py::const_))\n        .def (\"withWidth\", &FlexItem::withWidth)\n        .def (\"withMinWidth\", &FlexItem::withMinWidth)\n        .def (\"withMaxWidth\", &FlexItem::withMaxWidth)\n        .def (\"withHeight\", &FlexItem::withHeight)\n        .def (\"withMinHeight\", &FlexItem::withMinHeight)\n        .def (\"withMaxHeight\", &FlexItem::withMaxHeight)\n        .def (\"withMargin\", &FlexItem::withMargin)\n        .def (\"withOrder\", &FlexItem::withOrder)\n        .def (\"withAlignSelf\", &FlexItem::withAlignSelf)\n    ;\n\n    registerArray<Array, FlexItem> (m);\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_gui_basics\n #error This binding file requires adding the juce_gui_basics module in the project\n#else\n #include <juce_gui_basics/juce_gui_basics.h>\n#endif\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#define JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#include \"../utilities/PyBind11Includes.h\"\n\n#include \"ScriptJuceOptionsBindings.h\"\n\n#include <cstddef>\n#include <exception>\n#include <functional>\n#include <memory>\n#include <vector>\n#include <utility>\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceGuiBasicsBindings (pybind11::module_& m);\n\n// =================================================================================================\n\nstruct PyJUCEApplication : juce::JUCEApplication\n{\n    const juce::String getApplicationName() override\n    {\n        PYBIND11_OVERRIDE_PURE (const juce::String, juce::JUCEApplication, getApplicationName);\n    }\n\n    const juce::String getApplicationVersion() override\n    {\n        PYBIND11_OVERRIDE_PURE (const juce::String, juce::JUCEApplication, getApplicationVersion);\n    }\n\n    bool moreThanOneInstanceAllowed() override\n    {\n        PYBIND11_OVERRIDE (bool, juce::JUCEApplication, moreThanOneInstanceAllowed);\n    }\n\n    void initialise (const juce::String& commandLineParameters) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::JUCEApplication, initialise, commandLineParameters);\n    }\n\n    void shutdown() override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::JUCEApplication, shutdown);\n    }\n\n    void anotherInstanceStarted (const juce::String& commandLine) override\n    {\n        PYBIND11_OVERRIDE (void, juce::JUCEApplication, anotherInstanceStarted, commandLine);\n    }\n\n    void systemRequestedQuit() override\n    {\n        PYBIND11_OVERRIDE (void, juce::JUCEApplication, systemRequestedQuit);\n    }\n\n    void suspended() override\n    {\n        PYBIND11_OVERRIDE (void, juce::JUCEApplication, suspended);\n    }\n\n    void resumed() override\n    {\n        PYBIND11_OVERRIDE (void, juce::JUCEApplication, resumed);\n    }\n\n    void unhandledException (const std::exception* ex, const juce::String& sourceFilename, int lineNumber) override\n    {\n        pybind11::gil_scoped_acquire gil;\n\n        const auto* pyEx = dynamic_cast<const pybind11::error_already_set*> (ex);\n        auto traceback = pybind11::module_::import (\"traceback\");\n\n        if (pybind11::function override_ = pybind11::get_override (static_cast<juce::JUCEApplication*> (this), \"unhandledException\"); override_)\n        {\n            if (pyEx != nullptr)\n            {\n                auto newPyEx = pyEx->type()(pyEx->value());\n                PyException_SetTraceback (newPyEx.ptr(), pyEx->trace().ptr());\n\n                override_ (newPyEx, sourceFilename, lineNumber);\n            }\n            else\n            {\n                auto runtimeError = pybind11::module_::import (\"__builtins__\").attr (\"RuntimeError\");\n                auto newPyEx = runtimeError(ex != nullptr ? ex->what() : \"unknown exception\");\n                PyException_SetTraceback (newPyEx.ptr(), traceback.attr (\"extract_stack\")().ptr());\n\n                override_ (newPyEx, sourceFilename, lineNumber);\n            }\n\n            return;\n        }\n\n        if (pyEx != nullptr)\n        {\n            pybind11::print (ex->what());\n            traceback.attr (\"print_tb\")(pyEx->trace());\n\n            if (pyEx->matches (PyExc_KeyboardInterrupt) || PyErr_CheckSignals() != 0)\n            {\n                globalOptions().caughtKeyboardInterrupt = true;\n                return;\n            }\n        }\n        else\n        {\n            pybind11::print (ex->what());\n            traceback.attr (\"print_stack\")();\n\n            if (PyErr_CheckSignals() != 0)\n            {\n                globalOptions().caughtKeyboardInterrupt = true;\n                return;\n            }\n        }\n\n        if (! globalOptions().catchExceptionsAndContinue)\n            std::terminate();\n    }\n\n    void memoryWarningReceived() override\n    {\n        PYBIND11_OVERRIDE (void, juce::JUCEApplication, memoryWarningReceived);\n    }\n\n    bool backButtonPressed() override\n    {\n        PYBIND11_OVERRIDE (bool, juce::JUCEApplication, backButtonPressed);\n    }\n};\n\n// =================================================================================================\n\nstruct PyKeyListener : juce::KeyListener\n{\n    using juce::KeyListener::KeyListener;\n\n    bool keyPressed (const juce::KeyPress& key, juce::Component* originatingComponent) override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, juce::KeyListener, keyPressed, key, originatingComponent);\n    }\n\n    bool keyStateChanged (bool isKeyDown, juce::Component* originatingComponent) override\n    {\n        PYBIND11_OVERRIDE (bool, KeyListener, keyStateChanged, isKeyDown, originatingComponent);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::MouseListener>\nstruct PyMouseListener : Base\n{\n    using Base::Base;\n\n    void mouseMove (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, Base, mouseMove, event);\n    }\n\n    void mouseEnter (const juce::MouseEvent& event) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"mouseEnter\"))\n            {\n                override_ (event);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TooltipWindow>)\n            Base::mouseEnter (event);\n    }\n\n    void mouseExit (const juce::MouseEvent& event) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"mouseExit\"))\n            {\n                override_ (event);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TooltipWindow>)\n            Base::mouseExit (event);\n    }\n\n    void mouseDown (const juce::MouseEvent& event) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"mouseDown\"))\n            {\n                override_ (event);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TooltipWindow>)\n            Base::mouseDown (event);\n    }\n\n    void mouseDrag (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, Base, mouseDrag, event);\n    }\n\n    void mouseUp (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, Base, mouseUp, event);\n    }\n\n    void mouseDoubleClick (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, Base, mouseDoubleClick, event);\n    }\n\n    void mouseWheelMove (const juce::MouseEvent& event, const juce::MouseWheelDetails& wheel) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"mouseWheelMove\"))\n            {\n                override_ (event, wheel);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TooltipWindow>)\n            Base::mouseWheelMove (event, wheel);\n    }\n\n    void mouseMagnify (const juce::MouseEvent& event, float scaleFactor) override\n    {\n        PYBIND11_OVERRIDE (void, Base, mouseMagnify, event, scaleFactor);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::TextInputTarget>\nstruct PyTextInputTarget : Base\n{\n    using Base::Base;\n\n    bool isTextInputActive() const override\n    {\n        PYBIND11_OVERRIDE_PURE (bool, Base, isTextInputActive);\n    }\n\n    juce::Range<int> getHighlightedRegion() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Range<int>, Base, getHighlightedRegion);\n    }\n\n    void setHighlightedRegion (const juce::Range<int>& newRange) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setHighlightedRegion, newRange);\n    }\n\n    void setTemporaryUnderlining (const juce::Array<juce::Range<int>>& underlinedRegions) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, setTemporaryUnderlining, underlinedRegions);\n    }\n\n    juce::String getTextInRange (const juce::Range<int>& range) const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::String, Base, getTextInRange, range);\n    }\n\n    void insertTextAtCaret (const juce::String& textToInsert) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, insertTextAtCaret, textToInsert);\n    }\n\n    int getCaretPosition() const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, Base, getCaretPosition);\n    }\n\n    juce::Rectangle<int> getCaretRectangleForCharIndex (int characterIndex) const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Rectangle<int>, Base, getCaretRectangleForCharIndex, characterIndex);\n    }\n\n    int getTotalNumChars() const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, Base, getTotalNumChars);\n    }\n\n    int getCharIndexForPoint (juce::Point<int> point) const override\n    {\n        PYBIND11_OVERRIDE_PURE (int, Base, getCharIndexForPoint, point);\n    }\n\n    juce::RectangleList<int> getTextBounds (juce::Range<int> textRange) const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Rectangle<int>, Base, getTextBounds, textRange);\n    }\n\n    juce::TextInputTarget::VirtualKeyboardType getKeyboardType() override\n    {\n        PYBIND11_OVERRIDE (juce::TextInputTarget::VirtualKeyboardType, Base, getKeyboardType);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::LookAndFeel>\nstruct PyLookAndFeel : Base\n{\n    using Base::Base;\n\n    void drawSpinningWaitAnimation(juce::Graphics& g, const juce::Colour& colour, int x, int y, int w, int h) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawSpinningWaitAnimation\"))\n            {\n                override_ (std::addressof (g), colour, x, y, w, h);\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"LookAndFeel::drawSpinningWaitAnimation\\\"\");\n    }\n\n    juce::Path getTickShape (float height) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Path, Base, getTickShape, height);\n    }\n\n    juce::Path getCrossShape (float height) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Path, Base, getCrossShape, height);\n    }\n\n    std::unique_ptr<juce::DropShadower> createDropShadowerForComponent (juce::Component&) override\n    {\n        return {}; // TODO\n    }\n\n    std::unique_ptr<juce::FocusOutline> createFocusOutlineForComponent (juce::Component&) override\n    {\n        return {}; // TODO\n    }\n\n    juce::MouseCursor getMouseCursorFor (juce::Component& c) override\n    {\n        PYBIND11_OVERRIDE (juce::MouseCursor, Base, getMouseCursorFor, c);\n    }\n\n    void playAlertSound() override\n    {\n        PYBIND11_OVERRIDE (void, Base, playAlertSound);\n    }\n};\n\ntemplate <class Base = juce::LookAndFeel_V2>\nstruct PyLookAndFeel_V2 : PyLookAndFeel<Base>\n{\n    using PyLookAndFeel<Base>::PyLookAndFeel;\n\n    void drawButtonBackground (juce::Graphics& g, juce::Button& b, const juce::Colour& backgroundColour,\n                               bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawButtonBackground\"))\n            {\n                override_ (std::addressof (g), std::addressof (b), backgroundColour, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        Base::drawButtonBackground (g, b, backgroundColour, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n    }\n\n    juce::Font getTextButtonFont (juce::TextButton& button, int buttonHeight) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"getTextButtonFont\"))\n            {\n                return override_ (std::addressof (button), buttonHeight).cast<juce::Font>();\n            }\n        }\n\n        return Base::getTextButtonFont (button, buttonHeight);\n    }\n\n    void drawButtonText (juce::Graphics& g, juce::TextButton& button,\n                         bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawButtonText\"))\n            {\n                override_ (std::addressof (g), std::addressof (button), shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        Base::drawButtonText (g, button, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n    }\n\n    int getTextButtonWidthToFitText (juce::TextButton& button, int buttonHeight) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override(static_cast<Base*>(this), \"getTextButtonWidthToFitText\"))\n            {\n                return override_ (std::addressof(button), buttonHeight).cast<int>();\n            }\n        }\n\n        return Base::getTextButtonWidthToFitText(button, buttonHeight);\n    }\n\n    void drawToggleButton (juce::Graphics& g, juce::ToggleButton& button,\n                           bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawToggleButton\"))\n            {\n                override_ (std::addressof (g), std::addressof (button), shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        Base::drawToggleButton (g, button, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n    }\n\n    void changeToggleButtonWidthToFitText (juce::ToggleButton& button) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"changeToggleButtonWidthToFitText\"); override_)\n            {\n                override_ (std::addressof (button));\n                return;\n            }\n        }\n\n        Base::changeToggleButtonWidthToFitText (button);\n    }\n\n    void drawTickBox (juce::Graphics& g, juce::Component& component,\n                      float x, float y, float w, float h,\n                      bool ticked, bool isEnabled,\n                      bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawTickBox\"); override_)\n            {\n                override_ (std::addressof (g), std::addressof (component), x, y, w, h, ticked, isEnabled, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        Base::drawTickBox (g, component, x, y, w, h, ticked, isEnabled, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n    }\n\n    void drawDrawableButton (juce::Graphics& g, juce::DrawableButton& button,\n                             bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawDrawableButton\"); override_)\n            {\n                override_ (std::addressof (g), std::addressof (button), shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        Base::drawDrawableButton (g, button, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n    }\n\n    juce::AlertWindow* createAlertWindow (const juce::String& title, const juce::String& message,\n                                          const juce::String& button1, const juce::String& button2,\n                                          const juce::String& button3, juce::MessageBoxIconType iconType,\n                                          int numButtons, juce::Component* associatedComponent) override\n    {\n        PYBIND11_OVERRIDE (juce::AlertWindow*, Base, createAlertWindow, title, message, button1, button2, button3, iconType, numButtons, associatedComponent);\n    }\n\n    void drawAlertBox (juce::Graphics& g, juce::AlertWindow& alertWindow, const juce::Rectangle<int>& textArea, juce::TextLayout& textLayout) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"drawAlertBox\"); override_)\n            {\n                override_ (std::addressof (g), std::addressof (alertWindow), textArea, std::addressof (textLayout));\n                return;\n            }\n        }\n\n        Base::drawAlertBox (g, alertWindow, textArea, textLayout);\n    }\n\n    int getAlertBoxWindowFlags() override\n    {\n        PYBIND11_OVERRIDE (int, Base, getAlertBoxWindowFlags);\n    }\n\n    juce::Array<int> getWidthsForTextButtons (juce::AlertWindow& alertWindow, const juce::Array<juce::TextButton*>& buttons) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"getWidthsForTextButtons\"); override_)\n            {\n                pybind11::list list (buttons.size());\n                for (int i = 0; i < buttons.size(); ++i)\n                    list[static_cast<size_t> (i)] = buttons.getUnchecked (i);\n\n                return override_ (std::addressof (alertWindow), list).cast<juce::Array<int>>();\n            }\n        }\n\n        return Base::getWidthsForTextButtons (alertWindow, buttons);\n    }\n\n    int getAlertWindowButtonHeight() override\n    {\n        PYBIND11_OVERRIDE (int, Base, getAlertWindowButtonHeight);\n    }\n\n    juce::Font getAlertWindowTitleFont() override\n    {\n        PYBIND11_OVERRIDE (juce::Font, Base, getAlertWindowTitleFont);\n    }\n\n    juce::Font getAlertWindowMessageFont() override\n    {\n        PYBIND11_OVERRIDE (juce::Font, Base, getAlertWindowMessageFont);\n    }\n\n    juce::Font getAlertWindowFont() override\n    {\n        PYBIND11_OVERRIDE (juce::Font, Base, getAlertWindowFont);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::ComponentTraverser>\nstruct PyComponentTraverser : Base\n{\n    using Base::Base;\n\n    juce::Component* getDefaultComponent (juce::Component* parentComponent) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Component*, Base, getDefaultComponent, parentComponent);\n    }\n\n    juce::Component* getNextComponent (juce::Component* current) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Component*, Base, getNextComponent, current);\n    }\n\n    juce::Component* getPreviousComponent (juce::Component* current) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Component*, Base, getPreviousComponent, current);\n    }\n\n    std::vector<juce::Component*> getAllComponents (juce::Component* parentComponent) override\n    {\n        PYBIND11_OVERRIDE_PURE (std::vector<juce::Component*>, Base, getAllComponents, parentComponent);\n    }\n};\n\ntemplate <class Base = juce::FocusTraverser>\nstruct PyFocusTraverser : PyComponentTraverser<Base>\n{\n    using PyComponentTraverser<Base>::PyComponentTraverser;\n};\n\n// =================================================================================================\n\nstruct PyComponentListener : juce::ComponentListener\n{\n    using juce::ComponentListener::ComponentListener;\n\n    void componentMovedOrResized (juce::Component& component, bool wasMoved, bool wasResized) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentMovedOrResized, component, wasMoved, wasResized);\n    }\n\n    void componentBroughtToFront (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentBroughtToFront, component);\n    }\n\n    void componentVisibilityChanged (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentVisibilityChanged, component);\n    }\n\n    void componentChildrenChanged (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentChildrenChanged, component);\n    }\n\n    void componentParentHierarchyChanged (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentParentHierarchyChanged, component);\n    }\n\n    void componentNameChanged (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentNameChanged, component);\n    }\n\n    void componentBeingDeleted (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentBeingDeleted, component);\n    }\n\n    void componentEnablementChanged (juce::Component& component) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ComponentListener, componentEnablementChanged, component);\n    }\n};\n\n// =================================================================================================\n\nstruct PyModalComponentManagerCallback : juce::ModalComponentManager::Callback\n{\n    using juce::ModalComponentManager::Callback::Callback;\n\n    void modalStateFinished (int returnValue) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::ModalComponentManager::Callback, modalStateFinished, returnValue);\n    }\n};\n\nstruct PyModalComponentManagerCallbackCallable : juce::ModalComponentManager::Callback\n{\n    explicit PyModalComponentManagerCallbackCallable (pybind11::function f)\n        : fn (std::move (f))\n    {\n    }\n\n    void modalStateFinished (int result) override\n    {\n        if (fn)\n            fn (result);\n    }\n\nprivate:\n    pybind11::function fn;\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Component>\nstruct PyComponent : PyMouseListener<Base>\n{\n    using PyMouseListener<Base>::PyMouseListener;\n\n    void setName (const juce::String& newName) override\n    {\n        PYBIND11_OVERRIDE (void, Base, setName, newName);\n    }\n\n    void setVisible (bool shouldBeVisible) override\n    {\n        PYBIND11_OVERRIDE (void, Base, setVisible, shouldBeVisible);\n    }\n\n    void visibilityChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, visibilityChanged);\n    }\n\n    void userTriedToCloseWindow() override\n    {\n        PYBIND11_OVERRIDE (void, Base, userTriedToCloseWindow);\n    }\n\n    void minimisationStateChanged(bool isNowMinimised) override\n    {\n        PYBIND11_OVERRIDE (void, Base, minimisationStateChanged, isNowMinimised);\n    }\n\n    float getDesktopScaleFactor() const override\n    {\n        PYBIND11_OVERRIDE (float, Base, getDesktopScaleFactor);\n    }\n\n    void parentHierarchyChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, parentHierarchyChanged);\n    }\n\n    void childrenChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, childrenChanged);\n    }\n\n    bool hitTest (int x, int y) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, hitTest, x, y);\n    }\n\n    void lookAndFeelChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, lookAndFeelChanged);\n    }\n\n    void enablementChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, enablementChanged);\n    }\n\n    void alphaChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, alphaChanged);\n    }\n\n    void paint (juce::Graphics& g) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<const Base*> (this), \"paint\"); override_)\n            {\n                override_ (std::addressof (g));\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TooltipWindow>)\n            Base::paint (g);\n    }\n\n    void paintOverChildren (juce::Graphics& g) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<const Base*> (this), \"paintOverChildren\"); override_)\n            {\n                override_ (std::addressof (g));\n                return;\n            }\n        }\n\n        Base::paintOverChildren (g);\n    }\n\n    bool keyPressed (const juce::KeyPress& key) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, keyPressed, key);\n    }\n\n    bool keyStateChanged (bool isDown) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, keyStateChanged, isDown);\n    }\n\n    void modifierKeysChanged (const juce::ModifierKeys& modifiers) override\n    {\n        PYBIND11_OVERRIDE (void, Base, modifierKeysChanged, modifiers);\n    }\n\n    void focusGained (juce::Component::FocusChangeType cause) override\n    {\n        PYBIND11_OVERRIDE (void, Base, focusGained, cause);\n    }\n\n    void focusGainedWithDirection (juce::Component::FocusChangeType cause, juce::Component::FocusChangeDirection direction) override\n    {\n        PYBIND11_OVERRIDE (void, Base, focusGainedWithDirection, cause, direction);\n    }\n\n    void focusLost (juce::Component::FocusChangeType cause) override\n    {\n        PYBIND11_OVERRIDE (void, Base, focusLost, cause);\n    }\n\n    void focusOfChildComponentChanged (juce::Component::FocusChangeType cause) override\n    {\n        PYBIND11_OVERRIDE (void, Base, focusOfChildComponentChanged, cause);\n    }\n\n    void resized () override\n    {\n        PYBIND11_OVERRIDE (void, Base, resized);\n    }\n\n    void moved () override\n    {\n        PYBIND11_OVERRIDE (void, Base, moved);\n    }\n\n    void childBoundsChanged (juce::Component* child) override\n    {\n        PYBIND11_OVERRIDE (void, Base, childBoundsChanged, child);\n    }\n\n    void parentSizeChanged () override\n    {\n        PYBIND11_OVERRIDE (void, Base, parentSizeChanged);\n    }\n\n    void broughtToFront () override\n    {\n        PYBIND11_OVERRIDE (void, Base, broughtToFront);\n    }\n\n    void handleCommandMessage (int commandId) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"handleCommandMessage\"); override_)\n            {\n                override_ (commandId);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::TextEditor>)\n            Base::handleCommandMessage (commandId);\n    }\n\n    bool canModalEventBeSentToComponent (const juce::Component* targetComponent) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, canModalEventBeSentToComponent, targetComponent);\n    }\n\n    void inputAttemptWhenModal () override\n    {\n        PYBIND11_OVERRIDE (void, Base, inputAttemptWhenModal);\n    }\n\n    void colourChanged () override\n    {\n        PYBIND11_OVERRIDE (void, Base, colourChanged);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Drawable>\nstruct PyDrawable : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override\n    {\n        /*\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<const Base*> (this), \"createCopy\"); override_)\n            {\n                pybind11::object result = override_();\n\n                return std::unique_ptr<Drawable> (result.release().cast<Base*>());\n            }\n        }\n\n        pybind11::pybind11_fail(\"Tried to call pure virtual function \\\"Drawable::createCopy\\\"\");\n        */\n\n        return nullptr;\n    }\n\n    juce::Path getOutlineAsPath() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Path, Base, getOutlineAsPath);\n    }\n\n    juce::Rectangle<float> getDrawableBounds() const override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::Rectangle<float>, Base, getDrawableBounds);\n    }\n\n    bool replaceColour (juce::Colour originalColour, juce::Colour replacementColour) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, replaceColour, originalColour, replacementColour);\n    }\n};\n\ntemplate <class Base = juce::DrawableComposite>\nstruct PyDrawableComposite : PyDrawable<Base>\n{\n    using PyDrawable<Base>::PyDrawable;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override { return nullptr; }\n\n    juce::Path getOutlineAsPath() const override\n    {\n        PYBIND11_OVERRIDE (juce::Path, Base, getOutlineAsPath);\n    }\n\n    juce::Rectangle<float> getDrawableBounds() const override\n    {\n        PYBIND11_OVERRIDE (juce::Rectangle<float>, Base, getDrawableBounds);\n    }\n};\n\ntemplate <class Base = juce::DrawableImage>\nstruct PyDrawableImage : PyDrawable<Base>\n{\n    using PyDrawable<Base>::PyDrawable;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override { return nullptr; }\n\n    juce::Path getOutlineAsPath() const override\n    {\n        PYBIND11_OVERRIDE (juce::Path, Base, getOutlineAsPath);\n    }\n\n    juce::Rectangle<float> getDrawableBounds() const override\n    {\n        PYBIND11_OVERRIDE (juce::Rectangle<float>, Base, getDrawableBounds);\n    }\n};\n\ntemplate <class Base = juce::DrawablePath>\nstruct PyDrawablePath : PyDrawable<Base>\n{\n    using PyDrawable<Base>::PyDrawable;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override { return nullptr; }\n};\n\ntemplate <class Base = juce::DrawableShape>\nstruct PyDrawableShape : PyDrawable<Base>\n{\n    using PyDrawable<Base>::PyDrawable;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override { return nullptr; }\n\n    juce::Path getOutlineAsPath() const override\n    {\n        PYBIND11_OVERRIDE (juce::Path, Base, getOutlineAsPath);\n    }\n\n    juce::Rectangle<float> getDrawableBounds() const override\n    {\n        PYBIND11_OVERRIDE (juce::Rectangle<float>, Base, getDrawableBounds);\n    }\n\n    bool replaceColour (juce::Colour originalColour, juce::Colour replacementColour) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, replaceColour, originalColour, replacementColour);\n    }\n};\n\ntemplate <class Base = juce::DrawableText>\nstruct PyDrawableText : PyDrawable<Base>\n{\n    using PyDrawable<Base>::PyDrawable;\n\n    std::unique_ptr<juce::Drawable> createCopy() const override { return nullptr; }\n\n    juce::Path getOutlineAsPath() const override\n    {\n        PYBIND11_OVERRIDE (juce::Path, Base, getOutlineAsPath);\n    }\n\n    juce::Rectangle<float> getDrawableBounds() const override\n    {\n        PYBIND11_OVERRIDE (juce::Rectangle<float>, Base, getDrawableBounds);\n    }\n\n    bool replaceColour (juce::Colour originalColour, juce::Colour replacementColour) override\n    {\n        PYBIND11_OVERRIDE (bool, Base, replaceColour, originalColour, replacementColour);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Button>\nstruct PyButton : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    explicit PyButton (const juce::String& name)\n        : PyComponent<Base> (name)\n    {\n    }\n\n    void triggerClick() override\n    {\n        PYBIND11_OVERRIDE (void, Base, triggerClick);\n    }\n\n    void clicked() override\n    {\n        PYBIND11_OVERRIDE (void, Base, clicked);\n    }\n\n    void clicked (const juce::ModifierKeys& modifiers) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"clickedWithModifiers\"); override_)\n            {\n                override_ (modifiers);\n                return;\n            }\n        }\n\n        if constexpr (! std::is_same_v<Base, juce::HyperlinkButton>)\n            Base::clicked (modifiers);\n    }\n\n    void paintButton (juce::Graphics& g, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"paintButton\"); override_)\n            {\n                override_ (std::addressof (g), shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"Button::paintButton\\\"\");\n    }\n\n    void buttonStateChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, buttonStateChanged);\n    }\n};\n\nstruct PyButtonListener : juce::Button::Listener\n{\n    using juce::Button::Listener::Listener;\n\n    void buttonClicked (juce::Button* button) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Button::Listener, buttonClicked, button);\n    }\n\n    void buttonStateChanged (juce::Button* button) override\n    {\n        PYBIND11_OVERRIDE (void, juce::Button::Listener, buttonStateChanged, button);\n    }\n};\n\ntemplate <class Base = juce::DrawableButton>\nstruct PyDrawableButton : PyButton<Base>\n{\n    using PyButton<Base>::PyButton;\n\n    juce::Rectangle<float> getImageBounds() const override\n    {\n        PYBIND11_OVERRIDE (juce::Rectangle<float>, Base, getImageBounds);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Label>\nstruct PyLabel : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    juce::TextEditor* createEditorComponent() override\n    {\n        PYBIND11_OVERRIDE (juce::TextEditor*, Base, createEditorComponent);\n    }\n\n    void textWasEdited() override\n    {\n        PYBIND11_OVERRIDE (void, Base, textWasEdited);\n    }\n\n    void textWasChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, textWasChanged);\n    }\n\n    void editorShown (juce::TextEditor* e) override\n    {\n        PYBIND11_OVERRIDE (void, Base, editorShown, e);\n    }\n\n    void editorAboutToBeHidden (juce::TextEditor* e) override\n    {\n        PYBIND11_OVERRIDE (void, Base, editorAboutToBeHidden, e);\n    }\n};\n\nstruct PyLabelListener : juce::Label::Listener\n{\n    using juce::Label::Listener::Listener;\n\n    void labelTextChanged (juce::Label* labelThatHasChanged) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Label::Listener, labelTextChanged, labelThatHasChanged);\n    }\n\n    void editorShown (juce::Label* label, juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE (void, juce::Label::Listener, editorShown, label, e);\n    }\n\n    void editorHidden (juce::Label* label, juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE (void, juce::Label::Listener, editorHidden, label, e);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::TextEditor>\nstruct PyTextEditor : /*PyTextInputTarget<Base>,*/ PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n    //using PyTextInputTarget<Base>::PyTextInputTarget;\n\n    void addPopupMenuItems (juce::PopupMenu& menuToAddTo, const juce::MouseEvent* mouseClickEvent) override\n    {\n        PYBIND11_OVERRIDE (void, Base, addPopupMenuItems, menuToAddTo, mouseClickEvent);\n    }\n\n    void performPopupMenuAction (int menuItemID) override\n    {\n        PYBIND11_OVERRIDE (void, Base, performPopupMenuAction, menuItemID);\n    }\n};\n\nstruct PyTextEditorListener : juce::TextEditor::Listener\n{\n    using juce::TextEditor::Listener::Listener;\n\n    void textEditorTextChanged (juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TextEditor::Listener, textEditorTextChanged, e);\n    }\n\n    void textEditorReturnKeyPressed (juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TextEditor::Listener, textEditorReturnKeyPressed, e);\n    }\n\n    void textEditorEscapeKeyPressed (juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TextEditor::Listener, textEditorEscapeKeyPressed, e);\n    }\n\n    void textEditorFocusLost (juce::TextEditor& e) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TextEditor::Listener, textEditorFocusLost, e);\n    }\n};\n\ntemplate <class Base = juce::TextEditor::InputFilter>\nstruct PyTextEditorInputFilter : Base\n{\n    using Base::Base;\n\n    juce::String filterNewText (juce::TextEditor& e, const juce::String& newInput) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::String, Base, filterNewText, e, newInput);\n    }\n};\n\n// =================================================================================================\n\nstruct PyListBoxModel : juce::ListBoxModel\n{\n    using juce::ListBoxModel::ListBoxModel;\n\n    int getNumRows() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::ListBoxModel, getNumRows);\n    }\n\n    void paintListBoxItem (int rowNumber, juce::Graphics& g, int width, int height, bool rowIsSelected) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::ListBoxModel*> (this), \"paintListBoxItem\"); override_)\n            {\n                override_ (rowNumber, std::addressof (g), width, height, rowIsSelected);\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"ListBoxModel::paintListBoxItem\\\"\");\n    }\n\n    juce::Component* refreshComponentForRow (int rowNumber, bool isRowSelected, juce::Component* existingComponentToUpdate) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::ListBoxModel*> (this), \"refreshComponentForRow\"); override_)\n            {\n                auto result = override_ (rowNumber, isRowSelected, existingComponentToUpdate);\n                if (result.is_none())\n                    return nullptr;\n\n                if (! pybind11::isinstance<juce::Component> (result))\n                    pybind11::pybind11_fail (\"Method \\\"ListBoxModel::refreshComponentForRow\\\" returned something else than a \\\"Component\\\"\");\n\n                return result.release().cast<juce::Component*>();\n            }\n        }\n\n        return juce::ListBoxModel::refreshComponentForRow (rowNumber, isRowSelected, existingComponentToUpdate);\n    }\n\n    juce::String getNameForRow (int rowNumber) override\n    {\n        PYBIND11_OVERRIDE (juce::String, juce::ListBoxModel, getNameForRow, rowNumber);\n    }\n\n    void listBoxItemClicked (int row, const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, listBoxItemClicked, row, event);\n    }\n\n    void listBoxItemDoubleClicked (int row, const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, listBoxItemDoubleClicked, row, event);\n    }\n\n    void backgroundClicked (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, backgroundClicked, event);\n    }\n\n    void selectedRowsChanged (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, selectedRowsChanged, lastRowSelected);\n    }\n\n    void deleteKeyPressed (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, deleteKeyPressed, lastRowSelected);\n    }\n\n    void returnKeyPressed (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, returnKeyPressed, lastRowSelected);\n    }\n\n    void listWasScrolled() override\n    {\n        PYBIND11_OVERRIDE (void, juce::ListBoxModel, listWasScrolled);\n    }\n\n    juce::var getDragSourceDescription (const juce::SparseSet<int>& rowsToDescribe) override\n    {\n        PYBIND11_OVERRIDE (juce::var, juce::ListBoxModel, getDragSourceDescription, rowsToDescribe);\n    }\n\n    bool mayDragToExternalWindows() const override\n    {\n        PYBIND11_OVERRIDE (bool, juce::ListBoxModel, mayDragToExternalWindows);\n    }\n\n    juce::String getTooltipForRow (int row) override\n    {\n        PYBIND11_OVERRIDE (juce::String, juce::ListBoxModel, getTooltipForRow, row);\n    }\n\n    juce::MouseCursor getMouseCursorForRow (int row) override\n    {\n        PYBIND11_OVERRIDE (juce::MouseCursor, juce::ListBoxModel, getMouseCursorForRow, row);\n    }\n};\n\ntemplate <class Base = juce::ListBox>\nstruct PyListBox : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    juce::ScaledImage createSnapshotOfRows (const juce::SparseSet<int>& rows, int& x, int& y) override\n    {\n        juce::ignoreUnused (rows, x, y);\n\n        return {}; // TODO\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::TableHeaderComponent>\nstruct PyTableHeaderComponent : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    void columnClicked (int columnId, const juce::ModifierKeys& mods) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableHeaderComponent, columnClicked, columnId, mods);\n    }\n\n    void addMenuItems (juce::PopupMenu& menu, int columnIdClicked) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableHeaderComponent, addMenuItems, menu, columnIdClicked);\n    }\n\n    void reactToMenuItem (int menuReturnId, int columnIdClicked) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableHeaderComponent, reactToMenuItem, menuReturnId, columnIdClicked);\n    }\n\n    void showColumnChooserMenu (int columnIdClicked) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableHeaderComponent, showColumnChooserMenu, columnIdClicked);\n    }\n};\n\nstruct PyTableHeaderComponentListener : juce::TableHeaderComponent::Listener\n{\n    using juce::TableHeaderComponent::Listener::Listener;\n\n    void tableColumnsChanged (juce::TableHeaderComponent* tableHeader) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TableHeaderComponent::Listener, tableColumnsChanged, tableHeader);\n    }\n\n    void tableColumnsResized (juce::TableHeaderComponent* tableHeader) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TableHeaderComponent::Listener, tableColumnsResized, tableHeader);\n    }\n\n    void tableSortOrderChanged (juce::TableHeaderComponent* tableHeader) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::TableHeaderComponent::Listener, tableSortOrderChanged, tableHeader);\n    }\n\n    void tableColumnDraggingChanged (juce::TableHeaderComponent* tableHeader, int columnIdNowBeingDragged) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableHeaderComponent::Listener, tableColumnDraggingChanged, tableHeader, columnIdNowBeingDragged);\n    }\n};\n\n// =================================================================================================\n\nstruct PyTableListBoxModel : juce::TableListBoxModel\n{\n    using juce::TableListBoxModel::TableListBoxModel;\n\n    int getNumRows() override\n    {\n        PYBIND11_OVERRIDE_PURE (int, juce::TableListBoxModel, getNumRows);\n    }\n\n    void paintRowBackground (juce::Graphics& g, int rowNumber, int width, int height, bool rowIsSelected) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::TableListBoxModel*> (this), \"paintRowBackground\"); override_)\n            {\n                override_ (std::addressof (g), rowNumber, width, height, rowIsSelected);\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"TableListBoxModel::paintListBoxItem\\\"\");\n    }\n\n    void paintCell (juce::Graphics& g, int rowNumber, int columnId, int width, int height, bool rowIsSelected) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::TableListBoxModel*> (this), \"paintCell\"); override_)\n            {\n                override_ (std::addressof (g), rowNumber, columnId, width, height, rowIsSelected);\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"TableListBoxModel::paintCell\\\"\");\n    }\n\n    juce::Component* refreshComponentForCell (int rowNumber, int columnId, bool isRowSelected, juce::Component* existingComponentToUpdate) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::TableListBoxModel*> (this), \"refreshComponentForCell\"); override_)\n            {\n                auto result = override_ (rowNumber, columnId, isRowSelected, existingComponentToUpdate);\n                if (result.is_none())\n                    return nullptr;\n\n                if (! pybind11::isinstance<juce::Component> (result))\n                    pybind11::pybind11_fail (\"Method \\\"TableListBoxModel::refreshComponentForRow\\\" returned something else than a \\\"Component\\\"\");\n\n                return result.release().cast<juce::Component*>();\n            }\n        }\n\n        return juce::TableListBoxModel::refreshComponentForCell (rowNumber, columnId, isRowSelected, existingComponentToUpdate);\n    }\n\n    void cellClicked (int rowNumber, int columnId, const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, cellClicked, rowNumber, columnId, event);\n    }\n\n    void cellDoubleClicked (int rowNumber, int columnId, const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, cellDoubleClicked, rowNumber, columnId, event);\n    }\n\n    void backgroundClicked (const juce::MouseEvent& event) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, backgroundClicked, event);\n    }\n\n    void sortOrderChanged (int newSortColumnId, bool isForwards) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, sortOrderChanged, newSortColumnId, isForwards);\n    }\n\n    int getColumnAutoSizeWidth (int columnId) override\n    {\n        PYBIND11_OVERRIDE (int, juce::TableListBoxModel, getColumnAutoSizeWidth, columnId);\n    }\n\n    juce::String getCellTooltip (int rowNumber, int columnId) override\n    {\n        PYBIND11_OVERRIDE ( juce::String, juce::TableListBoxModel, getCellTooltip, rowNumber, columnId);\n    }\n\n    void selectedRowsChanged (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, selectedRowsChanged, lastRowSelected);\n    }\n\n    void deleteKeyPressed (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, deleteKeyPressed, lastRowSelected);\n    }\n\n    void returnKeyPressed (int lastRowSelected) override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, returnKeyPressed, lastRowSelected);\n    }\n\n    void listWasScrolled() override\n    {\n        PYBIND11_OVERRIDE (void, juce::TableListBoxModel, listWasScrolled);\n    }\n\n    juce::var getDragSourceDescription (const juce::SparseSet<int>& currentlySelectedRows) override\n    {\n        PYBIND11_OVERRIDE (juce::var, juce::TableListBoxModel, getDragSourceDescription, currentlySelectedRows);\n    }\n\n    bool mayDragToExternalWindows() const override\n    {\n        PYBIND11_OVERRIDE (bool, juce::TableListBoxModel, mayDragToExternalWindows);\n    }\n};\n\n// =================================================================================================\n\nstruct PyToolbarItemFactory : juce::ToolbarItemFactory\n{\n    using juce::ToolbarItemFactory::ToolbarItemFactory;\n\n    void getAllToolbarItemIds (juce::Array<int>& ids) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::ToolbarItemFactory*> (this), \"getAllToolbarItemIds\"); override_)\n            {\n                auto result = override_ ();\n\n                ids.addArray (result.cast<juce::Array<int>>());\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"ToolbarItemFactory::getAllToolbarItemIds\\\"\");\n    }\n\n    void getDefaultItemSet (juce::Array<int>& ids) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<juce::ToolbarItemFactory*> (this), \"getDefaultItemSet\"); override_)\n            {\n                auto result = override_ ();\n\n                ids.addArray (result.cast<juce::Array<int>>());\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"ToolbarItemFactory::getDefaultItemSet\\\"\");\n    }\n\n    juce::ToolbarItemComponent* createItem (int itemId) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::ToolbarItemComponent*, juce::ToolbarItemFactory, createItem, itemId);\n    }\n};\n\ntemplate <class Base = juce::ToolbarItemComponent>\nstruct PyToolbarItemComponent : PyButton<Base>\n{\n    using PyButton<Base>::PyButton;\n\n    void setStyle (const juce::Toolbar::ToolbarItemStyle& newStyle) override\n    {\n        PYBIND11_OVERRIDE (void, Base, setStyle, newStyle);\n    }\n\n    bool getToolbarItemSizes (int toolbarThickness, bool isToolbarVertical, int& preferredSize, int& minSize, int& maxSize) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"getToolbarItemSizes\"); override_)\n            {\n                auto result = override_ (toolbarThickness, isToolbarVertical, std::ref (preferredSize), std::ref (minSize), std::ref (maxSize));\n\n                return pybind11::detail::cast_safe<bool> (std::move (result));\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"ToolbarItemComponent::getToolbarItemSizes\\\"\");\n    }\n\n    void paintButtonArea (juce::Graphics& g, int width, int height, bool isMouseOver, bool isMouseDown) override\n    {\n        {\n            pybind11::gil_scoped_acquire gil;\n\n            if (pybind11::function override_ = pybind11::get_override (static_cast<Base*> (this), \"paintButtonArea\"); override_)\n            {\n                override_ (std::addressof (g), width, height, isMouseOver, isMouseDown);\n\n                return;\n            }\n        }\n\n        pybind11::pybind11_fail (\"Tried to call pure virtual function \\\"ToolbarItemComponent::paintButtonArea\\\"\");\n    }\n\n    void contentAreaChanged (const juce::Rectangle<int>& newBounds) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, Base, contentAreaChanged, newBounds);\n    }\n};\n\n// ============================================================================================\n\nstruct PyMenuBarModel : juce::MenuBarModel\n{\n    juce::StringArray getMenuBarNames() override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::StringArray, juce::MenuBarModel, getMenuBarNames);\n    }\n\n    juce::PopupMenu getMenuForIndex (int topLevelMenuIndex, const juce::String& menuName) override\n    {\n        PYBIND11_OVERRIDE_PURE (juce::PopupMenu, juce::MenuBarModel, getMenuForIndex, topLevelMenuIndex, menuName);\n    }\n\n    void menuItemSelected (int menuItemID, int topLevelMenuIndex) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MenuBarModel, menuItemSelected, menuItemID, topLevelMenuIndex);\n    }\n\n    void menuBarActivated (bool isActive) override\n    {\n        PYBIND11_OVERRIDE (void, juce::MenuBarModel, menuBarActivated, isActive);\n    }\n};\n\nstruct PyMenuBarModelListener : juce::MenuBarModel::Listener\n{\n    void menuBarItemsChanged (juce::MenuBarModel* menuBarModel) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MenuBarModel::Listener, menuBarItemsChanged, menuBarModel);\n    }\n\n    void menuCommandInvoked (juce::MenuBarModel* menuBarModel, const juce::ApplicationCommandTarget::InvocationInfo& info) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MenuBarModel::Listener, menuCommandInvoked, menuBarModel, info);\n    }\n\n    void menuBarActivated (juce::MenuBarModel* menuBarModel, bool isActive) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::MenuBarModel::Listener, menuBarActivated, menuBarModel, isActive);\n    }\n};\n\n// =================================================================================================\n\ntemplate <class Base = juce::Slider>\nstruct PySlider : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    void startedDragging() override\n    {\n        PYBIND11_OVERRIDE (void, Base, startedDragging);\n    }\n\n    void stoppedDragging() override\n    {\n        PYBIND11_OVERRIDE (void, Base, stoppedDragging);\n    }\n\n    void valueChanged() override\n    {\n        PYBIND11_OVERRIDE (void, Base, valueChanged);\n    }\n\n    double getValueFromText (const juce::String& text) override\n    {\n        PYBIND11_OVERRIDE (double, Base, getValueFromText, text);\n    }\n\n    juce::String getTextFromValue (double value) override\n    {\n        PYBIND11_OVERRIDE (juce::String, Base, getTextFromValue, value);\n    }\n\n    double proportionOfLengthToValue (double proportion) override\n    {\n        PYBIND11_OVERRIDE (double, Base, proportionOfLengthToValue, proportion);\n    }\n\n    double valueToProportionOfLength (double value) override\n    {\n        PYBIND11_OVERRIDE (double, Base, valueToProportionOfLength, value);\n    }\n\n    double snapValue (double attemptedValue, juce::Slider::DragMode dragMode) override\n    {\n        PYBIND11_OVERRIDE (double, Base, snapValue, attemptedValue, dragMode);\n    }\n};\n\nstruct PySliderListener : juce::Slider::Listener\n{\n    using juce::Slider::Listener::Listener;\n\n    void sliderValueChanged (juce::Slider* slider) override\n    {\n        PYBIND11_OVERRIDE_PURE (void, juce::Slider::Listener, sliderValueChanged, slider);\n    }\n\n    void sliderDragStarted (juce::Slider* slider) override\n    {\n        PYBIND11_OVERRIDE (void, juce::Slider::Listener, sliderDragStarted, slider);\n    }\n\n    void sliderDragEnded (juce::Slider* slider) override\n    {\n        PYBIND11_OVERRIDE (void, juce::Slider::Listener, sliderDragEnded, slider);\n    }\n};\n\n// ============================================================================================\n\ntemplate <class Base = juce::DocumentWindow>\nstruct PyDocumentWindow : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    void closeButtonPressed() override\n    {\n        PYBIND11_OVERRIDE (void, Base, closeButtonPressed);\n    }\n\n    void minimiseButtonPressed() override\n    {\n        PYBIND11_OVERRIDE (void, Base, minimiseButtonPressed);\n    }\n\n    void maximiseButtonPressed() override\n    {\n        PYBIND11_OVERRIDE (void, Base, maximiseButtonPressed);\n    }\n};\n\n// ============================================================================================\n\ntemplate <class Base = juce::TooltipWindow>\nstruct PyTooltipWindow : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    juce::String getTipFor (juce::Component& c) override\n    {\n        PYBIND11_OVERRIDE (juce::String, Base, getTipFor, c);\n    }\n};\n\n// ============================================================================================\n\ntemplate <class Base = juce::ThreadWithProgressWindow>\nstruct PyThreadWithProgressWindow : PyThread<Base>\n{\n    using PyThread<Base>::PyThread;\n\n    void threadComplete (bool userPressedCancel) override\n    {\n        PYBIND11_OVERRIDE (void, Base, threadComplete, userPressedCancel);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceGuiEntryPointsBindings.h\"\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#define JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM\n#include \"../utilities/PyBind11Includes.h\"\n\n#if JUCE_WINDOWS\n#include \"../utilities/WindowsIncludes.h\"\n#endif\n\n#include \"ScriptJuceOptionsBindings.h\"\n\n#include <functional>\n#include <string_view>\n#include <typeinfo>\n#include <tuple>\n\n// =================================================================================================\n\nnamespace juce {\n\n#if ! JUCE_WINDOWS\n extern const char* const* juce_argv;\n extern int juce_argc;\n#endif\n\n} // namespace juce\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\nnamespace {\n\n// ============================================================================================\n\n#if ! JUCE_PYTHON_EMBEDDED_INTERPRETER\nvoid runApplication (JUCEApplicationBase* application, int milliseconds)\n{\n    {\n        py::gil_scoped_release release;\n\n        if (! application->initialiseApp())\n            return;\n    }\n\n    while (! MessageManager::getInstance()->hasStopMessageBeenSent())\n    {\n        try\n        {\n            py::gil_scoped_release release;\n\n            MessageManager::getInstance()->runDispatchLoopUntil (milliseconds);\n        }\n        catch (const py::error_already_set& e)\n        {\n            if (globalOptions().catchExceptionsAndContinue)\n            {\n                Helpers::printPythonException (e);\n            }\n            else\n            {\n                throw e;\n            }\n        }\n\n        if (globalOptions().caughtKeyboardInterrupt)\n            break;\n\n        if (PyErr_CheckSignals() != 0)\n            throw py::error_already_set();\n    }\n}\n#endif\n\n} // namespace\n\nvoid registerJuceGuiEntryPointsBindings (py::module_& m)\n{\n#if ! JUCE_PYTHON_EMBEDDED_INTERPRETER\n\n    // =================================================================================================\n\n    m.def (\"START_JUCE_APPLICATION\", [](py::handle applicationType, bool catchExceptionsAndContinue)\n    {\n#if JUCE_MAC\n        juce::Process::setDockIconVisible (true);\n#endif\n\n        globalOptions().catchExceptionsAndContinue = catchExceptionsAndContinue;\n        globalOptions().caughtKeyboardInterrupt = false;\n\n        py::scoped_ostream_redirect output;\n\n        if (! applicationType)\n            throw py::value_error(\"Argument must be a JUCEApplication subclass\");\n\n        JUCEApplicationBase* application = nullptr;\n\n        auto sys = py::module_::import (\"sys\");\n        auto systemExit = [sys, &application]\n        {\n            const int returnValue = application != nullptr ? application->shutdownApp() : 255;\n\n            sys.attr (\"exit\") (returnValue);\n        };\n\n#if ! JUCE_WINDOWS\n        StringArray arguments;\n        for (auto arg : sys.attr (\"argv\"))\n            arguments.add (arg.cast<String>());\n\n        Array<const char*> argv;\n        for (const auto& arg : arguments)\n            argv.add (arg.toRawUTF8());\n\n        juce_argv = argv.getRawDataPointer();\n        juce_argc = argv.size();\n#endif\n\n        auto pyApplication = applicationType(); // TODO - error checking (python)\n\n        application = pyApplication.cast<JUCEApplication*>();\n        if (application == nullptr)\n        {\n            systemExit();\n            return;\n        }\n\n        try\n        {\n            runApplication (application, globalOptions().messageManagerGranularityMilliseconds);\n        }\n        catch (const py::error_already_set& e)\n        {\n            Helpers::printPythonException (e);\n        }\n\n        systemExit();\n    }, \"applicationType\"_a, \"catchExceptionsAndContinue\"_a = false);\n\n#endif\n\n    // =================================================================================================\n\n    struct PyTestableApplication\n    {\n        struct Scope\n        {\n            Scope (py::handle applicationType)\n            {\n                if (! applicationType)\n                    throw py::value_error(\"Argument must be a JUCEApplication subclass\");\n\n                JUCEApplicationBase* application = nullptr;\n\n#if ! JUCE_WINDOWS\n                for (auto arg : py::module_::import (\"sys\").attr (\"argv\"))\n                    arguments.add (arg.cast<String>());\n\n                for (const auto& arg : arguments)\n                    argv.add (arg.toRawUTF8());\n\n                juce_argv = argv.getRawDataPointer();\n                juce_argc = argv.size();\n#endif\n\n                auto pyApplication = applicationType();\n\n                application = pyApplication.cast<JUCEApplication*>();\n                if (application == nullptr)\n                    return;\n\n                if (! application->initialiseApp())\n                    return;\n            }\n\n            ~Scope()\n            {\n            }\n\n        private:\n#if ! JUCE_WINDOWS\n            StringArray arguments;\n            Array<const char*> argv;\n#endif\n        };\n\n        PyTestableApplication (py::handle applicationType)\n            : applicationType (applicationType)\n        {\n        }\n\n        void processEvents(int milliseconds = 20)\n        {\n            try\n            {\n                JUCE_TRY\n                {\n                    py::gil_scoped_release release;\n\n                    if (MessageManager::getInstance()->hasStopMessageBeenSent())\n                        return;\n\n                    MessageManager::getInstance()->runDispatchLoopUntil (milliseconds);\n                }\n                JUCE_CATCH_EXCEPTION\n\n                bool isErrorSignalInFlight = PyErr_CheckSignals() != 0;\n                if (isErrorSignalInFlight)\n                    throw py::error_already_set();\n            }\n            catch (const py::error_already_set& e)\n            {\n                py::print (e.what());\n            }\n            catch (...)\n            {\n                py::print (\"unhandled runtime error\");\n            }\n        }\n\n        py::handle applicationType;\n        std::unique_ptr<Scope> applicationScope;\n    };\n\n    py::class_<PyTestableApplication> classTestableApplication (m, \"TestApplication\");\n\n    classTestableApplication\n        .def (py::init<py::handle>())\n        .def (\"processEvents\", &PyTestableApplication::processEvents, \"milliseconds\"_a = 20)\n        .def (\"__enter__\", [](PyTestableApplication& self)\n        {\n            self.applicationScope = std::make_unique<PyTestableApplication::Scope> (self.applicationType);\n            return std::addressof (self);\n        }, py::return_value_policy::reference)\n        .def (\"__exit__\", [](PyTestableApplication& self, const std::optional<py::type>&, const std::optional<py::object>&, const std::optional<py::object>&)\n        {\n            self.applicationScope.reset();\n        })\n        .def (\"__next__\", [](PyTestableApplication& self)\n        {\n            self.processEvents();\n            return std::addressof (self);\n        }, py::return_value_policy::reference)\n    ;\n}\n\n} // namespace popsicle::Bindings\n\n// =================================================================================================\n\n#if ! JUCE_PYTHON_EMBEDDED_INTERPRETER && JUCE_WINDOWS\nBOOL APIENTRY DllMain(HANDLE instance, DWORD reason, LPVOID reserved)\n{\n    juce::ignoreUnused (reserved);\n\n    if (reason == DLL_PROCESS_ATTACH)\n        juce::Process::setCurrentModuleInstanceHandle (instance);\n\n    return true;\n}\n#endif\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_gui_basics\n #error This binding file requires adding the juce_gui_basics module in the project\n#else\n #include <juce_gui_basics/juce_gui_basics.h>\n#endif\n\n#include \"../utilities/PyBind11Includes.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceGuiEntryPointsBindings (pybind11::module_& m);\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiExtraBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceGuiExtraBindings.h\"\n#include \"../utilities/ClassDemangling.h\"\n\nnamespace popsicle::Bindings {\n\nusing namespace juce;\n\nnamespace py = pybind11;\nusing namespace py::literals;\n\n// ============================================================================================\n\nvoid registerJuceGuiExtraBindings (py::module_& m)\n{\n    // ============================================================================================ juce::AnimatedAppComponent\n\n    py::class_<AnimatedAppComponent, Component, PyAnimatedAppComponent<>> classAnimatedAppComponent (m, \"AnimatedAppComponent\");\n\n    classAnimatedAppComponent\n        .def (py::init<>())\n        .def (\"setFramesPerSecond\", &AnimatedAppComponent::setFramesPerSecond)\n        .def (\"setSynchroniseToVBlank\", &AnimatedAppComponent::setSynchroniseToVBlank)\n        .def (\"update\", &AnimatedAppComponent::update)\n        .def (\"getFrameCounter\", &AnimatedAppComponent::getFrameCounter)\n        .def (\"getMillisecondsSinceLastUpdate\", &AnimatedAppComponent::getMillisecondsSinceLastUpdate)\n    ;\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceGuiExtraBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if !JUCE_MODULE_AVAILABLE_juce_gui_extra\n #error This binding file requires adding the juce_gui_extra module in the project\n#else\n #include <juce_gui_extra/juce_gui_extra.h>\n#endif\n\n#include \"ScriptJuceGuiBasicsBindings.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nvoid registerJuceGuiExtraBindings (pybind11::module_& m);\n\n// =================================================================================================\n\ntemplate <class Base = juce::AnimatedAppComponent>\nstruct PyAnimatedAppComponent : PyComponent<Base>\n{\n    using PyComponent<Base>::PyComponent;\n\n    void update() override\n    {\n        PYBIND11_OVERRIDE_PURE(void, Base, update);\n    }\n};\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceOptionsBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptJuceOptionsBindings.h\"\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nOptions& globalOptions() noexcept\n{\n    static Options options = {};\n    return options;\n}\n\n// =================================================================================================\n\nvoid registerJuceOptionsBindings ([[maybe_unused]] pybind11::module_& m)\n{\n}\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/bindings/ScriptJuceOptionsBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <atomic>\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nstruct Options\n{\n    std::atomic_bool catchExceptionsAndContinue = false;\n    std::atomic_bool caughtKeyboardInterrupt = false;\n    std::atomic_int messageManagerGranularityMilliseconds = 200;\n};\n\nOptions& globalOptions() noexcept;\n\n// =================================================================================================\n\nvoid registerJuceOptionsBindings (pybind11::module_& m);\n\n} // namespace popsicle::Bindings\n"
  },
  {
    "path": "modules/juce_python/juce_python.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.h\"\n\n// Scripting engine\n#include \"scripting/ScriptEngine.cpp\"\n#include \"scripting/ScriptBindings.cpp\"\n#include \"scripting/ScriptUtilities.cpp\"\n\n// Must be last as it includes the infamous <windows.h>\n#include \"utilities/CrashHandling.cpp\"\n#include \"utilities/ClassDemangling.cpp\"\n"
  },
  {
    "path": "modules/juce_python/juce_python.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n/*\n BEGIN_JUCE_MODULE_DECLARATION\n\n  ID:                 juce_python\n  vendor:             kunitoki\n  version:            0.9.7\n  name:               Python bindings for the JUCE framework\n  description:        The python bindings to create and work on JUCE apps.\n  website:            https://github.com/kunitoki/popsicle\n  license:            DUAL\n  minimumCppStandard: 17\n\n  dependencies:       juce_core\n\n END_JUCE_MODULE_DECLARATION\n*/\n\n#pragma once\n\n//==============================================================================\n/** Config: JUCE_PYTHON_USE_EXTERNAL_PYBIND11\n\n    Enable externally provided pybind11 installation.\n*/\n#ifndef JUCE_PYTHON_USE_EXTERNAL_PYBIND11\n #define JUCE_PYTHON_USE_EXTERNAL_PYBIND11 0\n#endif\n\n//==============================================================================\n/** Config: JUCE_PYTHON_EMBEDDED_INTERPRETER\n\n    Enable or disable embedding the interpreter. This should be disabled when building standalone wheels.\n*/\n#ifndef JUCE_PYTHON_EMBEDDED_INTERPRETER\n #define JUCE_PYTHON_EMBEDDED_INTERPRETER 1\n#endif\n\n//==============================================================================\n/** Config: JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION\n\n    Enable or disable catching script exceptions.\n*/\n#ifndef JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION\n #define JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION 1\n#endif\n\n//==============================================================================\n/** Config: JUCE_PYTHON_THREAD_CATCH_EXCEPTION\n\n    Enable or disable catching juce::Thread exceptions raised from python.\n*/\n#ifndef JUCE_PYTHON_THREAD_CATCH_EXCEPTION\n #define JUCE_PYTHON_THREAD_CATCH_EXCEPTION 1\n#endif\n\n//==============================================================================\n\n#include \"utilities/MacroHelpers.h\"\n\n/**\n * @brief Custom module name, it's possible to change but beware to update your `import` statements !\n */\n#ifndef JUCE_PYTHON_MODULE_NAME\n #define JUCE_PYTHON_MODULE_NAME popsicle\n#endif\n\n/**\n * @brief Custom python module name as string.\n */\nnamespace popsicle {\n\nstatic inline constexpr const char* const PythonModuleName = JUCE_PYTHON_STRINGIFY (JUCE_PYTHON_MODULE_NAME);\n\n} // namespace popsicle\n\n//==============================================================================\n/**\n * @brief Modal loops are required for juce python to work when built as a wheel.\n */\n#if ! JUCE_PYTHON_EMBEDDED_INTERPRETER && ! JUCE_MODAL_LOOPS_PERMITTED\n #error When building juce_python with JUCE_PYTHON_EMBEDDED_INTERPRETER=0 it is mandatory to also set JUCE_MODAL_LOOPS_PERMITTED=1\n#endif\n\n//==============================================================================\n\n#include \"scripting/ScriptException.h\"\n#include \"scripting/ScriptEngine.h\"\n#include \"scripting/ScriptBindings.h\"\n#include \"scripting/ScriptUtilities.h\"\n#include \"utilities/ClassDemangling.h\"\n#include \"utilities/CrashHandling.h\"\n#include \"utilities/PythonInterop.h\"\n\n#include \"bindings/ScriptJuceCoreBindings.h\"\n"
  },
  {
    "path": "modules/juce_python/juce_python.mm",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.cpp\"\n"
  },
  {
    "path": "modules/juce_python/juce_python_audio_basics.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_basics\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceAudioBasicsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_audio_devices.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_devices\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceAudioDevicesBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_audio_formats.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_formats\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceAudioFormatsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_audio_processors.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_processors\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceAudioProcessorsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_audio_utils.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_audio_utils\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceAudioUtilsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_bindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceBindings.cpp\"\n"
  },
  {
    "path": "modules/juce_python/juce_python_core.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceCoreBindings.cpp\"\n"
  },
  {
    "path": "modules/juce_python/juce_python_data_structures.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_data_structures\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceDataStructuresBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_events.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_events\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceEventsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_graphics.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_graphics\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceGraphicsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_gui_basics.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceGuiBasicsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_gui_entry.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceGuiEntryPointsBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_gui_extra.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_extra\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceGuiExtraBindings.cpp\"\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/juce_python_modules.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.h\"\n\n#include \"modules/ScriptPopsicleModule.cpp\"\n"
  },
  {
    "path": "modules/juce_python/juce_python_options.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"juce_python.h\"\n\n#include \"bindings/ScriptJuceOptionsBindings.cpp\"\n"
  },
  {
    "path": "modules/juce_python/modules/ScriptPopsicleModule.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_PYTHON_EMBEDDED_INTERPRETER\n\n#define JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <iostream>\n#include <string>\n\nPYBIND11_EMBEDDED_MODULE(__popsicle__, m)\n{\n    namespace py = pybind11;\n\n    struct CustomOutputStream\n    {\n        CustomOutputStream() = default;\n        CustomOutputStream (const CustomOutputStream&) = default;\n        CustomOutputStream (CustomOutputStream&&) = default;\n    };\n\n    py::class_<CustomOutputStream> classCustomOutputStream (m, \"__stdout__\");\n    classCustomOutputStream.def_static (\"write\", [](py::object buffer) { std::cout << buffer.cast<std::string>(); });\n    classCustomOutputStream.def_static (\"flush\", [] { std::cout << std::flush; });\n\n    struct CustomErrorStream\n    {\n        CustomErrorStream() = default;\n        CustomErrorStream (const CustomErrorStream&) = default;\n        CustomErrorStream (CustomErrorStream&&) = default;\n    };\n\n    py::class_<CustomErrorStream> classCustomErrorStream (m, \"__stderr__\");\n    classCustomErrorStream.def_static (\"write\", [](py::object buffer) { std::cerr << buffer.cast<std::string>(); });\n    classCustomErrorStream.def_static (\"flush\", [] { std::cerr << std::flush; });\n\n    m.def (\"__redirect__\", []\n    {\n        auto sys = py::module_::import (\"sys\");\n        auto popsicleSys = py::module_::import (\"__popsicle__\");\n\n        popsicleSys.attr (\"__saved_stdout__\") = sys.attr (\"stdout\");\n        popsicleSys.attr (\"__saved_stderr__\") = sys.attr (\"stderr\");\n        sys.attr (\"stdout\") = popsicleSys.attr (\"__stdout__\");\n        sys.attr (\"stderr\") = popsicleSys.attr (\"__stderr__\");\n    });\n\n    m.def (\"__restore__\", []\n    {\n        auto sys = py::module_::import (\"sys\");\n        auto popsicleSys = py::module_::import (\"__popsicle__\");\n\n        sys.attr (\"stdout\") = popsicleSys.attr (\"__saved_stdout__\");\n        sys.attr (\"stderr\") = popsicleSys.attr (\"__saved_stderr__\");\n    });\n}\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/pybind11/attr.h",
    "content": "/*\n    pybind11/attr.h: Infrastructure for processing custom\n    type and function attributes\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"cast.h\"\n\n#include <functional>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\n/// \\addtogroup annotations\n/// @{\n\n/// Annotation for methods\nstruct is_method {\n    handle class_;\n    explicit is_method(const handle &c) : class_(c) {}\n};\n\n/// Annotation for setters\nstruct is_setter {};\n\n/// Annotation for operators\nstruct is_operator {};\n\n/// Annotation for classes that cannot be subclassed\nstruct is_final {};\n\n/// Annotation for parent scope\nstruct scope {\n    handle value;\n    explicit scope(const handle &s) : value(s) {}\n};\n\n/// Annotation for documentation\nstruct doc {\n    const char *value;\n    explicit doc(const char *value) : value(value) {}\n};\n\n/// Annotation for function names\nstruct name {\n    const char *value;\n    explicit name(const char *value) : value(value) {}\n};\n\n/// Annotation indicating that a function is an overload associated with a given \"sibling\"\nstruct sibling {\n    handle value;\n    explicit sibling(const handle &value) : value(value.ptr()) {}\n};\n\n/// Annotation indicating that a class derives from another given type\ntemplate <typename T>\nstruct base {\n\n    PYBIND11_DEPRECATED(\n        \"base<T>() was deprecated in favor of specifying 'T' as a template argument to class_\")\n    base() = default;\n};\n\n/// Keep patient alive while nurse lives\ntemplate <size_t Nurse, size_t Patient>\nstruct keep_alive {};\n\n/// Annotation indicating that a class is involved in a multiple inheritance relationship\nstruct multiple_inheritance {};\n\n/// Annotation which enables dynamic attributes, i.e. adds `__dict__` to a class\nstruct dynamic_attr {};\n\n/// Annotation which enables the buffer protocol for a type\nstruct buffer_protocol {};\n\n/// Annotation which requests that a special metaclass is created for a type\nstruct metaclass {\n    handle value;\n\n    PYBIND11_DEPRECATED(\"py::metaclass() is no longer required. It's turned on by default now.\")\n    metaclass() = default;\n\n    /// Override pybind11's default metaclass\n    explicit metaclass(handle value) : value(value) {}\n};\n\n/// Specifies a custom callback with signature `void (PyHeapTypeObject*)` that\n/// may be used to customize the Python type.\n///\n/// The callback is invoked immediately before `PyType_Ready`.\n///\n/// Note: This is an advanced interface, and uses of it may require changes to\n/// work with later versions of pybind11.  You may wish to consult the\n/// implementation of `make_new_python_type` in `detail/classes.h` to understand\n/// the context in which the callback will be run.\nstruct custom_type_setup {\n    using callback = std::function<void(PyHeapTypeObject *heap_type)>;\n\n    explicit custom_type_setup(callback value) : value(std::move(value)) {}\n\n    callback value;\n};\n\n/// Annotation that marks a class as local to the module:\nstruct module_local {\n    const bool value;\n    constexpr explicit module_local(bool v = true) : value(v) {}\n};\n\n/// Annotation to mark enums as an arithmetic type\nstruct arithmetic {};\n\n/// Mark a function for addition at the beginning of the existing overload chain instead of the end\nstruct prepend {};\n\n/** \\rst\n    A call policy which places one or more guard variables (``Ts...``) around the function call.\n\n    For example, this definition:\n\n    .. code-block:: cpp\n\n        m.def(\"foo\", foo, py::call_guard<T>());\n\n    is equivalent to the following pseudocode:\n\n    .. code-block:: cpp\n\n        m.def(\"foo\", [](args...) {\n            T scope_guard;\n            return foo(args...); // forwarded arguments\n        });\n \\endrst */\ntemplate <typename... Ts>\nstruct call_guard;\n\ntemplate <>\nstruct call_guard<> {\n    using type = detail::void_type;\n};\n\ntemplate <typename T>\nstruct call_guard<T> {\n    static_assert(std::is_default_constructible<T>::value,\n                  \"The guard type must be default constructible\");\n\n    using type = T;\n};\n\ntemplate <typename T, typename... Ts>\nstruct call_guard<T, Ts...> {\n    struct type {\n        T guard{}; // Compose multiple guard types with left-to-right default-constructor order\n        typename call_guard<Ts...>::type next{};\n    };\n};\n\n/// @} annotations\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n/* Forward declarations */\nenum op_id : int;\nenum op_type : int;\nstruct undefined_t;\ntemplate <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t>\nstruct op_;\nvoid keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret);\n\n/// Internal data structure which holds metadata about a keyword argument\nstruct argument_record {\n    const char *name;  ///< Argument name\n    const char *descr; ///< Human-readable version of the argument value\n    handle value;      ///< Associated Python object\n    bool convert : 1;  ///< True if the argument is allowed to convert when loading\n    bool none : 1;     ///< True if None is allowed when loading\n\n    argument_record(const char *name, const char *descr, handle value, bool convert, bool none)\n        : name(name), descr(descr), value(value), convert(convert), none(none) {}\n};\n\n/// Internal data structure which holds metadata about a bound function (signature, overloads,\n/// etc.)\nstruct function_record {\n    function_record()\n        : is_constructor(false), is_new_style_constructor(false), is_stateless(false),\n          is_operator(false), is_method(false), is_setter(false), has_args(false),\n          has_kwargs(false), prepend(false) {}\n\n    /// Function name\n    char *name = nullptr; /* why no C++ strings? They generate heavier code.. */\n\n    // User-specified documentation string\n    char *doc = nullptr;\n\n    /// Human-readable version of the function signature\n    char *signature = nullptr;\n\n    /// List of registered keyword arguments\n    std::vector<argument_record> args;\n\n    /// Pointer to lambda function which converts arguments and performs the actual call\n    handle (*impl)(function_call &) = nullptr;\n\n    /// Storage for the wrapped function pointer and captured data, if any\n    void *data[3] = {};\n\n    /// Pointer to custom destructor for 'data' (if needed)\n    void (*free_data)(function_record *ptr) = nullptr;\n\n    /// Return value policy associated with this function\n    return_value_policy policy = return_value_policy::automatic;\n\n    /// True if name == '__init__'\n    bool is_constructor : 1;\n\n    /// True if this is a new-style `__init__` defined in `detail/init.h`\n    bool is_new_style_constructor : 1;\n\n    /// True if this is a stateless function pointer\n    bool is_stateless : 1;\n\n    /// True if this is an operator (__add__), etc.\n    bool is_operator : 1;\n\n    /// True if this is a method\n    bool is_method : 1;\n\n    /// True if this is a setter\n    bool is_setter : 1;\n\n    /// True if the function has a '*args' argument\n    bool has_args : 1;\n\n    /// True if the function has a '**kwargs' argument\n    bool has_kwargs : 1;\n\n    /// True if this function is to be inserted at the beginning of the overload resolution chain\n    bool prepend : 1;\n\n    /// Number of arguments (including py::args and/or py::kwargs, if present)\n    std::uint16_t nargs;\n\n    /// Number of leading positional arguments, which are terminated by a py::args or py::kwargs\n    /// argument or by a py::kw_only annotation.\n    std::uint16_t nargs_pos = 0;\n\n    /// Number of leading arguments (counted in `nargs`) that are positional-only\n    std::uint16_t nargs_pos_only = 0;\n\n    /// Python method object\n    PyMethodDef *def = nullptr;\n\n    /// Python handle to the parent scope (a class or a module)\n    handle scope;\n\n    /// Python handle to the sibling function representing an overload chain\n    handle sibling;\n\n    /// Pointer to next overload\n    function_record *next = nullptr;\n};\n\n/// Special data structure which (temporarily) holds metadata about a bound class\nstruct type_record {\n    PYBIND11_NOINLINE type_record()\n        : multiple_inheritance(false), dynamic_attr(false), buffer_protocol(false),\n          default_holder(true), module_local(false), is_final(false) {}\n\n    /// Handle to the parent scope\n    handle scope;\n\n    /// Name of the class\n    const char *name = nullptr;\n\n    // Pointer to RTTI type_info data structure\n    const std::type_info *type = nullptr;\n\n    /// How large is the underlying C++ type?\n    size_t type_size = 0;\n\n    /// What is the alignment of the underlying C++ type?\n    size_t type_align = 0;\n\n    /// How large is the type's holder?\n    size_t holder_size = 0;\n\n    /// The global operator new can be overridden with a class-specific variant\n    void *(*operator_new)(size_t) = nullptr;\n\n    /// Function pointer to class_<..>::init_instance\n    void (*init_instance)(instance *, const void *) = nullptr;\n\n    /// Function pointer to class_<..>::dealloc\n    void (*dealloc)(detail::value_and_holder &) = nullptr;\n\n    /// List of base classes of the newly created type\n    list bases;\n\n    /// Optional docstring\n    const char *doc = nullptr;\n\n    /// Custom metaclass (optional)\n    handle metaclass;\n\n    /// Custom type setup.\n    custom_type_setup::callback custom_type_setup_callback;\n\n    /// Multiple inheritance marker\n    bool multiple_inheritance : 1;\n\n    /// Does the class manage a __dict__?\n    bool dynamic_attr : 1;\n\n    /// Does the class implement the buffer protocol?\n    bool buffer_protocol : 1;\n\n    /// Is the default (unique_ptr) holder type used?\n    bool default_holder : 1;\n\n    /// Is the class definition local to the module shared object?\n    bool module_local : 1;\n\n    /// Is the class inheritable from python classes?\n    bool is_final : 1;\n\n    PYBIND11_NOINLINE void add_base(const std::type_info &base, void *(*caster)(void *) ) {\n        auto *base_info = detail::get_type_info(base, false);\n        if (!base_info) {\n            std::string tname(base.name());\n            detail::clean_type_id(tname);\n            pybind11_fail(\"generic_type: type \\\"\" + std::string(name)\n                          + \"\\\" referenced unknown base type \\\"\" + tname + \"\\\"\");\n        }\n\n        if (default_holder != base_info->default_holder) {\n            std::string tname(base.name());\n            detail::clean_type_id(tname);\n            pybind11_fail(\"generic_type: type \\\"\" + std::string(name) + \"\\\" \"\n                          + (default_holder ? \"does not have\" : \"has\")\n                          + \" a non-default holder type while its base \\\"\" + tname + \"\\\" \"\n                          + (base_info->default_holder ? \"does not\" : \"does\"));\n        }\n\n        bases.append((PyObject *) base_info->type);\n\n#if PY_VERSION_HEX < 0x030B0000\n        dynamic_attr |= base_info->type->tp_dictoffset != 0;\n#else\n        dynamic_attr |= (base_info->type->tp_flags & Py_TPFLAGS_MANAGED_DICT) != 0;\n#endif\n\n        if (caster) {\n            base_info->implicit_casts.emplace_back(type, caster);\n        }\n    }\n};\n\ninline function_call::function_call(const function_record &f, handle p) : func(f), parent(p) {\n    args.reserve(f.nargs);\n    args_convert.reserve(f.nargs);\n}\n\n/// Tag for a new-style `__init__` defined in `detail/init.h`\nstruct is_new_style_constructor {};\n\n/**\n * Partial template specializations to process custom attributes provided to\n * cpp_function_ and class_. These are either used to initialize the respective\n * fields in the type_record and function_record data structures or executed at\n * runtime to deal with custom call policies (e.g. keep_alive).\n */\ntemplate <typename T, typename SFINAE = void>\nstruct process_attribute;\n\ntemplate <typename T>\nstruct process_attribute_default {\n    /// Default implementation: do nothing\n    static void init(const T &, function_record *) {}\n    static void init(const T &, type_record *) {}\n    static void precall(function_call &) {}\n    static void postcall(function_call &, handle) {}\n};\n\n/// Process an attribute specifying the function's name\ntemplate <>\nstruct process_attribute<name> : process_attribute_default<name> {\n    static void init(const name &n, function_record *r) { r->name = const_cast<char *>(n.value); }\n};\n\n/// Process an attribute specifying the function's docstring\ntemplate <>\nstruct process_attribute<doc> : process_attribute_default<doc> {\n    static void init(const doc &n, function_record *r) { r->doc = const_cast<char *>(n.value); }\n};\n\n/// Process an attribute specifying the function's docstring (provided as a C-style string)\ntemplate <>\nstruct process_attribute<const char *> : process_attribute_default<const char *> {\n    static void init(const char *d, function_record *r) { r->doc = const_cast<char *>(d); }\n    static void init(const char *d, type_record *r) { r->doc = d; }\n};\ntemplate <>\nstruct process_attribute<char *> : process_attribute<const char *> {};\n\n/// Process an attribute indicating the function's return value policy\ntemplate <>\nstruct process_attribute<return_value_policy> : process_attribute_default<return_value_policy> {\n    static void init(const return_value_policy &p, function_record *r) { r->policy = p; }\n};\n\n/// Process an attribute which indicates that this is an overloaded function associated with a\n/// given sibling\ntemplate <>\nstruct process_attribute<sibling> : process_attribute_default<sibling> {\n    static void init(const sibling &s, function_record *r) { r->sibling = s.value; }\n};\n\n/// Process an attribute which indicates that this function is a method\ntemplate <>\nstruct process_attribute<is_method> : process_attribute_default<is_method> {\n    static void init(const is_method &s, function_record *r) {\n        r->is_method = true;\n        r->scope = s.class_;\n    }\n};\n\n/// Process an attribute which indicates that this function is a setter\ntemplate <>\nstruct process_attribute<is_setter> : process_attribute_default<is_setter> {\n    static void init(const is_setter &, function_record *r) { r->is_setter = true; }\n};\n\n/// Process an attribute which indicates the parent scope of a method\ntemplate <>\nstruct process_attribute<scope> : process_attribute_default<scope> {\n    static void init(const scope &s, function_record *r) { r->scope = s.value; }\n};\n\n/// Process an attribute which indicates that this function is an operator\ntemplate <>\nstruct process_attribute<is_operator> : process_attribute_default<is_operator> {\n    static void init(const is_operator &, function_record *r) { r->is_operator = true; }\n};\n\ntemplate <>\nstruct process_attribute<is_new_style_constructor>\n    : process_attribute_default<is_new_style_constructor> {\n    static void init(const is_new_style_constructor &, function_record *r) {\n        r->is_new_style_constructor = true;\n    }\n};\n\ninline void check_kw_only_arg(const arg &a, function_record *r) {\n    if (r->args.size() > r->nargs_pos && (!a.name || a.name[0] == '\\0')) {\n        pybind11_fail(\"arg(): cannot specify an unnamed argument after a kw_only() annotation or \"\n                      \"args() argument\");\n    }\n}\n\ninline void append_self_arg_if_needed(function_record *r) {\n    if (r->is_method && r->args.empty()) {\n        r->args.emplace_back(\"self\", nullptr, handle(), /*convert=*/true, /*none=*/false);\n    }\n}\n\n/// Process a keyword argument attribute (*without* a default value)\ntemplate <>\nstruct process_attribute<arg> : process_attribute_default<arg> {\n    static void init(const arg &a, function_record *r) {\n        append_self_arg_if_needed(r);\n        r->args.emplace_back(a.name, nullptr, handle(), !a.flag_noconvert, a.flag_none);\n\n        check_kw_only_arg(a, r);\n    }\n};\n\n/// Process a keyword argument attribute (*with* a default value)\ntemplate <>\nstruct process_attribute<arg_v> : process_attribute_default<arg_v> {\n    static void init(const arg_v &a, function_record *r) {\n        if (r->is_method && r->args.empty()) {\n            r->args.emplace_back(\n                \"self\", /*descr=*/nullptr, /*parent=*/handle(), /*convert=*/true, /*none=*/false);\n        }\n\n        if (!a.value) {\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            std::string descr(\"'\");\n            if (a.name) {\n                descr += std::string(a.name) + \": \";\n            }\n            descr += a.type + \"'\";\n            if (r->is_method) {\n                if (r->name) {\n                    descr += \" in method '\" + (std::string) str(r->scope) + \".\"\n                             + (std::string) r->name + \"'\";\n                } else {\n                    descr += \" in method of '\" + (std::string) str(r->scope) + \"'\";\n                }\n            } else if (r->name) {\n                descr += \" in function '\" + (std::string) r->name + \"'\";\n            }\n            pybind11_fail(\"arg(): could not convert default argument \" + descr\n                          + \" into a Python object (type not registered yet?)\");\n#else\n            pybind11_fail(\"arg(): could not convert default argument \"\n                          \"into a Python object (type not registered yet?). \"\n                          \"#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for \"\n                          \"more information.\");\n#endif\n        }\n        r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none);\n\n        check_kw_only_arg(a, r);\n    }\n};\n\n/// Process a keyword-only-arguments-follow pseudo argument\ntemplate <>\nstruct process_attribute<kw_only> : process_attribute_default<kw_only> {\n    static void init(const kw_only &, function_record *r) {\n        append_self_arg_if_needed(r);\n        if (r->has_args && r->nargs_pos != static_cast<std::uint16_t>(r->args.size())) {\n            pybind11_fail(\"Mismatched args() and kw_only(): they must occur at the same relative \"\n                          \"argument location (or omit kw_only() entirely)\");\n        }\n        r->nargs_pos = static_cast<std::uint16_t>(r->args.size());\n    }\n};\n\n/// Process a positional-only-argument maker\ntemplate <>\nstruct process_attribute<pos_only> : process_attribute_default<pos_only> {\n    static void init(const pos_only &, function_record *r) {\n        append_self_arg_if_needed(r);\n        r->nargs_pos_only = static_cast<std::uint16_t>(r->args.size());\n        if (r->nargs_pos_only > r->nargs_pos) {\n            pybind11_fail(\"pos_only(): cannot follow a py::args() argument\");\n        }\n        // It also can't follow a kw_only, but a static_assert in pybind11.h checks that\n    }\n};\n\n/// Process a parent class attribute.  Single inheritance only (class_ itself already guarantees\n/// that)\ntemplate <typename T>\nstruct process_attribute<T, enable_if_t<is_pyobject<T>::value>>\n    : process_attribute_default<handle> {\n    static void init(const handle &h, type_record *r) { r->bases.append(h); }\n};\n\n/// Process a parent class attribute (deprecated, does not support multiple inheritance)\ntemplate <typename T>\nstruct process_attribute<base<T>> : process_attribute_default<base<T>> {\n    static void init(const base<T> &, type_record *r) { r->add_base(typeid(T), nullptr); }\n};\n\n/// Process a multiple inheritance attribute\ntemplate <>\nstruct process_attribute<multiple_inheritance> : process_attribute_default<multiple_inheritance> {\n    static void init(const multiple_inheritance &, type_record *r) {\n        r->multiple_inheritance = true;\n    }\n};\n\ntemplate <>\nstruct process_attribute<dynamic_attr> : process_attribute_default<dynamic_attr> {\n    static void init(const dynamic_attr &, type_record *r) { r->dynamic_attr = true; }\n};\n\ntemplate <>\nstruct process_attribute<custom_type_setup> {\n    static void init(const custom_type_setup &value, type_record *r) {\n        r->custom_type_setup_callback = value.value;\n    }\n};\n\ntemplate <>\nstruct process_attribute<is_final> : process_attribute_default<is_final> {\n    static void init(const is_final &, type_record *r) { r->is_final = true; }\n};\n\ntemplate <>\nstruct process_attribute<buffer_protocol> : process_attribute_default<buffer_protocol> {\n    static void init(const buffer_protocol &, type_record *r) { r->buffer_protocol = true; }\n};\n\ntemplate <>\nstruct process_attribute<metaclass> : process_attribute_default<metaclass> {\n    static void init(const metaclass &m, type_record *r) { r->metaclass = m.value; }\n};\n\ntemplate <>\nstruct process_attribute<module_local> : process_attribute_default<module_local> {\n    static void init(const module_local &l, type_record *r) { r->module_local = l.value; }\n};\n\n/// Process a 'prepend' attribute, putting this at the beginning of the overload chain\ntemplate <>\nstruct process_attribute<prepend> : process_attribute_default<prepend> {\n    static void init(const prepend &, function_record *r) { r->prepend = true; }\n};\n\n/// Process an 'arithmetic' attribute for enums (does nothing here)\ntemplate <>\nstruct process_attribute<arithmetic> : process_attribute_default<arithmetic> {};\n\ntemplate <typename... Ts>\nstruct process_attribute<call_guard<Ts...>> : process_attribute_default<call_guard<Ts...>> {};\n\n/**\n * Process a keep_alive call policy -- invokes keep_alive_impl during the\n * pre-call handler if both Nurse, Patient != 0 and use the post-call handler\n * otherwise\n */\ntemplate <size_t Nurse, size_t Patient>\nstruct process_attribute<keep_alive<Nurse, Patient>>\n    : public process_attribute_default<keep_alive<Nurse, Patient>> {\n    template <size_t N = Nurse, size_t P = Patient, enable_if_t<N != 0 && P != 0, int> = 0>\n    static void precall(function_call &call) {\n        keep_alive_impl(Nurse, Patient, call, handle());\n    }\n    template <size_t N = Nurse, size_t P = Patient, enable_if_t<N != 0 && P != 0, int> = 0>\n    static void postcall(function_call &, handle) {}\n    template <size_t N = Nurse, size_t P = Patient, enable_if_t<N == 0 || P == 0, int> = 0>\n    static void precall(function_call &) {}\n    template <size_t N = Nurse, size_t P = Patient, enable_if_t<N == 0 || P == 0, int> = 0>\n    static void postcall(function_call &call, handle ret) {\n        keep_alive_impl(Nurse, Patient, call, ret);\n    }\n};\n\n/// Recursively iterate over variadic template arguments\ntemplate <typename... Args>\nstruct process_attributes {\n    static void init(const Args &...args, function_record *r) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r);\n        PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r);\n        using expander = int[];\n        (void) expander{\n            0, ((void) process_attribute<typename std::decay<Args>::type>::init(args, r), 0)...};\n    }\n    static void init(const Args &...args, type_record *r) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r);\n        PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r);\n        using expander = int[];\n        (void) expander{0,\n                        (process_attribute<typename std::decay<Args>::type>::init(args, r), 0)...};\n    }\n    static void precall(function_call &call) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call);\n        using expander = int[];\n        (void) expander{0,\n                        (process_attribute<typename std::decay<Args>::type>::precall(call), 0)...};\n    }\n    static void postcall(function_call &call, handle fn_ret) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call, fn_ret);\n        PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(fn_ret);\n        using expander = int[];\n        (void) expander{\n            0, (process_attribute<typename std::decay<Args>::type>::postcall(call, fn_ret), 0)...};\n    }\n};\n\ntemplate <typename T>\nusing is_call_guard = is_instantiation<call_guard, T>;\n\n/// Extract the ``type`` from the first `call_guard` in `Extras...` (or `void_type` if none found)\ntemplate <typename... Extra>\nusing extract_guard_t = typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type;\n\n/// Check the number of named arguments at compile time\ntemplate <typename... Extra,\n          size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...),\n          size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)>\nconstexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) {\n    PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(nargs, has_args, has_kwargs);\n    return named == 0 || (self + named + size_t(has_args) + size_t(has_kwargs)) == nargs;\n}\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/buffer_info.h",
    "content": "/*\n    pybind11/buffer_info.h: Python buffer object interface\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Default, C-style strides\ninline std::vector<ssize_t> c_strides(const std::vector<ssize_t> &shape, ssize_t itemsize) {\n    auto ndim = shape.size();\n    std::vector<ssize_t> strides(ndim, itemsize);\n    if (ndim > 0) {\n        for (size_t i = ndim - 1; i > 0; --i) {\n            strides[i - 1] = strides[i] * shape[i];\n        }\n    }\n    return strides;\n}\n\n// F-style strides; default when constructing an array_t with `ExtraFlags & f_style`\ninline std::vector<ssize_t> f_strides(const std::vector<ssize_t> &shape, ssize_t itemsize) {\n    auto ndim = shape.size();\n    std::vector<ssize_t> strides(ndim, itemsize);\n    for (size_t i = 1; i < ndim; ++i) {\n        strides[i] = strides[i - 1] * shape[i - 1];\n    }\n    return strides;\n}\n\ntemplate <typename T, typename SFINAE = void>\nstruct compare_buffer_info;\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Information record describing a Python buffer object\nstruct buffer_info {\n    void *ptr = nullptr;          // Pointer to the underlying storage\n    ssize_t itemsize = 0;         // Size of individual items in bytes\n    ssize_t size = 0;             // Total number of entries\n    std::string format;           // For homogeneous buffers, this should be set to\n                                  // format_descriptor<T>::format()\n    ssize_t ndim = 0;             // Number of dimensions\n    std::vector<ssize_t> shape;   // Shape of the tensor (1 entry per dimension)\n    std::vector<ssize_t> strides; // Number of bytes between adjacent entries\n                                  // (for each per dimension)\n    bool readonly = false;        // flag to indicate if the underlying storage may be written to\n\n    buffer_info() = default;\n\n    buffer_info(void *ptr,\n                ssize_t itemsize,\n                const std::string &format,\n                ssize_t ndim,\n                detail::any_container<ssize_t> shape_in,\n                detail::any_container<ssize_t> strides_in,\n                bool readonly = false)\n        : ptr(ptr), itemsize(itemsize), size(1), format(format), ndim(ndim),\n          shape(std::move(shape_in)), strides(std::move(strides_in)), readonly(readonly) {\n        if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size()) {\n            pybind11_fail(\"buffer_info: ndim doesn't match shape and/or strides length\");\n        }\n        for (size_t i = 0; i < (size_t) ndim; ++i) {\n            size *= shape[i];\n        }\n    }\n\n    template <typename T>\n    buffer_info(T *ptr,\n                detail::any_container<ssize_t> shape_in,\n                detail::any_container<ssize_t> strides_in,\n                bool readonly = false)\n        : buffer_info(private_ctr_tag(),\n                      ptr,\n                      sizeof(T),\n                      format_descriptor<T>::format(),\n                      static_cast<ssize_t>(shape_in->size()),\n                      std::move(shape_in),\n                      std::move(strides_in),\n                      readonly) {}\n\n    buffer_info(void *ptr,\n                ssize_t itemsize,\n                const std::string &format,\n                ssize_t size,\n                bool readonly = false)\n        : buffer_info(ptr, itemsize, format, 1, {size}, {itemsize}, readonly) {}\n\n    template <typename T>\n    buffer_info(T *ptr, ssize_t size, bool readonly = false)\n        : buffer_info(ptr, sizeof(T), format_descriptor<T>::format(), size, readonly) {}\n\n    template <typename T>\n    buffer_info(const T *ptr, ssize_t size, bool readonly = true)\n        : buffer_info(\n            const_cast<T *>(ptr), sizeof(T), format_descriptor<T>::format(), size, readonly) {}\n\n    explicit buffer_info(Py_buffer *view, bool ownview = true)\n        : buffer_info(\n            view->buf,\n            view->itemsize,\n            view->format,\n            view->ndim,\n            {view->shape, view->shape + view->ndim},\n            /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects\n             * ignore this flag and return a view with NULL strides.\n             * When strides are NULL, build them manually.  */\n            view->strides\n                ? std::vector<ssize_t>(view->strides, view->strides + view->ndim)\n                : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize),\n            (view->readonly != 0)) {\n        // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)\n        this->m_view = view;\n        // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)\n        this->ownview = ownview;\n    }\n\n    buffer_info(const buffer_info &) = delete;\n    buffer_info &operator=(const buffer_info &) = delete;\n\n    buffer_info(buffer_info &&other) noexcept { (*this) = std::move(other); }\n\n    buffer_info &operator=(buffer_info &&rhs) noexcept {\n        ptr = rhs.ptr;\n        itemsize = rhs.itemsize;\n        size = rhs.size;\n        format = std::move(rhs.format);\n        ndim = rhs.ndim;\n        shape = std::move(rhs.shape);\n        strides = std::move(rhs.strides);\n        std::swap(m_view, rhs.m_view);\n        std::swap(ownview, rhs.ownview);\n        readonly = rhs.readonly;\n        return *this;\n    }\n\n    ~buffer_info() {\n        if (m_view && ownview) {\n            PyBuffer_Release(m_view);\n            delete m_view;\n        }\n    }\n\n    Py_buffer *view() const { return m_view; }\n    Py_buffer *&view() { return m_view; }\n\n    /* True if the buffer item type is equivalent to `T`. */\n    // To define \"equivalent\" by example:\n    // `buffer_info::item_type_is_equivalent_to<int>(b)` and\n    // `buffer_info::item_type_is_equivalent_to<long>(b)` may both be true\n    // on some platforms, but `int` and `unsigned` will never be equivalent.\n    // For the ground truth, please inspect `detail::compare_buffer_info<>`.\n    template <typename T>\n    bool item_type_is_equivalent_to() const {\n        return detail::compare_buffer_info<T>::compare(*this);\n    }\n\nprivate:\n    struct private_ctr_tag {};\n\n    buffer_info(private_ctr_tag,\n                void *ptr,\n                ssize_t itemsize,\n                const std::string &format,\n                ssize_t ndim,\n                detail::any_container<ssize_t> &&shape_in,\n                detail::any_container<ssize_t> &&strides_in,\n                bool readonly)\n        : buffer_info(\n            ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {}\n\n    Py_buffer *m_view = nullptr;\n    bool ownview = false;\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename T, typename SFINAE>\nstruct compare_buffer_info {\n    static bool compare(const buffer_info &b) {\n        // NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *`\n        return b.format == format_descriptor<T>::format() && b.itemsize == (ssize_t) sizeof(T);\n    }\n};\n\ntemplate <typename T>\nstruct compare_buffer_info<T, detail::enable_if_t<std::is_integral<T>::value>> {\n    static bool compare(const buffer_info &b) {\n        return (size_t) b.itemsize == sizeof(T)\n               && (b.format == format_descriptor<T>::value\n                   || ((sizeof(T) == sizeof(long))\n                       && b.format == (std::is_unsigned<T>::value ? \"L\" : \"l\"))\n                   || ((sizeof(T) == sizeof(size_t))\n                       && b.format == (std::is_unsigned<T>::value ? \"N\" : \"n\")));\n    }\n};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/cast.h",
    "content": "/*\n    pybind11/cast.h: Partial template specializations to cast between\n    C++ and Python types\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"detail/descr.h\"\n#include \"detail/type_caster_base.h\"\n#include \"detail/typeid.h\"\n#include \"pytypes.h\"\n\n#include <array>\n#include <cstring>\n#include <functional>\n#include <iosfwd>\n#include <iterator>\n#include <memory>\n#include <string>\n#include <tuple>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename type, typename SFINAE = void>\nclass type_caster : public type_caster_base<type> {};\ntemplate <typename type>\nusing make_caster = type_caster<intrinsic_t<type>>;\n\n// Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T\ntemplate <typename T>\ntypename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {\n    return caster.operator typename make_caster<T>::template cast_op_type<T>();\n}\ntemplate <typename T>\ntypename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>\ncast_op(make_caster<T> &&caster) {\n    return std::move(caster).operator typename make_caster<T>::\n        template cast_op_type<typename std::add_rvalue_reference<T>::type>();\n}\n\ntemplate <typename type>\nclass type_caster<std::reference_wrapper<type>> {\nprivate:\n    using caster_t = make_caster<type>;\n    caster_t subcaster;\n    using reference_t = type &;\n    using subcaster_cast_op_type = typename caster_t::template cast_op_type<reference_t>;\n\n    static_assert(\n        std::is_same<typename std::remove_const<type>::type &, subcaster_cast_op_type>::value\n            || std::is_same<reference_t, subcaster_cast_op_type>::value,\n        \"std::reference_wrapper<T> caster requires T to have a caster with an \"\n        \"`operator T &()` or `operator const T &()`\");\n\npublic:\n    bool load(handle src, bool convert) { return subcaster.load(src, convert); }\n    static constexpr auto name = caster_t::name;\n    static handle\n    cast(const std::reference_wrapper<type> &src, return_value_policy policy, handle parent) {\n        // It is definitely wrong to take ownership of this pointer, so mask that rvp\n        if (policy == return_value_policy::take_ownership\n            || policy == return_value_policy::automatic) {\n            policy = return_value_policy::automatic_reference;\n        }\n        return caster_t::cast(&src.get(), policy, parent);\n    }\n    template <typename T>\n    using cast_op_type = std::reference_wrapper<type>;\n    explicit operator std::reference_wrapper<type>() { return cast_op<type &>(subcaster); }\n};\n\n#define PYBIND11_TYPE_CASTER(type, py_name)                                                       \\\nprotected:                                                                                        \\\n    type value;                                                                                   \\\n                                                                                                  \\\npublic:                                                                                           \\\n    static constexpr auto name = py_name;                                                         \\\n    template <typename T_,                                                                        \\\n              ::pybind11::detail::enable_if_t<                                                    \\\n                  std::is_same<type, ::pybind11::detail::remove_cv_t<T_>>::value,                 \\\n                  int>                                                                            \\\n              = 0>                                                                                \\\n    static ::pybind11::handle cast(                                                               \\\n        T_ *src, ::pybind11::return_value_policy policy, ::pybind11::handle parent) {             \\\n        if (!src)                                                                                 \\\n            return ::pybind11::none().release();                                                  \\\n        if (policy == ::pybind11::return_value_policy::take_ownership) {                          \\\n            auto h = cast(std::move(*src), policy, parent);                                       \\\n            delete src;                                                                           \\\n            return h;                                                                             \\\n        }                                                                                         \\\n        return cast(*src, policy, parent);                                                        \\\n    }                                                                                             \\\n    operator type *() { return &value; }               /* NOLINT(bugprone-macro-parentheses) */   \\\n    operator type &() { return value; }                /* NOLINT(bugprone-macro-parentheses) */   \\\n    operator type &&() && { return std::move(value); } /* NOLINT(bugprone-macro-parentheses) */   \\\n    template <typename T_>                                                                        \\\n    using cast_op_type = ::pybind11::detail::movable_cast_op_type<T_>\n\ntemplate <typename CharT>\nusing is_std_char_type = any_of<std::is_same<CharT, char>, /* std::string */\n#if defined(PYBIND11_HAS_U8STRING)\n                                std::is_same<CharT, char8_t>, /* std::u8string */\n#endif\n                                std::is_same<CharT, char16_t>, /* std::u16string */\n                                std::is_same<CharT, char32_t>, /* std::u32string */\n                                std::is_same<CharT, wchar_t>   /* std::wstring */\n                                >;\n\ntemplate <typename T>\nstruct type_caster<T, enable_if_t<std::is_arithmetic<T>::value && !is_std_char_type<T>::value>> {\n    using _py_type_0 = conditional_t<sizeof(T) <= sizeof(long), long, long long>;\n    using _py_type_1 = conditional_t<std::is_signed<T>::value,\n                                     _py_type_0,\n                                     typename std::make_unsigned<_py_type_0>::type>;\n    using py_type = conditional_t<std::is_floating_point<T>::value, double, _py_type_1>;\n\npublic:\n    bool load(handle src, bool convert) {\n        py_type py_value;\n\n        if (!src) {\n            return false;\n        }\n\n#if !defined(PYPY_VERSION)\n        auto index_check = [](PyObject *o) { return PyIndex_Check(o); };\n#else\n        // In PyPy 7.3.3, `PyIndex_Check` is implemented by calling `__index__`,\n        // while CPython only considers the existence of `nb_index`/`__index__`.\n        auto index_check = [](PyObject *o) { return hasattr(o, \"__index__\"); };\n#endif\n\n        if (std::is_floating_point<T>::value) {\n            if (convert || PyFloat_Check(src.ptr())) {\n                py_value = (py_type) PyFloat_AsDouble(src.ptr());\n            } else {\n                return false;\n            }\n        } else if (PyFloat_Check(src.ptr())\n                   || (!convert && !PYBIND11_LONG_CHECK(src.ptr()) && !index_check(src.ptr()))) {\n            return false;\n        } else {\n            handle src_or_index = src;\n            // PyPy: 7.3.7's 3.8 does not implement PyLong_*'s __index__ calls.\n#if PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION)\n            object index;\n            if (!PYBIND11_LONG_CHECK(src.ptr())) { // So: index_check(src.ptr())\n                index = reinterpret_steal<object>(PyNumber_Index(src.ptr()));\n                if (!index) {\n                    PyErr_Clear();\n                    if (!convert)\n                        return false;\n                } else {\n                    src_or_index = index;\n                }\n            }\n#endif\n            if (std::is_unsigned<py_type>::value) {\n                py_value = as_unsigned<py_type>(src_or_index.ptr());\n            } else { // signed integer:\n                py_value = sizeof(T) <= sizeof(long)\n                               ? (py_type) PyLong_AsLong(src_or_index.ptr())\n                               : (py_type) PYBIND11_LONG_AS_LONGLONG(src_or_index.ptr());\n            }\n        }\n\n        // Python API reported an error\n        bool py_err = py_value == (py_type) -1 && PyErr_Occurred();\n\n        // Check to see if the conversion is valid (integers should match exactly)\n        // Signed/unsigned checks happen elsewhere\n        if (py_err\n            || (std::is_integral<T>::value && sizeof(py_type) != sizeof(T)\n                && py_value != (py_type) (T) py_value)) {\n            PyErr_Clear();\n            if (py_err && convert && (PyNumber_Check(src.ptr()) != 0)) {\n                auto tmp = reinterpret_steal<object>(std::is_floating_point<T>::value\n                                                         ? PyNumber_Float(src.ptr())\n                                                         : PyNumber_Long(src.ptr()));\n                PyErr_Clear();\n                return load(tmp, false);\n            }\n            return false;\n        }\n\n        value = (T) py_value;\n        return true;\n    }\n\n    template <typename U = T>\n    static typename std::enable_if<std::is_floating_point<U>::value, handle>::type\n    cast(U src, return_value_policy /* policy */, handle /* parent */) {\n        return PyFloat_FromDouble((double) src);\n    }\n\n    template <typename U = T>\n    static typename std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value\n                                       && (sizeof(U) <= sizeof(long)),\n                                   handle>::type\n    cast(U src, return_value_policy /* policy */, handle /* parent */) {\n        return PYBIND11_LONG_FROM_SIGNED((long) src);\n    }\n\n    template <typename U = T>\n    static typename std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value\n                                       && (sizeof(U) <= sizeof(unsigned long)),\n                                   handle>::type\n    cast(U src, return_value_policy /* policy */, handle /* parent */) {\n        return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src);\n    }\n\n    template <typename U = T>\n    static typename std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value\n                                       && (sizeof(U) > sizeof(long)),\n                                   handle>::type\n    cast(U src, return_value_policy /* policy */, handle /* parent */) {\n        return PyLong_FromLongLong((long long) src);\n    }\n\n    template <typename U = T>\n    static typename std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value\n                                       && (sizeof(U) > sizeof(unsigned long)),\n                                   handle>::type\n    cast(U src, return_value_policy /* policy */, handle /* parent */) {\n        return PyLong_FromUnsignedLongLong((unsigned long long) src);\n    }\n\n    PYBIND11_TYPE_CASTER(T, const_name<std::is_integral<T>::value>(\"int\", \"float\"));\n};\n\ntemplate <typename T>\nstruct void_caster {\npublic:\n    bool load(handle src, bool) {\n        if (src && src.is_none()) {\n            return true;\n        }\n        return false;\n    }\n    static handle cast(T, return_value_policy /* policy */, handle /* parent */) {\n        return none().release();\n    }\n    PYBIND11_TYPE_CASTER(T, const_name(\"None\"));\n};\n\ntemplate <>\nclass type_caster<void_type> : public void_caster<void_type> {};\n\ntemplate <>\nclass type_caster<void> : public type_caster<void_type> {\npublic:\n    using type_caster<void_type>::cast;\n\n    bool load(handle h, bool) {\n        if (!h) {\n            return false;\n        }\n        if (h.is_none()) {\n            value = nullptr;\n            return true;\n        }\n\n        /* Check if this is a capsule */\n        if (isinstance<capsule>(h)) {\n            value = reinterpret_borrow<capsule>(h);\n            return true;\n        }\n\n        /* Check if this is a C++ type */\n        const auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr());\n        if (bases.size() == 1) { // Only allowing loading from a single-value type\n            value = values_and_holders(reinterpret_cast<instance *>(h.ptr())).begin()->value_ptr();\n            return true;\n        }\n\n        /* Fail */\n        return false;\n    }\n\n    static handle cast(const void *ptr, return_value_policy /* policy */, handle /* parent */) {\n        if (ptr) {\n            return capsule(ptr).release();\n        }\n        return none().release();\n    }\n\n    template <typename T>\n    using cast_op_type = void *&;\n    explicit operator void *&() { return value; }\n    static constexpr auto name = const_name(\"capsule\");\n\nprivate:\n    void *value = nullptr;\n};\n\ntemplate <>\nclass type_caster<std::nullptr_t> : public void_caster<std::nullptr_t> {};\n\ntemplate <>\nclass type_caster<bool> {\npublic:\n    bool load(handle src, bool convert) {\n        if (!src) {\n            return false;\n        }\n        if (src.ptr() == Py_True) {\n            value = true;\n            return true;\n        }\n        if (src.ptr() == Py_False) {\n            value = false;\n            return true;\n        }\n        if (convert || (std::strcmp(\"numpy.bool_\", Py_TYPE(src.ptr())->tp_name) == 0)) {\n            // (allow non-implicit conversion for numpy booleans)\n\n            Py_ssize_t res = -1;\n            if (src.is_none()) {\n                res = 0; // None is implicitly converted to False\n            }\n#if defined(PYPY_VERSION)\n            // On PyPy, check that \"__bool__\" attr exists\n            else if (hasattr(src, PYBIND11_BOOL_ATTR)) {\n                res = PyObject_IsTrue(src.ptr());\n            }\n#else\n            // Alternate approach for CPython: this does the same as the above, but optimized\n            // using the CPython API so as to avoid an unneeded attribute lookup.\n            else if (auto *tp_as_number = src.ptr()->ob_type->tp_as_number) {\n                if (PYBIND11_NB_BOOL(tp_as_number)) {\n                    res = (*PYBIND11_NB_BOOL(tp_as_number))(src.ptr());\n                }\n            }\n#endif\n            if (res == 0 || res == 1) {\n                value = (res != 0);\n                return true;\n            }\n            PyErr_Clear();\n        }\n        return false;\n    }\n    static handle cast(bool src, return_value_policy /* policy */, handle /* parent */) {\n        return handle(src ? Py_True : Py_False).inc_ref();\n    }\n    PYBIND11_TYPE_CASTER(bool, const_name(\"bool\"));\n};\n\n// Helper class for UTF-{8,16,32} C++ stl strings:\ntemplate <typename StringType, bool IsView = false>\nstruct string_caster {\n    using CharT = typename StringType::value_type;\n\n    // Simplify life by being able to assume standard char sizes (the standard only guarantees\n    // minimums, but Python requires exact sizes)\n    static_assert(!std::is_same<CharT, char>::value || sizeof(CharT) == 1,\n                  \"Unsupported char size != 1\");\n#if defined(PYBIND11_HAS_U8STRING)\n    static_assert(!std::is_same<CharT, char8_t>::value || sizeof(CharT) == 1,\n                  \"Unsupported char8_t size != 1\");\n#endif\n    static_assert(!std::is_same<CharT, char16_t>::value || sizeof(CharT) == 2,\n                  \"Unsupported char16_t size != 2\");\n    static_assert(!std::is_same<CharT, char32_t>::value || sizeof(CharT) == 4,\n                  \"Unsupported char32_t size != 4\");\n    // wchar_t can be either 16 bits (Windows) or 32 (everywhere else)\n    static_assert(!std::is_same<CharT, wchar_t>::value || sizeof(CharT) == 2 || sizeof(CharT) == 4,\n                  \"Unsupported wchar_t size != 2/4\");\n    static constexpr size_t UTF_N = 8 * sizeof(CharT);\n\n    bool load(handle src, bool) {\n        handle load_src = src;\n        if (!src) {\n            return false;\n        }\n        if (!PyUnicode_Check(load_src.ptr())) {\n            return load_raw(load_src);\n        }\n\n        // For UTF-8 we avoid the need for a temporary `bytes` object by using\n        // `PyUnicode_AsUTF8AndSize`.\n        if (UTF_N == 8) {\n            Py_ssize_t size = -1;\n            const auto *buffer\n                = reinterpret_cast<const CharT *>(PyUnicode_AsUTF8AndSize(load_src.ptr(), &size));\n            if (!buffer) {\n                PyErr_Clear();\n                return false;\n            }\n            value = StringType(buffer, static_cast<size_t>(size));\n            return true;\n        }\n\n        auto utfNbytes\n            = reinterpret_steal<object>(PyUnicode_AsEncodedString(load_src.ptr(),\n                                                                  UTF_N == 8    ? \"utf-8\"\n                                                                  : UTF_N == 16 ? \"utf-16\"\n                                                                                : \"utf-32\",\n                                                                  nullptr));\n        if (!utfNbytes) {\n            PyErr_Clear();\n            return false;\n        }\n\n        const auto *buffer\n            = reinterpret_cast<const CharT *>(PYBIND11_BYTES_AS_STRING(utfNbytes.ptr()));\n        size_t length = (size_t) PYBIND11_BYTES_SIZE(utfNbytes.ptr()) / sizeof(CharT);\n        // Skip BOM for UTF-16/32\n        if (UTF_N > 8) {\n            buffer++;\n            length--;\n        }\n        value = StringType(buffer, length);\n\n        // If we're loading a string_view we need to keep the encoded Python object alive:\n        if (IsView) {\n            loader_life_support::add_patient(utfNbytes);\n        }\n\n        return true;\n    }\n\n    static handle\n    cast(const StringType &src, return_value_policy /* policy */, handle /* parent */) {\n        const char *buffer = reinterpret_cast<const char *>(src.data());\n        auto nbytes = ssize_t(src.size() * sizeof(CharT));\n        handle s = decode_utfN(buffer, nbytes);\n        if (!s) {\n            throw error_already_set();\n        }\n        return s;\n    }\n\n    PYBIND11_TYPE_CASTER(StringType, const_name(PYBIND11_STRING_NAME));\n\nprivate:\n    static handle decode_utfN(const char *buffer, ssize_t nbytes) {\n#if !defined(PYPY_VERSION)\n        return UTF_N == 8    ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr)\n               : UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr)\n                             : PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr);\n#else\n        // PyPy segfaults when on PyUnicode_DecodeUTF16 (and possibly on PyUnicode_DecodeUTF32 as\n        // well), so bypass the whole thing by just passing the encoding as a string value, which\n        // works properly:\n        return PyUnicode_Decode(buffer,\n                                nbytes,\n                                UTF_N == 8    ? \"utf-8\"\n                                : UTF_N == 16 ? \"utf-16\"\n                                              : \"utf-32\",\n                                nullptr);\n#endif\n    }\n\n    // When loading into a std::string or char*, accept a bytes/bytearray object as-is (i.e.\n    // without any encoding/decoding attempt).  For other C++ char sizes this is a no-op.\n    // which supports loading a unicode from a str, doesn't take this path.\n    template <typename C = CharT>\n    bool load_raw(enable_if_t<std::is_same<C, char>::value, handle> src) {\n        if (PYBIND11_BYTES_CHECK(src.ptr())) {\n            // We were passed raw bytes; accept it into a std::string or char*\n            // without any encoding attempt.\n            const char *bytes = PYBIND11_BYTES_AS_STRING(src.ptr());\n            if (!bytes) {\n                pybind11_fail(\"Unexpected PYBIND11_BYTES_AS_STRING() failure.\");\n            }\n            value = StringType(bytes, (size_t) PYBIND11_BYTES_SIZE(src.ptr()));\n            return true;\n        }\n        if (PyByteArray_Check(src.ptr())) {\n            // We were passed a bytearray; accept it into a std::string or char*\n            // without any encoding attempt.\n            const char *bytearray = PyByteArray_AsString(src.ptr());\n            if (!bytearray) {\n                pybind11_fail(\"Unexpected PyByteArray_AsString() failure.\");\n            }\n            value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr()));\n            return true;\n        }\n\n        return false;\n    }\n\n    template <typename C = CharT>\n    bool load_raw(enable_if_t<!std::is_same<C, char>::value, handle>) {\n        return false;\n    }\n};\n\ntemplate <typename CharT, class Traits, class Allocator>\nstruct type_caster<std::basic_string<CharT, Traits, Allocator>,\n                   enable_if_t<is_std_char_type<CharT>::value>>\n    : string_caster<std::basic_string<CharT, Traits, Allocator>> {};\n\n#ifdef PYBIND11_HAS_STRING_VIEW\ntemplate <typename CharT, class Traits>\nstruct type_caster<std::basic_string_view<CharT, Traits>,\n                   enable_if_t<is_std_char_type<CharT>::value>>\n    : string_caster<std::basic_string_view<CharT, Traits>, true> {};\n#endif\n\n// Type caster for C-style strings.  We basically use a std::string type caster, but also add the\n// ability to use None as a nullptr char* (which the string caster doesn't allow).\ntemplate <typename CharT>\nstruct type_caster<CharT, enable_if_t<is_std_char_type<CharT>::value>> {\n    using StringType = std::basic_string<CharT>;\n    using StringCaster = make_caster<StringType>;\n    StringCaster str_caster;\n    bool none = false;\n    CharT one_char = 0;\n\npublic:\n    bool load(handle src, bool convert) {\n        if (!src) {\n            return false;\n        }\n        if (src.is_none()) {\n            // Defer accepting None to other overloads (if we aren't in convert mode):\n            if (!convert) {\n                return false;\n            }\n            none = true;\n            return true;\n        }\n        return str_caster.load(src, convert);\n    }\n\n    static handle cast(const CharT *src, return_value_policy policy, handle parent) {\n        if (src == nullptr) {\n            return pybind11::none().release();\n        }\n        return StringCaster::cast(StringType(src), policy, parent);\n    }\n\n    static handle cast(CharT src, return_value_policy policy, handle parent) {\n        if (std::is_same<char, CharT>::value) {\n            handle s = PyUnicode_DecodeLatin1((const char *) &src, 1, nullptr);\n            if (!s) {\n                throw error_already_set();\n            }\n            return s;\n        }\n        return StringCaster::cast(StringType(1, src), policy, parent);\n    }\n\n    explicit operator CharT *() {\n        return none ? nullptr : const_cast<CharT *>(static_cast<StringType &>(str_caster).c_str());\n    }\n    explicit operator CharT &() {\n        if (none) {\n            throw value_error(\"Cannot convert None to a character\");\n        }\n\n        auto &value = static_cast<StringType &>(str_caster);\n        size_t str_len = value.size();\n        if (str_len == 0) {\n            throw value_error(\"Cannot convert empty string to a character\");\n        }\n\n        // If we're in UTF-8 mode, we have two possible failures: one for a unicode character that\n        // is too high, and one for multiple unicode characters (caught later), so we need to\n        // figure out how long the first encoded character is in bytes to distinguish between these\n        // two errors.  We also allow want to allow unicode characters U+0080 through U+00FF, as\n        // those can fit into a single char value.\n        if (StringCaster::UTF_N == 8 && str_len > 1 && str_len <= 4) {\n            auto v0 = static_cast<unsigned char>(value[0]);\n            // low bits only: 0-127\n            // 0b110xxxxx - start of 2-byte sequence\n            // 0b1110xxxx - start of 3-byte sequence\n            // 0b11110xxx - start of 4-byte sequence\n            size_t char0_bytes = (v0 & 0x80) == 0      ? 1\n                                 : (v0 & 0xE0) == 0xC0 ? 2\n                                 : (v0 & 0xF0) == 0xE0 ? 3\n                                                       : 4;\n\n            if (char0_bytes == str_len) {\n                // If we have a 128-255 value, we can decode it into a single char:\n                if (char0_bytes == 2 && (v0 & 0xFC) == 0xC0) { // 0x110000xx 0x10xxxxxx\n                    one_char = static_cast<CharT>(((v0 & 3) << 6)\n                                                  + (static_cast<unsigned char>(value[1]) & 0x3F));\n                    return one_char;\n                }\n                // Otherwise we have a single character, but it's > U+00FF\n                throw value_error(\"Character code point not in range(0x100)\");\n            }\n        }\n\n        // UTF-16 is much easier: we can only have a surrogate pair for values above U+FFFF, thus a\n        // surrogate pair with total length 2 instantly indicates a range error (but not a \"your\n        // string was too long\" error).\n        else if (StringCaster::UTF_N == 16 && str_len == 2) {\n            one_char = static_cast<CharT>(value[0]);\n            if (one_char >= 0xD800 && one_char < 0xE000) {\n                throw value_error(\"Character code point not in range(0x10000)\");\n            }\n        }\n\n        if (str_len != 1) {\n            throw value_error(\"Expected a character, but multi-character string found\");\n        }\n\n        one_char = value[0];\n        return one_char;\n    }\n\n    static constexpr auto name = const_name(PYBIND11_STRING_NAME);\n    template <typename _T>\n    using cast_op_type = pybind11::detail::cast_op_type<_T>;\n};\n\n// Base implementation for std::tuple and std::pair\ntemplate <template <typename...> class Tuple, typename... Ts>\nclass tuple_caster {\n    using type = Tuple<Ts...>;\n    static constexpr auto size = sizeof...(Ts);\n    using indices = make_index_sequence<size>;\n\npublic:\n    bool load(handle src, bool convert) {\n        if (!isinstance<sequence>(src)) {\n            return false;\n        }\n        const auto seq = reinterpret_borrow<sequence>(src);\n        if (seq.size() != size) {\n            return false;\n        }\n        return load_impl(seq, convert, indices{});\n    }\n\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        return cast_impl(std::forward<T>(src), policy, parent, indices{});\n    }\n\n    // copied from the PYBIND11_TYPE_CASTER macro\n    template <typename T>\n    static handle cast(T *src, return_value_policy policy, handle parent) {\n        if (!src) {\n            return none().release();\n        }\n        if (policy == return_value_policy::take_ownership) {\n            auto h = cast(std::move(*src), policy, parent);\n            delete src;\n            return h;\n        }\n        return cast(*src, policy, parent);\n    }\n\n    static constexpr auto name\n        = const_name(\"Tuple[\") + concat(make_caster<Ts>::name...) + const_name(\"]\");\n\n    template <typename T>\n    using cast_op_type = type;\n\n    explicit operator type() & { return implicit_cast(indices{}); }\n    explicit operator type() && { return std::move(*this).implicit_cast(indices{}); }\n\nprotected:\n    template <size_t... Is>\n    type implicit_cast(index_sequence<Is...>) & {\n        return type(cast_op<Ts>(std::get<Is>(subcasters))...);\n    }\n    template <size_t... Is>\n    type implicit_cast(index_sequence<Is...>) && {\n        return type(cast_op<Ts>(std::move(std::get<Is>(subcasters)))...);\n    }\n\n    static constexpr bool load_impl(const sequence &, bool, index_sequence<>) { return true; }\n\n    template <size_t... Is>\n    bool load_impl(const sequence &seq, bool convert, index_sequence<Is...>) {\n#ifdef __cpp_fold_expressions\n        if ((... || !std::get<Is>(subcasters).load(seq[Is], convert))) {\n            return false;\n        }\n#else\n        for (bool r : {std::get<Is>(subcasters).load(seq[Is], convert)...}) {\n            if (!r) {\n                return false;\n            }\n        }\n#endif\n        return true;\n    }\n\n    /* Implementation: Convert a C++ tuple into a Python tuple */\n    template <typename T, size_t... Is>\n    static handle\n    cast_impl(T &&src, return_value_policy policy, handle parent, index_sequence<Is...>) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(src, policy, parent);\n        PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(policy, parent);\n        std::array<object, size> entries{{reinterpret_steal<object>(\n            make_caster<Ts>::cast(std::get<Is>(std::forward<T>(src)), policy, parent))...}};\n        for (const auto &entry : entries) {\n            if (!entry) {\n                return handle();\n            }\n        }\n        tuple result(size);\n        int counter = 0;\n        for (auto &entry : entries) {\n            PyTuple_SET_ITEM(result.ptr(), counter++, entry.release().ptr());\n        }\n        return result.release();\n    }\n\n    Tuple<make_caster<Ts>...> subcasters;\n};\n\ntemplate <typename T1, typename T2>\nclass type_caster<std::pair<T1, T2>> : public tuple_caster<std::pair, T1, T2> {};\n\ntemplate <typename... Ts>\nclass type_caster<std::tuple<Ts...>> : public tuple_caster<std::tuple, Ts...> {};\n\n/// Helper class which abstracts away certain actions. Users can provide specializations for\n/// custom holders, but it's only necessary if the type has a non-standard interface.\ntemplate <typename T>\nstruct holder_helper {\n    static auto get(const T &p) -> decltype(p.get()) { return p.get(); }\n};\n\n/// Type caster for holder types like std::shared_ptr, etc.\n/// The SFINAE hook is provided to help work around the current lack of support\n/// for smart-pointer interoperability. Please consider it an implementation\n/// detail that may change in the future, as formal support for smart-pointer\n/// interoperability is added into pybind11.\ntemplate <typename type, typename holder_type, typename SFINAE = void>\nstruct copyable_holder_caster : public type_caster_base<type> {\npublic:\n    using base = type_caster_base<type>;\n    static_assert(std::is_base_of<base, type_caster<type>>::value,\n                  \"Holder classes are only supported for custom types\");\n    using base::base;\n    using base::cast;\n    using base::typeinfo;\n    using base::value;\n\n    bool load(handle src, bool convert) {\n        return base::template load_impl<copyable_holder_caster<type, holder_type>>(src, convert);\n    }\n\n    explicit operator type *() { return this->value; }\n    // static_cast works around compiler error with MSVC 17 and CUDA 10.2\n    // see issue #2180\n    explicit operator type &() { return *(static_cast<type *>(this->value)); }\n    explicit operator holder_type *() { return std::addressof(holder); }\n    explicit operator holder_type &() { return holder; }\n\n    static handle cast(const holder_type &src, return_value_policy, handle) {\n        const auto *ptr = holder_helper<holder_type>::get(src);\n        return type_caster_base<type>::cast_holder(ptr, &src);\n    }\n\nprotected:\n    friend class type_caster_generic;\n    void check_holder_compat() {\n        if (typeinfo->default_holder) {\n            throw cast_error(\"Unable to load a custom holder type from a default-holder instance\");\n        }\n    }\n\n    bool load_value(value_and_holder &&v_h) {\n        if (v_h.holder_constructed()) {\n            value = v_h.value_ptr();\n            holder = v_h.template holder<holder_type>();\n            return true;\n        }\n        throw cast_error(\"Unable to cast from non-held to held instance (T& to Holder<T>) \"\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                         \"(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for \"\n                         \"type information)\");\n#else\n                         \"of type '\"\n                         + type_id<holder_type>() + \"''\");\n#endif\n    }\n\n    template <typename T = holder_type,\n              detail::enable_if_t<!std::is_constructible<T, const T &, type *>::value, int> = 0>\n    bool try_implicit_casts(handle, bool) {\n        return false;\n    }\n\n    template <typename T = holder_type,\n              detail::enable_if_t<std::is_constructible<T, const T &, type *>::value, int> = 0>\n    bool try_implicit_casts(handle src, bool convert) {\n        for (auto &cast : typeinfo->implicit_casts) {\n            copyable_holder_caster sub_caster(*cast.first);\n            if (sub_caster.load(src, convert)) {\n                value = cast.second(sub_caster.value);\n                holder = holder_type(sub_caster.holder, (type *) value);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    static bool try_direct_conversions(handle) { return false; }\n\n    holder_type holder;\n};\n\n/// Specialize for the common std::shared_ptr, so users don't need to\ntemplate <typename T>\nclass type_caster<std::shared_ptr<T>> : public copyable_holder_caster<T, std::shared_ptr<T>> {};\n\n/// Type caster for holder types like std::unique_ptr.\n/// Please consider the SFINAE hook an implementation detail, as explained\n/// in the comment for the copyable_holder_caster.\ntemplate <typename type, typename holder_type, typename SFINAE = void>\nstruct move_only_holder_caster {\n    static_assert(std::is_base_of<type_caster_base<type>, type_caster<type>>::value,\n                  \"Holder classes are only supported for custom types\");\n\n    static handle cast(holder_type &&src, return_value_policy, handle) {\n        auto *ptr = holder_helper<holder_type>::get(src);\n        return type_caster_base<type>::cast_holder(ptr, std::addressof(src));\n    }\n    static constexpr auto name = type_caster_base<type>::name;\n};\n\ntemplate <typename type, typename deleter>\nclass type_caster<std::unique_ptr<type, deleter>>\n    : public move_only_holder_caster<type, std::unique_ptr<type, deleter>> {};\n\ntemplate <typename type, typename holder_type>\nusing type_caster_holder = conditional_t<is_copy_constructible<holder_type>::value,\n                                         copyable_holder_caster<type, holder_type>,\n                                         move_only_holder_caster<type, holder_type>>;\n\ntemplate <typename T, bool Value = false>\nstruct always_construct_holder {\n    static constexpr bool value = Value;\n};\n\n/// Create a specialization for custom holder types (silently ignores std::shared_ptr)\n#define PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type, ...)                                      \\\n    PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)                                                  \\\n    namespace detail {                                                                            \\\n    template <typename type>                                                                      \\\n    struct always_construct_holder<holder_type> : always_construct_holder<void, ##__VA_ARGS__> {  \\\n    };                                                                                            \\\n    template <typename type>                                                                      \\\n    class type_caster<holder_type, enable_if_t<!is_shared_ptr<holder_type>::value>>               \\\n        : public type_caster_holder<type, holder_type> {};                                        \\\n    }                                                                                             \\\n    PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n\n// PYBIND11_DECLARE_HOLDER_TYPE holder types:\ntemplate <typename base, typename holder>\nstruct is_holder_type\n    : std::is_base_of<detail::type_caster_holder<base, holder>, detail::type_caster<holder>> {};\n// Specialization for always-supported unique_ptr holders:\ntemplate <typename base, typename deleter>\nstruct is_holder_type<base, std::unique_ptr<base, deleter>> : std::true_type {};\n\ntemplate <typename T>\nstruct handle_type_name {\n    static constexpr auto name = const_name<T>();\n};\ntemplate <>\nstruct handle_type_name<bool_> {\n    static constexpr auto name = const_name(\"bool\");\n};\ntemplate <>\nstruct handle_type_name<bytes> {\n    static constexpr auto name = const_name(PYBIND11_BYTES_NAME);\n};\ntemplate <>\nstruct handle_type_name<int_> {\n    static constexpr auto name = const_name(\"int\");\n};\ntemplate <>\nstruct handle_type_name<iterable> {\n    static constexpr auto name = const_name(\"Iterable\");\n};\ntemplate <>\nstruct handle_type_name<iterator> {\n    static constexpr auto name = const_name(\"Iterator\");\n};\ntemplate <>\nstruct handle_type_name<float_> {\n    static constexpr auto name = const_name(\"float\");\n};\ntemplate <>\nstruct handle_type_name<none> {\n    static constexpr auto name = const_name(\"None\");\n};\ntemplate <>\nstruct handle_type_name<args> {\n    static constexpr auto name = const_name(\"*args\");\n};\ntemplate <>\nstruct handle_type_name<kwargs> {\n    static constexpr auto name = const_name(\"**kwargs\");\n};\n\ntemplate <typename type>\nstruct pyobject_caster {\n    template <typename T = type, enable_if_t<std::is_same<T, handle>::value, int> = 0>\n    pyobject_caster() : value() {}\n\n    // `type` may not be default constructible (e.g. frozenset, anyset).  Initializing `value`\n    // to a nil handle is safe since it will only be accessed if `load` succeeds.\n    template <typename T = type, enable_if_t<std::is_base_of<object, T>::value, int> = 0>\n    pyobject_caster() : value(reinterpret_steal<type>(handle())) {}\n\n    template <typename T = type, enable_if_t<std::is_same<T, handle>::value, int> = 0>\n    bool load(handle src, bool /* convert */) {\n        value = src;\n        return static_cast<bool>(value);\n    }\n\n    template <typename T = type, enable_if_t<std::is_base_of<object, T>::value, int> = 0>\n    bool load(handle src, bool /* convert */) {\n        if (!isinstance<type>(src)) {\n            return false;\n        }\n        value = reinterpret_borrow<type>(src);\n        return true;\n    }\n\n    static handle cast(const handle &src, return_value_policy /* policy */, handle /* parent */) {\n        return src.inc_ref();\n    }\n    PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name);\n};\n\ntemplate <typename T>\nclass type_caster<T, enable_if_t<is_pyobject<T>::value>> : public pyobject_caster<T> {};\n\n// Our conditions for enabling moving are quite restrictive:\n// At compile time:\n// - T needs to be a non-const, non-pointer, non-reference type\n// - type_caster<T>::operator T&() must exist\n// - the type must be move constructible (obviously)\n// At run-time:\n// - if the type is non-copy-constructible, the object must be the sole owner of the type (i.e. it\n//   must have ref_count() == 1)h\n// If any of the above are not satisfied, we fall back to copying.\ntemplate <typename T>\nusing move_is_plain_type\n    = satisfies_none_of<T, std::is_void, std::is_pointer, std::is_reference, std::is_const>;\ntemplate <typename T, typename SFINAE = void>\nstruct move_always : std::false_type {};\ntemplate <typename T>\nstruct move_always<\n    T,\n    enable_if_t<\n        all_of<move_is_plain_type<T>,\n               negation<is_copy_constructible<T>>,\n               is_move_constructible<T>,\n               std::is_same<decltype(std::declval<make_caster<T>>().operator T &()), T &>>::value>>\n    : std::true_type {};\ntemplate <typename T, typename SFINAE = void>\nstruct move_if_unreferenced : std::false_type {};\ntemplate <typename T>\nstruct move_if_unreferenced<\n    T,\n    enable_if_t<\n        all_of<move_is_plain_type<T>,\n               negation<move_always<T>>,\n               is_move_constructible<T>,\n               std::is_same<decltype(std::declval<make_caster<T>>().operator T &()), T &>>::value>>\n    : std::true_type {};\ntemplate <typename T>\nusing move_never = none_of<move_always<T>, move_if_unreferenced<T>>;\n\n// Detect whether returning a `type` from a cast on type's type_caster is going to result in a\n// reference or pointer to a local variable of the type_caster.  Basically, only\n// non-reference/pointer `type`s and reference/pointers from a type_caster_generic are safe;\n// everything else returns a reference/pointer to a local variable.\ntemplate <typename type>\nusing cast_is_temporary_value_reference\n    = bool_constant<(std::is_reference<type>::value || std::is_pointer<type>::value)\n                    && !std::is_base_of<type_caster_generic, make_caster<type>>::value\n                    && !std::is_same<intrinsic_t<type>, void>::value>;\n\n// When a value returned from a C++ function is being cast back to Python, we almost always want to\n// force `policy = move`, regardless of the return value policy the function/method was declared\n// with.\ntemplate <typename Return, typename SFINAE = void>\nstruct return_value_policy_override {\n    static return_value_policy policy(return_value_policy p) { return p; }\n};\n\ntemplate <typename Return>\nstruct return_value_policy_override<\n    Return,\n    detail::enable_if_t<std::is_base_of<type_caster_generic, make_caster<Return>>::value, void>> {\n    static return_value_policy policy(return_value_policy p) {\n        return !std::is_lvalue_reference<Return>::value && !std::is_pointer<Return>::value\n                   ? return_value_policy::move\n                   : p;\n    }\n};\n\n// Basic python -> C++ casting; throws if casting fails\ntemplate <typename T, typename SFINAE>\ntype_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &handle) {\n    static_assert(!detail::is_pyobject<T>::value,\n                  \"Internal error: type_caster should only be used for C++ types\");\n    if (!conv.load(handle, true)) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n        throw cast_error(\n            \"Unable to cast Python instance of type \"\n            + str(type::handle_of(handle)).cast<std::string>()\n            + \" to C++ type '?' (#define \"\n              \"PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)\");\n#else\n        throw cast_error(\"Unable to cast Python instance of type \"\n                         + str(type::handle_of(handle)).cast<std::string>() + \" to C++ type '\"\n                         + type_id<T>() + \"'\");\n#endif\n    }\n    return conv;\n}\n// Wrapper around the above that also constructs and returns a type_caster\ntemplate <typename T>\nmake_caster<T> load_type(const handle &handle) {\n    make_caster<T> conv;\n    load_type(conv, handle);\n    return conv;\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n// pytype -> C++ type\ntemplate <typename T,\n          detail::enable_if_t<!detail::is_pyobject<T>::value\n                                  && !detail::is_same_ignoring_cvref<T, PyObject *>::value,\n                              int>\n          = 0>\nT cast(const handle &handle) {\n    using namespace detail;\n    static_assert(!cast_is_temporary_value_reference<T>::value,\n                  \"Unable to cast type to reference: value is local to type caster\");\n    return cast_op<T>(load_type<T>(handle));\n}\n\n// pytype -> pytype (calls converting constructor)\ntemplate <typename T, detail::enable_if_t<detail::is_pyobject<T>::value, int> = 0>\nT cast(const handle &handle) {\n    return T(reinterpret_borrow<object>(handle));\n}\n\n// Note that `cast<PyObject *>(obj)` increments the reference count of `obj`.\n// This is necessary for the case that `obj` is a temporary, and could\n// not possibly be different, given\n// 1. the established convention that the passed `handle` is borrowed, and\n// 2. we don't want to force all generic code using `cast<T>()` to special-case\n//    handling of `T` = `PyObject *` (to increment the reference count there).\n// It is the responsibility of the caller to ensure that the reference count\n// is decremented.\ntemplate <typename T,\n          typename Handle,\n          detail::enable_if_t<detail::is_same_ignoring_cvref<T, PyObject *>::value\n                                  && detail::is_same_ignoring_cvref<Handle, handle>::value,\n                              int>\n          = 0>\nT cast(Handle &&handle) {\n    return handle.inc_ref().ptr();\n}\n// To optimize way an inc_ref/dec_ref cycle:\ntemplate <typename T,\n          typename Object,\n          detail::enable_if_t<detail::is_same_ignoring_cvref<T, PyObject *>::value\n                                  && detail::is_same_ignoring_cvref<Object, object>::value,\n                              int>\n          = 0>\nT cast(Object &&obj) {\n    return obj.release().ptr();\n}\n\n// C++ type -> py::object\ntemplate <typename T, detail::enable_if_t<!detail::is_pyobject<T>::value, int> = 0>\nobject cast(T &&value,\n            return_value_policy policy = return_value_policy::automatic_reference,\n            handle parent = handle()) {\n    using no_ref_T = typename std::remove_reference<T>::type;\n    if (policy == return_value_policy::automatic) {\n        policy = std::is_pointer<no_ref_T>::value     ? return_value_policy::take_ownership\n                 : std::is_lvalue_reference<T>::value ? return_value_policy::copy\n                                                      : return_value_policy::move;\n    } else if (policy == return_value_policy::automatic_reference) {\n        policy = std::is_pointer<no_ref_T>::value     ? return_value_policy::reference\n                 : std::is_lvalue_reference<T>::value ? return_value_policy::copy\n                                                      : return_value_policy::move;\n    }\n    return reinterpret_steal<object>(\n        detail::make_caster<T>::cast(std::forward<T>(value), policy, parent));\n}\n\ntemplate <typename T>\nT handle::cast() const {\n    return pybind11::cast<T>(*this);\n}\ntemplate <>\ninline void handle::cast() const {\n    return;\n}\n\ntemplate <typename T>\ndetail::enable_if_t<!detail::move_never<T>::value, T> move(object &&obj) {\n    if (obj.ref_count() > 1) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n        throw cast_error(\n            \"Unable to cast Python \" + str(type::handle_of(obj)).cast<std::string>()\n            + \" instance to C++ rvalue: instance has multiple references\"\n              \" (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)\");\n#else\n        throw cast_error(\"Unable to move from Python \"\n                         + str(type::handle_of(obj)).cast<std::string>() + \" instance to C++ \"\n                         + type_id<T>() + \" instance: instance has multiple references\");\n#endif\n    }\n\n    // Move into a temporary and return that, because the reference may be a local value of `conv`\n    T ret = std::move(detail::load_type<T>(obj).operator T &());\n    return ret;\n}\n\n// Calling cast() on an rvalue calls pybind11::cast with the object rvalue, which does:\n// - If we have to move (because T has no copy constructor), do it.  This will fail if the moved\n//   object has multiple references, but trying to copy will fail to compile.\n// - If both movable and copyable, check ref count: if 1, move; otherwise copy\n// - Otherwise (not movable), copy.\ntemplate <typename T>\ndetail::enable_if_t<!detail::is_pyobject<T>::value && detail::move_always<T>::value, T>\ncast(object &&object) {\n    return move<T>(std::move(object));\n}\ntemplate <typename T>\ndetail::enable_if_t<!detail::is_pyobject<T>::value && detail::move_if_unreferenced<T>::value, T>\ncast(object &&object) {\n    if (object.ref_count() > 1) {\n        return cast<T>(object);\n    }\n    return move<T>(std::move(object));\n}\ntemplate <typename T>\ndetail::enable_if_t<!detail::is_pyobject<T>::value && detail::move_never<T>::value, T>\ncast(object &&object) {\n    return cast<T>(object);\n}\n\n// pytype rvalue -> pytype (calls converting constructor)\ntemplate <typename T>\ndetail::enable_if_t<detail::is_pyobject<T>::value, T> cast(object &&object) {\n    return T(std::move(object));\n}\n\ntemplate <typename T>\nT object::cast() const & {\n    return pybind11::cast<T>(*this);\n}\ntemplate <typename T>\nT object::cast() && {\n    return pybind11::cast<T>(std::move(*this));\n}\ntemplate <>\ninline void object::cast() const & {\n    return;\n}\ntemplate <>\ninline void object::cast() && {\n    return;\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Declared in pytypes.h:\ntemplate <typename T, enable_if_t<!is_pyobject<T>::value, int>>\nobject object_or_cast(T &&o) {\n    return pybind11::cast(std::forward<T>(o));\n}\n\n// Placeholder type for the unneeded (and dead code) static variable in the\n// PYBIND11_OVERRIDE_OVERRIDE macro\nstruct override_unused {};\ntemplate <typename ret_type>\nusing override_caster_t = conditional_t<cast_is_temporary_value_reference<ret_type>::value,\n                                        make_caster<ret_type>,\n                                        override_unused>;\n\n// Trampoline use: for reference/pointer types to value-converted values, we do a value cast, then\n// store the result in the given variable.  For other types, this is a no-op.\ntemplate <typename T>\nenable_if_t<cast_is_temporary_value_reference<T>::value, T> cast_ref(object &&o,\n                                                                     make_caster<T> &caster) {\n    return cast_op<T>(load_type(caster, o));\n}\ntemplate <typename T>\nenable_if_t<!cast_is_temporary_value_reference<T>::value, T> cast_ref(object &&,\n                                                                      override_unused &) {\n    pybind11_fail(\"Internal error: cast_ref fallback invoked\");\n}\n\n// Trampoline use: Having a pybind11::cast with an invalid reference type is going to\n// static_assert, even though if it's in dead code, so we provide a \"trampoline\" to pybind11::cast\n// that only does anything in cases where pybind11::cast is valid.\ntemplate <typename T>\nenable_if_t<cast_is_temporary_value_reference<T>::value, T> cast_safe(object &&) {\n    pybind11_fail(\"Internal error: cast_safe fallback invoked\");\n}\ntemplate <typename T>\nenable_if_t<std::is_void<T>::value, void> cast_safe(object &&) {}\ntemplate <typename T>\nenable_if_t<detail::none_of<cast_is_temporary_value_reference<T>, std::is_void<T>>::value, T>\ncast_safe(object &&o) {\n    return pybind11::cast<T>(std::move(o));\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n// The overloads could coexist, i.e. the #if is not strictly speaking needed,\n// but it is an easy minor optimization.\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\ninline cast_error cast_error_unable_to_convert_call_arg(const std::string &name) {\n    return cast_error(\"Unable to convert call argument '\" + name\n                      + \"' to Python object (#define \"\n                        \"PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)\");\n}\n#else\ninline cast_error cast_error_unable_to_convert_call_arg(const std::string &name,\n                                                        const std::string &type) {\n    return cast_error(\"Unable to convert call argument '\" + name + \"' of type '\" + type\n                      + \"' to Python object\");\n}\n#endif\n\ntemplate <return_value_policy policy = return_value_policy::automatic_reference>\ntuple make_tuple() {\n    return tuple(0);\n}\n\ntemplate <return_value_policy policy = return_value_policy::automatic_reference, typename... Args>\ntuple make_tuple(Args &&...args_) {\n    constexpr size_t size = sizeof...(Args);\n    std::array<object, size> args{{reinterpret_steal<object>(\n        detail::make_caster<Args>::cast(std::forward<Args>(args_), policy, nullptr))...}};\n    for (size_t i = 0; i < args.size(); i++) {\n        if (!args[i]) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            throw cast_error_unable_to_convert_call_arg(std::to_string(i));\n#else\n            std::array<std::string, size> argtypes{{type_id<Args>()...}};\n            throw cast_error_unable_to_convert_call_arg(std::to_string(i), argtypes[i]);\n#endif\n        }\n    }\n    tuple result(size);\n    int counter = 0;\n    for (auto &arg_value : args) {\n        PyTuple_SET_ITEM(result.ptr(), counter++, arg_value.release().ptr());\n    }\n    return result;\n}\n\n/// \\ingroup annotations\n/// Annotation for arguments\nstruct arg {\n    /// Constructs an argument with the name of the argument; if null or omitted, this is a\n    /// positional argument.\n    constexpr explicit arg(const char *name = nullptr)\n        : name(name), flag_noconvert(false), flag_none(true) {}\n    /// Assign a value to this argument\n    template <typename T>\n    arg_v operator=(T &&value) const;\n    /// Indicate that the type should not be converted in the type caster\n    arg &noconvert(bool flag = true) {\n        flag_noconvert = flag;\n        return *this;\n    }\n    /// Indicates that the argument should/shouldn't allow None (e.g. for nullable pointer args)\n    arg &none(bool flag = true) {\n        flag_none = flag;\n        return *this;\n    }\n\n    const char *name;        ///< If non-null, this is a named kwargs argument\n    bool flag_noconvert : 1; ///< If set, do not allow conversion (requires a supporting type\n                             ///< caster!)\n    bool flag_none : 1;      ///< If set (the default), allow None to be passed to this argument\n};\n\n/// \\ingroup annotations\n/// Annotation for arguments with values\nstruct arg_v : arg {\nprivate:\n    template <typename T>\n    arg_v(arg &&base, T &&x, const char *descr = nullptr)\n        : arg(base), value(reinterpret_steal<object>(detail::make_caster<T>::cast(\n                         std::forward<T>(x), return_value_policy::automatic, {}))),\n          descr(descr)\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n          ,\n          type(type_id<T>())\n#endif\n    {\n        // Workaround! See:\n        // https://github.com/pybind/pybind11/issues/2336\n        // https://github.com/pybind/pybind11/pull/2685#issuecomment-731286700\n        if (PyErr_Occurred()) {\n            PyErr_Clear();\n        }\n    }\n\npublic:\n    /// Direct construction with name, default, and description\n    template <typename T>\n    arg_v(const char *name, T &&x, const char *descr = nullptr)\n        : arg_v(arg(name), std::forward<T>(x), descr) {}\n\n    /// Called internally when invoking `py::arg(\"a\") = value`\n    template <typename T>\n    arg_v(const arg &base, T &&x, const char *descr = nullptr)\n        : arg_v(arg(base), std::forward<T>(x), descr) {}\n\n    /// Same as `arg::noconvert()`, but returns *this as arg_v&, not arg&\n    arg_v &noconvert(bool flag = true) {\n        arg::noconvert(flag);\n        return *this;\n    }\n\n    /// Same as `arg::nonone()`, but returns *this as arg_v&, not arg&\n    arg_v &none(bool flag = true) {\n        arg::none(flag);\n        return *this;\n    }\n\n    /// The default value\n    object value;\n    /// The (optional) description of the default value\n    const char *descr;\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n    /// The C++ type name of the default value (only available when compiled in debug mode)\n    std::string type;\n#endif\n};\n\n/// \\ingroup annotations\n/// Annotation indicating that all following arguments are keyword-only; the is the equivalent of\n/// an unnamed '*' argument\nstruct kw_only {};\n\n/// \\ingroup annotations\n/// Annotation indicating that all previous arguments are positional-only; the is the equivalent of\n/// an unnamed '/' argument (in Python 3.8)\nstruct pos_only {};\n\ntemplate <typename T>\narg_v arg::operator=(T &&value) const {\n    return {*this, std::forward<T>(value)};\n}\n\n/// Alias for backward compatibility -- to be removed in version 2.0\ntemplate <typename /*unused*/>\nusing arg_t = arg_v;\n\ninline namespace literals {\n/** \\rst\n    String literal version of `arg`\n \\endrst */\nconstexpr arg operator\"\" _a(const char *name, size_t) { return arg(name); }\n} // namespace literals\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename T>\nusing is_kw_only = std::is_same<intrinsic_t<T>, kw_only>;\ntemplate <typename T>\nusing is_pos_only = std::is_same<intrinsic_t<T>, pos_only>;\n\n// forward declaration (definition in attr.h)\nstruct function_record;\n\n/// Internal data associated with a single function call\nstruct function_call {\n    function_call(const function_record &f, handle p); // Implementation in attr.h\n\n    /// The function data:\n    const function_record &func;\n\n    /// Arguments passed to the function:\n    std::vector<handle> args;\n\n    /// The `convert` value the arguments should be loaded with\n    std::vector<bool> args_convert;\n\n    /// Extra references for the optional `py::args` and/or `py::kwargs` arguments (which, if\n    /// present, are also in `args` but without a reference).\n    object args_ref, kwargs_ref;\n\n    /// The parent, if any\n    handle parent;\n\n    /// If this is a call to an initializer, this argument contains `self`\n    handle init_self;\n};\n\n/// Helper class which loads arguments for C++ functions called from Python\ntemplate <typename... Args>\nclass argument_loader {\n    using indices = make_index_sequence<sizeof...(Args)>;\n\n    template <typename Arg>\n    using argument_is_args = std::is_same<intrinsic_t<Arg>, args>;\n    template <typename Arg>\n    using argument_is_kwargs = std::is_same<intrinsic_t<Arg>, kwargs>;\n    // Get kwargs argument position, or -1 if not present:\n    static constexpr auto kwargs_pos = constexpr_last<argument_is_kwargs, Args...>();\n\n    static_assert(kwargs_pos == -1 || kwargs_pos == (int) sizeof...(Args) - 1,\n                  \"py::kwargs is only permitted as the last argument of a function\");\n\npublic:\n    static constexpr bool has_kwargs = kwargs_pos != -1;\n\n    // py::args argument position; -1 if not present.\n    static constexpr int args_pos = constexpr_last<argument_is_args, Args...>();\n\n    static_assert(args_pos == -1 || args_pos == constexpr_first<argument_is_args, Args...>(),\n                  \"py::args cannot be specified more than once\");\n\n    static constexpr auto arg_names = concat(type_descr(make_caster<Args>::name)...);\n\n    bool load_args(function_call &call) { return load_impl_sequence(call, indices{}); }\n\n    template <typename Return, typename Guard, typename Func>\n    // NOLINTNEXTLINE(readability-const-return-type)\n    enable_if_t<!std::is_void<Return>::value, Return> call(Func &&f) && {\n        return std::move(*this).template call_impl<remove_cv_t<Return>>(\n            std::forward<Func>(f), indices{}, Guard{});\n    }\n\n    template <typename Return, typename Guard, typename Func>\n    enable_if_t<std::is_void<Return>::value, void_type> call(Func &&f) && {\n        std::move(*this).template call_impl<remove_cv_t<Return>>(\n            std::forward<Func>(f), indices{}, Guard{});\n        return void_type();\n    }\n\nprivate:\n    static bool load_impl_sequence(function_call &, index_sequence<>) { return true; }\n\n    template <size_t... Is>\n    bool load_impl_sequence(function_call &call, index_sequence<Is...>) {\n#ifdef __cpp_fold_expressions\n        if ((... || !std::get<Is>(argcasters).load(call.args[Is], call.args_convert[Is]))) {\n            return false;\n        }\n#else\n        for (bool r : {std::get<Is>(argcasters).load(call.args[Is], call.args_convert[Is])...}) {\n            if (!r) {\n                return false;\n            }\n        }\n#endif\n        return true;\n    }\n\n    template <typename Return, typename Func, size_t... Is, typename Guard>\n    Return call_impl(Func &&f, index_sequence<Is...>, Guard &&) && {\n        return std::forward<Func>(f)(cast_op<Args>(std::move(std::get<Is>(argcasters)))...);\n    }\n\n    std::tuple<make_caster<Args>...> argcasters;\n};\n\n/// Helper class which collects only positional arguments for a Python function call.\n/// A fancier version below can collect any argument, but this one is optimal for simple calls.\ntemplate <return_value_policy policy>\nclass simple_collector {\npublic:\n    template <typename... Ts>\n    explicit simple_collector(Ts &&...values)\n        : m_args(pybind11::make_tuple<policy>(std::forward<Ts>(values)...)) {}\n\n    const tuple &args() const & { return m_args; }\n    dict kwargs() const { return {}; }\n\n    tuple args() && { return std::move(m_args); }\n\n    /// Call a Python function and pass the collected arguments\n    object call(PyObject *ptr) const {\n        PyObject *result = PyObject_CallObject(ptr, m_args.ptr());\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<object>(result);\n    }\n\nprivate:\n    tuple m_args;\n};\n\n/// Helper class which collects positional, keyword, * and ** arguments for a Python function call\ntemplate <return_value_policy policy>\nclass unpacking_collector {\npublic:\n    template <typename... Ts>\n    explicit unpacking_collector(Ts &&...values) {\n        // Tuples aren't (easily) resizable so a list is needed for collection,\n        // but the actual function call strictly requires a tuple.\n        auto args_list = list();\n        using expander = int[];\n        (void) expander{0, (process(args_list, std::forward<Ts>(values)), 0)...};\n\n        m_args = std::move(args_list);\n    }\n\n    const tuple &args() const & { return m_args; }\n    const dict &kwargs() const & { return m_kwargs; }\n\n    tuple args() && { return std::move(m_args); }\n    dict kwargs() && { return std::move(m_kwargs); }\n\n    /// Call a Python function and pass the collected arguments\n    object call(PyObject *ptr) const {\n        PyObject *result = PyObject_Call(ptr, m_args.ptr(), m_kwargs.ptr());\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<object>(result);\n    }\n\nprivate:\n    template <typename T>\n    void process(list &args_list, T &&x) {\n        auto o = reinterpret_steal<object>(\n            detail::make_caster<T>::cast(std::forward<T>(x), policy, {}));\n        if (!o) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            throw cast_error_unable_to_convert_call_arg(std::to_string(args_list.size()));\n#else\n            throw cast_error_unable_to_convert_call_arg(std::to_string(args_list.size()),\n                                                        type_id<T>());\n#endif\n        }\n        args_list.append(std::move(o));\n    }\n\n    void process(list &args_list, detail::args_proxy ap) {\n        for (auto a : ap) {\n            args_list.append(a);\n        }\n    }\n\n    void process(list & /*args_list*/, arg_v a) {\n        if (!a.name) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            nameless_argument_error();\n#else\n            nameless_argument_error(a.type);\n#endif\n        }\n        if (m_kwargs.contains(a.name)) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            multiple_values_error();\n#else\n            multiple_values_error(a.name);\n#endif\n        }\n        if (!a.value) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            throw cast_error_unable_to_convert_call_arg(a.name);\n#else\n            throw cast_error_unable_to_convert_call_arg(a.name, a.type);\n#endif\n        }\n        m_kwargs[a.name] = std::move(a.value);\n    }\n\n    void process(list & /*args_list*/, detail::kwargs_proxy kp) {\n        if (!kp) {\n            return;\n        }\n        for (auto k : reinterpret_borrow<dict>(kp)) {\n            if (m_kwargs.contains(k.first)) {\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                multiple_values_error();\n#else\n                multiple_values_error(str(k.first));\n#endif\n            }\n            m_kwargs[k.first] = k.second;\n        }\n    }\n\n    [[noreturn]] static void nameless_argument_error() {\n        throw type_error(\n            \"Got kwargs without a name; only named arguments \"\n            \"may be passed via py::arg() to a python function call. \"\n            \"(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)\");\n    }\n    [[noreturn]] static void nameless_argument_error(const std::string &type) {\n        throw type_error(\"Got kwargs without a name of type '\" + type\n                         + \"'; only named \"\n                           \"arguments may be passed via py::arg() to a python function call. \");\n    }\n    [[noreturn]] static void multiple_values_error() {\n        throw type_error(\n            \"Got multiple values for keyword argument \"\n            \"(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)\");\n    }\n\n    [[noreturn]] static void multiple_values_error(const std::string &name) {\n        throw type_error(\"Got multiple values for keyword argument '\" + name + \"'\");\n    }\n\nprivate:\n    tuple m_args;\n    dict m_kwargs;\n};\n\n// [workaround(intel)] Separate function required here\n// We need to put this into a separate function because the Intel compiler\n// fails to compile enable_if_t<!all_of<is_positional<Args>...>::value>\n// (tested with ICC 2021.1 Beta 20200827).\ntemplate <typename... Args>\nconstexpr bool args_are_all_positional() {\n    return all_of<is_positional<Args>...>::value;\n}\n\n/// Collect only positional arguments for a Python function call\ntemplate <return_value_policy policy,\n          typename... Args,\n          typename = enable_if_t<args_are_all_positional<Args...>()>>\nsimple_collector<policy> collect_arguments(Args &&...args) {\n    return simple_collector<policy>(std::forward<Args>(args)...);\n}\n\n/// Collect all arguments, including keywords and unpacking (only instantiated when needed)\ntemplate <return_value_policy policy,\n          typename... Args,\n          typename = enable_if_t<!args_are_all_positional<Args...>()>>\nunpacking_collector<policy> collect_arguments(Args &&...args) {\n    // Following argument order rules for generalized unpacking according to PEP 448\n    static_assert(constexpr_last<is_positional, Args...>()\n                          < constexpr_first<is_keyword_or_ds, Args...>()\n                      && constexpr_last<is_s_unpacking, Args...>()\n                             < constexpr_first<is_ds_unpacking, Args...>(),\n                  \"Invalid function call: positional args must precede keywords and ** unpacking; \"\n                  \"* unpacking must precede ** unpacking\");\n    return unpacking_collector<policy>(std::forward<Args>(args)...);\n}\n\ntemplate <typename Derived>\ntemplate <return_value_policy policy, typename... Args>\nobject object_api<Derived>::operator()(Args &&...args) const {\n#ifndef NDEBUG\n    if (!PyGILState_Check()) {\n        pybind11_fail(\"pybind11::object_api<>::operator() PyGILState_Check() failure.\");\n    }\n#endif\n    return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());\n}\n\ntemplate <typename Derived>\ntemplate <return_value_policy policy, typename... Args>\nobject object_api<Derived>::call(Args &&...args) const {\n    return operator()<policy>(std::forward<Args>(args)...);\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\ntemplate <typename T>\nhandle type::handle_of() {\n    static_assert(std::is_base_of<detail::type_caster_generic, detail::make_caster<T>>::value,\n                  \"py::type::of<T> only supports the case where T is a registered C++ types.\");\n\n    return detail::get_type_handle(typeid(T), true);\n}\n\n#define PYBIND11_MAKE_OPAQUE(...)                                                                 \\\n    PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)                                                  \\\n    namespace detail {                                                                            \\\n    template <>                                                                                   \\\n    class type_caster<__VA_ARGS__> : public type_caster_base<__VA_ARGS__> {};                     \\\n    }                                                                                             \\\n    PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n\n/// Lets you pass a type containing a `,` through a macro parameter without needing a separate\n/// typedef, e.g.:\n/// `PYBIND11_OVERRIDE(PYBIND11_TYPE(ReturnType<A, B>), PYBIND11_TYPE(Parent<C, D>), f, arg)`\n#define PYBIND11_TYPE(...) __VA_ARGS__\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/chrono.h",
    "content": "/*\n    pybind11/chrono.h: Transparent conversion between std::chrono and python's datetime\n\n    Copyright (c) 2016 Trent Houliston <trent@houliston.me> and\n                       Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\n#include <chrono>\n#include <cmath>\n#include <ctime>\n#include <datetime.h>\n#include <mutex>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename type>\nclass duration_caster {\npublic:\n    using rep = typename type::rep;\n    using period = typename type::period;\n\n    // signed 25 bits required by the standard.\n    using days = std::chrono::duration<int_least32_t, std::ratio<86400>>;\n\n    bool load(handle src, bool) {\n        using namespace std::chrono;\n\n        // Lazy initialise the PyDateTime import\n        if (!PyDateTimeAPI) {\n            PyDateTime_IMPORT;\n        }\n\n        if (!src) {\n            return false;\n        }\n        // If invoked with datetime.delta object\n        if (PyDelta_Check(src.ptr())) {\n            value = type(duration_cast<duration<rep, period>>(\n                days(PyDateTime_DELTA_GET_DAYS(src.ptr()))\n                + seconds(PyDateTime_DELTA_GET_SECONDS(src.ptr()))\n                + microseconds(PyDateTime_DELTA_GET_MICROSECONDS(src.ptr()))));\n            return true;\n        }\n        // If invoked with a float we assume it is seconds and convert\n        if (PyFloat_Check(src.ptr())) {\n            value = type(duration_cast<duration<rep, period>>(\n                duration<double>(PyFloat_AsDouble(src.ptr()))));\n            return true;\n        }\n        return false;\n    }\n\n    // If this is a duration just return it back\n    static const std::chrono::duration<rep, period> &\n    get_duration(const std::chrono::duration<rep, period> &src) {\n        return src;\n    }\n\n    // If this is a time_point get the time_since_epoch\n    template <typename Clock>\n    static std::chrono::duration<rep, period>\n    get_duration(const std::chrono::time_point<Clock, std::chrono::duration<rep, period>> &src) {\n        return src.time_since_epoch();\n    }\n\n    static handle cast(const type &src, return_value_policy /* policy */, handle /* parent */) {\n        using namespace std::chrono;\n\n        // Use overloaded function to get our duration from our source\n        // Works out if it is a duration or time_point and get the duration\n        auto d = get_duration(src);\n\n        // Lazy initialise the PyDateTime import\n        if (!PyDateTimeAPI) {\n            PyDateTime_IMPORT;\n        }\n\n        // Declare these special duration types so the conversions happen with the correct\n        // primitive types (int)\n        using dd_t = duration<int, std::ratio<86400>>;\n        using ss_t = duration<int, std::ratio<1>>;\n        using us_t = duration<int, std::micro>;\n\n        auto dd = duration_cast<dd_t>(d);\n        auto subd = d - dd;\n        auto ss = duration_cast<ss_t>(subd);\n        auto us = duration_cast<us_t>(subd - ss);\n        return PyDelta_FromDSU(dd.count(), ss.count(), us.count());\n    }\n\n    PYBIND11_TYPE_CASTER(type, const_name(\"datetime.timedelta\"));\n};\n\ninline std::tm *localtime_thread_safe(const std::time_t *time, std::tm *buf) {\n#if (defined(__STDC_LIB_EXT1__) && defined(__STDC_WANT_LIB_EXT1__)) || defined(_MSC_VER)\n    if (localtime_s(buf, time))\n        return nullptr;\n    return buf;\n#else\n    static std::mutex mtx;\n    std::lock_guard<std::mutex> lock(mtx);\n    std::tm *tm_ptr = std::localtime(time);\n    if (tm_ptr != nullptr) {\n        *buf = *tm_ptr;\n    }\n    return tm_ptr;\n#endif\n}\n\n// This is for casting times on the system clock into datetime.datetime instances\ntemplate <typename Duration>\nclass type_caster<std::chrono::time_point<std::chrono::system_clock, Duration>> {\npublic:\n    using type = std::chrono::time_point<std::chrono::system_clock, Duration>;\n    bool load(handle src, bool) {\n        using namespace std::chrono;\n\n        // Lazy initialise the PyDateTime import\n        if (!PyDateTimeAPI) {\n            PyDateTime_IMPORT;\n        }\n\n        if (!src) {\n            return false;\n        }\n\n        std::tm cal;\n        microseconds msecs;\n\n        if (PyDateTime_Check(src.ptr())) {\n            cal.tm_sec = PyDateTime_DATE_GET_SECOND(src.ptr());\n            cal.tm_min = PyDateTime_DATE_GET_MINUTE(src.ptr());\n            cal.tm_hour = PyDateTime_DATE_GET_HOUR(src.ptr());\n            cal.tm_mday = PyDateTime_GET_DAY(src.ptr());\n            cal.tm_mon = PyDateTime_GET_MONTH(src.ptr()) - 1;\n            cal.tm_year = PyDateTime_GET_YEAR(src.ptr()) - 1900;\n            cal.tm_isdst = -1;\n            msecs = microseconds(PyDateTime_DATE_GET_MICROSECOND(src.ptr()));\n        } else if (PyDate_Check(src.ptr())) {\n            cal.tm_sec = 0;\n            cal.tm_min = 0;\n            cal.tm_hour = 0;\n            cal.tm_mday = PyDateTime_GET_DAY(src.ptr());\n            cal.tm_mon = PyDateTime_GET_MONTH(src.ptr()) - 1;\n            cal.tm_year = PyDateTime_GET_YEAR(src.ptr()) - 1900;\n            cal.tm_isdst = -1;\n            msecs = microseconds(0);\n        } else if (PyTime_Check(src.ptr())) {\n            cal.tm_sec = PyDateTime_TIME_GET_SECOND(src.ptr());\n            cal.tm_min = PyDateTime_TIME_GET_MINUTE(src.ptr());\n            cal.tm_hour = PyDateTime_TIME_GET_HOUR(src.ptr());\n            cal.tm_mday = 1;  // This date (day, month, year) = (1, 0, 70)\n            cal.tm_mon = 0;   // represents 1-Jan-1970, which is the first\n            cal.tm_year = 70; // earliest available date for Python's datetime\n            cal.tm_isdst = -1;\n            msecs = microseconds(PyDateTime_TIME_GET_MICROSECOND(src.ptr()));\n        } else {\n            return false;\n        }\n\n        value = time_point_cast<Duration>(system_clock::from_time_t(std::mktime(&cal)) + msecs);\n        return true;\n    }\n\n    static handle cast(const std::chrono::time_point<std::chrono::system_clock, Duration> &src,\n                       return_value_policy /* policy */,\n                       handle /* parent */) {\n        using namespace std::chrono;\n\n        // Lazy initialise the PyDateTime import\n        if (!PyDateTimeAPI) {\n            PyDateTime_IMPORT;\n        }\n\n        // Get out microseconds, and make sure they are positive, to avoid bug in eastern\n        // hemisphere time zones (cfr. https://github.com/pybind/pybind11/issues/2417)\n        using us_t = duration<int, std::micro>;\n        auto us = duration_cast<us_t>(src.time_since_epoch() % seconds(1));\n        if (us.count() < 0) {\n            us += seconds(1);\n        }\n\n        // Subtract microseconds BEFORE `system_clock::to_time_t`, because:\n        // > If std::time_t has lower precision, it is implementation-defined whether the value is\n        // rounded or truncated. (https://en.cppreference.com/w/cpp/chrono/system_clock/to_time_t)\n        std::time_t tt\n            = system_clock::to_time_t(time_point_cast<system_clock::duration>(src - us));\n\n        std::tm localtime;\n        std::tm *localtime_ptr = localtime_thread_safe(&tt, &localtime);\n        if (!localtime_ptr) {\n            throw cast_error(\"Unable to represent system_clock in local time\");\n        }\n        return PyDateTime_FromDateAndTime(localtime.tm_year + 1900,\n                                          localtime.tm_mon + 1,\n                                          localtime.tm_mday,\n                                          localtime.tm_hour,\n                                          localtime.tm_min,\n                                          localtime.tm_sec,\n                                          us.count());\n    }\n    PYBIND11_TYPE_CASTER(type, const_name(\"datetime.datetime\"));\n};\n\n// Other clocks that are not the system clock are not measured as datetime.datetime objects\n// since they are not measured on calendar time. So instead we just make them timedeltas\n// Or if they have passed us a time as a float we convert that\ntemplate <typename Clock, typename Duration>\nclass type_caster<std::chrono::time_point<Clock, Duration>>\n    : public duration_caster<std::chrono::time_point<Clock, Duration>> {};\n\ntemplate <typename Rep, typename Period>\nclass type_caster<std::chrono::duration<Rep, Period>>\n    : public duration_caster<std::chrono::duration<Rep, Period>> {};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/common.h",
    "content": "#include \"detail/common.h\"\n#warning \"Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'.\"\n"
  },
  {
    "path": "modules/juce_python/pybind11/complex.h",
    "content": "/*\n    pybind11/complex.h: Complex number support\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\n#include <complex>\n\n/// glibc defines I as a macro which breaks things, e.g., boost template names\n#ifdef I\n#    undef I\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\ntemplate <typename T>\nstruct format_descriptor<std::complex<T>, detail::enable_if_t<std::is_floating_point<T>::value>> {\n    static constexpr const char c = format_descriptor<T>::c;\n    static constexpr const char value[3] = {'Z', c, '\\0'};\n    static std::string format() { return std::string(value); }\n};\n\n#ifndef PYBIND11_CPP17\n\ntemplate <typename T>\nconstexpr const char\n    format_descriptor<std::complex<T>,\n                      detail::enable_if_t<std::is_floating_point<T>::value>>::value[3];\n\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename T>\nstruct is_fmt_numeric<std::complex<T>, detail::enable_if_t<std::is_floating_point<T>::value>> {\n    static constexpr bool value = true;\n    static constexpr int index = is_fmt_numeric<T>::index + 3;\n};\n\ntemplate <typename T>\nclass type_caster<std::complex<T>> {\npublic:\n    bool load(handle src, bool convert) {\n        if (!src) {\n            return false;\n        }\n        if (!convert && !PyComplex_Check(src.ptr())) {\n            return false;\n        }\n        Py_complex result = PyComplex_AsCComplex(src.ptr());\n        if (result.real == -1.0 && PyErr_Occurred()) {\n            PyErr_Clear();\n            return false;\n        }\n        value = std::complex<T>((T) result.real, (T) result.imag);\n        return true;\n    }\n\n    static handle\n    cast(const std::complex<T> &src, return_value_policy /* policy */, handle /* parent */) {\n        return PyComplex_FromDoubles((double) src.real(), (double) src.imag());\n    }\n\n    PYBIND11_TYPE_CASTER(std::complex<T>, const_name(\"complex\"));\n};\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/class.h",
    "content": "/*\n    pybind11/detail/class.h: Python C API implementation details for py::class_\n\n    Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"../attr.h\"\n#include \"../options.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n#if !defined(PYPY_VERSION)\n#    define PYBIND11_BUILTIN_QUALNAME\n#    define PYBIND11_SET_OLDPY_QUALNAME(obj, nameobj)\n#else\n// In PyPy, we still set __qualname__ so that we can produce reliable function type\n// signatures; in CPython this macro expands to nothing:\n#    define PYBIND11_SET_OLDPY_QUALNAME(obj, nameobj)                                             \\\n        setattr((PyObject *) obj, \"__qualname__\", nameobj)\n#endif\n\ninline std::string get_fully_qualified_tp_name(PyTypeObject *type) {\n#if !defined(PYPY_VERSION)\n    return type->tp_name;\n#else\n    auto module_name = handle((PyObject *) type).attr(\"__module__\").cast<std::string>();\n    if (module_name == PYBIND11_BUILTINS_MODULE)\n        return type->tp_name;\n    else\n        return std::move(module_name) + \".\" + type->tp_name;\n#endif\n}\n\ninline PyTypeObject *type_incref(PyTypeObject *type) {\n    Py_INCREF(type);\n    return type;\n}\n\n#if !defined(PYPY_VERSION)\n\n/// `pybind11_static_property.__get__()`: Always pass the class instead of the instance.\nextern \"C\" inline PyObject *pybind11_static_get(PyObject *self, PyObject * /*ob*/, PyObject *cls) {\n    return PyProperty_Type.tp_descr_get(self, cls, cls);\n}\n\n/// `pybind11_static_property.__set__()`: Just like the above `__get__()`.\nextern \"C\" inline int pybind11_static_set(PyObject *self, PyObject *obj, PyObject *value) {\n    PyObject *cls = PyType_Check(obj) ? obj : (PyObject *) Py_TYPE(obj);\n    return PyProperty_Type.tp_descr_set(self, cls, value);\n}\n\n// Forward declaration to use in `make_static_property_type()`\ninline void enable_dynamic_attributes(PyHeapTypeObject *heap_type);\n\n/** A `static_property` is the same as a `property` but the `__get__()` and `__set__()`\n    methods are modified to always use the object type instead of a concrete instance.\n    Return value: New reference. */\ninline PyTypeObject *make_static_property_type() {\n    constexpr auto *name = \"pybind11_static_property\";\n    auto name_obj = reinterpret_steal<object>(PYBIND11_FROM_STRING(name));\n\n    /* Danger zone: from now (and until PyType_Ready), make sure to\n       issue no Python C API calls which could potentially invoke the\n       garbage collector (the GC will call type_traverse(), which will in\n       turn find the newly constructed type in an invalid state) */\n    auto *heap_type = (PyHeapTypeObject *) PyType_Type.tp_alloc(&PyType_Type, 0);\n    if (!heap_type) {\n        pybind11_fail(\"make_static_property_type(): error allocating type!\");\n    }\n\n    heap_type->ht_name = name_obj.inc_ref().ptr();\n#    ifdef PYBIND11_BUILTIN_QUALNAME\n    heap_type->ht_qualname = name_obj.inc_ref().ptr();\n#    endif\n\n    auto *type = &heap_type->ht_type;\n    type->tp_name = name;\n    type->tp_base = type_incref(&PyProperty_Type);\n    type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HEAPTYPE;\n    type->tp_descr_get = pybind11_static_get;\n    type->tp_descr_set = pybind11_static_set;\n\n    if (PyType_Ready(type) < 0) {\n        pybind11_fail(\"make_static_property_type(): failure in PyType_Ready()!\");\n    }\n\n#    if PY_VERSION_HEX >= 0x030C0000\n    // PRE 3.12 FEATURE FREEZE. PLEASE REVIEW AFTER FREEZE.\n    // Since Python-3.12 property-derived types are required to\n    // have dynamic attributes (to set `__doc__`)\n    enable_dynamic_attributes(heap_type);\n#    endif\n\n    setattr((PyObject *) type, \"__module__\", str(\"pybind11_builtins\"));\n    PYBIND11_SET_OLDPY_QUALNAME(type, name_obj);\n\n    return type;\n}\n\n#else // PYPY\n\n/** PyPy has some issues with the above C API, so we evaluate Python code instead.\n    This function will only be called once so performance isn't really a concern.\n    Return value: New reference. */\ninline PyTypeObject *make_static_property_type() {\n    auto d = dict();\n    PyObject *result = PyRun_String(R\"(\\\nclass pybind11_static_property(property):\n    def __get__(self, obj, cls):\n        return property.__get__(self, cls, cls)\n\n    def __set__(self, obj, value):\n        cls = obj if isinstance(obj, type) else type(obj)\n        property.__set__(self, cls, value)\n)\",\n                                    Py_file_input,\n                                    d.ptr(),\n                                    d.ptr());\n    if (result == nullptr)\n        throw error_already_set();\n    Py_DECREF(result);\n    return (PyTypeObject *) d[\"pybind11_static_property\"].cast<object>().release().ptr();\n}\n\n#endif // PYPY\n\n/** Types with static properties need to handle `Type.static_prop = x` in a specific way.\n    By default, Python replaces the `static_property` itself, but for wrapped C++ types\n    we need to call `static_property.__set__()` in order to propagate the new value to\n    the underlying C++ data structure. */\nextern \"C\" inline int pybind11_meta_setattro(PyObject *obj, PyObject *name, PyObject *value) {\n    // Use `_PyType_Lookup()` instead of `PyObject_GetAttr()` in order to get the raw\n    // descriptor (`property`) instead of calling `tp_descr_get` (`property.__get__()`).\n    PyObject *descr = _PyType_Lookup((PyTypeObject *) obj, name);\n\n    // The following assignment combinations are possible:\n    //   1. `Type.static_prop = value`             --> descr_set: `Type.static_prop.__set__(value)`\n    //   2. `Type.static_prop = other_static_prop` --> setattro:  replace existing `static_prop`\n    //   3. `Type.regular_attribute = value`       --> setattro:  regular attribute assignment\n    auto *const static_prop = (PyObject *) get_internals().static_property_type;\n    const auto call_descr_set = (descr != nullptr) && (value != nullptr)\n                                && (PyObject_IsInstance(descr, static_prop) != 0)\n                                && (PyObject_IsInstance(value, static_prop) == 0);\n    if (call_descr_set) {\n        // Call `static_property.__set__()` instead of replacing the `static_property`.\n#if !defined(PYPY_VERSION)\n        return Py_TYPE(descr)->tp_descr_set(descr, obj, value);\n#else\n        if (PyObject *result = PyObject_CallMethod(descr, \"__set__\", \"OO\", obj, value)) {\n            Py_DECREF(result);\n            return 0;\n        } else {\n            return -1;\n        }\n#endif\n    } else {\n        // Replace existing attribute.\n        return PyType_Type.tp_setattro(obj, name, value);\n    }\n}\n\n/**\n * Python 3's PyInstanceMethod_Type hides itself via its tp_descr_get, which prevents aliasing\n * methods via cls.attr(\"m2\") = cls.attr(\"m1\"): instead the tp_descr_get returns a plain function,\n * when called on a class, or a PyMethod, when called on an instance.  Override that behaviour here\n * to do a special case bypass for PyInstanceMethod_Types.\n */\nextern \"C\" inline PyObject *pybind11_meta_getattro(PyObject *obj, PyObject *name) {\n    PyObject *descr = _PyType_Lookup((PyTypeObject *) obj, name);\n    if (descr && PyInstanceMethod_Check(descr)) {\n        Py_INCREF(descr);\n        return descr;\n    }\n    return PyType_Type.tp_getattro(obj, name);\n}\n\n/// metaclass `__call__` function that is used to create all pybind11 objects.\nextern \"C\" inline PyObject *pybind11_meta_call(PyObject *type, PyObject *args, PyObject *kwargs) {\n\n    // use the default metaclass call to create/initialize the object\n    PyObject *self = PyType_Type.tp_call(type, args, kwargs);\n    if (self == nullptr) {\n        return nullptr;\n    }\n\n    // This must be a pybind11 instance\n    auto *instance = reinterpret_cast<detail::instance *>(self);\n\n    // Ensure that the base __init__ function(s) were called\n    for (const auto &vh : values_and_holders(instance)) {\n        if (!vh.holder_constructed()) {\n            PyErr_Format(PyExc_TypeError,\n                         \"%.200s.__init__() must be called when overriding __init__\",\n                         get_fully_qualified_tp_name(vh.type->type).c_str());\n            Py_DECREF(self);\n            return nullptr;\n        }\n    }\n\n    return self;\n}\n\n/// Cleanup the type-info for a pybind11-registered type.\nextern \"C\" inline void pybind11_meta_dealloc(PyObject *obj) {\n    auto *type = (PyTypeObject *) obj;\n    auto &internals = get_internals();\n\n    // A pybind11-registered type will:\n    // 1) be found in internals.registered_types_py\n    // 2) have exactly one associated `detail::type_info`\n    auto found_type = internals.registered_types_py.find(type);\n    if (found_type != internals.registered_types_py.end() && found_type->second.size() == 1\n        && found_type->second[0]->type == type) {\n\n        auto *tinfo = found_type->second[0];\n        auto tindex = std::type_index(*tinfo->cpptype);\n        internals.direct_conversions.erase(tindex);\n\n        if (tinfo->module_local) {\n            get_local_internals().registered_types_cpp.erase(tindex);\n        } else {\n            internals.registered_types_cpp.erase(tindex);\n        }\n        internals.registered_types_py.erase(tinfo->type);\n\n        // Actually just `std::erase_if`, but that's only available in C++20\n        auto &cache = internals.inactive_override_cache;\n        for (auto it = cache.begin(), last = cache.end(); it != last;) {\n            if (it->first == (PyObject *) tinfo->type) {\n                it = cache.erase(it);\n            } else {\n                ++it;\n            }\n        }\n\n        delete tinfo;\n    }\n\n    PyType_Type.tp_dealloc(obj);\n}\n\n/** This metaclass is assigned by default to all pybind11 types and is required in order\n    for static properties to function correctly. Users may override this using `py::metaclass`.\n    Return value: New reference. */\ninline PyTypeObject *make_default_metaclass() {\n    constexpr auto *name = \"pybind11_type\";\n    auto name_obj = reinterpret_steal<object>(PYBIND11_FROM_STRING(name));\n\n    /* Danger zone: from now (and until PyType_Ready), make sure to\n       issue no Python C API calls which could potentially invoke the\n       garbage collector (the GC will call type_traverse(), which will in\n       turn find the newly constructed type in an invalid state) */\n    auto *heap_type = (PyHeapTypeObject *) PyType_Type.tp_alloc(&PyType_Type, 0);\n    if (!heap_type) {\n        pybind11_fail(\"make_default_metaclass(): error allocating metaclass!\");\n    }\n\n    heap_type->ht_name = name_obj.inc_ref().ptr();\n#ifdef PYBIND11_BUILTIN_QUALNAME\n    heap_type->ht_qualname = name_obj.inc_ref().ptr();\n#endif\n\n    auto *type = &heap_type->ht_type;\n    type->tp_name = name;\n    type->tp_base = type_incref(&PyType_Type);\n    type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HEAPTYPE;\n\n    type->tp_call = pybind11_meta_call;\n\n    type->tp_setattro = pybind11_meta_setattro;\n    type->tp_getattro = pybind11_meta_getattro;\n\n    type->tp_dealloc = pybind11_meta_dealloc;\n\n    if (PyType_Ready(type) < 0) {\n        pybind11_fail(\"make_default_metaclass(): failure in PyType_Ready()!\");\n    }\n\n    setattr((PyObject *) type, \"__module__\", str(\"pybind11_builtins\"));\n    PYBIND11_SET_OLDPY_QUALNAME(type, name_obj);\n\n    return type;\n}\n\n/// For multiple inheritance types we need to recursively register/deregister base pointers for any\n/// base classes with pointers that are difference from the instance value pointer so that we can\n/// correctly recognize an offset base class pointer. This calls a function with any offset base\n/// ptrs.\ninline void traverse_offset_bases(void *valueptr,\n                                  const detail::type_info *tinfo,\n                                  instance *self,\n                                  bool (*f)(void * /*parentptr*/, instance * /*self*/)) {\n    for (handle h : reinterpret_borrow<tuple>(tinfo->type->tp_bases)) {\n        if (auto *parent_tinfo = get_type_info((PyTypeObject *) h.ptr())) {\n            for (auto &c : parent_tinfo->implicit_casts) {\n                if (c.first == tinfo->cpptype) {\n                    auto *parentptr = c.second(valueptr);\n                    if (parentptr != valueptr) {\n                        f(parentptr, self);\n                    }\n                    traverse_offset_bases(parentptr, parent_tinfo, self, f);\n                    break;\n                }\n            }\n        }\n    }\n}\n\ninline bool register_instance_impl(void *ptr, instance *self) {\n    get_internals().registered_instances.emplace(ptr, self);\n    return true; // unused, but gives the same signature as the deregister func\n}\ninline bool deregister_instance_impl(void *ptr, instance *self) {\n    auto &registered_instances = get_internals().registered_instances;\n    auto range = registered_instances.equal_range(ptr);\n    for (auto it = range.first; it != range.second; ++it) {\n        if (self == it->second) {\n            registered_instances.erase(it);\n            return true;\n        }\n    }\n    return false;\n}\n\ninline void register_instance(instance *self, void *valptr, const type_info *tinfo) {\n    register_instance_impl(valptr, self);\n    if (!tinfo->simple_ancestors) {\n        traverse_offset_bases(valptr, tinfo, self, register_instance_impl);\n    }\n}\n\ninline bool deregister_instance(instance *self, void *valptr, const type_info *tinfo) {\n    bool ret = deregister_instance_impl(valptr, self);\n    if (!tinfo->simple_ancestors) {\n        traverse_offset_bases(valptr, tinfo, self, deregister_instance_impl);\n    }\n    return ret;\n}\n\n/// Instance creation function for all pybind11 types. It allocates the internal instance layout\n/// for holding C++ objects and holders.  Allocation is done lazily (the first time the instance is\n/// cast to a reference or pointer), and initialization is done by an `__init__` function.\ninline PyObject *make_new_instance(PyTypeObject *type) {\n#if defined(PYPY_VERSION)\n    // PyPy gets tp_basicsize wrong (issue 2482) under multiple inheritance when the first\n    // inherited object is a plain Python type (i.e. not derived from an extension type).  Fix it.\n    ssize_t instance_size = static_cast<ssize_t>(sizeof(instance));\n    if (type->tp_basicsize < instance_size) {\n        type->tp_basicsize = instance_size;\n    }\n#endif\n    PyObject *self = type->tp_alloc(type, 0);\n    auto *inst = reinterpret_cast<instance *>(self);\n    // Allocate the value/holder internals:\n    inst->allocate_layout();\n\n    return self;\n}\n\n/// Instance creation function for all pybind11 types. It only allocates space for the\n/// C++ object, but doesn't call the constructor -- an `__init__` function must do that.\nextern \"C\" inline PyObject *pybind11_object_new(PyTypeObject *type, PyObject *, PyObject *) {\n    return make_new_instance(type);\n}\n\n/// An `__init__` function constructs the C++ object. Users should provide at least one\n/// of these using `py::init` or directly with `.def(__init__, ...)`. Otherwise, the\n/// following default function will be used which simply throws an exception.\nextern \"C\" inline int pybind11_object_init(PyObject *self, PyObject *, PyObject *) {\n    PyTypeObject *type = Py_TYPE(self);\n    std::string msg = get_fully_qualified_tp_name(type) + \": No constructor defined!\";\n    PyErr_SetString(PyExc_TypeError, msg.c_str());\n    return -1;\n}\n\ninline void add_patient(PyObject *nurse, PyObject *patient) {\n    auto &internals = get_internals();\n    auto *instance = reinterpret_cast<detail::instance *>(nurse);\n    instance->has_patients = true;\n    Py_INCREF(patient);\n    internals.patients[nurse].push_back(patient);\n}\n\ninline void clear_patients(PyObject *self) {\n    auto *instance = reinterpret_cast<detail::instance *>(self);\n    auto &internals = get_internals();\n    auto pos = internals.patients.find(self);\n    assert(pos != internals.patients.end());\n    // Clearing the patients can cause more Python code to run, which\n    // can invalidate the iterator. Extract the vector of patients\n    // from the unordered_map first.\n    auto patients = std::move(pos->second);\n    internals.patients.erase(pos);\n    instance->has_patients = false;\n    for (PyObject *&patient : patients) {\n        Py_CLEAR(patient);\n    }\n}\n\n/// Clears all internal data from the instance and removes it from registered instances in\n/// preparation for deallocation.\ninline void clear_instance(PyObject *self) {\n    auto *instance = reinterpret_cast<detail::instance *>(self);\n\n    // Deallocate any values/holders, if present:\n    for (auto &v_h : values_and_holders(instance)) {\n        if (v_h) {\n\n            // We have to deregister before we call dealloc because, for virtual MI types, we still\n            // need to be able to get the parent pointers.\n            if (v_h.instance_registered()\n                && !deregister_instance(instance, v_h.value_ptr(), v_h.type)) {\n                pybind11_fail(\n                    \"pybind11_object_dealloc(): Tried to deallocate unregistered instance!\");\n            }\n\n            if (instance->owned || v_h.holder_constructed()) {\n                v_h.type->dealloc(v_h);\n            }\n        }\n    }\n    // Deallocate the value/holder layout internals:\n    instance->deallocate_layout();\n\n    if (instance->weakrefs) {\n        PyObject_ClearWeakRefs(self);\n    }\n\n    PyObject **dict_ptr = _PyObject_GetDictPtr(self);\n    if (dict_ptr) {\n        Py_CLEAR(*dict_ptr);\n    }\n\n    if (instance->has_patients) {\n        clear_patients(self);\n    }\n}\n\n/// Instance destructor function for all pybind11 types. It calls `type_info.dealloc`\n/// to destroy the C++ object itself, while the rest is Python bookkeeping.\nextern \"C\" inline void pybind11_object_dealloc(PyObject *self) {\n    auto *type = Py_TYPE(self);\n\n    // If this is a GC tracked object, untrack it first\n    // Note that the track call is implicitly done by the\n    // default tp_alloc, which we never override.\n    if (PyType_HasFeature(type, Py_TPFLAGS_HAVE_GC) != 0) {\n        PyObject_GC_UnTrack(self);\n    }\n\n    clear_instance(self);\n\n    type->tp_free(self);\n\n#if PY_VERSION_HEX < 0x03080000\n    // `type->tp_dealloc != pybind11_object_dealloc` means that we're being called\n    // as part of a derived type's dealloc, in which case we're not allowed to decref\n    // the type here. For cross-module compatibility, we shouldn't compare directly\n    // with `pybind11_object_dealloc`, but with the common one stashed in internals.\n    auto pybind11_object_type = (PyTypeObject *) get_internals().instance_base;\n    if (type->tp_dealloc == pybind11_object_type->tp_dealloc)\n        Py_DECREF(type);\n#else\n    // This was not needed before Python 3.8 (Python issue 35810)\n    // https://github.com/pybind/pybind11/issues/1946\n    Py_DECREF(type);\n#endif\n}\n\nstd::string error_string();\n\n/** Create the type which can be used as a common base for all classes.  This is\n    needed in order to satisfy Python's requirements for multiple inheritance.\n    Return value: New reference. */\ninline PyObject *make_object_base_type(PyTypeObject *metaclass) {\n    constexpr auto *name = \"pybind11_object\";\n    auto name_obj = reinterpret_steal<object>(PYBIND11_FROM_STRING(name));\n\n    /* Danger zone: from now (and until PyType_Ready), make sure to\n       issue no Python C API calls which could potentially invoke the\n       garbage collector (the GC will call type_traverse(), which will in\n       turn find the newly constructed type in an invalid state) */\n    auto *heap_type = (PyHeapTypeObject *) metaclass->tp_alloc(metaclass, 0);\n    if (!heap_type) {\n        pybind11_fail(\"make_object_base_type(): error allocating type!\");\n    }\n\n    heap_type->ht_name = name_obj.inc_ref().ptr();\n#ifdef PYBIND11_BUILTIN_QUALNAME\n    heap_type->ht_qualname = name_obj.inc_ref().ptr();\n#endif\n\n    auto *type = &heap_type->ht_type;\n    type->tp_name = name;\n    type->tp_base = type_incref(&PyBaseObject_Type);\n    type->tp_basicsize = static_cast<ssize_t>(sizeof(instance));\n    type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HEAPTYPE;\n\n    type->tp_new = pybind11_object_new;\n    type->tp_init = pybind11_object_init;\n    type->tp_dealloc = pybind11_object_dealloc;\n\n    /* Support weak references (needed for the keep_alive feature) */\n    type->tp_weaklistoffset = offsetof(instance, weakrefs);\n\n    if (PyType_Ready(type) < 0) {\n        pybind11_fail(\"PyType_Ready failed in make_object_base_type(): \" + error_string());\n    }\n\n    setattr((PyObject *) type, \"__module__\", str(\"pybind11_builtins\"));\n    PYBIND11_SET_OLDPY_QUALNAME(type, name_obj);\n\n    assert(!PyType_HasFeature(type, Py_TPFLAGS_HAVE_GC));\n    return (PyObject *) heap_type;\n}\n\n/// dynamic_attr: Allow the garbage collector to traverse the internal instance `__dict__`.\nextern \"C\" inline int pybind11_traverse(PyObject *self, visitproc visit, void *arg) {\n    PyObject *&dict = *_PyObject_GetDictPtr(self);\n    Py_VISIT(dict);\n// https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_traverse\n#if PY_VERSION_HEX >= 0x03090000\n    Py_VISIT(Py_TYPE(self));\n#endif\n    return 0;\n}\n\n/// dynamic_attr: Allow the GC to clear the dictionary.\nextern \"C\" inline int pybind11_clear(PyObject *self) {\n    PyObject *&dict = *_PyObject_GetDictPtr(self);\n    Py_CLEAR(dict);\n    return 0;\n}\n\n/// Give instances of this type a `__dict__` and opt into garbage collection.\ninline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {\n    auto *type = &heap_type->ht_type;\n    type->tp_flags |= Py_TPFLAGS_HAVE_GC;\n#if PY_VERSION_HEX < 0x030B0000\n    type->tp_dictoffset = type->tp_basicsize;           // place dict at the end\n    type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it\n#else\n    type->tp_flags |= Py_TPFLAGS_MANAGED_DICT;\n#endif\n    type->tp_traverse = pybind11_traverse;\n    type->tp_clear = pybind11_clear;\n\n    static PyGetSetDef getset[] = {{\n#if PY_VERSION_HEX < 0x03070000\n                                       const_cast<char *>(\"__dict__\"),\n#else\n                                       \"__dict__\",\n#endif\n                                       PyObject_GenericGetDict,\n                                       PyObject_GenericSetDict,\n                                       nullptr,\n                                       nullptr},\n                                   {nullptr, nullptr, nullptr, nullptr, nullptr}};\n    type->tp_getset = getset;\n}\n\n/// buffer_protocol: Fill in the view as specified by flags.\nextern \"C\" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int flags) {\n    // Look for a `get_buffer` implementation in this type's info or any bases (following MRO).\n    type_info *tinfo = nullptr;\n    for (auto type : reinterpret_borrow<tuple>(Py_TYPE(obj)->tp_mro)) {\n        tinfo = get_type_info((PyTypeObject *) type.ptr());\n        if (tinfo && tinfo->get_buffer) {\n            break;\n        }\n    }\n    if (view == nullptr || !tinfo || !tinfo->get_buffer) {\n        if (view) {\n            view->obj = nullptr;\n        }\n        PyErr_SetString(PyExc_BufferError, \"pybind11_getbuffer(): Internal error\");\n        return -1;\n    }\n    std::memset(view, 0, sizeof(Py_buffer));\n    buffer_info *info = tinfo->get_buffer(obj, tinfo->get_buffer_data);\n    if ((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE && info->readonly) {\n        delete info;\n        // view->obj = nullptr;  // Was just memset to 0, so not necessary\n        PyErr_SetString(PyExc_BufferError, \"Writable buffer requested for readonly storage\");\n        return -1;\n    }\n    view->obj = obj;\n    view->ndim = 1;\n    view->internal = info;\n    view->buf = info->ptr;\n    view->itemsize = info->itemsize;\n    view->len = view->itemsize;\n    for (auto s : info->shape) {\n        view->len *= s;\n    }\n    view->readonly = static_cast<int>(info->readonly);\n    if ((flags & PyBUF_FORMAT) == PyBUF_FORMAT) {\n        view->format = const_cast<char *>(info->format.c_str());\n    }\n    if ((flags & PyBUF_STRIDES) == PyBUF_STRIDES) {\n        view->ndim = (int) info->ndim;\n        view->strides = info->strides.data();\n        view->shape = info->shape.data();\n    }\n    Py_INCREF(view->obj);\n    return 0;\n}\n\n/// buffer_protocol: Release the resources of the buffer.\nextern \"C\" inline void pybind11_releasebuffer(PyObject *, Py_buffer *view) {\n    delete (buffer_info *) view->internal;\n}\n\n/// Give this type a buffer interface.\ninline void enable_buffer_protocol(PyHeapTypeObject *heap_type) {\n    heap_type->ht_type.tp_as_buffer = &heap_type->as_buffer;\n\n    heap_type->as_buffer.bf_getbuffer = pybind11_getbuffer;\n    heap_type->as_buffer.bf_releasebuffer = pybind11_releasebuffer;\n}\n\n/** Create a brand new Python type according to the `type_record` specification.\n    Return value: New reference. */\ninline PyObject *make_new_python_type(const type_record &rec) {\n    auto name = reinterpret_steal<object>(PYBIND11_FROM_STRING(rec.name));\n\n    auto qualname = name;\n    if (rec.scope && !PyModule_Check(rec.scope.ptr()) && hasattr(rec.scope, \"__qualname__\")) {\n        qualname = reinterpret_steal<object>(\n            PyUnicode_FromFormat(\"%U.%U\", rec.scope.attr(\"__qualname__\").ptr(), name.ptr()));\n    }\n\n    object module_;\n    if (rec.scope) {\n        if (hasattr(rec.scope, \"__module__\")) {\n            module_ = rec.scope.attr(\"__module__\");\n        } else if (hasattr(rec.scope, \"__name__\")) {\n            module_ = rec.scope.attr(\"__name__\");\n        }\n    }\n\n    const auto *full_name = c_str(\n#if !defined(PYPY_VERSION)\n        module_ ? str(module_).cast<std::string>() + \".\" + rec.name :\n#endif\n                rec.name);\n\n    char *tp_doc = nullptr;\n    if (rec.doc && options::show_user_defined_docstrings()) {\n        /* Allocate memory for docstring (using PyObject_MALLOC, since\n           Python will free this later on) */\n        size_t size = std::strlen(rec.doc) + 1;\n        tp_doc = (char *) PyObject_MALLOC(size);\n        std::memcpy((void *) tp_doc, rec.doc, size);\n    }\n\n    auto &internals = get_internals();\n    auto bases = tuple(rec.bases);\n    auto *base = (bases.empty()) ? internals.instance_base : bases[0].ptr();\n\n    /* Danger zone: from now (and until PyType_Ready), make sure to\n       issue no Python C API calls which could potentially invoke the\n       garbage collector (the GC will call type_traverse(), which will in\n       turn find the newly constructed type in an invalid state) */\n    auto *metaclass\n        = rec.metaclass.ptr() ? (PyTypeObject *) rec.metaclass.ptr() : internals.default_metaclass;\n\n    auto *heap_type = (PyHeapTypeObject *) metaclass->tp_alloc(metaclass, 0);\n    if (!heap_type) {\n        pybind11_fail(std::string(rec.name) + \": Unable to create type object!\");\n    }\n\n    heap_type->ht_name = name.release().ptr();\n#ifdef PYBIND11_BUILTIN_QUALNAME\n    heap_type->ht_qualname = qualname.inc_ref().ptr();\n#endif\n\n    auto *type = &heap_type->ht_type;\n    type->tp_name = full_name;\n    type->tp_doc = tp_doc;\n    type->tp_base = type_incref((PyTypeObject *) base);\n    type->tp_basicsize = static_cast<ssize_t>(sizeof(instance));\n    if (!bases.empty()) {\n        type->tp_bases = bases.release().ptr();\n    }\n\n    /* Don't inherit base __init__ */\n    type->tp_init = pybind11_object_init;\n\n    /* Supported protocols */\n    type->tp_as_number = &heap_type->as_number;\n    type->tp_as_sequence = &heap_type->as_sequence;\n    type->tp_as_mapping = &heap_type->as_mapping;\n    type->tp_as_async = &heap_type->as_async;\n\n    /* Flags */\n    type->tp_flags |= Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE;\n    if (!rec.is_final) {\n        type->tp_flags |= Py_TPFLAGS_BASETYPE;\n    }\n\n    if (rec.dynamic_attr) {\n        enable_dynamic_attributes(heap_type);\n    }\n\n    if (rec.buffer_protocol) {\n        enable_buffer_protocol(heap_type);\n    }\n\n    if (rec.custom_type_setup_callback) {\n        rec.custom_type_setup_callback(heap_type);\n    }\n\n    if (PyType_Ready(type) < 0) {\n        pybind11_fail(std::string(rec.name) + \": PyType_Ready failed: \" + error_string());\n    }\n\n    assert(!rec.dynamic_attr || PyType_HasFeature(type, Py_TPFLAGS_HAVE_GC));\n\n    /* Register type with the parent scope */\n    if (rec.scope) {\n        setattr(rec.scope, rec.name, (PyObject *) type);\n    } else {\n        Py_INCREF(type); // Keep it alive forever (reference leak)\n    }\n\n    if (module_) { // Needed by pydoc\n        setattr((PyObject *) type, \"__module__\", module_);\n    }\n\n    PYBIND11_SET_OLDPY_QUALNAME(type, qualname);\n\n    return (PyObject *) type;\n}\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/common.h",
    "content": "/*\n    pybind11/detail/common.h -- Basic macros\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#define PYBIND11_VERSION_MAJOR 2\n#define PYBIND11_VERSION_MINOR 11\n#define PYBIND11_VERSION_PATCH 1\n\n// Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html\n// Additional convention: 0xD = dev\n#define PYBIND11_VERSION_HEX 0x020B0100\n\n// Define some generic pybind11 helper macros for warning management.\n//\n// Note that compiler-specific push/pop pairs are baked into the\n// PYBIND11_NAMESPACE_BEGIN/PYBIND11_NAMESPACE_END pair of macros. Therefore manual\n// PYBIND11_WARNING_PUSH/PYBIND11_WARNING_POP are usually only needed in `#include` sections.\n//\n// If you find you need to suppress a warning, please try to make the suppression as local as\n// possible using these macros. Please also be sure to push/pop with the pybind11 macros. Please\n// only use compiler specifics if you need to check specific versions, e.g. Apple Clang vs. vanilla\n// Clang.\n#if defined(_MSC_VER)\n#    define PYBIND11_COMPILER_MSVC\n#    define PYBIND11_PRAGMA(...) __pragma(__VA_ARGS__)\n#    define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA(warning(push))\n#    define PYBIND11_WARNING_POP PYBIND11_PRAGMA(warning(pop))\n#elif defined(__INTEL_COMPILER)\n#    define PYBIND11_COMPILER_INTEL\n#    define PYBIND11_PRAGMA(...) _Pragma(#__VA_ARGS__)\n#    define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA(warning push)\n#    define PYBIND11_WARNING_POP PYBIND11_PRAGMA(warning pop)\n#elif defined(__clang__)\n#    define PYBIND11_COMPILER_CLANG\n#    define PYBIND11_PRAGMA(...) _Pragma(#__VA_ARGS__)\n#    define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA(clang diagnostic push)\n#    define PYBIND11_WARNING_POP PYBIND11_PRAGMA(clang diagnostic push)\n#elif defined(__GNUC__)\n#    define PYBIND11_COMPILER_GCC\n#    define PYBIND11_PRAGMA(...) _Pragma(#__VA_ARGS__)\n#    define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA(GCC diagnostic push)\n#    define PYBIND11_WARNING_POP PYBIND11_PRAGMA(GCC diagnostic pop)\n#endif\n\n#ifdef PYBIND11_COMPILER_MSVC\n#    define PYBIND11_WARNING_DISABLE_MSVC(name) PYBIND11_PRAGMA(warning(disable : name))\n#else\n#    define PYBIND11_WARNING_DISABLE_MSVC(name)\n#endif\n\n#ifdef PYBIND11_COMPILER_CLANG\n#    define PYBIND11_WARNING_DISABLE_CLANG(name) PYBIND11_PRAGMA(clang diagnostic ignored name)\n#else\n#    define PYBIND11_WARNING_DISABLE_CLANG(name)\n#endif\n\n#ifdef PYBIND11_COMPILER_GCC\n#    define PYBIND11_WARNING_DISABLE_GCC(name) PYBIND11_PRAGMA(GCC diagnostic ignored name)\n#else\n#    define PYBIND11_WARNING_DISABLE_GCC(name)\n#endif\n\n#ifdef PYBIND11_COMPILER_INTEL\n#    define PYBIND11_WARNING_DISABLE_INTEL(name) PYBIND11_PRAGMA(warning disable name)\n#else\n#    define PYBIND11_WARNING_DISABLE_INTEL(name)\n#endif\n\n#define PYBIND11_NAMESPACE_BEGIN(name)                                                            \\\n    namespace name {                                                                              \\\n    PYBIND11_WARNING_PUSH\n\n#define PYBIND11_NAMESPACE_END(name)                                                              \\\n    PYBIND11_WARNING_POP                                                                          \\\n    }\n\n// Robust support for some features and loading modules compiled against different pybind versions\n// requires forcing hidden visibility on pybind code, so we enforce this by setting the attribute\n// on the main `pybind11` namespace.\n#if !defined(PYBIND11_NAMESPACE)\n#    ifdef __GNUG__\n#        define PYBIND11_NAMESPACE pybind11 __attribute__((visibility(\"hidden\")))\n#    else\n#        define PYBIND11_NAMESPACE pybind11\n#    endif\n#endif\n\n#if !(defined(_MSC_VER) && __cplusplus == 199711L)\n#    if __cplusplus >= 201402L\n#        define PYBIND11_CPP14\n#        if __cplusplus >= 201703L\n#            define PYBIND11_CPP17\n#            if __cplusplus >= 202002L\n#                define PYBIND11_CPP20\n// Please update tests/pybind11_tests.cpp `cpp_std()` when adding a macro here.\n#            endif\n#        endif\n#    endif\n#elif defined(_MSC_VER) && __cplusplus == 199711L\n// MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully\n// implemented). Unless you use the /Zc:__cplusplus flag on Visual Studio 2017 15.7 Preview 3\n// or newer.\n#    if _MSVC_LANG >= 201402L\n#        define PYBIND11_CPP14\n#        if _MSVC_LANG > 201402L\n#            define PYBIND11_CPP17\n#            if _MSVC_LANG >= 202002L\n#                define PYBIND11_CPP20\n#            endif\n#        endif\n#    endif\n#endif\n\n// Compiler version assertions\n#if defined(__INTEL_COMPILER)\n#    if __INTEL_COMPILER < 1800\n#        error pybind11 requires Intel C++ compiler v18 or newer\n#    elif __INTEL_COMPILER < 1900 && defined(PYBIND11_CPP14)\n#        error pybind11 supports only C++11 with Intel C++ compiler v18. Use v19 or newer for C++14.\n#    endif\n/* The following pragma cannot be pop'ed:\n   https://community.intel.com/t5/Intel-C-Compiler/Inline-and-no-inline-warning/td-p/1216764 */\n#    pragma warning disable 2196 // warning #2196: routine is both \"inline\" and \"noinline\"\n#elif defined(__clang__) && !defined(__apple_build_version__)\n#    if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3)\n#        error pybind11 requires clang 3.3 or newer\n#    endif\n#elif defined(__clang__)\n// Apple changes clang version macros to its Xcode version; the first Xcode release based on\n// (upstream) clang 3.3 was Xcode 5:\n#    if __clang_major__ < 5\n#        error pybind11 requires Xcode/clang 5.0 or newer\n#    endif\n#elif defined(__GNUG__)\n#    if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)\n#        error pybind11 requires gcc 4.8 or newer\n#    endif\n#elif defined(_MSC_VER)\n#    if _MSC_VER < 1910\n#        error pybind11 2.10+ requires MSVC 2017 or newer\n#    endif\n#endif\n\n#if !defined(PYBIND11_EXPORT)\n#    if defined(WIN32) || defined(_WIN32)\n#        define PYBIND11_EXPORT __declspec(dllexport)\n#    else\n#        define PYBIND11_EXPORT __attribute__((visibility(\"default\")))\n#    endif\n#endif\n\n#if !defined(PYBIND11_EXPORT_EXCEPTION)\n#    if defined(__apple_build_version__)\n#        define PYBIND11_EXPORT_EXCEPTION PYBIND11_EXPORT\n#    else\n#        define PYBIND11_EXPORT_EXCEPTION\n#    endif\n#endif\n\n// For CUDA, GCC7, GCC8:\n// PYBIND11_NOINLINE_FORCED is incompatible with `-Wattributes -Werror`.\n// When defining PYBIND11_NOINLINE_FORCED, it is best to also use `-Wno-attributes`.\n// However, the measured shared-library size saving when using noinline are only\n// 1.7% for CUDA, -0.2% for GCC7, and 0.0% for GCC8 (using -DCMAKE_BUILD_TYPE=MinSizeRel,\n// the default under pybind11/tests).\n#if !defined(PYBIND11_NOINLINE_FORCED)                                                            \\\n    && (defined(__CUDACC__) || (defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8)))\n#    define PYBIND11_NOINLINE_DISABLED\n#endif\n\n// The PYBIND11_NOINLINE macro is for function DEFINITIONS.\n// In contrast, FORWARD DECLARATIONS should never use this macro:\n// https://stackoverflow.com/questions/9317473/forward-declaration-of-inline-functions\n#if defined(PYBIND11_NOINLINE_DISABLED) // Option for maximum portability and experimentation.\n#    define PYBIND11_NOINLINE inline\n#elif defined(_MSC_VER)\n#    define PYBIND11_NOINLINE __declspec(noinline) inline\n#else\n#    define PYBIND11_NOINLINE __attribute__((noinline)) inline\n#endif\n\n#if defined(__MINGW32__)\n// For unknown reasons all PYBIND11_DEPRECATED member trigger a warning when declared\n// whether it is used or not\n#    define PYBIND11_DEPRECATED(reason)\n#elif defined(PYBIND11_CPP14)\n#    define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]]\n#else\n#    define PYBIND11_DEPRECATED(reason) __attribute__((deprecated(reason)))\n#endif\n\n#if defined(PYBIND11_CPP17)\n#    define PYBIND11_MAYBE_UNUSED [[maybe_unused]]\n#elif defined(_MSC_VER) && !defined(__clang__)\n#    define PYBIND11_MAYBE_UNUSED\n#else\n#    define PYBIND11_MAYBE_UNUSED __attribute__((__unused__))\n#endif\n\n/* Don't let Python.h #define (v)snprintf as macro because they are implemented\n   properly in Visual Studio since 2015. */\n#if defined(_MSC_VER)\n#    define HAVE_SNPRINTF 1\n#endif\n\n/// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode\n#if defined(_MSC_VER)\nPYBIND11_WARNING_PUSH\nPYBIND11_WARNING_DISABLE_MSVC(4505)\n// C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only)\n#    if defined(_DEBUG) && !defined(Py_DEBUG)\n// Workaround for a VS 2022 issue.\n// NOTE: This workaround knowingly violates the Python.h include order requirement:\n// https://docs.python.org/3/c-api/intro.html#include-files\n// See https://github.com/pybind/pybind11/pull/3497 for full context.\n#        include <yvals.h>\n#        if _MSVC_STL_VERSION >= 143\n#            include <crtdefs.h>\n#        endif\n#        define PYBIND11_DEBUG_MARKER\n#        undef _DEBUG\n#    endif\n#endif\n\n// https://en.cppreference.com/w/c/chrono/localtime\n#if defined(__STDC_LIB_EXT1__) && !defined(__STDC_WANT_LIB_EXT1__)\n#    define __STDC_WANT_LIB_EXT1__\n#endif\n\n#ifdef __has_include\n// std::optional (but including it in c++14 mode isn't allowed)\n#    if defined(PYBIND11_CPP17) && __has_include(<optional>)\n#        define PYBIND11_HAS_OPTIONAL 1\n#    endif\n// std::experimental::optional (but not allowed in c++11 mode)\n#    if defined(PYBIND11_CPP14) && (__has_include(<experimental/optional>) && \\\n                                 !__has_include(<optional>))\n#        define PYBIND11_HAS_EXP_OPTIONAL 1\n#    endif\n// std::variant\n#    if defined(PYBIND11_CPP17) && __has_include(<variant>)\n#        define PYBIND11_HAS_VARIANT 1\n#    endif\n#elif defined(_MSC_VER) && defined(PYBIND11_CPP17)\n#    define PYBIND11_HAS_OPTIONAL 1\n#    define PYBIND11_HAS_VARIANT 1\n#endif\n\n#if defined(PYBIND11_CPP17)\n#    if defined(__has_include)\n#        if __has_include(<string_view>)\n#            define PYBIND11_HAS_STRING_VIEW\n#        endif\n#    elif defined(_MSC_VER)\n#        define PYBIND11_HAS_STRING_VIEW\n#    endif\n#endif\n\n#include <Python.h>\n// Reminder: WITH_THREAD is always defined if PY_VERSION_HEX >= 0x03070000\n#if PY_VERSION_HEX < 0x03060000\n#    error \"PYTHON < 3.6 IS UNSUPPORTED. pybind11 v2.9 was the last to support Python 2 and 3.5.\"\n#endif\n#include <frameobject.h>\n#include <pythread.h>\n\n/* Python #defines overrides on all sorts of core functions, which\n   tends to weak havok in C++ codebases that expect these to work\n   like regular functions (potentially with several overloads) */\n#if defined(isalnum)\n#    undef isalnum\n#    undef isalpha\n#    undef islower\n#    undef isspace\n#    undef isupper\n#    undef tolower\n#    undef toupper\n#endif\n\n#if defined(copysign)\n#    undef copysign\n#endif\n\n#if defined(PYPY_VERSION) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)\n#    define PYBIND11_SIMPLE_GIL_MANAGEMENT\n#endif\n\n#if defined(_MSC_VER)\n#    if defined(PYBIND11_DEBUG_MARKER)\n#        define _DEBUG\n#        undef PYBIND11_DEBUG_MARKER\n#    endif\nPYBIND11_WARNING_POP\n#endif\n\n#include <cstddef>\n#include <cstring>\n#include <exception>\n#include <forward_list>\n#include <memory>\n#include <stdexcept>\n#include <string>\n#include <type_traits>\n#include <typeindex>\n#include <unordered_map>\n#include <unordered_set>\n#include <vector>\n#if defined(__has_include)\n#    if __has_include(<version>)\n#        include <version>\n#    endif\n#endif\n\n// Must be after including <version> or one of the other headers specified by the standard\n#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L\n#    define PYBIND11_HAS_U8STRING\n#endif\n\n// See description of PR #4246:\n#if !defined(PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF) && !defined(NDEBUG)                       \\\n    && !defined(PYPY_VERSION) && !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)\n#    define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF\n#endif\n\n// #define PYBIND11_STR_LEGACY_PERMISSIVE\n// If DEFINED, pybind11::str can hold PyUnicodeObject or PyBytesObject\n//             (probably surprising and never documented, but this was the\n//             legacy behavior until and including v2.6.x). As a side-effect,\n//             pybind11::isinstance<str>() is true for both pybind11::str and\n//             pybind11::bytes.\n// If UNDEFINED, pybind11::str can only hold PyUnicodeObject, and\n//               pybind11::isinstance<str>() is true only for pybind11::str.\n//               However, for Python 2 only (!), the pybind11::str caster\n//               implicitly decoded bytes to PyUnicodeObject. This was to ease\n//               the transition from the legacy behavior to the non-permissive\n//               behavior.\n\n/// Compatibility macros for Python 2 / Python 3 versions TODO: remove\n#define PYBIND11_INSTANCE_METHOD_NEW(ptr, class_) PyInstanceMethod_New(ptr)\n#define PYBIND11_INSTANCE_METHOD_CHECK PyInstanceMethod_Check\n#define PYBIND11_INSTANCE_METHOD_GET_FUNCTION PyInstanceMethod_GET_FUNCTION\n#define PYBIND11_BYTES_CHECK PyBytes_Check\n#define PYBIND11_BYTES_FROM_STRING PyBytes_FromString\n#define PYBIND11_BYTES_FROM_STRING_AND_SIZE PyBytes_FromStringAndSize\n#define PYBIND11_BYTES_AS_STRING_AND_SIZE PyBytes_AsStringAndSize\n#define PYBIND11_BYTES_AS_STRING PyBytes_AsString\n#define PYBIND11_BYTES_SIZE PyBytes_Size\n#define PYBIND11_LONG_CHECK(o) PyLong_Check(o)\n#define PYBIND11_LONG_AS_LONGLONG(o) PyLong_AsLongLong(o)\n#define PYBIND11_LONG_FROM_SIGNED(o) PyLong_FromSsize_t((ssize_t) (o))\n#define PYBIND11_LONG_FROM_UNSIGNED(o) PyLong_FromSize_t((size_t) (o))\n#define PYBIND11_BYTES_NAME \"bytes\"\n#define PYBIND11_STRING_NAME \"str\"\n#define PYBIND11_SLICE_OBJECT PyObject\n#define PYBIND11_FROM_STRING PyUnicode_FromString\n#define PYBIND11_STR_TYPE ::pybind11::str\n#define PYBIND11_BOOL_ATTR \"__bool__\"\n#define PYBIND11_NB_BOOL(ptr) ((ptr)->nb_bool)\n#define PYBIND11_BUILTINS_MODULE \"builtins\"\n// Providing a separate declaration to make Clang's -Wmissing-prototypes happy.\n// See comment for PYBIND11_MODULE below for why this is marked \"maybe unused\".\n#define PYBIND11_PLUGIN_IMPL(name)                                                                \\\n    extern \"C\" PYBIND11_MAYBE_UNUSED PYBIND11_EXPORT PyObject *PyInit_##name();                   \\\n    extern \"C\" PYBIND11_EXPORT PyObject *PyInit_##name()\n\n#define PYBIND11_TRY_NEXT_OVERLOAD ((PyObject *) 1) // special failure return code\n#define PYBIND11_STRINGIFY(x) #x\n#define PYBIND11_TOSTRING(x) PYBIND11_STRINGIFY(x)\n#define PYBIND11_CONCAT(first, second) first##second\n#define PYBIND11_ENSURE_INTERNALS_READY pybind11::detail::get_internals();\n\n#define PYBIND11_CHECK_PYTHON_VERSION                                                             \\\n    {                                                                                             \\\n        const char *compiled_ver                                                                  \\\n            = PYBIND11_TOSTRING(PY_MAJOR_VERSION) \".\" PYBIND11_TOSTRING(PY_MINOR_VERSION);        \\\n        const char *runtime_ver = Py_GetVersion();                                                \\\n        size_t len = std::strlen(compiled_ver);                                                   \\\n        if (std::strncmp(runtime_ver, compiled_ver, len) != 0                                     \\\n            || (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) {                            \\\n            PyErr_Format(PyExc_ImportError,                                                       \\\n                         \"Python version mismatch: module was compiled for Python %s, \"           \\\n                         \"but the interpreter version is incompatible: %s.\",                      \\\n                         compiled_ver,                                                            \\\n                         runtime_ver);                                                            \\\n            return nullptr;                                                                       \\\n        }                                                                                         \\\n    }\n\n#define PYBIND11_CATCH_INIT_EXCEPTIONS                                                            \\\n    catch (pybind11::error_already_set & e) {                                                     \\\n        pybind11::raise_from(e, PyExc_ImportError, \"initialization failed\");                      \\\n        return nullptr;                                                                           \\\n    }                                                                                             \\\n    catch (const std::exception &e) {                                                             \\\n        PyErr_SetString(PyExc_ImportError, e.what());                                             \\\n        return nullptr;                                                                           \\\n    }\n\n/** \\rst\n    ***Deprecated in favor of PYBIND11_MODULE***\n\n    This macro creates the entry point that will be invoked when the Python interpreter\n    imports a plugin library. Please create a `module_` in the function body and return\n    the pointer to its underlying Python object at the end.\n\n    .. code-block:: cpp\n\n        PYBIND11_PLUGIN(example) {\n            pybind11::module_ m(\"example\", \"pybind11 example plugin\");\n            /// Set up bindings here\n            return m.ptr();\n        }\n\\endrst */\n#define PYBIND11_PLUGIN(name)                                                                     \\\n    PYBIND11_DEPRECATED(\"PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE\")                     \\\n    static PyObject *pybind11_init();                                                             \\\n    PYBIND11_PLUGIN_IMPL(name) {                                                                  \\\n        PYBIND11_CHECK_PYTHON_VERSION                                                             \\\n        PYBIND11_ENSURE_INTERNALS_READY                                                           \\\n        try {                                                                                     \\\n            return pybind11_init();                                                               \\\n        }                                                                                         \\\n        PYBIND11_CATCH_INIT_EXCEPTIONS                                                            \\\n    }                                                                                             \\\n    PyObject *pybind11_init()\n\n/** \\rst\n    This macro creates the entry point that will be invoked when the Python interpreter\n    imports an extension module. The module name is given as the first argument and it\n    should not be in quotes. The second macro argument defines a variable of type\n    `py::module_` which can be used to initialize the module.\n\n    The entry point is marked as \"maybe unused\" to aid dead-code detection analysis:\n    since the entry point is typically only looked up at runtime and not referenced\n    during translation, it would otherwise appear as unused (\"dead\") code.\n\n    .. code-block:: cpp\n\n        PYBIND11_MODULE(example, m) {\n            m.doc() = \"pybind11 example module\";\n\n            // Add bindings here\n            m.def(\"foo\", []() {\n                return \"Hello, World!\";\n            });\n        }\n\\endrst */\n#define PYBIND11_MODULE(name, variable)                                                           \\\n    static ::pybind11::module_::module_def PYBIND11_CONCAT(pybind11_module_def_, name)            \\\n        PYBIND11_MAYBE_UNUSED;                                                                    \\\n    PYBIND11_MAYBE_UNUSED                                                                         \\\n    static void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ &);                     \\\n    PYBIND11_PLUGIN_IMPL(name) {                                                                  \\\n        PYBIND11_CHECK_PYTHON_VERSION                                                             \\\n        PYBIND11_ENSURE_INTERNALS_READY                                                           \\\n        auto m = ::pybind11::module_::create_extension_module(                                    \\\n            PYBIND11_TOSTRING(name), nullptr, &PYBIND11_CONCAT(pybind11_module_def_, name));      \\\n        try {                                                                                     \\\n            PYBIND11_CONCAT(pybind11_init_, name)(m);                                             \\\n            return m.ptr();                                                                       \\\n        }                                                                                         \\\n        PYBIND11_CATCH_INIT_EXCEPTIONS                                                            \\\n    }                                                                                             \\\n    void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ & (variable))\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nusing ssize_t = Py_ssize_t;\nusing size_t = std::size_t;\n\ntemplate <typename IntType>\ninline ssize_t ssize_t_cast(const IntType &val) {\n    static_assert(sizeof(IntType) <= sizeof(ssize_t), \"Implicit narrowing is not permitted.\");\n    return static_cast<ssize_t>(val);\n}\n\n/// Approach used to cast a previously unknown C++ instance into a Python object\nenum class return_value_policy : uint8_t {\n    /** This is the default return value policy, which falls back to the policy\n        return_value_policy::take_ownership when the return value is a pointer.\n        Otherwise, it uses return_value::move or return_value::copy for rvalue\n        and lvalue references, respectively. See below for a description of what\n        all of these different policies do. */\n    automatic = 0,\n\n    /** As above, but use policy return_value_policy::reference when the return\n        value is a pointer. This is the default conversion policy for function\n        arguments when calling Python functions manually from C++ code (i.e. via\n        handle::operator()). You probably won't need to use this. */\n    automatic_reference,\n\n    /** Reference an existing object (i.e. do not create a new copy) and take\n        ownership. Python will call the destructor and delete operator when the\n        object's reference count reaches zero. Undefined behavior ensues when\n        the C++ side does the same.. */\n    take_ownership,\n\n    /** Create a new copy of the returned object, which will be owned by\n        Python. This policy is comparably safe because the lifetimes of the two\n        instances are decoupled. */\n    copy,\n\n    /** Use std::move to move the return value contents into a new instance\n        that will be owned by Python. This policy is comparably safe because the\n        lifetimes of the two instances (move source and destination) are\n        decoupled. */\n    move,\n\n    /** Reference an existing object, but do not take ownership. The C++ side\n        is responsible for managing the object's lifetime and deallocating it\n        when it is no longer used. Warning: undefined behavior will ensue when\n        the C++ side deletes an object that is still referenced and used by\n        Python. */\n    reference,\n\n    /** This policy only applies to methods and properties. It references the\n        object without taking ownership similar to the above\n        return_value_policy::reference policy. In contrast to that policy, the\n        function or property's implicit this argument (called the parent) is\n        considered to be the the owner of the return value (the child).\n        pybind11 then couples the lifetime of the parent to the child via a\n        reference relationship that ensures that the parent cannot be garbage\n        collected while Python is still using the child. More advanced\n        variations of this scheme are also possible using combinations of\n        return_value_policy::reference and the keep_alive call policy */\n    reference_internal\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ninline static constexpr int log2(size_t n, int k = 0) {\n    return (n <= 1) ? k : log2(n >> 1, k + 1);\n}\n\n// Returns the size as a multiple of sizeof(void *), rounded up.\ninline static constexpr size_t size_in_ptrs(size_t s) {\n    return 1 + ((s - 1) >> log2(sizeof(void *)));\n}\n\n/**\n * The space to allocate for simple layout instance holders (see below) in multiple of the size of\n * a pointer (e.g.  2 means 16 bytes on 64-bit architectures).  The default is the minimum required\n * to holder either a std::unique_ptr or std::shared_ptr (which is almost always\n * sizeof(std::shared_ptr<T>)).\n */\nconstexpr size_t instance_simple_holder_in_ptrs() {\n    static_assert(sizeof(std::shared_ptr<int>) >= sizeof(std::unique_ptr<int>),\n                  \"pybind assumes std::shared_ptrs are at least as big as std::unique_ptrs\");\n    return size_in_ptrs(sizeof(std::shared_ptr<int>));\n}\n\n// Forward declarations\nstruct type_info;\nstruct value_and_holder;\n\nstruct nonsimple_values_and_holders {\n    void **values_and_holders;\n    uint8_t *status;\n};\n\n/// The 'instance' type which needs to be standard layout (need to be able to use 'offsetof')\nstruct instance {\n    PyObject_HEAD\n    /// Storage for pointers and holder; see simple_layout, below, for a description\n    union {\n        void *simple_value_holder[1 + instance_simple_holder_in_ptrs()];\n        nonsimple_values_and_holders nonsimple;\n    };\n    /// Weak references\n    PyObject *weakrefs;\n    /// If true, the pointer is owned which means we're free to manage it with a holder.\n    bool owned : 1;\n    /**\n     * An instance has two possible value/holder layouts.\n     *\n     * Simple layout (when this flag is true), means the `simple_value_holder` is set with a\n     * pointer and the holder object governing that pointer, i.e. [val1*][holder].  This layout is\n     * applied whenever there is no python-side multiple inheritance of bound C++ types *and* the\n     * type's holder will fit in the default space (which is large enough to hold either a\n     * std::unique_ptr or std::shared_ptr).\n     *\n     * Non-simple layout applies when using custom holders that require more space than\n     * `shared_ptr` (which is typically the size of two pointers), or when multiple inheritance is\n     * used on the python side.  Non-simple layout allocates the required amount of memory to have\n     * multiple bound C++ classes as parents.  Under this layout, `nonsimple.values_and_holders` is\n     * set to a pointer to allocated space of the required space to hold a sequence of value\n     * pointers and holders followed `status`, a set of bit flags (1 byte each), i.e.\n     * [val1*][holder1][val2*][holder2]...[bb...]  where each [block] is rounded up to a multiple\n     * of `sizeof(void *)`.  `nonsimple.status` is, for convenience, a pointer to the beginning of\n     * the [bb...] block (but not independently allocated).\n     *\n     * Status bits indicate whether the associated holder is constructed (&\n     * status_holder_constructed) and whether the value pointer is registered (&\n     * status_instance_registered) in `registered_instances`.\n     */\n    bool simple_layout : 1;\n    /// For simple layout, tracks whether the holder has been constructed\n    bool simple_holder_constructed : 1;\n    /// For simple layout, tracks whether the instance is registered in `registered_instances`\n    bool simple_instance_registered : 1;\n    /// If true, get_internals().patients has an entry for this object\n    bool has_patients : 1;\n\n    /// Initializes all of the above type/values/holders data (but not the instance values\n    /// themselves)\n    void allocate_layout();\n\n    /// Destroys/deallocates all of the above\n    void deallocate_layout();\n\n    /// Returns the value_and_holder wrapper for the given type (or the first, if `find_type`\n    /// omitted).  Returns a default-constructed (with `.inst = nullptr`) object on failure if\n    /// `throw_if_missing` is false.\n    value_and_holder get_value_and_holder(const type_info *find_type = nullptr,\n                                          bool throw_if_missing = true);\n\n    /// Bit values for the non-simple status flags\n    static constexpr uint8_t status_holder_constructed = 1;\n    static constexpr uint8_t status_instance_registered = 2;\n};\n\nstatic_assert(std::is_standard_layout<instance>::value,\n              \"Internal error: `pybind11::detail::instance` is not standard layout!\");\n\n/// from __cpp_future__ import (convenient aliases from C++14/17)\n#if defined(PYBIND11_CPP14)\nusing std::conditional_t;\nusing std::enable_if_t;\nusing std::remove_cv_t;\nusing std::remove_reference_t;\n#else\ntemplate <bool B, typename T = void>\nusing enable_if_t = typename std::enable_if<B, T>::type;\ntemplate <bool B, typename T, typename F>\nusing conditional_t = typename std::conditional<B, T, F>::type;\ntemplate <typename T>\nusing remove_cv_t = typename std::remove_cv<T>::type;\ntemplate <typename T>\nusing remove_reference_t = typename std::remove_reference<T>::type;\n#endif\n\n#if defined(PYBIND11_CPP20)\nusing std::remove_cvref;\nusing std::remove_cvref_t;\n#else\ntemplate <class T>\nstruct remove_cvref {\n    using type = remove_cv_t<remove_reference_t<T>>;\n};\ntemplate <class T>\nusing remove_cvref_t = typename remove_cvref<T>::type;\n#endif\n\n/// Example usage: is_same_ignoring_cvref<T, PyObject *>::value\ntemplate <typename T, typename U>\nusing is_same_ignoring_cvref = std::is_same<detail::remove_cvref_t<T>, U>;\n\n/// Index sequences\n#if defined(PYBIND11_CPP14)\nusing std::index_sequence;\nusing std::make_index_sequence;\n#else\ntemplate <size_t...>\nstruct index_sequence {};\ntemplate <size_t N, size_t... S>\nstruct make_index_sequence_impl : make_index_sequence_impl<N - 1, N - 1, S...> {};\ntemplate <size_t... S>\nstruct make_index_sequence_impl<0, S...> {\n    using type = index_sequence<S...>;\n};\ntemplate <size_t N>\nusing make_index_sequence = typename make_index_sequence_impl<N>::type;\n#endif\n\n/// Make an index sequence of the indices of true arguments\ntemplate <typename ISeq, size_t, bool...>\nstruct select_indices_impl {\n    using type = ISeq;\n};\ntemplate <size_t... IPrev, size_t I, bool B, bool... Bs>\nstruct select_indices_impl<index_sequence<IPrev...>, I, B, Bs...>\n    : select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>,\n                          I + 1,\n                          Bs...> {};\ntemplate <bool... Bs>\nusing select_indices = typename select_indices_impl<index_sequence<>, 0, Bs...>::type;\n\n/// Backports of std::bool_constant and std::negation to accommodate older compilers\ntemplate <bool B>\nusing bool_constant = std::integral_constant<bool, B>;\ntemplate <typename T>\nstruct negation : bool_constant<!T::value> {};\n\n// PGI/Intel cannot detect operator delete with the \"compatible\" void_t impl, so\n// using the new one (C++14 defect, so generally works on newer compilers, even\n// if not in C++17 mode)\n#if defined(__PGIC__) || defined(__INTEL_COMPILER)\ntemplate <typename...>\nusing void_t = void;\n#else\ntemplate <typename...>\nstruct void_t_impl {\n    using type = void;\n};\ntemplate <typename... Ts>\nusing void_t = typename void_t_impl<Ts...>::type;\n#endif\n\n/// Compile-time all/any/none of that check the boolean value of all template types\n#if defined(__cpp_fold_expressions) && !(defined(_MSC_VER) && (_MSC_VER < 1916))\ntemplate <class... Ts>\nusing all_of = bool_constant<(Ts::value && ...)>;\ntemplate <class... Ts>\nusing any_of = bool_constant<(Ts::value || ...)>;\n#elif !defined(_MSC_VER)\ntemplate <bool...>\nstruct bools {};\ntemplate <class... Ts>\nusing all_of = std::is_same<bools<Ts::value..., true>, bools<true, Ts::value...>>;\ntemplate <class... Ts>\nusing any_of = negation<all_of<negation<Ts>...>>;\n#else\n// MSVC has trouble with the above, but supports std::conjunction, which we can use instead (albeit\n// at a slight loss of compilation efficiency).\ntemplate <class... Ts>\nusing all_of = std::conjunction<Ts...>;\ntemplate <class... Ts>\nusing any_of = std::disjunction<Ts...>;\n#endif\ntemplate <class... Ts>\nusing none_of = negation<any_of<Ts...>>;\n\ntemplate <class T, template <class> class... Predicates>\nusing satisfies_all_of = all_of<Predicates<T>...>;\ntemplate <class T, template <class> class... Predicates>\nusing satisfies_any_of = any_of<Predicates<T>...>;\ntemplate <class T, template <class> class... Predicates>\nusing satisfies_none_of = none_of<Predicates<T>...>;\n\n/// Strip the class from a method type\ntemplate <typename T>\nstruct remove_class {};\ntemplate <typename C, typename R, typename... A>\nstruct remove_class<R (C::*)(A...)> {\n    using type = R(A...);\n};\ntemplate <typename C, typename R, typename... A>\nstruct remove_class<R (C::*)(A...) const> {\n    using type = R(A...);\n};\n#ifdef __cpp_noexcept_function_type\ntemplate <typename C, typename R, typename... A>\nstruct remove_class<R (C::*)(A...) noexcept> {\n    using type = R(A...);\n};\ntemplate <typename C, typename R, typename... A>\nstruct remove_class<R (C::*)(A...) const noexcept> {\n    using type = R(A...);\n};\n#endif\n/// Helper template to strip away type modifiers\ntemplate <typename T>\nstruct intrinsic_type {\n    using type = T;\n};\ntemplate <typename T>\nstruct intrinsic_type<const T> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T>\nstruct intrinsic_type<T *> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T>\nstruct intrinsic_type<T &> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T>\nstruct intrinsic_type<T &&> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T, size_t N>\nstruct intrinsic_type<const T[N]> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T, size_t N>\nstruct intrinsic_type<T[N]> {\n    using type = typename intrinsic_type<T>::type;\n};\ntemplate <typename T>\nusing intrinsic_t = typename intrinsic_type<T>::type;\n\n/// Helper type to replace 'void' in some expressions\nstruct void_type {};\n\n/// Helper template which holds a list of types\ntemplate <typename...>\nstruct type_list {};\n\n/// Compile-time integer sum\n#ifdef __cpp_fold_expressions\ntemplate <typename... Ts>\nconstexpr size_t constexpr_sum(Ts... ns) {\n    return (0 + ... + size_t{ns});\n}\n#else\nconstexpr size_t constexpr_sum() { return 0; }\ntemplate <typename T, typename... Ts>\nconstexpr size_t constexpr_sum(T n, Ts... ns) {\n    return size_t{n} + constexpr_sum(ns...);\n}\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(constexpr_impl)\n/// Implementation details for constexpr functions\nconstexpr int first(int i) { return i; }\ntemplate <typename T, typename... Ts>\nconstexpr int first(int i, T v, Ts... vs) {\n    return v ? i : first(i + 1, vs...);\n}\n\nconstexpr int last(int /*i*/, int result) { return result; }\ntemplate <typename T, typename... Ts>\nconstexpr int last(int i, int result, T v, Ts... vs) {\n    return last(i + 1, v ? i : result, vs...);\n}\nPYBIND11_NAMESPACE_END(constexpr_impl)\n\n/// Return the index of the first type in Ts which satisfies Predicate<T>.\n/// Returns sizeof...(Ts) if none match.\ntemplate <template <typename> class Predicate, typename... Ts>\nconstexpr int constexpr_first() {\n    return constexpr_impl::first(0, Predicate<Ts>::value...);\n}\n\n/// Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match.\ntemplate <template <typename> class Predicate, typename... Ts>\nconstexpr int constexpr_last() {\n    return constexpr_impl::last(0, -1, Predicate<Ts>::value...);\n}\n\n/// Return the Nth element from the parameter pack\ntemplate <size_t N, typename T, typename... Ts>\nstruct pack_element {\n    using type = typename pack_element<N - 1, Ts...>::type;\n};\ntemplate <typename T, typename... Ts>\nstruct pack_element<0, T, Ts...> {\n    using type = T;\n};\n\n/// Return the one and only type which matches the predicate, or Default if none match.\n/// If more than one type matches the predicate, fail at compile-time.\ntemplate <template <typename> class Predicate, typename Default, typename... Ts>\nstruct exactly_one {\n    static constexpr auto found = constexpr_sum(Predicate<Ts>::value...);\n    static_assert(found <= 1, \"Found more than one type matching the predicate\");\n\n    static constexpr auto index = found ? constexpr_first<Predicate, Ts...>() : 0;\n    using type = conditional_t<found, typename pack_element<index, Ts...>::type, Default>;\n};\ntemplate <template <typename> class P, typename Default>\nstruct exactly_one<P, Default> {\n    using type = Default;\n};\n\ntemplate <template <typename> class Predicate, typename Default, typename... Ts>\nusing exactly_one_t = typename exactly_one<Predicate, Default, Ts...>::type;\n\n/// Defer the evaluation of type T until types Us are instantiated\ntemplate <typename T, typename... /*Us*/>\nstruct deferred_type {\n    using type = T;\n};\ntemplate <typename T, typename... Us>\nusing deferred_t = typename deferred_type<T, Us...>::type;\n\n/// Like is_base_of, but requires a strict base (i.e. `is_strict_base_of<T, T>::value == false`,\n/// unlike `std::is_base_of`)\ntemplate <typename Base, typename Derived>\nusing is_strict_base_of\n    = bool_constant<std::is_base_of<Base, Derived>::value && !std::is_same<Base, Derived>::value>;\n\n/// Like is_base_of, but also requires that the base type is accessible (i.e. that a Derived\n/// pointer can be converted to a Base pointer) For unions, `is_base_of<T, T>::value` is False, so\n/// we need to check `is_same` as well.\ntemplate <typename Base, typename Derived>\nusing is_accessible_base_of\n    = bool_constant<(std::is_same<Base, Derived>::value || std::is_base_of<Base, Derived>::value)\n                    && std::is_convertible<Derived *, Base *>::value>;\n\ntemplate <template <typename...> class Base>\nstruct is_template_base_of_impl {\n    template <typename... Us>\n    static std::true_type check(Base<Us...> *);\n    static std::false_type check(...);\n};\n\n/// Check if a template is the base of a type. For example:\n/// `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything\ntemplate <template <typename...> class Base, typename T>\n// Sadly, all MSVC versions incl. 2022 need the workaround, even in C++20 mode.\n// See also: https://github.com/pybind/pybind11/pull/3741\n#if !defined(_MSC_VER)\nusing is_template_base_of\n    = decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T> *) nullptr));\n#else\nstruct is_template_base_of\n    : decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T> *) nullptr)) {\n};\n#endif\n\n/// Check if T is an instantiation of the template `Class`. For example:\n/// `is_instantiation<shared_ptr, T>` is true if `T == shared_ptr<U>` where U can be anything.\ntemplate <template <typename...> class Class, typename T>\nstruct is_instantiation : std::false_type {};\ntemplate <template <typename...> class Class, typename... Us>\nstruct is_instantiation<Class, Class<Us...>> : std::true_type {};\n\n/// Check if T is std::shared_ptr<U> where U can be anything\ntemplate <typename T>\nusing is_shared_ptr = is_instantiation<std::shared_ptr, T>;\n\n/// Check if T looks like an input iterator\ntemplate <typename T, typename = void>\nstruct is_input_iterator : std::false_type {};\ntemplate <typename T>\nstruct is_input_iterator<T,\n                         void_t<decltype(*std::declval<T &>()), decltype(++std::declval<T &>())>>\n    : std::true_type {};\n\ntemplate <typename T>\nusing is_function_pointer\n    = bool_constant<std::is_pointer<T>::value\n                    && std::is_function<typename std::remove_pointer<T>::type>::value>;\n\ntemplate <typename F>\nstruct strip_function_object {\n    // If you are encountering an\n    // 'error: name followed by \"::\" must be a class or namespace name'\n    // with the Intel compiler and a noexcept function here,\n    // try to use noexcept(true) instead of plain noexcept.\n    using type = typename remove_class<decltype(&F::operator())>::type;\n};\n\n// Extracts the function signature from a function, function pointer or lambda.\ntemplate <typename Function, typename F = remove_reference_t<Function>>\nusing function_signature_t = conditional_t<\n    std::is_function<F>::value,\n    F,\n    typename conditional_t<std::is_pointer<F>::value || std::is_member_pointer<F>::value,\n                           std::remove_pointer<F>,\n                           strip_function_object<F>>::type>;\n\n/// Returns true if the type looks like a lambda: that is, isn't a function, pointer or member\n/// pointer.  Note that this can catch all sorts of other things, too; this is intended to be used\n/// in a place where passing a lambda makes sense.\ntemplate <typename T>\nusing is_lambda = satisfies_none_of<remove_reference_t<T>,\n                                    std::is_function,\n                                    std::is_pointer,\n                                    std::is_member_pointer>;\n\n// [workaround(intel)] Internal error on fold expression\n/// Apply a function over each element of a parameter pack\n#if defined(__cpp_fold_expressions) && !defined(__INTEL_COMPILER)\n// Intel compiler produces an internal error on this fold expression (tested with ICC 19.0.2)\n#    define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (((PATTERN), void()), ...)\n#else\nusing expand_side_effects = bool[];\n#    define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN)                                                 \\\n        (void) pybind11::detail::expand_side_effects { ((PATTERN), void(), false)..., false }\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// C++ bindings of builtin Python exceptions\nclass PYBIND11_EXPORT_EXCEPTION builtin_exception : public std::runtime_error {\npublic:\n    using std::runtime_error::runtime_error;\n    /// Set the error using the Python C API\n    virtual void set_error() const = 0;\n};\n\n#define PYBIND11_RUNTIME_EXCEPTION(name, type)                                                    \\\n    class PYBIND11_EXPORT_EXCEPTION name : public builtin_exception {                             \\\n    public:                                                                                       \\\n        using builtin_exception::builtin_exception;                                               \\\n        name() : name(\"\") {}                                                                      \\\n        void set_error() const override { PyErr_SetString(type, what()); }                        \\\n    };\n\nPYBIND11_RUNTIME_EXCEPTION(stop_iteration, PyExc_StopIteration)\nPYBIND11_RUNTIME_EXCEPTION(index_error, PyExc_IndexError)\nPYBIND11_RUNTIME_EXCEPTION(key_error, PyExc_KeyError)\nPYBIND11_RUNTIME_EXCEPTION(value_error, PyExc_ValueError)\nPYBIND11_RUNTIME_EXCEPTION(type_error, PyExc_TypeError)\nPYBIND11_RUNTIME_EXCEPTION(buffer_error, PyExc_BufferError)\nPYBIND11_RUNTIME_EXCEPTION(import_error, PyExc_ImportError)\nPYBIND11_RUNTIME_EXCEPTION(attribute_error, PyExc_AttributeError)\nPYBIND11_RUNTIME_EXCEPTION(cast_error, PyExc_RuntimeError) /// Thrown when pybind11::cast or\n                                                           /// handle::call fail due to a type\n                                                           /// casting error\nPYBIND11_RUNTIME_EXCEPTION(reference_cast_error, PyExc_RuntimeError) /// Used internally\n\n[[noreturn]] PYBIND11_NOINLINE void pybind11_fail(const char *reason) {\n    assert(!PyErr_Occurred());\n    throw std::runtime_error(reason);\n}\n[[noreturn]] PYBIND11_NOINLINE void pybind11_fail(const std::string &reason) {\n    assert(!PyErr_Occurred());\n    throw std::runtime_error(reason);\n}\n\ntemplate <typename T, typename SFINAE = void>\nstruct format_descriptor {};\n\ntemplate <typename T>\nstruct format_descriptor<\n    T,\n    detail::enable_if_t<detail::is_same_ignoring_cvref<T, PyObject *>::value>> {\n    static constexpr const char c = 'O';\n    static constexpr const char value[2] = {c, '\\0'};\n    static std::string format() { return std::string(1, c); }\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n// Returns the index of the given type in the type char array below, and in the list in numpy.h\n// The order here is: bool; 8 ints ((signed,unsigned)x(8,16,32,64)bits); float,double,long double;\n// complex float,double,long double.  Note that the long double types only participate when long\n// double is actually longer than double (it isn't under MSVC).\n// NB: not only the string below but also complex.h and numpy.h rely on this order.\ntemplate <typename T, typename SFINAE = void>\nstruct is_fmt_numeric {\n    static constexpr bool value = false;\n};\ntemplate <typename T>\nstruct is_fmt_numeric<T, enable_if_t<std::is_arithmetic<T>::value>> {\n    static constexpr bool value = true;\n    static constexpr int index\n        = std::is_same<T, bool>::value\n              ? 0\n              : 1\n                    + (std::is_integral<T>::value\n                           ? detail::log2(sizeof(T)) * 2 + std::is_unsigned<T>::value\n                           : 8\n                                 + (std::is_same<T, double>::value        ? 1\n                                    : std::is_same<T, long double>::value ? 2\n                                                                          : 0));\n};\nPYBIND11_NAMESPACE_END(detail)\n\ntemplate <typename T>\nstruct format_descriptor<T, detail::enable_if_t<std::is_arithmetic<T>::value>> {\n    static constexpr const char c = \"?bBhHiIqQfdg\"[detail::is_fmt_numeric<T>::index];\n    static constexpr const char value[2] = {c, '\\0'};\n    static std::string format() { return std::string(1, c); }\n};\n\n#if !defined(PYBIND11_CPP17)\n\ntemplate <typename T>\nconstexpr const char\n    format_descriptor<T, detail::enable_if_t<std::is_arithmetic<T>::value>>::value[2];\n\n#endif\n\n/// RAII wrapper that temporarily clears any Python error state\nstruct error_scope {\n    PyObject *type, *value, *trace;\n    error_scope() { PyErr_Fetch(&type, &value, &trace); }\n    error_scope(const error_scope &) = delete;\n    error_scope &operator=(const error_scope &) = delete;\n    ~error_scope() { PyErr_Restore(type, value, trace); }\n};\n\n/// Dummy destructor wrapper that can be used to expose classes with a private destructor\nstruct nodelete {\n    template <typename T>\n    void operator()(T *) {}\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\ntemplate <typename... Args>\nstruct overload_cast_impl {\n    template <typename Return>\n    constexpr auto operator()(Return (*pf)(Args...)) const noexcept -> decltype(pf) {\n        return pf;\n    }\n\n    template <typename Return, typename Class>\n    constexpr auto operator()(Return (Class::*pmf)(Args...), std::false_type = {}) const noexcept\n        -> decltype(pmf) {\n        return pmf;\n    }\n\n    template <typename Return, typename Class>\n    constexpr auto operator()(Return (Class::*pmf)(Args...) const, std::true_type) const noexcept\n        -> decltype(pmf) {\n        return pmf;\n    }\n};\nPYBIND11_NAMESPACE_END(detail)\n\n// overload_cast requires variable templates: C++14\n#if defined(PYBIND11_CPP14)\n#    define PYBIND11_OVERLOAD_CAST 1\n/// Syntax sugar for resolving overloaded function pointers:\n///  - regular: static_cast<Return (Class::*)(Arg0, Arg1, Arg2)>(&Class::func)\n///  - sweet:   overload_cast<Arg0, Arg1, Arg2>(&Class::func)\ntemplate <typename... Args>\nstatic constexpr detail::overload_cast_impl<Args...> overload_cast{};\n#endif\n\n/// Const member function selector for overload_cast\n///  - regular: static_cast<Return (Class::*)(Arg) const>(&Class::func)\n///  - sweet:   overload_cast<Arg>(&Class::func, const_)\nstatic constexpr auto const_ = std::true_type{};\n\n#if !defined(PYBIND11_CPP14) // no overload_cast: providing something that static_assert-fails:\ntemplate <typename... Args>\nstruct overload_cast {\n    static_assert(detail::deferred_t<std::false_type, Args...>::value,\n                  \"pybind11::overload_cast<...> requires compiling in C++14 mode\");\n};\n#endif // overload_cast\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Adaptor for converting arbitrary container arguments into a vector; implicitly convertible from\n// any standard container (or C-style array) supporting std::begin/std::end, any singleton\n// arithmetic type (if T is arithmetic), or explicitly constructible from an iterator pair.\ntemplate <typename T>\nclass any_container {\n    std::vector<T> v;\n\npublic:\n    any_container() = default;\n\n    // Can construct from a pair of iterators\n    template <typename It, typename = enable_if_t<is_input_iterator<It>::value>>\n    any_container(It first, It last) : v(first, last) {}\n\n    // Implicit conversion constructor from any arbitrary container type\n    // with values convertible to T\n    template <typename Container,\n              typename = enable_if_t<\n                  std::is_convertible<decltype(*std::begin(std::declval<const Container &>())),\n                                      T>::value>>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    any_container(const Container &c) : any_container(std::begin(c), std::end(c)) {}\n\n    // initializer_list's aren't deducible, so don't get matched by the above template;\n    // we need this to explicitly allow implicit conversion from one:\n    template <typename TIn, typename = enable_if_t<std::is_convertible<TIn, T>::value>>\n    any_container(const std::initializer_list<TIn> &c) : any_container(c.begin(), c.end()) {}\n\n    // Avoid copying if given an rvalue vector of the correct type.\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    any_container(std::vector<T> &&v) : v(std::move(v)) {}\n\n    // Moves the vector out of an rvalue any_container\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator std::vector<T> &&() && { return std::move(v); }\n\n    // Dereferencing obtains a reference to the underlying vector\n    std::vector<T> &operator*() { return v; }\n    const std::vector<T> &operator*() const { return v; }\n\n    // -> lets you call methods on the underlying vector\n    std::vector<T> *operator->() { return &v; }\n    const std::vector<T> *operator->() const { return &v; }\n};\n\n// Forward-declaration; see detail/class.h\nstd::string get_fully_qualified_tp_name(PyTypeObject *);\n\ntemplate <typename T>\ninline static std::shared_ptr<T>\ntry_get_shared_from_this(std::enable_shared_from_this<T> *holder_value_ptr) {\n// Pre C++17, this code path exploits undefined behavior, but is known to work on many platforms.\n// Use at your own risk!\n// See also https://en.cppreference.com/w/cpp/memory/enable_shared_from_this, and in particular\n// the `std::shared_ptr<Good> gp1 = not_so_good.getptr();` and `try`-`catch` parts of the example.\n#if defined(__cpp_lib_enable_shared_from_this) && (!defined(_MSC_VER) || _MSC_VER >= 1912)\n    return holder_value_ptr->weak_from_this().lock();\n#else\n    try {\n        return holder_value_ptr->shared_from_this();\n    } catch (const std::bad_weak_ptr &) {\n        return nullptr;\n    }\n#endif\n}\n\n// For silencing \"unused\" compiler warnings in special situations.\ntemplate <typename... Args>\n#if defined(_MSC_VER) && _MSC_VER < 1920 // MSVC 2017\nconstexpr\n#endif\n    inline void\n    silence_unused_warnings(Args &&...) {\n}\n\n// MSVC warning C4100: Unreferenced formal parameter\n#if defined(_MSC_VER) && _MSC_VER <= 1916\n#    define PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(...)                                         \\\n        detail::silence_unused_warnings(__VA_ARGS__)\n#else\n#    define PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(...)\n#endif\n\n// GCC -Wunused-but-set-parameter  All GCC versions (as of July 2021).\n#if defined(__GNUG__) && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#    define PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(...)                       \\\n        detail::silence_unused_warnings(__VA_ARGS__)\n#else\n#    define PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(...)\n#endif\n\n#if defined(__clang__)                                                                            \\\n    && (defined(__apple_build_version__) /* AppleClang 13.0.0.13000029 was the only data point    \\\n                                            available. */                                         \\\n        || (__clang_major__ >= 7                                                                  \\\n            && __clang_major__ <= 12) /* Clang 3, 5, 13, 14, 15 do not generate the warning. */   \\\n    )\n#    define PYBIND11_DETECTED_CLANG_WITH_MISLEADING_CALL_STD_MOVE_EXPLICITLY_WARNING\n// Example:\n// tests/test_kwargs_and_defaults.cpp:46:68: error: local variable 'args' will be copied despite\n// being returned by name [-Werror,-Wreturn-std-move]\n//     m.def(\"args_function\", [](py::args args) -> py::tuple { return args; });\n//                                                                    ^~~~\n// test_kwargs_and_defaults.cpp:46:68: note: call 'std::move' explicitly to avoid copying\n//     m.def(\"args_function\", [](py::args args) -> py::tuple { return args; });\n//                                                                    ^~~~\n//                                                                    std::move(args)\n#endif\n\n// Pybind offers detailed error messages by default for all builts that are debug (through the\n// negation of NDEBUG). This can also be manually enabled by users, for any builds, through\n// defining PYBIND11_DETAILED_ERROR_MESSAGES. This information is primarily useful for those\n// who are writing (as opposed to merely using) libraries that use pybind11.\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES) && !defined(NDEBUG)\n#    define PYBIND11_DETAILED_ERROR_MESSAGES\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/descr.h",
    "content": "/*\n    pybind11/detail/descr.h: Helper type for concatenating type signatures at compile time\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"common.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n#if !defined(_MSC_VER)\n#    define PYBIND11_DESCR_CONSTEXPR static constexpr\n#else\n#    define PYBIND11_DESCR_CONSTEXPR const\n#endif\n\n/* Concatenate type signatures at compile time */\ntemplate <size_t N, typename... Ts>\nstruct descr {\n    char text[N + 1]{'\\0'};\n\n    constexpr descr() = default;\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    constexpr descr(char const (&s)[N + 1]) : descr(s, make_index_sequence<N>()) {}\n\n    template <size_t... Is>\n    constexpr descr(char const (&s)[N + 1], index_sequence<Is...>) : text{s[Is]..., '\\0'} {}\n\n    template <typename... Chars>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    constexpr descr(char c, Chars... cs) : text{c, static_cast<char>(cs)..., '\\0'} {}\n\n    static constexpr std::array<const std::type_info *, sizeof...(Ts) + 1> types() {\n        return {{&typeid(Ts)..., nullptr}};\n    }\n};\n\ntemplate <size_t N1, size_t N2, typename... Ts1, typename... Ts2, size_t... Is1, size_t... Is2>\nconstexpr descr<N1 + N2, Ts1..., Ts2...> plus_impl(const descr<N1, Ts1...> &a,\n                                                   const descr<N2, Ts2...> &b,\n                                                   index_sequence<Is1...>,\n                                                   index_sequence<Is2...>) {\n    PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(b);\n    return {a.text[Is1]..., b.text[Is2]...};\n}\n\ntemplate <size_t N1, size_t N2, typename... Ts1, typename... Ts2>\nconstexpr descr<N1 + N2, Ts1..., Ts2...> operator+(const descr<N1, Ts1...> &a,\n                                                   const descr<N2, Ts2...> &b) {\n    return plus_impl(a, b, make_index_sequence<N1>(), make_index_sequence<N2>());\n}\n\ntemplate <size_t N>\nconstexpr descr<N - 1> const_name(char const (&text)[N]) {\n    return descr<N - 1>(text);\n}\nconstexpr descr<0> const_name(char const (&)[1]) { return {}; }\n\ntemplate <size_t Rem, size_t... Digits>\nstruct int_to_str : int_to_str<Rem / 10, Rem % 10, Digits...> {};\ntemplate <size_t... Digits>\nstruct int_to_str<0, Digits...> {\n    // WARNING: This only works with C++17 or higher.\n    static constexpr auto digits = descr<sizeof...(Digits)>(('0' + Digits)...);\n};\n\n// Ternary description (like std::conditional)\ntemplate <bool B, size_t N1, size_t N2>\nconstexpr enable_if_t<B, descr<N1 - 1>> const_name(char const (&text1)[N1], char const (&)[N2]) {\n    return const_name(text1);\n}\ntemplate <bool B, size_t N1, size_t N2>\nconstexpr enable_if_t<!B, descr<N2 - 1>> const_name(char const (&)[N1], char const (&text2)[N2]) {\n    return const_name(text2);\n}\n\ntemplate <bool B, typename T1, typename T2>\nconstexpr enable_if_t<B, T1> const_name(const T1 &d, const T2 &) {\n    return d;\n}\ntemplate <bool B, typename T1, typename T2>\nconstexpr enable_if_t<!B, T2> const_name(const T1 &, const T2 &d) {\n    return d;\n}\n\ntemplate <size_t Size>\nauto constexpr const_name() -> remove_cv_t<decltype(int_to_str<Size / 10, Size % 10>::digits)> {\n    return int_to_str<Size / 10, Size % 10>::digits;\n}\n\ntemplate <typename Type>\nconstexpr descr<1, Type> const_name() {\n    return {'%'};\n}\n\n// If \"_\" is defined as a macro, py::detail::_ cannot be provided.\n// It is therefore best to use py::detail::const_name universally.\n// This block is for backward compatibility only.\n// (The const_name code is repeated to avoid introducing a \"_\" #define ourselves.)\n#ifndef _\n#    define PYBIND11_DETAIL_UNDERSCORE_BACKWARD_COMPATIBILITY\ntemplate <size_t N>\nconstexpr descr<N - 1> _(char const (&text)[N]) {\n    return const_name<N>(text);\n}\ntemplate <bool B, size_t N1, size_t N2>\nconstexpr enable_if_t<B, descr<N1 - 1>> _(char const (&text1)[N1], char const (&text2)[N2]) {\n    return const_name<B, N1, N2>(text1, text2);\n}\ntemplate <bool B, size_t N1, size_t N2>\nconstexpr enable_if_t<!B, descr<N2 - 1>> _(char const (&text1)[N1], char const (&text2)[N2]) {\n    return const_name<B, N1, N2>(text1, text2);\n}\ntemplate <bool B, typename T1, typename T2>\nconstexpr enable_if_t<B, T1> _(const T1 &d1, const T2 &d2) {\n    return const_name<B, T1, T2>(d1, d2);\n}\ntemplate <bool B, typename T1, typename T2>\nconstexpr enable_if_t<!B, T2> _(const T1 &d1, const T2 &d2) {\n    return const_name<B, T1, T2>(d1, d2);\n}\n\ntemplate <size_t Size>\nauto constexpr _() -> remove_cv_t<decltype(int_to_str<Size / 10, Size % 10>::digits)> {\n    return const_name<Size>();\n}\ntemplate <typename Type>\nconstexpr descr<1, Type> _() {\n    return const_name<Type>();\n}\n#endif // #ifndef _\n\nconstexpr descr<0> concat() { return {}; }\n\ntemplate <size_t N, typename... Ts>\nconstexpr descr<N, Ts...> concat(const descr<N, Ts...> &descr) {\n    return descr;\n}\n\n#ifdef __cpp_fold_expressions\ntemplate <size_t N1, size_t N2, typename... Ts1, typename... Ts2>\nconstexpr descr<N1 + N2 + 2, Ts1..., Ts2...> operator,(const descr<N1, Ts1...> &a,\n                                                       const descr<N2, Ts2...> &b) {\n    return a + const_name(\", \") + b;\n}\n\ntemplate <size_t N, typename... Ts, typename... Args>\nconstexpr auto concat(const descr<N, Ts...> &d, const Args &...args) {\n    return (d, ..., args);\n}\n#else\ntemplate <size_t N, typename... Ts, typename... Args>\nconstexpr auto concat(const descr<N, Ts...> &d, const Args &...args)\n    -> decltype(std::declval<descr<N + 2, Ts...>>() + concat(args...)) {\n    return d + const_name(\", \") + concat(args...);\n}\n#endif\n\ntemplate <size_t N, typename... Ts>\nconstexpr descr<N + 2, Ts...> type_descr(const descr<N, Ts...> &descr) {\n    return const_name(\"{\") + descr + const_name(\"}\");\n}\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/init.h",
    "content": "/*\n    pybind11/detail/init.h: init factory function implementation and support code.\n\n    Copyright (c) 2017 Jason Rhinelander <jason@imaginary.ca>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"class.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <>\nclass type_caster<value_and_holder> {\npublic:\n    bool load(handle h, bool) {\n        value = reinterpret_cast<value_and_holder *>(h.ptr());\n        return true;\n    }\n\n    template <typename>\n    using cast_op_type = value_and_holder &;\n    explicit operator value_and_holder &() { return *value; }\n    static constexpr auto name = const_name<value_and_holder>();\n\nprivate:\n    value_and_holder *value = nullptr;\n};\n\nPYBIND11_NAMESPACE_BEGIN(initimpl)\n\ninline void no_nullptr(void *ptr) {\n    if (!ptr) {\n        throw type_error(\"pybind11::init(): factory function returned nullptr\");\n    }\n}\n\n// Implementing functions for all forms of py::init<...> and py::init(...)\ntemplate <typename Class>\nusing Cpp = typename Class::type;\ntemplate <typename Class>\nusing Alias = typename Class::type_alias;\ntemplate <typename Class>\nusing Holder = typename Class::holder_type;\n\ntemplate <typename Class>\nusing is_alias_constructible = std::is_constructible<Alias<Class>, Cpp<Class> &&>;\n\n// Takes a Cpp pointer and returns true if it actually is a polymorphic Alias instance.\ntemplate <typename Class, enable_if_t<Class::has_alias, int> = 0>\nbool is_alias(Cpp<Class> *ptr) {\n    return dynamic_cast<Alias<Class> *>(ptr) != nullptr;\n}\n// Failing fallback version of the above for a no-alias class (always returns false)\ntemplate <typename /*Class*/>\nconstexpr bool is_alias(void *) {\n    return false;\n}\n\n// Constructs and returns a new object; if the given arguments don't map to a constructor, we fall\n// back to brace aggregate initiailization so that for aggregate initialization can be used with\n// py::init, e.g.  `py::init<int, int>` to initialize a `struct T { int a; int b; }`.  For\n// non-aggregate types, we need to use an ordinary T(...) constructor (invoking as `T{...}` usually\n// works, but will not do the expected thing when `T` has an `initializer_list<T>` constructor).\ntemplate <typename Class,\n          typename... Args,\n          detail::enable_if_t<std::is_constructible<Class, Args...>::value, int> = 0>\ninline Class *construct_or_initialize(Args &&...args) {\n    return new Class(std::forward<Args>(args)...);\n}\ntemplate <typename Class,\n          typename... Args,\n          detail::enable_if_t<!std::is_constructible<Class, Args...>::value, int> = 0>\ninline Class *construct_or_initialize(Args &&...args) {\n    return new Class{std::forward<Args>(args)...};\n}\n\n// Attempts to constructs an alias using a `Alias(Cpp &&)` constructor.  This allows types with\n// an alias to provide only a single Cpp factory function as long as the Alias can be\n// constructed from an rvalue reference of the base Cpp type.  This means that Alias classes\n// can, when appropriate, simply define a `Alias(Cpp &&)` constructor rather than needing to\n// inherit all the base class constructors.\ntemplate <typename Class>\nvoid construct_alias_from_cpp(std::true_type /*is_alias_constructible*/,\n                              value_and_holder &v_h,\n                              Cpp<Class> &&base) {\n    v_h.value_ptr() = new Alias<Class>(std::move(base));\n}\ntemplate <typename Class>\n[[noreturn]] void construct_alias_from_cpp(std::false_type /*!is_alias_constructible*/,\n                                           value_and_holder &,\n                                           Cpp<Class> &&) {\n    throw type_error(\"pybind11::init(): unable to convert returned instance to required \"\n                     \"alias class: no `Alias<Class>(Class &&)` constructor available\");\n}\n\n// Error-generating fallback for factories that don't match one of the below construction\n// mechanisms.\ntemplate <typename Class>\nvoid construct(...) {\n    static_assert(!std::is_same<Class, Class>::value /* always false */,\n                  \"pybind11::init(): init function must return a compatible pointer, \"\n                  \"holder, or value\");\n}\n\n// Pointer return v1: the factory function returns a class pointer for a registered class.\n// If we don't need an alias (because this class doesn't have one, or because the final type is\n// inherited on the Python side) we can simply take over ownership.  Otherwise we need to try to\n// construct an Alias from the returned base instance.\ntemplate <typename Class>\nvoid construct(value_and_holder &v_h, Cpp<Class> *ptr, bool need_alias) {\n    PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias);\n    no_nullptr(ptr);\n    if (Class::has_alias && need_alias && !is_alias<Class>(ptr)) {\n        // We're going to try to construct an alias by moving the cpp type.  Whether or not\n        // that succeeds, we still need to destroy the original cpp pointer (either the\n        // moved away leftover, if the alias construction works, or the value itself if we\n        // throw an error), but we can't just call `delete ptr`: it might have a special\n        // deleter, or might be shared_from_this.  So we construct a holder around it as if\n        // it was a normal instance, then steal the holder away into a local variable; thus\n        // the holder and destruction happens when we leave the C++ scope, and the holder\n        // class gets to handle the destruction however it likes.\n        v_h.value_ptr() = ptr;\n        v_h.set_instance_registered(true);          // To prevent init_instance from registering it\n        v_h.type->init_instance(v_h.inst, nullptr); // Set up the holder\n        Holder<Class> temp_holder(std::move(v_h.holder<Holder<Class>>())); // Steal the holder\n        v_h.type->dealloc(v_h); // Destroys the moved-out holder remains, resets value ptr to null\n        v_h.set_instance_registered(false);\n\n        construct_alias_from_cpp<Class>(is_alias_constructible<Class>{}, v_h, std::move(*ptr));\n    } else {\n        // Otherwise the type isn't inherited, so we don't need an Alias\n        v_h.value_ptr() = ptr;\n    }\n}\n\n// Pointer return v2: a factory that always returns an alias instance ptr.  We simply take over\n// ownership of the pointer.\ntemplate <typename Class, enable_if_t<Class::has_alias, int> = 0>\nvoid construct(value_and_holder &v_h, Alias<Class> *alias_ptr, bool) {\n    no_nullptr(alias_ptr);\n    v_h.value_ptr() = static_cast<Cpp<Class> *>(alias_ptr);\n}\n\n// Holder return: copy its pointer, and move or copy the returned holder into the new instance's\n// holder.  This also handles types like std::shared_ptr<T> and std::unique_ptr<T> where T is a\n// derived type (through those holder's implicit conversion from derived class holder\n// constructors).\ntemplate <typename Class>\nvoid construct(value_and_holder &v_h, Holder<Class> holder, bool need_alias) {\n    PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias);\n    auto *ptr = holder_helper<Holder<Class>>::get(holder);\n    no_nullptr(ptr);\n    // If we need an alias, check that the held pointer is actually an alias instance\n    if (Class::has_alias && need_alias && !is_alias<Class>(ptr)) {\n        throw type_error(\"pybind11::init(): construction failed: returned holder-wrapped instance \"\n                         \"is not an alias instance\");\n    }\n\n    v_h.value_ptr() = ptr;\n    v_h.type->init_instance(v_h.inst, &holder);\n}\n\n// return-by-value version 1: returning a cpp class by value.  If the class has an alias and an\n// alias is required the alias must have an `Alias(Cpp &&)` constructor so that we can construct\n// the alias from the base when needed (i.e. because of Python-side inheritance).  When we don't\n// need it, we simply move-construct the cpp value into a new instance.\ntemplate <typename Class>\nvoid construct(value_and_holder &v_h, Cpp<Class> &&result, bool need_alias) {\n    PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias);\n    static_assert(is_move_constructible<Cpp<Class>>::value,\n                  \"pybind11::init() return-by-value factory function requires a movable class\");\n    if (Class::has_alias && need_alias) {\n        construct_alias_from_cpp<Class>(is_alias_constructible<Class>{}, v_h, std::move(result));\n    } else {\n        v_h.value_ptr() = new Cpp<Class>(std::move(result));\n    }\n}\n\n// return-by-value version 2: returning a value of the alias type itself.  We move-construct an\n// Alias instance (even if no the python-side inheritance is involved).  The is intended for\n// cases where Alias initialization is always desired.\ntemplate <typename Class>\nvoid construct(value_and_holder &v_h, Alias<Class> &&result, bool) {\n    static_assert(\n        is_move_constructible<Alias<Class>>::value,\n        \"pybind11::init() return-by-alias-value factory function requires a movable alias class\");\n    v_h.value_ptr() = new Alias<Class>(std::move(result));\n}\n\n// Implementing class for py::init<...>()\ntemplate <typename... Args>\nstruct constructor {\n    template <typename Class, typename... Extra, enable_if_t<!Class::has_alias, int> = 0>\n    static void execute(Class &cl, const Extra &...extra) {\n        cl.def(\n            \"__init__\",\n            [](value_and_holder &v_h, Args... args) {\n                v_h.value_ptr() = construct_or_initialize<Cpp<Class>>(std::forward<Args>(args)...);\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n\n    template <\n        typename Class,\n        typename... Extra,\n        enable_if_t<Class::has_alias && std::is_constructible<Cpp<Class>, Args...>::value, int>\n        = 0>\n    static void execute(Class &cl, const Extra &...extra) {\n        cl.def(\n            \"__init__\",\n            [](value_and_holder &v_h, Args... args) {\n                if (Py_TYPE(v_h.inst) == v_h.type->type) {\n                    v_h.value_ptr()\n                        = construct_or_initialize<Cpp<Class>>(std::forward<Args>(args)...);\n                } else {\n                    v_h.value_ptr()\n                        = construct_or_initialize<Alias<Class>>(std::forward<Args>(args)...);\n                }\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n\n    template <\n        typename Class,\n        typename... Extra,\n        enable_if_t<Class::has_alias && !std::is_constructible<Cpp<Class>, Args...>::value, int>\n        = 0>\n    static void execute(Class &cl, const Extra &...extra) {\n        cl.def(\n            \"__init__\",\n            [](value_and_holder &v_h, Args... args) {\n                v_h.value_ptr()\n                    = construct_or_initialize<Alias<Class>>(std::forward<Args>(args)...);\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n};\n\n// Implementing class for py::init_alias<...>()\ntemplate <typename... Args>\nstruct alias_constructor {\n    template <\n        typename Class,\n        typename... Extra,\n        enable_if_t<Class::has_alias && std::is_constructible<Alias<Class>, Args...>::value, int>\n        = 0>\n    static void execute(Class &cl, const Extra &...extra) {\n        cl.def(\n            \"__init__\",\n            [](value_and_holder &v_h, Args... args) {\n                v_h.value_ptr()\n                    = construct_or_initialize<Alias<Class>>(std::forward<Args>(args)...);\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n};\n\n// Implementation class for py::init(Func) and py::init(Func, AliasFunc)\ntemplate <typename CFunc,\n          typename AFunc = void_type (*)(),\n          typename = function_signature_t<CFunc>,\n          typename = function_signature_t<AFunc>>\nstruct factory;\n\n// Specialization for py::init(Func)\ntemplate <typename Func, typename Return, typename... Args>\nstruct factory<Func, void_type (*)(), Return(Args...)> {\n    remove_reference_t<Func> class_factory;\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    factory(Func &&f) : class_factory(std::forward<Func>(f)) {}\n\n    // The given class either has no alias or has no separate alias factory;\n    // this always constructs the class itself.  If the class is registered with an alias\n    // type and an alias instance is needed (i.e. because the final type is a Python class\n    // inheriting from the C++ type) the returned value needs to either already be an alias\n    // instance, or the alias needs to be constructible from a `Class &&` argument.\n    template <typename Class, typename... Extra>\n    void execute(Class &cl, const Extra &...extra) && {\n#if defined(PYBIND11_CPP14)\n        cl.def(\n            \"__init__\",\n            [func = std::move(class_factory)]\n#else\n        auto &func = class_factory;\n        cl.def(\n            \"__init__\",\n            [func]\n#endif\n            (value_and_holder &v_h, Args... args) {\n                construct<Class>(\n                    v_h, func(std::forward<Args>(args)...), Py_TYPE(v_h.inst) != v_h.type->type);\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n};\n\n// Specialization for py::init(Func, AliasFunc)\ntemplate <typename CFunc,\n          typename AFunc,\n          typename CReturn,\n          typename... CArgs,\n          typename AReturn,\n          typename... AArgs>\nstruct factory<CFunc, AFunc, CReturn(CArgs...), AReturn(AArgs...)> {\n    static_assert(sizeof...(CArgs) == sizeof...(AArgs),\n                  \"pybind11::init(class_factory, alias_factory): class and alias factories \"\n                  \"must have identical argument signatures\");\n    static_assert(all_of<std::is_same<CArgs, AArgs>...>::value,\n                  \"pybind11::init(class_factory, alias_factory): class and alias factories \"\n                  \"must have identical argument signatures\");\n\n    remove_reference_t<CFunc> class_factory;\n    remove_reference_t<AFunc> alias_factory;\n\n    factory(CFunc &&c, AFunc &&a)\n        : class_factory(std::forward<CFunc>(c)), alias_factory(std::forward<AFunc>(a)) {}\n\n    // The class factory is called when the `self` type passed to `__init__` is the direct\n    // class (i.e. not inherited), the alias factory when `self` is a Python-side subtype.\n    template <typename Class, typename... Extra>\n    void execute(Class &cl, const Extra &...extra) && {\n        static_assert(Class::has_alias,\n                      \"The two-argument version of `py::init()` can \"\n                      \"only be used if the class has an alias\");\n#if defined(PYBIND11_CPP14)\n        cl.def(\n            \"__init__\",\n            [class_func = std::move(class_factory), alias_func = std::move(alias_factory)]\n#else\n        auto &class_func = class_factory;\n        auto &alias_func = alias_factory;\n        cl.def(\n            \"__init__\",\n            [class_func, alias_func]\n#endif\n            (value_and_holder &v_h, CArgs... args) {\n                if (Py_TYPE(v_h.inst) == v_h.type->type) {\n                    // If the instance type equals the registered type we don't have inheritance,\n                    // so don't need the alias and can construct using the class function:\n                    construct<Class>(v_h, class_func(std::forward<CArgs>(args)...), false);\n                } else {\n                    construct<Class>(v_h, alias_func(std::forward<CArgs>(args)...), true);\n                }\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n};\n\n/// Set just the C++ state. Same as `__init__`.\ntemplate <typename Class, typename T>\nvoid setstate(value_and_holder &v_h, T &&result, bool need_alias) {\n    construct<Class>(v_h, std::forward<T>(result), need_alias);\n}\n\n/// Set both the C++ and Python states\ntemplate <typename Class,\n          typename T,\n          typename O,\n          enable_if_t<std::is_convertible<O, handle>::value, int> = 0>\nvoid setstate(value_and_holder &v_h, std::pair<T, O> &&result, bool need_alias) {\n    construct<Class>(v_h, std::move(result.first), need_alias);\n    auto d = handle(result.second);\n    if (PyDict_Check(d.ptr()) && PyDict_Size(d.ptr()) == 0) {\n        // Skipping setattr below, to not force use of py::dynamic_attr() for Class unnecessarily.\n        // See PR #2972 for details.\n        return;\n    }\n    setattr((PyObject *) v_h.inst, \"__dict__\", d);\n}\n\n/// Implementation for py::pickle(GetState, SetState)\ntemplate <typename Get,\n          typename Set,\n          typename = function_signature_t<Get>,\n          typename = function_signature_t<Set>>\nstruct pickle_factory;\n\ntemplate <typename Get,\n          typename Set,\n          typename RetState,\n          typename Self,\n          typename NewInstance,\n          typename ArgState>\nstruct pickle_factory<Get, Set, RetState(Self), NewInstance(ArgState)> {\n    static_assert(std::is_same<intrinsic_t<RetState>, intrinsic_t<ArgState>>::value,\n                  \"The type returned by `__getstate__` must be the same \"\n                  \"as the argument accepted by `__setstate__`\");\n\n    remove_reference_t<Get> get;\n    remove_reference_t<Set> set;\n\n    pickle_factory(Get get, Set set) : get(std::forward<Get>(get)), set(std::forward<Set>(set)) {}\n\n    template <typename Class, typename... Extra>\n    void execute(Class &cl, const Extra &...extra) && {\n        cl.def(\"__getstate__\", std::move(get));\n\n#if defined(PYBIND11_CPP14)\n        cl.def(\n            \"__setstate__\",\n            [func = std::move(set)]\n#else\n        auto &func = set;\n        cl.def(\n            \"__setstate__\",\n            [func]\n#endif\n            (value_and_holder &v_h, ArgState state) {\n                setstate<Class>(\n                    v_h, func(std::forward<ArgState>(state)), Py_TYPE(v_h.inst) != v_h.type->type);\n            },\n            is_new_style_constructor(),\n            extra...);\n    }\n};\n\nPYBIND11_NAMESPACE_END(initimpl)\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/internals.h",
    "content": "/*\n    pybind11/detail/internals.h: Internal data structure and related functions\n\n    Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"common.h\"\n\n#if defined(WITH_THREAD) && defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)\n#    include \"../gil.h\"\n#endif\n\n#include \"../pytypes.h\"\n\n#include <exception>\n\n/// Tracks the `internals` and `type_info` ABI version independent of the main library version.\n///\n/// Some portions of the code use an ABI that is conditional depending on this\n/// version number.  That allows ABI-breaking changes to be \"pre-implemented\".\n/// Once the default version number is incremented, the conditional logic that\n/// no longer applies can be removed.  Additionally, users that need not\n/// maintain ABI compatibility can increase the version number in order to take\n/// advantage of any functionality/efficiency improvements that depend on the\n/// newer ABI.\n///\n/// WARNING: If you choose to manually increase the ABI version, note that\n/// pybind11 may not be tested as thoroughly with a non-default ABI version, and\n/// further ABI-incompatible changes may be made before the ABI is officially\n/// changed to the new version.\n#ifndef PYBIND11_INTERNALS_VERSION\n#    if PY_VERSION_HEX >= 0x030C0000\n// Version bump for Python 3.12+, before first 3.12 beta release.\n#        define PYBIND11_INTERNALS_VERSION 5\n#    else\n#        define PYBIND11_INTERNALS_VERSION 4\n#    endif\n#endif\n\n// This requirement is mainly to reduce the support burden (see PR #4570).\nstatic_assert(PY_VERSION_HEX < 0x030C0000 || PYBIND11_INTERNALS_VERSION >= 5,\n              \"pybind11 ABI version 5 is the minimum for Python 3.12+\");\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nusing ExceptionTranslator = void (*)(std::exception_ptr);\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\nconstexpr const char *internals_function_record_capsule_name = \"pybind11_function_record_capsule\";\n\n// Forward declarations\ninline PyTypeObject *make_static_property_type();\ninline PyTypeObject *make_default_metaclass();\ninline PyObject *make_object_base_type(PyTypeObject *metaclass);\n\n// The old Python Thread Local Storage (TLS) API is deprecated in Python 3.7 in favor of the new\n// Thread Specific Storage (TSS) API.\n#if PY_VERSION_HEX >= 0x03070000\n// Avoid unnecessary allocation of `Py_tss_t`, since we cannot use\n// `Py_LIMITED_API` anyway.\n#    if PYBIND11_INTERNALS_VERSION > 4\n#        define PYBIND11_TLS_KEY_REF Py_tss_t &\n#        if defined(__GNUC__) && !defined(__INTEL_COMPILER)\n// Clang on macOS warns due to `Py_tss_NEEDS_INIT` not specifying an initializer\n// for every field.\n#            define PYBIND11_TLS_KEY_INIT(var)                                                    \\\n                _Pragma(\"GCC diagnostic push\")                                         /**/       \\\n                    _Pragma(\"GCC diagnostic ignored \\\"-Wmissing-field-initializers\\\"\") /**/       \\\n                    Py_tss_t var                                                                  \\\n                    = Py_tss_NEEDS_INIT;                                                          \\\n                _Pragma(\"GCC diagnostic pop\")\n#        else\n#            define PYBIND11_TLS_KEY_INIT(var) Py_tss_t var = Py_tss_NEEDS_INIT;\n#        endif\n#        define PYBIND11_TLS_KEY_CREATE(var) (PyThread_tss_create(&(var)) == 0)\n#        define PYBIND11_TLS_GET_VALUE(key) PyThread_tss_get(&(key))\n#        define PYBIND11_TLS_REPLACE_VALUE(key, value) PyThread_tss_set(&(key), (value))\n#        define PYBIND11_TLS_DELETE_VALUE(key) PyThread_tss_set(&(key), nullptr)\n#        define PYBIND11_TLS_FREE(key) PyThread_tss_delete(&(key))\n#    else\n#        define PYBIND11_TLS_KEY_REF Py_tss_t *\n#        define PYBIND11_TLS_KEY_INIT(var) Py_tss_t *var = nullptr;\n#        define PYBIND11_TLS_KEY_CREATE(var)                                                      \\\n            (((var) = PyThread_tss_alloc()) != nullptr && (PyThread_tss_create((var)) == 0))\n#        define PYBIND11_TLS_GET_VALUE(key) PyThread_tss_get((key))\n#        define PYBIND11_TLS_REPLACE_VALUE(key, value) PyThread_tss_set((key), (value))\n#        define PYBIND11_TLS_DELETE_VALUE(key) PyThread_tss_set((key), nullptr)\n#        define PYBIND11_TLS_FREE(key) PyThread_tss_free(key)\n#    endif\n#else\n// Usually an int but a long on Cygwin64 with Python 3.x\n#    define PYBIND11_TLS_KEY_REF decltype(PyThread_create_key())\n#    define PYBIND11_TLS_KEY_INIT(var) PYBIND11_TLS_KEY_REF var = 0;\n#    define PYBIND11_TLS_KEY_CREATE(var) (((var) = PyThread_create_key()) != -1)\n#    define PYBIND11_TLS_GET_VALUE(key) PyThread_get_key_value((key))\n#    if defined(PYPY_VERSION)\n// On CPython < 3.4 and on PyPy, `PyThread_set_key_value` strangely does not set\n// the value if it has already been set.  Instead, it must first be deleted and\n// then set again.\ninline void tls_replace_value(PYBIND11_TLS_KEY_REF key, void *value) {\n    PyThread_delete_key_value(key);\n    PyThread_set_key_value(key, value);\n}\n#        define PYBIND11_TLS_DELETE_VALUE(key) PyThread_delete_key_value(key)\n#        define PYBIND11_TLS_REPLACE_VALUE(key, value)                                            \\\n            ::pybind11::detail::tls_replace_value((key), (value))\n#    else\n#        define PYBIND11_TLS_DELETE_VALUE(key) PyThread_set_key_value((key), nullptr)\n#        define PYBIND11_TLS_REPLACE_VALUE(key, value) PyThread_set_key_value((key), (value))\n#    endif\n#    define PYBIND11_TLS_FREE(key) (void) key\n#endif\n\n// Python loads modules by default with dlopen with the RTLD_LOCAL flag; under libc++ and possibly\n// other STLs, this means `typeid(A)` from one module won't equal `typeid(A)` from another module\n// even when `A` is the same, non-hidden-visibility type (e.g. from a common include).  Under\n// libstdc++, this doesn't happen: equality and the type_index hash are based on the type name,\n// which works.  If not under a known-good stl, provide our own name-based hash and equality\n// functions that use the type name.\n#if (PYBIND11_INTERNALS_VERSION <= 4 && defined(__GLIBCXX__))                                     \\\n    || (PYBIND11_INTERNALS_VERSION >= 5 && !defined(_LIBCPP_VERSION))\ninline bool same_type(const std::type_info &lhs, const std::type_info &rhs) { return lhs == rhs; }\nusing type_hash = std::hash<std::type_index>;\nusing type_equal_to = std::equal_to<std::type_index>;\n#else\ninline bool same_type(const std::type_info &lhs, const std::type_info &rhs) {\n    return lhs.name() == rhs.name() || std::strcmp(lhs.name(), rhs.name()) == 0;\n}\n\nstruct type_hash {\n    size_t operator()(const std::type_index &t) const {\n        size_t hash = 5381;\n        const char *ptr = t.name();\n        while (auto c = static_cast<unsigned char>(*ptr++)) {\n            hash = (hash * 33) ^ c;\n        }\n        return hash;\n    }\n};\n\nstruct type_equal_to {\n    bool operator()(const std::type_index &lhs, const std::type_index &rhs) const {\n        return lhs.name() == rhs.name() || std::strcmp(lhs.name(), rhs.name()) == 0;\n    }\n};\n#endif\n\ntemplate <typename value_type>\nusing type_map = std::unordered_map<std::type_index, value_type, type_hash, type_equal_to>;\n\nstruct override_hash {\n    inline size_t operator()(const std::pair<const PyObject *, const char *> &v) const {\n        size_t value = std::hash<const void *>()(v.first);\n        value ^= std::hash<const void *>()(v.second) + 0x9e3779b9 + (value << 6) + (value >> 2);\n        return value;\n    }\n};\n\n/// Internal data structure used to track registered instances and types.\n/// Whenever binary incompatible changes are made to this structure,\n/// `PYBIND11_INTERNALS_VERSION` must be incremented.\nstruct internals {\n    // std::type_index -> pybind11's type information\n    type_map<type_info *> registered_types_cpp;\n    // PyTypeObject* -> base type_info(s)\n    std::unordered_map<PyTypeObject *, std::vector<type_info *>> registered_types_py;\n    std::unordered_multimap<const void *, instance *> registered_instances; // void * -> instance*\n    std::unordered_set<std::pair<const PyObject *, const char *>, override_hash>\n        inactive_override_cache;\n    type_map<std::vector<bool (*)(PyObject *, void *&)>> direct_conversions;\n    std::unordered_map<const PyObject *, std::vector<PyObject *>> patients;\n    std::forward_list<ExceptionTranslator> registered_exception_translators;\n    std::unordered_map<std::string, void *> shared_data; // Custom data to be shared across\n                                                         // extensions\n#if PYBIND11_INTERNALS_VERSION == 4\n    std::vector<PyObject *> unused_loader_patient_stack_remove_at_v5;\n#endif\n    std::forward_list<std::string> static_strings; // Stores the std::strings backing\n                                                   // detail::c_str()\n    PyTypeObject *static_property_type;\n    PyTypeObject *default_metaclass;\n    PyObject *instance_base;\n#if defined(WITH_THREAD)\n    // Unused if PYBIND11_SIMPLE_GIL_MANAGEMENT is defined:\n    PYBIND11_TLS_KEY_INIT(tstate)\n#    if PYBIND11_INTERNALS_VERSION > 4\n    PYBIND11_TLS_KEY_INIT(loader_life_support_tls_key)\n#    endif // PYBIND11_INTERNALS_VERSION > 4\n    // Unused if PYBIND11_SIMPLE_GIL_MANAGEMENT is defined:\n    PyInterpreterState *istate = nullptr;\n\n#    if PYBIND11_INTERNALS_VERSION > 4\n    // Note that we have to use a std::string to allocate memory to ensure a unique address\n    // We want unique addresses since we use pointer equality to compare function records\n    std::string function_record_capsule_name = internals_function_record_capsule_name;\n#    endif\n\n    internals() = default;\n    internals(const internals &other) = delete;\n    internals &operator=(const internals &other) = delete;\n    ~internals() {\n#    if PYBIND11_INTERNALS_VERSION > 4\n        PYBIND11_TLS_FREE(loader_life_support_tls_key);\n#    endif // PYBIND11_INTERNALS_VERSION > 4\n\n        // This destructor is called *after* Py_Finalize() in finalize_interpreter().\n        // That *SHOULD BE* fine. The following details what happens when PyThread_tss_free is\n        // called. PYBIND11_TLS_FREE is PyThread_tss_free on python 3.7+. On older python, it does\n        // nothing. PyThread_tss_free calls PyThread_tss_delete and PyMem_RawFree.\n        // PyThread_tss_delete just calls TlsFree (on Windows) or pthread_key_delete (on *NIX).\n        // Neither of those have anything to do with CPython internals. PyMem_RawFree *requires*\n        // that the `tstate` be allocated with the CPython allocator.\n        PYBIND11_TLS_FREE(tstate);\n    }\n#endif\n};\n\n/// Additional type information which does not fit into the PyTypeObject.\n/// Changes to this struct also require bumping `PYBIND11_INTERNALS_VERSION`.\nstruct type_info {\n    PyTypeObject *type;\n    const std::type_info *cpptype;\n    size_t type_size, type_align, holder_size_in_ptrs;\n    void *(*operator_new)(size_t);\n    void (*init_instance)(instance *, const void *);\n    void (*dealloc)(value_and_holder &v_h);\n    std::vector<PyObject *(*) (PyObject *, PyTypeObject *)> implicit_conversions;\n    std::vector<std::pair<const std::type_info *, void *(*) (void *)>> implicit_casts;\n    std::vector<bool (*)(PyObject *, void *&)> *direct_conversions;\n    buffer_info *(*get_buffer)(PyObject *, void *) = nullptr;\n    void *get_buffer_data = nullptr;\n    void *(*module_local_load)(PyObject *, const type_info *) = nullptr;\n    /* A simple type never occurs as a (direct or indirect) parent\n     * of a class that makes use of multiple inheritance.\n     * A type can be simple even if it has non-simple ancestors as long as it has no descendants.\n     */\n    bool simple_type : 1;\n    /* True if there is no multiple inheritance in this type's inheritance tree */\n    bool simple_ancestors : 1;\n    /* for base vs derived holder_type checks */\n    bool default_holder : 1;\n    /* true if this is a type registered with py::module_local */\n    bool module_local : 1;\n};\n\n/// On MSVC, debug and release builds are not ABI-compatible!\n#if defined(_MSC_VER) && defined(_DEBUG)\n#    define PYBIND11_BUILD_TYPE \"_debug\"\n#else\n#    define PYBIND11_BUILD_TYPE \"\"\n#endif\n\n/// Let's assume that different compilers are ABI-incompatible.\n/// A user can manually set this string if they know their\n/// compiler is compatible.\n#ifndef PYBIND11_COMPILER_TYPE\n#    if defined(_MSC_VER)\n#        define PYBIND11_COMPILER_TYPE \"_msvc\"\n#    elif defined(__INTEL_COMPILER)\n#        define PYBIND11_COMPILER_TYPE \"_icc\"\n#    elif defined(__clang__)\n#        define PYBIND11_COMPILER_TYPE \"_clang\"\n#    elif defined(__PGI)\n#        define PYBIND11_COMPILER_TYPE \"_pgi\"\n#    elif defined(__MINGW32__)\n#        define PYBIND11_COMPILER_TYPE \"_mingw\"\n#    elif defined(__CYGWIN__)\n#        define PYBIND11_COMPILER_TYPE \"_gcc_cygwin\"\n#    elif defined(__GNUC__)\n#        define PYBIND11_COMPILER_TYPE \"_gcc\"\n#    else\n#        define PYBIND11_COMPILER_TYPE \"_unknown\"\n#    endif\n#endif\n\n/// Also standard libs\n#ifndef PYBIND11_STDLIB\n#    if defined(_LIBCPP_VERSION)\n#        define PYBIND11_STDLIB \"_libcpp\"\n#    elif defined(__GLIBCXX__) || defined(__GLIBCPP__)\n#        define PYBIND11_STDLIB \"_libstdcpp\"\n#    else\n#        define PYBIND11_STDLIB \"\"\n#    endif\n#endif\n\n/// On Linux/OSX, changes in __GXX_ABI_VERSION__ indicate ABI incompatibility.\n#ifndef PYBIND11_BUILD_ABI\n#    if defined(__GXX_ABI_VERSION)\n#        define PYBIND11_BUILD_ABI \"_cxxabi\" PYBIND11_TOSTRING(__GXX_ABI_VERSION)\n#    else\n#        define PYBIND11_BUILD_ABI \"\"\n#    endif\n#endif\n\n#ifndef PYBIND11_INTERNALS_KIND\n#    if defined(WITH_THREAD)\n#        define PYBIND11_INTERNALS_KIND \"\"\n#    else\n#        define PYBIND11_INTERNALS_KIND \"_without_thread\"\n#    endif\n#endif\n\n#define PYBIND11_INTERNALS_ID                                                                     \\\n    \"__pybind11_internals_v\" PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION)                        \\\n        PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI         \\\n            PYBIND11_BUILD_TYPE \"__\"\n\n#define PYBIND11_MODULE_LOCAL_ID                                                                  \\\n    \"__pybind11_module_local_v\" PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION)                     \\\n        PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI         \\\n            PYBIND11_BUILD_TYPE \"__\"\n\n/// Each module locally stores a pointer to the `internals` data. The data\n/// itself is shared among modules with the same `PYBIND11_INTERNALS_ID`.\ninline internals **&get_internals_pp() {\n    static internals **internals_pp = nullptr;\n    return internals_pp;\n}\n\n// forward decl\ninline void translate_exception(std::exception_ptr);\n\ntemplate <class T,\n          enable_if_t<std::is_same<std::nested_exception, remove_cvref_t<T>>::value, int> = 0>\nbool handle_nested_exception(const T &exc, const std::exception_ptr &p) {\n    std::exception_ptr nested = exc.nested_ptr();\n    if (nested != nullptr && nested != p) {\n        translate_exception(nested);\n        return true;\n    }\n    return false;\n}\n\ntemplate <class T,\n          enable_if_t<!std::is_same<std::nested_exception, remove_cvref_t<T>>::value, int> = 0>\nbool handle_nested_exception(const T &exc, const std::exception_ptr &p) {\n    if (const auto *nep = dynamic_cast<const std::nested_exception *>(std::addressof(exc))) {\n        return handle_nested_exception(*nep, p);\n    }\n    return false;\n}\n\ninline bool raise_err(PyObject *exc_type, const char *msg) {\n    if (PyErr_Occurred()) {\n        raise_from(exc_type, msg);\n        return true;\n    }\n    PyErr_SetString(exc_type, msg);\n    return false;\n}\n\ninline void translate_exception(std::exception_ptr p) {\n    if (!p) {\n        return;\n    }\n    try {\n        std::rethrow_exception(p);\n    } catch (error_already_set &e) {\n        handle_nested_exception(e, p);\n        e.restore();\n        return;\n    } catch (const builtin_exception &e) {\n        // Could not use template since it's an abstract class.\n        if (const auto *nep = dynamic_cast<const std::nested_exception *>(std::addressof(e))) {\n            handle_nested_exception(*nep, p);\n        }\n        e.set_error();\n        return;\n    } catch (const std::bad_alloc &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_MemoryError, e.what());\n        return;\n    } catch (const std::domain_error &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_ValueError, e.what());\n        return;\n    } catch (const std::invalid_argument &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_ValueError, e.what());\n        return;\n    } catch (const std::length_error &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_ValueError, e.what());\n        return;\n    } catch (const std::out_of_range &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_IndexError, e.what());\n        return;\n    } catch (const std::range_error &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_ValueError, e.what());\n        return;\n    } catch (const std::overflow_error &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_OverflowError, e.what());\n        return;\n    } catch (const std::exception &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_RuntimeError, e.what());\n        return;\n    } catch (const std::nested_exception &e) {\n        handle_nested_exception(e, p);\n        raise_err(PyExc_RuntimeError, \"Caught an unknown nested exception!\");\n        return;\n    } catch (...) {\n        raise_err(PyExc_RuntimeError, \"Caught an unknown exception!\");\n        return;\n    }\n}\n\n#if !defined(__GLIBCXX__)\ninline void translate_local_exception(std::exception_ptr p) {\n    try {\n        if (p) {\n            std::rethrow_exception(p);\n        }\n    } catch (error_already_set &e) {\n        e.restore();\n        return;\n    } catch (const builtin_exception &e) {\n        e.set_error();\n        return;\n    }\n}\n#endif\n\ninline object get_python_state_dict() {\n    object state_dict;\n#if PYBIND11_INTERNALS_VERSION <= 4 || PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION)\n    state_dict = reinterpret_borrow<object>(PyEval_GetBuiltins());\n#else\n#    if PY_VERSION_HEX < 0x03090000\n    PyInterpreterState *istate = _PyInterpreterState_Get();\n#    else\n    PyInterpreterState *istate = PyInterpreterState_Get();\n#    endif\n    if (istate) {\n        state_dict = reinterpret_borrow<object>(PyInterpreterState_GetDict(istate));\n    }\n#endif\n    if (!state_dict) {\n        raise_from(PyExc_SystemError, \"pybind11::detail::get_python_state_dict() FAILED\");\n    }\n    return state_dict;\n}\n\ninline object get_internals_obj_from_state_dict(handle state_dict) {\n    return reinterpret_borrow<object>(dict_getitemstring(state_dict.ptr(), PYBIND11_INTERNALS_ID));\n}\n\ninline internals **get_internals_pp_from_capsule(handle obj) {\n    void *raw_ptr = PyCapsule_GetPointer(obj.ptr(), /*name=*/nullptr);\n    if (raw_ptr == nullptr) {\n        raise_from(PyExc_SystemError, \"pybind11::detail::get_internals_pp_from_capsule() FAILED\");\n    }\n    return static_cast<internals **>(raw_ptr);\n}\n\n/// Return a reference to the current `internals` data\nPYBIND11_NOINLINE internals &get_internals() {\n    auto **&internals_pp = get_internals_pp();\n    if (internals_pp && *internals_pp) {\n        return **internals_pp;\n    }\n\n#if defined(WITH_THREAD)\n#    if defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)\n    gil_scoped_acquire gil;\n#    else\n    // Ensure that the GIL is held since we will need to make Python calls.\n    // Cannot use py::gil_scoped_acquire here since that constructor calls get_internals.\n    struct gil_scoped_acquire_local {\n        gil_scoped_acquire_local() : state(PyGILState_Ensure()) {}\n        gil_scoped_acquire_local(const gil_scoped_acquire_local &) = delete;\n        gil_scoped_acquire_local &operator=(const gil_scoped_acquire_local &) = delete;\n        ~gil_scoped_acquire_local() { PyGILState_Release(state); }\n        const PyGILState_STATE state;\n    } gil;\n#    endif\n#endif\n    error_scope err_scope;\n\n    dict state_dict = get_python_state_dict();\n    if (object internals_obj = get_internals_obj_from_state_dict(state_dict)) {\n        internals_pp = get_internals_pp_from_capsule(internals_obj);\n    }\n    if (internals_pp && *internals_pp) {\n        // We loaded the internals through `state_dict`, which means that our `error_already_set`\n        // and `builtin_exception` may be different local classes than the ones set up in the\n        // initial exception translator, below, so add another for our local exception classes.\n        //\n        // libstdc++ doesn't require this (types there are identified only by name)\n        // libc++ with CPython doesn't require this (types are explicitly exported)\n        // libc++ with PyPy still need it, awaiting further investigation\n#if !defined(__GLIBCXX__)\n        (*internals_pp)->registered_exception_translators.push_front(&translate_local_exception);\n#endif\n    } else {\n        if (!internals_pp) {\n            internals_pp = new internals *();\n        }\n        auto *&internals_ptr = *internals_pp;\n        internals_ptr = new internals();\n#if defined(WITH_THREAD)\n\n        PyThreadState *tstate = PyThreadState_Get();\n        // NOLINTNEXTLINE(bugprone-assignment-in-if-condition)\n        if (!PYBIND11_TLS_KEY_CREATE(internals_ptr->tstate)) {\n            pybind11_fail(\"get_internals: could not successfully initialize the tstate TSS key!\");\n        }\n        PYBIND11_TLS_REPLACE_VALUE(internals_ptr->tstate, tstate);\n\n#    if PYBIND11_INTERNALS_VERSION > 4\n        // NOLINTNEXTLINE(bugprone-assignment-in-if-condition)\n        if (!PYBIND11_TLS_KEY_CREATE(internals_ptr->loader_life_support_tls_key)) {\n            pybind11_fail(\"get_internals: could not successfully initialize the \"\n                          \"loader_life_support TSS key!\");\n        }\n#    endif\n        internals_ptr->istate = tstate->interp;\n#endif\n        state_dict[PYBIND11_INTERNALS_ID] = capsule(internals_pp);\n        internals_ptr->registered_exception_translators.push_front(&translate_exception);\n        internals_ptr->static_property_type = make_static_property_type();\n        internals_ptr->default_metaclass = make_default_metaclass();\n        internals_ptr->instance_base = make_object_base_type(internals_ptr->default_metaclass);\n    }\n    return **internals_pp;\n}\n\n// the internals struct (above) is shared between all the modules. local_internals are only\n// for a single module. Any changes made to internals may require an update to\n// PYBIND11_INTERNALS_VERSION, breaking backwards compatibility. local_internals is, by design,\n// restricted to a single module. Whether a module has local internals or not should not\n// impact any other modules, because the only things accessing the local internals is the\n// module that contains them.\nstruct local_internals {\n    type_map<type_info *> registered_types_cpp;\n    std::forward_list<ExceptionTranslator> registered_exception_translators;\n#if defined(WITH_THREAD) && PYBIND11_INTERNALS_VERSION == 4\n\n    // For ABI compatibility, we can't store the loader_life_support TLS key in\n    // the `internals` struct directly.  Instead, we store it in `shared_data` and\n    // cache a copy in `local_internals`.  If we allocated a separate TLS key for\n    // each instance of `local_internals`, we could end up allocating hundreds of\n    // TLS keys if hundreds of different pybind11 modules are loaded (which is a\n    // plausible number).\n    PYBIND11_TLS_KEY_INIT(loader_life_support_tls_key)\n\n    // Holds the shared TLS key for the loader_life_support stack.\n    struct shared_loader_life_support_data {\n        PYBIND11_TLS_KEY_INIT(loader_life_support_tls_key)\n        shared_loader_life_support_data() {\n            // NOLINTNEXTLINE(bugprone-assignment-in-if-condition)\n            if (!PYBIND11_TLS_KEY_CREATE(loader_life_support_tls_key)) {\n                pybind11_fail(\"local_internals: could not successfully initialize the \"\n                              \"loader_life_support TLS key!\");\n            }\n        }\n        // We can't help but leak the TLS key, because Python never unloads extension modules.\n    };\n\n    local_internals() {\n        auto &internals = get_internals();\n        // Get or create the `loader_life_support_stack_key`.\n        auto &ptr = internals.shared_data[\"_life_support\"];\n        if (!ptr) {\n            ptr = new shared_loader_life_support_data;\n        }\n        loader_life_support_tls_key\n            = static_cast<shared_loader_life_support_data *>(ptr)->loader_life_support_tls_key;\n    }\n#endif //  defined(WITH_THREAD) && PYBIND11_INTERNALS_VERSION == 4\n};\n\n/// Works like `get_internals`, but for things which are locally registered.\ninline local_internals &get_local_internals() {\n    // Current static can be created in the interpreter finalization routine. If the later will be\n    // destroyed in another static variable destructor, creation of this static there will cause\n    // static deinitialization fiasco. In order to avoid it we avoid destruction of the\n    // local_internals static. One can read more about the problem and current solution here:\n    // https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables\n    static auto *locals = new local_internals();\n    return *locals;\n}\n\n/// Constructs a std::string with the given arguments, stores it in `internals`, and returns its\n/// `c_str()`.  Such strings objects have a long storage duration -- the internal strings are only\n/// cleared when the program exits or after interpreter shutdown (when embedding), and so are\n/// suitable for c-style strings needed by Python internals (such as PyTypeObject's tp_name).\ntemplate <typename... Args>\nconst char *c_str(Args &&...args) {\n    auto &strings = get_internals().static_strings;\n    strings.emplace_front(std::forward<Args>(args)...);\n    return strings.front().c_str();\n}\n\ninline const char *get_function_record_capsule_name() {\n#if PYBIND11_INTERNALS_VERSION > 4\n    return get_internals().function_record_capsule_name.c_str();\n#else\n    return nullptr;\n#endif\n}\n\n// Determine whether or not the following capsule contains a pybind11 function record.\n// Note that we use `internals` to make sure that only ABI compatible records are touched.\n//\n// This check is currently used in two places:\n// - An important optimization in functional.h to avoid overhead in C++ -> Python -> C++\n// - The sibling feature of cpp_function to allow overloads\ninline bool is_function_record_capsule(const capsule &cap) {\n    // Pointer equality as we rely on internals() to ensure unique pointers\n    return cap.name() == get_function_record_capsule_name();\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Returns a named pointer that is shared among all extension modules (using the same\n/// pybind11 version) running in the current interpreter. Names starting with underscores\n/// are reserved for internal usage. Returns `nullptr` if no matching entry was found.\nPYBIND11_NOINLINE void *get_shared_data(const std::string &name) {\n    auto &internals = detail::get_internals();\n    auto it = internals.shared_data.find(name);\n    return it != internals.shared_data.end() ? it->second : nullptr;\n}\n\n/// Set the shared data that can be later recovered by `get_shared_data()`.\nPYBIND11_NOINLINE void *set_shared_data(const std::string &name, void *data) {\n    detail::get_internals().shared_data[name] = data;\n    return data;\n}\n\n/// Returns a typed reference to a shared data entry (by using `get_shared_data()`) if\n/// such entry exists. Otherwise, a new object of default-constructible type `T` is\n/// added to the shared data under the given name and a reference to it is returned.\ntemplate <typename T>\nT &get_or_create_shared_data(const std::string &name) {\n    auto &internals = detail::get_internals();\n    auto it = internals.shared_data.find(name);\n    T *ptr = (T *) (it != internals.shared_data.end() ? it->second : nullptr);\n    if (!ptr) {\n        ptr = new T();\n        internals.shared_data[name] = ptr;\n    }\n    return *ptr;\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/type_caster_base.h",
    "content": "/*\n    pybind11/detail/type_caster_base.h (originally first part of pybind11/cast.h)\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"../pytypes.h\"\n#include \"common.h\"\n#include \"descr.h\"\n#include \"internals.h\"\n#include \"typeid.h\"\n\n#include <cstdint>\n#include <iterator>\n#include <new>\n#include <string>\n#include <type_traits>\n#include <typeindex>\n#include <typeinfo>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// A life support system for temporary objects created by `type_caster::load()`.\n/// Adding a patient will keep it alive up until the enclosing function returns.\nclass loader_life_support {\nprivate:\n    loader_life_support *parent = nullptr;\n    std::unordered_set<PyObject *> keep_alive;\n\n#if defined(WITH_THREAD)\n    // Store stack pointer in thread-local storage.\n    static PYBIND11_TLS_KEY_REF get_stack_tls_key() {\n#    if PYBIND11_INTERNALS_VERSION == 4\n        return get_local_internals().loader_life_support_tls_key;\n#    else\n        return get_internals().loader_life_support_tls_key;\n#    endif\n    }\n    static loader_life_support *get_stack_top() {\n        return static_cast<loader_life_support *>(PYBIND11_TLS_GET_VALUE(get_stack_tls_key()));\n    }\n    static void set_stack_top(loader_life_support *value) {\n        PYBIND11_TLS_REPLACE_VALUE(get_stack_tls_key(), value);\n    }\n#else\n    // Use single global variable for stack.\n    static loader_life_support **get_stack_pp() {\n        static loader_life_support *global_stack = nullptr;\n        return global_stack;\n    }\n    static loader_life_support *get_stack_top() { return *get_stack_pp(); }\n    static void set_stack_top(loader_life_support *value) { *get_stack_pp() = value; }\n#endif\n\npublic:\n    /// A new patient frame is created when a function is entered\n    loader_life_support() : parent{get_stack_top()} { set_stack_top(this); }\n\n    /// ... and destroyed after it returns\n    ~loader_life_support() {\n        if (get_stack_top() != this) {\n            pybind11_fail(\"loader_life_support: internal error\");\n        }\n        set_stack_top(parent);\n        for (auto *item : keep_alive) {\n            Py_DECREF(item);\n        }\n    }\n\n    /// This can only be used inside a pybind11-bound function, either by `argument_loader`\n    /// at argument preparation time or by `py::cast()` at execution time.\n    PYBIND11_NOINLINE static void add_patient(handle h) {\n        loader_life_support *frame = get_stack_top();\n        if (!frame) {\n            // NOTE: It would be nice to include the stack frames here, as this indicates\n            // use of pybind11::cast<> outside the normal call framework, finding such\n            // a location is challenging. Developers could consider printing out\n            // stack frame addresses here using something like __builtin_frame_address(0)\n            throw cast_error(\"When called outside a bound function, py::cast() cannot \"\n                             \"do Python -> C++ conversions which require the creation \"\n                             \"of temporary values\");\n        }\n\n        if (frame->keep_alive.insert(h.ptr()).second) {\n            Py_INCREF(h.ptr());\n        }\n    }\n};\n\n// Gets the cache entry for the given type, creating it if necessary.  The return value is the pair\n// returned by emplace, i.e. an iterator for the entry and a bool set to `true` if the entry was\n// just created.\ninline std::pair<decltype(internals::registered_types_py)::iterator, bool>\nall_type_info_get_cache(PyTypeObject *type);\n\n// Populates a just-created cache entry.\nPYBIND11_NOINLINE void all_type_info_populate(PyTypeObject *t, std::vector<type_info *> &bases) {\n    std::vector<PyTypeObject *> check;\n    for (handle parent : reinterpret_borrow<tuple>(t->tp_bases)) {\n        check.push_back((PyTypeObject *) parent.ptr());\n    }\n\n    auto const &type_dict = get_internals().registered_types_py;\n    for (size_t i = 0; i < check.size(); i++) {\n        auto *type = check[i];\n        // Ignore Python2 old-style class super type:\n        if (!PyType_Check((PyObject *) type)) {\n            continue;\n        }\n\n        // Check `type` in the current set of registered python types:\n        auto it = type_dict.find(type);\n        if (it != type_dict.end()) {\n            // We found a cache entry for it, so it's either pybind-registered or has pre-computed\n            // pybind bases, but we have to make sure we haven't already seen the type(s) before:\n            // we want to follow Python/virtual C++ rules that there should only be one instance of\n            // a common base.\n            for (auto *tinfo : it->second) {\n                // NB: Could use a second set here, rather than doing a linear search, but since\n                // having a large number of immediate pybind11-registered types seems fairly\n                // unlikely, that probably isn't worthwhile.\n                bool found = false;\n                for (auto *known : bases) {\n                    if (known == tinfo) {\n                        found = true;\n                        break;\n                    }\n                }\n                if (!found) {\n                    bases.push_back(tinfo);\n                }\n            }\n        } else if (type->tp_bases) {\n            // It's some python type, so keep follow its bases classes to look for one or more\n            // registered types\n            if (i + 1 == check.size()) {\n                // When we're at the end, we can pop off the current element to avoid growing\n                // `check` when adding just one base (which is typical--i.e. when there is no\n                // multiple inheritance)\n                check.pop_back();\n                i--;\n            }\n            for (handle parent : reinterpret_borrow<tuple>(type->tp_bases)) {\n                check.push_back((PyTypeObject *) parent.ptr());\n            }\n        }\n    }\n}\n\n/**\n * Extracts vector of type_info pointers of pybind-registered roots of the given Python type.  Will\n * be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side\n * derived class that uses single inheritance.  Will contain as many types as required for a Python\n * class that uses multiple inheritance to inherit (directly or indirectly) from multiple\n * pybind-registered classes.  Will be empty if neither the type nor any base classes are\n * pybind-registered.\n *\n * The value is cached for the lifetime of the Python type.\n */\ninline const std::vector<detail::type_info *> &all_type_info(PyTypeObject *type) {\n    auto ins = all_type_info_get_cache(type);\n    if (ins.second) {\n        // New cache entry: populate it\n        all_type_info_populate(type, ins.first->second);\n    }\n\n    return ins.first->second;\n}\n\n/**\n * Gets a single pybind11 type info for a python type.  Returns nullptr if neither the type nor any\n * ancestors are pybind11-registered.  Throws an exception if there are multiple bases--use\n * `all_type_info` instead if you want to support multiple bases.\n */\nPYBIND11_NOINLINE detail::type_info *get_type_info(PyTypeObject *type) {\n    const auto &bases = all_type_info(type);\n    if (bases.empty()) {\n        return nullptr;\n    }\n    if (bases.size() > 1) {\n        pybind11_fail(\n            \"pybind11::detail::get_type_info: type has multiple pybind11-registered bases\");\n    }\n    return bases.front();\n}\n\ninline detail::type_info *get_local_type_info(const std::type_index &tp) {\n    auto &locals = get_local_internals().registered_types_cpp;\n    auto it = locals.find(tp);\n    if (it != locals.end()) {\n        return it->second;\n    }\n    return nullptr;\n}\n\ninline detail::type_info *get_global_type_info(const std::type_index &tp) {\n    auto &types = get_internals().registered_types_cpp;\n    auto it = types.find(tp);\n    if (it != types.end()) {\n        return it->second;\n    }\n    return nullptr;\n}\n\n/// Return the type info for a given C++ type; on lookup failure can either throw or return\n/// nullptr.\nPYBIND11_NOINLINE detail::type_info *get_type_info(const std::type_index &tp,\n                                                   bool throw_if_missing = false) {\n    if (auto *ltype = get_local_type_info(tp)) {\n        return ltype;\n    }\n    if (auto *gtype = get_global_type_info(tp)) {\n        return gtype;\n    }\n\n    if (throw_if_missing) {\n        std::string tname = tp.name();\n        detail::clean_type_id(tname);\n        pybind11_fail(\"pybind11::detail::get_type_info: unable to find type info for \\\"\"\n                      + std::move(tname) + '\"');\n    }\n    return nullptr;\n}\n\nPYBIND11_NOINLINE handle get_type_handle(const std::type_info &tp, bool throw_if_missing) {\n    detail::type_info *type_info = get_type_info(tp, throw_if_missing);\n    return handle(type_info ? ((PyObject *) type_info->type) : nullptr);\n}\n\n// Searches the inheritance graph for a registered Python instance, using all_type_info().\nPYBIND11_NOINLINE handle find_registered_python_instance(void *src,\n                                                         const detail::type_info *tinfo) {\n    auto it_instances = get_internals().registered_instances.equal_range(src);\n    for (auto it_i = it_instances.first; it_i != it_instances.second; ++it_i) {\n        for (auto *instance_type : detail::all_type_info(Py_TYPE(it_i->second))) {\n            if (instance_type && same_type(*instance_type->cpptype, *tinfo->cpptype)) {\n                return handle((PyObject *) it_i->second).inc_ref();\n            }\n        }\n    }\n    return handle();\n}\n\nstruct value_and_holder {\n    instance *inst = nullptr;\n    size_t index = 0u;\n    const detail::type_info *type = nullptr;\n    void **vh = nullptr;\n\n    // Main constructor for a found value/holder:\n    value_and_holder(instance *i, const detail::type_info *type, size_t vpos, size_t index)\n        : inst{i}, index{index}, type{type},\n          vh{inst->simple_layout ? inst->simple_value_holder\n                                 : &inst->nonsimple.values_and_holders[vpos]} {}\n\n    // Default constructor (used to signal a value-and-holder not found by get_value_and_holder())\n    value_and_holder() = default;\n\n    // Used for past-the-end iterator\n    explicit value_and_holder(size_t index) : index{index} {}\n\n    template <typename V = void>\n    V *&value_ptr() const {\n        return reinterpret_cast<V *&>(vh[0]);\n    }\n    // True if this `value_and_holder` has a non-null value pointer\n    explicit operator bool() const { return value_ptr() != nullptr; }\n\n    template <typename H>\n    H &holder() const {\n        return reinterpret_cast<H &>(vh[1]);\n    }\n    bool holder_constructed() const {\n        return inst->simple_layout\n                   ? inst->simple_holder_constructed\n                   : (inst->nonsimple.status[index] & instance::status_holder_constructed) != 0u;\n    }\n    // NOLINTNEXTLINE(readability-make-member-function-const)\n    void set_holder_constructed(bool v = true) {\n        if (inst->simple_layout) {\n            inst->simple_holder_constructed = v;\n        } else if (v) {\n            inst->nonsimple.status[index] |= instance::status_holder_constructed;\n        } else {\n            inst->nonsimple.status[index] &= (std::uint8_t) ~instance::status_holder_constructed;\n        }\n    }\n    bool instance_registered() const {\n        return inst->simple_layout\n                   ? inst->simple_instance_registered\n                   : ((inst->nonsimple.status[index] & instance::status_instance_registered) != 0);\n    }\n    // NOLINTNEXTLINE(readability-make-member-function-const)\n    void set_instance_registered(bool v = true) {\n        if (inst->simple_layout) {\n            inst->simple_instance_registered = v;\n        } else if (v) {\n            inst->nonsimple.status[index] |= instance::status_instance_registered;\n        } else {\n            inst->nonsimple.status[index] &= (std::uint8_t) ~instance::status_instance_registered;\n        }\n    }\n};\n\n// Container for accessing and iterating over an instance's values/holders\nstruct values_and_holders {\nprivate:\n    instance *inst;\n    using type_vec = std::vector<detail::type_info *>;\n    const type_vec &tinfo;\n\npublic:\n    explicit values_and_holders(instance *inst)\n        : inst{inst}, tinfo(all_type_info(Py_TYPE(inst))) {}\n\n    struct iterator {\n    private:\n        instance *inst = nullptr;\n        const type_vec *types = nullptr;\n        value_and_holder curr;\n        friend struct values_and_holders;\n        iterator(instance *inst, const type_vec *tinfo)\n            : inst{inst}, types{tinfo},\n              curr(inst /* instance */,\n                   types->empty() ? nullptr : (*types)[0] /* type info */,\n                   0, /* vpos: (non-simple types only): the first vptr comes first */\n                   0 /* index */) {}\n        // Past-the-end iterator:\n        explicit iterator(size_t end) : curr(end) {}\n\n    public:\n        bool operator==(const iterator &other) const { return curr.index == other.curr.index; }\n        bool operator!=(const iterator &other) const { return curr.index != other.curr.index; }\n        iterator &operator++() {\n            if (!inst->simple_layout) {\n                curr.vh += 1 + (*types)[curr.index]->holder_size_in_ptrs;\n            }\n            ++curr.index;\n            curr.type = curr.index < types->size() ? (*types)[curr.index] : nullptr;\n            return *this;\n        }\n        value_and_holder &operator*() { return curr; }\n        value_and_holder *operator->() { return &curr; }\n    };\n\n    iterator begin() { return iterator(inst, &tinfo); }\n    iterator end() { return iterator(tinfo.size()); }\n\n    iterator find(const type_info *find_type) {\n        auto it = begin(), endit = end();\n        while (it != endit && it->type != find_type) {\n            ++it;\n        }\n        return it;\n    }\n\n    size_t size() { return tinfo.size(); }\n};\n\n/**\n * Extracts C++ value and holder pointer references from an instance (which may contain multiple\n * values/holders for python-side multiple inheritance) that match the given type.  Throws an error\n * if the given type (or ValueType, if omitted) is not a pybind11 base of the given instance.  If\n * `find_type` is omitted (or explicitly specified as nullptr) the first value/holder are returned,\n * regardless of type (and the resulting .type will be nullptr).\n *\n * The returned object should be short-lived: in particular, it must not outlive the called-upon\n * instance.\n */\nPYBIND11_NOINLINE value_and_holder\ninstance::get_value_and_holder(const type_info *find_type /*= nullptr default in common.h*/,\n                               bool throw_if_missing /*= true in common.h*/) {\n    // Optimize common case:\n    if (!find_type || Py_TYPE(this) == find_type->type) {\n        return value_and_holder(this, find_type, 0, 0);\n    }\n\n    detail::values_and_holders vhs(this);\n    auto it = vhs.find(find_type);\n    if (it != vhs.end()) {\n        return *it;\n    }\n\n    if (!throw_if_missing) {\n        return value_and_holder();\n    }\n\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n    pybind11_fail(\"pybind11::detail::instance::get_value_and_holder: `\"\n                  + get_fully_qualified_tp_name(find_type->type)\n                  + \"' is not a pybind11 base of the given `\"\n                  + get_fully_qualified_tp_name(Py_TYPE(this)) + \"' instance\");\n#else\n    pybind11_fail(\n        \"pybind11::detail::instance::get_value_and_holder: \"\n        \"type is not a pybind11 base of the given instance \"\n        \"(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for type details)\");\n#endif\n}\n\nPYBIND11_NOINLINE void instance::allocate_layout() {\n    const auto &tinfo = all_type_info(Py_TYPE(this));\n\n    const size_t n_types = tinfo.size();\n\n    if (n_types == 0) {\n        pybind11_fail(\n            \"instance allocation failed: new instance has no pybind11-registered base types\");\n    }\n\n    simple_layout\n        = n_types == 1 && tinfo.front()->holder_size_in_ptrs <= instance_simple_holder_in_ptrs();\n\n    // Simple path: no python-side multiple inheritance, and a small-enough holder\n    if (simple_layout) {\n        simple_value_holder[0] = nullptr;\n        simple_holder_constructed = false;\n        simple_instance_registered = false;\n    } else { // multiple base types or a too-large holder\n        // Allocate space to hold: [v1*][h1][v2*][h2]...[bb...] where [vN*] is a value pointer,\n        // [hN] is the (uninitialized) holder instance for value N, and [bb...] is a set of bool\n        // values that tracks whether each associated holder has been initialized.  Each [block] is\n        // padded, if necessary, to an integer multiple of sizeof(void *).\n        size_t space = 0;\n        for (auto *t : tinfo) {\n            space += 1;                      // value pointer\n            space += t->holder_size_in_ptrs; // holder instance\n        }\n        size_t flags_at = space;\n        space += size_in_ptrs(n_types); // status bytes (holder_constructed and\n                                        // instance_registered)\n\n        // Allocate space for flags, values, and holders, and initialize it to 0 (flags and values,\n        // in particular, need to be 0).  Use Python's memory allocation\n        // functions: Python is using pymalloc, which is designed to be\n        // efficient for small allocations like the one we're doing here;\n        // for larger allocations they are just wrappers around malloc.\n        // TODO: is this still true for pure Python 3.6?\n        nonsimple.values_and_holders = (void **) PyMem_Calloc(space, sizeof(void *));\n        if (!nonsimple.values_and_holders) {\n            throw std::bad_alloc();\n        }\n        nonsimple.status\n            = reinterpret_cast<std::uint8_t *>(&nonsimple.values_and_holders[flags_at]);\n    }\n    owned = true;\n}\n\n// NOLINTNEXTLINE(readability-make-member-function-const)\nPYBIND11_NOINLINE void instance::deallocate_layout() {\n    if (!simple_layout) {\n        PyMem_Free(nonsimple.values_and_holders);\n    }\n}\n\nPYBIND11_NOINLINE bool isinstance_generic(handle obj, const std::type_info &tp) {\n    handle type = detail::get_type_handle(tp, false);\n    if (!type) {\n        return false;\n    }\n    return isinstance(obj, type);\n}\n\nPYBIND11_NOINLINE handle get_object_handle(const void *ptr, const detail::type_info *type) {\n    auto &instances = get_internals().registered_instances;\n    auto range = instances.equal_range(ptr);\n    for (auto it = range.first; it != range.second; ++it) {\n        for (const auto &vh : values_and_holders(it->second)) {\n            if (vh.type == type) {\n                return handle((PyObject *) it->second);\n            }\n        }\n    }\n    return handle();\n}\n\ninline PyThreadState *get_thread_state_unchecked() {\n#if defined(PYPY_VERSION)\n    return PyThreadState_GET();\n#else\n    return _PyThreadState_UncheckedGet();\n#endif\n}\n\n// Forward declarations\nvoid keep_alive_impl(handle nurse, handle patient);\ninline PyObject *make_new_instance(PyTypeObject *type);\n\nclass type_caster_generic {\npublic:\n    PYBIND11_NOINLINE explicit type_caster_generic(const std::type_info &type_info)\n        : typeinfo(get_type_info(type_info)), cpptype(&type_info) {}\n\n    explicit type_caster_generic(const type_info *typeinfo)\n        : typeinfo(typeinfo), cpptype(typeinfo ? typeinfo->cpptype : nullptr) {}\n\n    bool load(handle src, bool convert) { return load_impl<type_caster_generic>(src, convert); }\n\n    PYBIND11_NOINLINE static handle cast(const void *_src,\n                                         return_value_policy policy,\n                                         handle parent,\n                                         const detail::type_info *tinfo,\n                                         void *(*copy_constructor)(const void *),\n                                         void *(*move_constructor)(const void *),\n                                         const void *existing_holder = nullptr) {\n        if (!tinfo) { // no type info: error will be set already\n            return handle();\n        }\n\n        void *src = const_cast<void *>(_src);\n        if (src == nullptr) {\n            return none().release();\n        }\n\n        if (handle registered_inst = find_registered_python_instance(src, tinfo)) {\n            return registered_inst;\n        }\n\n        auto inst = reinterpret_steal<object>(make_new_instance(tinfo->type));\n        auto *wrapper = reinterpret_cast<instance *>(inst.ptr());\n        wrapper->owned = false;\n        void *&valueptr = values_and_holders(wrapper).begin()->value_ptr();\n\n        switch (policy) {\n            case return_value_policy::automatic:\n            case return_value_policy::take_ownership:\n                valueptr = src;\n                wrapper->owned = true;\n                break;\n\n            case return_value_policy::automatic_reference:\n            case return_value_policy::reference:\n                valueptr = src;\n                wrapper->owned = false;\n                break;\n\n            case return_value_policy::copy:\n                if (copy_constructor) {\n                    valueptr = copy_constructor(src);\n                } else {\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                    std::string type_name(tinfo->cpptype->name());\n                    detail::clean_type_id(type_name);\n                    throw cast_error(\"return_value_policy = copy, but type \" + type_name\n                                     + \" is non-copyable!\");\n#else\n                    throw cast_error(\"return_value_policy = copy, but type is \"\n                                     \"non-copyable! (#define PYBIND11_DETAILED_ERROR_MESSAGES or \"\n                                     \"compile in debug mode for details)\");\n#endif\n                }\n                wrapper->owned = true;\n                break;\n\n            case return_value_policy::move:\n                if (move_constructor) {\n                    valueptr = move_constructor(src);\n                } else if (copy_constructor) {\n                    valueptr = copy_constructor(src);\n                } else {\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                    std::string type_name(tinfo->cpptype->name());\n                    detail::clean_type_id(type_name);\n                    throw cast_error(\"return_value_policy = move, but type \" + type_name\n                                     + \" is neither movable nor copyable!\");\n#else\n                    throw cast_error(\"return_value_policy = move, but type is neither \"\n                                     \"movable nor copyable! \"\n                                     \"(#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in \"\n                                     \"debug mode for details)\");\n#endif\n                }\n                wrapper->owned = true;\n                break;\n\n            case return_value_policy::reference_internal:\n                valueptr = src;\n                wrapper->owned = false;\n                keep_alive_impl(inst, parent);\n                break;\n\n            default:\n                throw cast_error(\"unhandled return_value_policy: should not happen!\");\n        }\n\n        tinfo->init_instance(wrapper, existing_holder);\n\n        return inst.release();\n    }\n\n    // Base methods for generic caster; there are overridden in copyable_holder_caster\n    void load_value(value_and_holder &&v_h) {\n        auto *&vptr = v_h.value_ptr();\n        // Lazy allocation for unallocated values:\n        if (vptr == nullptr) {\n            const auto *type = v_h.type ? v_h.type : typeinfo;\n            if (type->operator_new) {\n                vptr = type->operator_new(type->type_size);\n            } else {\n#if defined(__cpp_aligned_new) && (!defined(_MSC_VER) || _MSC_VER >= 1912)\n                if (type->type_align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) {\n                    vptr = ::operator new(type->type_size, std::align_val_t(type->type_align));\n                } else {\n                    vptr = ::operator new(type->type_size);\n                }\n#else\n                vptr = ::operator new(type->type_size);\n#endif\n            }\n        }\n        value = vptr;\n    }\n    bool try_implicit_casts(handle src, bool convert) {\n        for (const auto &cast : typeinfo->implicit_casts) {\n            type_caster_generic sub_caster(*cast.first);\n            if (sub_caster.load(src, convert)) {\n                value = cast.second(sub_caster.value);\n                return true;\n            }\n        }\n        return false;\n    }\n    bool try_direct_conversions(handle src) {\n        for (auto &converter : *typeinfo->direct_conversions) {\n            if (converter(src.ptr(), value)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    void check_holder_compat() {}\n\n    PYBIND11_NOINLINE static void *local_load(PyObject *src, const type_info *ti) {\n        auto caster = type_caster_generic(ti);\n        if (caster.load(src, false)) {\n            return caster.value;\n        }\n        return nullptr;\n    }\n\n    /// Try to load with foreign typeinfo, if available. Used when there is no\n    /// native typeinfo, or when the native one wasn't able to produce a value.\n    PYBIND11_NOINLINE bool try_load_foreign_module_local(handle src) {\n        constexpr auto *local_key = PYBIND11_MODULE_LOCAL_ID;\n        const auto pytype = type::handle_of(src);\n        if (!hasattr(pytype, local_key)) {\n            return false;\n        }\n\n        type_info *foreign_typeinfo = reinterpret_borrow<capsule>(getattr(pytype, local_key));\n        // Only consider this foreign loader if actually foreign and is a loader of the correct cpp\n        // type\n        if (foreign_typeinfo->module_local_load == &local_load\n            || (cpptype && !same_type(*cpptype, *foreign_typeinfo->cpptype))) {\n            return false;\n        }\n\n        if (auto *result = foreign_typeinfo->module_local_load(src.ptr(), foreign_typeinfo)) {\n            value = result;\n            return true;\n        }\n        return false;\n    }\n\n    // Implementation of `load`; this takes the type of `this` so that it can dispatch the relevant\n    // bits of code between here and copyable_holder_caster where the two classes need different\n    // logic (without having to resort to virtual inheritance).\n    template <typename ThisT>\n    PYBIND11_NOINLINE bool load_impl(handle src, bool convert) {\n        if (!src) {\n            return false;\n        }\n        if (!typeinfo) {\n            return try_load_foreign_module_local(src);\n        }\n\n        auto &this_ = static_cast<ThisT &>(*this);\n        this_.check_holder_compat();\n\n        PyTypeObject *srctype = Py_TYPE(src.ptr());\n\n        // Case 1: If src is an exact type match for the target type then we can reinterpret_cast\n        // the instance's value pointer to the target type:\n        if (srctype == typeinfo->type) {\n            this_.load_value(reinterpret_cast<instance *>(src.ptr())->get_value_and_holder());\n            return true;\n        }\n        // Case 2: We have a derived class\n        if (PyType_IsSubtype(srctype, typeinfo->type)) {\n            const auto &bases = all_type_info(srctype);\n            bool no_cpp_mi = typeinfo->simple_type;\n\n            // Case 2a: the python type is a Python-inherited derived class that inherits from just\n            // one simple (no MI) pybind11 class, or is an exact match, so the C++ instance is of\n            // the right type and we can use reinterpret_cast.\n            // (This is essentially the same as case 2b, but because not using multiple inheritance\n            // is extremely common, we handle it specially to avoid the loop iterator and type\n            // pointer lookup overhead)\n            if (bases.size() == 1 && (no_cpp_mi || bases.front()->type == typeinfo->type)) {\n                this_.load_value(reinterpret_cast<instance *>(src.ptr())->get_value_and_holder());\n                return true;\n            }\n            // Case 2b: the python type inherits from multiple C++ bases.  Check the bases to see\n            // if we can find an exact match (or, for a simple C++ type, an inherited match); if\n            // so, we can safely reinterpret_cast to the relevant pointer.\n            if (bases.size() > 1) {\n                for (auto *base : bases) {\n                    if (no_cpp_mi ? PyType_IsSubtype(base->type, typeinfo->type)\n                                  : base->type == typeinfo->type) {\n                        this_.load_value(\n                            reinterpret_cast<instance *>(src.ptr())->get_value_and_holder(base));\n                        return true;\n                    }\n                }\n            }\n\n            // Case 2c: C++ multiple inheritance is involved and we couldn't find an exact type\n            // match in the registered bases, above, so try implicit casting (needed for proper C++\n            // casting when MI is involved).\n            if (this_.try_implicit_casts(src, convert)) {\n                return true;\n            }\n        }\n\n        // Perform an implicit conversion\n        if (convert) {\n            for (const auto &converter : typeinfo->implicit_conversions) {\n                auto temp = reinterpret_steal<object>(converter(src.ptr(), typeinfo->type));\n                if (load_impl<ThisT>(temp, false)) {\n                    loader_life_support::add_patient(temp);\n                    return true;\n                }\n            }\n            if (this_.try_direct_conversions(src)) {\n                return true;\n            }\n        }\n\n        // Failed to match local typeinfo. Try again with global.\n        if (typeinfo->module_local) {\n            if (auto *gtype = get_global_type_info(*typeinfo->cpptype)) {\n                typeinfo = gtype;\n                return load(src, false);\n            }\n        }\n\n        // Global typeinfo has precedence over foreign module_local\n        if (try_load_foreign_module_local(src)) {\n            return true;\n        }\n\n        // Custom converters didn't take None, now we convert None to nullptr.\n        if (src.is_none()) {\n            // Defer accepting None to other overloads (if we aren't in convert mode):\n            if (!convert) {\n                return false;\n            }\n            value = nullptr;\n            return true;\n        }\n\n        return false;\n    }\n\n    // Called to do type lookup and wrap the pointer and type in a pair when a dynamic_cast\n    // isn't needed or can't be used.  If the type is unknown, sets the error and returns a pair\n    // with .second = nullptr.  (p.first = nullptr is not an error: it becomes None).\n    PYBIND11_NOINLINE static std::pair<const void *, const type_info *>\n    src_and_type(const void *src,\n                 const std::type_info &cast_type,\n                 const std::type_info *rtti_type = nullptr) {\n        if (auto *tpi = get_type_info(cast_type)) {\n            return {src, const_cast<const type_info *>(tpi)};\n        }\n\n        // Not found, set error:\n        std::string tname = rtti_type ? rtti_type->name() : cast_type.name();\n        detail::clean_type_id(tname);\n        std::string msg = \"Unregistered type : \" + tname;\n        PyErr_SetString(PyExc_TypeError, msg.c_str());\n        return {nullptr, nullptr};\n    }\n\n    const type_info *typeinfo = nullptr;\n    const std::type_info *cpptype = nullptr;\n    void *value = nullptr;\n};\n\n/**\n * Determine suitable casting operator for pointer-or-lvalue-casting type casters.  The type caster\n * needs to provide `operator T*()` and `operator T&()` operators.\n *\n * If the type supports moving the value away via an `operator T&&() &&` method, it should use\n * `movable_cast_op_type` instead.\n */\ntemplate <typename T>\nusing cast_op_type = conditional_t<std::is_pointer<remove_reference_t<T>>::value,\n                                   typename std::add_pointer<intrinsic_t<T>>::type,\n                                   typename std::add_lvalue_reference<intrinsic_t<T>>::type>;\n\n/**\n * Determine suitable casting operator for a type caster with a movable value.  Such a type caster\n * needs to provide `operator T*()`, `operator T&()`, and `operator T&&() &&`.  The latter will be\n * called in appropriate contexts where the value can be moved rather than copied.\n *\n * These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro.\n */\ntemplate <typename T>\nusing movable_cast_op_type\n    = conditional_t<std::is_pointer<typename std::remove_reference<T>::type>::value,\n                    typename std::add_pointer<intrinsic_t<T>>::type,\n                    conditional_t<std::is_rvalue_reference<T>::value,\n                                  typename std::add_rvalue_reference<intrinsic_t<T>>::type,\n                                  typename std::add_lvalue_reference<intrinsic_t<T>>::type>>;\n\n// Does the container have a mapped type and is it recursive?\n// Implemented by specializations below.\ntemplate <typename Container, typename SFINAE = void>\nstruct container_mapped_type_traits {\n    static constexpr bool has_mapped_type = false;\n    static constexpr bool has_recursive_mapped_type = false;\n};\n\ntemplate <typename Container>\nstruct container_mapped_type_traits<\n    Container,\n    typename std::enable_if<\n        std::is_same<typename Container::mapped_type, Container>::value>::type> {\n    static constexpr bool has_mapped_type = true;\n    static constexpr bool has_recursive_mapped_type = true;\n};\n\ntemplate <typename Container>\nstruct container_mapped_type_traits<\n    Container,\n    typename std::enable_if<\n        negation<std::is_same<typename Container::mapped_type, Container>>::value>::type> {\n    static constexpr bool has_mapped_type = true;\n    static constexpr bool has_recursive_mapped_type = false;\n};\n\n// Does the container have a value type and is it recursive?\n// Implemented by specializations below.\ntemplate <typename Container, typename SFINAE = void>\nstruct container_value_type_traits : std::false_type {\n    static constexpr bool has_value_type = false;\n    static constexpr bool has_recursive_value_type = false;\n};\n\ntemplate <typename Container>\nstruct container_value_type_traits<\n    Container,\n    typename std::enable_if<\n        std::is_same<typename Container::value_type, Container>::value>::type> {\n    static constexpr bool has_value_type = true;\n    static constexpr bool has_recursive_value_type = true;\n};\n\ntemplate <typename Container>\nstruct container_value_type_traits<\n    Container,\n    typename std::enable_if<\n        negation<std::is_same<typename Container::value_type, Container>>::value>::type> {\n    static constexpr bool has_value_type = true;\n    static constexpr bool has_recursive_value_type = false;\n};\n\n/*\n * Tag to be used for representing the bottom of recursively defined types.\n * Define this tag so we don't have to use void.\n */\nstruct recursive_bottom {};\n\n/*\n * Implementation detail of `recursive_container_traits` below.\n * `T` is the `value_type` of the container, which might need to be modified to\n * avoid recursive types and const types.\n */\ntemplate <typename T, bool is_this_a_map>\nstruct impl_type_to_check_recursively {\n    /*\n     * If the container is recursive, then no further recursion should be done.\n     */\n    using if_recursive = recursive_bottom;\n    /*\n     * Otherwise yield `T` unchanged.\n     */\n    using if_not_recursive = T;\n};\n\n/*\n * For pairs - only as value type of a map -, the first type should remove the `const`.\n * Also, if the map is recursive, then the recursive checking should consider\n * the first type only.\n */\ntemplate <typename A, typename B>\nstruct impl_type_to_check_recursively<std::pair<A, B>, /* is_this_a_map = */ true> {\n    using if_recursive = typename std::remove_const<A>::type;\n    using if_not_recursive = std::pair<typename std::remove_const<A>::type, B>;\n};\n\n/*\n * Implementation of `recursive_container_traits` below.\n */\ntemplate <typename Container, typename SFINAE = void>\nstruct impl_recursive_container_traits {\n    using type_to_check_recursively = recursive_bottom;\n};\n\ntemplate <typename Container>\nstruct impl_recursive_container_traits<\n    Container,\n    typename std::enable_if<container_value_type_traits<Container>::has_value_type>::type> {\n    static constexpr bool is_recursive\n        = container_mapped_type_traits<Container>::has_recursive_mapped_type\n          || container_value_type_traits<Container>::has_recursive_value_type;\n    /*\n     * This member dictates which type Pybind11 should check recursively in traits\n     * such as `is_move_constructible`, `is_copy_constructible`, `is_move_assignable`, ...\n     * Direct access to `value_type` should be avoided:\n     * 1. `value_type` might recursively contain the type again\n     * 2. `value_type` of STL map types is `std::pair<A const, B>`, the `const`\n     *    should be removed.\n     *\n     */\n    using type_to_check_recursively = typename std::conditional<\n        is_recursive,\n        typename impl_type_to_check_recursively<\n            typename Container::value_type,\n            container_mapped_type_traits<Container>::has_mapped_type>::if_recursive,\n        typename impl_type_to_check_recursively<\n            typename Container::value_type,\n            container_mapped_type_traits<Container>::has_mapped_type>::if_not_recursive>::type;\n};\n\n/*\n * This trait defines the `type_to_check_recursively` which is needed to properly\n * handle recursively defined traits such as `is_move_constructible` without going\n * into an infinite recursion.\n * Should be used instead of directly accessing the `value_type`.\n * It cancels the recursion by returning the `recursive_bottom` tag.\n *\n * The default definition of `type_to_check_recursively` is as follows:\n *\n * 1. By default, it is `recursive_bottom`, so that the recursion is canceled.\n * 2. If the type is non-recursive and defines a `value_type`, then the `value_type` is used.\n *    If the `value_type` is a pair and a `mapped_type` is defined,\n *    then the `const` is removed from the first type.\n * 3. If the type is recursive and `value_type` is not a pair, then `recursive_bottom` is returned.\n * 4. If the type is recursive and `value_type` is a pair and a `mapped_type` is defined,\n *    then `const` is removed from the first type and the first type is returned.\n *\n * This behavior can be extended by the user as seen in test_stl_binders.cpp.\n *\n * This struct is exactly the same as impl_recursive_container_traits.\n * The duplication achieves that user-defined specializations don't compete\n * with internal specializations, but take precedence.\n */\ntemplate <typename Container, typename SFINAE = void>\nstruct recursive_container_traits : impl_recursive_container_traits<Container> {};\n\ntemplate <typename T>\nstruct is_move_constructible\n    : all_of<std::is_move_constructible<T>,\n             is_move_constructible<\n                 typename recursive_container_traits<T>::type_to_check_recursively>> {};\n\ntemplate <>\nstruct is_move_constructible<recursive_bottom> : std::true_type {};\n\n// Likewise for std::pair\n// (after C++17 it is mandatory that the move constructor not exist when the two types aren't\n// themselves move constructible, but this can not be relied upon when T1 or T2 are themselves\n// containers).\ntemplate <typename T1, typename T2>\nstruct is_move_constructible<std::pair<T1, T2>>\n    : all_of<is_move_constructible<T1>, is_move_constructible<T2>> {};\n\n// std::is_copy_constructible isn't quite enough: it lets std::vector<T> (and similar) through when\n// T is non-copyable, but code containing such a copy constructor fails to actually compile.\ntemplate <typename T>\nstruct is_copy_constructible\n    : all_of<std::is_copy_constructible<T>,\n             is_copy_constructible<\n                 typename recursive_container_traits<T>::type_to_check_recursively>> {};\n\ntemplate <>\nstruct is_copy_constructible<recursive_bottom> : std::true_type {};\n\n// Likewise for std::pair\n// (after C++17 it is mandatory that the copy constructor not exist when the two types aren't\n// themselves copy constructible, but this can not be relied upon when T1 or T2 are themselves\n// containers).\ntemplate <typename T1, typename T2>\nstruct is_copy_constructible<std::pair<T1, T2>>\n    : all_of<is_copy_constructible<T1>, is_copy_constructible<T2>> {};\n\n// The same problems arise with std::is_copy_assignable, so we use the same workaround.\ntemplate <typename T>\nstruct is_copy_assignable\n    : all_of<\n          std::is_copy_assignable<T>,\n          is_copy_assignable<typename recursive_container_traits<T>::type_to_check_recursively>> {\n};\n\ntemplate <>\nstruct is_copy_assignable<recursive_bottom> : std::true_type {};\n\ntemplate <typename T1, typename T2>\nstruct is_copy_assignable<std::pair<T1, T2>>\n    : all_of<is_copy_assignable<T1>, is_copy_assignable<T2>> {};\n\nPYBIND11_NAMESPACE_END(detail)\n\n// polymorphic_type_hook<itype>::get(src, tinfo) determines whether the object pointed\n// to by `src` actually is an instance of some class derived from `itype`.\n// If so, it sets `tinfo` to point to the std::type_info representing that derived\n// type, and returns a pointer to the start of the most-derived object of that type\n// (in which `src` is a subobject; this will be the same address as `src` in most\n// single inheritance cases). If not, or if `src` is nullptr, it simply returns `src`\n// and leaves `tinfo` at its default value of nullptr.\n//\n// The default polymorphic_type_hook just returns src. A specialization for polymorphic\n// types determines the runtime type of the passed object and adjusts the this-pointer\n// appropriately via dynamic_cast<void*>. This is what enables a C++ Animal* to appear\n// to Python as a Dog (if Dog inherits from Animal, Animal is polymorphic, Dog is\n// registered with pybind11, and this Animal is in fact a Dog).\n//\n// You may specialize polymorphic_type_hook yourself for types that want to appear\n// polymorphic to Python but do not use C++ RTTI. (This is a not uncommon pattern\n// in performance-sensitive applications, used most notably in LLVM.)\n//\n// polymorphic_type_hook_base allows users to specialize polymorphic_type_hook with\n// std::enable_if. User provided specializations will always have higher priority than\n// the default implementation and specialization provided in polymorphic_type_hook_base.\ntemplate <typename itype, typename SFINAE = void>\nstruct polymorphic_type_hook_base {\n    static const void *get(const itype *src, const std::type_info *&) { return src; }\n};\ntemplate <typename itype>\nstruct polymorphic_type_hook_base<itype, detail::enable_if_t<std::is_polymorphic<itype>::value>> {\n    static const void *get(const itype *src, const std::type_info *&type) {\n        type = src ? &typeid(*src) : nullptr;\n        return dynamic_cast<const void *>(src);\n    }\n};\ntemplate <typename itype, typename SFINAE = void>\nstruct polymorphic_type_hook : public polymorphic_type_hook_base<itype> {};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// Generic type caster for objects stored on the heap\ntemplate <typename type>\nclass type_caster_base : public type_caster_generic {\n    using itype = intrinsic_t<type>;\n\npublic:\n    static constexpr auto name = const_name<type>();\n\n    type_caster_base() : type_caster_base(typeid(type)) {}\n    explicit type_caster_base(const std::type_info &info) : type_caster_generic(info) {}\n\n    static handle cast(const itype &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast(&src, policy, parent);\n    }\n\n    static handle cast(itype &&src, return_value_policy, handle parent) {\n        return cast(&src, return_value_policy::move, parent);\n    }\n\n    // Returns a (pointer, type_info) pair taking care of necessary type lookup for a\n    // polymorphic type (using RTTI by default, but can be overridden by specializing\n    // polymorphic_type_hook). If the instance isn't derived, returns the base version.\n    static std::pair<const void *, const type_info *> src_and_type(const itype *src) {\n        const auto &cast_type = typeid(itype);\n        const std::type_info *instance_type = nullptr;\n        const void *vsrc = polymorphic_type_hook<itype>::get(src, instance_type);\n        if (instance_type && !same_type(cast_type, *instance_type)) {\n            // This is a base pointer to a derived type. If the derived type is registered\n            // with pybind11, we want to make the full derived object available.\n            // In the typical case where itype is polymorphic, we get the correct\n            // derived pointer (which may be != base pointer) by a dynamic_cast to\n            // most derived type. If itype is not polymorphic, we won't get here\n            // except via a user-provided specialization of polymorphic_type_hook,\n            // and the user has promised that no this-pointer adjustment is\n            // required in that case, so it's OK to use static_cast.\n            if (const auto *tpi = get_type_info(*instance_type)) {\n                return {vsrc, tpi};\n            }\n        }\n        // Otherwise we have either a nullptr, an `itype` pointer, or an unknown derived pointer,\n        // so don't do a cast\n        return type_caster_generic::src_and_type(src, cast_type, instance_type);\n    }\n\n    static handle cast(const itype *src, return_value_policy policy, handle parent) {\n        auto st = src_and_type(src);\n        return type_caster_generic::cast(st.first,\n                                         policy,\n                                         parent,\n                                         st.second,\n                                         make_copy_constructor(src),\n                                         make_move_constructor(src));\n    }\n\n    static handle cast_holder(const itype *src, const void *holder) {\n        auto st = src_and_type(src);\n        return type_caster_generic::cast(st.first,\n                                         return_value_policy::take_ownership,\n                                         {},\n                                         st.second,\n                                         nullptr,\n                                         nullptr,\n                                         holder);\n    }\n\n    template <typename T>\n    using cast_op_type = detail::cast_op_type<T>;\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator itype *() { return (type *) value; }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator itype &() {\n        if (!value) {\n            throw reference_cast_error();\n        }\n        return *((itype *) value);\n    }\n\nprotected:\n    using Constructor = void *(*) (const void *);\n\n    /* Only enabled when the types are {copy,move}-constructible *and* when the type\n       does not have a private operator new implementation. A comma operator is used in the\n       decltype argument to apply SFINAE to the public copy/move constructors.*/\n    template <typename T, typename = enable_if_t<is_copy_constructible<T>::value>>\n    static auto make_copy_constructor(const T *)\n        -> decltype(new T(std::declval<const T>()), Constructor{}) {\n        return [](const void *arg) -> void * { return new T(*reinterpret_cast<const T *>(arg)); };\n    }\n\n    template <typename T, typename = enable_if_t<is_move_constructible<T>::value>>\n    static auto make_move_constructor(const T *)\n        -> decltype(new T(std::declval<T &&>()), Constructor{}) {\n        return [](const void *arg) -> void * {\n            return new T(std::move(*const_cast<T *>(reinterpret_cast<const T *>(arg))));\n        };\n    }\n\n    static Constructor make_copy_constructor(...) { return nullptr; }\n    static Constructor make_move_constructor(...) { return nullptr; }\n};\n\nPYBIND11_NOINLINE std::string type_info_description(const std::type_info &ti) {\n    if (auto *type_data = get_type_info(ti)) {\n        handle th((PyObject *) type_data->type);\n        return th.attr(\"__module__\").cast<std::string>() + '.'\n               + th.attr(\"__qualname__\").cast<std::string>();\n    }\n    return clean_type_id(ti.name());\n}\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/detail/typeid.h",
    "content": "/*\n    pybind11/detail/typeid.h: Compiler-independent access to type identifiers\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include <cstdio>\n#include <cstdlib>\n\n#if defined(__GNUG__)\n#    include <cxxabi.h>\n#endif\n\n#include \"common.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// Erase all occurrences of a substring\ninline void erase_all(std::string &string, const std::string &search) {\n    for (size_t pos = 0;;) {\n        pos = string.find(search, pos);\n        if (pos == std::string::npos) {\n            break;\n        }\n        string.erase(pos, search.length());\n    }\n}\n\nPYBIND11_NOINLINE void clean_type_id(std::string &name) {\n#if defined(__GNUG__)\n    int status = 0;\n    std::unique_ptr<char, void (*)(void *)> res{\n        abi::__cxa_demangle(name.c_str(), nullptr, nullptr, &status), std::free};\n    if (status == 0) {\n        name = res.get();\n    }\n#else\n    detail::erase_all(name, \"class \");\n    detail::erase_all(name, \"struct \");\n    detail::erase_all(name, \"enum \");\n#endif\n    detail::erase_all(name, \"pybind11::\");\n}\n\ninline std::string clean_type_id(const char *typeid_name) {\n    std::string name(typeid_name);\n    detail::clean_type_id(name);\n    return name;\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Return a string representation of a C++ type\ntemplate <typename T>\nstatic std::string type_id() {\n    return detail::clean_type_id(typeid(T).name());\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/eigen/common.h",
    "content": "// Copyright (c) 2023 The pybind Community.\n\n#pragma once\n\n// Common message for `static_assert()`s, which are useful to easily\n// preempt much less obvious errors.\n#define PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED                                    \\\n    \"Pointer types (in particular `PyObject *`) are not supported as scalar types for Eigen \"     \\\n    \"types.\"\n"
  },
  {
    "path": "modules/juce_python/pybind11/eigen/matrix.h",
    "content": "/*\n    pybind11/eigen/matrix.h: Transparent conversion for dense and sparse Eigen matrices\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"../numpy.h\"\n#include \"common.h\"\n\n/* HINT: To suppress warnings originating from the Eigen headers, use -isystem.\n   See also:\n       https://stackoverflow.com/questions/2579576/i-dir-vs-isystem-dir\n       https://stackoverflow.com/questions/1741816/isystem-for-ms-visual-studio-c-compiler\n*/\nPYBIND11_WARNING_PUSH\nPYBIND11_WARNING_DISABLE_MSVC(5054) // https://github.com/pybind/pybind11/pull/3741\n//       C5054: operator '&': deprecated between enumerations of different types\n#if defined(__MINGW32__)\nPYBIND11_WARNING_DISABLE_GCC(\"-Wmaybe-uninitialized\")\n#endif\n\n#include <Eigen/Core>\n#include <Eigen/SparseCore>\n\nPYBIND11_WARNING_POP\n\n// Eigen prior to 3.2.7 doesn't have proper move constructors--but worse, some classes get implicit\n// move constructors that break things.  We could detect this an explicitly copy, but an extra copy\n// of matrices seems highly undesirable.\nstatic_assert(EIGEN_VERSION_AT_LEAST(3, 2, 7),\n              \"Eigen matrix support in pybind11 requires Eigen >= 3.2.7\");\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\n// Provide a convenience alias for easier pass-by-ref usage with fully dynamic strides:\nusing EigenDStride = Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>;\ntemplate <typename MatrixType>\nusing EigenDRef = Eigen::Ref<MatrixType, 0, EigenDStride>;\ntemplate <typename MatrixType>\nusing EigenDMap = Eigen::Map<MatrixType, 0, EigenDStride>;\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n#if EIGEN_VERSION_AT_LEAST(3, 3, 0)\nusing EigenIndex = Eigen::Index;\ntemplate <typename Scalar, int Flags, typename StorageIndex>\nusing EigenMapSparseMatrix = Eigen::Map<Eigen::SparseMatrix<Scalar, Flags, StorageIndex>>;\n#else\nusing EigenIndex = EIGEN_DEFAULT_DENSE_INDEX_TYPE;\ntemplate <typename Scalar, int Flags, typename StorageIndex>\nusing EigenMapSparseMatrix = Eigen::MappedSparseMatrix<Scalar, Flags, StorageIndex>;\n#endif\n\n// Matches Eigen::Map, Eigen::Ref, blocks, etc:\ntemplate <typename T>\nusing is_eigen_dense_map = all_of<is_template_base_of<Eigen::DenseBase, T>,\n                                  std::is_base_of<Eigen::MapBase<T, Eigen::ReadOnlyAccessors>, T>>;\ntemplate <typename T>\nusing is_eigen_mutable_map = std::is_base_of<Eigen::MapBase<T, Eigen::WriteAccessors>, T>;\ntemplate <typename T>\nusing is_eigen_dense_plain\n    = all_of<negation<is_eigen_dense_map<T>>, is_template_base_of<Eigen::PlainObjectBase, T>>;\ntemplate <typename T>\nusing is_eigen_sparse = is_template_base_of<Eigen::SparseMatrixBase, T>;\n// Test for objects inheriting from EigenBase<Derived> that aren't captured by the above.  This\n// basically covers anything that can be assigned to a dense matrix but that don't have a typical\n// matrix data layout that can be copied from their .data().  For example, DiagonalMatrix and\n// SelfAdjointView fall into this category.\ntemplate <typename T>\nusing is_eigen_other\n    = all_of<is_template_base_of<Eigen::EigenBase, T>,\n             negation<any_of<is_eigen_dense_map<T>, is_eigen_dense_plain<T>, is_eigen_sparse<T>>>>;\n\n// Captures numpy/eigen conformability status (returned by EigenProps::conformable()):\ntemplate <bool EigenRowMajor>\nstruct EigenConformable {\n    bool conformable = false;\n    EigenIndex rows = 0, cols = 0;\n    EigenDStride stride{0, 0};    // Only valid if negativestrides is false!\n    bool negativestrides = false; // If true, do not use stride!\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    EigenConformable(bool fits = false) : conformable{fits} {}\n    // Matrix type:\n    EigenConformable(EigenIndex r, EigenIndex c, EigenIndex rstride, EigenIndex cstride)\n        : conformable{true}, rows{r}, cols{c},\n          // TODO: when Eigen bug #747 is fixed, remove the tests for non-negativity.\n          // http://eigen.tuxfamily.org/bz/show_bug.cgi?id=747\n          stride{EigenRowMajor ? (rstride > 0 ? rstride : 0)\n                               : (cstride > 0 ? cstride : 0) /* outer stride */,\n                 EigenRowMajor ? (cstride > 0 ? cstride : 0)\n                               : (rstride > 0 ? rstride : 0) /* inner stride */},\n          negativestrides{rstride < 0 || cstride < 0} {}\n    // Vector type:\n    EigenConformable(EigenIndex r, EigenIndex c, EigenIndex stride)\n        : EigenConformable(r, c, r == 1 ? c * stride : stride, c == 1 ? r : r * stride) {}\n\n    template <typename props>\n    bool stride_compatible() const {\n        // To have compatible strides, we need (on both dimensions) one of fully dynamic strides,\n        // matching strides, or a dimension size of 1 (in which case the stride value is\n        // irrelevant). Alternatively, if any dimension size is 0, the strides are not relevant\n        // (and numpy ≥ 1.23 sets the strides to 0 in that case, so we need to check explicitly).\n        if (negativestrides) {\n            return false;\n        }\n        if (rows == 0 || cols == 0) {\n            return true;\n        }\n        return (props::inner_stride == Eigen::Dynamic || props::inner_stride == stride.inner()\n                || (EigenRowMajor ? cols : rows) == 1)\n               && (props::outer_stride == Eigen::Dynamic || props::outer_stride == stride.outer()\n                   || (EigenRowMajor ? rows : cols) == 1);\n    }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator bool() const { return conformable; }\n};\n\ntemplate <typename Type>\nstruct eigen_extract_stride {\n    using type = Type;\n};\ntemplate <typename PlainObjectType, int MapOptions, typename StrideType>\nstruct eigen_extract_stride<Eigen::Map<PlainObjectType, MapOptions, StrideType>> {\n    using type = StrideType;\n};\ntemplate <typename PlainObjectType, int Options, typename StrideType>\nstruct eigen_extract_stride<Eigen::Ref<PlainObjectType, Options, StrideType>> {\n    using type = StrideType;\n};\n\n// Helper struct for extracting information from an Eigen type\ntemplate <typename Type_>\nstruct EigenProps {\n    using Type = Type_;\n    using Scalar = typename Type::Scalar;\n    using StrideType = typename eigen_extract_stride<Type>::type;\n    static constexpr EigenIndex rows = Type::RowsAtCompileTime, cols = Type::ColsAtCompileTime,\n                                size = Type::SizeAtCompileTime;\n    static constexpr bool row_major = Type::IsRowMajor,\n                          vector\n                          = Type::IsVectorAtCompileTime, // At least one dimension has fixed size 1\n        fixed_rows = rows != Eigen::Dynamic, fixed_cols = cols != Eigen::Dynamic,\n                          fixed = size != Eigen::Dynamic, // Fully-fixed size\n        dynamic = !fixed_rows && !fixed_cols;             // Fully-dynamic size\n\n    template <EigenIndex i, EigenIndex ifzero>\n    using if_zero = std::integral_constant<EigenIndex, i == 0 ? ifzero : i>;\n    static constexpr EigenIndex inner_stride\n        = if_zero<StrideType::InnerStrideAtCompileTime, 1>::value,\n        outer_stride = if_zero < StrideType::OuterStrideAtCompileTime,\n        vector      ? size\n        : row_major ? cols\n                    : rows > ::value;\n    static constexpr bool dynamic_stride\n        = inner_stride == Eigen::Dynamic && outer_stride == Eigen::Dynamic;\n    static constexpr bool requires_row_major\n        = !dynamic_stride && !vector && (row_major ? inner_stride : outer_stride) == 1;\n    static constexpr bool requires_col_major\n        = !dynamic_stride && !vector && (row_major ? outer_stride : inner_stride) == 1;\n\n    // Takes an input array and determines whether we can make it fit into the Eigen type.  If\n    // the array is a vector, we attempt to fit it into either an Eigen 1xN or Nx1 vector\n    // (preferring the latter if it will fit in either, i.e. for a fully dynamic matrix type).\n    static EigenConformable<row_major> conformable(const array &a) {\n        const auto dims = a.ndim();\n        if (dims < 1 || dims > 2) {\n            return false;\n        }\n\n        if (dims == 2) { // Matrix type: require exact match (or dynamic)\n\n            EigenIndex np_rows = a.shape(0), np_cols = a.shape(1),\n                       np_rstride = a.strides(0) / static_cast<ssize_t>(sizeof(Scalar)),\n                       np_cstride = a.strides(1) / static_cast<ssize_t>(sizeof(Scalar));\n            if ((fixed_rows && np_rows != rows) || (fixed_cols && np_cols != cols)) {\n                return false;\n            }\n\n            return {np_rows, np_cols, np_rstride, np_cstride};\n        }\n\n        // Otherwise we're storing an n-vector.  Only one of the strides will be used, but\n        // whichever is used, we want the (single) numpy stride value.\n        const EigenIndex n = a.shape(0),\n                         stride = a.strides(0) / static_cast<ssize_t>(sizeof(Scalar));\n\n        if (vector) { // Eigen type is a compile-time vector\n            if (fixed && size != n) {\n                return false; // Vector size mismatch\n            }\n            return {rows == 1 ? 1 : n, cols == 1 ? 1 : n, stride};\n        }\n        if (fixed) {\n            // The type has a fixed size, but is not a vector: abort\n            return false;\n        }\n        if (fixed_cols) {\n            // Since this isn't a vector, cols must be != 1.  We allow this only if it exactly\n            // equals the number of elements (rows is Dynamic, and so 1 row is allowed).\n            if (cols != n) {\n                return false;\n            }\n            return {1, n, stride};\n        } // Otherwise it's either fully dynamic, or column dynamic; both become a column vector\n        if (fixed_rows && rows != n) {\n            return false;\n        }\n        return {n, 1, stride};\n    }\n\n    static constexpr bool show_writeable\n        = is_eigen_dense_map<Type>::value && is_eigen_mutable_map<Type>::value;\n    static constexpr bool show_order = is_eigen_dense_map<Type>::value;\n    static constexpr bool show_c_contiguous = show_order && requires_row_major;\n    static constexpr bool show_f_contiguous\n        = !show_c_contiguous && show_order && requires_col_major;\n\n    static constexpr auto descriptor\n        = const_name(\"numpy.ndarray[\") + npy_format_descriptor<Scalar>::name + const_name(\"[\")\n          + const_name<fixed_rows>(const_name<(size_t) rows>(), const_name(\"m\")) + const_name(\", \")\n          + const_name<fixed_cols>(const_name<(size_t) cols>(), const_name(\"n\")) + const_name(\"]\")\n          +\n          // For a reference type (e.g. Ref<MatrixXd>) we have other constraints that might need to\n          // be satisfied: writeable=True (for a mutable reference), and, depending on the map's\n          // stride options, possibly f_contiguous or c_contiguous.  We include them in the\n          // descriptor output to provide some hint as to why a TypeError is occurring (otherwise\n          // it can be confusing to see that a function accepts a 'numpy.ndarray[float64[3,2]]' and\n          // an error message that you *gave* a numpy.ndarray of the right type and dimensions.\n          const_name<show_writeable>(\", flags.writeable\", \"\")\n          + const_name<show_c_contiguous>(\", flags.c_contiguous\", \"\")\n          + const_name<show_f_contiguous>(\", flags.f_contiguous\", \"\") + const_name(\"]\");\n};\n\n// Casts an Eigen type to numpy array.  If given a base, the numpy array references the src data,\n// otherwise it'll make a copy.  writeable lets you turn off the writeable flag for the array.\ntemplate <typename props>\nhandle\neigen_array_cast(typename props::Type const &src, handle base = handle(), bool writeable = true) {\n    constexpr ssize_t elem_size = sizeof(typename props::Scalar);\n    array a;\n    if (props::vector) {\n        a = array({src.size()}, {elem_size * src.innerStride()}, src.data(), base);\n    } else {\n        a = array({src.rows(), src.cols()},\n                  {elem_size * src.rowStride(), elem_size * src.colStride()},\n                  src.data(),\n                  base);\n    }\n\n    if (!writeable) {\n        array_proxy(a.ptr())->flags &= ~detail::npy_api::NPY_ARRAY_WRITEABLE_;\n    }\n\n    return a.release();\n}\n\n// Takes an lvalue ref to some Eigen type and a (python) base object, creating a numpy array that\n// reference the Eigen object's data with `base` as the python-registered base class (if omitted,\n// the base will be set to None, and lifetime management is up to the caller).  The numpy array is\n// non-writeable if the given type is const.\ntemplate <typename props, typename Type>\nhandle eigen_ref_array(Type &src, handle parent = none()) {\n    // none here is to get past array's should-we-copy detection, which currently always\n    // copies when there is no base.  Setting the base to None should be harmless.\n    return eigen_array_cast<props>(src, parent, !std::is_const<Type>::value);\n}\n\n// Takes a pointer to some dense, plain Eigen type, builds a capsule around it, then returns a\n// numpy array that references the encapsulated data with a python-side reference to the capsule to\n// tie its destruction to that of any dependent python objects.  Const-ness is determined by\n// whether or not the Type of the pointer given is const.\ntemplate <typename props, typename Type, typename = enable_if_t<is_eigen_dense_plain<Type>::value>>\nhandle eigen_encapsulate(Type *src) {\n    capsule base(src, [](void *o) { delete static_cast<Type *>(o); });\n    return eigen_ref_array<props>(*src, base);\n}\n\n// Type caster for regular, dense matrix types (e.g. MatrixXd), but not maps/refs/etc. of dense\n// types.\ntemplate <typename Type>\nstruct type_caster<Type, enable_if_t<is_eigen_dense_plain<Type>::value>> {\n    using Scalar = typename Type::Scalar;\n    static_assert(!std::is_pointer<Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n    using props = EigenProps<Type>;\n\n    bool load(handle src, bool convert) {\n        // If we're in no-convert mode, only load if given an array of the correct type\n        if (!convert && !isinstance<array_t<Scalar>>(src)) {\n            return false;\n        }\n\n        // Coerce into an array, but don't do type conversion yet; the copy below handles it.\n        auto buf = array::ensure(src);\n\n        if (!buf) {\n            return false;\n        }\n\n        auto dims = buf.ndim();\n        if (dims < 1 || dims > 2) {\n            return false;\n        }\n\n        auto fits = props::conformable(buf);\n        if (!fits) {\n            return false;\n        }\n\n        // Allocate the new type, then build a numpy reference into it\n        value = Type(fits.rows, fits.cols);\n        auto ref = reinterpret_steal<array>(eigen_ref_array<props>(value));\n        if (dims == 1) {\n            ref = ref.squeeze();\n        } else if (ref.ndim() == 1) {\n            buf = buf.squeeze();\n        }\n\n        int result = detail::npy_api::get().PyArray_CopyInto_(ref.ptr(), buf.ptr());\n\n        if (result < 0) { // Copy failed!\n            PyErr_Clear();\n            return false;\n        }\n\n        return true;\n    }\n\nprivate:\n    // Cast implementation\n    template <typename CType>\n    static handle cast_impl(CType *src, return_value_policy policy, handle parent) {\n        switch (policy) {\n            case return_value_policy::take_ownership:\n            case return_value_policy::automatic:\n                return eigen_encapsulate<props>(src);\n            case return_value_policy::move:\n                return eigen_encapsulate<props>(new CType(std::move(*src)));\n            case return_value_policy::copy:\n                return eigen_array_cast<props>(*src);\n            case return_value_policy::reference:\n            case return_value_policy::automatic_reference:\n                return eigen_ref_array<props>(*src);\n            case return_value_policy::reference_internal:\n                return eigen_ref_array<props>(*src, parent);\n            default:\n                throw cast_error(\"unhandled return_value_policy: should not happen!\");\n        };\n    }\n\npublic:\n    // Normal returned non-reference, non-const value:\n    static handle cast(Type &&src, return_value_policy /* policy */, handle parent) {\n        return cast_impl(&src, return_value_policy::move, parent);\n    }\n    // If you return a non-reference const, we mark the numpy array readonly:\n    static handle cast(const Type &&src, return_value_policy /* policy */, handle parent) {\n        return cast_impl(&src, return_value_policy::move, parent);\n    }\n    // lvalue reference return; default (automatic) becomes copy\n    static handle cast(Type &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast_impl(&src, policy, parent);\n    }\n    // const lvalue reference return; default (automatic) becomes copy\n    static handle cast(const Type &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast(&src, policy, parent);\n    }\n    // non-const pointer return\n    static handle cast(Type *src, return_value_policy policy, handle parent) {\n        return cast_impl(src, policy, parent);\n    }\n    // const pointer return\n    static handle cast(const Type *src, return_value_policy policy, handle parent) {\n        return cast_impl(src, policy, parent);\n    }\n\n    static constexpr auto name = props::descriptor;\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator Type *() { return &value; }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator Type &() { return value; }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator Type &&() && { return std::move(value); }\n    template <typename T>\n    using cast_op_type = movable_cast_op_type<T>;\n\nprivate:\n    Type value;\n};\n\n// Base class for casting reference/map/block/etc. objects back to python.\ntemplate <typename MapType>\nstruct eigen_map_caster {\n    static_assert(!std::is_pointer<typename MapType::Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n\nprivate:\n    using props = EigenProps<MapType>;\n\npublic:\n    // Directly referencing a ref/map's data is a bit dangerous (whatever the map/ref points to has\n    // to stay around), but we'll allow it under the assumption that you know what you're doing\n    // (and have an appropriate keep_alive in place).  We return a numpy array pointing directly at\n    // the ref's data (The numpy array ends up read-only if the ref was to a const matrix type.)\n    // Note that this means you need to ensure you don't destroy the object in some other way (e.g.\n    // with an appropriate keep_alive, or with a reference to a statically allocated matrix).\n    static handle cast(const MapType &src, return_value_policy policy, handle parent) {\n        switch (policy) {\n            case return_value_policy::copy:\n                return eigen_array_cast<props>(src);\n            case return_value_policy::reference_internal:\n                return eigen_array_cast<props>(src, parent, is_eigen_mutable_map<MapType>::value);\n            case return_value_policy::reference:\n            case return_value_policy::automatic:\n            case return_value_policy::automatic_reference:\n                return eigen_array_cast<props>(src, none(), is_eigen_mutable_map<MapType>::value);\n            default:\n                // move, take_ownership don't make any sense for a ref/map:\n                pybind11_fail(\"Invalid return_value_policy for Eigen Map/Ref/Block type\");\n        }\n    }\n\n    static constexpr auto name = props::descriptor;\n\n    // Explicitly delete these: support python -> C++ conversion on these (i.e. these can be return\n    // types but not bound arguments).  We still provide them (with an explicitly delete) so that\n    // you end up here if you try anyway.\n    bool load(handle, bool) = delete;\n    operator MapType() = delete;\n    template <typename>\n    using cast_op_type = MapType;\n};\n\n// We can return any map-like object (but can only load Refs, specialized next):\ntemplate <typename Type>\nstruct type_caster<Type, enable_if_t<is_eigen_dense_map<Type>::value>> : eigen_map_caster<Type> {};\n\n// Loader for Ref<...> arguments.  See the documentation for info on how to make this work without\n// copying (it requires some extra effort in many cases).\ntemplate <typename PlainObjectType, typename StrideType>\nstruct type_caster<\n    Eigen::Ref<PlainObjectType, 0, StrideType>,\n    enable_if_t<is_eigen_dense_map<Eigen::Ref<PlainObjectType, 0, StrideType>>::value>>\n    : public eigen_map_caster<Eigen::Ref<PlainObjectType, 0, StrideType>> {\nprivate:\n    using Type = Eigen::Ref<PlainObjectType, 0, StrideType>;\n    using props = EigenProps<Type>;\n    using Scalar = typename props::Scalar;\n    static_assert(!std::is_pointer<Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n    using MapType = Eigen::Map<PlainObjectType, 0, StrideType>;\n    using Array\n        = array_t<Scalar,\n                  array::forcecast\n                      | ((props::row_major ? props::inner_stride : props::outer_stride) == 1\n                             ? array::c_style\n                         : (props::row_major ? props::outer_stride : props::inner_stride) == 1\n                             ? array::f_style\n                             : 0)>;\n    static constexpr bool need_writeable = is_eigen_mutable_map<Type>::value;\n    // Delay construction (these have no default constructor)\n    std::unique_ptr<MapType> map;\n    std::unique_ptr<Type> ref;\n    // Our array.  When possible, this is just a numpy array pointing to the source data, but\n    // sometimes we can't avoid copying (e.g. input is not a numpy array at all, has an\n    // incompatible layout, or is an array of a type that needs to be converted).  Using a numpy\n    // temporary (rather than an Eigen temporary) saves an extra copy when we need both type\n    // conversion and storage order conversion.  (Note that we refuse to use this temporary copy\n    // when loading an argument for a Ref<M> with M non-const, i.e. a read-write reference).\n    Array copy_or_ref;\n\npublic:\n    bool load(handle src, bool convert) {\n        // First check whether what we have is already an array of the right type.  If not, we\n        // can't avoid a copy (because the copy is also going to do type conversion).\n        bool need_copy = !isinstance<Array>(src);\n\n        EigenConformable<props::row_major> fits;\n        if (!need_copy) {\n            // We don't need a converting copy, but we also need to check whether the strides are\n            // compatible with the Ref's stride requirements\n            auto aref = reinterpret_borrow<Array>(src);\n\n            if (aref && (!need_writeable || aref.writeable())) {\n                fits = props::conformable(aref);\n                if (!fits) {\n                    return false; // Incompatible dimensions\n                }\n                if (!fits.template stride_compatible<props>()) {\n                    need_copy = true;\n                } else {\n                    copy_or_ref = std::move(aref);\n                }\n            } else {\n                need_copy = true;\n            }\n        }\n\n        if (need_copy) {\n            // We need to copy: If we need a mutable reference, or we're not supposed to convert\n            // (either because we're in the no-convert overload pass, or because we're explicitly\n            // instructed not to copy (via `py::arg().noconvert()`) we have to fail loading.\n            if (!convert || need_writeable) {\n                return false;\n            }\n\n            Array copy = Array::ensure(src);\n            if (!copy) {\n                return false;\n            }\n            fits = props::conformable(copy);\n            if (!fits || !fits.template stride_compatible<props>()) {\n                return false;\n            }\n            copy_or_ref = std::move(copy);\n            loader_life_support::add_patient(copy_or_ref);\n        }\n\n        ref.reset();\n        map.reset(new MapType(data(copy_or_ref),\n                              fits.rows,\n                              fits.cols,\n                              make_stride(fits.stride.outer(), fits.stride.inner())));\n        ref.reset(new Type(*map));\n\n        return true;\n    }\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator Type *() { return ref.get(); }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator Type &() { return *ref; }\n    template <typename _T>\n    using cast_op_type = pybind11::detail::cast_op_type<_T>;\n\nprivate:\n    template <typename T = Type, enable_if_t<is_eigen_mutable_map<T>::value, int> = 0>\n    Scalar *data(Array &a) {\n        return a.mutable_data();\n    }\n\n    template <typename T = Type, enable_if_t<!is_eigen_mutable_map<T>::value, int> = 0>\n    const Scalar *data(Array &a) {\n        return a.data();\n    }\n\n    // Attempt to figure out a constructor of `Stride` that will work.\n    // If both strides are fixed, use a default constructor:\n    template <typename S>\n    using stride_ctor_default = bool_constant<S::InnerStrideAtCompileTime != Eigen::Dynamic\n                                              && S::OuterStrideAtCompileTime != Eigen::Dynamic\n                                              && std::is_default_constructible<S>::value>;\n    // Otherwise, if there is a two-index constructor, assume it is (outer,inner) like\n    // Eigen::Stride, and use it:\n    template <typename S>\n    using stride_ctor_dual\n        = bool_constant<!stride_ctor_default<S>::value\n                        && std::is_constructible<S, EigenIndex, EigenIndex>::value>;\n    // Otherwise, if there is a one-index constructor, and just one of the strides is dynamic, use\n    // it (passing whichever stride is dynamic).\n    template <typename S>\n    using stride_ctor_outer\n        = bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value\n                        && S::OuterStrideAtCompileTime == Eigen::Dynamic\n                        && S::InnerStrideAtCompileTime != Eigen::Dynamic\n                        && std::is_constructible<S, EigenIndex>::value>;\n    template <typename S>\n    using stride_ctor_inner\n        = bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value\n                        && S::InnerStrideAtCompileTime == Eigen::Dynamic\n                        && S::OuterStrideAtCompileTime != Eigen::Dynamic\n                        && std::is_constructible<S, EigenIndex>::value>;\n\n    template <typename S = StrideType, enable_if_t<stride_ctor_default<S>::value, int> = 0>\n    static S make_stride(EigenIndex, EigenIndex) {\n        return S();\n    }\n    template <typename S = StrideType, enable_if_t<stride_ctor_dual<S>::value, int> = 0>\n    static S make_stride(EigenIndex outer, EigenIndex inner) {\n        return S(outer, inner);\n    }\n    template <typename S = StrideType, enable_if_t<stride_ctor_outer<S>::value, int> = 0>\n    static S make_stride(EigenIndex outer, EigenIndex) {\n        return S(outer);\n    }\n    template <typename S = StrideType, enable_if_t<stride_ctor_inner<S>::value, int> = 0>\n    static S make_stride(EigenIndex, EigenIndex inner) {\n        return S(inner);\n    }\n};\n\n// type_caster for special matrix types (e.g. DiagonalMatrix), which are EigenBase, but not\n// EigenDense (i.e. they don't have a data(), at least not with the usual matrix layout).\n// load() is not supported, but we can cast them into the python domain by first copying to a\n// regular Eigen::Matrix, then casting that.\ntemplate <typename Type>\nstruct type_caster<Type, enable_if_t<is_eigen_other<Type>::value>> {\n    static_assert(!std::is_pointer<typename Type::Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n\nprotected:\n    using Matrix\n        = Eigen::Matrix<typename Type::Scalar, Type::RowsAtCompileTime, Type::ColsAtCompileTime>;\n    using props = EigenProps<Matrix>;\n\npublic:\n    static handle cast(const Type &src, return_value_policy /* policy */, handle /* parent */) {\n        handle h = eigen_encapsulate<props>(new Matrix(src));\n        return h;\n    }\n    static handle cast(const Type *src, return_value_policy policy, handle parent) {\n        return cast(*src, policy, parent);\n    }\n\n    static constexpr auto name = props::descriptor;\n\n    // Explicitly delete these: support python -> C++ conversion on these (i.e. these can be return\n    // types but not bound arguments).  We still provide them (with an explicitly delete) so that\n    // you end up here if you try anyway.\n    bool load(handle, bool) = delete;\n    operator Type() = delete;\n    template <typename>\n    using cast_op_type = Type;\n};\n\ntemplate <typename Type>\nstruct type_caster<Type, enable_if_t<is_eigen_sparse<Type>::value>> {\n    using Scalar = typename Type::Scalar;\n    static_assert(!std::is_pointer<Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n    using StorageIndex = remove_reference_t<decltype(*std::declval<Type>().outerIndexPtr())>;\n    using Index = typename Type::Index;\n    static constexpr bool rowMajor = Type::IsRowMajor;\n\n    bool load(handle src, bool) {\n        if (!src) {\n            return false;\n        }\n\n        auto obj = reinterpret_borrow<object>(src);\n        object sparse_module = module_::import(\"scipy.sparse\");\n        object matrix_type = sparse_module.attr(rowMajor ? \"csr_matrix\" : \"csc_matrix\");\n\n        if (!type::handle_of(obj).is(matrix_type)) {\n            try {\n                obj = matrix_type(obj);\n            } catch (const error_already_set &) {\n                return false;\n            }\n        }\n\n        auto values = array_t<Scalar>((object) obj.attr(\"data\"));\n        auto innerIndices = array_t<StorageIndex>((object) obj.attr(\"indices\"));\n        auto outerIndices = array_t<StorageIndex>((object) obj.attr(\"indptr\"));\n        auto shape = pybind11::tuple((pybind11::object) obj.attr(\"shape\"));\n        auto nnz = obj.attr(\"nnz\").cast<Index>();\n\n        if (!values || !innerIndices || !outerIndices) {\n            return false;\n        }\n\n        value = EigenMapSparseMatrix<Scalar,\n                                     Type::Flags &(Eigen::RowMajor | Eigen::ColMajor),\n                                     StorageIndex>(shape[0].cast<Index>(),\n                                                   shape[1].cast<Index>(),\n                                                   std::move(nnz),\n                                                   outerIndices.mutable_data(),\n                                                   innerIndices.mutable_data(),\n                                                   values.mutable_data());\n\n        return true;\n    }\n\n    static handle cast(const Type &src, return_value_policy /* policy */, handle /* parent */) {\n        const_cast<Type &>(src).makeCompressed();\n\n        object matrix_type\n            = module_::import(\"scipy.sparse\").attr(rowMajor ? \"csr_matrix\" : \"csc_matrix\");\n\n        array data(src.nonZeros(), src.valuePtr());\n        array outerIndices((rowMajor ? src.rows() : src.cols()) + 1, src.outerIndexPtr());\n        array innerIndices(src.nonZeros(), src.innerIndexPtr());\n\n        return matrix_type(pybind11::make_tuple(\n                               std::move(data), std::move(innerIndices), std::move(outerIndices)),\n                           pybind11::make_tuple(src.rows(), src.cols()))\n            .release();\n    }\n\n    PYBIND11_TYPE_CASTER(Type,\n                         const_name<(Type::IsRowMajor) != 0>(\"scipy.sparse.csr_matrix[\",\n                                                             \"scipy.sparse.csc_matrix[\")\n                             + npy_format_descriptor<Scalar>::name + const_name(\"]\"));\n};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/eigen/tensor.h",
    "content": "/*\n    pybind11/eigen/tensor.h: Transparent conversion for Eigen tensors\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"../numpy.h\"\n#include \"common.h\"\n\n#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)\nstatic_assert(__GNUC__ > 5, \"Eigen Tensor support in pybind11 requires GCC > 5.0\");\n#endif\n\n// Disable warnings for Eigen\nPYBIND11_WARNING_PUSH\nPYBIND11_WARNING_DISABLE_MSVC(4554)\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n#if defined(__MINGW32__)\nPYBIND11_WARNING_DISABLE_GCC(\"-Wmaybe-uninitialized\")\n#endif\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\nPYBIND11_WARNING_POP\n\nstatic_assert(EIGEN_VERSION_AT_LEAST(3, 3, 0),\n              \"Eigen Tensor support in pybind11 requires Eigen >= 3.3.0\");\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ninline bool is_tensor_aligned(const void *data) {\n    return (reinterpret_cast<std::size_t>(data) % EIGEN_DEFAULT_ALIGN_BYTES) == 0;\n}\n\ntemplate <typename T>\nconstexpr int compute_array_flag_from_tensor() {\n    static_assert((static_cast<int>(T::Layout) == static_cast<int>(Eigen::RowMajor))\n                      || (static_cast<int>(T::Layout) == static_cast<int>(Eigen::ColMajor)),\n                  \"Layout must be row or column major\");\n    return (static_cast<int>(T::Layout) == static_cast<int>(Eigen::RowMajor)) ? array::c_style\n                                                                              : array::f_style;\n}\n\ntemplate <typename T>\nstruct eigen_tensor_helper {};\n\ntemplate <typename Scalar_, int NumIndices_, int Options_, typename IndexType>\nstruct eigen_tensor_helper<Eigen::Tensor<Scalar_, NumIndices_, Options_, IndexType>> {\n    using Type = Eigen::Tensor<Scalar_, NumIndices_, Options_, IndexType>;\n    using ValidType = void;\n\n    static Eigen::DSizes<typename Type::Index, Type::NumIndices> get_shape(const Type &f) {\n        return f.dimensions();\n    }\n\n    static constexpr bool\n    is_correct_shape(const Eigen::DSizes<typename Type::Index, Type::NumIndices> & /*shape*/) {\n        return true;\n    }\n\n    template <typename T>\n    struct helper {};\n\n    template <size_t... Is>\n    struct helper<index_sequence<Is...>> {\n        static constexpr auto value = concat(const_name(((void) Is, \"?\"))...);\n    };\n\n    static constexpr auto dimensions_descriptor\n        = helper<decltype(make_index_sequence<Type::NumIndices>())>::value;\n\n    template <typename... Args>\n    static Type *alloc(Args &&...args) {\n        return new Type(std::forward<Args>(args)...);\n    }\n\n    static void free(Type *tensor) { delete tensor; }\n};\n\ntemplate <typename Scalar_, typename std::ptrdiff_t... Indices, int Options_, typename IndexType>\nstruct eigen_tensor_helper<\n    Eigen::TensorFixedSize<Scalar_, Eigen::Sizes<Indices...>, Options_, IndexType>> {\n    using Type = Eigen::TensorFixedSize<Scalar_, Eigen::Sizes<Indices...>, Options_, IndexType>;\n    using ValidType = void;\n\n    static constexpr Eigen::DSizes<typename Type::Index, Type::NumIndices>\n    get_shape(const Type & /*f*/) {\n        return get_shape();\n    }\n\n    static constexpr Eigen::DSizes<typename Type::Index, Type::NumIndices> get_shape() {\n        return Eigen::DSizes<typename Type::Index, Type::NumIndices>(Indices...);\n    }\n\n    static bool\n    is_correct_shape(const Eigen::DSizes<typename Type::Index, Type::NumIndices> &shape) {\n        return get_shape() == shape;\n    }\n\n    static constexpr auto dimensions_descriptor = concat(const_name<Indices>()...);\n\n    template <typename... Args>\n    static Type *alloc(Args &&...args) {\n        Eigen::aligned_allocator<Type> allocator;\n        return ::new (allocator.allocate(1)) Type(std::forward<Args>(args)...);\n    }\n\n    static void free(Type *tensor) {\n        Eigen::aligned_allocator<Type> allocator;\n        tensor->~Type();\n        allocator.deallocate(tensor, 1);\n    }\n};\n\ntemplate <typename Type, bool ShowDetails, bool NeedsWriteable = false>\nstruct get_tensor_descriptor {\n    static constexpr auto details\n        = const_name<NeedsWriteable>(\", flags.writeable\", \"\")\n          + const_name<static_cast<int>(Type::Layout) == static_cast<int>(Eigen::RowMajor)>(\n              \", flags.c_contiguous\", \", flags.f_contiguous\");\n    static constexpr auto value\n        = const_name(\"numpy.ndarray[\") + npy_format_descriptor<typename Type::Scalar>::name\n          + const_name(\"[\") + eigen_tensor_helper<remove_cv_t<Type>>::dimensions_descriptor\n          + const_name(\"]\") + const_name<ShowDetails>(details, const_name(\"\")) + const_name(\"]\");\n};\n\n// When EIGEN_AVOID_STL_ARRAY is defined, Eigen::DSizes<T, 0> does not have the begin() member\n// function. Falling back to a simple loop works around this issue.\n//\n// We need to disable the type-limits warning for the inner loop when size = 0.\n\nPYBIND11_WARNING_PUSH\nPYBIND11_WARNING_DISABLE_GCC(\"-Wtype-limits\")\n\ntemplate <typename T, int size>\nstd::vector<T> convert_dsizes_to_vector(const Eigen::DSizes<T, size> &arr) {\n    std::vector<T> result(size);\n\n    for (size_t i = 0; i < size; i++) {\n        result[i] = arr[i];\n    }\n\n    return result;\n}\n\ntemplate <typename T, int size>\nEigen::DSizes<T, size> get_shape_for_array(const array &arr) {\n    Eigen::DSizes<T, size> result;\n    const T *shape = arr.shape();\n    for (size_t i = 0; i < size; i++) {\n        result[i] = shape[i];\n    }\n\n    return result;\n}\n\nPYBIND11_WARNING_POP\n\ntemplate <typename Type>\nstruct type_caster<Type, typename eigen_tensor_helper<Type>::ValidType> {\n    static_assert(!std::is_pointer<typename Type::Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n    using Helper = eigen_tensor_helper<Type>;\n    static constexpr auto temp_name = get_tensor_descriptor<Type, false>::value;\n    PYBIND11_TYPE_CASTER(Type, temp_name);\n\n    bool load(handle src, bool convert) {\n        if (!convert) {\n            if (!isinstance<array>(src)) {\n                return false;\n            }\n            array temp = array::ensure(src);\n            if (!temp) {\n                return false;\n            }\n\n            if (!temp.dtype().is(dtype::of<typename Type::Scalar>())) {\n                return false;\n            }\n        }\n\n        array_t<typename Type::Scalar, compute_array_flag_from_tensor<Type>()> arr(\n            reinterpret_borrow<object>(src));\n\n        if (arr.ndim() != Type::NumIndices) {\n            return false;\n        }\n        auto shape = get_shape_for_array<typename Type::Index, Type::NumIndices>(arr);\n\n        if (!Helper::is_correct_shape(shape)) {\n            return false;\n        }\n\n#if EIGEN_VERSION_AT_LEAST(3, 4, 0)\n        auto data_pointer = arr.data();\n#else\n        // Handle Eigen bug\n        auto data_pointer = const_cast<typename Type::Scalar *>(arr.data());\n#endif\n\n        if (is_tensor_aligned(arr.data())) {\n            value = Eigen::TensorMap<const Type, Eigen::Aligned>(data_pointer, shape);\n        } else {\n            value = Eigen::TensorMap<const Type>(data_pointer, shape);\n        }\n\n        return true;\n    }\n\n    static handle cast(Type &&src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::reference\n            || policy == return_value_policy::reference_internal) {\n            pybind11_fail(\"Cannot use a reference return value policy for an rvalue\");\n        }\n        return cast_impl(&src, return_value_policy::move, parent);\n    }\n\n    static handle cast(const Type &&src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::reference\n            || policy == return_value_policy::reference_internal) {\n            pybind11_fail(\"Cannot use a reference return value policy for an rvalue\");\n        }\n        return cast_impl(&src, return_value_policy::move, parent);\n    }\n\n    static handle cast(Type &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast_impl(&src, policy, parent);\n    }\n\n    static handle cast(const Type &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast(&src, policy, parent);\n    }\n\n    static handle cast(Type *src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic) {\n            policy = return_value_policy::take_ownership;\n        } else if (policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::reference;\n        }\n        return cast_impl(src, policy, parent);\n    }\n\n    static handle cast(const Type *src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic) {\n            policy = return_value_policy::take_ownership;\n        } else if (policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::reference;\n        }\n        return cast_impl(src, policy, parent);\n    }\n\n    template <typename C>\n    static handle cast_impl(C *src, return_value_policy policy, handle parent) {\n        object parent_object;\n        bool writeable = false;\n        switch (policy) {\n            case return_value_policy::move:\n                if (std::is_const<C>::value) {\n                    pybind11_fail(\"Cannot move from a constant reference\");\n                }\n\n                src = Helper::alloc(std::move(*src));\n\n                parent_object\n                    = capsule(src, [](void *ptr) { Helper::free(reinterpret_cast<Type *>(ptr)); });\n                writeable = true;\n                break;\n\n            case return_value_policy::take_ownership:\n                if (std::is_const<C>::value) {\n                    // This cast is ugly, and might be UB in some cases, but we don't have an\n                    // alternative here as we must free that memory\n                    Helper::free(const_cast<Type *>(src));\n                    pybind11_fail(\"Cannot take ownership of a const reference\");\n                }\n\n                parent_object\n                    = capsule(src, [](void *ptr) { Helper::free(reinterpret_cast<Type *>(ptr)); });\n                writeable = true;\n                break;\n\n            case return_value_policy::copy:\n                writeable = true;\n                break;\n\n            case return_value_policy::reference:\n                parent_object = none();\n                writeable = !std::is_const<C>::value;\n                break;\n\n            case return_value_policy::reference_internal:\n                // Default should do the right thing\n                if (!parent) {\n                    pybind11_fail(\"Cannot use reference internal when there is no parent\");\n                }\n                parent_object = reinterpret_borrow<object>(parent);\n                writeable = !std::is_const<C>::value;\n                break;\n\n            default:\n                pybind11_fail(\"pybind11 bug in eigen.h, please file a bug report\");\n        }\n\n        auto result = array_t<typename Type::Scalar, compute_array_flag_from_tensor<Type>()>(\n            convert_dsizes_to_vector(Helper::get_shape(*src)), src->data(), parent_object);\n\n        if (!writeable) {\n            array_proxy(result.ptr())->flags &= ~detail::npy_api::NPY_ARRAY_WRITEABLE_;\n        }\n\n        return result.release();\n    }\n};\n\ntemplate <typename StoragePointerType,\n          bool needs_writeable,\n          enable_if_t<!needs_writeable, bool> = true>\nStoragePointerType get_array_data_for_type(array &arr) {\n#if EIGEN_VERSION_AT_LEAST(3, 4, 0)\n    return reinterpret_cast<StoragePointerType>(arr.data());\n#else\n    // Handle Eigen bug\n    return reinterpret_cast<StoragePointerType>(const_cast<void *>(arr.data()));\n#endif\n}\n\ntemplate <typename StoragePointerType,\n          bool needs_writeable,\n          enable_if_t<needs_writeable, bool> = true>\nStoragePointerType get_array_data_for_type(array &arr) {\n    return reinterpret_cast<StoragePointerType>(arr.mutable_data());\n}\n\ntemplate <typename T, typename = void>\nstruct get_storage_pointer_type;\n\ntemplate <typename MapType>\nstruct get_storage_pointer_type<MapType, void_t<typename MapType::StoragePointerType>> {\n    using SPT = typename MapType::StoragePointerType;\n};\n\ntemplate <typename MapType>\nstruct get_storage_pointer_type<MapType, void_t<typename MapType::PointerArgType>> {\n    using SPT = typename MapType::PointerArgType;\n};\n\ntemplate <typename Type, int Options>\nstruct type_caster<Eigen::TensorMap<Type, Options>,\n                   typename eigen_tensor_helper<remove_cv_t<Type>>::ValidType> {\n    static_assert(!std::is_pointer<typename Type::Scalar>::value,\n                  PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED);\n    using MapType = Eigen::TensorMap<Type, Options>;\n    using Helper = eigen_tensor_helper<remove_cv_t<Type>>;\n\n    bool load(handle src, bool /*convert*/) {\n        // Note that we have a lot more checks here as we want to make sure to avoid copies\n        if (!isinstance<array>(src)) {\n            return false;\n        }\n        auto arr = reinterpret_borrow<array>(src);\n        if ((arr.flags() & compute_array_flag_from_tensor<Type>()) == 0) {\n            return false;\n        }\n\n        if (!arr.dtype().is(dtype::of<typename Type::Scalar>())) {\n            return false;\n        }\n\n        if (arr.ndim() != Type::NumIndices) {\n            return false;\n        }\n\n        constexpr bool is_aligned = (Options & Eigen::Aligned) != 0;\n\n        if (is_aligned && !is_tensor_aligned(arr.data())) {\n            return false;\n        }\n\n        auto shape = get_shape_for_array<typename Type::Index, Type::NumIndices>(arr);\n\n        if (!Helper::is_correct_shape(shape)) {\n            return false;\n        }\n\n        if (needs_writeable && !arr.writeable()) {\n            return false;\n        }\n\n        auto result = get_array_data_for_type<typename get_storage_pointer_type<MapType>::SPT,\n                                              needs_writeable>(arr);\n\n        value.reset(new MapType(std::move(result), std::move(shape)));\n\n        return true;\n    }\n\n    static handle cast(MapType &&src, return_value_policy policy, handle parent) {\n        return cast_impl(&src, policy, parent);\n    }\n\n    static handle cast(const MapType &&src, return_value_policy policy, handle parent) {\n        return cast_impl(&src, policy, parent);\n    }\n\n    static handle cast(MapType &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast_impl(&src, policy, parent);\n    }\n\n    static handle cast(const MapType &src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic\n            || policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::copy;\n        }\n        return cast(&src, policy, parent);\n    }\n\n    static handle cast(MapType *src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic) {\n            policy = return_value_policy::take_ownership;\n        } else if (policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::reference;\n        }\n        return cast_impl(src, policy, parent);\n    }\n\n    static handle cast(const MapType *src, return_value_policy policy, handle parent) {\n        if (policy == return_value_policy::automatic) {\n            policy = return_value_policy::take_ownership;\n        } else if (policy == return_value_policy::automatic_reference) {\n            policy = return_value_policy::reference;\n        }\n        return cast_impl(src, policy, parent);\n    }\n\n    template <typename C>\n    static handle cast_impl(C *src, return_value_policy policy, handle parent) {\n        object parent_object;\n        constexpr bool writeable = !std::is_const<C>::value;\n        switch (policy) {\n            case return_value_policy::reference:\n                parent_object = none();\n                break;\n\n            case return_value_policy::reference_internal:\n                // Default should do the right thing\n                if (!parent) {\n                    pybind11_fail(\"Cannot use reference internal when there is no parent\");\n                }\n                parent_object = reinterpret_borrow<object>(parent);\n                break;\n\n            case return_value_policy::take_ownership:\n                delete src;\n                // fallthrough\n            default:\n                // move, take_ownership don't make any sense for a ref/map:\n                pybind11_fail(\"Invalid return_value_policy for Eigen Map type, must be either \"\n                              \"reference or reference_internal\");\n        }\n\n        auto result = array_t<typename Type::Scalar, compute_array_flag_from_tensor<Type>()>(\n            convert_dsizes_to_vector(Helper::get_shape(*src)),\n            src->data(),\n            std::move(parent_object));\n\n        if (!writeable) {\n            array_proxy(result.ptr())->flags &= ~detail::npy_api::NPY_ARRAY_WRITEABLE_;\n        }\n\n        return result.release();\n    }\n\n#if EIGEN_VERSION_AT_LEAST(3, 4, 0)\n\n    static constexpr bool needs_writeable = !std::is_const<typename std::remove_pointer<\n        typename get_storage_pointer_type<MapType>::SPT>::type>::value;\n#else\n    // Handle Eigen bug\n    static constexpr bool needs_writeable = !std::is_const<Type>::value;\n#endif\n\nprotected:\n    // TODO: Move to std::optional once std::optional has more support\n    std::unique_ptr<MapType> value;\n\npublic:\n    static constexpr auto name = get_tensor_descriptor<Type, true, needs_writeable>::value;\n    explicit operator MapType *() { return value.get(); }\n    explicit operator MapType &() { return *value; }\n    explicit operator MapType &&() && { return std::move(*value); }\n\n    template <typename T_>\n    using cast_op_type = ::pybind11::detail::movable_cast_op_type<T_>;\n};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/eigen.h",
    "content": "/*\n    pybind11/eigen.h: Transparent conversion for dense and sparse Eigen matrices\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"eigen/matrix.h\"\n"
  },
  {
    "path": "modules/juce_python/pybind11/embed.h",
    "content": "/*\n    pybind11/embed.h: Support for embedding the interpreter\n\n    Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n#include \"eval.h\"\n\n#include <memory>\n#include <vector>\n\n#if defined(PYPY_VERSION)\n#    error Embedding the interpreter is not supported with PyPy\n#endif\n\n#define PYBIND11_EMBEDDED_MODULE_IMPL(name)                                                       \\\n    extern \"C\" PyObject *pybind11_init_impl_##name();                                             \\\n    extern \"C\" PyObject *pybind11_init_impl_##name() { return pybind11_init_wrapper_##name(); }\n\n/** \\rst\n    Add a new module to the table of builtins for the interpreter. Must be\n    defined in global scope. The first macro parameter is the name of the\n    module (without quotes). The second parameter is the variable which will\n    be used as the interface to add functions and classes to the module.\n\n    .. code-block:: cpp\n\n        PYBIND11_EMBEDDED_MODULE(example, m) {\n            // ... initialize functions and classes here\n            m.def(\"foo\", []() {\n                return \"Hello, World!\";\n            });\n        }\n \\endrst */\n#define PYBIND11_EMBEDDED_MODULE(name, variable)                                                  \\\n    static ::pybind11::module_::module_def PYBIND11_CONCAT(pybind11_module_def_, name);           \\\n    static void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ &);                     \\\n    static PyObject PYBIND11_CONCAT(*pybind11_init_wrapper_, name)() {                            \\\n        auto m = ::pybind11::module_::create_extension_module(                                    \\\n            PYBIND11_TOSTRING(name), nullptr, &PYBIND11_CONCAT(pybind11_module_def_, name));      \\\n        try {                                                                                     \\\n            PYBIND11_CONCAT(pybind11_init_, name)(m);                                             \\\n            return m.ptr();                                                                       \\\n        }                                                                                         \\\n        PYBIND11_CATCH_INIT_EXCEPTIONS                                                            \\\n    }                                                                                             \\\n    PYBIND11_EMBEDDED_MODULE_IMPL(name)                                                           \\\n    ::pybind11::detail::embedded_module PYBIND11_CONCAT(pybind11_module_, name)(                  \\\n        PYBIND11_TOSTRING(name), PYBIND11_CONCAT(pybind11_init_impl_, name));                     \\\n    void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_                                \\\n                                               & variable) // NOLINT(bugprone-macro-parentheses)\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// Python 2.7/3.x compatible version of `PyImport_AppendInittab` and error checks.\nstruct embedded_module {\n    using init_t = PyObject *(*) ();\n    embedded_module(const char *name, init_t init) {\n        if (Py_IsInitialized() != 0) {\n            pybind11_fail(\"Can't add new modules after the interpreter has been initialized\");\n        }\n\n        auto result = PyImport_AppendInittab(name, init);\n        if (result == -1) {\n            pybind11_fail(\"Insufficient memory to add a new module\");\n        }\n    }\n};\n\nstruct wide_char_arg_deleter {\n    void operator()(wchar_t *ptr) const {\n        // API docs: https://docs.python.org/3/c-api/sys.html#c.Py_DecodeLocale\n        PyMem_RawFree(ptr);\n    }\n};\n\ninline wchar_t *widen_chars(const char *safe_arg) {\n    wchar_t *widened_arg = Py_DecodeLocale(safe_arg, nullptr);\n    return widened_arg;\n}\n\ninline void precheck_interpreter() {\n    if (Py_IsInitialized() != 0) {\n        pybind11_fail(\"The interpreter is already running\");\n    }\n}\n\n#if !defined(PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX)\n#    define PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX (0x03080000)\n#endif\n\n#if PY_VERSION_HEX < PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX\ninline void initialize_interpreter_pre_pyconfig(bool init_signal_handlers,\n                                                int argc,\n                                                const char *const *argv,\n                                                bool add_program_dir_to_path) {\n    detail::precheck_interpreter();\n    Py_InitializeEx(init_signal_handlers ? 1 : 0);\n#    if defined(WITH_THREAD) && PY_VERSION_HEX < 0x03070000\n    PyEval_InitThreads();\n#    endif\n\n    // Before it was special-cased in python 3.8, passing an empty or null argv\n    // caused a segfault, so we have to reimplement the special case ourselves.\n    bool special_case = (argv == nullptr || argc <= 0);\n\n    const char *const empty_argv[]{\"\\0\"};\n    const char *const *safe_argv = special_case ? empty_argv : argv;\n    if (special_case) {\n        argc = 1;\n    }\n\n    auto argv_size = static_cast<size_t>(argc);\n    // SetArgv* on python 3 takes wchar_t, so we have to convert.\n    std::unique_ptr<wchar_t *[]> widened_argv(new wchar_t *[argv_size]);\n    std::vector<std::unique_ptr<wchar_t[], detail::wide_char_arg_deleter>> widened_argv_entries;\n    widened_argv_entries.reserve(argv_size);\n    for (size_t ii = 0; ii < argv_size; ++ii) {\n        widened_argv_entries.emplace_back(detail::widen_chars(safe_argv[ii]));\n        if (!widened_argv_entries.back()) {\n            // A null here indicates a character-encoding failure or the python\n            // interpreter out of memory. Give up.\n            return;\n        }\n        widened_argv[ii] = widened_argv_entries.back().get();\n    }\n\n    auto *pysys_argv = widened_argv.get();\n\n    PySys_SetArgvEx(argc, pysys_argv, static_cast<int>(add_program_dir_to_path));\n}\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\n\n#if PY_VERSION_HEX >= PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX\ninline void initialize_interpreter(PyConfig *config,\n                                   int argc = 0,\n                                   const char *const *argv = nullptr,\n                                   bool add_program_dir_to_path = true) {\n    detail::precheck_interpreter();\n    PyStatus status = PyConfig_SetBytesArgv(config, argc, const_cast<char *const *>(argv));\n    if (PyStatus_Exception(status) != 0) {\n        // A failure here indicates a character-encoding failure or the python\n        // interpreter out of memory. Give up.\n        PyConfig_Clear(config);\n        throw std::runtime_error(PyStatus_IsError(status) != 0 ? status.err_msg\n                                                               : \"Failed to prepare CPython\");\n    }\n    status = Py_InitializeFromConfig(config);\n    if (PyStatus_Exception(status) != 0) {\n        PyConfig_Clear(config);\n        throw std::runtime_error(PyStatus_IsError(status) != 0 ? status.err_msg\n                                                               : \"Failed to init CPython\");\n    }\n    if (add_program_dir_to_path) {\n        PyRun_SimpleString(\"import sys, os.path; \"\n                           \"sys.path.insert(0, \"\n                           \"os.path.abspath(os.path.dirname(sys.argv[0])) \"\n                           \"if sys.argv and os.path.exists(sys.argv[0]) else '')\");\n    }\n    PyConfig_Clear(config);\n}\n#endif\n\n/** \\rst\n    Initialize the Python interpreter. No other pybind11 or CPython API functions can be\n    called before this is done; with the exception of `PYBIND11_EMBEDDED_MODULE`. The\n    optional `init_signal_handlers` parameter can be used to skip the registration of\n    signal handlers (see the `Python documentation`_ for details). Calling this function\n    again after the interpreter has already been initialized is a fatal error.\n\n    If initializing the Python interpreter fails, then the program is terminated.  (This\n    is controlled by the CPython runtime and is an exception to pybind11's normal behavior\n    of throwing exceptions on errors.)\n\n    The remaining optional parameters, `argc`, `argv`, and `add_program_dir_to_path` are\n    used to populate ``sys.argv`` and ``sys.path``.\n    See the |PySys_SetArgvEx documentation|_ for details.\n\n    .. _Python documentation: https://docs.python.org/3/c-api/init.html#c.Py_InitializeEx\n    .. |PySys_SetArgvEx documentation| replace:: ``PySys_SetArgvEx`` documentation\n    .. _PySys_SetArgvEx documentation: https://docs.python.org/3/c-api/init.html#c.PySys_SetArgvEx\n \\endrst */\ninline void initialize_interpreter(bool init_signal_handlers = true,\n                                   int argc = 0,\n                                   const char *const *argv = nullptr,\n                                   bool add_program_dir_to_path = true) {\n#if PY_VERSION_HEX < PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX\n    detail::initialize_interpreter_pre_pyconfig(\n        init_signal_handlers, argc, argv, add_program_dir_to_path);\n#else\n    PyConfig config;\n    PyConfig_InitPythonConfig(&config);\n    // See PR #4473 for background\n    config.parse_argv = 0;\n\n    config.install_signal_handlers = init_signal_handlers ? 1 : 0;\n    initialize_interpreter(&config, argc, argv, add_program_dir_to_path);\n#endif\n}\n\n/** \\rst\n    Shut down the Python interpreter. No pybind11 or CPython API functions can be called\n    after this. In addition, pybind11 objects must not outlive the interpreter:\n\n    .. code-block:: cpp\n\n        { // BAD\n            py::initialize_interpreter();\n            auto hello = py::str(\"Hello, World!\");\n            py::finalize_interpreter();\n        } // <-- BOOM, hello's destructor is called after interpreter shutdown\n\n        { // GOOD\n            py::initialize_interpreter();\n            { // scoped\n                auto hello = py::str(\"Hello, World!\");\n            } // <-- OK, hello is cleaned up properly\n            py::finalize_interpreter();\n        }\n\n        { // BETTER\n            py::scoped_interpreter guard{};\n            auto hello = py::str(\"Hello, World!\");\n        }\n\n    .. warning::\n\n        The interpreter can be restarted by calling `initialize_interpreter` again.\n        Modules created using pybind11 can be safely re-initialized. However, Python\n        itself cannot completely unload binary extension modules and there are several\n        caveats with regard to interpreter restarting. All the details can be found\n        in the CPython documentation. In short, not all interpreter memory may be\n        freed, either due to reference cycles or user-created global data.\n\n \\endrst */\ninline void finalize_interpreter() {\n    // Get the internals pointer (without creating it if it doesn't exist).  It's possible for the\n    // internals to be created during Py_Finalize() (e.g. if a py::capsule calls `get_internals()`\n    // during destruction), so we get the pointer-pointer here and check it after Py_Finalize().\n    detail::internals **internals_ptr_ptr = detail::get_internals_pp();\n    // It could also be stashed in state_dict, so look there too:\n    if (object internals_obj\n        = get_internals_obj_from_state_dict(detail::get_python_state_dict())) {\n        internals_ptr_ptr = detail::get_internals_pp_from_capsule(internals_obj);\n    }\n    // Local internals contains data managed by the current interpreter, so we must clear them to\n    // avoid undefined behaviors when initializing another interpreter\n    detail::get_local_internals().registered_types_cpp.clear();\n    detail::get_local_internals().registered_exception_translators.clear();\n\n    Py_Finalize();\n\n    if (internals_ptr_ptr) {\n        delete *internals_ptr_ptr;\n        *internals_ptr_ptr = nullptr;\n    }\n}\n\n/** \\rst\n    Scope guard version of `initialize_interpreter` and `finalize_interpreter`.\n    This a move-only guard and only a single instance can exist.\n\n    See `initialize_interpreter` for a discussion of its constructor arguments.\n\n    .. code-block:: cpp\n\n        #include <pybind11/embed.h>\n\n        int main() {\n            py::scoped_interpreter guard{};\n            py::print(Hello, World!);\n        } // <-- interpreter shutdown\n \\endrst */\nclass scoped_interpreter {\npublic:\n    explicit scoped_interpreter(bool init_signal_handlers = true,\n                                int argc = 0,\n                                const char *const *argv = nullptr,\n                                bool add_program_dir_to_path = true) {\n        initialize_interpreter(init_signal_handlers, argc, argv, add_program_dir_to_path);\n    }\n\n#if PY_VERSION_HEX >= PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX\n    explicit scoped_interpreter(PyConfig *config,\n                                int argc = 0,\n                                const char *const *argv = nullptr,\n                                bool add_program_dir_to_path = true) {\n        initialize_interpreter(config, argc, argv, add_program_dir_to_path);\n    }\n#endif\n\n    scoped_interpreter(const scoped_interpreter &) = delete;\n    scoped_interpreter(scoped_interpreter &&other) noexcept { other.is_valid = false; }\n    scoped_interpreter &operator=(const scoped_interpreter &) = delete;\n    scoped_interpreter &operator=(scoped_interpreter &&) = delete;\n\n    ~scoped_interpreter() {\n        if (is_valid) {\n            finalize_interpreter();\n        }\n    }\n\nprivate:\n    bool is_valid = true;\n};\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/eval.h",
    "content": "/*\n    pybind11/eval.h: Support for evaluating Python expressions and statements\n    from strings and files\n\n    Copyright (c) 2016 Klemens Morgenstern <klemens.morgenstern@ed-chemnitz.de> and\n                       Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\n#include <utility>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ninline void ensure_builtins_in_globals(object &global) {\n#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x03080000\n    // Running exec and eval adds `builtins` module under `__builtins__` key to\n    // globals if not yet present.  Python 3.8 made PyRun_String behave\n    // similarly. Let's also do that for older versions, for consistency. This\n    // was missing from PyPy3.8 7.3.7.\n    if (!global.contains(\"__builtins__\"))\n        global[\"__builtins__\"] = module_::import(PYBIND11_BUILTINS_MODULE);\n#else\n    (void) global;\n#endif\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\nenum eval_mode {\n    /// Evaluate a string containing an isolated expression\n    eval_expr,\n\n    /// Evaluate a string containing a single statement. Returns \\c none\n    eval_single_statement,\n\n    /// Evaluate a string containing a sequence of statement. Returns \\c none\n    eval_statements\n};\n\ntemplate <eval_mode mode = eval_expr>\nobject eval(const str &expr, object global = globals(), object local = object()) {\n    if (!local) {\n        local = global;\n    }\n\n    detail::ensure_builtins_in_globals(global);\n\n    /* PyRun_String does not accept a PyObject / encoding specifier,\n       this seems to be the only alternative */\n    std::string buffer = \"# -*- coding: utf-8 -*-\\n\" + (std::string) expr;\n\n    int start = 0;\n    switch (mode) {\n        case eval_expr:\n            start = Py_eval_input;\n            break;\n        case eval_single_statement:\n            start = Py_single_input;\n            break;\n        case eval_statements:\n            start = Py_file_input;\n            break;\n        default:\n            pybind11_fail(\"invalid evaluation mode\");\n    }\n\n    PyObject *result = PyRun_String(buffer.c_str(), start, global.ptr(), local.ptr());\n    if (!result) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<object>(result);\n}\n\ntemplate <eval_mode mode = eval_expr, size_t N>\nobject eval(const char (&s)[N], object global = globals(), object local = object()) {\n    /* Support raw string literals by removing common leading whitespace */\n    auto expr = (s[0] == '\\n') ? str(module_::import(\"textwrap\").attr(\"dedent\")(s)) : str(s);\n    return eval<mode>(expr, std::move(global), std::move(local));\n}\n\ninline void exec(const str &expr, object global = globals(), object local = object()) {\n    eval<eval_statements>(expr, std::move(global), std::move(local));\n}\n\ntemplate <size_t N>\nvoid exec(const char (&s)[N], object global = globals(), object local = object()) {\n    eval<eval_statements>(s, std::move(global), std::move(local));\n}\n\n#if defined(PYPY_VERSION)\ntemplate <eval_mode mode = eval_statements>\nobject eval_file(str, object, object) {\n    pybind11_fail(\"eval_file not supported in PyPy3. Use eval\");\n}\ntemplate <eval_mode mode = eval_statements>\nobject eval_file(str, object) {\n    pybind11_fail(\"eval_file not supported in PyPy3. Use eval\");\n}\ntemplate <eval_mode mode = eval_statements>\nobject eval_file(str) {\n    pybind11_fail(\"eval_file not supported in PyPy3. Use eval\");\n}\n#else\ntemplate <eval_mode mode = eval_statements>\nobject eval_file(str fname, object global = globals(), object local = object()) {\n    if (!local) {\n        local = global;\n    }\n\n    detail::ensure_builtins_in_globals(global);\n\n    int start = 0;\n    switch (mode) {\n        case eval_expr:\n            start = Py_eval_input;\n            break;\n        case eval_single_statement:\n            start = Py_single_input;\n            break;\n        case eval_statements:\n            start = Py_file_input;\n            break;\n        default:\n            pybind11_fail(\"invalid evaluation mode\");\n    }\n\n    int closeFile = 1;\n    std::string fname_str = (std::string) fname;\n    FILE *f = _Py_fopen_obj(fname.ptr(), \"r\");\n    if (!f) {\n        PyErr_Clear();\n        pybind11_fail(\"File \\\"\" + fname_str + \"\\\" could not be opened!\");\n    }\n\n    if (!global.contains(\"__file__\")) {\n        global[\"__file__\"] = std::move(fname);\n    }\n\n    PyObject *result\n        = PyRun_FileEx(f, fname_str.c_str(), start, global.ptr(), local.ptr(), closeFile);\n\n    if (!result) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<object>(result);\n}\n#endif\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/functional.h",
    "content": "/*\n    pybind11/functional.h: std::function<> support\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\n#include <functional>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <typename Return, typename... Args>\nstruct type_caster<std::function<Return(Args...)>> {\n    using type = std::function<Return(Args...)>;\n    using retval_type = conditional_t<std::is_same<Return, void>::value, void_type, Return>;\n    using function_type = Return (*)(Args...);\n\npublic:\n    bool load(handle src, bool convert) {\n        if (src.is_none()) {\n            // Defer accepting None to other overloads (if we aren't in convert mode):\n            if (!convert) {\n                return false;\n            }\n            return true;\n        }\n\n        if (!isinstance<function>(src)) {\n            return false;\n        }\n\n        auto func = reinterpret_borrow<function>(src);\n\n        /*\n           When passing a C++ function as an argument to another C++\n           function via Python, every function call would normally involve\n           a full C++ -> Python -> C++ roundtrip, which can be prohibitive.\n           Here, we try to at least detect the case where the function is\n           stateless (i.e. function pointer or lambda function without\n           captured variables), in which case the roundtrip can be avoided.\n         */\n        if (auto cfunc = func.cpp_function()) {\n            auto *cfunc_self = PyCFunction_GET_SELF(cfunc.ptr());\n            if (cfunc_self == nullptr) {\n                PyErr_Clear();\n            } else if (isinstance<capsule>(cfunc_self)) {\n                auto c = reinterpret_borrow<capsule>(cfunc_self);\n\n                function_record *rec = nullptr;\n                // Check that we can safely reinterpret the capsule into a function_record\n                if (detail::is_function_record_capsule(c)) {\n                    rec = c.get_pointer<function_record>();\n                }\n\n                while (rec != nullptr) {\n                    if (rec->is_stateless\n                        && same_type(typeid(function_type),\n                                     *reinterpret_cast<const std::type_info *>(rec->data[1]))) {\n                        struct capture {\n                            function_type f;\n                        };\n                        value = ((capture *) &rec->data)->f;\n                        return true;\n                    }\n                    rec = rec->next;\n                }\n            }\n            // PYPY segfaults here when passing builtin function like sum.\n            // Raising an fail exception here works to prevent the segfault, but only on gcc.\n            // See PR #1413 for full details\n        }\n\n        // ensure GIL is held during functor destruction\n        struct func_handle {\n            function f;\n#if !(defined(_MSC_VER) && _MSC_VER == 1916 && defined(PYBIND11_CPP17))\n            // This triggers a syntax error under very special conditions (very weird indeed).\n            explicit\n#endif\n                func_handle(function &&f_) noexcept\n                : f(std::move(f_)) {\n            }\n            func_handle(const func_handle &f_) { operator=(f_); }\n            func_handle &operator=(const func_handle &f_) {\n                gil_scoped_acquire acq;\n                f = f_.f;\n                return *this;\n            }\n            ~func_handle() {\n                gil_scoped_acquire acq;\n                function kill_f(std::move(f));\n            }\n        };\n\n        // to emulate 'move initialization capture' in C++11\n        struct func_wrapper {\n            func_handle hfunc;\n            explicit func_wrapper(func_handle &&hf) noexcept : hfunc(std::move(hf)) {}\n            Return operator()(Args... args) const {\n                gil_scoped_acquire acq;\n                // casts the returned object as a rvalue to the return type\n                return hfunc.f(std::forward<Args>(args)...).template cast<Return>();\n            }\n        };\n\n        value = func_wrapper(func_handle(std::move(func)));\n        return true;\n    }\n\n    template <typename Func>\n    static handle cast(Func &&f_, return_value_policy policy, handle /* parent */) {\n        if (!f_) {\n            return none().release();\n        }\n\n        auto result = f_.template target<function_type>();\n        if (result) {\n            return cpp_function(*result, policy).release();\n        }\n        return cpp_function(std::forward<Func>(f_), policy).release();\n    }\n\n    PYBIND11_TYPE_CASTER(type,\n                         const_name(\"Callable[[\") + concat(make_caster<Args>::name...)\n                             + const_name(\"], \") + make_caster<retval_type>::name\n                             + const_name(\"]\"));\n};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/gil.h",
    "content": "/*\n    pybind11/gil.h: RAII helpers for managing the GIL\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n\n#if defined(WITH_THREAD) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)\n#    include \"detail/internals.h\"\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// forward declarations\nPyThreadState *get_thread_state_unchecked();\n\nPYBIND11_NAMESPACE_END(detail)\n\n#if defined(WITH_THREAD)\n\n#    if !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)\n\n/* The functions below essentially reproduce the PyGILState_* API using a RAII\n * pattern, but there are a few important differences:\n *\n * 1. When acquiring the GIL from an non-main thread during the finalization\n *    phase, the GILState API blindly terminates the calling thread, which\n *    is often not what is wanted. This API does not do this.\n *\n * 2. The gil_scoped_release function can optionally cut the relationship\n *    of a PyThreadState and its associated thread, which allows moving it to\n *    another thread (this is a fairly rare/advanced use case).\n *\n * 3. The reference count of an acquired thread state can be controlled. This\n *    can be handy to prevent cases where callbacks issued from an external\n *    thread would otherwise constantly construct and destroy thread state data\n *    structures.\n *\n * See the Python bindings of NanoGUI (http://github.com/wjakob/nanogui) for an\n * example which uses features 2 and 3 to migrate the Python thread of\n * execution to another thread (to run the event loop on the original thread,\n * in this case).\n */\n\nclass gil_scoped_acquire {\npublic:\n    PYBIND11_NOINLINE gil_scoped_acquire() {\n        auto &internals = detail::get_internals();\n        tstate = (PyThreadState *) PYBIND11_TLS_GET_VALUE(internals.tstate);\n\n        if (!tstate) {\n            /* Check if the GIL was acquired using the PyGILState_* API instead (e.g. if\n               calling from a Python thread). Since we use a different key, this ensures\n               we don't create a new thread state and deadlock in PyEval_AcquireThread\n               below. Note we don't save this state with internals.tstate, since we don't\n               create it we would fail to clear it (its reference count should be > 0). */\n            tstate = PyGILState_GetThisThreadState();\n        }\n\n        if (!tstate) {\n            tstate = PyThreadState_New(internals.istate);\n#        if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            if (!tstate) {\n                pybind11_fail(\"scoped_acquire: could not create thread state!\");\n            }\n#        endif\n            tstate->gilstate_counter = 0;\n            PYBIND11_TLS_REPLACE_VALUE(internals.tstate, tstate);\n        } else {\n            release = detail::get_thread_state_unchecked() != tstate;\n        }\n\n        if (release) {\n            PyEval_AcquireThread(tstate);\n        }\n\n        inc_ref();\n    }\n\n    gil_scoped_acquire(const gil_scoped_acquire &) = delete;\n    gil_scoped_acquire &operator=(const gil_scoped_acquire &) = delete;\n\n    void inc_ref() { ++tstate->gilstate_counter; }\n\n    PYBIND11_NOINLINE void dec_ref() {\n        --tstate->gilstate_counter;\n#        if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n        if (detail::get_thread_state_unchecked() != tstate) {\n            pybind11_fail(\"scoped_acquire::dec_ref(): thread state must be current!\");\n        }\n        if (tstate->gilstate_counter < 0) {\n            pybind11_fail(\"scoped_acquire::dec_ref(): reference count underflow!\");\n        }\n#        endif\n        if (tstate->gilstate_counter == 0) {\n#        if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n            if (!release) {\n                pybind11_fail(\"scoped_acquire::dec_ref(): internal error!\");\n            }\n#        endif\n            PyThreadState_Clear(tstate);\n            if (active) {\n                PyThreadState_DeleteCurrent();\n            }\n            PYBIND11_TLS_DELETE_VALUE(detail::get_internals().tstate);\n            release = false;\n        }\n    }\n\n    /// This method will disable the PyThreadState_DeleteCurrent call and the\n    /// GIL won't be acquired. This method should be used if the interpreter\n    /// could be shutting down when this is called, as thread deletion is not\n    /// allowed during shutdown. Check _Py_IsFinalizing() on Python 3.7+, and\n    /// protect subsequent code.\n    PYBIND11_NOINLINE void disarm() { active = false; }\n\n    PYBIND11_NOINLINE ~gil_scoped_acquire() {\n        dec_ref();\n        if (release) {\n            PyEval_SaveThread();\n        }\n    }\n\nprivate:\n    PyThreadState *tstate = nullptr;\n    bool release = true;\n    bool active = true;\n};\n\nclass gil_scoped_release {\npublic:\n    explicit gil_scoped_release(bool disassoc = false) : disassoc(disassoc) {\n        // `get_internals()` must be called here unconditionally in order to initialize\n        // `internals.tstate` for subsequent `gil_scoped_acquire` calls. Otherwise, an\n        // initialization race could occur as multiple threads try `gil_scoped_acquire`.\n        auto &internals = detail::get_internals();\n        // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)\n        tstate = PyEval_SaveThread();\n        if (disassoc) {\n            // Python >= 3.7 can remove this, it's an int before 3.7\n            // NOLINTNEXTLINE(readability-qualified-auto)\n            auto key = internals.tstate;\n            PYBIND11_TLS_DELETE_VALUE(key);\n        }\n    }\n\n    gil_scoped_release(const gil_scoped_release &) = delete;\n    gil_scoped_release &operator=(const gil_scoped_release &) = delete;\n\n    /// This method will disable the PyThreadState_DeleteCurrent call and the\n    /// GIL won't be acquired. This method should be used if the interpreter\n    /// could be shutting down when this is called, as thread deletion is not\n    /// allowed during shutdown. Check _Py_IsFinalizing() on Python 3.7+, and\n    /// protect subsequent code.\n    PYBIND11_NOINLINE void disarm() { active = false; }\n\n    ~gil_scoped_release() {\n        if (!tstate) {\n            return;\n        }\n        // `PyEval_RestoreThread()` should not be called if runtime is finalizing\n        if (active) {\n            PyEval_RestoreThread(tstate);\n        }\n        if (disassoc) {\n            // Python >= 3.7 can remove this, it's an int before 3.7\n            // NOLINTNEXTLINE(readability-qualified-auto)\n            auto key = detail::get_internals().tstate;\n            PYBIND11_TLS_REPLACE_VALUE(key, tstate);\n        }\n    }\n\nprivate:\n    PyThreadState *tstate;\n    bool disassoc;\n    bool active = true;\n};\n\n#    else // PYBIND11_SIMPLE_GIL_MANAGEMENT\n\nclass gil_scoped_acquire {\n    PyGILState_STATE state;\n\npublic:\n    gil_scoped_acquire() : state{PyGILState_Ensure()} {}\n    gil_scoped_acquire(const gil_scoped_acquire &) = delete;\n    gil_scoped_acquire &operator=(const gil_scoped_acquire &) = delete;\n    ~gil_scoped_acquire() { PyGILState_Release(state); }\n    void disarm() {}\n};\n\nclass gil_scoped_release {\n    PyThreadState *state;\n\npublic:\n    gil_scoped_release() : state{PyEval_SaveThread()} {}\n    gil_scoped_release(const gil_scoped_release &) = delete;\n    gil_scoped_release &operator=(const gil_scoped_release &) = delete;\n    ~gil_scoped_release() { PyEval_RestoreThread(state); }\n    void disarm() {}\n};\n\n#    endif // PYBIND11_SIMPLE_GIL_MANAGEMENT\n\n#else // WITH_THREAD\n\nclass gil_scoped_acquire {\npublic:\n    gil_scoped_acquire() {\n        // Trick to suppress `unused variable` error messages (at call sites).\n        (void) (this != (this + 1));\n    }\n    gil_scoped_acquire(const gil_scoped_acquire &) = delete;\n    gil_scoped_acquire &operator=(const gil_scoped_acquire &) = delete;\n    void disarm() {}\n};\n\nclass gil_scoped_release {\npublic:\n    gil_scoped_release() {\n        // Trick to suppress `unused variable` error messages (at call sites).\n        (void) (this != (this + 1));\n    }\n    gil_scoped_release(const gil_scoped_release &) = delete;\n    gil_scoped_release &operator=(const gil_scoped_release &) = delete;\n    void disarm() {}\n};\n\n#endif // WITH_THREAD\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/iostream.h",
    "content": "/*\n    pybind11/iostream.h -- Tools to assist with redirecting cout and cerr to Python\n\n    Copyright (c) 2017 Henry F. Schreiner\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n\n    WARNING: The implementation in this file is NOT thread safe. Multiple\n    threads writing to a redirected ostream concurrently cause data races\n    and potentially buffer overflows. Therefore it is currently a requirement\n    that all (possibly) concurrent redirected ostream writes are protected by\n    a mutex.\n    #HelpAppreciated: Work on iostream.h thread safety.\n    For more background see the discussions under\n    https://github.com/pybind/pybind11/pull/2982 and\n    https://github.com/pybind/pybind11/pull/2995.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <iostream>\n#include <iterator>\n#include <memory>\n#include <ostream>\n#include <streambuf>\n#include <string>\n#include <utility>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Buffer that writes to Python instead of C++\nclass pythonbuf : public std::streambuf {\nprivate:\n    using traits_type = std::streambuf::traits_type;\n\n    const size_t buf_size;\n    std::unique_ptr<char[]> d_buffer;\n    object pywrite;\n    object pyflush;\n\n    int overflow(int c) override {\n        if (!traits_type::eq_int_type(c, traits_type::eof())) {\n            *pptr() = traits_type::to_char_type(c);\n            pbump(1);\n        }\n        return sync() == 0 ? traits_type::not_eof(c) : traits_type::eof();\n    }\n\n    // Computes how many bytes at the end of the buffer are part of an\n    // incomplete sequence of UTF-8 bytes.\n    // Precondition: pbase() < pptr()\n    size_t utf8_remainder() const {\n        const auto rbase = std::reverse_iterator<char *>(pbase());\n        const auto rpptr = std::reverse_iterator<char *>(pptr());\n        auto is_ascii = [](char c) { return (static_cast<unsigned char>(c) & 0x80) == 0x00; };\n        auto is_leading = [](char c) { return (static_cast<unsigned char>(c) & 0xC0) == 0xC0; };\n        auto is_leading_2b = [](char c) { return static_cast<unsigned char>(c) <= 0xDF; };\n        auto is_leading_3b = [](char c) { return static_cast<unsigned char>(c) <= 0xEF; };\n        // If the last character is ASCII, there are no incomplete code points\n        if (is_ascii(*rpptr)) {\n            return 0;\n        }\n        // Otherwise, work back from the end of the buffer and find the first\n        // UTF-8 leading byte\n        const auto rpend = rbase - rpptr >= 3 ? rpptr + 3 : rbase;\n        const auto leading = std::find_if(rpptr, rpend, is_leading);\n        if (leading == rbase) {\n            return 0;\n        }\n        const auto dist = static_cast<size_t>(leading - rpptr);\n        size_t remainder = 0;\n\n        if (dist == 0) {\n            remainder = 1; // 1-byte code point is impossible\n        } else if (dist == 1) {\n            remainder = is_leading_2b(*leading) ? 0 : dist + 1;\n        } else if (dist == 2) {\n            remainder = is_leading_3b(*leading) ? 0 : dist + 1;\n        }\n        // else if (dist >= 3), at least 4 bytes before encountering an UTF-8\n        // leading byte, either no remainder or invalid UTF-8.\n        // Invalid UTF-8 will cause an exception later when converting\n        // to a Python string, so that's not handled here.\n        return remainder;\n    }\n\n    // This function must be non-virtual to be called in a destructor.\n    int _sync() {\n        if (pbase() != pptr()) { // If buffer is not empty\n            gil_scoped_acquire tmp;\n            // This subtraction cannot be negative, so dropping the sign.\n            auto size = static_cast<size_t>(pptr() - pbase());\n            size_t remainder = utf8_remainder();\n\n            if (size > remainder) {\n                str line(pbase(), size - remainder);\n                pywrite(std::move(line));\n                pyflush();\n            }\n\n            // Copy the remainder at the end of the buffer to the beginning:\n            if (remainder > 0) {\n                std::memmove(pbase(), pptr() - remainder, remainder);\n            }\n            setp(pbase(), epptr());\n            pbump(static_cast<int>(remainder));\n        }\n        return 0;\n    }\n\n    int sync() override { return _sync(); }\n\npublic:\n    explicit pythonbuf(const object &pyostream, size_t buffer_size = 1024)\n        : buf_size(buffer_size), d_buffer(new char[buf_size]), pywrite(pyostream.attr(\"write\")),\n          pyflush(pyostream.attr(\"flush\")) {\n        setp(d_buffer.get(), d_buffer.get() + buf_size - 1);\n    }\n\n    pythonbuf(pythonbuf &&) = default;\n\n    /// Sync before destroy\n    ~pythonbuf() override { _sync(); }\n};\n\nPYBIND11_NAMESPACE_END(detail)\n\n/** \\rst\n    This a move-only guard that redirects output.\n\n    .. code-block:: cpp\n\n        #include <pybind11/iostream.h>\n\n        ...\n\n        {\n            py::scoped_ostream_redirect output;\n            std::cout << \"Hello, World!\"; // Python stdout\n        } // <-- return std::cout to normal\n\n    You can explicitly pass the c++ stream and the python object,\n    for example to guard stderr instead.\n\n    .. code-block:: cpp\n\n        {\n            py::scoped_ostream_redirect output{\n                std::cerr, py::module::import(\"sys\").attr(\"stderr\")};\n            std::cout << \"Hello, World!\";\n        }\n \\endrst */\nclass scoped_ostream_redirect {\nprotected:\n    std::streambuf *old;\n    std::ostream &costream;\n    detail::pythonbuf buffer;\n\npublic:\n    explicit scoped_ostream_redirect(std::ostream &costream = std::cout,\n                                     const object &pyostream\n                                     = module_::import(\"sys\").attr(\"stdout\"))\n        : costream(costream), buffer(pyostream) {\n        old = costream.rdbuf(&buffer);\n    }\n\n    ~scoped_ostream_redirect() { costream.rdbuf(old); }\n\n    scoped_ostream_redirect(const scoped_ostream_redirect &) = delete;\n    scoped_ostream_redirect(scoped_ostream_redirect &&other) = default;\n    scoped_ostream_redirect &operator=(const scoped_ostream_redirect &) = delete;\n    scoped_ostream_redirect &operator=(scoped_ostream_redirect &&) = delete;\n};\n\n/** \\rst\n    Like `scoped_ostream_redirect`, but redirects cerr by default. This class\n    is provided primary to make ``py::call_guard`` easier to make.\n\n    .. code-block:: cpp\n\n     m.def(\"noisy_func\", &noisy_func,\n           py::call_guard<scoped_ostream_redirect,\n                          scoped_estream_redirect>());\n\n\\endrst */\nclass scoped_estream_redirect : public scoped_ostream_redirect {\npublic:\n    explicit scoped_estream_redirect(std::ostream &costream = std::cerr,\n                                     const object &pyostream\n                                     = module_::import(\"sys\").attr(\"stderr\"))\n        : scoped_ostream_redirect(costream, pyostream) {}\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Class to redirect output as a context manager. C++ backend.\nclass OstreamRedirect {\n    bool do_stdout_;\n    bool do_stderr_;\n    std::unique_ptr<scoped_ostream_redirect> redirect_stdout;\n    std::unique_ptr<scoped_estream_redirect> redirect_stderr;\n\npublic:\n    explicit OstreamRedirect(bool do_stdout = true, bool do_stderr = true)\n        : do_stdout_(do_stdout), do_stderr_(do_stderr) {}\n\n    void enter() {\n        if (do_stdout_) {\n            redirect_stdout.reset(new scoped_ostream_redirect());\n        }\n        if (do_stderr_) {\n            redirect_stderr.reset(new scoped_estream_redirect());\n        }\n    }\n\n    void exit() {\n        redirect_stdout.reset();\n        redirect_stderr.reset();\n    }\n};\n\nPYBIND11_NAMESPACE_END(detail)\n\n/** \\rst\n    This is a helper function to add a C++ redirect context manager to Python\n    instead of using a C++ guard. To use it, add the following to your binding code:\n\n    .. code-block:: cpp\n\n        #include <pybind11/iostream.h>\n\n        ...\n\n        py::add_ostream_redirect(m, \"ostream_redirect\");\n\n    You now have a Python context manager that redirects your output:\n\n    .. code-block:: python\n\n        with m.ostream_redirect():\n            m.print_to_cout_function()\n\n    This manager can optionally be told which streams to operate on:\n\n    .. code-block:: python\n\n        with m.ostream_redirect(stdout=true, stderr=true):\n            m.noisy_function_with_error_printing()\n\n \\endrst */\ninline class_<detail::OstreamRedirect>\nadd_ostream_redirect(module_ m, const std::string &name = \"ostream_redirect\") {\n    return class_<detail::OstreamRedirect>(std::move(m), name.c_str(), module_local())\n        .def(init<bool, bool>(), arg(\"stdout\") = true, arg(\"stderr\") = true)\n        .def(\"__enter__\", &detail::OstreamRedirect::enter)\n        .def(\"__exit__\", [](detail::OstreamRedirect &self_, const args &) { self_.exit(); });\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/numpy.h",
    "content": "/*\n    pybind11/numpy.h: Basic NumPy support, vectorize() wrapper\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n#include \"complex.h\"\n\n#include <algorithm>\n#include <array>\n#include <cstdint>\n#include <cstdlib>\n#include <cstring>\n#include <functional>\n#include <numeric>\n#include <sstream>\n#include <string>\n#include <type_traits>\n#include <typeindex>\n#include <utility>\n#include <vector>\n\n/* This will be true on all flat address space platforms and allows us to reduce the\n   whole npy_intp / ssize_t / Py_intptr_t business down to just ssize_t for all size\n   and dimension types (e.g. shape, strides, indexing), instead of inflicting this\n   upon the library user. */\nstatic_assert(sizeof(::pybind11::ssize_t) == sizeof(Py_intptr_t), \"ssize_t != Py_intptr_t\");\nstatic_assert(std::is_signed<Py_intptr_t>::value, \"Py_intptr_t must be signed\");\n// We now can reinterpret_cast between py::ssize_t and Py_intptr_t (MSVC + PyPy cares)\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\nclass array; // Forward declaration\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <>\nstruct handle_type_name<array> {\n    static constexpr auto name = const_name(\"numpy.ndarray\");\n};\n\ntemplate <typename type, typename SFINAE = void>\nstruct npy_format_descriptor;\n\nstruct PyArrayDescr_Proxy {\n    PyObject_HEAD\n    PyObject *typeobj;\n    char kind;\n    char type;\n    char byteorder;\n    char flags;\n    int type_num;\n    int elsize;\n    int alignment;\n    char *subarray;\n    PyObject *fields;\n    PyObject *names;\n};\n\nstruct PyArray_Proxy {\n    PyObject_HEAD\n    char *data;\n    int nd;\n    ssize_t *dimensions;\n    ssize_t *strides;\n    PyObject *base;\n    PyObject *descr;\n    int flags;\n};\n\nstruct PyVoidScalarObject_Proxy {\n    PyObject_VAR_HEAD char *obval;\n    PyArrayDescr_Proxy *descr;\n    int flags;\n    PyObject *base;\n};\n\nstruct numpy_type_info {\n    PyObject *dtype_ptr;\n    std::string format_str;\n};\n\nstruct numpy_internals {\n    std::unordered_map<std::type_index, numpy_type_info> registered_dtypes;\n\n    numpy_type_info *get_type_info(const std::type_info &tinfo, bool throw_if_missing = true) {\n        auto it = registered_dtypes.find(std::type_index(tinfo));\n        if (it != registered_dtypes.end()) {\n            return &(it->second);\n        }\n        if (throw_if_missing) {\n            pybind11_fail(std::string(\"NumPy type info missing for \") + tinfo.name());\n        }\n        return nullptr;\n    }\n\n    template <typename T>\n    numpy_type_info *get_type_info(bool throw_if_missing = true) {\n        return get_type_info(typeid(typename std::remove_cv<T>::type), throw_if_missing);\n    }\n};\n\nPYBIND11_NOINLINE void load_numpy_internals(numpy_internals *&ptr) {\n    ptr = &get_or_create_shared_data<numpy_internals>(\"_numpy_internals\");\n}\n\ninline numpy_internals &get_numpy_internals() {\n    static numpy_internals *ptr = nullptr;\n    if (!ptr) {\n        load_numpy_internals(ptr);\n    }\n    return *ptr;\n}\n\ntemplate <typename T>\nstruct same_size {\n    template <typename U>\n    using as = bool_constant<sizeof(T) == sizeof(U)>;\n};\n\ntemplate <typename Concrete>\nconstexpr int platform_lookup() {\n    return -1;\n}\n\n// Lookup a type according to its size, and return a value corresponding to the NumPy typenum.\ntemplate <typename Concrete, typename T, typename... Ts, typename... Ints>\nconstexpr int platform_lookup(int I, Ints... Is) {\n    return sizeof(Concrete) == sizeof(T) ? I : platform_lookup<Concrete, Ts...>(Is...);\n}\n\nstruct npy_api {\n    enum constants {\n        NPY_ARRAY_C_CONTIGUOUS_ = 0x0001,\n        NPY_ARRAY_F_CONTIGUOUS_ = 0x0002,\n        NPY_ARRAY_OWNDATA_ = 0x0004,\n        NPY_ARRAY_FORCECAST_ = 0x0010,\n        NPY_ARRAY_ENSUREARRAY_ = 0x0040,\n        NPY_ARRAY_ALIGNED_ = 0x0100,\n        NPY_ARRAY_WRITEABLE_ = 0x0400,\n        NPY_BOOL_ = 0,\n        NPY_BYTE_,\n        NPY_UBYTE_,\n        NPY_SHORT_,\n        NPY_USHORT_,\n        NPY_INT_,\n        NPY_UINT_,\n        NPY_LONG_,\n        NPY_ULONG_,\n        NPY_LONGLONG_,\n        NPY_ULONGLONG_,\n        NPY_FLOAT_,\n        NPY_DOUBLE_,\n        NPY_LONGDOUBLE_,\n        NPY_CFLOAT_,\n        NPY_CDOUBLE_,\n        NPY_CLONGDOUBLE_,\n        NPY_OBJECT_ = 17,\n        NPY_STRING_,\n        NPY_UNICODE_,\n        NPY_VOID_,\n        // Platform-dependent normalization\n        NPY_INT8_ = NPY_BYTE_,\n        NPY_UINT8_ = NPY_UBYTE_,\n        NPY_INT16_ = NPY_SHORT_,\n        NPY_UINT16_ = NPY_USHORT_,\n        // `npy_common.h` defines the integer aliases. In order, it checks:\n        // NPY_BITSOF_LONG, NPY_BITSOF_LONGLONG, NPY_BITSOF_INT, NPY_BITSOF_SHORT, NPY_BITSOF_CHAR\n        // and assigns the alias to the first matching size, so we should check in this order.\n        NPY_INT32_\n        = platform_lookup<std::int32_t, long, int, short>(NPY_LONG_, NPY_INT_, NPY_SHORT_),\n        NPY_UINT32_ = platform_lookup<std::uint32_t, unsigned long, unsigned int, unsigned short>(\n            NPY_ULONG_, NPY_UINT_, NPY_USHORT_),\n        NPY_INT64_\n        = platform_lookup<std::int64_t, long, long long, int>(NPY_LONG_, NPY_LONGLONG_, NPY_INT_),\n        NPY_UINT64_\n        = platform_lookup<std::uint64_t, unsigned long, unsigned long long, unsigned int>(\n            NPY_ULONG_, NPY_ULONGLONG_, NPY_UINT_),\n    };\n\n    struct PyArray_Dims {\n        Py_intptr_t *ptr;\n        int len;\n    };\n\n    static npy_api &get() {\n        static npy_api api = lookup();\n        return api;\n    }\n\n    bool PyArray_Check_(PyObject *obj) const {\n        return PyObject_TypeCheck(obj, PyArray_Type_) != 0;\n    }\n    bool PyArrayDescr_Check_(PyObject *obj) const {\n        return PyObject_TypeCheck(obj, PyArrayDescr_Type_) != 0;\n    }\n\n    unsigned int (*PyArray_GetNDArrayCFeatureVersion_)();\n    PyObject *(*PyArray_DescrFromType_)(int);\n    PyObject *(*PyArray_NewFromDescr_)(PyTypeObject *,\n                                       PyObject *,\n                                       int,\n                                       Py_intptr_t const *,\n                                       Py_intptr_t const *,\n                                       void *,\n                                       int,\n                                       PyObject *);\n    // Unused. Not removed because that affects ABI of the class.\n    PyObject *(*PyArray_DescrNewFromType_)(int);\n    int (*PyArray_CopyInto_)(PyObject *, PyObject *);\n    PyObject *(*PyArray_NewCopy_)(PyObject *, int);\n    PyTypeObject *PyArray_Type_;\n    PyTypeObject *PyVoidArrType_Type_;\n    PyTypeObject *PyArrayDescr_Type_;\n    PyObject *(*PyArray_DescrFromScalar_)(PyObject *);\n    PyObject *(*PyArray_FromAny_)(PyObject *, PyObject *, int, int, int, PyObject *);\n    int (*PyArray_DescrConverter_)(PyObject *, PyObject **);\n    bool (*PyArray_EquivTypes_)(PyObject *, PyObject *);\n    int (*PyArray_GetArrayParamsFromObject_)(PyObject *,\n                                             PyObject *,\n                                             unsigned char,\n                                             PyObject **,\n                                             int *,\n                                             Py_intptr_t *,\n                                             PyObject **,\n                                             PyObject *);\n    PyObject *(*PyArray_Squeeze_)(PyObject *);\n    // Unused. Not removed because that affects ABI of the class.\n    int (*PyArray_SetBaseObject_)(PyObject *, PyObject *);\n    PyObject *(*PyArray_Resize_)(PyObject *, PyArray_Dims *, int, int);\n    PyObject *(*PyArray_Newshape_)(PyObject *, PyArray_Dims *, int);\n    PyObject *(*PyArray_View_)(PyObject *, PyObject *, PyObject *);\n\nprivate:\n    enum functions {\n        API_PyArray_GetNDArrayCFeatureVersion = 211,\n        API_PyArray_Type = 2,\n        API_PyArrayDescr_Type = 3,\n        API_PyVoidArrType_Type = 39,\n        API_PyArray_DescrFromType = 45,\n        API_PyArray_DescrFromScalar = 57,\n        API_PyArray_FromAny = 69,\n        API_PyArray_Resize = 80,\n        API_PyArray_CopyInto = 82,\n        API_PyArray_NewCopy = 85,\n        API_PyArray_NewFromDescr = 94,\n        API_PyArray_DescrNewFromType = 96,\n        API_PyArray_Newshape = 135,\n        API_PyArray_Squeeze = 136,\n        API_PyArray_View = 137,\n        API_PyArray_DescrConverter = 174,\n        API_PyArray_EquivTypes = 182,\n        API_PyArray_GetArrayParamsFromObject = 278,\n        API_PyArray_SetBaseObject = 282\n    };\n\n    static npy_api lookup() {\n        module_ m = module_::import(\"numpy.core.multiarray\");\n        auto c = m.attr(\"_ARRAY_API\");\n        void **api_ptr = (void **) PyCapsule_GetPointer(c.ptr(), nullptr);\n        npy_api api;\n#define DECL_NPY_API(Func) api.Func##_ = (decltype(api.Func##_)) api_ptr[API_##Func];\n        DECL_NPY_API(PyArray_GetNDArrayCFeatureVersion);\n        if (api.PyArray_GetNDArrayCFeatureVersion_() < 0x7) {\n            pybind11_fail(\"pybind11 numpy support requires numpy >= 1.7.0\");\n        }\n        DECL_NPY_API(PyArray_Type);\n        DECL_NPY_API(PyVoidArrType_Type);\n        DECL_NPY_API(PyArrayDescr_Type);\n        DECL_NPY_API(PyArray_DescrFromType);\n        DECL_NPY_API(PyArray_DescrFromScalar);\n        DECL_NPY_API(PyArray_FromAny);\n        DECL_NPY_API(PyArray_Resize);\n        DECL_NPY_API(PyArray_CopyInto);\n        DECL_NPY_API(PyArray_NewCopy);\n        DECL_NPY_API(PyArray_NewFromDescr);\n        DECL_NPY_API(PyArray_DescrNewFromType);\n        DECL_NPY_API(PyArray_Newshape);\n        DECL_NPY_API(PyArray_Squeeze);\n        DECL_NPY_API(PyArray_View);\n        DECL_NPY_API(PyArray_DescrConverter);\n        DECL_NPY_API(PyArray_EquivTypes);\n        DECL_NPY_API(PyArray_GetArrayParamsFromObject);\n        DECL_NPY_API(PyArray_SetBaseObject);\n\n#undef DECL_NPY_API\n        return api;\n    }\n};\n\ninline PyArray_Proxy *array_proxy(void *ptr) { return reinterpret_cast<PyArray_Proxy *>(ptr); }\n\ninline const PyArray_Proxy *array_proxy(const void *ptr) {\n    return reinterpret_cast<const PyArray_Proxy *>(ptr);\n}\n\ninline PyArrayDescr_Proxy *array_descriptor_proxy(PyObject *ptr) {\n    return reinterpret_cast<PyArrayDescr_Proxy *>(ptr);\n}\n\ninline const PyArrayDescr_Proxy *array_descriptor_proxy(const PyObject *ptr) {\n    return reinterpret_cast<const PyArrayDescr_Proxy *>(ptr);\n}\n\ninline bool check_flags(const void *ptr, int flag) {\n    return (flag == (array_proxy(ptr)->flags & flag));\n}\n\ntemplate <typename T>\nstruct is_std_array : std::false_type {};\ntemplate <typename T, size_t N>\nstruct is_std_array<std::array<T, N>> : std::true_type {};\ntemplate <typename T>\nstruct is_complex : std::false_type {};\ntemplate <typename T>\nstruct is_complex<std::complex<T>> : std::true_type {};\n\ntemplate <typename T>\nstruct array_info_scalar {\n    using type = T;\n    static constexpr bool is_array = false;\n    static constexpr bool is_empty = false;\n    static constexpr auto extents = const_name(\"\");\n    static void append_extents(list & /* shape */) {}\n};\n// Computes underlying type and a comma-separated list of extents for array\n// types (any mix of std::array and built-in arrays). An array of char is\n// treated as scalar because it gets special handling.\ntemplate <typename T>\nstruct array_info : array_info_scalar<T> {};\ntemplate <typename T, size_t N>\nstruct array_info<std::array<T, N>> {\n    using type = typename array_info<T>::type;\n    static constexpr bool is_array = true;\n    static constexpr bool is_empty = (N == 0) || array_info<T>::is_empty;\n    static constexpr size_t extent = N;\n\n    // appends the extents to shape\n    static void append_extents(list &shape) {\n        shape.append(N);\n        array_info<T>::append_extents(shape);\n    }\n\n    static constexpr auto extents = const_name<array_info<T>::is_array>(\n        concat(const_name<N>(), array_info<T>::extents), const_name<N>());\n};\n// For numpy we have special handling for arrays of characters, so we don't include\n// the size in the array extents.\ntemplate <size_t N>\nstruct array_info<char[N]> : array_info_scalar<char[N]> {};\ntemplate <size_t N>\nstruct array_info<std::array<char, N>> : array_info_scalar<std::array<char, N>> {};\ntemplate <typename T, size_t N>\nstruct array_info<T[N]> : array_info<std::array<T, N>> {};\ntemplate <typename T>\nusing remove_all_extents_t = typename array_info<T>::type;\n\ntemplate <typename T>\nusing is_pod_struct\n    = all_of<std::is_standard_layout<T>, // since we're accessing directly in memory\n                                         // we need a standard layout type\n#if defined(__GLIBCXX__)                                                                          \\\n    && (__GLIBCXX__ < 20150422 || __GLIBCXX__ == 20150426 || __GLIBCXX__ == 20150623              \\\n        || __GLIBCXX__ == 20150626 || __GLIBCXX__ == 20160803)\n             // libstdc++ < 5 (including versions 4.8.5, 4.9.3 and 4.9.4 which were released after\n             // 5) don't implement is_trivially_copyable, so approximate it\n             std::is_trivially_destructible<T>,\n             satisfies_any_of<T, std::has_trivial_copy_constructor, std::has_trivial_copy_assign>,\n#else\n             std::is_trivially_copyable<T>,\n#endif\n             satisfies_none_of<T,\n                               std::is_reference,\n                               std::is_array,\n                               is_std_array,\n                               std::is_arithmetic,\n                               is_complex,\n                               std::is_enum>>;\n\n// Replacement for std::is_pod (deprecated in C++20)\ntemplate <typename T>\nusing is_pod = all_of<std::is_standard_layout<T>, std::is_trivial<T>>;\n\ntemplate <ssize_t Dim = 0, typename Strides>\nssize_t byte_offset_unsafe(const Strides &) {\n    return 0;\n}\ntemplate <ssize_t Dim = 0, typename Strides, typename... Ix>\nssize_t byte_offset_unsafe(const Strides &strides, ssize_t i, Ix... index) {\n    return i * strides[Dim] + byte_offset_unsafe<Dim + 1>(strides, index...);\n}\n\n/**\n * Proxy class providing unsafe, unchecked const access to array data.  This is constructed through\n * the `unchecked<T, N>()` method of `array` or the `unchecked<N>()` method of `array_t<T>`. `Dims`\n * will be -1 for dimensions determined at runtime.\n */\ntemplate <typename T, ssize_t Dims>\nclass unchecked_reference {\nprotected:\n    static constexpr bool Dynamic = Dims < 0;\n    const unsigned char *data_;\n    // Storing the shape & strides in local variables (i.e. these arrays) allows the compiler to\n    // make large performance gains on big, nested loops, but requires compile-time dimensions\n    conditional_t<Dynamic, const ssize_t *, std::array<ssize_t, (size_t) Dims>> shape_, strides_;\n    const ssize_t dims_;\n\n    friend class pybind11::array;\n    // Constructor for compile-time dimensions:\n    template <bool Dyn = Dynamic>\n    unchecked_reference(const void *data,\n                        const ssize_t *shape,\n                        const ssize_t *strides,\n                        enable_if_t<!Dyn, ssize_t>)\n        : data_{reinterpret_cast<const unsigned char *>(data)}, dims_{Dims} {\n        for (size_t i = 0; i < (size_t) dims_; i++) {\n            shape_[i] = shape[i];\n            strides_[i] = strides[i];\n        }\n    }\n    // Constructor for runtime dimensions:\n    template <bool Dyn = Dynamic>\n    unchecked_reference(const void *data,\n                        const ssize_t *shape,\n                        const ssize_t *strides,\n                        enable_if_t<Dyn, ssize_t> dims)\n        : data_{reinterpret_cast<const unsigned char *>(data)}, shape_{shape}, strides_{strides},\n          dims_{dims} {}\n\npublic:\n    /**\n     * Unchecked const reference access to data at the given indices.  For a compile-time known\n     * number of dimensions, this requires the correct number of arguments; for run-time\n     * dimensionality, this is not checked (and so is up to the caller to use safely).\n     */\n    template <typename... Ix>\n    const T &operator()(Ix... index) const {\n        static_assert(ssize_t{sizeof...(Ix)} == Dims || Dynamic,\n                      \"Invalid number of indices for unchecked array reference\");\n        return *reinterpret_cast<const T *>(data_\n                                            + byte_offset_unsafe(strides_, ssize_t(index)...));\n    }\n    /**\n     * Unchecked const reference access to data; this operator only participates if the reference\n     * is to a 1-dimensional array.  When present, this is exactly equivalent to `obj(index)`.\n     */\n    template <ssize_t D = Dims, typename = enable_if_t<D == 1 || Dynamic>>\n    const T &operator[](ssize_t index) const {\n        return operator()(index);\n    }\n\n    /// Pointer access to the data at the given indices.\n    template <typename... Ix>\n    const T *data(Ix... ix) const {\n        return &operator()(ssize_t(ix)...);\n    }\n\n    /// Returns the item size, i.e. sizeof(T)\n    constexpr static ssize_t itemsize() { return sizeof(T); }\n\n    /// Returns the shape (i.e. size) of dimension `dim`\n    ssize_t shape(ssize_t dim) const { return shape_[(size_t) dim]; }\n\n    /// Returns the number of dimensions of the array\n    ssize_t ndim() const { return dims_; }\n\n    /// Returns the total number of elements in the referenced array, i.e. the product of the\n    /// shapes\n    template <bool Dyn = Dynamic>\n    enable_if_t<!Dyn, ssize_t> size() const {\n        return std::accumulate(\n            shape_.begin(), shape_.end(), (ssize_t) 1, std::multiplies<ssize_t>());\n    }\n    template <bool Dyn = Dynamic>\n    enable_if_t<Dyn, ssize_t> size() const {\n        return std::accumulate(shape_, shape_ + ndim(), (ssize_t) 1, std::multiplies<ssize_t>());\n    }\n\n    /// Returns the total number of bytes used by the referenced data.  Note that the actual span\n    /// in memory may be larger if the referenced array has non-contiguous strides (e.g. for a\n    /// slice).\n    ssize_t nbytes() const { return size() * itemsize(); }\n};\n\ntemplate <typename T, ssize_t Dims>\nclass unchecked_mutable_reference : public unchecked_reference<T, Dims> {\n    friend class pybind11::array;\n    using ConstBase = unchecked_reference<T, Dims>;\n    using ConstBase::ConstBase;\n    using ConstBase::Dynamic;\n\npublic:\n    // Bring in const-qualified versions from base class\n    using ConstBase::operator();\n    using ConstBase::operator[];\n\n    /// Mutable, unchecked access to data at the given indices.\n    template <typename... Ix>\n    T &operator()(Ix... index) {\n        static_assert(ssize_t{sizeof...(Ix)} == Dims || Dynamic,\n                      \"Invalid number of indices for unchecked array reference\");\n        return const_cast<T &>(ConstBase::operator()(index...));\n    }\n    /**\n     * Mutable, unchecked access data at the given index; this operator only participates if the\n     * reference is to a 1-dimensional array (or has runtime dimensions).  When present, this is\n     * exactly equivalent to `obj(index)`.\n     */\n    template <ssize_t D = Dims, typename = enable_if_t<D == 1 || Dynamic>>\n    T &operator[](ssize_t index) {\n        return operator()(index);\n    }\n\n    /// Mutable pointer access to the data at the given indices.\n    template <typename... Ix>\n    T *mutable_data(Ix... ix) {\n        return &operator()(ssize_t(ix)...);\n    }\n};\n\ntemplate <typename T, ssize_t Dim>\nstruct type_caster<unchecked_reference<T, Dim>> {\n    static_assert(Dim == 0 && Dim > 0 /* always fail */,\n                  \"unchecked array proxy object is not castable\");\n};\ntemplate <typename T, ssize_t Dim>\nstruct type_caster<unchecked_mutable_reference<T, Dim>>\n    : type_caster<unchecked_reference<T, Dim>> {};\n\nPYBIND11_NAMESPACE_END(detail)\n\nclass dtype : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(dtype, object, detail::npy_api::get().PyArrayDescr_Check_)\n\n    explicit dtype(const buffer_info &info) {\n        dtype descr(_dtype_from_pep3118()(pybind11::str(info.format)));\n        // If info.itemsize == 0, use the value calculated from the format string\n        m_ptr = descr.strip_padding(info.itemsize != 0 ? info.itemsize : descr.itemsize())\n                    .release()\n                    .ptr();\n    }\n\n    explicit dtype(const pybind11::str &format) : dtype(from_args(format)) {}\n\n    explicit dtype(const std::string &format) : dtype(pybind11::str(format)) {}\n\n    explicit dtype(const char *format) : dtype(pybind11::str(format)) {}\n\n    dtype(list names, list formats, list offsets, ssize_t itemsize) {\n        dict args;\n        args[\"names\"] = std::move(names);\n        args[\"formats\"] = std::move(formats);\n        args[\"offsets\"] = std::move(offsets);\n        args[\"itemsize\"] = pybind11::int_(itemsize);\n        m_ptr = from_args(args).release().ptr();\n    }\n\n    /// Return dtype for the given typenum (one of the NPY_TYPES).\n    /// https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_DescrFromType\n    explicit dtype(int typenum)\n        : object(detail::npy_api::get().PyArray_DescrFromType_(typenum), stolen_t{}) {\n        if (m_ptr == nullptr) {\n            throw error_already_set();\n        }\n    }\n\n    /// This is essentially the same as calling numpy.dtype(args) in Python.\n    static dtype from_args(const object &args) {\n        PyObject *ptr = nullptr;\n        if ((detail::npy_api::get().PyArray_DescrConverter_(args.ptr(), &ptr) == 0) || !ptr) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<dtype>(ptr);\n    }\n\n    /// Return dtype associated with a C++ type.\n    template <typename T>\n    static dtype of() {\n        return detail::npy_format_descriptor<typename std::remove_cv<T>::type>::dtype();\n    }\n\n    /// Size of the data type in bytes.\n    ssize_t itemsize() const { return detail::array_descriptor_proxy(m_ptr)->elsize; }\n\n    /// Returns true for structured data types.\n    bool has_fields() const { return detail::array_descriptor_proxy(m_ptr)->names != nullptr; }\n\n    /// Single-character code for dtype's kind.\n    /// For example, floating point types are 'f' and integral types are 'i'.\n    char kind() const { return detail::array_descriptor_proxy(m_ptr)->kind; }\n\n    /// Single-character for dtype's type.\n    /// For example, ``float`` is 'f', ``double`` 'd', ``int`` 'i', and ``long`` 'l'.\n    char char_() const {\n        // Note: The signature, `dtype::char_` follows the naming of NumPy's\n        // public Python API (i.e., ``dtype.char``), rather than its internal\n        // C API (``PyArray_Descr::type``).\n        return detail::array_descriptor_proxy(m_ptr)->type;\n    }\n\n    /// type number of dtype.\n    int num() const {\n        // Note: The signature, `dtype::num` follows the naming of NumPy's public\n        // Python API (i.e., ``dtype.num``), rather than its internal\n        // C API (``PyArray_Descr::type_num``).\n        return detail::array_descriptor_proxy(m_ptr)->type_num;\n    }\n\n    /// Single character for byteorder\n    char byteorder() const { return detail::array_descriptor_proxy(m_ptr)->byteorder; }\n\n    /// Alignment of the data type\n    int alignment() const { return detail::array_descriptor_proxy(m_ptr)->alignment; }\n\n    /// Flags for the array descriptor\n    char flags() const { return detail::array_descriptor_proxy(m_ptr)->flags; }\n\nprivate:\n    static object _dtype_from_pep3118() {\n        static PyObject *obj = module_::import(\"numpy.core._internal\")\n                                   .attr(\"_dtype_from_pep3118\")\n                                   .cast<object>()\n                                   .release()\n                                   .ptr();\n        return reinterpret_borrow<object>(obj);\n    }\n\n    dtype strip_padding(ssize_t itemsize) {\n        // Recursively strip all void fields with empty names that are generated for\n        // padding fields (as of NumPy v1.11).\n        if (!has_fields()) {\n            return *this;\n        }\n\n        struct field_descr {\n            pybind11::str name;\n            object format;\n            pybind11::int_ offset;\n            field_descr(pybind11::str &&name, object &&format, pybind11::int_ &&offset)\n                : name{std::move(name)}, format{std::move(format)}, offset{std::move(offset)} {};\n        };\n        auto field_dict = attr(\"fields\").cast<dict>();\n        std::vector<field_descr> field_descriptors;\n        field_descriptors.reserve(field_dict.size());\n\n        for (auto field : field_dict.attr(\"items\")()) {\n            auto spec = field.cast<tuple>();\n            auto name = spec[0].cast<pybind11::str>();\n            auto spec_fo = spec[1].cast<tuple>();\n            auto format = spec_fo[0].cast<dtype>();\n            auto offset = spec_fo[1].cast<pybind11::int_>();\n            if ((len(name) == 0u) && format.kind() == 'V') {\n                continue;\n            }\n            field_descriptors.emplace_back(\n                std::move(name), format.strip_padding(format.itemsize()), std::move(offset));\n        }\n\n        std::sort(field_descriptors.begin(),\n                  field_descriptors.end(),\n                  [](const field_descr &a, const field_descr &b) {\n                      return a.offset.cast<int>() < b.offset.cast<int>();\n                  });\n\n        list names, formats, offsets;\n        for (auto &descr : field_descriptors) {\n            names.append(std::move(descr.name));\n            formats.append(std::move(descr.format));\n            offsets.append(std::move(descr.offset));\n        }\n        return dtype(std::move(names), std::move(formats), std::move(offsets), itemsize);\n    }\n};\n\nclass array : public buffer {\npublic:\n    PYBIND11_OBJECT_CVT(array, buffer, detail::npy_api::get().PyArray_Check_, raw_array)\n\n    enum {\n        c_style = detail::npy_api::NPY_ARRAY_C_CONTIGUOUS_,\n        f_style = detail::npy_api::NPY_ARRAY_F_CONTIGUOUS_,\n        forcecast = detail::npy_api::NPY_ARRAY_FORCECAST_\n    };\n\n    array() : array(0, static_cast<const double *>(nullptr)) {}\n\n    using ShapeContainer = detail::any_container<ssize_t>;\n    using StridesContainer = detail::any_container<ssize_t>;\n\n    // Constructs an array taking shape/strides from arbitrary container types\n    array(const pybind11::dtype &dt,\n          ShapeContainer shape,\n          StridesContainer strides,\n          const void *ptr = nullptr,\n          handle base = handle()) {\n\n        if (strides->empty()) {\n            *strides = detail::c_strides(*shape, dt.itemsize());\n        }\n\n        auto ndim = shape->size();\n        if (ndim != strides->size()) {\n            pybind11_fail(\"NumPy: shape ndim doesn't match strides ndim\");\n        }\n        auto descr = dt;\n\n        int flags = 0;\n        if (base && ptr) {\n            if (isinstance<array>(base)) {\n                /* Copy flags from base (except ownership bit) */\n                flags = reinterpret_borrow<array>(base).flags()\n                        & ~detail::npy_api::NPY_ARRAY_OWNDATA_;\n            } else {\n                /* Writable by default, easy to downgrade later on if needed */\n                flags = detail::npy_api::NPY_ARRAY_WRITEABLE_;\n            }\n        }\n\n        auto &api = detail::npy_api::get();\n        auto tmp = reinterpret_steal<object>(api.PyArray_NewFromDescr_(\n            api.PyArray_Type_,\n            descr.release().ptr(),\n            (int) ndim,\n            // Use reinterpret_cast for PyPy on Windows (remove if fixed, checked on 7.3.1)\n            reinterpret_cast<Py_intptr_t *>(shape->data()),\n            reinterpret_cast<Py_intptr_t *>(strides->data()),\n            const_cast<void *>(ptr),\n            flags,\n            nullptr));\n        if (!tmp) {\n            throw error_already_set();\n        }\n        if (ptr) {\n            if (base) {\n                api.PyArray_SetBaseObject_(tmp.ptr(), base.inc_ref().ptr());\n            } else {\n                tmp = reinterpret_steal<object>(\n                    api.PyArray_NewCopy_(tmp.ptr(), -1 /* any order */));\n            }\n        }\n        m_ptr = tmp.release().ptr();\n    }\n\n    array(const pybind11::dtype &dt,\n          ShapeContainer shape,\n          const void *ptr = nullptr,\n          handle base = handle())\n        : array(dt, std::move(shape), {}, ptr, base) {}\n\n    template <typename T,\n              typename\n              = detail::enable_if_t<std::is_integral<T>::value && !std::is_same<bool, T>::value>>\n    array(const pybind11::dtype &dt, T count, const void *ptr = nullptr, handle base = handle())\n        : array(dt, {{count}}, ptr, base) {}\n\n    template <typename T>\n    array(ShapeContainer shape, StridesContainer strides, const T *ptr, handle base = handle())\n        : array(pybind11::dtype::of<T>(), std::move(shape), std::move(strides), ptr, base) {}\n\n    template <typename T>\n    array(ShapeContainer shape, const T *ptr, handle base = handle())\n        : array(std::move(shape), {}, ptr, base) {}\n\n    template <typename T>\n    explicit array(ssize_t count, const T *ptr, handle base = handle())\n        : array({count}, {}, ptr, base) {}\n\n    explicit array(const buffer_info &info, handle base = handle())\n        : array(pybind11::dtype(info), info.shape, info.strides, info.ptr, base) {}\n\n    /// Array descriptor (dtype)\n    pybind11::dtype dtype() const {\n        return reinterpret_borrow<pybind11::dtype>(detail::array_proxy(m_ptr)->descr);\n    }\n\n    /// Total number of elements\n    ssize_t size() const {\n        return std::accumulate(shape(), shape() + ndim(), (ssize_t) 1, std::multiplies<ssize_t>());\n    }\n\n    /// Byte size of a single element\n    ssize_t itemsize() const {\n        return detail::array_descriptor_proxy(detail::array_proxy(m_ptr)->descr)->elsize;\n    }\n\n    /// Total number of bytes\n    ssize_t nbytes() const { return size() * itemsize(); }\n\n    /// Number of dimensions\n    ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; }\n\n    /// Base object\n    object base() const { return reinterpret_borrow<object>(detail::array_proxy(m_ptr)->base); }\n\n    /// Dimensions of the array\n    const ssize_t *shape() const { return detail::array_proxy(m_ptr)->dimensions; }\n\n    /// Dimension along a given axis\n    ssize_t shape(ssize_t dim) const {\n        if (dim >= ndim()) {\n            fail_dim_check(dim, \"invalid axis\");\n        }\n        return shape()[dim];\n    }\n\n    /// Strides of the array\n    const ssize_t *strides() const { return detail::array_proxy(m_ptr)->strides; }\n\n    /// Stride along a given axis\n    ssize_t strides(ssize_t dim) const {\n        if (dim >= ndim()) {\n            fail_dim_check(dim, \"invalid axis\");\n        }\n        return strides()[dim];\n    }\n\n    /// Return the NumPy array flags\n    int flags() const { return detail::array_proxy(m_ptr)->flags; }\n\n    /// If set, the array is writeable (otherwise the buffer is read-only)\n    bool writeable() const {\n        return detail::check_flags(m_ptr, detail::npy_api::NPY_ARRAY_WRITEABLE_);\n    }\n\n    /// If set, the array owns the data (will be freed when the array is deleted)\n    bool owndata() const {\n        return detail::check_flags(m_ptr, detail::npy_api::NPY_ARRAY_OWNDATA_);\n    }\n\n    /// Pointer to the contained data. If index is not provided, points to the\n    /// beginning of the buffer. May throw if the index would lead to out of bounds access.\n    template <typename... Ix>\n    const void *data(Ix... index) const {\n        return static_cast<const void *>(detail::array_proxy(m_ptr)->data + offset_at(index...));\n    }\n\n    /// Mutable pointer to the contained data. If index is not provided, points to the\n    /// beginning of the buffer. May throw if the index would lead to out of bounds access.\n    /// May throw if the array is not writeable.\n    template <typename... Ix>\n    void *mutable_data(Ix... index) {\n        check_writeable();\n        return static_cast<void *>(detail::array_proxy(m_ptr)->data + offset_at(index...));\n    }\n\n    /// Byte offset from beginning of the array to a given index (full or partial).\n    /// May throw if the index would lead to out of bounds access.\n    template <typename... Ix>\n    ssize_t offset_at(Ix... index) const {\n        if ((ssize_t) sizeof...(index) > ndim()) {\n            fail_dim_check(sizeof...(index), \"too many indices for an array\");\n        }\n        return byte_offset(ssize_t(index)...);\n    }\n\n    ssize_t offset_at() const { return 0; }\n\n    /// Item count from beginning of the array to a given index (full or partial).\n    /// May throw if the index would lead to out of bounds access.\n    template <typename... Ix>\n    ssize_t index_at(Ix... index) const {\n        return offset_at(index...) / itemsize();\n    }\n\n    /**\n     * Returns a proxy object that provides access to the array's data without bounds or\n     * dimensionality checking.  Will throw if the array is missing the `writeable` flag.  Use with\n     * care: the array must not be destroyed or reshaped for the duration of the returned object,\n     * and the caller must take care not to access invalid dimensions or dimension indices.\n     */\n    template <typename T, ssize_t Dims = -1>\n    detail::unchecked_mutable_reference<T, Dims> mutable_unchecked() & {\n        if (Dims >= 0 && ndim() != Dims) {\n            throw std::domain_error(\"array has incorrect number of dimensions: \"\n                                    + std::to_string(ndim()) + \"; expected \"\n                                    + std::to_string(Dims));\n        }\n        return detail::unchecked_mutable_reference<T, Dims>(\n            mutable_data(), shape(), strides(), ndim());\n    }\n\n    /**\n     * Returns a proxy object that provides const access to the array's data without bounds or\n     * dimensionality checking.  Unlike `mutable_unchecked()`, this does not require that the\n     * underlying array have the `writable` flag.  Use with care: the array must not be destroyed\n     * or reshaped for the duration of the returned object, and the caller must take care not to\n     * access invalid dimensions or dimension indices.\n     */\n    template <typename T, ssize_t Dims = -1>\n    detail::unchecked_reference<T, Dims> unchecked() const & {\n        if (Dims >= 0 && ndim() != Dims) {\n            throw std::domain_error(\"array has incorrect number of dimensions: \"\n                                    + std::to_string(ndim()) + \"; expected \"\n                                    + std::to_string(Dims));\n        }\n        return detail::unchecked_reference<T, Dims>(data(), shape(), strides(), ndim());\n    }\n\n    /// Return a new view with all of the dimensions of length 1 removed\n    array squeeze() {\n        auto &api = detail::npy_api::get();\n        return reinterpret_steal<array>(api.PyArray_Squeeze_(m_ptr));\n    }\n\n    /// Resize array to given shape\n    /// If refcheck is true and more that one reference exist to this array\n    /// then resize will succeed only if it makes a reshape, i.e. original size doesn't change\n    void resize(ShapeContainer new_shape, bool refcheck = true) {\n        detail::npy_api::PyArray_Dims d\n            = {// Use reinterpret_cast for PyPy on Windows (remove if fixed, checked on 7.3.1)\n               reinterpret_cast<Py_intptr_t *>(new_shape->data()),\n               int(new_shape->size())};\n        // try to resize, set ordering param to -1 cause it's not used anyway\n        auto new_array = reinterpret_steal<object>(\n            detail::npy_api::get().PyArray_Resize_(m_ptr, &d, int(refcheck), -1));\n        if (!new_array) {\n            throw error_already_set();\n        }\n        if (isinstance<array>(new_array)) {\n            *this = std::move(new_array);\n        }\n    }\n\n    /// Optional `order` parameter omitted, to be added as needed.\n    array reshape(ShapeContainer new_shape) {\n        detail::npy_api::PyArray_Dims d\n            = {reinterpret_cast<Py_intptr_t *>(new_shape->data()), int(new_shape->size())};\n        auto new_array\n            = reinterpret_steal<array>(detail::npy_api::get().PyArray_Newshape_(m_ptr, &d, 0));\n        if (!new_array) {\n            throw error_already_set();\n        }\n        return new_array;\n    }\n\n    /// Create a view of an array in a different data type.\n    /// This function may fundamentally reinterpret the data in the array.\n    /// It is the responsibility of the caller to ensure that this is safe.\n    /// Only supports the `dtype` argument, the `type` argument is omitted,\n    /// to be added as needed.\n    array view(const std::string &dtype) {\n        auto &api = detail::npy_api::get();\n        auto new_view = reinterpret_steal<array>(api.PyArray_View_(\n            m_ptr, dtype::from_args(pybind11::str(dtype)).release().ptr(), nullptr));\n        if (!new_view) {\n            throw error_already_set();\n        }\n        return new_view;\n    }\n\n    /// Ensure that the argument is a NumPy array\n    /// In case of an error, nullptr is returned and the Python error is cleared.\n    static array ensure(handle h, int ExtraFlags = 0) {\n        auto result = reinterpret_steal<array>(raw_array(h.ptr(), ExtraFlags));\n        if (!result) {\n            PyErr_Clear();\n        }\n        return result;\n    }\n\nprotected:\n    template <typename, typename>\n    friend struct detail::npy_format_descriptor;\n\n    void fail_dim_check(ssize_t dim, const std::string &msg) const {\n        throw index_error(msg + \": \" + std::to_string(dim) + \" (ndim = \" + std::to_string(ndim())\n                          + ')');\n    }\n\n    template <typename... Ix>\n    ssize_t byte_offset(Ix... index) const {\n        check_dimensions(index...);\n        return detail::byte_offset_unsafe(strides(), ssize_t(index)...);\n    }\n\n    void check_writeable() const {\n        if (!writeable()) {\n            throw std::domain_error(\"array is not writeable\");\n        }\n    }\n\n    template <typename... Ix>\n    void check_dimensions(Ix... index) const {\n        check_dimensions_impl(ssize_t(0), shape(), ssize_t(index)...);\n    }\n\n    void check_dimensions_impl(ssize_t, const ssize_t *) const {}\n\n    template <typename... Ix>\n    void check_dimensions_impl(ssize_t axis, const ssize_t *shape, ssize_t i, Ix... index) const {\n        if (i >= *shape) {\n            throw index_error(std::string(\"index \") + std::to_string(i)\n                              + \" is out of bounds for axis \" + std::to_string(axis)\n                              + \" with size \" + std::to_string(*shape));\n        }\n        check_dimensions_impl(axis + 1, shape + 1, index...);\n    }\n\n    /// Create array from any object -- always returns a new reference\n    static PyObject *raw_array(PyObject *ptr, int ExtraFlags = 0) {\n        if (ptr == nullptr) {\n            PyErr_SetString(PyExc_ValueError, \"cannot create a pybind11::array from a nullptr\");\n            return nullptr;\n        }\n        return detail::npy_api::get().PyArray_FromAny_(\n            ptr, nullptr, 0, 0, detail::npy_api::NPY_ARRAY_ENSUREARRAY_ | ExtraFlags, nullptr);\n    }\n};\n\ntemplate <typename T, int ExtraFlags = array::forcecast>\nclass array_t : public array {\nprivate:\n    struct private_ctor {};\n    // Delegating constructor needed when both moving and accessing in the same constructor\n    array_t(private_ctor,\n            ShapeContainer &&shape,\n            StridesContainer &&strides,\n            const T *ptr,\n            handle base)\n        : array(std::move(shape), std::move(strides), ptr, base) {}\n\npublic:\n    static_assert(!detail::array_info<T>::is_array, \"Array types cannot be used with array_t\");\n\n    using value_type = T;\n\n    array_t() : array(0, static_cast<const T *>(nullptr)) {}\n    array_t(handle h, borrowed_t) : array(h, borrowed_t{}) {}\n    array_t(handle h, stolen_t) : array(h, stolen_t{}) {}\n\n    PYBIND11_DEPRECATED(\"Use array_t<T>::ensure() instead\")\n    array_t(handle h, bool is_borrowed) : array(raw_array_t(h.ptr()), stolen_t{}) {\n        if (!m_ptr) {\n            PyErr_Clear();\n        }\n        if (!is_borrowed) {\n            Py_XDECREF(h.ptr());\n        }\n    }\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    array_t(const object &o) : array(raw_array_t(o.ptr()), stolen_t{}) {\n        if (!m_ptr) {\n            throw error_already_set();\n        }\n    }\n\n    explicit array_t(const buffer_info &info, handle base = handle()) : array(info, base) {}\n\n    array_t(ShapeContainer shape,\n            StridesContainer strides,\n            const T *ptr = nullptr,\n            handle base = handle())\n        : array(std::move(shape), std::move(strides), ptr, base) {}\n\n    explicit array_t(ShapeContainer shape, const T *ptr = nullptr, handle base = handle())\n        : array_t(private_ctor{},\n                  std::move(shape),\n                  (ExtraFlags & f_style) != 0 ? detail::f_strides(*shape, itemsize())\n                                              : detail::c_strides(*shape, itemsize()),\n                  ptr,\n                  base) {}\n\n    explicit array_t(ssize_t count, const T *ptr = nullptr, handle base = handle())\n        : array({count}, {}, ptr, base) {}\n\n    constexpr ssize_t itemsize() const { return sizeof(T); }\n\n    template <typename... Ix>\n    ssize_t index_at(Ix... index) const {\n        return offset_at(index...) / itemsize();\n    }\n\n    template <typename... Ix>\n    const T *data(Ix... index) const {\n        return static_cast<const T *>(array::data(index...));\n    }\n\n    template <typename... Ix>\n    T *mutable_data(Ix... index) {\n        return static_cast<T *>(array::mutable_data(index...));\n    }\n\n    // Reference to element at a given index\n    template <typename... Ix>\n    const T &at(Ix... index) const {\n        if ((ssize_t) sizeof...(index) != ndim()) {\n            fail_dim_check(sizeof...(index), \"index dimension mismatch\");\n        }\n        return *(static_cast<const T *>(array::data())\n                 + byte_offset(ssize_t(index)...) / itemsize());\n    }\n\n    // Mutable reference to element at a given index\n    template <typename... Ix>\n    T &mutable_at(Ix... index) {\n        if ((ssize_t) sizeof...(index) != ndim()) {\n            fail_dim_check(sizeof...(index), \"index dimension mismatch\");\n        }\n        return *(static_cast<T *>(array::mutable_data())\n                 + byte_offset(ssize_t(index)...) / itemsize());\n    }\n\n    /**\n     * Returns a proxy object that provides access to the array's data without bounds or\n     * dimensionality checking.  Will throw if the array is missing the `writeable` flag.  Use with\n     * care: the array must not be destroyed or reshaped for the duration of the returned object,\n     * and the caller must take care not to access invalid dimensions or dimension indices.\n     */\n    template <ssize_t Dims = -1>\n    detail::unchecked_mutable_reference<T, Dims> mutable_unchecked() & {\n        return array::mutable_unchecked<T, Dims>();\n    }\n\n    /**\n     * Returns a proxy object that provides const access to the array's data without bounds or\n     * dimensionality checking.  Unlike `mutable_unchecked()`, this does not require that the\n     * underlying array have the `writable` flag.  Use with care: the array must not be destroyed\n     * or reshaped for the duration of the returned object, and the caller must take care not to\n     * access invalid dimensions or dimension indices.\n     */\n    template <ssize_t Dims = -1>\n    detail::unchecked_reference<T, Dims> unchecked() const & {\n        return array::unchecked<T, Dims>();\n    }\n\n    /// Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert\n    /// it).  In case of an error, nullptr is returned and the Python error is cleared.\n    static array_t ensure(handle h) {\n        auto result = reinterpret_steal<array_t>(raw_array_t(h.ptr()));\n        if (!result) {\n            PyErr_Clear();\n        }\n        return result;\n    }\n\n    static bool check_(handle h) {\n        const auto &api = detail::npy_api::get();\n        return api.PyArray_Check_(h.ptr())\n               && api.PyArray_EquivTypes_(detail::array_proxy(h.ptr())->descr,\n                                          dtype::of<T>().ptr())\n               && detail::check_flags(h.ptr(), ExtraFlags & (array::c_style | array::f_style));\n    }\n\nprotected:\n    /// Create array from any object -- always returns a new reference\n    static PyObject *raw_array_t(PyObject *ptr) {\n        if (ptr == nullptr) {\n            PyErr_SetString(PyExc_ValueError, \"cannot create a pybind11::array_t from a nullptr\");\n            return nullptr;\n        }\n        return detail::npy_api::get().PyArray_FromAny_(ptr,\n                                                       dtype::of<T>().release().ptr(),\n                                                       0,\n                                                       0,\n                                                       detail::npy_api::NPY_ARRAY_ENSUREARRAY_\n                                                           | ExtraFlags,\n                                                       nullptr);\n    }\n};\n\ntemplate <typename T>\nstruct format_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {\n    static std::string format() {\n        return detail::npy_format_descriptor<typename std::remove_cv<T>::type>::format();\n    }\n};\n\ntemplate <size_t N>\nstruct format_descriptor<char[N]> {\n    static std::string format() { return std::to_string(N) + 's'; }\n};\ntemplate <size_t N>\nstruct format_descriptor<std::array<char, N>> {\n    static std::string format() { return std::to_string(N) + 's'; }\n};\n\ntemplate <typename T>\nstruct format_descriptor<T, detail::enable_if_t<std::is_enum<T>::value>> {\n    static std::string format() {\n        return format_descriptor<\n            typename std::remove_cv<typename std::underlying_type<T>::type>::type>::format();\n    }\n};\n\ntemplate <typename T>\nstruct format_descriptor<T, detail::enable_if_t<detail::array_info<T>::is_array>> {\n    static std::string format() {\n        using namespace detail;\n        static constexpr auto extents = const_name(\"(\") + array_info<T>::extents + const_name(\")\");\n        return extents.text + format_descriptor<remove_all_extents_t<T>>::format();\n    }\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\ntemplate <typename T, int ExtraFlags>\nstruct pyobject_caster<array_t<T, ExtraFlags>> {\n    using type = array_t<T, ExtraFlags>;\n\n    bool load(handle src, bool convert) {\n        if (!convert && !type::check_(src)) {\n            return false;\n        }\n        value = type::ensure(src);\n        return static_cast<bool>(value);\n    }\n\n    static handle cast(const handle &src, return_value_policy /* policy */, handle /* parent */) {\n        return src.inc_ref();\n    }\n    PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name);\n};\n\ntemplate <typename T>\nstruct compare_buffer_info<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {\n    static bool compare(const buffer_info &b) {\n        return npy_api::get().PyArray_EquivTypes_(dtype::of<T>().ptr(), dtype(b).ptr());\n    }\n};\n\ntemplate <typename T, typename = void>\nstruct npy_format_descriptor_name;\n\ntemplate <typename T>\nstruct npy_format_descriptor_name<T, enable_if_t<std::is_integral<T>::value>> {\n    static constexpr auto name = const_name<std::is_same<T, bool>::value>(\n        const_name(\"bool\"),\n        const_name<std::is_signed<T>::value>(\"numpy.int\", \"numpy.uint\")\n            + const_name<sizeof(T) * 8>());\n};\n\ntemplate <typename T>\nstruct npy_format_descriptor_name<T, enable_if_t<std::is_floating_point<T>::value>> {\n    static constexpr auto name = const_name < std::is_same<T, float>::value\n                                 || std::is_same<T, const float>::value\n                                 || std::is_same<T, double>::value\n                                 || std::is_same<T, const double>::value\n                                        > (const_name(\"numpy.float\") + const_name<sizeof(T) * 8>(),\n                                           const_name(\"numpy.longdouble\"));\n};\n\ntemplate <typename T>\nstruct npy_format_descriptor_name<T, enable_if_t<is_complex<T>::value>> {\n    static constexpr auto name = const_name < std::is_same<typename T::value_type, float>::value\n                                 || std::is_same<typename T::value_type, const float>::value\n                                 || std::is_same<typename T::value_type, double>::value\n                                 || std::is_same<typename T::value_type, const double>::value\n                                        > (const_name(\"numpy.complex\")\n                                               + const_name<sizeof(typename T::value_type) * 16>(),\n                                           const_name(\"numpy.longcomplex\"));\n};\n\ntemplate <typename T>\nstruct npy_format_descriptor<\n    T,\n    enable_if_t<satisfies_any_of<T, std::is_arithmetic, is_complex>::value>>\n    : npy_format_descriptor_name<T> {\nprivate:\n    // NB: the order here must match the one in common.h\n    constexpr static const int values[15] = {npy_api::NPY_BOOL_,\n                                             npy_api::NPY_BYTE_,\n                                             npy_api::NPY_UBYTE_,\n                                             npy_api::NPY_INT16_,\n                                             npy_api::NPY_UINT16_,\n                                             npy_api::NPY_INT32_,\n                                             npy_api::NPY_UINT32_,\n                                             npy_api::NPY_INT64_,\n                                             npy_api::NPY_UINT64_,\n                                             npy_api::NPY_FLOAT_,\n                                             npy_api::NPY_DOUBLE_,\n                                             npy_api::NPY_LONGDOUBLE_,\n                                             npy_api::NPY_CFLOAT_,\n                                             npy_api::NPY_CDOUBLE_,\n                                             npy_api::NPY_CLONGDOUBLE_};\n\npublic:\n    static constexpr int value = values[detail::is_fmt_numeric<T>::index];\n\n    static pybind11::dtype dtype() { return pybind11::dtype(/*typenum*/ value); }\n};\n\ntemplate <typename T>\nstruct npy_format_descriptor<T, enable_if_t<is_same_ignoring_cvref<T, PyObject *>::value>> {\n    static constexpr auto name = const_name(\"object\");\n\n    static constexpr int value = npy_api::NPY_OBJECT_;\n\n    static pybind11::dtype dtype() { return pybind11::dtype(/*typenum*/ value); }\n};\n\n#define PYBIND11_DECL_CHAR_FMT                                                                    \\\n    static constexpr auto name = const_name(\"S\") + const_name<N>();                               \\\n    static pybind11::dtype dtype() {                                                              \\\n        return pybind11::dtype(std::string(\"S\") + std::to_string(N));                             \\\n    }\ntemplate <size_t N>\nstruct npy_format_descriptor<char[N]> {\n    PYBIND11_DECL_CHAR_FMT\n};\ntemplate <size_t N>\nstruct npy_format_descriptor<std::array<char, N>> {\n    PYBIND11_DECL_CHAR_FMT\n};\n#undef PYBIND11_DECL_CHAR_FMT\n\ntemplate <typename T>\nstruct npy_format_descriptor<T, enable_if_t<array_info<T>::is_array>> {\nprivate:\n    using base_descr = npy_format_descriptor<typename array_info<T>::type>;\n\npublic:\n    static_assert(!array_info<T>::is_empty, \"Zero-sized arrays are not supported\");\n\n    static constexpr auto name\n        = const_name(\"(\") + array_info<T>::extents + const_name(\")\") + base_descr::name;\n    static pybind11::dtype dtype() {\n        list shape;\n        array_info<T>::append_extents(shape);\n        return pybind11::dtype::from_args(\n            pybind11::make_tuple(base_descr::dtype(), std::move(shape)));\n    }\n};\n\ntemplate <typename T>\nstruct npy_format_descriptor<T, enable_if_t<std::is_enum<T>::value>> {\nprivate:\n    using base_descr = npy_format_descriptor<typename std::underlying_type<T>::type>;\n\npublic:\n    static constexpr auto name = base_descr::name;\n    static pybind11::dtype dtype() { return base_descr::dtype(); }\n};\n\nstruct field_descriptor {\n    const char *name;\n    ssize_t offset;\n    ssize_t size;\n    std::string format;\n    dtype descr;\n};\n\nPYBIND11_NOINLINE void register_structured_dtype(any_container<field_descriptor> fields,\n                                                 const std::type_info &tinfo,\n                                                 ssize_t itemsize,\n                                                 bool (*direct_converter)(PyObject *, void *&)) {\n\n    auto &numpy_internals = get_numpy_internals();\n    if (numpy_internals.get_type_info(tinfo, false)) {\n        pybind11_fail(\"NumPy: dtype is already registered\");\n    }\n\n    // Use ordered fields because order matters as of NumPy 1.14:\n    // https://docs.scipy.org/doc/numpy/release.html#multiple-field-indexing-assignment-of-structured-arrays\n    std::vector<field_descriptor> ordered_fields(std::move(fields));\n    std::sort(\n        ordered_fields.begin(),\n        ordered_fields.end(),\n        [](const field_descriptor &a, const field_descriptor &b) { return a.offset < b.offset; });\n\n    list names, formats, offsets;\n    for (auto &field : ordered_fields) {\n        if (!field.descr) {\n            pybind11_fail(std::string(\"NumPy: unsupported field dtype: `\") + field.name + \"` @ \"\n                          + tinfo.name());\n        }\n        names.append(pybind11::str(field.name));\n        formats.append(field.descr);\n        offsets.append(pybind11::int_(field.offset));\n    }\n    auto *dtype_ptr\n        = pybind11::dtype(std::move(names), std::move(formats), std::move(offsets), itemsize)\n              .release()\n              .ptr();\n\n    // There is an existing bug in NumPy (as of v1.11): trailing bytes are\n    // not encoded explicitly into the format string. This will supposedly\n    // get fixed in v1.12; for further details, see these:\n    // - https://github.com/numpy/numpy/issues/7797\n    // - https://github.com/numpy/numpy/pull/7798\n    // Because of this, we won't use numpy's logic to generate buffer format\n    // strings and will just do it ourselves.\n    ssize_t offset = 0;\n    std::ostringstream oss;\n    // mark the structure as unaligned with '^', because numpy and C++ don't\n    // always agree about alignment (particularly for complex), and we're\n    // explicitly listing all our padding. This depends on none of the fields\n    // overriding the endianness. Putting the ^ in front of individual fields\n    // isn't guaranteed to work due to https://github.com/numpy/numpy/issues/9049\n    oss << \"^T{\";\n    for (auto &field : ordered_fields) {\n        if (field.offset > offset) {\n            oss << (field.offset - offset) << 'x';\n        }\n        oss << field.format << ':' << field.name << ':';\n        offset = field.offset + field.size;\n    }\n    if (itemsize > offset) {\n        oss << (itemsize - offset) << 'x';\n    }\n    oss << '}';\n    auto format_str = oss.str();\n\n    // Smoke test: verify that NumPy properly parses our buffer format string\n    auto &api = npy_api::get();\n    auto arr = array(buffer_info(nullptr, itemsize, format_str, 1));\n    if (!api.PyArray_EquivTypes_(dtype_ptr, arr.dtype().ptr())) {\n        pybind11_fail(\"NumPy: invalid buffer descriptor!\");\n    }\n\n    auto tindex = std::type_index(tinfo);\n    numpy_internals.registered_dtypes[tindex] = {dtype_ptr, std::move(format_str)};\n    get_internals().direct_conversions[tindex].push_back(direct_converter);\n}\n\ntemplate <typename T, typename SFINAE>\nstruct npy_format_descriptor {\n    static_assert(is_pod_struct<T>::value,\n                  \"Attempt to use a non-POD or unimplemented POD type as a numpy dtype\");\n\n    static constexpr auto name = make_caster<T>::name;\n\n    static pybind11::dtype dtype() { return reinterpret_borrow<pybind11::dtype>(dtype_ptr()); }\n\n    static std::string format() {\n        static auto format_str = get_numpy_internals().get_type_info<T>(true)->format_str;\n        return format_str;\n    }\n\n    static void register_dtype(any_container<field_descriptor> fields) {\n        register_structured_dtype(std::move(fields),\n                                  typeid(typename std::remove_cv<T>::type),\n                                  sizeof(T),\n                                  &direct_converter);\n    }\n\nprivate:\n    static PyObject *dtype_ptr() {\n        static PyObject *ptr = get_numpy_internals().get_type_info<T>(true)->dtype_ptr;\n        return ptr;\n    }\n\n    static bool direct_converter(PyObject *obj, void *&value) {\n        auto &api = npy_api::get();\n        if (!PyObject_TypeCheck(obj, api.PyVoidArrType_Type_)) {\n            return false;\n        }\n        if (auto descr = reinterpret_steal<object>(api.PyArray_DescrFromScalar_(obj))) {\n            if (api.PyArray_EquivTypes_(dtype_ptr(), descr.ptr())) {\n                value = ((PyVoidScalarObject_Proxy *) obj)->obval;\n                return true;\n            }\n        }\n        return false;\n    }\n};\n\n#ifdef __CLION_IDE__ // replace heavy macro with dummy code for the IDE (doesn't affect code)\n#    define PYBIND11_NUMPY_DTYPE(Type, ...) ((void) 0)\n#    define PYBIND11_NUMPY_DTYPE_EX(Type, ...) ((void) 0)\n#else\n\n#    define PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, Name)                                          \\\n        ::pybind11::detail::field_descriptor {                                                    \\\n            Name, offsetof(T, Field), sizeof(decltype(std::declval<T>().Field)),                  \\\n                ::pybind11::format_descriptor<decltype(std::declval<T>().Field)>::format(),       \\\n                ::pybind11::detail::npy_format_descriptor<                                        \\\n                    decltype(std::declval<T>().Field)>::dtype()                                   \\\n        }\n\n// Extract name, offset and format descriptor for a struct field\n#    define PYBIND11_FIELD_DESCRIPTOR(T, Field) PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, #Field)\n\n// The main idea of this macro is borrowed from https://github.com/swansontec/map-macro\n// (C) William Swanson, Paul Fultz\n#    define PYBIND11_EVAL0(...) __VA_ARGS__\n#    define PYBIND11_EVAL1(...) PYBIND11_EVAL0(PYBIND11_EVAL0(PYBIND11_EVAL0(__VA_ARGS__)))\n#    define PYBIND11_EVAL2(...) PYBIND11_EVAL1(PYBIND11_EVAL1(PYBIND11_EVAL1(__VA_ARGS__)))\n#    define PYBIND11_EVAL3(...) PYBIND11_EVAL2(PYBIND11_EVAL2(PYBIND11_EVAL2(__VA_ARGS__)))\n#    define PYBIND11_EVAL4(...) PYBIND11_EVAL3(PYBIND11_EVAL3(PYBIND11_EVAL3(__VA_ARGS__)))\n#    define PYBIND11_EVAL(...) PYBIND11_EVAL4(PYBIND11_EVAL4(PYBIND11_EVAL4(__VA_ARGS__)))\n#    define PYBIND11_MAP_END(...)\n#    define PYBIND11_MAP_OUT\n#    define PYBIND11_MAP_COMMA ,\n#    define PYBIND11_MAP_GET_END() 0, PYBIND11_MAP_END\n#    define PYBIND11_MAP_NEXT0(test, next, ...) next PYBIND11_MAP_OUT\n#    define PYBIND11_MAP_NEXT1(test, next) PYBIND11_MAP_NEXT0(test, next, 0)\n#    define PYBIND11_MAP_NEXT(test, next) PYBIND11_MAP_NEXT1(PYBIND11_MAP_GET_END test, next)\n#    if defined(_MSC_VER)                                                                         \\\n        && !defined(__clang__) // MSVC is not as eager to expand macros, hence this workaround\n#        define PYBIND11_MAP_LIST_NEXT1(test, next)                                               \\\n            PYBIND11_EVAL0(PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0))\n#    else\n#        define PYBIND11_MAP_LIST_NEXT1(test, next)                                               \\\n            PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0)\n#    endif\n#    define PYBIND11_MAP_LIST_NEXT(test, next)                                                    \\\n        PYBIND11_MAP_LIST_NEXT1(PYBIND11_MAP_GET_END test, next)\n#    define PYBIND11_MAP_LIST0(f, t, x, peek, ...)                                                \\\n        f(t, x) PYBIND11_MAP_LIST_NEXT(peek, PYBIND11_MAP_LIST1)(f, t, peek, __VA_ARGS__)\n#    define PYBIND11_MAP_LIST1(f, t, x, peek, ...)                                                \\\n        f(t, x) PYBIND11_MAP_LIST_NEXT(peek, PYBIND11_MAP_LIST0)(f, t, peek, __VA_ARGS__)\n// PYBIND11_MAP_LIST(f, t, a1, a2, ...) expands to f(t, a1), f(t, a2), ...\n#    define PYBIND11_MAP_LIST(f, t, ...)                                                          \\\n        PYBIND11_EVAL(PYBIND11_MAP_LIST1(f, t, __VA_ARGS__, (), 0))\n\n#    define PYBIND11_NUMPY_DTYPE(Type, ...)                                                       \\\n        ::pybind11::detail::npy_format_descriptor<Type>::register_dtype(                          \\\n            ::std::vector<::pybind11::detail::field_descriptor>{                                  \\\n                PYBIND11_MAP_LIST(PYBIND11_FIELD_DESCRIPTOR, Type, __VA_ARGS__)})\n\n#    if defined(_MSC_VER) && !defined(__clang__)\n#        define PYBIND11_MAP2_LIST_NEXT1(test, next)                                              \\\n            PYBIND11_EVAL0(PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0))\n#    else\n#        define PYBIND11_MAP2_LIST_NEXT1(test, next)                                              \\\n            PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0)\n#    endif\n#    define PYBIND11_MAP2_LIST_NEXT(test, next)                                                   \\\n        PYBIND11_MAP2_LIST_NEXT1(PYBIND11_MAP_GET_END test, next)\n#    define PYBIND11_MAP2_LIST0(f, t, x1, x2, peek, ...)                                          \\\n        f(t, x1, x2) PYBIND11_MAP2_LIST_NEXT(peek, PYBIND11_MAP2_LIST1)(f, t, peek, __VA_ARGS__)\n#    define PYBIND11_MAP2_LIST1(f, t, x1, x2, peek, ...)                                          \\\n        f(t, x1, x2) PYBIND11_MAP2_LIST_NEXT(peek, PYBIND11_MAP2_LIST0)(f, t, peek, __VA_ARGS__)\n// PYBIND11_MAP2_LIST(f, t, a1, a2, ...) expands to f(t, a1, a2), f(t, a3, a4), ...\n#    define PYBIND11_MAP2_LIST(f, t, ...)                                                         \\\n        PYBIND11_EVAL(PYBIND11_MAP2_LIST1(f, t, __VA_ARGS__, (), 0))\n\n#    define PYBIND11_NUMPY_DTYPE_EX(Type, ...)                                                    \\\n        ::pybind11::detail::npy_format_descriptor<Type>::register_dtype(                          \\\n            ::std::vector<::pybind11::detail::field_descriptor>{                                  \\\n                PYBIND11_MAP2_LIST(PYBIND11_FIELD_DESCRIPTOR_EX, Type, __VA_ARGS__)})\n\n#endif // __CLION_IDE__\n\nclass common_iterator {\npublic:\n    using container_type = std::vector<ssize_t>;\n    using value_type = container_type::value_type;\n    using size_type = container_type::size_type;\n\n    common_iterator() : m_strides() {}\n\n    common_iterator(void *ptr, const container_type &strides, const container_type &shape)\n        : p_ptr(reinterpret_cast<char *>(ptr)), m_strides(strides.size()) {\n        m_strides.back() = static_cast<value_type>(strides.back());\n        for (size_type i = m_strides.size() - 1; i != 0; --i) {\n            size_type j = i - 1;\n            auto s = static_cast<value_type>(shape[i]);\n            m_strides[j] = strides[j] + m_strides[i] - strides[i] * s;\n        }\n    }\n\n    void increment(size_type dim) { p_ptr += m_strides[dim]; }\n\n    void *data() const { return p_ptr; }\n\nprivate:\n    char *p_ptr{nullptr};\n    container_type m_strides;\n};\n\ntemplate <size_t N>\nclass multi_array_iterator {\npublic:\n    using container_type = std::vector<ssize_t>;\n\n    multi_array_iterator(const std::array<buffer_info, N> &buffers, const container_type &shape)\n        : m_shape(shape.size()), m_index(shape.size(), 0), m_common_iterator() {\n\n        // Manual copy to avoid conversion warning if using std::copy\n        for (size_t i = 0; i < shape.size(); ++i) {\n            m_shape[i] = shape[i];\n        }\n\n        container_type strides(shape.size());\n        for (size_t i = 0; i < N; ++i) {\n            init_common_iterator(buffers[i], shape, m_common_iterator[i], strides);\n        }\n    }\n\n    multi_array_iterator &operator++() {\n        for (size_t j = m_index.size(); j != 0; --j) {\n            size_t i = j - 1;\n            if (++m_index[i] != m_shape[i]) {\n                increment_common_iterator(i);\n                break;\n            }\n            m_index[i] = 0;\n        }\n        return *this;\n    }\n\n    template <size_t K, class T = void>\n    T *data() const {\n        return reinterpret_cast<T *>(m_common_iterator[K].data());\n    }\n\nprivate:\n    using common_iter = common_iterator;\n\n    void init_common_iterator(const buffer_info &buffer,\n                              const container_type &shape,\n                              common_iter &iterator,\n                              container_type &strides) {\n        auto buffer_shape_iter = buffer.shape.rbegin();\n        auto buffer_strides_iter = buffer.strides.rbegin();\n        auto shape_iter = shape.rbegin();\n        auto strides_iter = strides.rbegin();\n\n        while (buffer_shape_iter != buffer.shape.rend()) {\n            if (*shape_iter == *buffer_shape_iter) {\n                *strides_iter = *buffer_strides_iter;\n            } else {\n                *strides_iter = 0;\n            }\n\n            ++buffer_shape_iter;\n            ++buffer_strides_iter;\n            ++shape_iter;\n            ++strides_iter;\n        }\n\n        std::fill(strides_iter, strides.rend(), 0);\n        iterator = common_iter(buffer.ptr, strides, shape);\n    }\n\n    void increment_common_iterator(size_t dim) {\n        for (auto &iter : m_common_iterator) {\n            iter.increment(dim);\n        }\n    }\n\n    container_type m_shape;\n    container_type m_index;\n    std::array<common_iter, N> m_common_iterator;\n};\n\nenum class broadcast_trivial { non_trivial, c_trivial, f_trivial };\n\n// Populates the shape and number of dimensions for the set of buffers.  Returns a\n// broadcast_trivial enum value indicating whether the broadcast is \"trivial\"--that is, has each\n// buffer being either a singleton or a full-size, C-contiguous (`c_trivial`) or Fortran-contiguous\n// (`f_trivial`) storage buffer; returns `non_trivial` otherwise.\ntemplate <size_t N>\nbroadcast_trivial\nbroadcast(const std::array<buffer_info, N> &buffers, ssize_t &ndim, std::vector<ssize_t> &shape) {\n    ndim = std::accumulate(\n        buffers.begin(), buffers.end(), ssize_t(0), [](ssize_t res, const buffer_info &buf) {\n            return std::max(res, buf.ndim);\n        });\n\n    shape.clear();\n    shape.resize((size_t) ndim, 1);\n\n    // Figure out the output size, and make sure all input arrays conform (i.e. are either size 1\n    // or the full size).\n    for (size_t i = 0; i < N; ++i) {\n        auto res_iter = shape.rbegin();\n        auto end = buffers[i].shape.rend();\n        for (auto shape_iter = buffers[i].shape.rbegin(); shape_iter != end;\n             ++shape_iter, ++res_iter) {\n            const auto &dim_size_in = *shape_iter;\n            auto &dim_size_out = *res_iter;\n\n            // Each input dimension can either be 1 or `n`, but `n` values must match across\n            // buffers\n            if (dim_size_out == 1) {\n                dim_size_out = dim_size_in;\n            } else if (dim_size_in != 1 && dim_size_in != dim_size_out) {\n                pybind11_fail(\"pybind11::vectorize: incompatible size/dimension of inputs!\");\n            }\n        }\n    }\n\n    bool trivial_broadcast_c = true;\n    bool trivial_broadcast_f = true;\n    for (size_t i = 0; i < N && (trivial_broadcast_c || trivial_broadcast_f); ++i) {\n        if (buffers[i].size == 1) {\n            continue;\n        }\n\n        // Require the same number of dimensions:\n        if (buffers[i].ndim != ndim) {\n            return broadcast_trivial::non_trivial;\n        }\n\n        // Require all dimensions be full-size:\n        if (!std::equal(buffers[i].shape.cbegin(), buffers[i].shape.cend(), shape.cbegin())) {\n            return broadcast_trivial::non_trivial;\n        }\n\n        // Check for C contiguity (but only if previous inputs were also C contiguous)\n        if (trivial_broadcast_c) {\n            ssize_t expect_stride = buffers[i].itemsize;\n            auto end = buffers[i].shape.crend();\n            for (auto shape_iter = buffers[i].shape.crbegin(),\n                      stride_iter = buffers[i].strides.crbegin();\n                 trivial_broadcast_c && shape_iter != end;\n                 ++shape_iter, ++stride_iter) {\n                if (expect_stride == *stride_iter) {\n                    expect_stride *= *shape_iter;\n                } else {\n                    trivial_broadcast_c = false;\n                }\n            }\n        }\n\n        // Check for Fortran contiguity (if previous inputs were also F contiguous)\n        if (trivial_broadcast_f) {\n            ssize_t expect_stride = buffers[i].itemsize;\n            auto end = buffers[i].shape.cend();\n            for (auto shape_iter = buffers[i].shape.cbegin(),\n                      stride_iter = buffers[i].strides.cbegin();\n                 trivial_broadcast_f && shape_iter != end;\n                 ++shape_iter, ++stride_iter) {\n                if (expect_stride == *stride_iter) {\n                    expect_stride *= *shape_iter;\n                } else {\n                    trivial_broadcast_f = false;\n                }\n            }\n        }\n    }\n\n    return trivial_broadcast_c   ? broadcast_trivial::c_trivial\n           : trivial_broadcast_f ? broadcast_trivial::f_trivial\n                                 : broadcast_trivial::non_trivial;\n}\n\ntemplate <typename T>\nstruct vectorize_arg {\n    static_assert(!std::is_rvalue_reference<T>::value,\n                  \"Functions with rvalue reference arguments cannot be vectorized\");\n    // The wrapped function gets called with this type:\n    using call_type = remove_reference_t<T>;\n    // Is this a vectorized argument?\n    static constexpr bool vectorize\n        = satisfies_any_of<call_type, std::is_arithmetic, is_complex, is_pod>::value\n          && satisfies_none_of<call_type,\n                               std::is_pointer,\n                               std::is_array,\n                               is_std_array,\n                               std::is_enum>::value\n          && (!std::is_reference<T>::value\n              || (std::is_lvalue_reference<T>::value && std::is_const<call_type>::value));\n    // Accept this type: an array for vectorized types, otherwise the type as-is:\n    using type = conditional_t<vectorize, array_t<remove_cv_t<call_type>, array::forcecast>, T>;\n};\n\n// py::vectorize when a return type is present\ntemplate <typename Func, typename Return, typename... Args>\nstruct vectorize_returned_array {\n    using Type = array_t<Return>;\n\n    static Type create(broadcast_trivial trivial, const std::vector<ssize_t> &shape) {\n        if (trivial == broadcast_trivial::f_trivial) {\n            return array_t<Return, array::f_style>(shape);\n        }\n        return array_t<Return>(shape);\n    }\n\n    static Return *mutable_data(Type &array) { return array.mutable_data(); }\n\n    static Return call(Func &f, Args &...args) { return f(args...); }\n\n    static void call(Return *out, size_t i, Func &f, Args &...args) { out[i] = f(args...); }\n};\n\n// py::vectorize when a return type is not present\ntemplate <typename Func, typename... Args>\nstruct vectorize_returned_array<Func, void, Args...> {\n    using Type = none;\n\n    static Type create(broadcast_trivial, const std::vector<ssize_t> &) { return none(); }\n\n    static void *mutable_data(Type &) { return nullptr; }\n\n    static detail::void_type call(Func &f, Args &...args) {\n        f(args...);\n        return {};\n    }\n\n    static void call(void *, size_t, Func &f, Args &...args) { f(args...); }\n};\n\ntemplate <typename Func, typename Return, typename... Args>\nstruct vectorize_helper {\n\n// NVCC for some reason breaks if NVectorized is private\n#ifdef __CUDACC__\npublic:\n#else\nprivate:\n#endif\n\n    static constexpr size_t N = sizeof...(Args);\n    static constexpr size_t NVectorized = constexpr_sum(vectorize_arg<Args>::vectorize...);\n    static_assert(\n        NVectorized >= 1,\n        \"pybind11::vectorize(...) requires a function with at least one vectorizable argument\");\n\npublic:\n    template <typename T,\n              // SFINAE to prevent shadowing the copy constructor.\n              typename = detail::enable_if_t<\n                  !std::is_same<vectorize_helper, typename std::decay<T>::type>::value>>\n    explicit vectorize_helper(T &&f) : f(std::forward<T>(f)) {}\n\n    object operator()(typename vectorize_arg<Args>::type... args) {\n        return run(args...,\n                   make_index_sequence<N>(),\n                   select_indices<vectorize_arg<Args>::vectorize...>(),\n                   make_index_sequence<NVectorized>());\n    }\n\nprivate:\n    remove_reference_t<Func> f;\n\n    // Internal compiler error in MSVC 19.16.27025.1 (Visual Studio 2017 15.9.4), when compiling\n    // with \"/permissive-\" flag when arg_call_types is manually inlined.\n    using arg_call_types = std::tuple<typename vectorize_arg<Args>::call_type...>;\n    template <size_t Index>\n    using param_n_t = typename std::tuple_element<Index, arg_call_types>::type;\n\n    using returned_array = vectorize_returned_array<Func, Return, Args...>;\n\n    // Runs a vectorized function given arguments tuple and three index sequences:\n    //     - Index is the full set of 0 ... (N-1) argument indices;\n    //     - VIndex is the subset of argument indices with vectorized parameters, letting us access\n    //       vectorized arguments (anything not in this sequence is passed through)\n    //     - BIndex is a incremental sequence (beginning at 0) of the same size as VIndex, so that\n    //       we can store vectorized buffer_infos in an array (argument VIndex has its buffer at\n    //       index BIndex in the array).\n    template <size_t... Index, size_t... VIndex, size_t... BIndex>\n    object run(typename vectorize_arg<Args>::type &...args,\n               index_sequence<Index...> i_seq,\n               index_sequence<VIndex...> vi_seq,\n               index_sequence<BIndex...> bi_seq) {\n\n        // Pointers to values the function was called with; the vectorized ones set here will start\n        // out as array_t<T> pointers, but they will be changed them to T pointers before we make\n        // call the wrapped function.  Non-vectorized pointers are left as-is.\n        std::array<void *, N> params{{&args...}};\n\n        // The array of `buffer_info`s of vectorized arguments:\n        std::array<buffer_info, NVectorized> buffers{\n            {reinterpret_cast<array *>(params[VIndex])->request()...}};\n\n        /* Determine dimensions parameters of output array */\n        ssize_t nd = 0;\n        std::vector<ssize_t> shape(0);\n        auto trivial = broadcast(buffers, nd, shape);\n        auto ndim = (size_t) nd;\n\n        size_t size\n            = std::accumulate(shape.begin(), shape.end(), (size_t) 1, std::multiplies<size_t>());\n\n        // If all arguments are 0-dimension arrays (i.e. single values) return a plain value (i.e.\n        // not wrapped in an array).\n        if (size == 1 && ndim == 0) {\n            PYBIND11_EXPAND_SIDE_EFFECTS(params[VIndex] = buffers[BIndex].ptr);\n            return cast(\n                returned_array::call(f, *reinterpret_cast<param_n_t<Index> *>(params[Index])...));\n        }\n\n        auto result = returned_array::create(trivial, shape);\n\n        PYBIND11_WARNING_PUSH\n#ifdef PYBIND11_DETECTED_CLANG_WITH_MISLEADING_CALL_STD_MOVE_EXPLICITLY_WARNING\n        PYBIND11_WARNING_DISABLE_CLANG(\"-Wreturn-std-move\")\n#endif\n\n        if (size == 0) {\n            return result;\n        }\n\n        /* Call the function */\n        auto *mutable_data = returned_array::mutable_data(result);\n        if (trivial == broadcast_trivial::non_trivial) {\n            apply_broadcast(buffers, params, mutable_data, size, shape, i_seq, vi_seq, bi_seq);\n        } else {\n            apply_trivial(buffers, params, mutable_data, size, i_seq, vi_seq, bi_seq);\n        }\n\n        return result;\n        PYBIND11_WARNING_POP\n    }\n\n    template <size_t... Index, size_t... VIndex, size_t... BIndex>\n    void apply_trivial(std::array<buffer_info, NVectorized> &buffers,\n                       std::array<void *, N> &params,\n                       Return *out,\n                       size_t size,\n                       index_sequence<Index...>,\n                       index_sequence<VIndex...>,\n                       index_sequence<BIndex...>) {\n\n        // Initialize an array of mutable byte references and sizes with references set to the\n        // appropriate pointer in `params`; as we iterate, we'll increment each pointer by its size\n        // (except for singletons, which get an increment of 0).\n        std::array<std::pair<unsigned char *&, const size_t>, NVectorized> vecparams{\n            {std::pair<unsigned char *&, const size_t>(\n                reinterpret_cast<unsigned char *&>(params[VIndex] = buffers[BIndex].ptr),\n                buffers[BIndex].size == 1 ? 0 : sizeof(param_n_t<VIndex>))...}};\n\n        for (size_t i = 0; i < size; ++i) {\n            returned_array::call(\n                out, i, f, *reinterpret_cast<param_n_t<Index> *>(params[Index])...);\n            for (auto &x : vecparams) {\n                x.first += x.second;\n            }\n        }\n    }\n\n    template <size_t... Index, size_t... VIndex, size_t... BIndex>\n    void apply_broadcast(std::array<buffer_info, NVectorized> &buffers,\n                         std::array<void *, N> &params,\n                         Return *out,\n                         size_t size,\n                         const std::vector<ssize_t> &output_shape,\n                         index_sequence<Index...>,\n                         index_sequence<VIndex...>,\n                         index_sequence<BIndex...>) {\n\n        multi_array_iterator<NVectorized> input_iter(buffers, output_shape);\n\n        for (size_t i = 0; i < size; ++i, ++input_iter) {\n            PYBIND11_EXPAND_SIDE_EFFECTS((params[VIndex] = input_iter.template data<BIndex>()));\n            returned_array::call(\n                out, i, f, *reinterpret_cast<param_n_t<Index> *>(std::get<Index>(params))...);\n        }\n    }\n};\n\ntemplate <typename Func, typename Return, typename... Args>\nvectorize_helper<Func, Return, Args...> vectorize_extractor(const Func &f, Return (*)(Args...)) {\n    return detail::vectorize_helper<Func, Return, Args...>(f);\n}\n\ntemplate <typename T, int Flags>\nstruct handle_type_name<array_t<T, Flags>> {\n    static constexpr auto name\n        = const_name(\"numpy.ndarray[\") + npy_format_descriptor<T>::name + const_name(\"]\");\n};\n\nPYBIND11_NAMESPACE_END(detail)\n\n// Vanilla pointer vectorizer:\ntemplate <typename Return, typename... Args>\ndetail::vectorize_helper<Return (*)(Args...), Return, Args...> vectorize(Return (*f)(Args...)) {\n    return detail::vectorize_helper<Return (*)(Args...), Return, Args...>(f);\n}\n\n// lambda vectorizer:\ntemplate <typename Func, detail::enable_if_t<detail::is_lambda<Func>::value, int> = 0>\nauto vectorize(Func &&f)\n    -> decltype(detail::vectorize_extractor(std::forward<Func>(f),\n                                            (detail::function_signature_t<Func> *) nullptr)) {\n    return detail::vectorize_extractor(std::forward<Func>(f),\n                                       (detail::function_signature_t<Func> *) nullptr);\n}\n\n// Vectorize a class method (non-const):\ntemplate <typename Return,\n          typename Class,\n          typename... Args,\n          typename Helper = detail::vectorize_helper<\n              decltype(std::mem_fn(std::declval<Return (Class::*)(Args...)>())),\n              Return,\n              Class *,\n              Args...>>\nHelper vectorize(Return (Class::*f)(Args...)) {\n    return Helper(std::mem_fn(f));\n}\n\n// Vectorize a class method (const):\ntemplate <typename Return,\n          typename Class,\n          typename... Args,\n          typename Helper = detail::vectorize_helper<\n              decltype(std::mem_fn(std::declval<Return (Class::*)(Args...) const>())),\n              Return,\n              const Class *,\n              Args...>>\nHelper vectorize(Return (Class::*f)(Args...) const) {\n    return Helper(std::mem_fn(f));\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/operators.h",
    "content": "/*\n    pybind11/operator.h: Metatemplates for operator overloading\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// Enumeration with all supported operator types\nenum op_id : int {\n    op_add,\n    op_sub,\n    op_mul,\n    op_div,\n    op_mod,\n    op_divmod,\n    op_pow,\n    op_lshift,\n    op_rshift,\n    op_and,\n    op_xor,\n    op_or,\n    op_neg,\n    op_pos,\n    op_abs,\n    op_invert,\n    op_int,\n    op_long,\n    op_float,\n    op_str,\n    op_cmp,\n    op_gt,\n    op_ge,\n    op_lt,\n    op_le,\n    op_eq,\n    op_ne,\n    op_iadd,\n    op_isub,\n    op_imul,\n    op_idiv,\n    op_imod,\n    op_ilshift,\n    op_irshift,\n    op_iand,\n    op_ixor,\n    op_ior,\n    op_complex,\n    op_bool,\n    op_nonzero,\n    op_repr,\n    op_truediv,\n    op_itruediv,\n    op_hash\n};\n\nenum op_type : int {\n    op_l, /* base type on left */\n    op_r, /* base type on right */\n    op_u  /* unary operator */\n};\n\nstruct self_t {};\nstatic const self_t self = self_t();\n\n/// Type for an unused type slot\nstruct undefined_t {};\n\n/// Don't warn about an unused variable\ninline self_t __self() { return self; }\n\n/// base template of operator implementations\ntemplate <op_id, op_type, typename B, typename L, typename R>\nstruct op_impl {};\n\n/// Operator implementation generator\ntemplate <op_id id, op_type ot, typename L, typename R>\nstruct op_ {\n    static constexpr bool op_enable_if_hook = true;\n    template <typename Class, typename... Extra>\n    void execute(Class &cl, const Extra &...extra) const {\n        using Base = typename Class::type;\n        using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;\n        using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;\n        using op = op_impl<id, ot, Base, L_type, R_type>;\n        cl.def(op::name(), &op::execute, is_operator(), extra...);\n    }\n    template <typename Class, typename... Extra>\n    void execute_cast(Class &cl, const Extra &...extra) const {\n        using Base = typename Class::type;\n        using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;\n        using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;\n        using op = op_impl<id, ot, Base, L_type, R_type>;\n        cl.def(op::name(), &op::execute_cast, is_operator(), extra...);\n    }\n};\n\n#define PYBIND11_BINARY_OPERATOR(id, rid, op, expr)                                               \\\n    template <typename B, typename L, typename R>                                                 \\\n    struct op_impl<op_##id, op_l, B, L, R> {                                                      \\\n        static char const *name() { return \"__\" #id \"__\"; }                                       \\\n        static auto execute(const L &l, const R &r) -> decltype(expr) { return (expr); }          \\\n        static B execute_cast(const L &l, const R &r) { return B(expr); }                         \\\n    };                                                                                            \\\n    template <typename B, typename L, typename R>                                                 \\\n    struct op_impl<op_##id, op_r, B, L, R> {                                                      \\\n        static char const *name() { return \"__\" #rid \"__\"; }                                      \\\n        static auto execute(const R &r, const L &l) -> decltype(expr) { return (expr); }          \\\n        static B execute_cast(const R &r, const L &l) { return B(expr); }                         \\\n    };                                                                                            \\\n    inline op_<op_##id, op_l, self_t, self_t> op(const self_t &, const self_t &) {                \\\n        return op_<op_##id, op_l, self_t, self_t>();                                              \\\n    }                                                                                             \\\n    template <typename T>                                                                         \\\n    op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) {                                 \\\n        return op_<op_##id, op_l, self_t, T>();                                                   \\\n    }                                                                                             \\\n    template <typename T>                                                                         \\\n    op_<op_##id, op_r, T, self_t> op(const T &, const self_t &) {                                 \\\n        return op_<op_##id, op_r, T, self_t>();                                                   \\\n    }\n\n#define PYBIND11_INPLACE_OPERATOR(id, op, expr)                                                   \\\n    template <typename B, typename L, typename R>                                                 \\\n    struct op_impl<op_##id, op_l, B, L, R> {                                                      \\\n        static char const *name() { return \"__\" #id \"__\"; }                                       \\\n        static auto execute(L &l, const R &r) -> decltype(expr) { return expr; }                  \\\n        static B execute_cast(L &l, const R &r) { return B(expr); }                               \\\n    };                                                                                            \\\n    template <typename T>                                                                         \\\n    op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) {                                 \\\n        return op_<op_##id, op_l, self_t, T>();                                                   \\\n    }\n\n#define PYBIND11_UNARY_OPERATOR(id, op, expr)                                                     \\\n    template <typename B, typename L>                                                             \\\n    struct op_impl<op_##id, op_u, B, L, undefined_t> {                                            \\\n        static char const *name() { return \"__\" #id \"__\"; }                                       \\\n        static auto execute(const L &l) -> decltype(expr) { return expr; }                        \\\n        static B execute_cast(const L &l) { return B(expr); }                                     \\\n    };                                                                                            \\\n    inline op_<op_##id, op_u, self_t, undefined_t> op(const self_t &) {                           \\\n        return op_<op_##id, op_u, self_t, undefined_t>();                                         \\\n    }\n\nPYBIND11_BINARY_OPERATOR(sub, rsub, operator-, l - r)\nPYBIND11_BINARY_OPERATOR(add, radd, operator+, l + r)\nPYBIND11_BINARY_OPERATOR(mul, rmul, operator*, l *r)\nPYBIND11_BINARY_OPERATOR(truediv, rtruediv, operator/, l / r)\nPYBIND11_BINARY_OPERATOR(mod, rmod, operator%, l % r)\nPYBIND11_BINARY_OPERATOR(lshift, rlshift, operator<<, l << r)\nPYBIND11_BINARY_OPERATOR(rshift, rrshift, operator>>, l >> r)\nPYBIND11_BINARY_OPERATOR(and, rand, operator&, l &r)\nPYBIND11_BINARY_OPERATOR(xor, rxor, operator^, l ^ r)\nPYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)\nPYBIND11_BINARY_OPERATOR(ne, ne, operator!=, l != r)\nPYBIND11_BINARY_OPERATOR(or, ror, operator|, l | r)\nPYBIND11_BINARY_OPERATOR(gt, lt, operator>, l > r)\nPYBIND11_BINARY_OPERATOR(ge, le, operator>=, l >= r)\nPYBIND11_BINARY_OPERATOR(lt, gt, operator<, l < r)\nPYBIND11_BINARY_OPERATOR(le, ge, operator<=, l <= r)\n// PYBIND11_BINARY_OPERATOR(pow,       rpow,         pow,          std::pow(l,  r))\nPYBIND11_INPLACE_OPERATOR(iadd, operator+=, l += r)\nPYBIND11_INPLACE_OPERATOR(isub, operator-=, l -= r)\nPYBIND11_INPLACE_OPERATOR(imul, operator*=, l *= r)\nPYBIND11_INPLACE_OPERATOR(itruediv, operator/=, l /= r)\nPYBIND11_INPLACE_OPERATOR(imod, operator%=, l %= r)\nPYBIND11_INPLACE_OPERATOR(ilshift, operator<<=, l <<= r)\nPYBIND11_INPLACE_OPERATOR(irshift, operator>>=, l >>= r)\nPYBIND11_INPLACE_OPERATOR(iand, operator&=, l &= r)\nPYBIND11_INPLACE_OPERATOR(ixor, operator^=, l ^= r)\nPYBIND11_INPLACE_OPERATOR(ior, operator|=, l |= r)\nPYBIND11_UNARY_OPERATOR(neg, operator-, -l)\nPYBIND11_UNARY_OPERATOR(pos, operator+, +l)\n// WARNING: This usage of `abs` should only be done for existing STL overloads.\n// Adding overloads directly in to the `std::` namespace is advised against:\n// https://en.cppreference.com/w/cpp/language/extending_std\nPYBIND11_UNARY_OPERATOR(abs, abs, std::abs(l))\nPYBIND11_UNARY_OPERATOR(hash, hash, std::hash<L>()(l))\nPYBIND11_UNARY_OPERATOR(invert, operator~, (~l))\nPYBIND11_UNARY_OPERATOR(bool, operator!, !!l)\nPYBIND11_UNARY_OPERATOR(int, int_, (int) l)\nPYBIND11_UNARY_OPERATOR(float, float_, (double) l)\n\n#undef PYBIND11_BINARY_OPERATOR\n#undef PYBIND11_INPLACE_OPERATOR\n#undef PYBIND11_UNARY_OPERATOR\nPYBIND11_NAMESPACE_END(detail)\n\nusing detail::self;\n// Add named operators so that they are accessible via `py::`.\nusing detail::hash;\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/options.h",
    "content": "/*\n    pybind11/options.h: global settings that are configurable at runtime.\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nclass options {\npublic:\n    // Default RAII constructor, which leaves settings as they currently are.\n    options() : previous_state(global_state()) {}\n\n    // Class is non-copyable.\n    options(const options &) = delete;\n    options &operator=(const options &) = delete;\n\n    // Destructor, which restores settings that were in effect before.\n    ~options() { global_state() = previous_state; }\n\n    // Setter methods (affect the global state):\n\n    options &disable_user_defined_docstrings() & {\n        global_state().show_user_defined_docstrings = false;\n        return *this;\n    }\n\n    options &enable_user_defined_docstrings() & {\n        global_state().show_user_defined_docstrings = true;\n        return *this;\n    }\n\n    options &disable_function_signatures() & {\n        global_state().show_function_signatures = false;\n        return *this;\n    }\n\n    options &enable_function_signatures() & {\n        global_state().show_function_signatures = true;\n        return *this;\n    }\n\n    options &disable_enum_members_docstring() & {\n        global_state().show_enum_members_docstring = false;\n        return *this;\n    }\n\n    options &enable_enum_members_docstring() & {\n        global_state().show_enum_members_docstring = true;\n        return *this;\n    }\n\n    // Getter methods (return the global state):\n\n    static bool show_user_defined_docstrings() {\n        return global_state().show_user_defined_docstrings;\n    }\n\n    static bool show_function_signatures() { return global_state().show_function_signatures; }\n\n    static bool show_enum_members_docstring() {\n        return global_state().show_enum_members_docstring;\n    }\n\n    // This type is not meant to be allocated on the heap.\n    void *operator new(size_t) = delete;\n\nprivate:\n    struct state {\n        bool show_user_defined_docstrings = true; //< Include user-supplied texts in docstrings.\n        bool show_function_signatures = true;     //< Include auto-generated function signatures\n                                                  //  in docstrings.\n        bool show_enum_members_docstring = true;  //< Include auto-generated member list in enum\n                                                  //  docstrings.\n    };\n\n    static state &global_state() {\n        static state instance;\n        return instance;\n    }\n\n    state previous_state;\n};\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/pybind11.h",
    "content": "/*\n    pybind11/pybind11.h: Main header file of the C++11 python\n    binding generator library\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/class.h\"\n#include \"detail/init.h\"\n#include \"attr.h\"\n#include \"gil.h\"\n#include \"options.h\"\n\n#include <cstdlib>\n#include <cstring>\n#include <memory>\n#include <new>\n#include <string>\n#include <utility>\n#include <vector>\n\n#if defined(__cpp_lib_launder) && !(defined(_MSC_VER) && (_MSC_VER < 1914))\n#    define PYBIND11_STD_LAUNDER std::launder\n#    define PYBIND11_HAS_STD_LAUNDER 1\n#else\n#    define PYBIND11_STD_LAUNDER\n#    define PYBIND11_HAS_STD_LAUNDER 0\n#endif\n#if defined(__GNUG__) && !defined(__clang__)\n#    include <cxxabi.h>\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\n/* https://stackoverflow.com/questions/46798456/handling-gccs-noexcept-type-warning\n   This warning is about ABI compatibility, not code health.\n   It is only actually needed in a couple places, but apparently GCC 7 \"generates this warning if\n   and only if the first template instantiation ... involves noexcept\" [stackoverflow], therefore\n   it could get triggered from seemingly random places, depending on user code.\n   No other GCC version generates this warning.\n */\n#if defined(__GNUC__) && __GNUC__ == 7\nPYBIND11_WARNING_DISABLE_GCC(\"-Wnoexcept-type\")\n#endif\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Apply all the extensions translators from a list\n// Return true if one of the translators completed without raising an exception\n// itself. Return of false indicates that if there are other translators\n// available, they should be tried.\ninline bool apply_exception_translators(std::forward_list<ExceptionTranslator> &translators) {\n    auto last_exception = std::current_exception();\n\n    for (auto &translator : translators) {\n        try {\n            translator(last_exception);\n            return true;\n        } catch (...) {\n            last_exception = std::current_exception();\n        }\n    }\n    return false;\n}\n\n#if defined(_MSC_VER)\n#    define PYBIND11_COMPAT_STRDUP _strdup\n#else\n#    define PYBIND11_COMPAT_STRDUP strdup\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Wraps an arbitrary C++ function/method/lambda function/.. into a callable Python object\nclass cpp_function : public function {\npublic:\n    cpp_function() = default;\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(std::nullptr_t) {}\n    cpp_function(std::nullptr_t, const is_setter &) {}\n\n    /// Construct a cpp_function from a vanilla function pointer\n    template <typename Return, typename... Args, typename... Extra>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Return (*f)(Args...), const Extra &...extra) {\n        initialize(f, f, extra...);\n    }\n\n    /// Construct a cpp_function from a lambda function (possibly with internal state)\n    template <typename Func,\n              typename... Extra,\n              typename = detail::enable_if_t<detail::is_lambda<Func>::value>>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Func &&f, const Extra &...extra) {\n        initialize(\n            std::forward<Func>(f), (detail::function_signature_t<Func> *) nullptr, extra...);\n    }\n\n    /// Construct a cpp_function from a class method (non-const, no ref-qualifier)\n    template <typename Return, typename Class, typename... Arg, typename... Extra>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Return (Class::*f)(Arg...), const Extra &...extra) {\n        initialize(\n            [f](Class *c, Arg... args) -> Return { return (c->*f)(std::forward<Arg>(args)...); },\n            (Return(*)(Class *, Arg...)) nullptr,\n            extra...);\n    }\n\n    /// Construct a cpp_function from a class method (non-const, lvalue ref-qualifier)\n    /// A copy of the overload for non-const functions without explicit ref-qualifier\n    /// but with an added `&`.\n    template <typename Return, typename Class, typename... Arg, typename... Extra>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Return (Class::*f)(Arg...) &, const Extra &...extra) {\n        initialize(\n            [f](Class *c, Arg... args) -> Return { return (c->*f)(std::forward<Arg>(args)...); },\n            (Return(*)(Class *, Arg...)) nullptr,\n            extra...);\n    }\n\n    /// Construct a cpp_function from a class method (const, no ref-qualifier)\n    template <typename Return, typename Class, typename... Arg, typename... Extra>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Return (Class::*f)(Arg...) const, const Extra &...extra) {\n        initialize([f](const Class *c,\n                       Arg... args) -> Return { return (c->*f)(std::forward<Arg>(args)...); },\n                   (Return(*)(const Class *, Arg...)) nullptr,\n                   extra...);\n    }\n\n    /// Construct a cpp_function from a class method (const, lvalue ref-qualifier)\n    /// A copy of the overload for const functions without explicit ref-qualifier\n    /// but with an added `&`.\n    template <typename Return, typename Class, typename... Arg, typename... Extra>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    cpp_function(Return (Class::*f)(Arg...) const &, const Extra &...extra) {\n        initialize([f](const Class *c,\n                       Arg... args) -> Return { return (c->*f)(std::forward<Arg>(args)...); },\n                   (Return(*)(const Class *, Arg...)) nullptr,\n                   extra...);\n    }\n\n    /// Return the function name\n    object name() const { return attr(\"__name__\"); }\n\nprotected:\n    struct InitializingFunctionRecordDeleter {\n        // `destruct(function_record, false)`: `initialize_generic` copies strings and\n        // takes care of cleaning up in case of exceptions. So pass `false` to `free_strings`.\n        void operator()(detail::function_record *rec) { destruct(rec, false); }\n    };\n    using unique_function_record\n        = std::unique_ptr<detail::function_record, InitializingFunctionRecordDeleter>;\n\n    /// Space optimization: don't inline this frequently instantiated fragment\n    PYBIND11_NOINLINE unique_function_record make_function_record() {\n        return unique_function_record(new detail::function_record());\n    }\n\n    /// Special internal constructor for functors, lambda functions, etc.\n    template <typename Func, typename Return, typename... Args, typename... Extra>\n    void initialize(Func &&f, Return (*)(Args...), const Extra &...extra) {\n        using namespace detail;\n        struct capture {\n            remove_reference_t<Func> f;\n        };\n\n        /* Store the function including any extra state it might have (e.g. a lambda capture\n         * object) */\n        // The unique_ptr makes sure nothing is leaked in case of an exception.\n        auto unique_rec = make_function_record();\n        auto *rec = unique_rec.get();\n\n        /* Store the capture object directly in the function record if there is enough space */\n        if (sizeof(capture) <= sizeof(rec->data)) {\n            /* Without these pragmas, GCC warns that there might not be\n               enough space to use the placement new operator. However, the\n               'if' statement above ensures that this is the case. */\n            PYBIND11_WARNING_PUSH\n\n#if defined(__GNUG__) && __GNUC__ >= 6\n            PYBIND11_WARNING_DISABLE_GCC(\"-Wplacement-new\")\n#endif\n\n            new ((capture *) &rec->data) capture{std::forward<Func>(f)};\n\n#if !PYBIND11_HAS_STD_LAUNDER\n            PYBIND11_WARNING_DISABLE_GCC(\"-Wstrict-aliasing\")\n#endif\n\n            // UB without std::launder, but without breaking ABI and/or\n            // a significant refactoring it's \"impossible\" to solve.\n            if (!std::is_trivially_destructible<capture>::value) {\n                rec->free_data = [](function_record *r) {\n                    auto data = PYBIND11_STD_LAUNDER((capture *) &r->data);\n                    (void) data;\n                    data->~capture();\n                };\n            }\n            PYBIND11_WARNING_POP\n        } else {\n            rec->data[0] = new capture{std::forward<Func>(f)};\n            rec->free_data = [](function_record *r) { delete ((capture *) r->data[0]); };\n        }\n\n        /* Type casters for the function arguments and return value */\n        using cast_in = argument_loader<Args...>;\n        using cast_out\n            = make_caster<conditional_t<std::is_void<Return>::value, void_type, Return>>;\n\n        static_assert(\n            expected_num_args<Extra...>(\n                sizeof...(Args), cast_in::args_pos >= 0, cast_in::has_kwargs),\n            \"The number of argument annotations does not match the number of function arguments\");\n\n        /* Dispatch code which converts function arguments and performs the actual function call */\n        rec->impl = [](function_call &call) -> handle {\n            cast_in args_converter;\n\n            /* Try to cast the function arguments into the C++ domain */\n            if (!args_converter.load_args(call)) {\n                return PYBIND11_TRY_NEXT_OVERLOAD;\n            }\n\n            /* Invoke call policy pre-call hook */\n            process_attributes<Extra...>::precall(call);\n\n            /* Get a pointer to the capture object */\n            const auto *data = (sizeof(capture) <= sizeof(call.func.data) ? &call.func.data\n                                                                          : call.func.data[0]);\n            auto *cap = const_cast<capture *>(reinterpret_cast<const capture *>(data));\n\n            /* Override policy for rvalues -- usually to enforce rvp::move on an rvalue */\n            return_value_policy policy\n                = return_value_policy_override<Return>::policy(call.func.policy);\n\n            /* Function scope guard -- defaults to the compile-to-nothing `void_type` */\n            using Guard = extract_guard_t<Extra...>;\n\n            /* Perform the function call */\n            handle result;\n            if (call.func.is_setter) {\n                (void) std::move(args_converter).template call<Return, Guard>(cap->f);\n                result = none().release();\n            } else {\n                result = cast_out::cast(\n                    std::move(args_converter).template call<Return, Guard>(cap->f),\n                    policy,\n                    call.parent);\n            }\n\n            /* Invoke call policy post-call hook */\n            process_attributes<Extra...>::postcall(call, result);\n\n            return result;\n        };\n\n        rec->nargs_pos = cast_in::args_pos >= 0\n                             ? static_cast<std::uint16_t>(cast_in::args_pos)\n                             : sizeof...(Args) - cast_in::has_kwargs; // Will get reduced more if\n                                                                      // we have a kw_only\n        rec->has_args = cast_in::args_pos >= 0;\n        rec->has_kwargs = cast_in::has_kwargs;\n\n        /* Process any user-provided function attributes */\n        process_attributes<Extra...>::init(extra..., rec);\n\n        {\n            constexpr bool has_kw_only_args = any_of<std::is_same<kw_only, Extra>...>::value,\n                           has_pos_only_args = any_of<std::is_same<pos_only, Extra>...>::value,\n                           has_arg_annotations = any_of<is_keyword<Extra>...>::value;\n            static_assert(has_arg_annotations || !has_kw_only_args,\n                          \"py::kw_only requires the use of argument annotations\");\n            static_assert(has_arg_annotations || !has_pos_only_args,\n                          \"py::pos_only requires the use of argument annotations (for docstrings \"\n                          \"and aligning the annotations to the argument)\");\n\n            static_assert(constexpr_sum(is_kw_only<Extra>::value...) <= 1,\n                          \"py::kw_only may be specified only once\");\n            static_assert(constexpr_sum(is_pos_only<Extra>::value...) <= 1,\n                          \"py::pos_only may be specified only once\");\n            constexpr auto kw_only_pos = constexpr_first<is_kw_only, Extra...>();\n            constexpr auto pos_only_pos = constexpr_first<is_pos_only, Extra...>();\n            static_assert(!(has_kw_only_args && has_pos_only_args) || pos_only_pos < kw_only_pos,\n                          \"py::pos_only must come before py::kw_only\");\n        }\n\n        /* Generate a readable signature describing the function's arguments and return\n           value types */\n        static constexpr auto signature\n            = const_name(\"(\") + cast_in::arg_names + const_name(\") -> \") + cast_out::name;\n        PYBIND11_DESCR_CONSTEXPR auto types = decltype(signature)::types();\n\n        /* Register the function with Python from generic (non-templated) code */\n        // Pass on the ownership over the `unique_rec` to `initialize_generic`. `rec` stays valid.\n        initialize_generic(std::move(unique_rec), signature.text, types.data(), sizeof...(Args));\n\n        /* Stash some additional information used by an important optimization in 'functional.h' */\n        using FunctionType = Return (*)(Args...);\n        constexpr bool is_function_ptr\n            = std::is_convertible<Func, FunctionType>::value && sizeof(capture) == sizeof(void *);\n        if (is_function_ptr) {\n            rec->is_stateless = true;\n            rec->data[1]\n                = const_cast<void *>(reinterpret_cast<const void *>(&typeid(FunctionType)));\n        }\n    }\n\n    // Utility class that keeps track of all duplicated strings, and cleans them up in its\n    // destructor, unless they are released. Basically a RAII-solution to deal with exceptions\n    // along the way.\n    class strdup_guard {\n    public:\n        strdup_guard() = default;\n        strdup_guard(const strdup_guard &) = delete;\n        strdup_guard &operator=(const strdup_guard &) = delete;\n\n        ~strdup_guard() {\n            for (auto *s : strings) {\n                std::free(s);\n            }\n        }\n        char *operator()(const char *s) {\n            auto *t = PYBIND11_COMPAT_STRDUP(s);\n            strings.push_back(t);\n            return t;\n        }\n        void release() { strings.clear(); }\n\n    private:\n        std::vector<char *> strings;\n    };\n\n    /// Register a function call with Python (generic non-templated code goes here)\n    void initialize_generic(unique_function_record &&unique_rec,\n                            const char *text,\n                            const std::type_info *const *types,\n                            size_t args) {\n        // Do NOT receive `unique_rec` by value. If this function fails to move out the unique_ptr,\n        // we do not want this to destruct the pointer. `initialize` (the caller) still relies on\n        // the pointee being alive after this call. Only move out if a `capsule` is going to keep\n        // it alive.\n        auto *rec = unique_rec.get();\n\n        // Keep track of strdup'ed strings, and clean them up as long as the function's capsule\n        // has not taken ownership yet (when `unique_rec.release()` is called).\n        // Note: This cannot easily be fixed by a `unique_ptr` with custom deleter, because the\n        // strings are only referenced before strdup'ing. So only *after* the following block could\n        // `destruct` safely be called, but even then, `repr` could still throw in the middle of\n        // copying all strings.\n        strdup_guard guarded_strdup;\n\n        /* Create copies of all referenced C-style strings */\n        rec->name = guarded_strdup(rec->name ? rec->name : \"\");\n        if (rec->doc) {\n            rec->doc = guarded_strdup(rec->doc);\n        }\n        for (auto &a : rec->args) {\n            if (a.name) {\n                a.name = guarded_strdup(a.name);\n            }\n            if (a.descr) {\n                a.descr = guarded_strdup(a.descr);\n            } else if (a.value) {\n                a.descr = guarded_strdup(repr(a.value).cast<std::string>().c_str());\n            }\n        }\n\n        rec->is_constructor = (std::strcmp(rec->name, \"__init__\") == 0)\n                              || (std::strcmp(rec->name, \"__setstate__\") == 0);\n\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES) && !defined(PYBIND11_DISABLE_NEW_STYLE_INIT_WARNING)\n        if (rec->is_constructor && !rec->is_new_style_constructor) {\n            const auto class_name\n                = detail::get_fully_qualified_tp_name((PyTypeObject *) rec->scope.ptr());\n            const auto func_name = std::string(rec->name);\n            PyErr_WarnEx(PyExc_FutureWarning,\n                         (\"pybind11-bound class '\" + class_name\n                          + \"' is using an old-style \"\n                            \"placement-new '\"\n                          + func_name\n                          + \"' which has been deprecated. See \"\n                            \"the upgrade guide in pybind11's docs. This message is only visible \"\n                            \"when compiled in debug mode.\")\n                             .c_str(),\n                         0);\n        }\n#endif\n\n        /* Generate a proper function signature */\n        std::string signature;\n        size_t type_index = 0, arg_index = 0;\n        bool is_starred = false;\n        for (const auto *pc = text; *pc != '\\0'; ++pc) {\n            const auto c = *pc;\n\n            if (c == '{') {\n                // Write arg name for everything except *args and **kwargs.\n                is_starred = *(pc + 1) == '*';\n                if (is_starred) {\n                    continue;\n                }\n                // Separator for keyword-only arguments, placed before the kw\n                // arguments start (unless we are already putting an *args)\n                if (!rec->has_args && arg_index == rec->nargs_pos) {\n                    signature += \"*, \";\n                }\n                if (arg_index < rec->args.size() && rec->args[arg_index].name) {\n                    signature += rec->args[arg_index].name;\n                } else if (arg_index == 0 && rec->is_method) {\n                    signature += \"self\";\n                } else {\n                    signature += \"arg\" + std::to_string(arg_index - (rec->is_method ? 1 : 0));\n                }\n                signature += \": \";\n            } else if (c == '}') {\n                // Write default value if available.\n                if (!is_starred && arg_index < rec->args.size() && rec->args[arg_index].descr) {\n                    signature += \" = \";\n                    signature += rec->args[arg_index].descr;\n                }\n                // Separator for positional-only arguments (placed after the\n                // argument, rather than before like *\n                if (rec->nargs_pos_only > 0 && (arg_index + 1) == rec->nargs_pos_only) {\n                    signature += \", /\";\n                }\n                if (!is_starred) {\n                    arg_index++;\n                }\n            } else if (c == '%') {\n                const std::type_info *t = types[type_index++];\n                if (!t) {\n                    pybind11_fail(\"Internal error while parsing type signature (1)\");\n                }\n                if (auto *tinfo = detail::get_type_info(*t)) {\n                    handle th((PyObject *) tinfo->type);\n                    signature += th.attr(\"__module__\").cast<std::string>() + \".\"\n                                 + th.attr(\"__qualname__\").cast<std::string>();\n                } else if (rec->is_new_style_constructor && arg_index == 0) {\n                    // A new-style `__init__` takes `self` as `value_and_holder`.\n                    // Rewrite it to the proper class type.\n                    signature += rec->scope.attr(\"__module__\").cast<std::string>() + \".\"\n                                 + rec->scope.attr(\"__qualname__\").cast<std::string>();\n                } else {\n                    std::string tname(t->name());\n                    detail::clean_type_id(tname);\n                    signature += tname;\n                }\n            } else {\n                signature += c;\n            }\n        }\n\n        if (arg_index != args - rec->has_args - rec->has_kwargs || types[type_index] != nullptr) {\n            pybind11_fail(\"Internal error while parsing type signature (2)\");\n        }\n\n        rec->signature = guarded_strdup(signature.c_str());\n        rec->args.shrink_to_fit();\n        rec->nargs = (std::uint16_t) args;\n\n        if (rec->sibling && PYBIND11_INSTANCE_METHOD_CHECK(rec->sibling.ptr())) {\n            rec->sibling = PYBIND11_INSTANCE_METHOD_GET_FUNCTION(rec->sibling.ptr());\n        }\n\n        detail::function_record *chain = nullptr, *chain_start = rec;\n        if (rec->sibling) {\n            if (PyCFunction_Check(rec->sibling.ptr())) {\n                auto *self = PyCFunction_GET_SELF(rec->sibling.ptr());\n                if (!isinstance<capsule>(self)) {\n                    chain = nullptr;\n                } else {\n                    auto rec_capsule = reinterpret_borrow<capsule>(self);\n                    if (detail::is_function_record_capsule(rec_capsule)) {\n                        chain = rec_capsule.get_pointer<detail::function_record>();\n                        /* Never append a method to an overload chain of a parent class;\n                           instead, hide the parent's overloads in this case */\n                        if (!chain->scope.is(rec->scope)) {\n                            chain = nullptr;\n                        }\n                    } else {\n                        chain = nullptr;\n                    }\n                }\n            }\n            // Don't trigger for things like the default __init__, which are wrapper_descriptors\n            // that we are intentionally replacing\n            else if (!rec->sibling.is_none() && rec->name[0] != '_') {\n                pybind11_fail(\"Cannot overload existing non-function object \\\"\"\n                              + std::string(rec->name) + \"\\\" with a function of the same name\");\n            }\n        }\n\n        if (!chain) {\n            /* No existing overload was found, create a new function object */\n            rec->def = new PyMethodDef();\n            std::memset(rec->def, 0, sizeof(PyMethodDef));\n            rec->def->ml_name = rec->name;\n            rec->def->ml_meth\n                = reinterpret_cast<PyCFunction>(reinterpret_cast<void (*)()>(dispatcher));\n            rec->def->ml_flags = METH_VARARGS | METH_KEYWORDS;\n\n            capsule rec_capsule(unique_rec.release(),\n                                detail::get_function_record_capsule_name(),\n                                [](void *ptr) { destruct((detail::function_record *) ptr); });\n            guarded_strdup.release();\n\n            object scope_module;\n            if (rec->scope) {\n                if (hasattr(rec->scope, \"__module__\")) {\n                    scope_module = rec->scope.attr(\"__module__\");\n                } else if (hasattr(rec->scope, \"__name__\")) {\n                    scope_module = rec->scope.attr(\"__name__\");\n                }\n            }\n\n            m_ptr = PyCFunction_NewEx(rec->def, rec_capsule.ptr(), scope_module.ptr());\n            if (!m_ptr) {\n                pybind11_fail(\"cpp_function::cpp_function(): Could not allocate function object\");\n            }\n        } else {\n            /* Append at the beginning or end of the overload chain */\n            m_ptr = rec->sibling.ptr();\n            inc_ref();\n            if (chain->is_method != rec->is_method) {\n                pybind11_fail(\n                    \"overloading a method with both static and instance methods is not supported; \"\n#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                    \"#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for more \"\n                    \"details\"\n#else\n                    \"error while attempting to bind \"\n                    + std::string(rec->is_method ? \"instance\" : \"static\") + \" method \"\n                    + std::string(pybind11::str(rec->scope.attr(\"__name__\"))) + \".\"\n                    + std::string(rec->name) + signature\n#endif\n                );\n            }\n\n            if (rec->prepend) {\n                // Beginning of chain; we need to replace the capsule's current head-of-the-chain\n                // pointer with this one, then make this one point to the previous head of the\n                // chain.\n                chain_start = rec;\n                rec->next = chain;\n                auto rec_capsule\n                    = reinterpret_borrow<capsule>(((PyCFunctionObject *) m_ptr)->m_self);\n                rec_capsule.set_pointer(unique_rec.release());\n                guarded_strdup.release();\n            } else {\n                // Or end of chain (normal behavior)\n                chain_start = chain;\n                while (chain->next) {\n                    chain = chain->next;\n                }\n                chain->next = unique_rec.release();\n                guarded_strdup.release();\n            }\n        }\n\n        std::string signatures;\n        int index = 0;\n        /* Create a nice pydoc rec including all signatures and\n           docstrings of the functions in the overload chain */\n        if (chain && options::show_function_signatures()) {\n            // First a generic signature\n            signatures += rec->name;\n            signatures += \"(*args, **kwargs)\\n\";\n            signatures += \"Overloaded function.\\n\\n\";\n        }\n        // Then specific overload signatures\n        bool first_user_def = true;\n        for (auto *it = chain_start; it != nullptr; it = it->next) {\n            if (options::show_function_signatures()) {\n                if (index > 0) {\n                    signatures += '\\n';\n                }\n                if (chain) {\n                    signatures += std::to_string(++index) + \". \";\n                }\n                signatures += rec->name;\n                signatures += it->signature;\n                signatures += '\\n';\n            }\n            if (it->doc && it->doc[0] != '\\0' && options::show_user_defined_docstrings()) {\n                // If we're appending another docstring, and aren't printing function signatures,\n                // we need to append a newline first:\n                if (!options::show_function_signatures()) {\n                    if (first_user_def) {\n                        first_user_def = false;\n                    } else {\n                        signatures += '\\n';\n                    }\n                }\n                if (options::show_function_signatures()) {\n                    signatures += '\\n';\n                }\n                signatures += it->doc;\n                if (options::show_function_signatures()) {\n                    signatures += '\\n';\n                }\n            }\n        }\n\n        /* Install docstring */\n        auto *func = (PyCFunctionObject *) m_ptr;\n        std::free(const_cast<char *>(func->m_ml->ml_doc));\n        // Install docstring if it's non-empty (when at least one option is enabled)\n        func->m_ml->ml_doc\n            = signatures.empty() ? nullptr : PYBIND11_COMPAT_STRDUP(signatures.c_str());\n\n        if (rec->is_method) {\n            m_ptr = PYBIND11_INSTANCE_METHOD_NEW(m_ptr, rec->scope.ptr());\n            if (!m_ptr) {\n                pybind11_fail(\n                    \"cpp_function::cpp_function(): Could not allocate instance method object\");\n            }\n            Py_DECREF(func);\n        }\n    }\n\n    /// When a cpp_function is GCed, release any memory allocated by pybind11\n    static void destruct(detail::function_record *rec, bool free_strings = true) {\n// If on Python 3.9, check the interpreter \"MICRO\" (patch) version.\n// If this is running on 3.9.0, we have to work around a bug.\n#if !defined(PYPY_VERSION) && PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 9\n        static bool is_zero = Py_GetVersion()[4] == '0';\n#endif\n\n        while (rec) {\n            detail::function_record *next = rec->next;\n            if (rec->free_data) {\n                rec->free_data(rec);\n            }\n            // During initialization, these strings might not have been copied yet,\n            // so they cannot be freed. Once the function has been created, they can.\n            // Check `make_function_record` for more details.\n            if (free_strings) {\n                std::free((char *) rec->name);\n                std::free((char *) rec->doc);\n                std::free((char *) rec->signature);\n                for (auto &arg : rec->args) {\n                    std::free(const_cast<char *>(arg.name));\n                    std::free(const_cast<char *>(arg.descr));\n                }\n            }\n            for (auto &arg : rec->args) {\n                arg.value.dec_ref();\n            }\n            if (rec->def) {\n                std::free(const_cast<char *>(rec->def->ml_doc));\n// Python 3.9.0 decref's these in the wrong order; rec->def\n// If loaded on 3.9.0, let these leak (use Python 3.9.1 at runtime to fix)\n// See https://github.com/python/cpython/pull/22670\n#if !defined(PYPY_VERSION) && PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 9\n                if (!is_zero) {\n                    delete rec->def;\n                }\n#else\n                delete rec->def;\n#endif\n            }\n            delete rec;\n            rec = next;\n        }\n    }\n\n    /// Main dispatch logic for calls to functions bound using pybind11\n    static PyObject *dispatcher(PyObject *self, PyObject *args_in, PyObject *kwargs_in) {\n        using namespace detail;\n        assert(isinstance<capsule>(self));\n\n        /* Iterator over the list of potentially admissible overloads */\n        const function_record *overloads = reinterpret_cast<function_record *>(\n                                  PyCapsule_GetPointer(self, get_function_record_capsule_name())),\n                              *it = overloads;\n        assert(overloads != nullptr);\n\n        /* Need to know how many arguments + keyword arguments there are to pick the right\n           overload */\n        const auto n_args_in = (size_t) PyTuple_GET_SIZE(args_in);\n\n        handle parent = n_args_in > 0 ? PyTuple_GET_ITEM(args_in, 0) : nullptr,\n               result = PYBIND11_TRY_NEXT_OVERLOAD;\n\n        auto self_value_and_holder = value_and_holder();\n        if (overloads->is_constructor) {\n            if (!parent\n                || !PyObject_TypeCheck(parent.ptr(), (PyTypeObject *) overloads->scope.ptr())) {\n                PyErr_SetString(\n                    PyExc_TypeError,\n                    \"__init__(self, ...) called with invalid or missing `self` argument\");\n                return nullptr;\n            }\n\n            auto *const tinfo = get_type_info((PyTypeObject *) overloads->scope.ptr());\n            auto *const pi = reinterpret_cast<instance *>(parent.ptr());\n            self_value_and_holder = pi->get_value_and_holder(tinfo, true);\n\n            // If this value is already registered it must mean __init__ is invoked multiple times;\n            // we really can't support that in C++, so just ignore the second __init__.\n            if (self_value_and_holder.instance_registered()) {\n                return none().release().ptr();\n            }\n        }\n\n        try {\n            // We do this in two passes: in the first pass, we load arguments with `convert=false`;\n            // in the second, we allow conversion (except for arguments with an explicit\n            // py::arg().noconvert()).  This lets us prefer calls without conversion, with\n            // conversion as a fallback.\n            std::vector<function_call> second_pass;\n\n            // However, if there are no overloads, we can just skip the no-convert pass entirely\n            const bool overloaded = it != nullptr && it->next != nullptr;\n\n            for (; it != nullptr; it = it->next) {\n\n                /* For each overload:\n                   1. Copy all positional arguments we were given, also checking to make sure that\n                      named positional arguments weren't *also* specified via kwarg.\n                   2. If we weren't given enough, try to make up the omitted ones by checking\n                      whether they were provided by a kwarg matching the `py::arg(\"name\")` name. If\n                      so, use it (and remove it from kwargs); if not, see if the function binding\n                      provided a default that we can use.\n                   3. Ensure that either all keyword arguments were \"consumed\", or that the\n                   function takes a kwargs argument to accept unconsumed kwargs.\n                   4. Any positional arguments still left get put into a tuple (for args), and any\n                      leftover kwargs get put into a dict.\n                   5. Pack everything into a vector; if we have py::args or py::kwargs, they are an\n                      extra tuple or dict at the end of the positional arguments.\n                   6. Call the function call dispatcher (function_record::impl)\n\n                   If one of these fail, move on to the next overload and keep trying until we get\n                   a result other than PYBIND11_TRY_NEXT_OVERLOAD.\n                 */\n\n                const function_record &func = *it;\n                size_t num_args = func.nargs; // Number of positional arguments that we need\n                if (func.has_args) {\n                    --num_args; // (but don't count py::args\n                }\n                if (func.has_kwargs) {\n                    --num_args; //  or py::kwargs)\n                }\n                size_t pos_args = func.nargs_pos;\n\n                if (!func.has_args && n_args_in > pos_args) {\n                    continue; // Too many positional arguments for this overload\n                }\n\n                if (n_args_in < pos_args && func.args.size() < pos_args) {\n                    continue; // Not enough positional arguments given, and not enough defaults to\n                              // fill in the blanks\n                }\n\n                function_call call(func, parent);\n\n                // Protect std::min with parentheses\n                size_t args_to_copy = (std::min)(pos_args, n_args_in);\n                size_t args_copied = 0;\n\n                // 0. Inject new-style `self` argument\n                if (func.is_new_style_constructor) {\n                    // The `value` may have been preallocated by an old-style `__init__`\n                    // if it was a preceding candidate for overload resolution.\n                    if (self_value_and_holder) {\n                        self_value_and_holder.type->dealloc(self_value_and_holder);\n                    }\n\n                    call.init_self = PyTuple_GET_ITEM(args_in, 0);\n                    call.args.emplace_back(reinterpret_cast<PyObject *>(&self_value_and_holder));\n                    call.args_convert.push_back(false);\n                    ++args_copied;\n                }\n\n                // 1. Copy any position arguments given.\n                bool bad_arg = false;\n                for (; args_copied < args_to_copy; ++args_copied) {\n                    const argument_record *arg_rec\n                        = args_copied < func.args.size() ? &func.args[args_copied] : nullptr;\n                    if (kwargs_in && arg_rec && arg_rec->name\n                        && dict_getitemstring(kwargs_in, arg_rec->name)) {\n                        bad_arg = true;\n                        break;\n                    }\n\n                    handle arg(PyTuple_GET_ITEM(args_in, args_copied));\n                    if (arg_rec && !arg_rec->none && arg.is_none()) {\n                        bad_arg = true;\n                        break;\n                    }\n                    call.args.push_back(arg);\n                    call.args_convert.push_back(arg_rec ? arg_rec->convert : true);\n                }\n                if (bad_arg) {\n                    continue; // Maybe it was meant for another overload (issue #688)\n                }\n\n                // Keep track of how many position args we copied out in case we need to come back\n                // to copy the rest into a py::args argument.\n                size_t positional_args_copied = args_copied;\n\n                // We'll need to copy this if we steal some kwargs for defaults\n                dict kwargs = reinterpret_borrow<dict>(kwargs_in);\n\n                // 1.5. Fill in any missing pos_only args from defaults if they exist\n                if (args_copied < func.nargs_pos_only) {\n                    for (; args_copied < func.nargs_pos_only; ++args_copied) {\n                        const auto &arg_rec = func.args[args_copied];\n                        handle value;\n\n                        if (arg_rec.value) {\n                            value = arg_rec.value;\n                        }\n                        if (value) {\n                            call.args.push_back(value);\n                            call.args_convert.push_back(arg_rec.convert);\n                        } else {\n                            break;\n                        }\n                    }\n\n                    if (args_copied < func.nargs_pos_only) {\n                        continue; // Not enough defaults to fill the positional arguments\n                    }\n                }\n\n                // 2. Check kwargs and, failing that, defaults that may help complete the list\n                if (args_copied < num_args) {\n                    bool copied_kwargs = false;\n\n                    for (; args_copied < num_args; ++args_copied) {\n                        const auto &arg_rec = func.args[args_copied];\n\n                        handle value;\n                        if (kwargs_in && arg_rec.name) {\n                            value = dict_getitemstring(kwargs.ptr(), arg_rec.name);\n                        }\n\n                        if (value) {\n                            // Consume a kwargs value\n                            if (!copied_kwargs) {\n                                kwargs = reinterpret_steal<dict>(PyDict_Copy(kwargs.ptr()));\n                                copied_kwargs = true;\n                            }\n                            if (PyDict_DelItemString(kwargs.ptr(), arg_rec.name) == -1) {\n                                throw error_already_set();\n                            }\n                        } else if (arg_rec.value) {\n                            value = arg_rec.value;\n                        }\n\n                        if (!arg_rec.none && value.is_none()) {\n                            break;\n                        }\n\n                        if (value) {\n                            // If we're at the py::args index then first insert a stub for it to be\n                            // replaced later\n                            if (func.has_args && call.args.size() == func.nargs_pos) {\n                                call.args.push_back(none());\n                            }\n\n                            call.args.push_back(value);\n                            call.args_convert.push_back(arg_rec.convert);\n                        } else {\n                            break;\n                        }\n                    }\n\n                    if (args_copied < num_args) {\n                        continue; // Not enough arguments, defaults, or kwargs to fill the\n                                  // positional arguments\n                    }\n                }\n\n                // 3. Check everything was consumed (unless we have a kwargs arg)\n                if (kwargs && !kwargs.empty() && !func.has_kwargs) {\n                    continue; // Unconsumed kwargs, but no py::kwargs argument to accept them\n                }\n\n                // 4a. If we have a py::args argument, create a new tuple with leftovers\n                if (func.has_args) {\n                    tuple extra_args;\n                    if (args_to_copy == 0) {\n                        // We didn't copy out any position arguments from the args_in tuple, so we\n                        // can reuse it directly without copying:\n                        extra_args = reinterpret_borrow<tuple>(args_in);\n                    } else if (positional_args_copied >= n_args_in) {\n                        extra_args = tuple(0);\n                    } else {\n                        size_t args_size = n_args_in - positional_args_copied;\n                        extra_args = tuple(args_size);\n                        for (size_t i = 0; i < args_size; ++i) {\n                            extra_args[i] = PyTuple_GET_ITEM(args_in, positional_args_copied + i);\n                        }\n                    }\n                    if (call.args.size() <= func.nargs_pos) {\n                        call.args.push_back(extra_args);\n                    } else {\n                        call.args[func.nargs_pos] = extra_args;\n                    }\n                    call.args_convert.push_back(false);\n                    call.args_ref = std::move(extra_args);\n                }\n\n                // 4b. If we have a py::kwargs, pass on any remaining kwargs\n                if (func.has_kwargs) {\n                    if (!kwargs.ptr()) {\n                        kwargs = dict(); // If we didn't get one, send an empty one\n                    }\n                    call.args.push_back(kwargs);\n                    call.args_convert.push_back(false);\n                    call.kwargs_ref = std::move(kwargs);\n                }\n\n// 5. Put everything in a vector.  Not technically step 5, we've been building it\n// in `call.args` all along.\n#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)\n                if (call.args.size() != func.nargs || call.args_convert.size() != func.nargs) {\n                    pybind11_fail(\"Internal error: function call dispatcher inserted wrong number \"\n                                  \"of arguments!\");\n                }\n#endif\n\n                std::vector<bool> second_pass_convert;\n                if (overloaded) {\n                    // We're in the first no-convert pass, so swap out the conversion flags for a\n                    // set of all-false flags.  If the call fails, we'll swap the flags back in for\n                    // the conversion-allowed call below.\n                    second_pass_convert.resize(func.nargs, false);\n                    call.args_convert.swap(second_pass_convert);\n                }\n\n                // 6. Call the function.\n                try {\n                    loader_life_support guard{};\n                    result = func.impl(call);\n                } catch (reference_cast_error &) {\n                    result = PYBIND11_TRY_NEXT_OVERLOAD;\n                }\n\n                if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) {\n                    break;\n                }\n\n                if (overloaded) {\n                    // The (overloaded) call failed; if the call has at least one argument that\n                    // permits conversion (i.e. it hasn't been explicitly specified `.noconvert()`)\n                    // then add this call to the list of second pass overloads to try.\n                    for (size_t i = func.is_method ? 1 : 0; i < pos_args; i++) {\n                        if (second_pass_convert[i]) {\n                            // Found one: swap the converting flags back in and store the call for\n                            // the second pass.\n                            call.args_convert.swap(second_pass_convert);\n                            second_pass.push_back(std::move(call));\n                            break;\n                        }\n                    }\n                }\n            }\n\n            if (overloaded && !second_pass.empty() && result.ptr() == PYBIND11_TRY_NEXT_OVERLOAD) {\n                // The no-conversion pass finished without success, try again with conversion\n                // allowed\n                for (auto &call : second_pass) {\n                    try {\n                        loader_life_support guard{};\n                        result = call.func.impl(call);\n                    } catch (reference_cast_error &) {\n                        result = PYBIND11_TRY_NEXT_OVERLOAD;\n                    }\n\n                    if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) {\n                        // The error reporting logic below expects 'it' to be valid, as it would be\n                        // if we'd encountered this failure in the first-pass loop.\n                        if (!result) {\n                            it = &call.func;\n                        }\n                        break;\n                    }\n                }\n            }\n        } catch (error_already_set &e) {\n            e.restore();\n            return nullptr;\n#ifdef __GLIBCXX__\n        } catch (abi::__forced_unwind &) {\n            throw;\n#endif\n        } catch (...) {\n            /* When an exception is caught, give each registered exception\n               translator a chance to translate it to a Python exception. First\n               all module-local translators will be tried in reverse order of\n               registration. If none of the module-locale translators handle\n               the exception (or there are no module-locale translators) then\n               the global translators will be tried, also in reverse order of\n               registration.\n\n               A translator may choose to do one of the following:\n\n                - catch the exception and call PyErr_SetString or PyErr_SetObject\n                  to set a standard (or custom) Python exception, or\n                - do nothing and let the exception fall through to the next translator, or\n                - delegate translation to the next translator by throwing a new type of exception.\n             */\n\n            auto &local_exception_translators\n                = get_local_internals().registered_exception_translators;\n            if (detail::apply_exception_translators(local_exception_translators)) {\n                return nullptr;\n            }\n            auto &exception_translators = get_internals().registered_exception_translators;\n            if (detail::apply_exception_translators(exception_translators)) {\n                return nullptr;\n            }\n\n            PyErr_SetString(PyExc_SystemError,\n                            \"Exception escaped from default exception translator!\");\n            return nullptr;\n        }\n\n        auto append_note_if_missing_header_is_suspected = [](std::string &msg) {\n            if (msg.find(\"std::\") != std::string::npos) {\n                msg += \"\\n\\n\"\n                       \"Did you forget to `#include <pybind11/stl.h>`? Or <pybind11/complex.h>,\\n\"\n                       \"<pybind11/functional.h>, <pybind11/chrono.h>, etc. Some automatic\\n\"\n                       \"conversions are optional and require extra headers to be included\\n\"\n                       \"when compiling your pybind11 module.\";\n            }\n        };\n\n        if (result.ptr() == PYBIND11_TRY_NEXT_OVERLOAD) {\n            if (overloads->is_operator) {\n                return handle(Py_NotImplemented).inc_ref().ptr();\n            }\n\n            std::string msg = std::string(overloads->name) + \"(): incompatible \"\n                              + std::string(overloads->is_constructor ? \"constructor\" : \"function\")\n                              + \" arguments. The following argument types are supported:\\n\";\n\n            int ctr = 0;\n            for (const function_record *it2 = overloads; it2 != nullptr; it2 = it2->next) {\n                msg += \"    \" + std::to_string(++ctr) + \". \";\n\n                bool wrote_sig = false;\n                if (overloads->is_constructor) {\n                    // For a constructor, rewrite `(self: Object, arg0, ...) -> NoneType` as\n                    // `Object(arg0, ...)`\n                    std::string sig = it2->signature;\n                    size_t start = sig.find('(') + 7; // skip \"(self: \"\n                    if (start < sig.size()) {\n                        // End at the , for the next argument\n                        size_t end = sig.find(\", \"), next = end + 2;\n                        size_t ret = sig.rfind(\" -> \");\n                        // Or the ), if there is no comma:\n                        if (end >= sig.size()) {\n                            next = end = sig.find(')');\n                        }\n                        if (start < end && next < sig.size()) {\n                            msg.append(sig, start, end - start);\n                            msg += '(';\n                            msg.append(sig, next, ret - next);\n                            wrote_sig = true;\n                        }\n                    }\n                }\n                if (!wrote_sig) {\n                    msg += it2->signature;\n                }\n\n                msg += '\\n';\n            }\n            msg += \"\\nInvoked with: \";\n            auto args_ = reinterpret_borrow<tuple>(args_in);\n            bool some_args = false;\n            for (size_t ti = overloads->is_constructor ? 1 : 0; ti < args_.size(); ++ti) {\n                if (!some_args) {\n                    some_args = true;\n                } else {\n                    msg += \", \";\n                }\n                try {\n                    msg += pybind11::repr(args_[ti]);\n                } catch (const error_already_set &) {\n                    msg += \"<repr raised Error>\";\n                }\n            }\n            if (kwargs_in) {\n                auto kwargs = reinterpret_borrow<dict>(kwargs_in);\n                if (!kwargs.empty()) {\n                    if (some_args) {\n                        msg += \"; \";\n                    }\n                    msg += \"kwargs: \";\n                    bool first = true;\n                    for (auto kwarg : kwargs) {\n                        if (first) {\n                            first = false;\n                        } else {\n                            msg += \", \";\n                        }\n                        msg += pybind11::str(\"{}=\").format(kwarg.first);\n                        try {\n                            msg += pybind11::repr(kwarg.second);\n                        } catch (const error_already_set &) {\n                            msg += \"<repr raised Error>\";\n                        }\n                    }\n                }\n            }\n\n            append_note_if_missing_header_is_suspected(msg);\n            // Attach additional error info to the exception if supported\n            if (PyErr_Occurred()) {\n                // #HelpAppreciated: unit test coverage for this branch.\n                raise_from(PyExc_TypeError, msg.c_str());\n                return nullptr;\n            }\n            PyErr_SetString(PyExc_TypeError, msg.c_str());\n            return nullptr;\n        }\n        if (!result) {\n            std::string msg = \"Unable to convert function return value to a \"\n                              \"Python type! The signature was\\n\\t\";\n            msg += it->signature;\n            append_note_if_missing_header_is_suspected(msg);\n            // Attach additional error info to the exception if supported\n            if (PyErr_Occurred()) {\n                raise_from(PyExc_TypeError, msg.c_str());\n                return nullptr;\n            }\n            PyErr_SetString(PyExc_TypeError, msg.c_str());\n            return nullptr;\n        }\n        if (overloads->is_constructor && !self_value_and_holder.holder_constructed()) {\n            auto *pi = reinterpret_cast<instance *>(parent.ptr());\n            self_value_and_holder.type->init_instance(pi, nullptr);\n        }\n        return result.ptr();\n    }\n};\n\n/// Wrapper for Python extension modules\nclass module_ : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(module_, object, PyModule_Check)\n\n    /// Create a new top-level Python module with the given name and docstring\n    PYBIND11_DEPRECATED(\"Use PYBIND11_MODULE or module_::create_extension_module instead\")\n    explicit module_(const char *name, const char *doc = nullptr) {\n        *this = create_extension_module(name, doc, new PyModuleDef());\n    }\n\n    /** \\rst\n        Create Python binding for a new function within the module scope. ``Func``\n        can be a plain C++ function, a function pointer, or a lambda function. For\n        details on the ``Extra&& ... extra`` argument, see section :ref:`extras`.\n    \\endrst */\n    template <typename Func, typename... Extra>\n    module_ &def(const char *name_, Func &&f, const Extra &...extra) {\n        cpp_function func(std::forward<Func>(f),\n                          name(name_),\n                          scope(*this),\n                          sibling(getattr(*this, name_, none())),\n                          extra...);\n        // NB: allow overwriting here because cpp_function sets up a chain with the intention of\n        // overwriting (and has already checked internally that it isn't overwriting\n        // non-functions).\n        add_object(name_, func, true /* overwrite */);\n        return *this;\n    }\n\n    /** \\rst\n        Create and return a new Python submodule with the given name and docstring.\n        This also works recursively, i.e.\n\n        .. code-block:: cpp\n\n            py::module_ m(\"example\", \"pybind11 example plugin\");\n            py::module_ m2 = m.def_submodule(\"sub\", \"A submodule of 'example'\");\n            py::module_ m3 = m2.def_submodule(\"subsub\", \"A submodule of 'example.sub'\");\n    \\endrst */\n    module_ def_submodule(const char *name, const char *doc = nullptr) {\n        const char *this_name = PyModule_GetName(m_ptr);\n        if (this_name == nullptr) {\n            throw error_already_set();\n        }\n        std::string full_name = std::string(this_name) + '.' + name;\n        handle submodule = PyImport_AddModule(full_name.c_str());\n        if (!submodule) {\n            throw error_already_set();\n        }\n        auto result = reinterpret_borrow<module_>(submodule);\n        if (doc && options::show_user_defined_docstrings()) {\n            result.attr(\"__doc__\") = pybind11::str(doc);\n        }\n        attr(name) = result;\n        return result;\n    }\n\n    /// Import and return a module or throws `error_already_set`.\n    static module_ import(const char *name) {\n        PyObject *obj = PyImport_ImportModule(name);\n        if (!obj) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<module_>(obj);\n    }\n\n    /// Reload the module or throws `error_already_set`.\n    void reload() {\n        PyObject *obj = PyImport_ReloadModule(ptr());\n        if (!obj) {\n            throw error_already_set();\n        }\n        *this = reinterpret_steal<module_>(obj);\n    }\n\n    /** \\rst\n        Adds an object to the module using the given name.  Throws if an object with the given name\n        already exists.\n\n        ``overwrite`` should almost always be false: attempting to overwrite objects that pybind11\n        has established will, in most cases, break things.\n    \\endrst */\n    PYBIND11_NOINLINE void add_object(const char *name, handle obj, bool overwrite = false) {\n        if (!overwrite && hasattr(*this, name)) {\n            pybind11_fail(\n                \"Error during initialization: multiple incompatible definitions with name \\\"\"\n                + std::string(name) + \"\\\"\");\n        }\n\n        PyModule_AddObject(ptr(), name, obj.inc_ref().ptr() /* steals a reference */);\n    }\n\n    using module_def = PyModuleDef; // TODO: Can this be removed (it was needed only for Python 2)?\n\n    /** \\rst\n        Create a new top-level module that can be used as the main module of a C extension.\n\n        ``def`` should point to a statically allocated module_def.\n    \\endrst */\n    static module_ create_extension_module(const char *name, const char *doc, module_def *def) {\n        // module_def is PyModuleDef\n        // Placement new (not an allocation).\n        def = new (def)\n            PyModuleDef{/* m_base */ PyModuleDef_HEAD_INIT,\n                        /* m_name */ name,\n                        /* m_doc */ options::show_user_defined_docstrings() ? doc : nullptr,\n                        /* m_size */ -1,\n                        /* m_methods */ nullptr,\n                        /* m_slots */ nullptr,\n                        /* m_traverse */ nullptr,\n                        /* m_clear */ nullptr,\n                        /* m_free */ nullptr};\n        auto *m = PyModule_Create(def);\n        if (m == nullptr) {\n            if (PyErr_Occurred()) {\n                throw error_already_set();\n            }\n            pybind11_fail(\"Internal error in module_::create_extension_module()\");\n        }\n        // TODO: Should be reinterpret_steal for Python 3, but Python also steals it again when\n        //       returned from PyInit_...\n        //       For Python 2, reinterpret_borrow was correct.\n        return reinterpret_borrow<module_>(m);\n    }\n};\n\n// When inside a namespace (or anywhere as long as it's not the first item on a line),\n// C++20 allows \"module\" to be used. This is provided for backward compatibility, and for\n// simplicity, if someone wants to use py::module for example, that is perfectly safe.\nusing module = module_;\n\n/// \\ingroup python_builtins\n/// Return a dictionary representing the global variables in the current execution frame,\n/// or ``__main__.__dict__`` if there is no frame (usually when the interpreter is embedded).\ninline dict globals() {\n    PyObject *p = PyEval_GetGlobals();\n    return reinterpret_borrow<dict>(p ? p : module_::import(\"__main__\").attr(\"__dict__\").ptr());\n}\n\ntemplate <typename... Args, typename = detail::enable_if_t<args_are_all_keyword_or_ds<Args...>()>>\nPYBIND11_DEPRECATED(\"make_simple_namespace should be replaced with \"\n                    \"py::module_::import(\\\"types\\\").attr(\\\"SimpleNamespace\\\") \")\nobject make_simple_namespace(Args &&...args_) {\n    return module_::import(\"types\").attr(\"SimpleNamespace\")(std::forward<Args>(args_)...);\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n/// Generic support for creating new Python heap types\nclass generic_type : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(generic_type, object, PyType_Check)\nprotected:\n    void initialize(const type_record &rec) {\n        if (rec.scope && hasattr(rec.scope, \"__dict__\")\n            && rec.scope.attr(\"__dict__\").contains(rec.name)) {\n            pybind11_fail(\"generic_type: cannot initialize type \\\"\" + std::string(rec.name)\n                          + \"\\\": an object with that name is already defined\");\n        }\n\n        if ((rec.module_local ? get_local_type_info(*rec.type) : get_global_type_info(*rec.type))\n            != nullptr) {\n            pybind11_fail(\"generic_type: type \\\"\" + std::string(rec.name)\n                          + \"\\\" is already registered!\");\n        }\n\n        m_ptr = make_new_python_type(rec);\n\n        /* Register supplemental type information in C++ dict */\n        auto *tinfo = new detail::type_info();\n        tinfo->type = (PyTypeObject *) m_ptr;\n        tinfo->cpptype = rec.type;\n        tinfo->type_size = rec.type_size;\n        tinfo->type_align = rec.type_align;\n        tinfo->operator_new = rec.operator_new;\n        tinfo->holder_size_in_ptrs = size_in_ptrs(rec.holder_size);\n        tinfo->init_instance = rec.init_instance;\n        tinfo->dealloc = rec.dealloc;\n        tinfo->simple_type = true;\n        tinfo->simple_ancestors = true;\n        tinfo->default_holder = rec.default_holder;\n        tinfo->module_local = rec.module_local;\n\n        auto &internals = get_internals();\n        auto tindex = std::type_index(*rec.type);\n        tinfo->direct_conversions = &internals.direct_conversions[tindex];\n        if (rec.module_local) {\n            get_local_internals().registered_types_cpp[tindex] = tinfo;\n        } else {\n            internals.registered_types_cpp[tindex] = tinfo;\n        }\n        internals.registered_types_py[(PyTypeObject *) m_ptr] = {tinfo};\n\n        if (rec.bases.size() > 1 || rec.multiple_inheritance) {\n            mark_parents_nonsimple(tinfo->type);\n            tinfo->simple_ancestors = false;\n        } else if (rec.bases.size() == 1) {\n            auto *parent_tinfo = get_type_info((PyTypeObject *) rec.bases[0].ptr());\n            assert(parent_tinfo != nullptr);\n            bool parent_simple_ancestors = parent_tinfo->simple_ancestors;\n            tinfo->simple_ancestors = parent_simple_ancestors;\n            // The parent can no longer be a simple type if it has MI and has a child\n            parent_tinfo->simple_type = parent_tinfo->simple_type && parent_simple_ancestors;\n        }\n\n        if (rec.module_local) {\n            // Stash the local typeinfo and loader so that external modules can access it.\n            tinfo->module_local_load = &type_caster_generic::local_load;\n            setattr(m_ptr, PYBIND11_MODULE_LOCAL_ID, capsule(tinfo));\n        }\n    }\n\n    /// Helper function which tags all parents of a type using mult. inheritance\n    void mark_parents_nonsimple(PyTypeObject *value) {\n        auto t = reinterpret_borrow<tuple>(value->tp_bases);\n        for (handle h : t) {\n            auto *tinfo2 = get_type_info((PyTypeObject *) h.ptr());\n            if (tinfo2) {\n                tinfo2->simple_type = false;\n            }\n            mark_parents_nonsimple((PyTypeObject *) h.ptr());\n        }\n    }\n\n    void install_buffer_funcs(buffer_info *(*get_buffer)(PyObject *, void *),\n                              void *get_buffer_data) {\n        auto *type = (PyHeapTypeObject *) m_ptr;\n        auto *tinfo = detail::get_type_info(&type->ht_type);\n\n        if (!type->ht_type.tp_as_buffer) {\n            pybind11_fail(\"To be able to register buffer protocol support for the type '\"\n                          + get_fully_qualified_tp_name(tinfo->type)\n                          + \"' the associated class<>(..) invocation must \"\n                            \"include the pybind11::buffer_protocol() annotation!\");\n        }\n\n        tinfo->get_buffer = get_buffer;\n        tinfo->get_buffer_data = get_buffer_data;\n    }\n\n    // rec_func must be set for either fget or fset.\n    void def_property_static_impl(const char *name,\n                                  handle fget,\n                                  handle fset,\n                                  detail::function_record *rec_func) {\n        const auto is_static = (rec_func != nullptr) && !(rec_func->is_method && rec_func->scope);\n        const auto has_doc = (rec_func != nullptr) && (rec_func->doc != nullptr)\n                             && pybind11::options::show_user_defined_docstrings();\n        auto property = handle(\n            (PyObject *) (is_static ? get_internals().static_property_type : &PyProperty_Type));\n        attr(name) = property(fget.ptr() ? fget : none(),\n                              fset.ptr() ? fset : none(),\n                              /*deleter*/ none(),\n                              pybind11::str(has_doc ? rec_func->doc : \"\"));\n    }\n};\n\n/// Set the pointer to operator new if it exists. The cast is needed because it can be overloaded.\ntemplate <typename T,\n          typename = void_t<decltype(static_cast<void *(*) (size_t)>(T::operator new))>>\nvoid set_operator_new(type_record *r) {\n    r->operator_new = &T::operator new;\n}\n\ntemplate <typename>\nvoid set_operator_new(...) {}\n\ntemplate <typename T, typename SFINAE = void>\nstruct has_operator_delete : std::false_type {};\ntemplate <typename T>\nstruct has_operator_delete<T, void_t<decltype(static_cast<void (*)(void *)>(T::operator delete))>>\n    : std::true_type {};\ntemplate <typename T, typename SFINAE = void>\nstruct has_operator_delete_size : std::false_type {};\ntemplate <typename T>\nstruct has_operator_delete_size<\n    T,\n    void_t<decltype(static_cast<void (*)(void *, size_t)>(T::operator delete))>> : std::true_type {\n};\n/// Call class-specific delete if it exists or global otherwise. Can also be an overload set.\ntemplate <typename T, enable_if_t<has_operator_delete<T>::value, int> = 0>\nvoid call_operator_delete(T *p, size_t, size_t) {\n    T::operator delete(p);\n}\ntemplate <typename T,\n          enable_if_t<!has_operator_delete<T>::value && has_operator_delete_size<T>::value, int>\n          = 0>\nvoid call_operator_delete(T *p, size_t s, size_t) {\n    T::operator delete(p, s);\n}\n\ninline void call_operator_delete(void *p, size_t s, size_t a) {\n    (void) s;\n    (void) a;\n#if defined(__cpp_aligned_new) && (!defined(_MSC_VER) || _MSC_VER >= 1912)\n    if (a > __STDCPP_DEFAULT_NEW_ALIGNMENT__) {\n#    ifdef __cpp_sized_deallocation\n        ::operator delete(p, s, std::align_val_t(a));\n#    else\n        ::operator delete(p, std::align_val_t(a));\n#    endif\n        return;\n    }\n#endif\n#ifdef __cpp_sized_deallocation\n    ::operator delete(p, s);\n#else\n    ::operator delete(p);\n#endif\n}\n\ninline void add_class_method(object &cls, const char *name_, const cpp_function &cf) {\n    cls.attr(cf.name()) = cf;\n    if (std::strcmp(name_, \"__eq__\") == 0 && !cls.attr(\"__dict__\").contains(\"__hash__\")) {\n        cls.attr(\"__hash__\") = none();\n    }\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Given a pointer to a member function, cast it to its `Derived` version.\n/// Forward everything else unchanged.\ntemplate <typename /*Derived*/, typename F>\nauto method_adaptor(F &&f) -> decltype(std::forward<F>(f)) {\n    return std::forward<F>(f);\n}\n\ntemplate <typename Derived, typename Return, typename Class, typename... Args>\nauto method_adaptor(Return (Class::*pmf)(Args...)) -> Return (Derived::*)(Args...) {\n    static_assert(\n        detail::is_accessible_base_of<Class, Derived>::value,\n        \"Cannot bind an inaccessible base class method; use a lambda definition instead\");\n    return pmf;\n}\n\ntemplate <typename Derived, typename Return, typename Class, typename... Args>\nauto method_adaptor(Return (Class::*pmf)(Args...) const) -> Return (Derived::*)(Args...) const {\n    static_assert(\n        detail::is_accessible_base_of<Class, Derived>::value,\n        \"Cannot bind an inaccessible base class method; use a lambda definition instead\");\n    return pmf;\n}\n\ntemplate <typename type_, typename... options>\nclass class_ : public detail::generic_type {\n    template <typename T>\n    using is_holder = detail::is_holder_type<type_, T>;\n    template <typename T>\n    using is_subtype = detail::is_strict_base_of<type_, T>;\n    template <typename T>\n    using is_base = detail::is_strict_base_of<T, type_>;\n    // struct instead of using here to help MSVC:\n    template <typename T>\n    struct is_valid_class_option : detail::any_of<is_holder<T>, is_subtype<T>, is_base<T>> {};\n\npublic:\n    using type = type_;\n    using type_alias = detail::exactly_one_t<is_subtype, void, options...>;\n    constexpr static bool has_alias = !std::is_void<type_alias>::value;\n    using holder_type = detail::exactly_one_t<is_holder, std::unique_ptr<type>, options...>;\n\n    static_assert(detail::all_of<is_valid_class_option<options>...>::value,\n                  \"Unknown/invalid class_ template parameters provided\");\n\n    static_assert(!has_alias || std::is_polymorphic<type>::value,\n                  \"Cannot use an alias class with a non-polymorphic type\");\n\n    PYBIND11_OBJECT(class_, generic_type, PyType_Check)\n\n    template <typename... Extra>\n    class_(handle scope, const char *name, const Extra &...extra) {\n        using namespace detail;\n\n        // MI can only be specified via class_ template options, not constructor parameters\n        static_assert(\n            none_of<is_pyobject<Extra>...>::value || // no base class arguments, or:\n                (constexpr_sum(is_pyobject<Extra>::value...) == 1 && // Exactly one base\n                 constexpr_sum(is_base<options>::value...) == 0 &&   // no template option bases\n                 // no multiple_inheritance attr\n                 none_of<std::is_same<multiple_inheritance, Extra>...>::value),\n            \"Error: multiple inheritance bases must be specified via class_ template options\");\n\n        type_record record;\n        record.scope = scope;\n        record.name = name;\n        record.type = &typeid(type);\n        record.type_size = sizeof(conditional_t<has_alias, type_alias, type>);\n        record.type_align = alignof(conditional_t<has_alias, type_alias, type> &);\n        record.holder_size = sizeof(holder_type);\n        record.init_instance = init_instance;\n        record.dealloc = dealloc;\n        record.default_holder = detail::is_instantiation<std::unique_ptr, holder_type>::value;\n\n        set_operator_new<type>(&record);\n\n        /* Register base classes specified via template arguments to class_, if any */\n        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));\n\n        /* Process optional arguments, if any */\n        process_attributes<Extra...>::init(extra..., &record);\n\n        generic_type::initialize(record);\n\n        if (has_alias) {\n            auto &instances = record.module_local ? get_local_internals().registered_types_cpp\n                                                  : get_internals().registered_types_cpp;\n            instances[std::type_index(typeid(type_alias))]\n                = instances[std::type_index(typeid(type))];\n        }\n    }\n\n    template <typename Base, detail::enable_if_t<is_base<Base>::value, int> = 0>\n    static void add_base(detail::type_record &rec) {\n        rec.add_base(typeid(Base), [](void *src) -> void * {\n            return static_cast<Base *>(reinterpret_cast<type *>(src));\n        });\n    }\n\n    template <typename Base, detail::enable_if_t<!is_base<Base>::value, int> = 0>\n    static void add_base(detail::type_record &) {}\n\n    template <typename Func, typename... Extra>\n    class_ &def(const char *name_, Func &&f, const Extra &...extra) {\n        cpp_function cf(method_adaptor<type>(std::forward<Func>(f)),\n                        name(name_),\n                        is_method(*this),\n                        sibling(getattr(*this, name_, none())),\n                        extra...);\n        add_class_method(*this, name_, cf);\n        return *this;\n    }\n\n    template <typename Func, typename... Extra>\n    class_ &def_static(const char *name_, Func &&f, const Extra &...extra) {\n        static_assert(!std::is_member_function_pointer<Func>::value,\n                      \"def_static(...) called with a non-static member function pointer\");\n        cpp_function cf(std::forward<Func>(f),\n                        name(name_),\n                        scope(*this),\n                        sibling(getattr(*this, name_, none())),\n                        extra...);\n        auto cf_name = cf.name();\n        attr(std::move(cf_name)) = staticmethod(std::move(cf));\n        return *this;\n    }\n\n    template <typename T, typename... Extra, detail::enable_if_t<T::op_enable_if_hook, int> = 0>\n    class_ &def(const T &op, const Extra &...extra) {\n        op.execute(*this, extra...);\n        return *this;\n    }\n\n    template <typename T, typename... Extra, detail::enable_if_t<T::op_enable_if_hook, int> = 0>\n    class_ &def_cast(const T &op, const Extra &...extra) {\n        op.execute_cast(*this, extra...);\n        return *this;\n    }\n\n    template <typename... Args, typename... Extra>\n    class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra &...extra) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(init);\n        init.execute(*this, extra...);\n        return *this;\n    }\n\n    template <typename... Args, typename... Extra>\n    class_ &def(const detail::initimpl::alias_constructor<Args...> &init, const Extra &...extra) {\n        PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(init);\n        init.execute(*this, extra...);\n        return *this;\n    }\n\n    template <typename... Args, typename... Extra>\n    class_ &def(detail::initimpl::factory<Args...> &&init, const Extra &...extra) {\n        std::move(init).execute(*this, extra...);\n        return *this;\n    }\n\n    template <typename... Args, typename... Extra>\n    class_ &def(detail::initimpl::pickle_factory<Args...> &&pf, const Extra &...extra) {\n        std::move(pf).execute(*this, extra...);\n        return *this;\n    }\n\n    template <typename Func>\n    class_ &def_buffer(Func &&func) {\n        struct capture {\n            Func func;\n        };\n        auto *ptr = new capture{std::forward<Func>(func)};\n        install_buffer_funcs(\n            [](PyObject *obj, void *ptr) -> buffer_info * {\n                detail::make_caster<type> caster;\n                if (!caster.load(obj, false)) {\n                    return nullptr;\n                }\n                return new buffer_info(((capture *) ptr)->func(std::move(caster)));\n            },\n            ptr);\n        weakref(m_ptr, cpp_function([ptr](handle wr) {\n                    delete ptr;\n                    wr.dec_ref();\n                }))\n            .release();\n        return *this;\n    }\n\n    template <typename Return, typename Class, typename... Args>\n    class_ &def_buffer(Return (Class::*func)(Args...)) {\n        return def_buffer([func](type &obj) { return (obj.*func)(); });\n    }\n\n    template <typename Return, typename Class, typename... Args>\n    class_ &def_buffer(Return (Class::*func)(Args...) const) {\n        return def_buffer([func](const type &obj) { return (obj.*func)(); });\n    }\n\n    template <typename C, typename D, typename... Extra>\n    class_ &def_readwrite(const char *name, D C::*pm, const Extra &...extra) {\n        static_assert(std::is_same<C, type>::value || std::is_base_of<C, type>::value,\n                      \"def_readwrite() requires a class member (or base class member)\");\n        cpp_function fget([pm](const type &c) -> const D & { return c.*pm; }, is_method(*this)),\n            fset([pm](type &c, const D &value) { c.*pm = value; }, is_method(*this));\n        def_property(name, fget, fset, return_value_policy::reference_internal, extra...);\n        return *this;\n    }\n\n    template <typename C, typename D, typename... Extra>\n    class_ &def_readonly(const char *name, const D C::*pm, const Extra &...extra) {\n        static_assert(std::is_same<C, type>::value || std::is_base_of<C, type>::value,\n                      \"def_readonly() requires a class member (or base class member)\");\n        cpp_function fget([pm](const type &c) -> const D & { return c.*pm; }, is_method(*this));\n        def_property_readonly(name, fget, return_value_policy::reference_internal, extra...);\n        return *this;\n    }\n\n    template <typename D, typename... Extra>\n    class_ &def_readwrite_static(const char *name, D *pm, const Extra &...extra) {\n        cpp_function fget([pm](const object &) -> const D & { return *pm; }, scope(*this)),\n            fset([pm](const object &, const D &value) { *pm = value; }, scope(*this));\n        def_property_static(name, fget, fset, return_value_policy::reference, extra...);\n        return *this;\n    }\n\n    template <typename D, typename... Extra>\n    class_ &def_readonly_static(const char *name, const D *pm, const Extra &...extra) {\n        cpp_function fget([pm](const object &) -> const D & { return *pm; }, scope(*this));\n        def_property_readonly_static(name, fget, return_value_policy::reference, extra...);\n        return *this;\n    }\n\n    /// Uses return_value_policy::reference_internal by default\n    template <typename Getter, typename... Extra>\n    class_ &def_property_readonly(const char *name, const Getter &fget, const Extra &...extra) {\n        return def_property_readonly(name,\n                                     cpp_function(method_adaptor<type>(fget)),\n                                     return_value_policy::reference_internal,\n                                     extra...);\n    }\n\n    /// Uses cpp_function's return_value_policy by default\n    template <typename... Extra>\n    class_ &\n    def_property_readonly(const char *name, const cpp_function &fget, const Extra &...extra) {\n        return def_property(name, fget, nullptr, extra...);\n    }\n\n    /// Uses return_value_policy::reference by default\n    template <typename Getter, typename... Extra>\n    class_ &\n    def_property_readonly_static(const char *name, const Getter &fget, const Extra &...extra) {\n        return def_property_readonly_static(\n            name, cpp_function(fget), return_value_policy::reference, extra...);\n    }\n\n    /// Uses cpp_function's return_value_policy by default\n    template <typename... Extra>\n    class_ &def_property_readonly_static(const char *name,\n                                         const cpp_function &fget,\n                                         const Extra &...extra) {\n        return def_property_static(name, fget, nullptr, extra...);\n    }\n\n    /// Uses return_value_policy::reference_internal by default\n    template <typename Getter, typename Setter, typename... Extra>\n    class_ &\n    def_property(const char *name, const Getter &fget, const Setter &fset, const Extra &...extra) {\n        return def_property(\n            name, fget, cpp_function(method_adaptor<type>(fset), is_setter()), extra...);\n    }\n    template <typename Getter, typename... Extra>\n    class_ &def_property(const char *name,\n                         const Getter &fget,\n                         const cpp_function &fset,\n                         const Extra &...extra) {\n        return def_property(name,\n                            cpp_function(method_adaptor<type>(fget)),\n                            fset,\n                            return_value_policy::reference_internal,\n                            extra...);\n    }\n\n    /// Uses cpp_function's return_value_policy by default\n    template <typename... Extra>\n    class_ &def_property(const char *name,\n                         const cpp_function &fget,\n                         const cpp_function &fset,\n                         const Extra &...extra) {\n        return def_property_static(name, fget, fset, is_method(*this), extra...);\n    }\n\n    /// Uses return_value_policy::reference by default\n    template <typename Getter, typename... Extra>\n    class_ &def_property_static(const char *name,\n                                const Getter &fget,\n                                const cpp_function &fset,\n                                const Extra &...extra) {\n        return def_property_static(\n            name, cpp_function(fget), fset, return_value_policy::reference, extra...);\n    }\n\n    /// Uses cpp_function's return_value_policy by default\n    template <typename... Extra>\n    class_ &def_property_static(const char *name,\n                                const cpp_function &fget,\n                                const cpp_function &fset,\n                                const Extra &...extra) {\n        static_assert(0 == detail::constexpr_sum(std::is_base_of<arg, Extra>::value...),\n                      \"Argument annotations are not allowed for properties\");\n        auto rec_fget = get_function_record(fget), rec_fset = get_function_record(fset);\n        auto *rec_active = rec_fget;\n        if (rec_fget) {\n            char *doc_prev = rec_fget->doc; /* 'extra' field may include a property-specific\n                                               documentation string */\n            detail::process_attributes<Extra...>::init(extra..., rec_fget);\n            if (rec_fget->doc && rec_fget->doc != doc_prev) {\n                std::free(doc_prev);\n                rec_fget->doc = PYBIND11_COMPAT_STRDUP(rec_fget->doc);\n            }\n        }\n        if (rec_fset) {\n            char *doc_prev = rec_fset->doc;\n            detail::process_attributes<Extra...>::init(extra..., rec_fset);\n            if (rec_fset->doc && rec_fset->doc != doc_prev) {\n                std::free(doc_prev);\n                rec_fset->doc = PYBIND11_COMPAT_STRDUP(rec_fset->doc);\n            }\n            if (!rec_active) {\n                rec_active = rec_fset;\n            }\n        }\n        def_property_static_impl(name, fget, fset, rec_active);\n        return *this;\n    }\n\nprivate:\n    /// Initialize holder object, variant 1: object derives from enable_shared_from_this\n    template <typename T>\n    static void init_holder(detail::instance *inst,\n                            detail::value_and_holder &v_h,\n                            const holder_type * /* unused */,\n                            const std::enable_shared_from_this<T> * /* dummy */) {\n\n        auto sh = std::dynamic_pointer_cast<typename holder_type::element_type>(\n            detail::try_get_shared_from_this(v_h.value_ptr<type>()));\n        if (sh) {\n            new (std::addressof(v_h.holder<holder_type>())) holder_type(std::move(sh));\n            v_h.set_holder_constructed();\n        }\n\n        if (!v_h.holder_constructed() && inst->owned) {\n            new (std::addressof(v_h.holder<holder_type>())) holder_type(v_h.value_ptr<type>());\n            v_h.set_holder_constructed();\n        }\n    }\n\n    static void init_holder_from_existing(const detail::value_and_holder &v_h,\n                                          const holder_type *holder_ptr,\n                                          std::true_type /*is_copy_constructible*/) {\n        new (std::addressof(v_h.holder<holder_type>()))\n            holder_type(*reinterpret_cast<const holder_type *>(holder_ptr));\n    }\n\n    static void init_holder_from_existing(const detail::value_and_holder &v_h,\n                                          const holder_type *holder_ptr,\n                                          std::false_type /*is_copy_constructible*/) {\n        new (std::addressof(v_h.holder<holder_type>()))\n            holder_type(std::move(*const_cast<holder_type *>(holder_ptr)));\n    }\n\n    /// Initialize holder object, variant 2: try to construct from existing holder object, if\n    /// possible\n    static void init_holder(detail::instance *inst,\n                            detail::value_and_holder &v_h,\n                            const holder_type *holder_ptr,\n                            const void * /* dummy -- not enable_shared_from_this<T>) */) {\n        if (holder_ptr) {\n            init_holder_from_existing(v_h, holder_ptr, std::is_copy_constructible<holder_type>());\n            v_h.set_holder_constructed();\n        } else if (detail::always_construct_holder<holder_type>::value || inst->owned) {\n            new (std::addressof(v_h.holder<holder_type>())) holder_type(v_h.value_ptr<type>());\n            v_h.set_holder_constructed();\n        }\n    }\n\n    /// Performs instance initialization including constructing a holder and registering the known\n    /// instance.  Should be called as soon as the `type` value_ptr is set for an instance.  Takes\n    /// an optional pointer to an existing holder to use; if not specified and the instance is\n    /// `.owned`, a new holder will be constructed to manage the value pointer.\n    static void init_instance(detail::instance *inst, const void *holder_ptr) {\n        auto v_h = inst->get_value_and_holder(detail::get_type_info(typeid(type)));\n        if (!v_h.instance_registered()) {\n            register_instance(inst, v_h.value_ptr(), v_h.type);\n            v_h.set_instance_registered();\n        }\n        init_holder(inst, v_h, (const holder_type *) holder_ptr, v_h.value_ptr<type>());\n    }\n\n    /// Deallocates an instance; via holder, if constructed; otherwise via operator delete.\n    static void dealloc(detail::value_and_holder &v_h) {\n        // We could be deallocating because we are cleaning up after a Python exception.\n        // If so, the Python error indicator will be set. We need to clear that before\n        // running the destructor, in case the destructor code calls more Python.\n        // If we don't, the Python API will exit with an exception, and pybind11 will\n        // throw error_already_set from the C++ destructor which is forbidden and triggers\n        // std::terminate().\n        error_scope scope;\n        if (v_h.holder_constructed()) {\n            v_h.holder<holder_type>().~holder_type();\n            v_h.set_holder_constructed(false);\n        } else {\n            detail::call_operator_delete(\n                v_h.value_ptr<type>(), v_h.type->type_size, v_h.type->type_align);\n        }\n        v_h.value_ptr() = nullptr;\n    }\n\n    static detail::function_record *get_function_record(handle h) {\n        h = detail::get_function(h);\n        if (!h) {\n            return nullptr;\n        }\n\n        handle func_self = PyCFunction_GET_SELF(h.ptr());\n        if (!func_self) {\n            throw error_already_set();\n        }\n        if (!isinstance<capsule>(func_self)) {\n            return nullptr;\n        }\n        auto cap = reinterpret_borrow<capsule>(func_self);\n        if (!detail::is_function_record_capsule(cap)) {\n            return nullptr;\n        }\n        return cap.get_pointer<detail::function_record>();\n    }\n};\n\n/// Binds an existing constructor taking arguments Args...\ntemplate <typename... Args>\ndetail::initimpl::constructor<Args...> init() {\n    return {};\n}\n/// Like `init<Args...>()`, but the instance is always constructed through the alias class (even\n/// when not inheriting on the Python side).\ntemplate <typename... Args>\ndetail::initimpl::alias_constructor<Args...> init_alias() {\n    return {};\n}\n\n/// Binds a factory function as a constructor\ntemplate <typename Func, typename Ret = detail::initimpl::factory<Func>>\nRet init(Func &&f) {\n    return {std::forward<Func>(f)};\n}\n\n/// Dual-argument factory function: the first function is called when no alias is needed, the\n/// second when an alias is needed (i.e. due to python-side inheritance).  Arguments must be\n/// identical.\ntemplate <typename CFunc, typename AFunc, typename Ret = detail::initimpl::factory<CFunc, AFunc>>\nRet init(CFunc &&c, AFunc &&a) {\n    return {std::forward<CFunc>(c), std::forward<AFunc>(a)};\n}\n\n/// Binds pickling functions `__getstate__` and `__setstate__` and ensures that the type\n/// returned by `__getstate__` is the same as the argument accepted by `__setstate__`.\ntemplate <typename GetState, typename SetState>\ndetail::initimpl::pickle_factory<GetState, SetState> pickle(GetState &&g, SetState &&s) {\n    return {std::forward<GetState>(g), std::forward<SetState>(s)};\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ninline str enum_name(handle arg) {\n    dict entries = arg.get_type().attr(\"__entries\");\n    for (auto kv : entries) {\n        if (handle(kv.second[int_(0)]).equal(arg)) {\n            return pybind11::str(kv.first);\n        }\n    }\n    return \"???\";\n}\n\nstruct enum_base {\n    enum_base(const handle &base, const handle &parent) : m_base(base), m_parent(parent) {}\n\n    PYBIND11_NOINLINE void init(bool is_arithmetic, bool is_convertible) {\n        m_base.attr(\"__entries\") = dict();\n        auto property = handle((PyObject *) &PyProperty_Type);\n        auto static_property = handle((PyObject *) get_internals().static_property_type);\n\n        m_base.attr(\"__repr__\") = cpp_function(\n            [](const object &arg) -> str {\n                handle type = type::handle_of(arg);\n                object type_name = type.attr(\"__name__\");\n                return pybind11::str(\"<{}.{}: {}>\")\n                    .format(std::move(type_name), enum_name(arg), int_(arg));\n            },\n            name(\"__repr__\"),\n            is_method(m_base));\n\n        m_base.attr(\"name\") = property(cpp_function(&enum_name, name(\"name\"), is_method(m_base)));\n\n        m_base.attr(\"__str__\") = cpp_function(\n            [](handle arg) -> str {\n                object type_name = type::handle_of(arg).attr(\"__name__\");\n                return pybind11::str(\"{}.{}\").format(std::move(type_name), enum_name(arg));\n            },\n            name(\"name\"),\n            is_method(m_base));\n\n        if (options::show_enum_members_docstring()) {\n            m_base.attr(\"__doc__\") = static_property(\n                cpp_function(\n                    [](handle arg) -> std::string {\n                        std::string docstring;\n                        dict entries = arg.attr(\"__entries\");\n                        if (((PyTypeObject *) arg.ptr())->tp_doc) {\n                            docstring += std::string(\n                                reinterpret_cast<PyTypeObject *>(arg.ptr())->tp_doc);\n                            docstring += \"\\n\\n\";\n                        }\n                        docstring += \"Members:\";\n                        for (auto kv : entries) {\n                            auto key = std::string(pybind11::str(kv.first));\n                            auto comment = kv.second[int_(1)];\n                            docstring += \"\\n\\n  \";\n                            docstring += key;\n                            if (!comment.is_none()) {\n                                docstring += \" : \";\n                                docstring += pybind11::str(comment).cast<std::string>();\n                            }\n                        }\n                        return docstring;\n                    },\n                    name(\"__doc__\")),\n                none(),\n                none(),\n                \"\");\n        }\n\n        m_base.attr(\"__members__\") = static_property(cpp_function(\n                                                         [](handle arg) -> dict {\n                                                             dict entries = arg.attr(\"__entries\"),\n                                                                  m;\n                                                             for (auto kv : entries) {\n                                                                 m[kv.first] = kv.second[int_(0)];\n                                                             }\n                                                             return m;\n                                                         },\n                                                         name(\"__members__\")),\n                                                     none(),\n                                                     none(),\n                                                     \"\");\n\n#define PYBIND11_ENUM_OP_STRICT(op, expr, strict_behavior)                                        \\\n    m_base.attr(op) = cpp_function(                                                               \\\n        [](const object &a, const object &b) {                                                    \\\n            if (!type::handle_of(a).is(type::handle_of(b)))                                       \\\n                strict_behavior; /* NOLINT(bugprone-macro-parentheses) */                         \\\n            return expr;                                                                          \\\n        },                                                                                        \\\n        name(op),                                                                                 \\\n        is_method(m_base),                                                                        \\\n        arg(\"other\"))\n\n#define PYBIND11_ENUM_OP_CONV(op, expr)                                                           \\\n    m_base.attr(op) = cpp_function(                                                               \\\n        [](const object &a_, const object &b_) {                                                  \\\n            int_ a(a_), b(b_);                                                                    \\\n            return expr;                                                                          \\\n        },                                                                                        \\\n        name(op),                                                                                 \\\n        is_method(m_base),                                                                        \\\n        arg(\"other\"))\n\n#define PYBIND11_ENUM_OP_CONV_LHS(op, expr)                                                       \\\n    m_base.attr(op) = cpp_function(                                                               \\\n        [](const object &a_, const object &b) {                                                   \\\n            int_ a(a_);                                                                           \\\n            return expr;                                                                          \\\n        },                                                                                        \\\n        name(op),                                                                                 \\\n        is_method(m_base),                                                                        \\\n        arg(\"other\"))\n\n        if (is_convertible) {\n            PYBIND11_ENUM_OP_CONV_LHS(\"__eq__\", !b.is_none() && a.equal(b));\n            PYBIND11_ENUM_OP_CONV_LHS(\"__ne__\", b.is_none() || !a.equal(b));\n\n            if (is_arithmetic) {\n                PYBIND11_ENUM_OP_CONV(\"__lt__\", a < b);\n                PYBIND11_ENUM_OP_CONV(\"__gt__\", a > b);\n                PYBIND11_ENUM_OP_CONV(\"__le__\", a <= b);\n                PYBIND11_ENUM_OP_CONV(\"__ge__\", a >= b);\n                PYBIND11_ENUM_OP_CONV(\"__and__\", a & b);\n                PYBIND11_ENUM_OP_CONV(\"__rand__\", a & b);\n                PYBIND11_ENUM_OP_CONV(\"__or__\", a | b);\n                PYBIND11_ENUM_OP_CONV(\"__ror__\", a | b);\n                PYBIND11_ENUM_OP_CONV(\"__xor__\", a ^ b);\n                PYBIND11_ENUM_OP_CONV(\"__rxor__\", a ^ b);\n                m_base.attr(\"__invert__\")\n                    = cpp_function([](const object &arg) { return ~(int_(arg)); },\n                                   name(\"__invert__\"),\n                                   is_method(m_base));\n            }\n        } else {\n            PYBIND11_ENUM_OP_STRICT(\"__eq__\", int_(a).equal(int_(b)), return false);\n            PYBIND11_ENUM_OP_STRICT(\"__ne__\", !int_(a).equal(int_(b)), return true);\n\n            if (is_arithmetic) {\n#define PYBIND11_THROW throw type_error(\"Expected an enumeration of matching type!\");\n                PYBIND11_ENUM_OP_STRICT(\"__lt__\", int_(a) < int_(b), PYBIND11_THROW);\n                PYBIND11_ENUM_OP_STRICT(\"__gt__\", int_(a) > int_(b), PYBIND11_THROW);\n                PYBIND11_ENUM_OP_STRICT(\"__le__\", int_(a) <= int_(b), PYBIND11_THROW);\n                PYBIND11_ENUM_OP_STRICT(\"__ge__\", int_(a) >= int_(b), PYBIND11_THROW);\n#undef PYBIND11_THROW\n            }\n        }\n\n#undef PYBIND11_ENUM_OP_CONV_LHS\n#undef PYBIND11_ENUM_OP_CONV\n#undef PYBIND11_ENUM_OP_STRICT\n\n        m_base.attr(\"__getstate__\") = cpp_function(\n            [](const object &arg) { return int_(arg); }, name(\"__getstate__\"), is_method(m_base));\n\n        m_base.attr(\"__hash__\") = cpp_function(\n            [](const object &arg) { return int_(arg); }, name(\"__hash__\"), is_method(m_base));\n    }\n\n    PYBIND11_NOINLINE void value(char const *name_, object value, const char *doc = nullptr) {\n        dict entries = m_base.attr(\"__entries\");\n        str name(name_);\n        if (entries.contains(name)) {\n            std::string type_name = (std::string) str(m_base.attr(\"__name__\"));\n            throw value_error(std::move(type_name) + \": element \\\"\" + std::string(name_)\n                              + \"\\\" already exists!\");\n        }\n\n        entries[name] = pybind11::make_tuple(value, doc);\n        m_base.attr(std::move(name)) = std::move(value);\n    }\n\n    PYBIND11_NOINLINE void export_values() {\n        dict entries = m_base.attr(\"__entries\");\n        for (auto kv : entries) {\n            m_parent.attr(kv.first) = kv.second[int_(0)];\n        }\n    }\n\n    handle m_base;\n    handle m_parent;\n};\n\ntemplate <bool is_signed, size_t length>\nstruct equivalent_integer {};\ntemplate <>\nstruct equivalent_integer<true, 1> {\n    using type = int8_t;\n};\ntemplate <>\nstruct equivalent_integer<false, 1> {\n    using type = uint8_t;\n};\ntemplate <>\nstruct equivalent_integer<true, 2> {\n    using type = int16_t;\n};\ntemplate <>\nstruct equivalent_integer<false, 2> {\n    using type = uint16_t;\n};\ntemplate <>\nstruct equivalent_integer<true, 4> {\n    using type = int32_t;\n};\ntemplate <>\nstruct equivalent_integer<false, 4> {\n    using type = uint32_t;\n};\ntemplate <>\nstruct equivalent_integer<true, 8> {\n    using type = int64_t;\n};\ntemplate <>\nstruct equivalent_integer<false, 8> {\n    using type = uint64_t;\n};\n\ntemplate <typename IntLike>\nusing equivalent_integer_t =\n    typename equivalent_integer<std::is_signed<IntLike>::value, sizeof(IntLike)>::type;\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Binds C++ enumerations and enumeration classes to Python\ntemplate <typename Type>\nclass enum_ : public class_<Type> {\npublic:\n    using Base = class_<Type>;\n    using Base::attr;\n    using Base::def;\n    using Base::def_property_readonly;\n    using Base::def_property_readonly_static;\n    using Underlying = typename std::underlying_type<Type>::type;\n    // Scalar is the integer representation of underlying type\n    using Scalar = detail::conditional_t<detail::any_of<detail::is_std_char_type<Underlying>,\n                                                        std::is_same<Underlying, bool>>::value,\n                                         detail::equivalent_integer_t<Underlying>,\n                                         Underlying>;\n\n    template <typename... Extra>\n    enum_(const handle &scope, const char *name, const Extra &...extra)\n        : class_<Type>(scope, name, extra...), m_base(*this, scope) {\n        constexpr bool is_arithmetic = detail::any_of<std::is_same<arithmetic, Extra>...>::value;\n        constexpr bool is_convertible = std::is_convertible<Type, Underlying>::value;\n        m_base.init(is_arithmetic, is_convertible);\n\n        def(init([](Scalar i) { return static_cast<Type>(i); }), arg(\"value\"));\n        def_property_readonly(\"value\", [](Type value) { return (Scalar) value; });\n        def(\"__int__\", [](Type value) { return (Scalar) value; });\n        def(\"__index__\", [](Type value) { return (Scalar) value; });\n        attr(\"__setstate__\") = cpp_function(\n            [](detail::value_and_holder &v_h, Scalar arg) {\n                detail::initimpl::setstate<Base>(\n                    v_h, static_cast<Type>(arg), Py_TYPE(v_h.inst) != v_h.type->type);\n            },\n            detail::is_new_style_constructor(),\n            pybind11::name(\"__setstate__\"),\n            is_method(*this),\n            arg(\"state\"));\n    }\n\n    /// Export enumeration entries into the parent scope\n    enum_ &export_values() {\n        m_base.export_values();\n        return *this;\n    }\n\n    /// Add an enumeration entry\n    enum_ &value(char const *name, Type value, const char *doc = nullptr) {\n        m_base.value(name, pybind11::cast(value, return_value_policy::copy), doc);\n        return *this;\n    }\n\nprivate:\n    detail::enum_base m_base;\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\nPYBIND11_NOINLINE void keep_alive_impl(handle nurse, handle patient) {\n    if (!nurse || !patient) {\n        pybind11_fail(\"Could not activate keep_alive!\");\n    }\n\n    if (patient.is_none() || nurse.is_none()) {\n        return; /* Nothing to keep alive or nothing to be kept alive by */\n    }\n\n    auto tinfo = all_type_info(Py_TYPE(nurse.ptr()));\n    if (!tinfo.empty()) {\n        /* It's a pybind-registered type, so we can store the patient in the\n         * internal list. */\n        add_patient(nurse.ptr(), patient.ptr());\n    } else {\n        /* Fall back to clever approach based on weak references taken from\n         * Boost.Python. This is not used for pybind-registered types because\n         * the objects can be destroyed out-of-order in a GC pass. */\n        cpp_function disable_lifesupport([patient](handle weakref) {\n            patient.dec_ref();\n            weakref.dec_ref();\n        });\n\n        weakref wr(nurse, disable_lifesupport);\n\n        patient.inc_ref(); /* reference patient and leak the weak reference */\n        (void) wr.release();\n    }\n}\n\nPYBIND11_NOINLINE void\nkeep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret) {\n    auto get_arg = [&](size_t n) {\n        if (n == 0) {\n            return ret;\n        }\n        if (n == 1 && call.init_self) {\n            return call.init_self;\n        }\n        if (n <= call.args.size()) {\n            return call.args[n - 1];\n        }\n        return handle();\n    };\n\n    keep_alive_impl(get_arg(Nurse), get_arg(Patient));\n}\n\ninline std::pair<decltype(internals::registered_types_py)::iterator, bool>\nall_type_info_get_cache(PyTypeObject *type) {\n    auto res = get_internals()\n                   .registered_types_py\n#ifdef __cpp_lib_unordered_map_try_emplace\n                   .try_emplace(type);\n#else\n                   .emplace(type, std::vector<detail::type_info *>());\n#endif\n    if (res.second) {\n        // New cache entry created; set up a weak reference to automatically remove it if the type\n        // gets destroyed:\n        weakref((PyObject *) type, cpp_function([type](handle wr) {\n                    get_internals().registered_types_py.erase(type);\n\n                    // TODO consolidate the erasure code in pybind11_meta_dealloc() in class.h\n                    auto &cache = get_internals().inactive_override_cache;\n                    for (auto it = cache.begin(), last = cache.end(); it != last;) {\n                        if (it->first == reinterpret_cast<PyObject *>(type)) {\n                            it = cache.erase(it);\n                        } else {\n                            ++it;\n                        }\n                    }\n\n                    wr.dec_ref();\n                }))\n            .release();\n    }\n\n    return res;\n}\n\n/* There are a large number of apparently unused template arguments because\n * each combination requires a separate py::class_ registration.\n */\ntemplate <typename Access,\n          return_value_policy Policy,\n          typename Iterator,\n          typename Sentinel,\n          typename ValueType,\n          typename... Extra>\nstruct iterator_state {\n    Iterator it;\n    Sentinel end;\n    bool first_or_done;\n};\n\n// Note: these helpers take the iterator by non-const reference because some\n// iterators in the wild can't be dereferenced when const. The & after Iterator\n// is required for MSVC < 16.9. SFINAE cannot be reused for result_type due to\n// bugs in ICC, NVCC, and PGI compilers. See PR #3293.\ntemplate <typename Iterator, typename SFINAE = decltype(*std::declval<Iterator &>())>\nstruct iterator_access {\n    using result_type = decltype(*std::declval<Iterator &>());\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    result_type operator()(Iterator &it) const { return *it; }\n};\n\ntemplate <typename Iterator, typename SFINAE = decltype((*std::declval<Iterator &>()).first)>\nclass iterator_key_access {\nprivate:\n    using pair_type = decltype(*std::declval<Iterator &>());\n\npublic:\n    /* If either the pair itself or the element of the pair is a reference, we\n     * want to return a reference, otherwise a value. When the decltype\n     * expression is parenthesized it is based on the value category of the\n     * expression; otherwise it is the declared type of the pair member.\n     * The use of declval<pair_type> in the second branch rather than directly\n     * using *std::declval<Iterator &>() is a workaround for nvcc\n     * (it's not used in the first branch because going via decltype and back\n     * through declval does not perfectly preserve references).\n     */\n    using result_type\n        = conditional_t<std::is_reference<decltype(*std::declval<Iterator &>())>::value,\n                        decltype(((*std::declval<Iterator &>()).first)),\n                        decltype(std::declval<pair_type>().first)>;\n    result_type operator()(Iterator &it) const { return (*it).first; }\n};\n\ntemplate <typename Iterator, typename SFINAE = decltype((*std::declval<Iterator &>()).second)>\nclass iterator_value_access {\nprivate:\n    using pair_type = decltype(*std::declval<Iterator &>());\n\npublic:\n    using result_type\n        = conditional_t<std::is_reference<decltype(*std::declval<Iterator &>())>::value,\n                        decltype(((*std::declval<Iterator &>()).second)),\n                        decltype(std::declval<pair_type>().second)>;\n    result_type operator()(Iterator &it) const { return (*it).second; }\n};\n\ntemplate <typename Access,\n          return_value_policy Policy,\n          typename Iterator,\n          typename Sentinel,\n          typename ValueType,\n          typename... Extra>\niterator make_iterator_impl(Iterator first, Sentinel last, Extra &&...extra) {\n    using state = detail::iterator_state<Access, Policy, Iterator, Sentinel, ValueType, Extra...>;\n    // TODO: state captures only the types of Extra, not the values\n\n    if (!detail::get_type_info(typeid(state), false)) {\n        class_<state>(handle(), \"iterator\", pybind11::module_local())\n            .def(\"__iter__\", [](state &s) -> state & { return s; })\n            .def(\n                \"__next__\",\n                [](state &s) -> ValueType {\n                    if (!s.first_or_done) {\n                        ++s.it;\n                    } else {\n                        s.first_or_done = false;\n                    }\n                    if (s.it == s.end) {\n                        s.first_or_done = true;\n                        throw stop_iteration();\n                    }\n                    return Access()(s.it);\n                    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n                },\n                std::forward<Extra>(extra)...,\n                Policy);\n    }\n\n    return cast(state{first, last, true});\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Makes a python iterator from a first and past-the-end C++ InputIterator.\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Iterator,\n          typename Sentinel,\n          typename ValueType = typename detail::iterator_access<Iterator>::result_type,\n          typename... Extra>\niterator make_iterator(Iterator first, Sentinel last, Extra &&...extra) {\n    return detail::make_iterator_impl<detail::iterator_access<Iterator>,\n                                      Policy,\n                                      Iterator,\n                                      Sentinel,\n                                      ValueType,\n                                      Extra...>(first, last, std::forward<Extra>(extra)...);\n}\n\n/// Makes a python iterator over the keys (`.first`) of a iterator over pairs from a\n/// first and past-the-end InputIterator.\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Iterator,\n          typename Sentinel,\n          typename KeyType = typename detail::iterator_key_access<Iterator>::result_type,\n          typename... Extra>\niterator make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {\n    return detail::make_iterator_impl<detail::iterator_key_access<Iterator>,\n                                      Policy,\n                                      Iterator,\n                                      Sentinel,\n                                      KeyType,\n                                      Extra...>(first, last, std::forward<Extra>(extra)...);\n}\n\n/// Makes a python iterator over the values (`.second`) of a iterator over pairs from a\n/// first and past-the-end InputIterator.\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Iterator,\n          typename Sentinel,\n          typename ValueType = typename detail::iterator_value_access<Iterator>::result_type,\n          typename... Extra>\niterator make_value_iterator(Iterator first, Sentinel last, Extra &&...extra) {\n    return detail::make_iterator_impl<detail::iterator_value_access<Iterator>,\n                                      Policy,\n                                      Iterator,\n                                      Sentinel,\n                                      ValueType,\n                                      Extra...>(first, last, std::forward<Extra>(extra)...);\n}\n\n/// Makes an iterator over values of an stl container or other container supporting\n/// `std::begin()`/`std::end()`\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Type,\n          typename... Extra>\niterator make_iterator(Type &value, Extra &&...extra) {\n    return make_iterator<Policy>(\n        std::begin(value), std::end(value), std::forward<Extra>(extra)...);\n}\n\n/// Makes an iterator over the keys (`.first`) of a stl map-like container supporting\n/// `std::begin()`/`std::end()`\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Type,\n          typename... Extra>\niterator make_key_iterator(Type &value, Extra &&...extra) {\n    return make_key_iterator<Policy>(\n        std::begin(value), std::end(value), std::forward<Extra>(extra)...);\n}\n\n/// Makes an iterator over the values (`.second`) of a stl map-like container supporting\n/// `std::begin()`/`std::end()`\ntemplate <return_value_policy Policy = return_value_policy::reference_internal,\n          typename Type,\n          typename... Extra>\niterator make_value_iterator(Type &value, Extra &&...extra) {\n    return make_value_iterator<Policy>(\n        std::begin(value), std::end(value), std::forward<Extra>(extra)...);\n}\n\ntemplate <typename InputType, typename OutputType>\nvoid implicitly_convertible() {\n    struct set_flag {\n        bool &flag;\n        explicit set_flag(bool &flag_) : flag(flag_) { flag_ = true; }\n        ~set_flag() { flag = false; }\n    };\n    auto implicit_caster = [](PyObject *obj, PyTypeObject *type) -> PyObject * {\n        static bool currently_used = false;\n        if (currently_used) { // implicit conversions are non-reentrant\n            return nullptr;\n        }\n        set_flag flag_helper(currently_used);\n        if (!detail::make_caster<InputType>().load(obj, false)) {\n            return nullptr;\n        }\n        tuple args(1);\n        args[0] = obj;\n        PyObject *result = PyObject_Call((PyObject *) type, args.ptr(), nullptr);\n        if (result == nullptr) {\n            PyErr_Clear();\n        }\n        return result;\n    };\n\n    if (auto *tinfo = detail::get_type_info(typeid(OutputType))) {\n        tinfo->implicit_conversions.emplace_back(std::move(implicit_caster));\n    } else {\n        pybind11_fail(\"implicitly_convertible: Unable to find type \" + type_id<OutputType>());\n    }\n}\n\ninline void register_exception_translator(ExceptionTranslator &&translator) {\n    detail::get_internals().registered_exception_translators.push_front(\n        std::forward<ExceptionTranslator>(translator));\n}\n\n/**\n * Add a new module-local exception translator. Locally registered functions\n * will be tried before any globally registered exception translators, which\n * will only be invoked if the module-local handlers do not deal with\n * the exception.\n */\ninline void register_local_exception_translator(ExceptionTranslator &&translator) {\n    detail::get_local_internals().registered_exception_translators.push_front(\n        std::forward<ExceptionTranslator>(translator));\n}\n\n/**\n * Wrapper to generate a new Python exception type.\n *\n * This should only be used with PyErr_SetString for now.\n * It is not (yet) possible to use as a py::base.\n * Template type argument is reserved for future use.\n */\ntemplate <typename type>\nclass exception : public object {\npublic:\n    exception() = default;\n    exception(handle scope, const char *name, handle base = PyExc_Exception) {\n        std::string full_name\n            = scope.attr(\"__name__\").cast<std::string>() + std::string(\".\") + name;\n        m_ptr = PyErr_NewException(const_cast<char *>(full_name.c_str()), base.ptr(), nullptr);\n        if (hasattr(scope, \"__dict__\") && scope.attr(\"__dict__\").contains(name)) {\n            pybind11_fail(\"Error during initialization: multiple incompatible \"\n                          \"definitions with name \\\"\"\n                          + std::string(name) + \"\\\"\");\n        }\n        scope.attr(name) = *this;\n    }\n\n    // Sets the current python exception to this exception object with the given message\n    void operator()(const char *message) { PyErr_SetString(m_ptr, message); }\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n// Returns a reference to a function-local static exception object used in the simple\n// register_exception approach below.  (It would be simpler to have the static local variable\n// directly in register_exception, but that makes clang <3.5 segfault - issue #1349).\ntemplate <typename CppException>\nexception<CppException> &get_exception_object() {\n    static exception<CppException> ex;\n    return ex;\n}\n\n// Helper function for register_exception and register_local_exception\ntemplate <typename CppException>\nexception<CppException> &\nregister_exception_impl(handle scope, const char *name, handle base, bool isLocal) {\n    auto &ex = detail::get_exception_object<CppException>();\n    if (!ex) {\n        ex = exception<CppException>(scope, name, base);\n    }\n\n    auto register_func\n        = isLocal ? &register_local_exception_translator : &register_exception_translator;\n\n    register_func([](std::exception_ptr p) {\n        if (!p) {\n            return;\n        }\n        try {\n            std::rethrow_exception(p);\n        } catch (const CppException &e) {\n            detail::get_exception_object<CppException>()(e.what());\n        }\n    });\n    return ex;\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/**\n * Registers a Python exception in `m` of the given `name` and installs a translator to\n * translate the C++ exception to the created Python exception using the what() method.\n * This is intended for simple exception translations; for more complex translation, register the\n * exception object and translator directly.\n */\ntemplate <typename CppException>\nexception<CppException> &\nregister_exception(handle scope, const char *name, handle base = PyExc_Exception) {\n    return detail::register_exception_impl<CppException>(scope, name, base, false /* isLocal */);\n}\n\n/**\n * Registers a Python exception in `m` of the given `name` and installs a translator to\n * translate the C++ exception to the created Python exception using the what() method.\n * This translator will only be used for exceptions that are thrown in this module and will be\n * tried before global exception translators, including those registered with register_exception.\n * This is intended for simple exception translations; for more complex translation, register the\n * exception object and translator directly.\n */\ntemplate <typename CppException>\nexception<CppException> &\nregister_local_exception(handle scope, const char *name, handle base = PyExc_Exception) {\n    return detail::register_exception_impl<CppException>(scope, name, base, true /* isLocal */);\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\nPYBIND11_NOINLINE void print(const tuple &args, const dict &kwargs) {\n    auto strings = tuple(args.size());\n    for (size_t i = 0; i < args.size(); ++i) {\n        strings[i] = str(args[i]);\n    }\n    auto sep = kwargs.contains(\"sep\") ? kwargs[\"sep\"] : str(\" \");\n    auto line = sep.attr(\"join\")(std::move(strings));\n\n    object file;\n    if (kwargs.contains(\"file\")) {\n        file = kwargs[\"file\"].cast<object>();\n    } else {\n        try {\n            file = module_::import(\"sys\").attr(\"stdout\");\n        } catch (const error_already_set &) {\n            /* If print() is called from code that is executed as\n               part of garbage collection during interpreter shutdown,\n               importing 'sys' can fail. Give up rather than crashing the\n               interpreter in this case. */\n            return;\n        }\n    }\n\n    auto write = file.attr(\"write\");\n    write(std::move(line));\n    write(kwargs.contains(\"end\") ? kwargs[\"end\"] : str(\"\\n\"));\n\n    if (kwargs.contains(\"flush\") && kwargs[\"flush\"].cast<bool>()) {\n        file.attr(\"flush\")();\n    }\n}\nPYBIND11_NAMESPACE_END(detail)\n\ntemplate <return_value_policy policy = return_value_policy::automatic_reference, typename... Args>\nvoid print(Args &&...args) {\n    auto c = detail::collect_arguments<policy>(std::forward<Args>(args)...);\n    detail::print(c.args(), c.kwargs());\n}\n\ninline void\nerror_already_set::m_fetched_error_deleter(detail::error_fetch_and_normalize *raw_ptr) {\n    gil_scoped_acquire gil;\n    error_scope scope;\n    delete raw_ptr;\n}\n\ninline const char *error_already_set::what() const noexcept {\n    gil_scoped_acquire gil;\n    error_scope scope;\n    return m_fetched_error->error_string().c_str();\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ninline function\nget_type_override(const void *this_ptr, const type_info *this_type, const char *name) {\n    handle self = get_object_handle(this_ptr, this_type);\n    if (!self) {\n        return function();\n    }\n    handle type = type::handle_of(self);\n    auto key = std::make_pair(type.ptr(), name);\n\n    /* Cache functions that aren't overridden in Python to avoid\n       many costly Python dictionary lookups below */\n    auto &cache = get_internals().inactive_override_cache;\n    if (cache.find(key) != cache.end()) {\n        return function();\n    }\n\n    function override = getattr(self, name, function());\n    if (override.is_cpp_function()) {\n        cache.insert(std::move(key));\n        return function();\n    }\n\n    /* Don't call dispatch code if invoked from overridden function.\n       Unfortunately this doesn't work on PyPy. */\n#if !defined(PYPY_VERSION)\n#    if PY_VERSION_HEX >= 0x03090000\n    PyFrameObject *frame = PyThreadState_GetFrame(PyThreadState_Get());\n    if (frame != nullptr) {\n        PyCodeObject *f_code = PyFrame_GetCode(frame);\n        // f_code is guaranteed to not be NULL\n        if ((std::string) str(f_code->co_name) == name && f_code->co_argcount > 0) {\n            PyObject *locals = PyEval_GetLocals();\n            if (locals != nullptr) {\n                PyObject *co_varnames = PyObject_GetAttrString((PyObject *) f_code, \"co_varnames\");\n                PyObject *self_arg = PyTuple_GET_ITEM(co_varnames, 0);\n                Py_DECREF(co_varnames);\n                PyObject *self_caller = dict_getitem(locals, self_arg);\n                if (self_caller == self.ptr()) {\n                    Py_DECREF(f_code);\n                    Py_DECREF(frame);\n                    return function();\n                }\n            }\n        }\n        Py_DECREF(f_code);\n        Py_DECREF(frame);\n    }\n#    else\n    PyFrameObject *frame = PyThreadState_Get()->frame;\n    if (frame != nullptr && (std::string) str(frame->f_code->co_name) == name\n        && frame->f_code->co_argcount > 0) {\n        PyFrame_FastToLocals(frame);\n        PyObject *self_caller\n            = dict_getitem(frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));\n        if (self_caller == self.ptr()) {\n            return function();\n        }\n    }\n#    endif\n\n#else\n    /* PyPy currently doesn't provide a detailed cpyext emulation of\n       frame objects, so we have to emulate this using Python. This\n       is going to be slow..*/\n    dict d;\n    d[\"self\"] = self;\n    d[\"name\"] = pybind11::str(name);\n    PyObject *result\n        = PyRun_String(\"import inspect\\n\"\n                       \"frame = inspect.currentframe()\\n\"\n                       \"if frame is not None:\\n\"\n                       \"    frame = frame.f_back\\n\"\n                       \"    if frame is not None and str(frame.f_code.co_name) == name and \"\n                       \"frame.f_code.co_argcount > 0:\\n\"\n                       \"        self_caller = frame.f_locals[frame.f_code.co_varnames[0]]\\n\"\n                       \"        if self_caller == self:\\n\"\n                       \"            self = None\\n\",\n                       Py_file_input,\n                       d.ptr(),\n                       d.ptr());\n    if (result == nullptr)\n        throw error_already_set();\n    Py_DECREF(result);\n    if (d[\"self\"].is_none())\n        return function();\n#endif\n\n    return override;\n}\nPYBIND11_NAMESPACE_END(detail)\n\n/** \\rst\n  Try to retrieve a python method by the provided name from the instance pointed to by the\n  this_ptr.\n\n  :this_ptr: The pointer to the object the overridden method should be retrieved for. This should\n             be the first non-trampoline class encountered in the inheritance chain.\n  :name: The name of the overridden Python method to retrieve.\n  :return: The Python method by this name from the object or an empty function wrapper.\n \\endrst */\ntemplate <class T>\nfunction get_override(const T *this_ptr, const char *name) {\n    auto *tinfo = detail::get_type_info(typeid(T));\n    return tinfo ? detail::get_type_override(this_ptr, tinfo, name) : function();\n}\n\n#define PYBIND11_OVERRIDE_IMPL(ret_type, cname, name, ...)                                        \\\n    do {                                                                                          \\\n        pybind11::gil_scoped_acquire gil;                                                         \\\n        pybind11::function override                                                               \\\n            = pybind11::get_override(static_cast<const cname *>(this), name);                     \\\n        if (override) {                                                                           \\\n            auto o = override(__VA_ARGS__);                                                       \\\n            if (pybind11::detail::cast_is_temporary_value_reference<ret_type>::value) {           \\\n                static pybind11::detail::override_caster_t<ret_type> caster;                      \\\n                return pybind11::detail::cast_ref<ret_type>(std::move(o), caster);                \\\n            }                                                                                     \\\n            return pybind11::detail::cast_safe<ret_type>(std::move(o));                           \\\n        }                                                                                         \\\n    } while (false)\n\n/** \\rst\n    Macro to populate the virtual method in the trampoline class. This macro tries to look up a\n    method named 'fn' from the Python side, deals with the :ref:`gil` and necessary argument\n    conversions to call this method and return the appropriate type.\n    See :ref:`overriding_virtuals` for more information. This macro should be used when the method\n    name in C is not the same as the method name in Python. For example with `__str__`.\n\n    .. code-block:: cpp\n\n      std::string toString() override {\n        PYBIND11_OVERRIDE_NAME(\n            std::string, // Return type (ret_type)\n            Animal,      // Parent class (cname)\n            \"__str__\",   // Name of method in Python (name)\n            toString,    // Name of function in C++ (fn)\n        );\n      }\n\\endrst */\n#define PYBIND11_OVERRIDE_NAME(ret_type, cname, name, fn, ...)                                    \\\n    do {                                                                                          \\\n        PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__); \\\n        return cname::fn(__VA_ARGS__);                                                            \\\n    } while (false)\n\n/** \\rst\n    Macro for pure virtual functions, this function is identical to\n    :c:macro:`PYBIND11_OVERRIDE_NAME`, except that it throws if no override can be found.\n\\endrst */\n#define PYBIND11_OVERRIDE_PURE_NAME(ret_type, cname, name, fn, ...)                               \\\n    do {                                                                                          \\\n        PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__); \\\n        pybind11::pybind11_fail(                                                                  \\\n            \"Tried to call pure virtual function \\\"\" PYBIND11_STRINGIFY(cname) \"::\" name \"\\\"\");   \\\n    } while (false)\n\n/** \\rst\n    Macro to populate the virtual method in the trampoline class. This macro tries to look up the\n    method from the Python side, deals with the :ref:`gil` and necessary argument conversions to\n    call this method and return the appropriate type. This macro should be used if the method name\n    in C and in Python are identical.\n    See :ref:`overriding_virtuals` for more information.\n\n    .. code-block:: cpp\n\n      class PyAnimal : public Animal {\n      public:\n          // Inherit the constructors\n          using Animal::Animal;\n\n          // Trampoline (need one for each virtual function)\n          std::string go(int n_times) override {\n              PYBIND11_OVERRIDE_PURE(\n                  std::string, // Return type (ret_type)\n                  Animal,      // Parent class (cname)\n                  go,          // Name of function in C++ (must match Python name) (fn)\n                  n_times      // Argument(s) (...)\n              );\n          }\n      };\n\\endrst */\n#define PYBIND11_OVERRIDE(ret_type, cname, fn, ...)                                               \\\n    PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)\n\n/** \\rst\n    Macro for pure virtual functions, this function is identical to :c:macro:`PYBIND11_OVERRIDE`,\n    except that it throws if no override can be found.\n\\endrst */\n#define PYBIND11_OVERRIDE_PURE(ret_type, cname, fn, ...)                                          \\\n    PYBIND11_OVERRIDE_PURE_NAME(                                                                  \\\n        PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)\n\n// Deprecated versions\n\nPYBIND11_DEPRECATED(\"get_type_overload has been deprecated\")\ninline function\nget_type_overload(const void *this_ptr, const detail::type_info *this_type, const char *name) {\n    return detail::get_type_override(this_ptr, this_type, name);\n}\n\ntemplate <class T>\ninline function get_overload(const T *this_ptr, const char *name) {\n    return get_override(this_ptr, name);\n}\n\n#define PYBIND11_OVERLOAD_INT(ret_type, cname, name, ...)                                         \\\n    PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__)\n#define PYBIND11_OVERLOAD_NAME(ret_type, cname, name, fn, ...)                                    \\\n    PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__)\n#define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...)                               \\\n    PYBIND11_OVERRIDE_PURE_NAME(                                                                  \\\n        PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__);\n#define PYBIND11_OVERLOAD(ret_type, cname, fn, ...)                                               \\\n    PYBIND11_OVERRIDE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__)\n#define PYBIND11_OVERLOAD_PURE(ret_type, cname, fn, ...)                                          \\\n    PYBIND11_OVERRIDE_PURE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__);\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/pytypes.h",
    "content": "/*\n    pybind11/pytypes.h: Convenience wrapper classes for basic Python types\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"buffer_info.h\"\n\n#include <assert.h>\n#include <cstddef>\n#include <exception>\n#include <frameobject.h>\n#include <iterator>\n#include <memory>\n#include <string>\n#include <type_traits>\n#include <typeinfo>\n#include <utility>\n\n#if defined(PYBIND11_HAS_OPTIONAL)\n#    include <optional>\n#endif\n\n#ifdef PYBIND11_HAS_STRING_VIEW\n#    include <string_view>\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\n\nPYBIND11_WARNING_DISABLE_MSVC(4127)\n\n/* A few forward declarations */\nclass handle;\nclass object;\nclass str;\nclass iterator;\nclass type;\nstruct arg;\nstruct arg_v;\n\nPYBIND11_NAMESPACE_BEGIN(detail)\nclass args_proxy;\nbool isinstance_generic(handle obj, const std::type_info &tp);\n\n// Accessor forward declarations\ntemplate <typename Policy>\nclass accessor;\nnamespace accessor_policies {\nstruct obj_attr;\nstruct str_attr;\nstruct generic_item;\nstruct sequence_item;\nstruct list_item;\nstruct tuple_item;\n} // namespace accessor_policies\nusing obj_attr_accessor = accessor<accessor_policies::obj_attr>;\nusing str_attr_accessor = accessor<accessor_policies::str_attr>;\nusing item_accessor = accessor<accessor_policies::generic_item>;\nusing sequence_accessor = accessor<accessor_policies::sequence_item>;\nusing list_accessor = accessor<accessor_policies::list_item>;\nusing tuple_accessor = accessor<accessor_policies::tuple_item>;\n\n/// Tag and check to identify a class which implements the Python object API\nclass pyobject_tag {};\ntemplate <typename T>\nusing is_pyobject = std::is_base_of<pyobject_tag, remove_reference_t<T>>;\n\n/** \\rst\n    A mixin class which adds common functions to `handle`, `object` and various accessors.\n    The only requirement for `Derived` is to implement ``PyObject *Derived::ptr() const``.\n\\endrst */\ntemplate <typename Derived>\nclass object_api : public pyobject_tag {\n    const Derived &derived() const { return static_cast<const Derived &>(*this); }\n\npublic:\n    /** \\rst\n        Return an iterator equivalent to calling ``iter()`` in Python. The object\n        must be a collection which supports the iteration protocol.\n    \\endrst */\n    iterator begin() const;\n    /// Return a sentinel which ends iteration.\n    iterator end() const;\n\n    /** \\rst\n        Return an internal functor to invoke the object's sequence protocol. Casting\n        the returned ``detail::item_accessor`` instance to a `handle` or `object`\n        subclass causes a corresponding call to ``__getitem__``. Assigning a `handle`\n        or `object` subclass causes a call to ``__setitem__``.\n    \\endrst */\n    item_accessor operator[](handle key) const;\n    /// See above (the only difference is that the key's reference is stolen)\n    item_accessor operator[](object &&key) const;\n    /// See above (the only difference is that the key is provided as a string literal)\n    item_accessor operator[](const char *key) const;\n\n    /** \\rst\n        Return an internal functor to access the object's attributes. Casting the\n        returned ``detail::obj_attr_accessor`` instance to a `handle` or `object`\n        subclass causes a corresponding call to ``getattr``. Assigning a `handle`\n        or `object` subclass causes a call to ``setattr``.\n    \\endrst */\n    obj_attr_accessor attr(handle key) const;\n    /// See above (the only difference is that the key's reference is stolen)\n    obj_attr_accessor attr(object &&key) const;\n    /// See above (the only difference is that the key is provided as a string literal)\n    str_attr_accessor attr(const char *key) const;\n\n    /** \\rst\n        Matches * unpacking in Python, e.g. to unpack arguments out of a ``tuple``\n        or ``list`` for a function call. Applying another * to the result yields\n        ** unpacking, e.g. to unpack a dict as function keyword arguments.\n        See :ref:`calling_python_functions`.\n    \\endrst */\n    args_proxy operator*() const;\n\n    /// Check if the given item is contained within this object, i.e. ``item in obj``.\n    template <typename T>\n    bool contains(T &&item) const;\n\n    /** \\rst\n        Assuming the Python object is a function or implements the ``__call__``\n        protocol, ``operator()`` invokes the underlying function, passing an\n        arbitrary set of parameters. The result is returned as a `object` and\n        may need to be converted back into a Python object using `handle::cast()`.\n\n        When some of the arguments cannot be converted to Python objects, the\n        function will throw a `cast_error` exception. When the Python function\n        call fails, a `error_already_set` exception is thrown.\n    \\endrst */\n    template <return_value_policy policy = return_value_policy::automatic_reference,\n              typename... Args>\n    object operator()(Args &&...args) const;\n    template <return_value_policy policy = return_value_policy::automatic_reference,\n              typename... Args>\n    PYBIND11_DEPRECATED(\"call(...) was deprecated in favor of operator()(...)\")\n    object call(Args &&...args) const;\n\n    /// Equivalent to ``obj is other`` in Python.\n    bool is(object_api const &other) const { return derived().ptr() == other.derived().ptr(); }\n    /// Equivalent to ``obj is None`` in Python.\n    bool is_none() const { return derived().ptr() == Py_None; }\n    /// Equivalent to obj == other in Python\n    bool equal(object_api const &other) const { return rich_compare(other, Py_EQ); }\n    bool not_equal(object_api const &other) const { return rich_compare(other, Py_NE); }\n    bool operator<(object_api const &other) const { return rich_compare(other, Py_LT); }\n    bool operator<=(object_api const &other) const { return rich_compare(other, Py_LE); }\n    bool operator>(object_api const &other) const { return rich_compare(other, Py_GT); }\n    bool operator>=(object_api const &other) const { return rich_compare(other, Py_GE); }\n\n    object operator-() const;\n    object operator~() const;\n    object operator+(object_api const &other) const;\n    object operator+=(object_api const &other);\n    object operator-(object_api const &other) const;\n    object operator-=(object_api const &other);\n    object operator*(object_api const &other) const;\n    object operator*=(object_api const &other);\n    object operator/(object_api const &other) const;\n    object operator/=(object_api const &other);\n    object operator|(object_api const &other) const;\n    object operator|=(object_api const &other);\n    object operator&(object_api const &other) const;\n    object operator&=(object_api const &other);\n    object operator^(object_api const &other) const;\n    object operator^=(object_api const &other);\n    object operator<<(object_api const &other) const;\n    object operator<<=(object_api const &other);\n    object operator>>(object_api const &other) const;\n    object operator>>=(object_api const &other);\n\n    PYBIND11_DEPRECATED(\"Use py::str(obj) instead\")\n    pybind11::str str() const;\n\n    /// Get or set the object's docstring, i.e. ``obj.__doc__``.\n    str_attr_accessor doc() const;\n\n    /// Return the object's current reference count\n    int ref_count() const { return static_cast<int>(Py_REFCNT(derived().ptr())); }\n\n    // TODO PYBIND11_DEPRECATED(\n    //     \"Call py::type::handle_of(h) or py::type::of(h) instead of h.get_type()\")\n    handle get_type() const;\n\nprivate:\n    bool rich_compare(object_api const &other, int value) const;\n};\n\ntemplate <typename T>\nusing is_pyobj_ptr_or_nullptr_t = detail::any_of<std::is_same<T, PyObject *>,\n                                                 std::is_same<T, PyObject *const>,\n                                                 std::is_same<T, std::nullptr_t>>;\n\nPYBIND11_NAMESPACE_END(detail)\n\n#if !defined(PYBIND11_HANDLE_REF_DEBUG) && !defined(NDEBUG)\n#    define PYBIND11_HANDLE_REF_DEBUG\n#endif\n\n/** \\rst\n    Holds a reference to a Python object (no reference counting)\n\n    The `handle` class is a thin wrapper around an arbitrary Python object (i.e. a\n    ``PyObject *`` in Python's C API). It does not perform any automatic reference\n    counting and merely provides a basic C++ interface to various Python API functions.\n\n    .. seealso::\n        The `object` class inherits from `handle` and adds automatic reference\n        counting features.\n\\endrst */\nclass handle : public detail::object_api<handle> {\npublic:\n    /// The default constructor creates a handle with a ``nullptr``-valued pointer\n    handle() = default;\n\n    /// Enable implicit conversion from ``PyObject *`` and ``nullptr``.\n    /// Not using ``handle(PyObject *ptr)`` to avoid implicit conversion from ``0``.\n    template <typename T,\n              detail::enable_if_t<detail::is_pyobj_ptr_or_nullptr_t<T>::value, int> = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    handle(T ptr) : m_ptr(ptr) {}\n\n    /// Enable implicit conversion through ``T::operator PyObject *()``.\n    template <\n        typename T,\n        detail::enable_if_t<detail::all_of<detail::none_of<std::is_base_of<handle, T>,\n                                                           detail::is_pyobj_ptr_or_nullptr_t<T>>,\n                                           std::is_convertible<T, PyObject *>>::value,\n                            int>\n        = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    handle(T &obj) : m_ptr(obj) {}\n\n    /// Return the underlying ``PyObject *`` pointer\n    PyObject *ptr() const { return m_ptr; }\n    PyObject *&ptr() { return m_ptr; }\n\n    /** \\rst\n        Manually increase the reference count of the Python object. Usually, it is\n        preferable to use the `object` class which derives from `handle` and calls\n        this function automatically. Returns a reference to itself.\n    \\endrst */\n    const handle &inc_ref() const & {\n#ifdef PYBIND11_HANDLE_REF_DEBUG\n        inc_ref_counter(1);\n#endif\n#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF\n        if (m_ptr != nullptr && !PyGILState_Check()) {\n            throw_gilstate_error(\"pybind11::handle::inc_ref()\");\n        }\n#endif\n        Py_XINCREF(m_ptr);\n        return *this;\n    }\n\n    /** \\rst\n        Manually decrease the reference count of the Python object. Usually, it is\n        preferable to use the `object` class which derives from `handle` and calls\n        this function automatically. Returns a reference to itself.\n    \\endrst */\n    const handle &dec_ref() const & {\n#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF\n        if (m_ptr != nullptr && !PyGILState_Check()) {\n            throw_gilstate_error(\"pybind11::handle::dec_ref()\");\n        }\n#endif\n        Py_XDECREF(m_ptr);\n        return *this;\n    }\n\n    /** \\rst\n        Attempt to cast the Python object into the given C++ type. A `cast_error`\n        will be throw upon failure.\n    \\endrst */\n    template <typename T>\n    T cast() const;\n    /// Return ``true`` when the `handle` wraps a valid Python object\n    explicit operator bool() const { return m_ptr != nullptr; }\n    /** \\rst\n        Deprecated: Check that the underlying pointers are the same.\n        Equivalent to ``obj1 is obj2`` in Python.\n    \\endrst */\n    PYBIND11_DEPRECATED(\"Use obj1.is(obj2) instead\")\n    bool operator==(const handle &h) const { return m_ptr == h.m_ptr; }\n    PYBIND11_DEPRECATED(\"Use !obj1.is(obj2) instead\")\n    bool operator!=(const handle &h) const { return m_ptr != h.m_ptr; }\n    PYBIND11_DEPRECATED(\"Use handle::operator bool() instead\")\n    bool check() const { return m_ptr != nullptr; }\n\nprotected:\n    PyObject *m_ptr = nullptr;\n\nprivate:\n#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF\n    void throw_gilstate_error(const std::string &function_name) const {\n        fprintf(\n            stderr,\n            \"%s is being called while the GIL is either not held or invalid. Please see \"\n            \"https://pybind11.readthedocs.io/en/stable/advanced/\"\n            \"misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\\n\"\n            \"If you are convinced there is no bug in your code, you can #define \"\n            \"PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF\"\n            \"to disable this check. In that case you have to ensure this #define is consistently \"\n            \"used for all translation units linked into a given pybind11 extension, otherwise \"\n            \"there will be ODR violations.\",\n            function_name.c_str());\n        fflush(stderr);\n        if (Py_TYPE(m_ptr)->tp_name != nullptr) {\n            fprintf(stderr,\n                    \"The failing %s call was triggered on a %s object.\\n\",\n                    function_name.c_str(),\n                    Py_TYPE(m_ptr)->tp_name);\n            fflush(stderr);\n        }\n        throw std::runtime_error(function_name + \" PyGILState_Check() failure.\");\n    }\n#endif\n\n#ifdef PYBIND11_HANDLE_REF_DEBUG\n    static std::size_t inc_ref_counter(std::size_t add) {\n        thread_local std::size_t counter = 0;\n        counter += add;\n        return counter;\n    }\n\npublic:\n    static std::size_t inc_ref_counter() { return inc_ref_counter(0); }\n#endif\n};\n\n/** \\rst\n    Holds a reference to a Python object (with reference counting)\n\n    Like `handle`, the `object` class is a thin wrapper around an arbitrary Python\n    object (i.e. a ``PyObject *`` in Python's C API). In contrast to `handle`, it\n    optionally increases the object's reference count upon construction, and it\n    *always* decreases the reference count when the `object` instance goes out of\n    scope and is destructed. When using `object` instances consistently, it is much\n    easier to get reference counting right at the first attempt.\n\\endrst */\nclass object : public handle {\npublic:\n    object() = default;\n    PYBIND11_DEPRECATED(\"Use reinterpret_borrow<object>() or reinterpret_steal<object>()\")\n    object(handle h, bool is_borrowed) : handle(h) {\n        if (is_borrowed) {\n            inc_ref();\n        }\n    }\n    /// Copy constructor; always increases the reference count\n    object(const object &o) : handle(o) { inc_ref(); }\n    /// Move constructor; steals the object from ``other`` and preserves its reference count\n    object(object &&other) noexcept : handle(other) { other.m_ptr = nullptr; }\n    /// Destructor; automatically calls `handle::dec_ref()`\n    ~object() { dec_ref(); }\n\n    /** \\rst\n        Resets the internal pointer to ``nullptr`` without decreasing the\n        object's reference count. The function returns a raw handle to the original\n        Python object.\n    \\endrst */\n    handle release() {\n        PyObject *tmp = m_ptr;\n        m_ptr = nullptr;\n        return handle(tmp);\n    }\n\n    object &operator=(const object &other) {\n        // Skip inc_ref and dec_ref if both objects are the same\n        if (!this->is(other)) {\n            other.inc_ref();\n            // Use temporary variable to ensure `*this` remains valid while\n            // `Py_XDECREF` executes, in case `*this` is accessible from Python.\n            handle temp(m_ptr);\n            m_ptr = other.m_ptr;\n            temp.dec_ref();\n        }\n        return *this;\n    }\n\n    object &operator=(object &&other) noexcept {\n        if (this != &other) {\n            handle temp(m_ptr);\n            m_ptr = other.m_ptr;\n            other.m_ptr = nullptr;\n            temp.dec_ref();\n        }\n        return *this;\n    }\n\n#define PYBIND11_INPLACE_OP(iop)                                                                  \\\n    object iop(object_api const &other) { return operator=(handle::iop(other)); }\n\n    PYBIND11_INPLACE_OP(operator+=)\n    PYBIND11_INPLACE_OP(operator-=)\n    PYBIND11_INPLACE_OP(operator*=)\n    PYBIND11_INPLACE_OP(operator/=)\n    PYBIND11_INPLACE_OP(operator|=)\n    PYBIND11_INPLACE_OP(operator&=)\n    PYBIND11_INPLACE_OP(operator^=)\n    PYBIND11_INPLACE_OP(operator<<=)\n    PYBIND11_INPLACE_OP(operator>>=)\n#undef PYBIND11_INPLACE_OP\n\n    // Calling cast() on an object lvalue just copies (via handle::cast)\n    template <typename T>\n    T cast() const &;\n    // Calling on an object rvalue does a move, if needed and/or possible\n    template <typename T>\n    T cast() &&;\n\nprotected:\n    // Tags for choosing constructors from raw PyObject *\n    struct borrowed_t {};\n    struct stolen_t {};\n\n    /// @cond BROKEN\n    template <typename T>\n    friend T reinterpret_borrow(handle);\n    template <typename T>\n    friend T reinterpret_steal(handle);\n    /// @endcond\n\npublic:\n    // Only accessible from derived classes and the reinterpret_* functions\n    object(handle h, borrowed_t) : handle(h) { inc_ref(); }\n    object(handle h, stolen_t) : handle(h) {}\n};\n\n/** \\rst\n    Declare that a `handle` or ``PyObject *`` is a certain type and borrow the reference.\n    The target type ``T`` must be `object` or one of its derived classes. The function\n    doesn't do any conversions or checks. It's up to the user to make sure that the\n    target type is correct.\n\n    .. code-block:: cpp\n\n        PyObject *p = PyList_GetItem(obj, index);\n        py::object o = reinterpret_borrow<py::object>(p);\n        // or\n        py::tuple t = reinterpret_borrow<py::tuple>(p); // <-- `p` must be already be a `tuple`\n\\endrst */\ntemplate <typename T>\nT reinterpret_borrow(handle h) {\n    return {h, object::borrowed_t{}};\n}\n\n/** \\rst\n    Like `reinterpret_borrow`, but steals the reference.\n\n     .. code-block:: cpp\n\n        PyObject *p = PyObject_Str(obj);\n        py::str s = reinterpret_steal<py::str>(p); // <-- `p` must be already be a `str`\n\\endrst */\ntemplate <typename T>\nT reinterpret_steal(handle h) {\n    return {h, object::stolen_t{}};\n}\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n// Equivalent to obj.__class__.__name__ (or obj.__name__ if obj is a class).\ninline const char *obj_class_name(PyObject *obj) {\n    if (PyType_Check(obj)) {\n        return reinterpret_cast<PyTypeObject *>(obj)->tp_name;\n    }\n    return Py_TYPE(obj)->tp_name;\n}\n\nstd::string error_string();\n\n// The code in this struct is very unusual, to minimize the chances of\n// masking bugs (elsewhere) by errors during the error handling (here).\n// This is meant to be a lifeline for troubleshooting long-running processes\n// that crash under conditions that are virtually impossible to reproduce.\n// Low-level implementation alternatives are preferred to higher-level ones\n// that might raise cascading exceptions. Last-ditch-kind-of attempts are made\n// to report as much of the original error as possible, even if there are\n// secondary issues obtaining some of the details.\nstruct error_fetch_and_normalize {\n    // This comment only applies to Python <= 3.11:\n    //     Immediate normalization is long-established behavior (starting with\n    //     https://github.com/pybind/pybind11/commit/135ba8deafb8bf64a15b24d1513899eb600e2011\n    //     from Sep 2016) and safest. Normalization could be deferred, but this could mask\n    //     errors elsewhere, the performance gain is very minor in typical situations\n    //     (usually the dominant bottleneck is EH unwinding), and the implementation here\n    //     would be more complex.\n    // Starting with Python 3.12, PyErr_Fetch() normalizes exceptions immediately.\n    // Any errors during normalization are tracked under __notes__.\n    explicit error_fetch_and_normalize(const char *called) {\n        PyErr_Fetch(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr());\n        if (!m_type) {\n            pybind11_fail(\"Internal error: \" + std::string(called)\n                          + \" called while \"\n                            \"Python error indicator not set.\");\n        }\n        const char *exc_type_name_orig = detail::obj_class_name(m_type.ptr());\n        if (exc_type_name_orig == nullptr) {\n            pybind11_fail(\"Internal error: \" + std::string(called)\n                          + \" failed to obtain the name \"\n                            \"of the original active exception type.\");\n        }\n        m_lazy_error_string = exc_type_name_orig;\n#if PY_VERSION_HEX >= 0x030C0000\n        // The presence of __notes__ is likely due to exception normalization\n        // errors, although that is not necessarily true, therefore insert a\n        // hint only:\n        if (PyObject_HasAttrString(m_value.ptr(), \"__notes__\")) {\n            m_lazy_error_string += \"[WITH __notes__]\";\n        }\n#else\n        // PyErr_NormalizeException() may change the exception type if there are cascading\n        // failures. This can potentially be extremely confusing.\n        PyErr_NormalizeException(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr());\n        if (m_type.ptr() == nullptr) {\n            pybind11_fail(\"Internal error: \" + std::string(called)\n                          + \" failed to normalize the \"\n                            \"active exception.\");\n        }\n        const char *exc_type_name_norm = detail::obj_class_name(m_type.ptr());\n        if (exc_type_name_norm == nullptr) {\n            pybind11_fail(\"Internal error: \" + std::string(called)\n                          + \" failed to obtain the name \"\n                            \"of the normalized active exception type.\");\n        }\n#    if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030a00\n        // This behavior runs the risk of masking errors in the error handling, but avoids a\n        // conflict with PyPy, which relies on the normalization here to change OSError to\n        // FileNotFoundError (https://github.com/pybind/pybind11/issues/4075).\n        m_lazy_error_string = exc_type_name_norm;\n#    else\n        if (exc_type_name_norm != m_lazy_error_string) {\n            std::string msg = std::string(called)\n                              + \": MISMATCH of original and normalized \"\n                                \"active exception types: \";\n            msg += \"ORIGINAL \";\n            msg += m_lazy_error_string;\n            msg += \" REPLACED BY \";\n            msg += exc_type_name_norm;\n            msg += \": \" + format_value_and_trace();\n            pybind11_fail(msg);\n        }\n#    endif\n#endif\n    }\n\n    error_fetch_and_normalize(const error_fetch_and_normalize &) = delete;\n    error_fetch_and_normalize(error_fetch_and_normalize &&) = delete;\n\n    std::string format_value_and_trace() const {\n        std::string result;\n        std::string message_error_string;\n        if (m_value) {\n            auto value_str = reinterpret_steal<object>(PyObject_Str(m_value.ptr()));\n            constexpr const char *message_unavailable_exc\n                = \"<MESSAGE UNAVAILABLE DUE TO ANOTHER EXCEPTION>\";\n            if (!value_str) {\n                message_error_string = detail::error_string();\n                result = message_unavailable_exc;\n            } else {\n                // Not using `value_str.cast<std::string>()`, to not potentially throw a secondary\n                // error_already_set that will then result in process termination (#4288).\n                auto value_bytes = reinterpret_steal<object>(\n                    PyUnicode_AsEncodedString(value_str.ptr(), \"utf-8\", \"backslashreplace\"));\n                if (!value_bytes) {\n                    message_error_string = detail::error_string();\n                    result = message_unavailable_exc;\n                } else {\n                    char *buffer = nullptr;\n                    Py_ssize_t length = 0;\n                    if (PyBytes_AsStringAndSize(value_bytes.ptr(), &buffer, &length) == -1) {\n                        message_error_string = detail::error_string();\n                        result = message_unavailable_exc;\n                    } else {\n                        result = std::string(buffer, static_cast<std::size_t>(length));\n                    }\n                }\n            }\n#if PY_VERSION_HEX >= 0x030B0000\n            auto notes\n                = reinterpret_steal<object>(PyObject_GetAttrString(m_value.ptr(), \"__notes__\"));\n            if (!notes) {\n                PyErr_Clear(); // No notes is good news.\n            } else {\n                auto len_notes = PyList_Size(notes.ptr());\n                if (len_notes < 0) {\n                    result += \"\\nFAILURE obtaining len(__notes__): \" + detail::error_string();\n                } else {\n                    result += \"\\n__notes__ (len=\" + std::to_string(len_notes) + \"):\";\n                    for (ssize_t i = 0; i < len_notes; i++) {\n                        PyObject *note = PyList_GET_ITEM(notes.ptr(), i);\n                        auto note_bytes = reinterpret_steal<object>(\n                            PyUnicode_AsEncodedString(note, \"utf-8\", \"backslashreplace\"));\n                        if (!note_bytes) {\n                            result += \"\\nFAILURE obtaining __notes__[\" + std::to_string(i)\n                                      + \"]: \" + detail::error_string();\n                        } else {\n                            char *buffer = nullptr;\n                            Py_ssize_t length = 0;\n                            if (PyBytes_AsStringAndSize(note_bytes.ptr(), &buffer, &length)\n                                == -1) {\n                                result += \"\\nFAILURE formatting __notes__[\" + std::to_string(i)\n                                          + \"]: \" + detail::error_string();\n                            } else {\n                                result += '\\n';\n                                result += std::string(buffer, static_cast<std::size_t>(length));\n                            }\n                        }\n                    }\n                }\n            }\n#endif\n        } else {\n            result = \"<MESSAGE UNAVAILABLE>\";\n        }\n        if (result.empty()) {\n            result = \"<EMPTY MESSAGE>\";\n        }\n\n        bool have_trace = false;\n        if (m_trace) {\n#if !defined(PYPY_VERSION)\n            auto *tb = reinterpret_cast<PyTracebackObject *>(m_trace.ptr());\n\n            // Get the deepest trace possible.\n            while (tb->tb_next) {\n                tb = tb->tb_next;\n            }\n\n            PyFrameObject *frame = tb->tb_frame;\n            Py_XINCREF(frame);\n            result += \"\\n\\nAt:\\n\";\n            while (frame) {\n#    if PY_VERSION_HEX >= 0x030900B1\n                PyCodeObject *f_code = PyFrame_GetCode(frame);\n#    else\n                PyCodeObject *f_code = frame->f_code;\n                Py_INCREF(f_code);\n#    endif\n                int lineno = PyFrame_GetLineNumber(frame);\n                result += \"  \";\n                result += handle(f_code->co_filename).cast<std::string>();\n                result += '(';\n                result += std::to_string(lineno);\n                result += \"): \";\n                result += handle(f_code->co_name).cast<std::string>();\n                result += '\\n';\n                Py_DECREF(f_code);\n#    if PY_VERSION_HEX >= 0x030900B1\n                auto *b_frame = PyFrame_GetBack(frame);\n#    else\n                auto *b_frame = frame->f_back;\n                Py_XINCREF(b_frame);\n#    endif\n                Py_DECREF(frame);\n                frame = b_frame;\n            }\n\n            have_trace = true;\n#endif //! defined(PYPY_VERSION)\n        }\n\n        if (!message_error_string.empty()) {\n            if (!have_trace) {\n                result += '\\n';\n            }\n            result += \"\\nMESSAGE UNAVAILABLE DUE TO EXCEPTION: \" + message_error_string;\n        }\n\n        return result;\n    }\n\n    std::string const &error_string() const {\n        if (!m_lazy_error_string_completed) {\n            m_lazy_error_string += \": \" + format_value_and_trace();\n            m_lazy_error_string_completed = true;\n        }\n        return m_lazy_error_string;\n    }\n\n    void restore() {\n        if (m_restore_called) {\n            pybind11_fail(\"Internal error: pybind11::detail::error_fetch_and_normalize::restore() \"\n                          \"called a second time. ORIGINAL ERROR: \"\n                          + error_string());\n        }\n        PyErr_Restore(m_type.inc_ref().ptr(), m_value.inc_ref().ptr(), m_trace.inc_ref().ptr());\n        m_restore_called = true;\n    }\n\n    bool matches(handle exc) const {\n        return (PyErr_GivenExceptionMatches(m_type.ptr(), exc.ptr()) != 0);\n    }\n\n    // Not protecting these for simplicity.\n    object m_type, m_value, m_trace;\n\nprivate:\n    // Only protecting invariants.\n    mutable std::string m_lazy_error_string;\n    mutable bool m_lazy_error_string_completed = false;\n    mutable bool m_restore_called = false;\n};\n\ninline std::string error_string() {\n    return error_fetch_and_normalize(\"pybind11::detail::error_string\").error_string();\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n/// Fetch and hold an error which was already set in Python.  An instance of this is typically\n/// thrown to propagate python-side errors back through C++ which can either be caught manually or\n/// else falls back to the function dispatcher (which then raises the captured error back to\n/// python).\nclass PYBIND11_EXPORT_EXCEPTION error_already_set : public std::exception {\npublic:\n    /// Fetches the current Python exception (using PyErr_Fetch()), which will clear the\n    /// current Python error indicator.\n    error_already_set()\n        : m_fetched_error{new detail::error_fetch_and_normalize(\"pybind11::error_already_set\"),\n                          m_fetched_error_deleter} {}\n\n    /// The what() result is built lazily on demand.\n    /// WARNING: This member function needs to acquire the Python GIL. This can lead to\n    ///          crashes (undefined behavior) if the Python interpreter is finalizing.\n    const char *what() const noexcept override;\n\n    /// Restores the currently-held Python error (which will clear the Python error indicator first\n    /// if already set).\n    /// NOTE: This member function will always restore the normalized exception, which may or may\n    ///       not be the original Python exception.\n    /// WARNING: The GIL must be held when this member function is called!\n    void restore() { m_fetched_error->restore(); }\n\n    /// If it is impossible to raise the currently-held error, such as in a destructor, we can\n    /// write it out using Python's unraisable hook (`sys.unraisablehook`). The error context\n    /// should be some object whose `repr()` helps identify the location of the error. Python\n    /// already knows the type and value of the error, so there is no need to repeat that.\n    void discard_as_unraisable(object err_context) {\n        restore();\n        PyErr_WriteUnraisable(err_context.ptr());\n    }\n    /// An alternate version of `discard_as_unraisable()`, where a string provides information on\n    /// the location of the error. For example, `__func__` could be helpful.\n    /// WARNING: The GIL must be held when this member function is called!\n    void discard_as_unraisable(const char *err_context) {\n        discard_as_unraisable(reinterpret_steal<object>(PYBIND11_FROM_STRING(err_context)));\n    }\n\n    // Does nothing; provided for backwards compatibility.\n    PYBIND11_DEPRECATED(\"Use of error_already_set.clear() is deprecated\")\n    void clear() {}\n\n    /// Check if the currently trapped error type matches the given Python exception class (or a\n    /// subclass thereof).  May also be passed a tuple to search for any exception class matches in\n    /// the given tuple.\n    bool matches(handle exc) const { return m_fetched_error->matches(exc); }\n\n    const object &type() const { return m_fetched_error->m_type; }\n    const object &value() const { return m_fetched_error->m_value; }\n    const object &trace() const { return m_fetched_error->m_trace; }\n\nprivate:\n    std::shared_ptr<detail::error_fetch_and_normalize> m_fetched_error;\n\n    /// WARNING: This custom deleter needs to acquire the Python GIL. This can lead to\n    ///          crashes (undefined behavior) if the Python interpreter is finalizing.\n    static void m_fetched_error_deleter(detail::error_fetch_and_normalize *raw_ptr);\n};\n\n/// Replaces the current Python error indicator with the chosen error, performing a\n/// 'raise from' to indicate that the chosen error was caused by the original error.\ninline void raise_from(PyObject *type, const char *message) {\n    // Based on _PyErr_FormatVFromCause:\n    // https://github.com/python/cpython/blob/467ab194fc6189d9f7310c89937c51abeac56839/Python/errors.c#L405\n    // See https://github.com/pybind/pybind11/pull/2112 for details.\n    PyObject *exc = nullptr, *val = nullptr, *val2 = nullptr, *tb = nullptr;\n\n    assert(PyErr_Occurred());\n    PyErr_Fetch(&exc, &val, &tb);\n    PyErr_NormalizeException(&exc, &val, &tb);\n    if (tb != nullptr) {\n        PyException_SetTraceback(val, tb);\n        Py_DECREF(tb);\n    }\n    Py_DECREF(exc);\n    assert(!PyErr_Occurred());\n\n    PyErr_SetString(type, message);\n\n    PyErr_Fetch(&exc, &val2, &tb);\n    PyErr_NormalizeException(&exc, &val2, &tb);\n    Py_INCREF(val);\n    PyException_SetCause(val2, val);\n    PyException_SetContext(val2, val);\n    PyErr_Restore(exc, val2, tb);\n}\n\n/// Sets the current Python error indicator with the chosen error, performing a 'raise from'\n/// from the error contained in error_already_set to indicate that the chosen error was\n/// caused by the original error.\ninline void raise_from(error_already_set &err, PyObject *type, const char *message) {\n    err.restore();\n    raise_from(type, message);\n}\n\n/** \\defgroup python_builtins const_name\n    Unless stated otherwise, the following C++ functions behave the same\n    as their Python counterparts.\n */\n\n/** \\ingroup python_builtins\n    \\rst\n    Return true if ``obj`` is an instance of ``T``. Type ``T`` must be a subclass of\n    `object` or a class which was exposed to Python as ``py::class_<T>``.\n\\endrst */\ntemplate <typename T, detail::enable_if_t<std::is_base_of<object, T>::value, int> = 0>\nbool isinstance(handle obj) {\n    return T::check_(obj);\n}\n\ntemplate <typename T, detail::enable_if_t<!std::is_base_of<object, T>::value, int> = 0>\nbool isinstance(handle obj) {\n    return detail::isinstance_generic(obj, typeid(T));\n}\n\ntemplate <>\ninline bool isinstance<handle>(handle) = delete;\ntemplate <>\ninline bool isinstance<object>(handle obj) {\n    return obj.ptr() != nullptr;\n}\n\n/// \\ingroup python_builtins\n/// Return true if ``obj`` is an instance of the ``type``.\ninline bool isinstance(handle obj, handle type) {\n    const auto result = PyObject_IsInstance(obj.ptr(), type.ptr());\n    if (result == -1) {\n        throw error_already_set();\n    }\n    return result != 0;\n}\n\n/// \\addtogroup python_builtins\n/// @{\ninline bool hasattr(handle obj, handle name) {\n    return PyObject_HasAttr(obj.ptr(), name.ptr()) == 1;\n}\n\ninline bool hasattr(handle obj, const char *name) {\n    return PyObject_HasAttrString(obj.ptr(), name) == 1;\n}\n\ninline void delattr(handle obj, handle name) {\n    if (PyObject_DelAttr(obj.ptr(), name.ptr()) != 0) {\n        throw error_already_set();\n    }\n}\n\ninline void delattr(handle obj, const char *name) {\n    if (PyObject_DelAttrString(obj.ptr(), name) != 0) {\n        throw error_already_set();\n    }\n}\n\ninline object getattr(handle obj, handle name) {\n    PyObject *result = PyObject_GetAttr(obj.ptr(), name.ptr());\n    if (!result) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<object>(result);\n}\n\ninline object getattr(handle obj, const char *name) {\n    PyObject *result = PyObject_GetAttrString(obj.ptr(), name);\n    if (!result) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<object>(result);\n}\n\ninline object getattr(handle obj, handle name, handle default_) {\n    if (PyObject *result = PyObject_GetAttr(obj.ptr(), name.ptr())) {\n        return reinterpret_steal<object>(result);\n    }\n    PyErr_Clear();\n    return reinterpret_borrow<object>(default_);\n}\n\ninline object getattr(handle obj, const char *name, handle default_) {\n    if (PyObject *result = PyObject_GetAttrString(obj.ptr(), name)) {\n        return reinterpret_steal<object>(result);\n    }\n    PyErr_Clear();\n    return reinterpret_borrow<object>(default_);\n}\n\ninline void setattr(handle obj, handle name, handle value) {\n    if (PyObject_SetAttr(obj.ptr(), name.ptr(), value.ptr()) != 0) {\n        throw error_already_set();\n    }\n}\n\ninline void setattr(handle obj, const char *name, handle value) {\n    if (PyObject_SetAttrString(obj.ptr(), name, value.ptr()) != 0) {\n        throw error_already_set();\n    }\n}\n\ninline ssize_t hash(handle obj) {\n    auto h = PyObject_Hash(obj.ptr());\n    if (h == -1) {\n        throw error_already_set();\n    }\n    return h;\n}\n\n/// @} python_builtins\n\nPYBIND11_NAMESPACE_BEGIN(detail)\ninline handle get_function(handle value) {\n    if (value) {\n        if (PyInstanceMethod_Check(value.ptr())) {\n            value = PyInstanceMethod_GET_FUNCTION(value.ptr());\n        } else if (PyMethod_Check(value.ptr())) {\n            value = PyMethod_GET_FUNCTION(value.ptr());\n        }\n    }\n    return value;\n}\n\n// Reimplementation of python's dict helper functions to ensure that exceptions\n// aren't swallowed (see #2862)\n\n// copied from cpython _PyDict_GetItemStringWithError\ninline PyObject *dict_getitemstring(PyObject *v, const char *key) {\n    PyObject *kv = nullptr, *rv = nullptr;\n    kv = PyUnicode_FromString(key);\n    if (kv == nullptr) {\n        throw error_already_set();\n    }\n\n    rv = PyDict_GetItemWithError(v, kv);\n    Py_DECREF(kv);\n    if (rv == nullptr && PyErr_Occurred()) {\n        throw error_already_set();\n    }\n    return rv;\n}\n\ninline PyObject *dict_getitem(PyObject *v, PyObject *key) {\n    PyObject *rv = PyDict_GetItemWithError(v, key);\n    if (rv == nullptr && PyErr_Occurred()) {\n        throw error_already_set();\n    }\n    return rv;\n}\n\n// Helper aliases/functions to support implicit casting of values given to python\n// accessors/methods. When given a pyobject, this simply returns the pyobject as-is; for other C++\n// type, the value goes through pybind11::cast(obj) to convert it to an `object`.\ntemplate <typename T, enable_if_t<is_pyobject<T>::value, int> = 0>\nauto object_or_cast(T &&o) -> decltype(std::forward<T>(o)) {\n    return std::forward<T>(o);\n}\n// The following casting version is implemented in cast.h:\ntemplate <typename T, enable_if_t<!is_pyobject<T>::value, int> = 0>\nobject object_or_cast(T &&o);\n// Match a PyObject*, which we want to convert directly to handle via its converting constructor\ninline handle object_or_cast(PyObject *ptr) { return ptr; }\n\nPYBIND11_WARNING_PUSH\nPYBIND11_WARNING_DISABLE_MSVC(4522) // warning C4522: multiple assignment operators specified\ntemplate <typename Policy>\nclass accessor : public object_api<accessor<Policy>> {\n    using key_type = typename Policy::key_type;\n\npublic:\n    accessor(handle obj, key_type key) : obj(obj), key(std::move(key)) {}\n    accessor(const accessor &) = default;\n    accessor(accessor &&) noexcept = default;\n\n    // accessor overload required to override default assignment operator (templates are not\n    // allowed to replace default compiler-generated assignments).\n    void operator=(const accessor &a) && { std::move(*this).operator=(handle(a)); }\n    void operator=(const accessor &a) & { operator=(handle(a)); }\n\n    template <typename T>\n    void operator=(T &&value) && {\n        Policy::set(obj, key, object_or_cast(std::forward<T>(value)));\n    }\n    template <typename T>\n    void operator=(T &&value) & {\n        get_cache() = ensure_object(object_or_cast(std::forward<T>(value)));\n    }\n\n    template <typename T = Policy>\n    PYBIND11_DEPRECATED(\n        \"Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)\")\n    explicit\n    operator enable_if_t<std::is_same<T, accessor_policies::str_attr>::value\n                             || std::is_same<T, accessor_policies::obj_attr>::value,\n                         bool>() const {\n        return hasattr(obj, key);\n    }\n    template <typename T = Policy>\n    PYBIND11_DEPRECATED(\"Use of obj[key] as bool is deprecated in favor of obj.contains(key)\")\n    explicit\n    operator enable_if_t<std::is_same<T, accessor_policies::generic_item>::value, bool>() const {\n        return obj.contains(key);\n    }\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator object() const { return get_cache(); }\n    PyObject *ptr() const { return get_cache().ptr(); }\n    template <typename T>\n    T cast() const {\n        return get_cache().template cast<T>();\n    }\n\nprivate:\n    static object ensure_object(object &&o) { return std::move(o); }\n    static object ensure_object(handle h) { return reinterpret_borrow<object>(h); }\n\n    object &get_cache() const {\n        if (!cache) {\n            cache = Policy::get(obj, key);\n        }\n        return cache;\n    }\n\nprivate:\n    handle obj;\n    key_type key;\n    mutable object cache;\n};\nPYBIND11_WARNING_POP\n\nPYBIND11_NAMESPACE_BEGIN(accessor_policies)\nstruct obj_attr {\n    using key_type = object;\n    static object get(handle obj, handle key) { return getattr(obj, key); }\n    static void set(handle obj, handle key, handle val) { setattr(obj, key, val); }\n};\n\nstruct str_attr {\n    using key_type = const char *;\n    static object get(handle obj, const char *key) { return getattr(obj, key); }\n    static void set(handle obj, const char *key, handle val) { setattr(obj, key, val); }\n};\n\nstruct generic_item {\n    using key_type = object;\n\n    static object get(handle obj, handle key) {\n        PyObject *result = PyObject_GetItem(obj.ptr(), key.ptr());\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<object>(result);\n    }\n\n    static void set(handle obj, handle key, handle val) {\n        if (PyObject_SetItem(obj.ptr(), key.ptr(), val.ptr()) != 0) {\n            throw error_already_set();\n        }\n    }\n};\n\nstruct sequence_item {\n    using key_type = size_t;\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static object get(handle obj, const IdxType &index) {\n        PyObject *result = PySequence_GetItem(obj.ptr(), ssize_t_cast(index));\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_steal<object>(result);\n    }\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static void set(handle obj, const IdxType &index, handle val) {\n        // PySequence_SetItem does not steal a reference to 'val'\n        if (PySequence_SetItem(obj.ptr(), ssize_t_cast(index), val.ptr()) != 0) {\n            throw error_already_set();\n        }\n    }\n};\n\nstruct list_item {\n    using key_type = size_t;\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static object get(handle obj, const IdxType &index) {\n        PyObject *result = PyList_GetItem(obj.ptr(), ssize_t_cast(index));\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_borrow<object>(result);\n    }\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static void set(handle obj, const IdxType &index, handle val) {\n        // PyList_SetItem steals a reference to 'val'\n        if (PyList_SetItem(obj.ptr(), ssize_t_cast(index), val.inc_ref().ptr()) != 0) {\n            throw error_already_set();\n        }\n    }\n};\n\nstruct tuple_item {\n    using key_type = size_t;\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static object get(handle obj, const IdxType &index) {\n        PyObject *result = PyTuple_GetItem(obj.ptr(), ssize_t_cast(index));\n        if (!result) {\n            throw error_already_set();\n        }\n        return reinterpret_borrow<object>(result);\n    }\n\n    template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    static void set(handle obj, const IdxType &index, handle val) {\n        // PyTuple_SetItem steals a reference to 'val'\n        if (PyTuple_SetItem(obj.ptr(), ssize_t_cast(index), val.inc_ref().ptr()) != 0) {\n            throw error_already_set();\n        }\n    }\n};\nPYBIND11_NAMESPACE_END(accessor_policies)\n\n/// STL iterator template used for tuple, list, sequence and dict\ntemplate <typename Policy>\nclass generic_iterator : public Policy {\n    using It = generic_iterator;\n\npublic:\n    using difference_type = ssize_t;\n    using iterator_category = typename Policy::iterator_category;\n    using value_type = typename Policy::value_type;\n    using reference = typename Policy::reference;\n    using pointer = typename Policy::pointer;\n\n    generic_iterator() = default;\n    generic_iterator(handle seq, ssize_t index) : Policy(seq, index) {}\n\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    reference operator*() const { return Policy::dereference(); }\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    reference operator[](difference_type n) const { return *(*this + n); }\n    pointer operator->() const { return **this; }\n\n    It &operator++() {\n        Policy::increment();\n        return *this;\n    }\n    It operator++(int) {\n        auto copy = *this;\n        Policy::increment();\n        return copy;\n    }\n    It &operator--() {\n        Policy::decrement();\n        return *this;\n    }\n    It operator--(int) {\n        auto copy = *this;\n        Policy::decrement();\n        return copy;\n    }\n    It &operator+=(difference_type n) {\n        Policy::advance(n);\n        return *this;\n    }\n    It &operator-=(difference_type n) {\n        Policy::advance(-n);\n        return *this;\n    }\n\n    friend It operator+(const It &a, difference_type n) {\n        auto copy = a;\n        return copy += n;\n    }\n    friend It operator+(difference_type n, const It &b) { return b + n; }\n    friend It operator-(const It &a, difference_type n) {\n        auto copy = a;\n        return copy -= n;\n    }\n    friend difference_type operator-(const It &a, const It &b) { return a.distance_to(b); }\n\n    friend bool operator==(const It &a, const It &b) { return a.equal(b); }\n    friend bool operator!=(const It &a, const It &b) { return !(a == b); }\n    friend bool operator<(const It &a, const It &b) { return b - a > 0; }\n    friend bool operator>(const It &a, const It &b) { return b < a; }\n    friend bool operator>=(const It &a, const It &b) { return !(a < b); }\n    friend bool operator<=(const It &a, const It &b) { return !(a > b); }\n};\n\nPYBIND11_NAMESPACE_BEGIN(iterator_policies)\n/// Quick proxy class needed to implement ``operator->`` for iterators which can't return pointers\ntemplate <typename T>\nstruct arrow_proxy {\n    T value;\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    arrow_proxy(T &&value) noexcept : value(std::move(value)) {}\n    T *operator->() const { return &value; }\n};\n\n/// Lightweight iterator policy using just a simple pointer: see ``PySequence_Fast_ITEMS``\nclass sequence_fast_readonly {\nprotected:\n    using iterator_category = std::random_access_iterator_tag;\n    using value_type = handle;\n    using reference = const handle; // PR #3263\n    using pointer = arrow_proxy<const handle>;\n\n    sequence_fast_readonly(handle obj, ssize_t n) : ptr(PySequence_Fast_ITEMS(obj.ptr()) + n) {}\n\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    reference dereference() const { return *ptr; }\n    void increment() { ++ptr; }\n    void decrement() { --ptr; }\n    void advance(ssize_t n) { ptr += n; }\n    bool equal(const sequence_fast_readonly &b) const { return ptr == b.ptr; }\n    ssize_t distance_to(const sequence_fast_readonly &b) const { return ptr - b.ptr; }\n\nprivate:\n    PyObject **ptr;\n};\n\n/// Full read and write access using the sequence protocol: see ``detail::sequence_accessor``\nclass sequence_slow_readwrite {\nprotected:\n    using iterator_category = std::random_access_iterator_tag;\n    using value_type = object;\n    using reference = sequence_accessor;\n    using pointer = arrow_proxy<const sequence_accessor>;\n\n    sequence_slow_readwrite(handle obj, ssize_t index) : obj(obj), index(index) {}\n\n    reference dereference() const { return {obj, static_cast<size_t>(index)}; }\n    void increment() { ++index; }\n    void decrement() { --index; }\n    void advance(ssize_t n) { index += n; }\n    bool equal(const sequence_slow_readwrite &b) const { return index == b.index; }\n    ssize_t distance_to(const sequence_slow_readwrite &b) const { return index - b.index; }\n\nprivate:\n    handle obj;\n    ssize_t index;\n};\n\n/// Python's dictionary protocol permits this to be a forward iterator\nclass dict_readonly {\nprotected:\n    using iterator_category = std::forward_iterator_tag;\n    using value_type = std::pair<handle, handle>;\n    using reference = const value_type; // PR #3263\n    using pointer = arrow_proxy<const value_type>;\n\n    dict_readonly() = default;\n    dict_readonly(handle obj, ssize_t pos) : obj(obj), pos(pos) { increment(); }\n\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    reference dereference() const { return {key, value}; }\n    void increment() {\n        if (PyDict_Next(obj.ptr(), &pos, &key, &value) == 0) {\n            pos = -1;\n        }\n    }\n    bool equal(const dict_readonly &b) const { return pos == b.pos; }\n\nprivate:\n    handle obj;\n    PyObject *key = nullptr, *value = nullptr;\n    ssize_t pos = -1;\n};\nPYBIND11_NAMESPACE_END(iterator_policies)\n\n#if !defined(PYPY_VERSION)\nusing tuple_iterator = generic_iterator<iterator_policies::sequence_fast_readonly>;\nusing list_iterator = generic_iterator<iterator_policies::sequence_fast_readonly>;\n#else\nusing tuple_iterator = generic_iterator<iterator_policies::sequence_slow_readwrite>;\nusing list_iterator = generic_iterator<iterator_policies::sequence_slow_readwrite>;\n#endif\n\nusing sequence_iterator = generic_iterator<iterator_policies::sequence_slow_readwrite>;\nusing dict_iterator = generic_iterator<iterator_policies::dict_readonly>;\n\ninline bool PyIterable_Check(PyObject *obj) {\n    PyObject *iter = PyObject_GetIter(obj);\n    if (iter) {\n        Py_DECREF(iter);\n        return true;\n    }\n    PyErr_Clear();\n    return false;\n}\n\ninline bool PyNone_Check(PyObject *o) { return o == Py_None; }\ninline bool PyEllipsis_Check(PyObject *o) { return o == Py_Ellipsis; }\n\n#ifdef PYBIND11_STR_LEGACY_PERMISSIVE\ninline bool PyUnicode_Check_Permissive(PyObject *o) {\n    return PyUnicode_Check(o) || PYBIND11_BYTES_CHECK(o);\n}\n#    define PYBIND11_STR_CHECK_FUN detail::PyUnicode_Check_Permissive\n#else\n#    define PYBIND11_STR_CHECK_FUN PyUnicode_Check\n#endif\n\ninline bool PyStaticMethod_Check(PyObject *o) { return o->ob_type == &PyStaticMethod_Type; }\n\nclass kwargs_proxy : public handle {\npublic:\n    explicit kwargs_proxy(handle h) : handle(h) {}\n};\n\nclass args_proxy : public handle {\npublic:\n    explicit args_proxy(handle h) : handle(h) {}\n    kwargs_proxy operator*() const { return kwargs_proxy(*this); }\n};\n\n/// Python argument categories (using PEP 448 terms)\ntemplate <typename T>\nusing is_keyword = std::is_base_of<arg, T>;\ntemplate <typename T>\nusing is_s_unpacking = std::is_same<args_proxy, T>; // * unpacking\ntemplate <typename T>\nusing is_ds_unpacking = std::is_same<kwargs_proxy, T>; // ** unpacking\ntemplate <typename T>\nusing is_positional = satisfies_none_of<T, is_keyword, is_s_unpacking, is_ds_unpacking>;\ntemplate <typename T>\nusing is_keyword_or_ds = satisfies_any_of<T, is_keyword, is_ds_unpacking>;\n\n// Call argument collector forward declarations\ntemplate <return_value_policy policy = return_value_policy::automatic_reference>\nclass simple_collector;\ntemplate <return_value_policy policy = return_value_policy::automatic_reference>\nclass unpacking_collector;\n\nPYBIND11_NAMESPACE_END(detail)\n\n// TODO: After the deprecated constructors are removed, this macro can be simplified by\n//       inheriting ctors: `using Parent::Parent`. It's not an option right now because\n//       the `using` statement triggers the parent deprecation warning even if the ctor\n//       isn't even used.\n#define PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun)                                            \\\npublic:                                                                                           \\\n    PYBIND11_DEPRECATED(\"Use reinterpret_borrow<\" #Name \">() or reinterpret_steal<\" #Name \">()\")  \\\n    Name(handle h, bool is_borrowed)                                                              \\\n        : Parent(is_borrowed ? Parent(h, borrowed_t{}) : Parent(h, stolen_t{})) {}                \\\n    Name(handle h, borrowed_t) : Parent(h, borrowed_t{}) {}                                       \\\n    Name(handle h, stolen_t) : Parent(h, stolen_t{}) {}                                           \\\n    PYBIND11_DEPRECATED(\"Use py::isinstance<py::python_type>(obj) instead\")                       \\\n    bool check() const { return m_ptr != nullptr && (CheckFun(m_ptr) != 0); }                     \\\n    static bool check_(handle h) { return h.ptr() != nullptr && CheckFun(h.ptr()); }              \\\n    template <typename Policy_> /* NOLINTNEXTLINE(google-explicit-constructor) */                 \\\n    Name(const ::pybind11::detail::accessor<Policy_> &a) : Name(object(a)) {}\n\n#define PYBIND11_OBJECT_CVT(Name, Parent, CheckFun, ConvertFun)                                   \\\n    PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun)                                                \\\n    /* This is deliberately not 'explicit' to allow implicit conversion from object: */           \\\n    /* NOLINTNEXTLINE(google-explicit-constructor) */                                             \\\n    Name(const object &o)                                                                         \\\n        : Parent(check_(o) ? o.inc_ref().ptr() : ConvertFun(o.ptr()), stolen_t{}) {               \\\n        if (!m_ptr)                                                                               \\\n            throw ::pybind11::error_already_set();                                                \\\n    }                                                                                             \\\n    /* NOLINTNEXTLINE(google-explicit-constructor) */                                             \\\n    Name(object &&o) : Parent(check_(o) ? o.release().ptr() : ConvertFun(o.ptr()), stolen_t{}) {  \\\n        if (!m_ptr)                                                                               \\\n            throw ::pybind11::error_already_set();                                                \\\n    }\n\n#define PYBIND11_OBJECT_CVT_DEFAULT(Name, Parent, CheckFun, ConvertFun)                           \\\n    PYBIND11_OBJECT_CVT(Name, Parent, CheckFun, ConvertFun)                                       \\\n    Name() = default;\n\n#define PYBIND11_OBJECT_CHECK_FAILED(Name, o_ptr)                                                 \\\n    ::pybind11::type_error(\"Object of type '\"                                                     \\\n                           + ::pybind11::detail::get_fully_qualified_tp_name(Py_TYPE(o_ptr))      \\\n                           + \"' is not an instance of '\" #Name \"'\")\n\n#define PYBIND11_OBJECT(Name, Parent, CheckFun)                                                   \\\n    PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun)                                                \\\n    /* This is deliberately not 'explicit' to allow implicit conversion from object: */           \\\n    /* NOLINTNEXTLINE(google-explicit-constructor) */                                             \\\n    Name(const object &o) : Parent(o) {                                                           \\\n        if (m_ptr && !check_(m_ptr))                                                              \\\n            throw PYBIND11_OBJECT_CHECK_FAILED(Name, m_ptr);                                      \\\n    }                                                                                             \\\n    /* NOLINTNEXTLINE(google-explicit-constructor) */                                             \\\n    Name(object &&o) : Parent(std::move(o)) {                                                     \\\n        if (m_ptr && !check_(m_ptr))                                                              \\\n            throw PYBIND11_OBJECT_CHECK_FAILED(Name, m_ptr);                                      \\\n    }\n\n#define PYBIND11_OBJECT_DEFAULT(Name, Parent, CheckFun)                                           \\\n    PYBIND11_OBJECT(Name, Parent, CheckFun)                                                       \\\n    Name() = default;\n\n/// \\addtogroup pytypes\n/// @{\n\n/** \\rst\n    Wraps a Python iterator so that it can also be used as a C++ input iterator\n\n    Caveat: copying an iterator does not (and cannot) clone the internal\n    state of the Python iterable. This also applies to the post-increment\n    operator. This iterator should only be used to retrieve the current\n    value using ``operator*()``.\n\\endrst */\nclass iterator : public object {\npublic:\n    using iterator_category = std::input_iterator_tag;\n    using difference_type = ssize_t;\n    using value_type = handle;\n    using reference = const handle; // PR #3263\n    using pointer = const handle *;\n\n    PYBIND11_OBJECT_DEFAULT(iterator, object, PyIter_Check)\n\n    iterator &operator++() {\n        advance();\n        return *this;\n    }\n\n    iterator operator++(int) {\n        auto rv = *this;\n        advance();\n        return rv;\n    }\n\n    // NOLINTNEXTLINE(readability-const-return-type) // PR #3263\n    reference operator*() const {\n        if (m_ptr && !value.ptr()) {\n            auto &self = const_cast<iterator &>(*this);\n            self.advance();\n        }\n        return value;\n    }\n\n    pointer operator->() const {\n        operator*();\n        return &value;\n    }\n\n    /** \\rst\n         The value which marks the end of the iteration. ``it == iterator::sentinel()``\n         is equivalent to catching ``StopIteration`` in Python.\n\n         .. code-block:: cpp\n\n             void foo(py::iterator it) {\n                 while (it != py::iterator::sentinel()) {\n                    // use `*it`\n                    ++it;\n                 }\n             }\n    \\endrst */\n    static iterator sentinel() { return {}; }\n\n    friend bool operator==(const iterator &a, const iterator &b) { return a->ptr() == b->ptr(); }\n    friend bool operator!=(const iterator &a, const iterator &b) { return a->ptr() != b->ptr(); }\n\nprivate:\n    void advance() {\n        value = reinterpret_steal<object>(PyIter_Next(m_ptr));\n        if (value.ptr() == nullptr && PyErr_Occurred()) {\n            throw error_already_set();\n        }\n    }\n\nprivate:\n    object value = {};\n};\n\nclass type : public object {\npublic:\n    PYBIND11_OBJECT(type, object, PyType_Check)\n\n    /// Return a type handle from a handle or an object\n    static handle handle_of(handle h) { return handle((PyObject *) Py_TYPE(h.ptr())); }\n\n    /// Return a type object from a handle or an object\n    static type of(handle h) { return type(type::handle_of(h), borrowed_t{}); }\n\n    // Defined in pybind11/cast.h\n    /// Convert C++ type to handle if previously registered. Does not convert\n    /// standard types, like int, float. etc. yet.\n    /// See https://github.com/pybind/pybind11/issues/2486\n    template <typename T>\n    static handle handle_of();\n\n    /// Convert C++ type to type if previously registered. Does not convert\n    /// standard types, like int, float. etc. yet.\n    /// See https://github.com/pybind/pybind11/issues/2486\n    template <typename T>\n    static type of() {\n        return type(type::handle_of<T>(), borrowed_t{});\n    }\n};\n\nclass iterable : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(iterable, object, detail::PyIterable_Check)\n};\n\nclass bytes;\n\nclass str : public object {\npublic:\n    PYBIND11_OBJECT_CVT(str, object, PYBIND11_STR_CHECK_FUN, raw_str)\n\n    template <typename SzType, detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>\n    str(const char *c, const SzType &n)\n        : object(PyUnicode_FromStringAndSize(c, ssize_t_cast(n)), stolen_t{}) {\n        if (!m_ptr) {\n            if (PyErr_Occurred()) {\n                throw error_already_set();\n            }\n            pybind11_fail(\"Could not allocate string object!\");\n        }\n    }\n\n    // 'explicit' is explicitly omitted from the following constructors to allow implicit\n    // conversion to py::str from C++ string-like objects\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    str(const char *c = \"\") : object(PyUnicode_FromString(c), stolen_t{}) {\n        if (!m_ptr) {\n            if (PyErr_Occurred()) {\n                throw error_already_set();\n            }\n            pybind11_fail(\"Could not allocate string object!\");\n        }\n    }\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    str(const std::string &s) : str(s.data(), s.size()) {}\n\n#ifdef PYBIND11_HAS_STRING_VIEW\n    // enable_if is needed to avoid \"ambiguous conversion\" errors (see PR #3521).\n    template <typename T, detail::enable_if_t<std::is_same<T, std::string_view>::value, int> = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    str(T s) : str(s.data(), s.size()) {}\n\n#    ifdef PYBIND11_HAS_U8STRING\n    // reinterpret_cast here is safe (C++20 guarantees char8_t has the same size/alignment as char)\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    str(std::u8string_view s) : str(reinterpret_cast<const char *>(s.data()), s.size()) {}\n#    endif\n\n#endif\n\n    explicit str(const bytes &b);\n\n    /** \\rst\n        Return a string representation of the object. This is analogous to\n        the ``str()`` function in Python.\n    \\endrst */\n    explicit str(handle h) : object(raw_str(h.ptr()), stolen_t{}) {\n        if (!m_ptr) {\n            throw error_already_set();\n        }\n    }\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator std::string() const {\n        object temp = *this;\n        if (PyUnicode_Check(m_ptr)) {\n            temp = reinterpret_steal<object>(PyUnicode_AsUTF8String(m_ptr));\n            if (!temp) {\n                throw error_already_set();\n            }\n        }\n        char *buffer = nullptr;\n        ssize_t length = 0;\n        if (PyBytes_AsStringAndSize(temp.ptr(), &buffer, &length) != 0) {\n            throw error_already_set();\n        }\n        return std::string(buffer, (size_t) length);\n    }\n\n    template <typename... Args>\n    str format(Args &&...args) const {\n        return attr(\"format\")(std::forward<Args>(args)...);\n    }\n\nprivate:\n    /// Return string representation -- always returns a new reference, even if already a str\n    static PyObject *raw_str(PyObject *op) {\n        PyObject *str_value = PyObject_Str(op);\n        return str_value;\n    }\n};\n/// @} pytypes\n\ninline namespace literals {\n/** \\rst\n    String literal version of `str`\n \\endrst */\ninline str operator\"\" _s(const char *s, size_t size) { return {s, size}; }\n} // namespace literals\n\n/// \\addtogroup pytypes\n/// @{\nclass bytes : public object {\npublic:\n    PYBIND11_OBJECT(bytes, object, PYBIND11_BYTES_CHECK)\n\n    // Allow implicit conversion:\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    bytes(const char *c = \"\") : object(PYBIND11_BYTES_FROM_STRING(c), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate bytes object!\");\n        }\n    }\n\n    template <typename SzType, detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>\n    bytes(const char *c, const SzType &n)\n        : object(PYBIND11_BYTES_FROM_STRING_AND_SIZE(c, ssize_t_cast(n)), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate bytes object!\");\n        }\n    }\n\n    // Allow implicit conversion:\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    bytes(const std::string &s) : bytes(s.data(), s.size()) {}\n\n    explicit bytes(const pybind11::str &s);\n\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator std::string() const { return string_op<std::string>(); }\n\n#ifdef PYBIND11_HAS_STRING_VIEW\n    // enable_if is needed to avoid \"ambiguous conversion\" errors (see PR #3521).\n    template <typename T, detail::enable_if_t<std::is_same<T, std::string_view>::value, int> = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    bytes(T s) : bytes(s.data(), s.size()) {}\n\n    // Obtain a string view that views the current `bytes` buffer value.  Note that this is only\n    // valid so long as the `bytes` instance remains alive and so generally should not outlive the\n    // lifetime of the `bytes` instance.\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator std::string_view() const { return string_op<std::string_view>(); }\n#endif\nprivate:\n    template <typename T>\n    T string_op() const {\n        char *buffer = nullptr;\n        ssize_t length = 0;\n        if (PyBytes_AsStringAndSize(m_ptr, &buffer, &length) != 0) {\n            throw error_already_set();\n        }\n        return {buffer, static_cast<size_t>(length)};\n    }\n};\n// Note: breathe >= 4.17.0 will fail to build docs if the below two constructors\n// are included in the doxygen group; close here and reopen after as a workaround\n/// @} pytypes\n\ninline bytes::bytes(const pybind11::str &s) {\n    object temp = s;\n    if (PyUnicode_Check(s.ptr())) {\n        temp = reinterpret_steal<object>(PyUnicode_AsUTF8String(s.ptr()));\n        if (!temp) {\n            throw error_already_set();\n        }\n    }\n    char *buffer = nullptr;\n    ssize_t length = 0;\n    if (PyBytes_AsStringAndSize(temp.ptr(), &buffer, &length) != 0) {\n        throw error_already_set();\n    }\n    auto obj = reinterpret_steal<object>(PYBIND11_BYTES_FROM_STRING_AND_SIZE(buffer, length));\n    if (!obj) {\n        pybind11_fail(\"Could not allocate bytes object!\");\n    }\n    m_ptr = obj.release().ptr();\n}\n\ninline str::str(const bytes &b) {\n    char *buffer = nullptr;\n    ssize_t length = 0;\n    if (PyBytes_AsStringAndSize(b.ptr(), &buffer, &length) != 0) {\n        throw error_already_set();\n    }\n    auto obj = reinterpret_steal<object>(PyUnicode_FromStringAndSize(buffer, length));\n    if (!obj) {\n        if (PyErr_Occurred()) {\n            throw error_already_set();\n        }\n        pybind11_fail(\"Could not allocate string object!\");\n    }\n    m_ptr = obj.release().ptr();\n}\n\n/// \\addtogroup pytypes\n/// @{\nclass bytearray : public object {\npublic:\n    PYBIND11_OBJECT_CVT(bytearray, object, PyByteArray_Check, PyByteArray_FromObject)\n\n    template <typename SzType, detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>\n    bytearray(const char *c, const SzType &n)\n        : object(PyByteArray_FromStringAndSize(c, ssize_t_cast(n)), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate bytearray object!\");\n        }\n    }\n\n    bytearray() : bytearray(\"\", 0) {}\n\n    explicit bytearray(const std::string &s) : bytearray(s.data(), s.size()) {}\n\n    size_t size() const { return static_cast<size_t>(PyByteArray_Size(m_ptr)); }\n\n    explicit operator std::string() const {\n        char *buffer = PyByteArray_AS_STRING(m_ptr);\n        ssize_t size = PyByteArray_GET_SIZE(m_ptr);\n        return std::string(buffer, static_cast<size_t>(size));\n    }\n};\n// Note: breathe >= 4.17.0 will fail to build docs if the below two constructors\n// are included in the doxygen group; close here and reopen after as a workaround\n/// @} pytypes\n\n/// \\addtogroup pytypes\n/// @{\nclass none : public object {\npublic:\n    PYBIND11_OBJECT(none, object, detail::PyNone_Check)\n    none() : object(Py_None, borrowed_t{}) {}\n};\n\nclass ellipsis : public object {\npublic:\n    PYBIND11_OBJECT(ellipsis, object, detail::PyEllipsis_Check)\n    ellipsis() : object(Py_Ellipsis, borrowed_t{}) {}\n};\n\nclass bool_ : public object {\npublic:\n    PYBIND11_OBJECT_CVT(bool_, object, PyBool_Check, raw_bool)\n    bool_() : object(Py_False, borrowed_t{}) {}\n    // Allow implicit conversion from and to `bool`:\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    bool_(bool value) : object(value ? Py_True : Py_False, borrowed_t{}) {}\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator bool() const { return (m_ptr != nullptr) && PyLong_AsLong(m_ptr) != 0; }\n\nprivate:\n    /// Return the truth value of an object -- always returns a new reference\n    static PyObject *raw_bool(PyObject *op) {\n        const auto value = PyObject_IsTrue(op);\n        if (value == -1) {\n            return nullptr;\n        }\n        return handle(value != 0 ? Py_True : Py_False).inc_ref().ptr();\n    }\n};\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n// Converts a value to the given unsigned type.  If an error occurs, you get back (Unsigned) -1;\n// otherwise you get back the unsigned long or unsigned long long value cast to (Unsigned).\n// (The distinction is critically important when casting a returned -1 error value to some other\n// unsigned type: (A)-1 != (B)-1 when A and B are unsigned types of different sizes).\ntemplate <typename Unsigned>\nUnsigned as_unsigned(PyObject *o) {\n    if (sizeof(Unsigned) <= sizeof(unsigned long)) {\n        unsigned long v = PyLong_AsUnsignedLong(o);\n        return v == (unsigned long) -1 && PyErr_Occurred() ? (Unsigned) -1 : (Unsigned) v;\n    }\n    unsigned long long v = PyLong_AsUnsignedLongLong(o);\n    return v == (unsigned long long) -1 && PyErr_Occurred() ? (Unsigned) -1 : (Unsigned) v;\n}\nPYBIND11_NAMESPACE_END(detail)\n\nclass int_ : public object {\npublic:\n    PYBIND11_OBJECT_CVT(int_, object, PYBIND11_LONG_CHECK, PyNumber_Long)\n    int_() : object(PyLong_FromLong(0), stolen_t{}) {}\n    // Allow implicit conversion from C++ integral types:\n    template <typename T, detail::enable_if_t<std::is_integral<T>::value, int> = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    int_(T value) {\n        if (sizeof(T) <= sizeof(long)) {\n            if (std::is_signed<T>::value) {\n                m_ptr = PyLong_FromLong((long) value);\n            } else {\n                m_ptr = PyLong_FromUnsignedLong((unsigned long) value);\n            }\n        } else {\n            if (std::is_signed<T>::value) {\n                m_ptr = PyLong_FromLongLong((long long) value);\n            } else {\n                m_ptr = PyLong_FromUnsignedLongLong((unsigned long long) value);\n            }\n        }\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate int object!\");\n        }\n    }\n\n    template <typename T, detail::enable_if_t<std::is_integral<T>::value, int> = 0>\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator T() const {\n        return std::is_unsigned<T>::value  ? detail::as_unsigned<T>(m_ptr)\n               : sizeof(T) <= sizeof(long) ? (T) PyLong_AsLong(m_ptr)\n                                           : (T) PYBIND11_LONG_AS_LONGLONG(m_ptr);\n    }\n};\n\nclass float_ : public object {\npublic:\n    PYBIND11_OBJECT_CVT(float_, object, PyFloat_Check, PyNumber_Float)\n    // Allow implicit conversion from float/double:\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    float_(float value) : object(PyFloat_FromDouble((double) value), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate float object!\");\n        }\n    }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    float_(double value = .0) : object(PyFloat_FromDouble((double) value), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate float object!\");\n        }\n    }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator float() const { return (float) PyFloat_AsDouble(m_ptr); }\n    // NOLINTNEXTLINE(google-explicit-constructor)\n    operator double() const { return (double) PyFloat_AsDouble(m_ptr); }\n};\n\nclass weakref : public object {\npublic:\n    PYBIND11_OBJECT_CVT_DEFAULT(weakref, object, PyWeakref_Check, raw_weakref)\n    explicit weakref(handle obj, handle callback = {})\n        : object(PyWeakref_NewRef(obj.ptr(), callback.ptr()), stolen_t{}) {\n        if (!m_ptr) {\n            if (PyErr_Occurred()) {\n                throw error_already_set();\n            }\n            pybind11_fail(\"Could not allocate weak reference!\");\n        }\n    }\n\nprivate:\n    static PyObject *raw_weakref(PyObject *o) { return PyWeakref_NewRef(o, nullptr); }\n};\n\nclass slice : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(slice, object, PySlice_Check)\n    slice(handle start, handle stop, handle step)\n        : object(PySlice_New(start.ptr(), stop.ptr(), step.ptr()), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate slice object!\");\n        }\n    }\n\n#ifdef PYBIND11_HAS_OPTIONAL\n    slice(std::optional<ssize_t> start, std::optional<ssize_t> stop, std::optional<ssize_t> step)\n        : slice(index_to_object(start), index_to_object(stop), index_to_object(step)) {}\n#else\n    slice(ssize_t start_, ssize_t stop_, ssize_t step_)\n        : slice(int_(start_), int_(stop_), int_(step_)) {}\n#endif\n\n    bool\n    compute(size_t length, size_t *start, size_t *stop, size_t *step, size_t *slicelength) const {\n        return PySlice_GetIndicesEx((PYBIND11_SLICE_OBJECT *) m_ptr,\n                                    (ssize_t) length,\n                                    (ssize_t *) start,\n                                    (ssize_t *) stop,\n                                    (ssize_t *) step,\n                                    (ssize_t *) slicelength)\n               == 0;\n    }\n    bool compute(\n        ssize_t length, ssize_t *start, ssize_t *stop, ssize_t *step, ssize_t *slicelength) const {\n        return PySlice_GetIndicesEx(\n                   (PYBIND11_SLICE_OBJECT *) m_ptr, length, start, stop, step, slicelength)\n               == 0;\n    }\n\nprivate:\n    template <typename T>\n    static object index_to_object(T index) {\n        return index ? object(int_(*index)) : object(none());\n    }\n};\n\nclass capsule : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(capsule, object, PyCapsule_CheckExact)\n    PYBIND11_DEPRECATED(\"Use reinterpret_borrow<capsule>() or reinterpret_steal<capsule>()\")\n    capsule(PyObject *ptr, bool is_borrowed)\n        : object(is_borrowed ? object(ptr, borrowed_t{}) : object(ptr, stolen_t{})) {}\n\n    explicit capsule(const void *value,\n                     const char *name = nullptr,\n                     PyCapsule_Destructor destructor = nullptr)\n        : object(PyCapsule_New(const_cast<void *>(value), name, destructor), stolen_t{}) {\n        if (!m_ptr) {\n            throw error_already_set();\n        }\n    }\n\n    PYBIND11_DEPRECATED(\"Please use the ctor with value, name, destructor args\")\n    capsule(const void *value, PyCapsule_Destructor destructor)\n        : object(PyCapsule_New(const_cast<void *>(value), nullptr, destructor), stolen_t{}) {\n        if (!m_ptr) {\n            throw error_already_set();\n        }\n    }\n\n    /// Capsule name is nullptr.\n    capsule(const void *value, void (*destructor)(void *)) {\n        initialize_with_void_ptr_destructor(value, nullptr, destructor);\n    }\n\n    capsule(const void *value, const char *name, void (*destructor)(void *)) {\n        initialize_with_void_ptr_destructor(value, name, destructor);\n    }\n\n    explicit capsule(void (*destructor)()) {\n        m_ptr = PyCapsule_New(reinterpret_cast<void *>(destructor), nullptr, [](PyObject *o) {\n            const char *name = get_name_in_error_scope(o);\n            auto destructor = reinterpret_cast<void (*)()>(PyCapsule_GetPointer(o, name));\n            if (destructor == nullptr) {\n                throw error_already_set();\n            }\n            destructor();\n        });\n\n        if (!m_ptr) {\n            throw error_already_set();\n        }\n    }\n\n    template <typename T>\n    operator T *() const { // NOLINT(google-explicit-constructor)\n        return get_pointer<T>();\n    }\n\n    /// Get the pointer the capsule holds.\n    template <typename T = void>\n    T *get_pointer() const {\n        const auto *name = this->name();\n        T *result = static_cast<T *>(PyCapsule_GetPointer(m_ptr, name));\n        if (!result) {\n            throw error_already_set();\n        }\n        return result;\n    }\n\n    /// Replaces a capsule's pointer *without* calling the destructor on the existing one.\n    void set_pointer(const void *value) {\n        if (PyCapsule_SetPointer(m_ptr, const_cast<void *>(value)) != 0) {\n            throw error_already_set();\n        }\n    }\n\n    const char *name() const {\n        const char *name = PyCapsule_GetName(m_ptr);\n        if ((name == nullptr) && PyErr_Occurred()) {\n            throw error_already_set();\n        }\n        return name;\n    }\n\n    /// Replaces a capsule's name *without* calling the destructor on the existing one.\n    void set_name(const char *new_name) {\n        if (PyCapsule_SetName(m_ptr, new_name) != 0) {\n            throw error_already_set();\n        }\n    }\n\nprivate:\n    static const char *get_name_in_error_scope(PyObject *o) {\n        error_scope error_guard;\n\n        const char *name = PyCapsule_GetName(o);\n        if ((name == nullptr) && PyErr_Occurred()) {\n            // write out and consume error raised by call to PyCapsule_GetName\n            PyErr_WriteUnraisable(o);\n        }\n\n        return name;\n    }\n\n    void initialize_with_void_ptr_destructor(const void *value,\n                                             const char *name,\n                                             void (*destructor)(void *)) {\n        m_ptr = PyCapsule_New(const_cast<void *>(value), name, [](PyObject *o) {\n            // guard if destructor called while err indicator is set\n            error_scope error_guard;\n            auto destructor = reinterpret_cast<void (*)(void *)>(PyCapsule_GetContext(o));\n            if (destructor == nullptr && PyErr_Occurred()) {\n                throw error_already_set();\n            }\n            const char *name = get_name_in_error_scope(o);\n            void *ptr = PyCapsule_GetPointer(o, name);\n            if (ptr == nullptr) {\n                throw error_already_set();\n            }\n\n            if (destructor != nullptr) {\n                destructor(ptr);\n            }\n        });\n\n        if (!m_ptr || PyCapsule_SetContext(m_ptr, reinterpret_cast<void *>(destructor)) != 0) {\n            throw error_already_set();\n        }\n    }\n};\n\nclass tuple : public object {\npublic:\n    PYBIND11_OBJECT_CVT(tuple, object, PyTuple_Check, PySequence_Tuple)\n    template <typename SzType = ssize_t,\n              detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>\n    // Some compilers generate link errors when using `const SzType &` here:\n    explicit tuple(SzType size = 0) : object(PyTuple_New(ssize_t_cast(size)), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate tuple object!\");\n        }\n    }\n    size_t size() const { return (size_t) PyTuple_Size(m_ptr); }\n    bool empty() const { return size() == 0; }\n    detail::tuple_accessor operator[](size_t index) const { return {*this, index}; }\n    template <typename T, detail::enable_if_t<detail::is_pyobject<T>::value, int> = 0>\n    detail::item_accessor operator[](T &&o) const {\n        return object::operator[](std::forward<T>(o));\n    }\n    detail::tuple_iterator begin() const { return {*this, 0}; }\n    detail::tuple_iterator end() const { return {*this, PyTuple_GET_SIZE(m_ptr)}; }\n};\n\n// We need to put this into a separate function because the Intel compiler\n// fails to compile enable_if_t<all_of<is_keyword_or_ds<Args>...>::value> part below\n// (tested with ICC 2021.1 Beta 20200827).\ntemplate <typename... Args>\nconstexpr bool args_are_all_keyword_or_ds() {\n    return detail::all_of<detail::is_keyword_or_ds<Args>...>::value;\n}\n\nclass dict : public object {\npublic:\n    PYBIND11_OBJECT_CVT(dict, object, PyDict_Check, raw_dict)\n    dict() : object(PyDict_New(), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate dict object!\");\n        }\n    }\n    template <typename... Args,\n              typename = detail::enable_if_t<args_are_all_keyword_or_ds<Args...>()>,\n              // MSVC workaround: it can't compile an out-of-line definition, so defer the\n              // collector\n              typename collector = detail::deferred_t<detail::unpacking_collector<>, Args...>>\n    explicit dict(Args &&...args) : dict(collector(std::forward<Args>(args)...).kwargs()) {}\n\n    size_t size() const { return (size_t) PyDict_Size(m_ptr); }\n    bool empty() const { return size() == 0; }\n    detail::dict_iterator begin() const { return {*this, 0}; }\n    detail::dict_iterator end() const { return {}; }\n    void clear() /* py-non-const */ { PyDict_Clear(ptr()); }\n    template <typename T>\n    bool contains(T &&key) const {\n        auto result = PyDict_Contains(m_ptr, detail::object_or_cast(std::forward<T>(key)).ptr());\n        if (result == -1) {\n            throw error_already_set();\n        }\n        return result == 1;\n    }\n\nprivate:\n    /// Call the `dict` Python type -- always returns a new reference\n    static PyObject *raw_dict(PyObject *op) {\n        if (PyDict_Check(op)) {\n            return handle(op).inc_ref().ptr();\n        }\n        return PyObject_CallFunctionObjArgs((PyObject *) &PyDict_Type, op, nullptr);\n    }\n};\n\nclass sequence : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(sequence, object, PySequence_Check)\n    size_t size() const {\n        ssize_t result = PySequence_Size(m_ptr);\n        if (result == -1) {\n            throw error_already_set();\n        }\n        return (size_t) result;\n    }\n    bool empty() const { return size() == 0; }\n    detail::sequence_accessor operator[](size_t index) const { return {*this, index}; }\n    template <typename T, detail::enable_if_t<detail::is_pyobject<T>::value, int> = 0>\n    detail::item_accessor operator[](T &&o) const {\n        return object::operator[](std::forward<T>(o));\n    }\n    detail::sequence_iterator begin() const { return {*this, 0}; }\n    detail::sequence_iterator end() const { return {*this, PySequence_Size(m_ptr)}; }\n};\n\nclass list : public object {\npublic:\n    PYBIND11_OBJECT_CVT(list, object, PyList_Check, PySequence_List)\n    template <typename SzType = ssize_t,\n              detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>\n    // Some compilers generate link errors when using `const SzType &` here:\n    explicit list(SzType size = 0) : object(PyList_New(ssize_t_cast(size)), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate list object!\");\n        }\n    }\n    size_t size() const { return (size_t) PyList_Size(m_ptr); }\n    bool empty() const { return size() == 0; }\n    detail::list_accessor operator[](size_t index) const { return {*this, index}; }\n    template <typename T, detail::enable_if_t<detail::is_pyobject<T>::value, int> = 0>\n    detail::item_accessor operator[](T &&o) const {\n        return object::operator[](std::forward<T>(o));\n    }\n    detail::list_iterator begin() const { return {*this, 0}; }\n    detail::list_iterator end() const { return {*this, PyList_GET_SIZE(m_ptr)}; }\n    template <typename T>\n    void append(T &&val) /* py-non-const */ {\n        if (PyList_Append(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr()) != 0) {\n            throw error_already_set();\n        }\n    }\n    template <typename IdxType,\n              typename ValType,\n              detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>\n    void insert(const IdxType &index, ValType &&val) /* py-non-const */ {\n        if (PyList_Insert(m_ptr,\n                          ssize_t_cast(index),\n                          detail::object_or_cast(std::forward<ValType>(val)).ptr())\n            != 0) {\n            throw error_already_set();\n        }\n    }\n};\n\nclass args : public tuple {\n    PYBIND11_OBJECT_DEFAULT(args, tuple, PyTuple_Check)\n};\nclass kwargs : public dict {\n    PYBIND11_OBJECT_DEFAULT(kwargs, dict, PyDict_Check)\n};\n\nclass anyset : public object {\npublic:\n    PYBIND11_OBJECT(anyset, object, PyAnySet_Check)\n    size_t size() const { return static_cast<size_t>(PySet_Size(m_ptr)); }\n    bool empty() const { return size() == 0; }\n    template <typename T>\n    bool contains(T &&val) const {\n        auto result = PySet_Contains(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr());\n        if (result == -1) {\n            throw error_already_set();\n        }\n        return result == 1;\n    }\n};\n\nclass set : public anyset {\npublic:\n    PYBIND11_OBJECT_CVT(set, anyset, PySet_Check, PySet_New)\n    set() : anyset(PySet_New(nullptr), stolen_t{}) {\n        if (!m_ptr) {\n            pybind11_fail(\"Could not allocate set object!\");\n        }\n    }\n    template <typename T>\n    bool add(T &&val) /* py-non-const */ {\n        return PySet_Add(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr()) == 0;\n    }\n    void clear() /* py-non-const */ { PySet_Clear(m_ptr); }\n};\n\nclass frozenset : public anyset {\npublic:\n    PYBIND11_OBJECT_CVT(frozenset, anyset, PyFrozenSet_Check, PyFrozenSet_New)\n};\n\nclass function : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(function, object, PyCallable_Check)\n    handle cpp_function() const {\n        handle fun = detail::get_function(m_ptr);\n        if (fun && PyCFunction_Check(fun.ptr())) {\n            return fun;\n        }\n        return handle();\n    }\n    bool is_cpp_function() const { return (bool) cpp_function(); }\n};\n\nclass staticmethod : public object {\npublic:\n    PYBIND11_OBJECT_CVT(staticmethod, object, detail::PyStaticMethod_Check, PyStaticMethod_New)\n};\n\nclass buffer : public object {\npublic:\n    PYBIND11_OBJECT_DEFAULT(buffer, object, PyObject_CheckBuffer)\n\n    buffer_info request(bool writable = false) const {\n        int flags = PyBUF_STRIDES | PyBUF_FORMAT;\n        if (writable) {\n            flags |= PyBUF_WRITABLE;\n        }\n        auto *view = new Py_buffer();\n        if (PyObject_GetBuffer(m_ptr, view, flags) != 0) {\n            delete view;\n            throw error_already_set();\n        }\n        return buffer_info(view);\n    }\n};\n\nclass memoryview : public object {\npublic:\n    PYBIND11_OBJECT_CVT(memoryview, object, PyMemoryView_Check, PyMemoryView_FromObject)\n\n    /** \\rst\n        Creates ``memoryview`` from ``buffer_info``.\n\n        ``buffer_info`` must be created from ``buffer::request()``. Otherwise\n        throws an exception.\n\n        For creating a ``memoryview`` from objects that support buffer protocol,\n        use ``memoryview(const object& obj)`` instead of this constructor.\n     \\endrst */\n    explicit memoryview(const buffer_info &info) {\n        if (!info.view()) {\n            pybind11_fail(\"Prohibited to create memoryview without Py_buffer\");\n        }\n        // Note: PyMemoryView_FromBuffer never increments obj reference.\n        m_ptr = (info.view()->obj) ? PyMemoryView_FromObject(info.view()->obj)\n                                   : PyMemoryView_FromBuffer(info.view());\n        if (!m_ptr) {\n            pybind11_fail(\"Unable to create memoryview from buffer descriptor\");\n        }\n    }\n\n    /** \\rst\n        Creates ``memoryview`` from static buffer.\n\n        This method is meant for providing a ``memoryview`` for C/C++ buffer not\n        managed by Python. The caller is responsible for managing the lifetime\n        of ``ptr`` and ``format``, which MUST outlive the memoryview constructed\n        here.\n\n        See also: Python C API documentation for `PyMemoryView_FromBuffer`_.\n\n        .. _PyMemoryView_FromBuffer:\n           https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromBuffer\n\n        :param ptr: Pointer to the buffer.\n        :param itemsize: Byte size of an element.\n        :param format: Pointer to the null-terminated format string. For\n            homogeneous Buffers, this should be set to\n            ``format_descriptor<T>::value``.\n        :param shape: Shape of the tensor (1 entry per dimension).\n        :param strides: Number of bytes between adjacent entries (for each\n            per dimension).\n        :param readonly: Flag to indicate if the underlying storage may be\n            written to.\n     \\endrst */\n    static memoryview from_buffer(void *ptr,\n                                  ssize_t itemsize,\n                                  const char *format,\n                                  detail::any_container<ssize_t> shape,\n                                  detail::any_container<ssize_t> strides,\n                                  bool readonly = false);\n\n    static memoryview from_buffer(const void *ptr,\n                                  ssize_t itemsize,\n                                  const char *format,\n                                  detail::any_container<ssize_t> shape,\n                                  detail::any_container<ssize_t> strides) {\n        return memoryview::from_buffer(\n            const_cast<void *>(ptr), itemsize, format, std::move(shape), std::move(strides), true);\n    }\n\n    template <typename T>\n    static memoryview from_buffer(T *ptr,\n                                  detail::any_container<ssize_t> shape,\n                                  detail::any_container<ssize_t> strides,\n                                  bool readonly = false) {\n        return memoryview::from_buffer(reinterpret_cast<void *>(ptr),\n                                       sizeof(T),\n                                       format_descriptor<T>::value,\n                                       std::move(shape),\n                                       std::move(strides),\n                                       readonly);\n    }\n\n    template <typename T>\n    static memoryview from_buffer(const T *ptr,\n                                  detail::any_container<ssize_t> shape,\n                                  detail::any_container<ssize_t> strides) {\n        return memoryview::from_buffer(\n            const_cast<T *>(ptr), std::move(shape), std::move(strides), true);\n    }\n\n    /** \\rst\n        Creates ``memoryview`` from static memory.\n\n        This method is meant for providing a ``memoryview`` for C/C++ buffer not\n        managed by Python. The caller is responsible for managing the lifetime\n        of ``mem``, which MUST outlive the memoryview constructed here.\n\n        See also: Python C API documentation for `PyMemoryView_FromBuffer`_.\n\n        .. _PyMemoryView_FromMemory:\n           https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromMemory\n     \\endrst */\n    static memoryview from_memory(void *mem, ssize_t size, bool readonly = false) {\n        PyObject *ptr = PyMemoryView_FromMemory(\n            reinterpret_cast<char *>(mem), size, (readonly) ? PyBUF_READ : PyBUF_WRITE);\n        if (!ptr) {\n            pybind11_fail(\"Could not allocate memoryview object!\");\n        }\n        return memoryview(object(ptr, stolen_t{}));\n    }\n\n    static memoryview from_memory(const void *mem, ssize_t size) {\n        return memoryview::from_memory(const_cast<void *>(mem), size, true);\n    }\n\n#ifdef PYBIND11_HAS_STRING_VIEW\n    static memoryview from_memory(std::string_view mem) {\n        return from_memory(const_cast<char *>(mem.data()), static_cast<ssize_t>(mem.size()), true);\n    }\n#endif\n};\n\n/// @cond DUPLICATE\ninline memoryview memoryview::from_buffer(void *ptr,\n                                          ssize_t itemsize,\n                                          const char *format,\n                                          detail::any_container<ssize_t> shape,\n                                          detail::any_container<ssize_t> strides,\n                                          bool readonly) {\n    size_t ndim = shape->size();\n    if (ndim != strides->size()) {\n        pybind11_fail(\"memoryview: shape length doesn't match strides length\");\n    }\n    ssize_t size = ndim != 0u ? 1 : 0;\n    for (size_t i = 0; i < ndim; ++i) {\n        size *= (*shape)[i];\n    }\n    Py_buffer view;\n    view.buf = ptr;\n    view.obj = nullptr;\n    view.len = size * itemsize;\n    view.readonly = static_cast<int>(readonly);\n    view.itemsize = itemsize;\n    view.format = const_cast<char *>(format);\n    view.ndim = static_cast<int>(ndim);\n    view.shape = shape->data();\n    view.strides = strides->data();\n    view.suboffsets = nullptr;\n    view.internal = nullptr;\n    PyObject *obj = PyMemoryView_FromBuffer(&view);\n    if (!obj) {\n        throw error_already_set();\n    }\n    return memoryview(object(obj, stolen_t{}));\n}\n/// @endcond\n/// @} pytypes\n\n/// \\addtogroup python_builtins\n/// @{\n\n/// Get the length of a Python object.\ninline size_t len(handle h) {\n    ssize_t result = PyObject_Length(h.ptr());\n    if (result < 0) {\n        throw error_already_set();\n    }\n    return (size_t) result;\n}\n\n/// Get the length hint of a Python object.\n/// Returns 0 when this cannot be determined.\ninline size_t len_hint(handle h) {\n    ssize_t result = PyObject_LengthHint(h.ptr(), 0);\n    if (result < 0) {\n        // Sometimes a length can't be determined at all (eg generators)\n        // In which case simply return 0\n        PyErr_Clear();\n        return 0;\n    }\n    return (size_t) result;\n}\n\ninline str repr(handle h) {\n    PyObject *str_value = PyObject_Repr(h.ptr());\n    if (!str_value) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<str>(str_value);\n}\n\ninline iterator iter(handle obj) {\n    PyObject *result = PyObject_GetIter(obj.ptr());\n    if (!result) {\n        throw error_already_set();\n    }\n    return reinterpret_steal<iterator>(result);\n}\n/// @} python_builtins\n\nPYBIND11_NAMESPACE_BEGIN(detail)\ntemplate <typename D>\niterator object_api<D>::begin() const {\n    return iter(derived());\n}\ntemplate <typename D>\niterator object_api<D>::end() const {\n    return iterator::sentinel();\n}\ntemplate <typename D>\nitem_accessor object_api<D>::operator[](handle key) const {\n    return {derived(), reinterpret_borrow<object>(key)};\n}\ntemplate <typename D>\nitem_accessor object_api<D>::operator[](object &&key) const {\n    return {derived(), std::move(key)};\n}\ntemplate <typename D>\nitem_accessor object_api<D>::operator[](const char *key) const {\n    return {derived(), pybind11::str(key)};\n}\ntemplate <typename D>\nobj_attr_accessor object_api<D>::attr(handle key) const {\n    return {derived(), reinterpret_borrow<object>(key)};\n}\ntemplate <typename D>\nobj_attr_accessor object_api<D>::attr(object &&key) const {\n    return {derived(), std::move(key)};\n}\ntemplate <typename D>\nstr_attr_accessor object_api<D>::attr(const char *key) const {\n    return {derived(), key};\n}\ntemplate <typename D>\nargs_proxy object_api<D>::operator*() const {\n    return args_proxy(derived().ptr());\n}\ntemplate <typename D>\ntemplate <typename T>\nbool object_api<D>::contains(T &&item) const {\n    return attr(\"__contains__\")(std::forward<T>(item)).template cast<bool>();\n}\n\ntemplate <typename D>\npybind11::str object_api<D>::str() const {\n    return pybind11::str(derived());\n}\n\ntemplate <typename D>\nstr_attr_accessor object_api<D>::doc() const {\n    return attr(\"__doc__\");\n}\n\ntemplate <typename D>\nhandle object_api<D>::get_type() const {\n    return type::handle_of(derived());\n}\n\ntemplate <typename D>\nbool object_api<D>::rich_compare(object_api const &other, int value) const {\n    int rv = PyObject_RichCompareBool(derived().ptr(), other.derived().ptr(), value);\n    if (rv == -1) {\n        throw error_already_set();\n    }\n    return rv == 1;\n}\n\n#define PYBIND11_MATH_OPERATOR_UNARY(op, fn)                                                      \\\n    template <typename D>                                                                         \\\n    object object_api<D>::op() const {                                                            \\\n        object result = reinterpret_steal<object>(fn(derived().ptr()));                           \\\n        if (!result.ptr())                                                                        \\\n            throw error_already_set();                                                            \\\n        return result;                                                                            \\\n    }\n\n#define PYBIND11_MATH_OPERATOR_BINARY(op, fn)                                                     \\\n    template <typename D>                                                                         \\\n    object object_api<D>::op(object_api const &other) const {                                     \\\n        object result = reinterpret_steal<object>(fn(derived().ptr(), other.derived().ptr()));    \\\n        if (!result.ptr())                                                                        \\\n            throw error_already_set();                                                            \\\n        return result;                                                                            \\\n    }\n\n#define PYBIND11_MATH_OPERATOR_BINARY_INPLACE(iop, fn)                                            \\\n    template <typename D>                                                                         \\\n    object object_api<D>::iop(object_api const &other) {                                          \\\n        object result = reinterpret_steal<object>(fn(derived().ptr(), other.derived().ptr()));    \\\n        if (!result.ptr())                                                                        \\\n            throw error_already_set();                                                            \\\n        return result;                                                                            \\\n    }\n\nPYBIND11_MATH_OPERATOR_UNARY(operator~, PyNumber_Invert)\nPYBIND11_MATH_OPERATOR_UNARY(operator-, PyNumber_Negative)\nPYBIND11_MATH_OPERATOR_BINARY(operator+, PyNumber_Add)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator+=, PyNumber_InPlaceAdd)\nPYBIND11_MATH_OPERATOR_BINARY(operator-, PyNumber_Subtract)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator-=, PyNumber_InPlaceSubtract)\nPYBIND11_MATH_OPERATOR_BINARY(operator*, PyNumber_Multiply)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator*=, PyNumber_InPlaceMultiply)\nPYBIND11_MATH_OPERATOR_BINARY(operator/, PyNumber_TrueDivide)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator/=, PyNumber_InPlaceTrueDivide)\nPYBIND11_MATH_OPERATOR_BINARY(operator|, PyNumber_Or)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator|=, PyNumber_InPlaceOr)\nPYBIND11_MATH_OPERATOR_BINARY(operator&, PyNumber_And)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator&=, PyNumber_InPlaceAnd)\nPYBIND11_MATH_OPERATOR_BINARY(operator^, PyNumber_Xor)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator^=, PyNumber_InPlaceXor)\nPYBIND11_MATH_OPERATOR_BINARY(operator<<, PyNumber_Lshift)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator<<=, PyNumber_InPlaceLshift)\nPYBIND11_MATH_OPERATOR_BINARY(operator>>, PyNumber_Rshift)\nPYBIND11_MATH_OPERATOR_BINARY_INPLACE(operator>>=, PyNumber_InPlaceRshift)\n\n#undef PYBIND11_MATH_OPERATOR_UNARY\n#undef PYBIND11_MATH_OPERATOR_BINARY\n#undef PYBIND11_MATH_OPERATOR_BINARY_INPLACE\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/stl/filesystem.h",
    "content": "// Copyright (c) 2021 The Pybind Development Team.\n// All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n#pragma once\n\n#include \"../pybind11.h\"\n#include \"../detail/common.h\"\n#include \"../detail/descr.h\"\n#include \"../cast.h\"\n#include \"../pytypes.h\"\n\n#include <string>\n\n#ifdef __has_include\n#    if defined(PYBIND11_CPP17)\n#        if __has_include(<filesystem>) && \\\n          PY_VERSION_HEX >= 0x03060000\n#            include <filesystem>\n#            define PYBIND11_HAS_FILESYSTEM 1\n#        elif __has_include(<experimental/filesystem>)\n#            include <experimental/filesystem>\n#            define PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM 1\n#        endif\n#    endif\n#endif\n\n#if !defined(PYBIND11_HAS_FILESYSTEM) && !defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM)           \\\n    && !defined(PYBIND11_HAS_FILESYSTEM_IS_OPTIONAL)\n#    error                                                                                        \\\n        \"Neither #include <filesystem> nor #include <experimental/filesystem is available. (Use -DPYBIND11_HAS_FILESYSTEM_IS_OPTIONAL to ignore.)\"\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n#if defined(PYBIND11_HAS_FILESYSTEM) || defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM)\ntemplate <typename T>\nstruct path_caster {\n\nprivate:\n    static PyObject *unicode_from_fs_native(const std::string &w) {\n#    if !defined(PYPY_VERSION)\n        return PyUnicode_DecodeFSDefaultAndSize(w.c_str(), ssize_t(w.size()));\n#    else\n        // PyPy mistakenly declares the first parameter as non-const.\n        return PyUnicode_DecodeFSDefaultAndSize(const_cast<char *>(w.c_str()), ssize_t(w.size()));\n#    endif\n    }\n\n    static PyObject *unicode_from_fs_native(const std::wstring &w) {\n        return PyUnicode_FromWideChar(w.c_str(), ssize_t(w.size()));\n    }\n\npublic:\n    static handle cast(const T &path, return_value_policy, handle) {\n        if (auto py_str = unicode_from_fs_native(path.native())) {\n            return module_::import(\"pathlib\")\n                .attr(\"Path\")(reinterpret_steal<object>(py_str))\n                .release();\n        }\n        return nullptr;\n    }\n\n    bool load(handle handle, bool) {\n        // PyUnicode_FSConverter and PyUnicode_FSDecoder normally take care of\n        // calling PyOS_FSPath themselves, but that's broken on PyPy (PyPy\n        // issue #3168) so we do it ourselves instead.\n        PyObject *buf = PyOS_FSPath(handle.ptr());\n        if (!buf) {\n            PyErr_Clear();\n            return false;\n        }\n        PyObject *native = nullptr;\n        if constexpr (std::is_same_v<typename T::value_type, char>) {\n            if (PyUnicode_FSConverter(buf, &native) != 0) {\n                if (auto *c_str = PyBytes_AsString(native)) {\n                    // AsString returns a pointer to the internal buffer, which\n                    // must not be free'd.\n                    value = c_str;\n                }\n            }\n        } else if constexpr (std::is_same_v<typename T::value_type, wchar_t>) {\n            if (PyUnicode_FSDecoder(buf, &native) != 0) {\n                if (auto *c_str = PyUnicode_AsWideCharString(native, nullptr)) {\n                    // AsWideCharString returns a new string that must be free'd.\n                    value = c_str; // Copies the string.\n                    PyMem_Free(c_str);\n                }\n            }\n        }\n        Py_XDECREF(native);\n        Py_DECREF(buf);\n        if (PyErr_Occurred()) {\n            PyErr_Clear();\n            return false;\n        }\n        return true;\n    }\n\n    PYBIND11_TYPE_CASTER(T, const_name(\"os.PathLike\"));\n};\n\n#endif // PYBIND11_HAS_FILESYSTEM || defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM)\n\n#if defined(PYBIND11_HAS_FILESYSTEM)\ntemplate <>\nstruct type_caster<std::filesystem::path> : public path_caster<std::filesystem::path> {};\n#elif defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM)\ntemplate <>\nstruct type_caster<std::experimental::filesystem::path>\n    : public path_caster<std::experimental::filesystem::path> {};\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/stl.h",
    "content": "/*\n    pybind11/stl.h: Transparent conversion for STL data types\n\n    Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"pybind11.h\"\n#include \"detail/common.h\"\n\n#include <deque>\n#include <list>\n#include <map>\n#include <ostream>\n#include <set>\n#include <unordered_map>\n#include <unordered_set>\n#include <valarray>\n\n// See `detail/common.h` for implementation of these guards.\n#if defined(PYBIND11_HAS_OPTIONAL)\n#    include <optional>\n#elif defined(PYBIND11_HAS_EXP_OPTIONAL)\n#    include <experimental/optional>\n#endif\n\n#if defined(PYBIND11_HAS_VARIANT)\n#    include <variant>\n#endif\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/// Extracts an const lvalue reference or rvalue reference for U based on the type of T (e.g. for\n/// forwarding a container element).  Typically used indirect via forwarded_type(), below.\ntemplate <typename T, typename U>\nusing forwarded_type = conditional_t<std::is_lvalue_reference<T>::value,\n                                     remove_reference_t<U> &,\n                                     remove_reference_t<U> &&>;\n\n/// Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically\n/// used for forwarding a container's elements.\ntemplate <typename T, typename U>\nconstexpr forwarded_type<T, U> forward_like(U &&u) {\n    return std::forward<detail::forwarded_type<T, U>>(std::forward<U>(u));\n}\n\n// Checks if a container has a STL style reserve method.\n// This will only return true for a `reserve()` with a `void` return.\ntemplate <typename C>\nusing has_reserve_method = std::is_same<decltype(std::declval<C>().reserve(0)), void>;\n\ntemplate <typename Type, typename Key>\nstruct set_caster {\n    using type = Type;\n    using key_conv = make_caster<Key>;\n\nprivate:\n    template <typename T = Type, enable_if_t<has_reserve_method<T>::value, int> = 0>\n    void reserve_maybe(const anyset &s, Type *) {\n        value.reserve(s.size());\n    }\n    void reserve_maybe(const anyset &, void *) {}\n\npublic:\n    bool load(handle src, bool convert) {\n        if (!isinstance<anyset>(src)) {\n            return false;\n        }\n        auto s = reinterpret_borrow<anyset>(src);\n        value.clear();\n        reserve_maybe(s, &value);\n        for (auto entry : s) {\n            key_conv conv;\n            if (!conv.load(entry, convert)) {\n                return false;\n            }\n            value.insert(cast_op<Key &&>(std::move(conv)));\n        }\n        return true;\n    }\n\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        if (!std::is_lvalue_reference<T>::value) {\n            policy = return_value_policy_override<Key>::policy(policy);\n        }\n        pybind11::set s;\n        for (auto &&value : src) {\n            auto value_ = reinterpret_steal<object>(\n                key_conv::cast(detail::forward_like<T>(value), policy, parent));\n            if (!value_ || !s.add(std::move(value_))) {\n                return handle();\n            }\n        }\n        return s.release();\n    }\n\n    PYBIND11_TYPE_CASTER(type, const_name(\"Set[\") + key_conv::name + const_name(\"]\"));\n};\n\ntemplate <typename Type, typename Key, typename Value>\nstruct map_caster {\n    using key_conv = make_caster<Key>;\n    using value_conv = make_caster<Value>;\n\nprivate:\n    template <typename T = Type, enable_if_t<has_reserve_method<T>::value, int> = 0>\n    void reserve_maybe(const dict &d, Type *) {\n        value.reserve(d.size());\n    }\n    void reserve_maybe(const dict &, void *) {}\n\npublic:\n    bool load(handle src, bool convert) {\n        if (!isinstance<dict>(src)) {\n            return false;\n        }\n        auto d = reinterpret_borrow<dict>(src);\n        value.clear();\n        reserve_maybe(d, &value);\n        for (auto it : d) {\n            key_conv kconv;\n            value_conv vconv;\n            if (!kconv.load(it.first.ptr(), convert) || !vconv.load(it.second.ptr(), convert)) {\n                return false;\n            }\n            value.emplace(cast_op<Key &&>(std::move(kconv)), cast_op<Value &&>(std::move(vconv)));\n        }\n        return true;\n    }\n\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        dict d;\n        return_value_policy policy_key = policy;\n        return_value_policy policy_value = policy;\n        if (!std::is_lvalue_reference<T>::value) {\n            policy_key = return_value_policy_override<Key>::policy(policy_key);\n            policy_value = return_value_policy_override<Value>::policy(policy_value);\n        }\n        for (auto &&kv : src) {\n            auto key = reinterpret_steal<object>(\n                key_conv::cast(detail::forward_like<T>(kv.first), policy_key, parent));\n            auto value = reinterpret_steal<object>(\n                value_conv::cast(detail::forward_like<T>(kv.second), policy_value, parent));\n            if (!key || !value) {\n                return handle();\n            }\n            d[std::move(key)] = std::move(value);\n        }\n        return d.release();\n    }\n\n    PYBIND11_TYPE_CASTER(Type,\n                         const_name(\"Dict[\") + key_conv::name + const_name(\", \") + value_conv::name\n                             + const_name(\"]\"));\n};\n\ntemplate <typename Type, typename Value>\nstruct list_caster {\n    using value_conv = make_caster<Value>;\n\n    bool load(handle src, bool convert) {\n        if (!isinstance<sequence>(src) || isinstance<bytes>(src) || isinstance<str>(src)) {\n            return false;\n        }\n        auto s = reinterpret_borrow<sequence>(src);\n        value.clear();\n        reserve_maybe(s, &value);\n        for (auto it : s) {\n            value_conv conv;\n            if (!conv.load(it, convert)) {\n                return false;\n            }\n            value.push_back(cast_op<Value &&>(std::move(conv)));\n        }\n        return true;\n    }\n\nprivate:\n    template <typename T = Type, enable_if_t<has_reserve_method<T>::value, int> = 0>\n    void reserve_maybe(const sequence &s, Type *) {\n        value.reserve(s.size());\n    }\n    void reserve_maybe(const sequence &, void *) {}\n\npublic:\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        if (!std::is_lvalue_reference<T>::value) {\n            policy = return_value_policy_override<Value>::policy(policy);\n        }\n        list l(src.size());\n        ssize_t index = 0;\n        for (auto &&value : src) {\n            auto value_ = reinterpret_steal<object>(\n                value_conv::cast(detail::forward_like<T>(value), policy, parent));\n            if (!value_) {\n                return handle();\n            }\n            PyList_SET_ITEM(l.ptr(), index++, value_.release().ptr()); // steals a reference\n        }\n        return l.release();\n    }\n\n    PYBIND11_TYPE_CASTER(Type, const_name(\"List[\") + value_conv::name + const_name(\"]\"));\n};\n\ntemplate <typename Type, typename Alloc>\nstruct type_caster<std::vector<Type, Alloc>> : list_caster<std::vector<Type, Alloc>, Type> {};\n\ntemplate <typename Type, typename Alloc>\nstruct type_caster<std::deque<Type, Alloc>> : list_caster<std::deque<Type, Alloc>, Type> {};\n\ntemplate <typename Type, typename Alloc>\nstruct type_caster<std::list<Type, Alloc>> : list_caster<std::list<Type, Alloc>, Type> {};\n\ntemplate <typename ArrayType, typename Value, bool Resizable, size_t Size = 0>\nstruct array_caster {\n    using value_conv = make_caster<Value>;\n\nprivate:\n    template <bool R = Resizable>\n    bool require_size(enable_if_t<R, size_t> size) {\n        if (value.size() != size) {\n            value.resize(size);\n        }\n        return true;\n    }\n    template <bool R = Resizable>\n    bool require_size(enable_if_t<!R, size_t> size) {\n        return size == Size;\n    }\n\npublic:\n    bool load(handle src, bool convert) {\n        if (!isinstance<sequence>(src)) {\n            return false;\n        }\n        auto l = reinterpret_borrow<sequence>(src);\n        if (!require_size(l.size())) {\n            return false;\n        }\n        size_t ctr = 0;\n        for (auto it : l) {\n            value_conv conv;\n            if (!conv.load(it, convert)) {\n                return false;\n            }\n            value[ctr++] = cast_op<Value &&>(std::move(conv));\n        }\n        return true;\n    }\n\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        list l(src.size());\n        ssize_t index = 0;\n        for (auto &&value : src) {\n            auto value_ = reinterpret_steal<object>(\n                value_conv::cast(detail::forward_like<T>(value), policy, parent));\n            if (!value_) {\n                return handle();\n            }\n            PyList_SET_ITEM(l.ptr(), index++, value_.release().ptr()); // steals a reference\n        }\n        return l.release();\n    }\n\n    PYBIND11_TYPE_CASTER(ArrayType,\n                         const_name<Resizable>(const_name(\"\"), const_name(\"Annotated[\"))\n                             + const_name(\"List[\") + value_conv::name + const_name(\"]\")\n                             + const_name<Resizable>(const_name(\"\"),\n                                                     const_name(\", FixedSize(\")\n                                                         + const_name<Size>() + const_name(\")]\")));\n};\n\ntemplate <typename Type, size_t Size>\nstruct type_caster<std::array<Type, Size>>\n    : array_caster<std::array<Type, Size>, Type, false, Size> {};\n\ntemplate <typename Type>\nstruct type_caster<std::valarray<Type>> : array_caster<std::valarray<Type>, Type, true> {};\n\ntemplate <typename Key, typename Compare, typename Alloc>\nstruct type_caster<std::set<Key, Compare, Alloc>>\n    : set_caster<std::set<Key, Compare, Alloc>, Key> {};\n\ntemplate <typename Key, typename Hash, typename Equal, typename Alloc>\nstruct type_caster<std::unordered_set<Key, Hash, Equal, Alloc>>\n    : set_caster<std::unordered_set<Key, Hash, Equal, Alloc>, Key> {};\n\ntemplate <typename Key, typename Value, typename Compare, typename Alloc>\nstruct type_caster<std::map<Key, Value, Compare, Alloc>>\n    : map_caster<std::map<Key, Value, Compare, Alloc>, Key, Value> {};\n\ntemplate <typename Key, typename Value, typename Hash, typename Equal, typename Alloc>\nstruct type_caster<std::unordered_map<Key, Value, Hash, Equal, Alloc>>\n    : map_caster<std::unordered_map<Key, Value, Hash, Equal, Alloc>, Key, Value> {};\n\n// This type caster is intended to be used for std::optional and std::experimental::optional\ntemplate <typename Type, typename Value = typename Type::value_type>\nstruct optional_caster {\n    using value_conv = make_caster<Value>;\n\n    template <typename T>\n    static handle cast(T &&src, return_value_policy policy, handle parent) {\n        if (!src) {\n            return none().release();\n        }\n        if (!std::is_lvalue_reference<T>::value) {\n            policy = return_value_policy_override<Value>::policy(policy);\n        }\n        // NOLINTNEXTLINE(bugprone-unchecked-optional-access)\n        return value_conv::cast(*std::forward<T>(src), policy, parent);\n    }\n\n    bool load(handle src, bool convert) {\n        if (!src) {\n            return false;\n        }\n        if (src.is_none()) {\n            return true; // default-constructed value is already empty\n        }\n        value_conv inner_caster;\n        if (!inner_caster.load(src, convert)) {\n            return false;\n        }\n\n        value.emplace(cast_op<Value &&>(std::move(inner_caster)));\n        return true;\n    }\n\n    PYBIND11_TYPE_CASTER(Type, const_name(\"Optional[\") + value_conv::name + const_name(\"]\"));\n};\n\n#if defined(PYBIND11_HAS_OPTIONAL)\ntemplate <typename T>\nstruct type_caster<std::optional<T>> : public optional_caster<std::optional<T>> {};\n\ntemplate <>\nstruct type_caster<std::nullopt_t> : public void_caster<std::nullopt_t> {};\n#endif\n\n#if defined(PYBIND11_HAS_EXP_OPTIONAL)\ntemplate <typename T>\nstruct type_caster<std::experimental::optional<T>>\n    : public optional_caster<std::experimental::optional<T>> {};\n\ntemplate <>\nstruct type_caster<std::experimental::nullopt_t>\n    : public void_caster<std::experimental::nullopt_t> {};\n#endif\n\n/// Visit a variant and cast any found type to Python\nstruct variant_caster_visitor {\n    return_value_policy policy;\n    handle parent;\n\n    using result_type = handle; // required by boost::variant in C++11\n\n    template <typename T>\n    result_type operator()(T &&src) const {\n        return make_caster<T>::cast(std::forward<T>(src), policy, parent);\n    }\n};\n\n/// Helper class which abstracts away variant's `visit` function. `std::variant` and similar\n/// `namespace::variant` types which provide a `namespace::visit()` function are handled here\n/// automatically using argument-dependent lookup. Users can provide specializations for other\n/// variant-like classes, e.g. `boost::variant` and `boost::apply_visitor`.\ntemplate <template <typename...> class Variant>\nstruct visit_helper {\n    template <typename... Args>\n    static auto call(Args &&...args) -> decltype(visit(std::forward<Args>(args)...)) {\n        return visit(std::forward<Args>(args)...);\n    }\n};\n\n/// Generic variant caster\ntemplate <typename Variant>\nstruct variant_caster;\n\ntemplate <template <typename...> class V, typename... Ts>\nstruct variant_caster<V<Ts...>> {\n    static_assert(sizeof...(Ts) > 0, \"Variant must consist of at least one alternative.\");\n\n    template <typename U, typename... Us>\n    bool load_alternative(handle src, bool convert, type_list<U, Us...>) {\n        auto caster = make_caster<U>();\n        if (caster.load(src, convert)) {\n            value = cast_op<U>(std::move(caster));\n            return true;\n        }\n        return load_alternative(src, convert, type_list<Us...>{});\n    }\n\n    bool load_alternative(handle, bool, type_list<>) { return false; }\n\n    bool load(handle src, bool convert) {\n        // Do a first pass without conversions to improve constructor resolution.\n        // E.g. `py::int_(1).cast<variant<double, int>>()` needs to fill the `int`\n        // slot of the variant. Without two-pass loading `double` would be filled\n        // because it appears first and a conversion is possible.\n        if (convert && load_alternative(src, false, type_list<Ts...>{})) {\n            return true;\n        }\n        return load_alternative(src, convert, type_list<Ts...>{});\n    }\n\n    template <typename Variant>\n    static handle cast(Variant &&src, return_value_policy policy, handle parent) {\n        return visit_helper<V>::call(variant_caster_visitor{policy, parent},\n                                     std::forward<Variant>(src));\n    }\n\n    using Type = V<Ts...>;\n    PYBIND11_TYPE_CASTER(Type,\n                         const_name(\"Union[\") + detail::concat(make_caster<Ts>::name...)\n                             + const_name(\"]\"));\n};\n\n#if defined(PYBIND11_HAS_VARIANT)\ntemplate <typename... Ts>\nstruct type_caster<std::variant<Ts...>> : variant_caster<std::variant<Ts...>> {};\n\ntemplate <>\nstruct type_caster<std::monostate> : public void_caster<std::monostate> {};\n#endif\n\nPYBIND11_NAMESPACE_END(detail)\n\ninline std::ostream &operator<<(std::ostream &os, const handle &obj) {\n#ifdef PYBIND11_HAS_STRING_VIEW\n    os << str(obj).cast<std::string_view>();\n#else\n    os << (std::string) str(obj);\n#endif\n    return os;\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/stl_bind.h",
    "content": "/*\n    pybind11/std_bind.h: Binding generators for STL data types\n\n    Copyright (c) 2016 Sergey Lyskov and Wenzel Jakob\n\n    All rights reserved. Use of this source code is governed by a\n    BSD-style license that can be found in the LICENSE file.\n*/\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"detail/type_caster_base.h\"\n#include \"cast.h\"\n#include \"operators.h\"\n\n#include <algorithm>\n#include <sstream>\n#include <type_traits>\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/* SFINAE helper class used by 'is_comparable */\ntemplate <typename T>\nstruct container_traits {\n    template <typename T2>\n    static std::true_type\n    test_comparable(decltype(std::declval<const T2 &>() == std::declval<const T2 &>()) *);\n    template <typename T2>\n    static std::false_type test_comparable(...);\n    template <typename T2>\n    static std::true_type test_value(typename T2::value_type *);\n    template <typename T2>\n    static std::false_type test_value(...);\n    template <typename T2>\n    static std::true_type test_pair(typename T2::first_type *, typename T2::second_type *);\n    template <typename T2>\n    static std::false_type test_pair(...);\n\n    static constexpr const bool is_comparable\n        = std::is_same<std::true_type, decltype(test_comparable<T>(nullptr))>::value;\n    static constexpr const bool is_pair\n        = std::is_same<std::true_type, decltype(test_pair<T>(nullptr, nullptr))>::value;\n    static constexpr const bool is_vector\n        = std::is_same<std::true_type, decltype(test_value<T>(nullptr))>::value;\n    static constexpr const bool is_element = !is_pair && !is_vector;\n};\n\n/* Default: is_comparable -> std::false_type */\ntemplate <typename T, typename SFINAE = void>\nstruct is_comparable : std::false_type {};\n\n/* For non-map data structures, check whether operator== can be instantiated */\ntemplate <typename T>\nstruct is_comparable<\n    T,\n    enable_if_t<container_traits<T>::is_element && container_traits<T>::is_comparable>>\n    : std::true_type {};\n\n/* For a vector/map data structure, recursively check the value type\n   (which is std::pair for maps) */\ntemplate <typename T>\nstruct is_comparable<T, enable_if_t<container_traits<T>::is_vector>>\n    : is_comparable<typename recursive_container_traits<T>::type_to_check_recursively> {};\n\ntemplate <>\nstruct is_comparable<recursive_bottom> : std::true_type {};\n\n/* For pairs, recursively check the two data types */\ntemplate <typename T>\nstruct is_comparable<T, enable_if_t<container_traits<T>::is_pair>> {\n    static constexpr const bool value = is_comparable<typename T::first_type>::value\n                                        && is_comparable<typename T::second_type>::value;\n};\n\n/* Fallback functions */\ntemplate <typename, typename, typename... Args>\nvoid vector_if_copy_constructible(const Args &...) {}\ntemplate <typename, typename, typename... Args>\nvoid vector_if_equal_operator(const Args &...) {}\ntemplate <typename, typename, typename... Args>\nvoid vector_if_insertion_operator(const Args &...) {}\ntemplate <typename, typename, typename... Args>\nvoid vector_modifiers(const Args &...) {}\n\ntemplate <typename Vector, typename Class_>\nvoid vector_if_copy_constructible(enable_if_t<is_copy_constructible<Vector>::value, Class_> &cl) {\n    cl.def(init<const Vector &>(), \"Copy constructor\");\n}\n\ntemplate <typename Vector, typename Class_>\nvoid vector_if_equal_operator(enable_if_t<is_comparable<Vector>::value, Class_> &cl) {\n    using T = typename Vector::value_type;\n\n    cl.def(self == self);\n    cl.def(self != self);\n\n    cl.def(\n        \"count\",\n        [](const Vector &v, const T &x) { return std::count(v.begin(), v.end(), x); },\n        arg(\"x\"),\n        \"Return the number of times ``x`` appears in the list\");\n\n    cl.def(\n        \"remove\",\n        [](Vector &v, const T &x) {\n            auto p = std::find(v.begin(), v.end(), x);\n            if (p != v.end()) {\n                v.erase(p);\n            } else {\n                throw value_error();\n            }\n        },\n        arg(\"x\"),\n        \"Remove the first item from the list whose value is x. \"\n        \"It is an error if there is no such item.\");\n\n    cl.def(\n        \"__contains__\",\n        [](const Vector &v, const T &x) { return std::find(v.begin(), v.end(), x) != v.end(); },\n        arg(\"x\"),\n        \"Return true the container contains ``x``\");\n}\n\n// Vector modifiers -- requires a copyable vector_type:\n// (Technically, some of these (pop and __delitem__) don't actually require copyability, but it\n// seems silly to allow deletion but not insertion, so include them here too.)\ntemplate <typename Vector, typename Class_>\nvoid vector_modifiers(\n    enable_if_t<is_copy_constructible<typename Vector::value_type>::value, Class_> &cl) {\n    using T = typename Vector::value_type;\n    using SizeType = typename Vector::size_type;\n    using DiffType = typename Vector::difference_type;\n\n    auto wrap_i = [](DiffType i, SizeType n) {\n        if (i < 0) {\n            i += n;\n        }\n        if (i < 0 || (SizeType) i >= n) {\n            throw index_error();\n        }\n        return i;\n    };\n\n    cl.def(\n        \"append\",\n        [](Vector &v, const T &value) { v.push_back(value); },\n        arg(\"x\"),\n        \"Add an item to the end of the list\");\n\n    cl.def(init([](const iterable &it) {\n        auto v = std::unique_ptr<Vector>(new Vector());\n        v->reserve(len_hint(it));\n        for (handle h : it) {\n            v->push_back(h.cast<T>());\n        }\n        return v.release();\n    }));\n\n    cl.def(\n        \"clear\", [](Vector &v) { v.clear(); }, \"Clear the contents\");\n\n    cl.def(\n        \"extend\",\n        [](Vector &v, const Vector &src) { v.insert(v.end(), src.begin(), src.end()); },\n        arg(\"L\"),\n        \"Extend the list by appending all the items in the given list\");\n\n    cl.def(\n        \"extend\",\n        [](Vector &v, const iterable &it) {\n            const size_t old_size = v.size();\n            v.reserve(old_size + len_hint(it));\n            try {\n                for (handle h : it) {\n                    v.push_back(h.cast<T>());\n                }\n            } catch (const cast_error &) {\n                v.erase(v.begin() + static_cast<typename Vector::difference_type>(old_size),\n                        v.end());\n                try {\n                    v.shrink_to_fit();\n                } catch (const std::exception &) {\n                    // Do nothing\n                }\n                throw;\n            }\n        },\n        arg(\"L\"),\n        \"Extend the list by appending all the items in the given list\");\n\n    cl.def(\n        \"insert\",\n        [](Vector &v, DiffType i, const T &x) {\n            // Can't use wrap_i; i == v.size() is OK\n            if (i < 0) {\n                i += v.size();\n            }\n            if (i < 0 || (SizeType) i > v.size()) {\n                throw index_error();\n            }\n            v.insert(v.begin() + i, x);\n        },\n        arg(\"i\"),\n        arg(\"x\"),\n        \"Insert an item at a given position.\");\n\n    cl.def(\n        \"pop\",\n        [](Vector &v) {\n            if (v.empty()) {\n                throw index_error();\n            }\n            T t = std::move(v.back());\n            v.pop_back();\n            return t;\n        },\n        \"Remove and return the last item\");\n\n    cl.def(\n        \"pop\",\n        [wrap_i](Vector &v, DiffType i) {\n            i = wrap_i(i, v.size());\n            T t = std::move(v[(SizeType) i]);\n            v.erase(std::next(v.begin(), i));\n            return t;\n        },\n        arg(\"i\"),\n        \"Remove and return the item at index ``i``\");\n\n    cl.def(\"__setitem__\", [wrap_i](Vector &v, DiffType i, const T &t) {\n        i = wrap_i(i, v.size());\n        v[(SizeType) i] = t;\n    });\n\n    /// Slicing protocol\n    cl.def(\n        \"__getitem__\",\n        [](const Vector &v, const slice &slice) -> Vector * {\n            size_t start = 0, stop = 0, step = 0, slicelength = 0;\n\n            if (!slice.compute(v.size(), &start, &stop, &step, &slicelength)) {\n                throw error_already_set();\n            }\n\n            auto *seq = new Vector();\n            seq->reserve((size_t) slicelength);\n\n            for (size_t i = 0; i < slicelength; ++i) {\n                seq->push_back(v[start]);\n                start += step;\n            }\n            return seq;\n        },\n        arg(\"s\"),\n        \"Retrieve list elements using a slice object\");\n\n    cl.def(\n        \"__setitem__\",\n        [](Vector &v, const slice &slice, const Vector &value) {\n            size_t start = 0, stop = 0, step = 0, slicelength = 0;\n            if (!slice.compute(v.size(), &start, &stop, &step, &slicelength)) {\n                throw error_already_set();\n            }\n\n            if (slicelength != value.size()) {\n                throw std::runtime_error(\n                    \"Left and right hand size of slice assignment have different sizes!\");\n            }\n\n            for (size_t i = 0; i < slicelength; ++i) {\n                v[start] = value[i];\n                start += step;\n            }\n        },\n        \"Assign list elements using a slice object\");\n\n    cl.def(\n        \"__delitem__\",\n        [wrap_i](Vector &v, DiffType i) {\n            i = wrap_i(i, v.size());\n            v.erase(v.begin() + i);\n        },\n        \"Delete the list elements at index ``i``\");\n\n    cl.def(\n        \"__delitem__\",\n        [](Vector &v, const slice &slice) {\n            size_t start = 0, stop = 0, step = 0, slicelength = 0;\n\n            if (!slice.compute(v.size(), &start, &stop, &step, &slicelength)) {\n                throw error_already_set();\n            }\n\n            if (step == 1 && false) {\n                v.erase(v.begin() + (DiffType) start, v.begin() + DiffType(start + slicelength));\n            } else {\n                for (size_t i = 0; i < slicelength; ++i) {\n                    v.erase(v.begin() + DiffType(start));\n                    start += step - 1;\n                }\n            }\n        },\n        \"Delete list elements using a slice object\");\n}\n\n// If the type has an operator[] that doesn't return a reference (most notably std::vector<bool>),\n// we have to access by copying; otherwise we return by reference.\ntemplate <typename Vector>\nusing vector_needs_copy\n    = negation<std::is_same<decltype(std::declval<Vector>()[typename Vector::size_type()]),\n                            typename Vector::value_type &>>;\n\n// The usual case: access and iterate by reference\ntemplate <typename Vector, typename Class_>\nvoid vector_accessor(enable_if_t<!vector_needs_copy<Vector>::value, Class_> &cl) {\n    using T = typename Vector::value_type;\n    using SizeType = typename Vector::size_type;\n    using DiffType = typename Vector::difference_type;\n    using ItType = typename Vector::iterator;\n\n    auto wrap_i = [](DiffType i, SizeType n) {\n        if (i < 0) {\n            i += n;\n        }\n        if (i < 0 || (SizeType) i >= n) {\n            throw index_error();\n        }\n        return i;\n    };\n\n    cl.def(\n        \"__getitem__\",\n        [wrap_i](Vector &v, DiffType i) -> T & {\n            i = wrap_i(i, v.size());\n            return v[(SizeType) i];\n        },\n        return_value_policy::reference_internal // ref + keepalive\n    );\n\n    cl.def(\n        \"__iter__\",\n        [](Vector &v) {\n            return make_iterator<return_value_policy::reference_internal, ItType, ItType, T &>(\n                v.begin(), v.end());\n        },\n        keep_alive<0, 1>() /* Essential: keep list alive while iterator exists */\n    );\n}\n\n// The case for special objects, like std::vector<bool>, that have to be returned-by-copy:\ntemplate <typename Vector, typename Class_>\nvoid vector_accessor(enable_if_t<vector_needs_copy<Vector>::value, Class_> &cl) {\n    using T = typename Vector::value_type;\n    using SizeType = typename Vector::size_type;\n    using DiffType = typename Vector::difference_type;\n    using ItType = typename Vector::iterator;\n    cl.def(\"__getitem__\", [](const Vector &v, DiffType i) -> T {\n        if (i < 0) {\n            i += v.size();\n            if (i < 0) {\n                throw index_error();\n            }\n        }\n        auto i_st = static_cast<SizeType>(i);\n        if (i_st >= v.size()) {\n            throw index_error();\n        }\n        return v[i_st];\n    });\n\n    cl.def(\n        \"__iter__\",\n        [](Vector &v) {\n            return make_iterator<return_value_policy::copy, ItType, ItType, T>(v.begin(), v.end());\n        },\n        keep_alive<0, 1>() /* Essential: keep list alive while iterator exists */\n    );\n}\n\ntemplate <typename Vector, typename Class_>\nauto vector_if_insertion_operator(Class_ &cl, std::string const &name)\n    -> decltype(std::declval<std::ostream &>() << std::declval<typename Vector::value_type>(),\n                void()) {\n    using size_type = typename Vector::size_type;\n\n    cl.def(\n        \"__repr__\",\n        [name](Vector &v) {\n            std::ostringstream s;\n            s << name << '[';\n            for (size_type i = 0; i < v.size(); ++i) {\n                s << v[i];\n                if (i != v.size() - 1) {\n                    s << \", \";\n                }\n            }\n            s << ']';\n            return s.str();\n        },\n        \"Return the canonical string representation of this list.\");\n}\n\n// Provide the buffer interface for vectors if we have data() and we have a format for it\n// GCC seems to have \"void std::vector<bool>::data()\" - doing SFINAE on the existence of data()\n// is insufficient, we need to check it returns an appropriate pointer\ntemplate <typename Vector, typename = void>\nstruct vector_has_data_and_format : std::false_type {};\ntemplate <typename Vector>\nstruct vector_has_data_and_format<\n    Vector,\n    enable_if_t<std::is_same<decltype(format_descriptor<typename Vector::value_type>::format(),\n                                      std::declval<Vector>().data()),\n                             typename Vector::value_type *>::value>> : std::true_type {};\n\n// [workaround(intel)] Separate function required here\n// Workaround as the Intel compiler does not compile the enable_if_t part below\n// (tested with icc (ICC) 2021.1 Beta 20200827)\ntemplate <typename... Args>\nconstexpr bool args_any_are_buffer() {\n    return detail::any_of<std::is_same<Args, buffer_protocol>...>::value;\n}\n\n// [workaround(intel)] Separate function required here\n// [workaround(msvc)] Can't use constexpr bool in return type\n\n// Add the buffer interface to a vector\ntemplate <typename Vector, typename Class_, typename... Args>\nvoid vector_buffer_impl(Class_ &cl, std::true_type) {\n    using T = typename Vector::value_type;\n\n    static_assert(vector_has_data_and_format<Vector>::value,\n                  \"There is not an appropriate format descriptor for this vector\");\n\n    // numpy.h declares this for arbitrary types, but it may raise an exception and crash hard\n    // at runtime if PYBIND11_NUMPY_DTYPE hasn't been called, so check here\n    format_descriptor<T>::format();\n\n    cl.def_buffer([](Vector &v) -> buffer_info {\n        return buffer_info(v.data(),\n                           static_cast<ssize_t>(sizeof(T)),\n                           format_descriptor<T>::format(),\n                           1,\n                           {v.size()},\n                           {sizeof(T)});\n    });\n\n    cl.def(init([](const buffer &buf) {\n        auto info = buf.request();\n        if (info.ndim != 1 || info.strides[0] % static_cast<ssize_t>(sizeof(T))) {\n            throw type_error(\"Only valid 1D buffers can be copied to a vector\");\n        }\n        if (!detail::compare_buffer_info<T>::compare(info)\n            || (ssize_t) sizeof(T) != info.itemsize) {\n            throw type_error(\"Format mismatch (Python: \" + info.format\n                             + \" C++: \" + format_descriptor<T>::format() + \")\");\n        }\n\n        T *p = static_cast<T *>(info.ptr);\n        ssize_t step = info.strides[0] / static_cast<ssize_t>(sizeof(T));\n        T *end = p + info.shape[0] * step;\n        if (step == 1) {\n            return Vector(p, end);\n        }\n        Vector vec;\n        vec.reserve((size_t) info.shape[0]);\n        for (; p != end; p += step) {\n            vec.push_back(*p);\n        }\n        return vec;\n    }));\n\n    return;\n}\n\ntemplate <typename Vector, typename Class_, typename... Args>\nvoid vector_buffer_impl(Class_ &, std::false_type) {}\n\ntemplate <typename Vector, typename Class_, typename... Args>\nvoid vector_buffer(Class_ &cl) {\n    vector_buffer_impl<Vector, Class_, Args...>(\n        cl, detail::any_of<std::is_same<Args, buffer_protocol>...>{});\n}\n\nPYBIND11_NAMESPACE_END(detail)\n\n//\n// std::vector\n//\ntemplate <typename Vector, typename holder_type = std::unique_ptr<Vector>, typename... Args>\nclass_<Vector, holder_type> bind_vector(handle scope, std::string const &name, Args &&...args) {\n    using Class_ = class_<Vector, holder_type>;\n\n    // If the value_type is unregistered (e.g. a converting type) or is itself registered\n    // module-local then make the vector binding module-local as well:\n    using vtype = typename Vector::value_type;\n    auto *vtype_info = detail::get_type_info(typeid(vtype));\n    bool local = !vtype_info || vtype_info->module_local;\n\n    Class_ cl(scope, name.c_str(), pybind11::module_local(local), std::forward<Args>(args)...);\n\n    // Declare the buffer interface if a buffer_protocol() is passed in\n    detail::vector_buffer<Vector, Class_, Args...>(cl);\n\n    cl.def(init<>());\n\n    // Register copy constructor (if possible)\n    detail::vector_if_copy_constructible<Vector, Class_>(cl);\n\n    // Register comparison-related operators and functions (if possible)\n    detail::vector_if_equal_operator<Vector, Class_>(cl);\n\n    // Register stream insertion operator (if possible)\n    detail::vector_if_insertion_operator<Vector, Class_>(cl, name);\n\n    // Modifiers require copyable vector value type\n    detail::vector_modifiers<Vector, Class_>(cl);\n\n    // Accessor and iterator; return by value if copyable, otherwise we return by ref + keep-alive\n    detail::vector_accessor<Vector, Class_>(cl);\n\n    cl.def(\n        \"__bool__\",\n        [](const Vector &v) -> bool { return !v.empty(); },\n        \"Check whether the list is nonempty\");\n\n    cl.def(\"__len__\", &Vector::size);\n\n#if 0\n    // C++ style functions deprecated, leaving it here as an example\n    cl.def(init<size_type>());\n\n    cl.def(\"resize\",\n         (void (Vector::*) (size_type count)) & Vector::resize,\n         \"changes the number of elements stored\");\n\n    cl.def(\"erase\",\n        [](Vector &v, SizeType i) {\n        if (i >= v.size())\n            throw index_error();\n        v.erase(v.begin() + i);\n    }, \"erases element at index ``i``\");\n\n    cl.def(\"empty\",         &Vector::empty,         \"checks whether the container is empty\");\n    cl.def(\"size\",          &Vector::size,          \"returns the number of elements\");\n    cl.def(\"push_back\", (void (Vector::*)(const T&)) &Vector::push_back, \"adds an element to the end\");\n    cl.def(\"pop_back\",                               &Vector::pop_back, \"removes the last element\");\n\n    cl.def(\"max_size\",      &Vector::max_size,      \"returns the maximum possible number of elements\");\n    cl.def(\"reserve\",       &Vector::reserve,       \"reserves storage\");\n    cl.def(\"capacity\",      &Vector::capacity,      \"returns the number of elements that can be held in currently allocated storage\");\n    cl.def(\"shrink_to_fit\", &Vector::shrink_to_fit, \"reduces memory usage by freeing unused memory\");\n\n    cl.def(\"clear\", &Vector::clear, \"clears the contents\");\n    cl.def(\"swap\",   &Vector::swap, \"swaps the contents\");\n\n    cl.def(\"front\", [](Vector &v) {\n        if (v.size()) return v.front();\n        else throw index_error();\n    }, \"access the first element\");\n\n    cl.def(\"back\", [](Vector &v) {\n        if (v.size()) return v.back();\n        else throw index_error();\n    }, \"access the last element \");\n\n#endif\n\n    return cl;\n}\n\n//\n// std::map, std::unordered_map\n//\n\nPYBIND11_NAMESPACE_BEGIN(detail)\n\n/* Fallback functions */\ntemplate <typename, typename, typename... Args>\nvoid map_if_insertion_operator(const Args &...) {}\ntemplate <typename, typename, typename... Args>\nvoid map_assignment(const Args &...) {}\n\n// Map assignment when copy-assignable: just copy the value\ntemplate <typename Map, typename Class_>\nvoid map_assignment(\n    enable_if_t<is_copy_assignable<typename Map::mapped_type>::value, Class_> &cl) {\n    using KeyType = typename Map::key_type;\n    using MappedType = typename Map::mapped_type;\n\n    cl.def(\"__setitem__\", [](Map &m, const KeyType &k, const MappedType &v) {\n        auto it = m.find(k);\n        if (it != m.end()) {\n            it->second = v;\n        } else {\n            m.emplace(k, v);\n        }\n    });\n}\n\n// Not copy-assignable, but still copy-constructible: we can update the value by erasing and\n// reinserting\ntemplate <typename Map, typename Class_>\nvoid map_assignment(enable_if_t<!is_copy_assignable<typename Map::mapped_type>::value\n                                    && is_copy_constructible<typename Map::mapped_type>::value,\n                                Class_> &cl) {\n    using KeyType = typename Map::key_type;\n    using MappedType = typename Map::mapped_type;\n\n    cl.def(\"__setitem__\", [](Map &m, const KeyType &k, const MappedType &v) {\n        // We can't use m[k] = v; because value type might not be default constructable\n        auto r = m.emplace(k, v);\n        if (!r.second) {\n            // value type is not copy assignable so the only way to insert it is to erase it\n            // first...\n            m.erase(r.first);\n            m.emplace(k, v);\n        }\n    });\n}\n\ntemplate <typename Map, typename Class_>\nauto map_if_insertion_operator(Class_ &cl, std::string const &name)\n    -> decltype(std::declval<std::ostream &>() << std::declval<typename Map::key_type>()\n                                               << std::declval<typename Map::mapped_type>(),\n                void()) {\n\n    cl.def(\n        \"__repr__\",\n        [name](Map &m) {\n            std::ostringstream s;\n            s << name << '{';\n            bool f = false;\n            for (auto const &kv : m) {\n                if (f) {\n                    s << \", \";\n                }\n                s << kv.first << \": \" << kv.second;\n                f = true;\n            }\n            s << '}';\n            return s.str();\n        },\n        \"Return the canonical string representation of this map.\");\n}\n\ntemplate <typename KeyType>\nstruct keys_view {\n    virtual size_t len() = 0;\n    virtual iterator iter() = 0;\n    virtual bool contains(const KeyType &k) = 0;\n    virtual bool contains(const object &k) = 0;\n    virtual ~keys_view() = default;\n};\n\ntemplate <typename MappedType>\nstruct values_view {\n    virtual size_t len() = 0;\n    virtual iterator iter() = 0;\n    virtual ~values_view() = default;\n};\n\ntemplate <typename KeyType, typename MappedType>\nstruct items_view {\n    virtual size_t len() = 0;\n    virtual iterator iter() = 0;\n    virtual ~items_view() = default;\n};\n\ntemplate <typename Map, typename KeysView>\nstruct KeysViewImpl : public KeysView {\n    explicit KeysViewImpl(Map &map) : map(map) {}\n    size_t len() override { return map.size(); }\n    iterator iter() override { return make_key_iterator(map.begin(), map.end()); }\n    bool contains(const typename Map::key_type &k) override { return map.find(k) != map.end(); }\n    bool contains(const object &) override { return false; }\n    Map &map;\n};\n\ntemplate <typename Map, typename ValuesView>\nstruct ValuesViewImpl : public ValuesView {\n    explicit ValuesViewImpl(Map &map) : map(map) {}\n    size_t len() override { return map.size(); }\n    iterator iter() override { return make_value_iterator(map.begin(), map.end()); }\n    Map &map;\n};\n\ntemplate <typename Map, typename ItemsView>\nstruct ItemsViewImpl : public ItemsView {\n    explicit ItemsViewImpl(Map &map) : map(map) {}\n    size_t len() override { return map.size(); }\n    iterator iter() override { return make_iterator(map.begin(), map.end()); }\n    Map &map;\n};\n\nPYBIND11_NAMESPACE_END(detail)\n\ntemplate <typename Map, typename holder_type = std::unique_ptr<Map>, typename... Args>\nclass_<Map, holder_type> bind_map(handle scope, const std::string &name, Args &&...args) {\n    using KeyType = typename Map::key_type;\n    using MappedType = typename Map::mapped_type;\n    using StrippedKeyType = detail::remove_cvref_t<KeyType>;\n    using StrippedMappedType = detail::remove_cvref_t<MappedType>;\n    using KeysView = detail::keys_view<StrippedKeyType>;\n    using ValuesView = detail::values_view<StrippedMappedType>;\n    using ItemsView = detail::items_view<StrippedKeyType, StrippedMappedType>;\n    using Class_ = class_<Map, holder_type>;\n\n    // If either type is a non-module-local bound type then make the map binding non-local as well;\n    // otherwise (e.g. both types are either module-local or converting) the map will be\n    // module-local.\n    auto *tinfo = detail::get_type_info(typeid(MappedType));\n    bool local = !tinfo || tinfo->module_local;\n    if (local) {\n        tinfo = detail::get_type_info(typeid(KeyType));\n        local = !tinfo || tinfo->module_local;\n    }\n\n    Class_ cl(scope, name.c_str(), pybind11::module_local(local), std::forward<Args>(args)...);\n    static constexpr auto key_type_descr = detail::make_caster<KeyType>::name;\n    static constexpr auto mapped_type_descr = detail::make_caster<MappedType>::name;\n    std::string key_type_name(key_type_descr.text), mapped_type_name(mapped_type_descr.text);\n\n    // If key type isn't properly wrapped, fall back to C++ names\n    if (key_type_name == \"%\") {\n        key_type_name = detail::type_info_description(typeid(KeyType));\n    }\n    // Similarly for value type:\n    if (mapped_type_name == \"%\") {\n        mapped_type_name = detail::type_info_description(typeid(MappedType));\n    }\n\n    // Wrap KeysView[KeyType] if it wasn't already wrapped\n    if (!detail::get_type_info(typeid(KeysView))) {\n        class_<KeysView> keys_view(\n            scope, (\"KeysView[\" + key_type_name + \"]\").c_str(), pybind11::module_local(local));\n        keys_view.def(\"__len__\", &KeysView::len);\n        keys_view.def(\"__iter__\",\n                      &KeysView::iter,\n                      keep_alive<0, 1>() /* Essential: keep view alive while iterator exists */\n        );\n        keys_view.def(\"__contains__\",\n                      static_cast<bool (KeysView::*)(const KeyType &)>(&KeysView::contains));\n        // Fallback for when the object is not of the key type\n        keys_view.def(\"__contains__\",\n                      static_cast<bool (KeysView::*)(const object &)>(&KeysView::contains));\n    }\n    // Similarly for ValuesView:\n    if (!detail::get_type_info(typeid(ValuesView))) {\n        class_<ValuesView> values_view(scope,\n                                       (\"ValuesView[\" + mapped_type_name + \"]\").c_str(),\n                                       pybind11::module_local(local));\n        values_view.def(\"__len__\", &ValuesView::len);\n        values_view.def(\"__iter__\",\n                        &ValuesView::iter,\n                        keep_alive<0, 1>() /* Essential: keep view alive while iterator exists */\n        );\n    }\n    // Similarly for ItemsView:\n    if (!detail::get_type_info(typeid(ItemsView))) {\n        class_<ItemsView> items_view(\n            scope,\n            (\"ItemsView[\" + key_type_name + \", \").append(mapped_type_name + \"]\").c_str(),\n            pybind11::module_local(local));\n        items_view.def(\"__len__\", &ItemsView::len);\n        items_view.def(\"__iter__\",\n                       &ItemsView::iter,\n                       keep_alive<0, 1>() /* Essential: keep view alive while iterator exists */\n        );\n    }\n\n    cl.def(init<>());\n\n    // Register stream insertion operator (if possible)\n    detail::map_if_insertion_operator<Map, Class_>(cl, name);\n\n    cl.def(\n        \"__bool__\",\n        [](const Map &m) -> bool { return !m.empty(); },\n        \"Check whether the map is nonempty\");\n\n    cl.def(\n        \"__iter__\",\n        [](Map &m) { return make_key_iterator(m.begin(), m.end()); },\n        keep_alive<0, 1>() /* Essential: keep map alive while iterator exists */\n    );\n\n    cl.def(\n        \"keys\",\n        [](Map &m) {\n            return std::unique_ptr<KeysView>(new detail::KeysViewImpl<Map, KeysView>(m));\n        },\n        keep_alive<0, 1>() /* Essential: keep map alive while view exists */\n    );\n\n    cl.def(\n        \"values\",\n        [](Map &m) {\n            return std::unique_ptr<ValuesView>(new detail::ValuesViewImpl<Map, ValuesView>(m));\n        },\n        keep_alive<0, 1>() /* Essential: keep map alive while view exists */\n    );\n\n    cl.def(\n        \"items\",\n        [](Map &m) {\n            return std::unique_ptr<ItemsView>(new detail::ItemsViewImpl<Map, ItemsView>(m));\n        },\n        keep_alive<0, 1>() /* Essential: keep map alive while view exists */\n    );\n\n    cl.def(\n        \"__getitem__\",\n        [](Map &m, const KeyType &k) -> MappedType & {\n            auto it = m.find(k);\n            if (it == m.end()) {\n                throw key_error();\n            }\n            return it->second;\n        },\n        return_value_policy::reference_internal // ref + keepalive\n    );\n\n    cl.def(\"__contains__\", [](Map &m, const KeyType &k) -> bool {\n        auto it = m.find(k);\n        if (it == m.end()) {\n            return false;\n        }\n        return true;\n    });\n    // Fallback for when the object is not of the key type\n    cl.def(\"__contains__\", [](Map &, const object &) -> bool { return false; });\n\n    // Assignment provided only if the type is copyable\n    detail::map_assignment<Map, Class_>(cl);\n\n    cl.def(\"__delitem__\", [](Map &m, const KeyType &k) {\n        auto it = m.find(k);\n        if (it == m.end()) {\n            throw key_error();\n        }\n        m.erase(it);\n    });\n\n    cl.def(\"__len__\", &Map::size);\n\n    return cl;\n}\n\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/pybind11/type_caster_pyobject_ptr.h",
    "content": "// Copyright (c) 2023 The pybind Community.\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"detail/descr.h\"\n#include \"cast.h\"\n#include \"pytypes.h\"\n\nPYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)\nPYBIND11_NAMESPACE_BEGIN(detail)\n\ntemplate <>\nclass type_caster<PyObject> {\npublic:\n    static constexpr auto name = const_name(\"object\"); // See discussion under PR #4601.\n\n    // This overload is purely to guard against accidents.\n    template <typename T,\n              detail::enable_if_t<!is_same_ignoring_cvref<T, PyObject *>::value, int> = 0>\n    static handle cast(T &&, return_value_policy, handle /*parent*/) {\n        static_assert(is_same_ignoring_cvref<T, PyObject *>::value,\n                      \"Invalid C++ type T for to-Python conversion (type_caster<PyObject>).\");\n        return nullptr; // Unreachable.\n    }\n\n    static handle cast(PyObject *src, return_value_policy policy, handle /*parent*/) {\n        if (src == nullptr) {\n            throw error_already_set();\n        }\n        if (PyErr_Occurred()) {\n            raise_from(PyExc_SystemError, \"src != nullptr but PyErr_Occurred()\");\n            throw error_already_set();\n        }\n        if (policy == return_value_policy::take_ownership) {\n            return src;\n        }\n        if (policy == return_value_policy::reference\n            || policy == return_value_policy::automatic_reference) {\n            return handle(src).inc_ref();\n        }\n        pybind11_fail(\"type_caster<PyObject>::cast(): unsupported return_value_policy: \"\n                      + std::to_string(static_cast<int>(policy)));\n    }\n\n    bool load(handle src, bool) {\n        value = reinterpret_borrow<object>(src);\n        return true;\n    }\n\n    template <typename T>\n    using cast_op_type = PyObject *;\n\n    explicit operator PyObject *() { return value.ptr(); }\n\nprivate:\n    object value;\n};\n\nPYBIND11_NAMESPACE_END(detail)\nPYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptBindings.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n\n#include \"ScriptBindings.h\"\n#include \"ScriptException.h\"\n#include \"ScriptUtilities.h\"\n\n#include <functional>\n#include <string_view>\n#include <tuple>\n\nnamespace popsicle::Bindings {\n\n// =================================================================================================\n\nComponentTypeMap& getComponentTypeMap()\n{\n    static ComponentTypeMap typeMap;\n    return typeMap;\n}\n\nvoid registerComponentType (juce::StringRef className, ComponentTypeCaster classCaster)\n{\n    auto& map = getComponentTypeMap();\n\n    auto lock = juce::CriticalSection::ScopedLockType (map.mutex);\n    map.typeMap [className] = std::move (classCaster);\n}\n\nvoid clearComponentTypes()\n{\n    auto& map = getComponentTypeMap();\n\n    auto lock = juce::CriticalSection::ScopedLockType (map.mutex);\n    map.typeMap.clear();\n}\n\n} // namespace popsicle::Bindings\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptBindings.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#if JUCE_MODULE_AVAILABLE_juce_gui_basics\n\n#include <juce_gui_basics/juce_gui_basics.h>\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <functional>\n#include <typeinfo>\n#include <unordered_map>\n\nnamespace popsicle {\n\n// =================================================================================================\n\n/**\n * @brief Define a type alias for a function that casts a JUCE Component to a pointer of a specified type.\n *\n * This type alias defines a function pointer named `ComponentTypeCaster`. This function is designed to take a JUCE Component\n * and a reference to a `std::type_info` object, and it returns a constant pointer to void. The purpose of this function is to enable\n * dynamic casting of a JUCE Component to a specific derived class type. It can be used for tasks like type-safe downcasting of\n * components in a straw application when obtaining Components in scripts and it's used by pybind11.\n *\n * @warning Be cautious when using this function as it deals with low-level type information and dynamic casting.\n *\n * @param component A pointer to a JUCE Component that you want to cast to a specific type.\n * @param typeInfo  A reference to a `std::type_info` object representing the target type.\n *\n * @return A constant pointer to void that can be interpreted as a pointer to an instance of the target type\n *         if the cast is successful. If the cast fails, it may return a null pointer.\n */\nusing ComponentTypeCaster = std::function<const void* (const juce::Component*, const std::type_info*&)>;\n\n// =================================================================================================\n\nnamespace Bindings {\n\n/**\n * @brief A structure for managing component type mappings.\n *\n * This structure is used to store mappings between class names and ComponentTypeCaster functions, allowing for dynamic casting of\n * Component objects to their derived types.\n */\nstruct ComponentTypeMap\n{\n    juce::CriticalSection mutex;\n    std::unordered_map<juce::String, ComponentTypeCaster> typeMap;\n};\n\n/**\n * @brief Get the global ComponentTypeMap instance.\n *\n * @return A reference to the global ComponentTypeMap instance.\n */\nComponentTypeMap& getComponentTypeMap();\n\n/**\n * @brief Register a component type caster for a specific class.\n *\n * This function registers a component type caster for the specified class name.\n *\n * @param className The name of the class to register the caster for.\n * @param classCaster The component type caster function for the class.\n */\nvoid registerComponentType (juce::StringRef className, ComponentTypeCaster classCaster);\n\n/**\n * @brief Clear all registered component types.\n *\n * This function clears all the registered component type mappings in the ComponentTypeMap.\n */\nvoid clearComponentTypes();\n\n} // namespace Bindings\n\n// =================================================================================================\n\n/**\n * @brief Template function for casting a Component to a derived type.\n *\n * This template function is used to cast a Component to a derived type. It performs a `dynamic_cast` and returns a pointer to the\n * derived type if the cast is successful, or nullptr otherwise.\n *\n * @tparam T The derived type to cast to.\n *\n * @param src The source Component to cast.\n * @param type A pointer to a std::type_info object that will be set to the type of the derived class if the cast is successful.\n\n * @return A pointer to the derived type if the cast is successful, or nullptr otherwise.\n */\ntemplate <class T>\nconst void* ComponentType (const juce::Component* src, const std::type_info*& type)\n{\n    static_assert (std::is_base_of_v<juce::Component, T>, \"Invalid unrelated polymorphism between classes\");\n\n    if (auto result = dynamic_cast<const T*> (src))\n    {\n        type = &typeid(T);\n        return result;\n    }\n\n    return nullptr;\n}\n\n} // namespace popsicle\n\n#endif\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptEngine.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptEngine.h\"\n#include \"ScriptBindings.h\"\n#include \"ScriptException.h\"\n#include \"ScriptUtilities.h\"\n\n#include <regex>\n\nnamespace popsicle {\n\nnamespace py = pybind11;\n\nnamespace {\n\n// =================================================================================================\n\n[[maybe_unused]] juce::String replaceBrokenLineNumbers (const juce::String& input, const juce::String& code)\n{\n    static const std::regex pattern (\"<string>\\\\((\\\\d+)\\\\)\");\n\n    const auto codeLines = juce::StringArray::fromLines (code);\n\n    juce::String output;\n    std::string result = input.toStdString();\n    std::ptrdiff_t startPos = 0;\n\n    std::smatch match;\n    while (std::regex_search (result, match, pattern))\n    {\n        if (match.size() > 1)\n        {\n            const int matchLine = std::stoi (match[1]) - 1;\n\n            output\n                << input.substring (static_cast<int> (startPos), static_cast<int> (match.position() - startPos))\n                << \"<string>(\" << matchLine << \"): \\'\" << codeLines[matchLine - 1] << \"\\'\";\n\n            startPos = match.position() + match.length();\n        }\n\n        result = match.suffix();\n    }\n\n    output << result;\n    return output;\n}\n\n} // namespace\n\n// =================================================================================================\n\nstd::unique_ptr<PyConfig> ScriptEngine::prepareScriptingHome (\n    const juce::String& programName,\n    const juce::File& destinationFolder,\n    std::function<juce::MemoryBlock (const char*)> standardLibraryCallback,\n    bool forceInstall)\n{\n    juce::String pythonFolderName, pythonArchiveName;\n    pythonFolderName << \"python\" << PY_MAJOR_VERSION << \".\" << PY_MINOR_VERSION;\n    pythonArchiveName << \"python\" << PY_MAJOR_VERSION << PY_MINOR_VERSION << \"_zip\";\n\n    if (! destinationFolder.isDirectory())\n        destinationFolder.createDirectory();\n\n    auto libFolder = destinationFolder.getChildFile (\"lib\");\n    if (! libFolder.isDirectory())\n        libFolder.createDirectory();\n\n    auto pythonFolder = libFolder.getChildFile (pythonFolderName);\n    if (! pythonFolder.isDirectory())\n        pythonFolder.createDirectory();\n\n    if (forceInstall && pythonFolder.getNumberOfChildFiles (juce::File::findFilesAndDirectories) > 0)\n    {\n        pythonFolder.deleteRecursively();\n        pythonFolder.createDirectory();\n    }\n\n    if (! pythonFolder.getChildFile (\"lib-dynload\").isDirectory())\n    {\n        juce::MemoryBlock mb = standardLibraryCallback (pythonArchiveName.toRawUTF8());\n\n        auto mis = juce::MemoryInputStream (mb.getData(), mb.getSize(), false);\n\n        auto zip = juce::ZipFile (mis);\n        zip.uncompressTo (pythonFolder);\n    }\n\n    auto config = std::make_unique<PyConfig>();\n\n    PyConfig_InitPythonConfig (config.get());\n    config->parse_argv = 0;\n    config->isolated = 1;\n    config->install_signal_handlers = 0;\n    config->program_name = Py_DecodeLocale (programName.toRawUTF8(), nullptr);\n    config->home = Py_DecodeLocale (destinationFolder.getFullPathName().toRawUTF8(), nullptr);\n\n    return config;\n}\n\n// =================================================================================================\n\nScriptEngine::ScriptEngine ()\n    : ScriptEngine (juce::StringArray{})\n{\n}\n\nScriptEngine::ScriptEngine (std::unique_ptr<PyConfig> config)\n    : ScriptEngine (juce::StringArray{}, std::move (config))\n{\n}\n\nScriptEngine::ScriptEngine (juce::StringArray modules, std::unique_ptr<PyConfig> config)\n    : customModules (std::move (modules))\n{\n    if (config)\n        pybind11::initialize_interpreter (config.get(), 0, nullptr, false);\n    else\n        pybind11::initialize_interpreter();\n\n    py::set_shared_data (\"_ENGINE\", this);\n}\n\nScriptEngine::~ScriptEngine()\n{\n    py::set_shared_data (\"_ENGINE\", nullptr);\n\n    pybind11::finalize_interpreter();\n}\n\n// =================================================================================================\n\njuce::Result ScriptEngine::runScript (const juce::String& code, py::dict locals, py::dict globals)\n{\n    currentScriptCode = code;\n    currentScriptFile = juce::File();\n\n    return runScriptInternal (currentScriptCode, std::move (globals), std::move (locals));\n}\n\n// =================================================================================================\n\njuce::Result ScriptEngine::runScript (const juce::File& script, py::dict locals, py::dict globals)\n{\n    {\n        auto is = script.createInputStream();\n        if (is == nullptr)\n            return juce::Result::fail (\"Unable to open the requested script file\");\n\n        currentScriptCode = is->readEntireStreamAsString();\n        currentScriptFile = script;\n    }\n\n    return runScriptInternal (currentScriptCode, std::move (globals), std::move (locals));\n}\n\n// =================================================================================================\n\njuce::Result ScriptEngine::runScriptInternal (const juce::String& code, py::dict locals, py::dict globals)\n{\n#if JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION\n    try\n#endif\n\n    {\n        py::gil_scoped_acquire acquire;\n\n        [[maybe_unused]] const auto redirectStreamsUntilExit = ScriptStreamRedirection();\n\n        for (const auto& m : customModules)\n            globals [m.toRawUTF8()] = py::module_::import (m.toRawUTF8());\n\n        py::str pythonCode { code.toRawUTF8(), code.getNumBytesAsUTF8() };\n\n        py::exec (std::move (pythonCode), std::move (globals), std::move (locals));\n\n        return juce::Result::ok();\n    }\n\n#if JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION\n    catch (const py::error_already_set& e)\n    {\n        return juce::Result::fail (replaceBrokenLineNumbers (e.what(), code));\n    }\n    catch (...)\n    {\n        return juce::Result::fail (\"Unhandled exception while processing script\");\n    }\n#endif\n}\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptEngine.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <functional>\n#include <memory>\n\nnamespace popsicle {\n\n// =================================================================================================\n\n/**\n * @brief The ScriptEngine class provides a C++ interface for running Python scripts\n *\n * The ScriptEngine class encapsulates the functionality to run Python scripts within a C++ application. It utilizes the pybind11 library to\n * interact with the Python interpreter and provides a way to run custom Python code within the C++ environment.\n */\nclass ScriptEngine\n{\npublic:\n    /**\n     * @brief Construct a new ScriptEngine object.\n     *\n     * Initializes a ScriptEngine object.\n     */\n    ScriptEngine();\n\n    /**\n     * @brief Construct a new ScriptEngine object.\n     *\n     * @param config A custom python config to initialize the Python interpreter.\n     *\n     * Initializes a ScriptEngine object.\n     */\n    ScriptEngine (std::unique_ptr<PyConfig> config);\n\n    /**\n     * @brief Construct a new ScriptEngine object.\n     *\n     * Initializes a ScriptEngine object with the specified custom modules.\n     *\n     * @param modules An array of module names to be imported in the Python interpreter.\n     * @param config A custom python config to initialize the Python interpreter.\n     *\n     * @warning Ensure that the provided modules are available and compatible with the Python interpreter.\n     */\n    ScriptEngine (juce::StringArray modules, std::unique_ptr<PyConfig> config = {});\n\n    /**\n     * @brief Destroy the ScriptEngine object.\n     *\n     * Cleans up resources associated with the ScriptEngine object.\n     */\n    ~ScriptEngine();\n\n    /**\n     * @brief Run a Python script.\n     *\n     * Executes the given Python code within the Python interpreter.\n     *\n     * @param code The Python code to be executed.\n     * @param locals A python dictionary containing local variables.\n     * @param globals A python dictionary containing global variables.\n     *\n     * @return A Result object indicating the success or failure of the script execution.\n     */\n    juce::Result runScript (const juce::String& code, pybind11::dict locals = {}, pybind11::dict globals = pybind11::globals());\n\n    /**\n     * @brief Run a Python script file.\n     *\n     * Executes the given Python file within the Python interpreter.\n     *\n     * @param script The Python file to be executed.\n     * @param locals A python dictionary containing local variables.\n     * @param globals A python dictionary containing global variables.\n     *\n     * @return A Result object indicating the success or failure of the script execution.\n     */\n    juce::Result runScript (const juce::File& script, pybind11::dict locals = {}, pybind11::dict globals = pybind11::globals());\n\n    /**\n     * @brief Prepare a valid python home and return the config to use.\n     *\n     * @param programName The desired program name.\n     * @param destinationFolder The destination folder to use for preparing the home.\n     * @param standardLibraryCallback The callback to provide the standard library archive.\n     * @param forceInstall If true, the home will be fully rebuilt.\n     */\n    static std::unique_ptr<PyConfig> prepareScriptingHome (\n        const juce::String& programName,\n        const juce::File& destinationFolder,\n        std::function<juce::MemoryBlock (const char*)> standardLibraryCallback,\n        bool forceInstall = false);\n\nprivate:\n    juce::Result runScriptInternal (const juce::String& code, pybind11::dict locals, pybind11::dict globals);\n\n    juce::StringArray customModules;\n    juce::String currentScriptCode;\n    juce::File currentScriptFile;\n\n    JUCE_DECLARE_WEAK_REFERENCEABLE (ScriptEngine)\n};\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptException.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\n#include <exception>\n\nnamespace popsicle {\n\n// =================================================================================================\n\n/**\n * @brief Custom exception class for handling script-related errors.\n *\n * The `ScriptException` class is derived from `std::exception` and is designed to be used for throwing exceptions when errors\n * occur during script execution. It provides a way to encapsulate and convey error messages in a human-readable format.\n *\n * @warning It is important to note that this class should be used judiciously and only for exceptional situations in script execution.\n *\n * @param msg A string containing the error message to be associated with the exception.\n */\nclass ScriptException : public std::exception\n{\npublic:\n    /**\n     * @brief Constructs a `ScriptException` with the specified error message.\n     *\n     * This constructor initializes the `ScriptException` object with the provided error message.\n     *\n     * @param msg The error message to be associated with the exception.\n     */\n    ScriptException (juce::String msg)\n        : message (std::move (msg))\n    {\n    }\n\n    /**\n     * @brief Returns a C-string representing the error message associated with the exception.\n     *\n     * The `what` method is overridden from the `std::exception` base class to provide access to the error message stored within\n     * this `ScriptException`.\n     *\n     * @return A pointer to a C-string containing the error message.\n     */\n    const char* what() const noexcept override\n    {\n        return message.toUTF8();\n    }\n\nprivate:\n    juce::String message;\n};\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptUtilities.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ScriptUtilities.h\"\n\n#include <optional>\n\nnamespace popsicle {\n\nnamespace py = pybind11;\n\nScriptStreamRedirection::ScriptStreamRedirection() noexcept\n{\n#if JUCE_PYTHON_EMBEDDED_INTERPRETER\n    sys = py::module::import (\"__popsicle__\");\n\n    sys.attr (\"__redirect__\")();\n#endif\n}\n\nScriptStreamRedirection::~ScriptStreamRedirection() noexcept\n{\n#if JUCE_PYTHON_EMBEDDED_INTERPRETER\n    sys.attr (\"__restore__\")();\n#endif\n}\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/scripting/ScriptUtilities.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include \"../utilities/PyBind11Includes.h\"\n\n#include <optional>\n\nnamespace popsicle {\n\n/**\n * @brief\n */\ntemplate <class T>\nstd::optional<T> python_cast (const pybind11::object& value)\n{\n    try\n    {\n        return value.cast<T>();\n    }\n    catch (const pybind11::cast_error& e)\n    {\n        return std::nullopt;\n    }\n}\n\n/**\n * @brief\n */\nstruct ScriptStreamRedirection\n{\n    ScriptStreamRedirection() noexcept;\n    ~ScriptStreamRedirection() noexcept;\n\nprivate:\n    pybind11::object sys;\n};\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/utilities/ClassDemangling.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"ClassDemangling.h\"\n\n#include <cstddef>\n#include <ciso646>\n\n#if JUCE_WINDOWS\n#include \"WindowsIncludes.h\"\n\n#pragma comment (lib, \"dbghelp.lib\")\n\nusing malloc_func_t = void* (*)(size_t);\nusing free_func_t = void (*)(void*);\n\nextern \"C\" char* __unDName (char*, const char*, int, malloc_func_t, free_func_t, unsigned short int);\n#endif\n\n#if defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) || defined(__GLIBCPP__)\n#include <cxxabi.h>\n#endif\n\nnamespace popsicle::Helpers {\n\n// =================================================================================================\n\njuce::String demangleClassName (juce::StringRef className)\n{\n    juce::String name = className;\n\n#if JUCE_WINDOWS\n    if (name.startsWith(\"class \"))\n    {\n        char demangledName[1024] = { 0 };\n        auto offset = name.startsWithChar (L'?') ? 1 : 0;\n        __unDName(demangledName, name.toRawUTF8() + offset, juce::numElementsInArray(demangledName), malloc, free, 0x2800);\n        name = juce::String::fromUTF8(demangledName).replace(\"class \", \"\");\n    }\n\n#else\n    int status = -1;\n    char* demangledName = abi::__cxa_demangle (name.toUTF8(), nullptr, nullptr, &status);\n    name = juce::String::fromUTF8 (demangledName);\n    std::free (demangledName);\n\n#endif\n\n    return name;\n}\n\n// =================================================================================================\n\njuce::String pythonizeClassName (juce::StringRef className, int maxTemplateArgs)\n{\n    juce::String name = demangleClassName (className);\n\n    if (maxTemplateArgs > 0 && name.contains(\"<\"))\n    {\n        juce::String tempName;\n\n        auto foundComma = name.indexOf (0, \",\");\n        if (foundComma >= 0)\n        {\n            while (foundComma >= 0 && --maxTemplateArgs >= 0)\n                foundComma = name.indexOf (foundComma, \",\");\n\n            tempName << name.substring (0, foundComma);\n            tempName << name.fromLastOccurrenceOf (\">\", true, false);\n        }\n\n        name = tempName;\n    }\n\n    return name\n        .replace (\"popsicle::\", \"\")\n        .replace (\"juce::\", \"\")\n        .replace (\"::\", \".\")\n        .replace (\"<\", \"[\")\n        .replace (\">\", \"]\");\n}\n\n// =================================================================================================\n\njuce::String pythonizeCompoundClassName (juce::StringRef prefixName, juce::StringRef className, int maxTemplateArgs)\n{\n    const auto pythonizedName = pythonizeClassName (className, maxTemplateArgs);\n\n    juce::String result;\n\n    result\n        << prefixName\n        << pythonizedName.substring(0, 1).toUpperCase()\n        << pythonizedName.substring(1);\n\n    return result;\n}\n\n// =================================================================================================\n\njuce::String pythonizeModuleClassName (juce::StringRef moduleName, juce::StringRef className, int maxTemplateArgs)\n{\n    const auto pythonizedName = pythonizeClassName (className, maxTemplateArgs);\n\n    juce::String result;\n\n    result << moduleName << \".\" << pythonizedName;\n\n    return result;\n}\n\n} // namespace popsicle::Helpers\n"
  },
  {
    "path": "modules/juce_python/utilities/ClassDemangling.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\n#include <functional>\n\nnamespace popsicle::Helpers {\n\n// =================================================================================================\n\n/**\n * @brief Demangle a C++ class name.\n *\n * This function takes a StringRef containing a mangled class name and returns the demangled class name as a String.\n *\n * @param className The mangled class name to demangle.\n *\n * @return A String containing the demangled class name.\n */\njuce::String demangleClassName (juce::StringRef className);\n\n// =================================================================================================\n\n/**\n * @brief Demangle a C++ class name and pythonize it.\n *\n * This function takes a StringRef containing a mangled class name and returns the demangled and pythonized class name as a String.\n *\n * @param className The mangled class name to demangle and pythonize.\n *\n * @return A String containing the demangled and pythonized class name.\n */\njuce::String pythonizeClassName (juce::StringRef className, int maxTemplateArgs = -1);\n\n// =================================================================================================\n\n/**\n * @brief Demangle a C++ class name and pythonize it by compunding to another class name.\n *\n * @param prefixName The prefix to apply to the class name.\n * @param className The mangled class name to demangle and pythonize.\n *\n * @return A String containing the demangled and pythonized class name with a prefix.\n */\njuce::String pythonizeCompoundClassName (juce::StringRef prefixName, juce::StringRef className, int maxTemplateArgs = -1);\n\n// =================================================================================================\n\n/**\n * @brief Demangle a C++ class name and pythonize it by making it part of a module.\n *\n * @param moduleName The name of the module to prepend.\n * @param className The mangled class name to demangle and pythonize.\n *\n * @return A String containing the demangled and pythonized class name belonging to a module.\n */\njuce::String pythonizeModuleClassName (juce::StringRef moduleName, juce::StringRef className, int maxTemplateArgs = -1);\n\n} // namespace popsicle::Helpers\n"
  },
  {
    "path": "modules/juce_python/utilities/CrashHandling.cpp",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include \"CrashHandling.h\"\n\n#if defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) || defined(__GLIBCPP__)\n#include <cxxabi.h>\n#include <execinfo.h>\n#include <dlfcn.h>\n#else\n#include \"WindowsIncludes.h\"\n#endif\n\nnamespace popsicle::Helpers {\n\n// =================================================================================================\n\njuce::String getStackBacktrace()\n{\n    juce::String result;\n\n   #if JUCE_WINDOWS\n    HANDLE process = GetCurrentProcess();\n    SymInitialize (process, nullptr, TRUE);\n\n    void* stack[128];\n    int frames = static_cast<int> (CaptureStackBackTrace (0, juce::numElementsInArray (stack), stack, nullptr));\n\n    juce::HeapBlock<SYMBOL_INFO> symbol;\n    symbol.calloc (sizeof (SYMBOL_INFO) + 256, 1);\n    symbol->MaxNameLen = 255;\n    symbol->SizeOfStruct = sizeof (SYMBOL_INFO);\n\n    for (int i = 0; i < frames; ++i)\n    {\n        DWORD64 displacement = 0;\n\n        if (SymFromAddr (process, reinterpret_cast<DWORD64> (stack[i]), &displacement, symbol))\n        {\n            result << i << \": \";\n\n            IMAGEHLP_MODULE64 moduleInfo;\n            juce::zerostruct (moduleInfo);\n            moduleInfo.SizeOfStruct = sizeof (moduleInfo);\n\n            if (::SymGetModuleInfo64 (process, symbol->ModBase, &moduleInfo))\n                result << moduleInfo.ModuleName << \": \";\n\n            result << symbol->Name << \" + 0x\" << juce::String::toHexString (static_cast<juce::int64> (displacement)) << juce::newLine;\n        }\n    }\n\n   #else\n    void* stack[128];\n    auto frames = backtrace (stack, juce::numElementsInArray (stack));\n    char** frameStrings = backtrace_symbols (stack, frames);\n\n    for (int i = 0; i < frames; ++i)\n    {\n        Dl_info info;\n        if (dladdr (stack[i], &info))\n        {\n            int status = 0;\n\n            std::unique_ptr<char, decltype (::free)*> demangled (abi::__cxa_demangle (info.dli_sname, nullptr, nullptr, &status), ::free);\n            if (status == 0)\n            {\n                result\n                    << juce::String (i).paddedRight (' ', 3)\n                    << \" \" << juce::File (juce::String (info.dli_fname)).getFileName().paddedRight (' ', 35)\n                    << \" 0x\" << juce::String::toHexString (reinterpret_cast<size_t> (stack[i])).paddedLeft ('0', sizeof (void*) * 2)\n                    << \" \" << demangled.get()\n                    << \" + \" << (reinterpret_cast<char*> (stack[i]) - reinterpret_cast<char*> (info.dli_saddr)) << juce::newLine;\n\n                continue;\n            }\n        }\n\n        result << frameStrings[i] << juce::newLine;\n    }\n\n    ::free (frameStrings);\n   #endif\n\n    return result;\n}\n\n// =================================================================================================\n\nvoid applicationCrashHandler ([[maybe_unused]] void* stackFrame)\n{\n    juce::Logger::getCurrentLogger()->outputDebugString (getStackBacktrace());\n}\n\n} // namespace popsicle::Helpers\n"
  },
  {
    "path": "modules/juce_python/utilities/CrashHandling.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_core/juce_core.h>\n\nnamespace popsicle::Helpers {\n\n// =================================================================================================\n\n/**\n * @brief Obtain stack traces.\n */\njuce::String getStackBacktrace();\n\n// =================================================================================================\n\n/**\n * @brief Crash handler.\n */\nvoid applicationCrashHandler (void* stackFrame);\n\n} // namespace popsicle::Helpers\n"
  },
  {
    "path": "modules/juce_python/utilities/MacroHelpers.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n// =================================================================================================\n/**\n * Stringify utility macros.\n */\n#define JUCE_PYTHON_STRINGIFY_HELPER(text) #text\n#define JUCE_PYTHON_STRINGIFY(text) JUCE_PYTHON_STRINGIFY_HELPER(text)\n"
  },
  {
    "path": "modules/juce_python/utilities/PyBind11Includes.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#include <juce_core/juce_core.h>\n\nJUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE (\"-Wcast-align\")\nJUCE_BEGIN_IGNORE_WARNINGS_MSVC (4180)\n\n#if JUCE_PYTHON_USE_EXTERNAL_PYBIND11\n#include <pybind11/embed.h>\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_CAST)\n#include <pybind11/cast.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_CAST\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS)\n#include <pybind11/operators.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_STL)\n#include <pybind11/stl.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL)\n#include <pybind11/functional.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM)\n#include <pybind11/iostream.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_NUMPY)\n#include <pybind11/numpy.h>\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_NUMPY\n#endif\n\n#else // JUCE_PYTHON_USE_EXTERNAL_PYBIND11\n#include \"../pybind11/embed.h\"\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_CAST)\n#include \"../pybind11/cast.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_CAST\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS)\n#include \"../pybind11/operators.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_OPERATORS\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_STL)\n#include \"../pybind11/stl.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_STL\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL)\n#include \"../pybind11/functional.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_FUNCTIONAL\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM)\n#include \"../pybind11/iostream.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_IOSTREAM\n#endif\n\n#if defined (JUCE_PYTHON_INCLUDE_PYBIND11_NUMPY)\n#include \"../pybind11/numpy.h\"\n#undef JUCE_PYTHON_INCLUDE_PYBIND11_NUMPY\n#endif\n\n#endif\n\nJUCE_END_IGNORE_WARNINGS_GCC_LIKE\nJUCE_END_IGNORE_WARNINGS_MSVC\n"
  },
  {
    "path": "modules/juce_python/utilities/PythonInterop.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <juce_python/juce_python.h>\n\n#include \"PyBind11Includes.h\"\n#include \"ClassDemangling.h\"\n\n#include <functional>\n\n// =================================================================================================\n\nPYBIND11_DECLARE_HOLDER_TYPE(T, juce::ReferenceCountedObjectPtr<T>, true)\n\nnamespace popsicle::Helpers {\n\n// =================================================================================================\n\ninline void printPythonException (const pybind11::error_already_set& e)\n{\n    pybind11::print (\"Traceback (most recent call last):\");\n\n    pybind11::module_::import (\"traceback\").attr (\"print_tb\") (e.trace());\n\n    pybind11::print (e.what());\n}\n\n// =================================================================================================\n\ntemplate <class T, class F>\nauto makeRepr (F&& func)\n{\n    static_assert (std::is_invocable_v<F, const T&>);\n\n    return [func](const T& instance)\n    {\n        juce::String result;\n\n        result\n            << pythonizeCompoundClassName (PythonModuleName, typeid (instance).name())\n            << \"('\" << std::invoke (func, instance) << \"')\";\n\n        return result;\n    };\n}\n\n// =================================================================================================\n\ntemplate <class E>\npybind11::enum_<E> makeArithmeticEnum (pybind11::object& parent, const char* name)\n{\n    jassert (name != nullptr);\n\n    using T = std::underlying_type_t<E>;\n\n    pybind11::enum_<E> classEnum (parent, name);\n\n    classEnum\n        .def (\"__and__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) & static_cast<T> (rhs)); })\n        .def (\"__eq__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) == static_cast<T> (rhs)); })\n        .def (\"__eq__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) == rhs); })\n        .def (\"__ge__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) >= static_cast<T> (rhs)); })\n        .def (\"__ge__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) >= rhs); })\n        .def (\"__gt__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) > static_cast<T> (rhs)); })\n        .def (\"__gt__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) > rhs); })\n        .def (\"__hash__\", [](E lhs) { return static_cast<T> (lhs); })\n        .def (\"__int__\", [](E lhs) { return static_cast<T> (lhs); })\n        .def (\"__invert__\", [](E lhs) { return ~static_cast<T> (lhs); })\n        .def (\"__le__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) <= static_cast<T> (rhs)); })\n        .def (\"__le__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) <= rhs); })\n        .def (\"__lt__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) < static_cast<T> (rhs)); })\n        .def (\"__lt__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) < rhs); })\n        .def (\"__ne__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) != static_cast<T> (rhs)); })\n        .def (\"__ne__\", [](E lhs, T rhs) { return (static_cast<T> (lhs) != rhs); })\n        .def (\"__or__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) | static_cast<T> (rhs)); })\n        .def (\"__xor__\", [](E lhs, E rhs) { return (static_cast<T> (lhs) ^ static_cast<T> (rhs)); })\n    ;\n\n    return classEnum;\n}\n\n// =================================================================================================\n\ntemplate <class T, class F>\nauto makeVoidPointerAndSizeCallable (F&& func)\n{\n    if constexpr (std::is_invocable_v<F, T&, const void*, size_t>)\n    {\n        return [func](T* self, pybind11::buffer data)\n        {\n            const auto info = data.request();\n\n            using return_value = std::invoke_result_t<F, T&, const void*, size_t>;\n\n            if constexpr (std::is_void_v<return_value>)\n                std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n            else\n                return std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n        };\n    }\n    else if constexpr (std::is_invocable_v<F, const T&, const void*, size_t>)\n    {\n        return [func](const T* self, pybind11::buffer data)\n        {\n            const auto info = data.request();\n\n            using return_value = std::invoke_result_t<F, const T&, const void*, size_t>;\n\n            if constexpr (std::is_void_v<return_value>)\n                std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n            else\n                return std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n        };\n    }\n    else if constexpr (std::is_invocable_v<F, T&, void*, size_t>)\n    {\n        return [func](T* self, pybind11::buffer data)\n        {\n            auto info = data.request (true);\n\n            using return_value = std::invoke_result_t<F, T&, void*, size_t>;\n\n            if constexpr (std::is_void_v<return_value>)\n                std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n            else\n                return std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n        };\n    }\n    else if constexpr (std::is_invocable_v<F, const T&, void*, size_t>)\n    {\n        return [func](const T* self, pybind11::buffer data)\n        {\n            auto info = data.request (true);\n\n            using return_value = std::invoke_result_t<F, T&, void*, size_t>;\n\n            if constexpr (std::is_void_v<return_value>)\n                std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n            else\n                return std::invoke (func, self, info.ptr, static_cast<size_t> (info.size));\n        };\n    }\n    else\n    {\n        return func;\n    }\n}\n\n} // namespace popsicle::Helpers\n"
  },
  {
    "path": "modules/juce_python/utilities/PythonTypes.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#include <cstdint>\n#include <functional>\n\nnamespace popsicle {\n\n// =================================================================================================\n\ntemplate <class T>\nclass GenericInteger\n{\npublic:\n    using underlying_type = T;\n\n    constexpr GenericInteger() = default;\n\n    constexpr GenericInteger (T value) noexcept\n        : value (value)\n    {\n    }\n\n    constexpr GenericInteger (const GenericInteger& other) = default;\n    constexpr GenericInteger (GenericInteger&& other) = default;\n    constexpr GenericInteger& operator= (const GenericInteger& other) = default;\n    constexpr GenericInteger& operator= (GenericInteger&& other) = default;\n\n    constexpr operator T() const noexcept\n    {\n        return value;\n    }\n\n    constexpr T get() const noexcept\n    {\n        return value;\n    }\n\nprivate:\n    T value{};\n};\n\n// =================================================================================================\n\ntemplate <class T>\nstruct underlying_type\n{\n    using type = T;\n};\n\ntemplate <class T>\nstruct underlying_type<GenericInteger<T>>\n{\n    using type = typename GenericInteger<T>::underlying_type;\n};\n\n\ntemplate <class T>\nusing underlying_type_t = typename underlying_type<T>::type;\n\n} // namespace popsicle\n"
  },
  {
    "path": "modules/juce_python/utilities/WindowsIncludes.h",
    "content": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>\n *\n * popsicle is an open source library subject to commercial or open-source licensing.\n *\n * By using popsicle, you agree to the terms of the popsicle License Agreement, which can\n * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE\n *\n * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).\n *\n * POPSICLE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED\n * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.\n */\n\n#pragma once\n\n#define VC_EXTRALEAN\n#define WIN32_LEAN_AND_MEAN\n#define NOMINMAX\n#define NOGDI\n#include <windows.h>\n#undef VC_EXTRALEAN\n#undef WIN32_LEAN_AND_MEAN\n#undef NOMINMAX\n#undef NOGDI\n\n#include <dbghelp.h>\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\n    # c++ building\n    \"cmake>=3.21\",\n    # pyi generation\n    \"mypy\",\n    # unit tests (for code coverage cmake target)\n    \"pytest\",\n    \"numpy\",\n    \"imageio\",\n    # defaults\n    \"setuptools\",\n    \"wheel\",\n]\nbuild-backend = \"setuptools.build_meta\"\n\n[tool.distutils.bdist_wheel]\nuniversal = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"\"\ntestpaths = [\"tests/\"]\n\n[tool.cibuildwheel]\nbuild-verbosity = 3\ntest-requires = \"pytest numpy imageio\"\ntest-command = \"pytest -s {project}/tests\"\nmanylinux-i686-image = \"manylinux_2_28\"\nmanylinux-x86_64-image = \"manylinux_2_28\"\nmanylinux-aarch64-image = \"manylinux_2_28\"\n\n[tool.cibuildwheel.linux]\nbefore-build = [\n    \"\"\"dnf install -y zlib-devel openssl-devel freetype-devel fontconfig-devel freeglut-devel alsa-lib-devel mesa-libGL-devel \\\n        xorg-x11-proto-devel xorg-x11-proto-devel libcurl-devel libpng-devel libX11-devel libXcursor-devel libXrandr-devel \\\n        libXinerama-devel libXrender-devel libXcomposite-devel libXinerama-devel libXcursor-devel xorg-x11-server-Xvfb \\\n        gtk3-devel webkit2gtk3-devel wget\"\"\",\n\n    \"wget https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0-1.noarch.rpm\",\n    \"yum localinstall -y lcov-2.0-1.noarch.rpm\",\n\n    #\"wget https://rpmfind.net/linux/epel/7/x86_64/Packages/p/perl-JSON-XS-3.01-2.el7.x86_64.rpm\",\n    #\"yum localinstall -y perl-JSON-XS-3.01-2.el7.x86_64.rpm\",\n\n    \"wget https://repo.almalinux.org/almalinux/8/PowerTools/x86_64/os/Packages/perl-JSON-XS-3.04-3.el8.x86_64.rpm\",\n    \"yum localinstall -y perl-JSON-XS-3.04-3.el8.x86_64.rpm\",\n\n    \"sed -i \\\"s/use JSON::PP/use JSON::XS/g\\\" /usr/bin/geninfo\"\n#    \"ln -s /usr/include/freetype2/ft2build.h /usr/include/ft2build.h\",\n#    \"ln -s /usr/include/freetype2/freetype /usr/include/freetype\"\n]\n\ntest-command = [\n    \"xvfb-run -a -s \\\"-screen 0 1024x768x24\\\" pytest -s {project}/tests\"\n#    \"\"\"xvfb-run -a -s \\\"-screen 0 1024x768x24\\\" pytest -s {project}/tests || \\\n#        { (mkdir -p /output/compare_data && cp {project}/tests/compare_data/* /output/compare_data/) ; exit 1 ; }\"\"\"\n]\n\n#repair-wheel-command = \"\"\"\n#pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2014 {wheel})\n#\"\"\"\n"
  },
  {
    "path": "scripts/build_wheel.sh",
    "content": "#!/bin/bash\n\npython -m build --wheel\n"
  },
  {
    "path": "scripts/install_wheel.sh",
    "content": "#!/bin/bash\n\npython3 -m pip install --index-url https://test.pypi.org/simple/ juce\n"
  },
  {
    "path": "scripts/pull_upstream.sh",
    "content": "#!/bin/bash\n\npushd ../\ngit subtree pull -P JUCE JUCE master --squash\npopd\n"
  },
  {
    "path": "scripts/upload_wheel.sh",
    "content": "#!/bin/bash\n\npython3 -m twine upload --repository testjuce dist/*.whl\n"
  },
  {
    "path": "setup.py",
    "content": "import os\nimport sys\nimport re\nimport shutil\nimport pathlib\nimport platform\nimport glob\nimport setuptools\n\nfrom distutils import log\nfrom distutils import sysconfig\nfrom setuptools import Extension\nfrom setuptools.command.build_ext import build_ext\nfrom setuptools.command.install_scripts import install_scripts\n\n\nproject_name = \"popsicle\"\nroot_dir = os.path.dirname(os.path.abspath(__file__))\n\n\ndef get_environment_option(typeClass, name, default=None):\n    try:\n        return typeClass(os.environ.get(name, default))\n    except ValueError:\n        return default\n\n\ndef glob_python_library(path):\n    for extension in [\".a\", \".lib\", \".so\", \".dylib\", \".dll\", \".pyd\"]:\n        for m in glob.iglob(f\"{path}/**/*python*{extension}\", recursive=True):\n            if \"site-packages\" not in m:\n                return m\n    return None\n\n\ndef get_python_path():\n    vars = sysconfig.get_config_vars()\n\n    if 'LIBPL' in vars and 'LIBRARY' in vars:\n        path = os.path.join(vars['LIBPL'], vars['LIBRARY'])\n        if os.path.exists(path):\n            return path\n\n    if 'SCRIPTDIR' in vars:\n        srcdir = vars['SCRIPTDIR']\n    elif 'srcdir' in vars:\n        srcdir = vars['srcdir']\n    else:\n        srcdir = None\n\n    if srcdir:\n        path = glob_python_library(srcdir)\n        if path and os.path.exists(path):\n            return path\n\n    if 'LIBDEST' in vars:\n        path = vars['LIBDEST']\n        if sys.platform in [\"win32\", \"cygwin\"]:\n            path = os.path.split(os.path.split(path)[0])[0]\n\n        path = glob_python_library(path)\n        if path and os.path.exists(path):\n            return path\n\n    log.error(\"cannot find static library to be linked\")\n    exit(-1)\n\n\ndef get_python_includes_path():\n    include_dir = sysconfig.get_config_var('CONFINCLUDEPY')\n    if include_dir and os.path.exists(include_dir):\n        return include_dir\n    return sysconfig.get_config_var('INCLUDEPY')\n\n\ndef get_python_lib_path():\n    return os.path.dirname(get_python_path())\n\n\nclass CMakeExtension(Extension):\n    def __init__(self, name):\n        super().__init__(name, sources=[])\n\n\nclass CMakeBuildExtension(build_ext):\n    build_for_coverage = get_environment_option(int, \"POPSICLE_COVERAGE\", 0)\n    build_for_distribution = get_environment_option(int, \"POPSICLE_DISTRIBUTION\", 0)\n    build_with_lto = get_environment_option(int, \"POPSICLE_LTO\", 0)\n    build_osx_architectures = get_environment_option(str, \"POPSICLE_OSX_ARCHITECTURES\", \"arm64;x86_64\")\n    build_osx_deployment_target = get_environment_option(str, \"POPSICLE_OSX_DEPLOYMENT_TARGET\", \"10.15\")\n\n    def build_extension(self, ext):\n        log.info(\"building with cmake\")\n\n        cwd = pathlib.Path().absolute()\n\n        build_temp = pathlib.Path(self.build_temp)\n        build_temp.mkdir(parents=True, exist_ok=True)\n\n        extdir = pathlib.Path(self.get_ext_fullpath(ext.name)).absolute()\n        extdir.mkdir(parents=True, exist_ok=True)\n\n        output_path = extdir.parent\n        output_path.mkdir(parents=True, exist_ok=True)\n\n        config = \"Debug\" if self.debug or self.build_for_coverage else \"Release\"\n        cmake_args = [\n            f\"-DCMAKE_BUILD_TYPE={config}\",\n            f\"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={output_path}\",\n            f\"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{config.upper()}={output_path}\",\n            f\"-DPython_INCLUDE_DIRS={get_python_includes_path()}\",\n            f\"-DPython_LIBRARY_DIRS={get_python_lib_path()}\"\n        ]\n\n        if self.build_for_coverage:\n            cmake_args += [\"-DENABLE_COVERAGE:BOOL=ON\"]\n\n        if self.build_for_distribution:\n            cmake_args += [\"-DENABLE_DISTRIBUTION:BOOL=ON\"]\n\n        if self.build_with_lto:\n            cmake_args += [\"-DENABLE_LTO:BOOL=ON\"]\n\n        if platform.system() == 'Darwin':\n            cmake_args += [\n                f\"-DCMAKE_OSX_ARCHITECTURES:STRING={self.build_osx_architectures}\",\n                f\"-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING={self.build_osx_deployment_target}\"\n            ]\n\n        try:\n            os.chdir(str(build_temp))\n            make_command = [\"cmake\", str(cwd)] + cmake_args\n            self.spawn(make_command)\n\n            if getattr(self, \"dry_run\"): return\n\n            build_command = [\"cmake\", \"--build\", \".\", \"--config\", config]\n            if sys.platform not in [\"win32\", \"cygwin\"]:\n                build_command += [\"--\", f\"-j{os.cpu_count()}\"]\n            self.spawn(build_command)\n\n            if self.build_for_coverage:\n                self.generate_coverage(cwd)\n\n        finally:\n            os.chdir(str(cwd))\n\n        self.generate_pyi(cwd)\n\n    def generate_coverage(self, cwd):\n        log.info(\"generating coverage files\")\n\n        self.spawn([\"cmake\", \"--build\", \".\", \"--target\", f\"{project_name}_coverage\"])\n\n        if not os.path.isdir(\"/host\"): # We are not running in cibuildwheel container\n            return\n\n        for m in glob.iglob(f\"{cwd}/**/*.info\", recursive=True):\n            log.info(f\"found {m} coverage info file\")\n\n            self.spawn([\"sed\", \"-i\", \"s:/project/::g\", m])\n\n            os.makedirs(\"/output\", exist_ok=True)\n            shutil.copyfile(m, f\"/output/lcov.info\")\n\n            break\n\n    def generate_pyi(self, cwd):\n        log.info(\"generating pyi files\")\n\n        library = None\n        for extension in [\".so\", \".pyd\"]:\n            for m in glob.iglob(f\"{cwd}/**/{project_name}{extension}\", recursive=True):\n                library = m\n                break\n\n        if library is None:\n            return\n\n        library_dir = os.path.dirname(library)\n        temp_pyi_dir = os.path.join(library_dir, project_name)\n        final_pyi_dir = os.path.join(root_dir, project_name)\n        final_pyi_file = os.path.join(root_dir, f\"{project_name}.pyi\")\n\n        try:\n            os.chdir(library_dir)\n\n            shutil.rmtree(temp_pyi_dir, ignore_errors=True)\n            shutil.rmtree(final_pyi_dir, ignore_errors=True)\n\n            self.spawn([\"stubgen\", \"--output\", library_dir, \"-p\", project_name])\n\n            if os.path.isdir(project_name):\n                shutil.copytree(project_name, final_pyi_dir)\n\n            if os.path.isfile(f\"{project_name}.pyi\"):\n                shutil.copyfile(f\"{project_name}.pyi\", final_pyi_file)\n\n        finally:\n            os.chdir(str(cwd))\n\n\nclass CustomInstallScripts(install_scripts):\n    def run(self):\n        install_scripts.run(self)\n\n        log.info(\"cleaning up pyi files\")\n\n        final_pyi_dir = os.path.join(root_dir, project_name)\n        if os.path.isdir(final_pyi_dir):\n            shutil.rmtree(final_pyi_dir, ignore_errors=True)\n\n        final_pyi_file = os.path.join(root_dir, f\"{project_name}.pyi\")\n        if os.path.isfile(final_pyi_file):\n            os.remove(final_pyi_file)\n\n\ndef load_description(version):\n    with open(\"README.rst\", mode=\"r\", encoding=\"utf-8\") as f:\n        long_description = f.read()\n\n    long_description = re.sub(\n        r\"`([^`>]+)\\s<((?!https)[^`>]+)>`_\",\n        fr\"`\\1 <https://github.com/kunitoki/popsicle/tree/v{version}/\\2>`_\",\n        long_description)\n\n    long_description = re.sub(\n        r\"image:: ((?!https).*)\",\n        fr\"image:: https://raw.githubusercontent.com/kunitoki/popsicle/v{version}/\\1\",\n        long_description)\n\n    long_description = re.sub(\n        r\":target: ((?!https).*)\",\n        fr\":target: https://github.com/kunitoki/popsicle/tree/v{version}/\\1\",\n        long_description)\n\n    return long_description\n\n\nwith open(\"modules/juce_python/juce_python.h\", mode=\"r\", encoding=\"utf-8\") as f:\n    version = re.findall(r\"version\\:\\s+(\\d+\\.\\d+\\.\\d+)\", f.read())[0]\n\n\nif platform.system() == 'Darwin':\n    build_osx_architectures = get_environment_option(str, \"POPSICLE_OSX_ARCHITECTURES\", \"arm64;x86_64\")\n    build_osx_deployment_target = get_environment_option(str, \"POPSICLE_OSX_DEPLOYMENT_TARGET\", \"10.15\")\n    if \"arm64\" in build_osx_architectures and \"x86_64\" in build_osx_architectures:\n        os.environ[\"_PYTHON_HOST_PLATFORM\"] = f\"macosx-{build_osx_deployment_target}-universal2\"\n    elif \"arm64\" in build_osx_architectures:\n        os.environ[\"_PYTHON_HOST_PLATFORM\"] = f\"macosx-{build_osx_deployment_target}-arm64\"\n    elif \"x86_64\" in build_osx_architectures:\n        os.environ[\"_PYTHON_HOST_PLATFORM\"] = f\"macosx-{build_osx_deployment_target}-x86_64\"\n    else:\n        raise RuntimeError(\"Invalid configuration of POPSICLE_OSX_ARCHITECTURES\")\n\n\nsetuptools.setup(\n    name=project_name,\n    version=version,\n    author=\"kunitoki\",\n    author_email=\"kunitoki@gmail.com\",\n    description=f\"{project_name}: Python integration for JUCE with pybind11.\",\n    long_description=load_description(version),\n    long_description_content_type=\"text/x-rst\",\n    url=\"https://github.com/kunitoki/popsicle\",\n    packages=setuptools.find_packages(\".\", exclude=[\"*cmake*\", \"*demos*\", \"*examples*\", \"*images*\", \"*JUCE*\", \"*scripts*\", \"*tests*\"]),\n    include_package_data=True,\n    cmdclass={\"build_ext\": CMakeBuildExtension, \"install_scripts\": CustomInstallScripts},\n    ext_modules=[CMakeExtension(project_name)],\n    zip_safe=False,\n    platforms=[\"macosx\", \"win32\", \"linux\"],\n    python_requires=\">=3.10\",\n    license=\"GPLv3\",\n    classifiers=[\n        \"Intended Audience :: Developers\",\n        \"Development Status :: 4 - Beta\",\n        \"Topic :: Software Development :: Libraries :: Application Frameworks\",\n        \"License :: Other/Proprietary License\",\n        \"License :: OSI Approved :: GNU General Public License v3 (GPLv3)\",\n        \"Programming Language :: C++\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: 3.12\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Operating System :: POSIX :: Linux\"\n    ]\n)\n"
  },
  {
    "path": "tests/__init__.py",
    "content": "from . import common\n"
  },
  {
    "path": "tests/common.py",
    "content": "import os\nimport sys\nimport glob\nfrom pathlib import Path\n\ntry:\n\timport popsicle as juce\n\nexcept ImportError:\n    folder = (Path(__file__).parent.parent / \"build\")\n    for ext in [\"*.so\", \"*.pyd\"]:\n        path_to_search = folder / \"**\" / ext\n        for f in glob.iglob(str(path_to_search), recursive=True):\n            if os.path.isfile(f):\n                sys.path.append(str(Path(f).parent))\n                break\n\n    import popsicle as juce\n"
  },
  {
    "path": "tests/compare_data/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "tests/conftest.py",
    "content": "import sys\nimport pytest\n\nimport popsicle as juce\n\nfrom .utilities import get_runtime_data_folder, remove_directory_recursively\n\n#==================================================================================================\n\ndef pytest_addoption(parser):\n    parser.addoption(\"--update-rendering\", action=\"store_true\", default=False)\n\ndef pytest_generate_tests(metafunc):\n    option_value = metafunc.config.option.update_rendering\n    if \"update_rendering\" in metafunc.fixturenames and option_value:\n        metafunc.parametrize(\"update_rendering\", [option_value])\n\ndef pytest_unconfigure(config):\n    if sys.gettrace() is not None:\n        return\n\n    remove_directory_recursively(get_runtime_data_folder().getFullPathName(), [\".gitignore\"])\n\n#==================================================================================================\n\ndef yield_test():\n    yield\n\n@pytest.fixture\ndef juce_app():\n    class Application(juce.JUCEApplication):\n        def __init__(self):\n            super().__init__()\n\n        def getApplicationName(self):\n            return \"TestApp\"\n\n        def getApplicationVersion(self):\n            return \"1.0\"\n\n        def initialise(self, commandLineParameters: str):\n            juce.MessageManager.callAsync(yield_test)\n\n        def shutdown(self):\n            pass\n\n    with juce.TestApplication(Application) as app:\n        next(app)\n        yield app\n        next(app)\n"
  },
  {
    "path": "tests/runtime_data/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "tests/test_juce_core/__init__.py",
    "content": "from .. import common\n"
  },
  {
    "path": "tests/test_juce_core/data/somefile.txt",
    "content": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCaEUhbzLlWlBCoSPsa/fKoGxfB+p+etUb9HeuHO0m2k6Tt8g64\nNiwIXNWyi6EJ260r0legE/V/dFQC4kWwzC1VPHsrjbulfr2n+Ez7MrfZwlTwPb0B\niOS45AxHtkwb0lcoNLk2/8PamVNlfvi+6AxJwsEpM8ijSASgDrTIEkjgHwIDAQAB\nAoGAMYqxK+PPDUobeSHOrUVPzEK6BwRiY5SDOU1vuVKVR4J+nI0jspSo4B+KEBna\nNONQ8jB3QOBqJwvvH+ZG5q0hPjG1KP3V9dA+YzwHxEdV7WIqYp156CLAlevfnMgO\nUXtVZt09PlsW7HN5hzN6Dkl/26S1rZevQcHDzdh1QqRjfYECQQDGDUIQXlOiAcGo\nd5YqAGpWe0wzJ0UypeqZcqS9MVe9OkjjopCkkYntifdN/1oG7S/1KUMtLoGHqntb\nc428zOO/AkEAxyV0cmuJbFdfM0x2XhZ+ge/7putIx76RHDOjBpM6VQXpLEFj54kB\nqGLAB7SXr7P4AFrEjfckJOp2YMI5BreboQJAb3EUZHt/WeDdJLutzpKPQ3x7oykM\nwfQkbxXYZvD16u96BkT6WO/gCb6hXs05zj32x1/hgfHyRvGCGjKKZdtwpwJBAJ74\ny0g7h+wwoxJ0S1k4Y6yeQikxUVwCSBxXLCCnjr0ohsaJPJMrz2L30YtVInFkHOlL\ni/Q4AWZmtDDxWkx+bYECQG8e6bGoszuX5xjvhEBslIws9+nMzMuYBR8HvhLo58B5\nN8dk3nIsLs3UncKLiiWubMAciU5jUxZoqWpRXXwECKE=\n-----END RSA PRIVATE KEY-----"
  },
  {
    "path": "tests/test_juce_core/data/test.xml",
    "content": "<root>\n  <person\n  firstname=\"Kathy\"\n  lastname=\"McClimans\"\n  city=\"Mecca\"\n  country=\"Mongolia\"\n  firstname2=\"Fanny\"\n  lastname2=\"Reinke\"\n  email=\"Fanny.Reinke@yopmail.com\"\n  />\n  <random>99</random>\n  <random_float>39.536</random_float>\n  <bool>false</bool>\n  <date>1998-05-25</date>\n  <regEx>hellooooooooooooooooooooooooooooooooooooooo world</regEx>\n  <enum>xml</enum>\n  <elt>Peri</elt><elt>Leeanne</elt><elt>Mary</elt><elt>Heida</elt><elt>Sheelagh</elt>\n  <Fanny>\n    <age>20</age>\n    <age>21</age>\n    <age>22</age>\n  </Fanny>\n</root>"
  },
  {
    "path": "tests/test_juce_core/data/test_broken.xml",
    "content": "<root>\n  <person\n  firstname=\"Kathy\"\n  lastname=\"McClimans\"\n  city=\"Mecca\"\n  country=\"Mongolia\"\n  firstname2=\"Fanny\"\n  lastname2=\"Reinke\"\n  email=\"Fanny.Reinke@yopmail.com\"\n  >\n  <random>99</random>\n  <random_float>39.536</random_float>\n  <bool>false</bool>\n  <date>1998-05-25</date>\n  <regEx>hellooooooooooooooooooooooooooooooooooooooo world</regEx>\n  <enum>xml</enum>\n  <elt>Peri</elt><elt>Leeanne</elt><elt>Mary</elt><elt>Heida</elt><elt>Sheelagh</elt>\n  <Fanny>\n    <age>20</age>\n    <age>21</age>\n    <age>22</age>\n  </Fanny>\n</root>"
  },
  {
    "path": "tests/test_juce_core/test_Array.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\n@pytest.fixture\ndef create_array():\n    def _create_array(type, *args):\n        return juce.Array[type](*args)\n    return _create_array\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"array_type\", [bool, int, float])\ndef test_array_default_constructor(array_type, create_array):\n    arr = create_array(array_type)\n    assert arr.size() == 0\n\n#==================================================================================================\n\ndef test_array_bool_copy_constructor(create_array):\n    original = create_array(bool, True, True, False)\n    copy = create_array(bool, original)\n    assert copy.size() == 3\n    assert copy[0] == True\n    assert copy[1] == True\n    assert copy[2] == False\n\ndef test_array_int_copy_constructor(create_array):\n    original = create_array(int, 1, 2, 3)\n    copy = create_array(int, original)\n    assert copy.size() == 3\n    assert copy[0] == 1\n    assert copy[1] == 2\n    assert copy[2] == 3\n\ndef test_array_float_copy_constructor(create_array):\n    original = create_array(float, 1.0, 2.0, 3.0)\n    copy = create_array(float, original)\n    assert copy.size() == 3\n    assert copy[0] == pytest.approx(1.0)\n    assert copy[1] == pytest.approx(2.0)\n    assert copy[2] == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_from_list_constructor(create_array):\n    arr = create_array(bool, [True, False, True])\n    assert arr.size() == 3\n    assert arr[0] == True\n    assert arr[1] == False\n    assert arr[2] == True\n\ndef test_array_int_from_list_constructor(create_array):\n    arr = create_array(int, [1, 2, 3])\n    assert arr.size() == 3\n    assert arr[0] == 1\n    assert arr[1] == 2\n    assert arr[2] == 3\n\ndef test_array_float_from_list_constructor(create_array):\n    arr = create_array(float, [1.0, 2.0, 3.0])\n    assert arr.size() == 3\n    assert arr[0] == pytest.approx(1.0)\n    assert arr[1] == pytest.approx(2.0)\n    assert arr[2] == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_single_element_constructor(create_array):\n    arr = create_array(bool, False)\n    assert arr.size() == 1\n    assert arr[0] == False\n\ndef test_array_int_single_element_constructor(create_array):\n    arr = create_array(int, 1)\n    assert arr.size() == 1\n    assert arr[0] == 1\n\ndef test_array_float_single_element_constructor(create_array):\n    arr = create_array(float, 1.0)\n    assert arr.size() == 1\n    assert arr[0] == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_array_bool_clear(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.clear()\n    assert arr.size() == 0\n\ndef test_array_int_clear(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.clear()\n    assert arr.size() == 0\n\ndef test_array_float_clear(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.clear()\n    assert arr.size() == 0\n\n#==================================================================================================\n\ndef test_array_bool_clear_quick(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.clearQuick()\n    assert arr.size() == 0\n\ndef test_array_int_clear_quick(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.clearQuick()\n    assert arr.size() == 0\n\ndef test_array_float_clear_quick(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.clearQuick()\n    assert arr.size() == 0\n\n#==================================================================================================\n\ndef test_array_bool_fill(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.fill(False)\n    assert all(arr[i] == False for i in range(arr.size()))\n\ndef test_array_int_fill(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.fill(9)\n    assert all(arr[i] == 9 for i in range(arr.size()))\n\ndef test_array_float_fill(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.fill(9.0)\n    assert all(arr[i] == pytest.approx(9.0) for i in range(arr.size()))\n\n#==================================================================================================\n\ndef test_array_bool_size(create_array):\n    arr = create_array(bool, True, False, True)\n    assert arr.size() == 3\n\ndef test_array_int_size(create_array):\n    arr = create_array(int, 1, 2, 3)\n    assert arr.size() == 3\n\ndef test_array_float_size(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    assert arr.size() == 3\n\n#==================================================================================================\n\ndef test_array_bool_is_empty(create_array):\n    empty_arr = create_array(bool)\n    non_empty_arr = create_array(bool, True)\n    assert empty_arr.isEmpty()\n    assert not non_empty_arr.isEmpty()\n\ndef test_array_int_is_empty(create_array):\n    empty_arr = create_array(int, )\n    non_empty_arr = create_array(int, 1)\n    assert empty_arr.isEmpty()\n    assert not non_empty_arr.isEmpty()\n\ndef test_array_float_is_empty(create_array):\n    empty_arr = create_array(float)\n    non_empty_arr = create_array(float, 1.0)\n    assert empty_arr.isEmpty()\n    assert not non_empty_arr.isEmpty()\n\n#==================================================================================================\n\ndef test_array_bool_index_of(create_array):\n    arr = create_array(bool, True, False, True)\n    assert arr.indexOf(True) == 0\n    assert arr.indexOf(False) == 1\n\ndef test_array_int_index_of(create_array):\n    arr = create_array(int, 1, 2, 3)\n    assert arr.indexOf(2) == 1\n    assert arr.indexOf(4) == -1\n\ndef test_array_float_index_of(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    assert arr.indexOf(2.0) == 1\n    assert arr.indexOf(4.0) == -1\n\n#==================================================================================================\n\ndef test_array_bool_contains(create_array):\n    arr = create_array(bool, True, True, True)\n    assert arr.contains(True)\n    assert not arr.contains(False)\n\ndef test_array_int_contains(create_array):\n    arr = create_array(int, 1, 2, 3)\n    assert arr.contains(2)\n    assert not arr.contains(4)\n\ndef test_array_float_contains(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    assert arr.contains(2.0)\n    assert not arr.contains(4.0)\n\n#==================================================================================================\n\ndef test_array_bool_add(create_array):\n    arr = create_array(bool)\n    arr.add(False)\n    assert arr.size() == 1\n    assert arr[0] == False\n\ndef test_array_int_add(create_array):\n    arr = create_array(int, )\n    arr.add(1)\n    assert arr.size() == 1\n    assert arr[0] == 1\n\ndef test_array_float_add(create_array):\n    arr = create_array(float)\n    arr.add(1.0)\n    assert arr.size() == 1\n    assert arr[0] == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_array_bool_insert(create_array):\n    arr = create_array(bool, True, False)\n    arr.insert(1, True)\n    assert arr.size() == 3\n    assert arr[1] == True\n\ndef test_array_int_insert(create_array):\n    arr = create_array(int, 1, 3)\n    arr.insert(1, 2)\n    assert arr.size() == 3\n    assert arr[1] == 2\n\ndef test_array_float_insert(create_array):\n    arr = create_array(float, 1.0, 3.0)\n    arr.insert(1, 2.0)\n    assert arr.size() == 3\n    assert arr[1] == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_insert_multiple(create_array):\n    arr = create_array(bool, True, False)\n    arr.insertMultiple(1, False, 2)\n    assert arr.size() == 4\n    assert arr[1] == False\n    assert arr[2] == False\n\ndef test_array_int_insert_multiple(create_array):\n    arr = create_array(int, 1, 4)\n    arr.insertMultiple(1, 2, 2)\n    assert arr.size() == 4\n    assert arr[1] == 2\n    assert arr[2] == 2\n\ndef test_array_float_insert_multiple(create_array):\n    arr = create_array(float, 1.0, 4.0)\n    arr.insertMultiple(1, 2.0, 2)\n    assert arr.size() == 4\n    assert arr[1] == pytest.approx(2.0)\n    assert arr[2] == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_add_if_not_already_there(create_array):\n    arr = create_array(bool, True, False)\n    added = arr.addIfNotAlreadyThere(False)  # Assuming adding duplicates is not allowed\n    not_added = arr.addIfNotAlreadyThere(True)\n    assert not added\n    assert not not_added\n    assert arr.size() == 2  # No change, as both elements were already there\n\ndef test_array_int_add_if_not_already_there(create_array):\n    arr = create_array(int, 1, 2, 3)\n    added = arr.addIfNotAlreadyThere(4)\n    not_added = arr.addIfNotAlreadyThere(3)\n    assert added\n    assert not not_added\n    assert arr.size() == 4\n\ndef test_array_float_add_if_not_already_there(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    added = arr.addIfNotAlreadyThere(4.0)\n    not_added = arr.addIfNotAlreadyThere(3.0)\n    assert added\n    assert not not_added\n    assert arr.size() == 4\n\n#==================================================================================================\n\ndef test_array_bool_set(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.set(1, True)\n    assert arr[1] == True\n\ndef test_array_int_set(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.set(1, 9)\n    assert arr[1] == 9\n\ndef test_array_float_set(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.set(1, 9.0)\n    assert arr[1] == pytest.approx(9.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.remove(1)\n    assert arr.size() == 2\n    assert arr[1] == True\n\ndef test_array_int_remove(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.remove(1)\n    assert arr.size() == 2\n    assert arr[1] == 3\n\ndef test_array_float_remove(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.remove(1)\n    assert arr.size() == 2\n    assert arr[1] == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove_and_return(create_array):\n    arr = create_array(bool, True, False, True)\n    removed = arr.removeAndReturn(1)\n    assert removed == False\n    assert arr.size() == 2\n\ndef test_array_int_remove_and_return(create_array):\n    arr = create_array(int, 1, 2, 3)\n    removed = arr.removeAndReturn(1)\n    assert removed == 2\n    assert arr.size() == 2\n\ndef test_array_float_remove_and_return(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    removed = arr.removeAndReturn(1)\n    assert removed == pytest.approx(2.0)\n    assert arr.size() == 2\n\n#==================================================================================================\n\ndef test_array_bool_remove_first_matching_value(create_array):\n    arr = create_array(bool, True, False, False, True)\n    index = arr.removeFirstMatchingValue(False)\n    assert index == 1\n    assert arr.size() == 3\n    assert arr[1] == False\n\ndef test_array_int_remove_first_matching_value(create_array):\n    arr = create_array(int, 1, 2, 2, 3)\n    index = arr.removeFirstMatchingValue(2)\n    assert index == 1\n    assert arr.size() == 3\n    assert arr[1] == 2\n\ndef test_array_float_remove_first_matching_value(create_array):\n    arr = create_array(float, 1.0, 2.0, 2.0, 3.0)\n    index = arr.removeFirstMatchingValue(2.0)\n    assert index == 1\n    assert arr.size() == 3\n    assert arr[1] == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove_all_instances_of(create_array):\n    arr = create_array(bool, True, False, False, True)\n    count = arr.removeAllInstancesOf(False)\n    assert count == 2\n    assert arr.size() == 2\n\ndef test_array_int_remove_all_instances_of(create_array):\n    arr = create_array(int, 1, 2, 2, 3)\n    count = arr.removeAllInstancesOf(2)\n    assert count == 2\n    assert arr.size() == 2\n\ndef test_array_float_remove_all_instances_of(create_array):\n    arr = create_array(float, 1.0, 2.0, 2.0, 3.0)\n    count = arr.removeAllInstancesOf(2.0)\n    assert count == 2\n    assert arr.size() == 2\n\n#==================================================================================================\n\ndef test_array_bool_remove_if(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    count = arr.removeIf(lambda x: not x)  # Remove False values\n    assert count == 2\n    assert arr.size() == 3\n    assert not arr.contains(False)\n\ndef test_array_int_remove_if(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    count = arr.removeIf(lambda x: x % 2 == 0)\n    assert count == 2\n    assert arr.size() == 3\n    assert not arr.contains(2)\n    assert not arr.contains(4)\n\ndef test_array_float_remove_if(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    count = arr.removeIf(lambda x: x % 2 == 0)  # Remove even numbers\n    assert count == 2\n    assert arr.size() == 3\n    assert not arr.contains(2.0)\n    assert not arr.contains(4.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove_range(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    arr.removeRange(1, 3)\n    assert arr.size() == 2\n    assert arr[0] == True\n    assert arr[1] == True\n\ndef test_array_int_remove_range(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    arr.removeRange(1, 3)\n    assert arr.size() == 2\n    assert arr[0] == 1\n    assert arr[1] == 5\n\ndef test_array_float_remove_range(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    arr.removeRange(1, 3)\n    assert arr.size() == 2\n    assert arr[0] == pytest.approx(1.0)\n    assert arr[1] == pytest.approx(5.0)\n\n#==================================================================================================\n\ndef test_array_bool_swap(create_array):\n    arr = create_array(bool, True, False, True, True)\n    arr.swap(1, 3)\n    assert arr[1] == True\n    assert arr[3] == False\n\ndef test_array_int_swap(create_array):\n    arr = create_array(int, 1, 2, 3, 4)\n    arr.swap(1, 3)\n    assert arr[1] == 4\n    assert arr[3] == 2\n\ndef test_array_float_swap(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0)\n    arr.swap(1, 3)\n    assert arr[1] == pytest.approx(4.0)\n    assert arr[3] == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_move(create_array):\n    arr = create_array(bool, True, False, True, False)\n    arr.move(0, 3)\n    assert arr[0] == False\n    assert arr[3] == True\n\ndef test_array_int_move(create_array):\n    arr = create_array(int, 1, 2, 3, 4)\n    arr.move(0, 3)\n    assert arr[0] == 2\n    assert arr[3] == 1\n\ndef test_array_float_move(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0)\n    arr.move(0, 3)\n    assert arr[0] == pytest.approx(2.0)\n    assert arr[3] == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_array_bool_resize(create_array):\n    arr = create_array(bool, True, False, True)\n    arr.resize(5)\n    assert arr.size() == 5\n    arr.resize(2)\n    assert arr.size() == 2\n    assert arr[1] == False\n\ndef test_array_int_resize(create_array):\n    arr = create_array(int, 1, 2, 3)\n    arr.resize(5)\n    assert arr.size() == 5\n    arr.resize(2)\n    assert arr.size() == 2\n    assert arr[1] == 2\n\ndef test_array_float_resize(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    arr.resize(5)\n    assert arr.size() == 5\n    arr.resize(2)\n    assert arr.size() == 2\n    assert arr[1] == pytest.approx(2.0)\n\n#==================================================================================================\n\nclass CustomComparatorBool(juce.Array[bool].Comparator):\n    def compareElements(self, x, y):\n        if x == y: return 0\n        elif x < y: return -1\n        else: return 1\n\ndef test_array_bool_add_sorted_comparator(create_array):\n    arr = create_array(bool)\n\n    comparator = CustomComparatorBool()\n    arr.addSorted(comparator, True)\n    arr.addSorted(comparator, True)\n    arr.addSorted(comparator, False)\n    assert arr[0] == False\n    assert arr[1] == True\n    assert arr[2] == True\n\nclass CustomComparatorInt(juce.Array[int].Comparator):\n    def compareElements(self, x, y):\n        if x == y: return 0\n        elif x < y: return -1\n        else: return 1\n\ndef test_array_int_add_sorted_comparator(create_array):\n    arr = create_array(int)\n\n    comparator = CustomComparatorInt()\n    arr.addSorted(comparator, 2)\n    arr.addSorted(comparator, 1)\n    arr.addSorted(comparator, 3)\n    assert arr[0] == 1\n    assert arr[1] == 2\n    assert arr[2] == 3\n\nclass CustomComparatorFloat(juce.Array[float].Comparator):\n    def compareElements(self, x, y):\n        if x == y: return 0\n        elif x < y: return -1\n        else: return 1\n\ndef test_array_float_add_sorted_comparator(create_array):\n    arr = create_array(float)\n\n    comparator = CustomComparatorFloat()\n    arr.addSorted(comparator, 2.1)\n    arr.addSorted(comparator, 1.1)\n    arr.addSorted(comparator, 3.1)\n    assert arr[0] == pytest.approx(1.1)\n    assert arr[1] == pytest.approx(2.1)\n    assert arr[2] == pytest.approx(3.1)\n\n#==================================================================================================\n@pytest.mark.skip(reason=\"Temporarily not available\")\ndef test_array_int_add_sorted_lambda(create_array):\n    arr = create_array(int)\n    comparator = lambda x, y: x - y\n    arr.addSorted(comparator, 2)\n    arr.addSorted(comparator, 1)\n    arr.addSorted(comparator, 3)\n    assert arr[0] == 1\n    assert arr[1] == 2\n    assert arr[2] == 3\n\n#==================================================================================================\n\ndef test_array_bool_add_using_default_sort(create_array):\n    arr = create_array(bool)\n    arr.addUsingDefaultSort(False)\n    arr.addUsingDefaultSort(True)\n    arr.addUsingDefaultSort(False)  # Adding a second False to see sorting effect\n    assert arr[0] == False\n    assert arr[1] == False  # Verify that both Falses are at the beginning\n    assert arr[2] == True\n\ndef test_array_int_add_using_default_sort(create_array):\n    arr = create_array(int)\n    arr.addUsingDefaultSort(2)\n    arr.addUsingDefaultSort(1)\n    arr.addUsingDefaultSort(3)\n    assert arr[0] == 1\n    assert arr[1] == 2\n    assert arr[2] == 3\n\ndef test_array_float_add_using_default_sort(create_array):\n    arr = create_array(float)\n    arr.addUsingDefaultSort(2.0)\n    arr.addUsingDefaultSort(1.0)\n    arr.addUsingDefaultSort(3.0)\n    assert arr[0] == pytest.approx(1.0)\n    assert arr[1] == pytest.approx(2.0)\n    assert arr[2] == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_sort(create_array):\n    arr = create_array(bool, True, False, True, False)\n    arr.sort()\n    assert arr[0] == False\n    assert arr[1] == False  # Verify that both Falses are at the beginning after sort\n    assert arr[2] == True\n    assert arr[3] == True\n\ndef test_array_int_sort(create_array):\n    arr = create_array(int, 3, 1, 2)\n    arr.sort()\n    assert arr[0] == 1\n    assert arr[1] == 2\n    assert arr[2] == 3\n\ndef test_array_float_sort(create_array):\n    arr = create_array(float, 3.0, 1.0, 2.0)\n    arr.sort()\n    assert arr[0] == pytest.approx(1.0)\n    assert arr[1] == pytest.approx(2.0)\n    assert arr[2] == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_minimise_storage_overheads(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    arr.remove(1)  # Remove one instance of False\n    arr.remove(2)  # Remove another instance of True, expecting index adjustment\n    assert arr.size() == 3\n    arr.minimiseStorageOverheads()\n    assert arr.size() == 3  # Size remains unchanged; method optimizes storage without altering size\n\ndef test_array_int_minimise_storage_overheads(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    arr.remove(1)\n    arr.remove(2)\n    assert arr.size() == 3\n    arr.minimiseStorageOverheads()\n    assert arr.size() == 3\n\ndef test_array_float_minimise_storage_overheads(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    arr.remove(1)  # Remove 2.0\n    arr.remove(2)  # Remove what is now at index 2, originally 4.0\n    assert arr.size() == 3\n    arr.minimiseStorageOverheads()\n    assert arr.size() == 3\n\n#==================================================================================================\n\ndef test_array_bool_ensure_storage_allocated(create_array):\n    arr = create_array(bool, True, False, True)\n    assert arr.size() == 3\n    arr.ensureStorageAllocated(10)  # Ensure space for 10 elements is allocated\n    assert arr.size() == 3  # Size should remain unchanged\n\ndef test_array_int_ensure_storage_allocated(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    assert arr.size() == 5\n    arr.ensureStorageAllocated(10)\n    assert arr.size() == 5\n\ndef test_array_float_ensure_storage_allocated(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    assert arr.size() == 3\n    arr.ensureStorageAllocated(10)\n    assert arr.size() == 3\n\n#==================================================================================================\n\ndef test_array_bool_get_first(create_array):\n    arr = create_array(bool, False, True, True)\n    first_element = arr.getFirst()\n    assert first_element == False\n\ndef test_array_int_get_first(create_array):\n    arr = create_array(int, 1, 2, 3)\n    first_element = arr.getFirst()\n    assert first_element == 1\n\n\ndef test_array_float_get_first(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    first_element = arr.getFirst()\n    assert first_element == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_array_bool_get_last(create_array):\n    arr = create_array(bool, True, False, True)\n    last_element = arr.getLast()\n    assert last_element == True\n\ndef test_array_int_get_last(create_array):\n    arr = create_array(int, 1, 2, 3)\n    last_element = arr.getLast()\n    assert last_element == 3\n\ndef test_array_float_get_last(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    last_element = arr.getLast()\n    assert last_element == pytest.approx(3.0)\n\n#==================================================================================================\n\ndef test_array_bool_get_unchecked(create_array):\n    arr = create_array(bool, True, False, True)\n    element = arr.getUnchecked(1)\n    assert element == False\n\ndef test_array_int_get_unchecked(create_array):\n    arr = create_array(int, 1, 2, 3)\n    element = arr.getUnchecked(1)\n    assert element == 2\n\ndef test_array_float_get_unchecked(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    element = arr.getUnchecked(1)\n    assert element == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_get_reference(create_array):\n    arr = create_array(bool, True, False, True)\n    ref = arr.getReference(1)\n    assert ref == False\n\ndef test_array_int_get_reference(create_array):\n    arr = create_array(int, 1, 2, 3)\n    ref = arr.getReference(1)\n    assert ref == 2\n\ndef test_array_float_get_reference(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    ref = arr.getReference(1)\n    assert ref == pytest.approx(2.0)\n\n#==================================================================================================\n\ndef test_array_bool_operator_equals(create_array):\n    arr1 = create_array(bool, True, False, True)\n    arr2 = create_array(bool, True, False, True)\n    assert arr1 == arr2\n\ndef test_array_int_operator_equals(create_array):\n    arr1 = create_array(int, 1, 2, 3)\n    arr2 = create_array(int, 1, 2, 3)\n    assert arr1 == arr2\n\ndef test_array_float_operator_equals(create_array):\n    arr1 = create_array(float, 1.0, 2.0, 3.0)\n    arr2 = create_array(float, 1.0, 2.0, 3.0)\n    assert arr1 == arr2\n\n#==================================================================================================\n\ndef test_array_bool_operator_not_equals(create_array):\n    arr1 = create_array(bool, True, False, True)\n    arr2 = create_array(bool, False, True, False)\n    assert arr1 != arr2\n\ndef test_array_int_operator_not_equals(create_array):\n    arr1 = create_array(int, 1, 2, 3)\n    arr2 = create_array(int, 4, 5, 6)\n    assert arr1 != arr2\n\ndef test_array_float_operator_not_equals(create_array):\n    arr1 = create_array(float, 1.0, 2.0, 3.0)\n    arr2 = create_array(float, 4.0, 5.0, 6.0)\n    assert arr1 != arr2\n\n#==================================================================================================\n\ndef test_array_bool_add_array(create_array):\n    arr1 = create_array(bool, True, False, True)\n    arr2 = create_array(bool, False, True, False)\n    arr1.addArray(arr2)\n    assert arr1.size() == 6\n    assert arr1[3] == False\n    assert arr1[4] == True\n\ndef test_array_int_add_array(create_array):\n    arr1 = create_array(int, 1, 2, 3)\n    arr2 = create_array(int, 4, 5, 6)\n    arr1.addArray(arr2)\n    assert arr1.size() == 6\n    assert arr1[3] == 4\n    assert arr1[4] == 5\n    assert arr1[5] == 6\n\ndef test_array_float_add_array(create_array):\n    arr1 = create_array(float, 1.0, 2.0, 3.0)\n    arr2 = create_array(float, 4.0, 5.0, 6.0)\n    arr1.addArray(arr2)\n    assert arr1.size() == 6\n    assert arr1[3] == pytest.approx(4.0)\n    assert arr1[4] == pytest.approx(5.0)\n\n#==================================================================================================\n\ndef test_array_bool_swap_with(create_array):\n    arr1 = create_array(bool, True, False, True)\n    arr2 = create_array(bool, False, True, False)\n    arr1.swapWith(arr2)\n    assert arr1.size() == 3\n    assert arr2.size() == 3\n    assert arr1[0] == False\n    assert arr2[0] == True\n\ndef test_array_int_swap_with(create_array):\n    arr1 = create_array(int, 1, 2, 3)\n    arr2 = create_array(int, 4, 5, 6)\n    arr1.swapWith(arr2)\n    assert arr1.size() == 3\n    assert arr2.size() == 3\n    assert arr1[0] == 4\n    assert arr2[0] == 1\n\ndef test_array_float_swap_with(create_array):\n    arr1 = create_array(float, 1.0, 2.0, 3.0)\n    arr2 = create_array(float, 4.0, 5.0, 6.0)\n    arr1.swapWith(arr2)\n    assert arr1.size() == 3\n    assert arr2.size() == 3\n    assert arr1[0] == pytest.approx(4.0)\n    assert arr2[0] == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove_last(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    arr.removeLast(2)  # Remove the last two elements\n    assert arr.size() == 3\n    assert arr[2] == True  # The last remaining element is True\n\ndef test_array_int_remove_last(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    arr.removeLast(2)\n    assert arr.size() == 3\n    assert arr[2] == 3\n\ndef test_array_float_remove_last(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    arr.removeLast(2)  # Remove the last two elements\n    assert arr.size() == 3\n    assert arr[2] == pytest.approx(3.0)  # The last remaining element is 3.0\n\n#==================================================================================================\n\ndef test_array_bool_remove_values_in(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    other_arr = create_array(bool, False)\n    arr.removeValuesIn(other_arr)\n    assert arr.size() == 3\n    assert arr.contains(True)\n    assert not arr.contains(False)  # After removal, False should not be present\n\ndef test_array_int_remove_values_in(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    other_arr = create_array(int, 2, 4)\n    arr.removeValuesIn(other_arr)\n    assert arr.size() == 3\n    assert arr.contains(1)\n    assert arr.contains(3)\n    assert arr.contains(5)\n\ndef test_array_float_remove_values_in(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    other_arr = create_array(float, 2.0, 4.0)\n    arr.removeValuesIn(other_arr)\n    assert arr.size() == 3\n    assert arr.contains(1.0)\n    assert arr.contains(3.0)\n    assert arr.contains(5.0)\n    assert not arr.contains(2.0)\n    assert not arr.contains(4.0)\n\n#==================================================================================================\n\ndef test_array_bool_remove_values_not_in(create_array):\n    arr = create_array(bool, True, False, True, False, True)\n    other_arr = create_array(bool, True)\n    arr.removeValuesNotIn(other_arr)\n    assert arr.size() == 3\n    assert arr.contains(True)\n    assert not arr.contains(False)  # False should be removed since it's not in other_arr\n\ndef test_array_int_remove_values_not_in(create_array):\n    arr = create_array(int, 1, 2, 3, 4, 5)\n    other_arr = create_array(int, 2, 4)\n    arr.removeValuesNotIn(other_arr)\n    assert arr.size() == 2\n    assert arr.contains(2)\n    assert arr.contains(4)\n\ndef test_array_float_remove_values_not_in(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0, 4.0, 5.0)\n    other_arr = create_array(float, 2.0, 4.0)\n    arr.removeValuesNotIn(other_arr)\n    assert arr.size() == 2\n    assert arr.contains(2.0)\n    assert arr.contains(4.0)\n    assert not arr.contains(1.0)\n    assert not arr.contains(3.0)\n    assert not arr.contains(5.0)\n\n#==================================================================================================\n\ndef test_array_bool_begin_end(create_array):\n    arr = create_array(bool, True, False, True)\n    elements = [x for x in arr]  # Assuming direct iteration over Array is supported\n    assert elements == [True, False, True]\n\ndef test_array_int_begin_end(create_array):\n    arr = create_array(int, 1, 2, 3)\n    elements = [x for x in arr]  # Assuming direct iteration over Array is supported\n    assert elements == [1, 2, 3]\n\ndef test_array_float_begin_end(create_array):\n    arr = create_array(float, 1.0, 2.0, 3.0)\n    elements = [x for x in arr]  # Assuming direct iteration over Array is supported\n    assert elements == [pytest.approx(1.0), pytest.approx(2.0), pytest.approx(3.0)]\n"
  },
  {
    "path": "tests/test_juce_core/test_Base64.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_to_base64():\n    a = juce.Base64.toBase64(b'\\xe6\\x1dy\\x98\\x8cM\\xd0\\xa9\\x12@\\xedwri\\x0c^')\n    assert a == \"5h15mIxN0KkSQO13cmkMXg==\"\n\n    b = juce.Base64.toBase64(\"The quick brown fox jumps over the lazy dog\")\n    assert b == \"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==\"\n\n#==================================================================================================\n\ndef test_convert_to_base64():\n    mos = juce.MemoryOutputStream()\n    juce.Base64.convertToBase64(mos, b\"The quick brown fox jumps over the lazy dog\")\n    assert mos.toString() == \"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==\"\n\n#==================================================================================================\n\ndef test_convert_from_base64():\n    mos = juce.MemoryOutputStream()\n    juce.Base64.convertFromBase64(mos, \"5h15mIxN0KkSQO13cmkMXg==\")\n    assert mos.getMemoryBlock().getData() == b'\\xe6\\x1dy\\x98\\x8cM\\xd0\\xa9\\x12@\\xedwri\\x0c^'\n"
  },
  {
    "path": "tests/test_juce_core/test_BigInteger.py",
    "content": "from ctypes import c_uint32\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef get_big_random(r: juce.Random) -> juce.BigInteger:\n    b = juce.BigInteger()\n\n    while (b < 2):\n        r.fillBitsRandomly(b, 0, r.nextInt (150) + 1)\n\n    return b\n\n#==================================================================================================\n\ndef test_construct_default():\n    big_int = juce.BigInteger()\n    assert big_int.isZero()\n\n#==================================================================================================\n\ndef test_construct_with_uint32():\n    big_int = juce.BigInteger(1234)\n    assert big_int.toInteger() == 1234\n\n#==================================================================================================\n\ndef test_construct_with_int32():\n    big_int = juce.BigInteger(-1234)\n    assert big_int.toInteger() == -1234\n    assert big_int.isNegative()\n\n#==================================================================================================\n\ndef test_construct_with_int64():\n    big_int = juce.BigInteger(1234567890123)\n    assert big_int.toInt64() == 1234567890123\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original = juce.BigInteger(12345)\n    copy = juce.BigInteger(original)\n    assert copy.toInteger() == 12345\n\n#==================================================================================================\n\ndef test_move_constructor():\n    original = juce.BigInteger(12345)\n    moved = juce.BigInteger(original)\n    assert moved.toInteger() == 12345\n\n#==================================================================================================\n\ndef test_assignment_operator():\n    original = juce.BigInteger(12345)\n    assigned = juce.BigInteger()\n    assigned = original\n    assert assigned.toInteger() == 12345\n\n#==================================================================================================\n\ndef test_swap_with():\n    a = juce.BigInteger(1234)\n    b = juce.BigInteger(5678)\n    a.swapWith(b)\n    assert a.toInteger() == 5678\n    assert b.toInteger() == 1234\n\n#==================================================================================================\n\ndef test_is_zero():\n    big_int = juce.BigInteger()\n    assert big_int.isZero()\n\n#==================================================================================================\n\ndef test_is_one():\n    big_int = juce.BigInteger(1)\n    assert big_int.isOne()\n\n#==================================================================================================\n\ndef test_to_integer():\n    big_int = juce.BigInteger(1234)\n    assert big_int.toInteger() == 1234\n\n#==================================================================================================\n\ndef test_to_int64():\n    big_int = juce.BigInteger(1234567890123)\n    assert big_int.toInt64() == 1234567890123\n\n#==================================================================================================\n\ndef test_clear():\n    big_int = juce.BigInteger(1234)\n    big_int.clear()\n    assert big_int.isZero()\n\n#==================================================================================================\n\ndef test_clear_bit():\n    big_int = juce.BigInteger(3)  # binary 11\n    big_int.clearBit(0)\n    assert big_int.toInteger() == 2  # binary 10\n\n#==================================================================================================\n\ndef test_set_bit():\n    big_int = juce.BigInteger()\n    big_int.setBit(1)\n    assert big_int.toInteger() == 2\n\n#==================================================================================================\n\ndef test_set_bit_value():\n    big_int = juce.BigInteger()\n    big_int.setBit(1, True)\n    assert big_int.toInteger() == 2\n    big_int.setBit(1, False)\n    assert big_int.isZero()\n\n#==================================================================================================\n\ndef test_set_range():\n    big_int = juce.BigInteger()\n    big_int.setRange(0, 4, True)  # 1111 in binary\n    assert big_int.toInteger() == 15\n\n#==================================================================================================\n\ndef test_insert_bit():\n    big_int = juce.BigInteger(2)  # binary 10\n    big_int.insertBit(1, True)    # should result in binary 110\n    assert big_int.toInteger() == 6\n\n#==================================================================================================\n\ndef test_get_bit_range():\n    big_int = juce.BigInteger(15)  # binary 1111\n    sub_int = big_int.getBitRange(1, 2)  # should get binary 11\n    assert sub_int.toInteger() == 3\n\n#==================================================================================================\n\ndef test_get_bit_range_as_int():\n    big_int = juce.BigInteger(15)  # 1111 in binary\n    result = big_int.getBitRangeAsInt(0, 4)\n    assert result == 15\n\n#==================================================================================================\n\ndef test_set_bit_range_as_int():\n    big_int = juce.BigInteger()\n    big_int.setBitRangeAsInt(0, 4, 15)  # 1111 in binary\n    assert big_int.toInteger() == 15\n\n#==================================================================================================\n\ndef test_shift_bits():\n    big_int = juce.BigInteger(1)  # binary 1\n    big_int.shiftBits(2, 0)       # should result in binary 100\n    assert big_int.toInteger() == 4\n\n#==================================================================================================\n\ndef test_count_number_of_set_bits():\n    big_int = juce.BigInteger(15)  # 1111 in binary\n    assert big_int.countNumberOfSetBits() == 4\n\n#==================================================================================================\n\ndef test_find_next_set_bit():\n    big_int = juce.BigInteger(10)  # binary 1010\n    assert big_int.findNextSetBit(0) == 1\n\n#==================================================================================================\n\ndef test_find_next_clear_bit():\n    big_int = juce.BigInteger(9)  # binary 1001\n    assert big_int.findNextClearBit(0) == 1\n\n#==================================================================================================\n\ndef test_get_highest_bit():\n    big_int = juce.BigInteger(8)  # binary 1000\n    assert big_int.getHighestBit() == 3\n\n#==================================================================================================\n\ndef test_is_negative():\n    big_int = juce.BigInteger(-1)\n    assert big_int.isNegative()\n\n#==================================================================================================\n\ndef test_set_negative():\n    big_int = juce.BigInteger(1)\n    big_int.setNegative(True)\n    assert big_int.isNegative()\n\n#==================================================================================================\n\ndef test_negate():\n    big_int = juce.BigInteger(1)\n    big_int.negate()\n    assert big_int.isNegative()\n    big_int.negate()\n    assert not big_int.isNegative()\n\n#==================================================================================================\n\ndef test_addition():\n    a = juce.BigInteger(1)\n    b = juce.BigInteger(2)\n    a += b\n    assert a.toInteger() == 3\n\n#==================================================================================================\n\ndef test_subtraction():\n    a = juce.BigInteger(3)\n    b = juce.BigInteger(2)\n    a -= b\n    assert a.toInteger() == 1\n\n#==================================================================================================\n\ndef test_multiplication():\n    a = juce.BigInteger(3)\n    b = juce.BigInteger(2)\n    a *= b\n    assert a.toInteger() == 6\n\n#==================================================================================================\n\ndef test_division():\n    a = juce.BigInteger(6)\n    b = juce.BigInteger(2)\n    a /= b\n    assert a.toInteger() == 3\n\n#==================================================================================================\n\ndef test_modulus():\n    a = juce.BigInteger(7)\n    b = juce.BigInteger(3)\n    a %= b\n    assert a.toInteger() == 1\n\n#==================================================================================================\n\ndef test_bitwise_and():\n    a = juce.BigInteger(6)  # binary 110\n    b = juce.BigInteger(3)  # binary 011\n    a &= b\n    assert a.toInteger() == 2  # binary 010\n\n#==================================================================================================\n\ndef test_bitwise_or():\n    a = juce.BigInteger(6)  # binary 110\n    b = juce.BigInteger(3)  # binary 011\n    a |= b\n    assert a.toInteger() == 7  # binary 111\n\n#==================================================================================================\n\ndef test_bitwise_xor():\n    a = juce.BigInteger(6)  # binary 110\n    b = juce.BigInteger(3)  # binary 011\n    a ^= b\n    assert a.toInteger() == 5  # binary 101\n\n#==================================================================================================\n\ndef test_left_shift():\n    a = juce.BigInteger(1)\n    a <<= 2\n    assert a.toInteger() == 4\n\n#==================================================================================================\n\ndef test_right_shift():\n    a = juce.BigInteger(4)\n    a >>= 2\n    assert a.toInteger() == 1\n\n#==================================================================================================\n\ndef test_equality():\n    a = juce.BigInteger(123)\n    b = juce.BigInteger(123)\n    assert a == b\n\n#==================================================================================================\n\ndef test_inequality():\n    a = juce.BigInteger(123)\n    b = juce.BigInteger(456)\n    assert a != b\n\n#==================================================================================================\n\ndef test_less_than():\n    a = juce.BigInteger(123)\n    b = juce.BigInteger(456)\n    assert a < b\n\n#==================================================================================================\n\ndef test_less_than_or_equal():\n    a = juce.BigInteger(123)\n    b = juce.BigInteger(123)\n    assert a <= b\n\n#==================================================================================================\n\ndef test_greater_than():\n    a = juce.BigInteger(456)\n    b = juce.BigInteger(123)\n    assert a > b\n\n#==================================================================================================\n\ndef test_greater_than_or_equal():\n    a = juce.BigInteger(456)\n    b = juce.BigInteger(456)\n    assert a >= b\n\n#==================================================================================================\n\ndef test_compare():\n    a = juce.BigInteger(123)\n    b = juce.BigInteger(456)\n    assert a.compare(b) < 0\n    assert b.compare(a) > 0\n\n#==================================================================================================\n\ndef test_compare_absolute():\n    a = juce.BigInteger(-123)\n    b = juce.BigInteger(123)\n    assert a.compareAbsolute(b) == 0\n\n#==================================================================================================\n\ndef test_divide_by():\n    divisor = juce.BigInteger(3)\n    remainder = juce.BigInteger()\n    a = juce.BigInteger(10)\n    a.divideBy(divisor, remainder)\n    assert a.toInteger() == 3\n    assert remainder.toInteger() == 1\n\n#==================================================================================================\n\ndef test_find_greatest_common_divisor():\n    a = juce.BigInteger(54)\n    b = juce.BigInteger(24)\n    assert a.findGreatestCommonDivisor(b).toInteger() == 6\n\n#==================================================================================================\n\ndef test_exponent_modulo():\n    a = juce.BigInteger(2)\n    exponent = juce.BigInteger(3)\n    modulus = juce.BigInteger(5)\n    a.exponentModulo(exponent, modulus)\n    assert a.toInteger() == 3\n\n#==================================================================================================\n\ndef test_inverse_modulo():\n    a = juce.BigInteger(3)\n    modulus = juce.BigInteger(11)\n    a.inverseModulo(modulus)\n    assert a.toInteger() == 4\n\n#==================================================================================================\n\ndef test_montgomery_multiplication():\n    a = juce.BigInteger(10001)\n    other = juce.BigInteger(3)\n    modulus = juce.BigInteger(5)\n    modulusp = juce.BigInteger(2)\n\n    a.montgomeryMultiplication(other, modulus, modulusp, 1)\n\n    result = juce.BigInteger()\n    result.parseString('3a94', 16)\n    assert a == result\n\n#==================================================================================================\n\ndef test_extended_euclidean():\n    a = juce.BigInteger(240)\n    b = juce.BigInteger(46)\n\n    xOut = juce.BigInteger()\n    yOut = juce.BigInteger()\n    gcd = juce.BigInteger(a)\n\n    gcd.extendedEuclidean(a, b, xOut, yOut)\n\n    assert gcd == juce.BigInteger(2)\n\n#==================================================================================================\n\ndef test_comparisons():\n    r = juce.Random.getSystemRandom()\n\n    assert juce.BigInteger().isZero()\n    assert juce.BigInteger(1).isOne()\n\n    for _ in range(1000, 0, -1):\n        b1 = juce.BigInteger(get_big_random(r))\n        b2 = juce.BigInteger(get_big_random(r))\n\n        b3: juce.BigInteger = b1 + b2\n        assert b3 > b1 and b3 > b2\n        assert b3 - b1 == b2\n        assert b3 - b2 == b1\n\n        b4: juce.BigInteger = b1 * b2\n        assert b4 > b1 and b4 > b2\n        assert b4 / b1 == b2\n        assert b4 / b2 == b1\n        assert ((b4 << 1) >> 1) == b4\n        assert ((b4 << 10) >> 10) == b4\n        assert ((b4 << 100) >> 100) == b4\n\n        b5 = juce.BigInteger()\n        b5.loadFromMemoryBlock(b3.toMemoryBlock())\n        assert b3 == b5\n\n#==================================================================================================\n\ndef test_bit_setting():\n    r = juce.Random.getSystemRandom()\n\n    test = bytearray(2048)\n\n    for _ in range(1000, 0, -1):\n        offset = r.nextInt (200) + 10\n        num = r.nextInt (32) + 1\n        value = r.nextInt()\n\n        if num < 32:\n            value &= ((1 << num) - 1)\n\n        value = c_uint32(value)\n\n        old1 = juce.readLittleEndianBitsInBuffer (test, offset - 6, 6)\n        old2 = juce.readLittleEndianBitsInBuffer (test, offset + num, 6)\n        juce.writeLittleEndianBitsInBuffer (test, offset, num, value.value)\n        result = juce.readLittleEndianBitsInBuffer (test, offset, num)\n\n        assert c_uint32(result).value == value.value\n        assert old1 == juce.readLittleEndianBitsInBuffer (test, offset - 6, 6)\n        assert old2 == juce.readLittleEndianBitsInBuffer (test, offset + num, 6)\n"
  },
  {
    "path": "tests/test_juce_core/test_ByteOrder.py",
    "content": "\nimport sys\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_swap_python_integer():\n    a = 1337\n    assert a != juce.ByteOrder.swap(a)\n    assert a == juce.ByteOrder.swap(juce.ByteOrder.swap(a))\n\n#==================================================================================================\n\ndef test_little_endian_short_python_integer():\n    assert juce.ByteOrder.littleEndianShort(b'\\x01\\x00') == 1\n    assert juce.ByteOrder.littleEndianShort(b'\\xff\\x00') == 255\n\n#==================================================================================================\n\ndef test_little_endian_int_python_integer():\n    assert juce.ByteOrder.littleEndianInt(b'\\x01\\x00\\x00\\00') == 1\n    assert juce.ByteOrder.littleEndianInt(b'\\xff\\x00\\x00\\00') == 255\n\n#==================================================================================================\n\ndef test_little_endian_int64_python_integer():\n    assert juce.ByteOrder.littleEndianInt64(b'\\x01\\x00\\x00\\00\\x00\\x00\\x00\\x00') == 1\n    assert juce.ByteOrder.littleEndianInt64(b'\\xff\\x00\\x00\\00\\x00\\x00\\x00\\x00') == 255\n\n#==================================================================================================\n\ndef test_big_endian_short_python_integer():\n    assert juce.ByteOrder.bigEndianShort(b'\\x00\\01') == 1\n    assert juce.ByteOrder.bigEndianShort(b'\\x00\\xff') == 255\n\n#==================================================================================================\n\ndef test_big_endian_int_python_integer():\n    assert juce.ByteOrder.bigEndianInt(b'\\x00\\x00\\x00\\01') == 1\n    assert juce.ByteOrder.bigEndianInt(b'\\x00\\x00\\x00\\xff') == 255\n\n#==================================================================================================\n\ndef test_big_endian_int64_python_integer():\n    assert juce.ByteOrder.bigEndianInt64(b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\01') == 1\n    assert juce.ByteOrder.bigEndianInt64(b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff') == 255\n\n#==================================================================================================\n\ndef test_make_int():\n    assert juce.ByteOrder.makeInt(1, 0) == 1\n    assert juce.ByteOrder.makeInt(255, 0) == 255\n    assert juce.ByteOrder.makeInt(0, 1) == 256\n    assert juce.ByteOrder.makeInt(255, 1) == 511\n    assert juce.ByteOrder.makeInt(1, 0, 0, 0) == 1\n    assert juce.ByteOrder.makeInt(255, 0, 0, 0) == 255\n    assert juce.ByteOrder.makeInt(0, 0, 0, 1) == 16777216\n    assert juce.ByteOrder.makeInt(255, 0, 0, 1) == 16777471\n    assert juce.ByteOrder.makeInt(1, 0, 0, 0, 0, 0, 0, 0) == 1\n    assert juce.ByteOrder.makeInt(255, 0, 0, 0, 0, 0, 0, 0) == 255\n    assert juce.ByteOrder.makeInt(0, 0, 0, 0, 0, 0, 0, 1) == 72057594037927936\n    assert juce.ByteOrder.makeInt(255, 0, 0, 0, 0, 0, 0, 1) == 72057594037928191\n\n#==================================================================================================\n\ndef test_is_big_endian():\n    is_big_endian = sys.byteorder == \"big\"\n    assert is_big_endian == juce.ByteOrder.isBigEndian()\n"
  },
  {
    "path": "tests/test_juce_core/test_Cast.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor():\n    pass\n"
  },
  {
    "path": "tests/test_juce_core/test_CriticalSection.py",
    "content": "import threading\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor():\n    c = juce.CriticalSection()\n    assert c.tryEnter()\n\n#==================================================================================================\n\ndef test_double_entering():\n    c = juce.CriticalSection()\n    assert c.tryEnter()\n    assert c.tryEnter()\n\n#==================================================================================================\n\ndef test_manual_enter_exit():\n    c = juce.CriticalSection()\n    c.enter()\n    assert c.tryEnter()\n    c.exit()\n\n#==================================================================================================\n\ndef test_scoped_enter_exit():\n    c = juce.CriticalSection()\n    data = 1\n\n    def thread_callback():\n        nonlocal data\n        c.enter()\n        data = 2\n        c.exit()\n\n    t = threading.Thread(target=thread_callback)\n    t.start()\n\n    with juce.CriticalSection.ScopedLockType(c):\n        data = 3\n\n    t.join()\n\n    assert data == 2 or data == 3\n"
  },
  {
    "path": "tests/test_juce_core/test_File.py",
    "content": "import os\nimport sys\nimport pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\nthis_file = os.path.abspath(__file__)\nthis_folder = os.path.dirname(this_file)\n\nnonexisting_file = \"C:\\\\path\\\\to\\\\some\\\\file.txt\" if sys.platform == \"win32\" else \"/path/to/some/file.txt\"\nnonexisting_folder = os.path.dirname(nonexisting_file)\n\n#==================================================================================================\n\ndef test_constructor():\n    a = juce.File(this_file)\n    assert a.getFullPathName() == this_file\n    assert a.getFileName() == os.path.split(this_file)[1]\n\n#==================================================================================================\n\ndef test_construct_empty():\n    file = juce.File()\n    assert not file.exists()\n\n#==================================================================================================\n\ndef test_construct_with_path():\n    file = juce.File(nonexisting_file)\n    assert file.getFullPathName() == nonexisting_file\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original_file = juce.File(\"/original/file.txt\")\n    copied_file = juce.File(original_file)\n    assert copied_file.getFullPathName() == original_file.getFullPathName()\n\n#==================================================================================================\n\ndef test_exists():\n    existing_file = juce.File(this_file)\n    non_existing_file = juce.File(nonexisting_file)\n\n    assert existing_file.exists()\n    assert not non_existing_file.exists()\n\n#==================================================================================================\n\ndef test_exists_as_file():\n    existing_file = juce.File(this_file)\n    existing_folder = juce.File(this_folder)\n    non_existing_file = juce.File(nonexisting_file)\n    assert existing_file.existsAsFile()\n    assert not existing_folder.existsAsFile()\n    assert not non_existing_file.existsAsFile()\n\n#==================================================================================================\n\ndef test_is_directory():\n    directory = juce.File(this_folder)\n    nonexisting = juce.File(nonexisting_folder)\n    file = juce.File(this_file)\n\n    assert directory.isDirectory()\n    assert not nonexisting.isDirectory()\n    assert not file.isDirectory()\n\n#==================================================================================================\n\ndef test_is_root():\n    root_directory = juce.File(\"C:\") if sys.platform == \"win32\" else juce.File(\"/\")\n    non_root_directory = juce.File(\"C:\\\\path\\\\to\\\\directory\") if sys.platform == \"win32\" else juce.File(\"/path/to/directory\")\n\n    assert root_directory.isRoot()\n    assert not non_root_directory.isRoot()\n\n#==================================================================================================\n\ndef test_get_size():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert file.getSize() == 886\n\n#==================================================================================================\n\ndef test_description_of_size_in_bytes():\n    size_description = juce.File.descriptionOfSizeInBytes(1024)\n    assert isinstance(size_description, str)\n\n#==================================================================================================\n\ndef test_get_full_path_name():\n    file = juce.File(this_file)\n    assert file.getFullPathName() == this_file\n\n#==================================================================================================\n\ndef test_get_file_name():\n    file_path = os.path.join(this_folder, \"test_file.txt\")\n    file_obj = juce.File(file_path)\n    assert file_obj.getFileName() == \"test_file.txt\"\n\n#==================================================================================================\n\ndef test_get_relative_path_from():\n    base_directory = juce.File(this_folder)\n    file_path = os.path.join(this_folder, \"test_file.txt\")\n    file_obj = juce.File(file_path)\n    relative_path = file_obj.getRelativePathFrom(base_directory)\n    assert relative_path == \"test_file.txt\"\n\n#==================================================================================================\n\ndef test_get_file_extension():\n    file_path = os.path.join(this_folder, \"test_file.txt\")\n    file_obj = juce.File(file_path)\n    assert file_obj.getFileExtension() == \".txt\"\n\n#==================================================================================================\n\ndef test_has_file_extension():\n    file = juce.File(os.path.join(this_folder, \"test_file.txt\"))\n    assert file.hasFileExtension(\".txt\")\n\n#==================================================================================================\n\ndef test_with_file_extension():\n    file = juce.File(os.path.join(this_folder, \"test_file.txt\"))\n    new_file = file.withFileExtension(\".xml\")\n    assert new_file.getFileName() == \"test_file.xml\"\n\n#==================================================================================================\n\ndef test_get_file_name_without_extension():\n    file = juce.File(os.path.join(this_folder, \"test_file.txt\"))\n    assert file.getFileNameWithoutExtension() == \"test_file\"\n\n#==================================================================================================\n\ndef test_hash_code():\n    file_instance = juce.File()\n    assert isinstance(file_instance.hashCode(), int)\n\n#==================================================================================================\n\ndef test_hash_code_64():\n    file_instance = juce.File()\n    assert isinstance(file_instance.hashCode64(), int)\n\n#==================================================================================================\n\ndef test_get_child_file():\n    file_instance = juce.File(this_folder)\n    child_file = file_instance.getChildFile(\"child_file.txt\")\n    assert isinstance(child_file, juce.File)\n\n#==================================================================================================\n\ndef test_get_sibling_file():\n    file1 = juce.File(this_folder).getChildFile(\"file1\")\n    sibling_file = file1.getSiblingFile(\"sibling.txt\")\n    assert sibling_file.getFileName() == \"sibling.txt\"\n    assert sibling_file.getParentDirectory().getFileName() == juce.File(this_folder).getFileName()\n\n#==================================================================================================\n\ndef test_get_parent_directory():\n    file1 = juce.File(this_folder).getChildFile(\"file1\")\n    parent_dir = file1.getParentDirectory()\n    assert parent_dir.getFileName() == juce.File(this_folder).getFileName()\n\n#==================================================================================================\n\ndef test_is_a_child_of():\n    file1 = juce.File(this_folder).getChildFile(\"file1\")\n    parent_dir = juce.File(this_folder)\n    assert file1.isAChildOf(parent_dir)\n\n#==================================================================================================\n\ndef test_get_nonexistent_child_file():\n    file1 = juce.File(this_folder).getChildFile(\"data\")\n    nonexistent_file = file1.getNonexistentChildFile(\"prefix\", \".suffix\")\n    assert \"prefix\" in nonexistent_file.getFileName()\n    assert \".suffix\" in nonexistent_file.getFileExtension()\n\n#==================================================================================================\n\ndef test_get_nonexistent_sibling():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    sibling = file.getNonexistentSibling()\n    assert sibling.exists() is False\n\n#==================================================================================================\n\ndef test_operators():\n    file1 = juce.File(this_folder).getChildFile(\"file1.txt\")\n    file2 = juce.File(this_folder).getChildFile(\"file2.txt\")\n    assert file1 == file1\n    assert file1 != file2\n    assert file1 < file2\n    assert file2 > file1\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"Needs to be rewritten to be usable\")\ndef test_set_execute_permission():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert file.setExecutePermission(True) is False\n\n#==================================================================================================\n\ndef test_is_hidden():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert file.isHidden() is False\n\n#==================================================================================================\n\ndef test_get_file_identifier():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    identifier = file.getFileIdentifier()\n    assert isinstance(identifier, int)\n\n#==================================================================================================\n\ndef test_get_last_access_time():\n    file_instance = juce.File(get_runtime_data_file(\"test_get_last_access_time.txt\"))\n    file_instance.replaceWithText(\"abc\")\n    assert isinstance(file_instance.getLastAccessTime(), juce.Time)\n    assert file_instance.getLastAccessTime() <= juce.Time.getCurrentTime()\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_get_creation_time():\n    file_instance = juce.File(get_runtime_data_file(\"test_get_creation_time.txt\"))\n    file_instance.replaceWithText(\"abc\")\n    assert isinstance(file_instance.getCreationTime(), juce.Time)\n    assert file_instance.getCreationTime() <= juce.Time.getCurrentTime()\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_get_last_modification_time():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    modification_time = file_instance.getLastModificationTime()\n    assert isinstance(modification_time, juce.Time)\n    assert modification_time <= juce.Time.getCurrentTime()\n\n#==================================================================================================\n\ndef test_set_last_modification_time():\n    file_instance = juce.File(get_runtime_data_file(\"test_set_last_modification_time.txt\"))\n    file_instance.replaceWithText(\"abc\")\n    result = file_instance.setLastModificationTime(juce.Time())\n    # assert result == True\n    # assert file_instance.getLastModificationTime() == juce.Time()\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_get_special_location():\n    special_location = juce.File.getSpecialLocation(juce.File.SpecialLocationType.userHomeDirectory)\n    assert special_location.exists()\n\n#==================================================================================================\n\ndef test_create_temp_file():\n    temp_file = juce.File.createTempFile(\"test\")\n    assert temp_file.getFileName().endswith(\".test\")\n\n#==================================================================================================\n\ndef test_get_current_working_directory():\n    current_directory = juce.File.getCurrentWorkingDirectory()\n    assert current_directory.exists()\n    assert current_directory == juce.File(os.path.abspath(os.getcwd()))\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This will fail other tests\")\ndef test_set_as_current_working_directory():\n    temp_directory = juce.File.createTempFile(\"temp_directory\")\n    assert temp_directory.setAsCurrentWorkingDirectory()\n    assert juce.File.getCurrentWorkingDirectory() == temp_directory\n\n#==================================================================================================\n\ndef test_get_separator_char():\n    separator_char = juce.File.getSeparatorChar()\n    assert isinstance(separator_char, int)\n    assert separator_char == (92 if sys.platform == \"win32\" else 47)\n\n#==================================================================================================\n\ndef test_has_write_access():\n    file_instance = juce.File(get_runtime_data_file(\"test_has_write_access.txt\"))\n    assert file_instance.hasWriteAccess() == True\n\n#==================================================================================================\n\ndef test_has_read_access():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert file_instance.hasReadAccess() == True\n\n#==================================================================================================\n\ndef test_set_read_only():\n    file_instance = juce.File(get_runtime_data_file(\"test_set_read_only.txt\"))\n    file_instance.replaceWithText(\"abc\")\n    assert file_instance.setReadOnly(True) == True\n    # assert not file_instance.hasReadAccess()\n    assert file_instance.setReadOnly(False) == True\n    assert file_instance.hasReadAccess()\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_is_absolute_path():\n    assert juce.File.isAbsolutePath(\"C:\\\\absolute\\\\path\" if sys.platform == \"win32\" else \"/absolute/path\")\n    assert not juce.File.isAbsolutePath(\"relative/path\" if sys.platform == \"win32\" else \"absolute/path\")\n    assert not juce.File.isAbsolutePath(\"relative\\\\path\" if sys.platform == \"win32\" else \"absolute\\\\path\")\n\n#==================================================================================================\n\ndef test_get_version():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert isinstance(file_instance.getVersion(), str)\n\n#==================================================================================================\n\ndef test_create():\n    file_instance = juce.File(get_runtime_data_file(\"test_create.txt\"))\n    result = file_instance.create()\n    assert result.wasOk()\n    assert file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_create_directory():\n    file_instance = juce.File(get_runtime_data_file(\"test_create_directory\"))\n    result = file_instance.createDirectory()\n    assert result.wasOk()\n    assert file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_delete_file():\n    file_instance = juce.File(get_runtime_data_file(\"test_delete_file.txt\"))\n    assert file_instance.create().wasOk()\n    assert file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_delete_recursively():\n    folder_instance = juce.File(get_runtime_data_file(\"test_delete_recursively\"))\n    folder_instance.createDirectory()\n\n    child_instance = folder_instance.getChildFile(\"test_delete_recursively_file.txt\")\n    child_instance.create()\n\n    result = folder_instance.deleteRecursively()\n    assert result == True\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This will fail other tests\")\ndef test_move_to_trash():\n    file_instance = juce.File(get_runtime_data_file(\"test_move_to_trash.txt\"))\n    file_instance.create()\n    assert isinstance(file_instance.moveToTrash(), bool)\n\n#==================================================================================================\n\ndef test_move_file_to():\n    folder1 = juce.File(get_runtime_data_file(\"test_move_file_to_1\"))\n    folder1.createDirectory()\n\n    folder2 = juce.File(get_runtime_data_file(\"test_move_file_to_2\"))\n    folder2.createDirectory()\n\n    child_instance = folder1.getChildFile(\"test_move_file_to.txt\")\n    child_instance.create()\n    assert child_instance.moveFileTo(folder2)\n    assert child_instance.getParentDirectory() == folder1\n    assert not child_instance.existsAsFile()\n    assert not folder2.getChildFile(\"test_move_file_to.txt\").existsAsFile()\n\n    folder1.deleteRecursively()\n    folder2.deleteRecursively()\n\n#==================================================================================================\n\ndef test_copy_file_to():\n    folder1 = juce.File(get_runtime_data_file(\"test_copy_file_to_1\"))\n    folder1.createDirectory()\n\n    folder2 = juce.File(get_runtime_data_file(\"test_copy_file_to_2\"))\n    folder2.createDirectory()\n\n    child_instance = folder1.getChildFile(\"test_copy_file_to.txt\")\n    child_instance.create()\n    assert child_instance.copyFileTo(folder2.getChildFile(\"test_copy_file_to.txt\"))\n    assert child_instance.getParentDirectory() == folder1\n    assert child_instance.existsAsFile()\n    assert folder2.getChildFile(\"test_copy_file_to.txt\").existsAsFile()\n\n    folder1.deleteRecursively()\n    folder2.deleteRecursively()\n\n#==================================================================================================\n\ndef test_replace_file_in():\n    child_instance1 = juce.File(get_runtime_data_file(\"test_replace_file_in_1.txt\"))\n    child_instance1.replaceWithText(\"abc\")\n\n    child_instance2 = juce.File(get_runtime_data_file(\"test_replace_file_in_2.txt\"))\n    child_instance2.replaceWithText(\"123\")\n\n    assert child_instance1.replaceFileIn(child_instance2)\n    assert child_instance2.existsAsFile()\n    assert child_instance2.loadFileAsString() == \"abc\"\n\n    child_instance1.deleteFile()\n    child_instance2.deleteFile()\n\n#==================================================================================================\n\ndef test_copy_directory_to():\n    folder1 = juce.File(get_runtime_data_file(\"test_copy_directory_to_1\"))\n    folder1.createDirectory()\n\n    folder2 = juce.File(get_runtime_data_file(\"test_copy_directory_to_2\"))\n\n    child_instance = folder1.getChildFile(\"test_copy_directory_to.txt\")\n    child_instance.create()\n\n    assert folder1.copyDirectoryTo(folder2)\n    assert folder2.isDirectory()\n    assert folder2.getChildFile(\"test_copy_directory_to.txt\").existsAsFile()\n\n    folder1.deleteRecursively()\n    folder2.deleteRecursively()\n\n#==================================================================================================\n\ndef test_get_number_of_child_files():\n    file_instance = juce.File(this_folder)\n    num_files = file_instance.getNumberOfChildFiles(int(juce.File.findFiles))\n    num_folders = file_instance.getNumberOfChildFiles(int(juce.File.findDirectories))\n    num_file_and_folders = file_instance.getNumberOfChildFiles(int(juce.File.findFilesAndDirectories))\n    assert num_files > 0\n    assert num_folders > 0\n    assert num_file_and_folders == (num_files + num_folders)\n\n#==================================================================================================\n\ndef test_contains_subdirectories():\n    file_instance = juce.File(this_folder)\n    assert file_instance.containsSubDirectories()\n\n#==================================================================================================\n\ndef test_read_lines():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    lines = juce.StringArray()\n    file_instance.readLines(lines)\n    assert lines[0] == \"-----BEGIN RSA PRIVATE KEY-----\"\n\n#==================================================================================================\n\ndef test_append_data():\n    file_instance = juce.File(get_runtime_data_file(\"test_append_data.txt\"))\n\n    assert file_instance.appendData(b\"data\\xff\")\n    mb = juce.MemoryBlock()\n    assert file_instance.loadFileAsData(mb) and mb == juce.MemoryBlock(b\"data\\xff\")\n\n    assert file_instance.appendData(b\"data\\xff\")\n    mb = juce.MemoryBlock()\n    assert file_instance.loadFileAsData(mb) and mb == juce.MemoryBlock(b\"data\\xffdata\\xff\")\n\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_replace_with_data():\n    file_instance = juce.File(get_runtime_data_file(\"test_replace_with_data.txt\"))\n\n    assert file_instance.replaceWithData(b\"data\\xff\")\n    mb = juce.MemoryBlock()\n    assert file_instance.loadFileAsData(mb) and mb == juce.MemoryBlock(b\"data\\xff\")\n\n    assert file_instance.replaceWithData(b\"1234\\xff\")\n    mb = juce.MemoryBlock()\n    assert file_instance.loadFileAsData(mb) and mb == juce.MemoryBlock(b\"1234\\xff\")\n\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_append_text():\n    file_instance = juce.File(get_runtime_data_file(\"test_append_text.txt\"))\n\n    assert file_instance.appendText(\"data\")\n    assert file_instance.loadFileAsString() == \"data\"\n    assert file_instance.appendText(\"data\")\n    assert file_instance.loadFileAsString() == \"datadata\"\n\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_replace_with_text():\n    file_instance = juce.File(get_runtime_data_file(\"test_replace_with_text.txt\"))\n\n    assert file_instance.replaceWithText(\"data\")\n    assert file_instance.loadFileAsString() == \"data\"\n    assert file_instance.replaceWithText(\"1234\")\n    assert file_instance.loadFileAsString() == \"1234\"\n\n    file_instance.deleteFile()\n\n#==================================================================================================\n\ndef test_has_identical_content_to():\n    file1 = juce.File(get_runtime_data_file(\"test_has_identical_content_to_1.txt\"))\n    assert file1.replaceWithText(\"data\")\n    file2 = juce.File(get_runtime_data_file(\"test_has_identical_content_to_2.txt\"))\n    assert file2.replaceWithText(\"data\")\n    file3 = juce.File(get_runtime_data_file(\"test_has_identical_content_to_3.txt\"))\n    assert file3.replaceWithText(\"1234567890\")\n    file4 = juce.File(get_runtime_data_file(\"test_has_identical_content_to_4.txt\"))\n    assert file4.create().wasOk()\n\n    assert file1.hasIdenticalContentTo(file1)\n    assert file1.hasIdenticalContentTo(file2)\n    assert not file1.hasIdenticalContentTo(file3)\n    assert not file1.hasIdenticalContentTo(file4)\n    assert file4.hasIdenticalContentTo(file4)\n    assert not file4.hasIdenticalContentTo(file1)\n\n    file1.deleteFile()\n    file2.deleteFile()\n    file3.deleteFile()\n    file4.deleteFile()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This will likely fail as it is a dangerous operation, investigate\")\ndef test_create_file_without_checking_path():\n    file = juce.File.createFileWithoutCheckingPath(\"/valid/path\")\n    assert file.exists()\n\n#==================================================================================================\n\ndef test_create_legal_file_name():\n    illegal_file_name = \"file?name*with/illegal:characters\"\n    legal_file_name = juce.File.createLegalFileName(illegal_file_name)\n    assert \"/\" not in legal_file_name and \"?\" not in legal_file_name\n\n#==================================================================================================\n\ndef test_create_legal_path_name():\n    illegal_path_name = \"/path/wi*th/illegal:characters\"\n    legal_path_name = juce.File.createLegalPathName(illegal_path_name)\n    assert \":\" not in legal_path_name and \"*\" not in legal_path_name\n\n#==================================================================================================\n\ndef test_create_input_stream():\n    file_obj = juce.File(this_file)\n    input_stream = file_obj.createInputStream()\n    assert input_stream is not None\n\n#==================================================================================================\n\ndef test_create_output_stream():\n    file_obj = juce.File(get_runtime_data_file(\"test_create_output_stream.txt\"))\n    output_stream = file_obj.createOutputStream(0x8000)\n    assert output_stream is not None\n    del output_stream\n\n#==================================================================================================\n\ndef test_load_file_as_data():\n    file_obj = juce.File(this_file)\n    memory_block = juce.MemoryBlock()\n    assert file_obj.loadFileAsData(memory_block)\n    assert memory_block.getSize() > 0\n\n#==================================================================================================\n\ndef test_load_file_as_string():\n    file_obj = juce.File(nonexisting_file)\n    file_content = file_obj.loadFileAsString()\n    assert isinstance(file_content, str)\n    assert len(file_content) == 0\n\n    file_obj = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    file_content = file_obj.loadFileAsString()\n    assert isinstance(file_content, str)\n    assert len(file_content) > 0\n\n#==================================================================================================\n\ndef test_find_child_files():\n    file_instance = juce.File(this_folder).getChildFile(\"data\")\n    child_files = file_instance.findChildFiles(int(juce.File.findFiles), True)\n    assert isinstance(child_files, juce.Array[juce.File])\n    assert child_files.size() > 0\n    for child_file in child_files:\n        assert isinstance(child_file, juce.File)\n\n#==================================================================================================\n\ndef test_find_child_files_reference():\n    file_instance = juce.File(this_folder).getChildFile(\"data\")\n    child_files = juce.Array[juce.File]()\n    assert file_instance.findChildFiles(child_files, int(juce.File.findFiles), True)\n    assert child_files.size() > 0\n    for child_file in child_files:\n        assert isinstance(child_file, juce.File)\n\n#==================================================================================================\n\ndef test_create_symbolic_link():\n    link_obj = get_runtime_data_file(\"test_create_symbolic_link.txt\")\n    target_obj = juce.File(this_file)\n    assert target_obj.createSymbolicLink(link_obj, True)\n    assert link_obj.exists()\n    link_obj.deleteFile()\n\n#==================================================================================================\n\ndef test_is_symbolic_link():\n    link_obj = get_runtime_data_file(\"test_is_symbolic_link.txt\")\n    target_obj = juce.File(this_file)\n    target_obj.createSymbolicLink(link_obj, True)\n    assert link_obj.isSymbolicLink()\n    link_obj.deleteFile()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform == \"win32\", reason=\"Fails on windows for whatever reason\")\ndef test_get_linked_target():\n    link_obj = get_runtime_data_file(\"test_get_linked_target.txt\")\n    target_obj = juce.File(this_file)\n    assert target_obj.createSymbolicLink(link_obj, True)\n    assert link_obj.getLinkedTarget() == target_obj\n    link_obj.deleteFile()\n\n#==================================================================================================\n\ndef test_get_bytes_free_on_volume():\n    file1 = juce.File.getSpecialLocation(juce.File.SpecialLocationType.userDocumentsDirectory)\n    bytes_free = file1.getBytesFreeOnVolume()\n    assert bytes_free >= 0\n\n#==================================================================================================\n\ndef test_get_volume_total_size():\n    file1 = juce.File.getSpecialLocation(juce.File.SpecialLocationType.userDocumentsDirectory)\n    total_size = file1.getVolumeTotalSize()\n    assert total_size >= 0\n\n#==================================================================================================\n\ndef test_get_volume_label():\n    file_instance = juce.File(this_file)\n    assert isinstance(file_instance.getVolumeLabel(), str)\n\n#==================================================================================================\n\ndef test_get_volume_serial_number():\n    file_instance = juce.File(this_file)\n    assert isinstance(file_instance.getVolumeSerialNumber(), int)\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is hardly testable as it is now\")\ndef test_reveal_to_user():\n    file = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    file.revealToUser()\n\n#==================================================================================================\n\ndef test_get_separator_string():\n    separator = juce.File.getSeparatorString()\n    assert isinstance(separator, str)\n\n#==================================================================================================\n\ndef test_are_file_names_case_sensitive():\n    case_sensitive = juce.File.areFileNamesCaseSensitive()\n    assert isinstance(case_sensitive, bool)\n\n#==================================================================================================\n\ndef test_add_trailing_separator():\n    path = \"/path/to/directory\"\n    path_with_separator = juce.File.addTrailingSeparator(path)\n    assert path_with_separator.endswith(juce.File.getSeparatorString())\n\n#==================================================================================================\n\ndef test_get_native_linked_target():\n    file = juce.File(\"/path/to/somefile.txt\")\n    linked_target = file.getNativeLinkedTarget()\n    assert isinstance(linked_target, str)\n\n#==================================================================================================\n\ndef test_find_file_system_roots():\n    roots = juce.Array[juce.File]()\n    juce.File.findFileSystemRoots(roots)\n    assert len(roots) > 0\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is hardly testable as it is now\")\ndef test_is_on_cdrom_drive():\n    file1 = juce.File(\"D:/path/to/file1\")\n    assert not file1.isOnCDRomDrive()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is hardly testable as it is now\")\ndef test_is_on_hard_disk():\n    file1 = juce.File(\"C:/path/to/file1\")\n    assert not file1.isOnHardDisk()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is hardly testable as it is now\")\ndef test_is_on_removable_drive():\n    file1 = juce.File(\"E:/path/to/file1\")\n    assert not file1.isOnRemovableDrive()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is hardly testable as it is now\")\ndef test_start_as_process():\n    file1 = juce.File(\"path/to/executable.exe\")\n    assert file1.startAsProcess()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"win32\", reason=\"Platform-specific test\")\ndef test_create_shortcut():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    file_shortcut = get_runtime_data_file(\"test_create_shortcut.lnk\")\n    assert file_instance.createShortcut(\"description\", file_shortcut) == True\n    file_shortcut.deleteFile()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"win32\", reason=\"Platform-specific test\")\ndef test_is_shortcut():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert not file_instance.isShortcut()\n    file_shortcut = get_runtime_data_file(\"test_is_shortcut.lnk\")\n    assert file_instance.createShortcut(\"description\", file_shortcut) == True\n    assert file_shortcut.isShortcut()\n    file_shortcut.deleteFile()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Platform-specific test\")\ndef test_is_bundle():\n    file_obj = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert not file_obj.isBundle()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"Plainly annoying when running locally\")\ndef test_add_to_dock():\n    file_obj = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    file_obj.addToDock()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Platform-specific test\")\ndef test_get_mac_os_type():\n    file_instance = juce.File(this_folder).getChildFile(\"data\").getChildFile(\"somefile.txt\")\n    assert isinstance(file_instance.getMacOSType(), int)\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Platform-specific test\")\ndef test_get_container_for_security_application_group_identifier():\n    app_group = \"com.example.app\"\n    container = juce.File.getContainerForSecurityApplicationGroupIdentifier(app_group)\n    assert isinstance(container, juce.File)\n"
  },
  {
    "path": "tests/test_juce_core/test_FileFilter.py",
    "content": "import os\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\nthis_file = os.path.abspath(__file__)\nthis_folder = os.path.dirname(this_file)\n\n#==================================================================================================\n\nclass CustomFileFilter(juce.FileFilter):\n    def isFileSuitable(self, file):\n        return False\n\n    def isDirectorySuitable(self, file):\n        return True\n\ndef test_custom_file_filter():\n    w = CustomFileFilter(\"all folders\")\n\n    assert w.getDescription() == \"all folders\"\n    assert not w.isFileSuitable(juce.File(this_folder).getChildFile(\"test.wav\"))\n    assert not w.isFileSuitable(juce.File(this_folder).getChildFile(\"test.mp3\"))\n    assert w.isDirectorySuitable(juce.File(this_folder).getChildFile(\"pass\"))\n    assert w.isDirectorySuitable(juce.File(this_folder).getChildFile(\"also_pass\"))\n\n#==================================================================================================\n\ndef test_wildcard_file_filter_files():\n    w = juce.WildcardFileFilter(\"*.wav;*.aiff\", \"\", \"audio files\")\n\n    assert w.getDescription() == \"audio files (*.wav;*.aiff)\"\n    assert w.isFileSuitable(juce.File(this_folder).getChildFile(\"test.wav\"))\n    assert not w.isFileSuitable(juce.File(this_folder).getChildFile(\"test.mp3\"))\n\n#==================================================================================================\n\ndef test_wildcard_file_filter_folders():\n    w = juce.WildcardFileFilter(\"*\", \"pass\", \"all files\")\n\n    assert w.getDescription() == \"all files (*)\"\n    assert w.isDirectorySuitable(juce.File(this_folder).getChildFile(\"pass\"))\n    assert not w.isDirectorySuitable(juce.File(this_folder).getChildFile(\"not_pass\"))\n"
  },
  {
    "path": "tests/test_juce_core/test_FileInputStream.py",
    "content": "import os\nimport pytest\n\nimport popsicle as juce\n\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\ndata_folder = this_file.getSiblingFile(\"data\")\n\n#==================================================================================================\n\ndef test_file_input_stream_nonexisting():\n    a = juce.FileInputStream(data_folder.getChildFile(\"nonexisting.txt\"))\n    assert not a.openedOk()\n    assert a.failedToOpen()\n    assert a.getFile() == data_folder.getChildFile(\"nonexisting.txt\")\n    assert a.getStatus().failed()\n\n#==================================================================================================\n\ndef test_file_input_stream():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    assert a.openedOk()\n    assert not a.failedToOpen()\n    assert a.getFile() == data_folder.getChildFile(\"somefile.txt\")\n    assert a.getStatus().wasOk()\n\n#==================================================================================================\n\ndef test_file_input_stream_read():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    assert a.getNumBytesRemaining() > 0\n    assert a.getTotalLength() == a.getNumBytesRemaining()\n    assert a.getPosition() == 0\n\n    x = bytearray(31)\n    assert a.read(x) == 31\n    assert x.decode(\"UTF8\") == \"-----BEGIN RSA PRIVATE KEY-----\"\n    assert a.getTotalLength() > a.getNumBytesRemaining()\n    assert a.getPosition() == 31\n\n    next_byte = a.readByte()\n    assert next_byte == \"\\n\" or next_byte == \"\\r\"\n\n#==================================================================================================\n\ndef test_file_input_stream_read_ints():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n\n    assert a.readBool() != False\n    assert a.readByte() == '-'\n    assert a.readShort() == 11565\n    assert a.readShortBigEndian() == 11586\n    assert a.readInt() == 1313425221\n    assert a.readIntBigEndian() == 542266177\n    assert a.readInt64() == 4995689725513846816\n    assert a.readInt64BigEndian() == 2327029881779334445\n    # assert a.readCompressedInt() == 1\n    assert a.readFloat() == pytest.approx(839842.8125)\n    assert a.readFloatBigEndian() == pytest.approx(800132.0625)\n    assert a.readDouble() == pytest.approx(1.4120143627839163e+84)\n    assert a.readDoubleBigEndian() == pytest.approx(3.889046183921725e+16)\n    a.readNextLine()\n    assert a.readNextLine() == 'NiwIXNWyi6EJ260r0legE/V/dFQC4kWwzC1VPHsrjbulfr2n+Ez7MrfZwlTwPb0B'\n\n#==================================================================================================\n\ndef test_file_input_stream_string():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    result = a.readString()\n\n    with open(a.getFile().getFullPathName(), \"r\") as f:\n        assert f.read() == result\n\n#==================================================================================================\n\ndef test_file_input_stream_read_entire_as_string():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    result = a.readEntireStreamAsString()\n\n    with open(a.getFile().getFullPathName(), \"r\") as f:\n        assert f.read() == result\n\n#==================================================================================================\n\ndef test_file_input_stream_read_into_memory_block():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    mb = juce.MemoryBlock()\n\n    a.readIntoMemoryBlock(mb)\n\n    with open(a.getFile().getFullPathName(), \"r\") as f:\n        assert f.read() == mb.toString()\n"
  },
  {
    "path": "tests/test_juce_core/test_FileOutputStream.py",
    "content": "import os\nimport textwrap\nimport pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\ndata_folder = this_file.getSiblingFile(\"data\")\n\n#==================================================================================================\n\ndef test_file_output_stream_write_from_input_all():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    assert a.openedOk()\n\n    b = juce.FileOutputStream(get_runtime_data_file(\"test_file_output_stream_write_from_input_all.txt\"))\n    assert b.openedOk()\n\n    assert b.writeFromInputStream(a, -1) == 886\n    b.flush()\n\n    with open(a.getFile().getFullPathName(), \"r\") as f1, open(b.getFile().getFullPathName(), \"r\") as f2:\n        assert f1.read() == f2.read()\n\n#==================================================================================================\n\ndef test_file_output_stream_write_from_input_some():\n    a = juce.FileInputStream(data_folder.getChildFile(\"somefile.txt\"))\n    assert a.openedOk()\n\n    b = juce.FileOutputStream(get_runtime_data_file(\"test_file_input_stream_nonexisting.txt\"))\n    assert b.openedOk()\n\n    assert b.writeFromInputStream(a, 100) == 100\n    b.flush()\n\n    with open(a.getFile().getFullPathName(), \"r\") as f1, open(b.getFile().getFullPathName(), \"r\") as f2:\n        assert f1.read(100) == f2.read()\n\n#==================================================================================================\n\ndef test_file_output_stream_write():\n    b = juce.FileOutputStream(get_runtime_data_file(\"test_file_output_stream_write.txt\"))\n    assert b.writeBool(True)\n    assert b.writeByte('-')\n    assert b.writeShort(11565)\n    assert b.writeShortBigEndian(11586)\n    assert b.writeInt(1313425221)\n    assert b.writeIntBigEndian(542266177)\n    assert b.writeInt64(4995689725513846816)\n    assert b.writeInt64BigEndian(2327029881779334445)\n    assert b.writeCompressedInt(117)\n    assert b.writeFloat(839842.8125)\n    assert b.writeFloatBigEndian(800132.0625)\n    assert b.writeDouble(1.4120143627839163e+84)\n    assert b.writeDoubleBigEndian(3.889046183921725e+16)\n    assert b.writeString(textwrap.dedent(\"\"\"\n        first line\n        NiwIXNWyi6EJ260r0legE/V/dFQC4kWwzC1VPHsrjbulfr2n+Ez7MrfZwlTwPb0B\n        last line\"\"\"))\n    b.flush()\n\n    a = juce.FileInputStream(get_runtime_data_file(\"test_file_output_stream_write.txt\"))\n    assert a.readBool() != False\n    assert a.readByte() == '-'\n    assert a.readShort() == 11565\n    assert a.readShortBigEndian() == 11586\n    assert a.readInt() == 1313425221\n    assert a.readIntBigEndian() == 542266177\n    assert a.readInt64() == 4995689725513846816\n    assert a.readInt64BigEndian() == 2327029881779334445\n    assert a.readCompressedInt() == 117\n    assert a.readFloat() == pytest.approx(839842.8125)\n    assert a.readFloatBigEndian() == pytest.approx(800132.0625)\n    assert a.readDouble() == pytest.approx(1.4120143627839163e+84)\n    assert a.readDoubleBigEndian() == pytest.approx(3.889046183921725e+16)\n    a.readNextLine()\n    a.readNextLine()\n    assert a.readNextLine() == 'NiwIXNWyi6EJ260r0legE/V/dFQC4kWwzC1VPHsrjbulfr2n+Ez7MrfZwlTwPb0B'\n"
  },
  {
    "path": "tests/test_juce_core/test_Identifier.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_empty_constructor():\n    a = juce.Identifier()\n    assert a.isNull()\n    assert not a.isValid()\n\n    b = juce.Identifier()\n    assert a == b\n\n    c = juce.Identifier(\"123\")\n    assert a != c\n    assert b != c\n    assert c != a\n    assert c != b\n\n#==================================================================================================\n\ndef test_constructor_python_str():\n    a = juce.Identifier(\"abc\")\n    assert not a.isNull()\n    assert a.isValid()\n\n    b = juce.Identifier(\"abc\")\n    assert a == b\n\n#==================================================================================================\n\ndef test_constructor_copy():\n    a = juce.Identifier(\"abc\")\n    b = juce.Identifier(a)\n    assert a.isNull() == b.isNull()\n    assert a.isValid() == b.isValid()\n    assert a.toString() == b.toString()\n\n#==================================================================================================\n\ndef test_constructor_juce_String():\n    a = juce.Identifier(\"abc\")\n    assert not a.isNull()\n    assert a.isValid()\n\n    b = juce.Identifier(\"abc\")\n    assert a == b\n\n#==================================================================================================\n\ndef test_comparisons():\n    a = juce.Identifier(\"abc\")\n    b = juce.Identifier(\"abc\")\n    c = juce.Identifier(\"abcd\")\n    assert a == b\n    assert a <= b\n    assert a >= b\n    assert not (a < b)\n    assert not (a > b)\n\n    assert a != c\n    assert a <= c\n    assert not (a >= c)\n    assert a < c\n    assert not (a > c)\n\n#==================================================================================================\n\ndef test_to_string():\n    a = juce.Identifier(\"abc\")\n    b = juce.Identifier(\"abc\")\n    assert a.toString() == b.toString()\n\n    c = juce.Identifier(\"123\")\n    assert a.toString() != c.toString()\n\n#==================================================================================================\n\ndef test_is_valid_identifier():\n    assert not juce.Identifier.isValidIdentifier(\"\")\n    assert not juce.Identifier.isValidIdentifier(\" \")\n    assert juce.Identifier.isValidIdentifier(\"abcf123\")\n"
  },
  {
    "path": "tests/test_juce_core/test_InputStream.py",
    "content": "import pytest\nimport struct\nimport math\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomFullInputStream(juce.InputStream):\n    data: bytes = bytes()\n    offset: int = 0\n\n    def __init__(self, data):\n        juce.InputStream.__init__(self)\n        self.data = data\n        self.offset = 0\n\n    def getTotalLength(self):\n        return len(self.data)\n\n    def isExhausted(self):\n        return self.offset >= len(self.data)\n\n    def read(self, destBuffer):\n        maxSize = min(len(destBuffer), len(self.data) - self.offset)\n        if maxSize > 0:\n            destBuffer[:] = self.data[self.offset:self.offset+maxSize]\n            self.offset += maxSize\n        return maxSize\n\n    def readByte(self):\n        value = self.data[self.offset]\n        self.offset += 1\n        return chr(value)\n\n    def readShort(self):\n        value = struct.unpack(\"<h\", self.data[self.offset:self.offset + 2])\n        self.offset += 2\n        return value[0]\n\n    def readShortBigEndian(self):\n        value = struct.unpack(\">h\", self.data[self.offset:self.offset + 2])\n        self.offset += 2\n        return value[0]\n\n    def readInt(self):\n        value = struct.unpack(\"<i\", self.data[self.offset:self.offset + 4])\n        self.offset += 4\n        return value[0]\n\n    def readIntBigEndian(self):\n        value = struct.unpack(\">i\", self.data[self.offset:self.offset + 4])\n        self.offset += 4\n        return value[0]\n\n    def readInt64(self):\n        value = struct.unpack(\"<q\", self.data[self.offset:self.offset + 8])\n        self.offset += 8\n        return value[0]\n\n    def readInt64BigEndian(self):\n        value = struct.unpack(\">q\", self.data[self.offset:self.offset + 8])\n        self.offset += 8\n        return value[0]\n\n    def readFloat(self):\n        value = struct.unpack(\"<f\", self.data[self.offset:self.offset + 4])\n        self.offset += 4\n        return value[0]\n\n    def readFloatBigEndian(self):\n        value = struct.unpack(\">f\", self.data[self.offset:self.offset + 4])\n        self.offset += 4\n        return value[0]\n\n    def readDouble(self):\n        value = struct.unpack(\"<d\", self.data[self.offset:self.offset + 8])\n        self.offset += 8\n        return value[0]\n\n    def readDoubleBigEndian(self):\n        value = struct.unpack(\">d\", self.data[self.offset:self.offset + 8])\n        self.offset += 8\n        return value[0]\n\n    def readCompressedInt(self):\n        sizeByte = ord(self.readByte())\n        if sizeByte == 0:\n            return 0\n\n        numBytes = sizeByte & 0x7f\n        if numBytes > 4:\n            return 0 # trying to read corrupt data\n\n        b = bytearray(numBytes)\n        if self.read(b) != numBytes:\n            return 0\n\n        while len(b) < 4:\n            b.append(0)\n\n        num = juce.ByteOrder.littleEndianInt(b)\n        return -num if (sizeByte >> 7) else num\n\n    def readNextLine(self):\n        data = bytearray()\n\n        while self.offset < len(self.data):\n            value = self.data[self.offset]\n            self.offset += 1\n            data.append(value)\n\n            value_bytes = value.to_bytes(length=1, byteorder=\"little\")\n            if value_bytes == b\"\\n\" or value_bytes == b\"\\0\":\n                data = data[:-1]\n                break\n\n        return data.decode(\"utf-8\")\n\n    def readString(self):\n        data = bytearray()\n\n        while self.offset < len(self.data):\n            value = self.data[self.offset]\n            self.offset += 1\n            data.append(value)\n\n            value_bytes = value.to_bytes(length=1, byteorder=\"little\")\n            if value_bytes == b\"\\0\":\n                data = data[:-1]\n                break\n\n        return data.decode(\"utf-8\")\n\n    def readEntireStreamAsString(self):\n        if not self.data or self.isExhausted():\n            return \"\"\n\n        return self.data[self.offset:].decode(\"utf-8\")\n\n    def readIntoMemoryBlock(self, destBlock, maxNumBytesToRead):\n        if maxNumBytesToRead >= 0:\n            maxSize = min(maxNumBytesToRead, len(self.data) - self.offset)\n        else:\n            maxSize = len(self.data) - self.offset\n\n        if maxSize > 0:\n            destBlock.append(self.data[self.offset:maxSize])\n            self.offset += maxSize\n\n        return maxSize\n\n    def getPosition(self):\n        return self.offset\n\n    def setPosition(self, newPosition):\n        self.offset = newPosition\n\n    def skipNextBytes (self, newPosition):\n        self.offset += newPosition\n\n#==================================================================================================\n\nclass CustomMinimalInputStream(juce.InputStream):\n    data: bytes = bytes()\n    offset: int = 0\n\n    def __init__(self, data):\n        juce.InputStream.__init__(self)\n        self.data = data\n        self.offset = 0\n\n    def getTotalLength(self):\n        return len(self.data)\n\n    def isExhausted(self):\n        return self.offset >= len(self.data)\n\n    def read(self, destBuffer):\n        maxSize = min(len(destBuffer), len(self.data) - self.offset)\n        if maxSize > 0:\n            destBuffer[:] = self.data[self.offset:self.offset+maxSize]\n            self.offset += maxSize\n        return maxSize\n\n    def getPosition(self):\n        return self.offset\n\n    def setPosition(self, newPosition):\n        self.offset = newPosition\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_input_stream(input_stream):\n    i = input_stream(b\"custom string\")\n    assert i.getTotalLength() == 13\n    assert i.getPosition() == 0\n    assert i.isExhausted() == False\n\n    i.skipNextBytes(i.getTotalLength())\n    assert i.getPosition() == i.getTotalLength()\n    assert i.isExhausted() == True\n\n    i.setPosition(0)\n    assert i.getPosition() == 0\n    assert i.isExhausted() == False\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_entire_stream_as_string(input_stream):\n    i = input_stream(b\"custom string\")\n\n    text = i.readEntireStreamAsString()\n    assert text == \"custom string\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_string(input_stream):\n    i = input_stream(b\"custom\\0string\\0\")\n\n    text = i.readString()\n    assert text == \"custom\"\n\n    text = i.readString()\n    assert text == \"string\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_new_line(input_stream):\n    i = input_stream(b\"custom\\nstring\\n\")\n\n    text = i.readNextLine()\n    assert text == \"custom\"\n\n    text = i.readNextLine()\n    assert text == \"string\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_into_memory_block(input_stream):\n    i = input_stream(b\"the\\ncustom\\nstring\\nline\")\n\n    mb = juce.MemoryBlock()\n    i.setPosition(0)\n    readBytes = i.readIntoMemoryBlock(mb, -1)\n    assert readBytes == len(i.data)\n    assert mb.toString() == \"the\\ncustom\\nstring\\nline\"\n\n    mb = juce.MemoryBlock()\n    i.setPosition(0)\n    readBytes = i.readIntoMemoryBlock(mb, 0)\n    assert readBytes == 0\n    assert mb.toString() == \"\"\n\n    mb = juce.MemoryBlock()\n    i.setPosition(0)\n    readBytes = i.readIntoMemoryBlock(mb, 3)\n    assert readBytes == 3\n    assert mb.toString() == \"the\"\n\n    mb = juce.MemoryBlock()\n    i.setPosition(0)\n    readBytes = i.readIntoMemoryBlock(mb, 100)\n    assert readBytes == len(i.data)\n    assert mb.toString() == \"the\\ncustom\\nstring\\nline\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_byte(input_stream):\n    i = input_stream(b\"a\")\n    b = i.readByte()\n    assert b == \"a\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_short(input_stream):\n    i = input_stream(b\"\\xff\\x7f\")\n    b = i.readShort()\n    assert b == 32767\n\n    i = input_stream(b\"\\x7f\\xff\")\n    b = i.readShortBigEndian()\n    assert b == 32767\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_int(input_stream):\n    i = input_stream(b\"\\xff\\xff\\xff\\x7f\")\n    b = i.readInt()\n    assert b == 2147483647\n\n    i = input_stream(b\"\\x7f\\xff\\xff\\xff\")\n    b = i.readIntBigEndian()\n    assert b == 2147483647\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_int64(input_stream):\n    i = input_stream(b\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x7f\")\n    b = i.readInt64()\n    assert b == 9223372036854775807\n\n    i = input_stream(b\"\\x7f\\xff\\xff\\xff\\xff\\xff\\xff\\xff\")\n    b = i.readInt64BigEndian()\n    assert b == 9223372036854775807\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_float(input_stream):\n    i = input_stream(struct.pack('<f', math.pi))\n    b = i.readFloat()\n    assert b == pytest.approx(math.pi)\n\n    i = input_stream(struct.pack('>f', math.pi))\n    b = i.readFloatBigEndian()\n    assert b == pytest.approx(math.pi)\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"input_stream\", [CustomFullInputStream, CustomMinimalInputStream])\ndef test_read_double(input_stream):\n    i = input_stream(struct.pack('<d', math.pi))\n    b = i.readDouble()\n    assert b == pytest.approx(math.pi)\n\n    i = input_stream(struct.pack('>d', math.pi))\n    b = i.readDoubleBigEndian()\n    assert b == pytest.approx(math.pi)\n"
  },
  {
    "path": "tests/test_juce_core/test_Ints.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_ints_constructor_positive():\n    a = juce.int8(1)\n    assert a.get() == 1\n\n    a = juce.int16(1)\n    assert a.get() == 1\n\n    a = juce.int32(1)\n    assert a.get() == 1\n\n    a = juce.int64(1)\n    assert a.get() == 1\n\n#==================================================================================================\n\ndef test_ints_constructor_negative():\n    a = juce.int8(-1)\n    assert a.get() == -1\n\n    a = juce.int16(-1)\n    assert a.get() == -1\n\n    a = juce.int32(-1)\n    assert a.get() == -1\n\n    a = juce.int64(-1)\n    assert a.get() == -1\n\n#==================================================================================================\n\ndef test_ints_constructor_out_of_range():\n    with pytest.raises(TypeError):\n        a = juce.int8(1_024)\n\n    with pytest.raises(TypeError):\n        a = juce.int16(65_537)\n\n    with pytest.raises(TypeError):\n        a = juce.int32(2_147_483_648)\n\n    with pytest.raises(TypeError):\n        a = juce.int64(9_223_372_036_854_775_808)\n\n#==================================================================================================\n\ndef test_uints_constructor_positive():\n    a = juce.uint8(1)\n    assert a.get() == 1\n\n    a = juce.uint16(1)\n    assert a.get() == 1\n\n    a = juce.uint32(1)\n    assert a.get() == 1\n\n    a = juce.uint64(1)\n    assert a.get() == 1\n\n#==================================================================================================\n\ndef test_uints_constructor_negative():\n    with pytest.raises(TypeError):\n        a = juce.uint8(-1)\n\n    with pytest.raises(TypeError):\n        a = juce.uint16(-1)\n\n    with pytest.raises(TypeError):\n        a = juce.uint32(-1)\n\n    with pytest.raises(TypeError):\n        a = juce.uint64(-1)\n\n#==================================================================================================\n\ndef test_uints_constructor_out_of_range():\n    with pytest.raises(TypeError):\n        a = juce.uint8(1_024)\n\n    with pytest.raises(TypeError):\n        a = juce.uint16(65_537)\n\n    with pytest.raises(TypeError):\n        a = juce.uint32(4_294_967_296)\n\n    with pytest.raises(TypeError):\n        a = juce.uint64(18_446_744_073_709_551_616)\n"
  },
  {
    "path": "tests/test_juce_core/test_JSON.py",
    "content": "import pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_parse_with_valid_json_returns_correct_result():\n    text = '{\"key\": \"value\"}'\n    expected = {\"key\": \"value\"}\n    result = juce.JSON.parse(text)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_parse_with_invalid_json_returns_empty_var():\n    text = '{\"key\": \"value\"'\n    result = juce.JSON.parse(text)\n    assert not result\n\n#==================================================================================================\n\ndef test_parse_with_file_returns_correct_result():\n    file_path = get_runtime_data_file(\"valid_json_file.json\")\n    file_path.replaceWithText('{\"key\": \"value\"}')\n    file = juce.File(file_path)\n    expected = {\"key\": \"value\"}\n    result = juce.JSON.parse(file)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_parse_with_stream_returns_correct_result():\n    stream = juce.MemoryInputStream(b'{\"key\": \"value\"}', True)\n    expected = {\"key\": \"value\"}\n    result = juce.JSON.parse(stream)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_to_string_with_default_options():\n    obj_to_format = {\"key\": \"value\"}\n    expected = '{\"key\": \"value\"}'\n    result = juce.JSON.toString(obj_to_format, allOnOneLine=True)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_format_options():\n    format_options = juce.JSON.FormatOptions().withSpacing(juce.JSON.Spacing.none)\n    assert format_options.getSpacing() == juce.JSON.Spacing.none\n\n    format_options = juce.JSON.FormatOptions().withIndentLevel(10)\n    assert format_options.getIndentLevel() == 10\n\n    format_options = juce.JSON.FormatOptions().withMaxDecimalPlaces(4)\n    assert format_options.getMaxDecimalPlaces() == 4\n\n#==================================================================================================\n\ndef test_to_string_with_format_options_no_spacing():\n    obj_to_format = {\"key1\": \"value\", \"key2\": 1, \"key3\": 2}\n    format_options = juce.JSON.FormatOptions().withSpacing(juce.JSON.Spacing.none)\n    expected = '{\"key1\":\"value\",\"key2\":1,\"key3\":2}'\n    result = juce.JSON.toString(obj_to_format, format_options)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_to_string_with_format_options_single_line():\n    obj_to_format = {\"key1\": \"value\", \"key2\": 1, \"key3\": 2}\n    format_options = juce.JSON.FormatOptions().withSpacing(juce.JSON.Spacing.singleLine)\n    expected = '{\"key1\": \"value\", \"key2\": 1, \"key3\": 2}'\n    result = juce.JSON.toString(obj_to_format, format_options)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_to_string_with_format_options_multi_line():\n    obj_to_format = {\"key1\": \"value\", \"key2\": 1, \"key3\": 2, \"obj\": { \"obj1\": 1, \"obj2\": [1, 2, 3, 4] }}\n    format_options = juce.JSON.FormatOptions().withSpacing(juce.JSON.Spacing.multiLine).withIndentLevel(2)\n    expected = \"\"\" {\n    \"key1\": \"value\",\n    \"key2\": 1,\n    \"key3\": 2,\n    \"obj\": {\n      \"obj1\": 1,\n      \"obj2\": [\n        1,\n        2,\n        3,\n        4\n      ]\n    }\n  }\"\"\"\n    result = juce.JSON.toString(obj_to_format, format_options)\n    assert result.replace(\"\\r\", \"\").strip() == expected.replace(\"\\r\", \"\").strip()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"Bug in JUCE\")\ndef test_to_string_with_format_options_max_decimal_places():\n    obj_to_format = {\"key\": 0.123456789}\n    format_options = juce.JSON.FormatOptions().withMaxDecimalPlaces(2)\n    expected = '{\"key\": 0.12}'\n    result = juce.JSON.toString(obj_to_format, format_options)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_write_to_stream():\n    stream = juce.MemoryOutputStream()\n    expected = {\"key\": \"value\"}\n    juce.JSON.writeToStream(stream, expected, allOnOneLine=True)\n    assert stream.toString() == '{\"key\": \"value\"}'\n\n#==================================================================================================\n\ndef test_from_string_with_valid_json():\n    json_string = '{\"key\": \"value\"}'\n    expected = {\"key\": \"value\"}\n    result = juce.JSON.fromString(json_string)\n    assert result == expected\n\n#==================================================================================================\n\ndef test_escape_string_escapes_special_characters():\n    original_string = '\"Hello, \\nWorld!\"'\n    expected = '\\\\\"Hello, \\\\nWorld!\\\\\"'\n    result = juce.JSON.escapeString(original_string)\n    assert result == expected\n\n#==================================================================================================\n\n\"\"\"\ndef test_parse_quoted_string_with_valid_input():\n    text = '\"Hello, World!\"'\n    expected = \"Hello, World!\"\n    char_pointer = text\n    result_var = None\n    result = juce.JSON.parseQuotedString(char_pointer, result_var)\n    assert result.wasOk() and result_var == expected\n\"\"\"\n"
  },
  {
    "path": "tests/test_juce_core/test_MemoryBlock.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_construct_empty():\n    memory_block = juce.MemoryBlock()\n    assert memory_block.getSize() == 0\n    assert memory_block.isEmpty()\n\n#==================================================================================================\n\ndef test_construct_size():\n    memory_block = juce.MemoryBlock(10)\n    assert memory_block.getSize() == 10\n    assert not memory_block.isEmpty()\n\n#==================================================================================================\n\ndef test_construct_size_value():\n    memory_block = juce.MemoryBlock(5, True)\n    assert memory_block.getSize() == 5\n    assert not memory_block.isEmpty()\n    assert all(value == 0 for value in memory_block.getData())\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original = juce.MemoryBlock(8, True)\n    copied = juce.MemoryBlock(original)\n    assert copied.getSize() == original.getSize()\n    assert copied.getData() == original.getData()\n\n#==================================================================================================\n\ndef test_construct_from_buffer():\n    data = bytes([1, 2, 3, 4, 5])\n    memory_block = juce.MemoryBlock(data)\n    assert memory_block.getSize() == len(data)\n    assert memory_block.getData() == data\n\n#==================================================================================================\n\ndef test_equality():\n    memory_block1 = juce.MemoryBlock([1, 2, 3])\n    memory_block2 = juce.MemoryBlock([1, 2, 3])\n    memory_block3 = juce.MemoryBlock([3, 2, 1])\n\n    assert memory_block1 == memory_block2\n    assert memory_block1 != memory_block3\n\n#==================================================================================================\n\ndef test_matches():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    assert memory_block.matches(bytes([1, 2, 3, 4, 5]))\n\n#==================================================================================================\n\ndef test_getitem():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    assert memory_block[2] == '\\x03'\n\n#==================================================================================================\n\ndef test_setitem():\n    memory_block = juce.MemoryBlock(['\\x00', '\\x01', '\\x02', '\\x03', '\\x04'])\n    memory_block[1] = '\\xff'\n    assert memory_block[1] == '\\xff'\n\n    memory_block[2] = 2\n    assert memory_block[2] == '\\x02'\n\n#==================================================================================================\n\ndef test_get_data():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    data = memory_block.getData()\n    assert isinstance(data, memoryview)\n    assert bytes(data) == bytes([1, 2, 3, 4, 5])\n\n#==================================================================================================\n\ndef test_is_empty():\n    empty_memory_block = juce.MemoryBlock()\n    non_empty_memory_block = juce.MemoryBlock([1, 2, 3])\n\n    assert empty_memory_block.isEmpty()\n    assert not non_empty_memory_block.isEmpty()\n\n#==================================================================================================\n\ndef test_set_size():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n\n    memory_block.setSize(3)\n    assert memory_block.getSize() == 3\n    assert not memory_block.isEmpty()\n\n    memory_block.setSize(0)\n    assert memory_block.getSize() == 0\n    assert memory_block.isEmpty()\n\n    memory_block.setSize(10)\n    assert memory_block.getSize() == 10\n    #assert all(value == 0 for value in memory_block.getData())\n\n#==================================================================================================\n\ndef test_ensure_size():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    memory_block.ensureSize(8)\n    assert memory_block.getSize() == 8\n\n#==================================================================================================\n\ndef test_reset():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    memory_block.reset()\n    assert memory_block.getSize() == 0\n    assert memory_block.isEmpty()\n\n#==================================================================================================\n\ndef test_fill_with():\n    memory_block = juce.MemoryBlock(5)\n    memory_block.fillWith(42)\n    assert all(value == 42 for value in memory_block.getData())\n\n#==================================================================================================\n\ndef test_append():\n    memory_block1 = juce.MemoryBlock([1, 2, 3])\n    memory_block1.append(bytes(b'\\x04\\x05\\x06'))\n    assert memory_block1.getSize() == 6\n    assert memory_block1.getData() == bytes([1, 2, 3, 4, 5, 6])\n\n#==================================================================================================\n\ndef test_replace_all():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    replacement = bytes(b'\\x07\\x08\\x09')\n    memory_block.replaceAll(replacement)\n    assert memory_block.getSize() == len(replacement)\n    assert memory_block.getData() == replacement\n\n#==================================================================================================\n\ndef test_insert():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    data_to_insert = bytes([9, 8, 7])\n    insert_position = 2\n    memory_block.insert(data_to_insert, insert_position)\n    assert memory_block.getSize() == 8\n    assert memory_block.getData() == bytes([1, 2, 9, 8, 7, 3, 4, 5])\n\n#==================================================================================================\n\ndef test_remove_section():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n\n    memory_block.removeSection(1, 3)\n    assert memory_block.getSize() == 2\n    assert memory_block.getData() == bytes([1, 5])\n\n    memory_block.removeSection(10, 2)\n    assert memory_block.getSize() == 10\n    assert memory_block.getData()[0] == 1\n    assert memory_block.getData()[1] == 5\n\n#==================================================================================================\n\ndef test_copy_from():\n    destination = juce.MemoryBlock(5, True)\n\n    destination.copyFrom(bytes([1, 2, 3]), 1)\n    assert destination.getSize() == 5\n    assert destination.getData() == bytes([0, 1, 2, 3, 0])\n\n#==================================================================================================\n\ndef test_copy_to():\n    source = juce.MemoryBlock(bytes([1, 2, 3, 4, 5]))\n    destination = bytearray(3)\n\n    source.copyTo(destination, 1)\n    assert len(destination) == 3\n    assert destination == bytes([2, 3, 4])\n\n#==================================================================================================\n\ndef test_swap_with():\n    memory_block1 = juce.MemoryBlock([1, 2, 3])\n    memory_block2 = juce.MemoryBlock([4, 5, 6])\n    memory_block1.swapWith(memory_block2)\n    assert memory_block1.getData() == bytes([4, 5, 6])\n    assert memory_block2.getData() == bytes([1, 2, 3])\n\n#==================================================================================================\n\ndef test_to_string():\n    memory_block = juce.MemoryBlock([65, 66, 67])  # ASCII values for 'A', 'B', 'C'\n    assert memory_block.toString() == \"ABC\"\n\n#==================================================================================================\n\ndef test_load_from_hex_string():\n    hex_string = \"48656C6C6F20576F726C64\"  # Hex representation of \"Hello World\"\n    memory_block = juce.MemoryBlock()\n    memory_block.loadFromHexString(hex_string)\n    assert memory_block.getData() == b\"Hello World\"\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This produces wrong results, JUCE bug ?\")\ndef test_set_bit_range():\n    memory_block = juce.MemoryBlock(4, initialiseToZero=True)\n    assert memory_block.getData() == bytes(b'\\x00\\x00\\x00\\x00')\n\n    memory_block.setBitRange(0, 2, 1)\n    assert bytes(memory_block.getData()) == bytes(b'\\x01\\x01\\x00\\x00')\n\n#==================================================================================================\n\ndef test_get_bit_range():\n    memory_block = juce.MemoryBlock([0b10101010, 0b01010101])\n    result = memory_block.getBitRange(1, 6)\n    assert result == 0b010101  # Decimal equivalent of the selected bits\n\n#==================================================================================================\n\ndef test_to_base64_encoding():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    base64_encoded = memory_block.toBase64Encoding()\n    assert base64_encoded == '5.AHv.DT.' # This should have been 'AQIDBAU='\n\n#==================================================================================================\n\ndef test_from_base64_encoding():\n    base64_encoded = '5.AHv.DT.' # This should have been 'AQIDBAU='\n    memory_block = juce.MemoryBlock()\n    memory_block.fromBase64Encoding(base64_encoded)\n    assert memory_block.getData() == bytes([1, 2, 3, 4, 5])\n\n#==================================================================================================\n\ndef test_repr():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    assert repr(memory_block) == \"popsicle.MemoryBlock(b'\\\\x01\\\\x02\\\\x03\\\\x04\\\\x05')\"\n\n#==================================================================================================\n\ndef test_str():\n    memory_block = juce.MemoryBlock([1, 2, 3, 4, 5])\n    assert str(memory_block) == \"\\x01\\x02\\x03\\x04\\x05\"\n"
  },
  {
    "path": "tests/test_juce_core/test_MemoryInputStream.py",
    "content": "import os\nimport pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor_with_empty_source_data():\n    source_data = b\"\"\n\n    stream = juce.MemoryInputStream(source_data, False)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n    stream = juce.MemoryInputStream(source_data, True)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n#==================================================================================================\n\ndef test_constructor_with_source_data():\n    source_data = b\"Hello, world!\"\n\n    stream = juce.MemoryInputStream(source_data, False)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n    stream = juce.MemoryInputStream(source_data, True)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n#==================================================================================================\n\ndef test_constructor_with_empty_memory_block():\n    source_data = b\"\"\n    memory_block = juce.MemoryBlock(source_data)\n\n    stream = juce.MemoryInputStream(memory_block, False)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n    stream = juce.MemoryInputStream(memory_block, True)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n#==================================================================================================\n\ndef test_constructor_with_memory_block():\n    source_data = b\"Hello, world!\"\n    memory_block = juce.MemoryBlock(source_data)\n\n    stream = juce.MemoryInputStream(memory_block, False)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n    stream = juce.MemoryInputStream(memory_block, True)\n    assert stream.getData() == source_data\n    assert stream.getDataSize() == len(source_data)\n\n#==================================================================================================\n\ndef test_memory_input_stream_construct_from_data():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.getTotalLength() == len(data)\n\n#==================================================================================================\n\ndef test_memory_input_stream_construct_from_memory_block():\n    data = b\"hello world\"\n    memory_block = juce.MemoryBlock(data)\n    input_stream = juce.MemoryInputStream(memory_block, False)\n    assert input_stream.getTotalLength() == len(data)\n\n#==================================================================================================\n\ndef test_memory_input_stream_get_position():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.getPosition() == 0\n\n#==================================================================================================\n\ndef test_memory_input_stream_set_position():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    new_position = 5\n    input_stream.setPosition(new_position)\n    assert input_stream.getPosition() == new_position\n\n#==================================================================================================\n\ndef test_memory_input_stream_get_total_length():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.getTotalLength() == len(data)\n\n#==================================================================================================\n\ndef test_memory_input_stream_is_exhausted():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert not input_stream.isExhausted()\n\n#==================================================================================================\n\ndef test_memory_input_stream_read():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    buffer = bytearray(len(data))\n    bytes_read = input_stream.read(buffer)\n    assert bytes_read == len(data)\n    assert buffer == data\n\n#==================================================================================================\n\ndef test_memory_input_stream_skip_next_bytes():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    num_bytes_to_skip = 5\n    input_stream.skipNextBytes(num_bytes_to_skip)\n    assert input_stream.getPosition() == num_bytes_to_skip\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_into_memory_block():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    memory_block = juce.MemoryBlock()\n    max_num_bytes_to_read = len(data)\n    bytes_read = input_stream.readIntoMemoryBlock(memory_block, max_num_bytes_to_read)\n    assert bytes_read == len(data)\n    assert memory_block.getData() == data\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_next_line():\n    data = b\"hello\\nworld\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readNextLine() == \"hello\"\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_string():\n    data = b\"hello\\x00world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readString() == \"hello\"\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_entire_stream_as_string():\n    data = b\"hello world\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readEntireStreamAsString() == \"hello world\"\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_byte():\n    data = b\"\\x01\\x02\\x03\\x04\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readByte() == \"\\x01\"\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_bool():\n    data = b\"\\x01\\x00\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readBool() == True\n    assert input_stream.readBool() == False\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_short():\n    data = b\"\\x01\\x02\\x03\\x04\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readShort() == 513\n    assert input_stream.readShortBigEndian() == 772\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_int():\n    data = b\"\\x01\\x02\\x03\\x04\\x01\\x02\\x03\\x04\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readInt() == 67305985\n    assert input_stream.readIntBigEndian() == 16909060\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_int64():\n    data = b\"\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readInt64() == 578437695752307201\n    assert input_stream.readInt64BigEndian() == 72623859790382856\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_float():\n    data = b\"\\x00\\x00\\x80?\\x00\\x00\\x80?\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readFloat() == 1.0\n    assert input_stream.readFloatBigEndian() == pytest.approx(1.1754943508222875e-38)\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_double():\n    data = b\"\\x00\\x00\\x00\\x00\\x00\\x00\\xf0?\\x00\\x00\\x00\\x00\\x00\\x00\\xf0?\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readDouble() == 1.0\n    assert input_stream.readDoubleBigEndian() == pytest.approx(2.2250738585072014e-308)\n\n#==================================================================================================\n\ndef test_memory_input_stream_read_compressed_int():\n    data = b\"\\x04\\x01\\x02\\x03\\x04\"\n    input_stream = juce.MemoryInputStream(data, False)\n    assert input_stream.readCompressedInt() == 67305985\n"
  },
  {
    "path": "tests/test_juce_core/test_MemoryMappedFile.py",
    "content": "import os\nimport sys\nimport pytest\n\nimport popsicle as juce\nfrom popsicle import int64\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\ndata_folder = this_file.getSiblingFile(\"data\")\n\n#==================================================================================================\n\ndef test_memory_mapped_file_read_only_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.MemoryMappedFile.readOnly)\n    assert mmf.getData() is not None\n    assert mmf.getSize() > 0\n    assert mmf.getRange().getStart() >= 0\n    assert mmf.getRange().getEnd() > mmf.getRange().getStart()\n\n#==================================================================================================\n\ndef test_memory_mapped_file_read_write_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.MemoryMappedFile.readWrite)\n    assert mmf.getData() is not None\n    assert mmf.getSize() > 0\n    assert mmf.getRange().getStart() >= 0\n    assert mmf.getRange().getEnd() > mmf.getRange().getStart()\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform == \"win32\", reason=\"On windows it seems like exclusive mode fails\")\ndef test_memory_mapped_file_exclusive_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.MemoryMappedFile.readOnly, exclusive=True)\n    assert mmf.getData() is not None\n    assert mmf.getSize() > 0\n\n#==================================================================================================\n\ndef test_memory_mapped_file_non_existent_file():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"nonexistent.txt\"), juce.MemoryMappedFile.readOnly)\n    assert mmf.getData() is None\n    assert mmf.getSize() == 0\n\n#==================================================================================================\n\ndef test_memory_mapped_file_section_read_only_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.Range[int64](0, 10), juce.MemoryMappedFile.readOnly)\n    assert mmf.getData() is not None\n    assert mmf.getSize() == 10\n    assert mmf.getRange().getLength() == 10\n\n#==================================================================================================\n\ndef test_memory_mapped_file_section_read_write_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.Range[int64](0, 10), juce.MemoryMappedFile.readWrite)\n    assert mmf.getData() is not None\n    assert mmf.getSize() == 10\n    assert mmf.getRange().getLength() == 10\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform == \"win32\", reason=\"On windows it seems like exclusive mode fails\")\ndef test_memory_mapped_file_section_exclusive_mode():\n    mmf = juce.MemoryMappedFile(data_folder.getChildFile(\"somefile.txt\"), juce.Range[int64](0, 10), juce.MemoryMappedFile.readOnly, exclusive=True)\n    assert mmf.getData() is not None\n    assert mmf.getSize() == 10\n"
  },
  {
    "path": "tests/test_juce_core/test_NamedValueSet.py",
    "content": "import popsicle as juce\n\nNV = juce.NamedValueSet.NamedValue\n\n#==================================================================================================\n\ndef test_constructor_empty():\n    named_value_set = juce.NamedValueSet()\n    assert named_value_set.size() == 0\n    assert named_value_set.isEmpty()\n\n#==================================================================================================\n\ndef test_constructor_list_of_namedvalues():\n    named_value_set = juce.NamedValueSet([\n        NV(juce.Identifier(\"name1\"), 42),\n        NV(juce.Identifier(\"name2\"), \"value\"),\n        NV(juce.Identifier(\"name3\"), True)\n    ])\n\n    assert named_value_set.size() == 3\n    assert not named_value_set.isEmpty()\n\n    named_value_set = juce.NamedValueSet([\n        NV(\"name1\", 42),\n        NV(\"name2\", \"value\"),\n        NV(\"name3\", True)\n    ])\n\n    assert named_value_set.size() == 3\n    assert not named_value_set.isEmpty()\n\n#==================================================================================================\n\ndef test_constructor_dict():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.size() == 3\n    assert not named_value_set.isEmpty()\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    copied_set = juce.NamedValueSet(original_set)\n\n    assert original_set.size() == copied_set.size()\n    assert not copied_set.isEmpty()\n\n#==================================================================================================\n\ndef test_equality_operators():\n    set1 = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    set2 = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    set3 = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": False,\n        \"name4\": 1.2\n    })\n\n    assert set1 == set2\n    assert set1 != set3\n\n#==================================================================================================\n\ndef test_operator_bracket():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set[\"name1\"] == 42\n    assert named_value_set[juce.Identifier(\"name2\")] == \"value\"\n    assert named_value_set[juce.Identifier(\"name3\")] == True\n\n#==================================================================================================\n\ndef test_get_with_default():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.getWithDefault(juce.Identifier(\"name1\"), 100) == 42\n    assert named_value_set.getWithDefault(juce.Identifier(\"name4\"), \"default\") == \"default\"\n\n#==================================================================================================\n\ndef test_set():\n    # Test set method\n    named_value_set = juce.NamedValueSet()\n\n    # Adding a new named value\n    assert named_value_set.set(juce.Identifier(\"name1\"), 42) is True\n    assert named_value_set.size() == 1\n\n    # Modifying an existing named value\n    assert named_value_set.set(juce.Identifier(\"name1\"), 100) is True\n    assert named_value_set.size() == 1\n    assert named_value_set[\"name1\"] == 100\n\n#==================================================================================================\n\ndef test_contains():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.contains(juce.Identifier(\"name1\")) is True\n    assert named_value_set.contains(juce.Identifier(\"name4\")) is False\n\n#==================================================================================================\n\ndef test_remove():\n    # Test remove method\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    # Removing an existing named value\n    assert named_value_set.remove(\"name2\") is True\n    assert named_value_set.size() == 2\n    assert named_value_set.contains(juce.Identifier(\"name2\")) is False\n\n    # Removing a non-existing named value\n    assert named_value_set.remove(juce.Identifier(\"name4\")) is False\n    assert named_value_set.size() == 2\n\n#==================================================================================================\n\ndef test_get_name():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.getName(0) == juce.Identifier(\"name1\")\n    assert named_value_set.getName(1) == juce.Identifier(\"name2\")\n    assert named_value_set.getName(2) == \"name3\"\n\n#==================================================================================================\n\ndef test_clear():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    named_value_set.clear()\n    assert named_value_set.size() == 0\n    assert named_value_set.isEmpty()\n\n#==================================================================================================\n\ndef test_index_of():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.indexOf(juce.Identifier(\"name1\")) == 0\n    assert named_value_set.indexOf(\"name3\") == 2\n    assert named_value_set.indexOf(\"name4\") == -1\n\n#==================================================================================================\n\ndef test_get_var_pointer():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    var_pointer = named_value_set.getVarPointer(\"name2\")\n    assert var_pointer is not None\n    assert var_pointer == \"value\"\n\n    var_pointer_non_existing = named_value_set.getVarPointer(juce.Identifier(\"name4\"))\n    assert var_pointer_non_existing is None\n\n#==================================================================================================\n\ndef test_getValueAt():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    assert named_value_set.getValueAt(0) == 42\n    assert named_value_set.getValueAt(1) == \"value\"\n    assert named_value_set.getValueAt(2) == True\n\n#==================================================================================================\n\ndef test_get_var_pointer_at():\n    named_value_set = juce.NamedValueSet([\n        NV(juce.Identifier(\"name1\"), 42),\n        NV(juce.Identifier(\"name2\"), \"value\"),\n        NV(juce.Identifier(\"name3\"), True)\n    ])\n\n    var_pointer_at_1 = named_value_set.getVarPointerAt(1)\n    assert var_pointer_at_1 is not None\n    assert var_pointer_at_1 == \"value\"\n\n    var_pointer_at_invalid = named_value_set.getVarPointerAt(3)\n    assert var_pointer_at_invalid is None\n\n#==================================================================================================\n\ndef test_copy_to_xml_attributes():\n    named_value_set = juce.NamedValueSet({\n        \"name1\": 42,\n        \"name2\": \"value\",\n        \"name3\": True\n    })\n\n    xml_element = juce.XmlElement(\"test_element\")\n    named_value_set.copyToXmlAttributes(xml_element)\n\n    assert xml_element.getStringAttribute(\"name1\") == \"42\"\n    assert xml_element.getStringAttribute(\"name2\") == \"value\"\n    assert xml_element.getStringAttribute(\"name3\") == \"1\"\n\n    assert xml_element.getIntAttribute(\"name1\") == 42\n    assert xml_element.getStringAttribute(\"name2\") == \"value\"\n    assert xml_element.getBoolAttribute(\"name3\") is True\n\n#==================================================================================================\n\ndef test_set_from_xml_attributes():\n    named_value_set = juce.NamedValueSet()\n\n    xml_element = juce.XmlElement(\"test_element\")\n    xml_element.setAttribute(\"name1\", 42)\n    xml_element.setAttribute(\"name2\", \"value\")\n    xml_element.setAttribute(\"name3\", True)\n\n    named_value_set.setFromXmlAttributes(xml_element)\n\n    assert named_value_set.size() == 3\n    assert named_value_set[juce.Identifier(\"name1\")] == \"42\"\n    assert named_value_set[juce.Identifier(\"name2\")] == \"value\"\n    assert named_value_set[juce.Identifier(\"name3\")] == \"1\"\n"
  },
  {
    "path": "tests/test_juce_core/test_NormalisableRange.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_normalisable_range_default_constructor():\n    nr = juce.NormalisableRange[float]()\n    assert nr.start == pytest.approx(0)\n    assert nr.end == pytest.approx(1)\n    assert nr.interval == pytest.approx(0)\n    assert nr.skew == pytest.approx(1)\n    assert not nr.symmetricSkew\n\n#==================================================================================================\n\ndef test_normalisable_range_with_range_interval_skew():\n    nr = juce.NormalisableRange[float](0, 10, 1, 0.5)\n    assert nr.start == pytest.approx(0)\n    assert nr.end == pytest.approx(10)\n    assert nr.interval == pytest.approx(1)\n    assert nr.skew == pytest.approx(0.5)\n    assert not nr.symmetricSkew\n\n#==================================================================================================\n\ndef test_normalisable_range_with_range():\n    nr = juce.NormalisableRange[float](0, 10)\n    assert nr.start == pytest.approx(0)\n    assert nr.end == pytest.approx(10)\n    assert nr.interval == pytest.approx(0)\n    assert nr.skew == pytest.approx(1)\n    assert not nr.symmetricSkew\n\n#==================================================================================================\n\ndef test_normalisable_range_with_range_and_interval():\n    nr = juce.NormalisableRange[float](0, 10, 2)\n    assert nr.start == pytest.approx(0)\n    assert nr.end == pytest.approx(10)\n    assert nr.interval == pytest.approx(2)\n    assert nr.skew == pytest.approx(1)\n    assert not nr.symmetricSkew\n\n#==================================================================================================\n\ndef test_convert_to_0to1_with_linear_skew():\n    nr = juce.NormalisableRange[float](0, 10)\n    assert nr.convertTo0to1(0) == pytest.approx(0.0)\n    assert nr.convertTo0to1(5) == pytest.approx(0.5)\n\n#==================================================================================================\n\ndef test_convert_to_0to1_with_skew():\n    nr = juce.NormalisableRange[float](0, 10, 1, 0.5)\n    result = nr.convertTo0to1(5)\n    assert 0.5 < result < 1.0\n\n    nr = juce.NormalisableRange[float](0, 10, 1, 1.5)\n    result = nr.convertTo0to1(5)\n    assert 0.0 < result < 0.5\n\n#==================================================================================================\n\ndef test_convert_from_0to1_with_linear_skew():\n    nr = juce.NormalisableRange[float](0, 10)\n    assert nr.convertFrom0to1(0.0) == pytest.approx(0)\n    assert nr.convertFrom0to1(0.5) == pytest.approx(5)\n    assert nr.convertFrom0to1(1.0) == pytest.approx(10)\n\n#==================================================================================================\n\ndef test_convert_from_0to1_with_skew():\n    nr = juce.NormalisableRange[float](0, 10, 1, 1.5)\n    result = nr.convertFrom0to1(0.5)\n    assert result > 5\n\n    nr = juce.NormalisableRange[float](0, 10, 1, 0.5)\n    result = nr.convertFrom0to1(0.5)\n    assert result < 5\n\n#==================================================================================================\n\ndef test_snap_to_legal_value_with_interval():\n    nr = juce.NormalisableRange[float](0, 10, 1)\n    assert nr.snapToLegalValue(5.4) == pytest.approx(5)\n    assert nr.snapToLegalValue(5.6) == pytest.approx(6)\n\n#==================================================================================================\n\ndef test_get_range():\n    nr = juce.NormalisableRange[float](0, 10)\n    range = nr.getRange()\n    assert range.getStart() == 0\n    assert range.getEnd() == 10\n\n#==================================================================================================\n\ndef test_set_skew_for_centre():\n    nr = juce.NormalisableRange[float](0, 10)\n    nr.setSkewForCentre(2.5)\n    assert nr.skew != 1\n    assert not nr.symmetricSkew\n"
  },
  {
    "path": "tests/test_juce_core/test_PropertySet.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor():\n    a = juce.PropertySet()\n    assert not a.containsKey(\"abc\")\n\n    a.setValue(\"abc\", 1)\n    assert a.containsKey(\"abc\")\n    assert a.getValue(\"abc\", \"99\") == \"1\"\n    assert a.getValue(\"123\", \"99\") == \"99\"\n    assert a.getIntValue(\"abc\", 99) == 1\n    assert a.getIntValue(\"123\", 99) == 99\n    assert a.getDoubleValue(\"abc\", 99.0) == 1.0\n    assert a.getDoubleValue(\"123\", 99.0) == 99.0\n    assert a.getBoolValue(\"abc\", False) == True\n    assert a.getBoolValue(\"123\", False) == False\n\n    a.removeValue(\"123\")\n    assert a.containsKey(\"abc\")\n\n    a.removeValue(\"abc\")\n    assert not a.containsKey(\"abc\")\n\n    a.setValue(\"abc\", 1)\n    a.setValue(\"def\", \"qwertyuiop\")\n    a.setValue(\"ghi\", True)\n\n    b = juce.PropertySet(a)\n    assert b.containsKey(\"abc\")\n    assert b.containsKey(\"def\")\n    assert b.containsKey(\"ghi\")\n\n    c = juce.PropertySet()\n    assert not c.containsKey(\"abc\")\n    assert not c.containsKey(\"def\")\n    assert not c.containsKey(\"ghi\")\n\n    c.addAllPropertiesFrom(b)\n    assert c.containsKey(\"abc\")\n    assert c.containsKey(\"def\")\n    assert c.containsKey(\"ghi\")\n\n    c.clear()\n    assert not c.containsKey(\"abc\")\n    assert not c.containsKey(\"def\")\n    assert not c.containsKey(\"ghi\")\n"
  },
  {
    "path": "tests/test_juce_core/test_Random.py",
    "content": "import sys\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_system_random():\n    r = juce.Random.getSystemRandom()\n\n    for _ in range(1000):\n        a = r.nextBool()\n        assert a or not a\n\n    for _ in range(1000):\n        a = r.nextInt(100)\n        assert a >= 0 and a <= 100\n\n    for _ in range(1000):\n        a = r.nextInt(juce.Range[int](0, 100))\n        assert a >= 0 and a <= 100\n\n    for _ in range(1000):\n        a = r.nextInt() / float(sys.maxsize)\n        assert a >= -1.0 and a <= 1.0\n\n    for _ in range(1000):\n        a = r.nextInt64() / float(sys.maxsize)\n        assert a >= -1.0 and a <= 1.0\n\n    for _ in range(1000):\n        a = r.nextFloat() / sys.float_info.max\n        assert a >= 0.0 and a <= 1.0\n\n    for _ in range(1000):\n        a = r.nextDouble() / sys.float_info.max\n        assert a >= 0.0 and a <= 1.0\n\n#==================================================================================================\n\ndef test_seeded_random():\n    r = juce.Random(10)\n    a1 = r.nextInt()\n    a2 = r.nextInt()\n    r.setSeed(10)\n    b1 = r.nextInt()\n    b2 = r.nextInt()\n\n    assert a1 == b1\n    assert a2 == b2\n\n    r = juce.Random(10)\n    c1 = r.nextInt()\n    c2 = r.nextInt()\n\n    assert a1 == c1\n    assert a2 == c2\n"
  },
  {
    "path": "tests/test_juce_core/test_Range.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_range_int_constructor():\n    a = juce.Range[int]()\n    assert a.getStart() == 0\n    assert a.getEnd() == 0\n    assert a.getLength() == 0\n    assert a.isEmpty()\n\n    b = juce.Range[int](-100, 100)\n    assert b.getStart() == -100\n    assert b.getEnd() == 100\n    assert b.getLength() == 200\n    assert not b.isEmpty()\n\n    c = juce.Range[int].between(-1, 1)\n    assert c.getStart() == -1\n    assert c.getEnd() == 1\n    assert c.getLength() == 2\n    assert not c.isEmpty()\n\n    d = juce.Range[int].withStartAndLength(42, 1)\n    assert d.getStart() == 42\n    assert d.getEnd() == 43\n    assert d.getLength() == 1\n    assert not d.isEmpty()\n\n    e = juce.Range[int].emptyRange(111)\n    assert e.getStart() == 111\n    assert e.getEnd() == 111\n    assert e.getLength() == 0\n    assert e.isEmpty()\n\n#==================================================================================================\n\ndef test_range_set_start_end():\n    a = juce.Range[int]()\n    a.setStart(-10)\n    assert a.getStart() == -10\n    assert a.getEnd() == 0\n    assert a.getLength() == 10\n    assert not a.isEmpty()\n\n    a.setEnd(10)\n    assert a.getStart() == -10\n    assert a.getEnd() == 10\n    assert a.getLength() == 20\n    assert not a.isEmpty()\n\n#==================================================================================================\n\ndef test_range_with_start_end():\n    a = juce.Range[int]()\n\n    b = a.withStart(-10)\n    assert a.getStart() == 0\n    assert a.getEnd() == 0\n    assert a.getLength() == 0\n    assert a.isEmpty()\n\n    assert b.getStart() == -10\n    assert b.getEnd() == 0\n    assert b.getLength() == 10\n    assert not b.isEmpty()\n\n    c = b.withEnd(10)\n    assert b.getStart() == -10\n    assert b.getEnd() == 0\n    assert b.getLength() == 10\n    assert not b.isEmpty()\n\n    assert c.getStart() == -10\n    assert c.getEnd() == 10\n    assert c.getLength() == 20\n    assert not c.isEmpty()\n\n#==================================================================================================\n\ndef test_range_moved_start_end():\n    a = juce.Range[int](0, 100)\n\n    b = a.movedToStartAt(10)\n    assert b.getStart() == 10\n    assert b.getEnd() == 110\n    assert b.getLength() == 100\n    assert not b.isEmpty()\n\n    c = b.movedToEndAt(90)\n    assert c.getStart() == -10\n    assert c.getEnd() == 90\n    assert c.getLength() == 100\n    assert not c.isEmpty()\n\n#==================================================================================================\n\ndef test_range_set_length():\n    a = juce.Range[int](0, 100)\n\n    a.setLength(20)\n    assert a.getStart() == 0\n    assert a.getEnd() == 20\n    assert not a.isEmpty()\n\n    a.setStart(10)\n    a.setLength(0)\n    assert a.getStart() == 10\n    assert a.getEnd() == 10\n    assert a.isEmpty()\n\n#==================================================================================================\n\ndef test_range_expanded():\n    a = juce.Range[int](0, 100)\n\n    b = a.expanded(100)\n    assert b.getStart() == -100\n    assert b.getEnd() == 200\n    assert b.getLength() == 300\n    assert not b.isEmpty()\n\n#==================================================================================================\n\ndef test_range_operators():\n    a = juce.Range[int](-10, 10)\n\n    a += 1\n    assert a.getStart() == -9\n    assert a.getEnd() == 11\n    assert a.getLength() == 20\n    assert not a.isEmpty()\n\n    a -= 1\n    assert a.getStart() == -10\n    assert a.getEnd() == 10\n    assert a.getLength() == 20\n    assert not a.isEmpty()\n\n    b = a + 1\n    assert b.getStart() == -9\n    assert b.getEnd() == 11\n    assert b.getLength() == 20\n    assert not b.isEmpty()\n\n    c = b - 1\n    assert c.getStart() == -10\n    assert c.getEnd() == 10\n    assert c.getLength() == 20\n    assert not c.isEmpty()\n\n#==================================================================================================\n\ndef test_range_equality():\n    a = juce.Range[int](-10, 10)\n    b = juce.Range[int](-10, 10)\n    c = juce.Range[int](-11, 10)\n\n    assert a == a\n    assert a == b\n    assert b == a\n    assert a != c\n    assert c != a\n\n#==================================================================================================\n\ndef test_range_contains():\n    a = juce.Range[int](-10, 10)\n\n    assert not a.contains(-11)\n    assert a.contains(-10)\n    assert a.contains(-1)\n    assert a.contains(0)\n    assert a.contains(1)\n    assert a.contains(9)\n    assert not a.contains(10)\n    assert not a.contains(11)\n\n    b = juce.Range[int](-15, -5)\n    c = juce.Range[int](-15, -10)\n\n    assert not a.contains(b)\n    assert not b.contains(a)\n    assert b.contains(c)\n    assert not c.contains(b)\n\n#==================================================================================================\n\ndef test_range_clip_value():\n    a = juce.Range[int](-10, 10)\n\n    assert a.clipValue(-11) == -10\n    assert a.clipValue(-6) == -6\n    assert a.clipValue(6) == 6\n    assert a.clipValue(10) == 10\n\n#==================================================================================================\n\ndef test_range_intersects():\n    a = juce.Range[int](-10, 10)\n    b = juce.Range[int](-15, -5)\n    c = juce.Range[int](5, 15)\n\n    assert a.intersects(b)\n    assert b.intersects(a)\n    assert not b.intersects(c)\n    assert not c.intersects(b)\n\n    assert a.getIntersectionWith(b) == juce.Range[int](-10, -5)\n    assert b.getIntersectionWith(a) == juce.Range[int](-10, -5)\n    assert b.getIntersectionWith(c).isEmpty()\n    assert c.getIntersectionWith(b).isEmpty()\n\n#==================================================================================================\n\ndef test_range_intersects():\n    a = juce.Range[int](-10, 10)\n    b = juce.Range[int](-15, -5)\n\n    assert a.getUnionWith(100) == juce.Range[int](-10, 100)\n    assert b.getUnionWith(-10) == juce.Range[int](-15, -5)\n    assert b.getUnionWith(100) == juce.Range[int](-15, 100)\n\n    assert a.getUnionWith(b) == juce.Range[int](-15, 10)\n    assert b.getUnionWith(a) == juce.Range[int](-15, 10)\n\n#==================================================================================================\n\ndef test_range_constrain_range():\n    a = juce.Range[int](-10, 10)\n    b = juce.Range[int](-15, -5)\n\n    c = a.constrainRange(b)\n    assert c == juce.Range[int](-10, 0)\n"
  },
  {
    "path": "tests/test_juce_core/test_RangedDirectoryIterator.py",
    "content": "import os\n\nimport popsicle as juce\n\nthis_file = os.path.abspath(__file__)\nthis_folder = os.path.dirname(this_file)\n\n#==================================================================================================\n\ndef test_iterate_this_folder():\n    folder = juce.File(this_folder)\n\n    for entry in juce.RangedDirectoryIterator(folder, isRecursive=False):\n        f = entry.getFile()\n\n        assert f.getParentDirectory() == folder\n        if f.getFileName() == \"data\" or f.getFileName() == \"__pycache__\":\n            assert f.isDirectory()\n            assert entry.isDirectory()\n            assert not entry.isHidden()\n            assert not entry.isReadOnly()\n\n        if f.getFileExtension() == \".py\":\n            assert f.existsAsFile()\n            assert not entry.isDirectory()\n            assert not entry.isHidden()\n            assert not entry.isReadOnly()\n            assert entry.getFileSize() >= 0\n\n#==================================================================================================\n\ndef test_iterate_progress():\n    folder = juce.File(this_folder)\n    lastProgress = -1.0\n\n    for entry in juce.RangedDirectoryIterator(folder, isRecursive=False):\n        progress = entry.getEstimatedProgress()\n\n        assert progress > lastProgress or progress <= 0.0 or progress >= 1.0\n\n        lastProgress = entry.getEstimatedProgress()\n"
  },
  {
    "path": "tests/test_juce_core/test_RelativeTime.py",
    "content": "import popsicle as juce\n\nmillisecondsInSecond = 1000\nsecondsInMinute = 60\nminutesInHour = 60\nhoursInDay = 24\ndaysInWeek = 7\n\n#==================================================================================================\n\ndef test_construct_empty():\n    a = juce.RelativeTime.seconds(0)\n    assert a.inMilliseconds() == 0\n    assert a.inSeconds() == 0\n    assert a.inMinutes() == 0\n    assert a.inHours() == 0\n    assert a.inDays() == 0\n    assert a.inWeeks() == 0\n\n#==================================================================================================\n\ndef test_construct_valid():\n    a = juce.RelativeTime.milliseconds(1000)\n    assert juce.approximatelyEqual (a.inMilliseconds(), 1000)\n    assert juce.approximatelyEqual (a.inSeconds(), 1000 / millisecondsInSecond)\n    assert juce.approximatelyEqual (a.inMinutes(), 1000 / millisecondsInSecond / secondsInMinute)\n    assert juce.approximatelyEqual (a.inHours(), 1000 / millisecondsInSecond / secondsInMinute / minutesInHour)\n    assert juce.approximatelyEqual (a.inDays(), 1000 / millisecondsInSecond / secondsInMinute / minutesInHour / hoursInDay)\n    assert juce.approximatelyEqual (a.inWeeks(), 1000 / millisecondsInSecond / secondsInMinute / minutesInHour / hoursInDay / daysInWeek)\n\n    a = juce.RelativeTime.seconds(5)\n    assert juce.approximatelyEqual (a.inMilliseconds(), millisecondsInSecond * 5)\n    assert juce.approximatelyEqual (a.inSeconds(), 5)\n    assert juce.approximatelyEqual (a.inMinutes(), 5 / secondsInMinute)\n    assert juce.approximatelyEqual (a.inHours(), 5 / secondsInMinute / minutesInHour)\n    assert juce.approximatelyEqual (a.inDays(), 5 / secondsInMinute / minutesInHour / hoursInDay)\n    assert juce.approximatelyEqual (a.inWeeks(), 5 / secondsInMinute / minutesInHour / hoursInDay / daysInWeek)\n\n    a = juce.RelativeTime.minutes(120)\n    assert juce.approximatelyEqual (a.inMilliseconds(), millisecondsInSecond * secondsInMinute * 120)\n    assert juce.approximatelyEqual (a.inSeconds(), secondsInMinute * 120)\n    assert juce.approximatelyEqual (a.inMinutes(), 120)\n    assert juce.approximatelyEqual (a.inHours(), 120 / minutesInHour)\n    assert juce.approximatelyEqual (a.inDays(), 120 / minutesInHour / hoursInDay)\n    assert juce.approximatelyEqual (a.inWeeks(), 120 / minutesInHour / hoursInDay / daysInWeek)\n\n    a = juce.RelativeTime.hours(25)\n    assert juce.approximatelyEqual (a.inMilliseconds(), millisecondsInSecond * secondsInMinute * minutesInHour * 25)\n    assert juce.approximatelyEqual (a.inSeconds(), secondsInMinute * minutesInHour * 25)\n    assert juce.approximatelyEqual (a.inMinutes(), minutesInHour * 25)\n    assert juce.approximatelyEqual (a.inHours(), 25)\n    assert juce.approximatelyEqual (a.inDays(), 25 / hoursInDay)\n    assert juce.approximatelyEqual (a.inWeeks(), 25 / hoursInDay / daysInWeek)\n\n    a = juce.RelativeTime.days(5)\n    assert juce.approximatelyEqual (a.inMilliseconds(), millisecondsInSecond * secondsInMinute * minutesInHour * hoursInDay * 5)\n    assert juce.approximatelyEqual (a.inSeconds(), secondsInMinute * minutesInHour * hoursInDay * 5)\n    assert juce.approximatelyEqual (a.inMinutes(), minutesInHour * hoursInDay * 5)\n    assert juce.approximatelyEqual (a.inHours(), hoursInDay * 5)\n    assert juce.approximatelyEqual (a.inDays(), 5)\n    assert juce.approximatelyEqual (a.inWeeks(), 5 / daysInWeek)\n\n    a = juce.RelativeTime.weeks(2)\n    assert juce.approximatelyEqual (a.inMilliseconds(), millisecondsInSecond * secondsInMinute * minutesInHour * hoursInDay * daysInWeek * 2)\n    assert juce.approximatelyEqual (a.inSeconds(), secondsInMinute * minutesInHour * hoursInDay * daysInWeek * 2)\n    assert juce.approximatelyEqual (a.inMinutes(), minutesInHour * hoursInDay * daysInWeek * 2)\n    assert juce.approximatelyEqual (a.inHours(), hoursInDay * daysInWeek * 2)\n    assert juce.approximatelyEqual (a.inDays(), daysInWeek * 2)\n    assert juce.approximatelyEqual (a.inWeeks(), 2)\n\n#==================================================================================================\n\ndef test_operation_get_description():\n    a = juce.RelativeTime.milliseconds(0)\n    assert a.getDescription() == \"0\"\n    assert a.getDescription(\"infinite\") == \"infinite\"\n\n    a = juce.RelativeTime.milliseconds(500)\n    assert a.getDescription() == \"500 ms\"\n    assert a.getDescription(\"infinite\") == \"500 ms\"\n\n    a += juce.RelativeTime.seconds(1)\n    assert a.getDescription() == \"1 sec\"\n    assert a.getDescription(\"infinite\") == \"1 sec\"\n\n    a += juce.RelativeTime.minutes(1)\n    assert a.getDescription() == \"1 min 1 sec\"\n    assert a.getDescription(\"infinite\") == \"1 min 1 sec\"\n\n    a += juce.RelativeTime.hours(1)\n    assert a.getDescription() == \"1 hr 1 min\"\n    assert a.getDescription(\"infinite\") == \"1 hr 1 min\"\n\n    a += juce.RelativeTime.days(1)\n    assert a.getDescription() == \"1 day 1 hr\"\n    assert a.getDescription(\"infinite\") == \"1 day 1 hr\"\n\n    a += juce.RelativeTime.weeks(1)\n    assert a.getDescription() == \"1 week 1 day\"\n    assert a.getDescription(\"infinite\") == \"1 week 1 day\"\n\n#==================================================================================================\n\ndef test_operation_get_approximate_description():\n    a = juce.RelativeTime.milliseconds(0)\n    assert a.getApproximateDescription() == \"< 1 sec\"\n\n    a = juce.RelativeTime.milliseconds(500)\n    assert a.getApproximateDescription() == \"< 1 sec\"\n\n    a = juce.RelativeTime.seconds(140)\n    assert a.getApproximateDescription() == \"2 mins\"\n\n    a = juce.RelativeTime.minutes(110)\n    assert a.getApproximateDescription() == \"1 hr\"\n\n    a = juce.RelativeTime.hours(23) + juce.RelativeTime.minutes(60)\n    assert a.getApproximateDescription() == \"24 hrs\"\n\n    a = juce.RelativeTime.days(8)\n    assert a.getApproximateDescription() == \"8 days\"\n\n    a = juce.RelativeTime.weeks(2)\n    assert a.getApproximateDescription() == \"2 weeks\"\n"
  },
  {
    "path": "tests/test_juce_core/test_Result.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_ok():\n    result = juce.Result.ok()\n    assert not result.failed()\n    assert result.wasOk()\n\n    if result: pass\n    else: assert False\n\n    if not result: assert False\n\n#==================================================================================================\n\ndef test_fail():\n    result = juce.Result.fail(\"The cricket splatted\")\n    assert result.failed()\n    assert not result.wasOk()\n    assert result.getErrorMessage() == \"The cricket splatted\"\n\n    if result: assert False\n\n    if not result: pass\n    else: assert False\n\n#==================================================================================================\n\ndef test_comparison():\n    ok1 = juce.Result.ok()\n    ok2 = juce.Result.ok()\n    fail1 = juce.Result.fail(\"The cricket splatted\")\n    fail2 = juce.Result.fail(\"The fox died\")\n    fail3 = juce.Result.fail(\"The cricket splatted\")\n\n    assert ok1 == ok2\n    assert ok1 == ok1\n    assert ok1 != fail1\n    assert fail1 != fail2\n    assert fail1 == fail3\n    assert fail1 == fail1\n"
  },
  {
    "path": "tests/test_juce_core/test_StringArray.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor_empty():\n    string_array = juce.StringArray()\n    assert len(string_array) == 0\n\n#==================================================================================================\n\ndef test_constructor_copy():\n    original = juce.StringArray([\"one\", \"two\", \"three\"])\n    copied = juce.StringArray(original)\n    assert len(copied) == 3\n    assert copied[0] == \"one\"\n    assert copied[1] == \"two\"\n    assert copied[2] == \"three\"\n\n#==================================================================================================\n\ndef test_constructor_list():\n    string_array = juce.StringArray([\"apple\", \"orange\", \"banana\"])\n    assert len(string_array) == 3\n    assert string_array[0] == \"apple\"\n    assert string_array[1] == \"orange\"\n    assert string_array[2] == \"banana\"\n\n#==================================================================================================\n\ndef test_constructor_single():\n    string_array = juce.StringArray(\"one\")\n    assert len(string_array) == 1\n    assert string_array[0] == \"one\"\n\n#==================================================================================================\n\ndef test_constructor_args():\n    string_array = juce.StringArray(\"one\", \"two\", \"three\")\n    assert len(string_array) == 3\n    assert string_array[0] == \"one\"\n    assert string_array[1] == \"two\"\n    assert string_array[2] == \"three\"\n\n#==================================================================================================\n\ndef test_comparison_operators():\n    array1 = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    array2 = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    array3 = juce.StringArray([\"apple\", \"banana\", \"kiwi\"])\n\n    assert array1 == array2\n    assert array1 != array3\n\n#==================================================================================================\n\ndef test_size_method():\n    string_array = juce.StringArray([\"one\", \"two\", \"three\"])\n    assert string_array.size() == 3\n\n#==================================================================================================\n\ndef test_is_empty_method():\n    empty_array = juce.StringArray()\n    non_empty_array = juce.StringArray([\"apple\", \"banana\"])\n\n    assert empty_array.isEmpty() is True\n    assert non_empty_array.isEmpty() is False\n\n#==================================================================================================\n\ndef test_index_operator():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    assert string_array[0] == \"apple\"\n    assert string_array[1] == \"banana\"\n    assert string_array[2] == \"orange\"\n\n#==================================================================================================\n\ndef test_swap_with_method():\n    array1 = juce.StringArray([\"one\", \"two\", \"three\"])\n    array2 = juce.StringArray([\"apple\", \"banana\"])\n\n    array1.swapWith(array2)\n\n    assert len(array1) == 2\n    assert array1[0] == \"apple\"\n    assert array1[1] == \"banana\"\n\n    assert len(array2) == 3\n    assert array2[0] == \"one\"\n    assert array2[1] == \"two\"\n    assert array2[2] == \"three\"\n\n#==================================================================================================\n\ndef test_contains_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n\n    assert string_array.contains(\"banana\") is True\n    assert string_array.contains(\"grape\") is False\n\n#==================================================================================================\n\ndef test_index_of_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n\n    assert string_array.indexOf(\"banana\") == 1\n    assert string_array.indexOf(\"grape\") == -1\n\n#==================================================================================================\n\ndef test_add_method():\n    string_array = juce.StringArray()\n    string_array.add(\"apple\")\n    assert len(string_array) == 1\n    assert string_array[0] == \"apple\"\n\n#==================================================================================================\n\ndef test_insert_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.insert(1, \"grape\")\n    assert len(string_array) == 4\n    assert string_array[1] == \"grape\"\n    assert string_array[2] == \"banana\"\n\n#==================================================================================================\n\ndef test_set_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.set(1, \"grape\")\n    assert len(string_array) == 3\n    assert string_array[1] == \"grape\"\n\n#==================================================================================================\n\ndef test_add_if_not_already_there_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    result = string_array.addIfNotAlreadyThere(\"grape\")\n    assert result is True\n    assert len(string_array) == 4\n    assert string_array[3] == \"grape\"\n\n    # Adding an existing string should return False\n    result = string_array.addIfNotAlreadyThere(\"banana\")\n    assert result is False\n    assert len(string_array) == 4\n\n#==================================================================================================\n\ndef test_add_array_method():\n    string_array1 = juce.StringArray([\"apple\", \"banana\"])\n    string_array2 = juce.StringArray([\"orange\", \"grape\"])\n    string_array1.addArray(string_array2)\n    assert len(string_array1) == 4\n    assert string_array1[2] == \"orange\"\n    assert string_array1[3] == \"grape\"\n\n#==================================================================================================\n\ndef test_merge_array_method():\n    string_array1 = juce.StringArray([\"apple\", \"banana\"])\n    string_array2 = juce.StringArray([\"orange\", \"banana\"])\n    string_array1.mergeArray(string_array2)\n    assert len(string_array1) == 3\n    assert string_array1[2] == \"orange\"\n\n    string_array1 = juce.StringArray([\"apple\", \"BANANA\"])\n    string_array2 = juce.StringArray([\"orange\", \"banana\"])\n    string_array1.mergeArray(string_array2, True)\n    assert len(string_array1) == 3\n    assert string_array1[0] == \"apple\"\n    assert string_array1[1] == \"BANANA\"\n    assert string_array1[2] == \"orange\"\n\n    string_array1 = juce.StringArray([\"apple\", \"BANANA\"])\n    string_array2 = juce.StringArray([\"orange\", \"banana\"])\n    string_array1.mergeArray(string_array2, False)\n    assert len(string_array1) == 4\n    assert string_array1[0] == \"apple\"\n    assert string_array1[1] == \"BANANA\"\n    assert string_array1[2] == \"orange\"\n    assert string_array1[3] == \"banana\"\n\n#==================================================================================================\n\ndef test_remove_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.remove(1)\n    assert len(string_array) == 2\n    assert string_array[1] == \"orange\"\n\n#==================================================================================================\n\ndef test_remove_string_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.removeString(\"banana\")\n    assert len(string_array) == 2\n    assert string_array[1] == \"orange\"\n\n#==================================================================================================\n\ndef test_remove_range_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\", \"grape\"])\n    string_array.removeRange(1, 2)\n    assert len(string_array) == 2\n    assert string_array[0] == \"apple\"\n    assert string_array[1] == \"grape\"\n\n#==================================================================================================\n\ndef test_remove_duplicates_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\", \"banana\", \"grape\"])\n    string_array.removeDuplicates(False)\n    assert len(string_array) == 4\n    assert string_array[1] == \"banana\"\n    assert string_array[3] == \"grape\"\n\n#==================================================================================================\n\ndef test_remove_empty_strings_method():\n    string_array = juce.StringArray([\"apple\", \"\", \"banana\", \"  \", \"orange\", \"\"])\n    string_array.removeEmptyStrings()\n    assert len(string_array) == 3\n    assert string_array[0] == \"apple\"\n    assert string_array[1] == \"banana\"\n    assert string_array[2] == \"orange\"\n\n#==================================================================================================\n\ndef test_move_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\", \"grape\"])\n    string_array.move(1, 2)\n    assert len(string_array) == 4\n    assert string_array[1] == \"orange\"\n    assert string_array[2] == \"banana\"\n\n#==================================================================================================\n\ndef test_trim_method():\n    string_array = juce.StringArray([\"  apple  \", \"  banana  \", \"  orange  \", \"  \"])\n    string_array.trim()\n    assert len(string_array) == 4\n    assert string_array[0] == \"apple\"\n    assert string_array[1] == \"banana\"\n    assert string_array[2] == \"orange\"\n    assert string_array[3] == \"\"\n\n#==================================================================================================\n\ndef test_join_into_string_method():\n    string_array = juce.StringArray()\n    result = string_array.joinIntoString(\", \")\n    assert result == \"\"\n\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    result = string_array.joinIntoString(\", \")\n    assert result == \"apple, banana, orange\"\n\n#==================================================================================================\n\ndef test_sort_method():\n    string_array = juce.StringArray([\"orange\", \"banana\", \"apple\", \"grape\"])\n    string_array.sort(False)\n    assert len(string_array) == 4\n    assert string_array[0] == \"apple\"\n    assert string_array[3] == \"orange\"\n\n    string_array = juce.StringArray([\"Apple\", \"orange\", \"banana\", \"apple\"])\n    string_array.sort(True)\n    assert len(string_array) == 4\n    assert string_array[0] == \"Apple\"\n    assert string_array[3] == \"orange\"\n\n    string_array = juce.StringArray([\"orange\", \"banana\", \"apple\", \"Apple\"])\n    string_array.sort(False)\n    assert len(string_array) == 4\n    assert string_array[0] == \"Apple\"\n    assert string_array[3] == \"orange\"\n\n#==================================================================================================\n\ndef test_sort_natural_method():\n    string_array = juce.StringArray([\"apple 10\", \"apple 2\", \"banana 1\", \"banana 10\"])\n    string_array.sortNatural()\n    assert len(string_array) == 4\n    assert string_array[0] == \"apple 2\"\n    assert string_array[3] == \"banana 10\"\n\n#==================================================================================================\n\ndef test_ensure_storage_allocated_method():\n    string_array = juce.StringArray()\n    string_array.ensureStorageAllocated(5)\n    assert len(string_array) == 0  # No change in size, only storage allocation\n\n#==================================================================================================\n\ndef test_minimise_storage_overheads_method():\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.ensureStorageAllocated(10)\n    string_array.minimiseStorageOverheads()\n    assert len(string_array) == 3  # No change in size, only reduced storage overhead\n\n#==================================================================================================\n\ndef test_from_tokens_method():\n    string_to_tokenise = \"apple banana orange\"\n    result = juce.StringArray.fromTokens(string_to_tokenise, preserveQuotedStrings=False)\n    assert len(result) == 3\n    assert result[0] == \"apple\"\n    assert result[2] == \"orange\"\n\n#==================================================================================================\n\ndef test_from_tokens_methodwith_break_character():\n    string_to_tokenise = \"apple, banana, orange\"\n    result = juce.StringArray.fromTokens(string_to_tokenise, \",\", \"\")\n    assert len(result) == 3\n    assert result[0] == \"apple\"\n    assert result[1] == \" banana\"\n    assert result[2] == \" orange\"\n\n    result = juce.StringArray.fromTokens(string_to_tokenise, \", \", \"\")\n    assert len(result) == 5\n    assert result[0] == \"apple\"\n    assert result[1] == \"\"\n    assert result[2] == \"banana\"\n    assert result[3] == \"\"\n    assert result[4] == \"orange\"\n\n#==================================================================================================\n\ndef test_from_tokens_method_with_quotes():\n    string_to_tokenise = 'apple \"banana and kiwi\" orange'\n    result = juce.StringArray.fromTokens(string_to_tokenise, preserveQuotedStrings=True)\n    assert len(result) == 3\n    assert result[0] == \"apple\"\n    assert result[1] == \"\\\"banana and kiwi\\\"\"\n    assert result[2] == \"orange\"\n\n#==================================================================================================\n\ndef test_from_lines_method():\n    result = juce.StringArray.fromLines(\"\")\n    assert len(result) == 0\n\n    result = juce.StringArray.fromLines(\"\\napple\\n\\nbanana\")\n    assert len(result) == 4\n    assert result[0] == \"\"\n    assert result[1] == \"apple\"\n    assert result[2] == \"\"\n    assert result[3] == \"banana\"\n\n    result = juce.StringArray.fromLines(\"apple\\nbanana\\norange\")\n    assert len(result) == 3\n    assert result[0] == \"apple\"\n    assert result[1] == \"banana\"\n    assert result[2] == \"orange\"\n\n#==================================================================================================\n\ndef test_clear_method():\n    string_array = juce.StringArray()\n    string_array.clear()\n    assert len(string_array) == 0\n\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.clear()\n    assert len(string_array) == 0\n\n#==================================================================================================\n\ndef test_clear_quick_method():\n    string_array = juce.StringArray()\n    string_array.clearQuick()\n    assert len(string_array) == 0\n\n    string_array = juce.StringArray([\"apple\", \"banana\", \"orange\"])\n    string_array.clearQuick()\n    assert len(string_array) == 0\n"
  },
  {
    "path": "tests/test_juce_core/test_StringPairArray.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor_empty():\n    array = juce.StringPairArray()\n    assert array.size() == 0\n    assert len(array) == 0\n\n#==================================================================================================\n\ndef test_string_pair_array_copy_constructor():\n    original = juce.StringPairArray()\n    original.set(\"key\", \"value\")\n    copy = juce.StringPairArray(original)\n    assert copy.size() == 1\n    assert copy[\"key\"] == \"value\"\n\n#==================================================================================================\n\ndef test_string_pair_array_assignment_operator():\n    original = juce.StringPairArray()\n    original.set(\"key\", \"value\")\n    copy = juce.StringPairArray()\n    copy = original\n    assert copy.size() == 1\n    assert copy[\"key\"] == \"value\"\n\n#==================================================================================================\n\ndef test_string_pair_array_equality_operator():\n    array1 = juce.StringPairArray()\n    array1.set(\"key\", \"value\")\n    array2 = juce.StringPairArray()\n    array2.set(\"key\", \"value\")\n    assert array1 == array2\n\n#==================================================================================================\n\ndef test_string_pair_array_inequality_operator():\n    array1 = juce.StringPairArray()\n    array1.set(\"key\", \"value\")\n    array2 = juce.StringPairArray()\n    array2.set(\"key\", \"value2\")\n    assert array1 != array2\n\n#==================================================================================================\n\ndef test_string_pair_array_get_value_with_default():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    assert array.getValue(\"key\", \"default\") == \"value\"\n    assert array.getValue(\"nonexistent\", \"default\") == \"default\"\n\n#==================================================================================================\n\ndef test_string_pair_array_contains_key():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    assert array.containsKey(\"key\")\n    assert not array.containsKey(\"nonexistent\")\n\n#==================================================================================================\n\ndef test_string_pair_array_get_all_keys():\n    array = juce.StringPairArray()\n    array.set(\"key1\", \"value1\")\n    array.set(\"key2\", \"value2\")\n    keys = array.getAllKeys()\n    assert \"key1\" in keys\n    assert \"key2\" in keys\n    assert len(keys) == 2\n\n#==================================================================================================\n\ndef test_string_pair_array_get_all_values():\n    array = juce.StringPairArray()\n    array.set(\"key1\", \"value1\")\n    array.set(\"key2\", \"value2\")\n    values = array.getAllValues()\n    assert \"value1\" in values\n    assert \"value2\" in values\n    assert len(values) == 2\n\n#==================================================================================================\n\ndef test_string_pair_array_set():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    assert array[\"key\"] == \"value\"\n\n#==================================================================================================\n\ndef test_string_pair_array_add_array():\n    array1 = juce.StringPairArray()\n    array1.set(\"key1\", \"value1\")\n    array2 = juce.StringPairArray()\n    array2.set(\"key2\", \"value2\")\n    array1.addArray(array2)\n    assert array1.size() == 2\n    assert array1[\"key2\"] == \"value2\"\n\n#==================================================================================================\n\ndef test_string_pair_array_clear():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    array.clear()\n    assert array.size() == 0\n\n#==================================================================================================\n\ndef test_string_pair_array_remove_by_key():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    array.remove(\"key\")\n    assert array.size() == 0\n\n#==================================================================================================\n\ndef test_string_pair_array_remove_by_index():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    array.remove(0)\n    assert array.size() == 0\n\n#==================================================================================================\n\ndef test_string_pair_array_set_ignores_case():\n    array = juce.StringPairArray(False)\n    array.set(\"KEY\", \"value\")\n    assert not array.containsKey(\"key\")\n    array.setIgnoresCase(True)\n    assert array.containsKey(\"key\")\n\n#==================================================================================================\n\ndef test_string_pair_array_get_ignores_case():\n    array = juce.StringPairArray(True)\n    assert array.getIgnoresCase()\n    array.setIgnoresCase(False)\n    assert not array.getIgnoresCase()\n\n#==================================================================================================\n\ndef test_string_pair_array_get_description():\n    array = juce.StringPairArray()\n    array.set(\"key\", \"value\")\n    description = array.getDescription()\n    assert \"key\" in description\n    assert \"value\" in description\n\n#==================================================================================================\n\ndef test_string_pair_array_minimise_storage_overheads():\n    array = juce.StringPairArray()\n    for i in range(100):\n        array.set(f\"key{i}\", f\"value{i}\")\n    for i in range(50):\n        array.remove(i)\n    array.minimiseStorageOverheads()\n    assert len(array) == 50\n\n#==================================================================================================\n\ndef test_string_pair_array_add_map():\n    array = juce.StringPairArray()\n    map_to_add = {\"key1\": \"value1\", \"key2\": \"value2\"}\n    array.addMap(map_to_add)\n    assert array.size() == 2\n    assert array[\"key1\"] == \"value1\"\n    assert array[\"key2\"] == \"value2\"\n\n#==================================================================================================\n\ndef test_string_pair_array_add_unordered_map():\n    array = juce.StringPairArray()\n    unordered_map_to_add = {\"key3\": \"value3\", \"key4\": \"value4\"}\n    array.addUnorderedMap(unordered_map_to_add)\n    assert array.size() == 2\n    assert array[\"key3\"] == \"value3\"\n    assert array[\"key4\"] == \"value4\"\n"
  },
  {
    "path": "tests/test_juce_core/test_SubregionStream.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_read_within_subregion():\n    # Setup: Create a memory stream and wrap it in a SubregionStream\n    source_data = b'This is a test stream'\n    source_stream = juce.MemoryInputStream(source_data, False)\n    subregion_stream = juce.SubregionStream(source_stream, 5, 9, False)\n\n    # Act: Read from the subregion stream\n    buffer = bytearray(9)\n    num_read = subregion_stream.read(buffer)\n\n    # Assert: Correct data read, and correct number of bytes read\n    assert num_read == 9\n    assert buffer[:num_read] == b'is a test'\n\n#==================================================================================================\n\ndef test_read_past_subregion_end():\n    # Setup: similar to above\n    source_data = b'This is a test stream'\n    source_stream = juce.MemoryInputStream(source_data, False)\n    subregion_stream = juce.SubregionStream(source_stream, 5, 9, False)\n\n    # Act: Attempt to read more data than the subregion contains\n    buffer = bytearray(15)  # larger than subregion size\n    num_read = subregion_stream.read(buffer)\n\n    # Assert: Only reads up to the end of the subregion\n    assert num_read == 9  # since the subregion is only 9 bytes long\n    assert buffer[:num_read] == b'is a test'\n\n#==================================================================================================\n\ndef test_seek_within_subregion():\n    # Setup: similar to above\n    source_data = b'This is a test stream'\n    source_stream = juce.MemoryInputStream(source_data, False)\n    subregion_stream = juce.SubregionStream(source_stream, 5, 15, False)\n\n    # Act: Seek to a position within the subregion and read\n    subregion_stream.setPosition(3)  # Seek to 'a test stream'\n    buffer = bytearray(4)\n    num_read = subregion_stream.read(buffer)\n\n    # Assert: Correct position and data read\n    assert num_read == 4\n    assert buffer[:num_read] == b'a te'\n\n#==================================================================================================\n\ndef test_seek_past_subregion_end():\n    # Setup: similar to above\n    source_data = b'This is a test stream'\n    source_stream = juce.MemoryInputStream(source_data, False)\n    subregion_stream = juce.SubregionStream(source_stream, 5, 11, False)\n\n    # Act: Seek past the end of the subregion\n    seek_result = subregion_stream.setPosition(100)  # Far past the subregion\n\n    assert seek_result # Assuming setPosition returns success status\n    assert subregion_stream.getPosition() == 16\n"
  },
  {
    "path": "tests/test_juce_core/test_TemporaryFile.py",
    "content": "import pytest\nimport os\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_create_temporary_file():\n    temp_file = juce.TemporaryFile(\".txt\")\n    assert not temp_file.getFile().existsAsFile()\n    assert not temp_file.getTargetFile().existsAsFile()\n\n#==================================================================================================\n\ndef test_write_to_temporary_file():\n    temp_file = juce.TemporaryFile(\".txt\")\n\n    temp_file.getFile().appendText(\"Hello, World!\", False)\n    assert temp_file.getFile().existsAsFile()\n\n    with open(temp_file.getFile().getFullPathName(), \"r\") as file:\n        assert file.read() == \"Hello, World!\"\n\n#==================================================================================================\n\ndef test_delete_temporary_file():\n    temp_file = juce.TemporaryFile(\".txt\")\n\n    temp_file.getFile().appendText(\"Hello, World!\", False)\n    assert temp_file.getFile().existsAsFile()\n    assert not temp_file.getTargetFile().existsAsFile()\n\n    assert temp_file.deleteTemporaryFile()\n    assert not temp_file.getFile().existsAsFile()\n    assert not temp_file.getTargetFile().existsAsFile()\n\n#==================================================================================================\n\ndef test_replace_target_file_with_temporary():\n    original_file_path = get_runtime_data_file(\"test_replace_target_file_with_temporary.txt\")\n    with open(original_file_path.getFullPathName(), \"w\") as file:\n        file.write(\"Old Content\")\n\n    temp_file = juce.TemporaryFile(original_file_path)\n\n    temp_file.getFile().appendText(\"New Content\", False)\n\n    with open(original_file_path.getFullPathName(), \"r\") as file:\n        assert file.read() == \"Old Content\"\n\n    assert temp_file.overwriteTargetFileWithTemporary()\n\n    with open(original_file_path.getFullPathName(), \"r\") as file:\n        assert file.read() == \"New Content\"\n\n#==================================================================================================\n\ndef test_replace_target_file_with_temporary_with():\n    original_file_path = get_runtime_data_file(\"test_replace_target_file_with_temporary.txt\")\n    with open(original_file_path.getFullPathName(), \"w\") as file:\n        file.write(\"Old Content\")\n\n    with juce.TemporaryFile(original_file_path) as temp_file:\n        temp_file.getFile().appendText(\"New Content\", False)\n\n        with open(original_file_path.getFullPathName(), \"r\") as file:\n            assert file.read() == \"Old Content\"\n\n    with open(original_file_path.getFullPathName(), \"r\") as file:\n        assert file.read() == \"New Content\"\n\n#==================================================================================================\n\ndef test_temporary_file_deletion_on_destruction():\n    temp_file = juce.TemporaryFile(\".txt\")\n    file_path = temp_file.getFile().getFullPathName()\n    del temp_file\n    assert not os.path.exists(file_path)\n\n#==================================================================================================\n\ndef test_fail_to_replace_nonexistent_target():\n    non_existent_path = get_runtime_data_file(\"test_fail_to_replace_nonexistent_target_src.txt\")\n    destination = get_runtime_data_file(\"test_fail_to_replace_nonexistent_target_dst.txt\")\n\n    temp_file = juce.TemporaryFile(destination, non_existent_path)\n    temp_file.getFile().appendText(\"Trying to replace a non-existent file\", False)\n\n    assert temp_file.overwriteTargetFileWithTemporary()\n"
  },
  {
    "path": "tests/test_juce_core/test_Thread.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass Thread(juce.Thread):\n    counter = 0\n    threadID = None\n\n    def run(self):\n        self.threadID = juce.Thread.getCurrentThreadId()\n\n        self.notify()\n\n        while not self.threadShouldExit():\n            self.counter += 1\n\n        assert juce.Thread.currentThreadShouldExit()\n\n        self.notify()\n\nclass ThreadListener(juce.Thread.Listener):\n    receivedSignal = False\n\n    def exitSignalSent(self):\n        self.receivedSignal = True\n\n#==================================================================================================\n\ndef test_construct_and_start_stop():\n    threadID = juce.Thread.getCurrentThreadId()\n    assert threadID == threadID\n\n    a = Thread(\"abc\")\n    assert a.getThreadName() == \"abc\"\n    assert not a.isThreadRunning()\n\n    listener = ThreadListener()\n    a.addListener(listener)\n\n    a.startThread()\n    assert not a.isRealtime()\n\n    if not a.wait(10000):\n        assert False\n\n    assert a.isThreadRunning()\n    assert a.threadID is not None and threadID != a.threadID\n    assert a.getThreadName() == \"abc\"\n\n    a.stopThread(10000)\n    assert not a.isThreadRunning()\n    assert a.counter > 0\n    assert listener.receivedSignal == True\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This fails, to be investigated\")\ndef test_construct_and_start_signal_stop():\n    a = Thread(\"abc\")\n    assert not a.isThreadRunning()\n\n    a.startRealtimeThread(juce.Thread.RealtimeOptions()\n        .withProcessingTimeMs(100)\n        .withPriority(juce.Thread.Priority.highest))\n\n    listener = ThreadListener()\n    a.addListener(listener)\n\n    if not a.wait(10000):\n        assert False\n\n    assert a.isThreadRunning()\n    assert a.isRealtime()\n\n    a.removeListener(listener)\n\n    a.signalThreadShouldExit()\n\n    if not a.waitForThreadToExit(10000):\n        assert False\n\n    assert not a.isThreadRunning()\n    assert a.counter > 0\n    assert listener.receivedSignal == False\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This deadlocks, most likely on the GIL\")\ndef test_launch():\n    launched = False\n    start_event = juce.WaitableEvent()\n    stop_event = juce.WaitableEvent()\n\n    def runThread():\n        nonlocal launched, start_event, stop_event\n\n        start_event.signal()\n        launched = True\n        stop_event.signal()\n\n    assert juce.Thread.launch(runThread)\n\n    start_event.wait()\n    stop_event.wait()\n\n    assert launched\n"
  },
  {
    "path": "tests/test_juce_core/test_ThreadPool.py",
    "content": "import os\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass ThreadPoolJob(juce.ThreadPoolJob):\n    runCount = 0\n    maxRuns = 1\n\n    def __init__(self, name, maxRuns):\n        super().__init__(name)\n        self.maxRuns = maxRuns\n\n    def runJob(self):\n        self.runCount += 1\n\n        if self.runCount >= self.maxRuns:\n            return juce.ThreadPoolJob.JobStatus.jobHasFinished\n        else:\n            return juce.ThreadPoolJob.JobStatus.jobNeedsRunningAgain\n\n#==================================================================================================\n\ndef test_default_constructor():\n    pool = juce.ThreadPool()\n    assert pool.getNumThreads() == os.cpu_count()\n\n#==================================================================================================\n\ndef test_threads_constructor():\n    pool = juce.ThreadPool(4)\n    assert pool.getNumThreads() == 4\n\n    job1 = ThreadPoolJob(\"abc\", 1)\n    pool.addJob(job1)\n\n    job2 = ThreadPoolJob(\"123\", 5)\n    pool.addJob(job2)\n\n    assert pool.getNamesOfAllJobs(False) == juce.StringArray([\"abc\", \"123\"])\n\n    pool.moveJobToFront(job2)\n    pool.moveJobToFront(job2)\n    pool.moveJobToFront(job1)\n    pool.removeAllJobs(False, 1000)\n\n    #assert job1.runCount == 1\n    #assert job2.runCount == 5\n"
  },
  {
    "path": "tests/test_juce_core/test_Time.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n\n#==================================================================================================\n\ndef test_construct_with_values():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n\n    assert time_obj.getYear() == 2022\n    assert time_obj.getMonth() == 1\n    assert time_obj.getDayOfMonth() == 19\n    assert time_obj.getHours() == 12\n    assert time_obj.getMinutes() == 30\n    assert time_obj.getSeconds() == 45\n\n#==================================================================================================\n\ndef test_get_current_time():\n    current_time = juce.Time.getCurrentTime()\n    assert isinstance(current_time, juce.Time)\n\n#==================================================================================================\n\ndef test_add_relative_time():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 0)\n    relative_time = juce.RelativeTime.seconds(10)\n\n    new_time = time_obj + relative_time\n\n    assert new_time.getSeconds() == 10\n\n#==================================================================================================\n\ndef test_subtract_relative_time():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 0)\n    relative_time = juce.RelativeTime.seconds(5)\n\n    new_time = time_obj - relative_time\n\n    assert new_time.getSeconds() == 55\n\n#==================================================================================================\n\ndef test_comparisons():\n    today = juce.Time(2022, 1, 19, 12, 30, 0)\n    tomorrow = juce.Time(2022, 1, 20, 11, 30, 0)\n\n    assert today == today\n    assert today <= today\n    assert today >= today\n    assert today != tomorrow\n    assert tomorrow != today\n    assert today < tomorrow\n    assert today <= tomorrow\n    assert tomorrow > today\n    assert tomorrow >= today\n\n#==================================================================================================\n\ndef test_to_milliseconds():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45, 0, False)\n\n    assert time_obj.toMilliseconds() == 1645273845000\n\n#==================================================================================================\n\ndef test_get_month_name():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n\n    month_name = time_obj.getMonthName(True)\n    assert month_name == \"Feb\"\n\n    month_name = time_obj.getMonthName(False)\n    assert month_name == \"February\"\n\n#==================================================================================================\n\ndef test_get_weekday_name():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n\n    weekday_name = time_obj.getWeekdayName(True)\n    assert weekday_name == \"Sat\"\n\n    weekday_name = time_obj.getWeekdayName(False)\n    assert weekday_name == \"Saturday\"\n\n#==================================================================================================\n\ndef test_set_system_time_to_this_time():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n    # time_obj.setSystemTimeToThisTime()\n\n#==================================================================================================\n\ndef test_to_string():\n    time_obj = juce.Time(2022, 1, 19, 14, 30, 45)\n\n    time_str = time_obj.toString(includeDate=False, includeTime=False)\n    assert time_str == \"\"\n\n    time_str = time_obj.toString(includeDate=False, includeTime=False, includeSeconds=False)\n    assert time_str == \"\"\n\n    time_str = time_obj.toString(includeDate=True, includeTime=False)\n    assert time_str == \"19 Feb 2022\"\n\n    time_str = time_obj.toString(includeDate=True, includeTime=True)\n    assert time_str == \"19 Feb 2022 2:30:45pm\"\n\n    time_str = time_obj.toString(includeDate=False, includeTime=True)\n    assert time_str == \"2:30:45pm\"\n\n    time_str = time_obj.toString(includeDate=False, includeTime=True, includeSeconds=False)\n    assert time_str == \"2:30pm\"\n\n    time_str = time_obj.toString(includeDate=False, includeTime=True, use24HourClock=True)\n    assert time_str == \"14:30:45\"\n\n    time_str = time_obj.toString(includeDate=False, includeTime=True, includeSeconds=False, use24HourClock=True)\n    assert time_str == \"14:30\"\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This produces wrong results because of the timezone\")\ndef test_from_iso8601():\n    time_obj = juce.Time.fromISO8601(\"2022-02-19T12:30:45.000+00:00\")\n    assert isinstance(time_obj, juce.Time)\n    assert juce.Time(2022, 1, 19, 12, 30, 45, False) == time_obj\n    assert time_obj.toISO8601(False) == \"20220219T123045.000+0000\"\n    assert time_obj.toISO8601(True) == \"2022-02-19T12:30:45.000+00:00\"\n\n    a = juce.Time.fromISO8601(\"2022-02-19T12:30:45.000+00:00\")\n    b = juce.Time.fromISO8601(a.toISO8601(True))\n    assert a == b\n\n#==================================================================================================\n\ndef test_compilation_date():\n    compilation_date = juce.Time.getCompilationDate()\n    assert isinstance(compilation_date, juce.Time)\n    assert compilation_date > juce.Time()\n\n#==================================================================================================\n\ndef test_utc_offset_seconds():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n\n    offset_seconds = time_obj.getUTCOffsetSeconds()\n    assert isinstance(offset_seconds, int)\n\n#==================================================================================================\n\ndef test_utc_offset_string():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n\n    offset_str = time_obj.getUTCOffsetString(True)\n    assert offset_str is not None\n    assert isinstance(offset_str, str)\n\n#==================================================================================================\n\ndef test_high_resolution_ticks():\n    ticks = juce.Time.getHighResolutionTicks()\n    assert isinstance(ticks, int)\n\n#==================================================================================================\n\ndef test_high_resolution_ticks_per_second():\n    ticks_per_second = juce.Time.getHighResolutionTicksPerSecond()\n    assert isinstance(ticks_per_second, int)\n\n#==================================================================================================\n\ndef test_high_resolution_ticks_to_seconds():\n    ticks = juce.Time.getHighResolutionTicks()\n    seconds = juce.Time.highResolutionTicksToSeconds(ticks)\n    assert isinstance(seconds, float)\n\n#==================================================================================================\n\ndef test_seconds_to_high_resolution_ticks():\n    seconds = 10.5\n    ticks = juce.Time.secondsToHighResolutionTicks(seconds)\n    assert isinstance(ticks, int)\n\n#==================================================================================================\n\ndef test_wait_for_millisecond_counter():\n    initial_counter = juce.Time.getMillisecondCounter()\n    target_counter = initial_counter + 100  # wait for 100ms\n\n    juce.Time.waitForMillisecondCounter(target_counter)\n\n    final_counter = juce.Time.getMillisecondCounter()\n    assert final_counter >= target_counter\n\n#==================================================================================================\n\ndef test_is_daylight_saving_time():\n    time_obj = juce.Time(2022, 7, 1, 12, 30, 45)\n    is_dst = time_obj.isDaylightSavingTime()\n    assert isinstance(is_dst, bool)\n\n#==================================================================================================\n\n# Ensure __repr__ and __str__ are equivalent to toISO8601\ndef test_representation_methods():\n    time_obj = juce.Time(2022, 1, 19, 12, 30, 45)\n    assert repr(time_obj).startswith(\"popsicle.Time('20220219T123045\")\n    assert str(time_obj) == time_obj.toISO8601(includeDividerCharacters=False)\n\n#==================================================================================================\n\ndef test_legacy_tests():\n    t = juce.Time.getCurrentTime()\n    assert t > juce.Time()\n\n    juce.Thread.sleep (15)\n    assert juce.Time.getCurrentTime() > t\n\n    assert t.getTimeZone() != \"\"\n    assert t.getUTCOffsetString(True)  == \"Z\" or len(t.getUTCOffsetString(True)) == 6\n    assert t.getUTCOffsetString(False) == \"Z\" or len(t.getUTCOffsetString(False)) == 5\n\n    assert juce.Time.fromISO8601(t.toISO8601(True)) == t\n    assert juce.Time.fromISO8601(t.toISO8601(False)) == t\n\n    assert juce.Time.fromISO8601(\"2016-02-16\") == juce.Time(2016, 1, 16, 0, 0, 0, 0, False)\n    assert juce.Time.fromISO8601(\"20160216Z\")  == juce.Time(2016, 1, 16, 0, 0, 0, 0, False)\n\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57+00:00\") == juce.Time(2016, 1, 16, 15, 3, 57, 0, False)\n    assert juce.Time.fromISO8601(\"20160216T150357+0000\")      == juce.Time(2016, 1, 16, 15, 3, 57, 0, False)\n\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57.999+00:00\") == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n    assert juce.Time.fromISO8601(\"20160216T150357.999+0000\")      == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57.999Z\")      == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57,999Z\")      == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n    assert juce.Time.fromISO8601(\"20160216T150357.999Z\")          == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n    assert juce.Time.fromISO8601(\"20160216T150357,999Z\")          == juce.Time(2016, 1, 16, 15, 3, 57, 999, False)\n\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57.999-02:30\") == juce.Time(2016, 1, 16, 17, 33, 57, 999, False)\n    assert juce.Time.fromISO8601(\"2016-02-16T15:03:57,999-02:30\") == juce.Time(2016, 1, 16, 17, 33, 57, 999, False)\n    assert juce.Time.fromISO8601(\"20160216T150357.999-0230\")      == juce.Time(2016, 1, 16, 17, 33, 57, 999, False)\n    assert juce.Time.fromISO8601(\"20160216T150357,999-0230\")      == juce.Time(2016, 1, 16, 17, 33, 57, 999, False)\n\n    assert juce.Time(1970,  0,  1,  0,  0,  0, 0, False) == juce.Time(0)\n    assert juce.Time(2106,  1,  7,  6, 28, 15, 0, False) == juce.Time(4294967295000)\n    assert juce.Time(2007, 10,  7,  1,  7, 20, 0, False) == juce.Time(1194397640000)\n    assert juce.Time(2038,  0, 19,  3, 14,  7, 0, False) == juce.Time(2147483647000)\n    assert juce.Time(2016,  2,  7, 11, 20,  8, 0, False) == juce.Time(1457349608000)\n    assert juce.Time(1969, 11, 31, 23, 59, 59, 0, False) == juce.Time(-1000)\n    assert juce.Time(1901, 11, 13, 20, 45, 53, 0, False) == juce.Time(-2147483647000)\n\n    assert juce.Time(1982, 1, 1, 12, 0, 0, 0, True) + juce.RelativeTime.days(365) == juce.Time(1983, 1, 1, 12, 0, 0, 0, True)\n    assert juce.Time(1970, 1, 1, 12, 0, 0, 0, True) + juce.RelativeTime.days(365) == juce.Time(1971, 1, 1, 12, 0, 0, 0, True)\n    assert juce.Time(2038, 1, 1, 12, 0, 0, 0, True) + juce.RelativeTime.days(365) == juce.Time(2039, 1, 1, 12, 0, 0, 0, True)\n\n    assert juce.Time(1982, 1, 1, 12, 0, 0, 0, False) + juce.RelativeTime.days(365) == juce.Time(1983, 1, 1, 12, 0, 0, 0, False)\n    assert juce.Time(1970, 1, 1, 12, 0, 0, 0, False) + juce.RelativeTime.days(365) == juce.Time(1971, 1, 1, 12, 0, 0, 0, False)\n    assert juce.Time(2038, 1, 1, 12, 0, 0, 0, False) + juce.RelativeTime.days(365) == juce.Time(2039, 1, 1, 12, 0, 0, 0, False)\n\n"
  },
  {
    "path": "tests/test_juce_core/test_URLInputSource.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_url_input_source_constructor():\n    url = juce.URL(\"https://github.com\")\n    input_source = juce.URLInputSource(url)\n    assert input_source is not None\n    assert input_source.hashCode() != 0\n\n#==================================================================================================\n\ndef test_create_stream():\n    url = juce.URL(\"https://github.com/kunitoki/popsicle\")\n    input_source = juce.URLInputSource(url)\n    stream = input_source.createInputStream()\n    assert stream is not None\n\n#==================================================================================================\n\ndef test_create_stream_with_post_data():\n    url = juce.URL(\"https://github.com\")\n    input_source = juce.URLInputSource(url)\n    stream = input_source.createInputStreamFor(\"kunitoki/popsicle\")\n    assert stream is not None\n"
  },
  {
    "path": "tests/test_juce_core/test_Uuid.py",
    "content": "import uuid\n\nimport popsicle as juce\n\n\n#==================================================================================================\n\ndef test_construct_empty():\n    a = juce.Uuid()\n    assert a != \"\"\n    assert not a.isNull()\n\n#==================================================================================================\n\ndef test_construct_null():\n    a = juce.Uuid.null()\n    assert a == \"\"\n    assert a.toString() == \"00000000000000000000000000000000\"\n    assert a.toDashedString() == \"00000000-0000-0000-0000-000000000000\"\n    assert a.isNull()\n\n#==================================================================================================\n\ndef test_constuct_string():\n    a = juce.Uuid(\"974cc888-0d9a-4d47-8930-913f682430cb\")\n    assert a.getRawData() == b\"\\227L\\310\\210\\r\\232MG\\2110\\221?h$0\\313\"\n\n#==================================================================================================\n\ndef test_constuct_bytes():\n    a = juce.Uuid(b\"\\227L\\310\\210\\r\\232MG\\2110\\221?h$0\\313\")\n    assert a.toString() == \"974cc8880d9a4d478930913f682430cb\"\n    assert a == \"974cc8880d9a4d478930913f682430cb\"\n    assert a.getTimeLow() == 2538391688\n    assert a.getTimeMid() == 3482\n    assert a.getTimeHighAndVersion() == 19783\n    assert a.getClockSeqAndReserved() == 137\n    assert a.getClockSeqLow() == 48\n    assert a.getNode() == 159701516169419\n    assert a.hash() == 17627754469088036242\n\n    b = juce.Uuid(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f')\n    assert b.toDashedString() == \"00010203-0405-0607-0809-0a0b0c0d0e0f\"\n    assert b == \"000102030405060708090a0b0c0d0e0f\"\n\n#==================================================================================================\n\ndef test_constuct_comparisons():\n    a = juce.Uuid(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f')\n    b = juce.Uuid(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x1f')\n    assert a == a\n    assert a != b\n    assert a < b\n    assert b > a\n    assert a <= b\n    assert b >= a\n\n#==================================================================================================\n\ndef test_constuct_uuid():\n    a = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')\n    b = juce.Uuid(a)\n    assert a.bytes == b.getRawData()\n\n#==================================================================================================\n\ndef test_repr():\n    a = juce.Uuid('{00010203-0405-0607-0809-0a0b0c0d0e0f}')\n    assert repr(a) == \"popsicle.Uuid('{00010203-0405-0607-0809-0a0b0c0d0e0f}')\"\n"
  },
  {
    "path": "tests/test_juce_core/test_WildcardFileFilter.py",
    "content": "import os\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_wildcard_file_filter_matches_correct_files():\n    filter = juce.WildcardFileFilter(\"*.txt\", \"\", \"description for text files\")\n    assert filter.isFileSuitable(juce.File(os.path.abspath(__file__)).getSiblingFile(\"example.txt\")) == True\n\n#==================================================================================================\n\ndef test_wildcard_file_filter_excludes_incorrect_files():\n    filter = juce.WildcardFileFilter(\"*.txt\", \"\", \"description for text files\")\n    assert filter.isFileSuitable(juce.File(os.path.abspath(__file__)).getSiblingFile(\"example.jpg\")) == False\n\n#==================================================================================================\n\ndef test_wildcard_file_filter_with_multiple_patterns():\n    filter = juce.WildcardFileFilter(\"*.txt;*.jpg\", \"\", \"description for text and image files\")\n    assert filter.isFileSuitable(juce.File(os.path.abspath(__file__)).getSiblingFile(\"example.txt\")) == True\n    assert filter.isFileSuitable(juce.File(os.path.abspath(__file__)).getSiblingFile(\"example.jpg\")) == True\n    assert filter.isFileSuitable(juce.File(os.path.abspath(__file__)).getSiblingFile(\"example.pdf\")) == False\n"
  },
  {
    "path": "tests/test_juce_core/test_XmlDocument.py",
    "content": "import os\nimport pytest\n\nimport popsicle as juce\n\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\n\n@pytest.fixture\ndef xml_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"test.xml\"))\n\n@pytest.fixture\ndef broken_xml_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"test_broken.xml\"))\n\n#==================================================================================================\n\ndef test_construct_file(xml_file, broken_xml_file):\n    a = juce.XmlDocument(broken_xml_file)\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is None\n    assert a.getLastParseError()\n\n    a = juce.XmlDocument(xml_file.getParentDirectory().getChildFile(\"noexistent.xml\"))\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is None\n    assert a.getLastParseError()\n\n    a = juce.XmlDocument(xml_file)\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is not None\n    assert not a.getLastParseError()\n\n    assert a.getDocumentElementIfTagMatches(\"root\") is not None\n    assert a.getDocumentElementIfTagMatches(\"nonexistent\") is None\n\n#==================================================================================================\n\ndef test_construct_string(xml_file, broken_xml_file):\n    a = juce.XmlDocument(\"\")\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is None\n    assert a.getLastParseError()\n\n    a = juce.XmlDocument(broken_xml_file.loadFileAsString())\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is None\n    assert a.getLastParseError()\n\n    a = juce.XmlDocument(xml_file.loadFileAsString())\n    assert not a.getLastParseError()\n    el = a.getDocumentElement()\n    assert el is not None\n    assert not a.getLastParseError()\n\n    assert a.getDocumentElementIfTagMatches(\"root\") is not None\n    assert a.getDocumentElementIfTagMatches(\"nonexistent\") is None\n\n#==================================================================================================\n\ndef test_construct_parse_file(xml_file, broken_xml_file):\n    el = juce.XmlDocument.parse(broken_xml_file)\n    assert el is None\n\n    el = juce.XmlDocument.parse(xml_file.getParentDirectory().getChildFile(\"noexistent.xml\"))\n    assert el is None\n\n    el = juce.XmlDocument.parse(xml_file)\n    assert el is not None\n    assert el.getTagName() == \"root\"\n\n#==================================================================================================\n\ndef test_construct_parse_string(xml_file, broken_xml_file):\n    el = juce.XmlDocument.parse(\"\")\n    assert el is None\n\n    el = juce.XmlDocument.parse(broken_xml_file.loadFileAsString())\n    assert el is None\n\n    el = juce.XmlDocument.parse(xml_file.loadFileAsString())\n    assert el is not None\n    assert el.getTagName() == \"root\"\n"
  },
  {
    "path": "tests/test_juce_core/test_XmlElement.py",
    "content": "import os\nimport sys\nimport pytest\n\nfrom ..utilities import get_runtime_data_folder\nimport popsicle as juce\n\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\n\n@pytest.fixture\ndef xml_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"test.xml\"))\n\n@pytest.fixture\ndef broken_xml_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"test_broken.xml\"))\n\n#==================================================================================================\n\ndef test_construct_tag():\n    a = juce.XmlElement(\"root\")\n    assert a.getTagName() == \"root\"\n\n#==================================================================================================\n\ndef test_to_string_text_format():\n    a = juce.XmlElement(\"root\")\n    assert a.toString() == \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\r\\n\\r\\n<root/>\\r\\n\"\"\"\n\n    t1 = juce.XmlElement.TextFormat()\n    t1.addDefaultHeader = False\n    assert a.toString(t1) == \"\"\"<root/>\\r\\n\"\"\"\n\n    t2 = juce.XmlElement.TextFormat()\n    t2.newLineChars = None\n    assert a.toString(t2) == \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?> <root/>\"\"\"\n\n    t3 = juce.XmlElement.TextFormat()\n    t3.customEncoding = \"ISO-8859-1\"\n    assert a.toString(t3) == \"\"\"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\\r\\n\\r\\n<root/>\\r\\n\"\"\"\n\n    t4 = juce.XmlElement.TextFormat().singleLine()\n    t4.addDefaultHeader = False\n    assert a.toString(t4) == \"\"\"<root/>\"\"\"\n\n    t5 = juce.XmlElement.TextFormat().singleLine()\n    t5.dtd = \"\"\"<!DOCTYPE root SYSTEM \"root.dtd\">\"\"\"\n    assert a.toString(t5) == \"\"\"<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE root SYSTEM \"root.dtd\"> <root/>\"\"\"\n\n#==================================================================================================\n\ndef test_tag_name_with_namespace():\n    a = juce.XmlElement(\"popsicle:root\")\n    assert a.hasTagName(\"popsicle:root\") == True\n    assert a.getTagName() == \"popsicle:root\"\n\n    assert a.getNamespace() == \"popsicle\"\n    assert a.hasTagNameIgnoringNamespace(\"root\") == True\n    assert a.getTagNameWithoutNamespace() == \"root\"\n\n    a.setTagName(\"other\")\n    assert a.hasTagName(\"popsicle:root\") == False\n    assert a.hasTagName(\"other\") == True\n    assert a.getTagName() == \"other\"\n\n    assert a.getNamespace() == \"other\"\n    assert a.hasTagNameIgnoringNamespace(\"root\") == False\n    assert a.hasTagNameIgnoringNamespace(\"other\") == True\n    assert a.getTagNameWithoutNamespace() == \"other\"\n\n#==================================================================================================\n\n@pytest.mark.parametrize(\"name_type\", (juce.Identifier, str))\ndef test_attributes(name_type):\n    a = juce.XmlElement(\"root\")\n    assert a.getNumAttributes() == 0\n\n    a.setAttribute(name_type(\"test1\"), \"123\")\n    assert a.getNumAttributes() == 1\n    assert a.hasAttribute(\"test1\") == True\n    assert a.hasAttribute(\"noexistent\") == False\n    assert a.getAttributeName(0) == \"test1\"\n    assert a.getAttributeValue(0) == \"123\"\n    assert a.getStringAttribute(\"test1\") == \"123\"\n    assert a.getStringAttribute(\"test_x\") == \"\"\n    assert a.getStringAttribute(\"test_x\", \"xxx\") == \"xxx\"\n\n    a.setAttribute(name_type(\"test2\"), 1)\n    assert a.getNumAttributes() == 2\n    assert a.hasAttribute(\"test2\") == True\n    assert a.hasAttribute(\"noexistent\") == False\n    assert a.getAttributeName(1) == \"test2\"\n    assert a.getAttributeValue(1) == \"1\"\n    assert a.getIntAttribute(\"test2\") == 1\n    assert a.getIntAttribute(\"test_x\") == 0\n    assert a.getIntAttribute(\"test_x\", 42) == 42\n\n    a.setAttribute(name_type(\"test3\"), 1.111111)\n    assert a.getNumAttributes() == 3\n    assert a.hasAttribute(\"test3\") == True\n    assert a.hasAttribute(\"noexistent\") == False\n    assert a.getAttributeName(2) == \"test3\"\n    assert a.getAttributeValue(2) == \"1.111111\"\n    assert a.getDoubleAttribute(\"test3\") == pytest.approx(1.111111)\n    assert a.getDoubleAttribute(\"test_x\") == pytest.approx(0.0)\n    assert a.getDoubleAttribute(\"test_x\", 9.999999) == pytest.approx(9.999999)\n\n    a.setAttribute(name_type(\"test4\"), True)\n    assert a.getNumAttributes() == 4\n    assert a.hasAttribute(\"test4\") == True\n    assert a.hasAttribute(\"noexistent\") == False\n    assert a.getAttributeName(3) == \"test4\"\n    assert a.getAttributeValue(3) == \"1\"\n    assert a.getBoolAttribute(\"test4\") == True\n    assert a.getBoolAttribute(\"test_x\") == False\n    assert a.getBoolAttribute(\"test_x\", True) == True\n\n    a.removeAttribute(name_type(\"nonexisting\"))\n    assert a.getNumAttributes() == 4\n\n    a.removeAttribute(name_type(\"test4\"))\n    assert a.getNumAttributes() == 3\n\n    a.removeAllAttributes()\n    assert a.getNumAttributes() == 0\n\n#==================================================================================================\n\ndef test_compare_attributes():\n    a = juce.XmlElement(\"root\")\n\n    a.setAttribute(\"test1\", \"123\")\n    a.setAttribute(\"test2\", \"abcdef\")\n\n    assert a.compareAttribute(\"test1\", \"123\")\n    assert not a.compareAttribute(\"test1\", \"abcdef\")\n\n    assert a.compareAttribute(\"test2\", \"abcdef\")\n    assert not a.compareAttribute(\"test2\", \"ABCDEF\")\n    assert a.compareAttribute(\"test2\", \"ABCDEF\", True)\n\n    assert not a.compareAttribute(\"nonexistent\", \"abc\", True)\n    assert not a.compareAttribute(\"nonexistent\", \"ABC\", False)\n\n#==================================================================================================\n\ndef test_child_elements():\n    a = juce.XmlElement(\"root\")\n\n    a.addChildElement(juce.XmlElement(\"child\"))\n    a.addChildElement(juce.XmlElement(\"child\"))\n    assert a.getNumChildElements() == 2\n\n#==================================================================================================\n\ndef test_text_element():\n    a = juce.XmlElement(\"root\")\n    assert not a.isTextElement()\n\n    a.addChildElement(juce.XmlElement.createTextElement(\"abcdefghijklmnopqrstuvwxyz\"))\n\n    child = a.getChildElement(0)\n    assert child.getTagName() == \"\"\n    assert child.isTextElement()\n    assert child.getText() == \"abcdefghijklmnopqrstuvwxyz\"\n    assert child.getAllSubText() == \"abcdefghijklmnopqrstuvwxyz\"\n    assert a.getAllSubText() == \"abcdefghijklmnopqrstuvwxyz\"\n\n    format = juce.XmlElement.TextFormat().singleLine().withoutHeader()\n    assert a.toString(format) == \"\"\"<root>abcdefghijklmnopqrstuvwxyz</root>\"\"\"\n\n    child.setTagName(\"child\")\n    assert a.toString(format) == \"\"\"<root><child text=\"abcdefghijklmnopqrstuvwxyz\"/></root>\"\"\"\n    assert a.getAllSubText() == \"\"\n    assert child.getAllSubText() == \"\"\n\n#==================================================================================================\n\ndef test_child_elements_manipulation():\n    parent = juce.XmlElement(\"PARENT\")\n    child1 = juce.XmlElement(\"CHILD1\")\n    child2 = juce.XmlElement(\"CHILD2\")\n\n    parent.addChildElement(child1)\n    parent.prependChildElement(child2)\n\n    assert parent.getNumChildElements() == 2\n    assert parent.getFirstChildElement().getTagName() == \"CHILD2\"\n\n    parent.removeChildElement(child1, True)\n    assert parent.getNumChildElements() == 1\n    parent.deleteAllChildElements()\n    assert parent.getNumChildElements() == 0\n\n#==================================================================================================\n\ndef test_invalid_xml_name():\n    assert not juce.XmlElement.isValidXmlName(\"1InvalidName\")\n\n#==================================================================================================\n\ndef test_namespace_handling():\n    elem = juce.XmlElement(\"ns:ANIMAL\")\n    assert elem.getTagName() == \"ns:ANIMAL\"\n    assert elem.getNamespace() == \"ns\"\n    assert elem.getTagNameWithoutNamespace() == \"ANIMAL\"\n    assert elem.hasTagName(\"ns:ANIMAL\")\n    assert elem.hasTagNameIgnoringNamespace(\"ANIMAL\")\n\n#==================================================================================================\n\ndef test_deeply_nested_elements():\n    root = juce.XmlElement(\"root\")\n    level1 = root.createNewChildElement(\"level1\")\n    level2 = level1.createNewChildElement(\"level2\")\n    level3 = level2.createNewChildElement(\"level3\")\n\n    assert root.findParentElementOf(level3) is level2\n    assert root.getNumChildElements() == 1\n    assert root.getFirstChildElement().getFirstChildElement().getTagName() == \"level2\"\n\n#==================================================================================================\n\ndef test_sorting_child_elements():\n    root = juce.XmlElement(\"root\")\n    for name in [\"banana\", \"apple\", \"cherry\"]:\n        child = root.createNewChildElement(\"item\")\n        child.setAttribute(\"name\", name)\n\n    class Comparator(juce.XmlElement.Comparator):\n        def compareElements(self, a, b):\n            x = a.getStringAttribute(\"name\")\n            y = b.getStringAttribute(\"name\")\n            if x == y: return 0\n            elif x < y: return -1\n            else: return 1\n\n    root.sortChildElements(Comparator())\n\n    names = [child.getStringAttribute(\"name\") for child in root.getChildIterator()]\n    assert names == [\"apple\", \"banana\", \"cherry\"]\n\n#==================================================================================================\n\ndef test_sorting_child_elements_lambda():\n    root = juce.XmlElement(\"root\")\n    for name in [\"banana\", \"apple\", \"cherry\"]:\n        child = root.createNewChildElement(\"item\")\n        child.setAttribute(\"name\", name)\n\n    def strncmp(a, b):\n        if a == b: return 0\n        elif a < b: return -1\n        else: return 1\n\n    root.sortChildElements(lambda x, y: strncmp(x.getStringAttribute(\"name\"), y.getStringAttribute(\"name\")))\n\n    names = [child.getStringAttribute(\"name\") for child in root.getChildIterator()]\n    assert names == [\"apple\", \"banana\", \"cherry\"]\n\n#==================================================================================================\n\ndef test_complex_xml_structure_to_string():\n    root = juce.XmlElement(\"menu\")\n    item = root.createNewChildElement(\"item\")\n    item.setAttribute(\"name\", \"coffee\")\n    item.setAttribute(\"price\", \"$1\")\n    item.addTextElement(\"Hot and invigorating\")\n\n    xml_string = root.toString()\n    assert \"<menu>\" in xml_string\n    assert \"<item name=\\\"coffee\\\" price=\\\"$1\\\">\" in xml_string\n    assert \"Hot and invigorating\" in xml_string\n    assert \"</item>\" in xml_string\n    assert \"</menu>\" in xml_string\n\n#==================================================================================================\n\ndef test_attribute_value_comparisons():\n    elem = juce.XmlElement(\"item\")\n    elem.setAttribute(\"available\", \"true\")\n    assert elem.compareAttribute(\"available\", \"true\")\n    assert not elem.compareAttribute(\"available\", \"false\")\n    assert elem.getBoolAttribute(\"available\")\n\n#==================================================================================================\n\ndef test_handling_invalid_characters_in_text_elements():\n    elem = juce.XmlElement(\"text\")\n    elem.addTextElement(\"Invalid character: \\u0000\")\n    assert elem.getChildElement(0).getAllSubText() == \"Invalid character: \"\n\n#==================================================================================================\n\ndef test_write_to_file():\n    elem = juce.XmlElement(\"note\")\n    elem.addTextElement(\"This is a note\")\n\n    temp_file = get_runtime_data_folder().getChildFile(\"test_write_to_file.xml\")\n    assert elem.writeTo(temp_file)\n\n    with open(temp_file.getFullPathName(), \"r\") as file:\n        content = file.read()\n    assert \"note\" in content\n    assert \"This is a note\" in content\n\n#==================================================================================================\n\ndef test_write_to_stream():\n    elem = juce.XmlElement(\"note\")\n    elem.addTextElement(\"This is a note\")\n\n    temp_file = get_runtime_data_folder().getChildFile(\"test_write_to_stream.xml\")\n    elem.writeTo(temp_file.createOutputStream())\n\n    with open(temp_file.getFullPathName(), \"r\") as file:\n        content = file.read()\n\n    assert \"note\" in content\n    assert \"This is a note\" in content\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform == \"win32\", reason=\"On windows this randomly fails for some reason, investigate\")\ndef test_read_from_file():\n    temp_file = get_runtime_data_folder().getChildFile(\"test_read_from_file.xml\")\n    with open(temp_file.getFullPathName(), \"w\") as file:\n        file.write(\"<note><to>User</to><message>Hello, World!</message></note>\")\n\n    root = juce.XmlDocument.parse(temp_file)\n    assert root.getTagName() == \"note\"\n    assert root.getNumChildElements() == 2\n    assert root.getChildElement(0) is not None\n    assert root.getChildElement(0).getAllSubText() == \"User\"\n    assert root.getChildElement(1) is not None\n    assert root.getChildElement(1).getAllSubText() == \"Hello, World!\"\n"
  },
  {
    "path": "tests/test_juce_core/test_ZipFile.py",
    "content": "import pytest\nimport os\nimport sys\n\nimport popsicle as juce\n\nfrom ..utilities import get_runtime_data_folder\n\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\n\n@pytest.fixture\ndef zip_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"archive.zip\"))\n\n@pytest.fixture\ndef text_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"somefile.txt\"))\n\n@pytest.fixture\ndef image_file():\n    yield juce.File(this_file.getSiblingFile(\"data\").getChildFile(\"pysound.jpg\"))\n\n#==================================================================================================\n\ndef test_constructor_with_file(zip_file):\n    z = juce.ZipFile(zip_file)\n    assert z.getNumEntries() == 2\n\n#==================================================================================================\n\ndef test_constructor_with_nonexisting_file():\n    z = juce.ZipFile(this_file.getChildFile(\"nonexisting.zip\"))\n    assert z.getNumEntries() == 0\n\n#==================================================================================================\n\ndef test_constructor_with_input_stream(zip_file):\n    with open(zip_file.getFullPathName(), \"rb\") as file:\n        mb = juce.MemoryBlock(file.read())\n        input_stream = juce.MemoryInputStream(mb, False)\n        zip_file = juce.ZipFile(input_stream)\n        assert zip_file.getNumEntries() == 2\n\n#==================================================================================================\n\ndef test_constructor_with_input_source(zip_file):\n    input_source = juce.FileInputSource(zip_file, False)\n    zip_file = juce.ZipFile(input_source)\n    assert zip_file.getNumEntries() == 2\n\n#==================================================================================================\n\ndef test_get_entry_by_index(zip_file):\n    zip_file = juce.ZipFile(zip_file)\n\n    entry = zip_file.getEntry(0)\n    assert entry.filename == \"somefile.txt\"\n    assert entry.isSymbolicLink == False\n    assert entry.externalFileAttributes == 2175008768\n    assert entry.uncompressedSize == 886\n    #assert entry.fileTime == juce.Time.fromISO8601(\"20240209T183446.000+0100\")\n    assert entry.fileTime > juce.Time()\n\n    entry = zip_file.getEntry(1)\n    assert entry.filename == \"pysound.jpg\"\n    assert entry.isSymbolicLink == False\n    assert entry.externalFileAttributes == 2175008768\n    assert entry.uncompressedSize == 172506\n    #assert entry.fileTime == juce.Time.fromISO8601(\"20240215T083304.000+0100\")\n    assert entry.fileTime > juce.Time()\n\n#==================================================================================================\n\ndef test_get_index_of_file_name(zip_file):\n    zip_file = juce.ZipFile(zip_file)\n    index = zip_file.getIndexOfFileName(\"test_file.txt\")\n    assert index == -1\n    index = zip_file.getIndexOfFileName(\"somefile.txt\")\n    assert index == 0\n    index = zip_file.getIndexOfFileName(\"SOMEFILE.txt\")\n    assert index == -1\n    index = zip_file.getIndexOfFileName(\"SOMEFILE.txt\", True)\n    assert index == 0\n\n#==================================================================================================\n\ndef test_get_entry_by_file_name(zip_file):\n    zip_file = juce.ZipFile(zip_file)\n    entry = zip_file.getEntry(\"somefile.txt\")\n    assert entry.filename == \"somefile.txt\"\n    assert entry.isSymbolicLink == False\n    assert entry.externalFileAttributes == 2175008768\n    assert entry.uncompressedSize == 886\n    #assert entry.fileTime == juce.Time.fromISO8601(\"20240209T183446.000+0100\")\n    assert entry.fileTime > juce.Time()\n\n#==================================================================================================\n\ndef test_sort_entries_by_filename(zip_file):\n    zip_file = juce.ZipFile(zip_file)\n    assert zip_file.getEntry(0).filename == \"somefile.txt\"\n    assert zip_file.getEntry(1).filename == \"pysound.jpg\"\n\n    zip_file.sortEntriesByFilename()\n    assert zip_file.getEntry(0).filename == \"pysound.jpg\"\n    assert zip_file.getEntry(1).filename == \"somefile.txt\"\n\n#==================================================================================================\n\ndef test_create_stream_for_entry_by_index(zip_file):\n    zip_file = juce.ZipFile(zip_file)\n    stream = zip_file.createStreamForEntry(0)\n    assert stream is not None\n\n#==================================================================================================\n\ndef test_create_stream_for_entry_by_entry(zip_file, text_file):\n    zip_file = juce.ZipFile(zip_file)\n    stream = zip_file.createStreamForEntry(zip_file.getEntry(0))\n    assert stream is not None\n    assert stream.readEntireStreamAsString() == text_file.loadFileAsString()\n\n#==================================================================================================\n\ndef test_uncompress_to(zip_file, text_file, image_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_to\")\n    target_dir.createDirectory()\n\n    target_file1 = target_dir.getChildFile(\"somefile.txt\")\n    target_file2 = target_dir.getChildFile(\"pysound.jpg\")\n\n    z = juce.ZipFile(zip_file)\n\n    result = z.uncompressTo(target_dir)\n    assert result.wasOk()\n    assert target_file1.existsAsFile()\n    assert target_file2.existsAsFile()\n\n    target_file1.replaceWithText(\"1234567890\")\n    target_file2.replaceWithData(b\"\\x00\\x00\")\n\n    result = z.uncompressTo(target_dir, True)\n    assert result.wasOk()\n\n    assert target_file1.loadFileAsString() == text_file.loadFileAsString()\n\n    mb1 = juce.MemoryBlock()\n    mb2 = juce.MemoryBlock()\n    assert target_file2.loadFileAsData(mb1)\n    assert image_file.loadFileAsData(mb2)\n    assert mb1.getData().tobytes() == mb2.getData().tobytes()\n\n#==================================================================================================\n\ndef test_uncompress_to_not_overwrite(zip_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_to_not_overwrite\")\n    target_dir.createDirectory()\n\n    target_file1 = target_dir.getChildFile(\"somefile.txt\")\n    target_file2 = target_dir.getChildFile(\"pysound.jpg\")\n\n    z = juce.ZipFile(zip_file)\n\n    result = z.uncompressTo(target_dir)\n    assert result.wasOk()\n    assert target_file1.existsAsFile()\n    assert target_file2.existsAsFile()\n\n    target_file1.replaceWithText(\"1234567890\")\n    target_file2.replaceWithData(b\"\\x00\\x00\")\n\n    result = z.uncompressTo(target_dir, False)\n    assert result.wasOk()\n\n    assert target_file1.loadFileAsString() == \"1234567890\"\n\n    mb = juce.MemoryBlock()\n    assert target_file2.loadFileAsData(mb)\n    assert mb.getData().tobytes() == b\"\\x00\\x00\"\n\n#==================================================================================================\n\ndef test_uncompress_to_nonexistent(zip_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_to_nonexistent\")\n\n    result = juce.ZipFile(zip_file).uncompressTo(target_dir)\n    assert result.wasOk()\n    assert target_dir.isDirectory()\n    assert target_dir.getChildFile(\"somefile.txt\").existsAsFile()\n    assert target_dir.getChildFile(\"pysound.jpg\").existsAsFile()\n\n#==================================================================================================\n\ndef test_uncompress_entry(zip_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_entry\")\n    target_dir.createDirectory()\n\n    result = juce.ZipFile(zip_file).uncompressEntry(0, target_dir)\n    assert result.wasOk()\n    assert target_dir.getChildFile(\"somefile.txt\").existsAsFile()\n    assert not target_dir.getChildFile(\"pysound.jpg\").existsAsFile()\n\n#==================================================================================================\n\ndef test_uncompress_entry_with_overwrite_bool_false(zip_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_entry_with_overwrite_bool_false\")\n    target_dir.createDirectory()\n\n    target_file = target_dir.getChildFile(\"somefile.txt\")\n\n    z = juce.ZipFile(zip_file)\n    result = z.uncompressEntry(0, target_dir, shouldOverwriteFiles=True)\n    assert result.wasOk()\n    assert target_file.existsAsFile()\n\n    target_file.replaceWithText(\"1234567890\")\n\n    result = z.uncompressEntry(0, target_dir, shouldOverwriteFiles=False)\n    assert result.wasOk()\n    assert target_file.loadFileAsString() == \"1234567890\"\n\n#==================================================================================================\n\ndef test_uncompress_entry_with_overwrite_bool_true(zip_file, text_file):\n    target_dir = get_runtime_data_folder().getChildFile(\"test_uncompress_entry_with_overwrite_bool_true\")\n    target_dir.createDirectory()\n\n    target_file = target_dir.getChildFile(\"somefile.txt\")\n\n    z = juce.ZipFile(zip_file)\n    result = z.uncompressEntry(0, target_dir, shouldOverwriteFiles=False)\n    assert result.wasOk()\n    assert target_file.existsAsFile()\n\n    target_file.replaceWithText(\"1234567890\")\n\n    result = z.uncompressEntry(0, target_dir, shouldOverwriteFiles=True)\n    assert result.wasOk()\n\n    assert target_file.loadFileAsString() == text_file.loadFileAsString()\n\n#==================================================================================================\n\ndef test_builder_add_file(text_file):\n    output = get_runtime_data_folder().getChildFile(\"test_builder_add_file.zip\")\n\n    for level in range(0, 9):\n        builder = juce.ZipFile.Builder()\n        builder.addFile(text_file, level)\n        assert builder.writeToStream(output.createOutputStream())\n        assert output.existsAsFile()\n\n        z = juce.ZipFile(output)\n        assert z.getNumEntries() == 1\n        assert z.getEntry(0).filename == text_file.getFileName()\n\n        output.deleteFile()\n\n#==================================================================================================\n\ndef test_builder_add_stream_entry(text_file):\n    output = get_runtime_data_folder().getChildFile(\"test_builder_add_stream_entry.zip\")\n\n    for level in range(0, 9):\n        builder = juce.ZipFile.Builder()\n        input_stream = juce.FileInputStream(text_file)\n        builder.addEntry(input_stream, level, text_file.getFileName(), juce.Time.getCurrentTime())\n        assert builder.writeToStream(output.createOutputStream())\n        assert output.existsAsFile()\n\n        z = juce.ZipFile(output)\n        assert z.getNumEntries() == 1\n        assert z.getEntry(0).filename == text_file.getFileName()\n        assert z.getEntry(0).fileTime > juce.Time()\n\n        output.deleteFile()\n"
  },
  {
    "path": "tests/test_juce_data_structures/__init__.py",
    "content": "import pytest\n\nfrom .. import common\n\nimport popsicle as juce\n\nif not hasattr(juce, \"ValueTree\"):\n    pytest.skip(allow_module_level=True)\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_CachedValue.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor_raises():\n    with pytest.raises(Exception):\n        cv = juce.CachedValue[int](None, \"testBool\", None)\n\n    with pytest.raises(Exception):\n        cv = juce.CachedValue[int](None, \"testBool\", None, 1)\n\n    with pytest.raises(Exception):\n        tree = juce.ValueTree(\"Settings\")\n        cv = juce.CachedValue[int](tree, None, None)\n\n    with pytest.raises(Exception):\n        tree = juce.ValueTree(\"Settings\")\n        cv = juce.CachedValue[int](tree, None, None, 1)\n\n#==================================================================================================\n\ndef test_construct_with_valuetree_property():\n    tree = juce.ValueTree(\"Settings\")\n    tree.setProperty(\"testBool\", True, None)\n\n    cv = juce.CachedValue[bool](tree, \"testBool\", None)\n    assert cv.get() == True\n\n#==================================================================================================\n\ndef test_construct_with_default_value():\n    tree = juce.ValueTree(\"Settings\")\n\n    cv = juce.CachedValue[int](tree, \"testInt\", None, 42)\n    assert cv.getPropertyID() == \"testInt\"\n    assert cv.getDefault() == 42\n    assert cv.get() == 42\n\n#==================================================================================================\n\ndef test_get_and_set_value():\n    tree = juce.ValueTree(\"Settings\")\n\n    cv = juce.CachedValue[float](tree, \"testFloat\", None, 3.14)\n    assert cv.get() == pytest.approx(3.14)\n\n    cv.setValue(2.71, None)\n    assert cv.get() == pytest.approx(2.71)\n\n#==================================================================================================\n\ndef test_get_property_as_value():\n    tree = juce.ValueTree(\"Settings\")\n    tree.setProperty(\"testFloat\", 2.71, None)\n\n    cv = juce.CachedValue[float](tree, \"testFloat\", None)\n    propValue = cv.getPropertyAsValue()\n    assert isinstance(propValue, juce.Value)\n    assert propValue.getValue() == pytest.approx(2.71)\n\n#==================================================================================================\n\ndef test_reset_to_default():\n    tree = juce.ValueTree(\"Settings\")\n    cv = juce.CachedValue[str](tree, \"xxx\", None, \"default\")\n\n    cv.setValue(\"changed\", None)\n    assert cv.get() == \"changed\"\n\n    cv.resetToDefault()\n    assert cv.get() == \"default\"\n\n#==================================================================================================\n\ndef test_comparison_operators():\n    tree = juce.ValueTree(\"Settings\")\n\n    cv = juce.CachedValue[int](tree, \"abc\", None, 10)\n    assert (cv.get() == 10)\n    assert not (cv.get() == 9)\n    assert (cv.get() != 9)\n    assert not (cv.get() != 10)\n\n    cv2 = juce.CachedValue[int](tree, \"def\", None, 11)\n    cv3 = juce.CachedValue[int](tree, \"ghi\", None, 10)\n    assert (cv == cv3)\n    assert not (cv == cv2)\n    assert (cv != cv2)\n    assert not (cv != cv3)\n\n#==================================================================================================\n\ndef test_refer_to_raises():\n    with pytest.raises(Exception):\n        cv = juce.CachedValue[str]()\n        cv.referTo(None, \"testBool\", None)\n\n    with pytest.raises(Exception):\n        cv = juce.CachedValue[str]()\n        cv.referTo(None, \"testBool\", None, \"1\")\n\n    with pytest.raises(Exception):\n        tree = juce.ValueTree(\"Settings\")\n        cv = juce.CachedValue[str]()\n        cv.referTo(tree, None, None)\n\n    with pytest.raises(Exception):\n        tree = juce.ValueTree(\"Settings\")\n        cv = juce.CachedValue[str]()\n        cv.referTo(tree, None, None, \"1\")\n\n#==================================================================================================\n\ndef test_refer_to_and_valuetree_changes():\n    tree = juce.ValueTree(\"Settings\")\n\n    cv = juce.CachedValue[bool]()\n    cv.referTo(tree, \"testBool\", None, False)\n    assert cv.get() == False\n\n    tree.setProperty(\"testBool\", True, None)\n    cv.forceUpdateOfCachedValue()\n    assert cv.get() == True\n\n#==================================================================================================\n\ndef test_refer_to_with_default():\n    tree = juce.ValueTree(\"Settings\")\n\n    cv = juce.CachedValue[str]()\n    cv.referTo(tree, \"testString\", None, \"default\")\n    assert cv.get() == \"default\"\n\n    tree.setProperty(\"testString\", \"updated\", None)\n    cv.forceUpdateOfCachedValue()\n    assert cv.get() == \"updated\"\n\n#==================================================================================================\n\ndef test_force_update_of_cached_value():\n    tree = juce.ValueTree(\"Settings\")\n    tree.setProperty(\"testInt\", 42, None)\n\n    cv = juce.CachedValue[int](tree, \"testInt\", None)\n    assert cv.get() == 42\n\n    tree.setProperty(\"testInt\", 24, None)\n    cv.forceUpdateOfCachedValue()\n    assert cv.get() == 24\n\n#==================================================================================================\n\ndef test_is_using_default():\n    cv = juce.CachedValue[int]()\n    assert cv.isUsingDefault()\n\n    tree = juce.ValueTree(\"Settings\")\n    cv = juce.CachedValue[int](tree, \"prop\", None, 5)\n    assert cv.isUsingDefault()\n\n    tree = juce.ValueTree(\"Settings\", { \"prop\": 1 })\n    cv = juce.CachedValue[int](tree, \"prop\", None, 5)\n    assert not cv.isUsingDefault()\n\n#==================================================================================================\n\ndef test_value_change_with_undo_manager():\n    tree = juce.ValueTree(\"Settings\")\n    um = juce.UndoManager()\n\n    cv = juce.CachedValue[int](tree, \"testInt\", um, 10)\n    assert cv.getUndoManager() == um\n\n    um.beginNewTransaction()\n    cv.setValue(20, um)\n    assert tree[\"testInt\"] == 20\n\n    um.undo()\n    assert cv.get() == 10\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_PropertiesFile.py",
    "content": "import sys\nimport pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n#==================================================================================================\n\n@pytest.fixture\ndef options():\n    opts = juce.PropertiesFile.Options()\n    opts.applicationName = \"TestApp\"\n\n    if sys.platform == \"darwin\":\n        opts.osxLibrarySubFolder = \"Application Support\"\n\n    return opts\n\n#==================================================================================================\n\ndef test_options_default_file(options):\n    options.applicationName = \"CustomApp\"\n    options.filenameSuffix = \".settings\"\n    options.folderName = \"CustomFolder\"\n    options.commonToAllUsers = False\n    options.ignoreCaseOfKeyNames = False\n    options.doNotSave = False\n    options.millisecondsBeforeSaving = 3000\n    options.storageFormat = juce.PropertiesFile.storeAsXML\n\n    assert \"CustomApp.settings\" in options.getDefaultFile().getFullPathName()\n    assert \"CustomFolder\" in options.getDefaultFile().getFullPathName()\n\n#==================================================================================================\n\ndef test_properties_file_creation_with_options(options):\n    properties_file = juce.PropertiesFile(options)\n    assert properties_file.isValidFile()\n\n#==================================================================================================\n\ndef test_properties_file_creation_with_file_and_options(options):\n    file = get_runtime_data_file(\"test_settings.settings\")\n    properties_file = juce.PropertiesFile(file, options)\n    assert properties_file.getFile() == file\n\n#==================================================================================================\n\ndef test_properties_file_save_if_needed_initial_state(options):\n    properties_file = juce.PropertiesFile(options)\n    assert properties_file.saveIfNeeded()\n\n#==================================================================================================\n\ndef test_properties_file_needs_to_be_saved(options):\n    properties_file = juce.PropertiesFile(options)\n    properties_file.setNeedsToBeSaved(True)\n    assert properties_file.needsToBeSaved()\n\n#==================================================================================================\n\ndef test_properties_file_set_needs_to_be_saved(options):\n    properties_file = juce.PropertiesFile(options)\n    properties_file.setNeedsToBeSaved(True)\n    assert properties_file.needsToBeSaved()\n\n    properties_file.setNeedsToBeSaved(False)\n    assert not properties_file.needsToBeSaved()\n\n#==================================================================================================\n\ndef test_properties_file_save(options):\n    file = get_runtime_data_file(\"test_settings.settings\")\n    properties_file = juce.PropertiesFile(file, options)\n    assert properties_file.save()\n\n    properties_file.setValue(\"testKey\", \"testValue\")\n    assert properties_file.save()\n    assert properties_file.save()\n\n#==================================================================================================\n\ndef test_properties_file_reload(options):\n    properties_file = juce.PropertiesFile(options)\n    assert properties_file.reload()\n\n#==================================================================================================\n\ndef test_properties_file_value_manipulation(options):\n    properties_file = juce.PropertiesFile(options)\n    properties_file.setValue(\"testKey\", \"testValue\")\n    assert properties_file.getValue(\"testKey\") == \"testValue\"\n\n    properties_file.removeValue(\"testKey\")\n    assert properties_file.getValue(\"testKey\") == \"\"\n\n#==================================================================================================\n\ndef test_properties_file_reload_after_value_change(options):\n    properties_file = juce.PropertiesFile(options)\n\n    properties_file.setValue(\"testKey\", \"testValue\")\n    properties_file.save()\n\n    properties_file.setValue(\"testKey\", \"newValue\")\n    properties_file.reload()\n\n    assert properties_file.getValue(\"testKey\") == \"testValue\"\n\n#==================================================================================================\n\nclass CustomListener(juce.ChangeListener):\n    changedObject = None\n\n    def changeListenerCallback(self, object):\n        self.changedObject = object\n\ndef test_properties_file_property_changed_callback(options, juce_app):\n    options.millisecondsBeforeSaving = 0\n    properties_file = juce.PropertiesFile(options)\n    properties_file.setValue(\"callbackKey\", \"callbackValue\")\n\n    listener = CustomListener()\n    properties_file.addChangeListener(listener)\n\n    properties_file.setValue(\"callbackKey\", \"anotherValue\")\n    properties_file.dispatchPendingMessages()\n    assert listener.changedObject == properties_file\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_UndoManager.py",
    "content": "import copy\nimport pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomAction(juce.UndoableAction):\n    value: list = []\n    oldValue: list = []\n\n    def __init__(self, value):\n        super().__init__()\n        self.value = value\n\n    def perform(self):\n        self.oldValue = copy.copy(self.value)\n        self.value.clear()\n        return True\n\n    def undo(self):\n        self.value = copy.copy(self.oldValue)\n        self.oldValue.clear()\n        return True\n\n#==================================================================================================\n\ndef test_undoable_action():\n    um = juce.UndoManager()\n    assert not um.canRedo()\n    assert not um.canUndo()\n\n    um.beginNewTransaction(\"abc\")\n    assert um.getCurrentTransactionName() == \"abc\"\n\n    um.setCurrentTransactionName(\"def\")\n    assert um.getCurrentTransactionName() == \"def\"\n\n    assert um.getNumActionsInCurrentTransaction() == 0\n\n    action = CustomAction([1, 2, 3, 4])\n\n    um.perform(action)\n    assert action.value == []\n    assert not um.canRedo()\n    assert um.canUndo()\n    assert um.getNumActionsInCurrentTransaction() == 1\n    assert um.getActionsInCurrentTransaction()[0] == action\n    assert um.getUndoDescription() == \"def\"\n    assert um.getUndoDescriptions() == juce.StringArray([\"def\"])\n\n    um.undo()\n    assert action.value == [1, 2, 3, 4]\n    assert um.canRedo()\n    assert not um.canUndo()\n    assert um.getNumActionsInCurrentTransaction() == 0\n    assert um.getActionsInCurrentTransaction() == []\n    assert um.getUndoDescription() == \"\"\n    assert um.getUndoDescriptions() == juce.StringArray()\n\n    um.redo()\n    assert action.value == []\n    assert not um.canRedo()\n    assert um.canUndo()\n    assert um.getNumActionsInCurrentTransaction() == 0\n    assert um.getActionsInCurrentTransaction() == []\n    assert um.getUndoDescription() == \"def\"\n    assert um.getUndoDescriptions() == juce.StringArray([\"def\"])\n\n    um.clearUndoHistory()\n    assert not um.canRedo()\n    assert not um.canUndo()\n    assert um.getNumActionsInCurrentTransaction() == 0\n    assert um.getActionsInCurrentTransaction() == []\n    assert um.getUndoDescription() == \"\"\n    assert um.getUndoDescriptions() == juce.StringArray()\n\n#==================================================================================================\n\ndef test_undoable_action_ownership():\n    um = juce.UndoManager()\n\n    action = CustomAction([1, 2, 3, 4])\n    um.perform(action)\n\n    with pytest.raises(Exception):\n        um.perform(action)\n\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_Value.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_var_constructor():\n    a = juce.Value()\n    assert isinstance(a.getValue(), type(None))\n    assert a.getValue() is None\n\n    a = juce.Value(True)\n    assert isinstance(a.getValue(), bool)\n    assert a.getValue() == True\n\n    a = juce.Value(1)\n    assert isinstance(a.getValue(), int)\n    assert a.getValue() == 1\n\n    a = juce.Value(1.0)\n    assert isinstance(a.getValue(), float)\n    assert a.getValue() == 1.0\n\n    a = juce.Value(\"abcdefg\")\n    assert isinstance(a.getValue(), str)\n    assert a.getValue() == \"abcdefg\"\n\n    a = juce.Value(b\"abcdefg\")\n    assert isinstance(a.getValue(), bytes)\n    assert a.getValue() == b\"abcdefg\"\n\n    a = juce.Value((1, 2, 3))\n    assert isinstance(a.getValue(), list)\n    assert a.getValue() == [1, 2, 3]\n\n    a = juce.Value([1, \"2\", 3, False, None])\n    assert isinstance(a.getValue(), list)\n    assert a.getValue() == [1, \"2\", 3, False, None]\n\n    a = juce.Value({\"a\": 1, \"b\": 2, \"c\": None})\n    assert isinstance(a.getValue(), dict)\n    assert a.getValue() == {\"a\": 1, \"b\": 2, \"c\": None}\n\n    a = juce.Value({\"a\": {\"x\": 10, \"y\": 20, \"z\": [1, 2]}, \"b\": 2, \"c\": 3})\n    assert isinstance(a.getValue(), dict)\n    assert a.getValue() == {\"a\": {\"x\": 10, \"y\": 20, \"z\": [1, 2]}, \"b\": 2, \"c\": 3}\n\n    a = juce.Value(juce.MemoryBlock(b'\\x01\\x01\\x01\\x01'))\n    assert isinstance(a.getValue(), bytes)\n    assert a.getValue() == b'\\x01\\x01\\x01\\x01'\n\n#==================================================================================================\n\nclass ValueListener(juce.Value.Listener):\n    value = None\n\n    def valueChanged(self, value):\n        self.value = value.getValue()\n\n#==================================================================================================\n\ndef test_value_listener(juce_app):\n    listener = ValueListener()\n\n    a = juce.Value(1.0)\n\n    a.addListener(listener)\n    assert listener.value == None\n\n    a.setValue(2.0)\n    assert a.getValue() == 2.0\n    assert listener.value == None\n    next(juce_app)\n    assert listener.value == a.getValue()\n\n    a.removeListener(listener)\n\n    a.setValue(3.0)\n    assert a.getValue() == 3.0\n    assert listener.value == 2.0\n    next(juce_app)\n    assert listener.value == 2.0\n\n#==================================================================================================\n\nclass ValueSource(juce.Value.ValueSource):\n    value = 1\n\n    def setValue(self, value):\n        self.value = value * 2\n        self.sendChangeMessage(False)\n\n    def getValue(self):\n        return self.value\n\n#==================================================================================================\n\ndef test_value_source(juce_app):\n    source = ValueSource()\n    assert source.value == 1\n\n    a = juce.Value(source)\n    assert a.getValue() == 1\n    assert a.getValueSource() == source\n    b = juce.Value()\n    b.referTo(a)\n\n    assert b.refersToSameSourceAs(a)\n    assert b.getValueSource() == source\n    assert b.getValue() == 1\n\n    a.setValue(2)\n    assert a.getValue() == 4\n    assert b.getValue() == 4\n    assert a.toString() == \"4\"\n    assert source.value == 4\n\n    a.setValue(3)\n    assert a.getValue() == 6\n    assert b.getValue() == 6\n    assert b.toString() == \"6\"\n    assert source.value == 6\n\n    listener = ValueListener()\n    a.addListener(listener)\n\n    a.setValue(4)\n    assert a.getValue() == 8\n    assert b.getValue() == 8\n\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_ValueTree.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\nclass CustomListener(juce.ValueTree.Listener):\n    changes = []\n\n    def valueTreePropertyChanged(self, tree, property):\n        self.changes.append((\"propertyChanged\", tree, property))\n\n    def valueTreeChildAdded(self, parentTree, childWhichHasBeenAdded):\n        self.changes.append((\"childAdded\", parentTree, childWhichHasBeenAdded.getType()))\n\n    def valueTreeChildRemoved(self, parentTree, childWhichHasBeenRemoved, indexFromWhichChildWasRemoved):\n        self.changes.append((\"childRemoved\", parentTree, childWhichHasBeenRemoved.getType(), indexFromWhichChildWasRemoved))\n\n    def valueTreeChildOrderChanged(self, parentTreeWhoseChildrenHaveMoved, oldIndex, newIndex):\n        self.changes.append((\"childOrderChanged\", parentTreeWhoseChildrenHaveMoved, oldIndex, newIndex))\n\n#==================================================================================================\n\ndef test_empty_constructor():\n    a = juce.ValueTree()\n    assert not a.isValid()\n    assert a.isEquivalentTo(a)\n    assert not a.hasType(\"abc\")\n    assert a.getType() == juce.Identifier()\n    assert not a.getRoot().isValid()\n    assert not a.getParent().isValid()\n    assert not a.getSibling(0).isValid()\n    assert not a.getSibling(1).isValid()\n    assert a.getNumChildren() == 0\n\n#==================================================================================================\n\ndef test_simple_constructor():\n    a = juce.ValueTree(\"abc\")\n    assert a.isValid()\n    assert a.isEquivalentTo(a)\n    assert not a.hasType(\"123\")\n    assert a.getType() == juce.Identifier(\"abc\")\n    assert a.getType() == \"abc\"\n    assert a.hasType(\"abc\")\n    assert a.getRoot() == a\n    assert not a.getSibling(0).isValid()\n    assert not a.getParent().isValid()\n    assert not a.getSibling(1).isValid()\n    assert a.getNumProperties() == 0\n    assert a.getNumChildren() == 0\n\n#==================================================================================================\n\ndef test_python_constructor():\n    a = juce.ValueTree(\"PythonValueTree\", {\n        \"a\": 1,\n        \"b\": \"2\",\n        \"c\": True,\n        \"d\": None\n    })\n    assert a.isValid()\n    assert a.hasType(\"PythonValueTree\")\n    assert a.getNumProperties() == 4\n    assert a.getProperty(\"a\") == 1\n    assert a.getProperty(\"b\") == \"2\"\n    assert a.getProperty(\"c\") == True\n    assert a.getProperty(\"d\") == None\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original = juce.ValueTree(\"Original\")\n    copy = juce.ValueTree(original)\n    assert copy.getType() == \"Original\"\n\n#==================================================================================================\n\ndef test_equality_operators():\n    vt1 = juce.ValueTree(\"EqualTest\")\n    vt2 = juce.ValueTree(vt1)\n    assert vt1 == vt2\n    vt3 = juce.ValueTree(\"EqualTest\")\n    assert vt1 != vt3\n\n#==================================================================================================\n\ndef test_is_equivalent_to():\n    vt1 = juce.ValueTree(\"EquivalentTest\")\n    vt2 = juce.ValueTree(vt1)\n    assert vt1.isEquivalentTo(vt2)\n    vt3 = juce.ValueTree(\"EquivalentTest\")\n    assert vt1.isEquivalentTo(vt3)\n\n#==================================================================================================\n\ndef test_deep_copy_and_equivalence():\n    vt1 = juce.ValueTree(\"Parent\")\n    child = juce.ValueTree(\"Child\")\n    child.setProperty(\"key\", \"value\", None)\n    vt1.appendChild(child, None)\n\n    # Test deep copy\n    vt2 = vt1.createCopy()\n    assert vt2.isEquivalentTo(vt1)\n    assert vt2 != vt1  # Checks that they are not the same instance but equivalent in content\n\n    # Modify the copy and ensure they are no longer equivalent\n    vt2.getChild(0).setProperty(\"key\", \"newValue\", None)\n    assert not vt2.isEquivalentTo(vt1)\n\n#==================================================================================================\n\ndef test_properties():\n    a = juce.ValueTree(\"data\")\n    assert a.getNumProperties() == 0\n    assert a.getNumChildren() == 0\n\n    p1 = a.getProperty(\"property1\")\n    assert not a.hasProperty(\"property1\")\n    assert p1 is None\n\n    p2 = a.getProperty(\"property2\", 1337)\n    assert p2 == 1337\n\n    a.setProperty(\"property1\", \"abc\", None)\n    assert a.getNumProperties() == 1\n    assert a.hasProperty(\"property1\")\n    p1 = a.getProperty(\"property1\")\n    assert p1 == \"abc\"\n\n#==================================================================================================\n\ndef test_create_copy():\n    vt = juce.ValueTree(\"CopyTest\")\n    copy = vt.createCopy()\n    assert copy.getType() == \"CopyTest\"\n    assert not (vt == copy)\n\n#==================================================================================================\n\ndef test_set_get_property():\n    vt = juce.ValueTree(\"Props\")\n    vt.setProperty(\"key\", \"value\", None)\n    assert vt.getProperty(\"key\") == \"value\"\n\n#==================================================================================================\n\ndef test_remove_property():\n    vt = juce.ValueTree(\"Props\")\n    vt.setProperty(\"key\", \"value\", None)\n    vt.removeProperty(\"key\", None)\n    assert vt.getProperty(\"key\") is None\n\n#==================================================================================================\n\ndef test_children():\n    a = juce.ValueTree(\"parent\")\n    assert a.getNumChildren() == 0\n\n    b1 = juce.ValueTree(\"child1\")\n    a.addChild(b1, -1, None)\n    assert a.getNumChildren() == 1\n    assert a.getChild(0) == b1\n\n    b2 = juce.ValueTree(\"child2\")\n    a.addChild(b2, -1, None)\n    assert a.getNumChildren() == 2\n    assert a.getChild(1) == b2\n\n    b3 = juce.ValueTree(\"child3\")\n    a.appendChild(b3, None)\n    assert a.getNumChildren() == 3\n    assert a.getChild(2) == b3\n\n    assert b1.getRoot() == a\n    assert b2.getRoot() == a\n    assert b3.getRoot() == a\n\n    assert b1.getParent() == a\n    assert b2.getParent() == a\n    assert b3.getParent() == a\n\n    assert b1.getSibling(1) == b2\n    assert b1.getSibling(2) == b3\n\n    assert b2.getSibling(-1) == b1\n    assert b2.getSibling(1) == b3\n\n    assert b3.getSibling(-2) == b1\n    assert b3.getSibling(-1) == b2\n\n    a.removeChild(0, None)\n    assert a.getNumChildren() == 2\n    assert a.getChild(0) == b2\n    assert a.getChild(1) == b3\n\n#==================================================================================================\n\ndef test_add_get_remove_child():\n    parent = juce.ValueTree(\"Parent\")\n    child = juce.ValueTree(\"Child\")\n    parent.appendChild(child, None)\n    assert parent.getNumChildren() == 1\n    assert parent.getChild(0).getType() == \"Child\"\n    parent.removeChild(child, None)\n    assert parent.getNumChildren() == 0\n\n#==================================================================================================\n\ndef test_get_child_with_property():\n    parent = juce.ValueTree(\"Parent\")\n    child = juce.ValueTree(\"Child\")\n    child.setProperty(\"name\", \"testChild\", None)\n    parent.appendChild(child, None)\n    result = parent.getChildWithProperty(\"name\", \"testChild\")\n    assert result.isValid()\n    assert result.getProperty(\"name\") == \"testChild\"\n\n#==================================================================================================\n\ndef test_serialize_deserialize():\n    vt = juce.ValueTree(\"Serialization\")\n    vt.setProperty(\"key\", \"value\", None)\n    child = juce.ValueTree(\"Child\")\n    vt.appendChild(child, None)\n\n    stream = juce.MemoryOutputStream()\n    vt.writeToStream(stream)\n    data = stream.getMemoryBlock()\n\n    inputStream = juce.MemoryInputStream(data, keepInternalCopyOfData=False)\n    deserialized = juce.ValueTree.readFromStream(inputStream)\n\n    assert deserialized.getType() == \"Serialization\"\n    assert deserialized.getProperty(\"key\") == \"value\"\n    assert deserialized.getNumChildren() == 1\n    assert deserialized.getChild(0).getType() == \"Child\"\n\n#==================================================================================================\n\ndef test_undo_redo_property_change():\n    undoManager = juce.UndoManager()\n    vt = juce.ValueTree(\"TestUndo\")\n    vt.setProperty(\"key\", \"initialValue\", None)\n\n    # Change the property with undo support\n    vt.setProperty(\"key\", \"newValue\", undoManager)\n    assert vt.getProperty(\"key\") == \"newValue\"\n\n    # Undo the change\n    undoManager.undo()\n    assert vt.getProperty(\"key\") == \"initialValue\"\n\n    # Redo the change\n    undoManager.redo()\n    assert vt.getProperty(\"key\") == \"newValue\"\n\n#==================================================================================================\n\ndef test_complex_property_and_child_manipulation():\n    undoManager = juce.UndoManager()\n    parent = juce.ValueTree(\"Parent\")\n    child1 = juce.ValueTree(\"Child1\")\n    child2 = juce.ValueTree(\"Child2\")\n\n    # Add children with properties\n    child1.setProperty(\"name\", \"Child1\", undoManager)\n    child2.setProperty(\"name\", \"Child2\", undoManager)\n    parent.appendChild(child1, undoManager)\n    parent.appendChild(child2, undoManager)\n\n    # Modify child property and then undo\n    undoManager.beginNewTransaction()\n    child1.setProperty(\"name\", \"ModifiedChild1\", undoManager)\n    assert child1.getProperty(\"name\") == \"ModifiedChild1\"\n    undoManager.undo()\n    assert child1.getProperty(\"name\") == \"Child1\"\n\n    # Remove a child and undo the removal\n    undoManager.beginNewTransaction()\n    parent.removeChild(child2, undoManager)\n    assert parent.getNumChildren() == 1\n    undoManager.undo()\n    assert parent.getNumChildren() == 2\n\n#==================================================================================================\n\ndef test_property_and_child_iteration():\n    vt = juce.ValueTree(\"Parent\")\n    vt.setProperty(\"key1\", \"value1\", None)\n    vt.setProperty(\"key2\", \"value2\", None)\n    child1 = juce.ValueTree(\"Child1\")\n    child2 = juce.ValueTree(\"Child2\")\n    vt.appendChild(child1, None)\n    vt.appendChild(child2, None)\n\n    # Test iterating over properties\n    keys = [vt.getPropertyName(i) for i in range(vt.getNumProperties())]\n    assert \"key1\" in keys\n    assert \"key2\" in keys\n\n    # Test iterating over children\n    child_types = [child.getType() for child in vt]\n    assert \"Child1\" in child_types\n    assert \"Child2\" in child_types\n\n#==================================================================================================\n\ndef test_value_tree_listener():\n    vt = juce.ValueTree(\"ListenerTest\")\n    listener = CustomListener()\n    vt.addListener(listener)\n\n    # Change a property and see if the listener catches it\n    vt.setProperty(\"key\", \"value\", None)\n    assert (\"propertyChanged\", vt, \"key\") in listener.changes\n\n    vt.removeListener(listener)\n    # Clear changes and verify no more changes are recorded\n    listener.changes.clear()\n    vt.setProperty(\"anotherKey\", \"anotherValue\", None)\n    assert not listener.changes\n\n#==================================================================================================\n\ndef test_listener_on_child_added():\n    parent = juce.ValueTree(\"Parent\")\n    listener = CustomListener()\n    parent.addListener(listener)\n\n    child = juce.ValueTree(\"Child\")\n    parent.appendChild(child, None)\n\n    assert (\"childAdded\", parent, \"Child\") in listener.changes\n\n#==================================================================================================\n\ndef test_listener_on_child_removed():\n    parent = juce.ValueTree(\"Parent\")\n    child = juce.ValueTree(\"Child\")\n    parent.appendChild(child, None)  # Set up initial state\n\n    listener = CustomListener()\n    parent.addListener(listener)\n\n    parent.removeChild(child, None)\n\n    assert (\"childRemoved\", parent, \"Child\", 0) in listener.changes\n\n#==================================================================================================\n\ndef test_listener_on_child_order_changed():\n    parent = juce.ValueTree(\"Parent\")\n    child1 = juce.ValueTree(\"Child1\")\n    child2 = juce.ValueTree(\"Child2\")\n    parent.appendChild(child1, None)\n    parent.appendChild(child2, None)  # Ensure there are two children for the order change\n\n    listener = CustomListener()\n    parent.addListener(listener)\n\n    # Assuming moveChild is zero-indexed and correctly bound\n    parent.moveChild(0, 1, None)  # Move the first child to the position of the second\n\n    assert (\"childOrderChanged\", parent, 0, 1) in listener.changes\n\n#==================================================================================================\n\ndef test_listener_removal():\n    vt = juce.ValueTree(\"ListenerTest\")\n    listener = CustomListener()\n    vt.addListener(listener)\n\n    # Change a property to ensure listener is initially active\n    vt.setProperty(\"initialKey\", \"initialValue\", None)\n    assert (\"propertyChanged\", vt, \"initialKey\") in listener.changes\n\n    # Remove listener and verify it no longer receives updates\n    vt.removeListener(listener)\n    vt.setProperty(\"newKey\", \"newValue\", None)\n    assert (\"propertyChanged\", vt, \"newKey\") not in listener.changes\n\n#==================================================================================================\n\ndef test_basic_xml_export():\n    # Create a ValueTree with some properties and children\n    parent = juce.ValueTree(\"Parent\")\n    parent.setProperty(\"parentProp\", \"parentValue\", None)\n    child = juce.ValueTree(\"Child\")\n    child.setProperty(\"childProp\", \"childValue\", None)\n    parent.appendChild(child, None)\n\n    # Export to XML\n    xml = parent.createXml()\n\n    # Convert XML to string for easier assertion (assuming createXml() returns an XmlElement equivalent)\n    xmlString = xml.toString()\n\n    # Check the structure and properties in the XML string\n    assert \"<Parent parentProp=\\\"parentValue\\\">\" in xmlString\n    assert \"<Child childProp=\\\"childValue\\\"/>\" in xmlString\n    assert \"</Parent>\" in xmlString\n\n#==================================================================================================\n\ndef test_nested_xml_export():\n    parent = juce.ValueTree(\"Grandparent\")\n    parent.setProperty(\"gpProp\", \"gpValue\", None)\n\n    child = juce.ValueTree(\"Parent\")\n    child.setProperty(\"pProp\", \"pValue\", None)\n\n    grandchild = juce.ValueTree(\"Child\")\n    grandchild.setProperty(\"cProp\", \"cValue\", None)\n\n    child.appendChild(grandchild, None)\n    parent.appendChild(child, None)\n\n    # Export to XML\n    xml = parent.createXml()\n    xmlString = xml.toString()\n\n    # Assertions to verify the nested structure and properties\n    assert \"<Grandparent gpProp=\\\"gpValue\\\">\" in xmlString\n    assert \"<Parent pProp=\\\"pValue\\\">\" in xmlString\n    assert \"<Child cProp=\\\"cValue\\\"/>\" in xmlString\n    assert \"</Parent>\" in xmlString\n    assert \"</Grandparent>\" in xmlString\n\n#==================================================================================================\n\ndef test_xml_round_trip():\n    original = juce.ValueTree(\"RoundTrip\")\n    original.setProperty(\"rtProp\", \"rtValue\", None)\n    child = juce.ValueTree(\"Child\")\n    child.setProperty(\"childProp\", \"childValue\", None)\n    original.appendChild(child, None)\n\n    newTree = juce.ValueTree.fromXml(original.createXml())\n\n    assert newTree.isEquivalentTo(original)\n    assert newTree.getType() == \"RoundTrip\"\n    assert newTree.getProperty(\"rtProp\") == \"rtValue\"\n    assert newTree.getChild(0).getType() == \"Child\"\n    assert newTree.getChild(0).getProperty(\"childProp\") == \"childValue\"\n\n#==================================================================================================\n\ndef test_stress_large_data_sets():\n    parent = juce.ValueTree(\"Parent\")\n\n    for i in range(1000):\n        child = juce.ValueTree(f\"Child{i}\")\n\n        for j in range(10):\n            child.setProperty(f\"key{j}\", f\"value{j}\", None)\n\n        parent.appendChild(child, None)\n\n    assert parent.getNumChildren() == 1000\n\n    for i, child in enumerate(parent):\n        assert child.hasType(f\"Child{i}\")\n        assert child.getNumProperties() == 10\n"
  },
  {
    "path": "tests/test_juce_data_structures/test_ValueTreeSynchroniser.py",
    "content": "import pytest\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomSynchroniser(juce.ValueTreeSynchroniser):\n    changes = []\n\n    def __init__(self, tree):\n        juce.ValueTreeSynchroniser.__init__(self, tree)\n\n    def stateChanged(self, encodedChange):\n        self.changes.append(bytes(encodedChange))\n\n#==================================================================================================\n\n@pytest.fixture\ndef value_tree():\n    return juce.ValueTree(\"TestTree\")\n\n#==================================================================================================\n\ndef test_value_tree_synchroniser_construction(value_tree):\n    synchroniser = juce.ValueTreeSynchroniser(value_tree)\n    assert synchroniser.getRoot() == value_tree\n\n#==================================================================================================\n\ndef test_send_full_sync_callback(value_tree):\n    synchroniser = CustomSynchroniser(value_tree)\n    synchroniser.sendFullSyncCallback()\n    assert len(synchroniser.changes) > 0\n\n#==================================================================================================\n\ndef test_apply_change_success(value_tree):\n    synchroniser = CustomSynchroniser(value_tree)\n    assert len(synchroniser.changes) == 1\n\n    synchroniser.sendFullSyncCallback()\n    assert len(synchroniser.changes) == 2\n    encoded_change = synchroniser.changes[1]\n    assert juce.ValueTreeSynchroniser.applyChange(value_tree, encoded_change, None)\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"Hit assertion in ValueTreeSynchroniser\")\ndef test_apply_change_failure(value_tree):\n    invalid_change_data = bytes([7])\n    success = juce.ValueTreeSynchroniser.applyChange(value_tree, invalid_change_data, None)\n    assert not success\n\n#==================================================================================================\n\ndef test_get_root(value_tree):\n    synchroniser = CustomSynchroniser(value_tree)\n    assert synchroniser.getRoot() == value_tree\n"
  },
  {
    "path": "tests/test_juce_events/__init__.py",
    "content": "import pytest\n\nfrom .. import common\n\nimport popsicle as juce\n\nif not hasattr(juce, \"MessageManager\"):\n    pytest.skip(allow_module_level=True)\n"
  },
  {
    "path": "tests/test_juce_events/test_ActionBroadcaster.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\nclass ActionListener(juce.ActionListener):\n    timesCalled = 0\n    lastMessage = None\n\n    def actionListenerCallback(self, message):\n        self.timesCalled += 1\n        self.lastMessage = message\n\n#==================================================================================================\n\ndef test_single_send(juce_app):\n    b = juce.ActionBroadcaster()\n\n    l = ActionListener()\n    b.addActionListener(l)\n\n    b.sendActionMessage(\"abc\")\n    assert l.timesCalled == 0\n    assert l.lastMessage is None\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastMessage == \"abc\"\n\n#==================================================================================================\n\ndef test_multi_send(juce_app):\n    b = juce.ActionBroadcaster()\n\n    l = ActionListener()\n    b.addActionListener(l)\n\n    b.sendActionMessage(\"1\")\n    b.sendActionMessage(\"2\")\n    b.sendActionMessage(\"3\")\n    assert l.timesCalled == 0\n    assert l.lastMessage is None\n    next(juce_app)\n    assert l.timesCalled == 3\n    assert l.lastMessage == \"3\"\n\n#==================================================================================================\n\ndef test_remove_listener(juce_app):\n    b = juce.ActionBroadcaster()\n\n    l = ActionListener()\n    b.addActionListener(l)\n\n    b.sendActionMessage(\"1\")\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastMessage == \"1\"\n\n    b.removeActionListener(l)\n    b.sendActionMessage(\"2\")\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastMessage == \"1\"\n\n#==================================================================================================\n\ndef test_remove_all_listeners(juce_app):\n    b = juce.ActionBroadcaster()\n\n    l1 = ActionListener()\n    l2 = ActionListener()\n    l3 = ActionListener()\n    b.addActionListener(l1)\n    b.addActionListener(l2)\n    b.addActionListener(l3)\n\n    b.sendActionMessage(\"bark\")\n    next(juce_app)\n    assert l1.timesCalled == 1\n    assert l2.timesCalled == 1\n    assert l3.timesCalled == 1\n\n    b.removeAllActionListeners()\n    b.sendActionMessage(\"bork\")\n    next(juce_app)\n    assert l1.timesCalled == 1\n    assert l2.timesCalled == 1\n    assert l3.timesCalled == 1\n"
  },
  {
    "path": "tests/test_juce_events/test_AsyncUpdater.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\nclass AsyncUpdater(juce.AsyncUpdater):\n    timesCalled = 0\n\n    def handleAsyncUpdate(self):\n        self.timesCalled += 1\n\n#==================================================================================================\n\ndef test_single_trigger(juce_app):\n    a = AsyncUpdater()\n    assert not a.isUpdatePending()\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert a.timesCalled == 0\n    next(juce_app)\n    assert a.timesCalled == 1\n\n#==================================================================================================\n\ndef test_multiple_trigger(juce_app):\n    a = AsyncUpdater()\n\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert a.timesCalled == 0\n    next(juce_app)\n    assert not a.isUpdatePending()\n    assert a.timesCalled == 1\n\n#==================================================================================================\n\ndef test_cancel_single_trigger(juce_app):\n    a = AsyncUpdater()\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert a.timesCalled == 0\n    a.cancelPendingUpdate()\n    assert not a.isUpdatePending()\n    next(juce_app)\n    assert not a.isUpdatePending()\n    assert a.timesCalled == 0\n\n#==================================================================================================\n\ndef test_handle_update_now(juce_app):\n    a = AsyncUpdater()\n\n    a.handleUpdateNowIfNeeded()\n    assert not a.isUpdatePending()\n    assert a.timesCalled == 0\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    a.handleUpdateNowIfNeeded()\n    assert not a.isUpdatePending()\n    assert a.timesCalled == 1\n"
  },
  {
    "path": "tests/test_juce_events/test_ChangeBroadcaster.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\nclass ChangeListener(juce.ChangeListener):\n    timesCalled = 0\n    lastBroadcaster = None\n\n    def changeListenerCallback(self, broadcaster):\n        self.timesCalled += 1\n        self.lastBroadcaster = broadcaster\n\n#==================================================================================================\n\ndef test_single_send(juce_app):\n    b = juce.ChangeBroadcaster()\n\n    l = ChangeListener()\n    b.addChangeListener(l)\n\n    b.sendChangeMessage()\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n\n#==================================================================================================\n\ndef test_multi_send(juce_app):\n    b = juce.ChangeBroadcaster()\n\n    l = ChangeListener()\n    b.addChangeListener(l)\n\n    b.sendChangeMessage()\n    b.sendChangeMessage()\n    b.sendChangeMessage()\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n\n#==================================================================================================\n\ndef test_multi_send_separate_broadcasters(juce_app):\n    a = juce.ChangeBroadcaster()\n    b = juce.ChangeBroadcaster()\n    c = juce.ChangeBroadcaster()\n\n    l = ChangeListener()\n    a.addChangeListener(l)\n    b.addChangeListener(l)\n    c.addChangeListener(l)\n\n    a.sendChangeMessage()\n    b.sendChangeMessage()\n    c.sendChangeMessage()\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n    next(juce_app)\n    assert l.timesCalled == 3\n    assert l.lastBroadcaster == c\n\n#==================================================================================================\n\ndef test_remove_listener(juce_app):\n    a = juce.ChangeBroadcaster()\n    b = juce.ChangeBroadcaster()\n\n    l1 = ChangeListener()\n    l2 = ChangeListener()\n    a.addChangeListener(l1)\n    a.addChangeListener(l2)\n    b.addChangeListener(l1)\n    b.addChangeListener(l2)\n\n    b.sendChangeMessage()\n    next(juce_app)\n    assert l1.timesCalled == 1\n    assert l1.lastBroadcaster == b\n    assert l2.timesCalled == 1\n    assert l2.lastBroadcaster == b\n\n    a.removeChangeListener(l2)\n    a.sendChangeMessage()\n    next(juce_app)\n    assert l1.timesCalled == 2\n    assert l1.lastBroadcaster == a\n    assert l2.timesCalled == 1\n    assert l2.lastBroadcaster == b\n\n#==================================================================================================\n\ndef test_remove_all_listeners(juce_app):\n    b = juce.ChangeBroadcaster()\n\n    l1 = ChangeListener()\n    l2 = ChangeListener()\n    l3 = ChangeListener()\n    b.addChangeListener(l1)\n    b.addChangeListener(l2)\n    b.addChangeListener(l3)\n\n    b.sendChangeMessage()\n    next(juce_app)\n    assert l1.timesCalled == 1\n    assert l2.timesCalled == 1\n    assert l3.timesCalled == 1\n\n    b.removeAllChangeListeners()\n    b.sendChangeMessage()\n    next(juce_app)\n    assert l1.timesCalled == 1\n    assert l2.timesCalled == 1\n    assert l3.timesCalled == 1\n\n#==================================================================================================\n\ndef test_synchronous_send(juce_app):\n    b = juce.ChangeBroadcaster()\n\n    l = ChangeListener()\n    b.addChangeListener(l)\n\n    b.sendSynchronousChangeMessage()\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n\n    b.sendChangeMessage()\n    b.sendSynchronousChangeMessage()\n    assert l.timesCalled == 2\n    assert l.lastBroadcaster == b\n    next(juce_app)\n    assert l.timesCalled == 2\n    assert l.lastBroadcaster == b\n\n#==================================================================================================\n\ndef test_dispatch_pending_messages(juce_app):\n    b = juce.ChangeBroadcaster()\n\n    l = ChangeListener()\n    b.addChangeListener(l)\n\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n    b.dispatchPendingMessages()\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n    next(juce_app)\n    assert l.timesCalled == 0\n    assert l.lastBroadcaster is None\n\n    b.sendChangeMessage()\n    b.sendChangeMessage()\n    b.dispatchPendingMessages()\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n    next(juce_app)\n    assert l.timesCalled == 1\n    assert l.lastBroadcaster == b\n"
  },
  {
    "path": "tests/test_juce_events/test_LockingAsyncUpdater.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_single_trigger(juce_app):\n    timesCalled = 0\n\n    def callback():\n        nonlocal timesCalled\n        timesCalled += 1\n\n    a = juce.LockingAsyncUpdater(callback)\n    assert not a.isUpdatePending()\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert timesCalled == 0\n    next(juce_app)\n    assert timesCalled == 1\n\n#==================================================================================================\n\ndef test_multiple_trigger(juce_app):\n    timesCalled = 0\n\n    def callback():\n        nonlocal timesCalled\n        timesCalled += 1\n\n    a = juce.LockingAsyncUpdater(callback)\n\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert timesCalled == 0\n    next(juce_app)\n    assert not a.isUpdatePending()\n    assert timesCalled == 1\n\n#==================================================================================================\n\ndef test_cancel_single_trigger(juce_app):\n    timesCalled = 0\n\n    def callback():\n        nonlocal timesCalled\n        timesCalled += 1\n\n    a = juce.LockingAsyncUpdater(callback)\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    assert timesCalled == 0\n    a.cancelPendingUpdate()\n    assert not a.isUpdatePending()\n    next(juce_app)\n    assert not a.isUpdatePending()\n    assert timesCalled == 0\n\n#==================================================================================================\n\ndef test_handle_update_now(juce_app):\n    timesCalled = 0\n\n    def callback():\n        nonlocal timesCalled\n        timesCalled += 1\n\n    a = juce.LockingAsyncUpdater(callback)\n\n    a.handleUpdateNowIfNeeded()\n    assert not a.isUpdatePending()\n    assert timesCalled == 0\n\n    a.triggerAsyncUpdate()\n    assert a.isUpdatePending()\n    a.handleUpdateNowIfNeeded()\n    assert not a.isUpdatePending()\n    assert timesCalled == 1\n"
  },
  {
    "path": "tests/test_juce_events/test_Message.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ntimesCalled = 0\n\nclass Message(juce.Message):\n    def messageCallback(self):\n        global timesCalled\n        timesCalled += 1\n\n#==================================================================================================\n\ndef test_construct_and_post(juce_app):\n    global timesCalled\n\n    m = Message()\n    assert timesCalled == 0\n\n    m.post()\n    assert timesCalled == 0\n\n    next(juce_app)\n    assert timesCalled == 1\n"
  },
  {
    "path": "tests/test_juce_events/test_MessageListener.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ntimesMessageCalled = 0\ntimesListenerCalled = 0\n\nclass Message(juce.Message):\n    def __init__(self, name):\n        super().__init__()\n        self.name = name\n\n    def getName(self):\n        return self.name\n\n    def messageCallback(self):\n        global timesMessageCalled\n        timesMessageCalled += 1\n\nclass MessageListener(juce.MessageListener):\n    timesCalled = 0\n    lastName = None\n\n    def handleMessage(self, message):\n        self.timesCalled += 1\n        self.lastName = message.getName()\n\n#==================================================================================================\n\ndef test_construct_and_post(juce_app):\n    l = MessageListener()\n    m = Message(\"Gilles\")\n\n    l.postMessage(m)\n    assert l.timesCalled == 0\n    assert l.lastName is None\n    assert timesMessageCalled == 0\n\n    next(juce_app)\n    # assert l.timesCalled == 1\n    # assert l.lastName == \"Gilles\"\n    assert timesMessageCalled == 1\n"
  },
  {
    "path": "tests/test_juce_events/test_MessageManager.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_message_manager_instance():\n    mm = juce.MessageManager.getInstance()\n    assert mm.isThisTheMessageThread()\n    assert not mm.hasStopMessageBeenSent()\n    assert mm.currentThreadHasLockedMessageManager()\n    assert juce.MessageManager.existsAndIsCurrentThread()\n    assert juce.MessageManager.existsAndIsLockedByCurrentThread()\n    assert mm.getCurrentMessageThread() is not None\n\n#==================================================================================================\n\ndef test_message_manager_run_dispatch_loop_until():\n    mm = juce.MessageManager.getInstance()\n\n    x = 10\n    def testAsync():\n        nonlocal x\n        x = 11\n\n    mm.callAsync(testAsync)\n    assert x == 10\n    mm.runDispatchLoopUntil(10)\n    assert x == 11\n\n#==================================================================================================\n\nclass ActionListener(juce.ActionListener):\n    message = None\n\n    def actionListenerCallback(self, message: str):\n        self.message = message\n\ndef test_message_manager_broadcast_listener():\n    mm = juce.MessageManager.getInstance()\n    listener = ActionListener()\n\n    mm.registerBroadcastListener(listener)\n    mm.deliverBroadcastMessage(\"123\")\n    assert listener.message is None\n    mm.runDispatchLoopUntil(10)\n    assert listener.message == \"123\"\n\n    mm.deregisterBroadcastListener(listener)\n    mm.deliverBroadcastMessage(\"abc\")\n    mm.runDispatchLoopUntil(10)\n    assert listener.message == \"123\"\n\n#==================================================================================================\n\nclass Thread(juce.Thread):\n    messageManagerWasLocked = False\n    isThisTheMessageThread = True\n    currentThreadHasLockedMessageManagerPre = True\n    currentThreadHasLockedMessageManagerPost = False\n    wasRunSuccesfully = False\n    runResult = 0\n\n    def run(self):\n        mm = juce.MessageManager.getInstance()\n        self.isThisTheMessageThread = mm.isThisTheMessageThread()\n        self.currentThreadHasLockedMessageManagerPre = mm.currentThreadHasLockedMessageManager()\n\n        with juce.MessageManagerLock(juce.Thread.getCurrentThread()) as ml:\n            self.messageManagerWasLocked = ml.lockWasGained()\n            self.currentThreadHasLockedMessageManagerPost = mm.currentThreadHasLockedMessageManager()\n\n        self.runResult = mm.callFunctionOnMessageThread(self.runOnMessageThread)\n\n    def runOnMessageThread(self):\n        self.wasRunSuccesfully = True\n        return 42\n\ndef test_message_manager_lock(juce_app):\n    t = Thread(\"backgrounder\")\n    t.startThread()\n\n    for _ in range(10):\n        next(juce_app)\n\n    t.signalThreadShouldExit()\n    t.waitForThreadToExit(1000)\n\n    assert t.messageManagerWasLocked\n    assert not t.isThisTheMessageThread\n    assert not t.currentThreadHasLockedMessageManagerPre\n    assert t.currentThreadHasLockedMessageManagerPost\n    assert t.wasRunSuccesfully\n    assert t.runResult == 42\n"
  },
  {
    "path": "tests/test_juce_events/test_MultiTimer.py",
    "content": "from collections import defaultdict\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomMultiTimer(juce.MultiTimer):\n    timesCalled = defaultdict(int)\n\n    def timerCallback(self, timerID):\n        self.timesCalled[timerID] += 1\n\n#==================================================================================================\n\ndef test_multi_timer(juce_app):\n    t = CustomMultiTimer()\n    assert not t.isTimerRunning(1)\n    assert not t.isTimerRunning(2)\n\n    repeats = 2\n    milliseconds1 = 100\n    milliseconds2 = 50\n\n    t.startTimer(1, milliseconds1)\n    t.startTimer(2, milliseconds2)\n    assert t.getTimerInterval(1) == milliseconds1\n    assert t.getTimerInterval(2) == milliseconds2\n    assert t.isTimerRunning(1)\n    assert t.isTimerRunning(2)\n    assert t.timesCalled[1] == 0\n    assert t.timesCalled[2] == 0\n\n    while t.timesCalled[1] < repeats or t.timesCalled[2] < repeats:\n        juce_app.processEvents(min(milliseconds1, milliseconds2))\n\n    assert t.isTimerRunning(1)\n    assert t.isTimerRunning(2)\n    assert t.timesCalled[1] >= repeats\n    assert t.timesCalled[2] >= repeats\n\n    t.stopTimer(1)\n    assert not t.isTimerRunning(1)\n    assert t.isTimerRunning(2)\n\n    t.stopTimer(2)\n    assert not t.isTimerRunning(2)\n"
  },
  {
    "path": "tests/test_juce_events/test_Timer.py",
    "content": "import time\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomTimer(juce.Timer):\n    timesCalled = 0\n\n    def timerCallback(self):\n        self.timesCalled += 1\n\n#==================================================================================================\n\ndef test_single_timer(juce_app):\n    t = CustomTimer()\n    assert not t.isTimerRunning()\n\n    repeats = 2\n    milliseconds = 100\n\n    t.startTimer(milliseconds)\n    assert t.getTimerInterval() == milliseconds\n    assert t.isTimerRunning()\n    assert t.timesCalled == 0\n\n    while t.timesCalled < repeats:\n        juce_app.processEvents(milliseconds)\n\n    assert t.isTimerRunning()\n    assert t.timesCalled >= repeats\n\n    t.stopTimer()\n    assert not t.isTimerRunning()\n\n#==================================================================================================\n\ndef test_call_pending_timers_synchronously(juce_app):\n    t = CustomTimer()\n\n    t.startTimer(100)\n    assert t.timesCalled == 0\n    juce_app.processEvents(1)\n    #assert t.timesCalled == 0\n\n    time.sleep(0.2)\n\n    juce.Timer.callPendingTimersSynchronously()\n    #assert t.timesCalled >= 1\n\n    t.stopTimer()\n\n#==================================================================================================\n\ndef test_call_after_delay(juce_app):\n    milliseconds = 100\n    called = False\n\n    def callback():\n        nonlocal called\n        called = True\n\n    juce.Timer.callAfterDelay(milliseconds, callback)\n    assert not called\n\n    while not called:\n        juce_app.processEvents(20)\n\n    assert called\n"
  },
  {
    "path": "tests/test_juce_graphics/__init__.py",
    "content": "import pytest\n\nfrom .. import common\n\nimport popsicle as juce\n\nif not hasattr(juce, \"Graphics\"):\n    pytest.skip(allow_module_level=True)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_AffineTransform.py",
    "content": "import math\nfrom math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_construct_empty():\n    a = juce.AffineTransform()\n    assert a.isIdentity()\n\n#==================================================================================================\n\ndef test_is_singularity():\n    a = juce.AffineTransform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)\n    assert a.isSingularity()\n\n#==================================================================================================\n\ndef test_construct_with_values():\n    a = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    assert not a.isIdentity()\n    assert isclose(a.mat00, 1.0)\n    assert isclose(a.mat01, 2.0)\n    assert isclose(a.mat02, 3.0)\n    assert isclose(a.mat10, 4.0)\n    assert isclose(a.mat11, 5.0)\n    assert isclose(a.mat12, 6.0)\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    original = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    copied = juce.AffineTransform(original)\n    assert original == copied\n\n#==================================================================================================\n\ndef test_assignment_operator():\n    original = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    assigned = juce.AffineTransform()\n    assigned = original\n    assert original == assigned\n\n#==================================================================================================\n\ndef test_equality():\n    a = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    b = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    assert a == b\n\n#==================================================================================================\n\ndef test_inequality():\n    a = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    b = juce.AffineTransform(6.0, 5.0, 4.0, 3.0, 2.0, 1.0)\n    assert a != b\n\n#==================================================================================================\n\ndef test_transform_point():\n    a = juce.AffineTransform(2.0, 0.0, 1.0, 0.0, 2.0, 2.0)\n    x, y = a.transformPoint(1.0, 1.0)\n    assert isclose(x, 3.0)\n    assert isclose(y, 4.0)\n\n#==================================================================================================\n\ndef test_transform_points_two_points():\n    a = juce.AffineTransform(2.0, 0.0, 1.0, 0.0, 2.0, 2.0)\n    x1, y1, x2, y2 = a.transformPoints(1.0, 1.0, 2.0, 2.0)\n    assert isclose(x1, 3.0)\n    assert isclose(y1, 4.0)\n    assert isclose(x2, 5.0)\n    assert isclose(y2, 6.0)\n\n#==================================================================================================\n\ndef test_transform_points_three_points():\n    a = juce.AffineTransform(2.0, 0.0, 1.0, 0.0, 2.0, 2.0)\n    x1, y1, x2, y2, x3, y3 = a.transformPoints(1.0, 1.0, 2.0, 2.0, 3.0, 3.0)\n    assert isclose(x1, 3.0)\n    assert isclose(y1, 4.0)\n    assert isclose(x2, 5.0)\n    assert isclose(y2, 6.0)\n    assert isclose(x3, 7.0)\n    assert isclose(y3, 8.0)\n\n#==================================================================================================\n\ndef test_translated():\n    a = juce.AffineTransform(1.0, 0.0, 1.0, 0.0, 1.0, 1.0)\n    b = a.translated(2.0, 3.0)\n    assert isclose(b.getTranslationX(), 3.0)\n    assert isclose(b.getTranslationY(), 4.0)\n\n#==================================================================================================\n\ndef test_translation_static():\n    a = juce.AffineTransform.translation(2.0, 3.0)\n    assert isclose(a.getTranslationX(), 2.0)\n    assert isclose(a.getTranslationY(), 3.0)\n\n#==================================================================================================\n\ndef test_rotated():\n    a = juce.AffineTransform.rotation(1.5708) # 90 degrees in radians\n    assert not a.isOnlyTranslation()\n\n#==================================================================================================\n\ndef test_scaled():\n    a = juce.AffineTransform.scale(2.0, 3.0)\n    assert isclose(a.mat00, 2.0)\n    assert isclose(a.mat11, 3.0)\n\n#==================================================================================================\n\ndef test_sheared():\n    a = juce.AffineTransform.shear(1.0, 2.0)\n    assert isclose(a.mat01, 1.0)\n    assert isclose(a.mat10, 2.0)\n\n#==================================================================================================\n\ndef test_inverted():\n    a = juce.AffineTransform().scaled(2.0, 2.0)\n    b = a.inverted()\n    assert a.followedBy(b).isIdentity()\n\n#==================================================================================================\n\ndef test_from_target_points():\n    a = juce.AffineTransform.fromTargetPoints(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    assert a.isSingularity()  # Assuming these points result in a singular matrix\n\n#==================================================================================================\n\ndef test_followed_by():\n    a = juce.AffineTransform(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\n    b = juce.AffineTransform(2.0, 0.0, 1.0, 0.0, 2.0, 2.0)\n    c = a.followedBy(b)\n    assert isclose(c.mat00, 2.0)\n    assert isclose(c.mat01, 4.0)\n    assert isclose(c.mat02, 7.0)\n    assert isclose(c.mat10, 8.0)\n    assert isclose(c.mat11, 10.0)\n    assert isclose(c.mat12, 14.0)\n\n#==================================================================================================\n\ndef test_is_only_translation():\n    a = juce.AffineTransform.translation(2.0, 3.0)\n    assert a.isOnlyTranslation()\n\n#==================================================================================================\n\ndef test_get_translation_x():\n    a = juce.AffineTransform.translation(2.0, 3.0)\n    assert isclose(a.getTranslationX(), 2.0)\n\n#==================================================================================================\n\ndef test_get_translation_y():\n    a = juce.AffineTransform.translation(2.0, 3.0)\n    assert isclose(a.getTranslationY(), 3.0)\n\n#==================================================================================================\n\ndef test_get_determinant():\n    a = juce.AffineTransform(2.0, 1.0, 3.0, 0.0, -1.0, 2.0)\n    assert isclose(a.getDeterminant(), -2.0)\n\n#==================================================================================================\n\ndef test_vertical_flip():\n    height = 5.0\n    a = juce.AffineTransform.verticalFlip(height)\n    assert isclose(a.mat11, -1.0)\n    assert isclose(a.mat12, height)\n\n#==================================================================================================\n\ndef test_transform_points_flip():\n    a = juce.AffineTransform(-1, 0, 0, 0, -1, 0)\n    assert not a.isIdentity()\n    assert isclose(a.mat00, -1.0)\n    assert isclose(a.mat01, 0.0)\n    assert isclose(a.mat02, 0.0)\n    assert isclose(a.mat10, 0.0)\n    assert isclose(a.mat11, -1.0)\n    assert isclose(a.mat12, 0.0)\n\n    x, y = a.transformPoint(2, 1)\n    assert x == -2\n    assert y == -1\n\n    x, y = a.transformPoint(2.1, 1.1)\n    assert isclose(x, -2.1, rel_tol=1e-06)\n    assert isclose(y, -1.1, rel_tol=1e-06)\n\n    x, y = a.transformPoint(-100, -1)\n    assert x == 100\n    assert y == 1\n\n    x, y = a.transformPoint(-100.99, -1.99)\n    assert isclose(x, 100.99, rel_tol=1e-06)\n    assert isclose(y, 1.99, rel_tol=1e-06)\n\n#==================================================================================================\n\ndef test_transform_translate():\n    a = juce.AffineTransform().translation(111.0, 111.0)\n    assert a.isOnlyTranslation()\n    assert isclose(a.getTranslationX(), 111.0)\n    assert isclose(a.getTranslationY(), 111.0)\n\n    a = juce.AffineTransform().scale(0.5)\n    assert not a.isOnlyTranslation()\n    assert isclose(a.getTranslationX(), 0.0)\n    assert isclose(a.getTranslationY(), 0.0)\n\n#==================================================================================================\n\ndef test_legacy():\n    scale1 = 1.5\n    scale2 = 1.3\n\n    transform = juce.AffineTransform.scale(scale1) \\\n        .followedBy(juce.AffineTransform.rotation(juce.degreesToRadians(72.0))) \\\n        .followedBy(juce.AffineTransform.translation(100.0, 20.0)) \\\n        .followedBy(juce.AffineTransform.scale(scale2))\n\n    assert juce.approximatelyEqual(math.sqrt(math.fabs(transform.getDeterminant())), scale1 * scale2)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_BorderSize.py",
    "content": "from math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_construct_default():\n    border = juce.BorderSize[int]()\n    assert border.getTop() == 0\n    assert border.getLeft() == 0\n    assert border.getBottom() == 0\n    assert border.getRight() == 0\n    assert border.isEmpty()\n\n    border = juce.BorderSize[float]()\n    assert isclose(border.getTop(), 0)\n    assert isclose(border.getLeft(), 0)\n    assert isclose(border.getBottom(), 0)\n    assert isclose(border.getRight(), 0)\n    assert border.isEmpty()\n\n#==================================================================================================\n\ndef test_construct_with_values():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    assert border.getTop() == 2\n    assert border.getLeft() == 3\n    assert border.getBottom() == 4\n    assert border.getRight() == 5\n    assert not border.isEmpty()\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    assert isclose(border.getTop(), 2)\n    assert isclose(border.getLeft(), 3)\n    assert isclose(border.getBottom(), 4)\n    assert isclose(border.getRight(), 5)\n    assert not border.isEmpty()\n\n#==================================================================================================\n\ndef test_construct_with_single_value():\n    border = juce.BorderSize[int](7)\n    assert border.getTop() == 7\n    assert border.getLeft() == 7\n    assert border.getBottom() == 7\n    assert border.getRight() == 7\n    assert not border.isEmpty()\n\n    border = juce.BorderSize[float](7)\n    assert isclose(border.getTop(), 7)\n    assert isclose(border.getLeft(), 7)\n    assert isclose(border.getBottom(), 7)\n    assert isclose(border.getRight(), 7)\n    assert not border.isEmpty()\n\n#==================================================================================================\n\ndef test_get_top_and_bottom():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    assert border.getTopAndBottom() == 6\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    assert isclose(border.getTopAndBottom(), 6)\n\n#==================================================================================================\n\ndef test_get_left_and_right():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    assert border.getLeftAndRight() == 8\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    assert isclose(border.getLeftAndRight(), 8)\n\n#==================================================================================================\n\ndef test_set_top():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.setTop(10)\n    assert border.getTop() == 10\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.setTop(10)\n    assert isclose(border.getTop(), 10)\n\n#==================================================================================================\n\ndef test_set_left():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.setLeft(20)\n    assert border.getLeft() == 20\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.setLeft(20)\n    assert isclose(border.getLeft(), 20)\n\n#==================================================================================================\n\ndef test_set_bottom():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.setBottom(30)\n    assert border.getBottom() == 30\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.setBottom(30)\n    assert isclose(border.getBottom(), 30)\n\n#==================================================================================================\n\ndef test_set_right():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.setRight(40)\n    assert border.getRight() == 40\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.setRight(40)\n    assert isclose(border.getRight(), 40)\n\n#==================================================================================================\n\ndef test_subtract_from_rectangle():\n    original_rect = juce.Rectangle[int](10, 20, 30, 40)\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    result_rect = border.subtractedFrom(original_rect)\n    assert result_rect == juce.Rectangle[int](13, 22, 22, 34)\n\n    original_rect = juce.Rectangle[float](10, 20, 30, 40)\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    result_rect = border.subtractedFrom(original_rect)\n    assert result_rect == juce.Rectangle[float](13, 22, 22, 34)\n\n#==================================================================================================\n\ndef test_subtract_from_rectangle_in_place():\n    original_rect = juce.Rectangle[int](10, 20, 30, 40)\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.subtractFrom(original_rect)\n    assert original_rect == juce.Rectangle[int](13, 22, 22, 34)\n\n    original_rect = juce.Rectangle[float](10, 20, 30, 40)\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.subtractFrom(original_rect)\n    assert original_rect == juce.Rectangle[float](13, 22, 22, 34)\n\n#==================================================================================================\n\ndef test_add_to_rectangle():\n    original_rect = juce.Rectangle[int](10, 20, 30, 40)\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    result_rect = border.addedTo(original_rect)\n    assert result_rect == juce.Rectangle[int](7, 18, 38, 46)\n\n    original_rect = juce.Rectangle[float](10, 20, 30, 40)\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    result_rect = border.addedTo(original_rect)\n    assert result_rect == juce.Rectangle[float](7, 18, 38, 46)\n\n#==================================================================================================\n\ndef test_add_to_rectangle_in_place():\n    original_rect = juce.Rectangle[int](10, 20, 30, 40)\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    border.addTo(original_rect)\n    assert original_rect == juce.Rectangle[int](7, 18, 38, 46)\n\n    original_rect = juce.Rectangle[float](10, 20, 30, 40)\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    border.addTo(original_rect)\n    assert original_rect == juce.Rectangle[float](7, 18, 38, 46)\n\n#==================================================================================================\n\ndef test_subtract_from_border():\n    border1 = juce.BorderSize[int](2, 3, 4, 5)\n    border2 = juce.BorderSize[int](1, 2, 3, 4)\n    result_border = border1.subtractedFrom(border2)\n    assert result_border == juce.BorderSize[int](-1, -1, -1, -1)\n\n    border1 = juce.BorderSize[float](2, 3, 4, 5)\n    border2 = juce.BorderSize[float](1, 2, 3, 4)\n    result_border = border1.subtractedFrom(border2)\n    assert result_border == juce.BorderSize[float](-1, -1, -1, -1)\n\n#==================================================================================================\n\ndef test_add_to_border():\n    border1 = juce.BorderSize[int](2, 3, 4, 5)\n    border2 = juce.BorderSize[int](1, 2, 3, 4)\n    result_border = border1.addedTo(border2)\n    assert result_border == juce.BorderSize[int](3, 5, 7, 9)\n\n    border1 = juce.BorderSize[float](2, 3, 4, 5)\n    border2 = juce.BorderSize[float](1, 2, 3, 4)\n    result_border = border1.addedTo(border2)\n    assert result_border == juce.BorderSize[float](3, 5, 7, 9)\n\n#==================================================================================================\n\ndef test_multiply_by_scalar():\n    border = juce.BorderSize[int](2, 3, 4, 5)\n    result_border = border.multipliedBy(2)\n    assert result_border == juce.BorderSize[int](4, 6, 8, 10)\n\n    border = juce.BorderSize[float](2, 3, 4, 5)\n    result_border = border.multipliedBy(2.0)\n    assert result_border == juce.BorderSize[float](4, 6, 8, 10)\n\n#==================================================================================================\n\ndef test_equality():\n    border1 = juce.BorderSize[int](2, 3, 4, 5)\n    border2 = juce.BorderSize[int](2, 3, 4, 5)\n    assert border1 == border2\n\n    border1 = juce.BorderSize[float](2, 3, 4, 5)\n    border2 = juce.BorderSize[float](2, 3, 4, 5)\n    assert border1 == border2\n\n#==================================================================================================\n\ndef test_inequality():\n    border1 = juce.BorderSize[int](2, 3, 4, 5)\n    border2 = juce.BorderSize[int](1, 2, 3, 4)\n    assert border1 != border2\n\n    border1 = juce.BorderSize[float](2, 3, 4, 5)\n    border2 = juce.BorderSize[float](1, 2, 3, 4)\n    assert border1 != border2\n\n#==================================================================================================\n\ndef test_repr():\n    b = juce.BorderSize[int](2, 3, 4, 5)\n    assert repr(b) == \"popsicle.BorderSize[int](2, 3, 4, 5)\"\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Colour.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_construct_default():\n    c = juce.Colour()\n    assert c.getARGB() == 0x00000000\n\ndef test_construct_copy():\n    c1 = juce.Colour(0xFF112233)\n    c2 = juce.Colour(c1)\n    assert c1 == c2\n\ndef test_construct_rgb():\n    c = juce.Colour(0x11, 0x22, 0x33)\n    assert c.getARGB() == 0xFF112233\n\ndef test_construct_rgba():\n    c = juce.Colour(0x11, 0x22, 0x33, 0x44)\n    assert c.getARGB() == 0x44112233\n\ndef test_construct_hsb_int_alpha():\n    c = juce.Colour(0.5, 0.6, 0.7, 0xFF)\n    assert c.getARGB() == 0xFF47B2B2\n\ndef test_construct_hsb():\n    c = juce.Colour(0.5, 0.6, 0.7, 1.0)\n    assert c.getARGB() == 0xFF47B2B2\n\ndef test_construct_rgba_float_alpha():\n    c = juce.Colour(0x11, 0x22, 0x33, 0.4)\n    assert c.getARGB() == 0x66112233\n\ndef test_construct_from_argb():\n    c = juce.Colour(0xFF112233)\n    assert c.getARGB() == 0xFF112233\n\ndef test_construct_from_rgb():\n    c = juce.Colour.fromRGB(0x11, 0x22, 0x33)\n    assert c.getARGB() == 0xFF112233\n\ndef test_construct_from_rgba():\n    c = juce.Colour.fromRGBA(0x11, 0x22, 0x33, 0x44)\n    assert c.getARGB() == 0x44112233\n\ndef test_construct_from_float_rgba():\n    c = juce.Colour.fromFloatRGBA(0.1, 0.2, 0.3, 0.4)\n    assert c.getARGB() == 0x661A334C\n\ndef test_construct_from_hsv():\n    c = juce.Colour.fromHSV(0.5, 0.6, 0.7, 0.8)\n    assert c.getARGB() == 0xCC47B2B2\n\ndef test_construct_from_hsl():\n    c = juce.Colour.fromHSL(0.5, 0.6, 0.7, 0.8)\n    assert c.getARGB() == 0xCC85E0E0\n\ndef test_construct_with_pixel_argb():\n    pixel_argb = juce.PixelARGB(255, 0, 255, 0)\n    color = juce.Colour(pixel_argb)\n    assert color.getARGB() == 0xFF00FF00\n\ndef test_construct_with_pixel_rgb():\n    pixel_rgb = juce.PixelRGB(0, 255, 0)\n    color = juce.Colour(pixel_rgb)\n    assert color.getARGB() == 0xFF00FF00\n\ndef test_construct_with_pixel_alpha():\n    pixel_alpha = juce.PixelAlpha(255)\n    color = juce.Colour(pixel_alpha)\n    assert color.getARGB() == 0xFFFFFFFF\n\n#==================================================================================================\n\ndef test_getters():\n    c = juce.Colour(0xFF112233)\n    assert c.getRed() == 0x11\n    assert c.getGreen() == 0x22\n    assert c.getBlue() == 0x33\n    assert c.getAlpha() == 0xFF\n    assert c.getFloatRed() == pytest.approx(0.0666667)\n    assert c.getFloatGreen() == pytest.approx(0.1333333)\n    assert c.getFloatBlue() == pytest.approx(0.2)\n    assert c.getFloatAlpha() == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_get_pixel_argb():\n    c = juce.Colour(0xFFAABBCC)\n    pixel_argb = c.getPixelARGB()\n    assert pixel_argb.getNativeARGB() == 0xFFAABBCC\n\n#==================================================================================================\n\ndef test_get_non_premultiplied_pixel_argb():\n    c = juce.Colour(0x80AABBCC)\n    non_premultiplied_pixel_argb = c.getNonPremultipliedPixelARGB()\n    assert non_premultiplied_pixel_argb.getNativeARGB() == 0x80AABBCC\n\n#==================================================================================================\n\ndef test_equality():\n    color1 = juce.Colour(0xFF00FF00)\n    color2 = juce.Colour(0xFF00FF00)\n    assert color1 == color2\n\ndef test_inequality():\n    color1 = juce.Colour(0xFF00FF00)\n    color2 = juce.Colour(0xFFFF0000)\n    assert color1 != color2\n\n#==================================================================================================\n\ndef test_is_opaque():\n    opaque_color = juce.Colour(0xFF00FF00)\n    transparent_color = juce.Colour(0x00000000)\n    assert opaque_color.isOpaque()\n    assert not transparent_color.isOpaque()\n\n#==================================================================================================\n\ndef test_with_alpha_uint8():\n    color = juce.Colour(0xFF00FF00)\n    new_color = color.withAlpha(128)\n    assert new_color.getAlpha() == 0x80\n    assert new_color.getARGB() == 0x8000FF00\n\ndef test_with_alpha_float():\n    color = juce.Colour(0xFF00FF00)\n    new_color = color.withAlpha(0.5)\n    assert new_color.getAlpha() == 0x80\n    assert new_color.getARGB() == 0x8000FF00\n\n#==================================================================================================\n\ndef test_with_multiplied_alpha():\n    c = juce.Colour(0xFFAABBCC)\n    new_colour = c.withMultipliedAlpha(0.5)\n    assert new_colour.getARGB() == 0x80AABBCC\n\n#==================================================================================================\n\ndef test_get_hue():\n    c = juce.Colour(0xFFAABBCC)\n    assert c.getHue() == pytest.approx(0.5833333)\n\ndef test_get_saturation():\n    color = juce.Colour(0xFF00FF00)\n    assert color.getSaturation() == pytest.approx(1.0)\n\ndef test_get_saturation_hsl():\n    color = juce.Colour(0xFF00FFFF)\n    assert color.getSaturationHSL() == pytest.approx(1.0)\n\ndef test_get_brightness():\n    color = juce.Colour(0xFF0000FF)\n    assert color.getBrightness() == pytest.approx(1.0)\n\ndef test_get_lightness():\n    color = juce.Colour(0xFF0000FF)\n    assert color.getLightness() == pytest.approx(0.5)\n\ndef test_get_perceived_brightness():\n    color = juce.Colour(0xFF0000FF)\n    assert color.getPerceivedBrightness() == pytest.approx(0.260768)\n\n#==================================================================================================\n\ndef test_get_hsb():\n    color = juce.Colour(0xFF0000FF)\n    hue, saturation, brightness = color.getHSB()\n    assert hue == pytest.approx(0.6666666666)\n    assert saturation == pytest.approx(1.0)\n    assert brightness == pytest.approx(1.0)\n\ndef test_get_hsl():\n    color = juce.Colour(0xFF0000FF)\n    hue, saturation, lightness = color.getHSL()\n    assert hue == pytest.approx(0.6666666666)\n    assert saturation == pytest.approx(1.0)\n    assert lightness == pytest.approx(0.5)\n\n#==================================================================================================\n\ndef test_with_hue():\n    original_color = juce.Colour(0xFFFF0000)\n    new_color = original_color.withHue(0.5)\n    assert new_color.getARGB() == 0xFF00FFFF\n\ndef test_with_saturation():\n    original_color = juce.Colour(0xFF0000FF)\n    new_color = original_color.withSaturation(0.5)\n    assert new_color.getARGB() == 0xFF8080FF\n\ndef test_with_brightness():\n    original_color = juce.Colour(0xFF808080)\n    new_color = original_color.withBrightness(0.5)\n    assert new_color.getARGB() == 0xFF808080\n\ndef test_with_saturation_hsl():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withSaturationHSL(0.5)\n    assert new_colour.getARGB() == 0xFF4040BF\n\ndef test_with_lightness():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withLightness(0.5)\n    assert new_colour.getARGB() == 0xFF0000FF\n\ndef test_with_rotated_hue():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withRotatedHue(0.1)\n    assert new_colour.getARGB() == 0xFF9900FF\n\n#==================================================================================================\n\ndef test_with_multiplied_saturation():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withMultipliedSaturation(0.5)\n    assert new_colour.getARGB() == 0xFF8080FF\n\ndef test_with_multiplied_saturation_hsl():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withMultipliedSaturationHSL(0.5)\n    assert new_colour.getARGB() == 0xFF4040BF\n\ndef test_with_multiplied_brightness():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withMultipliedBrightness(0.5)\n    assert new_colour.getARGB() == 0xFF000080\n\ndef test_with_multiplied_lightness():\n    colour = juce.Colour(0xFF0000FF)\n    new_colour = colour.withMultipliedLightness(0.5)\n    assert new_colour.getARGB() == 0xFF000080\n\n#==================================================================================================\n\ndef test_brighter():\n    colour = juce.Colour(0xFF0000FF)\n    brighter_colour = colour.brighter(1.5)\n    assert brighter_colour.getARGB() == 0xFF9999FF\n\ndef test_darker():\n    colour = juce.Colour(0xFF0000FF)\n    darker_colour = colour.darker(1.5)\n    assert darker_colour.getARGB() == 0xFF000066\n\n#==================================================================================================\n\ndef test_contrasting():\n    colour = juce.Colour(0xFF0000FF)\n    contrasting_colour = colour.contrasting(1.0)\n    assert isinstance(contrasting_colour, juce.Colour)\n\ndef test_contrasting_with_min_luminosity_diff():\n    colour = juce.Colour(0xFF0000FF)\n    contrasting_colour = colour.contrasting(juce.Colour(0xFFFFFFFF), 0.5)\n    assert contrasting_colour.getARGB() == 0xFFFFFFFF\n\ndef test_contrasting_static():\n    colour1 = juce.Colour(0xFF0000FF)\n    colour2 = juce.Colour(0xFFFFFFFF)\n    contrasting_colour = juce.Colour.contrasting(colour1, 0.5)\n    assert isinstance(contrasting_colour, juce.Colour)\n    contrasting_colour = juce.Colour.contrasting(colour1, colour2, 0.5)\n    assert isinstance(contrasting_colour, juce.Colour)\n\n#==================================================================================================\n\ndef test_grey_level():\n    grey_colour = juce.Colour.greyLevel(0.5)\n    assert grey_colour.getARGB() == 0xFF808080\n\n#==================================================================================================\n\ndef test_overlaid_with():\n    c1 = juce.Colour(0xFFFF0000)  # Red\n    c2 = juce.Colour(0xFF00FF00)  # Green\n    c3 = juce.Colour(0x7F00FF00)  # Green\n    overlaid = c1.overlaidWith(c2)\n    assert overlaid.getARGB() == 0xFF00FF00\n    overlaid = c1.overlaidWith(c3)\n    assert overlaid.getARGB() == 0xFF7F7F00\n    overlaid = c3.overlaidWith(c1)\n    assert overlaid.getARGB() == 0xFFFF0000\n\n#==================================================================================================\n\ndef test_interpolated_with():\n    c1 = juce.Colour(0xFFFF0000)  # Red\n    c2 = juce.Colour(0xFF0000FF)  # Blue\n    interpolated = c1.interpolatedWith(c2, 0.0)\n    assert interpolated == c1\n    interpolated = c1.interpolatedWith(c2, 0.5)\n    assert interpolated.getARGB() == 0xFF7F007F\n    interpolated = c1.interpolatedWith(c2, 1.0)\n    assert interpolated == c2\n\n#==================================================================================================\n\ndef test_to_string():\n    colour = juce.Colour(0xFF0000FF)\n    assert isinstance(colour.toString(), str)\n\ndef test_to_display_string():\n    colour = juce.Colour(0xFF0000FF)\n    assert isinstance(colour.toDisplayString(True), str)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_ColourGradient.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_construct_default():\n    c = juce.ColourGradient()\n    assert c.getNumColours() == 0\n    assert c.isOpaque()\n    assert c.isRadial == False\n    assert c.point1 == juce.Point[float](0, 0) or c.point1 == juce.Point[float](987654, 0)\n    assert c.point2 == juce.Point[float](0, 0)\n\n#==================================================================================================\n\ndef test_copy_construct():\n    c1 = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    c2 = juce.ColourGradient(c1)\n    assert c1 == c2\n    assert not (c1 != c2)\n\n#==================================================================================================\n\ndef test_construct_coordinates_linear():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    assert c.isRadial == False\n    assert c.point1 == juce.Point[float](0, 0)\n    assert c.point2 == juce.Point[float](1, 1)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_construct_points_linear():\n    c = juce.ColourGradient(juce.Colours.black, juce.Point[float](0.0, 0.0), juce.Colours.white, juce.Point[float](1.0, 1.0), False)\n    assert c.isRadial == False\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\n#==================================================================================================\n\ndef test_construct_coordinates_radial():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, True)\n    assert c.isRadial == True\n    assert c.point1 == juce.Point[float](0, 0)\n    assert c.point2 == juce.Point[float](1, 1)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_construct_points_radial():\n    c = juce.ColourGradient(juce.Colours.black, juce.Point[float](0.0, 0.0), juce.Colours.white, juce.Point[float](1.0, 1.0), True)\n    assert c.isRadial == True\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\n#==================================================================================================\n\ndef test_colour_at_position():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    assert c.getColourAtPosition(0.0) == juce.Colours.black\n    assert c.getColourAtPosition(0.5) == juce.Colour(127, 127, 127)\n    assert c.getColourAtPosition(1.0) == juce.Colours.white\n\n#==================================================================================================\n\ndef test_get_colour_position():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    assert c.getColourPosition(0) == pytest.approx(0.0)\n    assert c.getColourPosition(1) == pytest.approx(1.0)\n\n#==================================================================================================\n\ndef test_set_colour():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    c.setColour(0, juce.Colours.red)\n    c.setColour(1, juce.Colours.green)\n    assert c.getColour(0) == juce.Colours.red\n    assert c.getColour(1) == juce.Colours.green\n\n#==================================================================================================\n\ndef test_add_remove_colour():\n    c = juce.ColourGradient()\n    assert c.getNumColours() == 0\n\n    c.addColour(0.0, juce.Colours.yellow)\n    assert c.getNumColours() == 1\n    assert c.getColour(0) == juce.Colours.yellow\n\n    c.addColour(0.5, juce.Colours.green)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.yellow\n    assert c.getColour(1) == juce.Colours.green\n\n    c.addColour(1.0, juce.Colours.red)\n    assert c.getNumColours() == 3\n    assert c.getColour(0) == juce.Colours.yellow\n    assert c.getColour(1) == juce.Colours.green\n    assert c.getColour(2) == juce.Colours.red\n\n    c.removeColour(1)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.yellow\n    assert c.getColour(1) == juce.Colours.red\n\n    c.clearColours()\n    assert c.getNumColours() == 0\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"JUCE bug, assert raises when removing index 0\")\ndef test_remove_colour():\n    c = juce.ColourGradient()\n    assert c.getNumColours() == 0\n\n    c.addColour(0.0, juce.Colours.yellow)\n    assert c.getNumColours() == 1\n    assert c.getColour(0) == juce.Colours.yellow\n\n    c.removeColour(0)\n    assert c.getNumColours() == 0\n\n#==================================================================================================\n\ndef test_vertical_values():\n    c = juce.ColourGradient.vertical(juce.Colours.black, 0.0, juce.Colours.white, 1.0)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_vertical_rectangle_int():\n    c = juce.ColourGradient.vertical(juce.Colours.black, juce.Colours.white, juce.Rectangle[int](0, 0, 100, 100))\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_vertical_rectangle_float():\n    c = juce.ColourGradient.vertical(juce.Colours.black, juce.Colours.white, juce.Rectangle[float](0, 0, 100, 100))\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\n#==================================================================================================\n\ndef test_horizontal_values():\n    c = juce.ColourGradient.horizontal(juce.Colours.black, 0.0, juce.Colours.white, 1.0)\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_horizontal_rectangle_int():\n    c = juce.ColourGradient.horizontal(juce.Colours.black, juce.Colours.white, juce.Rectangle[int](0, 0, 100, 100))\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\ndef test_horizontal_rectangle_float():\n    c = juce.ColourGradient.horizontal(juce.Colours.black, juce.Colours.white, juce.Rectangle[float](0, 0, 100, 100))\n    assert c.getNumColours() == 2\n    assert c.getColour(0) == juce.Colours.black\n    assert c.getColour(1) == juce.Colours.white\n\n#==================================================================================================\n\ndef test_is_invisible_is_opaque():\n    c = juce.ColourGradient(juce.Colours.black, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    assert not c.isInvisible()\n    assert c.isOpaque()\n\n    c = juce.ColourGradient(juce.Colours.transparentBlack, 0.0, 0.0, juce.Colours.white, 1.0, 1.0, False)\n    assert not c.isInvisible()\n    assert not c.isOpaque()\n\n    c = juce.ColourGradient(juce.Colours.transparentBlack, 0.0, 0.0, juce.Colours.transparentWhite, 1.0, 1.0, False)\n    assert c.isInvisible()\n    assert not c.isOpaque()\n"
  },
  {
    "path": "tests/test_juce_graphics/test_FillType.py",
    "content": "import pytest\n\nfrom .utilities import get_logo_image\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_default_constructor():\n    f = juce.FillType()\n    assert f.colour == juce.Colour(0xff000000)\n    assert f.gradient is None\n    assert f.image == juce.Image()\n    assert f.transform == juce.AffineTransform()\n    assert f.isColour()\n    assert not f.isGradient()\n    assert not f.isTiledImage()\n\n#==================================================================================================\n\ndef test_colour_constructor():\n    f = juce.FillType(juce.Colours.red)\n    assert f.colour == juce.Colours.red\n    assert f.gradient is None\n    assert f.image == juce.Image()\n    assert f.transform == juce.AffineTransform()\n    assert f.isColour()\n    assert not f.isGradient()\n    assert not f.isTiledImage()\n\n#==================================================================================================\n\ndef test_gradient_constructor():\n    f = juce.FillType(juce.ColourGradient.vertical(juce.Colours.red, 0.0, juce.Colours.green, 1.0))\n    assert f.colour == juce.Colour(0xff000000)\n    assert f.gradient == juce.ColourGradient.vertical(juce.Colours.red, 0.0, juce.Colours.green, 1.0)\n    assert f.image == juce.Image()\n    assert f.transform == juce.AffineTransform()\n    assert not f.isColour()\n    assert f.isGradient()\n    assert not f.isTiledImage()\n\n#==================================================================================================\n\ndef test_image_constructor():\n    f = juce.FillType(get_logo_image(), juce.AffineTransform.translation(10.0, 10))\n    assert f.colour == juce.Colour(0xff000000)\n    assert f.gradient is None\n    assert f.image == get_logo_image()\n    assert f.transform == juce.AffineTransform.translation(10.0, 10)\n    assert not f.isColour()\n    assert not f.isGradient()\n    assert f.isTiledImage()\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    f1 = juce.FillType(juce.Colours.red)\n    f2 = juce.FillType(f1)\n    assert f1.colour == f2.colour\n    assert f1 == f2\n    assert not (f1 != f2)\n\n#==================================================================================================\n\ndef test_set_colour():\n    f = juce.FillType(juce.ColourGradient.vertical(juce.Colours.red, 0.0, juce.Colours.green, 1.0))\n    f.setColour(juce.Colours.red)\n    assert f.isColour()\n    assert not f.isGradient()\n\n#==================================================================================================\n\ndef test_set_gradient():\n    f = juce.FillType(juce.Colours.red)\n    f.setGradient(juce.ColourGradient.vertical(juce.Colours.red, 0.0, juce.Colours.green, 1.0))\n    assert not f.isColour()\n    assert f.isGradient()\n\n#==================================================================================================\n\ndef test_set_image():\n    f = juce.FillType(juce.Colours.red)\n    f.setTiledImage(get_logo_image(), juce.AffineTransform.translation(10.0, 10))\n    assert not f.isColour()\n    assert f.isTiledImage()\n\n#==================================================================================================\n\ndef test_set_opacity():\n    f = juce.FillType(juce.Colours.red)\n    assert not f.isInvisible()\n    assert f.getOpacity() == pytest.approx(1.0)\n\n    f.setOpacity(0.0)\n    assert f.isColour()\n    assert f.getOpacity() == pytest.approx(0.0)\n    assert f.isInvisible()\n\n#==================================================================================================\n\ndef test_transformed():\n    f = juce.FillType(get_logo_image(), juce.AffineTransform())\n    result = f.transformed(juce.AffineTransform.translation(10.0, 10))\n    assert result.transform == juce.AffineTransform.translation(10.0, 10)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Graphics.py",
    "content": "import sys\nimport pytest\n\nimport popsicle as juce\nfrom .utilities import get_logo_image, is_image_equal_reference\n\n#if sys.platform == \"win32\":\n#    pytest.skip(allow_module_level=True)\n\n#==================================================================================================\n\nwidth = 400\nheight = 400\n\n#==================================================================================================\n\n@pytest.fixture(scope=\"session\")\ndef update_rendering(pytestconfig):\n    return pytestconfig.getoption(\"update_rendering\")\n\n#==================================================================================================\n\ndef test_fill_all(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n\n    g.setColour(juce.Colours.slategrey)\n    g.fillAll()\n\n    assert is_image_equal_reference(update_rendering, image)\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Png format loads differently in each platform\")\ndef test_fill_all_image(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n\n    g.setTiledImageFill(get_logo_image(), 0, 0, 1.0)\n    g.fillAll()\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\ndef test_fill_rect(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(50)\n\n    g.setColour(juce.Colours.magenta)\n    g.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight())\n\n    assert is_image_equal_reference(update_rendering, image)\n\ndef test_fill_rect_area(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n\n    g.setColour(juce.Colours.magenta)\n    g.fillRect(image.getBounds().reduced(50))\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\ndef test_fill_rect_gradient_vertical(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(50)\n\n    c = juce.ColourGradient.vertical(juce.Colours.magenta, 0.0, juce.Colours.yellow, rect.getHeight())\n    g.setFillType(juce.FillType(c))\n    g.fillRect(rect)\n\n    assert is_image_equal_reference(update_rendering, image)\n\ndef test_fill_rect_gradient_vertical_area(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(50)\n\n    c = juce.ColourGradient.vertical(juce.Colours.magenta, juce.Colours.yellow, rect)\n    g.setGradientFill(c)\n    g.fillRect(rect)\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\ndef test_fill_rect_gradient_horizontal(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(50)\n\n    c = juce.ColourGradient.horizontal(juce.Colours.red, 0.0, juce.Colours.green, rect.getWidth())\n    g.setFillType(juce.FillType(c))\n    g.fillRect(rect)\n\n    assert is_image_equal_reference(update_rendering, image)\n\ndef test_fill_rect_gradient_horizontal_area(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(50)\n\n    c = juce.ColourGradient.horizontal(juce.Colours.red, juce.Colours.green, rect)\n    g.setGradientFill(c)\n    g.fillRect(rect)\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Png format loads differently in each platform\")\ndef test_fill_rect_image(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    rect = image.getBounds().reduced(100)\n\n    g.setTiledImageFill(get_logo_image(), 50, 50, 1.0)\n    g.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight())\n\n    assert is_image_equal_reference(update_rendering, image)\n\n@pytest.mark.skipif(sys.platform != \"darwin\", reason=\"Png format loads differently in each platform\")\ndef test_fill_rect_image_area(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n\n    g.setTiledImageFill(get_logo_image(), 50, 50, 1.0)\n    g.fillRect(image.getBounds().reduced(100))\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\ndef test_draw_rect(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    g.fillAll(juce.Colours.black)\n\n    c = juce.Colours.darkmagenta.darker(1.0)\n    b = image.getBounds()\n    for x in range(15):\n        c = c.brighter(0.1)\n        b = b.reduced(15 + x)\n        g.setColour(c)\n        g.drawRect(b, 15 - x)\n\n        g.setColour(juce.Colours.yellow)\n        g.drawRect(b, 1)\n\n    assert is_image_equal_reference(update_rendering, image)\n\n#==================================================================================================\n\ndef test_draw_rounded_rect(update_rendering):\n    image = juce.Image(juce.Image.ARGB, width, height, True)\n    llsr = juce.LowLevelGraphicsSoftwareRenderer(image)\n    g = juce.Graphics(llsr)\n    g.fillAll(juce.Colours.black)\n\n    c = juce.Colours.darkmagenta.darker(1.0)\n    b = image.getBounds().toFloat()\n    k = 0\n    for x in range(15):\n        c = c.brighter(0.1)\n        b = b.reduced(15 + x)\n        k = k + 4\n        g.setColour(c)\n        g.drawRoundedRectangle(b, k, 15 - x)\n\n        g.setColour(juce.Colours.yellow)\n        g.drawRect(b, 1)\n\n    assert is_image_equal_reference(update_rendering, image, threshold=1e-09)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Justification.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor():\n    b = juce.Justification(juce.Justification.centred)\n    assert b.getFlags() == juce.Justification.centred\n\n    b = juce.Justification(juce.Justification.verticallyCentred | juce.Justification.horizontallyJustified)\n    assert b.getFlags() == juce.Justification.verticallyCentred | juce.Justification.horizontallyJustified\n    assert b.testFlags(juce.Justification.verticallyCentred)\n    assert b.testFlags(juce.Justification.horizontallyJustified)\n    assert b.testFlags(juce.Justification.centred)\n    assert not b.testFlags(juce.Justification.left)\n    assert not b.testFlags(juce.Justification.right)\n\n#==================================================================================================\n\ndef test_comparison():\n    b = juce.Justification(juce.Justification.centred)\n    c = juce.Justification(juce.Justification.left)\n    assert b == juce.Justification.centred\n    assert b != juce.Justification.left\n    assert c != juce.Justification.centred\n    assert c == juce.Justification.left\n    assert b == b\n    assert b != c\n\n#==================================================================================================\n\ndef test_get_only_flags():\n    b = juce.Justification(juce.Justification.verticallyCentred | juce.Justification.horizontallyJustified)\n    assert b.getOnlyVerticalFlags() == juce.Justification.verticallyCentred\n    assert b.getOnlyHorizontalFlags() == juce.Justification.horizontallyJustified\n\n#==================================================================================================\n\ndef test_apply_to_rectangle_int():\n    b = juce.Justification(juce.Justification.left)\n\n    outer = juce.Rectangle[int](10, 10, 100, 100)\n    inner = juce.Rectangle[int](20, 20, 20, 20)\n\n    result = b.appliedToRectangle(inner, outer)\n    assert result == juce.Rectangle[int](10, 10, 20, 20)\n\n    result = b.appliedToRectangle(outer, inner)\n    assert result == juce.Rectangle[int](20, 20, 100, 100)\n\n#==================================================================================================\n\ndef test_apply_to_rectangle_float():\n    b = juce.Justification(juce.Justification.bottomRight)\n\n    outer = juce.Rectangle[float](10, 10, 100, 100)\n    inner = juce.Rectangle[float](20, 20, 20, 20)\n\n    result = b.appliedToRectangle(inner, outer)\n    assert result == juce.Rectangle[float](90, 90, 20, 20)\n\n    result = b.appliedToRectangle(outer, inner)\n    assert result == juce.Rectangle[float](-60, -60, 100, 100)\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Line.py",
    "content": "from math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_empty_constructor():\n    p = juce.Line[int]()\n    assert p.getStartX() == 0\n    assert p.getStartY() == 0\n    assert p.getEndX() == 0\n    assert p.getEndY() == 0\n\n    p = juce.Line[float]()\n    assert isclose(p.getStartX(), 0)\n    assert isclose(p.getStartY(), 0)\n    assert isclose(p.getEndX(), 0)\n    assert isclose(p.getEndY(), 0)\n\n#==================================================================================================\n\ndef test_values_constructor():\n    p = juce.Line[int](1, 1, 10, 10)\n    assert p.getStartX() == 1\n    assert p.getStartY() == 1\n    assert p.getEndX() == 10\n    assert p.getEndY() == 10\n\n    p = juce.Line[float](1, 1, 10, 10)\n    assert isclose(p.getStartX(), 1)\n    assert isclose(p.getStartY(), 1)\n    assert isclose(p.getEndX(), 10)\n    assert isclose(p.getEndY(), 10)\n\n#==================================================================================================\n\ndef test_points_constructor():\n    p = juce.Line[int](juce.Point[int](1, 1), juce.Point[int](10, 10))\n    assert p.getStartX() == 1\n    assert p.getStartY() == 1\n    assert p.getEndX() == 10\n    assert p.getEndY() == 10\n\n    p = juce.Line[float](juce.Point[float](1, 1), juce.Point[float](10, 10))\n    assert isclose(p.getStartX(), 1)\n    assert isclose(p.getStartY(), 1)\n    assert isclose(p.getEndX(), 10)\n    assert isclose(p.getEndY(), 10)\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    a = juce.Line[int](juce.Point[int](1, 1), juce.Point[int](10, 10))\n    p = juce.Line[int](a)\n    assert p.getStartX() == 1\n    assert p.getStartY() == 1\n    assert p.getEndX() == 10\n    assert p.getEndY() == 10\n\n    a = juce.Line[float](juce.Point[float](1, 1), juce.Point[float](10, 10))\n    p = juce.Line[float](a)\n    assert isclose(p.getStartX(), 1)\n    assert isclose(p.getStartY(), 1)\n    assert isclose(p.getEndX(), 10)\n    assert isclose(p.getEndY(), 10)\n\n#==================================================================================================\n\ndef test_get_start_end():\n    p = juce.Line[int](1, 1, 10, 10)\n    assert p.getStart().x == 1\n    assert p.getStart().y == 1\n    assert p.getEnd().x == 10\n    assert p.getEnd().y == 10\n\n    p = juce.Line[float](1, 1, 10, 10)\n    assert isclose(p.getStart().x, 1)\n    assert isclose(p.getStart().y, 1)\n    assert isclose(p.getEnd().x, 10)\n    assert isclose(p.getEnd().y, 10)\n\n#==================================================================================================\n\ndef test_set_start_end_values():\n    p = juce.Line[int]()\n    p.setStart(1, 1)\n    p.setEnd(10, 10)\n    assert p.getStartX() == 1\n    assert p.getStartY() == 1\n    assert p.getEndX() == 10\n    assert p.getEndY() == 10\n\n    p = juce.Line[float]()\n    p.setStart(1, 1)\n    p.setEnd(10, 10)\n    assert isclose(p.getStartX(), 1)\n    assert isclose(p.getStartY(), 1)\n    assert isclose(p.getEndX(), 10)\n    assert isclose(p.getEndY(), 10)\n\n#==================================================================================================\n\ndef test_reversed():\n    p = juce.Line[int](1, 1, 10, 10)\n    p = p.reversed()\n    assert p.getStartX() == 10\n    assert p.getStartY() == 10\n    assert p.getEndX() == 1\n    assert p.getEndY() == 1\n\n    p = juce.Line[float](1, 1, 10, 10)\n    p = p.reversed()\n    assert isclose(p.getStartX(), 10)\n    assert isclose(p.getStartY(), 10)\n    assert isclose(p.getEndX(), 1)\n    assert isclose(p.getEndY(), 1)\n\n#==================================================================================================\n\ndef test_apply_transform():\n    t = juce.AffineTransform.translation(10, 10)\n\n    p = juce.Line[int](1, 1, 10, 10)\n    p.applyTransform(t)\n    assert p.getStartX() == 11\n    assert p.getStartY() == 11\n    assert p.getEndX() == 20\n    assert p.getEndY() == 20\n\n    p = juce.Line[float](1, 1, 10, 10)\n    p.applyTransform(t)\n    assert isclose(p.getStartX(), 11)\n    assert isclose(p.getStartY(), 11)\n    assert isclose(p.getEndX(), 20)\n    assert isclose(p.getEndY(), 20)\n\n#==================================================================================================\n\ndef test_length():\n    p = juce.Line[int](0, 0, 0, 10)\n    assert isclose(p.getLength(), 10)\n    assert isclose(p.getLengthSquared(), 100)\n\n    p = juce.Line[int](0, 0, 10, 10)\n    assert isclose(p.getLength(), 14)\n    assert isclose(p.getLengthSquared(), 200)\n\n    p = juce.Line[float](0, 0, 0, 10)\n    assert isclose(p.getLength(), 10)\n    assert isclose(p.getLengthSquared(), 100)\n\n    p = juce.Line[float](0, 0, 10, 10)\n    assert isclose(p.getLength(), 14.142135620117188)\n    assert isclose(p.getLengthSquared(), 200)\n\n#==================================================================================================\n\ndef test_vertical_horizontal():\n    p = juce.Line[int](0, 0, 0, 10)\n    assert p.isVertical()\n    assert not p.isHorizontal()\n\n    p = juce.Line[int](0, 0, 10, 0)\n    assert not p.isVertical()\n    assert p.isHorizontal()\n\n    p = juce.Line[float](0, 0, 0, 10)\n    assert p.isVertical()\n    assert not p.isHorizontal()\n\n    p = juce.Line[float](0, 0, 10, 0)\n    assert not p.isVertical()\n    assert p.isHorizontal()\n\n#==================================================================================================\n\ndef test_get_angle():\n    p = juce.Line[int](0, 0, 0, 10)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), 180, rel_tol=1e-06)\n\n    p = juce.Line[int](0, 10, 0, 0)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), 0.0, rel_tol=1e-06)\n\n    p = juce.Line[int](10, 10, 0, 0)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), -45.0, rel_tol=1e-06)\n\n    p = juce.Line[float](0, 0, 0, 10)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), 180, rel_tol=1e-06)\n\n    p = juce.Line[float](0, 10, 0, 0)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), 0.0, rel_tol=1e-06)\n\n    p = juce.Line[float](10, 10, 0, 0)\n    assert isclose(juce.radiansToDegrees(p.getAngle()), -45.0, rel_tol=1e-06)\n\n#==================================================================================================\n\ndef test_to_float():\n    p = juce.Line[int](1, 1, 2, 2).toFloat()\n    assert isinstance(p.getStart().x, float)\n    assert isinstance(p.getStart().y, float)\n    assert isinstance(p.getEnd().x, float)\n    assert isinstance(p.getEnd().y, float)\n    assert isclose(p.getStartX(), 1)\n    assert isclose(p.getStartY(), 1)\n    assert isclose(p.getEndX(), 2)\n    assert isclose(p.getEndY(), 2)\n\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Parallelogram.py",
    "content": "import pytest\nfrom math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_empty_constructor():\n    p = juce.Parallelogram[int]()\n    assert p.topLeft.x == 0\n    assert p.topLeft.y == 0\n    assert p.topRight.x == 0\n    assert p.topRight.y == 0\n    assert p.bottomLeft.x == 0\n    assert p.bottomLeft.y == 0\n    # assert p.isEmpty()\n    assert p.isFinite()\n    assert p.getWidth() == 0\n    assert p.getHeight() == 0\n    assert p == p\n\n    p = juce.Parallelogram[float]()\n    assert isclose(p.topLeft.x, 0.0)\n    assert isclose(p.topLeft.y, 0.0)\n    assert isclose(p.topRight.x, 0.0)\n    assert isclose(p.topRight.y, 0.0)\n    assert isclose(p.bottomLeft.x, 0.0)\n    assert isclose(p.bottomLeft.y, 0.0)\n    # assert p.isEmpty()\n    assert p.isFinite()\n    assert isclose(p.getWidth(), 0.0)\n    assert isclose(p.getHeight(), 0.0)\n    assert p == p\n\n#==================================================================================================\n\ndef test_rectangle_constructor():\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    assert p.getTopLeft().x == 10\n    assert p.getTopLeft().y == 10\n    assert p.getTopRight().x == 30\n    assert p.getTopRight().y == 10\n    assert p.getBottomLeft().x == 10\n    assert p.getBottomLeft().y == 30\n    assert p.isFinite()\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n    assert p == p\n    assert p != juce.Parallelogram[int]()\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    assert isclose(p.getTopLeft().x, 10.0)\n    assert isclose(p.getTopLeft().y, 10.0)\n    assert isclose(p.getTopRight().x, 30.0)\n    assert isclose(p.getTopRight().y, 10.0)\n    assert isclose(p.getBottomLeft().x, 10.0)\n    assert isclose(p.getBottomLeft().y, 30.0)\n    assert p.isFinite()\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n    assert p == p\n    assert p != juce.Parallelogram[float]()\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"This is a JUCE bug\")\ndef test_is_empty():\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    assert not p.isEmpty()\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    assert not p.isEmpty()\n\n#==================================================================================================\n\ndef test_operator_add_assign():\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p += juce.Point[int](1, 2)\n    assert p.getTopLeft().x == 11\n    assert p.getTopLeft().y == 12\n    assert p.getTopRight().x == 31\n    assert p.getTopRight().y == 12\n    assert p.getBottomLeft().x == 11\n    assert p.getBottomLeft().y == 32\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p += juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 11.0)\n    assert isclose(p.getTopLeft().y, 12.0)\n    assert isclose(p.getTopRight().x, 31.0)\n    assert isclose(p.getTopRight().y, 12.0)\n    assert isclose(p.getBottomLeft().x, 11.0)\n    assert isclose(p.getBottomLeft().y, 32.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n\n#==================================================================================================\n\ndef test_operator_add():\n    a = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p = a + juce.Point[int](1, 2)\n    assert p.getTopLeft().x == 11\n    assert p.getTopLeft().y == 12\n    assert p.getTopRight().x == 31\n    assert p.getTopRight().y == 12\n    assert p.getBottomLeft().x == 11\n    assert p.getBottomLeft().y == 32\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n\n    b = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p = b + juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 11.0)\n    assert isclose(p.getTopLeft().y, 12.0)\n    assert isclose(p.getTopRight().x, 31.0)\n    assert isclose(p.getTopRight().y, 12.0)\n    assert isclose(p.getBottomLeft().x, 11.0)\n    assert isclose(p.getBottomLeft().y, 32.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n\n#==================================================================================================\n\ndef test_operator_sub_assign():\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p -= juce.Point[int](1, 2)\n    assert p.getTopLeft().x == 9\n    assert p.getTopLeft().y == 8\n    assert p.getTopRight().x == 29\n    assert p.getTopRight().y == 8\n    assert p.getBottomLeft().x == 9\n    assert p.getBottomLeft().y == 28\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p -= juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 9.0)\n    assert isclose(p.getTopLeft().y, 8.0)\n    assert isclose(p.getTopRight().x, 29.0)\n    assert isclose(p.getTopRight().y, 8.0)\n    assert isclose(p.getBottomLeft().x, 9.0)\n    assert isclose(p.getBottomLeft().y, 28.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n\n#==================================================================================================\n\ndef test_operator_sub():\n    a = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p = a - juce.Point[int](1, 2)\n    assert p.getTopLeft().x == 9\n    assert p.getTopLeft().y == 8\n    assert p.getTopRight().x == 29\n    assert p.getTopRight().y == 8\n    assert p.getBottomLeft().x == 9\n    assert p.getBottomLeft().y == 28\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n\n    b = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p = b - juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 9.0)\n    assert isclose(p.getTopLeft().y, 8.0)\n    assert isclose(p.getTopRight().x, 29.0)\n    assert isclose(p.getTopRight().y, 8.0)\n    assert isclose(p.getBottomLeft().x, 9.0)\n    assert isclose(p.getBottomLeft().y, 28.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n\n#==================================================================================================\n\ndef test_operator_mul_assign():\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p *= juce.Point[float](1, 2)\n    assert p.getTopLeft().x == 10\n    assert p.getTopLeft().y == 20\n    assert p.getTopRight().x == 30\n    assert p.getTopRight().y == 20\n    assert p.getBottomLeft().x == 10\n    assert p.getBottomLeft().y == 60\n    assert p.getWidth() == 20\n    assert p.getHeight() == 40\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p *= juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 10.0)\n    assert isclose(p.getTopLeft().y, 20.0)\n    assert isclose(p.getTopRight().x, 30.0)\n    assert isclose(p.getTopRight().y, 20.0)\n    assert isclose(p.getBottomLeft().x, 10.0)\n    assert isclose(p.getBottomLeft().y, 60.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 40.0)\n\n#==================================================================================================\n\ndef test_operator_mul():\n    a = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p = a * juce.Point[float](1, 2)\n    assert p.getTopLeft().x == 10\n    assert p.getTopLeft().y == 20\n    assert p.getTopRight().x == 30\n    assert p.getTopRight().y == 20\n    assert p.getBottomLeft().x == 10\n    assert p.getBottomLeft().y == 60\n    assert p.getWidth() == 20\n    assert p.getHeight() == 40\n\n    b = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p = b * juce.Point[float](1, 2)\n    assert isclose(p.getTopLeft().x, 10.0)\n    assert isclose(p.getTopLeft().y, 20.0)\n    assert isclose(p.getTopRight().x, 30.0)\n    assert isclose(p.getTopRight().y, 20.0)\n    assert isclose(p.getBottomLeft().x, 10.0)\n    assert isclose(p.getBottomLeft().y, 60.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 40.0)\n\n#==================================================================================================\n\ndef test_transformed_by():\n    t = juce.AffineTransform.translation(10, 10)\n\n    p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))\n    p = p.transformedBy(t)\n    assert p.getTopLeft().x == 20\n    assert p.getTopLeft().y == 20\n    assert p.getTopRight().x == 40\n    assert p.getTopRight().y == 20\n    assert p.getBottomLeft().x == 20\n    assert p.getBottomLeft().y == 40\n    assert p.getWidth() == 20\n    assert p.getHeight() == 20\n\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n    p = p.transformedBy(t)\n    assert isclose(p.getTopLeft().x, 20.0)\n    assert isclose(p.getTopLeft().y, 20.0)\n    assert isclose(p.getTopRight().x, 40.0)\n    assert isclose(p.getTopRight().y, 20.0)\n    assert isclose(p.getBottomLeft().x, 20.0)\n    assert isclose(p.getBottomLeft().y, 40.0)\n    assert isclose(p.getWidth(), 20.0)\n    assert isclose(p.getHeight(), 20.0)\n\n#==================================================================================================\n\ndef test_relative_point():\n    p = juce.Parallelogram[float](juce.Rectangle[float](10, 10, 20, 20))\n\n    relative = p.getRelativePoint(juce.Point[float](0.0, 0.5))\n    assert isclose(relative.x, 10.0)\n    assert isclose(relative.y, 20.0)\n\n    relative = p.getRelativePoint(juce.Point[float](0.5, 1.0))\n    assert isclose(relative.x, 20.0)\n    assert isclose(relative.y, 30.0)\n\n#==================================================================================================\n\ndef test_bounding_box():\n    def make_point(type, x, y):\n        return juce.Point[type](x, y)\n\n    p = juce.Parallelogram[int](make_point(int, 10, 10), make_point(int, 20, 10), make_point(int, 15, 20))\n    b = p.getBoundingBox()\n    assert b.getTopLeft().x == 10\n    assert b.getTopLeft().y == 10\n    assert b.getBottomRight().x == 25\n    assert b.getBottomRight().y == 20\n    assert b.getWidth() == 15\n    assert b.getHeight() == 10\n\n    p = juce.Parallelogram[float](make_point(float, 10, 10), make_point(float, 20, 10), make_point(float, 15, 20))\n    b = p.getBoundingBox()\n    assert isclose(b.getTopLeft().x, 10.0)\n    assert isclose(b.getTopLeft().y, 10.0)\n    assert isclose(b.getBottomRight().x, 25.0)\n    assert isclose(b.getBottomRight().y, 20.0)\n    assert isclose(b.getWidth(), 15.0)\n    assert isclose(b.getHeight(), 10.0)\n\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Path.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\ndef make_box_path(size: float) -> juce.Path:\n    p = juce.Path()\n    p.startNewSubPath(0.0, 0.0)\n    p.lineTo(size, 0.0)\n    p.lineTo(size, size)\n    p.lineTo(0.0, size)\n    p.closeSubPath()\n    return p\n\n#==================================================================================================\n\ndef test_constructor():\n    p = juce.Path()\n    assert p.isEmpty()\n    assert p == p\n\n#==================================================================================================\n\ndef test_copy_constructor():\n    p = juce.Path()\n    p.lineTo(10.0, 10.0)\n    assert not p.isEmpty()\n    assert p != juce.Path()\n\n    x = juce.Path(p)\n    assert not x.isEmpty()\n    assert x != juce.Path()\n    assert x == p\n\n#==================================================================================================\n\ndef test_get_bounds():\n    p = juce.Path()\n    assert p.getBounds().isEmpty()\n\n    p.lineTo(10.0, 10.0)\n    assert not p.getBounds().isEmpty()\n    assert p.getBounds().toNearestInt() == juce.Rectangle[int](0, 0, 10, 10)\n\n#==================================================================================================\n\ndef test_get_bounds_transformed():\n    p = juce.Path()\n    p.lineTo(10.0, 10.0)\n    assert not p.getBounds().isEmpty()\n\n    t = juce.AffineTransform.translation(10.0, 10.0)\n    assert p.getBoundsTransformed(t).toNearestInt() == juce.Rectangle[int](10, 10, 10, 10)\n\n#==================================================================================================\n\ndef test_contains():\n    p = make_box_path(10.0)\n\n    assert p.contains(5, 5)\n    assert p.contains(5, 5, 0.001)\n    assert not p.contains(15, 5)\n    assert not p.contains(10.1, 5.0)\n    assert p.contains(9.0, 5.0)\n\n    assert p.contains(juce.Point[float](5, 5))\n    assert p.contains(juce.Point[float](5, 5), 0.001)\n    assert not p.contains(juce.Point[float](15, 5.0))\n    assert not p.contains(juce.Point[float](10.1, 5.0))\n    assert p.contains(juce.Point[float](9.0, 5.0))\n\n#==================================================================================================\n\ndef test_intersects_line():\n    p = make_box_path(10.0)\n\n    assert p.intersectsLine(juce.Line[float](-10, -10, 20, 20))\n    assert not p.intersectsLine(juce.Line[float](-10, -10, -10, 20))\n\n#==================================================================================================\n\ndef test_round_trips():\n    p = make_box_path(10.0)\n\n    x = juce.Path(str(p))\n    assert x == p\n"
  },
  {
    "path": "tests/test_juce_graphics/test_PathStrokeType.py",
    "content": "from math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_constructor():\n    p1 = juce.PathStrokeType(1.0)\n    assert isclose(p1.getStrokeThickness(), 1.0)\n    assert p1.getJointStyle() == juce.PathStrokeType.mitered\n    assert p1.getEndStyle() == juce.PathStrokeType.butt\n\n    p2 = juce.PathStrokeType(2.0, juce.PathStrokeType.beveled)\n    assert isclose(p2.getStrokeThickness(), 2.0)\n    assert p2.getJointStyle() == juce.PathStrokeType.beveled\n    assert p2.getEndStyle() == juce.PathStrokeType.butt\n\n    p3 = juce.PathStrokeType(3.0, juce.PathStrokeType.beveled, juce.PathStrokeType.square)\n    assert isclose(p3.getStrokeThickness(), 3.0)\n    assert p3.getJointStyle() == juce.PathStrokeType.beveled\n    assert p3.getEndStyle() == juce.PathStrokeType.square\n\n    x1 = juce.PathStrokeType(p1)\n    assert x1 == p1\n    assert x1 != p2\n\n    x2 = juce.PathStrokeType(p2)\n    assert x2 == p2\n    assert x2 != p3\n\n    x3 = juce.PathStrokeType(p3)\n    assert x3 == p3\n    assert x3 != p1\n\n#==================================================================================================\n\ndef test_stroke_tickness():\n    p = juce.PathStrokeType(1.0)\n    p.setStrokeThickness(2.5)\n    assert isclose(p.getStrokeThickness(), 2.5)\n\n#==================================================================================================\n\ndef test_joint_style():\n    p = juce.PathStrokeType(1.0)\n    p.setJointStyle(juce.PathStrokeType.beveled)\n    assert p.getJointStyle() == juce.PathStrokeType.beveled\n\n#==================================================================================================\n\ndef test_end_style():\n    p = juce.PathStrokeType(1.0)\n    p.setEndStyle(juce.PathStrokeType.square)\n    assert p.getEndStyle() == juce.PathStrokeType.square\n\n#==================================================================================================\n\ndef test_create_stroked_path():\n    source_path = juce.Path()\n    source_path.addRectangle(0, 0, 100, 100)\n    assert source_path.toString() == \"m 0 100 l 0 0 100 0 100 100 z\"\n\n    dest_path = juce.Path()\n    p = juce.PathStrokeType(1.0)\n    p.createStrokedPath(dest_path, source_path)\n    assert dest_path.toString() == \"m -0.5 100 l -0.5 -0.5 100.5 -0.5 100.5 100.5 -0.5 100.5 z m 0 99.5 l 99.5 99.5 99.5 0.5 0.5 0.5 0.5 99.5 z\"\n\n    p = juce.PathStrokeType(0.1)\n    p.createStrokedPath(dest_path, source_path)\n    assert dest_path.toString() == \"m -0.05 100 l -0.05 -0.05 100.05 -0.05 100.05 100.05 -0.05 100.05 z m 0 99.95 l 99.95 99.95 99.95 0.05 0.05 0.05 0.05 99.95 z\"\n\n    dest_path = juce.Path()\n    p = juce.PathStrokeType(10.0)\n    p.createStrokedPath(dest_path, source_path, juce.AffineTransform.translation(-50, -50), 10.0)\n    assert dest_path.toString() == \"m -55 50 l -55 -55 55 -55 55 55 -55 55 z m -50 45 l 45 45 45 -45 -45 -45 -45 45 z\"\n"
  },
  {
    "path": "tests/test_juce_graphics/test_PixelARGB.py",
    "content": "import sys\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_pixel_argb_default_constructor():\n    pixel = juce.PixelARGB()\n    assert pixel.getAlpha() == 0\n    assert pixel.getRed() == 0\n    assert pixel.getGreen() == 0\n    assert pixel.getBlue() == 0\n\n#==================================================================================================\n\ndef test_pixel_argb_constructor_with_values():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    assert pixel.getAlpha() == 255\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 64\n    assert pixel.getBlue() == 32\n\n#==================================================================================================\n\ndef test_pixel_argb_get_native_argb():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    assert pixel.getNativeARGB() == (255 << 24 | 128 << 16 | 64 << 8 | 32)\n\n#==================================================================================================\n\ndef test_pixel_argb_get_in_argb_mask_order():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    assert pixel.getInARGBMaskOrder() == (255 << 24 | 128 << 16 | 64 << 8 | 32)\n\n#==================================================================================================\n\ndef test_pixel_argb_get_in_argb_memory_order():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    if sys.byteorder == 'big':\n        expected = (255 << 24 | 128 << 16 | 64 << 8 | 32)\n    else:\n        expected = (32 << 24 | 64 << 16 | 128 << 8 | 255)\n    assert pixel.getInARGBMemoryOrder() == expected\n\n#==================================================================================================\n\ndef test_pixel_argb_get_even_bytes():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    assert pixel.getEvenBytes() == (128 << 16 | 32)\n\n#==================================================================================================\n\ndef test_pixel_argb_get_odd_bytes():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    assert pixel.getOddBytes() == (255 << 16 | 64)\n\n#==================================================================================================\n\ndef test_pixel_argb_set_argb():\n    pixel = juce.PixelARGB()\n    pixel.setARGB(255, 128, 64, 32)\n    assert pixel.getAlpha() == 255\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 64\n    assert pixel.getBlue() == 32\n\n#==================================================================================================\n\ndef test_pixel_argb_blend():\n    src_pixel = juce.PixelARGB(128, 32, 16, 8)\n    dst_pixel = juce.PixelARGB(255, 128, 64, 32)\n    dst_pixel.blend(src_pixel)\n    assert dst_pixel.getAlpha() == 255\n    assert dst_pixel.getRed() == 96\n    assert dst_pixel.getGreen() == 48\n    assert dst_pixel.getBlue() == 24\n\n#==================================================================================================\n\ndef test_pixel_argb_set_alpha():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    pixel.setAlpha(128)\n    assert pixel.getAlpha() == 128\n\n#==================================================================================================\n\n\"\"\"\ndef test_pixel_argb_multiply_alpha_int():\n    pixel = juce.PixelARGB(100, 128, 64, 32)\n    pixel.multiplyAlpha(1)\n    assert pixel.getAlpha() == 200\n\"\"\"\n\n#==================================================================================================\n\ndef test_pixel_argb_multiply_alpha_float():\n    pixel = juce.PixelARGB(100, 128, 64, 32)\n    pixel.multiplyAlpha(0.5)\n    assert pixel.getAlpha() == 50\n\n#==================================================================================================\n\ndef test_pixel_argb_premultiply():\n    pixel = juce.PixelARGB(128, 255, 255, 255)\n    pixel.premultiply()\n    expected_red = int((255 * 128 + 0x7f) >> 8)\n    expected_green = int((255 * 128 + 0x7f) >> 8)\n    expected_blue = int((255 * 128 + 0x7f) >> 8)\n    assert pixel.getRed() == expected_red\n    assert pixel.getGreen() == expected_green\n    assert pixel.getBlue() == expected_blue\n\n#==================================================================================================\n\ndef test_pixel_argb_unpremultiply():\n    pixel = juce.PixelARGB(128, 128, 128, 128)\n    pixel.unpremultiply()\n    assert pixel.getRed() > 128\n    assert pixel.getGreen() > 128\n    assert pixel.getBlue() > 128\n\n#==================================================================================================\n\ndef test_pixel_argb_desaturate():\n    pixel = juce.PixelARGB(255, 128, 64, 32)\n    pixel.desaturate()\n    expected_value = int((128 + 64 + 32) / 3)\n    assert pixel.getRed() == expected_value\n    assert pixel.getGreen() == expected_value\n    assert pixel.getBlue() == expected_value\n"
  },
  {
    "path": "tests/test_juce_graphics/test_PixelAlpha.py",
    "content": "import sys\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_pixel_alpha_default_constructor():\n    pixel = juce.PixelAlpha()\n    assert pixel.getAlpha() == 0\n\n#==================================================================================================\n\ndef test_pixel_alpha_set_alpha():\n    pixel = juce.PixelAlpha()\n    pixel.setAlpha(128)\n    assert pixel.getAlpha() == 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_get_native_argb():\n    pixel = juce.PixelAlpha(128)\n    assert pixel.getNativeARGB() == (128 << 24) | (128 << 16) | (128 << 8) | 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_get_in_argb_mask_order():\n    pixel = juce.PixelAlpha(128)\n    assert pixel.getInARGBMaskOrder() == (128 << 24) | (128 << 16) | (128 << 8) | 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_get_in_argb_memory_order():\n    pixel = juce.PixelAlpha(128)\n    expected = (128 << 24) | (128 << 16) | (128 << 8) | 128\n    assert pixel.getInARGBMemoryOrder() == expected\n\n#==================================================================================================\n\ndef test_pixel_alpha_get_even_bytes():\n    pixel = juce.PixelAlpha(128)\n    assert pixel.getEvenBytes() == (128 << 16) | 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_get_odd_bytes():\n    pixel = juce.PixelAlpha(128)\n    assert pixel.getOddBytes() == (128 << 16) | 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_set_argb():\n    pixel = juce.PixelAlpha()\n    pixel.setARGB(128, 0, 0, 0)\n    assert pixel.getAlpha() == 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_blend_with_extra_alpha():\n    src_pixel = juce.PixelAlpha(128)\n    dst_pixel = juce.PixelAlpha(64)\n    dst_pixel.blend(src_pixel, 128)\n    assert dst_pixel.getAlpha() == 112\n\n#==================================================================================================\n\ndef test_pixel_alpha_multiply_alpha_int():\n    pixel = juce.PixelAlpha(100)\n    pixel.multiplyAlpha(2)\n    assert pixel.getAlpha() == 1\n\n#==================================================================================================\n\ndef test_pixel_alpha_multiply_alpha_float():\n    pixel = juce.PixelAlpha(100)\n    pixel.multiplyAlpha(0.5)\n    assert pixel.getAlpha() == 50\n\n#==================================================================================================\n\ndef test_pixel_alpha_premultiply():\n    pixel = juce.PixelAlpha(128)\n    pixel.premultiply()\n    assert pixel.getAlpha() == 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_unpremultiply():\n    pixel = juce.PixelAlpha(128)\n    pixel.unpremultiply()\n    assert pixel.getAlpha() == 128\n\n#==================================================================================================\n\ndef test_pixel_alpha_desaturate():\n    pixel = juce.PixelAlpha(128)\n    pixel.desaturate()\n    assert pixel.getAlpha() == 128\n"
  },
  {
    "path": "tests/test_juce_graphics/test_PixelRGB.py",
    "content": "import sys\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_pixel_rgb_default_constructor():\n    pixel = juce.PixelRGB()\n    assert pixel.getAlpha() == 255\n    assert pixel.getRed() == 0\n    assert pixel.getGreen() == 0\n    assert pixel.getBlue() == 0\n\n#==================================================================================================\n\ndef test_pixel_rgb_set_argb():\n    pixel = juce.PixelRGB()\n    pixel.setARGB(255, 128, 64, 32)\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 64\n    assert pixel.getBlue() == 32\n\n#==================================================================================================\n\ndef test_pixel_rgb_get_native_argb():\n    pixel = juce.PixelRGB(128, 64, 32)\n    assert pixel.getNativeARGB() == (0xFF << 24 | 128 << 16 | 64 << 8 | 32)\n\n#==================================================================================================\n\ndef test_pixel_rgb_get_in_argb_mask_order():\n    pixel = juce.PixelRGB(128, 64, 32)\n    assert pixel.getInARGBMaskOrder() == (0xFF << 24 | 128 << 16 | 64 << 8 | 32)\n\n#==================================================================================================\n\ndef test_pixel_rgb_get_in_argb_memory_order():\n    pixel = juce.PixelRGB(128, 64, 32)\n    if sys.byteorder == 'big':\n        expected = (0xFF << 24 | 128 << 16 | 64 << 8 | 32)\n    else:\n        expected = (32 << 24 | 64 << 16 | 128 << 8 | 0xFF)\n    assert pixel.getInARGBMemoryOrder() == expected\n\n#==================================================================================================\n\ndef test_pixel_rgb_get_even_bytes():\n    pixel = juce.PixelRGB(128, 64, 32)\n    assert pixel.getEvenBytes() == (128 << 16 | 32)\n\n#==================================================================================================\n\ndef test_pixel_rgb_get_odd_bytes():\n    pixel = juce.PixelRGB(128, 64, 32)\n    assert pixel.getOddBytes() == (0xFF << 16 | 64)\n\n#==================================================================================================\n\ndef test_pixel_rgb_blend():\n    src_pixel = juce.PixelRGB(32, 16, 8)\n    dst_pixel = juce.PixelRGB(16, 64, 32)\n    dst_pixel.blend(src_pixel)\n    assert dst_pixel.getRed() == 32\n    assert dst_pixel.getGreen() == 16\n    assert dst_pixel.getBlue() == 8\n\n#==================================================================================================\n\ndef test_pixel_rgb_multiply_alpha_int():\n    pixel = juce.PixelRGB(128, 64, 32)\n    pixel.multiplyAlpha(2)\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 64\n    assert pixel.getBlue() == 32\n\n#==================================================================================================\n\ndef test_pixel_rgb_multiply_alpha_float():\n    pixel = juce.PixelRGB(128, 64, 32)\n    pixel.multiplyAlpha(0.5)\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 64\n    assert pixel.getBlue() == 32\n\n#==================================================================================================\n\ndef test_pixel_rgb_premultiply():\n    pixel = juce.PixelRGB(255, 255, 255)\n    pixel.premultiply()\n    assert pixel.getRed() == 255\n    assert pixel.getGreen() == 255\n    assert pixel.getBlue() == 255\n\n#==================================================================================================\n\ndef test_pixel_rgb_unpremultiply():\n    pixel = juce.PixelRGB(128, 128, 128)\n    pixel.unpremultiply()\n    assert pixel.getRed() == 128\n    assert pixel.getGreen() == 128\n    assert pixel.getBlue() == 128\n\n#==================================================================================================\n\ndef test_pixel_rgb_desaturate():\n    pixel = juce.PixelRGB(128, 64, 32)\n    pixel.desaturate()\n    expected_value = int((128 + 64 + 32) / 3)\n    assert pixel.getRed() == expected_value\n    assert pixel.getGreen() == expected_value\n    assert pixel.getBlue() == expected_value\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Point.py",
    "content": "import pytest\nfrom math import isclose\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_empty_constructor():\n    p = juce.Point[int]()\n    assert p.x == 0\n    assert p.y == 0\n    assert p.getX() == 0\n    assert p.getY() == 0\n    assert p.isOrigin()\n    assert p.isFinite()\n\n    p = juce.Point[float]()\n    assert isclose(p.x, 0.0)\n    assert isclose(p.y, 0.0)\n    assert isclose(p.getX(), 0.0)\n    assert isclose(p.getY(), 0.0)\n    assert p.isOrigin()\n    assert p.isFinite()\n\n#==================================================================================================\n\ndef test_value_constructor():\n    p = juce.Point[int](10, 20)\n    assert p.x == 10\n    assert p.y == 20\n    assert not p.isOrigin()\n    assert p.isFinite()\n\n    p = juce.Point[float](10.5, 20.5)\n    assert isclose(p.x, 10.5)\n    assert isclose(p.y, 20.5)\n    assert not p.isOrigin()\n    assert p.isFinite()\n\n#==================================================================================================\n\ndef test_infinite_constructor():\n    p = juce.Point[float](float('inf'), float('-inf'))\n    assert not p.isFinite()\n\n#==================================================================================================\n\ndef test_set_xy():\n    p = juce.Point[int]()\n\n    p.x = 100\n    p.y = 100\n    assert p.x == 100\n    assert p.y == 100\n    assert p.getX() == 100\n    assert p.getY() == 100\n\n    p.setX(10)\n    p.setY(10)\n    assert p.x == 10\n    assert p.y == 10\n    assert p.getX() == 10\n    assert p.getY() == 10\n\n    p = juce.Point[float]()\n\n    p.x = 100.5\n    p.y = 100.5\n    assert isclose(p.x, 100.5)\n    assert isclose(p.y, 100.5)\n    assert isclose(p.getX(), 100.5)\n    assert isclose(p.getY(), 100.5)\n\n    p.setX(10.5)\n    p.setY(10.5)\n    assert isclose(p.x, 10.5)\n    assert isclose(p.y, 10.5)\n    assert isclose(p.getX(), 10.5)\n    assert isclose(p.getY(), 10.5)\n\n#==================================================================================================\n\ndef test_with_xy():\n    p = juce.Point[int](1, 2)\n    assert p.withX(10) == juce.Point[int](10, 2)\n    assert p.withY(20) == juce.Point[int](1, 20)\n\n    p = juce.Point[float](1.0, 2.0)\n    assert p.withX(10.0) == juce.Point[float](10.0, 2.0)\n    assert p.withY(20.0) == juce.Point[float](1.0, 20.0)\n\n#==================================================================================================\n\ndef test_add_xy():\n    p = juce.Point[int](1, 2)\n    p.addXY(10, 10)\n    assert p.getX() == 11\n    assert p.getY() == 12\n\n    p = juce.Point[float](1.0, 2.0)\n    p.addXY(10.0, 10.0)\n    assert isclose(p.getX(), 11.0)\n    assert isclose(p.getY(), 12.0)\n\n#==================================================================================================\n\ndef test_translated():\n    p = juce.Point[int](1, 2)\n    p = p.translated(10, 10)\n    assert p.getX() == 11\n    assert p.getY() == 12\n\n    p = juce.Point[float](1.0, 2.0)\n    p = p.translated(10.0, 10.0)\n    assert isclose(p.getX(), 11.0)\n    assert isclose(p.getY(), 12.0)\n\n#==================================================================================================\n\ndef test_operator_add():\n    a = juce.Point[int](1, 2)\n    b = juce.Point[int](4, 8)\n\n    p = a + b\n    assert p.getX() == 5\n    assert p.getY() == 10\n    p += a\n    assert p.getX() == 6\n    assert p.getY() == 12\n\n    a = juce.Point[float](1.0, 2.0)\n    b = juce.Point[float](4.0, 8.0)\n\n    p = a + b\n    assert isclose(p.getX(), 5.0)\n    assert isclose(p.getY(), 10.0)\n    p += a\n    assert isclose(p.getX(), 6.0)\n    assert isclose(p.getY(), 12.0)\n\n#==================================================================================================\n\ndef test_operator_subtract():\n    a = juce.Point[int](1, 2)\n    b = juce.Point[int](4, 8)\n\n    p = b - a\n    assert p.getX() == 3\n    assert p.getY() == 6\n    p -= a\n    assert p.getX() == 2\n    assert p.getY() == 4\n\n    a = juce.Point[float](1.0, 2.0)\n    b = juce.Point[float](4.0, 8.0)\n\n    p = b - a\n    assert isclose(p.getX(), 3.0)\n    assert isclose(p.getY(), 6.0)\n    p -= a\n    assert isclose(p.getX(), 2.0)\n    assert isclose(p.getY(), 4.0)\n\n#==================================================================================================\n\ndef test_operator_multiply():\n    a = juce.Point[int](1, 2)\n    b = juce.Point[int](4, 8)\n\n    p = a * b\n    assert p.getX() == 4\n    assert p.getY() == 16\n    p *= a\n    assert p.getX() == 4\n    assert p.getY() == 32\n\n    a = juce.Point[float](1.0, 2.0)\n    b = juce.Point[float](4.0, 8.0)\n\n    p = a * b\n    assert isclose(p.getX(), 4.0)\n    assert isclose(p.getY(), 16.0)\n    p *= a\n    assert isclose(p.getX(), 4.0)\n    assert isclose(p.getY(), 32.0)\n\n#==================================================================================================\n\ndef test_operator_multiply_scalar():\n    a = juce.Point[int](1, 2)\n\n    p = a * 2\n    assert p.getX() == 2\n    assert p.getY() == 4\n    p *= 2\n    assert p.getX() == 4\n    assert p.getY() == 8\n\n    a = juce.Point[float](1.0, 2.0)\n\n    p = a * 2.0\n    assert isclose(p.getX(), 2.0)\n    assert isclose(p.getY(), 4.0)\n    p *= 2.0\n    assert isclose(p.getX(), 4.0)\n    assert isclose(p.getY(), 8.0)\n\n\n#==================================================================================================\n\ndef test_operator_divide():\n    a = juce.Point[int](1, 2)\n    b = juce.Point[int](4, 8)\n\n    p = b / a\n    assert p.getX() == 4\n    assert p.getY() == 4\n    p /= b\n    assert p.getX() == 1\n    assert p.getY() == 0\n\n    a = juce.Point[float](1.0, 2.0)\n    b = juce.Point[float](4.0, 8.0)\n\n    p = b / a\n    assert isclose(p.getX(), 4.0)\n    assert isclose(p.getY(), 4.0)\n    p /= b\n    assert isclose(p.getX(), 1.0)\n    assert isclose(p.getY(), 0.5)\n\n#==================================================================================================\n\ndef test_operator_divide_scalar():\n    a = juce.Point[int](4, 8)\n\n    p = a / 2.0\n    assert p.getX() == 2\n    assert p.getY() == 4\n    p /= 2\n    assert p.getX() == 1\n    assert p.getY() == 2\n\n    a = juce.Point[float](4.0, 8.0)\n\n    p = a / 3.0\n    assert isclose(p.getX(), 1.3333333730697632)\n    assert isclose(p.getY(), 2.6666667461395264)\n    p /= 3.0\n    assert isclose(p.getX(), 0.4444444477558136)\n    assert isclose(p.getY(), 0.8888888955116272)\n\n#==================================================================================================\n\ndef test_operator_unary_minus():\n    a = juce.Point[int](1, 2)\n\n    a = -a\n    assert a.getX() == -1\n    assert a.getY() == -2\n\n    a = juce.Point[float](1.0, 2.0)\n\n    a = -a\n    assert isclose(a.getX(), -1.0)\n    assert isclose(a.getY(), -2.0)\n\n#==================================================================================================\n\ndef test_distance_from_origin():\n    a = juce.Point[int](0, 0)\n    assert isclose(a.getDistanceFromOrigin(), 0)\n\n    a = juce.Point[int](2, 3)\n    assert isclose(a.getDistanceFromOrigin(), 3)\n\n    a = juce.Point[int](-2, 3)\n    assert isclose(a.getDistanceFromOrigin(), 3)\n\n    a = juce.Point[float](0, 0)\n    assert isclose(a.getDistanceFromOrigin(), 0)\n\n    a = juce.Point[float](2, 3)\n    assert isclose(a.getDistanceFromOrigin(), 3.605551242828369)\n\n    a = juce.Point[float](2, -3)\n    assert isclose(a.getDistanceFromOrigin(), 3.605551242828369)\n\n#==================================================================================================\n\ndef test_distance_squared_from_origin():\n    a = juce.Point[int](0, 0)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 0)\n\n    a = juce.Point[int](2, 3)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 13)\n\n    a = juce.Point[int](-2, 3)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 13)\n\n    a = juce.Point[float](0, 0)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 0)\n\n    a = juce.Point[float](2, 3)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 13.0)\n\n    a = juce.Point[float](2, -3)\n    assert isclose(a.getDistanceSquaredFromOrigin(), 13.0)\n\n#==================================================================================================\n\ndef test_distance_from():\n    a = juce.Point[int](0, 0)\n    assert isclose(a.getDistanceFrom(juce.Point[int]()), 0)\n\n    a = juce.Point[int](2, 3)\n    assert isclose(a.getDistanceFrom(juce.Point[int](12, 13)), 14)\n\n    a = juce.Point[int](-2, 3)\n    assert isclose(a.getDistanceFrom(juce.Point[int](2, 3)), 4)\n\n    a = juce.Point[float](0, 0)\n    assert isclose(a.getDistanceFrom(juce.Point[float]()), 0)\n\n    a = juce.Point[float](2, 3)\n    assert isclose(a.getDistanceFrom(juce.Point[float](12, 13)), 14.142135620117188)\n\n    a = juce.Point[float](2, -3)\n    assert isclose(a.getDistanceFrom(juce.Point[float](2, 3)), 6.0)\n\n#==================================================================================================\n\ndef test_distance_squared_from():\n    a = juce.Point[int](0, 0)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[int]()), 0)\n\n    a = juce.Point[int](2, 3)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[int](12, 13)), 200)\n\n    a = juce.Point[int](-2, 3)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[int](2, 3)), 16)\n\n    a = juce.Point[float](0, 0)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[float]()), 0)\n\n    a = juce.Point[float](2, 3)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[float](12, 13)), 200.0)\n\n    a = juce.Point[float](2, -3)\n    assert isclose(a.getDistanceSquaredFrom(juce.Point[float](2, 3)), 36.0)\n\n#==================================================================================================\n\ndef test_angle_to_point():\n    a = juce.Point[int](0, 0)\n    b = juce.Point[int](10, 0)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 90, rel_tol=1e-6)\n\n    a = juce.Point[int](0, 0)\n    b = juce.Point[int](0, 10)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 180, rel_tol=1e-6)\n\n    a = juce.Point[int](0, 0)\n    b = juce.Point[int](10, 10)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 135, rel_tol=1e-6)\n\n    a = juce.Point[float](0, 0)\n    b = juce.Point[float](10, 0)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 90, rel_tol=1e-6)\n\n    a = juce.Point[float](0, 0)\n    b = juce.Point[float](0, 10)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 180, rel_tol=1e-6)\n\n    a = juce.Point[float](0, 0)\n    b = juce.Point[float](10, 10)\n    assert isclose(juce.radiansToDegrees(a.getAngleToPoint(b)), 135, rel_tol=1e-6)\n\n#==================================================================================================\n\n@pytest.mark.skip(reason=\"The integer version of this is actually broken in JUCE\")\ndef test_rotated_about_origin_int():\n    a = juce.Point[int](10, 0)\n    assert a.rotatedAboutOrigin(int(juce.degreesToRadians(90))) == juce.Point[int](10, 0)\n\n#==================================================================================================\n\ndef test_rotated_about_origin_float():\n    a = juce.Point[float](10.5, 0.956)\n\n    r = a.rotatedAboutOrigin(juce.degreesToRadians(90))\n    assert isclose(r.x, -0.956, rel_tol=1e-06)\n    assert isclose(r.y, 10.5, rel_tol=1e-06)\n\n#==================================================================================================\n\ndef test_point_on_circumference_int():\n    a = juce.Point[int](0, 0)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(0))\n    assert isclose(r.x, 0.0, rel_tol=1e-06)\n    assert isclose(r.y, -1.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(90))\n    assert isclose(r.x, 1.0, rel_tol=1e-06)\n    # assert isclose(r.y, 0.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(180))\n    # assert isclose(r.x, 0.0, rel_tol=1e-06)\n    assert isclose(r.y, 1.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(270))\n    assert isclose(r.x, -1.0, rel_tol=1e-06)\n    #assert isclose(r.y, 0.0, rel_tol=1e-06)\n\n#==================================================================================================\n\ndef test_point_on_circumference_float():\n    a = juce.Point[float](0, 0)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(0))\n    assert isclose(r.x, 0.0, rel_tol=1e-06)\n    assert isclose(r.y, -1.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(90))\n    assert isclose(r.x, 1.0, rel_tol=1e-06)\n    # assert isclose(r.y, 0.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(180))\n    # assert isclose(r.x, 0.0, rel_tol=1e-06)\n    assert isclose(r.y, 1.0, rel_tol=1e-06)\n\n    r = a.getPointOnCircumference(1.0, juce.degreesToRadians(270))\n    assert isclose(r.x, -1.0, rel_tol=1e-06)\n    #assert isclose(r.y, 0.0, rel_tol=1e-06)\n\n#==================================================================================================\n\ndef test_dot_product():\n    a = juce.Point[int](2, 3)\n    b = juce.Point[int](7, 9)\n\n    assert isclose(a.getDotProduct(b), 14 + 27)\n\n    a = juce.Point[float](2, 3)\n    b = juce.Point[float](7, 9)\n\n    assert isclose(a.getDotProduct(b), 14 + 27)\n\n#==================================================================================================\n\ndef test_apply_transform():\n    a = juce.Point[int](2, 3)\n\n    a.applyTransform(juce.AffineTransform.translation(10.0, 20.0))\n    assert a.x == 12\n    assert a.y == 23\n\n    a = juce.Point[float](2, 3)\n\n    a.applyTransform(juce.AffineTransform.translation(10.0, 20.0))\n    assert isclose(a.x, 12)\n    assert isclose(a.y, 23)\n\n#==================================================================================================\n\ndef test_transformed_by():\n    a = juce.Point[int](2, 3)\n\n    p = a.transformedBy(juce.AffineTransform.scale(0.5, 2.0))\n    assert p.x == 1\n    assert p.y == 6\n\n    a = juce.Point[float](2, 3)\n\n    p = a.transformedBy(juce.AffineTransform.scale(0.25, 2.5))\n    assert isclose(p.x, 0.5)\n    assert isclose(p.y, 7.5)\n\n#==================================================================================================\n\ndef test_round_to_int():\n    a = juce.Point[float](1.99, 2.4).toInt()\n    assert isinstance(a.x, int)\n    assert isinstance(a.y, int)\n    assert a.x == 1\n    assert a.y == 2\n\n#==================================================================================================\n\ndef test_to_float():\n    a = juce.Point[int](1, 2).toFloat()\n    assert isinstance(a.x, float)\n    assert isinstance(a.y, float)\n    assert isclose(a.x, 1.0)\n    assert isclose(a.y, 2.0)\n\n#==================================================================================================\n\ndef test_to_int():\n    a = juce.Point[float](1.1, 2.8).roundToInt()\n    assert isinstance(a.x, int)\n    assert isinstance(a.y, int)\n\n#==================================================================================================\n\ndef test_to_string():\n    a = juce.Point[float](1.1, 2.8)\n    assert a.toString() == \"1.1, 2.8\"\n    assert repr(a) == \"popsicle.Point[float](1.1, 2.8)\"\n    assert str(a) == \"1.1, 2.8\"\n"
  },
  {
    "path": "tests/test_juce_graphics/test_Rectangle.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_rectangle_default_constructor():\n    rect = juce.Rectangle[int]()\n    assert rect.getWidth() == 0\n    assert rect.getHeight() == 0\n    assert rect.getX() == 0\n    assert rect.getY() == 0\n\n#==================================================================================================\n\ndef test_rectangle_copy_constructor():\n    original = juce.Rectangle[int](10, 20, 30, 40)\n    copy = juce.Rectangle[int](original)\n    assert copy.getX() == 10\n    assert copy.getY() == 20\n    assert copy.getWidth() == 30\n    assert copy.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_position_and_size_constructor():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    assert rect.getX() == 10\n    assert rect.getY() == 20\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_size_constructor():\n    rect = juce.Rectangle[int](30, 40)\n    assert rect.getX() == 0\n    assert rect.getY() == 0\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_corners_constructor():\n    corner1 = juce.Point[int](10, 20)\n    corner2 = juce.Point[int](40, 60)\n    rect = juce.Rectangle[int](corner1, corner2)\n    assert rect.getX() == 10\n    assert rect.getY() == 20\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_is_empty():\n    rect = juce.Rectangle[int]()\n    assert rect.isEmpty()\n\n    rect.setSize(10, 0)\n    assert rect.isEmpty()\n\n    rect.setSize(0, 10)\n    assert rect.isEmpty()\n\n    rect.setSize(-10, 10)\n    assert rect.isEmpty()\n\n    rect.setSize(10, -10)\n    assert rect.isEmpty()\n\n    rect.setSize(10, 10)\n    assert not rect.isEmpty()\n\n#==================================================================================================\n\ndef test_rectangle_get_set_position():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setPosition(50, 60)\n    assert rect.getX() == 50\n    assert rect.getY() == 60\n\n    newPos = juce.Point[int](70, 80)\n    rect.setPosition(newPos)\n    assert rect.getPosition() == newPos\n\n#==================================================================================================\n\ndef test_rectangle_get_set_size():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setSize(50, 60)\n    assert rect.getWidth() == 50\n    assert rect.getHeight() == 60\n\n#==================================================================================================\n\ndef test_rectangle_get_set_bounds():\n    rect = juce.Rectangle[int]()\n    rect.setBounds(10, 20, 30, 40)\n    assert rect.getX() == 10\n    assert rect.getY() == 20\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_translate():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.translate(5, -5)\n    assert rect.getX() == 15\n    assert rect.getY() == 15\n\n#==================================================================================================\n\ndef test_rectangle_with_position():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    movedRect = rect.withPosition(50, 60)\n    assert movedRect.getX() == 50\n    assert movedRect.getY() == 60\n    assert movedRect.getWidth() == 30\n    assert movedRect.getHeight() == 40\n\n    newPos = juce.Point[int](70, 80)\n    movedRect = rect.withPosition(newPos)\n    assert movedRect.getPosition() == newPos\n\n#==================================================================================================\n\ndef test_rectangle_with_size():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    resizedRect = rect.withSize(50, 60)\n    assert resizedRect.getX() == 10\n    assert resizedRect.getY() == 20\n    assert resizedRect.getWidth() == 50\n    assert resizedRect.getHeight() == 60\n\n#==================================================================================================\n\ndef test_rectangle_contains_point():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    pointInside = juce.Point[int](20, 30)\n    pointOutside = juce.Point[int](5, 50)\n    assert rect.contains(pointInside)\n    assert not rect.contains(pointOutside)\n\n#==================================================================================================\n\ndef test_rectangle_intersection():\n    rect1 = juce.Rectangle[int](10, 20, 30, 40)\n    rect2 = juce.Rectangle[int](20, 30, 30, 40)\n    assert rect1.intersects(rect2)\n\n    rect3 = juce.Rectangle[int](100, 100, 30, 40)\n    assert not rect1.intersects(rect3)\n\n#==================================================================================================\n\ndef test_rectangle_get_intersection():\n    rect1 = juce.Rectangle[int](10, 20, 30, 40)\n    rect2 = juce.Rectangle[int](20, 30, 30, 40)\n    intersection = rect1.getIntersection(rect2)\n    assert intersection.getX() == 20\n    assert intersection.getY() == 30\n    assert intersection.getWidth() == 20\n    assert intersection.getHeight() == 30\n\n    rect3 = juce.Rectangle[int](100, 100, 30, 40)\n    intersection = rect1.getIntersection(rect3)\n    assert intersection.isEmpty()\n\n#==================================================================================================\n\ndef test_rectangle_union():\n    rect1 = juce.Rectangle[int](10, 20, 30, 40)\n    rect2 = juce.Rectangle[int](40, 50, 30, 40)\n    unionRect = rect1.getUnion(rect2)\n    assert unionRect.getX() == 10\n    assert unionRect.getY() == 20\n    assert unionRect.getWidth() == 60\n    assert unionRect.getHeight() == 70\n\n#==================================================================================================\n\ndef test_rectangle_expand():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.expand(5, 10)\n    assert rect.getX() == 5\n    assert rect.getY() == 10\n    assert rect.getWidth() == 40\n    assert rect.getHeight() == 60\n\n#==================================================================================================\n\ndef test_rectangle_expanded():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    expandedRect = rect.expanded(5, 10)\n    assert expandedRect.getX() == 5\n    assert expandedRect.getY() == 10\n    assert expandedRect.getWidth() == 40\n    assert expandedRect.getHeight() == 60\n\n#==================================================================================================\n\ndef test_rectangle_reduce():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.reduce(5, 10)\n    assert rect.getX() == 15\n    assert rect.getY() == 30\n    assert rect.getWidth() == 20\n    assert rect.getHeight() == 20\n\n#==================================================================================================\n\ndef test_rectangle_reduced():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    reducedRect = rect.reduced(5, 10)\n    assert reducedRect.getX() == 15\n    assert reducedRect.getY() == 30\n    assert reducedRect.getWidth() == 20\n    assert reducedRect.getHeight() == 20\n\n#==================================================================================================\n\ndef test_rectangle_remove_from_top():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    removedRect = rect.removeFromTop(10)\n    assert rect.getY() == 30\n    assert rect.getHeight() == 30\n    assert removedRect.getY() == 20\n    assert removedRect.getHeight() == 10\n\n#==================================================================================================\n\ndef test_rectangle_remove_from_left():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    removedRect = rect.removeFromLeft(10)\n    assert rect.getX() == 20\n    assert rect.getWidth() == 20\n    assert removedRect.getX() == 10\n    assert removedRect.getWidth() == 10\n\n#==================================================================================================\n\ndef test_rectangle_remove_from_right():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    removedRect = rect.removeFromRight(10)\n    assert rect.getWidth() == 20\n    assert removedRect.getX() == 30\n    assert removedRect.getWidth() == 10\n\n#==================================================================================================\n\ndef test_rectangle_remove_from_bottom():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    removedRect = rect.removeFromBottom(10)\n    assert rect.getHeight() == 30\n    assert removedRect.getY() == 50\n    assert removedRect.getHeight() == 10\n\n#==================================================================================================\n\ndef test_rectangle_get_constrained_point():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    pointInside = juce.Point[int](10, 20)\n    pointOutside = juce.Point[int](0, 0)\n    constrainedPoint = rect.getConstrainedPoint(pointOutside)\n    assert constrainedPoint == pointInside\n\n#==================================================================================================\n\ndef test_rectangle_get_relative_point():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    relativePoint = rect.getRelativePoint(0.5, 0.5)  # Center point\n    assert relativePoint.getX() == 25\n    assert relativePoint.getY() == 40\n\n#==================================================================================================\n\ndef test_rectangle_proportion_of_width():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    proportionWidth = rect.proportionOfWidth(0.5)\n    assert proportionWidth == 15\n\n#==================================================================================================\n\ndef test_rectangle_proportion_of_height():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    proportionHeight = rect.proportionOfHeight(0.5)\n    assert proportionHeight == 20\n\n#==================================================================================================\n\ndef test_rectangle_get_proportion():\n    rect = juce.Rectangle[float](10, 10, 10, 10)\n    proportionalRect = rect.getProportion(juce.Rectangle[float](0.25, 0.25, 0.5, 0.5))\n    assert proportionalRect.getCentreX() == pytest.approx(15)\n    assert proportionalRect.getCentreY() == pytest.approx(15)\n    assert proportionalRect.getWidth() == pytest.approx(5)\n    assert proportionalRect.getHeight() == pytest.approx(5)\n\n#==================================================================================================\n\ndef test_rectangle_contains_rectangle():\n    rect1 = juce.Rectangle[int](10, 20, 30, 40)\n    rect2 = juce.Rectangle[int](15, 25, 10, 10)\n    assert rect1.contains(rect2)\n\n    rect3 = juce.Rectangle[int](0, 0, 100, 100)\n    assert not rect1.contains(rect3)\n\n#==================================================================================================\n\ndef test_rectangle_operator_equality():\n    rect1 = juce.Rectangle[int](10, 20, 30, 40)\n    rect2 = juce.Rectangle[int](10, 20, 30, 40)\n    assert rect1 == rect2\n\n    rect3 = juce.Rectangle[int](0, 0, 50, 60)\n    assert rect1 != rect3\n\n#==================================================================================================\n\ndef test_rectangle_operator_addition():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    delta = juce.Point[int](5, 5)\n    resultRect = rect + delta\n    assert resultRect.getX() == 15\n    assert resultRect.getY() == 25\n\n#==================================================================================================\n\ndef test_rectangle_operator_subtraction():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    delta = juce.Point[int](5, 5)\n    resultRect = rect - delta\n    assert resultRect.getX() == 5\n    assert resultRect.getY() == 15\n\n#==================================================================================================\n\ndef test_rectangle_operator_multiplication():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    scaleFactor = 2\n    resultRect = rect * scaleFactor\n    # Expecting the rectangle to scale around the origin, not its center.\n    assert resultRect.getX() == 20\n    assert resultRect.getY() == 40\n    assert resultRect.getWidth() == 60\n    assert resultRect.getHeight() == 80\n\n#==================================================================================================\n\ndef test_rectangle_operator_division():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    scaleFactor = 2\n    resultRect = rect / scaleFactor\n    # Expecting the rectangle to scale around the origin, not its center.\n    assert resultRect.getX() == 5\n    assert resultRect.getY() == 10\n    assert resultRect.getWidth() == 15\n    assert resultRect.getHeight() == 20\n\n#==================================================================================================\n\ndef test_rectangle_set_left():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setLeft(5)\n    assert rect.getX() == 5\n    assert rect.getWidth() == 35  # Adjusted to keep the right edge in place\n\n#==================================================================================================\n\ndef test_rectangle_with_left():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    newRect = rect.withLeft(5)\n    assert newRect.getX() == 5\n    assert newRect.getWidth() == 35  # Adjusted to keep the right edge in place\n\n#==================================================================================================\n\ndef test_rectangle_set_top():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setTop(15)\n    assert rect.getY() == 15\n    assert rect.getHeight() == 45  # Adjusted to keep the bottom edge in place\n\n#==================================================================================================\n\ndef test_rectangle_with_top():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    newRect = rect.withTop(15)\n    assert newRect.getY() == 15\n    assert newRect.getHeight() == 45  # Adjusted to keep the bottom edge in place\n\n#==================================================================================================\n\ndef test_rectangle_set_right():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setRight(50)\n    assert rect.getWidth() == 40  # Adjusted width to reach the new right edge\n\n#==================================================================================================\n\ndef test_rectangle_with_right():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    newRect = rect.withRight(50)\n    assert newRect.getWidth() == 40  # Adjusted width to reach the new right edge\n\n#==================================================================================================\n\ndef test_rectangle_set_bottom():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setBottom(70)\n    assert rect.getHeight() == 50  # Adjusted height to reach the new bottom edge\n\n#==================================================================================================\n\ndef test_rectangle_with_bottom():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    newRect = rect.withBottom(70)\n    assert newRect.getHeight() == 50  # Adjusted height to reach the new bottom edge\n\n#==================================================================================================\n\ndef test_rectangle_with_trimmed_left():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    trimmedRect = rect.withTrimmedLeft(5)\n    assert trimmedRect.getX() == 15\n    assert trimmedRect.getWidth() == 25\n\n#==================================================================================================\n\ndef test_rectangle_with_trimmed_right():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    trimmedRect = rect.withTrimmedRight(5)\n    assert trimmedRect.getWidth() == 25\n\n#==================================================================================================\n\ndef test_rectangle_with_trimmed_top():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    trimmedRect = rect.withTrimmedTop(5)\n    assert trimmedRect.getY() == 25\n    assert trimmedRect.getHeight() == 35\n\n#==================================================================================================\n\ndef test_rectangle_with_trimmed_bottom():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    trimmedRect = rect.withTrimmedBottom(5)\n    assert trimmedRect.getHeight() == 35\n\n#==================================================================================================\n\ndef test_rectangle_set_horizontal_range():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setHorizontalRange(juce.Range[int](5, 50))\n    assert rect.getX() == 5\n    assert rect.getWidth() == 45\n\n#==================================================================================================\n\ndef test_rectangle_set_vertical_range():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect.setVerticalRange(juce.Range[int](15, 70))\n    assert rect.getY() == 15\n    assert rect.getHeight() == 55\n\n#==================================================================================================\n\ndef test_rectangle_enlarge_if_adjacent():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    adjacentRect = juce.Rectangle[int](40, 20, 20, 40)\n    assert rect.enlargeIfAdjacent(adjacentRect)\n    assert rect.getWidth() == 50\n\n    notAdjacentRect = juce.Rectangle[int](70, 20, 30, 40)\n    assert not rect.enlargeIfAdjacent(notAdjacentRect)\n\n#==================================================================================================\n\ndef test_rectangle_reduce_if_partly_contained_in():\n    rect = juce.Rectangle[int](10, 10, 20, 20)\n    largerRect = juce.Rectangle[int](5, 5, 20, 40)\n    assert rect.reduceIfPartlyContainedIn(largerRect)\n    assert not rect.isEmpty()\n\n    nonOverlappingRect = juce.Rectangle[int](100, 100, 30, 40)\n    assert not rect.reduceIfPartlyContainedIn(nonOverlappingRect)\n\n    overlappingButComplexRect = juce.Rectangle[int](5, 5, 10, 10)\n    assert not rect.reduceIfPartlyContainedIn(overlappingButComplexRect)\n\n#==================================================================================================\n\ndef test_rectangle_constrained_within():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    constrainingRect = juce.Rectangle[int](0, 0, 20, 20)\n    constrainedRect = rect.constrainedWithin(constrainingRect)\n    assert constrainedRect.getX() == 0\n    assert constrainedRect.getY() == 0\n    assert constrainedRect.getWidth() == 20\n    assert constrainedRect.getHeight() == 20\n\n#==================================================================================================\n\ndef test_rectangle_transformed_by():\n    # Simplified test, assuming AffineTransform is a similar concept as in other graphic libraries\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    # AffineTransform would typically include operations like translate, rotate, scale, etc.\n    # This method would then test if the rectangle is correctly transformed by such an AffineTransform,\n    # which is challenging without a concrete AffineTransform implementation to test with.\n    # Placeholder test code assuming a hypothetical transform that doubles size:\n    # transformedRect = rect.transformedBy(doubleSizeTransform)\n    # assert transformedRect.getWidth() == 60\n    # assert transformedRect.getHeight() == 80\n    pass  # Replace pass with actual implementation when AffineTransform is available\n\n#==================================================================================================\n\ndef test_rectangle_get_smallest_integer_container():\n    rect = juce.Rectangle[float](10.5, 20.5, 30.1, 40.2)\n    integerContainer = rect.getSmallestIntegerContainer()\n    assert integerContainer.getX() == 10\n    assert integerContainer.getY() == 20\n    assert integerContainer.getWidth() == 31  # Rounded up to contain the floating point size\n    assert integerContainer.getHeight() == 41  # Rounded up\n\n#==================================================================================================\n\ndef test_rectangle_to_nearest_int():\n    rect = juce.Rectangle[float](10.7, 20.7, 30.1, 40.2)\n    intRect = rect.toNearestInt()\n    assert intRect.getX() == 11\n    assert intRect.getY() == 21\n    assert intRect.getWidth() == 30\n    assert intRect.getHeight() == 40\n\n#==================================================================================================\n\ndef test_rectangle_to_nearest_int_edges():\n    rect = juce.Rectangle[float](10.5, 20.5, 30.1, 40.2)\n    intEdgesRect = rect.toNearestIntEdges()\n    assert intEdgesRect.getX() == 10\n    assert intEdgesRect.getY() == 20\n    assert intEdgesRect.getWidth() == 31  # Rounded up to nearest edge\n    assert intEdgesRect.getHeight() == 41  # Rounded up to nearest edge\n\n#==================================================================================================\n\ndef test_rectangle_to_float():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    floatRect = rect.toFloat()\n    assert floatRect.getX() == pytest.approx(10.0)\n    assert floatRect.getY() == pytest.approx(20.0)\n    assert floatRect.getWidth() == pytest.approx(30.0)\n    assert floatRect.getHeight() == pytest.approx(40.0)\n\n#==================================================================================================\n\n\"\"\"\ndef test_rectangle_to_type():\n    rect = juce.Rectangle[float](10.5, 20.5, 30.5, 40.5)\n    intRect = rect.toType[int]()\n    assert intRect.getX() == 10\n    assert intRect.getY() == 20\n    assert intRect.getWidth() == 30\n    assert intRect.getHeight() == 40\n\n    # This demonstrates converting a Rectangle of one type to another, like float to int in this case.\n\"\"\"\n\n#==================================================================================================\n\ndef test_rectangle_to_string():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rectStr = rect.toString()\n    expectedStr = \"10 20 30 40\"\n    assert rectStr == expectedStr\n\n    # This method tests converting a rectangle's properties to a string format.\n\n#==================================================================================================\n\ndef test_rectangle_static_left_top_right_bottom():\n    rect = juce.Rectangle[int].leftTopRightBottom(10, 20, 40, 60)\n    assert rect.getX() == 10\n    assert rect.getY() == 20\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n    # This static method creates a Rectangle from left, top, right, and bottom values.\n\n#==================================================================================================\n\n\"\"\"\ndef test_rectangle_static_find_area_containing_points():\n    points = [juce.Point[int](10, 20), juce.Point[int](30, 40), juce.Point[int](50, 60)]\n    boundingRect = juce.Rectangle[int].findAreaContainingPoints(points, len(points))\n    assert boundingRect.getX() == 10\n    assert boundingRect.getY() == 20\n    assert boundingRect.getWidth() == 40\n    assert boundingRect.getHeight() == 40\n\n    # This static method finds the smallest Rectangle that can contain a given set of points.\n\"\"\"\n\n#==================================================================================================\n\n\"\"\"\ndef test_rectangle_static_intersect_rectangles():\n    x1, y1, w1, h1 = 10, 20, 30, 40\n    x2, y2, w2, h2 = 20, 30, 50, 60\n    intersected = juce.Rectangle[int].intersectRectangles(x1, y1, w1, h1, x2, y2, w2, h2)\n    assert intersected\n    assert x1 == 20\n    assert y1 == 30\n    assert w1 == 20\n    assert h1 == 30\n\n    # This static utility method tests if two sets of rectangle coordinates intersect and adjusts the first set to the intersection area if they do.\n\"\"\"\n\n#==================================================================================================\n\ndef test_rectangle_static_from_string():\n    rectStr = \"10 20 30 40\"\n    rect = juce.Rectangle[int].fromString(rectStr)\n    assert rect.getX() == 10\n    assert rect.getY() == 20\n    assert rect.getWidth() == 30\n    assert rect.getHeight() == 40\n\n"
  },
  {
    "path": "tests/test_juce_graphics/test_RectangleList.py",
    "content": "import pytest\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_rectangle_list_default_constructor():\n    rect_list = juce.RectangleList[int]()\n    assert rect_list.isEmpty() == True\n    assert rect_list.getNumRectangles() == 0\n\n#==================================================================================================\n\ndef test_rectangle_list_copy_constructor():\n    original = juce.RectangleList[int](juce.Rectangle[int](10, 20, 30, 40))\n    copy = juce.RectangleList[int](original)\n    assert copy.getNumRectangles() == 1\n    assert copy.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_one_rectangle_constructor():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect_list = juce.RectangleList[int](rect)\n    assert rect_list.getNumRectangles() == 1\n    assert rect_list.getRectangle(0) == rect\n\n#==================================================================================================\n\ndef test_rectangle_list_assignment_operator():\n    original = juce.RectangleList[int](juce.Rectangle[int](10, 20, 30, 40))\n    copy = juce.RectangleList[int]()\n    copy = original\n    assert copy.getNumRectangles() == 1\n    assert copy.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_move_constructor():\n    original = juce.RectangleList[int](juce.Rectangle[int](10, 20, 30, 40))\n    moved = juce.RectangleList[int](original)\n    assert moved.getNumRectangles() == 1\n    assert moved.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_move_assignment_operator():\n    original = juce.RectangleList[int](juce.Rectangle[int](10, 20, 30, 40))\n    moved = juce.RectangleList[int]()\n    moved = original\n    assert moved.getNumRectangles() == 1\n    assert moved.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_is_empty():\n    rect_list = juce.RectangleList[int]()\n    assert rect_list.isEmpty() == True\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.isEmpty() == False\n\n#==================================================================================================\n\ndef test_rectangle_list_get_num_rectangles():\n    rect_list = juce.RectangleList[int]()\n    assert rect_list.getNumRectangles() == 0\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.getNumRectangles() == 1\n\n#==================================================================================================\n\ndef test_rectangle_list_get_rectangle():\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect_list = juce.RectangleList[int](rect)\n    assert rect_list.getRectangle(0) == rect\n\n#==================================================================================================\n\ndef test_rectangle_list_clear():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.clear()\n    assert rect_list.isEmpty() == True\n\n#==================================================================================================\n\ndef test_rectangle_list_add_rectangle():\n    rect_list = juce.RectangleList[int]()\n    rect = juce.Rectangle[int](10, 20, 30, 40)\n    rect_list.add(rect)\n    assert rect_list.getNumRectangles() == 1\n    assert rect_list.getRectangle(0) == rect\n\n#==================================================================================================\n\ndef test_rectangle_list_add_values():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(10, 20, 30, 40)\n    assert rect_list.getNumRectangles() == 1\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_add_without_merging():\n    rect_list = juce.RectangleList[int]()\n    rect_list.addWithoutMerging(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.getNumRectangles() == 1\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_add_another_list():\n    rect_list1 = juce.RectangleList[int]()\n    rect_list1.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list2 = juce.RectangleList[int]()\n    rect_list2.add(juce.Rectangle[int](50, 60, 70, 80))\n    rect_list1.add(rect_list2)\n    assert rect_list1.getNumRectangles() == 2\n\n#==================================================================================================\n\ndef test_rectangle_list_subtract_rectangle():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.subtract(juce.Rectangle[int](10, 20, 15, 20))\n    assert rect_list.getNumRectangles() == 2\n\n#==================================================================================================\n\ndef test_rectangle_list_subtract_another_list():\n    rect_list1 = juce.RectangleList[int]()\n    rect_list1.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list2 = juce.RectangleList[int]()\n    rect_list2.add(juce.Rectangle[int](10, 20, 15, 20))\n    result = rect_list1.subtract(rect_list2)\n    assert result == True\n\n#==================================================================================================\n\ndef test_rectangle_list_clip_to_rectangle():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    result = rect_list.clipTo(juce.Rectangle[int](5, 15, 25, 35))\n    assert result == True\n\n#==================================================================================================\n\ndef test_rectangle_list_clip_to_another_list():\n    rect_list1 = juce.RectangleList[int]()\n    rect_list1.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list2 = juce.RectangleList[int]()\n    rect_list2.add(juce.Rectangle[int](5, 15, 25, 35))\n    result = rect_list1.clipTo(rect_list2)\n    assert result == True\n\n#==================================================================================================\n\ndef test_rectangle_list_get_intersection_with():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    dest_region = juce.RectangleList[int]()\n    result = rect_list.getIntersectionWith(juce.Rectangle[int](5, 15, 25, 35), dest_region)\n    assert result == True\n\n#==================================================================================================\n\ndef test_rectangle_list_swap_with():\n    rect_list1 = juce.RectangleList[int]()\n    rect_list1.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list2 = juce.RectangleList[int]()\n    rect_list2.add(juce.Rectangle[int](50, 60, 70, 80))\n    rect_list1.swapWith(rect_list2)\n    assert rect_list1.getRectangle(0) == juce.Rectangle[int](50, 60, 70, 80)\n    assert rect_list2.getRectangle(0) == juce.Rectangle[int](10, 20, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_contains_point():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.containsPoint(juce.Point[int](15, 25)) == True\n    assert rect_list.containsPoint(35, 75) == False\n\n#==================================================================================================\n\ndef test_rectangle_list_contains_rectangle():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.containsRectangle(juce.Rectangle[int](15, 25, 5, 5)) == True\n    assert rect_list.containsRectangle(juce.Rectangle[int](0, 0, 100, 100)) == False\n\n#==================================================================================================\n\ndef test_rectangle_list_intersects_rectangle():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    assert rect_list.intersectsRectangle(juce.Rectangle[int](45, 75, 10, 10)) == False\n    assert rect_list.intersectsRectangle(juce.Rectangle[int](15, 25, 10, 10)) == True\n\n#==================================================================================================\n\ndef test_rectangle_list_intersects_another_list():\n    rect_list1 = juce.RectangleList[int]()\n    rect_list1.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list2 = juce.RectangleList[int]()\n    rect_list2.add(juce.Rectangle[int](45, 75, 10, 10))\n    assert rect_list1.intersects(rect_list2) == False\n    rect_list2.add(juce.Rectangle[int](15, 25, 10, 10))\n    assert rect_list1.intersects(rect_list2) == True\n\n#==================================================================================================\n\ndef test_rectangle_list_get_bounds():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.add(juce.Rectangle[int](50, 60, 70, 80))\n    bounds = rect_list.getBounds()\n    assert bounds == juce.Rectangle[int](10, 20, 110, 120)\n\n#==================================================================================================\n\ndef test_rectangle_list_consolidate():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.add(juce.Rectangle[int](40, 20, 30, 40))\n    rect_list.consolidate()\n    assert rect_list.getNumRectangles() == 1\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](10, 20, 60, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_offset_all_point():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.offsetAll(juce.Point[int](10, 10))\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](20, 30, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_offset_all_values():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.offsetAll(10, 10)\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](20, 30, 30, 40)\n\n#==================================================================================================\n\ndef test_rectangle_list_scale_all():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.scaleAll(2)\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](20, 40, 60, 80)\n\n#==================================================================================================\n\ndef test_rectangle_list_transform_all():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    transform = juce.AffineTransform().scaled(2)\n    rect_list.transformAll(transform)\n    assert rect_list.getRectangle(0) == juce.Rectangle[int](20, 40, 60, 80)\n\n#==================================================================================================\n\ndef test_rectangle_list_to_path():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    path = rect_list.toPath()\n    assert isinstance(path, juce.Path)\n\n#==================================================================================================\n\ndef test_rectangle_list_iterators():\n    rect_list = juce.RectangleList[int]()\n    rect_list.add(juce.Rectangle[int](10, 20, 30, 40))\n    rect_list.add(juce.Rectangle[int](50, 60, 70, 80))\n    rects = [r for r in rect_list]\n    assert rects == [juce.Rectangle[int](10, 20, 30, 40), juce.Rectangle[int](50, 60, 70, 80)]\n\n#==================================================================================================\n\ndef test_rectangle_list_ensure_storage_allocated():\n    rect_list = juce.RectangleList[int]()\n    for x in range(10):\n        rect_list.add(juce.Rectangle[int](10 + x * 20, 20 + x * 10, 5, 5))\n    rect_list.ensureStorageAllocated(20)\n    assert rect_list.getNumRectangles() == 10\n"
  },
  {
    "path": "tests/test_juce_graphics/utilities.py",
    "content": "import os\nimport inspect\nimport numpy\nimport imageio.v2 as imageio\n\nimport popsicle as juce\n\n#==================================================================================================\n\nthis_file = juce.File(os.path.abspath(__file__))\n\ndef get_logo_image() -> juce.Image:\n    return juce.ImageCache.getFromFile(this_file.getSiblingFile(\"data\").getChildFile(f\"logo.png\"))\n\ndef get_original_image_path(test_name: str) -> juce.File:\n    return this_file.getParentDirectory().getSiblingFile(\"runtime_data\").getChildFile(f\"{test_name}.png\")\n\ndef get_reference_image_path(test_name: str) -> juce.File:\n    return this_file.getSiblingFile(\"reference_images\").getChildFile(f\"{test_name}.png\")\n\ndef get_failed_folder_path() -> juce.File:\n    return this_file.getParentDirectory().getSiblingFile(\"compare_data\")\n\ndef get_failed_generated_image_path(test_name: str) -> juce.File:\n    return get_failed_folder_path().getChildFile(f\"{test_name}_generated.png\")\n\ndef get_failed_reference_image_path(test_name: str) -> juce.File:\n    return get_failed_folder_path().getChildFile(f\"{test_name}_reference.png\")\n\ndef get_failed_diff_image_path(test_name: str) -> juce.File:\n    return get_failed_folder_path().getChildFile(f\"{test_name}_diff.png\")\n\n#==================================================================================================\n\ndef load_image(file: juce.File) -> juce.Image:\n    return juce.ImageCache.getFromFile(file)\n\ndef store_image(file: juce.File, img: juce.Image):\n    file.deleteFile()\n    assert juce.PNGImageFormat().writeImageToStream(img, juce.FileOutputStream(file))\n\n#==================================================================================================\n\ndef mean_squared_error(image1, image2):\n    err = numpy.sum((image1 - image2) ** 2)\n    err /= float(image1.shape[0] * image1.shape[1])\n    return err\n\ndef is_image_equal_reference(update_rendering: bool, original_image: juce.Image, threshold = 0.0) -> bool:\n    test_name = inspect.getouterframes(inspect.currentframe())[1].function\n\n    reference_path = get_reference_image_path(test_name)\n    if not reference_path.existsAsFile() or update_rendering:\n        store_image(reference_path, original_image)\n        return True\n\n    original_path = get_original_image_path(test_name)\n    store_image(original_path, original_image)\n\n    pre_image1 = imageio.imread(original_path.getFullPathName())\n    pre_image2 = imageio.imread(reference_path.getFullPathName())\n    image1 = pre_image1.astype(\"float\") / 255\n    image2 = pre_image2.astype(\"float\") / 255\n    mse = mean_squared_error(image1, image2)\n\n    match = mse <= threshold\n    if not match:\n        result_image_diff = numpy.abs(image1 - image2) / mse\n        result_image_diff = (numpy.clip(result_image_diff, 0, 1) * 255).astype(\"uint8\")\n        for row in result_image_diff:\n            for pixel in row:\n                pixel[3] = 255\n\n        imageio.imwrite(get_failed_diff_image_path(test_name).getFullPathName(), result_image_diff)\n        imageio.imwrite(get_failed_generated_image_path(test_name).getFullPathName(), pre_image1)\n        imageio.imwrite(get_failed_reference_image_path(test_name).getFullPathName(), pre_image2)\n\n    original_path.deleteFile()\n    return match\n"
  },
  {
    "path": "tests/test_juce_gui_basics/__init__.py",
    "content": "import os\nimport sys\nimport pytest\n\nfrom .. import common\n\nimport popsicle as juce\n\nif not hasattr(juce, \"Component\") or (sys.platform == \"linux\" and not os.environ.get(\"DISPLAY\", False)):\n    pytest.skip(allow_module_level=True)\n"
  },
  {
    "path": "tests/test_juce_gui_basics/test_Button.py",
    "content": "from ..utilities import equal_images\n\nimport popsicle as juce\n\n#==================================================================================================\n\nclass CustomButton(juce.Button):\n    timesClicked = 0\n    timesStateChanged = 0\n\n    def paintButton(self, g, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown):\n        if self.getToggleState():\n            g.fillAll(juce.Colours.red)\n        else:\n            g.fillAll(juce.Colours.green)\n\n    def clicked(self):\n        self.timesClicked += 1\n\n    def buttonStateChanged(self):\n        self.timesStateChanged += 1\n\nclass CustomButtonListener(juce.Button.Listener):\n    lastClickedButton = None\n    lastChangedButton = None\n    timesClicked = 0\n    timesStateChanged = 0\n\n    def buttonClicked(self, btn):\n        self.lastClickedButton = btn\n        self.timesClicked += 1\n\n    def buttonStateChanged(self, btn):\n        self.lastChangedButton = btn\n        self.timesStateChanged += 1\n\n#==================================================================================================\n\ndef test_state_properties(juce_app):\n    b = CustomButton(\"abc\")\n    assert not b.isDown()\n    assert not b.isOver()\n\n#==================================================================================================\n\ndef test_button_text(juce_app):\n    b = CustomButton(\"abc\")\n    assert b.getButtonText() == \"abc\"\n\n    b.setButtonText(\"123\")\n    assert b.getButtonText() == \"123\"\n\n#==================================================================================================\n\ndef test_connected_edges(juce_app):\n    b = CustomButton(\"abc\")\n    assert b.getConnectedEdgeFlags() == 0\n    assert not b.isConnectedOnLeft()\n    assert not b.isConnectedOnRight()\n    assert not b.isConnectedOnTop()\n    assert not b.isConnectedOnBottom()\n\n    b.setConnectedEdges(juce.Button.ConnectedOnLeft)\n    assert b.getConnectedEdgeFlags() == juce.Button.ConnectedOnLeft\n    assert b.isConnectedOnLeft()\n    assert not b.isConnectedOnRight()\n    assert not b.isConnectedOnTop()\n    assert not b.isConnectedOnBottom()\n\n    b.setConnectedEdges(juce.Button.ConnectedOnLeft | juce.Button.ConnectedOnRight)\n    assert b.getConnectedEdgeFlags() == juce.Button.ConnectedOnLeft | juce.Button.ConnectedOnRight\n    assert b.isConnectedOnLeft()\n    assert b.isConnectedOnRight()\n    assert not b.isConnectedOnTop()\n    assert not b.isConnectedOnBottom()\n\n#==================================================================================================\n\ndef test_button_states(juce_app):\n    b = CustomButton(\"abc\")\n    assert b.getState() == juce.Button.buttonNormal\n\n    b.setState(juce.Button.buttonOver)\n    assert b.getState() == juce.Button.buttonOver\n\n    b.setState(juce.Button.buttonDown)\n    assert b.getState() == juce.Button.buttonDown\n\n    b.setState(juce.Button.buttonNormal)\n    assert b.getState() == juce.Button.buttonNormal\n\n#==================================================================================================\n\ndef test_shortcut(juce_app):\n    b = CustomButton(\"abc\")\n\n    key = juce.KeyPress(juce.KeyPress.F1Key)\n    key_shift = juce.KeyPress('a', juce.ModifierKeys.shiftModifier, 'A')\n\n    assert not b.isRegisteredForShortcut(key)\n    assert not b.isRegisteredForShortcut(key_shift)\n\n    b.addShortcut(key)\n    b.addShortcut(key_shift)\n\n    b.clearShortcuts()\n\n    assert not b.isRegisteredForShortcut(key)\n    assert not b.isRegisteredForShortcut(key_shift)\n\n#==================================================================================================\n\ndef test_toggleability(juce_app):\n    b = CustomButton(\"abc\")\n    assert not b.isToggleable()\n    assert not b.getToggleState()\n\n    b.setToggleable(True)\n    assert b.isToggleable()\n\n    listener = CustomButtonListener()\n    b.addListener(listener)\n\n    assert b.timesStateChanged == 0\n\n    b.setToggleState(True, juce.dontSendNotification)\n    assert listener.lastChangedButton is None\n    assert b.getToggleState()\n    assert b.timesStateChanged == 1\n\n    b.setToggleState(False, juce.dontSendNotification)\n    assert listener.lastChangedButton is None\n    assert not b.getToggleState()\n    assert b.timesStateChanged == 2\n\n    b.setToggleState(True, juce.sendNotification)\n    assert listener.lastChangedButton == b\n    assert b.getToggleState()\n\n    b.removeListener(listener)\n    listener.lastChangedButton = None\n\n    b.setToggleState(False, juce.sendNotification)\n    assert listener.lastChangedButton is None\n    assert not b.getToggleState()\n\n#==================================================================================================\n\ndef test_toggleability_by_clicking(juce_app):\n    b = CustomButton(\"abc\")\n    assert not b.getClickingTogglesState()\n    assert not b.getToggleState()\n\n    listener = CustomButtonListener()\n    b.addListener(listener)\n\n    b.triggerClick()\n    next(juce_app)\n    assert not b.getToggleState()\n    assert b.timesStateChanged == 1\n    assert listener.timesClicked == 1\n    assert listener.timesStateChanged == 1\n\n    b.setClickingTogglesState(True)\n\n    b.triggerClick()\n    next(juce_app)\n    assert b.getToggleState()\n    assert b.timesStateChanged == 2\n    assert listener.timesClicked == 2\n    assert listener.timesStateChanged == 2\n\n#==================================================================================================\n\ndef test_clicking_callback(juce_app):\n    b = CustomButton(\"abc\")\n    b.setSize(100, 20)\n\n    b.triggerClick()\n    assert b.timesClicked == 0\n    next(juce_app)\n    assert b.timesClicked == 1\n\n    b.triggerClick()\n    assert b.timesClicked == 1\n    next(juce_app)\n    assert b.timesClicked == 2\n\n    timesClicked = 0\n    def clickHandler():\n        nonlocal timesClicked\n        timesClicked += 1\n    b.onClick = clickHandler\n\n    b.triggerClick()\n    assert timesClicked == 0\n    next(juce_app)\n    assert timesClicked == 1\n\n#==================================================================================================\n\ndef test_state_change(juce_app):\n    b = CustomButton(\"abc\")\n    b.setSize(100, 20)\n\n#==================================================================================================\n\ndef test_rendering(juce_app):\n    b = CustomButton(\"abc\")\n    b.setSize(100, 20)\n\n    b.setToggleState(False, juce.dontSendNotification)\n    snapshot_off = b.createComponentSnapshot(b.getLocalBounds())\n\n    b.setToggleState(True, juce.dontSendNotification)\n    snapshot_on = b.createComponentSnapshot(b.getLocalBounds())\n\n    assert equal_images(snapshot_off, snapshot_off)\n    assert equal_images(snapshot_on, snapshot_on)\n    assert not equal_images(snapshot_off, snapshot_on)\n"
  },
  {
    "path": "tests/test_juce_gui_basics/test_DocumentWindow.py",
    "content": "import popsicle as juce\n\n#==================================================================================================\n\nclass Window(juce.DocumentWindow):\n    def closeButtonPressed(self):\n        self.setVisible(False)\n        self.removeFromDesktop()\n\n    def minimiseButtonPressed(self):\n        print(\"min\")\n\n    def maximiseButtonPressed(self):\n        print(\"max\")\n\n#==================================================================================================\n\ndef test_display_visibility(juce_app):\n    window = Window(\"abc\", juce.Colours.white, juce.DocumentWindow.allButtons, True)\n    assert window.isOnDesktop()\n    assert window.getWidth() == 128\n    assert window.getHeight() == 128\n    assert not window.isVisible()\n    assert not window.isShowing()\n\n    window.centreWithSize(200, 200)\n    assert window.getWidth() == 200\n    assert window.getHeight() == 200\n\n    window.setVisible(True)\n    assert window.isVisible()\n    assert window.isShowing()\n\n    window.setVisible(False)\n    assert not window.isVisible()\n    assert not window.isShowing()\n\n    window.setVisible(True)\n    window.removeFromDesktop()\n    assert window.isVisible()\n    assert not window.isShowing()\n\n#==================================================================================================\n\ndef test_display_not_on_desktop(juce_app):\n    window = Window(\"abc\", juce.Colours.white, juce.DocumentWindow.allButtons, False)\n    assert not window.isOnDesktop()\n    assert not window.isVisible()\n    assert not window.isShowing()\n\n    window.addToDesktop()\n    assert window.isOnDesktop()\n    assert not window.isVisible()\n    assert not window.isShowing()\n\n#==================================================================================================\n\ndef test_buttons(juce_app):\n    buttons = juce.DocumentWindow.allButtons\n    window = Window(\"abc\", juce.Colours.white, buttons, True)\n    assert isinstance (window.getCloseButton(), juce.Button)\n    assert isinstance (window.getMinimiseButton(), juce.Button)\n    assert isinstance (window.getMaximiseButton(), juce.Button)\n\n    buttons = juce.DocumentWindow.minimiseButton | juce.DocumentWindow.maximiseButton\n    window = Window(\"abc\", juce.Colours.white, buttons, True)\n    assert window.getCloseButton() is None\n    assert isinstance (window.getMinimiseButton(), juce.Button)\n    assert isinstance (window.getMaximiseButton(), juce.Button)\n\n    buttons = 0\n    window = Window(\"abc\", juce.Colours.white, buttons, True)\n    assert window.getCloseButton() is None\n    assert window.getMinimiseButton() is None\n    assert window.getMaximiseButton() is None\n"
  },
  {
    "path": "tests/test_juce_gui_basics/test_JUCEApplication.py",
    "content": "import popsicle as juce\n\n\n#==================================================================================================\n\nclass CustomApplication(juce.JUCEApplication):\n    wasInitialised = False\n    wasShutdown = False\n    commandLineParameters = None\n\n    def __init__(self):\n        juce.JUCEApplication.__init__(self)\n\n    def getApplicationName(self):\n        return \"xyz\"\n\n    def getApplicationVersion(self):\n        return \"42.0\"\n\n    def initialise(self, commandLineParameters):\n        self.wasInitialised = True\n        self.commandLineParameters = commandLineParameters\n\n    def shutdown(self):\n        self.wasShutdown = True\n\n#==================================================================================================\n\ndef test_applications_invariants():\n    assert juce.JUCEApplication.isStandaloneApp()\n\n#==================================================================================================\n\ndef test_application():\n    a = CustomApplication()\n    assert not a.wasInitialised\n    assert not a.wasShutdown\n    assert a.getApplicationName() == \"xyz\"\n    assert a.getApplicationVersion() == \"42.0\"\n    assert a.getApplicationReturnValue() == 0\n\n    a.initialise(\"abc\")\n    assert a.wasInitialised\n    assert a.commandLineParameters == \"abc\"\n\n    a.setApplicationReturnValue(1)\n    assert a.getApplicationReturnValue() == 1\n\n    a.shutdown()\n    assert a.wasShutdown\n"
  },
  {
    "path": "tests/test_juce_gui_basics/test_KeyPress.py",
    "content": "import pytest\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef test_key_press_default_constructor():\n    key_press = juce.KeyPress()\n    assert not key_press.isValid()\n\n#==================================================================================================\n\ndef test_key_press_constructor_with_modifierkeys_parameters():\n    key_code = juce.KeyPress.spaceKey\n    modifiers = juce.ModifierKeys()\n    text_character = 'a'\n\n    key_press = juce.KeyPress(text_character, modifiers, text_character)\n    assert key_press.getKeyCode() == ord(text_character)\n    assert key_press.getModifiers() == modifiers\n    assert key_press.getTextCharacter() == text_character\n\n    key_press = juce.KeyPress(key_code, modifiers, text_character)\n    assert key_press.getKeyCode() == key_code\n    assert key_press.getModifiers() == modifiers\n    assert key_press.getTextCharacter() == text_character\n\n#==================================================================================================\n\ndef test_key_press_constructor_with_flags_parameters():\n    key_code = juce.KeyPress.spaceKey\n    modifiers = juce.ModifierKeys.shiftModifier\n    text_character = 'b'\n\n    key_press = juce.KeyPress(text_character, modifiers, text_character)\n    assert key_press.getKeyCode() == ord(text_character)\n    assert key_press.getModifiers() == juce.ModifierKeys(modifiers)\n    assert key_press.getTextCharacter() == text_character\n\n    key_press = juce.KeyPress(key_code, modifiers, text_character)\n    assert key_press.getKeyCode() == key_code\n    assert key_press.getModifiers() == juce.ModifierKeys(modifiers)\n    assert key_press.getTextCharacter() == text_character\n\n#==================================================================================================\n\ndef test_key_press_constructor_with_ints_parameters():\n    key_code = juce.KeyPress.spaceKey\n    modifiers = juce.ModifierKeys.shiftModifier | juce.ModifierKeys.commandModifier\n    text_character = 'c'\n\n    key_press = juce.KeyPress(text_character, modifiers, text_character)\n    assert key_press.getKeyCode() == ord(text_character)\n    assert key_press.getModifiers() == juce.ModifierKeys(modifiers)\n    assert key_press.getTextCharacter() == text_character\n\n    key_press = juce.KeyPress(key_code, modifiers, text_character)\n    assert key_press.getKeyCode() == key_code\n    assert key_press.getModifiers() == juce.ModifierKeys(modifiers)\n    assert key_press.getTextCharacter() == text_character\n\n#==================================================================================================\n\ndef test_key_press_constructor_with_key_code():\n    key_code = juce.KeyPress.escapeKey\n    key_press = juce.KeyPress(key_code)\n    assert key_press.getKeyCode() == key_code\n\n#==================================================================================================\n\ndef test_key_press_equality():\n    key_press1 = juce.KeyPress(juce.KeyPress.spaceKey)\n    key_press2 = juce.KeyPress(juce.KeyPress.spaceKey)\n    key_press3 = juce.KeyPress(juce.KeyPress.escapeKey)\n    assert key_press1 == key_press2\n    assert key_press1 != key_press3\n\n#==================================================================================================\n\ndef test_key_press_equality_with_key_code():\n    key_press = juce.KeyPress(juce.KeyPress.spaceKey)\n    assert key_press == juce.KeyPress.spaceKey\n    assert key_press != juce.KeyPress.escapeKey\n\n#==================================================================================================\n\ndef test_key_press_is_valid():\n    key_press = juce.KeyPress(juce.KeyPress.spaceKey)\n    assert key_press.isValid()\n    invalid_key_press = juce.KeyPress()\n    assert not invalid_key_press.isValid()\n\n#==================================================================================================\n\ndef test_key_press_is_key_code():\n    key_press = juce.KeyPress(juce.KeyPress.spaceKey)\n    assert key_press.isKeyCode(juce.KeyPress.spaceKey)\n    assert not key_press.isKeyCode(juce.KeyPress.escapeKey)\n\n#==================================================================================================\n\ndef test_key_press_create_from_description():\n    key_press_description = \"ctrl + a\"\n    key_press = juce.KeyPress.createFromDescription(key_press_description)\n    assert key_press.isValid()\n    assert key_press.getKeyCode() == ord('A')\n    assert key_press.getModifiers() == juce.ModifierKeys(juce.ModifierKeys.ctrlModifier)\n    assert key_press.getTextCharacter() == '\\x00'\n\n#==================================================================================================\n\ndef test_key_press_get_text_description():\n    key_press = juce.KeyPress(juce.KeyPress.spaceKey)\n    assert key_press.getTextDescription() == \"spacebar\"\n\n#==================================================================================================\n\ndef test_key_press_get_text_description_with_icons():\n    key_press = juce.KeyPress(juce.KeyPress.spaceKey)\n    assert key_press.getTextDescriptionWithIcons() == \"␣\" or key_press.getTextDescriptionWithIcons() == \"spacebar\"\n\n#==================================================================================================\n\ndef test_key_press_is_currently_down():\n    assert not juce.KeyPress.isKeyCurrentlyDown(juce.KeyPress.spaceKey)\n"
  },
  {
    "path": "tests/utilities.py",
    "content": "import os\nfrom pathlib import Path\n\nimport popsicle as juce\n\n#==================================================================================================\n\ndef get_runtime_data_folder() -> juce.File:\n    return juce.File(os.path.abspath(__file__)).getParentDirectory().getChildFile(\"runtime_data\")\n\ndef get_runtime_data_file(name: str) -> juce.File:\n    return get_runtime_data_folder().getChildFile(name)\n\n#==================================================================================================\n\ndef remove_directory_recursively(directory, excluding_files = None, excluding_folders = None):\n    directory = Path(directory)\n\n    for item in directory.iterdir():\n        if item.is_dir() and (not excluding_folders or item.name not in excluding_folders):\n            remove_directory_recursively(item, excluding_files, excluding_folders)\n        elif (not excluding_files or item.name not in excluding_files):\n            item.unlink()\n\n    try:\n        directory.rmdir()\n    except OSError:\n        pass\n\n#==================================================================================================\n\ndef equal_images(lhs: juce.Image, rhs: juce.Image) -> bool:\n    if lhs.getFormat() != rhs.getFormat():\n        return False\n\n    lhs_pixels = juce.Image.BitmapData(lhs, juce.Image.BitmapData.readOnly)\n    rhs_pixels = juce.Image.BitmapData(rhs, juce.Image.BitmapData.readOnly)\n\n    if lhs_pixels.size != rhs_pixels.size:\n        return False\n\n    return lhs_pixels.data == rhs_pixels.data\n\n#==================================================================================================\n\ndef save_component_snapshot_to_file(component: juce.Component, file: juce.File) -> bool:\n    format = juce.ImageFileFormat.findImageFormatForFileExtension(file)\n    if not format:\n        return False\n\n    file.deleteFile()\n\n    out = juce.FileOutputStream(file)\n    if not out.openedOk():\n        return False\n\n    snapshot = component.createComponentSnapshot(component.getLocalBounds())\n\n    format.writeImageToStream(snapshot, out)\n\n    out.flush()\n\n    return True\n"
  }
]