From a562b55d43c0083ed4cd876ffb59208183984c93 Mon Sep 17 00:00:00 2001 From: Sam Vente Date: Thu, 1 Aug 2024 14:12:42 +0200 Subject: [PATCH] Update workflows (#503) Summary of changes: 1. updated all the used action versions to the latest vesion, as some were really quite out of date, and made any changes necessary to fix whatever broke 2. removed black in favour of ruff formatting as ruff formatting implements the same formatting rules as black but runs at least an order of magnitude faster 3. did the same two things for the pre-commit config 4. ran pre-commit on all files 5. removed the manual linting steps in favor of just using the pre-commit action which is both faster (does better caching) and ensures both local and ci checks are consistent --- .github/ISSUE_TEMPLATE/bug_report.yaml | 8 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- .github/workflows/auto_code_doc.yml | 6 +- .github/workflows/docs.yml | 12 +- .github/workflows/lint.yml | 49 ++----- .github/workflows/lint_and_test.yml | 27 ---- .github/workflows/publish-to-test-pypi.yml | 16 +-- .pre-commit-config.yaml | 21 ++- .../FloodAdapt_TestbenchFloodAdaptWindows.xml | 1 - .teamcity/FloodAdapt/project-config.xml | 1 - .../vcsRoots/FloodAdapt_FloodAdapt.xml | 1 - .../vcsRoots/FloodAdapt_SfincTestData.xml | 1 - .../vcsRoots/FloodAdapt_SfincsTestData.xml | 1 - .../quarto-ext/fontawesome/assets/css/all.css | 3 +- .../quarto-ext/fontawesome/fontawesome.lua | 4 +- docs/.gitignore | 1 - docs/1_introduction/index.qmd | 31 +++-- docs/1_introduction/intended_use.qmd | 4 +- docs/1_introduction/overview_floodadapt.qmd | 12 +- docs/1_introduction/reader_guidance.qmd | 12 +- docs/1_introduction/terminology.qmd | 2 +- .../Delft_Fiat/hydromt_fiat_gui.qmd | 120 +++++++++--------- docs/3_setup_guide/Delft_Fiat/index.qmd | 14 +- docs/3_setup_guide/database.qmd | 2 +- docs/3_setup_guide/index.qmd | 3 +- docs/4_user_guide/benefits.qmd | 2 +- docs/4_user_guide/compare/Compare_map.qmd | 2 +- docs/4_user_guide/compare/Compare_table.qmd | 2 +- docs/4_user_guide/events/general_info.qmd | 2 - .../historic_events_hurricane.qmd | 13 +- docs/4_user_guide/events/index.qmd | 18 +-- docs/4_user_guide/events/synthetic_events.qmd | 23 +--- docs/4_user_guide/getting_started.qmd | 5 +- docs/4_user_guide/index.qmd | 36 +++--- docs/4_user_guide/measures/buildings.qmd | 22 ++-- docs/4_user_guide/measures/green_infra.qmd | 2 +- docs/4_user_guide/measures/hydraulic.qmd | 2 +- docs/4_user_guide/measures/index.qmd | 10 +- docs/4_user_guide/output/index.qmd | 2 +- docs/4_user_guide/projections/climate.qmd | 16 +-- docs/4_user_guide/projections/index.qmd | 6 +- .../projections/socioEconomic.qmd | 18 +-- docs/4_user_guide/scenarios/index.qmd | 1 - docs/4_user_guide/site_tab.qmd | 4 +- docs/4_user_guide/user_interface.qmd | 2 +- docs/5_update_model/aggregation_areas.qmd | 2 +- docs/5_update_model/damage_functions.qmd | 2 +- docs/5_update_model/dem.qmd | 2 +- docs/5_update_model/index.qmd | 2 +- docs/5_update_model/objects.qmd | 2 +- docs/5_update_model/settings.qmd | 4 +- docs/6_demo/army_corps.qmd | 2 +- docs/6_demo/index.qmd | 2 +- docs/6_demo/king_tides.qmd | 2 +- docs/6_demo/measures_impact.qmd | 1 - .../quarto-ext/lightbox/lightbox.css | 2 +- .../quarto-ext/lightbox/lightbox.lua | 46 +++---- .../lightbox/resources/css/glightbox.min.css | 2 +- .../lightbox/resources/js/glightbox.min.js | 2 +- docs/_static/figures/Draw_boundaries.svg | 2 +- docs/_static/figures/Exposure.svg | 2 +- docs/_static/figures/Quickbuild.svg | 2 +- docs/_static/figures/SVI_additional_attr.svg | 2 +- .../_static/figures/finished_floor_height.svg | 2 +- docs/_static/figures/ground_elevation.svg | 2 +- .../_static/figures/max_potential_damages.svg | 2 +- docs/_static/figures/vulnerability.svg | 2 +- docs/_static/images/GUI_Tabs.drawio.svg | 2 +- docs/_static/images/readerGuidance.svg | 2 +- docs/_static/theme-light copy.scss | 14 +- docs/_static/theme-light.scss | 16 +-- docs/index.qmd | 31 +++-- flood_adapt/api/source/benefits.rst | 2 +- flood_adapt/api/source/events.rst | 2 +- flood_adapt/api/source/measures.rst | 2 +- flood_adapt/api/source/output.rst | 2 +- flood_adapt/api/source/projections.rst | 2 +- flood_adapt/api/source/scenarios.rst | 2 +- flood_adapt/api/source/startup.rst | 2 +- flood_adapt/api/source/strategies.rst | 2 +- flood_adapt/dbs_classes/dbs_static.py | 1 - flood_adapt/dbs_controller.py | 16 +-- flood_adapt/integrator/sfincs_adapter.py | 1 - flood_adapt/object_model/benefit.py | 6 +- pyproject.toml | 14 +- tests/test_integrator/test_fiat_adapter.py | 4 +- tests/test_integrator/test_hazard_run.py | 28 ++-- 87 files changed, 341 insertions(+), 441 deletions(-) delete mode 100644 .github/workflows/lint_and_test.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 8a29e2a5f..ddcbc8d88 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,6 +1,6 @@ --- name: Bug Report -description: Report incorrect behavior +description: Report incorrect behavior labels: [bug, needs refinement] body: @@ -18,8 +18,8 @@ body: attributes: description: > Please provide a minimal, copy-pastable example or a link to a public repository that reproduces the behavior. If providing a copy pastable example, - you may assume your in a clean up to date version of FloodAdapt with a python enviroment active. In the case of a repository, ensure the repository - has a README.md which includes intructions to reproduce the behaviour. + you may assume your in a clean up to date version of FloodAdapt with a python environment active. In the case of a repository, ensure the repository + has a README.md which includes instructions to reproduce the behaviour. label: Reproducible Example validations: required: true @@ -43,7 +43,7 @@ body: id: task-list attributes: description: > - Please provide a list of tasks that need to be completed before this issue can be closed. + Please provide a list of tasks that need to be completed before this issue can be closed. label: Task list validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index e9a153c5e..5d88796f3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -25,7 +25,7 @@ body: id: task-list attributes: description: > - Please provide a list of tasks that need to be completed before this issue can be closed. + Please provide a list of tasks that need to be completed before this issue can be closed. label: Task list validations: required: true diff --git a/.github/workflows/auto_code_doc.yml b/.github/workflows/auto_code_doc.yml index 2c5db3d0f..7bf40f9da 100644 --- a/.github/workflows/auto_code_doc.yml +++ b/.github/workflows/auto_code_doc.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.x' @@ -45,7 +45,7 @@ jobs: # Set up Git to use the GitHub Actions token for authentication git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - + # Commit and push the changes git add . git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' commit -m 'Update Wiki' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c51298bdc..2c4be496e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,9 +3,9 @@ on: push: branches: [main] pull_request: - branches: [main] + branches: [main] workflow_dispatch: - + permissions: contents: write @@ -30,10 +30,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Miniforge3 - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{ matrix.python-version }} miniforge-variant: Miniforge3 @@ -59,12 +59,12 @@ jobs: - name: Generate docs run: | export PATH=/usr/share/miniconda3/bin:$PATH - source /usr/share/miniconda3/etc/profile.d/conda.sh + source /usr/share/miniconda/etc/profile.d/conda.sh mamba run -n floodadapt_docs quarto render docs/ --execute - name: Upload to GitHub Pages if: ${{ github.event_name != 'pull_request' && !github.event.act }} - uses: peaceiris/actions-gh-pages@v3.9.3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_site diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4fbe99849..65947d33b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,41 +1,14 @@ -name: CI -on: push -jobs: - ruff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - pip install ruff==0.4.8 # Make sure these are the same as the versions in pyproject.toml - # Include `--format=github` to enable automatic inline annotations. - - name: Run Ruff - run: ruff check . --fix - black: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - pip install black==24.1.1 # Make sure these are the same as the versions in pyproject.toml - - name: Check black version - run: black --version - - name: Run black - run: black --check . +name: pre-commit + +on: + pull_request: + push: + branches: [main] - typos: - name: Spell Check with Typos +jobs: + pre-commit: runs-on: ubuntu-latest steps: - - name: Checkout Actions Repository - uses: actions/checkout@v3 - - name: Check spelling - uses: crate-ci/typos@master + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml deleted file mode 100644 index 560313b96..000000000 --- a/.github/workflows/lint_and_test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Python Package using Conda - -on: workflow_dispatch: - -jobs: - env_and_test: - runs-on: self-hosted - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda env create --file environment.yml --force - - name: Test with pytest - run: | - conda install pytest - pytest tests diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 27068338e..312c40fa4 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -10,11 +10,11 @@ jobs: build-artifacts: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.11' @@ -26,7 +26,7 @@ jobs: - name: Build artifacts run: make pypi - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: releases path: dist @@ -38,9 +38,9 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: releases path: dist @@ -49,7 +49,7 @@ jobs: ls -ltrh ls -ltrh dist - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -62,12 +62,12 @@ jobs: needs: test-built-dist runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: releases path: dist - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.5.1 + uses: pypa/gh-action-pypi-publish@v1.9.0 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 741e0787d..2f7a55ab4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.6.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -12,16 +12,15 @@ repos: exclude: '^environment/' - id: check-merge-conflict - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 24.1.1 - hooks: - - id: black -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.8 - hooks: - - id: ruff - args: [--fix, --exit-non-zero-on-fix] +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.5.5 + hooks: + # Run the linter. + - id: ruff + # Run the formatter. + - id: ruff-format - repo: https://github.com/crate-ci/typos - rev: v1.22.7 + rev: v1.23.6 hooks: - id: typos diff --git a/.teamcity/FloodAdapt/buildTypes/FloodAdapt_TestbenchFloodAdaptWindows.xml b/.teamcity/FloodAdapt/buildTypes/FloodAdapt_TestbenchFloodAdaptWindows.xml index 779c0fbd4..caf6a6539 100644 --- a/.teamcity/FloodAdapt/buildTypes/FloodAdapt_TestbenchFloodAdaptWindows.xml +++ b/.teamcity/FloodAdapt/buildTypes/FloodAdapt_TestbenchFloodAdaptWindows.xml @@ -93,4 +93,3 @@ call pytest tests --junitxml="report.xml"]]> - diff --git a/.teamcity/FloodAdapt/project-config.xml b/.teamcity/FloodAdapt/project-config.xml index ad82904cd..5ccc0638d 100644 --- a/.teamcity/FloodAdapt/project-config.xml +++ b/.teamcity/FloodAdapt/project-config.xml @@ -15,4 +15,3 @@ - diff --git a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_FloodAdapt.xml b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_FloodAdapt.xml index edf807e9e..84faede44 100644 --- a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_FloodAdapt.xml +++ b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_FloodAdapt.xml @@ -15,4 +15,3 @@ - diff --git a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincTestData.xml b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincTestData.xml index 51397840a..214f79215 100644 --- a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincTestData.xml +++ b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincTestData.xml @@ -11,4 +11,3 @@ - diff --git a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincsTestData.xml b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincsTestData.xml index dccfd4f95..0a23431b3 100644 --- a/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincsTestData.xml +++ b/.teamcity/FloodAdapt/vcsRoots/FloodAdapt_SfincsTestData.xml @@ -11,4 +11,3 @@ - diff --git a/_extensions/quarto-ext/fontawesome/assets/css/all.css b/_extensions/quarto-ext/fontawesome/assets/css/all.css index 3e2498056..a91c4e7cb 100644 --- a/_extensions/quarto-ext/fontawesome/assets/css/all.css +++ b/_extensions/quarto-ext/fontawesome/assets/css/all.css @@ -16,7 +16,7 @@ .fa-regular, .fab, .fa-brands, -.fal, +.fal, .fa-light, .fat, .fa-thin, @@ -7968,4 +7968,3 @@ readers do not read off random characters that represent icons */ font-display: block; src: url("../webfonts/FontAwesome6Free-Regular-400.woff2") format("woff2"), url("../../webfonts/FontAwesome6Free-Regular-400.ttf") format("truetype"); unicode-range: U+F003,U+F006,U+F014,U+F016-F017,U+F01A-F01B,U+F01D,U+F022,U+F03E,U+F044,U+F046,U+F05C-F05D,U+F06E,U+F070,U+F087-F088,U+F08A,U+F094,U+F096-F097,U+F09D,U+F0A0,U+F0A2,U+F0A4-F0A7,U+F0C5,U+F0C7,U+F0E5-F0E6,U+F0EB,U+F0F6-F0F8,U+F10C,U+F114-F115,U+F118-F11A,U+F11C-F11D,U+F133,U+F147,U+F14E,U+F150-F152,U+F185-F186,U+F18E,U+F190-F192,U+F196,U+F1C1-F1C9,U+F1D9,U+F1DB,U+F1E3,U+F1EA,U+F1F7,U+F1F9,U+F20A,U+F247-F248,U+F24A,U+F24D,U+F255-F25B,U+F25D,U+F271-F274,U+F278,U+F27B,U+F28C,U+F28E,U+F29C,U+F2B5,U+F2B7,U+F2BA,U+F2BC,U+F2BE,U+F2C0-F2C1,U+F2C3,U+F2D0,U+F2D2,U+F2D4,U+F2DC; } - diff --git a/_extensions/quarto-ext/fontawesome/fontawesome.lua b/_extensions/quarto-ext/fontawesome/fontawesome.lua index ff64dcaa3..750641c0d 100644 --- a/_extensions/quarto-ext/fontawesome/fontawesome.lua +++ b/_extensions/quarto-ext/fontawesome/fontawesome.lua @@ -44,7 +44,7 @@ return { group = icon icon = pandoc.utils.stringify(args[2]) end - + local title = pandoc.utils.stringify(kwargs["title"]) if not isEmpty(title) then title = " title=\"" .. title .. "\"" @@ -58,7 +58,7 @@ return { end local size = pandoc.utils.stringify(kwargs["size"]) - + -- detect html (excluding epub which won't handle fa) if quarto.doc.is_format("html:js") then ensureHtmlDeps() diff --git a/docs/.gitignore b/docs/.gitignore index e2b9c9a15..362803241 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -6,4 +6,3 @@ !api/.gitkeep *.jupyter_cache/ objects.json - diff --git a/docs/1_introduction/index.qmd b/docs/1_introduction/index.qmd index e20c22ede..e23ee43ca 100644 --- a/docs/1_introduction/index.qmd +++ b/docs/1_introduction/index.qmd @@ -4,52 +4,51 @@ filters: - lightbox lightbox: auto --- -Welcome to the FloodAdapt documentation! +Welcome to the FloodAdapt documentation! -In this introduction, you will find an [overview of FloodAdapt](#overview), information on its [intended uses](#intended-uses-of-floodadapt), and [reader guidance](#reader-guidance) explaining the information you will find in this documentation. +In this introduction, you will find an [overview of FloodAdapt](#overview), information on its [intended uses](#intended-uses-of-floodadapt), and [reader guidance](#reader-guidance) explaining the information you will find in this documentation. ## Overview FloodAdapt is a flood adaptation decision-support tool, which aims to advance and accelerate flooding-related adaptation planning. It integrates rapid, physics-based compound flood modeling and detailed impact modeling into a user-friendly system, ensuring accessibility for end-users, regardless of their technical backgrounds. This enables users to define and evaluate meaningful "what-if" scenarios, which can be combinations of weather events, climate or socio-economic future conditions, and adaptation strategies. FloodAdapt rapidly generates high-quality flood and impact maps, equity-focused aggregations, and informative metrics, providing valuable support for planning and facilitating genuine stakeholder engagement. Beyond its usefulness for end-users, FloodAdapt acts as a vital bridge between scientific advancements and practical needs, enhancing the adoption and impact of adaptation research and development. -{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 - title='Introduction video to FloodAdapt' +{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 + title='Introduction video to FloodAdapt' >}} -FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” +FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” -Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. +Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. -The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model [SFINCS](https://github.com/Deltares/SFINCS){.external link-external-newwindow=true} that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed open-source flood impact assessment tool [Delft-FIAT](https://github.com/Deltares/Delft-FIAT){.external link-external-newwindow=true}. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. +The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model [SFINCS](https://github.com/Deltares/SFINCS){.external link-external-newwindow=true} that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed open-source flood impact assessment tool [Delft-FIAT](https://github.com/Deltares/Delft-FIAT){.external link-external-newwindow=true}. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. When a user specifies a what-if scenario, the backend of FloodAdapt automatically makes changes to the SFINCS and Delft-FIAT models to represent the user choices, the way an expert modeller would. It then simulates the scenario and returns flood and impact maps, scenario comparison visualizations, summary metrics, and an infographic to highlighting flooding or impacts of particular concern to a community. In this way, FloodAdapt allows end-users to unleash the power of advanced models without requiring the technical background, or the laborious pre- and post-processing of models that is usually required for this type of analysis. ![Schematic showing the design concepts behind the FloodAdapt software](../_static/images/floodadapt.png){#fig-logo} ## Intended Uses of FloodAdapt -FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. +FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. FloodAdapt is a powerful and physics-based system that can provide realistic flood and impact responses for user-defined scenarios. This is important because accuracy builds community trust in the tool. The underlying models and data in FloodAdapt can be continuously improved by the local or regional agencies who are operating it. The accuracy of the model results will depend on the accuracy of the input data. FloodAdapt can also help illuminate which data are missing or need improvement and should be collected when resources allow. -FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. +FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. ## Reader Guidance -FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. +FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. -The [User Guide](/4_user_guide/index.qmd) is for users of FloodAdapt. It provides information on how to get started with FloodAdapt, and describes all the FloodAdapt functionalities. +The [User Guide](/4_user_guide/index.qmd) is for users of FloodAdapt. It provides information on how to get started with FloodAdapt, and describes all the FloodAdapt functionalities. -The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. +The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. ::: {.callout-tip} ## Setup Guide - special topic: Probabilistic event sets for risk analysis -The Setup guide includes guidance on [preparing a probabilistic event set](/3_setup_guide/risk_analysis.qmd) for risk analysis - this part of the setup requires a background in statistics and probability. +The Setup guide includes guidance on [preparing a probabilistic event set](/3_setup_guide/risk_analysis.qmd) for risk analysis - this part of the setup requires a background in statistics and probability. ::: - The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. + The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. -The [Demonstration of FloodAdapt](/6_demo/index.qmd) illustrates use cases that can help the reader understand how FloodAdapt can support adaptation and resilience planning. +The [Demonstration of FloodAdapt](/6_demo/index.qmd) illustrates use cases that can help the reader understand how FloodAdapt can support adaptation and resilience planning. ![Guidance to this documentation, showing the different sections, the intended reader, and an indicator of the relative technical skill required to make use of the section](../_static/images/readerGuidance.png){#fig-readerGuidance} - diff --git a/docs/1_introduction/intended_use.qmd b/docs/1_introduction/intended_use.qmd index 72cf0bb3e..b620540ec 100644 --- a/docs/1_introduction/intended_use.qmd +++ b/docs/1_introduction/intended_use.qmd @@ -2,8 +2,8 @@ title: Intended use of FloodAdapt --- -FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. +FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. FloodAdapt is a powerful and physics-based system that can provide realistic flood and impact responses for user-defined scenarios. This is important because accuracy builds community trust in the tool. The underlying models and data in FloodAdapt can be continuously improved by the local or regional agencies who are operating it. The accuracy of the model results will depend on the accuracy of the input data. FloodAdapt can also help illuminate which data are missing or need improvement and should be collected when resources allow. -FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. +FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. diff --git a/docs/1_introduction/overview_floodadapt.qmd b/docs/1_introduction/overview_floodadapt.qmd index 65fe9fde3..1eb379ef4 100644 --- a/docs/1_introduction/overview_floodadapt.qmd +++ b/docs/1_introduction/overview_floodadapt.qmd @@ -7,17 +7,17 @@ lightbox: auto FloodAdapt is a flood adaptation decision-support tool, which aims to advance and accelerate flooding-related adaptation planning. It integrates rapid, physics-based compound flood modeling and detailed impact modeling into a user-friendly system, ensuring accessibility for end-users, regardless of their technical backgrounds. This enables users to define and evaluate meaningful "what-if" scenarios, which can be combinations of weather events, climate or socio-economic future conditions, and adaptation strategies. FloodAdapt rapidly generates high-quality flood and impact maps, equity-focused aggregations, and informative metrics, providing valuable support for planning and facilitating genuine stakeholder engagement. Beyond its usefulness for end-users, FloodAdapt acts as a vital bridge between scientific advancements and practical needs, enhancing the adoption and impact of adaptation research and development. -{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 - title='Introduction video to FloodAdapt' +{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 + title='Introduction video to FloodAdapt' >}} -FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” +FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” -Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. +Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. -The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model SFINCS that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed flood impact assessment tool Delft-FIAT. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. +The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model SFINCS that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed flood impact assessment tool Delft-FIAT. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. When a user specifies a what-if scenario, the backend of FloodAdapt automatically makes changes to the SFINCS and Delft-FIAT models to represent the user choices, the way an expert modeller would. It then simulates the scenario and returns flood and impact maps, scenario comparison visualizations, summary metrics, and an infographic to highlighting flooding or impacts of particular concern to a community. In this way, FloodAdapt allows end-users to unleash the power of advanced models without requiring the technical background, or the laborious pre- and post-processing of models that is usually required for this type of analysis. -![Schematic showing the design concepts behind the FloodAdapt software](../_static/images/floodadapt.png){#fig-logo} \ No newline at end of file +![Schematic showing the design concepts behind the FloodAdapt software](../_static/images/floodadapt.png){#fig-logo} diff --git a/docs/1_introduction/reader_guidance.qmd b/docs/1_introduction/reader_guidance.qmd index 72ce3df3e..48a7433e3 100644 --- a/docs/1_introduction/reader_guidance.qmd +++ b/docs/1_introduction/reader_guidance.qmd @@ -5,17 +5,17 @@ filters: lightbox: auto --- -FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. +FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. -The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. +The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. -The [Installation Guide](/2_installation_guide/index.qmd) helps an end-user get FloodAdapt installed and ready to run on their machine and explains the folder structure of FloodAdapt. +The [Installation Guide](/2_installation_guide/index.qmd) helps an end-user get FloodAdapt installed and ready to run on their machine and explains the folder structure of FloodAdapt. -The [User Guide](/4_user_guide/index.qmd) walks the user through all the functionality of FloodAdapt. +The [User Guide](/4_user_guide/index.qmd) walks the user through all the functionality of FloodAdapt. -The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. +The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. Chapter 6 provides a demonstration of a CFRSS application, to help the reader understand how FloodAdapt can support adaptation and resilience planning. Appendix A is a technical write-up walking a user through the preparation of a probabilistic event set for calculating risk with FloodAdapt. A tutorial video has been prepared that aligns with the demonstration in Chapter 6 and can be found at the following link: Add link. -![Guidance to this documentation, showing the different sections, the intended reader, and an indicator of the relative technical skill required to make use of the section](../_static/images/readerGuidance.svg){#fig-readerGuidance} \ No newline at end of file +![Guidance to this documentation, showing the different sections, the intended reader, and an indicator of the relative technical skill required to make use of the section](../_static/images/readerGuidance.svg){#fig-readerGuidance} diff --git a/docs/1_introduction/terminology.qmd b/docs/1_introduction/terminology.qmd index bc8a28af7..80cd6c5f1 100644 --- a/docs/1_introduction/terminology.qmd +++ b/docs/1_introduction/terminology.qmd @@ -1,3 +1,3 @@ --- title: Terminology ---- \ No newline at end of file +--- diff --git a/docs/3_setup_guide/Delft_Fiat/hydromt_fiat_gui.qmd b/docs/3_setup_guide/Delft_Fiat/hydromt_fiat_gui.qmd index aa29642cc..8755feba3 100644 --- a/docs/3_setup_guide/Delft_Fiat/hydromt_fiat_gui.qmd +++ b/docs/3_setup_guide/Delft_Fiat/hydromt_fiat_gui.qmd @@ -10,18 +10,18 @@ number-sections: false format: html --- -The Delft-FIAT model builder was designed to make it easy for analysts to set up a Delft-FIAT model. The model-builder can be used to automatically generate a Delft-FIAT model or to create a tailored model using local data. In both cases, the user starts by selecting their working directory and choosing their area of interest (model boundary). They can then use the [quick-build](#sec-quickbuild) option to automatically generate a Delft-FIAT model, or they can use additional functionality to build a [tailored Delft-FIAT model](#sec-tailored_model). Because the quick-build option does not require modeling experience, the model-builder makes the generation of Delft-FIAT models accessible to a wide audience. +The Delft-FIAT model builder was designed to make it easy for analysts to set up a Delft-FIAT model. The model-builder can be used to automatically generate a Delft-FIAT model or to create a tailored model using local data. In both cases, the user starts by selecting their working directory and choosing their area of interest (model boundary). They can then use the [quick-build](#sec-quickbuild) option to automatically generate a Delft-FIAT model, or they can use additional functionality to build a [tailored Delft-FIAT model](#sec-tailored_model). Because the quick-build option does not require modeling experience, the model-builder makes the generation of Delft-FIAT models accessible to a wide audience. -This guide is organized in six sections: +This guide is organized in six sections: (1) [Get started](#getting-started) when you open the Model Builder -(2) [Selecting your area of interest](#model-boundary) (your "model boundary"). -(3) [Building a Delft-FIAT model with the quick-build option](#sec-quickbuild) (automatic model generation with open data). -(4) [Building a tailored Delft-FIAT model](#sec-tailored_model) using local data or different settings than the default options. +(2) [Selecting your area of interest](#model-boundary) (your "model boundary"). +(3) [Building a Delft-FIAT model with the quick-build option](#sec-quickbuild) (automatic model generation with open data). +(4) [Building a tailored Delft-FIAT model](#sec-tailored_model) using local data or different settings than the default options. (5) [Visualizing](#visualize-your-model) the model you've created (6) [Understanding the Delft-FIAT model folder](#delft-fiat-model-folder) that is generated -@fig-homeScreen shows the Delft-FIAT model builder. There are seven tabs shown at the top. For generating an automatic Delft-FIAT model using open data, you will only need to use the first of these tabs, the "Model Boundary | Quick Build" tab. The remaining tabs are for tailoring your Delft-FIAT model and are described in the [tailored Delft-FIAT model](#sec-tailored_model) section. +@fig-homeScreen shows the Delft-FIAT model builder. There are seven tabs shown at the top. For generating an automatic Delft-FIAT model using open data, you will only need to use the first of these tabs, the "Model Boundary | Quick Build" tab. The remaining tabs are for tailoring your Delft-FIAT model and are described in the [tailored Delft-FIAT model](#sec-tailored_model) section. ![The model-builder start screen. The tabs at the top walk you through the key components of a Delft-FIAT model for FloodAdapt.](../../_static/images/model_builder_homeScreen.png){width=50% fig-align=left #fig-homeScreen} @@ -41,22 +41,22 @@ The Delft-FIAT **model boundary** encapsulates the area of interest where you wa * Draw polygon: Click on the map and draw a polygon. Double click when finished. * Draw box: Click on the map and draw a box. Double click when finished. * SFINCS model domain: If you already created a SFINCS model you can select the folder where your SFINCS model is saved. Do not select the region file itself. It will be recognized automatically when you select your SFINCS folder. - * Upload file: You can upload a boundary using a geospatial file (e.g. *.gpkg*, *.geojson*). + * Upload file: You can upload a boundary using a geospatial file (e.g. *.gpkg*, *.geojson*). -When you are finished, click "Generate Boundary", and your model area will be created. +When you are finished, click "Generate Boundary", and your model area will be created. ::: {.callout-note} ##### Which model boundary option should I choose? -When setting up FloodAdapt in a project area, you will also have to set up a SFINCS model for the flood estimation. You may want to have your damage model active everywhere where there will be flood information. If that is the case, choose the "SFINCS model domain". +When setting up FloodAdapt in a project area, you will also have to set up a SFINCS model for the flood estimation. You may want to have your damage model active everywhere where there will be flood information. If that is the case, choose the "SFINCS model domain". -Sometimes the flood model extent is actually much larger than your area of interest (this is because water from outside your area of interest may still make its way to your area of interest). If this is the case, you can better pick one of the other options. +Sometimes the flood model extent is actually much larger than your area of interest (this is because water from outside your area of interest may still make its way to your area of interest). If this is the case, you can better pick one of the other options. * To look at damages for an adminstative area like a city or a county, you can best upload the city or county boundary shapefile using the "Upload file" option -* To quickly get started and you don't have a city or county shapefile on hand, you can draw a polygon or box in the map around the area you are interested in. +* To quickly get started and you don't have a city or county shapefile on hand, you can draw a polygon or box in the map around the area you are interested in. ::: - -To refine the finished floor heights using the Delft-FIAT model-builder: +To refine the finished floor heights using the Delft-FIAT model-builder: 1. Open the **Exposure** tab from the top panel and select the **Finished Floor Height** tab in the bottom panel. 2. Click the button "Select Source" and choose the point or polygon file with your finished floor height data. 3. Click the "Load" button. This will load the data field names in your file into the "Attribute ID" drop-down menu. -4. In the "Attribute ID" drop-down menu, select the field name that corresponds to your finished floor height data. +4. In the "Attribute ID" drop-down menu, select the field name that corresponds to your finished floor height data. 5. Click "Add to model". ::: {.callout-note} ##### Optional settings for spatially joining exposure points and finished floor height data -In the "Finished Floor Height" tab there is a "Settings" button. This allows you to change default choices related to the spatial join of the exposure data points and the uploaded finished floor height data. Default settings use the *nearest* method for points and the *intersection* method for polygons when doing the spatial join. The default maximum distance for the *nearest* method is 10 meters. +In the "Finished Floor Height" tab there is a "Settings" button. This allows you to change default choices related to the spatial join of the exposure data points and the uploaded finished floor height data. Default settings use the *nearest* method for points and the *intersection* method for polygons when doing the spatial join. The default maximum distance for the *nearest* method is 10 meters. ::: ::: {.callout-tip} -##### Watch a video tutorial for updating the finished floor height of buildings in your Delft-FIAT model +##### Watch a video tutorial for updating the finished floor height of buildings in your Delft-FIAT model Coming soon... ::: #### Updating ground elevation {#sec-ground_elevation} -To update ground elevation data, you must provide a digital elsevation model (DEM) raster file. The Delft-FIAT model builder calculates the mean elevation within the shape of each asset and assigns this value to the associated asset. +To update ground elevation data, you must provide a digital elsevation model (DEM) raster file. The Delft-FIAT model builder calculates the mean elevation within the shape of each asset and assigns this value to the associated asset. ::: {.callout-note} -##### Important note for those who will use the FloodAdapt database builder +##### Important note for those who will use the FloodAdapt database builder If you will use the **FloodAdapt database builder **to create your FloodAdapt database, it will automatically overwrite the ground elevation data in your Delft-FIAT model to match what is in your SFINCS model, so you do not need to do that manually here! ::: -To update the ground elevation values in your Delft-FIAT model: +To update the ground elevation values in your Delft-FIAT model: 1. Open the **Exposure** tab on the top panel and select the **Ground Elevation** tab in the bottom panel. 2. Select a ground elevation source. There are two options in the drop-down menu: @@ -217,7 +217,7 @@ To update the ground elevation values in your Delft-FIAT model: * Upload file * Select a DEM raster file * Select the elevation unit for your DEM (meters or feet). -3. Click "Add to model". +3. Click "Add to model". ::: {.callout-tip} ##### Watch a video tutorial for updating ground elevation in your Delft-FIAT model @@ -227,26 +227,26 @@ Coming soon... #### Updating maximum potential damages {#sec-maximum_potential_damages} -When local data is available on maximum potential values, either for content or structure, these can be incorporated in the Delft-FIAT model using the Delft-FIAT model-builder. The maximum potential damages you want to use must be point or polygon data. Point data would be for asset-level information, and polygon data would be for cases where you want to assign the same values to a larger area. It is necessary to distinguish between structure and content maximum potential damages, as these are treated separately in the damage calculation. +When local data is available on maximum potential values, either for content or structure, these can be incorporated in the Delft-FIAT model using the Delft-FIAT model-builder. The maximum potential damages you want to use must be point or polygon data. Point data would be for asset-level information, and polygon data would be for cases where you want to assign the same values to a larger area. It is necessary to distinguish between structure and content maximum potential damages, as these are treated separately in the damage calculation. -To update the maximum potential damages: +To update the maximum potential damages: - 1. Open the **Exposure** tab on the top panel and select the **Max Potential Damages** tab in the bottom panel. + 1. Open the **Exposure** tab on the top panel and select the **Max Potential Damages** tab in the bottom panel. 2. Click "Select source" and select the file containing your maximum potential damage data (point or polygon data) 3. Click "Load". This will load the data columns in your file into the "Attribute ID" drop-down menu. 4. Select the column that holds the max. potential damage data. - 5. Select the damage type you wish to update, either "structure" or "content". + 5. Select the damage type you wish to update, either "structure" or "content". 6. Add to model. ::: {.callout-note} ##### Optional settings for spatially joining exposure points and maximum potential damages -In the "Max Potential Damages" tab there is a "Settings" button. This allows you to change default choices related to the spatial join of the exposure data points and the uploaded finished floor height data. Default settings use the *nearest* method for points and the *intersection* method for polygons when doing the spatial join. The default maximum distance for the *nearest* method is 10 meters. +In the "Max Potential Damages" tab there is a "Settings" button. This allows you to change default choices related to the spatial join of the exposure data points and the uploaded finished floor height data. Default settings use the *nearest* method for points and the *intersection* method for polygons when doing the spatial join. The default maximum distance for the *nearest* method is 10 meters. ::: - + ::: {.callout-tip} -##### Watch a video tutorial for updating the maximum potential damages in your Delft-FIAT model +##### Watch a video tutorial for updating the maximum potential damages in your Delft-FIAT model Coming soon... ::: @@ -266,7 +266,7 @@ Coming soon... ::: #### Updating vulnerability curves {#sec_update_vulnerability} -If you are building your model in the U.S., you can change the damage curve assignment. Updating damage curves is currently only possible in the U.S. The functionality is facilitated by the alignment between [HAZUS damage curves](https://msc.fema.gov/portal/resources/hazus) and the secondary object types in the [National Structure Inventory](https://www.hec.usace.army.mil/confluence/nsi) (see secondary object types in @fig-secOccType). Users can only choose new damage curve assignments from existing damage curves within the HAZUS damage curve database. User-defined damage curves are currently not possible from within the Delft-FIAT model builder. Future releases of the Delft-FIAT model builder may offer more flexibility. +If you are building your model in the U.S., you can change the damage curve assignment. Updating damage curves is currently only possible in the U.S. The functionality is facilitated by the alignment between [HAZUS damage curves](https://msc.fema.gov/portal/resources/hazus) and the secondary object types in the [National Structure Inventory](https://www.hec.usace.army.mil/confluence/nsi) (see secondary object types in @fig-secOccType). Users can only choose new damage curve assignments from existing damage curves within the HAZUS damage curve database. User-defined damage curves are currently not possible from within the Delft-FIAT model builder. Future releases of the Delft-FIAT model builder may offer more flexibility. -FloodAdapt allows users to tailor-define metrics that will be automatically calculated when scenarios are run. An example metric is "number of homes impacted for families with low income brackets", or "number of homes impacted who live in a FEMA flood zone". To facilitate the calculation of tailored metrics, additional layers (in these examples, a spatial income layer or a FEMA flood zone map) can be added to your Delft-FIAT model. Any additional layer (e.g. landuse, administrative boundaries) can be added to your model. +FloodAdapt allows users to tailor-define metrics that will be automatically calculated when scenarios are run. An example metric is "number of homes impacted for families with low income brackets", or "number of homes impacted who live in a FEMA flood zone". To facilitate the calculation of tailored metrics, additional layers (in these examples, a spatial income layer or a FEMA flood zone map) can be added to your Delft-FIAT model. Any additional layer (e.g. landuse, administrative boundaries) can be added to your model. @@ -335,20 +335,20 @@ FloodAdapt allows users to tailor-define metrics that will be automatically calc To add an additional attribute layer to your model: * Open the **Additional Attributes** tab on the top panel. -* Click "Select source" and choose your file. +* Click "Select source" and choose your file. * Click "Load". This will load the data columns in your file into the "Attribute ID" drop-down menu. -* From the "Attribute ID" drop-down, select the attribute you wish to add to your model. -* Add a name in the "Label" box. This label will be the column name of your attribute in the Delft-FIAT exposure (and output) data. -* Click "Add". The layer will appear in the table in the "Overview attribute" table. -* In the bottom of the "Overview attribute" panel, you can check the "Display Attribute" checkbox to verify your data was added correctly. +* From the "Attribute ID" drop-down, select the attribute you wish to add to your model. +* Add a name in the "Label" box. This label will be the column name of your attribute in the Delft-FIAT exposure (and output) data. +* Click "Add". The layer will appear in the table in the "Overview attribute" table. +* In the bottom of the "Overview attribute" panel, you can check the "Display Attribute" checkbox to verify your data was added correctly. * You can repeat this process for as many layers as you wish. * When finished adding layers, click "Add to model". - + @@ -372,10 +372,10 @@ Once you have created your model, you can visualize different model attributes o * Additional attributes * Roads -There is also a button "Exposure output". This opens the full model data, which is also stored as a CSV in the model output folder. This allows you to quickly view the complete dataset without having to look for the file on your computer. +There is also a button "Exposure output". This opens the full model data, which is also stored as a CSV in the model output folder. This allows you to quickly view the complete dataset without having to look for the file on your computer. ::: {.callout-tip} -##### Watch a video tutorial for visualizing your Delft-FIAT model +##### Watch a video tutorial for visualizing your Delft-FIAT model Coming soon... ::: @@ -384,7 +384,7 @@ Coming soon... Once you have created your model, the model folder you specified when you chose your working directory in the [getting started](#getting-started) step will be populated with the Delft-FIAT model files. This folder structure will be described...**coming soon**... \ No newline at end of file +--> diff --git a/docs/3_setup_guide/Delft_Fiat/index.qmd b/docs/3_setup_guide/Delft_Fiat/index.qmd index 93c8960a5..902de572b 100644 --- a/docs/3_setup_guide/Delft_Fiat/index.qmd +++ b/docs/3_setup_guide/Delft_Fiat/index.qmd @@ -5,7 +5,7 @@ filters: lightbox: auto --- -[Delft-FIAT](https://deltares.github.io/Delft-FIAT/stable/) is the open-source flood impact model implemented in FloodAdapt. When setting up FloodAdapt in a new location, it is required to first set up a Delft-FIAT model in the project area. This is considered the 'baseline' Delft-FIAT model, which FloodAdapt users can then modify through the FloodAdapt user interface - for example, by elevating buildings. @fig-DF_concept shows the flood impact modeling concept on which Delft-FIAT is based. It relates a **hazard** (the flood waters), **exposure** (buildings or roads that might be flooded), and **vulnerability** (the propensity of assets to be damaged when flooded). +[Delft-FIAT](https://deltares.github.io/Delft-FIAT/stable/) is the open-source flood impact model implemented in FloodAdapt. When setting up FloodAdapt in a new location, it is required to first set up a Delft-FIAT model in the project area. This is considered the 'baseline' Delft-FIAT model, which FloodAdapt users can then modify through the FloodAdapt user interface - for example, by elevating buildings. @fig-DF_concept shows the flood impact modeling concept on which Delft-FIAT is based. It relates a **hazard** (the flood waters), **exposure** (buildings or roads that might be flooded), and **vulnerability** (the propensity of assets to be damaged when flooded). ![Damage modeling concept](../../_static/images/DelftFIAT_concept.png){width=75% fig-align=left #fig-DF_concept} @@ -21,20 +21,20 @@ lightbox: auto Delft-FIAT is considered a 'calculation engine', which means it is designed to make damage calculations, but does not come prepopulated with data. When we say 'setting up a Delft-FIAT model' for a project location, this refers to collecting and formatting exposure and vulnerability data for the area. This document provides an [overview](#overview-of-delft-fiat-data-requirements) of the data needed to set up a Delft-FIAT model, and a [user guide](hydromt_fiat_gui.qmd) on how to build a Delft-FIAT model in your project location using the Delft-FIAT model-builder. This model-builder makes it easy to rapidly prepare a Delft-FIAT model using open data, but also supports tailored model-building by allowing you to bring in local or more accurate data when available. ## Overview of Delft-FIAT data requirements -This section describes the exposure and vulnerability requirements to set up a Delft-FIAT model. +This section describes the exposure and vulnerability requirements to set up a Delft-FIAT model. -The **exposure data** describe the assets within a project area. @fig-exposure shows the types of exposure data needed (and also optionally accepted) to set up a Delft-FIAT model. +The **exposure data** describe the assets within a project area. @fig-exposure shows the types of exposure data needed (and also optionally accepted) to set up a Delft-FIAT model. ![Exposure data used to build a Delft-FIAT model - including both required and optional fields](../../_static/images/DelftFIAT_exposure.png){width=70% fig-align=left #fig-exposure} ::: {.callout-note} ## Why are some data optional? -The optional **socio-economic variables** and **aggregation areas** are used by FloodAdapt to post-process the damages to gain insight into how damages are distributed spatially or by social-economic sectors (such as damages to high social vulnerability residents). They are very useful for gaining insight, but not required; if they are not provided, FloodAdapt users will still be able to use all of the FloodAdapt functionality. +The optional **socio-economic variables** and **aggregation areas** are used by FloodAdapt to post-process the damages to gain insight into how damages are distributed spatially or by social-economic sectors (such as damages to high social vulnerability residents). They are very useful for gaining insight, but not required; if they are not provided, FloodAdapt users will still be able to use all of the FloodAdapt functionality. -The **secondary occupancy type** can be optional, but will sometimes be required. The primary and secondary occupancy types tell Delft-FIAT which depth-damage curves should be used for which building. When the depth-damage curves are defined by the secondary occupancy type, this will be a required input. This is the case when using HAZUS damage curves. When using other damage curves, such as those from the Joint Research Center, which are identified only on primary object type, the secondary object type will be optional. +The **secondary occupancy type** can be optional, but will sometimes be required. The primary and secondary occupancy types tell Delft-FIAT which depth-damage curves should be used for which building. When the depth-damage curves are defined by the secondary occupancy type, this will be a required input. This is the case when using HAZUS damage curves. When using other damage curves, such as those from the Joint Research Center, which are identified only on primary object type, the secondary object type will be optional. ::: -**Vulnerability data** in Delft-FIAT are captured in depth-damage curves. These translate inundation depths at an asset to a fraction of total damage (@fig-damagefunction). The depth-damage curve is related to the building type (e.g. 'residential 1-story building') and the inundation depth during a flood event. Different types of assets incur different degrees of damage at varying inundation levels. +**Vulnerability data** in Delft-FIAT are captured in depth-damage curves. These translate inundation depths at an asset to a fraction of total damage (@fig-damagefunction). The depth-damage curve is related to the building type (e.g. 'residential 1-story building') and the inundation depth during a flood event. Different types of assets incur different degrees of damage at varying inundation levels. @@ -67,4 +67,4 @@ plt.xlabel('Water depth (m)') plt.ylabel('Fraction of maximum potential damage') plt.legend(labels) plt.gca().get_legend().set_title('') -``` \ No newline at end of file +``` diff --git a/docs/3_setup_guide/database.qmd b/docs/3_setup_guide/database.qmd index d15e55d90..364c386cd 100644 --- a/docs/3_setup_guide/database.qmd +++ b/docs/3_setup_guide/database.qmd @@ -2,4 +2,4 @@ title: Building the database --- -Im testing \ No newline at end of file +Im testing diff --git a/docs/3_setup_guide/index.qmd b/docs/3_setup_guide/index.qmd index e8382d9b3..1c4b93c62 100644 --- a/docs/3_setup_guide/index.qmd +++ b/docs/3_setup_guide/index.qmd @@ -1,9 +1,8 @@ --- -title: "Setup Guide" +title: "Setup Guide" --- # Heading 1 Here is some content. ... - diff --git a/docs/4_user_guide/benefits.qmd b/docs/4_user_guide/benefits.qmd index 6236e5663..bda9201bf 100644 --- a/docs/4_user_guide/benefits.qmd +++ b/docs/4_user_guide/benefits.qmd @@ -3,4 +3,4 @@ title: Benefits filters: - lightbox lightbox: auto ---- \ No newline at end of file +--- diff --git a/docs/4_user_guide/compare/Compare_map.qmd b/docs/4_user_guide/compare/Compare_map.qmd index fd673dcd3..4e2a32f18 100644 --- a/docs/4_user_guide/compare/Compare_map.qmd +++ b/docs/4_user_guide/compare/Compare_map.qmd @@ -3,4 +3,4 @@ title: Scenario comparison - map filters: - lightbox lightbox: auto ---- \ No newline at end of file +--- diff --git a/docs/4_user_guide/compare/Compare_table.qmd b/docs/4_user_guide/compare/Compare_table.qmd index 702bc7bb9..55cb1858b 100644 --- a/docs/4_user_guide/compare/Compare_table.qmd +++ b/docs/4_user_guide/compare/Compare_table.qmd @@ -3,4 +3,4 @@ title: Scenario comparison - metrics filters: - lightbox lightbox: auto ---- \ No newline at end of file +--- diff --git a/docs/4_user_guide/events/general_info.qmd b/docs/4_user_guide/events/general_info.qmd index d24417650..3163fd4a1 100644 --- a/docs/4_user_guide/events/general_info.qmd +++ b/docs/4_user_guide/events/general_info.qmd @@ -4,5 +4,3 @@ filters: - lightbox lightbox: auto --- - - diff --git a/docs/4_user_guide/events/historic_events/historic_events_hurricane.qmd b/docs/4_user_guide/events/historic_events/historic_events_hurricane.qmd index cee5f4fb1..6d853459c 100644 --- a/docs/4_user_guide/events/historic_events/historic_events_hurricane.qmd +++ b/docs/4_user_guide/events/historic_events/historic_events_hurricane.qmd @@ -11,27 +11,26 @@ Don't feel like reading? No problem! Check out our video about how to add a hurr {{< video https://www.youtube.com/watch?v=ojzx3JHeGws >}} ::: -The historical hurricane event allows the user to select and shift a historical hurricane from a hurricane track database. When the user selects the “Historical hurricane” option from the **Events** tab, they will see a hurricane selection window appear (see @fig-hurricaneSelector), which is populated with historical hurricanes from the National Hurricane Center (NHC) HURDAT2 database. This database is updated by the NHC annually and will require an annual maintenance update to keep the hurricane database in FloodAdapt up to date. The user can see all hurricanes within a specified distance of the site, or between specified years. +The historical hurricane event allows the user to select and shift a historical hurricane from a hurricane track database. When the user selects the “Historical hurricane” option from the **Events** tab, they will see a hurricane selection window appear (see @fig-hurricaneSelector), which is populated with historical hurricanes from the National Hurricane Center (NHC) HURDAT2 database. This database is updated by the NHC annually and will require an annual maintenance update to keep the hurricane database in FloodAdapt up to date. The user can see all hurricanes within a specified distance of the site, or between specified years. ::: {.callout-note} ## Hurricanes far offshore -It is not recommended to use the **Historical hurricane** option for a hurricane that passed far offshore of the site. In those cases, it is recommended to use the “Historical event without gauged water levels” event type. +It is not recommended to use the **Historical hurricane** option for a hurricane that passed far offshore of the site. In those cases, it is recommended to use the “Historical event without gauged water levels” event type. ::: ![**Hurricane selector window. You can search by name, and can filter the selection by distance to the site or time window**](../../../_static/images/popup_hurricaneSelector.png){#fig-hurricaneSelector} -The historical hurricane event template window is shown in @fig-hurricaneTemplate. After a user selects a hurricane from the hurricane selector window, the event name and description of the hurricane and the timing will be automatically filled in. The user can edit these if desired. +The historical hurricane event template window is shown in @fig-hurricaneTemplate. After a user selects a hurricane from the hurricane selector window, the event name and description of the hurricane and the timing will be automatically filled in. The user can edit these if desired. ::: {.callout-tip} ## Editing the hurricane start and stop time -The autommatically filled-in start and stop time represent the entire duration of the hurricane track. This event duration can be shortened to speed up the calculation. How should you pick the duration? Hover your mouse over the track icons to see date and time stamps. Choose dates from 1-2 days before landfall to 1 day after landfall. +The autommatically filled-in start and stop time represent the entire duration of the hurricane track. This event duration can be shortened to speed up the calculation. How should you pick the duration? Hover your mouse over the track icons to see date and time stamps. Choose dates from 1-2 days before landfall to 1 day after landfall. ::: -Under the "Surge and Tide" block, the user can **shift the hurricane track** by specifying the miles of horizontal or vertical shift. The shifted hurricane will be displayed beside the original track. +Under the "Surge and Tide" block, the user can **shift the hurricane track** by specifying the miles of horizontal or vertical shift. The shifted hurricane will be displayed beside the original track. The wind and rain are automatically derived from information about the hurricane track. The rainfall is derived from the track using the IPET method. The user does not need to specify any information here. -The river discharge represents the discharge at the model boundary and will be automatically filled to a default value specified during system set-up. The user can modify this value. If there are multiple rivers at the model boundary, the user will be able to select each river to view or modify the discharge. +The river discharge represents the discharge at the model boundary and will be automatically filled to a default value specified during system set-up. The user can modify this value. If there are multiple rivers at the model boundary, the user will be able to select each river to view or modify the discharge. ![**Event template window for a historical hurricane.**](../../../_static/images/popup_hurricaneTemplate.png){#fig-hurricaneTemplate} - diff --git a/docs/4_user_guide/events/index.qmd b/docs/4_user_guide/events/index.qmd index a91a5023b..072f4ed83 100644 --- a/docs/4_user_guide/events/index.qmd +++ b/docs/4_user_guide/events/index.qmd @@ -6,7 +6,7 @@ lightbox: auto --- -In the event tab, a user can add different types of events. These can be either [**historical**](historic_events/index.qmd) or [**synthetic**](synthetic_events.qmd) events. It is also possible to select historical events and modify them to create what-if event scenarios. +In the event tab, a user can add different types of events. These can be either [**historical**](historic_events/index.qmd) or [**synthetic**](synthetic_events.qmd) events. It is also possible to select historical events and modify them to create what-if event scenarios. There are three historical event types, which are described in the coming sections: @@ -14,12 +14,12 @@ There are three historical event types, which are described in the coming sectio * [Historical event with gauged water levels](historic_events/historic_events_gauged.qmd) * [Historical event without gauged water levels](historic_events/historic_events_ungauged.qmd) - When the user selects **Add event** in the event window, they will be prompted to choose from one of the three historical event types or the synthetic event type. Each selection opens a window where the user can specify event information. + When the user selects **Add event** in the event window, they will be prompted to choose from one of the three historical event types or the synthetic event type. Each selection opens a window where the user can specify event information. ![**The four event types a user can select**](../../_static/images/eventTypeSelector.png){#fig-eventSelector} - + Each event type will have unique input that is required, but they also share some common input. The user must provide an event name, and - optionally - a description. Additionally, all historic events require a start and stop time of the event. - + ::: {.callout-note} ## Event names and descriptions Event names must be unique and cannot have any spaces or special characters (underscores are allowed). Event descriptions are optional and have no syntax restrictions. For example, an event name could be **KingTideNov2021**, and the long name could be **King Tide - November 2021**. @@ -40,12 +40,12 @@ FloodAdapt supports two levels of hydrodynamic models: (1) An offshore model that calculates nearshore water levels based on astronomic tides, wind fields and pressure fields. These nearshore water levels are used to force the overland model. -(2) An overland model that calculates the inundation over land due to nearshore water levels, local wind, rainfall, and river discharge. +(2) An overland model that calculates the inundation over land due to nearshore water levels, local wind, rainfall, and river discharge. -When a user selects a [historical hurricane](historic_events_hurricane.qmd), FloodAdapt will pull in wind and pressure data for the offshore model, calculate the nearshore water levels for the overland model, and then run the overland model with wind and rainfall (calculated based on track information), and any user-input river discharges. +When a user selects a [historical hurricane](historic_events_hurricane.qmd), FloodAdapt will pull in wind and pressure data for the offshore model, calculate the nearshore water levels for the overland model, and then run the overland model with wind and rainfall (calculated based on track information), and any user-input river discharges. -When a user selects a [Historical event with gauged water levels](historic_events_gauged.qmd), only the overland model will be run, using the gauged water levels as input to the overland model. +When a user selects a [Historical event with gauged water levels](historic_events_gauged.qmd), only the overland model will be run, using the gauged water levels as input to the overland model. -When a user selects a [Historical event without gauged water levels](historic_events_ungauged.qmd), the offshore model will first be run using the wind and pressure data from **ADD SOURCE HERE**. The calculated nearshore water levels will then be input to the overland model to calculate the overland flooding using the user-specified local wind, rainfall, and river discharge values. +When a user selects a [Historical event without gauged water levels](historic_events_ungauged.qmd), the offshore model will first be run using the wind and pressure data from **ADD SOURCE HERE**. The calculated nearshore water levels will then be input to the overland model to calculate the overland flooding using the user-specified local wind, rainfall, and river discharge values. -When a user selects a [Synthetic event](synthetic_events.qmd), only the overland model will be run, using the tide and surge information specified by the user. \ No newline at end of file +When a user selects a [Synthetic event](synthetic_events.qmd), only the overland model will be run, using the tide and surge information specified by the user. diff --git a/docs/4_user_guide/events/synthetic_events.qmd b/docs/4_user_guide/events/synthetic_events.qmd index a562181a0..0b77e73a5 100644 --- a/docs/4_user_guide/events/synthetic_events.qmd +++ b/docs/4_user_guide/events/synthetic_events.qmd @@ -22,7 +22,7 @@ When the user selects the “Synthetic” option from the **Events** tab, they w ![**Event template window for a historic event with gauged water levels.**](../../_static/images/popup_syntheticEvent.png){#fig-syntheticWindow} ## Duration of the synthetic event -The duration is specified by the user in the "Timing" block. The start time is given as a duration before T=0 (in hours), and the end time as a duration after T=0 (hours). +The duration is specified by the user in the "Timing" block. The start time is given as a duration before T=0 (in hours), and the end time as a duration after T=0 (hours). ::: {.callout-note} ## What is T=0 in a synthetic event @@ -33,19 +33,19 @@ The time T = 0 is an arbitrary moment when the tide is at its crest. It is essen ::: ## Water levels - Tide + Surge -For a synthetic event, the water level is treated as a sum of the tidal and surge components, which are specified separately. +For a synthetic event, the water level is treated as a sum of the tidal and surge components, which are specified separately. -The **tide** is entered as an amplitude above or below mean sea level. The window will open with a default value that was configured when the FloodAdapt system was set up. +The **tide** is entered as an amplitude above or below mean sea level. The window will open with a default value that was configured when the FloodAdapt system was set up. The **surge** timeseries is specified as a Gaussian curve. The user specifies the peak surge, the duration of the surge, and the timing of the peak relative to T=0. @fig-surgeTiming shows an example how a user can adjust the surge timing. The figure shows three panels. The top panel has the tide set to zero, so the timeseries of the surge alone can be viewed. The surge is set as a Gaussian curve with a peak value of 6 ft, and a duration of 12 hours. The second panel shows the timing of the peak surge at -5 hours, with the tide set back to its default value of 3 ft. This is 5 hours before T=0, when the tide was not at its crest. The third panel shows the timing of the peak surge at 0 hours, which is precisely at T=0, when the tide was at its crest. You can s -ee that the effect of the surge and high tide coinciding is a much higher total water level than when the peak surge occurs prior to the high tide. +ee that the effect of the surge and high tide coinciding is a much higher total water level than when the peak surge occurs prior to the high tide. ![**T=0 and the duration of a sythetic event**](../../_static/images/PeakSurgeTiming.png){#fig-surgeTiming width=100% fig-align=left} ::: {.callout-note} ## The zero point and the datums in the water level plots -There are several datums shown in the water level plot: mean lower low water (MLLW), mean sea level (MSL), and mean higher high water (MHHW). The zero point, which is set to mean lower low water (MLLW) in @fig-surgeTiming, is configurable and chosen at system set-up to be most intuitive for the intended users of the system. +There are several datums shown in the water level plot: mean lower low water (MLLW), mean sea level (MSL), and mean higher high water (MHHW). The zero point, which is set to mean lower low water (MLLW) in @fig-surgeTiming, is configurable and chosen at system set-up to be most intuitive for the intended users of the system. ::: ## Rainfall @@ -68,17 +68,8 @@ There are three rainfall curves that a user can select to specify the rainfall t For a synthetic event, the user can only enter either **none** (default), or a **constant** wind speed. When entering a constant wind speed, the user is asked to enter both the wind speed and wind direction. The direction should be entered in nautical degrees. This represents the direction where the wind is coming from. A direction of 0 degrees means wind is blowing from the North, 90 degrees means wind is blowing from the East. ## River discharge -The river discharge represents the discharge in a river at the model boundary. If there are multiple rivers at the model boundary, the user will be able to select each river to specify the discharge. The user has two options for specifying the river discharge: a **constant** discharge or a **shape**, which is a synthetic timeseries. +The river discharge represents the discharge in a river at the model boundary. If there are multiple rivers at the model boundary, the user will be able to select each river to specify the discharge. The user has two options for specifying the river discharge: a **constant** discharge or a **shape**, which is a synthetic timeseries. -A constant discharge is the default option. An average discharge value is filled in, which is specified in a FloodAdapt configuration folder at system setup. The user can change the value of the constant discharge. +A constant discharge is the default option. An average discharge value is filled in, which is specified in a FloodAdapt configuration folder at system setup. The user can change the value of the constant discharge. The shape option uses a Gaussian curve. The user must specify the base discharge (this can be left at the default value, which is the average discharge), a peak discharge, a duration, and a peak time. The duration refers to the duration that the river discharge is above its base value. - - - - - - - - - diff --git a/docs/4_user_guide/getting_started.qmd b/docs/4_user_guide/getting_started.qmd index 26bad4851..52f769477 100644 --- a/docs/4_user_guide/getting_started.qmd +++ b/docs/4_user_guide/getting_started.qmd @@ -32,9 +32,8 @@ The first time the FloodAdapt executable is opened, it will ask for permission f ## FloodAdapt folder structure The FloodAdapt database uses a normal folder structure so that it is easily accessible by users, without requiring database knowledge. This section describes the folder structure and indicates where your user-generated scenario data are stored. -@fig-folderStructure shows the overall folder structure. The main FloodAdapt folder contains three sub-folders: *System*, *FloodAdapt_gui* and *Database*. The System folder contains the underlying modeling software to calculate flooding and impacts. The FloodAdapt_gui folder contains files related to the graphical user interface. It also contains the executable file *floodadapt_gui.exe* that opens the FloodAdapt application. The System and Floodadapt_gui folders are the same for every site location. The Database folder contains three sub-folders: *Input*, *Output*, and *Static*. The Static folder contains information that is prepared as system set-up to tailor FloodAdapt for a particular site location. The Input and Output folders are populated by the FloodAdapt user via the user interface. These contain information about the events, projections, measures, strategies, and scenarios that a user has created. +@fig-folderStructure shows the overall folder structure. The main FloodAdapt folder contains three sub-folders: *System*, *FloodAdapt_gui* and *Database*. The System folder contains the underlying modeling software to calculate flooding and impacts. The FloodAdapt_gui folder contains files related to the graphical user interface. It also contains the executable file *floodadapt_gui.exe* that opens the FloodAdapt application. The System and Floodadapt_gui folders are the same for every site location. The Database folder contains three sub-folders: *Input*, *Output*, and *Static*. The Static folder contains information that is prepared as system set-up to tailor FloodAdapt for a particular site location. The Input and Output folders are populated by the FloodAdapt user via the user interface. These contain information about the events, projections, measures, strategies, and scenarios that a user has created. -The Output folder contains all of the flooding and impact data generated for the scenarios that a user runs via the user interface. The user may want to access this folder to create their own visualization in third party software, such as ArcGIS. +The Output folder contains all of the flooding and impact data generated for the scenarios that a user runs via the user interface. The user may want to access this folder to create their own visualization in third party software, such as ArcGIS. ![**Folder structure of FloodAdapt.**](../_static/images/folderStructure.png){#fig-folderStructure} - diff --git a/docs/4_user_guide/index.qmd b/docs/4_user_guide/index.qmd index a2ff2988d..9bc3331dc 100644 --- a/docs/4_user_guide/index.qmd +++ b/docs/4_user_guide/index.qmd @@ -5,14 +5,14 @@ filters: lightbox: auto --- -Welcome to the FloodAdapt user guide! This guide will help you specify and run scenarios, to support your understanding of community vulnerability now and in the future, and the effectiveness and benefits of adaptation options. +Welcome to the FloodAdapt user guide! This guide will help you specify and run scenarios, to support your understanding of community vulnerability now and in the future, and the effectiveness and benefits of adaptation options. -This user guide covers both the installation and use of FloodAdapt. Below we highlight the information that you can find in this guide. +This user guide covers both the installation and use of FloodAdapt. Below we highlight the information that you can find in this guide. ## Structure of the user guide -The user guide starts with instructions for [getting started](getting_started.qmd). This describes how to download FloodAdapt and how to get it up and running on your computer. +The user guide starts with instructions for [getting started](getting_started.qmd). This describes how to download FloodAdapt and how to get it up and running on your computer. -The guide then describes the use of FloodAdapt [via the tabs in the FloodAdapt graphical user interface (GUI)](#overview-of-the-floodadapt-gui), covering how they are used to define, run, view, and compare scenarios. +The guide then describes the use of FloodAdapt [via the tabs in the FloodAdapt graphical user interface (GUI)](#overview-of-the-floodadapt-gui), covering how they are used to define, run, view, and compare scenarios. ## Overview of the FloodAdapt GUI The FloodAdapt GUI supports the creation, running, visualization, and comparison of scenarios. @@ -21,27 +21,27 @@ The FloodAdapt GUI supports the creation, running, visualization, and comparison ## What is a scenario in FloodAdapt? Scenarios in FloodAdapt are defined as a combination of an event, a projection, and a strategy, all of which are specified via the user interface. ::: - - Scenarios are used to answer user questions about how flooding and impacts are or will change with adaptation measures and under future conditions. - + + Scenarios are used to answer user questions about how flooding and impacts are or will change with adaptation measures and under future conditions. + ::: {.callout-tip} ## Example user question **How would a floodwall have held up in a recent hurricane if the track had made a worst-case landfall?** -To answer this question, the user would create a scenario: a recent hurricane shifted to make worst-case landfall (event), under current conditions (projection), with and a floodwall (strategy). Viewing the flooding, impacts and summary information will help them evaluate if the floodwall would have been sufficientn to protect against this event. +To answer this question, the user would create a scenario: a recent hurricane shifted to make worst-case landfall (event), under current conditions (projection), with and a floodwall (strategy). Viewing the flooding, impacts and summary information will help them evaluate if the floodwall would have been sufficientn to protect against this event. ::: - - The user guide describes how to specify events, projections, and strategies and how to view and compare scenario results. - - + The user guide describes how to specify events, projections, and strategies and how to view and compare scenario results. + + + There are ten tabs in the user interface: Site, Events, Projections, Measures, Strategies, Scenarios, Output, Compare - maps, Compare - tables, and Benefits. @fig-GUItabs presents the tabs of the user interface and highlights the information needed to run and view results. -* The [Site tab](site_tab.qmd) is an informative tab where the user is not required to input any information. +* The [Site tab](site_tab.qmd) is an informative tab where the user is not required to input any information. -* The [Events](events/index.qmd), [Projections](projections/index.qmd), [Measures](measures/index.qmd), and [Strategy](strategy/index.qmd) tabs are **input** tabs where the user will specify the 'ingredients' for their scenarios. +* The [Events](events/index.qmd), [Projections](projections/index.qmd), [Measures](measures/index.qmd), and [Strategy](strategy/index.qmd) tabs are **input** tabs where the user will specify the 'ingredients' for their scenarios. -* The [Scenarios](scenarios/index.qmd) tab is a management tab, where the user can specify and run scenarios. +* The [Scenarios](scenarios/index.qmd) tab is a management tab, where the user can specify and run scenarios. ::: {.callout} Running a scenario calls the SFINCS and Delft-FIAT models to start the simulations for the specified scenarios. @@ -50,8 +50,8 @@ Running a scenario calls the SFINCS and Delft-FIAT models to start the simulatio ![Tabs of the FloodAdapt user interface. Orange fill indicates required user input, and the arrows show the flow of information from one tab to another](../_static/images/GUI_Tabs.drawio.svg){width=50% fig-align='left' #fig-GUItabs} -* The [Output](output/index.qmd) tab is where a user can view maps showing the flooding and impacts and see infometrics and an infographic for scenarios that have been run. +* The [Output](output/index.qmd) tab is where a user can view maps showing the flooding and impacts and see infometrics and an infographic for scenarios that have been run. -* The user can compare scenarios spatially (map comparison) in the [Compare - map](compare/Compare_map.qmd) tab and can compare scenarios based on their tabulated metrics in the [Compare - table](compare/Compare_table.qmd) tab. +* The user can compare scenarios spatially (map comparison) in the [Compare - map](compare/Compare_map.qmd) tab and can compare scenarios based on their tabulated metrics in the [Compare - table](compare/Compare_table.qmd) tab. -* The user can evaluate the risk-reduction benefits of an adaptation strategy, including spatial distribution of benefits, and equity-weighted benefits in the [Benefits](benefits.qmd.qmd) tab. \ No newline at end of file +* The user can evaluate the risk-reduction benefits of an adaptation strategy, including spatial distribution of benefits, and equity-weighted benefits in the [Benefits](benefits.qmd.qmd) tab. diff --git a/docs/4_user_guide/measures/buildings.qmd b/docs/4_user_guide/measures/buildings.qmd index e11479339..a6f0b9078 100644 --- a/docs/4_user_guide/measures/buildings.qmd +++ b/docs/4_user_guide/measures/buildings.qmd @@ -5,7 +5,7 @@ filters: lightbox: auto --- -FloodAdapt can simulate different types of building-level adaptation actions: [elevate](#elevate), [buyout](#buyout), and [floodproof](#floodproof) properties. This section describes how these measures can be specified in FloodAdapt and how they are represented in the modeling. +FloodAdapt can simulate different types of building-level adaptation actions: [elevate](#elevate), [buyout](#buyout), and [floodproof](#floodproof) properties. This section describes how these measures can be specified in FloodAdapt and how they are represented in the modeling. ![**Building-level adaptation measures in FloodAdapt: elevate, buyout, and floodproof properties**](../../_static/images/measures_buildingLevel.png){width=40% fig-align=left #fig-measures_buildingLevel} @@ -21,11 +21,11 @@ To specify a building-level measure, the user goes to the Measures tab, and in t When selecting buildings using the "Draw polygon" feature, it is useful to click on the "Show Buildings" button in the Measures tab (see example in @fig-measures_buildingLevel_GUI). This shows the buildings that are in the exposure data of the impact model within FloodAdapt. -Each of the building-level measures allows users to specify a property type to which the measure should be applied. So, for example, if a user selects a neighborhood, but only wants to apply the measure to the residential properties within the neighborhood, they are able to specify this. The property type is linked to an attribute in the impact model called the 'primary object type'. In the U.S, these are typically residential (RES) commercial (COM), industrial (IND), or public (PUB). You can also choose to apply the measure to all the buildings in the selected area. +Each of the building-level measures allows users to specify a property type to which the measure should be applied. So, for example, if a user selects a neighborhood, but only wants to apply the measure to the residential properties within the neighborhood, they are able to specify this. The property type is linked to an attribute in the impact model called the 'primary object type'. In the U.S, these are typically residential (RES) commercial (COM), industrial (IND), or public (PUB). You can also choose to apply the measure to all the buildings in the selected area. ## Elevate -Elevating properties refers to raising structures to make them less susceptible to floodwaters. To implement elevating buildings in FloodAdapt, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Elevate properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon", you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure (see example in @fig-measures_buildingLevel_elevatePoly). When you are finished clicking the polygon, right click or double click to open the measure specification window (see @fig-measures_buildingLevel_fpPoly_spec). +Elevating properties refers to raising structures to make them less susceptible to floodwaters. To implement elevating buildings in FloodAdapt, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Elevate properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon", you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure (see example in @fig-measures_buildingLevel_elevatePoly). When you are finished clicking the polygon, right click or double click to open the measure specification window (see @fig-measures_buildingLevel_fpPoly_spec). ![**Selecting buildings for applying the elevate measure**](../../_static/images/measure_building_poly_elevate.png){width=70% fig-align=left #fig-measures_buildingLevel_elevatePoly} @@ -40,26 +40,26 @@ The elevate properties specification window asks the user to specify what the el ::: {.callout-note} ## How is elevating properties represented in the modeling? -The exposed assets have multiple attributes, one of which is the height of the finished floor above the ground. When a user elevates properties, FloodAdapt adjusts this attribute for the selected properties to represent the user specifications. Whether a user specifies a property elevation as an elevation relative to a datum, or a height above a reference level like base flood elevation, FloodAdapt calculates for each selected property the equivalent height above the ground, and assigns this value to the finished floor height attribute of the elevated property. For example, if a user selects 12 feet above datum, and the ground elevation where a property is located is 10 feet above datum, FloodAdapt calculates that the finished floor height of the property as 2 feet, and assigns this as the finished floor height attribute of the elevated property. Similarly, if a user selects 2 feet above BFE, and the BFE at the location of a property is 9 feet, then the property must be raised to 11 feet relative to datum. If the ground elevation at that location is 8 feet, FloodAdapt would calculate that the finished floor height for the elevated property is 3 feet. +The exposed assets have multiple attributes, one of which is the height of the finished floor above the ground. When a user elevates properties, FloodAdapt adjusts this attribute for the selected properties to represent the user specifications. Whether a user specifies a property elevation as an elevation relative to a datum, or a height above a reference level like base flood elevation, FloodAdapt calculates for each selected property the equivalent height above the ground, and assigns this value to the finished floor height attribute of the elevated property. For example, if a user selects 12 feet above datum, and the ground elevation where a property is located is 10 feet above datum, FloodAdapt calculates that the finished floor height of the property as 2 feet, and assigns this as the finished floor height attribute of the elevated property. Similarly, if a user selects 2 feet above BFE, and the BFE at the location of a property is 9 feet, then the property must be raised to 11 feet relative to datum. If the ground elevation at that location is 8 feet, FloodAdapt would calculate that the finished floor height for the elevated property is 3 feet. ::: ## Buyout -Buyouts refer to the purchase and subsequent removal of a property, usually one that is high risk or has experienced repetitive flooding. To implement the buyout measure, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Buyout properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon" for the Area type, you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure. When you are finished clicking the polygon, right click or double click to open the measure specification window. If you select "Aggregation area" the specification window will automatically open when you click "Add measure" and you will additionally choose an aggregation area to apply the measure (see @fig-measure_building_poly_buyout_specification). +Buyouts refer to the purchase and subsequent removal of a property, usually one that is high risk or has experienced repetitive flooding. To implement the buyout measure, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Buyout properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon" for the Area type, you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure. When you are finished clicking the polygon, right click or double click to open the measure specification window. If you select "Aggregation area" the specification window will automatically open when you click "Add measure" and you will additionally choose an aggregation area to apply the measure (see @fig-measure_building_poly_buyout_specification). -In the specification window, the user enters a name for the measure (no spaces or special characters), an optional description, the property type that the measure should be applied to, and - if you selected "Aggregation area" - the aggregation area where the measure should be applied. When these entries are complete, the user can click 'OK' and the measure will be added to the list of measures in the Measures tab. +In the specification window, the user enters a name for the measure (no spaces or special characters), an optional description, the property type that the measure should be applied to, and - if you selected "Aggregation area" - the aggregation area where the measure should be applied. When these entries are complete, the user can click 'OK' and the measure will be added to the list of measures in the Measures tab. ![**Specifying information for a buyout measure**](../../_static/images/measure_building_poly_buyout_specification.png){width=50% fig-align=left #fig-measure_building_poly_buyout_specification} ::: {.callout-note} ## How are buyouts represented in the modeling? -When a property has been bought out and removed, it is no longer an exposed asset in the project area. However, the implementation in FloodAdapt does not actually remove the properties from the exposure data; instead, the selected properties are assigned a maximum potential damage value of zero. The damage is calculated as the damage fraction (based on the inundation depth) multiplied by the maximum potential damage. Because the maximum potential damage is set to zero, the bought out properties will result in damages of zero, regardless of the inundation depth. In this way, it represents the situation that the property has been removed. +When a property has been bought out and removed, it is no longer an exposed asset in the project area. However, the implementation in FloodAdapt does not actually remove the properties from the exposure data; instead, the selected properties are assigned a maximum potential damage value of zero. The damage is calculated as the damage fraction (based on the inundation depth) multiplied by the maximum potential damage. Because the maximum potential damage is set to zero, the bought out properties will result in damages of zero, regardless of the inundation depth. In this way, it represents the situation that the property has been removed. ::: ## Floodproof -Floodproofing in FloodAdapt refers to *dry floodproofing*, which involves sealing a building's exterior, typically through barriers or seals, to prevent floodwaters from entering and causing damage. The effect of floodproofing is that the building will not incur any damages until floodwaters exceed the height of the floodproofing seals. +Floodproofing in FloodAdapt refers to *dry floodproofing*, which involves sealing a building's exterior, typically through barriers or seals, to prevent floodwaters from entering and causing damage. The effect of floodproofing is that the building will not incur any damages until floodwaters exceed the height of the floodproofing seals. -To implement floodproofing to buildings in FloodAdapt, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Floodproof properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon", you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure (see example in @fig-measures_buildingLevel_fpPoly). When you are finished clicking the polygon, right click or double click to open the measure specification window (see @fig-measures_buildingLevel_fpPoly_spec). +To implement floodproofing to buildings in FloodAdapt, go to the [Measures](../measures/index.qmd) tab, select "Buildings" for the Category, and then from the Measure drop-down menu, select "Floodproof properties". Select one of the "Area type" options and then click "Add Measure". If you selected "Draw polygon", you can now begin clicking within the map to draw a polygon to enclose the buildings to which you want to apply the measure (see example in @fig-measures_buildingLevel_fpPoly). When you are finished clicking the polygon, right click or double click to open the measure specification window (see @fig-measures_buildingLevel_fpPoly_spec). ![**Selecting buildings for applying the floodproofing measure**](../../_static/images/measure_building_poly_fp.png){width=70% fig-align=left #fig-measures_buildingLevel_fpPoly} @@ -69,5 +69,5 @@ In the specification window, the user enters a name for the measure (no spaces o ::: {.callout-note} ## How is floodproofing represented in the modeling? -The impact model uses depth-damage curves that relate inundation depths to fractions of total asset damage. When a user selects a floodproofing height, there will be no damage to the property until the inundation depths exceed that height. This is represented by modifying the depth-damage curve so that the damage fraction is zero below the floodproofing height. Above the floodproofing height, the damage curve is unchanged because once the inundation exceeds the floodproofing height, it is assumed the water will then enter the property and reach the levels it would have reached without the floodproofing barrier. -::: \ No newline at end of file +The impact model uses depth-damage curves that relate inundation depths to fractions of total asset damage. When a user selects a floodproofing height, there will be no damage to the property until the inundation depths exceed that height. This is represented by modifying the depth-damage curve so that the damage fraction is zero below the floodproofing height. Above the floodproofing height, the damage curve is unchanged because once the inundation exceeds the floodproofing height, it is assumed the water will then enter the property and reach the levels it would have reached without the floodproofing barrier. +::: diff --git a/docs/4_user_guide/measures/green_infra.qmd b/docs/4_user_guide/measures/green_infra.qmd index 174cdba84..199d27229 100644 --- a/docs/4_user_guide/measures/green_infra.qmd +++ b/docs/4_user_guide/measures/green_infra.qmd @@ -3,4 +3,4 @@ title: Urban green infrastructure filters: - lightbox lightbox: auto ---- \ No newline at end of file +--- diff --git a/docs/4_user_guide/measures/hydraulic.qmd b/docs/4_user_guide/measures/hydraulic.qmd index df4ae8890..fb4927001 100644 --- a/docs/4_user_guide/measures/hydraulic.qmd +++ b/docs/4_user_guide/measures/hydraulic.qmd @@ -3,4 +3,4 @@ title: Hydraulic measures filters: - lightbox lightbox: auto ---- \ No newline at end of file +--- diff --git a/docs/4_user_guide/measures/index.qmd b/docs/4_user_guide/measures/index.qmd index 2b4eecefe..528573861 100644 --- a/docs/4_user_guide/measures/index.qmd +++ b/docs/4_user_guide/measures/index.qmd @@ -12,13 +12,13 @@ FloodAdapt can simulate several types of adaptation measures. These fall under t ![**Measures that FloodAdapt can simulate: floodwalls, levees, pumps, urban green infrastructure, floodproofing, buyouts, and elevating buildings**](../../_static/images/measures.png){width=50% fig-align=left #fig-measures} -Users enter measures in the *Measures* tab in FloodAdapt (see @fig-measuresTab). To get started specifying a measure, the user selects three options: +Users enter measures in the *Measures* tab in FloodAdapt (see @fig-measuresTab). To get started specifying a measure, the user selects three options: * Category: [Hydraulic](hydraulic.qmd), [Green Infrastructure](green_infra.qmd), or [Buildings](buildings.qmd) * Measure: The specific measure (for example, "floodwall" for a hydraulic measure or "floodproofing" for a buildings measure) * Area Type: how the user wants to specify the extent of the measure (for example, drawing a polyline or choosing an aggregation area) -Click on each of the category types ([Hydraulic](hydraulic.qmd), [Green Infrastructure](green_infra.qmd), or [Buildings](buildings.qmd)) to see details about how to enter information for specific measures. +Click on each of the category types ([Hydraulic](hydraulic.qmd), [Green Infrastructure](green_infra.qmd), or [Buildings](buildings.qmd)) to see details about how to enter information for specific measures. ## View layers in the Measures tab Another feature on the Measures tab is the ability to show a layer that can support or guide a user in determining where to implement measures. For example, a social vulnerability index layer, a disadvantaged communities layer, or an income layer may help the user to see where they want to focus their efforts to support more equitable adaptation planning. The layers that are visible in the Measures tab are configurable, so that communities can include the data that is most relevant for them. To view a layer, the user clicks the "Show Layer" dropdown menu (see @fig-measuresTab) and selects the layer they want to view. @@ -26,8 +26,8 @@ Another feature on the Measures tab is the ability to show a layer that can supp ![**Measures tab in FloodAdapt**](../../_static/images/measures_generalTab.png){#fig-measuresTab} ## Copying, editing and deleting measures -FloodAdapt allows users to copy, edit, and delete measures they have already added. Copying measures is an efficient way to create multiple variations of a similar type of measure. For example, a user may want to evaluate elevating the same properties to different heights, or trying different heights for a floodwall. +FloodAdapt allows users to copy, edit, and delete measures they have already added. Copying measures is an efficient way to create multiple variations of a similar type of measure. For example, a user may want to evaluate elevating the same properties to different heights, or trying different heights for a floodwall. -Editing measures allows the user to modify either the geometry of a measure or the measure parameters (these are specifications like the height of a wall). When a user selects "Edit measure", FloodAdapt asks which of these a user would like to modify. If the user selects the geometry, they are able to modify polylines or polygons in the map. If they select parameters, the measure specification window opens and they can change parameters they specified. +Editing measures allows the user to modify either the geometry of a measure or the measure parameters (these are specifications like the height of a wall). When a user selects "Edit measure", FloodAdapt asks which of these a user would like to modify. If the user selects the geometry, they are able to modify polylines or polygons in the map. If they select parameters, the measure specification window opens and they can change parameters they specified. -Editing and deleting measures is not permitted if the measure has already been used to specify a strategy. If the user wants to delete the measure, they must first delete the strategy which includes the measure. +Editing and deleting measures is not permitted if the measure has already been used to specify a strategy. If the user wants to delete the measure, they must first delete the strategy which includes the measure. diff --git a/docs/4_user_guide/output/index.qmd b/docs/4_user_guide/output/index.qmd index 13b9bba5d..304b8de5b 100644 --- a/docs/4_user_guide/output/index.qmd +++ b/docs/4_user_guide/output/index.qmd @@ -2,4 +2,4 @@ title: Output tab --- -Hello \ No newline at end of file +Hello diff --git a/docs/4_user_guide/projections/climate.qmd b/docs/4_user_guide/projections/climate.qmd index 27780ac59..1705af43c 100644 --- a/docs/4_user_guide/projections/climate.qmd +++ b/docs/4_user_guide/projections/climate.qmd @@ -4,15 +4,15 @@ filters: - lightbox lightbox: auto --- -This section will describe how future projections of [sea level rise](#sea-level-rise), [precipitation](#increase-precipitation) and [tropical storm frequencies](#increased-storm-frequency) are specified and implemented in FloodAdapt. +This section will describe how future projections of [sea level rise](#sea-level-rise), [precipitation](#increase-precipitation) and [tropical storm frequencies](#increased-storm-frequency) are specified and implemented in FloodAdapt. ![**Climate projections in FloodAdapt: sea level rise, increased storm frequencies, precipitation changes**](../../_static/images/projections_climate.png){width=70% fig-align=left #fig-projectionsClimate} -## Sea level rise -There are two ways to specify sea level rise in the projections window: ***manually*** and ***from scenario***. +## Sea level rise +There are two ways to specify sea level rise in the projections window: ***manually*** and ***from scenario***. -If you select ***manually***, you can type a number in the "Sea Level Rise" (see @fig-projectionsSLR_manual). You can then give your projection a name and (optionally) a description and click "OK" and your projection will show up in the FlodoAdapt Projections tab. +If you select ***manually***, you can type a number in the "Sea Level Rise" (see @fig-projectionsSLR_manual). You can then give your projection a name and (optionally) a description and click "OK" and your projection will show up in the FlodoAdapt Projections tab. ![**Manually entering a sea level rise projection**](../../_static/images/projections_SLR_manual.png){width=70% fig-align=left #fig-projectionsSLR_manual} @@ -22,7 +22,7 @@ If you select ***from scenario***, a dropdown box will appear from which you can ::: {.callout-note} ## Sea level rise - since when? -Sea level rise scenarios have a starting point where sea level rise is zero (often, but not necessarily, starting at the year 2000). FloodAdapt corrects for this, using the 'current year', which is specified at system setup. So when a user chooses the "from scenario" option to input a sea level rise projection for a future year, the sea level rise that is shown in the projections window is relative to the current year. This is done by subtracting the projected rise between the starting point and the current year, for each sea level rise scenario. +Sea level rise scenarios have a starting point where sea level rise is zero (often, but not necessarily, starting at the year 2000). FloodAdapt corrects for this, using the 'current year', which is specified at system setup. So when a user chooses the "from scenario" option to input a sea level rise projection for a future year, the sea level rise that is shown in the projections window is relative to the current year. This is done by subtracting the projected rise between the starting point and the current year, for each sea level rise scenario. ::: ::: {.callout-note} @@ -31,7 +31,7 @@ When a user runs a scenario with a sea level rise projection, the sea level rise ::: ## Increased precipitation -An increase in precipitation is given as a percentage in the projections window (see @fig-projectionsPrecip). You can give the projection a name and (optionally) a description and click "OK" and the projection will be added in the projections tab. +An increase in precipitation is given as a percentage in the projections window (see @fig-projectionsPrecip). You can give the projection a name and (optionally) a description and click "OK" and the projection will be added in the projections tab. ### Why is this only for probabilistic event sets? In the projection window, you see an indication that increased precipitation is for probabilistic events only. This is because for a single event, a user can explore a 'what-if' scenario about increased rainfall by adjusting the rainfall when they define an event (with the precipitation magnifier for a [historical event](../events/historic_events/historic_events_gauged.qmd#rainfall-magnifier-with-the-timeseries-and-map-options), or with complete flexibility in defining rainfall for a [synthetic event](../events/synthetic_events.qmd)). For [probabilistic event sets](../events/probabilistic_events.qmd), the precpitation change needs to be applied to every event in the set, something that the user cannot do via the events tab. @@ -44,7 +44,7 @@ If you choose a projection of increased precipitation for a single event, it wil ![**Entering increased precipitation as a percentage increase**](../../_static/images/projections_precip.png){width=70% fig-align=left #fig-projectionsPrecip} ## Increased storm frequency -An increase in storm frequency is given as a percentage in the projections window (see @fig-projectionsPrecip). This percentage is treated as an increase in the occurrence frequency of each tropical storm event in a probabilistic event set. This influences the return period flood maps and risk estimates, because when storms occur more frequently, the chance of storm flooding, and hence risk, increases. +An increase in storm frequency is given as a percentage in the projections window (see @fig-projectionsPrecip). This percentage is treated as an increase in the occurrence frequency of each tropical storm event in a probabilistic event set. This influences the return period flood maps and risk estimates, because when storms occur more frequently, the chance of storm flooding, and hence risk, increases. ::: callout-tip ## Example - increased storm frequency @@ -59,4 +59,4 @@ The change in storm frequency will only affect the frequency of the storm. This If you choose a projection of increased storm frequency for a single event, it will have no effect. The frequency is only used when calculating return period flood maps and risk, and for a single event scenario will play no role. It won't do any harm, but it won't have any effect on the resulting event-scenario flood and impact results. ::: -![**Entering increased storm frequency as a percentage increase**](../../_static/images/projections_stormFreq.png){width=70% fig-align=left #fig-projectionsPrecip} \ No newline at end of file +![**Entering increased storm frequency as a percentage increase**](../../_static/images/projections_stormFreq.png){width=70% fig-align=left #fig-projectionsPrecip} diff --git a/docs/4_user_guide/projections/index.qmd b/docs/4_user_guide/projections/index.qmd index e47e55716..33f68ef7d 100644 --- a/docs/4_user_guide/projections/index.qmd +++ b/docs/4_user_guide/projections/index.qmd @@ -12,10 +12,10 @@ On the Projections Tab in FloodAdapt, click 'Add Projection' to open the project ![**Projections window on the Projections tab in FloodAdapt**](../../_static/images/Projection_window.png){#fig-projectionWindow} -In this window you can specify a [climate projection](climate.qmd), a [socio-economic projection](socioEconomic.qmd), or a combination (for example: 10% population growth with 1 foot of SLR). +In this window you can specify a [climate projection](climate.qmd), a [socio-economic projection](socioEconomic.qmd), or a combination (for example: 10% population growth with 1 foot of SLR). -Click the following links to learn more about how climate and socio-economic projections can be specified in FloodAdapt, and how they are represented in the modeling. +Click the following links to learn more about how climate and socio-economic projections can be specified in FloodAdapt, and how they are represented in the modeling. [Climate projections](climate.qmd) -[Socio-economic projections](socioEconomic.qmd) \ No newline at end of file +[Socio-economic projections](socioEconomic.qmd) diff --git a/docs/4_user_guide/projections/socioEconomic.qmd b/docs/4_user_guide/projections/socioEconomic.qmd index 89e9cde1a..17fcabd99 100644 --- a/docs/4_user_guide/projections/socioEconomic.qmd +++ b/docs/4_user_guide/projections/socioEconomic.qmd @@ -5,17 +5,17 @@ filters: lightbox: auto --- -This section will describe how future projections of [population in existing built area](#population-growth---existing-built-area), [population growth in new development areas](#population-growth---new-development-areas) and [economic growth](#economic-growth) are specified and implemented in FloodAdapt. +This section will describe how future projections of [population in existing built area](#population-growth---existing-built-area), [population growth in new development areas](#population-growth---new-development-areas) and [economic growth](#economic-growth) are specified and implemented in FloodAdapt. -## Population growth - existing built area -To represent population growth in existing built areas within the community, the user can choose "Population Growth - Existing" (see @fig-popGrowthExisting). The user enters a percentage (such as 10%) which represents the percentage of the current existing population. So if there are 100,000 people now living in a community, a 10% increase would represent an additional 10,000 residents. +## Population growth - existing built area +To represent population growth in existing built areas within the community, the user can choose "Population Growth - Existing" (see @fig-popGrowthExisting). The user enters a percentage (such as 10%) which represents the percentage of the current existing population. So if there are 100,000 people now living in a community, a 10% increase would represent an additional 10,000 residents. ![**Entering a percentage population growth in the existing built area**](../../_static/images/popGrowth_existingBuild.png){width=70% fig-align=left #fig-popGrowthExisting} -The *idea* of the population growth option in existing built areas within FloodAdapt is that the building stock becomes either more dense (more buildings), or the existing residences are replaced by higher-density buildings like apartment buildings. +The *idea* of the population growth option in existing built areas within FloodAdapt is that the building stock becomes either more dense (more buildings), or the existing residences are replaced by higher-density buildings like apartment buildings. -The *implementation* of population growthing within FloodAdapt is simplified. This is because users may not know where new buildings will be built or which buildings will be replaced by higher-density buildings to support future population growth. FloodAdapt therefore spreads the increase evenly over the entire building stock, by increasing the maximum potential damages of all the existing buildings. @fig-popGrowthExistingProxy shows an example how this is implemented, highlighting one building. This increase is applied to all buildings equally, so that the *overall* increase in damages is reflective of the future situation with population growth. +The *implementation* of population growthing within FloodAdapt is simplified. This is because users may not know where new buildings will be built or which buildings will be replaced by higher-density buildings to support future population growth. FloodAdapt therefore spreads the increase evenly over the entire building stock, by increasing the maximum potential damages of all the existing buildings. @fig-popGrowthExistingProxy shows an example how this is implemented, highlighting one building. This increase is applied to all buildings equally, so that the *overall* increase in damages is reflective of the future situation with population growth. ![**Simplification of population growth in the existing built area in FloodAdapt**](../../_static/images/popGrowth_existingBuild_proxyRep.png){width=70% fig-align=left #fig-popGrowthExistingProxy} @@ -23,22 +23,22 @@ The *implementation* of population growthing within FloodAdapt is simplified. Th ## Population growth - new development areas To evaluate future impacts of population growth specifically in new areas considered for development, users can choose the option "Population Growth - New (%)" (see @fig-popGrowthNew). This is an innovative feature of FloodAdapt which allows users to evaluate the flooding and impacts in areas considered for future development. -The user specifies the percentage of the current existing population that is projected to live in the new development area. For example, if the current population is 100,000, and the new development area is expected to support 1,000 new residents, the user would enter 1% for the population growth in the new area. The user is then asked to provide a shape file (or other spatial polygon file) specifying the boundaries of the new development area. In addition, the user can specify how high the new development will be built off the ground, either relative to a datum, or relative to base flood elevation (BFE). This allows users to explore the impact of regulations on how high new developments need to be built. +The user specifies the percentage of the current existing population that is projected to live in the new development area. For example, if the current population is 100,000, and the new development area is expected to support 1,000 new residents, the user would enter 1% for the population growth in the new area. The user is then asked to provide a shape file (or other spatial polygon file) specifying the boundaries of the new development area. In addition, the user can specify how high the new development will be built off the ground, either relative to a datum, or relative to base flood elevation (BFE). This allows users to explore the impact of regulations on how high new developments need to be built. ![**Entering a percentage population growth for a new development area**](../../_static/images/popGrowth_newDevelopment.png){width=70% fig-align=left #fig-popGrowthNew} The *idea* of population growth in new areas in FloodAdapt is that people will move to currently-undeveloped areas which will be zoned for residential or commercial use to accommodate population growth. This feature allows users to evaluate potential new development areas in terms of the impacts and risk that result. -The *implementation* of population growth in new areas in FloodAdapt is simplified. The user is not expected to know exactly where each new building will be located, or specifics about each building that are typically needed to calculated damages, such as maximum potential damages, or whether they will be one-story or two-story homes. Instead, FloodAdapt creates a composite building over the entire new development area. This composite building is currently assumed to reflect the make-up of the existing built area. For example, if the current built area is 80% residential, 18% commercial, and 2% government buildings, the new development will have this same composition. The way this is utilized in FloodAdapt is that the composite new-development building is assigned a depth-damage curve that is a weighted average of the depth-damage curves of the existing buildings. The maximum potential damage of the composite building is assumed to be the total maximum potential damages over all the existing buildings multiplied by the percentage population growth. For example, if the total maximum potential damages over all buildings in the area is $1 Billion, the maximum potential damages for a new development area with 1% population growth would be $10 Million. Because the new-development composite building is large, it is likely often partially flooded during flood events. FloodAdapt stores the flood depths over the entire new development area. It takes the average flood depth to calculate damages, but reduces these damages by the fraction of the area that is not flooded. For example, if the average flood depth leads to damages of $1 Million, but only 20% of the area was flooded, FloodAdapt will reduce the damages by 80% to $200,000. @fig-popGrowthNewProxy gives a visual representation of how population growth in new development areas is represented in FloodAdapt. +The *implementation* of population growth in new areas in FloodAdapt is simplified. The user is not expected to know exactly where each new building will be located, or specifics about each building that are typically needed to calculated damages, such as maximum potential damages, or whether they will be one-story or two-story homes. Instead, FloodAdapt creates a composite building over the entire new development area. This composite building is currently assumed to reflect the make-up of the existing built area. For example, if the current built area is 80% residential, 18% commercial, and 2% government buildings, the new development will have this same composition. The way this is utilized in FloodAdapt is that the composite new-development building is assigned a depth-damage curve that is a weighted average of the depth-damage curves of the existing buildings. The maximum potential damage of the composite building is assumed to be the total maximum potential damages over all the existing buildings multiplied by the percentage population growth. For example, if the total maximum potential damages over all buildings in the area is $1 Billion, the maximum potential damages for a new development area with 1% population growth would be $10 Million. Because the new-development composite building is large, it is likely often partially flooded during flood events. FloodAdapt stores the flood depths over the entire new development area. It takes the average flood depth to calculate damages, but reduces these damages by the fraction of the area that is not flooded. For example, if the average flood depth leads to damages of $1 Million, but only 20% of the area was flooded, FloodAdapt will reduce the damages by 80% to $200,000. @fig-popGrowthNewProxy gives a visual representation of how population growth in new development areas is represented in FloodAdapt. ![**Implementation of population growth in new development areas in FloodAdapt**](../../_static/images/popGrowth_newDevelopment_implementation.png){width=70% fig-align=left #fig-popGrowthNewProxy} ## Economic growth -To evaluate economic growth, users can choose the option "Economic Growth (%)" (see @fig-economicGrowth). The user enters a percentage increase in economic growth. +To evaluate economic growth, users can choose the option "Economic Growth (%)" (see @fig-economicGrowth). The user enters a percentage increase in economic growth. -The economic growth projection is implemented in a simplified way in FloodAdapt by increasing the maximum potential damages of the existing buildings by the specified percentage. This is a simplification intended to represent increasing wealth and value in the community, without specifically accounting for changes in economic activity which would lead to this wealth and value increase. +The economic growth projection is implemented in a simplified way in FloodAdapt by increasing the maximum potential damages of the existing buildings by the specified percentage. This is a simplification intended to represent increasing wealth and value in the community, without specifically accounting for changes in economic activity which would lead to this wealth and value increase. ![**Implementation of economic growth in FloodAdapt**](../../_static/images/economicGrowth.png){width=70% fig-align=left #fig-economicGrowth} diff --git a/docs/4_user_guide/scenarios/index.qmd b/docs/4_user_guide/scenarios/index.qmd index adb4a5cc5..a2611f13c 100644 --- a/docs/4_user_guide/scenarios/index.qmd +++ b/docs/4_user_guide/scenarios/index.qmd @@ -1,4 +1,3 @@ --- title: Scenarios --- - diff --git a/docs/4_user_guide/site_tab.qmd b/docs/4_user_guide/site_tab.qmd index 0b3d74d2f..5dede9ac8 100644 --- a/docs/4_user_guide/site_tab.qmd +++ b/docs/4_user_guide/site_tab.qmd @@ -8,11 +8,11 @@ lightbox: auto Don't feel like reading? No problem! Check out our video about the FloodAdapt site tab: {{< video https://www.youtube.com/watch?v=3VmViLpo8_c >}} -The user interface opens by default to the Site tab, shown for the example of Charleston, South Carolina in @fig-siteTab. The site tab shows the aggregation areas that have been defined for the site. If more than one type of aggregation area has been defined, the user can select which one they want to view from the drop-down box 'Aggregation Areas Type'. Examples of aggregation area types are census blocks, neighborhoods, or zip codes. The 'Aggregation Areas' box populates with the different areas for the selected aggregation type. The user can hover over an area and see the name of that area. Similarly, they can select an area of the 'Aggregation Areas' list and that area will become highlighted on the map. +The user interface opens by default to the Site tab, shown for the example of Charleston, South Carolina in @fig-siteTab. The site tab shows the aggregation areas that have been defined for the site. If more than one type of aggregation area has been defined, the user can select which one they want to view from the drop-down box 'Aggregation Areas Type'. Examples of aggregation area types are census blocks, neighborhoods, or zip codes. The 'Aggregation Areas' box populates with the different areas for the selected aggregation type. The user can hover over an area and see the name of that area. Similarly, they can select an area of the 'Aggregation Areas' list and that area will become highlighted on the map. ![**The site tab, shown here for the example of Charleston, South Carolina**](../_static/images/Tab_site.png){#fig-siteTab} The site tab also shows the extent of the flood model. This can be substantially larger than the area of interest. If a user zooms out they can see the extent of the area, as show in @fig-siteTab-zoomedOut -![**The site tab, zoomed out to show the full flood model extent (in red)**](../_static/images/Tab_site_fullModelExtent.png){#fig-siteTab-zoomedOut} \ No newline at end of file +![**The site tab, zoomed out to show the full flood model extent (in red)**](../_static/images/Tab_site_fullModelExtent.png){#fig-siteTab-zoomedOut} diff --git a/docs/4_user_guide/user_interface.qmd b/docs/4_user_guide/user_interface.qmd index 8b7e0a5ca..1dc8211ac 100644 --- a/docs/4_user_guide/user_interface.qmd +++ b/docs/4_user_guide/user_interface.qmd @@ -3,4 +3,4 @@ title: GUI features --- To be filled in when the general features are more finalized (e.g. view and help options) -Test. \ No newline at end of file +Test. diff --git a/docs/5_update_model/aggregation_areas.qmd b/docs/5_update_model/aggregation_areas.qmd index fc8aa91ee..e1eb3c645 100644 --- a/docs/5_update_model/aggregation_areas.qmd +++ b/docs/5_update_model/aggregation_areas.qmd @@ -1,3 +1,3 @@ --- title: Adding new aggregation areas ---- \ No newline at end of file +--- diff --git a/docs/5_update_model/damage_functions.qmd b/docs/5_update_model/damage_functions.qmd index 9d8c355fc..490885bab 100644 --- a/docs/5_update_model/damage_functions.qmd +++ b/docs/5_update_model/damage_functions.qmd @@ -1,3 +1,3 @@ --- title: Updating damage functions ---- \ No newline at end of file +--- diff --git a/docs/5_update_model/dem.qmd b/docs/5_update_model/dem.qmd index f162919e8..740cd3985 100644 --- a/docs/5_update_model/dem.qmd +++ b/docs/5_update_model/dem.qmd @@ -1,3 +1,3 @@ --- title: Updating the DEM ---- \ No newline at end of file +--- diff --git a/docs/5_update_model/index.qmd b/docs/5_update_model/index.qmd index 0810bb0d5..1256c6a89 100644 --- a/docs/5_update_model/index.qmd +++ b/docs/5_update_model/index.qmd @@ -2,4 +2,4 @@ title: Updating the CFRSS --- -I put some text here. Will it show? \ No newline at end of file +I put some text here. Will it show? diff --git a/docs/5_update_model/objects.qmd b/docs/5_update_model/objects.qmd index 07dad9be9..f1d180225 100644 --- a/docs/5_update_model/objects.qmd +++ b/docs/5_update_model/objects.qmd @@ -1,3 +1,3 @@ --- title: Adding / updating objects in the exposure data ---- \ No newline at end of file +--- diff --git a/docs/5_update_model/settings.qmd b/docs/5_update_model/settings.qmd index 6b1d11987..c871ca46b 100644 --- a/docs/5_update_model/settings.qmd +++ b/docs/5_update_model/settings.qmd @@ -1,7 +1,7 @@ --- -title: Updating settings for running probabilistic scenarios +title: Updating settings for running probabilistic scenarios --- # Updating return periods -# Updating the flood frequency threshold \ No newline at end of file +# Updating the flood frequency threshold diff --git a/docs/6_demo/army_corps.qmd b/docs/6_demo/army_corps.qmd index e7e4c2a84..6d58e61dd 100644 --- a/docs/6_demo/army_corps.qmd +++ b/docs/6_demo/army_corps.qmd @@ -1,3 +1,3 @@ --- title: The Army Corps has a surge-protection plan for the peninsula – what about the rest of Charleston? ---- \ No newline at end of file +--- diff --git a/docs/6_demo/index.qmd b/docs/6_demo/index.qmd index 70765ad88..4af176e21 100644 --- a/docs/6_demo/index.qmd +++ b/docs/6_demo/index.qmd @@ -1,3 +1,3 @@ --- title: Demonstrating the use of FloodAdapt ---- \ No newline at end of file +--- diff --git a/docs/6_demo/king_tides.qmd b/docs/6_demo/king_tides.qmd index ecff490f6..282080aad 100644 --- a/docs/6_demo/king_tides.qmd +++ b/docs/6_demo/king_tides.qmd @@ -1,3 +1,3 @@ --- title: King tides are already a problem – how will that look with sea level rise? ---- \ No newline at end of file +--- diff --git a/docs/6_demo/measures_impact.qmd b/docs/6_demo/measures_impact.qmd index bbf46840b..92e63c0fc 100644 --- a/docs/6_demo/measures_impact.qmd +++ b/docs/6_demo/measures_impact.qmd @@ -10,4 +10,3 @@ title: Measures and their impact ### Reduced impacts ### Risk-reduction benefits ### Effectiveness under future conditions - diff --git a/docs/_extensions/quarto-ext/lightbox/lightbox.css b/docs/_extensions/quarto-ext/lightbox/lightbox.css index d94d9e575..86f45d2d4 100644 --- a/docs/_extensions/quarto-ext/lightbox/lightbox.css +++ b/docs/_extensions/quarto-ext/lightbox/lightbox.css @@ -6,4 +6,4 @@ body:not(.glightbox-mobile) div.gslide-description .gslide-title, body:not(.glightbox-mobile) div.gslide-description .gslide-desc { color: var(--quarto-body-color); background-color: var(--quarto-body-bg); -} \ No newline at end of file +} diff --git a/docs/_extensions/quarto-ext/lightbox/lightbox.lua b/docs/_extensions/quarto-ext/lightbox/lightbox.lua index ca8b805a8..033676366 100644 --- a/docs/_extensions/quarto-ext/lightbox/lightbox.lua +++ b/docs/_extensions/quarto-ext/lightbox/lightbox.lua @@ -10,7 +10,7 @@ local imgCount = 0 -- attributes to forward from the image to the newly created link local kDescription = "description" local kForwardedAttr = { - "title", kDescription, "desc-position", + "title", kDescription, "desc-position", "type", "effect", "zoomable", "draggable" } @@ -21,12 +21,12 @@ local kGalleryPrefix = "quarto-lightbox-gallery-" -- A list of images already within links that we can use to filter local imagesWithinLinks = pandoc.List({}) -local function readAttrValue(el, attrName) +local function readAttrValue(el, attrName) if attrName == kDescription then local doc = pandoc.read(el.attr.attributes[attrName]) local attrInlines = doc.blocks[1].content return pandoc.write(pandoc.Pandoc(attrInlines), "html") - else + else return el[attrName] end @@ -34,12 +34,12 @@ end return { { - Meta = function(meta) + Meta = function(meta) - -- If the mode is auto, we need go ahead and + -- If the mode is auto, we need go ahead and -- run if there are any images (ideally we would) -- filter to images in the body, but that can be - -- left for future me to deal with + -- left for future me to deal with -- supports: -- lightbox: auto -- or @@ -54,16 +54,16 @@ return { elseif lbMeta.match ~= nil and pandoc.utils.stringify(lbMeta.match) == 'auto' then auto = true elseif lbMeta == true then - auto = true + auto = true end end - end, + end, -- Find images that are already within links -- we'll use this to filter out these images if -- the most is auto Link = function(linkEl) pandoc.walk_inline(linkEl, { - Image = function(imageEl) + Image = function(imageEl) imagesWithinLinks[#imagesWithinLinks + 1] = imageEl end }) @@ -87,14 +87,14 @@ return { imgEl.attr.attributes.group = meta.group or imgEl.attr.attributes.group end for _, v in next, kForwardedAttr do - if type(meta[v]) == "table" and #meta[v] > 1 then + if type(meta[v]) == "table" and #meta[v] > 1 then -- if list attributes it should be one per plot if imgCount > #meta[v] then quarto.log.warning("More plots than '" .. v .. "' passed in YAML chunk options.") else attrLb = meta[v][imgCount] end - else + else -- Otherwise reuse the single attributes attrLb = meta[v] end @@ -114,17 +114,17 @@ return { Image = function(imgEl) if quarto.doc.is_format("html:js") then local isAlreadyLinked = imagesWithinLinks:includes(imgEl) - if (not isAlreadyLinked and auto and not imgEl.classes:includes(kNoLightboxClass)) + if (not isAlreadyLinked and auto and not imgEl.classes:includes(kNoLightboxClass)) or imgEl.classes:includes('lightbox') then -- note that we need to include the dependency for lightbox needsLightbox = true imgCount = imgCount + 1 -- remove the class from the image - imgEl.attr.classes = imgEl.attr.classes:filter(function(clz) + imgEl.attr.classes = imgEl.attr.classes:filter(function(clz) return clz ~= kLightboxClass end) - + -- attributes for the link local linkAttributes = {} @@ -143,7 +143,7 @@ return { if imgEl.attr.attributes.group ~= nil then linkAttributes.gallery = imgEl.attr.attributes.group imgEl.attr.attributes.group = nil - else + else linkAttributes.gallery = kGalleryPrefix .. imgCount end @@ -152,7 +152,7 @@ return { if imgEl.attr.attributes[v] ~= nil then -- forward the attribute linkAttributes[v] = readAttrValue(imgEl, v) - + -- clear the attribute imgEl.attr.attributes[v] = nil end @@ -168,7 +168,7 @@ return { local link = pandoc.Link({imgEl}, imgEl.src, nil, linkAttributes) return link end - end + end end, Meta = function(meta) -- If we discovered lightbox-able images @@ -184,7 +184,7 @@ return { -- read lightbox options local lbMeta = meta.lightbox local lbOptions = {} - local readEffect = function(el) + local readEffect = function(el) local val = pandoc.utils.stringify(el) if val == "fade" or val == "zoom" or val == "none" then return val @@ -200,10 +200,10 @@ return { -- loop: true | false -- class: local effect = "zoom" - local descPosition = "bottom" + local descPosition = "bottom" local loop = true local skin = nil - + -- The selector controls which elements are targeted. -- currently, it always targets .lightbox elements -- and there is no way for the user to change this @@ -216,12 +216,12 @@ return { if lbMeta['desc-position'] ~= nil then descPosition = pandoc.utils.stringify(lbMeta['desc-position']) - end + end if lbMeta['css-class'] ~= nil then skin = pandoc.utils.stringify(lbMeta['css-class']) end - + if lbMeta.loop ~= nil then loop = lbMeta.loop end @@ -231,7 +231,7 @@ return { local options = { selector = selector, closeEffect = effect, - openEffect = effect, + openEffect = effect, descPosition = descPosition, loop = loop, } diff --git a/docs/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css b/docs/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css index 3c9ff8775..f3f66a87b 100644 --- a/docs/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css +++ b/docs/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css @@ -1 +1 @@ -.glightbox-container{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999999!important;overflow:hidden;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;outline:0}.glightbox-container.inactive{display:none}.glightbox-container .gcontainer{position:relative;width:100%;height:100%;z-index:9999;overflow:hidden}.glightbox-container .gslider{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;height:100%;left:0;top:0;width:100%;position:relative;overflow:hidden;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.glightbox-container .gslide{width:100%;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0}.glightbox-container .gslide.current{opacity:1;z-index:99999;position:relative}.glightbox-container .gslide.prev{opacity:1;z-index:9999}.glightbox-container .gslide-inner-content{width:100%}.glightbox-container .ginner-container{position:relative;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;margin:auto;height:100vh}.glightbox-container .ginner-container.gvideo-container{width:100%}.glightbox-container .ginner-container.desc-bottom,.glightbox-container .ginner-container.desc-top{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.glightbox-container .ginner-container.desc-left,.glightbox-container .ginner-container.desc-right{max-width:100%!important}.gslide iframe,.gslide video{outline:0!important;border:none;min-height:165px;-webkit-overflow-scrolling:touch;-ms-touch-action:auto;touch-action:auto}.gslide:not(.current){pointer-events:none}.gslide-image{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.gslide-image img{max-height:100vh;display:block;padding:0;float:none;outline:0;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:100vw;width:auto;height:auto;-o-object-fit:cover;object-fit:cover;-ms-touch-action:none;touch-action:none;margin:auto;min-width:200px}.desc-bottom .gslide-image img,.desc-top .gslide-image img{width:auto}.desc-left .gslide-image img,.desc-right .gslide-image img{width:auto;max-width:100%}.gslide-image img.zoomable{position:relative}.gslide-image img.dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.gslide-video{position:relative;max-width:100vh;width:100%!important}.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster{display:none}.gslide-video .gvideo-wrapper{width:100%;margin:auto}.gslide-video::before{content:'';position:absolute;width:100%;height:100%;background:rgba(255,0,0,.34);display:none}.gslide-video.playing::before{display:none}.gslide-video.fullscreen{max-width:100%!important;min-width:100%;height:75vh}.gslide-video.fullscreen video{max-width:100%!important;width:100%!important}.gslide-inline{background:#fff;text-align:left;max-height:calc(100vh - 40px);overflow:auto;max-width:100%;margin:auto}.gslide-inline .ginlined-content{padding:20px;width:100%}.gslide-inline .dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.ginlined-content{overflow:auto;display:block!important;opacity:1}.gslide-external{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;background:#fff;padding:0;overflow:auto;max-height:75vh;height:100%}.gslide-media{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.zoomed .gslide-media{-webkit-box-shadow:none!important;box-shadow:none!important}.desc-bottom .gslide-media,.desc-top .gslide-media{margin:0 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gslide-description{position:relative;-webkit-box-flex:1;-ms-flex:1 0 100%;flex:1 0 100%}.gslide-description.description-left,.gslide-description.description-right{max-width:100%}.gslide-description.description-bottom,.gslide-description.description-top{margin:0 auto;width:100%}.gslide-description p{margin-bottom:12px}.gslide-description p:last-child{margin-bottom:0}.zoomed .gslide-description{display:none}.glightbox-button-hidden{display:none}.glightbox-mobile .glightbox-container .gslide-description{height:auto!important;width:100%;position:absolute;bottom:0;padding:19px 11px;max-width:100vw!important;-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;max-height:78vh;overflow:auto!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.75)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.75) 100%);-webkit-transition:opacity .3s linear;transition:opacity .3s linear;padding-bottom:50px}.glightbox-mobile .glightbox-container .gslide-title{color:#fff;font-size:1em}.glightbox-mobile .glightbox-container .gslide-desc{color:#a1a1a1}.glightbox-mobile .glightbox-container .gslide-desc a{color:#fff;font-weight:700}.glightbox-mobile .glightbox-container .gslide-desc *{color:inherit}.glightbox-mobile .glightbox-container .gslide-desc .desc-more{color:#fff;opacity:.4}.gdesc-open .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:.4}.gdesc-open .gdesc-inner{padding-bottom:30px}.gdesc-closed .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:1}.greset{-webkit-transition:all .3s ease;transition:all .3s ease}.gabsolute{position:absolute}.grelative{position:relative}.glightbox-desc{display:none!important}.glightbox-open{overflow:hidden}.gloader{height:25px;width:25px;-webkit-animation:lightboxLoader .8s infinite linear;animation:lightboxLoader .8s infinite linear;border:2px solid #fff;border-right-color:transparent;border-radius:50%;position:absolute;display:block;z-index:9999;left:0;right:0;margin:0 auto;top:47%}.goverlay{width:100%;height:calc(100vh + 1px);position:fixed;top:-1px;left:0;background:#000;will-change:opacity}.glightbox-mobile .goverlay{background:#000}.gclose,.gnext,.gprev{z-index:99999;cursor:pointer;width:26px;height:44px;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gclose svg,.gnext svg,.gprev svg{display:block;width:25px;height:auto;margin:0;padding:0}.gclose.disabled,.gnext.disabled,.gprev.disabled{opacity:.1}.gclose .garrow,.gnext .garrow,.gprev .garrow{stroke:#fff}.gbtn.focused{outline:2px solid #0f3d81}iframe.wait-autoplay{opacity:0}.glightbox-closing .gclose,.glightbox-closing .gnext,.glightbox-closing .gprev{opacity:0!important}.glightbox-clean .gslide-description{background:#fff}.glightbox-clean .gdesc-inner{padding:22px 20px}.glightbox-clean .gslide-title{font-size:1em;font-weight:400;font-family:arial;color:#000;margin-bottom:19px;line-height:1.4em}.glightbox-clean .gslide-desc{font-size:.86em;margin-bottom:0;font-family:arial;line-height:1.4em}.glightbox-clean .gslide-video{background:#000}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.75);border-radius:4px}.glightbox-clean .gclose path,.glightbox-clean .gnext path,.glightbox-clean .gprev path{fill:#fff}.glightbox-clean .gprev{position:absolute;top:-100%;left:30px;width:40px;height:50px}.glightbox-clean .gnext{position:absolute;top:-100%;right:30px;width:40px;height:50px}.glightbox-clean .gclose{width:35px;height:35px;top:15px;right:10px;position:absolute}.glightbox-clean .gclose svg{width:18px;height:auto}.glightbox-clean .gclose:hover{opacity:1}.gfadeIn{-webkit-animation:gfadeIn .5s ease;animation:gfadeIn .5s ease}.gfadeOut{-webkit-animation:gfadeOut .5s ease;animation:gfadeOut .5s ease}.gslideOutLeft{-webkit-animation:gslideOutLeft .3s ease;animation:gslideOutLeft .3s ease}.gslideInLeft{-webkit-animation:gslideInLeft .3s ease;animation:gslideInLeft .3s ease}.gslideOutRight{-webkit-animation:gslideOutRight .3s ease;animation:gslideOutRight .3s ease}.gslideInRight{-webkit-animation:gslideInRight .3s ease;animation:gslideInRight .3s ease}.gzoomIn{-webkit-animation:gzoomIn .5s ease;animation:gzoomIn .5s ease}.gzoomOut{-webkit-animation:gzoomOut .5s ease;animation:gzoomOut .5s ease}@-webkit-keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes gfadeIn{from{opacity:0}to{opacity:1}}@keyframes gfadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes gfadeOut{from{opacity:1}to{opacity:0}}@keyframes gfadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@-webkit-keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@-webkit-keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@-webkit-keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@media (min-width:769px){.glightbox-container .ginner-container{width:auto;height:auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.glightbox-container .ginner-container.desc-top .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-top .gslide-image,.glightbox-container .ginner-container.desc-top .gslide-image img{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.glightbox-container .ginner-container.desc-left .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-left .gslide-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.gslide-image img{max-height:97vh;max-width:100%}.gslide-image img.zoomable{cursor:-webkit-zoom-in;cursor:zoom-in}.zoomed .gslide-image img.zoomable{cursor:-webkit-grab;cursor:grab}.gslide-inline{max-height:95vh}.gslide-external{max-height:100vh}.gslide-description.description-left,.gslide-description.description-right{max-width:275px}.glightbox-open{height:auto}.goverlay{background:rgba(0,0,0,.92)}.glightbox-clean .gslide-media{-webkit-box-shadow:1px 2px 9px 0 rgba(0,0,0,.65);box-shadow:1px 2px 9px 0 rgba(0,0,0,.65)}.glightbox-clean .description-left .gdesc-inner,.glightbox-clean .description-right .gdesc-inner{position:absolute;height:100%;overflow-y:auto}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.32)}.glightbox-clean .gclose:hover,.glightbox-clean .gnext:hover,.glightbox-clean .gprev:hover{background-color:rgba(0,0,0,.7)}.glightbox-clean .gprev{top:45%}.glightbox-clean .gnext{top:45%}}@media (min-width:992px){.glightbox-clean .gclose{opacity:.7;right:20px}}@media screen and (max-height:420px){.goverlay{background:#000}} \ No newline at end of file +.glightbox-container{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999999!important;overflow:hidden;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;outline:0}.glightbox-container.inactive{display:none}.glightbox-container .gcontainer{position:relative;width:100%;height:100%;z-index:9999;overflow:hidden}.glightbox-container .gslider{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;height:100%;left:0;top:0;width:100%;position:relative;overflow:hidden;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.glightbox-container .gslide{width:100%;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0}.glightbox-container .gslide.current{opacity:1;z-index:99999;position:relative}.glightbox-container .gslide.prev{opacity:1;z-index:9999}.glightbox-container .gslide-inner-content{width:100%}.glightbox-container .ginner-container{position:relative;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;margin:auto;height:100vh}.glightbox-container .ginner-container.gvideo-container{width:100%}.glightbox-container .ginner-container.desc-bottom,.glightbox-container .ginner-container.desc-top{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.glightbox-container .ginner-container.desc-left,.glightbox-container .ginner-container.desc-right{max-width:100%!important}.gslide iframe,.gslide video{outline:0!important;border:none;min-height:165px;-webkit-overflow-scrolling:touch;-ms-touch-action:auto;touch-action:auto}.gslide:not(.current){pointer-events:none}.gslide-image{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.gslide-image img{max-height:100vh;display:block;padding:0;float:none;outline:0;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:100vw;width:auto;height:auto;-o-object-fit:cover;object-fit:cover;-ms-touch-action:none;touch-action:none;margin:auto;min-width:200px}.desc-bottom .gslide-image img,.desc-top .gslide-image img{width:auto}.desc-left .gslide-image img,.desc-right .gslide-image img{width:auto;max-width:100%}.gslide-image img.zoomable{position:relative}.gslide-image img.dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.gslide-video{position:relative;max-width:100vh;width:100%!important}.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster{display:none}.gslide-video .gvideo-wrapper{width:100%;margin:auto}.gslide-video::before{content:'';position:absolute;width:100%;height:100%;background:rgba(255,0,0,.34);display:none}.gslide-video.playing::before{display:none}.gslide-video.fullscreen{max-width:100%!important;min-width:100%;height:75vh}.gslide-video.fullscreen video{max-width:100%!important;width:100%!important}.gslide-inline{background:#fff;text-align:left;max-height:calc(100vh - 40px);overflow:auto;max-width:100%;margin:auto}.gslide-inline .ginlined-content{padding:20px;width:100%}.gslide-inline .dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.ginlined-content{overflow:auto;display:block!important;opacity:1}.gslide-external{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;background:#fff;padding:0;overflow:auto;max-height:75vh;height:100%}.gslide-media{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.zoomed .gslide-media{-webkit-box-shadow:none!important;box-shadow:none!important}.desc-bottom .gslide-media,.desc-top .gslide-media{margin:0 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gslide-description{position:relative;-webkit-box-flex:1;-ms-flex:1 0 100%;flex:1 0 100%}.gslide-description.description-left,.gslide-description.description-right{max-width:100%}.gslide-description.description-bottom,.gslide-description.description-top{margin:0 auto;width:100%}.gslide-description p{margin-bottom:12px}.gslide-description p:last-child{margin-bottom:0}.zoomed .gslide-description{display:none}.glightbox-button-hidden{display:none}.glightbox-mobile .glightbox-container .gslide-description{height:auto!important;width:100%;position:absolute;bottom:0;padding:19px 11px;max-width:100vw!important;-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;max-height:78vh;overflow:auto!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.75)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.75) 100%);-webkit-transition:opacity .3s linear;transition:opacity .3s linear;padding-bottom:50px}.glightbox-mobile .glightbox-container .gslide-title{color:#fff;font-size:1em}.glightbox-mobile .glightbox-container .gslide-desc{color:#a1a1a1}.glightbox-mobile .glightbox-container .gslide-desc a{color:#fff;font-weight:700}.glightbox-mobile .glightbox-container .gslide-desc *{color:inherit}.glightbox-mobile .glightbox-container .gslide-desc .desc-more{color:#fff;opacity:.4}.gdesc-open .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:.4}.gdesc-open .gdesc-inner{padding-bottom:30px}.gdesc-closed .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:1}.greset{-webkit-transition:all .3s ease;transition:all .3s ease}.gabsolute{position:absolute}.grelative{position:relative}.glightbox-desc{display:none!important}.glightbox-open{overflow:hidden}.gloader{height:25px;width:25px;-webkit-animation:lightboxLoader .8s infinite linear;animation:lightboxLoader .8s infinite linear;border:2px solid #fff;border-right-color:transparent;border-radius:50%;position:absolute;display:block;z-index:9999;left:0;right:0;margin:0 auto;top:47%}.goverlay{width:100%;height:calc(100vh + 1px);position:fixed;top:-1px;left:0;background:#000;will-change:opacity}.glightbox-mobile .goverlay{background:#000}.gclose,.gnext,.gprev{z-index:99999;cursor:pointer;width:26px;height:44px;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gclose svg,.gnext svg,.gprev svg{display:block;width:25px;height:auto;margin:0;padding:0}.gclose.disabled,.gnext.disabled,.gprev.disabled{opacity:.1}.gclose .garrow,.gnext .garrow,.gprev .garrow{stroke:#fff}.gbtn.focused{outline:2px solid #0f3d81}iframe.wait-autoplay{opacity:0}.glightbox-closing .gclose,.glightbox-closing .gnext,.glightbox-closing .gprev{opacity:0!important}.glightbox-clean .gslide-description{background:#fff}.glightbox-clean .gdesc-inner{padding:22px 20px}.glightbox-clean .gslide-title{font-size:1em;font-weight:400;font-family:arial;color:#000;margin-bottom:19px;line-height:1.4em}.glightbox-clean .gslide-desc{font-size:.86em;margin-bottom:0;font-family:arial;line-height:1.4em}.glightbox-clean .gslide-video{background:#000}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.75);border-radius:4px}.glightbox-clean .gclose path,.glightbox-clean .gnext path,.glightbox-clean .gprev path{fill:#fff}.glightbox-clean .gprev{position:absolute;top:-100%;left:30px;width:40px;height:50px}.glightbox-clean .gnext{position:absolute;top:-100%;right:30px;width:40px;height:50px}.glightbox-clean .gclose{width:35px;height:35px;top:15px;right:10px;position:absolute}.glightbox-clean .gclose svg{width:18px;height:auto}.glightbox-clean .gclose:hover{opacity:1}.gfadeIn{-webkit-animation:gfadeIn .5s ease;animation:gfadeIn .5s ease}.gfadeOut{-webkit-animation:gfadeOut .5s ease;animation:gfadeOut .5s ease}.gslideOutLeft{-webkit-animation:gslideOutLeft .3s ease;animation:gslideOutLeft .3s ease}.gslideInLeft{-webkit-animation:gslideInLeft .3s ease;animation:gslideInLeft .3s ease}.gslideOutRight{-webkit-animation:gslideOutRight .3s ease;animation:gslideOutRight .3s ease}.gslideInRight{-webkit-animation:gslideInRight .3s ease;animation:gslideInRight .3s ease}.gzoomIn{-webkit-animation:gzoomIn .5s ease;animation:gzoomIn .5s ease}.gzoomOut{-webkit-animation:gzoomOut .5s ease;animation:gzoomOut .5s ease}@-webkit-keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes gfadeIn{from{opacity:0}to{opacity:1}}@keyframes gfadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes gfadeOut{from{opacity:1}to{opacity:0}}@keyframes gfadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@-webkit-keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@-webkit-keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@-webkit-keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@media (min-width:769px){.glightbox-container .ginner-container{width:auto;height:auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.glightbox-container .ginner-container.desc-top .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-top .gslide-image,.glightbox-container .ginner-container.desc-top .gslide-image img{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.glightbox-container .ginner-container.desc-left .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-left .gslide-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.gslide-image img{max-height:97vh;max-width:100%}.gslide-image img.zoomable{cursor:-webkit-zoom-in;cursor:zoom-in}.zoomed .gslide-image img.zoomable{cursor:-webkit-grab;cursor:grab}.gslide-inline{max-height:95vh}.gslide-external{max-height:100vh}.gslide-description.description-left,.gslide-description.description-right{max-width:275px}.glightbox-open{height:auto}.goverlay{background:rgba(0,0,0,.92)}.glightbox-clean .gslide-media{-webkit-box-shadow:1px 2px 9px 0 rgba(0,0,0,.65);box-shadow:1px 2px 9px 0 rgba(0,0,0,.65)}.glightbox-clean .description-left .gdesc-inner,.glightbox-clean .description-right .gdesc-inner{position:absolute;height:100%;overflow-y:auto}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.32)}.glightbox-clean .gclose:hover,.glightbox-clean .gnext:hover,.glightbox-clean .gprev:hover{background-color:rgba(0,0,0,.7)}.glightbox-clean .gprev{top:45%}.glightbox-clean .gnext{top:45%}}@media (min-width:992px){.glightbox-clean .gclose{opacity:.7;right:20px}}@media screen and (max-height:420px){.goverlay{background:#000}} diff --git a/docs/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js b/docs/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js index 997908b59..10976171c 100644 --- a/docs/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js +++ b/docs/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[s]=e[s]||[],l={all:n,evt:null,found:null};return t&&i&&P(n)>0&&o(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return l.found=!0,l.evt=n,!1})),l}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,a=t.once,h=void 0!==a&&a,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){T(n)&&n.call(u,e,this),h&&v.destroy()}return C(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){o(g,(function(t){var i=r(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},o(g,(function(t){var i=r(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function h(e,t){o(t.split(" "),(function(t){return e.classList.add(t)}))}function d(e,t){o(t.split(" "),(function(t){return e.classList.remove(t)}))}function c(e,t){return e.classList.contains(t)}function u(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"===t)return T(i)&&i(),!1;var n=x(),s=t.split(" ");o(s,(function(t){h(e,"g"+t)})),a(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){o(s,(function(e){d(t,"g"+e)})),T(i)&&i()}})}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function f(e){e.style.display="block"}function p(e){e.style.display="none"}function m(e){var t=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function y(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function x(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}function b(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function S(e,t,i){if(I(e))console.error("Inject assets error");else if(T(t)&&(i=t,t=!1),C(t)&&t in window)T(i)&&i();else{var n;if(-1!==e.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+e+'"]'))&&n.length>0)return void(T(i)&&i());var s=document.getElementsByTagName("head")[0],l=s.querySelectorAll('link[rel="stylesheet"]'),o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",l?s.insertBefore(o,l[0]):s.appendChild(o),void(T(i)&&i())}if((n=document.querySelectorAll('script[src="'+e+'"]'))&&n.length>0){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function w(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function T(e){return"function"==typeof e}function C(e){return"string"==typeof e}function k(e){return!(!e||!e.nodeType||1!=e.nodeType)}function E(e){return Array.isArray(e)}function A(e){return e&&e.length&&isFinite(e.length)}function L(t){return"object"===e(t)&&null!=t&&!T(t)&&!E(t)}function I(e){return null==e}function O(e,t){return null!==e&&hasOwnProperty.call(e,t)}function P(e){if(L(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)O(e,i)&&t++;return t}return e.length}function M(e){return!isNaN(parseFloat(e))&&isFinite(e)}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");if(!t.length)return!1;if(1==t.length)return t[0];"string"==typeof e&&(e=parseInt(e));var i=[];o(t,(function(e){i.push(e.getAttribute("data-taborder"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s="1");var l=i.filter((function(e){return e>=parseInt(s)})),r=l.sort()[0];return document.querySelector('.gbtn[data-taborder="'.concat(r,'"]'))}function X(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=a("keydown",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(".gbtn.focused");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==l||"textarea"==l||"button"==l)return}t.preventDefault();var o=document.querySelectorAll(".gbtn[data-taborder]");if(!o||o.length<=0)return;if(!s){var r=z();return void(r&&(r.focus(),h(r,"focused")))}var a=z(s.getAttribute("data-taborder"));d(s,"focused"),a&&(a.focus(),h(a,"focused"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}function Y(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function q(e,t){var i=function(e,t){var i=Y(e)*Y(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var N=function(){function e(i){t(this,e),this.handlers=[],this.el=i}return n(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e=0)console.log("ignore drag for this touched element",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=Y(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=Y(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=q(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function W(e){var t=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=c(e,"gslide-media")?e:e.querySelector(".gslide-media"),s=u(n,".ginner-container"),l=e.querySelector(".gslide-description");i>769&&(n=s),h(n,"greset"),v(n,"translate3d(0, 0, 0)"),a(t,{onElement:n,once:!0,withCallback:function(e,t){d(n,"greset")}}),n.style.opacity="",l&&(l.style.opacity="")}function B(e){if(e.events.hasOwnProperty("touch"))return!1;var t,i,n,s=y(),l=s.width,o=s.height,r=!1,a=null,g=null,f=null,p=!1,m=1,x=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById("glightbox-slider"),Y=document.querySelector(".goverlay"),q=new _(X,{touchStart:function(t){if(r=!0,(c(t.targetTouches[0].target,"ginner-container")||u(t.targetTouches[0].target,".gslide-desc")||"a"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),u(t.targetTouches[0].target,".gslide-inline")&&!c(t.targetTouches[0].target.parentNode,"gslide-inline")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,g=a.querySelector(".gslide-media"),n=a.querySelector(".gslide-inline"),f=null,c(g,"gslide-image")&&(f=g.querySelector("img")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(g=a.querySelector(".ginner-container")),d(Y,"greset"),t.pageX>20&&t.pageXo){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var h,d=s.targetTouches[0].clientX,c=s.targetTouches[0].clientY,u=M-d,m=z-c;if(Math.abs(u)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&f&&(h=1-Math.abs(i)/o,Y.style.opacity=h,e.settings.touchFollowAxis&&(E=0)),I&&(h=1-Math.abs(t)/l,g.style.opacity=h,e.settings.touchFollowAxis&&(A=0)),!f)return v(g,"translate3d(".concat(E,"%, 0, 0)"));v(g,"translate3d(".concat(E,"%, ").concat(A,"%, 0)"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&f))return t<29&&i<25?(h(Y,"greset"),Y.style.opacity=1,W(g)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=x||1},pinch:function(e){if(!f||p)return!1;b=!0,f.scaleX=f.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void f.setAttribute("style","");t>4.5&&(t=4.5),f.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),x=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n="translate3d(".concat(t,"px, ").concat(i,"px, 0)");x&&(n+=" scale3d(".concat(x,", ").concat(x,", 1)")),v(f,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return W(g);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return W(g);e.prevSlide()}}}});e.events.touch=q}var H=function(){function e(i,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=i,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener("mouseup",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener("mousemove",(function(e){return s.drag(e)}),!1),this.img.addEventListener("click",(function(e){return s.slide.classList.contains("dragging-nav")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}return n(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:"setTranslate",value:function(e,t,i){e.style.transform="translate3d("+t+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),V=function(){function e(){var i=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener("mousedown",(function(e){return i.dragStart(e)}),!1),this.el.addEventListener("mouseup",(function(e){return i.dragEnd(e)}),!1),this.el.addEventListener("mousemove",(function(e){return i.drag(e)}),!1)}return n(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||u(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&u(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=u(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""}),100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==n&&this.instance.prevSlide(),void("left"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?"all .2s ease":"",e.style.transform="translate3d(".concat(t,"px, ").concat(i,"px, 0)")}}]),e}();function j(e,t,i,n){var s=e.querySelector(".gslide-media"),l=new Image,o="gSlideTitle_"+i,r="gSlideDesc_"+i;l.addEventListener("load",(function(){T(n)&&n()}),!1),l.src=t.href,""!=t.sizes&&""!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt="",I(t.alt)||""===t.alt||(l.alt=t.alt),""!==t.title&&l.setAttribute("aria-labelledby",o),""!==t.description&&l.setAttribute("aria-describedby",r),t.hasOwnProperty("_hasCustomWidth")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty("_hasCustomHeight")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function F(e,t,i,n){var s=this,l=e.querySelector(".ginner-container"),o="gvideo"+i,r=e.querySelector(".gslide-media"),a=this.getAllPlayers();h(l,"gvideo-container"),r.insertBefore(m('
'),r.firstChild);var d=e.querySelector(".gvideo-wrapper");S(this.settings.plyr.css,"Plyr");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,S(this.settings.plyr.js,"Plyr",(function(){if(!u&&c.match(/vimeo\.com\/([0-9]*)/)&&(u="vimeo"),!u&&(c.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||c.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||c.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))&&(u="youtube"),"local"===u||!u){u="local";var l='")}var r=g||m('
'));h(d,"".concat(u,"-video gvideo")),d.appendChild(r),d.setAttribute("data-id",o),d.setAttribute("data-index",i);var v=O(s.settings.plyr,"config")?s.settings.plyr.config:{},f=new Plyr("#"+o,v);f.on("ready",(function(e){a[o]=e.detail.plyr,T(n)&&n()})),b((function(){return e.querySelector("iframe")&&"true"==e.querySelector("iframe").dataset.ready}),(function(){s.resize(e)})),f.on("enterfullscreen",R),f.on("exitfullscreen",R)}))}function R(e){var t=u(e.target,".gslide-media");"enterfullscreen"===e.type&&h(t,"fullscreen"),"exitfullscreen"===e.type&&d(t,"fullscreen")}function G(e,t,i,n){var s,l=this,o=e.querySelector(".gslide-media"),r=!(!O(t,"href")||!t.href)&&t.href.split("#").pop().trim(),d=!(!O(t,"content")||!t.content)&&t.content;if(d&&(C(d)&&(s=m('
'.concat(d,"
"))),k(d))){"none"==d.style.display&&(d.style.display="block");var c=document.createElement("div");c.className="ginlined-content",c.appendChild(d),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,h(g,"ginlined-content"),s=g}if(!s)return console.error("Unable to append inline slide content",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events["inlineclose"+r]=a("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),l.close()}}),T(n)&&n()}function Z(e,t,i,n){var s=e.querySelector(".gslide-media"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement("iframe");return l.className="vimeo-video gvideo",l.src=t,l.style.width="100%",l.style.height="100%",i&&l.setAttribute("allow",i),l.onload=function(){l.onload=null,h(l,"node-ready"),T(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.defaults={href:"",sizes:"",srcset:"",title:"",type:"",videoProvider:"",description:"",alt:"",descPosition:"bottom",effect:"",width:"",height:"",content:!1,zoomable:!0,draggable:!0},L(i)&&(this.defaults=l(this.defaults,i))}return n(e,[{key:"sourceType",value:function(e){var t=e;if(null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/))return"image";if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))return"video";if(e.match(/vimeo\.com\/([0-9]*)/))return"video";if(null!==e.match(/\.(mp4|ogg|webm|mov)/))return"video";if(null!==e.match(/\.(mp3|wav|wma|aac|ogg)/))return"audio";if(e.indexOf("#")>-1&&""!==t.split("#").pop().trim())return"inline";return e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var i=this,n=l({descPosition:t.descPosition},this.defaults);if(L(e)&&!k(e)){O(e,"type")||(O(e,"content")&&e.content?e.type="inline":O(e,"href")&&(e.type=this.sourceType(e.href)));var s=l(n,e);return this.setSize(s,t),s}var r="",a=e.getAttribute("data-glightbox"),h=e.nodeName.toLowerCase();if("a"===h&&(r=e.href),"img"===h&&(r=e.src,n.alt=e.alt),n.href=r,o(n,(function(s,l){O(t,l)&&"width"!==l&&(n[l]=t[l]);var o=e.dataset[l];I(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type="inline"),!n.type&&r&&(n.type=this.sourceType(r)),I(a)){if(!n.title&&"a"==h){var d=e.title;I(d)||""===d||(n.title=d)}if(!n.title&&"img"==h){var c=e.alt;I(c)||""===c||(n.title=c)}}else{var u=[];o(n,(function(e,t){u.push(";\\s?"+t)})),u=u.join("\\s?:|"),""!==a.trim()&&o(n,(function(e,t){var s=a,l=new RegExp("s?"+t+"s?:s?(.*?)("+u+"s?:|$)"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\s*$/,"");n[t]=i.sanitizeValue(r)}}))}if(n.description&&"."===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(".glightbox-desc");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:"setSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=O(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=O(e,"height")&&""!==e.height?this.checkSize(e.height):s,i&&"image"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:"checkSize",value:function(e){return M(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(i,n,s){t(this,e),this.element=i,this.instance=n,this.index=s}return n(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(t,"loaded"))return!1;var n=this.instance.settings,s=this.slideConfig,l=w();T(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(".gslide-media"),d=t.querySelector(".gslide-title"),u=t.querySelector(".gslide-desc"),g=t.querySelector(".gdesc-inner"),v=i,f="gSlideTitle_"+this.index,p="gSlideDesc_"+this.index;if(T(n.afterSlideLoad)&&(v=function(){T(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),""==s.title&&""==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(d&&""!==s.title?(d.id=f,d.innerHTML=s.title):d.parentNode.removeChild(d),u&&""!==s.description?(u.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),u.innerHTML=s.smallDescription,this.descriptionEvents(u,s)):u.innerHTML=s.description):u.parentNode.removeChild(u),h(a.parentNode,"desc-".concat(r)),h(g.parentNode,"description-".concat(r))),h(a,"gslide-".concat(o)),h(t,"loaded"),"video"!==o){if("external"!==o)return"inline"===o?(G.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new V({dragEl:t.querySelector(".gslide-inline"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==o?T(v)&&v():j(t,s,this.index,(function(){var i=t.querySelector("img");s.draggable&&new V({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(h(i,"zoomable"),new H(i,t,(function(){e.instance.resize()}))),T(v)&&v()})));Z.apply(this,[t,s,this.index,v])}else F.apply(this.instance,[t,s,this.index,v])}},{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... '+i+""):o}},{key:"descriptionEvents",value:function(e,t){var i=this,n=e.querySelector(".desc-more");if(!n)return!1;a("click",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=u(n,".gslide-desc");if(!l)return!1;l.innerHTML=t.description,h(s,"gdesc-open");var o=a("click",{onElement:[s,u(l,".gslide-description")],withCallback:function(e,n){"a"!==e.target.nodeName.toLowerCase()&&(d(s,"gdesc-open"),h(s,"gdesc-closed"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){d(s,"gdesc-closed")}),400),o.destroy())}})}})}},{key:"create",value:function(){return m(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){k(this.element)||this.element.hasOwnProperty("draggable")||(this.element.draggable=this.instance.settings.draggable);var e=new U(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),J=w(),K=null!==w()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,Q=document.getElementsByTagName("html")[0],ee={selector:".glightbox",elements:null,skin:"clean",theme:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:"https://cdn.plyr.io/3.6.12/plyr.css",js:"https://cdn.plyr.io/3.6.12/plyr.js",config:{ratio:"16:9",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slideBack:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:'',next:' ',prev:''},slideHTML:'
\n
\n
\n
\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
',lightboxHTML:''},te=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.customOptions=i,this.settings=l(ee,i),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return n(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=a("click",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=M(t)?t:this.settings.startAt;if(k(e)){var n=e.getAttribute("data-gallery");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),I(i)&&(i=this.getElementIndex(e))<0&&(i=0)}M(i)||(i=0),this.build(),g(this.overlay,"none"===this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement("style");o.type="text/css",o.className="gcss-styles",o.innerText=".gscrollbar-fixer {margin-right: ".concat(l,"px}"),document.head.appendChild(o),h(s,"gscrollbar-fixer")}h(s,"glightbox-open"),h(Q,"glightbox-open"),J&&(h(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1===this.elements.length?(h(this.prevButton,"glightbox-button-hidden"),h(this.nextButton,"glightbox-button-hidden")):(d(this.prevButton,"glightbox-button-hidden"),d(this.nextButton,"glightbox-button-hidden")),this.lightboxOpen=!0,this.trigger("open"),T(this.settings.onOpen)&&this.settings.onOpen(),K&&this.settings.touchNavigation&&B(this),this.settings.keyboardNavigation&&X(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(".current");n&&d(n,"current"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(".gslide")[t];if(c(s,"loaded"))this.slideAnimateIn(s,i),p(this.loader);else{f(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger("slide_before_load",o),l.instance.setContent(s,(function(){p(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger("slide_after_load",o)}))}this.slideDescription=s.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&c(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(I(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[e];if(c(i,"loaded"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger("slide_before_load",l),"video"===s||"external"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}),200):n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new $(e,this,t),n=i.getConfig(),s=l({},n),o=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(o);else{var d=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(o,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(".gslide")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger("slide_inserted",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),T(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),T(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var i=this,n=e.querySelector(".gslide-media"),s=e.querySelector(".gslide-description"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(p(s),s.style.display=""),d(e,this.effectsClasses),t)g(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a="none"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),g(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),h(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;d(e,this.effectsClasses),h(e,"prev");var t=this.settings.slideEffect,i="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),T(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),g(e,i,(function(){var t=e.querySelector(".ginner-container"),i=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",i.style.transform="",d(i,"greset"),i.style.opacity="",n&&(n.style.opacity=""),d(e,"prev")}))}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,i=this.getAllPlayers();return!(!O(i,t)||!i[t])&&i[t]}},{key:"stopSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"slidePlayerPause",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"playSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:"slidePlayerPlay",value:function(e){var t;if(!J||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(k(e)){var i=e.querySelector(".gvideo-wrapper");i&&(e=i.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&o(e,(function(e,n){var s=new $(e,t,n),o=s.getConfig(),r=l({},o);r.slideConfig=o,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(o(this.elements,(function(){var e=m(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return o(this.elements,(function(i,n){if(O(i,"node")&&i.node==e)return t=n,!0})),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!I(this.settings.elements)&&E(this.settings.elements)&&this.settings.elements.length&&o(this.settings.elements,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=!1,r.index=n,r.instance=s,r.slideConfig=o,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(o(i,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=i,r.index=n,r.instance=s,r.slideConfig=o,r.gallery=i.getAttribute("data-gallery"),t.push(r)})),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push("g".concat(i.in)),e.push("g".concat(i.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];o(t,(function(e){e.parentNode==document.body&&"#"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute("aria-hidden")&&(i.push(e),e.setAttribute("aria-hidden","true"))}));var n=O(this.settings.svg,"next")?this.settings.svg.next:"",s=O(this.settings.svg,"prev")?this.settings.svg.prev:"",l=O(this.settings.svg,"close")?this.settings.svg.close:"",r=this.settings.lightboxHTML;r=m(r=(r=(r=r.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(r);var d=document.getElementById("glightbox-body");this.modal=d;var g=d.querySelector(".gclose");this.prevButton=d.querySelector(".gprev"),this.nextButton=d.querySelector(".gnext"),this.overlay=d.querySelector(".goverlay"),this.loader=d.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.bodyHiddenChildElms=i,this.events={},h(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&g&&(this.events.close=a("click",{onElement:g,withCallback:function(t,i){t.preventDefault(),e.close()}})),g&&!this.settings.closeButton&&g.parentNode.removeChild(g),this.nextButton&&(this.events.next=a("click",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=a("click",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=a("click",{onElement:d,withCallback:function(t,i){e.preventOutsideClick||c(document.body,"glightbox-mobile")||u(t.target,".ginner-container")||u(t.target,".gbtn")||c(t.target,"gnext")||c(t.target,"gprev")||e.close()}})),o(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(".gslide")[i]})),K&&h(document.body,"glightbox-touch"),this.events.resize=a("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!c(e,"zoomed")){var t=y(),i=e.querySelector(".gvideo-wrapper"),n=e.querySelector(".gslide-image"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?h(document.body,"glightbox-mobile"):d(document.body,"glightbox-mobile"),i||n){var r=!1;if(s&&(c(s,"description-bottom")||c(s,"description-top"))&&!c(s,"gabsolute")&&(r=!0),n)if(l<=768)n.querySelector("img");else if(r){var a=s.offsetHeight,u=n.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(a,"px)")),s.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(i){var g=O(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"";if(!g){var v=i.clientWidth,f=i.clientHeight,p=v/f;g="".concat(v/p,":").concat(f/p)}var m=g.split(":"),x=this.settings.videosWidth,b=this.settings.videosWidth,S=(b=M(x)||-1!==x.indexOf("px")?parseInt(x):-1!==x.indexOf("vw")?l*parseInt(x)/100:-1!==x.indexOf("vh")?o*parseInt(x)/100:-1!==x.indexOf("%")?l*parseInt(x)/100:parseInt(i.clientWidth))/(parseInt(m[0])/parseInt(m[1]));if(S=Math.floor(S),r&&(o-=s.offsetHeight),b>l||S>o||ob){var w=i.offsetWidth,T=i.offsetHeight,C=o/T,k={width:w*C,height:T*C};i.parentNode.setAttribute("style","max-width: ".concat(k.width,"px")),r&&s.setAttribute("style","max-width: ".concat(k.width,"px;"))}else i.parentNode.style.maxWidth="".concat(x),r&&s.setAttribute("style","max-width: ".concat(x,";"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();d(this.nextButton,"disabled"),d(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(h(this.prevButton,"disabled"),h(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||h(this.nextButton,"disabled"):h(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=O(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=O(this.settings,"loop")?this.settings.loop:e,e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&o(this.bodyHiddenChildElms,(function(e){e.removeAttribute("aria-hidden")})),h(this.modal,"glightbox-closing"),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),g(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;d(Q,"glightbox-open"),d(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),T(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:"on",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!T(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];o(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&o(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:"clearAllEvents",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:"version",value:function(){return"3.1.0"}}]),e}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new te(e);return t.init(),t}})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[s]=e[s]||[],l={all:n,evt:null,found:null};return t&&i&&P(n)>0&&o(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return l.found=!0,l.evt=n,!1})),l}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,a=t.once,h=void 0!==a&&a,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){T(n)&&n.call(u,e,this),h&&v.destroy()}return C(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){o(g,(function(t){var i=r(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},o(g,(function(t){var i=r(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function h(e,t){o(t.split(" "),(function(t){return e.classList.add(t)}))}function d(e,t){o(t.split(" "),(function(t){return e.classList.remove(t)}))}function c(e,t){return e.classList.contains(t)}function u(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"===t)return T(i)&&i(),!1;var n=x(),s=t.split(" ");o(s,(function(t){h(e,"g"+t)})),a(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){o(s,(function(e){d(t,"g"+e)})),T(i)&&i()}})}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function f(e){e.style.display="block"}function p(e){e.style.display="none"}function m(e){var t=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function y(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function x(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}function b(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function S(e,t,i){if(I(e))console.error("Inject assets error");else if(T(t)&&(i=t,t=!1),C(t)&&t in window)T(i)&&i();else{var n;if(-1!==e.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+e+'"]'))&&n.length>0)return void(T(i)&&i());var s=document.getElementsByTagName("head")[0],l=s.querySelectorAll('link[rel="stylesheet"]'),o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",l?s.insertBefore(o,l[0]):s.appendChild(o),void(T(i)&&i())}if((n=document.querySelectorAll('script[src="'+e+'"]'))&&n.length>0){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function w(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function T(e){return"function"==typeof e}function C(e){return"string"==typeof e}function k(e){return!(!e||!e.nodeType||1!=e.nodeType)}function E(e){return Array.isArray(e)}function A(e){return e&&e.length&&isFinite(e.length)}function L(t){return"object"===e(t)&&null!=t&&!T(t)&&!E(t)}function I(e){return null==e}function O(e,t){return null!==e&&hasOwnProperty.call(e,t)}function P(e){if(L(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)O(e,i)&&t++;return t}return e.length}function M(e){return!isNaN(parseFloat(e))&&isFinite(e)}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");if(!t.length)return!1;if(1==t.length)return t[0];"string"==typeof e&&(e=parseInt(e));var i=[];o(t,(function(e){i.push(e.getAttribute("data-taborder"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s="1");var l=i.filter((function(e){return e>=parseInt(s)})),r=l.sort()[0];return document.querySelector('.gbtn[data-taborder="'.concat(r,'"]'))}function X(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=a("keydown",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(".gbtn.focused");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==l||"textarea"==l||"button"==l)return}t.preventDefault();var o=document.querySelectorAll(".gbtn[data-taborder]");if(!o||o.length<=0)return;if(!s){var r=z();return void(r&&(r.focus(),h(r,"focused")))}var a=z(s.getAttribute("data-taborder"));d(s,"focused"),a&&(a.focus(),h(a,"focused"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}function Y(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function q(e,t){var i=function(e,t){var i=Y(e)*Y(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var N=function(){function e(i){t(this,e),this.handlers=[],this.el=i}return n(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e=0)console.log("ignore drag for this touched element",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=Y(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=Y(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=q(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function W(e){var t=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=c(e,"gslide-media")?e:e.querySelector(".gslide-media"),s=u(n,".ginner-container"),l=e.querySelector(".gslide-description");i>769&&(n=s),h(n,"greset"),v(n,"translate3d(0, 0, 0)"),a(t,{onElement:n,once:!0,withCallback:function(e,t){d(n,"greset")}}),n.style.opacity="",l&&(l.style.opacity="")}function B(e){if(e.events.hasOwnProperty("touch"))return!1;var t,i,n,s=y(),l=s.width,o=s.height,r=!1,a=null,g=null,f=null,p=!1,m=1,x=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById("glightbox-slider"),Y=document.querySelector(".goverlay"),q=new _(X,{touchStart:function(t){if(r=!0,(c(t.targetTouches[0].target,"ginner-container")||u(t.targetTouches[0].target,".gslide-desc")||"a"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),u(t.targetTouches[0].target,".gslide-inline")&&!c(t.targetTouches[0].target.parentNode,"gslide-inline")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,g=a.querySelector(".gslide-media"),n=a.querySelector(".gslide-inline"),f=null,c(g,"gslide-image")&&(f=g.querySelector("img")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(g=a.querySelector(".ginner-container")),d(Y,"greset"),t.pageX>20&&t.pageXo){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var h,d=s.targetTouches[0].clientX,c=s.targetTouches[0].clientY,u=M-d,m=z-c;if(Math.abs(u)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&f&&(h=1-Math.abs(i)/o,Y.style.opacity=h,e.settings.touchFollowAxis&&(E=0)),I&&(h=1-Math.abs(t)/l,g.style.opacity=h,e.settings.touchFollowAxis&&(A=0)),!f)return v(g,"translate3d(".concat(E,"%, 0, 0)"));v(g,"translate3d(".concat(E,"%, ").concat(A,"%, 0)"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&f))return t<29&&i<25?(h(Y,"greset"),Y.style.opacity=1,W(g)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=x||1},pinch:function(e){if(!f||p)return!1;b=!0,f.scaleX=f.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void f.setAttribute("style","");t>4.5&&(t=4.5),f.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),x=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n="translate3d(".concat(t,"px, ").concat(i,"px, 0)");x&&(n+=" scale3d(".concat(x,", ").concat(x,", 1)")),v(f,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return W(g);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return W(g);e.prevSlide()}}}});e.events.touch=q}var H=function(){function e(i,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=i,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener("mouseup",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener("mousemove",(function(e){return s.drag(e)}),!1),this.img.addEventListener("click",(function(e){return s.slide.classList.contains("dragging-nav")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}return n(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:"setTranslate",value:function(e,t,i){e.style.transform="translate3d("+t+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),V=function(){function e(){var i=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener("mousedown",(function(e){return i.dragStart(e)}),!1),this.el.addEventListener("mouseup",(function(e){return i.dragEnd(e)}),!1),this.el.addEventListener("mousemove",(function(e){return i.drag(e)}),!1)}return n(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||u(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&u(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=u(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""}),100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==n&&this.instance.prevSlide(),void("left"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?"all .2s ease":"",e.style.transform="translate3d(".concat(t,"px, ").concat(i,"px, 0)")}}]),e}();function j(e,t,i,n){var s=e.querySelector(".gslide-media"),l=new Image,o="gSlideTitle_"+i,r="gSlideDesc_"+i;l.addEventListener("load",(function(){T(n)&&n()}),!1),l.src=t.href,""!=t.sizes&&""!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt="",I(t.alt)||""===t.alt||(l.alt=t.alt),""!==t.title&&l.setAttribute("aria-labelledby",o),""!==t.description&&l.setAttribute("aria-describedby",r),t.hasOwnProperty("_hasCustomWidth")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty("_hasCustomHeight")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function F(e,t,i,n){var s=this,l=e.querySelector(".ginner-container"),o="gvideo"+i,r=e.querySelector(".gslide-media"),a=this.getAllPlayers();h(l,"gvideo-container"),r.insertBefore(m('
'),r.firstChild);var d=e.querySelector(".gvideo-wrapper");S(this.settings.plyr.css,"Plyr");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,S(this.settings.plyr.js,"Plyr",(function(){if(!u&&c.match(/vimeo\.com\/([0-9]*)/)&&(u="vimeo"),!u&&(c.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||c.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||c.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))&&(u="youtube"),"local"===u||!u){u="local";var l='")}var r=g||m('
'));h(d,"".concat(u,"-video gvideo")),d.appendChild(r),d.setAttribute("data-id",o),d.setAttribute("data-index",i);var v=O(s.settings.plyr,"config")?s.settings.plyr.config:{},f=new Plyr("#"+o,v);f.on("ready",(function(e){a[o]=e.detail.plyr,T(n)&&n()})),b((function(){return e.querySelector("iframe")&&"true"==e.querySelector("iframe").dataset.ready}),(function(){s.resize(e)})),f.on("enterfullscreen",R),f.on("exitfullscreen",R)}))}function R(e){var t=u(e.target,".gslide-media");"enterfullscreen"===e.type&&h(t,"fullscreen"),"exitfullscreen"===e.type&&d(t,"fullscreen")}function G(e,t,i,n){var s,l=this,o=e.querySelector(".gslide-media"),r=!(!O(t,"href")||!t.href)&&t.href.split("#").pop().trim(),d=!(!O(t,"content")||!t.content)&&t.content;if(d&&(C(d)&&(s=m('
'.concat(d,"
"))),k(d))){"none"==d.style.display&&(d.style.display="block");var c=document.createElement("div");c.className="ginlined-content",c.appendChild(d),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,h(g,"ginlined-content"),s=g}if(!s)return console.error("Unable to append inline slide content",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events["inlineclose"+r]=a("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),l.close()}}),T(n)&&n()}function Z(e,t,i,n){var s=e.querySelector(".gslide-media"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement("iframe");return l.className="vimeo-video gvideo",l.src=t,l.style.width="100%",l.style.height="100%",i&&l.setAttribute("allow",i),l.onload=function(){l.onload=null,h(l,"node-ready"),T(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.defaults={href:"",sizes:"",srcset:"",title:"",type:"",videoProvider:"",description:"",alt:"",descPosition:"bottom",effect:"",width:"",height:"",content:!1,zoomable:!0,draggable:!0},L(i)&&(this.defaults=l(this.defaults,i))}return n(e,[{key:"sourceType",value:function(e){var t=e;if(null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/))return"image";if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))return"video";if(e.match(/vimeo\.com\/([0-9]*)/))return"video";if(null!==e.match(/\.(mp4|ogg|webm|mov)/))return"video";if(null!==e.match(/\.(mp3|wav|wma|aac|ogg)/))return"audio";if(e.indexOf("#")>-1&&""!==t.split("#").pop().trim())return"inline";return e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var i=this,n=l({descPosition:t.descPosition},this.defaults);if(L(e)&&!k(e)){O(e,"type")||(O(e,"content")&&e.content?e.type="inline":O(e,"href")&&(e.type=this.sourceType(e.href)));var s=l(n,e);return this.setSize(s,t),s}var r="",a=e.getAttribute("data-glightbox"),h=e.nodeName.toLowerCase();if("a"===h&&(r=e.href),"img"===h&&(r=e.src,n.alt=e.alt),n.href=r,o(n,(function(s,l){O(t,l)&&"width"!==l&&(n[l]=t[l]);var o=e.dataset[l];I(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type="inline"),!n.type&&r&&(n.type=this.sourceType(r)),I(a)){if(!n.title&&"a"==h){var d=e.title;I(d)||""===d||(n.title=d)}if(!n.title&&"img"==h){var c=e.alt;I(c)||""===c||(n.title=c)}}else{var u=[];o(n,(function(e,t){u.push(";\\s?"+t)})),u=u.join("\\s?:|"),""!==a.trim()&&o(n,(function(e,t){var s=a,l=new RegExp("s?"+t+"s?:s?(.*?)("+u+"s?:|$)"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\s*$/,"");n[t]=i.sanitizeValue(r)}}))}if(n.description&&"."===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(".glightbox-desc");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:"setSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=O(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=O(e,"height")&&""!==e.height?this.checkSize(e.height):s,i&&"image"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:"checkSize",value:function(e){return M(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(i,n,s){t(this,e),this.element=i,this.instance=n,this.index=s}return n(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(t,"loaded"))return!1;var n=this.instance.settings,s=this.slideConfig,l=w();T(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(".gslide-media"),d=t.querySelector(".gslide-title"),u=t.querySelector(".gslide-desc"),g=t.querySelector(".gdesc-inner"),v=i,f="gSlideTitle_"+this.index,p="gSlideDesc_"+this.index;if(T(n.afterSlideLoad)&&(v=function(){T(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),""==s.title&&""==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(d&&""!==s.title?(d.id=f,d.innerHTML=s.title):d.parentNode.removeChild(d),u&&""!==s.description?(u.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),u.innerHTML=s.smallDescription,this.descriptionEvents(u,s)):u.innerHTML=s.description):u.parentNode.removeChild(u),h(a.parentNode,"desc-".concat(r)),h(g.parentNode,"description-".concat(r))),h(a,"gslide-".concat(o)),h(t,"loaded"),"video"!==o){if("external"!==o)return"inline"===o?(G.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new V({dragEl:t.querySelector(".gslide-inline"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==o?T(v)&&v():j(t,s,this.index,(function(){var i=t.querySelector("img");s.draggable&&new V({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(h(i,"zoomable"),new H(i,t,(function(){e.instance.resize()}))),T(v)&&v()})));Z.apply(this,[t,s,this.index,v])}else F.apply(this.instance,[t,s,this.index,v])}},{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... '+i+""):o}},{key:"descriptionEvents",value:function(e,t){var i=this,n=e.querySelector(".desc-more");if(!n)return!1;a("click",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=u(n,".gslide-desc");if(!l)return!1;l.innerHTML=t.description,h(s,"gdesc-open");var o=a("click",{onElement:[s,u(l,".gslide-description")],withCallback:function(e,n){"a"!==e.target.nodeName.toLowerCase()&&(d(s,"gdesc-open"),h(s,"gdesc-closed"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){d(s,"gdesc-closed")}),400),o.destroy())}})}})}},{key:"create",value:function(){return m(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){k(this.element)||this.element.hasOwnProperty("draggable")||(this.element.draggable=this.instance.settings.draggable);var e=new U(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),J=w(),K=null!==w()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,Q=document.getElementsByTagName("html")[0],ee={selector:".glightbox",elements:null,skin:"clean",theme:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:"https://cdn.plyr.io/3.6.12/plyr.css",js:"https://cdn.plyr.io/3.6.12/plyr.js",config:{ratio:"16:9",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slideBack:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:'',next:' ',prev:''},slideHTML:'
\n
\n
\n
\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
',lightboxHTML:''},te=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.customOptions=i,this.settings=l(ee,i),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return n(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=a("click",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=M(t)?t:this.settings.startAt;if(k(e)){var n=e.getAttribute("data-gallery");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),I(i)&&(i=this.getElementIndex(e))<0&&(i=0)}M(i)||(i=0),this.build(),g(this.overlay,"none"===this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement("style");o.type="text/css",o.className="gcss-styles",o.innerText=".gscrollbar-fixer {margin-right: ".concat(l,"px}"),document.head.appendChild(o),h(s,"gscrollbar-fixer")}h(s,"glightbox-open"),h(Q,"glightbox-open"),J&&(h(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1===this.elements.length?(h(this.prevButton,"glightbox-button-hidden"),h(this.nextButton,"glightbox-button-hidden")):(d(this.prevButton,"glightbox-button-hidden"),d(this.nextButton,"glightbox-button-hidden")),this.lightboxOpen=!0,this.trigger("open"),T(this.settings.onOpen)&&this.settings.onOpen(),K&&this.settings.touchNavigation&&B(this),this.settings.keyboardNavigation&&X(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(".current");n&&d(n,"current"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(".gslide")[t];if(c(s,"loaded"))this.slideAnimateIn(s,i),p(this.loader);else{f(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger("slide_before_load",o),l.instance.setContent(s,(function(){p(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger("slide_after_load",o)}))}this.slideDescription=s.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&c(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(I(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[e];if(c(i,"loaded"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger("slide_before_load",l),"video"===s||"external"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}),200):n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new $(e,this,t),n=i.getConfig(),s=l({},n),o=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(o);else{var d=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(o,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(".gslide")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger("slide_inserted",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),T(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),T(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var i=this,n=e.querySelector(".gslide-media"),s=e.querySelector(".gslide-description"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(p(s),s.style.display=""),d(e,this.effectsClasses),t)g(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a="none"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),g(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),h(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;d(e,this.effectsClasses),h(e,"prev");var t=this.settings.slideEffect,i="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),T(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),g(e,i,(function(){var t=e.querySelector(".ginner-container"),i=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",i.style.transform="",d(i,"greset"),i.style.opacity="",n&&(n.style.opacity=""),d(e,"prev")}))}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,i=this.getAllPlayers();return!(!O(i,t)||!i[t])&&i[t]}},{key:"stopSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"slidePlayerPause",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"playSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:"slidePlayerPlay",value:function(e){var t;if(!J||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(k(e)){var i=e.querySelector(".gvideo-wrapper");i&&(e=i.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&o(e,(function(e,n){var s=new $(e,t,n),o=s.getConfig(),r=l({},o);r.slideConfig=o,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(o(this.elements,(function(){var e=m(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return o(this.elements,(function(i,n){if(O(i,"node")&&i.node==e)return t=n,!0})),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!I(this.settings.elements)&&E(this.settings.elements)&&this.settings.elements.length&&o(this.settings.elements,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=!1,r.index=n,r.instance=s,r.slideConfig=o,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(o(i,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=i,r.index=n,r.instance=s,r.slideConfig=o,r.gallery=i.getAttribute("data-gallery"),t.push(r)})),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push("g".concat(i.in)),e.push("g".concat(i.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];o(t,(function(e){e.parentNode==document.body&&"#"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute("aria-hidden")&&(i.push(e),e.setAttribute("aria-hidden","true"))}));var n=O(this.settings.svg,"next")?this.settings.svg.next:"",s=O(this.settings.svg,"prev")?this.settings.svg.prev:"",l=O(this.settings.svg,"close")?this.settings.svg.close:"",r=this.settings.lightboxHTML;r=m(r=(r=(r=r.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(r);var d=document.getElementById("glightbox-body");this.modal=d;var g=d.querySelector(".gclose");this.prevButton=d.querySelector(".gprev"),this.nextButton=d.querySelector(".gnext"),this.overlay=d.querySelector(".goverlay"),this.loader=d.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.bodyHiddenChildElms=i,this.events={},h(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&g&&(this.events.close=a("click",{onElement:g,withCallback:function(t,i){t.preventDefault(),e.close()}})),g&&!this.settings.closeButton&&g.parentNode.removeChild(g),this.nextButton&&(this.events.next=a("click",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=a("click",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=a("click",{onElement:d,withCallback:function(t,i){e.preventOutsideClick||c(document.body,"glightbox-mobile")||u(t.target,".ginner-container")||u(t.target,".gbtn")||c(t.target,"gnext")||c(t.target,"gprev")||e.close()}})),o(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(".gslide")[i]})),K&&h(document.body,"glightbox-touch"),this.events.resize=a("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!c(e,"zoomed")){var t=y(),i=e.querySelector(".gvideo-wrapper"),n=e.querySelector(".gslide-image"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?h(document.body,"glightbox-mobile"):d(document.body,"glightbox-mobile"),i||n){var r=!1;if(s&&(c(s,"description-bottom")||c(s,"description-top"))&&!c(s,"gabsolute")&&(r=!0),n)if(l<=768)n.querySelector("img");else if(r){var a=s.offsetHeight,u=n.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(a,"px)")),s.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(i){var g=O(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"";if(!g){var v=i.clientWidth,f=i.clientHeight,p=v/f;g="".concat(v/p,":").concat(f/p)}var m=g.split(":"),x=this.settings.videosWidth,b=this.settings.videosWidth,S=(b=M(x)||-1!==x.indexOf("px")?parseInt(x):-1!==x.indexOf("vw")?l*parseInt(x)/100:-1!==x.indexOf("vh")?o*parseInt(x)/100:-1!==x.indexOf("%")?l*parseInt(x)/100:parseInt(i.clientWidth))/(parseInt(m[0])/parseInt(m[1]));if(S=Math.floor(S),r&&(o-=s.offsetHeight),b>l||S>o||ob){var w=i.offsetWidth,T=i.offsetHeight,C=o/T,k={width:w*C,height:T*C};i.parentNode.setAttribute("style","max-width: ".concat(k.width,"px")),r&&s.setAttribute("style","max-width: ".concat(k.width,"px;"))}else i.parentNode.style.maxWidth="".concat(x),r&&s.setAttribute("style","max-width: ".concat(x,";"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();d(this.nextButton,"disabled"),d(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(h(this.prevButton,"disabled"),h(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||h(this.nextButton,"disabled"):h(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=O(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=O(this.settings,"loop")?this.settings.loop:e,e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&o(this.bodyHiddenChildElms,(function(e){e.removeAttribute("aria-hidden")})),h(this.modal,"glightbox-closing"),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),g(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;d(Q,"glightbox-open"),d(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),T(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:"on",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!T(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];o(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&o(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:"clearAllEvents",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:"version",value:function(){return"3.1.0"}}]),e}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new te(e);return t.init(),t}})); diff --git a/docs/_static/figures/Draw_boundaries.svg b/docs/_static/figures/Draw_boundaries.svg index 4d40b7629..bbd4400b8 100644 --- a/docs/_static/figures/Draw_boundaries.svg +++ b/docs/_static/figures/Draw_boundaries.svg @@ -1,4 +1,4 @@ -
Draw Polygon
Model Boundary
Draw Box
Quick-build
SFINCS Model Domain
(Select /gis-folder)
Upload file
(polygon vector file)
Draw
Model Boundary | Quickbuild
Generate Boundary
Create model with NSI and OSM
Select Source
\ No newline at end of file +
Draw Polygon
Model Boundary
Draw Box
Quick-build
SFINCS Model Domain
(Select /gis-folder)
Upload file
(polygon vector file)
Draw
Model Boundary | Quickbuild
Generate Boundary
Create model with NSI and OSM
Select Source
diff --git a/docs/_static/figures/Exposure.svg b/docs/_static/figures/Exposure.svg index 0ce95a7c3..30d7799f5 100644 --- a/docs/_static/figures/Exposure.svg +++ b/docs/_static/figures/Exposure.svg @@ -1,4 +1,4 @@ -
Model Setup
OSM Settings
optional: Include OSM roads
Damage Currency
(global JRC model in Euro)
Road Settings
Exposure
-
Asset Location
Finished Floor Height
(global JRC model in meters)
Add to model
(Add the exposed assets to your model) 
Start with NSI
Start with Open Street Map
Threshold value
 (NSI in feet, global JRC in meters)
Road Type
\ No newline at end of file +
Model Setup
OSM Settings
optional: Include OSM roads
Damage Currency
(global JRC model in Euro)
Road Settings
Exposure
-
Asset Location
Finished Floor Height
(global JRC model in meters)
Add to model
(Add the exposed assets to your model) 
Start with NSI
Start with Open Street Map
Threshold value
 (NSI in feet, global JRC in meters)
Road Type
diff --git a/docs/_static/figures/Quickbuild.svg b/docs/_static/figures/Quickbuild.svg index 60e64ab27..2c840d774 100644 --- a/docs/_static/figures/Quickbuild.svg +++ b/docs/_static/figures/Quickbuild.svg @@ -1,4 +1,4 @@ -
Draw Polygon
Model Boundary
Draw Box
Quick-build
SFINCS Model Domain
(Select /gis-folder)
Upload file
(polygon vector file)
Draw
Model Boundary | Quickbuild
Generate Boundary
Create model with NSI and OSM
Select Source
\ No newline at end of file +
Draw Polygon
Model Boundary
Draw Box
Quick-build
SFINCS Model Domain
(Select /gis-folder)
Upload file
(polygon vector file)
Draw
Model Boundary | Quickbuild
Generate Boundary
Create model with NSI and OSM
Select Source
diff --git a/docs/_static/figures/SVI_additional_attr.svg b/docs/_static/figures/SVI_additional_attr.svg index b33432d4d..9b1384e34 100644 --- a/docs/_static/figures/SVI_additional_attr.svg +++ b/docs/_static/figures/SVI_additional_attr.svg @@ -1,4 +1,4 @@ -
Select Source
(Select the vector file you wish to add)
Add new source
Load
(Load the vector file)
Select attribute
Select Attribute ID
(Select column of vector file you wish to add)
Label
(Free-text. Label for the output data)
Add
(Add the new layer to the overview) 
Overview attributes
Additional Attributes
Display attributes
(Check to display attribute layer)
Add to model
(Add the new layer to your model) 
Repeat for each additional attribute you wish to include
\ No newline at end of file +
Select Source
(Select the vector file you wish to add)
Add new source
Load
(Load the vector file)
Select attribute
Select Attribute ID
(Select column of vector file you wish to add)
Label
(Free-text. Label for the output data)
Add
(Add the new layer to the overview) 
Overview attributes
Additional Attributes
Display attributes
(Check to display attribute layer)
Add to model
(Add the new layer to your model) 
Repeat for each additional attribute you wish to include
diff --git a/docs/_static/figures/finished_floor_height.svg b/docs/_static/figures/finished_floor_height.svg index 3d3b8a672..6659e0453 100644 --- a/docs/_static/figures/finished_floor_height.svg +++ b/docs/_static/figures/finished_floor_height.svg @@ -1,4 +1,4 @@ -
Add new finished floor height source
Exposure
-
Finished Floor Height
Select Source
(vector file)
Load
Attribute ID
optional: settings
(spatial joint settings)
Add to model
\ No newline at end of file +
Add new finished floor height source
Exposure
-
Finished Floor Height
Select Source
(vector file)
Load
Attribute ID
optional: settings
(spatial joint settings)
Add to model
diff --git a/docs/_static/figures/ground_elevation.svg b/docs/_static/figures/ground_elevation.svg index 354b3fb65..9573ee32e 100644 --- a/docs/_static/figures/ground_elevation.svg +++ b/docs/_static/figures/ground_elevation.svg @@ -1,4 +1,4 @@ -
Add new ground elevation source
Exposure
-
Ground Elevation
Select Source
(raster file)
SFINCS
Add to model
Upload source
\ No newline at end of file +
Add new ground elevation source
Exposure
-
Ground Elevation
Select Source
(raster file)
SFINCS
Add to model
Upload source
diff --git a/docs/_static/figures/max_potential_damages.svg b/docs/_static/figures/max_potential_damages.svg index 23f51d04e..5696faecd 100644 --- a/docs/_static/figures/max_potential_damages.svg +++ b/docs/_static/figures/max_potential_damages.svg @@ -1,4 +1,4 @@ -
Add new damage source
Exposure
-
Max. Potential Damages
Select Source
(vector file)
Load
Attribute ID
optional: settings
(spatial joint settings)
Add to model
Damage Type
(structure/content)
\ No newline at end of file +
Add new damage source
Exposure
-
Max. Potential Damages
Select Source
(vector file)
Load
Attribute ID
optional: settings
(spatial joint settings)
Add to model
Damage Type
(structure/content)
diff --git a/docs/_static/figures/vulnerability.svg b/docs/_static/figures/vulnerability.svg index 8f06adbc5..04b9d844d 100644 --- a/docs/_static/figures/vulnerability.svg +++ b/docs/_static/figures/vulnerability.svg @@ -1,4 +1,4 @@ -
Vulnera-
bility
Vulnerability
Add to model
optional NSI: Specify different damage curve
Exposure categories to (re-) assign
(default curves to re-assign another curve)
Damage functions to cho%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22endArrow%3Dclassic%3Bhtml%3D1%3Brounded%3D0%3BentryX%3D0.5%3BentryY%3D0%3BentryDx%3D0%3BentryDy%3D0%3B%22%20edge%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%2250%22%20height%3D%2250%22%20relative%3D%221%22%20as%3D%22geometry%22%3E%3CmxPoint%20x%3D%22420%22%20y%3D%22120%22%20as%3D%22sourcePoint%22%2F%3E%3CmxPoint%20x%3D%22420%22%20y%3D%22140%22%20as%3D%22targetPoint%22%2F%3E%3C%2FmxGeometry%3E%3C%2FmxCell%3E%3CmxCell%20id%3D%223%22%20value%3D%22Exposure%20categories%20to%20(re-)%20assign%22%20style%3D%22rounded%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23f5f5f5%3BfontColor%3D%23333333%3BstrokeColor%3D%23666666%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22290%22%20y%3D%22140%22%20width%3D%22270%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Eose from
(new curve to assign to asset other than default)
Ok
(Re-assigned curves saved to model)
optional NSI
optional NSI
optional NSI
\ No newline at end of file +
Vulnera-
bility
Vulnerability
Add to model
optional NSI: Specify different damage curve
Exposure categories to (re-) assign
(default curves to re-assign another curve)
Damage functions to cho%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22endArrow%3Dclassic%3Bhtml%3D1%3Brounded%3D0%3BentryX%3D0.5%3BentryY%3D0%3BentryDx%3D0%3BentryDy%3D0%3B%22%20edge%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%2250%22%20height%3D%2250%22%20relative%3D%221%22%20as%3D%22geometry%22%3E%3CmxPoint%20x%3D%22420%22%20y%3D%22120%22%20as%3D%22sourcePoint%22%2F%3E%3CmxPoint%20x%3D%22420%22%20y%3D%22140%22%20as%3D%22targetPoint%22%2F%3E%3C%2FmxGeometry%3E%3C%2FmxCell%3E%3CmxCell%20id%3D%223%22%20value%3D%22Exposure%20categories%20to%20(re-)%20assign%22%20style%3D%22rounded%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23f5f5f5%3BfontColor%3D%23333333%3BstrokeColor%3D%23666666%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22290%22%20y%3D%22140%22%20width%3D%22270%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Eose from
(new curve to assign to asset other than default)
Ok
(Re-assigned curves saved to model)
optional NSI
optional NSI
optional NSI
diff --git a/docs/_static/images/GUI_Tabs.drawio.svg b/docs/_static/images/GUI_Tabs.drawio.svg index dcbe25bf8..d08beffd7 100644 --- a/docs/_static/images/GUI_Tabs.drawio.svg +++ b/docs/_static/images/GUI_Tabs.drawio.svg @@ -1,4 +1,4 @@ -
Site tab
Site tab
Events
Events
General site information. Display only. No user input required.
General site information. Display only. No user input required.
At least one event must be entered
At least one event must be entered
Projections
Projections
At least one projection must be entered
At least one projection must be entered
Measures
Measures
Strategies
Strategies
At least one strategy must be entered
At least one strategy must be entered
Optional entry, the user can also design a strategy of 'no measures'
Optional entry, the user can also design a strategy of 'no measures'
Scenarios
Scenarios
Scenarios are defined and run from this tab
Scenarios are defined and run from this tab
Output
Output
Compare - map
Compare - map
At least one scenario must be run to use this tab
At least one scenario must be run to use this tab
At least two scenarios must be run to use this tab
At least two scenarios must be run to use this tab
Compare - table
Compare - table
Benefits
Benefits
At least two scenarios must be run to use this tab
At least two scenarios must be run to use this tab
Two current and two future risk scenarios are required to use this tab
Two current and two future risk scenarios are required to use this tab
Text is not SVG - cannot display
\ No newline at end of file +
Site tab
Site tab
Events
Events
General site information. Display only. No user input required.
General site information. Display only. No user input required.
At least one event must be entered
At least one event must be entered
Projections
Projections
At least one projection must be entered
At least one projection must be entered
Measures
Measures
Strategies
Strategies
At least one strategy must be entered
At least one strategy must be entered
Optional entry, the user can also design a strategy of 'no measures'
Optional entry, the user can also design a strategy of 'no measures'
Scenarios
Scenarios
Scenarios are defined and run from this tab
Scenarios are defined and run from this tab
Output
Output
Compare - map
Compare - map
At least one scenario must be run to use this tab
At least one scenario must be run to use this tab
At least two scenarios must be run to use this tab
At least two scenarios must be run to use this tab
Compare - table
Compare - table
Benefits
Benefits
At least two scenarios must be run to use this tab
At least two scenarios must be run to use this tab
Two current and two future risk scenarios are required to use this tab
Two current and two future risk scenarios are required to use this tab
Text is not SVG - cannot display
diff --git a/docs/_static/images/readerGuidance.svg b/docs/_static/images/readerGuidance.svg index e24c8c257..eae745c55 100644 --- a/docs/_static/images/readerGuidance.svg +++ b/docs/_static/images/readerGuidance.svg @@ -1 +1 @@ -Required Technical SkillIntended ReaderSectionSetup GuideInstallation GuideUser GuideUpdating FloodAdaptDemonstration of FloodAdaptPreparing a probabilistic event setFloodAdapt builderFloodAdapt userFloodAdapt userFloodAdapt builder or advanced userEveryoneStatistics background \ No newline at end of file +Required Technical SkillIntended ReaderSectionSetup GuideInstallation GuideUser GuideUpdating FloodAdaptDemonstration of FloodAdaptPreparing a probabilistic event setFloodAdapt builderFloodAdapt userFloodAdapt userFloodAdapt builder or advanced userEveryoneStatistics background diff --git a/docs/_static/theme-light copy.scss b/docs/_static/theme-light copy.scss index af63cc448..70d5c1585 100644 --- a/docs/_static/theme-light copy.scss +++ b/docs/_static/theme-light copy.scss @@ -97,7 +97,7 @@ $navbar-hl: $links ; margin-top: -50px !important; margin-left: -50px; background-color: #2980b9; - height: 100px; + height: 100px; } // Search window @@ -124,7 +124,7 @@ $navbar-hl: $links ; color: #2980b9; font-weight: bold; font-size: 16px; - margin:15px; + margin:15px; } .sidebar-item-text.sidebar-link.active{ @@ -148,9 +148,9 @@ $navbar-hl: $links ; color: black; font-size: 15px; font-weight: normal; -} +} -// Style 2nd level selection +// Style 2nd level selection .collapse.list-unstyled.sidebar-section a:hover{ background-color:rgb(192, 192, 192); width:100%; @@ -166,13 +166,13 @@ $navbar-hl: $links ; width:100%; padding: 5px; margin-left: -20px; -} +} .sidebar-item{ position: relative; padding-right: -50px } -// Style content +// Style content .content { @@ -188,4 +188,4 @@ $navbar-hl: $links ; } //.sidebar-menu-container{ -// } \ No newline at end of file +// } diff --git a/docs/_static/theme-light.scss b/docs/_static/theme-light.scss index 5d3b24955..265f025e9 100644 --- a/docs/_static/theme-light.scss +++ b/docs/_static/theme-light.scss @@ -41,8 +41,8 @@ $navbar-hl: $links ; } .navbar-logo{ - width: 50px ; - height: 60px ; + width: 50px ; + height: 60px ; } // Sidebar @@ -57,14 +57,14 @@ $navbar-hl: $links ; font-size: 15px; font-weight: 200 !important; } - -// Style 2nd level selection + +// Style 2nd level selection .collapse.list-unstyled.sidebar-section.depth2 .sidebar-item .sidebar-item-container { font-size: 13px; font-weight: 200 !important; } -// Style 3rd level selection +// Style 3rd level selection .collapse.list-unstyled.sidebar-section.depth3 .sidebar-item .sidebar-item-container { font-size: 11px; font-weight: 200 !important; @@ -80,7 +80,7 @@ $navbar-hl: $links ; font-weight: bold; // background-color:rgb(226, 228, 238); // height: 220% -} +} .sidebar-menu-container{ margin-right: 0px; @@ -160,7 +160,7 @@ $navbar-hl: $links ; .collapse.list-unstyled.sidebar-section.depth2 .sidebar-item .sidebar-item-container { height: 25px } -// Style content +// Style content .content { margin-left: 100px; @@ -174,4 +174,4 @@ $navbar-hl: $links ; } //.sidebar-menu-container{ -// } \ No newline at end of file +// } diff --git a/docs/index.qmd b/docs/index.qmd index e20c22ede..e23ee43ca 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -4,52 +4,51 @@ filters: - lightbox lightbox: auto --- -Welcome to the FloodAdapt documentation! +Welcome to the FloodAdapt documentation! -In this introduction, you will find an [overview of FloodAdapt](#overview), information on its [intended uses](#intended-uses-of-floodadapt), and [reader guidance](#reader-guidance) explaining the information you will find in this documentation. +In this introduction, you will find an [overview of FloodAdapt](#overview), information on its [intended uses](#intended-uses-of-floodadapt), and [reader guidance](#reader-guidance) explaining the information you will find in this documentation. ## Overview FloodAdapt is a flood adaptation decision-support tool, which aims to advance and accelerate flooding-related adaptation planning. It integrates rapid, physics-based compound flood modeling and detailed impact modeling into a user-friendly system, ensuring accessibility for end-users, regardless of their technical backgrounds. This enables users to define and evaluate meaningful "what-if" scenarios, which can be combinations of weather events, climate or socio-economic future conditions, and adaptation strategies. FloodAdapt rapidly generates high-quality flood and impact maps, equity-focused aggregations, and informative metrics, providing valuable support for planning and facilitating genuine stakeholder engagement. Beyond its usefulness for end-users, FloodAdapt acts as a vital bridge between scientific advancements and practical needs, enhancing the adoption and impact of adaptation research and development. -{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 - title='Introduction video to FloodAdapt' +{{< video https://www.youtube.com/watch?v=VYd-G7yE0o4 + title='Introduction video to FloodAdapt' >}} -FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” +FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?” -Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. +Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures. They are able to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. They can also test out adaptation options, like sea walls, levees, pumps, urban green infrastructure, home elevations, buyouts and floodproofing. -The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model [SFINCS](https://github.com/Deltares/SFINCS){.external link-external-newwindow=true} that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed open-source flood impact assessment tool [Delft-FIAT](https://github.com/Deltares/Delft-FIAT){.external link-external-newwindow=true}. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. +The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model [SFINCS](https://github.com/Deltares/SFINCS){.external link-external-newwindow=true} that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed open-source flood impact assessment tool [Delft-FIAT](https://github.com/Deltares/Delft-FIAT){.external link-external-newwindow=true}. It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes. When a user specifies a what-if scenario, the backend of FloodAdapt automatically makes changes to the SFINCS and Delft-FIAT models to represent the user choices, the way an expert modeller would. It then simulates the scenario and returns flood and impact maps, scenario comparison visualizations, summary metrics, and an infographic to highlighting flooding or impacts of particular concern to a community. In this way, FloodAdapt allows end-users to unleash the power of advanced models without requiring the technical background, or the laborious pre- and post-processing of models that is usually required for this type of analysis. ![Schematic showing the design concepts behind the FloodAdapt software](../_static/images/floodadapt.png){#fig-logo} ## Intended Uses of FloodAdapt -FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. +FloodAdapt was developed to support adaptation and resilience planning, to provide community understanding of the flooding and impacts resulting from different scenarios of interest, to understand the urgency of actions in different areas, to prioritize investments, and to assess the effectiveness and longevity of different adaptation options. FloodAdapt is a powerful and physics-based system that can provide realistic flood and impact responses for user-defined scenarios. This is important because accuracy builds community trust in the tool. The underlying models and data in FloodAdapt can be continuously improved by the local or regional agencies who are operating it. The accuracy of the model results will depend on the accuracy of the input data. FloodAdapt can also help illuminate which data are missing or need improvement and should be collected when resources allow. -FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. +FloodAdapt is not intended for use in the detailed engineering design of adaptation measures, particularly hydraulic ones. Once FloodAdapt has helped the community identify strategies and priority areas for improvements, the specific design requirements for these strategies should be done using more comprehensive modeling tools available. These may need to include detailed drainage infrastructure systems, groundwater, or other components not currently built into FloodAdapt. ## Reader Guidance -FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. +FloodAdapt is intended for end-users who have some technical background, but do not need to be subject-matter experts in flood and impact modeling. Set-up of FloodAdapt and developing a set of events and probabilities for risk assessment require additional capabilities. @fig-readerGuidance provides a reading guide for this documentation. It shows the intended reader and the relative technical skills required for the different sections in this documentation. -The [User Guide](/4_user_guide/index.qmd) is for users of FloodAdapt. It provides information on how to get started with FloodAdapt, and describes all the FloodAdapt functionalities. +The [User Guide](/4_user_guide/index.qmd) is for users of FloodAdapt. It provides information on how to get started with FloodAdapt, and describes all the FloodAdapt functionalities. -The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. +The [Setup Guide](/3_setup_guide/index.qmd) is intended for those who will "build" or configure FloodAdapt for a new site and set of end-users. ::: {.callout-tip} ## Setup Guide - special topic: Probabilistic event sets for risk analysis -The Setup guide includes guidance on [preparing a probabilistic event set](/3_setup_guide/risk_analysis.qmd) for risk analysis - this part of the setup requires a background in statistics and probability. +The Setup guide includes guidance on [preparing a probabilistic event set](/3_setup_guide/risk_analysis.qmd) for risk analysis - this part of the setup requires a background in statistics and probability. ::: - The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. + The section on [Updating FloodAdapt](/5_update_model/index.qmd) describes the steps involved in updating the database of FloodAdapt. This would be done whenever new or improved data becomes available. -The [Demonstration of FloodAdapt](/6_demo/index.qmd) illustrates use cases that can help the reader understand how FloodAdapt can support adaptation and resilience planning. +The [Demonstration of FloodAdapt](/6_demo/index.qmd) illustrates use cases that can help the reader understand how FloodAdapt can support adaptation and resilience planning. ![Guidance to this documentation, showing the different sections, the intended reader, and an indicator of the relative technical skill required to make use of the section](../_static/images/readerGuidance.png){#fig-readerGuidance} - diff --git a/flood_adapt/api/source/benefits.rst b/flood_adapt/api/source/benefits.rst index f7bf77eca..75cab8d2c 100644 --- a/flood_adapt/api/source/benefits.rst +++ b/flood_adapt/api/source/benefits.rst @@ -4,4 +4,4 @@ Benefits API module .. automodule:: benefits :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/events.rst b/flood_adapt/api/source/events.rst index f69f85c42..68ef940b2 100644 --- a/flood_adapt/api/source/events.rst +++ b/flood_adapt/api/source/events.rst @@ -4,4 +4,4 @@ Events API module .. automodule:: events :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/measures.rst b/flood_adapt/api/source/measures.rst index d465b271c..8a9601077 100644 --- a/flood_adapt/api/source/measures.rst +++ b/flood_adapt/api/source/measures.rst @@ -4,4 +4,4 @@ Measures API module .. automodule:: measures :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/output.rst b/flood_adapt/api/source/output.rst index f3eea1852..68d01c1ec 100644 --- a/flood_adapt/api/source/output.rst +++ b/flood_adapt/api/source/output.rst @@ -4,4 +4,4 @@ Output API module .. automodule:: output :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/projections.rst b/flood_adapt/api/source/projections.rst index 9bbf74f00..79ec3ee1d 100644 --- a/flood_adapt/api/source/projections.rst +++ b/flood_adapt/api/source/projections.rst @@ -4,4 +4,4 @@ Projections API module .. automodule:: projections :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/scenarios.rst b/flood_adapt/api/source/scenarios.rst index a389184db..3026d675f 100644 --- a/flood_adapt/api/source/scenarios.rst +++ b/flood_adapt/api/source/scenarios.rst @@ -4,4 +4,4 @@ Scenarios API module .. automodule:: scenarios :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/startup.rst b/flood_adapt/api/source/startup.rst index e2538ab1a..b810e7f60 100644 --- a/flood_adapt/api/source/startup.rst +++ b/flood_adapt/api/source/startup.rst @@ -4,4 +4,4 @@ Startup API module .. automodule:: startup :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/api/source/strategies.rst b/flood_adapt/api/source/strategies.rst index 414a938f2..5cb02ccf9 100644 --- a/flood_adapt/api/source/strategies.rst +++ b/flood_adapt/api/source/strategies.rst @@ -4,4 +4,4 @@ Strategies API module .. automodule:: strategies :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/flood_adapt/dbs_classes/dbs_static.py b/flood_adapt/dbs_classes/dbs_static.py index 908fbc548..37e983917 100644 --- a/flood_adapt/dbs_classes/dbs_static.py +++ b/flood_adapt/dbs_classes/dbs_static.py @@ -30,7 +30,6 @@ def wrapper(self, *args: Tuple[Any], **kwargs: dict[str, Any]) -> Any: class DbsStatic: - _cached_data: dict[str, Any] = {} _database: IDatabase = None diff --git a/flood_adapt/dbs_controller.py b/flood_adapt/dbs_controller.py index 167191e6c..9b2828ddb 100644 --- a/flood_adapt/dbs_controller.py +++ b/flood_adapt/dbs_controller.py @@ -385,9 +385,7 @@ def plot_wl(self, event: IEvent, input_wl_df: pd.DataFrame = None) -> str: def plot_rainfall( self, event: IEvent, input_rainfall_df: pd.DataFrame = None - ) -> ( - str - ): # I think we need a separate function for the different timeseries when we also want to plot multiple rivers + ) -> str: # I think we need a separate function for the different timeseries when we also want to plot multiple rivers if ( event["rainfall"]["source"] == "shape" or event["rainfall"]["source"] == "timeseries" @@ -467,9 +465,7 @@ def plot_rainfall( def plot_river( self, event: IEvent, input_river_df: list[pd.DataFrame] - ) -> ( - str - ): # I think we need a separate function for the different timeseries when we also want to plot multiple rivers + ) -> str: # I think we need a separate function for the different timeseries when we also want to plot multiple rivers if any(df.empty for df in input_river_df) and any( river["source"] == "timeseries" for river in event["river"] ): @@ -538,9 +534,7 @@ def plot_river( def plot_wind( self, event: IEvent, input_wind_df: pd.DataFrame = None - ) -> ( - str - ): # I think we need a separate function for the different timeseries when we also want to plot multiple rivers + ) -> str: # I think we need a separate function for the different timeseries when we also want to plot multiple rivers if event["wind"]["source"] == "timeseries": df = input_wind_df @@ -914,9 +908,7 @@ def has_run_hazard(self, scenario_name: str) -> None: path_new = self.scenarios.get_database_path( get_input_path=False ).joinpath(scenario.attrs.name, "Flooding") - if ( - scn.direct_impacts.hazard.has_run_check() - ): # only copy results if the hazard model has actually finished and skip simulation folders + if scn.direct_impacts.hazard.has_run_check(): # only copy results if the hazard model has actually finished and skip simulation folders shutil.copytree( path_0, path_new, diff --git a/flood_adapt/integrator/sfincs_adapter.py b/flood_adapt/integrator/sfincs_adapter.py index c67bdd86d..cc62b116a 100644 --- a/flood_adapt/integrator/sfincs_adapter.py +++ b/flood_adapt/integrator/sfincs_adapter.py @@ -35,7 +35,6 @@ class SfincsAdapter: - def __init__(self, site: Site, model_root: Optional[str] = None): """Load overland sfincs model based on a root directory. diff --git a/flood_adapt/object_model/benefit.py b/flood_adapt/object_model/benefit.py index 0143ea0c2..258c333b3 100644 --- a/flood_adapt/object_model/benefit.py +++ b/flood_adapt/object_model/benefit.py @@ -104,9 +104,9 @@ def check_scenarios(self) -> pd.DataFrame: scenarios_calc[scenario]["event"] = self.attrs.event_set if "current" in scenario: - scenarios_calc[scenario][ - "projection" - ] = self.attrs.current_situation.projection + scenarios_calc[scenario]["projection"] = ( + self.attrs.current_situation.projection + ) elif "future" in scenario: scenarios_calc[scenario]["projection"] = self.attrs.projection diff --git a/pyproject.toml b/pyproject.toml index 84099fcb4..5e16fba8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,10 +51,9 @@ dynamic = [ dev = [ "pytest", "pytest-cov", - "black == 24.1.1", - "pre-commit == 3.7.1", - "ruff == 0.4.8", - "typos == 1.22.7", + "pre-commit == 3.8.0", + "ruff == 0.5.5", + "typos == 1.23.6", ] build = [ "build", @@ -121,6 +120,7 @@ ignore = [ "E501", "E741", + "NPY201" ] fixable = [ "I", @@ -130,12 +130,6 @@ fixable = [ [tool.ruff.lint.pydocstyle] convention = "numpy" -[tool.black] -line-length = 88 -target-version = [ - "py311", -] - [tool.pyright] reportDeprecated = true diff --git a/tests/test_integrator/test_fiat_adapter.py b/tests/test_integrator/test_fiat_adapter.py index d8c1ae959..483eab121 100644 --- a/tests/test_integrator/test_fiat_adapter.py +++ b/tests/test_integrator/test_fiat_adapter.py @@ -69,9 +69,7 @@ def test_all_measures(self, run_scenario_all_measures): inds0 = exposure_template["Primary Object Type"] != "road" exp0 = exposure_template.loc[inds0, "Max Potential Damage: Structure"] eg = test_scenario.direct_impacts.socio_economic_change.attrs.economic_growth - pg = ( - test_scenario.direct_impacts.socio_economic_change.attrs.population_growth_existing - ) + pg = test_scenario.direct_impacts.socio_economic_change.attrs.population_growth_existing assert all( val1 == val0 * (eg / 100 + 1) * (pg / 100 + 1) if (val1 != 0) else True for val0, val1 in zip(exp0, exp1) diff --git a/tests/test_integrator/test_hazard_run.py b/tests/test_integrator/test_hazard_run.py index b3992b3a2..a30e44f42 100644 --- a/tests/test_integrator/test_hazard_run.py +++ b/tests/test_integrator/test_hazard_run.py @@ -429,16 +429,16 @@ def test_multiple_rivers(test_db, test_scenarios): # Overwrite river data of Event test_scenario.direct_impacts.hazard.event.attrs.river[0].source = "constant" test_scenario.direct_impacts.hazard.event.attrs.river[1].source = "shape" - test_scenario.direct_impacts.hazard.event.attrs.river[0].constant_discharge = ( - UnitfulDischarge(value=2000.0, units="cfs") - ) + test_scenario.direct_impacts.hazard.event.attrs.river[ + 0 + ].constant_discharge = UnitfulDischarge(value=2000.0, units="cfs") test_scenario.direct_impacts.hazard.event.attrs.river[1].shape_type = "gaussian" - test_scenario.direct_impacts.hazard.event.attrs.river[1].base_discharge = ( - UnitfulDischarge(value=1000.0, units="cfs") - ) - test_scenario.direct_impacts.hazard.event.attrs.river[1].shape_peak = ( - UnitfulDischarge(value=2500.0, units="cfs") - ) + test_scenario.direct_impacts.hazard.event.attrs.river[ + 1 + ].base_discharge = UnitfulDischarge(value=1000.0, units="cfs") + test_scenario.direct_impacts.hazard.event.attrs.river[ + 1 + ].shape_peak = UnitfulDischarge(value=2500.0, units="cfs") test_scenario.direct_impacts.hazard.event.attrs.river[1].shape_duration = 8 test_scenario.direct_impacts.hazard.event.attrs.river[1].shape_peak_time = 0 @@ -457,9 +457,9 @@ def test_multiple_rivers(test_db, test_scenarios): test_scenario.direct_impacts.hazard.site.attrs.river[1].name = name test_scenario.direct_impacts.hazard.site.attrs.river[1].x_coordinate = x test_scenario.direct_impacts.hazard.site.attrs.river[1].y_coordinate = y - test_scenario.direct_impacts.hazard.site.attrs.river[1].mean_discharge = ( - UnitfulDischarge(value=mean_discharge, units="cfs") - ) + test_scenario.direct_impacts.hazard.site.attrs.river[ + 1 + ].mean_discharge = UnitfulDischarge(value=mean_discharge, units="cfs") test_scenario.direct_impacts.hazard.site.attrs.river[1].description = description # Change name of reference model @@ -495,9 +495,7 @@ def test_multiple_rivers(test_db, test_scenarios): np.mean(dis[1].values), 2 ) == test_scenario.direct_impacts.hazard.event.attrs.river[ 0 - ].constant_discharge.convert( - "m3/s" - ) + ].constant_discharge.convert("m3/s") assert np.max( dis[2].values ) == test_scenario.direct_impacts.hazard.event.attrs.river[1].shape_peak.convert(