diff --git a/.editorconfig b/.editorconfig index e2a52739c..5bdd356dd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ root = true -[*.{mss,sql,yml}] +[*] charset = utf-8 indent_size = 2 indent_style = space diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..6842ebec4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: hiddewie +buy_me_a_coffee: hiddewie diff --git a/.github/workflows/nightly-update.yml b/.github/workflows/nightly-update.yml new file mode 100644 index 000000000..ba5eab342 --- /dev/null +++ b/.github/workflows/nightly-update.yml @@ -0,0 +1,165 @@ +name: Nightly update + +on: + workflow_dispatch: ~ + schedule: + # Run daily at 23:47 or 00:47 Europe/Amsterdam + - cron: '47 22 * * *' + +jobs: + update-data: + name: Update data + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pull OSM data + run: | + docker pull ghcr.io/${{ github.repository_owner }}/openrailwaymap-data:latest + docker tag ghcr.io/${{ github.repository_owner }}/openrailwaymap-data:latest openrailwaymap-data + + - name: Copy OSM data + run: | + docker compose create data + docker compose cp data:/data/data.osm.pbf data/filtered/data.osm.pbf + docker compose rm data + + - name: Build containers + uses: docker/bake-action@v6 + with: + load: true + targets: db,import + set: | + db.cache-from=type=gha,scope=db-${{ runner.arch }} + import.cache-from=type=gha,scope=import-${{ runner.arch }} + + - name: Update OSM data + run: | + docker compose run --no-deps import update + + - name: Push data + run: | + docker compose build --no-cache data + docker tag openrailwaymap-data ghcr.io/${{ github.repository_owner }}/openrailwaymap-data:latest + docker push ghcr.io/${{ github.repository_owner }}/openrailwaymap-data:latest + + - name: Start database + run: | + docker compose up --wait db + + - name: Import data + env: + OSM2PGSQL_NUMPROC: '8' + run: | + docker compose run --no-deps import import + rm -f data/filtered/data.osm.pbf + + - name: Create database image + run: | + docker compose stop db + DB_CONTAINER_ID="$(docker compose ps --all --format json | jq -r 'select(.Service == "db") | .ID')" + docker commit "$DB_CONTAINER_ID" ghcr.io/${{ github.repository_owner }}/openrailwaymap-import-db:latest + + - name: Push database image + run: | + docker push ghcr.io/${{ github.repository_owner }}/openrailwaymap-import-db:latest + + build-martin: + name: Build tiles container + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build containers + uses: docker/bake-action@v6 + with: + push: true + targets: martin + set: | + martin.cache-from=type=gha,scope=martin-${{ runner.arch }} + martin.tags=ghcr.io/${{ github.repository_owner }}/openrailwaymap-martin:latest + + build-proxy: + name: Build proxy container + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Date + id: get-date + shell: bash + run: | + echo "date=$(/bin/date -u "+1.%Y%m%d-%Y-%m-%d")" >> $GITHUB_OUTPUT + + - name: Build containers + uses: docker/bake-action@v6 + with: + push: true + targets: proxy + set: | + proxy.cache-from=type=gha,scope=proxy-${{ runner.arch }} + proxy.args.PRESET_VERSION=${{ steps.get-date.outputs.date }} + proxy.tags=ghcr.io/${{ github.repository_owner }}/openrailwaymap-proxy:latest + + build-api: + name: Build API container + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build containers + uses: docker/bake-action@v6 + with: + push: true + targets: api + set: | + api.cache-from=type=gha,scope=api-${{ runner.arch }} + api.tags=ghcr.io/${{ github.repository_owner }}/openrailwaymap-api:latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..2ed0daf65 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,144 @@ +name: Test + +on: + workflow_dispatch: ~ + push: + branches: + - master + pull_request: ~ + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'master' }} + +jobs: + test: + name: Build and test + + strategy: + matrix: + runs-on: + - ubuntu-24.04 + - ubuntu-24.04-arm + + runs-on: ${{ matrix.runs-on }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Date + id: get-date + shell: bash + run: | + echo "date=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT + + - name: Cache data + uses: actions/cache@v4 + id: cache-data + with: + path: | + data/berlin.osm.pbf + data/filtered/berlin.osm.pbf + key: data-${{ steps.get-date.outputs.date }}-berlin + enableCrossOsArchive: true + + - name: Download Berlin + if: ${{ steps.cache-data.outputs.cache-hit != 'true' }} + run: | + curl --location --fail --output data/berlin.osm.pbf https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf + + - name: Build containers + uses: docker/bake-action@v6 + with: + load: true + targets: db,import,import-test,api,martin,proxy + set: | + db.cache-from=type=gha,scope=db-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('db.cache-to=type=gha,mode=max,scope=db-{0}', runner.arch) || '' }} + import.cache-from=type=gha,scope=import-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('import.cache-to=type=gha,mode=max,scope=import-{0}', runner.arch) || '' }} + import-test.cache-from=type=gha,scope=import-test-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('import-test.cache-to=type=gha,mode=max,scope=import-test-{0}', runner.arch) || '' }} + api.cache-from=type=gha,scope=api-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('api.cache-to=type=gha,mode=max,scope=api-{0}', runner.arch) || '' }} + martin.cache-from=type=gha,scope=martin-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('martin.cache-to=type=gha,mode=max,scope=martin-{0}', runner.arch) || '' }} + proxy.cache-from=type=gha,scope=proxy-${{ runner.arch }} + ${{ github.ref_name == 'master' && format('proxy.cache-to=type=gha,mode=max,scope=proxy-{0}', runner.arch) || '' }} + + - name: Start database + run: | + docker compose up --wait db + + - name: Run import tests + run: | + docker compose run --rm import-test + + - name: Import data + env: + OSM2PGSQL_DATAFILE: berlin.osm.pbf + run: | + docker compose run --rm --no-deps import import + + - name: Start API + run: | + docker compose up --wait --no-deps api + + - name: Run API tests + run: | + docker compose up --no-deps api-test + + - name: Start tile server + run: | + docker compose up --detach --no-deps martin + + - name: Start proxy + run: | + docker compose up --wait --no-deps proxy + + - name: Run proxy tests + run: | + docker compose run --no-deps proxy-test + + - name: Download preset + if: always() + run: | + curl -sSf -o preset.zip http://localhost:8000/preset.zip + + - name: Store preset + uses: actions/upload-artifact@v4 + if: always() + with: + name: ${{ runner.arch }}-presets + path: preset.zip + if-no-files-found: warn + + - name: Run UI tests + uses: cypress-io/github-action@v6 + with: + working-directory: proxy/test/ui + browser: ${{ runner.arch == 'X64' && 'chrome' || 'firefox' }} + + - name: Store screenshots + uses: actions/upload-artifact@v4 + if: always() + with: + name: ${{ runner.arch }}-screenshots + path: proxy/test/ui/cypress/screenshots + if-no-files-found: warn + + - name: Print logs + if: always() + run: | + docker compose logs diff --git a/.gitignore b/.gitignore index e80294ccb..9e1c14448 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.swp data/ +db/postgres-data standard.xml maxspeed.xml signals.xml @@ -11,3 +12,10 @@ tmp .kosmtik-config.yml .env *.osm.pbf +.idea +compose.override.yaml +localhost.pem +localhost-key.pem +node_modules +taginfo.json +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..c52a1d38f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,273 @@ +# Contributing + +Contributions to the OpenRailwayMap are appreciated! + +For a number of specific types of contributions, there are detailed instructions below. In other cases, feel free to open an issue or pull request! + +Use the instructions in [the local development setup documentation](SETUP.md) to run the project locally. This can help to get a visual feedback on your changes. + +## I want to visualize a new train protection system on the map + +Edit the file [`features/train_protection.yaml`](https://github.com/hiddewie/OpenRailwayMap-vector/edit/master/features/train_protection.yaml). + +The file contains a list of train protection systems, each with a code, a legend and a color. + +At the top of the file, add an entry for the legend, For example: +```yaml +train_protections: + - { train_protection: 'new', legend: 'Description about this new train protection system', color: '#abc123' } +``` + +In the body of the file, add a new entry at a certain place in the list. The `rank` should match the ordering of the entries. The value of `train_protection` should match the value in the legend entries. For example: +```yaml +features: + - train_protection: new + tags: + - { tag: 'railway:new', value: 'yes' } +``` + +Open a pull request where you provide details about the new train protection system. Ensure the pull request contains references to documentation and places on the map where the train protection system exists. + +## I want to visualize a new railway signal + +Railway signals are present on three layers. The features are defined in a YAML file [`features/signals_railway_signals.yaml`](https://github.com/hiddewie/OpenRailwayMap-vector/edit/master/features/signals_railway_signals.yaml). + +The file contains a list of signal tags, a list of signal types and all known signal features. + +In the body of the file, add a new entry for the new railway signal. The signals are grouped by country. Every signal has a description, a set of tags and an icon. The icon can optionally have a `match` clause to match tag values to render the feature differently based on the matched tag value. + +For example, to match railway signals with tags `railway:signal:shunting=AT-V2:verschubhalttafel` and `railway:signal:shunting:form=sign` with icon `at/verschubhalttafel`: +```yaml +features: + - description: Verschubhalttafel + country: AT + icon: [ default: 'at/verschubhalttafel' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubhalttafel' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } +``` + +A more complicated example matches a tag to show a different icon and legend for different values of the same feature. Matching is always performed from top to bottom. For example the signal `railway:signal:train_protection=BE:PRA` has a different icon for each of the signal positions: `railway:signal:position` can be `left`, `overhead` or `right` (the default value). Every variant can have its own description which will be used in the legend: +```yaml +features: + - description: train protection block markers + country: BE + icon: + - match: 'railway:signal:position' + cases: + - exact: 'left' + value: 'be/PRA-arrow-right' + description: 'left' + - exact: 'overhead' + value: 'be/PRA-arrow-down' + description: 'overhead' + default: 'be/PRA-arrow-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:PRA' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } +``` + +The type of the matched tag matters. You can find the type of every tag at the top of the file. Any tag without a type is a string tag, so matching is always performed on the full tag value. + +Matching a tag with a `boolean` type (`yes`/`no`) does not need to match a value. For example `railway:signal:main_repeated:magnet` is a boolean tag: +```yaml +features: + - description: Signalnachahmer + country: AT + icon: + - match: 'railway:signal:main_repeated:magnet' + cases: + - { value: 'at/signalnachahmer-magnet', description: '1000Hz magnet' } + default: 'at/signalnachahmer' + tags: + - { tag: 'railway:signal:main_repeated', value: 'AT-V2:signalnachahmer' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } +``` + +Matching a tag with an `array` type (`;`-separated values) can happen in multiple ways: +- `exact` match: the given match value must equal at least one of the tag values +- `regex` match: the given match value must match with the at least one of the tag values +- `any` match: at least one element in the given match array must be in the tag values +- `all` match: all elements in the given match array must be in the tag values + +Matching an `exact` and `any` value. For example a node with `railway:signal:distant:states=AT-V2:hauptsignal_frei_mit_60;AT-V2:hauptsignal_frei_mit_40` will match the first case, and a node with `railway:signal:distant:states=AT-V2:hauptsignal_frei_mit_20;AT-V2:hauptsignal_frei` will match the second case: +```yaml +features: +- description: distant (light) + country: AT + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'AT-V2:hauptsignal_frei_mit_60', value: 'at/vorsignal-frei-mit-60', description: '60 km/h' } + - { any: ['AT-V2:hauptsignal_frei_mit_40', 'AT-V2:hauptsignal_frei_mit_20'], value: 'at/vorsignal-frei-mit-40', description: '20/40 km/h' } + - { exact: 'AT-V2:hauptsignal_frei', value: 'at/vorsignal-frei', description: 'clear' } + default: 'at/vorsignal-vorsicht' + tags: + - { tag: 'railway:signal:distant', value: 'AT-V2:vorsignal' } + - { tag: 'railway:signal:distant:form', value: 'light' } +``` + +Matching with `exact` and `all`. For example a node with `railway:signal:main:states=PL-PKP:sr1;PL-PKP:sr2` will match the second case: +```yaml +features: + - description: Semafor kształtowy + country: PL + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'PL-PKP:sr3', value: 'pl/sr3' } + - { all: ['PL-PKP:sr1', 'PL-PKP:sr2'], value: 'pl/sr2' } + default: 'pl/sr1' + tags: + - { tag: 'railway:signal:main', value: 'PL-PKP:sr' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } +``` + +Matching an array (speed limit) tag with `regex`. The match result is substituted into the icon. For array `regex` matches, the longest, and then the highest result is taken. For example a speed limit signal matches speed limits that have a valid icon, based on the `railway:signal:speed_limit:speed` or `railway:signal:speed_limit_distant:speed` tag. The speed tags have an array type. For example a signal with `railway:signal:speed_limit_distant:speed=60;80;off` would match the regular expression, and the resulting icon would be `at/geschwindigkeitsvoranzeiger-light-{80}`: +```yaml +features: + - description: Geschwindigkeitsvoranzeiger (light) + country: AT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-4]|[2-9])0$', value: 'at/geschwindigkeitsvoranzeiger-light-{}', example: 'at/geschwindigkeitsvoranzeiger-light-{140}' } + default: 'at/geschwindigkeitsvoranzeiger-empty-light' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:geschwindigkeitsvoranzeiger' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } +``` +Note that the icon files will also contain the `{` and `}` characters, the filename will be for example `at/geschwindigkeitsvoranzeiger-light-{80}.svg`. + +Signal features can use multiple icons by specifying more than one item for `icon`: +```yaml +features: + - description: 1ª categoria (1 light) + country: IT + icon: + - match: 'railway:signal:main:shape' + cases: + - { exact: 'square', value: 'it/main-s-1v', description: 'quadro' } + default: 'it/main-1v' + - match: 'railway:signal:main:states' + cases: + - { any: [ '(Y)', 'Y' ], value: "it/1v-Y" } + - { exact: 'G', value: "it/1v-G" } + default: "it/1v-R" + - match: 'railway:signal:main:substitute_signal' + cases: + - { all: ['IT:AVA', 'IT:AVV'], value: 'it/AVV-AVA', description: 'Avvio & Avanzamento' } + - { exact: 'IT:AVA', value: 'it/AVA', description: 'Avanzamento' } + - { exact: 'IT:AVV', value: 'it/AVV', description: 'Avvio' } + position: 'bottom' + tags: + - { tag: 'railway:signal:main', value: 'IT:1V' } + - { tag: 'railway:signal:main:form', value: 'light' } +``` +In this example the shape, the states, and the substitute signal each define an (optional) icon to use. The icons are composed together, starting with the first one and layering every following icon on top. The (optional) `default` icon is used if the `match` cases do not match. + +The icons can have an `position` with a value of `center` (default), `bottom`, `top`, `left` or `right` to determine where the icon will be placed in relation to the previously placed icons. When an icon is placed below, above, left or right of the other icons, the icon is centered along the other axis. + +For complex signals, an additional property `exampleIcon` can be specified to designate an icon used for the feature as a whole, for example in the JOSM preset or TagInfo. +```yaml +features: + - description: Geschwindigkeitsvoranzeiger + country: AT + icon: + - match: ... + - match: ... + - match: ... + exampleIcon: 'at/geschwindigkeitsvoranzeiger-example' + tags: + - ... + - ... +``` + +If the railway signal uses tags that are not in the list at the top of the file, ensure the tag is added there. For example: +```yaml +tags: + # ... + - { tag: 'railway:signal:combined:form', title: 'Combined form' } + # ... +``` +If the tag has a `yes`/`no` value, add `type: boolean`. If the tag has a semicolon (`;`) separated value, add `type: array`. If the value of the tag should be displayed formatted or with a unit, add `format: { template: ... }` where the value is a template like `%.2d Hz` or `%s V` to format the tag value into a string for display in the popup. + +Next, ensure the icon exists in the [symbols directory](https://github.com/hiddewie/OpenRailwayMap-vector/tree/master/symbols). The icon must be an SVG file, minified and of the correct dimensions (most icons are between 10 and 24 pixels wide / high). Icons with an even number of pixels in the width and height give the best visual results. + +The icon must not contain text. Using an SVG tool, convert the text to the shape of the text. In Inkscape, use the menu item *Path* > *Object to Path*. + +The SVG of the icon must be compressed. For example using the `rsvg-convert` tool, execute the command: +```shell +rsvg-convert icon.svg --width 16 --keep-aspect-ratio --format svg > icon-compressed.svg +``` + +Open a pull request where you provide details about the new railway signals. Ensure the pull request contains references to documentation and places on the map where these signals exist. + +## I want to visualize a new track gauge on the map + +*To be documented...* + +## I want to visualize a new loading gauge on the map + +Edit the file [`features/loading_gauge.yaml`](https://github.com/hiddewie/OpenRailwayMap-vector/edit/master/features/loading_gauge.yaml). + +The file contains a list of loading gauges, each with a value (the value of the `loading_gauge` tag), a legend and a color. + +Add a new entry at a certain place in the list. The value is the `loading_gauge` tag value. The `legend` will be used as a description in the legend. For example: +```yaml +loading_gauges: + - { value: 'TSI_GA', legend: 'GA', color: 'blue' } + # ... +``` + +Open a pull request where you provide details about the new loading gauge. Ensure the pull request contains references to documentation and places on the map where the loading gauge exists. + +## I want to visualize a new track class on the map + +Edit the file [`features/track_class.yaml`](https://github.com/hiddewie/OpenRailwayMap-vector/edit/master/features/track_class.yaml). + +The file contains a list of track classes, each with a value (the value of the `railway:track_class` tag) and a color. + +Add a new entry at a certain place in the list. The value is the `railway:track_class` tag value. For example: +```yaml +track_classes: + - { value: 'Z', color: 'blue' } + # ... +``` + +Open a pull request where you provide details about the new track class. Ensure the pull request contains references to documentation and places on the map where the track class exists. + +## I want to add an operator + +Edit the file [`features/operators.yaml`](https://github.com/hiddewie/OpenRailwayMap-vector/edit/master/features/operators.yaml). + +The file contains a list of operators. A single operator can have multiple names, for example when it operates across multiple countries. + +An operator has a color associated with it, used to display the operator on the map. Colors can use the form `#2d00e3`, `rgb(45, 0, 227)` or `hsl(252, 100%, 44.5%)`. Use the [colorpicker.dev](https://colorpicker.dev/#2d00e3) tool to assist in conversion of color formats. + +Add a new entry at a certain place in the list. The value is the `operator` tag value. For example: +```yaml +operators: + - names: + - 'GVB' + - 'Gemeentelijk Vervoerbedrijf' + color: '#0863b5' + + # ... +``` + +Open a pull request where you provide details about the new operator. Ensure the pull request contains references to documentation and places on the map where the operator exists. + +## I want to improve the user interface + +The HTML, Javascript and CSS of the user interface are located in the [proxy](https://github.com/hiddewie/OpenRailwayMap-vector/tree/master/proxy) directory. + +Open a pull request where you provide details about the new train protection system. Make sure the pull request contains screenshots showing the user visible changes. + +## I want to provide translations for a new language + +At this moment the user interface and legend are solely available in English. This might change in the future. + +## I want to support OpenRailwayMap financially + +To support the operational costs of the OpenRailwayMap, financial support can be provided through [*Github Sponsors*](https://github.com/sponsors/hiddewie) or [*Buy Me a Coffee*](https://buymeacoffee.com/hiddewie). diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index fa92b9e96..000000000 --- a/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM debian:12-slim - -# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image -ARG DEBIAN_FRONTEND=noninteractive - -# Style dependencies -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - ca-certificates \ - curl \ - gnupg \ - postgresql-client \ - python3 \ - python3-distutils \ - fonts-hanazono \ - fonts-noto-cjk \ - fonts-noto-hinted \ - fonts-noto-unhinted \ - mapnik-utils \ - nodejs \ - npm \ - fonts-unifont \ - unzip \ - git \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - -# Kosmtik with plugins, forcing prefix to /usr because Ubuntu sets -# npm prefix to /usr/local, which breaks the install -# We install kosmtik not from release channel, but directly from a specific commit on github. -RUN npm set prefix /usr && npm install -g --unsafe-perm "git+https://git@github.com/kosmtik/kosmtik.git" - -WORKDIR /usr/lib/node_modules/kosmtik/ -RUN kosmtik plugins --install kosmtik-overpass-layer \ - --install kosmtik-fetch-remote \ - --install kosmtik-overlay \ - --install kosmtik-open-in-josm \ - --install kosmtik-map-compare \ - --install kosmtik-osm-data-overlay \ - --install kosmtik-mapnik-reference \ - --install kosmtik-geojson-overlay \ - && cp /root/.config/kosmtik.yml /tmp/.kosmtik-config.yml - -# Closing section -RUN mkdir -p /openrailwaymap -WORKDIR /openrailwaymap - -USER 1000 -ENTRYPOINT ["sh", "docker-startup.sh", "kosmtik"] diff --git a/Dockerfile.db b/Dockerfile.db deleted file mode 100644 index 876cfa974..000000000 --- a/Dockerfile.db +++ /dev/null @@ -1,3 +0,0 @@ -FROM postgis/postgis:10-2.5-alpine - -COPY ./setup/tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh diff --git a/Dockerfile.import b/Dockerfile.import deleted file mode 100644 index 6b2297264..000000000 --- a/Dockerfile.import +++ /dev/null @@ -1,26 +0,0 @@ -FROM debian:12-slim - -# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - gnupg \ - osm2pgsql \ - osmium-tool \ - gdal-bin \ - python3-psycopg2 \ - python3-yaml \ - python3-requests \ - unzip \ - postgresql-client \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - -ADD setup/openstreetmap-carto.style setup - -RUN mkdir -p /openrailwaymap -WORKDIR /openrailwaymap - -CMD ["sh", "docker-startup.sh", "import"] diff --git a/Makefile b/Makefile deleted file mode 100644 index ad85f91d0..000000000 --- a/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -CARTO = carto - -mmls = $(shell find -maxdepth 1 -type f -name "*.mml") -xmls = $(mmls:.mml=.xml) -deps = $(xmls:.xml=.d) - -all: $(xmls) - --include $(deps) - -%.xml: %.mml - $(CARTO) $^ > $@ - -%.d: %.mml ./util/get_mml_dependencies.py - ./util/get_mml_dependencies.py $< > $@ diff --git a/README.md b/README.md index 3010f5454..419c9400d 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,79 @@ -# OpenRailwayMap CartoCSS Map Styles +# OpenRailwayMap Vector Map Styles -This is a port of the OpenRailwayMap Infrastructure map style from -MapCSS to CartoCSS to be able to use Mapnik to render maps. +This repository contains the visualization of railway infrastructure, speed limits, train protection, electrification and railway gauges using vector-based tiles and a web-based user interface. -## Differences to the MapCSS Style +Documentation can be found on the [OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/OpenRailwayMap). -There are a couple of smaller and larger differences to the MapCSS style: +## Architecture -* The rendering of station labels is more sophisticated because Osm2pgsql. - Stations are ranked by their importance. The importance is defined by the - number of route relations a station and its platforms and stop position nodes - belong to. Matching from stops and platforms to stations is based on names - and spatial proximity. Stop area relations (`type=public_transport` - + `public_transport=stop_area` are not used). The matching is sensitive to - differences in spelling. -* Icons (radio towers, level crossings) have a higher priority than most labels. -* The map style uses the Noto Sans font. -* Railway lines have a white halo to improve visibility on colourful background maps. +This repository aims to contain all code, configuration and tooling for the OpenRailwayMap. -## Setup Notes +- Data is provided by [OpenStreetMap](https://www.openstreetmap.org/about) and [OpenHistoricalMap](https://www.openhistoricalmap.org/about). +- Data is stored in a [PostgreSQL](https://www.postgresql.org/) database, augmented by [PostGIS](https://postgis.net/) for spatial features. +- Data is imported from the OpenStreetMap data files to PostgreSQL using [Osm2pgsql](https://osm2pgsql.org/). +- Vector tiles are rendered from the database with [Martin](https://martin.maplibre.org/) (part of the [MapLibre initiative](https://maplibre.org/)) in the MBtiles format and converted to PMTiles using [ProtoMaps PMTiles](https://docs.protomaps.com/pmtiles/). +- The user interface uses [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) to visualize the map content. +- The style is specified using the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/). +- [Docker](https://www.docker.com/) is used to package the software and data for local development and deployment. +- Continuous Integration and daily data updates are done using [Github Actions](https://docs.github.com/en/actions). -See [SETUP.md](SETUP.md) for details. +## Changes from the CartoCSS style + +A number of changes have been made from the [upstream `OpenRailwayMap-CartoCSS` project](https://github.com/OpenRailwayMap/OpenRailwayMap-CartoCSS): +- The raster tiles have been replaced with vector tiles. +- MapCSS and Mapnik have been replaced with the MapLibre Style Specification and Martin. +- Database views have been collapsed into single views to minimize data transfer. +- Lua code is used to minimize imported data, while retaining the ability to change the database views for adding new features. +- Visualization of additional signalling has been added. +- Direction of railway signals has been added. +- Fixes have been made for non-functional visualization rules. +- The API runs from a Docker container from static PostgreSQL data optimized for searching. + +Upstream changes will be merged into this project. + +## API + +The API has been adapted from [the OpenRailwayMap API](https://github.com/OpenRailwayMap/OpenRailwayMap-api). The API powers the search in the OpenRailwayMap UI, and provides facility (stations, halts, tram stops, yards, sidings, crossovers, including disused, abandoned, razed, proposed and under construction) searches by name and reference and milestone searches by combination of line number and mileage. The searches are full text, based on PostgreSQL's full text search functionalities. + +The API documentation can be found at https://openrailwaymap.app/api.html. You can also view [the raw OpenAPI specification](proxy/api/openapi.yaml). + +## Mapping presets + +Presets for [JOSM](https://josm.openstreetmap.de/) and [Vespucci](https://vespucci.io/) are generated for mapping assistance. The preset is available for download on https://openrailwaymap.app/preset.zip. The preset is also available directly from the [Tagging Presets register in JOSM Preferences](https://josm.openstreetmap.de/wiki/Help/Preferences/TaggingPresetPreference). [Vespucci](https://vespucci.io/help/en/Presets/) can use the same presets for mobile mapping. + +## Contributing + +Contributions are welcome! + +There are multiple ways to contribute to this project: +- Improving the code and/or tooling. +- Providing more details for visualization on the map, for the infrastructure, speed limit, train protection, electrification or gauge layer. +- Providing icons for visualizing features on the map. +- Providing user interface improvements. +- Providing technical or user documentation. +- Support OpenRailwayMap financially, through [*Github Sponsors*](https://github.com/sponsors/hiddewie) or [*Buy Me a Coffee*](https://buymeacoffee.com/hiddewie). + +View the [contribution documentation](CONTRIBUTING.md) for details. + +## Development + +To run the OpenRailwayMap locally, you can import OpenStreetMap data and run the tile and web server locally. + +View the [setup documentation](SETUP.md) for details. + +## Deployment + +The [deployment documentation](deployment/README.md) describes how the OpenRailwayMap is deployed to https://openrailwaymap.app using [Github Actions](https://docs.github.com/en/actions), Cloudflare and a server running the software. ## License -Copyright (C) 2017–2019 Michael Reichert +Copyright © 2024–2025 Hidde Wieringa + +The [original map style (CartoCSS)](https://github.com/OpenRailwayMap/OpenRailwayMap-CartoCSS/) +is copyright © 2017–2019 Michael Reichert -The [original map style](https://github.com/OpenRailwayMap/OpenRailwayMap/tree/master/styles) -is Copyright (C) 2012 Alexander Matheisen +The [original map style (MapCSS)](https://github.com/OpenRailwayMap/OpenRailwayMap/tree/master/styles) +is Copyright © 2012 Alexander Matheisen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..69801c531 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Send an email to [security@hiddewieringa.nl](mailto:security@hiddewieringa.nl?subject=OpenRailwayMap-vector). diff --git a/SETUP.md b/SETUP.md index 07effba9e..3633e7dd3 100644 --- a/SETUP.md +++ b/SETUP.md @@ -1,203 +1,130 @@ # Setup -This guide mainly covers setup for development purposes. If you set up a tile server, follow the guides at [switch2osm.org](https://switch2osm.org) and adapt the style specific steps by those listed in the overview section of this guide. +## Fetching data -## Building quickly +Download an OpenStreetMap data file, for example from https://download.geofabrik.de/europe.html. Store the file as `data/data.osm.pbf` (you can customize the filename with `OSM2PGSQL_DATAFILE`). -Building the Mapnik XML files does not require access to a PostgreSQL database with OSM data in it. -If you just want to generated the Mapnik XML files and have `carto` in your path, run the following -command (Python 3 and PyYAML are required as build dependencies in addition to Carto): +## Development -```sh -make -``` - -## Overview for Experienced Developers - -If you are experienced with CartoCSS map styles and their setup, this section contains the important information for you. - -This style requires a database imported with Osm2pgsql including slim tables in Web Mercator projection. - -The database name is `gis` (Osm2pgsql default) but you can change this in header of the .mml files. - -We use the same database layout as [OpenStreetMap Carto](https://github.com/gravitystorm/openstreetmap-carto) in order to allow rendering other common map styles from the same database. The Osm2pgsql style file and the Lua tag transforms file are included in the `setup/` subdirectory. - -The ordering of stations for label rendering requires slim tables to access the membership of stop positions, platforms and stations in route relations. Unfortunately, the access to the members field of `planet_osm_rels` is not performant. Therefore, a [materialized view](https://www.postgresql.org/docs/current/rules-materializedviews.html) is created to cache the results of the computation. +Ensure [Docker](https://docs.docker.com/engine/install/) or [Podman](https://podman.io/docs/installation) is installed. In case of Podman, replace `docker` with `podman` in the commands below. -Therefore, the following options are required for Osm2pgsql: `--slim --merc --style setup/openstreetmap-carto.style --tag-transform setup/openstreetmap-carto.lua --hstore` - -After importing OSM data into the database, you have to create a couple of views, install some custom functions and compute the label ranking of stations. Please run the following SQL scripts in the following order: - -```sh -psql -d gis -f sql/osm_carto_views.sql -psql -d gis -f sql/functions.sql -psql -d gis -f sql/get_station_importance.sql +Start the services with: +``` +docker compose up --build --watch db import martin proxy api ``` -If you update your data, you have to refresh the materialized view of the train stations and their importance using `psql -d gis -f sql/update_station_importance.sql`. - - -## Detailed Instructions for Development Setup - -The detailed instructions cover the setup on Linux and might work on OS X. Windows is not supported because Mapnik dropped Windows support in 2018 due to a lack of sufficiently experienced volunteers. - - -### Dependencies - -* PostgreSQL -* PostGIS -* Osm2pgsql -* optional: Osmium Tool -* Carto -* development only: Kosmtik or Nik4 - -Build dependencies required for using the Makefile: - -* Python 3 -* PyYAML - -### Database Setup - -Install PostgreSQL and PostGIS. Your distribution likely provides packages for PostgreSQL and PostGIS. - -Debian-like systems: `sudo apt install postgresql postgis postgresql-client postgresql-10-postgis-2.4` (you might have to adapt the version numbers of PostgreSQL and PostGIS, there is no metapackage) - -Create a database user. PostgreSQL provides a command line programme called *createuser* for that purpose. It has to be called using the permissions of the user running PostgreSQL – that's usually `postgres`. +The command will start the database (service `db`), run the data import (service `import`), start the tile server Martin (service `martin`), start the API (service `api`) and the web server (service `proxy`). The import can take a few minutes depending on the amount of data to be imported. -Debian-like systems: `sudo -u postgres createuser --superuser $USER` +Docker Compose will automatically rebuild and restart the `martin` and `proxy` containers if relevant files are modified. -We granted superuser permissions to our user to avoid usage of sudo for further steps. +The OpenRailwayMap is now available on http://localhost:8000. -Now we can create an empty database: +### Making changes -```sh -createdb -E utf8 -O $USER gis +If changes are made to features, the materialized views in the database have to be refreshed: +```shell +docker compose run --build import refresh ``` -If PostgreSQL asks for a password or other authentication problems occur, you have to ensure that the `peer` authentication method is enabled. It allows you to log into the database as a user having the same username as your system account (i.e. if your are logged into Linux as franz, you will be able to log into PostgreSQL as franz as well). To enable the `peer` method, add the following line to `pg_hba.conf` (location on Debian systems: `/etc/postgresql/$POSTGRES_VERSION/main/pg_hba.conf`). Replace `$USER` by your username. See chapter 20.3 and 20.9 of the [PostgreSQL documentation](https://www.postgresql.org/docs/current/client-authentication.html) for details about client authentication. +### Updating the OSM data +The OSM data file can be updated with: +```shell +docker compose run --build import update ``` -local all $USER peer -``` +This command will request all updates in the region and process them into the OSM data file. -After creating the database called `gis`, you have to enable two extensions: - -```sh -psql -d gis -c "CREATE EXTENSION postgis;" -psql -d gis -c "CREATE EXTENSION hstore;" +After updating the data, run a new import: +```shell +docker compose run --build import import ``` -PostgreSQL will return the string `CREATE EXTENSION` on success. +### JOSM preset -The PostGIS extension provides a geometry data type and spatial indexes, the Hstore extension provides a key value mapping type. +Download the generated JOSM preset on http://localhost:8000/preset.zip. +### Enabling SSL +SSL is supported by generating a trusted certificate, and installing it in the proxy. -### Load OSM Data into the Database +- [Install mkcert](https://github.com/FiloSottile/mkcert?tab=readme-ov-file) +- Install the `mkcert` CA in the system: + ```shell + mkcert -install + ``` +- Restart your browser +- Run `mkcert` to generate certificates for `localhost`: + ```shell + mkcert localhost + ``` +- Create a file `compose.override.yaml` with + ```yaml + services: + proxy: + volumes: + - './localhost.pem:/etc/nginx/ssl/certificate.pem' + - './localhost-key.pem:/etc/nginx/ssl/key.pem' + ``` +- Restart the proxy with: + ```shell + docker compose up --build --watch proxy + ``` -We can now load OSM raw data into the database using Osm2pgsql. This guide will not explain the installation of Osm2pgsql. It is likely available from the package repositories of your Linux distribution or you compile it from source (see the [readme file of Osm2pgsql](https://github.com/OpenStreetMap/osm2pgsql) for details). We do not need a very recent version of Osm2pgsql, therefore installing Osm2pgsql from the package repositories should be fine. +The OpenRailwayMap is available on https://localhost, with SSL enabled and without browser warnings. -Debian-like systems: `sudo apt install osm2pgsql` +You can modify the TLS port 443 to port 8443 [in the Compose configuration](./compose.yaml), if you want the container to start without privileges, for example using Podman. -You now have the choice between the following options (choose option 4 for development setups and option 1 or 2 for production): +## Tests -* Import full planet dump in .osm.pbf format from [planet.openstreetmap.org](https://planet.openstreetmap.org). This will take at least half a day and require a few hundred GB SSD space. It is the easiest option if you want to update your database more often than every day. The database should be located on a SSD if you choose this option. -* Import a filtered planet dump containing railway features only. This still requires downloading the planet dump but you will extract only railway features using Osmium Tool but takes only about 1/20 of disk space and time. -* Import a regional extract from [download.geofabrik.de](https://download.geofabrik.de/) in .osm.pbf format. This is way faster depending on the size of the extract. -* Import a filtered regional extract by downloading a regional extract from [download.geofabrik.de](https://download.geofabrik.de/) in .osm.pbf format and filtering it with Osmium Tool before importing it with Osm2pgsql. +### Import tests -If you choose to filter a planet dump or regional extract, use Osmium Tool and call it as following. Please refer to the [Osmium documentation](https://osmcode.org/osmium-tool/) and its [readme file](https://github.com/osmcode/osmium-tool/blob/master/README.md) for installation and build instructions. +The import tests verify the correctness of the Lua import configuration. -```sh -osmium tags-filter -o filtered.osm.pbf input.osm.pbf nwr/railway nwr/disused:railway nwr/abandoned:railway nwr/razed:railway nwr/construction:railway nwr/proposed:railway n/public_transport=stop_position nwr/public_transport=platform r/route=train r/route=tram r/route=light_rail r/route=subway +Run the tests with: +```shell +docker compose run --rm --build import-test ``` -We are ready to call Osm2pgsql now. - -```sh -osm2pgsql --create --database gis --hstore --slim --merc --style setup/openstreetmap-carto.style --tag-transform setup/openstreetmap-carto.lua --multi-geometry --cache $CACHE_SIZE filtered.osm.pbf -``` +If the process exists successfully, the tests have succeeded. If not, the assertion error will be displayed. -`$CACHE_SIZE` should be sufficiently large. See the [recommendations of the Osm2pgsql developers](https://github.com/OpenStreetMap/osm2pgsql#usage). If you import a full planet dump, you should also add the option `--flat-nodes $PATH_TO_FLAT_NODES_FILE` pointing to a location in your file system on a SSD where a more than 40 GB (to be precise: `8 * max_osm_node_id` Byte) large file to store the locations of all OSM nodes can be placed. For full planet imports and imports of at least half the size of the planet, a flat nodes file is recommended. Otherwise, Osm2pgsql will store node locations in the database which requires more SSD space. +### Tile tests +Tile tests use [*hurl*](https://hurl.dev/docs/installation.html). -### Create Database Views and Pre-calculate Station Label Ranking - -The map style accesses the database through a couple of views. In addition, it requires a few custom functions and a precomputed station label ranking. Please run the following SQL scripts in the described order: - -```sh -psql -d gis -f sql/osm_carto_views.sql -psql -d gis -f sql/functions.sql -psql -d gis -f sql/get_station_importance.sql +Run tests against the API: +```shell +docker compose run --build --no-deps api-test ``` -If you update your database, you have to refresh the materialized view of the train stations periodically. Call `psql -d gis -f sql/update_station_importance.sql` to refresh it. - - -### Install Carto - -This step is required for - -* production setups -* development setups using Nik4 - -The map style is written in CartoCSS which will be transpiled to Mapnik XML using the [Carto](https://github.com/mapbox/carto) tool. You can either install it from the package repositories of your distribution (called `nodejs-carto` or `node-carto`) or – without root permissions – using `npm install carto` in a directory of your choice. +### Proxy tests -You can now transpile the CartoCSS styles into Mapnik XML using: +Proxy tests use [*hurl*](https://hurl.dev/docs/installation.html). -```sh -carto project.mml > standard.xml -carto maxspeed.mml > maxspeed.xml -carto signals.mml > signals.xml +Run tests against the proxy: +```shell +docker compose run --build --no-deps proxy-test ``` -The resulting XML files are read by the Mapnik library – either using tools such as Nik4 or tile server software such as Rendered or Tirex. +## Development -If you use Kosmtik for development, you will not have to call Carto yourself, Kosmtik does this for you, it requires Carto as dependency. - - -### Development Setup only: Install Kosmtik - -Kosmtik is a simple map viewer running locally and rendering tiles live on demand. It comes with a simple web map viewer. You can install it using `npm install kosmtik` in a directory of your choice. - -To start Kosmtik call - -```sh -node_modules/kosmtik/index.js serve path_to_openrailwymap_styles/project.mml -``` +### Code generation -Change the name of the .mml file if you want to work on a style other than the infrastructure style. +The YAML files in the `features` directory are templated into SQL and Lua code. -You can now view the map in your browser at [http://127.0.0.1:6789/](http://127.0.0.1:6789/). If you save changes to the .mml or .mss files, Kosmtik will rebuild the Mapnik XML style and re-render the map tiles. +You can view the generated files: +```shell +docker build --target build-signals --tag build-signals --file import/Dockerfile . \ + && docker run --rm --entrypoint cat build-signals /build/signal_features.sql | less +docker build --target build-operators --tag build-operators --file import/Dockerfile . \ + && docker run --rm --entrypoint cat build-operators /build/operators.sql | less -### Makefile setup +docker build --target build-lua --tag build-lua --file import/Dockerfile . \ + && docker run --rm --entrypoint cat build-lua /build/tags.lua | less -If you want to use the Makefile to build the Mapnik XML style files, additional build dependencies (see above) are required. +docker build --target build-styles --tag build-styles --file proxy.Dockerfile . \ + && docker run --rm --entrypoint ls build-styles -Debian-like systems: `apt install python3 python3-yaml` - - -### Development Setup only: Install Nik4 - -If you get strange exceptions thrown during installing Kosmtik, using Nik4 to render map images on demand is an alternative. Nik4 is a Python programme making use of the Mapnik's Python bindings. You can install Nik4 either from the package repository of your distribution (often called `nik4` or `python-nik4`) or using `pip install nik4`. - -If you choose this path, you have to install Carto as well (see above). - -Your development work flow would be the following: - -* edit the .mml or .mss files -* call `carto $STYLE.mml > $STYLE.xml` -* render map images of the location and zoom you would like to see: `nik4 -c $CENTER_LONGITUDE $CENTER_LATITUDE -z $ZOOM_LEVEL -x 2048 2048 $STYLE.xml output.png` - -## Docker - -Use the Docker setup to get a development environment up and running quickly. - -This setup only requires Docker and Docker Compose to be installed, but and requires no other dependencies. This setup should also work on Windows systems (the containers will run in a virtual machine). - -- Run `docker compose up db` to start the Postgres database. -- Download a file with the OSM data, and name it `data.osm.pbf`. Run `docker compose up import` which will import the data, run the post-import database setup. This step also creates a file `.env` with environment variables that you can use to tune the import. -- Run `docker compose up kosmtik` to start Kosmtik and view the map style. Edit the `command` argument in `docker-compose.yml` in order to render a different style (default `standard.mml`). - -Go to http://127.0.0.1:6789 to view the OpenRailwayMap. Make changes to the OpenRailwayMap style or assets, and Kosmtik will auto-reload the changes. +docker build --target build-styles --tag build-styles --file proxy.Dockerfile . \ + && docker run --rm --entrypoint cat build-styles standard.json | jq . | less +``` diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 000000000..0d7f9b6a0 --- /dev/null +++ b/api/.gitignore @@ -0,0 +1,3 @@ +.*.swp +__pycache__/ +*.pyc diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 000000000..94c3bbe30 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.13-alpine + +RUN apk add --no-cache \ + curl \ + && python3 -m pip install --no-cache-dir --no-color --no-python-version-warning --disable-pip-version-check --break-system-packages \ + fastapi[standard] \ + asyncpg \ + httpx + +WORKDIR /app +COPY openrailwaymap_api openrailwaymap_api +COPY api.py api.py + +HEALTHCHECK CMD ["curl", "--fail", "localhost:5000/api/status"] + +CMD ["ash", "-c", "fastapi run api.py --port \"$PORT\" --host \"$HOST\""] diff --git a/api/api.py b/api/api.py new file mode 100644 index 000000000..496c711df --- /dev/null +++ b/api/api.py @@ -0,0 +1,113 @@ +import contextlib +import os +from typing import Annotated +import sys + +import asyncpg +from fastapi import FastAPI, Query, Response, HTTPException + +import httpx + +from openrailwaymap_api.facility_api import FacilityAPI +from openrailwaymap_api.milestone_api import MilestoneAPI +from openrailwaymap_api.status_api import StatusAPI +from openrailwaymap_api.replication_api import ReplicationAPI +from openrailwaymap_api.wikidata_api import WikidataAPI +from openrailwaymap_api.route_api import RouteAPI + +DEFAULT_HTTP_HEADERS = { + 'User-Agent': f'OpenRailwayMap API (https://openrailwaymap.app), httpx {httpx.__version__}, Python {sys.version}' +} + +@contextlib.asynccontextmanager +async def lifespan(app): + async with asyncpg.create_pool( + user=os.environ['POSTGRES_USER'], + host=os.environ['POSTGRES_HOST'], + database=os.environ['POSTGRES_DB'], + command_timeout=10, + min_size=1, + max_size=20, + ) as pool: + print('Connected to database') + app.state.database = pool + + async with httpx.AsyncClient(timeout=3.0, headers=DEFAULT_HTTP_HEADERS) as http_client: + print('Created HTTP client') + app.state.http_client = http_client + + yield + + app.state.http_client = None + + print('Closed HTTP client') + + app.state.database = None + + print('Disconnected from database') + + +app = FastAPI( + title="OpenRailwayMap API", + lifespan=lifespan, +) + +DEFAULT_FACILITY_LIMIT = 20 +DEFAULT_MILESTONE_LIMIT = 2 +MIN_LIMIT = 1 +MAX_LIMIT = 200 + + +@app.get("/api/status") +async def status(): + api = StatusAPI() + return await api() + + +@app.get("/api/replication_timestamp") +async def replication_timestamp(): + api = ReplicationAPI(app.state.database) + return await api() + + +@app.get("/api/facility") +async def facility( + q: Annotated[str | None, Query()] = None, + name: Annotated[str | None, Query()] = None, + ref: Annotated[str | None, Query()] = None, + uic_ref: Annotated[str | None, Query()] = None, + lang: Annotated[str | None, Query()] = None, + limit: Annotated[int, Query(ge=MIN_LIMIT, le=MAX_LIMIT)] = DEFAULT_FACILITY_LIMIT, +): + api = FacilityAPI(app.state.database) + return await api(q=q, name=name, ref=ref, uic_ref=uic_ref, limit=limit, language=lang) + + +@app.get("/api/milestone") +async def milestone( + ref: Annotated[str, Query()], + position: Annotated[float, Query()], + limit: Annotated[int | None, Query(ge=MIN_LIMIT, le=MAX_LIMIT)] = DEFAULT_MILESTONE_LIMIT, +): + api = MilestoneAPI(app.state.database) + return await api(ref=ref, position=position, limit=limit) + + +@app.get("/api/wikidata/{id}") +async def wikidata( + id: str +): + api = WikidataAPI(app.state.http_client) + return await api(id=id) + + +@app.get("/api/route/{osm_id}") +async def wikidata( + osm_id: int +): + api = RouteAPI(app.state.database) + response = await api(osm_id=osm_id) + if response is None: + raise HTTPException(status_code=404, detail="Route not found") + + return Response(content=response, media_type="application/geo+json") diff --git a/api/openrailwaymap_api/__init__.py b/api/openrailwaymap_api/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/api/openrailwaymap_api/facility_api.py b/api/openrailwaymap_api/facility_api.py new file mode 100644 index 000000000..7451911d7 --- /dev/null +++ b/api/openrailwaymap_api/facility_api.py @@ -0,0 +1,86 @@ +from fastapi import HTTPException +from starlette.status import HTTP_400_BAD_REQUEST, HTTP_422_UNPROCESSABLE_ENTITY + +QUERY_PARAMETERS = ['q', 'name', 'ref', 'uic_ref'] + +class FacilityAPI: + def __init__(self, database): + self.database = database + + def eliminate_duplicates(self, data, limit): + seen_osm_ids = set() + results = [] + for item in data: + osm_ids = tuple(item['osm_ids']) + if osm_ids not in seen_osm_ids: + seen_osm_ids.add(osm_ids) + results.append(item) + + if len(results) == limit: + break + + return results + + async def __call__(self, *, q, name, ref, uic_ref, language, limit): + # Validate search arguments + search_args_count = sum(1 for search_arg in [q, name, ref, uic_ref] if search_arg) + + if search_args_count > 1: + args = ', '.join(QUERY_PARAMETERS) + raise HTTPException( + HTTP_422_UNPROCESSABLE_ENTITY, + {'type': 'multiple_query_args', 'error': 'More than one argument with a search term provided.', 'detail': f'Provide only one of the following query parameters: {args}'} + ) + elif search_args_count == 0: + args = ', '.join(QUERY_PARAMETERS) + raise HTTPException( + HTTP_422_UNPROCESSABLE_ENTITY, + {'type': 'no_query_arg', 'error': 'No argument with a search term provided.', 'detail': f'Provide one of the following query parameters: {args}'} + ) + + if name: + return await self.search_by_name(name, language, limit) + if ref: + return await self.search_by_ref(ref, language, limit) + if uic_ref: + return await self.search_by_uic_ref(uic_ref, language, limit) + if q: + return self.eliminate_duplicates((await self.search_by_name(q, language, limit)) + (await self.search_by_ref(q, language, limit)) + (await self.search_by_uic_ref(q, language, limit)), limit) + + def query_has_no_wildcards(self, q): + if '%' in q or '_' in q: + return False + return True + + async def search_by_name(self, q, language, limit): + if not self.query_has_no_wildcards(q): + raise HTTPException( + HTTP_400_BAD_REQUEST, + {'type': 'wildcard_in_query', 'error': 'Wildcard in query.', 'detail': 'Query contains any of the wildcard characters: %_'} + ) + + sql_query = """ + SELECT * FROM query_facilities_by_name($1, $2, $3) + """ + return await self.query_result(sql_query, (q, language, limit)) + + async def _search_by_ref(self, search_function, ref, language, limit): + sql_query = f""" + SELECT * FROM {search_function}($1, $2, $3) + """ + return await self.query_result(sql_query, (ref, language, limit)) + + async def search_by_ref(self, ref, language, limit): + return await self._search_by_ref("query_facilities_by_ref", ref, language, limit) + + async def search_by_uic_ref(self, ref, language, limit): + return await self._search_by_ref("query_facilities_by_uic_ref", ref, language, limit) + + async def query_result(self, sql_query, parameters): + async with self.database.acquire() as connection: + statement = await connection.prepare(sql_query) + async with connection.transaction(): + data = [] + async for record in statement.cursor(*parameters): + data.append(dict(record)) + return data diff --git a/api/openrailwaymap_api/milestone_api.py b/api/openrailwaymap_api/milestone_api.py new file mode 100644 index 000000000..bfe3dd34a --- /dev/null +++ b/api/openrailwaymap_api/milestone_api.py @@ -0,0 +1,19 @@ +class MilestoneAPI: + def __init__(self, database): + self.database = database + + async def __call__(self, *, ref, position, limit): + return await self.get_milestones(position, ref, limit) + + async def get_milestones(self, position, line_ref, limit): + sql_query = """ + SELECT * FROM query_milestones($1::double precision, $2::text, $3::integer) + """ + + async with self.database.acquire() as connection: + statement = await connection.prepare(sql_query) + async with connection.transaction(): + data = [] + async for record in statement.cursor(position, line_ref, limit): + data.append(dict(record)) + return data diff --git a/api/openrailwaymap_api/replication_api.py b/api/openrailwaymap_api/replication_api.py new file mode 100644 index 000000000..9fcdc63a1 --- /dev/null +++ b/api/openrailwaymap_api/replication_api.py @@ -0,0 +1,15 @@ +class ReplicationAPI: + def __init__(self, database): + self.database = database + + async def __call__(self): + sql_query = """ + select "value" as replication_timestamp from osm2pgsql_properties where property='replication_timestamp' limit 1 + """ + + async with self.database.acquire() as connection: + statement = await connection.prepare(sql_query) + async with connection.transaction(): + async for record in statement.cursor(): + return dict(record) + return None diff --git a/api/openrailwaymap_api/route_api.py b/api/openrailwaymap_api/route_api.py new file mode 100644 index 000000000..f59696a94 --- /dev/null +++ b/api/openrailwaymap_api/route_api.py @@ -0,0 +1,41 @@ +class RouteAPI: + def __init__(self, database): + self.database = database + + async def __call__(self, osm_id): + sql_query = """ + SELECT jsonb_build_object( + 'type', 'Feature', + 'id', osm_id, + 'geometry', ST_AsGeoJSON(ST_Transform(way, 4326))::jsonb, + 'properties', to_jsonb(row) - 'way' + ) as data + FROM ( + SELECT + r.osm_id as osm_id, + ST_LineMerge(st_collect(l.way)) as way, + any_value(r.type) as type, + any_value(r.name) as name, + any_value(r.ref) as ref, + any_value(r.from) as from, + any_value(r.to) as to, + any_value(r.operator) as operator, + any_value(r.brand) as brand, + any_value(r.color) as color + from routes r + join route_line rl + on rl.route_id = r.osm_id + join railway_line l + on rl.line_id = l.osm_id + where r.osm_id = $1::bigint + group by r.osm_id + ) row; + """ + + async with self.database.acquire() as connection: + statement = await connection.prepare(sql_query) + async with connection.transaction(): + async for record in statement.cursor(osm_id): + return record['data'] + + return None diff --git a/api/openrailwaymap_api/status_api.py b/api/openrailwaymap_api/status_api.py new file mode 100644 index 000000000..77fd3ece5 --- /dev/null +++ b/api/openrailwaymap_api/status_api.py @@ -0,0 +1,3 @@ +class StatusAPI: + async def __call__(self): + return 'OK' diff --git a/api/openrailwaymap_api/wikidata_api.py b/api/openrailwaymap_api/wikidata_api.py new file mode 100644 index 000000000..e76895b94 --- /dev/null +++ b/api/openrailwaymap_api/wikidata_api.py @@ -0,0 +1,40 @@ +from fastapi import Response +from fastapi.responses import RedirectResponse +import hashlib + +class WikidataAPI: + def __init__(self, http_client): + self.http_client = http_client + + async def __call__(self, *, id): + url = "https://www.wikidata.org/w/api.php" + params = { + 'action': 'wbgetclaims', + 'property': 'P18', + 'format': 'json', + 'entity': id, + } + response = await self.http_client.get(url, params=params) + if not response: + return Response(content='No response from Wikidata API', status_code=404, media_type='text/plain') + if response.status_code != 200: + return Response(content=f"Response from Wikidata API had status {response.status_code}", status_code=404, media_type='text/plain') + + data = response.json() + if not data: + return Response(content='No response body from Wikidata API', status_code=404, media_type='text/plain') + + if not data['claims'] \ + or not data['claims']['P18'] \ + or not data['claims']['P18'][0] \ + or not data['claims']['P18'][0]['mainsnak'] \ + or not data['claims']['P18'][0]['mainsnak']['datavalue'] \ + or not data['claims']['P18'][0]['mainsnak']['datavalue']['value']: + return Response(content='Image claims (P18) not found in Wikidata response', status_code=404, media_type='text/plain') + + name = data['claims']['P18'][0]['mainsnak']['datavalue']['value'] + sanitized_name = name.replace(' ', '_') + name_hash = hashlib.md5(sanitized_name.encode()).hexdigest() + + resource_url = f"https://upload.wikimedia.org/wikipedia/commons/thumb/{name_hash[0:1]}/{name_hash[0:2]}/{sanitized_name}/330px-{sanitized_name}" + return RedirectResponse(resource_url) diff --git a/api/test/api.hurl b/api/test/api.hurl new file mode 100644 index 000000000..e50180022 --- /dev/null +++ b/api/test/api.hurl @@ -0,0 +1,374 @@ +# Status +GET {{base_url}}/status +HTTP 200 + +# Replication timestamp +GET {{base_url}}/replication_timestamp +HTTP 200 + +# Facility request +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin +HTTP 200 +Content-Type: application/json +[Asserts] +jsonpath "$" count == 20 +jsonpath "$[0].name" == "Berlin Hauptbahnhof (tief)" +jsonpath "$[1].name" == "S+U Hauptbahnhof" +jsonpath "$[2].name" == "Hauptbahnhof" +jsonpath "$[3].name" == "Berlin Hauptbahnhof" +jsonpath "$[4].name" == "Berlin Südkreuz" +jsonpath "$[5].name" == "Südkreuz (Ringbahn)" +jsonpath "$[6].name" == "Südkreuz (Nord-Süd)" +jsonpath "$[7].name" == "Berlin Nordost" +jsonpath "$[8].name" == "Berlin Greifswalder Straße" +jsonpath "$[9].name" == "Berlin-Grünau" +jsonpath "$[10].name" == "Berlin-Spandau" +jsonpath "$[11].name" == "Berlin-Marienfelde Gbf" +jsonpath "$[12].name" == "Spandau" +jsonpath "$[13].name" == "Berlin-Tempelhof" +jsonpath "$[14].name" == "Berlin-Schönholz" +jsonpath "$[15].name" == "Berlin Ostbahnhof" +jsonpath "$[16].name" == "Ostbahnhof" +jsonpath "$[17].name" == "Gesundbrunnen" +jsonpath "$[18].name" == "Berlin Gesundbrunnen" +jsonpath "$[19].name" == "Berlin-Neukölln" + +# Facility request with language +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin Ostbahnhof +lang: en +HTTP 200 +Content-Type: application/json +[Asserts] +jsonpath "$" count == 2 +jsonpath "$[0].name" == "Ostbahnhof" +jsonpath "$[0].localized_name" == "Ostbahnhof" +jsonpath "$[1].name" == "Berlin Ostbahnhof" +jsonpath "$[1].localized_name" == "Berlin Ostbahnhof railway station" + +# Facility request with limit +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin +limit: 5 +HTTP 200 +[Asserts] +jsonpath "$" count == 5 + +# Facility request with larger limit +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin +limit: 25 +HTTP 200 +[Asserts] +jsonpath "$" count == 25 + +# Facility request too large limit +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin +limit: 201 +HTTP 422 +[Asserts] +jsonpath "$.detail[0].msg" == "Input should be less than or equal to 200" + +# Facility request too small limit +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin +limit: 0 +HTTP 422 +[Asserts] +jsonpath "$.detail[0].msg" == "Input should be greater than or equal to 1" + +# Facility request with hyphen +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin-Spandau +HTTP 200 +[Asserts] +jsonpath "$" count == 7 +jsonpath "$[0].name" == "Berlin-Spandau" +jsonpath "$[1].name" == "Spandau" +jsonpath "$[2].name" == "Berlin-Spandau Johannesstift" +jsonpath "$[3].name" == "Berlin-Spandau Gbf" +jsonpath "$[4].name" == "Berlin-Spandau West" +jsonpath "$[5].name" == "Berlin-Spandau Mitte" +jsonpath "$[6].name" == "Berlin-Spandau Ost" + +# Facility request with space +GET {{base_url}}/facility +[QueryStringParams] +name: Berlin Spandau +HTTP 200 +[Asserts] +jsonpath "$" count == 7 +jsonpath "$[0].name" == "Berlin-Spandau" +jsonpath "$[1].name" == "Spandau" +jsonpath "$[2].name" == "Berlin-Spandau Johannesstift" +jsonpath "$[3].name" == "Berlin-Spandau Gbf" +jsonpath "$[4].name" == "Berlin-Spandau West" +jsonpath "$[5].name" == "Berlin-Spandau Mitte" +jsonpath "$[6].name" == "Berlin-Spandau Ost" + +# Facility request for Spandau +GET {{base_url}}/facility +[QueryStringParams] +name: Spandau +HTTP 200 +[Asserts] +jsonpath "$" count == 9 +jsonpath "$[0].name" == "Berlin-Spandau" +jsonpath "$[1].name" == "Spandau" +jsonpath "$[2].name" == "Berlin-Spandau Johannesstift" +jsonpath "$[3].name" == "Berlin-Spandau Gbf" +jsonpath "$[4].name" == "Rathaus Spandau" +jsonpath "$[5].name" == "Altstadt Spandau" +jsonpath "$[6].name" == "Berlin-Spandau West" +jsonpath "$[7].name" == "Berlin-Spandau Mitte" +jsonpath "$[8].name" == "Berlin-Spandau Ost" + +# Facility request with with diacritics +GET {{base_url}}/facility +[QueryStringParams] +name: Karl-Marx-Straße +HTTP 200 +[Asserts] +jsonpath "$" count == 1 +jsonpath "$[0].name" == "Karl-Marx-Straße" + +# Facility search for reference +GET {{base_url}}/facility +[QueryStringParams] +ref: BOKN +HTTP 200 +[Asserts] +jsonpath "$" count == 1 +jsonpath "$[0].name" == "Berlin Ostkreuz (Ringbahn-F)" +jsonpath "$[0].osm_ids" count == 1 +jsonpath "$[0].osm_types" count == 1 +jsonpath "$[0].osm_ids[0]" == 4746086763 +jsonpath "$[0].osm_types[0]" == "N" + +# Facility search for reference +GET {{base_url}}/facility +[QueryStringParams] +ref: BOKN +HTTP 200 +[Asserts] +jsonpath "$" count == 1 +jsonpath "$[0].name" == "Berlin Ostkreuz (Ringbahn-F)" + +# Facility search for UIC reference +GET {{base_url}}/facility +[QueryStringParams] +uic_ref: 8089028 +HTTP 200 +[Asserts] +jsonpath "$" count == 2 +jsonpath "$[0].name" == "Ostkreuz" +jsonpath "$[1].name" == "Ostkreuz (Ringbahn)" + +# Facility search for name, reference or UIC reference +GET {{base_url}}/facility +[QueryStringParams] +q: BOK +HTTP 200 +[Asserts] +jsonpath "$" count == 1 +jsonpath "$[0].name" == "Ostkreuz (Ringbahn)" + +# Facility search for name, reference or UIC reference +GET {{base_url}}/facility +[QueryStringParams] +q: Berlin Ostkreuz +HTTP 200 +[Asserts] +jsonpath "$" count == 5 +jsonpath "$[0].name" == "Ostkreuz" +jsonpath "$[1].name" == "Berlin Ostkreuz (Stadtbahn-F)" +jsonpath "$[2].name" == "Berlin Ostkreuz (Ringbahn-F)" +jsonpath "$[3].name" == "Berlin Ostkreuz (Ostbahn)" +jsonpath "$[4].name" == "Ostkreuz (Ringbahn)" + +# Facility search for name, reference or UIC reference +GET {{base_url}}/facility +[QueryStringParams] +q: 8089028 +HTTP 200 +[Asserts] +jsonpath "$" count == 2 +jsonpath "$[0].name" == "Ostkreuz" +jsonpath "$[1].name" == "Ostkreuz (Ringbahn)" + +# Facility search for name, reference or UIC reference for grouped station +GET {{base_url}}/facility +[QueryStringParams] +q: Landsberger Allee +HTTP 200 +[Asserts] +jsonpath "$" count == 3 +jsonpath "$[0].name" == "Landsberger Allee/Petersburger Straße" +jsonpath "$[0].feature" == "tram_stop" +jsonpath "$[0].state" == "present" +jsonpath "$[0].rank" == 34 +jsonpath "$[0].osm_ids" count == 4 +jsonpath "$[0].osm_ids[0]" == 244129991 +jsonpath "$[0].osm_ids[1]" == 271777826 +jsonpath "$[0].osm_ids[2]" == 1679221136 +jsonpath "$[0].osm_ids[3]" == 1787945074 +jsonpath "$[0].osm_types" count == 4 +jsonpath "$[2].railway_ref" == "BLST" +jsonpath "$[2].station" == "light_rail" +jsonpath "$[2].uic_ref" == "8089020" +jsonpath "$[2].operator[0]" == "DB InfraGO AG" +jsonpath "$[2].network[0]" == "Verkehrsverbund Berlin-Brandenburg" +jsonpath "$[2].wikidata[0]" == "Q800507" +jsonpath "$[2].wikipedia[0]" == "de:Bahnhof Berlin Landsberger Allee" + +# Facility request missing required parameter +GET {{base_url}}/facility +HTTP 422 +[Asserts] +jsonpath "$.detail.error" == "No argument with a search term provided." +jsonpath "$.detail.detail" == "Provide one of the following query parameters: q, name, ref, uic_ref" + +# Facility request duplicated search parameters (1) +GET {{base_url}}/facility +[QueryStringParams] +q: 8089028 +ref: test +HTTP 422 +[Asserts] +jsonpath "$.detail.error" == "More than one argument with a search term provided." +jsonpath "$.detail.detail" == "Provide only one of the following query parameters: q, name, ref, uic_ref" + +# Facility request duplicated search parameters (2) +GET {{base_url}}/facility +[QueryStringParams] +q: 8089028 +uic_ref: test +HTTP 422 +[Asserts] +jsonpath "$.detail.error" == "More than one argument with a search term provided." +jsonpath "$.detail.detail" == "Provide only one of the following query parameters: q, name, ref, uic_ref" + +# Facility request duplicated search parameters (3) +GET {{base_url}}/facility +[QueryStringParams] +name: 8089028 +uic_ref: test +HTTP 422 +[Asserts] +jsonpath "$.detail.error" == "More than one argument with a search term provided." +jsonpath "$.detail.detail" == "Provide only one of the following query parameters: q, name, ref, uic_ref" + +# Facility request duplicated search parameters (4) +GET {{base_url}}/facility +[QueryStringParams] +q: test +name: test +ref: test +uic_ref: test +HTTP 422 +[Asserts] +jsonpath "$.detail.error" == "More than one argument with a search term provided." +jsonpath "$.detail.detail" == "Provide only one of the following query parameters: q, name, ref, uic_ref" + +# Facility request limit is not numeric +GET {{base_url}}/facility +[QueryStringParams] +limit: blabla +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 1 +jsonpath "$.detail[0].msg" == "Input should be a valid integer, unable to parse string as an integer" + +# Milestone request for line 6020 milestone 22.7 +GET {{base_url}}/milestone +[QueryStringParams] +ref: 6020 +position: 22.7 +limit: 1 +HTTP 200 +[Asserts] +jsonpath "$" count == 1 +jsonpath "$[0].line_ref" == "6020" +jsonpath "$[0].position" == "22.7" + +# Milestone request too small limit +GET {{base_url}}/milestone +[QueryStringParams] +ref: 6020 +position: 22.7 +limit: 0 +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 1 +jsonpath "$.detail[0].msg" == "Input should be greater than or equal to 1" + +# Milestone request too large limit +GET {{base_url}}/milestone +[QueryStringParams] +ref: 6020 +position: 22.7 +limit: 201 +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 1 +jsonpath "$.detail[0].msg" == "Input should be less than or equal to 200" + +# Milestone request missing required ref and position parameters +GET {{base_url}}/milestone +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 2 +jsonpath "$.detail[0].msg" == "Field required" +jsonpath "$.detail[1].msg" == "Field required" + +# Milestone request with non-numeric arguments +GET {{base_url}}/milestone +[QueryStringParams] +ref: 6020 +position: blabla +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 1 +jsonpath "$.detail[0].msg" == "Input should be a valid number, unable to parse string as a number" + +# Milestone request with non-numeric arguments +GET {{base_url}}/milestone +[QueryStringParams] +ref: 6020 +position: 22.7 +limit: blabla +HTTP 422 +[Asserts] +jsonpath "$.detail" count == 1 +jsonpath "$.detail[0].msg" == "Input should be a valid integer, unable to parse string as an integer" + +# Route +GET {{base_url}}/route/64050 +HTTP 200 +Content-Type: application/geo+json +[Asserts] +jsonpath "$.id" == 64050 +jsonpath "$.type" == "Feature" +jsonpath "$.properties.to" == "S Spindlersfeld" +jsonpath "$.properties.ref" == "S47" +jsonpath "$.properties.from" == "S Hermannstraße" +jsonpath "$.properties.name" == "S47: S Hermannstraße => S Spindlersfeld" +jsonpath "$.properties.type" == "light_rail" +jsonpath "$.properties.color" == "#BA8A4D" +jsonpath "$.properties.osm_id" == 64050 +jsonpath "$.properties.operator" == "S-Bahn Berlin GmbH" +jsonpath "$.geometry.type" == "LineString" +jsonpath "$.geometry.coordinates" count > 0 + +# Non existing route +GET {{base_url}}/route/404 +HTTP 404 diff --git a/common.mss b/common.mss deleted file mode 100644 index 0145531f5..000000000 --- a/common.mss +++ /dev/null @@ -1,192 +0,0 @@ -/** Grey color and line width for railway tracks in use. - * To be overriden by colouring for speed limits, train protection or electrification. - */ -@railway_fill_color: grey; -@railway_casing_color: white; - -@railway_casing_add: 2; - -#railway_line_casing[zoom>=9]::casing, -#railway_line_low[zoom<=7]::casing, -#railway_line_med[zoom>7][zoom<9]::casing { - ["railway"="rail"] { - ["usage"="main"]["service"=null], - [zoom>=8]["usage"="branch"]["service"=null] { - line-color: @railway_casing_color; - line-width: 1.5 + @railway_casing_add; - line-join: round; - - [zoom>=6][zoom<=8] { - line-width: 2.5 + @railway_casing_add; - } - - [zoom>=9] { - line-width: 3.5 + @railway_casing_add; - } - } - - [zoom=10]["usage"="industrial"]["service"=null], - [zoom>=11]["usage"="industrial"] { - line-color: @railway_casing_color; - line-width: 2 + @railway_casing_add; - line-join: round; - - ["service"!=null] { - line-width: 1.5 + @railway_casing_add; - } - } - - [zoom>=13]["usage"=null]["service"=null] { - line-color: @railway_casing_color; - line-width: 2 + @railway_casing_add; - line-join: round; - } - - [zoom>=11]["usage"=null]["service"="siding"], - [zoom>=11]["usage"=null]["service"="crossover"] { - line-color: @railway_casing_color; - line-width: 2 + @railway_casing_add; - line-join: round; - } - - [zoom>=12]["usage"=null]["service"="yard"] { - line-color: @railway_casing_color; - line-width: 1.5 + @railway_casing_add; - line-join: round; - } - - [zoom>=11]["usage"=null]["service"="spur"] { - line-color: @railway_casing_color; - line-width: 1.5 + @railway_casing_add; - line-join: round; - } - } - - ["railway"="narrow_gauge"] { - [zoom>=10]["service"=null], - [zoom>=11]["service"="spur"], - [zoom>=11]["service"="siding"], - [zoom>=11]["service"="crossover"], - [zoom>=12]["service"="yard"] { - line-width: 3 + @railway_casing_add; - line-color: @railway_casing_color; - line-join: round; - - ["usage"="industrial"], - ["service"!=null] { - line-width: 2 + @railway_casing_add; - } - } - } - - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"] { - line-color: @railway_casing_color; - line-width: 3 + @railway_casing_add; - line-join: round; - - [service!=null] { - line-width: 1.5 + @railway_casing_add; - } - } -} - - -#railway_line_fill[zoom>=9]::fill, -#railway_line_low[zoom<=7]::fill, -#railway_line_med[zoom>7][zoom<9]::fill { - ["railway"="rail"] { - ["usage"="main"]["service"=null] { - line-color: @railway_fill_color; - line-width: 1.5; - - [zoom>=6][zoom<=8] { - line-width: 2.5; - } - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom>=8]["usage"="branch"]["service"=null] { - line-color: @railway_fill_color; - line-width: 2.5; - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom=10]["usage"="industrial"]["service"=null], - [zoom>=11]["usage"="industrial"] { - line-color: @railway_fill_color; - line-width: 2; - - ["service"!=null] { - line-width: 1.5; - } - } - - [zoom>=13]["usage"=null]["service"=null], - [zoom>=11]["usage"=null]["service"="siding"], - [zoom>=11]["usage"=null]["service"="crossover"] { - line-color: @railway_fill_color; - line-width: 2; - } - - [zoom>=12]["usage"=null]["service"="yard"], - [zoom>=11]["usage"=null]["service"="spur"] { - line-color: @railway_fill_color; - line-width: 1.5; - } - } - - ["railway"="narrow_gauge"] { - [zoom>=10]["service"=null], - [zoom>=11]["service"="spur"], - [zoom>=11]["service"="siding"], - [zoom>=11]["service"="crossover"], - [zoom>=12]["service"="yard"] { - line-width: 3; - line-color: @railway_fill_color; - - ["usage"="industrial"], - ["service"="spur"], - ["service"!=null] { - line-width: 2; - } - } - } - - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"] { - line-color: @railway_fill_color; - line-width: 3; - - [service!=null] { - line-width: 1.5; - } - } -} diff --git a/common_disused.mss b/common_disused.mss deleted file mode 100644 index 1ae9a8bb8..000000000 --- a/common_disused.mss +++ /dev/null @@ -1,38 +0,0 @@ -/** Grey color and line width for disused railway tracks and railway tracks under construction. - * To be overriden by colouring for speed limits, train protection or electrification. - */ - -#railway_line_casing[zoom>=9]::casing, -#railway_line_low[zoom<=7]::casing, -#railway_line_med[zoom>7][zoom<9]::casing { - [zoom>=9]["railway"="disused"]["disused_railway"="rail"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="subway"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="light_rail"]["service"=null], - [zoom>=12]["railway"="disused"]["disused_railway"="tram"]["service"=null], - [zoom>=13]["railway"="disused"] { - line-color: @railway_casing_color; - line-width: 3 + @railway_casing_add; - line-join: round; - - [service!=null] { - line-width: 1.5 + @railway_casing_add; - } - } -} - -#railway_line_fill[zoom>=9]::fill, -#railway_line_low[zoom<=7]::fill, -#railway_line_med[zoom>7][zoom<9]::fill { - [zoom>=9]["railway"="disused"]["disused_railway"="rail"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="subway"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="light_rail"]["service"=null], - [zoom>=12]["railway"="disused"]["disused_railway"="tram"]["service"=null], - [zoom>=13]["railway"="disused"] { - line-color: @railway_fill_color; - line-width: 3; - - [service!=null] { - line-width: 1.5; - } - } -} diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 000000000..3c25ce780 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,141 @@ +services: + db: + build: + context: db + ports: + - '5432:5432' + shm_size: 1g + environment: + - POSTGRES_HOST_AUTH_METHOD=trust + - PG_WORK_MEM + - PG_MAINTENANCE_WORK_MEM + # Custom directory so it is not part of a VOLUME + - PGDATA=/data/postgresql + - POSTGRES_DB=gis + + import: + build: + dockerfile: import/Dockerfile + command: + - import + depends_on: + db: + condition: service_healthy + volumes: + - ./data:/data + environment: + - PGHOST=db + - PGUSER=postgres + - PG_WORK_MEM + - PG_MAINTENANCE_WORK_MEM + - OSM2PGSQL_NUMPROC + - OSM2PGSQL_DATAFILE + + import-test: + build: + dockerfile: import/Dockerfile + target: test + + data: + image: openrailwaymap-data + build: + context: data + command: + - 'sleep' + - 'inf' + + martin: + build: + dockerfile: martin.Dockerfile + depends_on: + db: + condition: service_healthy + import: + condition: service_completed_successfully + environment: + - DATABASE_URL=postgresql://postgres@db:5432/gis + ulimits: + nproc: 65535 + nofile: + soft: 26677 + hard: 46677 + develop: + watch: + - action: rebuild + path: martin + - action: rebuild + path: symbols + + proxy: + build: + dockerfile: proxy.Dockerfile + ports: + - '8000:8000' + - '443:443' + environment: + TILES_UPSTREAM: martin:3000 + API_UPSTREAM: api:5000 + PUBLIC_PROTOCOL: http + PUBLIC_HOST: localhost:8000 + NGINX_CACHE_TTL: '0' + CLIENT_CACHE_TTL_ASSETS_FRESH: '0' + CLIENT_CACHE_TTL_ASSETS_STALE: '0' + CLIENT_CACHE_TTL_API_FRESH: '0' + CLIENT_CACHE_TTL_API_STALE: '0' + CLIENT_CACHE_TTL_TILES_FRESH: '0' + CLIENT_CACHE_TTL_TILES_STALE: '0' + develop: + watch: + - action: rebuild + path: proxy + - action: rebuild + path: features + + proxy-test: + image: ghcr.io/orange-opensource/hurl:6.1.1@sha256:0fafe31238304394bcba7ab49509dcbb4356798b6a99973d41ef722f6cbbb1e9 + depends_on: + proxy: + condition: service_healthy + volumes: + - ./proxy/test/proxy.hurl:/hurl/proxy.hurl + command: [ + '--test', + '--verbose', + '--variable', 'base_url=http://proxy:8000', + '/hurl/proxy.hurl' + ] + + api: + build: + context: api + depends_on: + db: + condition: service_healthy + import: + condition: service_completed_successfully + environment: + - PORT=5000 + - HOST=0.0.0.0 + - POSTGRES_USER=postgres + - POSTGRES_HOST=db + - POSTGRES_DB=gis + ports: + - '5000:5000' + develop: + watch: + - action: rebuild + path: api + + api-test: + image: ghcr.io/orange-opensource/hurl:6.1.1@sha256:0fafe31238304394bcba7ab49509dcbb4356798b6a99973d41ef722f6cbbb1e9 + depends_on: + api: + condition: service_healthy + volumes: + - ./api/test/api.hurl:/hurl/api.hurl + command: [ + '--test', + '--verbose', + '--variable', 'base_url=http://api:5000/api', + '/hurl/api.hurl' + ] diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/Dockerfile b/data/Dockerfile new file mode 100644 index 000000000..93a40e88a --- /dev/null +++ b/data/Dockerfile @@ -0,0 +1,2 @@ +FROM scratch +COPY filtered/data.osm.pbf /data/data.osm.pbf diff --git a/data/Dockerfile.dockerignore b/data/Dockerfile.dockerignore new file mode 100644 index 000000000..c3888d9b5 --- /dev/null +++ b/data/Dockerfile.dockerignore @@ -0,0 +1,2 @@ +** +!filtered/data.osm.pbf diff --git a/data/filtered/.gitkeep b/data/filtered/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/split/.gitkeep b/data/split/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/db/Dockerfile b/db/Dockerfile new file mode 100644 index 000000000..bc8772432 --- /dev/null +++ b/db/Dockerfile @@ -0,0 +1,8 @@ +FROM imresamu/postgis:18-3.6-alpine + +COPY tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh +COPY operators.sql /docker-entrypoint-initdb.d/operators.sql +COPY types.sql /docker-entrypoint-initdb.d/types.sql + +HEALTHCHECK --interval=5s --timeout=5s --retries=3 --start-period=1m --start-interval=1s \ + CMD ["psql", "-U", "postgres", "-d", "gis", "-c", "SELECT st_buffer(ST_SetSRID('POINT(0 0)'::GEOMETRY, 4326), 1)"] diff --git a/db/operators.sql b/db/operators.sql new file mode 100644 index 000000000..5c3980970 --- /dev/null +++ b/db/operators.sql @@ -0,0 +1,10 @@ +-- Taken from https://stackoverflow.com/questions/22098706/how-to-use-regular-expression-with-any-array-operator +CREATE OR REPLACE FUNCTION commuted_regexp_match(text, text) RETURNS BOOL AS + 'SELECT $2 ~ $1;' + LANGUAGE sql; + +CREATE OPERATOR ~!@# ( + procedure = commuted_regexp_match(text, text), + leftarg = text, + rightarg = text +); diff --git a/db/tune-postgis.sh b/db/tune-postgis.sh new file mode 100644 index 000000000..f11b955c9 --- /dev/null +++ b/db/tune-postgis.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e +export PGUSER="$POSTGRES_USER" + +psql -c "ALTER SYSTEM SET work_mem='${PG_WORK_MEM:-50MB}';" +psql -c "ALTER SYSTEM SET maintenance_work_mem='${PG_MAINTENANCE_WORK_MEM:-2GB}';" +psql -c "ALTER SYSTEM SET autovacuum_work_mem='1GB';" +psql -c "ALTER SYSTEM SET shared_buffers='1GB';" +psql -c "ALTER SYSTEM SET wal_level='minimal';" +psql -c "ALTER SYSTEM SET max_wal_senders=0;" +psql -c "ALTER SYSTEM SET checkpoint_timeout='60min';" +psql -c "ALTER SYSTEM SET random_page_cost=0.1;" diff --git a/db/types.sql b/db/types.sql new file mode 100644 index 000000000..b51a16df8 --- /dev/null +++ b/db/types.sql @@ -0,0 +1,12 @@ +CREATE TYPE signal_layer AS ENUM ( + 'speed', + 'electrification', + 'signals' +); + +CREATE TYPE route_type AS ENUM ( + 'train', + 'subway', + 'tram', + 'light_rail' +); diff --git a/deployment/README.md b/deployment/README.md new file mode 100644 index 000000000..cf1278986 --- /dev/null +++ b/deployment/README.md @@ -0,0 +1,320 @@ +# Deployment + +The OpenRailwayMap is deployed on a server to provide a database with OpenStreetMap data, render tiles using Martin and serve the tiles and static assets using an Nginx proxy. + +## Requirements + +- A server with root SSH access. + +## Diagram + +![](diagram.svg) + +## Data import + +An initial import of OSM data is required. After the initial data import, the daily update will ensure the data is kept up to date. + +Download the OSM planet file: +```shell +deployment/download-planet.sh +``` +This will download around 90GB. + +Filter the OSM data, package it and push it to the container registry: +```shell +deployment/filter-and-package-planet.sh +``` +This will process the planet OSM file, and output it into a Docker container. The filtering process takes time and a few GB of memory. + +Optionally delete the source OSM data file to reduce disk space usage: +```shell +rm -f data/planet.osm.pbf +``` + +## Setup + +### Docker + +Install Docker (https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) + +Install APT repository +```shell +# Add Docker's official GPG key: +apt-get update +apt-get install ca-certificates curl +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +chmod a+r /etc/apt/keyrings/docker.asc + +# Add the repository to Apt sources: +echo \ +"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ +$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ +tee /etc/apt/sources.list.d/docker.list > /dev/null +apt-get update +``` + +Install Docker +```shell +apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +``` + +Verify Docker works +```shell +docker run hello-world +``` + +### JQ + +Install JQ: +```shell +apt install jq +``` + +Verify JQ works: +```shell +echo '{}' | jq . +``` + +### User + +Create new user `openrailwaymap` which has permission to access the Docker daemon: +```shell +useradd --create-home --groups users,docker --shell /bin/bash openrailwaymap +``` + +### Github deploy key + +Generate deploy key with access to Github repository. + +Use the `openrailwaymap` user: +```shell +su openrailwaymap +cd +``` + +Generate SSH key: +```shell +ssh-keygen -t ed25519 -C "openrailwaymap" +``` + +Add public key to Github repository, see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#set-up-deploy-keys + +Verify the SSH key works to access the repository, see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection: +```shell +ssh -T git@github.com +``` + +Clone Github repository: +```shell +git clone git@github.com:hiddewie/OpenRailwayMap-vector.git +cd OpenRailwayMap-vector +``` + +### Github Packages + +Use the `openrailwaymap` user: +```shell +su openrailwaymap +cd +``` + +Generate an access token that has read access to Github Packages: + - No expiration + - Scopes: `read:packages` + +Log into Docker for the Github Docker registry +```shell +docker login ghcr.io -u hiddewie +``` +(paste token as password) + +Verify that pulling packages works: +```shell +docker compose pull db +``` + +### SSL + +Use the `openrailwaymap` user: +```shell +su openrailwaymap +cd ~/OpenRailwayMap-vector +``` + +Ensure the SSL certificate and key are installed in `/etc/nginx/ssl`. + +Create a file `compose.override.yaml`: +```yaml +services: + db: + image: ghcr.io/hiddewie/openrailwaymap-import-db:latest + + martin: + image: ghcr.io/hiddewie/openrailwaymap-martin:latest + + api: + image: ghcr.io/hiddewie/openrailwaymap-api:latest + + proxy: + image: ghcr.io/hiddewie/openrailwaymap-proxy:latest + build: + args: + PUBLIC_PROTOCOL: https + PUBLIC_HOST: openrailwaymap.app + environment: + PUBLIC_PROTOCOL: https + PUBLIC_HOST: openrailwaymap.app + NGINX_CACHE_TTL: 86400 + CLIENT_CACHE_TTL_ASSETS_FRESH: 3600 + CLIENT_CACHE_TTL_ASSETS_STALE: 604800 + CLIENT_CACHE_TTL_API_FRESH: 8182 + CLIENT_CACHE_TTL_API_STALE: 604800 + CLIENT_CACHE_TTL_TILES_FRESH: 8182 + CLIENT_CACHE_TTL_TILES_STALE: 604800 + volumes: + - '/etc/nginx/ssl/certificate.pem:/etc/nginx/ssl/certificate.pem' + - '/etc/nginx/ssl/key.pem:/etc/nginx/ssl/key.pem' +``` + +### System service + +Edit `/etc/systemd/system/openrailwaymap.service`: +``` +[Unit] +Description=Run OpenRailwayMap +After=network.target + +[Service] +Type=simple +Restart=always +RestartSec=5 +ExecStart=/home/openrailwaymap/OpenRailwayMap-vector/deployment/start.sh +User=openrailwaymap + +[Install] +WantedBy=multi-user.target +``` + +Reload systemd: +```shell +systemctl daemon-reload +``` + +Enable and start the service: +```shell +systemctl enable openrailwaymap.service +systemctl start openrailwaymap.service +``` + +### Daily update + +Install the daily update timer and service + +Edit `/etc/systemd/system/update-openrailwaymap.timer`: +``` +[Unit] +Description=Daily update OpenRailwayMap + +[Timer] +OnCalendar=*-*-* 08:00:00 Europe/Amsterdam +Persistent=true + +[Install] +WantedBy=timers.target +``` + +Edit `/etc/systemd/system/update-openrailwaymap.service`: +``` +[Unit] +Description=Update OpenRailwayMap +OnSuccess=restart-openrailwaymap.service + +[Service] +Type=oneshot +ExecStart=/home/openrailwaymap/OpenRailwayMap-vector/deployment/pull-and-update.sh +User=openrailwaymap +``` + +Edit `/etc/systemd/system/restart-openrailwaymap.service`: +``` +[Unit] +Description=Restart OpenRailwayMap service + +[Service] +Type=oneshot +ExecStart=systemctl restart openrailwaymap.service +``` + +Reload systemd: +```shell +systemctl daemon-reload +``` + +Enable the timer: +```shell +systemctl enable update-openrailwaymap.timer +``` + +Verify the timer is installed: +```shell +systemctl list-timers --all +``` + +Verify the timer works as intended: +```shell +systemctl start update-openrailwaymap.service +``` + +### Daily Docker cleanup + +Edit `/etc/systemd/system/prune-docker.timer`: +``` +[Unit] +Description=Daily Docker prune + +[Timer] +OnCalendar=*-*-* 00:00:00 +Persistent=true + +[Install] +WantedBy=timers.target +``` + +Edit `/etc/systemd/system/prune-docker.service`: +``` +[Unit] +Description=Prune Docker + +[Service] +Type=oneshot +ExecStart=docker system prune --force +``` + +Reload systemd: +```shell +systemctl daemon-reload +``` + +Enable the timer: +```shell +systemctl enable prune-docker.timer +``` + +Verify the timer is installed: +```shell +systemctl list-timers --all +``` + +Verify the timer works as intended: +```shell +systemctl start prune-docker.service +``` + +## Cloudflare + +Configure Cloudflare to point to the IPv6 address of the server. + +## Ready! + +The OpenRailwayMap is now available on https://openrailwaymap.app. diff --git a/deployment/diagram.svg b/deployment/diagram.svg new file mode 100644 index 000000000..3b118899b --- /dev/null +++ b/deployment/diagram.svg @@ -0,0 +1,4 @@ + + + +
Server
Docker Compose
SSL
Proxy
API
Tiles
Assets
Data
CDN (Cloudflare)
Cache
User
\ No newline at end of file diff --git a/deployment/download-planet.sh b/deployment/download-planet.sh new file mode 100755 index 000000000..995af73c7 --- /dev/null +++ b/deployment/download-planet.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -eof pipefail + +wget -O data/planet.osm.pbf https://ftp.snt.utwente.nl/pub/misc/openstreetmap/planet-latest.osm.pbf +rm -f data/filtered/planet.osm.pbf diff --git a/deployment/filter-and-package-planet.sh b/deployment/filter-and-package-planet.sh new file mode 100755 index 000000000..833a323da --- /dev/null +++ b/deployment/filter-and-package-planet.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -eof pipefail + +docker compose run --build -e OSM2PGSQL_DATAFILE=planet.osm.pbf import filter +rm -f data/filtered/data.osm.pbf +cp data/filtered/planet.osm.pbf data/filtered/data.osm.pbf +docker compose build data +docker compose push data diff --git a/deployment/pull-and-update.sh b/deployment/pull-and-update.sh new file mode 100755 index 000000000..89bb47f53 --- /dev/null +++ b/deployment/pull-and-update.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +cd /home/openrailwaymap/OpenRailwayMap-vector + +git pull + +exec deployment/update.sh diff --git a/deployment/start.sh b/deployment/start.sh new file mode 100755 index 000000000..9fbe6c259 --- /dev/null +++ b/deployment/start.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +cd /home/openrailwaymap/OpenRailwayMap-vector + +exec docker compose up --no-deps db martin api proxy diff --git a/deployment/update.sh b/deployment/update.sh new file mode 100755 index 000000000..5a4538851 --- /dev/null +++ b/deployment/update.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +cd /home/openrailwaymap/OpenRailwayMap-vector + +exec docker compose pull db martin proxy api diff --git a/doc/from_mapcss_to_cartocss.md b/doc/from_mapcss_to_cartocss.md deleted file mode 100644 index 7b49d6ad1..000000000 --- a/doc/from_mapcss_to_cartocss.md +++ /dev/null @@ -1,28 +0,0 @@ -# Migration of a MapCSS style sheet to CartoCSS - -There is no automatical migration path from a MapCSS to CartoCSS but a -few regular expression will make it easier. - - -Here are the most important commands, I entered into Vim during the migration. -Theres is not garantuee that they work for you, too! - -```vim -:%s/\t/ /g -:%s/way|z\([0-9]\+\)-\[/[zoom>=\1][/g -:%s/way|z\([0-9]\+\)-\([0-9]\+\)/[zoom>=\1][zoom<=\2]/g -:%s/way\[/[/g -:g/z-index/d -:%s/ width:/ line-width:/g -:%s/\]\n[ ]*{/] {/g -:%s/ dashes: / line-dasharray: /g -:%s/ color: / line-color: /g -:%s/ opacity: / line-opacity: /g -:%s_ casing-width:\(.*\)$_/* casing-width:\1 */_g -:%s/\[!\([a-z_:"]\+\)]/[\1=""]/g -:%s/\["\([a-z_]\+\):\([a-z_]\+\)"/["\1_\2"/g -:%s/\[\([a-z_]\+\)/\["\1"/g -:%s/=\([a-z_]\+\)\]/="\1"]/g -:%s/"zoom"/zoom/g -:%s/"=""\]/"=null]/g -``` diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 2e0467600..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: '2' -services: - kosmtik: - image: kosmtik:v1 - platform: linux/amd64 - build: - context: . - dockerfile: Dockerfile - volumes: - - .:/openrailwaymap - depends_on: - - db - ports: - - "127.0.0.1:6789:6789" - environment: - - PGHOST=db - - PGUSER=postgres - command: - # Edit this argument to render a different style - - standard.mml - db: - image: db:v1 - build: - context: . - dockerfile: Dockerfile.db - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - - PG_WORK_MEM - - PG_MAINTENANCE_WORK_MEM - import: - image: import:v1 - build: - context: . - dockerfile: Dockerfile.import - volumes: - - .:/openrailwaymap - depends_on: - - db - environment: - - PGHOST=db - - PGUSER=postgres - - PG_WORK_MEM - - PG_MAINTENANCE_WORK_MEM - - OSM2PGSQL_CACHE - - OSM2PGSQL_NUMPROC - - OSM2PGSQL_DATAFILE - - EXTERNAL_DATA_SCRIPT_FLAGS diff --git a/docker-startup.sh b/docker-startup.sh deleted file mode 100755 index d8745c123..000000000 --- a/docker-startup.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh - -# This script is used to start the import of kosmtik containers for the Docker development environment. -# You can read details about that in SETUP.md - -# Testing if database is ready -i=1 -MAXCOUNT=60 -echo "Waiting for PostgreSQL to be running" -while [ $i -le $MAXCOUNT ] -do - pg_isready -q && echo "PostgreSQL running" && break - sleep 2 - i=$((i+1)) -done -test $i -gt $MAXCOUNT && echo "Timeout while waiting for PostgreSQL to be running" - -case "$1" in -import) - # Creating default database - psql -c "SELECT 1 FROM pg_database WHERE datname = 'gis';" | grep -q 1 || createdb gis && \ - psql -d gis -c 'CREATE EXTENSION IF NOT EXISTS postgis;' && \ - psql -d gis -c 'CREATE EXTENSION IF NOT EXISTS hstore;' - - # Creating default import settings file editable by user and passing values for osm2pgsql - if [ ! -e ".env" ]; then - cat > .env <'construction:railway' AS construction_railway, - electrified, - frequency, - voltage, - construction_electrified, - construction_frequency, - proposed_electrified, - proposed_frequency, - deelectrified, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction') - ) AS r - ORDER by layer, rank NULLS LAST - ) AS railway_line_casing - properties: - minzoom: 9 - - id: railway_line_low - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - NULL AS service, - NULL AS construction, - NULL AS construction_railway, - NULL AS construction_usage, NULL AS construction_service, - NULL AS preserved_railway, NULL AS preserved_service, - NULL AS preserved_usage, - electrification_state AS state, - electrification_state_without_future AS state_now, - railway_voltage_for_state(electrification_state, voltage, construction_voltage, proposed_voltage) AS merged_voltage, - railway_frequency_for_state(electrification_state, frequency, construction_frequency, proposed_frequency) AS merged_frequency, - railway_to_int(voltage) AS voltage, - railway_to_float(frequency) AS frequency - FROM - (SELECT - way, railway, usage, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS electrification_state, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, NULL, NULL, TRUE) AS electrification_state_without_future, - frequency AS frequency, - voltage AS voltage, - construction_frequency AS construction_frequency, - construction_voltage AS construction_voltage, - proposed_frequency AS proposed_frequency, - proposed_voltage AS proposed_voltage, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage = 'main' AND service IS NULL - ) AS r - ORDER BY layer NULLS LAST - ) AS openrailwaymap_line_low - properties: - maxzoom: 7 - - id: railway_line_med - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - NULL AS service, - NULL AS construction, - NULL AS construction_railway, - NULL AS construction_usage, NULL AS construction_service, - NULL AS preserved_railway, NULL AS preserved_service, - NULL AS preserved_usage, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank, - electrification_state AS state, - electrification_state_without_future AS state_now, - railway_voltage_for_state(electrification_state, voltage, construction_voltage, proposed_voltage) AS merged_voltage, - railway_frequency_for_state(electrification_state, frequency, construction_frequency, proposed_frequency) AS merged_frequency, - railway_to_int(voltage) AS voltage, - railway_to_float(frequency) AS frequency - FROM - (SELECT - way, railway, usage, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS electrification_state, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, NULL, NULL, TRUE) AS electrification_state_without_future, - frequency AS frequency, - voltage AS voltage, - construction_frequency AS construction_frequency, - construction_voltage AS construction_voltage, - proposed_frequency AS proposed_frequency, - proposed_voltage AS proposed_voltage, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_line_med - properties: - minzoom: 8 - maxzoom: 8 - - id: railway_line_fill - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - construction_usage, construction_service, - preserved_railway, preserved_service, - preserved_usage, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - electrification_state_without_future AS state, - railway_voltage_for_state(electrification_state_without_future, voltage, construction_voltage, proposed_voltage) AS voltage, - railway_frequency_for_state(electrification_state_without_future, frequency, construction_frequency, proposed_frequency) AS frequency - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - tags->'construction:usage' AS construction_usage, tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, tags->'preserved:service' AS preserved_service, - tags->'preserved:usage' AS preserved_usage, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS electrification_state, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, NULL, NULL, TRUE) AS electrification_state_without_future, - frequency AS frequency, - voltage AS voltage, - construction_frequency AS construction_frequency, - construction_voltage AS construction_voltage, - proposed_frequency AS proposed_frequency, - proposed_voltage AS proposed_voltage, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved') - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_line_fill - properties: - minzoom: 9 -# electrification_future renders with almost the same styling on top of the line fill and thereby adds dashing. - - id: electrification_future - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - construction_usage, construction_service, - preserved_railway, preserved_service, - preserved_usage, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - electrification_state AS state, - railway_voltage_for_state(electrification_state, voltage, construction_voltage, proposed_voltage) AS voltage, - railway_frequency_for_state(electrification_state, frequency, construction_frequency, proposed_frequency) AS frequency - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - tags->'construction:usage' AS construction_usage, tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, tags->'preserved:service' AS preserved_service, - tags->'preserved:usage' AS preserved_usage, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS electrification_state, - frequency AS frequency, - voltage AS voltage, - construction_frequency AS construction_frequency, - construction_voltage AS construction_voltage, - proposed_frequency AS proposed_frequency, - proposed_voltage AS proposed_voltage, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved') - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS electrification_future - properties: - minzoom: 9 - - id: electrification-signals - geometry: point - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - railway, - tags->'railway:signal:electricity' AS signal_electricity, - tags->'railway:signal:electricity:form' AS electricity_form, - tags->'railway:signal:electricity:turn_direction' AS electricity_turn_direction, - tags->'railway:signal:electricity:type' AS electricity_type, - signal_direction - FROM openrailwaymap_osm_signals - WHERE - railway = 'signal' - AND tags ? 'railway:signal:electricity' - ) AS railway_signals - properties: - minzoom: 15 - - id: railway_text_med - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank, - layer, - railway_electrification_label(electrified, deelectrified, construction_electrified, proposed_electrified, voltage, frequency, construction_voltage, construction_frequency, proposed_voltage, proposed_frequency) AS label, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS state - FROM openrailwaymap_osm_line - WHERE - railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL - AND ( - electrified IS NOT NULL - OR deelectrified IS NOT NULL - OR construction_electrified IS NOT NULL - OR proposed_electrified IS NOT NULL - ) - ORDER by layer, rank NULLS LAST - ) AS railway_text_high - properties: - minzoom: 8 - maxzoom: 8 - - id: railway_text_high - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - CASE WHEN railway = 'rail' AND usage IN ('usage', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - layer, - railway_electrification_label(electrified, deelectrified, construction_electrified, proposed_electrified, voltage, frequency, construction_voltage, construction_frequency, proposed_voltage, proposed_frequency) AS label, - railway_electrification_state(railway, electrified, deelectrified, abandoned_electrified, construction_electrified, proposed_electrified, FALSE) AS state - FROM openrailwaymap_osm_line - WHERE - railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved') - AND ( - electrified IS NOT NULL - OR deelectrified IS NOT NULL - OR construction_electrified IS NOT NULL - OR proposed_electrified IS NOT NULL - ) - ORDER by layer, rank NULLS LAST - ) AS railway_text_high - properties: - minzoom: 9 diff --git a/electrification.mss b/electrification.mss deleted file mode 100644 index 8a548c2d3..000000000 --- a/electrification.mss +++ /dev/null @@ -1,309 +0,0 @@ -@text-halo-color: white; -@text-halo-radius: 1; - -@construction-dashes: 5,5; -@proposed-dashes: 4,8; - -@color_no: black; -@color_delectrified: #70584D; -@color_lt750v_dc: #FF79B8; -@color_750v_dc: #F930FF; -@color_gt750v_lt1kv_dc: #D033FF; -@color_1kv_dc: #5C1CCB; -@color_gt1kv_lt1500v_dc: #007ACB; -@color_1500v_dc: #0098CB; -@color_gt1500v_lt3kv_dc: #00B7CB; -@color_3kv_dc: #0000FF; -@color_lt15kv_ac: #97FF2F; -@color_gte15kv_lt25kv_ac: #F1F100; -@color_gte25kv_ac: #FF9F19; -@color_15kv_16_67hz: #00FF00; -@color_15kv_16_7hz: #00CB66; -@color_25kv_50hz: #FF0000; -@color_25kv_60hz: #C00000; -@color_12kv_25hz: #CCCC00; -@color_12_5kv_60hz: #999900; -@color_20kv_50hz: #FFCC66; -@color_20kv_60hz: #FF9966; - -/** - * Railway tracks with electrification under construction or proposed electrification - * are rendered with a second symbolizer called proposed_construction. - * It adds dashed lines on top of existing lines (e.g. black for electrified=no). - * - * Common rules in common.mss are defined for the ::fill and ::casing symbolizers only. - * Therefore, the rules from common.mss for ::fill need to be repeated here. - */ -#electrification_future[zoom>=9] { - ["railway"="rail"] { - ["usage"="main"]["service"=null] { - line-color: @railway_fill_color; - line-width: 1.5; - - [zoom>=6][zoom<=8] { - line-width: 2.5; - } - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom>=8]["usage"="branch"]["service"=null] { - line-color: @railway_fill_color; - line-width: 2.5; - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom=10]["usage"="industrial"]["service"=null], - [zoom>=11]["usage"="industrial"] { - line-color: @railway_fill_color; - line-width: 2; - - ["service"!=null] { - line-width: 1.5; - } - } - - [zoom>=13]["usage"=null]["service"=null], - [zoom>=11]["usage"=null]["service"="siding"], - [zoom>=11]["usage"=null]["service"="crossover"] { - line-color: @railway_fill_color; - line-width: 2; - } - - [zoom>=12]["usage"=null]["service"="yard"], - [zoom>=11]["usage"=null]["service"="spur"] { - line-color: @railway_fill_color; - line-width: 1.5; - } - } - - ["railway"="narrow_gauge"] { - [zoom>=10]["service"=null], - [zoom>=11]["service"="spur"], - [zoom>=11]["service"="siding"], - [zoom>=11]["service"="crossover"], - [zoom>=12]["service"="yard"] { - line-width: 3; - line-color: @railway_fill_color; - - ["usage"="industrial"], - ["service"="spur"], - ["service"!=null] { - line-width: 2; - } - } - } - - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"] { - line-color: @railway_fill_color; - line-width: 3; - - [service!=null] { - line-width: 1.5; - } - } -} - -#electrification_future, -#railway_line_fill[zoom>=9]::fill, -#railway_line_low[zoom<=7]::fill, -#railway_line_med[zoom=8]::fill { - ["railway"="rail"]["usage"="main"]["service"=null], - [zoom>=8]["railway"="rail"]["usage"="branch"]["service"=null], - [zoom=10]["railway"="rail"]["usage"="industrial"]["service"=null], - [zoom>=13]["railway"="rail"]["usage"=null]["service"=null], - [zoom>=11]["railway"="rail"]["usage"="industrial"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="siding"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="crossover"], - [zoom>=12]["railway"="rail"]["usage"=null]["service"="yard"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="spur"], - [zoom>=10]["railway"="narrow_gauge"]["service"=null], - [zoom>=11]["railway"="narrow_gauge"]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"="siding"], - [zoom>=11]["railway"="narrow_gauge"]["service"="crossover"], - [zoom>=12]["railway"="narrow_gauge"]["service"="yard"], - /* service!=null is required to get a smaller Mapnik XML style with the Carto compiler. */ - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"]["service"!=null], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"]["service"!=null], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"]["service"!=null] { - - ["state"="no"], - ["state"="proposed"][zoom < 9], - ["state"="construction"][zoom < 9] { - line-color: black; - } - - ["state"="deelectrified"], - ["state"="abandoned"] { - line-color: #70584D; - } - - #electrification_future { - ["state"="construction"] { - line-dasharray: @construction-dashes; - } - - ["state"="proposed"] { - line-dasharray: @proposed-dashes; - } - } - - [frequency!=0][voltage<12000], - [frequency!=0][frequency!=25][voltage=12000], - [frequency!=0][voltage>12000][voltage<12500], - [frequency!=0][frequency!=60][voltage=12500], - [frequency!=0][voltage>12500][voltage<15000] { - line-color: @color_lt15kv_ac; - } - - [frequency!=0][frequency!=16.67][frequency!=16.7][voltage=15000], - [frequency!=0][voltage>15000][voltage<20000], - [frequency!=0][frequency!=50][frequency!=60][voltage=20000], - [frequency!=0][voltage>20000][voltage<25000] { - line-color: @color_gte15kv_lt25kv_ac; - } - - [frequency!=0][frequency!=50][frequency!=60][voltage=25000], - [frequency!=0][voltage>25000] { - line-color: @color_gte25kv_ac; - } - - [frequency=0]["voltage"<750] { - line-color: #FF79B8; - } - - [frequency=0]["voltage"=750] { - line-color: #F930FF; - } - - [frequency=0][voltage>750][voltage<1000] { - line-color: #D033FF; - } - - [frequency=0]["voltage"=1000] { - line-color: #5C1CCB; - } - - [frequency=0][voltage>1000][voltage<1500] { - line-color: #007ACB; - } - - [frequency=0]["voltage"=1500] { - line-color: #0098CB; - } - - [frequency=0][voltage>1500][voltage<3000] { - line-color: #00B7CB; - } - - [frequency=0]["voltage"=3000] { - line-color: #0000FF; - } - - [frequency=0][voltage>3000] { - line-color: #1969FF; - } - - [frequency=25][voltage=12000] { - line-color: @color_12kv_25hz; - } - - [frequency=60][voltage=12500] { - line-color: @color_12_5kv_60hz; - } - - [frequency=16.67][voltage=15000] { - line-color: @color_15kv_16_67hz; - } - - [frequency=16.7][voltage=15000] { - line-color: @color_15kv_16_7hz; - } - - [frequency=50][voltage=20000] { - line-color: @color_20kv_50hz; - } - - [frequency=60][voltage=20000] { - line-color: @color_20kv_60hz; - } - - [frequency=50][voltage=25000] { - line-color: @color_25kv_50hz; - } - - [frequency=60][voltage=25000] { - line-color: @color_25kv_60hz; - } - } -} - -#railway_text_med[zoom=8], -#railway_text_high[zoom>=9] { - ["railway"="rail"]["usage"="main"]["service"=null], - ["railway"="rail"]["usage"="branch"]["service"=null], - [zoom=10]["railway"="rail"]["usage"="industrial"]["service"=null], - [zoom>=13]["railway"="rail"]["usage"=null]["service"=null], - [zoom>=11]["railway"="rail"]["usage"="industrial"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="siding"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="crossover"], - [zoom>=12]["railway"="rail"]["usage"=null]["service"="yard"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"=null], - [zoom>=11]["railway"="narrow_gauge"]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"="siding"], - [zoom>=11]["railway"="narrow_gauge"]["service"="crossover"], - [zoom>=12]["railway"="narrow_gauge"]["service"="yard"], - /* service!=null is required to get a smaller Mapnik XML style with the Carto compiler. */ - [zoom>=11]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=12]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=12]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=12]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"]["service"!=null], - [zoom>=12]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"]["service"!=null], - [zoom>=13]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"]["service"!=null] { - text-name: [label]; - text-face-name: @bold-fonts; - text-size: 11; - text-placement: line; - text-spacing: 100; - text-min-distance: 30; - text-halo-radius: @text-halo-radius; - text-halo-fill: @text-halo-color; - ["state"!="present"] { - text-face-name: @oblique-fonts; - } - } -} diff --git a/electrification_signals.mss b/electrification_signals.mss deleted file mode 100644 index 2cf1ddc58..000000000 --- a/electrification_signals.mss +++ /dev/null @@ -1,133 +0,0 @@ -@de-el-size: 18; -@de-el-size-with-arrow: @de-el-size * 1.286; - -#electrification-signals[zoom>=17] { - ["signal_direction"!=null] { - /*************************************/ - /* DE pantograph down advance El 3 */ - /* AT Ankündigung Stromabnehmer tief */ - /*************************************/ - ["electricity_type"="pantograph_down_advance"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el3"], - ["signal_electricity"="AT-V2:andkündigung_stromabnehmer_tief"] { - marker-file: url("symbols/de/el3.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - - /************************************/ - /* DE power off advance sign El 1v */ - /* AT Ankündigung Hauptschalter aus */ - /************************************/ - ["electricity_type"="power_off_advance"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el1v"], - ["signal_electricity"="AT-V2:ankündigung_hauptschalter_aus"] { - marker-file: url("symbols/de/el1v.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - - /*******************************************************/ - /* DE end of catenary sign El 6 */ - /* AT Halt für Fahrzeuge mit angehobenem Stromabnehmer */ - /*******************************************************/ - ["electricity_type"="end_of_catenary"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el6"], - ["signal_electricity"="AT-V2:halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer"] { - marker-file: url("symbols/de/el6.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - - ["electricity_turn_direction"="right"] { - marker-file: url("symbols/de/el6-right.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size-with-arrow; - } - - ["electricity_turn_direction"="through"] { - marker-file: url("symbols/de/el6-through.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size-with-arrow; - } - - ["electricity_turn_direction"="left"] { - marker-file: url("symbols/de/el6-left.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size-with-arrow; - } - } - } - - /**************************/ - /* DE power on sign El 2 */ - /* AT Hauptschalter ein */ - /**************************/ - ["electricity_type"="power_on"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el2"], - ["signal_electricity"="AT-V2:hauptschalter_ein"] { - marker-file: url("symbols/de/el2.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - - /*************************/ - /* DE pantograph up El 5 */ - /* AT Stromabnehmer hoch */ - /*************************/ - ["electricity_type"="pantograph_up"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el5"], - ["signal_electricity"="AT-V2:stromabnehmer_hoch"] { - marker-file: url("symbols/de/el5.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - - /**************************/ - /* DE power off sign El 1 */ - /* AT Hauptschalter aus */ - /**************************/ - ["electricity_type"="power_off"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el1"], - ["signal_electricity"="AT-V2:hauptschalter_aus"] { - marker-file: url("symbols/de/el1.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - - /***************************/ - /* DE pantograph down El 4 */ - /* AT Stromabnehmer tief */ - /***************************/ - ["electricity_type"="pantograph_down"]["electricity_form"="sign"] { - ["signal_electricity"="DE-ESO:el4"], - ["signal_electricity"="AT-V2:stromabnehmer_tief"] { - marker-file: url("symbols/de/el4.svg"); - marker-width: @de-el-size; - marker-height: @de-el-size; - marker-allow-overlap: true; - } - } - } - - /*******************************************/ - /* DE tram power off shortly signal (St 7) */ - /*******************************************/ - ["signal_electricity"="DE-BOStrab:st7"]["electricity_type"="power_off_shortly"]["electricity_form"="sign"], - ["signal_electricity"="DE-AVG:st7"]["electricity_type"="power_off_shortly"]["electricity_form"="sign"] { - marker-file: url("symbols/de/bostrab/st7.svg"); - marker-width: 11; - marker-height: 12; - marker-allow-overlap: true; - } -} diff --git a/features/loading_gauge.yaml b/features/loading_gauge.yaml new file mode 100644 index 000000000..b5f20ee73 --- /dev/null +++ b/features/loading_gauge.yaml @@ -0,0 +1,64 @@ +loading_gauges: + - { value: 'TSI_GA', legend: 'GA', color: 'hsl(96, 100%, 40%)' } + - { value: 'TSI_GB', legend: 'GB', color: 'hsl(72, 100%, 40%)' } + - { value: 'TSI_GB1', legend: 'GB1', color: 'hsl(56, 100%, 40%)' } + - { value: 'TSI_GB2', legend: 'TSI_GB2', color: 'hsl(42, 100%, 40%)' } + - { value: 'TSI_GC', legend: 'GC', color: 'hsl(27, 100%, 40%)' } + - { value: 'UIC_C', legend: 'UIC_C', color: 'hsl(215, 100%, 40%)' } + - { value: 'PPI', legend: 'PPI', color: 'hsl(0, 100%, 40%)' } + - { value: 'W5', legend: 'W5', color: 'hsl(324, 100%, 70%)' } + - { value: 'W6', legend: 'W6', color: 'hsl(303, 100%, 63%)' } + - { value: 'W6A', legend: 'W6A', color: 'hsl(291, 100%, 47%)' } + - { value: 'W6A*', legend: 'W6A*', color: 'hsl(291, 100%, 47%)' } + - { value: 'W7', legend: 'W7', color: 'hsl(279, 100%, 44%)' } + - { value: 'W7*', legend: 'W7*', color: 'hsl(279, 100%, 44%)' } + - { value: 'W8', legend: 'W8', color: 'hsl(245, 100%, 44%)' } + - { value: 'W9', legend: 'W9', color: 'hsl(207, 100%, 44%)' } + - { value: 'W9Plus', legend: 'W9Plus', color: 'hsl(207, 100%, 44%)' } + - { value: 'W10', legend: 'W10', color: 'hsl(189, 100%, 34%)' } + - { value: 'W10A', legend: 'W10A', color: 'hsl(189, 100%, 34%)' } + - { value: 'W12', legend: 'W12', color: 'hsl(170, 100%, 34%)' } + - { value: 'W5, W6', legend: 'W5, W6', color: 'hsl(303, 100%, 63%)' } + - { value: 'W5, W6, W6A', legend: 'W5, W6, W6A', color: 'hsl(291, 100%, 47%)' } + - { value: 'W6, W6A', legend: 'W6, W6A', color: 'hsl(291, 100%, 47%)' } + - { value: 'W6A, W7', legend: 'W6A, W7', color: 'hsl(279, 100%, 44%)' } + - { value: 'W6A, W7*', legend: 'W6A, W7*', color: 'hsl(279, 100%, 44%)' } + - { value: 'W6A*, W7*', legend: 'W6A*, W7*', color: 'hsl(279, 100%, 44%)' } + - { value: 'W6A, W7, W8', legend: 'W6A, W7, W8', color: 'hsl(245, 100%, 44%)' } + - { value: 'W6A, W7*, W8*', legend: 'W6A, W7*, W8*', color: 'hsl(245, 100%, 44%)' } + - { value: 'W6A, W7, W8*', legend: 'W6A, W7, W8*', color: 'hsl(245, 100%, 44%)' } + - { value: 'W6A, W7, W8, W9', legend: 'W6A, W7, W8, W9', color: 'hsl(207, 100%, 44%)' } + - { value: 'W6A, W7, W8, W9, W9Plus', legend: 'W6A, W7, W8, W9, W9Plus', color: 'hsl(207, 100%, 44%)' } + - { value: 'W6A, W7, W10', legend: 'W6A, W7, W10', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W10', legend: 'W6A, W7, W8, W10', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W10', legend: 'W6A, W7, W8, W9, W10', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W9Plus, W10', legend: 'W6A, W7, W8, W9, W9Plus, W10', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W10, W10A', legend: 'W6A, W7, W10, W10A', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W10, W10A', legend: 'W6A, W7, W8, W10, W10A', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W10, W10A', legend: 'W6A, W7, W8, W9, W10, W10A', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W9Plus, W10, W10A', legend: 'W6A, W7, W8, W9, W9Plus, W10, W10A', color: 'hsl(189, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W10, W12', legend: 'W6A, W7, W8, W9, W10, W12', color: 'hsl(170, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W10, W10A, W12', legend: 'W6A, W7, W8, W9, W10, W10A, W12', color: 'hsl(170, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W9Plus, W10, W12', legend: 'W6A, W7, W8, W9, W9Plus, W10, W12', color: 'hsl(170, 100%, 34%)' } + - { value: 'W6A, W7, W8, W9, W9Plus, W10, W10A, W12', legend: 'W6A, W7, W8, W9, W9Plus, W10, W10A, W12', color: 'hsl(170, 100%, 34%)' } + - { value: 'CPb', legend: 'CPb (PTb)', color: 'hsl(279, 100%, 44%)' } + - { value: 'CPb+', legend: 'CPb+ (PTb+)', color: 'hsl(245, 100%, 44%)' } + - { value: 'PT c', legend: 'PTc', color: 'hsl(170, 100%, 34%)' } + - { value: 'DMS 10002054476', legend: 'DMS 10002054476', color: 'hsl(18, 100%, 40%)' } + - { value: 'GOST_T', legend: 'GOST_T', color: 'hsl(132, 100%, 34%)' } + - { value: 'B', legend: 'B', color: 'hsl(75, 100%, 30%)' } + - { value: 'B1', legend: 'B1', color: 'hsl(138, 100%, 30%)' } + - { value: 'FS', legend: 'FS', color: 'hsl(195, 100%, 30%)' } + - { value: 'G1', legend: 'G1', color: 'hsl(282, 100%, 38%)' } + - { value: 'G2', legend: 'G2', color: 'hsl(306, 100%, 38%)' } + - { value: 'Kleinprofil', legend: 'Kleinprofil', color: 'hsl(96, 100%, 40%)' } + - { value: 'Großprofil', legend: 'Großprofil', color: 'hsl(56, 100%, 40%)' } + - { value: 'deep-tube', legend: 'deep-tube', color: 'hsl(282, 100%, 40%)' } + - { value: 'subsurface', legend: 'subsurface', color: 'hsl(242, 100%, 40%)' } + - { value: 'NM1520 ŽSR', legend: 'NM1520 ŽSR', color: 'hsl(273, 100%, 40%)' } + - { value: 'UR760', legend: 'UR760', color: 'hsl(215, 100%, 40%)' } + - { value: 'EBV 1', legend: 'EBV1', color: 'hsl(30, 100%, 60%)' } + - { value: 'EBV 2', legend: 'EBV2', color: 'hsl(130, 80%, 50%)' } + - { value: 'EBV 3', legend: 'EBV3', color: 'hsl(215, 100%, 40%)' } + - { value: 'EBV 4', legend: 'EBV4', color: 'hsl(270, 80%, 50%)' } + diff --git a/features/operators.yaml b/features/operators.yaml new file mode 100644 index 000000000..ce7eb008e --- /dev/null +++ b/features/operators.yaml @@ -0,0 +1,1737 @@ +# Mapping of known operators to their color and other metadata +# Unknown operators will get assigned a generated color + +operators: + + # --- AE --- # + + - names: + - 'الاتحاد للقطارات' + color: 'rgb(193, 5, 5)' + + # --- AL --- # + + - names: + - 'Hekurudha Shqiptare' + color: '#d90026' + + # --- AM --- # + + - names: + - 'Южно-Кавказская железная дорога' + - 'Հարավկովկասյան երկաթուղի' + - 'Armenian Railway' + color: '#fb7d26' + + # --- AO --- # + + - names: + - 'Empresa do Caminho de Ferro de Moçâmedes-E.P.' + color: 'rgb(242, 169, 0)' + + - names: + - 'Caminho de Ferro de Luanda E.P.' + - 'Caminho de Ferro de Luanda' + color: 'rgb(171, 23, 36)' + + # --- AR --- # + + - names: + - 'Ferrocarriles Argentinos S.A. (FASA)' + - 'Trenes Argentinos' + - 'Trenes Argentinos Operadora Ferroviaria' + color: 'rgb(35, 45, 79)' + + - names: + - 'FerroExpreso Pampeano S.A. (FEPSA)' + color: 'rgb(208, 34, 37)' + + - names: + - 'Tren Patagónico S.A.' + - 'Tren Patagónico SA' + - 'Tren Patagónico' + color: '#006B57' + + - names: + - 'Ferro Sur Roca S.A.' + color: '#059cca' + + # --- AT --- # + + - names: + - 'ÖBB-Infrastruktur AG' + - 'ÖBB' + color: '#ff0000' + + - names: + - 'Wiener Linien' + color: '#000050' + + - names: + - 'WLB' # Wiener Lokalbahnen + color: '#00548C' + + - names: + - 'NSB' # Neusiedler Seebahn + color: '#1b4679' + + # --- AU --- # + + - names: + - 'Keolis Downer' + color: '#94d600' + + - names: + - 'Queensland Rail' + - 'QueenslandRail' + color: '#db1f26' + + - names: + - 'NSW Trains' + - 'NSW Trainlink' + - 'NSW TrainLink' + color: '#df4e21' + + - names: + - 'CountryLink' + - 'Countrylink' + color: '#00adc6' + + - names: + - 'RailCorp' + color: 'rgb(0, 53, 121)' + + - names: + - 'ARTC' + - 'Australian Rail Track Corporation' + color: '#027800' # Official color is gray + + - names: + - 'CityRail' + color: '#f79239' + + - names: + - 'V/Line' + color: '#803d99' + + - names: + - 'Public Transport Victoria - Metro' + color: '#2b008c' + + - names: + - 'Adelaide Metro' + color: '#ed1c24' + + - names: + - 'Transperth' + color: '#008635' + + - names: + - 'ARC Infrastructure' + color: '#003f6b' + + - names: + - 'Transwa' + color: '#ec4025' + + # --- AZ --- # + + - names: + - '«Azərbaycan Dəmir Yolları» QSC' + - 'Azərbaycan Dövlət Dəmir Yolu' + color: '#143b6e' + + # --- BA --- # + + - names: + - 'Željeznice Federacije Bosne i Hercegovine' + color: 'rgb(247, 148, 30)' + + # --- BE --- # + + - names: + - 'NMBS/SNCB' + color: '#004979' + + - names: + - 'Infrabel' + color: '#02bcf0' + + # --- BG --- # + + - names: + - 'НКЖИ' + color: '#1178bd' + + - names: + - 'БДЖ' + - 'BDZ' + color: '#158246' + + # --- BO --- # + + - names: + - 'Ferroviaria Andina' + - 'Empresa Ferroviaria Andina SA' + color: '#ca8f05' + + - names: + - 'Ferroviaria Oriental' + - 'FCO' + - 'FO' + color: '#a74804' + + # --- BR --- # + + - names: + - 'RUMO' + - 'Rumo S/A' + - 'Rumo S.A. Malha Paulista' + color: '#037a27' + + - names: + - 'MRS' + - 'MRS Logística S.A.' + - 'MRS Logística' + color: '#c6a305' + + - names: + - 'SuperVia' + color: '#9204a7' + + - names: + - 'MetrôRio' + color: '#0681c0' + + - names: + - 'EFVM' + - 'Vale' + color: 'rgb(0, 126, 122)' + + # --- BY --- # + + - names: + - 'БЧ' + color: '#2d88e4' + + # --- BD --- # + + - names: + - 'BR' + - 'Bangladesh Railway' + - 'বাংলাদেশ রেলওয়ে' + - 'বাংলাদেশ রেলওয়ে' + color: '#da0000' + + # --- CA --- # + + - names: + - 'Canadian Pacific Kansas City' + - 'Canadien Pacifique Kansas City' + - 'CPKC' + color: '#C2002F' + + - names: + - 'Canadian National Railway' + - 'Canadien National' + - 'CN' + color: '#EF3037' + + - names: + - 'VIA Rail' + - 'VIA' + color: '#daae00' + + - names: + - 'GO Transit' + color: '#4a7729' + + - names: + - 'Ontario Northland Railway' + color: '#003366' + + - names: + - 'Toronto Transit Commission' + color: '#da251d' + + # --- CA: Genesee & Wyoming subsidiaries --- # + - names: + - 'Ottawa Valley Railway' + color: '#f68b1e' + + - names: + - 'Quebec Gatineau Railway' + - 'Chemin de fer Québec-Gatineau' + color: '#f68b1e' + + - names: + - 'Huron Central Railway' + color: '#f68b1e' + + - names: + - 'Goderich-Exeter Railway' + color: '#f68b1e' + + # --- CH --- # + + - names: + - 'SBB' + color: '#00a213' + + - names: + - 'RhB' + color: '#ca4140' + + - names: + - 'BLS' + color: '#ca9e40' + + - names: + - 'ZB' + color: '#ad2718' + + - names: + - 'VBZ' + color: 'rgb(5, 127, 172)' + + - names: + - 'SZU' + color: '#e62e25' + + - names: + - 'BVB' + color: '#e6eb00' + + # --- CL --- # + + - names: + - 'FCAB' + color: '#04598b' + + - names: + - 'Ferronor' + color: '#c04d4a' + + - names: + - 'EFE Sur' + - 'FESUR' + color: 'rgb(234, 0, 41)' + + # --- CM --- # + + - names: + - 'Camrail' + - 'CAMRAIL' + color: 'rgb(221, 0, 0)' + + # --- CN --- # + + # See https://en.wikipedia.org/wiki/China_Railway#Companies + + - names: + # China Railway Harbin Group + - '中国铁路哈尔滨局集团' + color: '#168cb4' + + - names: + # China Railway Shenyang Group + - '中国铁路沈阳局集团' + - '中国铁路沈阳局集团有限公司' + color: '#e30811' + + - names: + # China Railway Beijing Group + - '中国铁路北京局集团' + color: '#1f2288' + + - names: + # China Railway Hohhot Group + - '中国铁路呼和浩特局集团' + color: '#6bb82c' + + - names: + # China Railway Taiyuan Group + - '中国铁路太原局集团' + color: 'rgb(0, 126, 188)' + + - names: + # China Railway Jinan Group + - '中国铁路济南局集团' + color: '#bd541f' + + - names: + # China Railway Shanghai Group + - '中国铁路上海局集团' + color: '#2a3390' + + - names: + # China Railway Nanchang Group + - '中国铁路南昌局集团' + color: '#f85c11' + + - names: + # China Railway Guangzhou Group + - '中国铁路南昌局集团' + - '中国铁路广州局集团有限公司' + color: '#76c5f0' + + - names: + # China Railway Nanning Group + - '中国铁路南宁局集团' + - '南宁铁路局' + - '中国铁路南宁局集团有限公司' + color: '#2c1fbd' + + - names: + # China Railway Wuhan Group + - '中国铁路武汉局集团' + color: '#c5352d' + + - names: + # China Railway Zhengzhou Group + - '中国铁路郑州局集团' + color: '#84b725' + + - names: + # China Railway Chengdu Group + - '中国铁路成都局集团' + - '中国铁路成都局集团有限公司' + color: '#1fbdba' + + - names: + # China Railway Kunming Group + - '中国铁路昆明局集团' + - '中国铁路昆明局集团有限公司' + color: '#eb9021' + + - names: + # China Railway Qingzang Group + - '中国铁路青藏集团' + color: '#49af34' + + - names: + # China Railway Lanzhou Group + - '中国铁路兰州局集团' + color: '#bd1f1f' + + - names: + # China Railway Ürümqi Group + - '中国铁路乌鲁木齐局集团' + color: '#de0000' + + - names: + # China Railway Xi'an Group + - '中国铁路西安局集团' + - '中国铁路西安局集团有限公司' + color: '#bd9d1f' + + # --- CR --- # + + - names: + - 'Incofer' + - 'INCOFER' + color: 'rgb(29, 39, 88)' + + # --- CU --- # + + - names: + - 'Ferrocarriles de Cuba' + - 'FFCC' + - 'Ferrocarriles de Cuba (FFCC)' + color: '#0361b3' + + # --- CZ --- # + + - names: + - 'cz:SŽDC' + - 'cz:Správa Železnic' + - 'cz:SŽ' + - 'Správa železnic, s. o.' + - 'Správa železnic' + - 'SŽDC' + - 'SŽ' + color: '#ff5200' + + - names: + - 'Dopravní podnik Ostrava' + color: '#1d61ff' + + - names: + - 'cz:Vítkovice Doprava' + color: '#00841f' + + # --- DE --- # + + - names: + - 'DB InfraGO AG' + - 'DB InfraGO' + - 'DB Netz AG' + - 'DB Netz' + - 'DB Station&Service AG' + - 'DB Station&Service' + - 'Deutsche Bahn' + - 'DB' + color: '#799400' + + - names: + - 'Albtal-Verkehrs-Gesellschaft mbH' + color: '#008833' + + - names: + - 'DB RegioNetz Infrastruktur GmbH' + color: '#ac21b6' + + - names: + - 'Regio Infra Nord-Ost GmbH & Co. KG' + color: '#007733' + + - names: + - 'Deutsche Regionaleisenbahn' + - 'Deutsche Regionaleisenbahn GmbH' + - 'Bayerische Regionaleisenbahn' + - 'Bayerische Regionaleisenbahn GmbH' + color: '#e60073' + + - names: + - 'Thüringer Eisenbahn GmbH' + - 'ThE' + color: '#014601' + + - names: + - 'Schieneninfrastruktur Ost-Niedersachsen GmbH' + color: '#bd0040' + + - names: + - 'AKN Eisenbahn' + - 'AKN Eisenbahn GmbH' + - 'AKN' + color: '#0072bc' + + - names: + - 'SWEG Schienenwege GmbH' + color: '#114499' + + - names: + - 'Usedomer Bäderbahn GmbH' + - 'UBB Polska sp. z o.o.' + color: '#114488' + + - names: + - 'Rhein-Neckar-Verkehr' + color: '#ee7700' + + - names: + - 'Berliner Verkehrsbetriebe' + color: '#f0d020' + + - names: + - 'Rostocker Straßenbahn AG' + color: '#005090' + + - names: + - 'SSB AG' + - 'Stuttgarter Straßenbahnen AG' + - 'Stuttgarter Straßenbahnen (SSB)' + color: '#ae8c00' + + - names: + - 'Verkehrsbetriebe Karlsruhe GmbH' + color: '#ffaa33' + + - names: + - 'VGF' # Verkehrsgesellschaft Frankfurt am Main + color: '#008080' + + - names: + - 'ÜSTRA' + - 'Überlandwerke und Straßenbahnen Hannover' + color: 'rgb(32, 172, 43)' + + - names: + - 'Magdeburger Verkehrsbetriebe GmbH & Co. KG' + color: 'rgb(1, 132, 68)' + + - names: + - 'Hallesche Verkehrs-AG' + - 'HAVAG' + color: '#0099d1' + + - names: + - 'Leipziegr Verkehrsbetriebe GmbH' + - 'Leipziger Verkehrsbetriebe' + - 'LVB' + color: '#ae8c00' + + - names: + - 'moBiel GmbH' + color: '#fa6400' + + - names: + - 'DVB' + - 'Dresdner Verkehrsbetriebe AG' + color: '#be9200' + + - names: + - 'MVG' + - 'Münchner Verkehrsgesellschaft' + color: '#0065cc' + + - names: + - 'VAG Verkehrs-Aktiengesellschaft Nürnberg' + color: '#b80012' + + - names: + - 'Ruhrbahn' + color: '#CFA730' + + # --- DK --- # + + - names: + - 'Banedanmark' + color: '#1fbd93' + + - names: + - 'DSB' + - 'DSB S-tog' + color: '#b41730' + + - names: + - 'A/S Storebælt' + color: '#041639' + + - names: + - 'Lokaltog' + color: 'rgb(0, 39, 94)' + + # --- DZ --- # + + - names: + - 'الشركة الوطنية للنقل بالسكك الحديدية' + - 'Société Nationale des Transports Ferroviaires' + - 'Société nationale des transports ferroviaires' + - 'SNTF' + color: 'rgb(22, 78, 120)' + + - names: + - 'SETRAM' + - 'سيترام' + - 'شركة استغلال الترامواي' + color: '#1da285' + + # --- EE --- # + + - names: + - 'Edelaraudtee AS' + color: '#00a63c' + + - names: + - 'AS Eesti Raudtee' + color: '#75001f' + + # --- EG --- # + + - names: + - 'الهيئة القومية لسكك حديد مصر' + color: '#ff0010' + + # --- ES --- # + + - names: + - 'Renfe' + - 'Renfe Operadora' + color: 'rgb(129, 0, 94)' + + - names: + - 'Adif' + - 'Adif AV' + - 'ADIF' + color: '#007139' + + - names: + - 'Euskal Trenbide Sarea' + - 'Eusko Trenbideak – Ferrocarriles Vascos' + - 'Eusko Trenbideak – Ferrocarriles Vascos S.A.' + color: '#e93637' + + - names: + - 'Ferrocarrils de la Generalitat de Catalunya' + color: '#75a700' + + - names: + - 'Metro de Madrid' + color: '#ed1c23' + + # --- FR --- # + + - names: + - 'SNCF' + - 'SNCF Réseau' + - 'SNCF Gares & Connexions' + color: '#781e4e' + + - names: + - 'LISEA' + color: '#0E2C48' + + - names: + - 'TER Nouvelle-Aquitaine' + color: 'rgb(179, 45, 56)' + + - names: + - 'TER Bourgogne-Franche-Comté' + color: 'rgb(245, 197, 0)' + + - names: + - 'RATP' + - 'RATP Transilien SNCF Ile de France Mobilités' + - 'RATP Île de France Mobilités' + - 'RATP Ile de France Mobilités' + - 'RATP Cap Bièvre' + - 'RATP Dev' + color: '#4caa83' + + - names: + - 'Keolis' + - 'Keolis Lyon' + color: 'rgb(0, 130, 150)' + + # --- FI --- # + + - names: + - 'Väylävirasto' + color: '#009bff' + + - names: + - 'HKL-Raitioliikenne' + - 'HSL' + color: '#8c4798' + + # --- GB --- # + + - names: + - 'Network Rail' + color: 'rgb(227, 81, 0)' + + - names: + - 'South Western Railway' + color: 'rgb(0, 146, 203)' + + - names: + - 'Great Western Railway' + color: '#0a493e' + + - names: + - 'Transport for Wales Rail' + color: '#900000' + + - names: + - 'West Midlands Trains (West Midlands Railway)' + color: '#e07709' + + - names: + - 'West Midlands Trains (London Northwestern Railway)' + color: '#00a862' + + - names: + - 'East Midlands Railway' + color: '#4c2f48' + + - names: + - 'London North Eastern Railway' + color: 'rgb(206, 19, 46)' + + - names: + - 'Greater Anglia' + color: '#84101f' + + - names: + - 'Govia Thameslink Railway (Great Northern)' + color: '#43165c' + + - names: + - 'Govia Thameslink Railway' + - 'Govia Thameslink Railway (Thameslink)' + color: '#ea3b8b' + + - names: + - 'Govia Thameslink Railway (Southern)' + color: '#033f2c' + + - names: + - 'Southeastern' + color: '#daae00' + + - names: + - 'Northern Trains' + color: 'rgb(38, 34, 98)' + + - names: + - 'ScotRail' + color: '#227330' # Logo color is too similar to Northern Trains color + + - names: + - 'Translink NI Railways' + color: 'rgb(8, 79, 92)' + + - names: + - 'London Underground' + - 'London Overground' + - 'Transport for London' + - 'TfL' + color: '#000099' + + - names: + - 'KeolisAmey Docklands Ltd' + color: '#00aac3' + + - names: + - 'Chiltern Railways' + color: '#daae00' + + # --- GE --- # + + - names: + - 'სს "საქართველოს რკინიგზა"' + color: '#1a9d57' + + # --- GR --- # + + - names: + - 'Οργανισμός Σιδηροδρόμων Ελλάδος' + - 'ΟΣΕ' + - 'Ο.Σ.Ε.' + color: '#f27e08' + + # --- HR --- # + + - names: + - 'HŽ' # HŽ Putnički prijevoz + - 'HŽPP' + color: '#0093D0' + + - names: + - 'HŽ Infrastruktura' + color: '#30639b' + + # --- HU --- # + + - names: + - 'MÁV' + color: '#2e5ea8' + + - names: + - 'GYSEV' + - 'GySEV' + - 'Raaberbahn' + color: '#00952c' + + - names: + - 'BKV' + color: 'rgb(12, 130, 128)' + + # --- ID --- # + + - names: + - 'PT Kereta Api Indonesia (Persero)' + - 'PT Kereta Api Indonesia' + - 'PT Kereta Api Logistik' + - 'PT. Kereta Api Indonesia (Persero)' + - 'Kereta Api Indonesia' + - 'Kereta Api Indonesia (Persero)' + - 'PT KAI' + - 'KAI' + color: '#ee6b1e' + + # --- IE --- # + + - names: + - 'Iarnród Éireann' + - 'Irish Rail' + color: 'rgb(46, 133, 57)' + + # --- IN --- # + + # See https://en.wikipedia.org/wiki/Indian_Railways_organisational_structure#Zonal_management + + - names: + - 'IR' + - 'Indian Railways' + color: '#1d38b0' + + - names: + - 'WR' + - 'Western Railway' + color: '#1db072' + + - names: + - 'NWR' + - 'North Western Railway' + color: '#b0441d' + + - names: + - 'NER' + - 'North Eastern Railway' + color: '#b0721d' + + - names: + - 'NR' + - 'Northern Railway' + color: '#b01d66' + + - names: + - 'NFR' + - 'Northeast Frontier Railway' + color: '#1d81b0' + + - names: + - 'NCR' + - 'North Central Railway' + color: '#b905c6' + + - names: + - 'CR' + - 'Central Railway' + color: '#b08d1d' + + - names: + - 'ECR' + - 'East Central Railway' + color: '#1d53b0' + + - names: + - 'WCR' + - 'West Central Railway' + color: '#c60505' + + - names: + - 'SR' + - 'Southern Railway' + color: '#1db04e' + + - names: + - 'SWR' + # South Western Railway is used in GB + color: '#661db0' + + - names: + - 'SCR' + - 'South Central Railway' + color: '#a11db0' + + - names: + - 'SECR' + - 'South East Central Railway' + color: '#1db046' + + - names: + - 'ECoR' + - 'East Coast Railway' + color: '#b01d6b' + + - names: + - 'SER' + - 'South Eastern Railway' + color: '#b0811d' + + - names: + - 'ER' + - 'Eastern Railway' + color: '#1db050' + + - names: + - 'Delhi Metro Rail Corporation Limited' + color: '#c08828' + + - names: + - 'National Capital Region Transport Corporation' + color: 'rgb(28, 117, 188)' + + # --- IQ --- # + + - names: + - 'IRR' + - 'Iraqi Republic Railways الشركة العامة لسكك الحديد العراقية' + - 'الشركة العامة لسكك الحديد العراقية' + color: '#1a9d57' + + # --- IT --- # + + - names: + - 'RFI' + color: '#006a6a' + + - names: + - 'Gruppo Torinese Trasporti' + color: 'rgb(0, 114, 204)' + + - names: + - 'Terminali Italia' + color: '#e51937' + + - names: + - 'Ferrovienord' + color: '#af7b19' + + - names: + - 'ATAC' + color: 'rgb(130, 36, 51)' + + - names: + - 'ASTRAL' + color: '#00263d' + + - names: + - 'Ferrovia Vaticana' + color: '#c08828' + + - names: + - 'ATM' + - 'Azienda Trasporti Milanesi' + color: 'rgb(241, 73, 16)' + + # --- JP --- # + + - names: + # East Japan Railway Company + - '東日本旅客鉄道' + color: '#007903' + + - names: + # JR西日本 West Japan Railway Company + - '西日本旅客鉄道' + color: 'rgb(0, 101, 177)' + + - names: + # JR東海 Central Japan Railway Company + - '東海旅客鉄道' + - '東海旅客鉄道 (JR Central)' + color: 'rgb(248, 123, 34)' + + - names: + # Kintetsu railway + - '近畿日本鉄道' + color: '#9200af' + + - names: + # Kyushu Railway Company + - '九州旅客鉄道' + color: '#DA2728' + + - names: + # Shikoku Railway Company + - '四国旅客鉄道' + color: 'rgb(76, 183, 219)' + + - names: + # JR北海道- Hokkaido Railway Company + - '北海道旅客鉄道' + color: '#45B035' + + - names: + # Aoimori Railway Company + - '青い森鉄道' + color: '#6fc5e9' + + - names: + # Akita Nairiku Jukan Tetsudo Railway Co., Ltd. + - '秋田内陸縦貫鉄道' + color: '#243d5a' + + - names: + # Sanriku Railway Company + - '三陸鉄道' + color: '#ed6c00' + + - names: + # Keikyu Corporation + - '京浜急行電鉄' + - '京浜急行電鉄 (Keikyu Corporation)' + color: 'rgb(0, 150, 224)' + + - names: + # Tokyo Metro Co., Ltd. + - '東京地下鉄' + color: '#00467e' + + - names: + # Tokyu Railways + - '東急電鉄' + color: 'rgb(232, 56, 23)' + + - names: + # Seibu Railway Co.,Ltd. + - '西武鉄道' + color: '#876016' + + - names: + # Odakyu Electric Railway Co., Ltd. + - '小田急電鉄' + color: '#876016' + + - names: + # Nagoya Railroad Co.,Ltd. + - '名古屋鉄道' + color: '#c10024' + + - names: + # Bureau of Transportation Tokyo Metropolitan Government + - '東京都交通局' + color: '#cc3600' + + - names: + # Keio Corporation + - '京王電鉄' + color: 'rgb(214, 0, 127)' + + - names: + # Hankyu Corporation + - '阪急電鉄' + color: '#ca0124' + + - names: + # Tobu Railway Co., Ltd. + - '東武鉄道' + color: '#005bae' + + # --- KG --- # + + - names: + - 'Кыргыз темир жолу' + color: '#0d6efd' + + # --- KO --- # + + - names: + - 'Trainkos' + color: '#f46c2e' + + - names: + - 'INFRAKOS' + color: '#d12614' + + # --- KR --- # + + - names: + - '한국철도공사 (Korail)' + - '한국철도공사' + - 'Korail' + color: '#0066b5' + + - names: + - '서해철도주식회사' + color: '#8cc63f' + + - names: + - '주식회사에스알' + color: '#4c2f48' + + - names: + - '네오트랜스' + color: '#fe0000' + + # --- KZ --- # + + - names: + - 'КТЖ' + - 'АО «КТЖ»' + color: '#009FCB' + + # --- LT --- # + + - names: + - 'LTG Infra' + color: '#007749' + + # --- LU --- # + + - names: + - 'CFL' + color: 'rgb(196, 16, 57)' + + # --- MA --- # + + - names: + - 'ONCF' + - 'المكتب الوطني للسكك الحديدية' + - 'oncf' + color: 'rgb(237, 54, 72)' + + # --- MD --- # + + - names: + - 'CFM' + color: '#1559ae' + + # --- ME --- # + + - names: + - 'ŽICG' + color: '#e39d02' + + - names: + - 'ŽPCG' + color: 'rgb(216, 34, 52)' + + # --- MK --- # + + - names: + - 'Makedonski Železnici' + - 'Македонски железници' + - 'Македонски Железници' + color: '#2d2579' + + # --- MM --- # + + - names: + - 'မြန်မာ့မီးရထားလုပ်ငန်း' + - 'Myanma Railways' + - 'Myanmar Railway' + - 'Myanmar Railways' + - 'MR' + color: '#00983a' + + # --- MR --- # + + - names: + - 'الشركة الوطنية للصناعة والمناجم' + - 'SNIM' + color: '#0000ff' + + # --- MY --- # + + - names: + - 'KTMB' + - 'KTM' + - 'Keretapi Tanah Melayu' + - 'Keretapi Tanah Melayu Berhad' + color: '#004e9b' + + # --- MX --- # + + - names: + - 'Ferromex' + color: '#fa002e' + + - names: + - 'Ferrosur' + color: '#03897c' + + - names: + - 'Ferrovalle' + color: '#4ab378' + + - names: + - 'Sistema de Transporte Colectivo' + color: '#ff5000' + + - names: + - 'Ferroistmo' + color: '#b48a49' + + - names: + - 'Tren Maya' + color: 'rgb(59, 120, 97)' + + # --- MZ --- # + + - names: + - 'Caminhos de Ferro de Moçambique (CFM)' + color: '#0f6037' + + # --- NK --- # + + - names: + - '조선민주주의인민공화국 철도성' + color: '#ed1c27' + + # --- NL --- # + + - names: + - 'ProRail' + color: '#ff0000' + + - names: + - 'NS' + - 'Nederlandse Spoorwegen' + - 'NS Groep N.V.' + color: '#c29500' + + - names: + - 'Infraspeed' + color: '#f79138' + + - names: + - 'Arriva' + color: '#1e8f97' + + - names: + - 'HTM' + color: 'rgb(220, 41, 30)' + + - names: + - 'RET' + color: 'rgb(0, 71, 127)' + + - names: + - 'GVB' + - 'Gemeentelijk Vervoerbedrijf' + color: 'rgb(0, 159, 227)' + + # --- NO --- # + + - names: + - 'Bane NOR' + color: 'rgb(30, 40, 105)' + + # --- NZ --- # + + - names: + - 'KiwiRail' + color: '#ed630c' # Official logo is gray + + - names: + - 'Metlink' + color: '#a3b01d' + + # --- PA --- # + + - names: + - 'Metro de Panamá S.A.' + - 'Metro de Panamá' + - 'Panama Metro' + - 'El Metro de Panamá' + color: '#033e86' + + - names: + - 'Panama Canal Authority' + color: '#a80011' + + # --- PE --- # + + - names: + - 'Ferrocarril Central Andino S.A.' + color: '#bb7c24' + + - names: + - 'Ferrocarril Transandino S.A.' + color: 'rgb(10, 64, 111)' + + - names: + - 'Ferrocarril del Sur del Perú' + color: '#A09162' + + - names: + - 'AATE' + color: '#E4002B' + + # --- PH --- # + + - names: + - 'Philippine National Railways' + color: '#c3a002' + + # --- PK --- # + + - names: + - 'PR' + - 'Pakistan Railways' + - 'Pakistan Railway' + - 'پاکستان ریلویز' + color: '#3f790c' + + # --- PL --- # + + - names: + - 'PKP Polskie Linie Kolejowe' + color: '#004d84' + + - names: + - 'Tramwaje Warszawskie' + color: 'rgb(228, 35, 19)' + + - names: + - 'Metro Warszawskie' + color: '#a28507' + + - names: + - 'Warszawska Kolej Dojazdowa' + color: '#00a213' + + - names: + - 'Tramwaje Śląskie' + color: '#C35817' + + - names: + - 'MPK Kraków' + color: 'rgb(193, 0, 51)' + + - names: + - 'MPK Poznań' + color: 'rgb(56, 145, 62)' + + # --- PT --- # + + - names: + - 'Infraestruturas de Portugal, S.A.' + color: '#1ba89e' + + - names: + - 'Metro do Porto' + color: '#00305F' + + - names: + - 'STCP' + color: 'rgb(0, 92, 185)' + + # --- RO --- # + + - names: + - 'CFR' + color: 'rgb(255, 87, 34)' + + - names: + - 'Metrorex' + color: '#1293ff' + + - names: + - 'STB' + color: 'rgb(9, 171, 79)' + + # --- RU --- # + + - names: + - 'ОАО «РЖД»' + - 'ОАО "РЖД"' + - 'Свердловская дирекция инфраструктуры АО «РЖД»' + - 'ОАО «Российские железные дороги»' + color: '#c50d16' + + - names: + - 'Калининградский Железная Дорога' + color: '#ff3f72' + + - names: + - 'ГУП «Московский метрополитен»' + color: '#ac21b6' + + - names: + - 'МП "Маггортранс"' + color: '#0000CC' + + - names: + - 'ЕТТУ' + color: '#164c12' + + # --- RS --- # + + - names: + - 'Željeznice Republike Srpske' + color: '#043bd7' + + - names: + - 'ЖС' + - 'Железнице Србије' + - 'Zeleznice Srbije' + color: '#ed1c24' + + - names: + - 'ГСП Београд' + color: '#183866' + + - names: + - 'Srbija Voz' + color: '#0869B6' + + # --- SA --- # + + - names: + - 'Saudi Arabia Railways' + color: 'rgb(0, 119, 139)' + + # --- SE --- # + + - names: + - 'Trafikverket' + color: 'rgb(215, 0, 0)' + + - names: + - 'Göteborgs Spårvägar' + color: 'rgb(0, 51, 103)' + + # --- SK --- # + + - names: + - 'ŽSR' + - 'Železnice Slovenskej republiky' + color: '#1b1849' + + # --- SG --- # + + - names: + - 'SMRT' + color: 'rgb(234, 11, 42)' + + - names: + - 'SBS Transit' + color: '#781d7e' + + # --- SL --- # + + - names: + - 'Slovenske železnice' + color: 'rgb(0, 161, 237)' + + - names: + - 'SŽ Infrastruktura' + color: '#eda800' + + # --- SN --- # + + - names: + - 'SETER' + color: '#7D142F' + + - names: + - 'Chemins de fer du Sénégal' + - 'CFS' + color: '#019644' + + - names: + - 'Transrail S. A.' + color: '#4154a3' + + # --- SY --- # + + - names: + - 'المؤسسة العامة للخطوط الحديدية' + color: 'rgb(0, 53, 140)' + + # --- TH --- # + + - names: + - 'การรถไฟแห่งประเทศไทย' + color: '#782325' + + # --- TN --- # + + - names: + - 'SNCFT' + - 'Socite Nationale des chemins de fer tunisien' + - 'الشركة الوطنية للسكك الحديدية التونسية' + color: '#16874b' + + # --- TR --- # + + - names: + - 'TCDD' + color: '#e30613' + + - names: + - 'TCDD Taşımacılık' + color: '#16877a' + + # --- TW --- # + + - names: + - '國營臺灣鐵路股份有限公司' + color: '#00509c' + + - names: + - '台灣高速鐵路股份有限公司' + color: '#ca4f0f' + + - names: + - '臺北大眾捷運股份有限公司' + color: '#4ab846' + + - names: + - '桃園大眾捷運股份有限公司' + color: '#971985' + + - names: + - '新北大眾捷運股份有限公司' + color: 'rgb(16, 135, 162)' + + # --- UA --- # + + - names: + - 'Укрзалізниця' + color: '#118965' + + - names: + - 'КП «Одесміськелектротранс»' + color: '#bf0525' + + - names: + - 'ФГУП «КЖД»' + - 'Крымская железная дорога' + color: '#16874b' + + # --- US --- # + + - names: + - 'Amtrak' + color: '#18567D' + + - names: + - 'Metro-North Railroad' + color: '#08179C' + + - names: + - 'Long Island Rail Road' + color: '#08179C' + + - names: + - 'Staten Island Rapid Transit Operating Authority' + color: '#08179C' + + - names: + - 'Massachusetts Bay Transportation Authority' + color: '#82076c' + + - names: + - 'Consolidated Rail Corporation' + color: '#0079c1' + + - names: + - 'Norfolk Southern Railway' + color: '#2b2b2a' + + - names: + - 'CSX' + - 'CSX Transportation' + color: '#003462' + + - names: + - 'BNSF' + - 'BNSF Railway' + color: '#f85d13' + + - names: + - 'Union Pacific Railroad' + - 'UP' + color: '#d1a700' + + - names: + - 'Southeastern Pennsylvania Transportation Authority' + color: '#F14728' + + - names: + - 'South Florida Regional Transportation Authority' + color: '#1B6D85' + + - names: + - 'Florida East Coast Railway' + - 'FEC' + color: '#af0069' + + - names: + - 'SunRail' + color: '#f9a548' + + - names: + - 'Brightline Trains Florida LLC' + - 'Brightline' + color: '#b9a000' + + - names: + - 'New Jersey Transit' + color: '#dd0752' + + - names: + - 'New Jersey Transit Rail Operations' + color: '#dd0752' + + - names: + - 'New Jersey Transit Light Rail Operations' + color: '#88b04b' + + - names: + - 'New Jersey Transit Bus Operations' + color: '#c76808' + + - names: + - 'New York & Atlantic Railway' + color: '#38553E' + + - names: + - 'New York City Transit Authority' + color: '#876716' + + - names: + - 'Metra' + color: '#0750A3' + + - names: + - 'NICTD' + color: '#F08322' + + - names: + - 'St. Lawrence & Atlantic Railroad' + - 'St. Lawrence and Atlantic Railroad Co.' + - 'Chemin de fer Saint-Laurent et Atlantique (Québec)' + color: '#f68b1e' + + - names: + - 'Chicago Transit Authority' + color: '#0b9444' + + - names: + - 'Sonoma-Marin Area Rail Transit District' + color: 'rgb(229, 142, 26)' + + - names: + - 'BART' + color: '#0099d8' + + - names: + - 'San Francisco Municipal Railway' + - 'San Francisco Municipal Transportation Agency' + color: '#cd3545' + + # --- UZ --- # + + - names: + - 'O‘zbekiston temir yo‘llari' + - 'O‘zbekiston temir yo‘llari' + color: 'rgb(176, 140, 86)' + + # --- VE --- # + + - names: + - 'Instituto Ferrocarriles del Estado (IFE)' + - 'Instituto Ferrocarriles del Estado IFE' + - 'IFE' + color: '#AE1E23' + + # --- VN --- # + + - names: + - 'VNR' + - 'Vietnam Railway (VNR)' + color: '#006dae' + + - names: + - 'Đường Sắt Việt Nam' + - 'Đường sắt Việt Nam' + color: 'rgb(47, 164, 231)' + + # --- ZA --- # + + - names: + - 'Metrorail' + color: '#b38d03' + + - names: + - 'Transnet' + color: '#e72528' + + - names: + - 'Passenger Rail Agency of South Africa' + - 'PRASA' + - 'Prasa' + color: '#02a9e0' + + - names: + - 'Gautrain' + color: 'rgb(0, 73, 144)' diff --git a/features/poi.yaml b/features/poi.yaml new file mode 100644 index 000000000..14323cd14 --- /dev/null +++ b/features/poi.yaml @@ -0,0 +1,329 @@ +features: + - description: Border crossing + feature: 'general/border' + colored_icon: true + layer: operator + minzoom: 10 + tags: + - { tag: 'railway', value: 'border' } + + - description: Owner change + feature: 'general/owner-change' + colored_icon: true + layer: operator + minzoom: 12 + tags: + - { tag: 'railway', value: 'owner_change' } + + - description: Radio mast + feature: 'general/radio-mast' + layer: standard + minzoom: 12 + tags: + - { tag: 'railway', value: 'radio' } + - { tag: 'man_made', values: ['mast', 'tower'] } + variants: + - description: antenna + feature: 'general/radio-antenna' + tags: + - { tag: 'railway', value: 'radio' } + - { tag: 'man_made', value: 'antenna' } + + - description: Container terminal + feature: 'general/container-terminal' + layer: standard + minzoom: 12 + tags: + - { tag: 'railway', value: 'container_terminal' } + + - description: Ferry terminal + feature: 'general/ferry-terminal' + layer: standard + minzoom: 12 + tags: + - { tag: 'railway', value: 'ferry_terminal' } + + - description: Lubricator + layer: standard + minzoom: 13 + feature: 'general/lubricator' + tags: + - { tag: 'railway', value: 'lubricator' } + + - description: Fuel + layer: standard + minzoom: 13 + feature: 'general/fuel' + tags: + - { tag: 'railway', value: 'fuel' } + + - description: Sand store + layer: standard + minzoom: 13 + feature: 'general/sand_store' + tags: + - { tag: 'railway', value: 'sand_store' } + + - description: Defect detector + layer: standard + minzoom: 13 + feature: 'general/defect_detector' + tags: + - { tag: 'railway', value: 'defect_detector' } + + - description: Automatic equipment identification + layer: standard + minzoom: 13 + feature: 'general/aei' + tags: + - { tag: 'railway', value: 'aei' } + + - description: Hump + layer: standard + minzoom: 13 + feature: 'general/hump_yard' + tags: + - { tag: 'railway', value: 'hump_yard' } + + - description: Loading gauge + layer: standard + minzoom: 13 + feature: 'general/loading_gauge' + tags: + - { tag: 'railway', value: 'loading_gauge' } + + - description: Preheating + layer: standard + minzoom: 13 + feature: 'general/preheating' + tags: + - { tag: 'railway', value: 'preheating' } + + - description: Compressed air supply + layer: standard + minzoom: 13 + feature: 'general/compressed_air_supply' + tags: + - { tag: 'railway', value: 'compressed_air_supply' } + + - description: Waste disposal + layer: standard + minzoom: 13 + feature: 'general/waste_disposal' + tags: + - { tag: 'railway', value: 'waste_disposal' } + + - description: Coaling facility + layer: standard + minzoom: 13 + feature: 'general/coaling_facility' + tags: + - { tag: 'railway', value: 'coaling_facility' } + + - description: Wash + feature: 'general/wash' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'wash' } + + - description: Water tower + feature: 'general/water_tower' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'water_tower' } + variants: + - description: Crane + feature: 'general/water_crane' + tags: + - { tag: 'railway', value: 'water_crane' } + + - description: Workshop + feature: 'general/workshop' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'workshop' } + + - description: Engine shed + feature: 'general/engine_shed' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'engine_shed' } + + - description: Railway museum + layer: standard + minzoom: 13 + feature: 'general/museum' + tags: + - { tag: 'railway', value: 'museum' } + variants: + - description: Museum of rail transport + feature: 'general/museum-rail-transport' + tags: + - { tag: 'tourism', value: 'museum' } + - { tag: 'museum', value: 'railway' } + + - description: Power supply + feature: 'general/power_supply' + layer: electrification + minzoom: 13 + tags: + - { tag: 'railway', value: 'power_supply' } + + - description: Rolling highway + feature: 'general/rolling_highway' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'rolling_highway' } + + - description: Pit + feature: 'general/pit' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'pit' } + + - description: Loading rack + feature: 'general/loading-rack' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'loading_rack' } + + - description: Loading ramp + feature: 'general/loading-ramp' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'loading_ramp' } + + - description: Loading tower + feature: 'general/loading-tower' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'loading_tower' } + + - description: Unloading hole + feature: 'general/unloading-hole' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'unloading_hole' } + + - description: Weigh bridge + feature: 'general/track-scale' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'track_scale' } + + - description: Transporter car + feature: 'general/carrier-truck-pit' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'carrier_truck_pit' } + + - description: Bogie exchange + feature: 'general/gauge-conversion' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'gauge_conversion' } + + - description: Car shuttle + feature: 'general/car-shuttle' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'car_shuttle' } + + - description: Rotary car dumper + feature: 'general/car-dumper' + layer: standard + minzoom: 13 + tags: + - { tag: 'railway', value: 'car_dumper' } + + - description: Isolated track section + feature: 'general/isolated-track-section' + layer: electrification + minzoom: 14 + tags: + - { tag: 'railway', value: 'isolated_track_section' } + + - description: Crossing + feature: 'general/crossing' + colored_icon: true + layer: standard + minzoom: 15 + tags: + - { tag: 'railway', value: 'crossing' } + variants: + - description: Level crossing with lights and barrier + feature: 'general/level-crossing-light-barrier' + colored_icon: true + tags: + - { tag: 'railway', value: 'level_crossing' } + - { tag: 'crossing:light', values: ['yes', 'traffic_signals', 'traffic_lights', 'traffic_signal'] } + - { tag: 'crossing:barrier', values: ['half', 'full', 'double_half', 'yes', 'gate', 'separate', 'lift_gate', 'gates', 'chain', 'closed'] } + + - description: Level crossing with barrier + feature: 'general/level-crossing-barrier' + colored_icon: true + tags: + - { tag: 'railway', value: 'level_crossing' } + - { tag: 'crossing:barrier', values: ['half', 'full', 'double_half', 'yes', 'gate', 'separate', 'lift_gate', 'gates', 'chain', 'closed'] } + + - description: Level crossing with lights + feature: 'general/level-crossing-light' + colored_icon: true + tags: + - { tag: 'railway', value: 'level_crossing' } + - { tag: 'crossing:light', values: ['yes', 'traffic_signals', 'traffic_lights', 'traffic_signal'] } + + - description: Level crossing + feature: 'general/level-crossing' + colored_icon: true + tags: + - { tag: 'railway', value: 'level_crossing' } + + - description: Hi-rail vehicle access point + layer: standard + minzoom: 16 + feature: 'general/hirail_access' + tags: + - { tag: 'railway', value: 'hirail_access' } + + - description: Phone + layer: standard + minzoom: 16 + feature: 'general/phone' + tags: + - { tag: 'railway', value: 'phone' } + + - description: Buffer stop + feature: 'general/buffer_stop' + layer: standard + minzoom: 16 + tags: + - { tag: 'railway', value: 'buffer_stop' } + + - description: Derailer + feature: 'general/derail' + layer: standard + minzoom: 16 + tags: + - { tag: 'railway', value: 'derail' } + + - description: Retarder + feature: 'general/retarder' + layer: standard + minzoom: 16 + tags: + - { tag: 'railway', value: 'rail_brake' } diff --git a/features/railway_line.yaml b/features/railway_line.yaml new file mode 100644 index 000000000..0bcf8854f --- /dev/null +++ b/features/railway_line.yaml @@ -0,0 +1,27 @@ +features: + - type: rail + description: Railway + + - type: tram + description: Tram + + - type: light_rail + description: Light rail + + - type: subway + description: Subway + + - type: monorail + description: Monorail + + - type: narrow_gauge + description: Narrow gauge railway + + - type: miniature + description: Miniature railway + + - type: funicular + description: Funicular + + - type: ferry + description: Ferry diff --git a/features/signals_railway_signals.yaml b/features/signals_railway_signals.yaml new file mode 100644 index 000000000..e1698357c --- /dev/null +++ b/features/signals_railway_signals.yaml @@ -0,0 +1,7585 @@ +tags: + # railway tag is included by default + - { tag: 'railway:signal:brake_test', title: 'Brake test' } + - { tag: 'railway:signal:brake_test:form', title: 'Brake test form' } + - { tag: 'railway:signal:brake_test:deactivated', title: 'Brake test deactivated', type: boolean } + - { tag: 'railway:signal:combined', title: 'Combined' } + - { tag: 'railway:signal:combined:form', title: 'Combined form' } + - { tag: 'railway:signal:combined:states', title: 'Combined states', type: array } + - { tag: 'railway:signal:combined:shape', title: 'Combined shape' } + - { tag: 'railway:signal:combined:shortened', title: 'Combined shortened', type: boolean } + - { tag: 'railway:signal:combined:substitute_signal', title: 'Combined substitute signal', type: array } + - { tag: 'railway:signal:combined:height', title: 'Combined height' } + - { tag: 'railway:signal:combined:deactivated', title: 'Combined deactivated', type: boolean } + - { tag: 'railway:signal:crossing', title: 'Crossing' } + - { tag: 'railway:signal:crossing:form', title: 'Crossing form' } + - { tag: 'railway:signal:crossing:repeated', title: 'Crossing repeated', type: boolean } + - { tag: 'railway:signal:crossing:shortened', title: 'Crossing shortened', type: boolean } + - { tag: 'railway:signal:crossing:deactivated', title: 'Crossing deactivated', type: boolean } + - { tag: 'railway:signal:crossing_distant', title: 'Crossing distant' } + - { tag: 'railway:signal:crossing_distant:states', title: 'Crossing distant states', type: array } + - { tag: 'railway:signal:crossing_distant:shortened', title: 'Crossing distant shortened', type: boolean } + - { tag: 'railway:signal:crossing_distant:form', title: 'Crossing distant form' } + - { tag: 'railway:signal:crossing_distant:deactivated', title: 'Crossing deactivated', type: boolean } + - { tag: 'railway:signal:crossing_hint', title: 'Crossing hint' } + - { tag: 'railway:signal:crossing_hint:form', title: 'Crossing hint form' } + - { tag: 'railway:signal:crossing_hint:deactivated', title: 'Crossing deactivated', type: boolean } + - { tag: 'railway:signal:crossing_info', title: 'Crossing info' } + - { tag: 'railway:signal:crossing_info:form', title: 'Crossing info form' } + - { tag: 'railway:signal:crossing_info:deactivated', title: 'Crossing deactivated', type: boolean } + - { tag: 'railway:signal:departure', title: 'Departure' } + - { tag: 'railway:signal:departure:form', title: 'Departure form' } + - { tag: 'railway:signal:departure:states', title: 'Departure states', type: array } + - { tag: 'railway:signal:departure:substitute_signal', title: 'Departure substitute signal', type: array } + - { tag: 'railway:signal:departure:deactivated', title: 'Departure deactivated', type: boolean } + - { tag: 'railway:signal:distant', title: 'Distant' } + - { tag: 'railway:signal:distant:form', title: 'Distant form' } + - { tag: 'railway:signal:distant:repeated', title: 'Distant repeated', type: boolean } + - { tag: 'railway:signal:distant:shortened', title: 'Distant shortened', type: boolean } + - { tag: 'railway:signal:distant:states', title: 'Distant states', type: array } + - { tag: 'railway:signal:distant:height', title: 'Distant height' } + - { tag: 'railway:signal:distant:type', title: 'Distant type' } + - { tag: 'railway:signal:distant:distance', title: 'Distant distance' } + - { tag: 'railway:signal:distant:regime', title: 'Distant regime' } + - { tag: 'railway:signal:distant:deactivated', title: 'Distant deactivated', type: boolean } + - { tag: 'railway:signal:distant:shape', title: 'Distant shape' } + - { tag: 'railway:signal:electricity', title: 'Electricity' } + - { tag: 'railway:signal:electricity:type', title: 'Electricity type' } + - { tag: 'railway:signal:electricity:form', title: 'Electricity form' } + - { tag: 'railway:signal:electricity:for', title: 'Electricity for' } + - { tag: 'railway:signal:electricity:turn_direction', title: 'Electricity turn direction' } + - { tag: 'railway:signal:electricity:voltage', title: 'Electricity voltage', format: { template: '%d V' } } + - { tag: 'railway:signal:electricity:frequency', title: 'Electricity frequency', format: { template: '%.2d Hz' } } + - { tag: 'railway:signal:electricity:deactivated', title: 'Electricity deactivated', type: boolean } + - { tag: 'railway:signal:fouling_point', title: 'Fouling point' } + - { tag: 'railway:signal:fouling_point:deactivated', title: 'Fouling point deactivated', type: boolean } + - { tag: 'railway:signal:helper_engine', title: 'Helper engine' } + - { tag: 'railway:signal:helper_engine:form', title: 'Helper engine form' } + - { tag: 'railway:signal:helper_engine:deactivated', title: 'Helper engine deactivated', type: boolean } + - { tag: 'railway:signal:humping', title: 'Humping' } + - { tag: 'railway:signal:humping:form', title: 'Humping form' } + - { tag: 'railway:signal:humping:deactivated', title: 'Humping deactivated', type: boolean } + - { tag: 'railway:signal:main', title: 'Main' } + - { tag: 'railway:signal:main:design', title: 'Main design' } + - { tag: 'railway:signal:main:form', title: 'Main form' } + - { tag: 'railway:signal:main:height', title: 'Main height' } + - { tag: 'railway:signal:main:shape', title: 'Main shape' } + - { tag: 'railway:signal:main:lit_letter', title: 'Main lit letter' } + - { tag: 'railway:signal:main:states', title: 'Main states', type: array } + - { tag: 'railway:signal:main:substitute_signal', title: 'Main substitute signal', type: array } + - { tag: 'railway:signal:main:PT_priority', title: 'Main PT priority' } + - { tag: 'railway:signal:main:deactivated', title: 'Main PT priority', type: boolean } + - { tag: 'railway:signal:main_repeated', title: 'Main repeated' } + - { tag: 'railway:signal:main_repeated:form', title: 'Main repeated form' } + - { tag: 'railway:signal:main_repeated:magnet', title: 'Main repeated magnet', type: boolean } + - { tag: 'railway:signal:main_repeated:states', title: 'Main repeated states', type: array } + - { tag: 'railway:signal:main_repeated:substitute_signal', title: 'Main repeated substitute signal', type: array } + - { tag: 'railway:signal:main_repeated:deactivated', title: 'Main repeated deactivated', type: boolean } + - { tag: 'railway:signal:minor', title: 'Minor' } + - { tag: 'railway:signal:minor:form', title: 'Minor form' } + - { tag: 'railway:signal:minor:states', title: 'Minor states', type: array } + - { tag: 'railway:signal:minor:height', title: 'Minor height' } + - { tag: 'railway:signal:minor_distant', title: 'Minor distant' } + - { tag: 'railway:signal:minor_distant:form', title: 'Minor distant form' } + - { tag: 'railway:signal:minor_distant:states', title: 'Minor distant states', type: array } + - { tag: 'railway:signal:minor_distant:deactivated', title: 'Minor distant deactivated', type: boolean } + - { tag: 'railway:signal:minor:substitute_signal', title: 'Minor substitute signal', type: array } + - { tag: 'railway:signal:minor:deactivated', title: 'Minor deactivated', type: boolean } + - { tag: 'railway:signal:passing', title: 'Passing' } + - { tag: 'railway:signal:passing:form', title: 'Passing form' } + - { tag: 'railway:signal:passing:type', title: 'Passing type' } + - { tag: 'railway:signal:passing:deactivated', title: 'Passing deactivated', type: boolean } + - { tag: 'railway:signal:resetting_switch', title: 'Resetting switch' } + - { tag: 'railway:signal:resetting_switch:form', title: 'Resetting switch form' } + - { tag: 'railway:signal:resetting_switch:deactivated', title: 'Resetting deactivated', type: boolean } + - { tag: 'railway:signal:resetting_switch_distant', title: 'Resetting switch distant' } + - { tag: 'railway:signal:resetting_switch_distant:form', title: 'Resetting switch distant form' } + - { tag: 'railway:signal:resetting_switch_distant:deactivated', title: 'Resetting switch deactivated', type: boolean } + - { tag: 'railway:signal:preheating', title: 'Preheating' } + - { tag: 'railway:signal:preheating:form', title: 'Preheating form' } + - { tag: 'railway:signal:preheating:deactivated', title: 'Preheating deactivated' } + - { tag: 'railway:signal:ring', title: 'Ring' } + - { tag: 'railway:signal:ring:form', title: 'Ring form' } + - { tag: 'railway:signal:ring:only_transit', title: 'Ring only transit', type: boolean } + - { tag: 'railway:signal:ring:deactivated', title: 'Ring deactivated', type: boolean } + - { tag: 'railway:signal:radio', title: 'Radio' } + - { tag: 'railway:signal:radio:form', title: 'Radio form' } + - { tag: 'railway:signal:radio:frequency', title: 'Radio frequency' } + - { tag: 'railway:signal:radio:deactivated', title: 'Radio deactivated', type: boolean } + - { tag: 'railway:signal:route', title: 'Route' } + - { tag: 'railway:signal:route:design', title: 'Route design' } + - { tag: 'railway:signal:route:form', title: 'Route form' } + - { tag: 'railway:signal:route:states', title: 'Route states', type: array } + - { tag: 'railway:signal:route:deactivated', title: 'Route deactivated', type: boolean } + - { tag: 'railway:signal:route_distant', title: 'Route distant' } + - { tag: 'railway:signal:route_distant:form', title: 'Route distant form' } + - { tag: 'railway:signal:route_distant:shape', title: 'Route distant shape' } + - { tag: 'railway:signal:route_distant:states', title: 'Route distant states', type: array } + - { tag: 'railway:signal:route_distant:deactivated', title: 'Route distant deactivated', type: boolean } + - { tag: 'railway:signal:short_route', title: 'Short route' } + - { tag: 'railway:signal:short_route:form', title: 'Short route form' } + - { tag: 'railway:signal:short_route:shape', title: 'Short route shape' } + - { tag: 'railway:signal:short_route:deactivated', title: 'Short route deactivated', type: boolean } + - { tag: 'railway:signal:shunting', title: 'Shunting' } + - { tag: 'railway:signal:shunting:form', title: 'Shunting form' } + - { tag: 'railway:signal:shunting:states', title: 'Shunting states', type: array } + - { tag: 'railway:signal:shunting:shape', title: 'Shunting shape' } + - { tag: 'railway:signal:shunting:height', title: 'Shunting height' } + - { tag: 'railway:signal:shunting:deactivated', title: 'Shunting deactivated', type: boolean } + - { tag: 'railway:signal:shunting_route', title: 'Shunting Route' } + - { tag: 'railway:signal:shunting_route:form', title: 'Shunting Route form' } + - { tag: 'railway:signal:shunting_route:states', title: 'Shunting Route states', type: array } + - { tag: 'railway:signal:shunting_route:deactivated', title: 'Shunting Route deactivated', type: boolean } + - { tag: 'railway:signal:snowplow', title: 'Snowplow' } + - { tag: 'railway:signal:snowplow:form', title: 'Snowplow form' } + - { tag: 'railway:signal:snowplow:type', title: 'Snowplow type' } + - { tag: 'railway:signal:snowplow:deactivated', title: 'Snowplow deactivated', type: boolean } + - { tag: 'railway:signal:speed_limit', title: 'Speed limit' } + - { tag: 'railway:signal:speed_limit:caption', title: 'Speed limit caption' } + - { tag: 'railway:signal:speed_limit:form', title: 'Speed limit form' } + - { tag: 'railway:signal:speed_limit:speed', title: 'Speed limit speed', type: array } + - { tag: 'railway:signal:speed_limit:states', title: 'Speed limit states', type: array } + - { tag: 'railway:signal:speed_limit:pointing', title: 'Speed limit pointing' } + - { tag: 'railway:signal:speed_limit:deactivated', title: 'Speed limit deactivated', type: boolean } + - { tag: 'railway:signal:speed_limit_distant', title: 'Speed limit distant' } + - { tag: 'railway:signal:speed_limit_distant:form', title: 'Speed limit distant form' } + - { tag: 'railway:signal:speed_limit_distant:speed', title: 'Speed limit distant speed', type: array } + - { tag: 'railway:signal:speed_limit_distant:mobile', title: 'Speed limit distant mobile', type: boolean } + - { tag: 'railway:signal:speed_limit_distant:deactivated', title: 'Speed limit distant deactivated', type: boolean } + - { tag: 'railway:signal:speed_limit_distant:distance', title: 'Speed limit distant distance' } + - { tag: 'railway:signal:station_distant', title: 'Station distant' } + - { tag: 'railway:signal:station_distant:form', title: 'Station distant form' } + - { tag: 'railway:signal:station_distant:deactivated', title: 'Station distant deactivated', type: boolean } + - { tag: 'railway:signal:steam_locomotive', title: 'Steam locomotive' } + - { tag: 'railway:signal:steam_locomotive:form', title: 'Steam locomotive form' } + - { tag: 'railway:signal:steam_locomotive:deactivated', title: 'Steam locomotive deactivated', type: boolean } + - { tag: 'railway:signal:stop', title: 'Stop' } + - { tag: 'railway:signal:stop:form', title: 'Stop form' } + - { tag: 'railway:signal:stop:caption', title: 'Stop caption' } + - { tag: 'railway:signal:stop:states', title: 'Stop states', type: array } + - { tag: 'railway:signal:stop:carriages', title: 'Stop carriages', type: array } + - { tag: 'railway:signal:stop:deactivated', title: 'Stop deactivated', type: boolean } + - { tag: 'railway:signal:stop_distant', title: 'Stop distant' } + - { tag: 'railway:signal:stop_distant:form', title: 'Stop distant form' } + - { tag: 'railway:signal:stop_distant:distance', title: 'Stop distant distance' } + - { tag: 'railway:signal:stop_distant:deactivated', title: 'Stop distant deactivated' } + - { tag: 'railway:signal:stop_demand', title: 'Stop demand' } + - { tag: 'railway:signal:stop_demand:form', title: 'Stop demand form' } + - { tag: 'railway:signal:stop_demand:deactivated', title: 'Stop demand deactivated', type: boolean } + - { tag: 'railway:signal:switch', title: 'Switch' } + - { tag: 'railway:signal:switch:form', title: 'Switch form' } + - { tag: 'railway:signal:switch:states', title: 'Switch states', type: array } + - { tag: 'railway:signal:switch:deactivated', title: 'Switch deactivated', type: boolean } + - { tag: 'railway:signal:train_protection', title: 'Train protection' } + - { tag: 'railway:signal:train_protection:block_marker:type', title: 'Type of block marker' } + - { tag: 'railway:signal:train_protection:form', title: 'Train protection form' } + - { tag: 'railway:signal:train_protection:shape', title: 'Train protection shape' } + - { tag: 'railway:signal:train_protection:type', title: 'Train protection type' } + - { tag: 'railway:signal:train_protection:turn_direction', title: 'Train protection diverging direction' } + - { tag: 'railway:signal:train_protection:deactivated', title: 'Train protection deactivated', type: boolean } + - { tag: 'railway:signal:whistle', title: 'Whistle' } + - { tag: 'railway:signal:whistle:form', title: 'Whistle form' } + - { tag: 'railway:signal:whistle:only_transit', title: 'Whistle only transit', type: boolean } + - { tag: 'railway:signal:whistle:deactivated', title: 'Whistle deactivated', type: boolean } + - { tag: 'railway:signal:wrong_road', title: 'Wrong road' } + - { tag: 'railway:signal:wrong_road:form', title: 'Wrong road form' } + - { tag: 'railway:signal:wrong_road:deactivated', title: 'Wrong road deactivated', type: boolean } + - { tag: 'railway:vacancy_detection', title: 'Vacancy detection' } + - { tag: 'railway:signal:regime', title: 'Signal regime' } + - { tag: 'railway:signal:position', title: 'Position', description: 'Position of the signal in the direction facing the signal' } + +# A mapping of every type of signal that is imported +# Every type that is known in the tag array above should also be present here +# Every type is shown in a certain layer +types: + - { type: main, layer: signals } + - { type: combined, layer: signals } + - { type: distant, layer: signals } + - { type: train_protection, layer: signals } + - { type: main_repeated, layer: signals } + - { type: speed_limit, layer: speed } + - { type: speed_limit_distant, layer: speed } + - { type: minor, layer: signals } + - { type: minor_distant, layer: signals } + - { type: passing, layer: signals } + - { type: shunting, layer: signals } + - { type: shunting_route, layer: signals } + - { type: radio, layer: signals } + - { type: stop, layer: signals } + - { type: stop_distant, layer: signals } + - { type: stop_demand, layer: signals } + - { type: station_distant, layer: signals } + - { type: crossing, layer: signals } + - { type: crossing_distant, layer: signals } + - { type: crossing_info, layer: signals } + - { type: crossing_hint, layer: signals } + - { type: ring, layer: signals } + - { type: whistle, layer: signals } + - { type: electricity, layer: electrification } + - { type: departure, layer: signals } + - { type: switch, layer: signals } + - { type: resetting_switch, layer: signals } + - { type: resetting_switch_distant, layer: signals } + - { type: humping, layer: signals } + - { type: snowplow, layer: signals } + - { type: wrong_road, layer: signals } + - { type: short_route, layer: signals } + - { type: route, layer: signals } + - { type: route_distant, layer: signals } + - { type: brake_test, layer: signals } + - { type: helper_engine, layer: signals } + - { type: steam_locomotive, layer: signals } + - { type: fouling_point, layer: signals } + - { type: preheating, layer: signals } + +# The features below define a certain signal. +# For every type of feature, the feature will be determined. +# If the type is tagged on the signal (for example `railway:signal:main=QQ:blabla`) which does not match +# one of the features below, the signal will be marked as an "unknown signal" of that type. This allows +# viewers to view which signals exist, but are not defined yet in the features below, or mistagged in +# the OpenStreetMap data. +# Feature matching happens from top to bottom, where earlier matches are shown "lower" on the pole if one +# node defines more than one signal. +features: + + # --- General --- # + + - description: 'Vacancy detection: insulated rail joint' + icon: [ default: 'general/vacancy-detection-insulated-rail-joint' ] + tags: + - { tag: 'railway', value: 'vacancy_detection' } + - { tag: 'railway:vacancy_detection', value: 'insulated_rail_joint' } + + - description: 'Vacancy detection: axle counter' + icon: [ default: 'general/vacancy-detection-axle-counter' ] + tags: + - { tag: 'railway', value: 'vacancy_detection' } + - { tag: 'railway:vacancy_detection', value: 'axle_counter' } + + # --- AT --- # + + - description: Signalnachahmer with Ersatzsignal + country: AT + icon: + - match: 'railway:signal:main_repeated:magnet' + cases: + - { value: 'at/signalnachahmer-ersatzsignal-magnet', description: '1000Hz magnet' } + default: 'at/signalnachahmer-ersatzsignal' + tags: + - { tag: 'railway:signal:main_repeated', value: 'AT-V2:signalnachahmer' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + - { tag: 'railway:signal:main_repeated:substitute_signal', value: 'AT-V2:ersatzsignal' } + + - description: Signalnachahmer + country: AT + icon: + - match: 'railway:signal:main_repeated:magnet' + cases: + - { value: 'at/signalnachahmer-magnet', description: '1000Hz magnet' } + default: 'at/signalnachahmer' + tags: + - { tag: 'railway:signal:main_repeated', value: 'AT-V2:signalnachahmer' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Main entry sign Ne 1 + country: AT + icon: [ default: 'at/trapeztafel' ] + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:trapeztafel' } + - { tag: 'railway:signal:main:form', value: 'sign' } + + - description: Geschwindigkeitsvoranzeiger (sign) + country: AT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[02]|[1-9])0$', value: 'at/geschwindigkeitsvoranzeiger-sign-{}', example: 'at/geschwindigkeitsvoranzeiger-sign-{80}' } + default: 'at/geschwindigkeitsvoranzeiger-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:geschwindigkeitsvoranzeiger' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Geschwindigkeitsvoranzeiger (light) + country: AT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-4]|[2-9])0$', value: 'at/geschwindigkeitsvoranzeiger-light-{}', example: 'at/geschwindigkeitsvoranzeiger-light-{140}' } + default: 'at/geschwindigkeitsvoranzeiger-empty-light' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:geschwindigkeitsvoranzeiger' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: Ankündigungstafel + country: AT + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-4]0|10|[2-9][05])$', value: 'at/ankuendigungstafel-sign-{}', example: 'at/ankuendigungstafel-sign-{70}' } + default: 'at/ankuendigungstafel-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:ankündigungstafel' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Ankündigungssignal + country: AT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-6]0$', value: 'at/ankündigungssignal-{}', example: 'at/ankündigungssignal-{60}' } + default: 'at/ankündigungssignal-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:ankündigungssignal' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Ankündigung EK sicht + country: AT + icon: [ default: 'at/ankündigung-ek-sicht' ] + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'AT-V2:ankündigung_ek-sicht' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: distant (semaphore) + country: AT + icon: [ default: 'at/vorsicht-semaphore' ] + tags: + - { tag: 'railway:signal:distant', value: 'AT-V2:vorsignal' } + - { tag: 'railway:signal:distant:form', value: 'semaphore' } + + - description: Kreuztafel + country: AT + icon: [ default: 'at/kreuztafel' ] + tags: + - { tag: 'railway:signal:distant', value: 'AT-V2:kreuztafel' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: LZB Bereichskennzeichen + country: AT + icon: [ default: 'at/lzb-bereichskennzeichen' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AT-V2:lzb-bereichskennzeichen' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: distant (light) + country: AT + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'AT-V2:hauptsignal_frei_mit_60', value: 'at/vorsignal-hauptsignal-frei-mit-60', description: '60 km/h' } + - { any: [ 'AT-V2:hauptsignal_frei_mit_40', 'AT-V2:hauptsignal_frei_mit_20' ], value: 'at/vorsignal-hauptsignal-frei-mit-40', description: '20/40 km/h' } + - { exact: 'AT-V2:hauptsignal_frei', value: 'at/vorsignal-hauptsignal-frei', description: 'clear' } + default: 'at/vorsignal-vorsicht' + tags: + - { tag: 'railway:signal:distant', value: 'AT-V2:vorsignal' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Hauptsignal (abfahrt) + country: AT + icon: [ default: 'at/hauptsignal-abfahrt' ] + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Hauptsignal (semaphore) + country: AT + icon: + - match: 'railway:signal:main:states' + cases: + - { any: [ 'AT-V2:frei_mit_40', 'AT-V2:frei_mit_20' ], value: 'at/hauptsignal-frei_mit_40-semaphore', description: '20/40 km/h' } + - { exact: 'AT-V2:frei', value: 'at/hauptsignal-frei-semaphore', description: 'clear' } + default: 'at/hauptsignal-semaphore' + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: Hauptsignal mit verschubsignal & ersatzsignal + country: AT + icon: [ default: 'at/hauptsignal-verschubsignal-ersatzsignal' ] + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:substitute_signal', value: 'AT-V2:ersatzsignal' } + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubsignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Hauptsignal mit verschubsignal & vorsichtssignal + country: AT + icon: [ default: 'at/hauptsignal-verschubsignal-vorsichtssignal' ] + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:substitute_signal', value: 'AT-V2:vorsichtssignal' } + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubsignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Hauptsignal mit verschubsignal + country: AT + icon: [ default: 'at/hauptsignal-verschubsignal' ] + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubsignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Hauptsignal mit ersatzsignal (light) + country: AT + icon: + # TODO handle railway:signal:main:function=exit (AS) + # TODO handle railway:signal:main:function=entry (ES) + - match: 'railway:signal:main:states' + cases: + - { exact: 'AT-V2:frei_mit_60', value: 'at/hauptsignal-ersatzsignal-frei-mit-60', description: '60 km/h' } + - { any: [ 'AT-V2:frei_mit_20', 'AT-V2:frei_mit_40' ], value: 'at/hauptsignal-ersatzsignal-frei-mit-40', description: '20/40 km/h' } + - { exact: 'AT-V2:frei', value: 'at/hauptsignal-ersatzsignal-frei', description: 'clear' } + default: 'at/hauptsignal-ersatzsignal-halt' + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:substitute_signal', value: 'AT-V2:ersatzsignal' } + + - description: Hauptsignal mit vorsichtssignal (light) + country: AT + icon: + # TODO handle railway:signal:main:function=exit (AS) + # TODO handle railway:signal:main:function=entry (ES) + - match: 'railway:signal:main:states' + cases: + - { exact: 'AT-V2:frei_mit_60', value: 'at/hauptsignal-vorsichtssignal-frei-mit-60', description: '60 km/h' } + - { any: [ 'AT-V2:frei_mit_20', 'AT-V2:frei_mit_40' ], value: 'at/hauptsignal-vorsichtssignal-frei-mit-40', description: '20/40 km/h' } + - { exact: 'AT-V2:frei', value: 'at/hauptsignal-vorsichtssignal-frei', description: 'clear' } + default: 'at/hauptsignal-vorsichtssignal-halt' + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:substitute_signal', value: 'AT-V2:vorsichtssignal' } + + - description: Hauptsignal (light) + country: AT + icon: + # TODO handle railway:signal:main:function=exit (AS) + # TODO handle railway:signal:main:function=entry (ES) + - match: 'railway:signal:main:states' + cases: + - { exact: 'AT-V2:frei_mit_60', value: 'at/hauptsignal-frei-mit-60', description: '60 km/h' } + - { any: [ 'AT-V2:frei_mit_20', 'AT-V2:frei_mit_40' ], value: 'at/hauptsignal-frei-mit-40', description: '20/40 km/h' } + - { exact: 'AT-V2:frei', value: 'at/hauptsignal-frei', description: 'clear' } + default: 'at/hauptsignal-halt' + tags: + - { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Sperrsignale (sign) + country: AT + icon: [ default: 'at/weiterfahrt-verboten' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:weiterfahrt_verboten' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Sperrsignale (semaphore) + country: AT + icon: [ default: 'at/weiterfahrt-erlaubt' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:sperrsignal' } + - { tag: 'railway:signal:minor:form', value: 'semaphore' } + + - description: Schutzsignal (abfahrt) + country: AT + icon: [ default: 'at/schutzsignal-abfahrt' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:schutzsignal' } + - { tag: 'railway:signal:minor:form', value: 'light' } + - { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Schutzsignal + country: AT + icon: [ default: 'at/schutzsignal' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:schutzsignal' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Fahrwegende + country: AT + icon: [ default: 'at/fahrwegende' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:fahrwegende' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Haltscheibe + country: AT + icon: [ default: 'at/haltscheibe' ] + tags: + - { tag: 'railway:signal:minor', value: 'AT-V2:haltscheibe' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Verschubsignal + country: AT + icon: + - match: 'railway:signal:shunting:height' + cases: + - { exact: 'dwarf', value: 'at/verschubsignal-dwarf', description: 'zwerg' } + default: 'at/verschubsignal' + tags: + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubsignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Verschubhalttafel + country: AT + icon: [ default: 'at/verschubhalttafel' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AT-V2:verschubhalttafel' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Wartesignal mit "Verschubverbot aufgehoben" + country: AT + icon: [ default: 'at/wartesignal-verschubverbot-aufgehoben' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AT-V2:wartesignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Wartesignal ohne "Verschubverbot aufgehoben" + country: AT + icon: [ default: 'at/wartesignal' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AT-V2:wartesignal' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Bedarfshalt + country: AT + icon: [ default: 'at/bedarfshalt' ] + tags: + - { tag: 'railway:signal:stop_demand', value: 'AT:bedarfshalt-signal' } + - { tag: 'railway:signal:stop_demand:form', value: 'light' } + + - description: Haltestellentafel + country: AT + icon: [ default: 'at/haltestellentafel' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'AT-V2:haltestellentafel' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Überwachungssignal + country: AT + icon: [ default: 'at/ek_gesichert' ] + tags: + - { tag: 'railway:signal:crossing', value: 'AT-V2:ek_überwachungssignal' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Rautentafel + country: AT + icon: [ default: 'at/rautentafel' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'AT-V2:rautentafel' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: Pfeifpflock + country: AT + icon: [ default: 'at/pfeifpflock' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AT-V2:pfeifpflock' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Gruppenpfeifpflock + country: AT + icon: [ default: 'at/gruppenpfeifpflock' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AT-V2:gruppenpfeifpflock' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Endpflock + country: AT + icon: [ default: 'at/endpflock' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AT-V2:endpflock' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Weichenüberwachungssignal (PLB) + country: AT + icon: [ default: 'at/weichenüberwachungssignal_plb' ] + tags: + - { tag: 'railway:signal:resetting_switch', value: 'AT:weichenüberwachungssignal_plb' } + - { tag: 'railway:signal:resetting_switch:form', value: 'light' } + + - description: Zuglaufmeldestelle (SLB) + country: AT + icon: [ default: 'at/zuglaufmeldestelle' ] + tags: + - { tag: 'railway:signal:stop', value: 'AT-SLB:zuglaufmeldestelle' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: EK poor sight (GKB) + country: AT + icon: [ default: 'at/ek-60' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AT-GKB:ek_60' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit', value: 'AT-GKB:ek_60' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Haltepunkt + country: AT + icon: [ default: 'at/haltepunkt' ] + tags: + - { tag: 'railway:signal:stop', value: 'AT-V2:haltepunkt' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Abfahrt + country: AT + icon: [ default: 'at/abfahrt' ] + tags: + - { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Fahrerlaubnissignal + country: AT + icon: [ default: 'at/fahrerlaubnis' ] + tags: + - { tag: 'railway:signal:departure', value: 'AT-V2:fahrerlaubnissignal' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Geschwindigkeitsanzeiger (sign) + country: AT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(1[0-6]|[1-9])0$', value: 'at/geschwindigkeitsanzeiger-sign-{}', example: 'at/geschwindigkeitsanzeiger-sign-{160}' } + default: 'at/geschwindigkeitsanzeiger-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:geschwindigkeitsanzeiger' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Geschwindigkeitsanzeiger (light) + country: AT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(1[024]|[2-9])0$', value: 'at/geschwindigkeitsanzeiger-light-{}', example: 'at/geschwindigkeitsanzeiger-light-{120}' } + default: 'at/geschwindigkeitsanzeiger-empty-light' + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:geschwindigkeitsanzeiger' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Geschwindigkeitstafel + country: AT + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(1[0-6]0|[1-9][05]|5)$', value: 'at/geschwindigkeitstafel-sign-{}', example: 'at/geschwindigkeitstafel-sign-{60}' } + default: 'at/geschwindigkeitstafel-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:geschwindigkeitstafel' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Salzburger Lokalbahn & Pinzgauer Lokalbahn X40 + country: AT + icon: [ default: 'at/x40' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-SLB:x40' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Anfangssignal + country: AT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-6]0$', value: 'at/anfangssignal-{}', example: 'at/anfangssignal-{60}' } + default: 'at/anfangssignal-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:anfangssignal' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Endsignal + country: AT + icon: [ default: 'at/endsignal' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:endsignal' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: EK sicht Pfeiftafel + country: AT + icon: [ default: 'at/ek-sicht-pfeiftafel' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'AT-V2:ek-sicht_pfeiftafel' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Ankündigung Stromabnehmer tief + country: AT + icon: [ default: 'at/ankündigung_stromabnehmer_tief' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:ankündigung_stromabnehmer_tief' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Ankündigung Hauptschalter aus + country: AT + icon: [ default: 'at/ankündigung_hauptschalter_aus' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:ankündigung_hauptschalter_aus' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + + - description: Halt für Fahrzeuge mit angehobenem Stromabnehmer + country: AT + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'left', value: 'at/halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer-left' } + - { exact: 'through', value: 'at/halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer-through' } + - { exact: 'right', value: 'at/halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer-right' } + default: 'at/halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer' + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:halt_fuer_fahrzeuge_mit_angehobenem_stromabnehmer' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light', 'semaphore' ] } + + - description: Hauptschalter ein + country: AT + icon: [ default: 'at/hauptschalter_ein' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:hauptschalter_ein' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Stromabnehmer hoch + country: AT + icon: [ default: 'at/stromabnehmer_hoch' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:stromabnehmer_hoch' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Hauptschalter aus + country: AT + icon: [ default: 'at/hauptschalter_aus' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:hauptschalter_aus' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + + - description: Stromabnehmer tief + country: AT + icon: [ default: 'at/stromabnehmer_tief' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:stromabnehmer_tief' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Bahnhof Streckentrennung anfang + country: AT + icon: [ default: 'at/bahnhof-streckentrennung_anfang' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:bahnhof-streckentrennung_anfang' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Bahnhof Streckentrennung ende + country: AT + icon: [ default: 'at/bahnhof-streckentrennung_ende' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:bahnhof-streckentrennung_ende' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Schaltzeiger + country: AT + icon: [ default: 'at/schaltzeiger' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AT-V2:schaltzeiger' } + - { tag: 'railway:signal:electricity:type', value: 'power_indicator' } + - { tag: 'railway:signal:electricity:form', value: 'semaphore' } + + - description: Räumarbeit aufnehmen + country: AT + icon: [ default: 'at/räumarbeit-aufnehmen' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'AT-V2:räumarbeit_aufnehmen' } + - { tag: 'railway:signal:snowplow:type', value: 'down' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Mittelräumer heben + country: AT + icon: [ default: 'at/mittelräumer-heben' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'AT-V2:mittelräumer_heben' } + - { tag: 'railway:signal:snowplow:type', value: 'up' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Räumarbeit einstellen + country: AT + icon: [ default: 'at/räumarbeit-einstellen' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'AT-V2:räumarbeit_einstellen' } + - { tag: 'railway:signal:snowplow:type', value: 'up' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Abdrucksignal + country: AT + icon: [ default: 'at/abdrucksignal' ] + tags: + - { tag: 'railway:signal:humping', value: 'AT-V2:abdrucksignal' } + - { tag: 'railway:signal:humping:form', value: 'light' } + + # --- AU --- # + + # --- AU-NSW-Metro --- # + + - description: Location Marker Board + country: AU + icon: [ default: 'au/nsw/metro/location' ] + tags: + - { tag: 'railway:signal:minor', value: 'AU:MNWSW:location' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Point Position Indicator + country: AU + icon: [ default: 'au/nsw/metro/points_indiciator' ] + tags: + - { tag: 'railway:signal:main', value: 'AU:MNWSW:points_indiciator' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Route Indicator + country: AU + icon: [ default: 'au/nsw/metro/route_indicator' ] + tags: + - { tag: 'railway:signal:route', value: 'AU:MNWSW:route_indicator' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Fixed Red + country: AU + icon: [ default: 'au/nsw/metro/fixed_red' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:MNWSW:fixed_red' } + - { tag: 'railway:signal:stop:form', value: 'light' } + + - description: Points Cleared + country: AU + icon: [ default: 'au/nsw/metro/points_cleared' ] + tags: + - { tag: 'railway:signal:fouling_point', value: 'AU:MNWSW:points_cleared' } + + # --- AU-LightRail-signs --- # + + - description: Coast Off + country: AU + icon: [ default: 'au/LightRail/signs/coast_off' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:coast_off' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Coast On + country: AU + icon: [ default: 'au/LightRail/signs/coast_on' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:coast_on' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: CS + country: AU + icon: [ default: 'au/LightRail/signs/CS' ] + tags: + - { tag: 'railway:signal:minor', value: 'AU:LightRail:NSW:CS' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Train Detector + country: AU + icon: [ default: 'au/LightRail/signs/D' ] + tags: + - { tag: 'railway:signal:minor', value: 'AU:LightRail:NSW:D' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Fixed Red + country: AU + icon: [ default: 'au/LightRail/signs/fixed_red' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:LightRail:fixed_red' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Shunting Limit + country: AU + icon: [ default: 'au/LightRail/signs/LM' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AU:LightRail:NSW:LM' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Lower APS + country: AU + icon: [ default: 'au/LightRail/signs/lower_APS' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:lower_APS' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Lower OESS + country: AU + icon: [ default: 'au/LightRail/signs/lower_OESS' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:lower_OESS' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Lower OHW + country: AU + icon: [ default: 'au/LightRail/signs/lower_OHW' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:lower_OHW' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Raise APS + country: AU + icon: [ default: 'au/LightRail/signs/raise_APS' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:raise_APS' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Raise OESS + country: AU + icon: [ default: 'au/LightRail/signs/raise_OESS' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:raise_OESS' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Raise OHW + country: AU + icon: [ default: 'au/LightRail/signs/raise_OHW' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:LightRail:NSW:raise_OHW' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Ready to Start + country: AU + icon: [ default: 'au/LightRail/signs/RTS' ] + tags: + - { tag: 'railway:signal:departure', value: 'AU:LightRail:NSW:RTS' } + - { tag: 'railway:signal:departure:form', value: 'sign' } + + - description: Set Route + country: AU + icon: [ default: 'au/LightRail/signs/set_route_ACT' ] + tags: + - { tag: 'railway:signal:route', value: 'AU:LightRail:ACT:set_route' } + - { tag: 'railway:signal:route:form', value: 'sign' } + + - description: Set Route + country: AU + icon: [ default: 'au/LightRail/signs/set_route_NSW' ] + tags: + - { tag: 'railway:signal:route', value: 'AU:LightRail:NSW:set_route' } + - { tag: 'railway:signal:route:form', value: 'sign' } + + - description: Shunting Limit + country: AU + icon: [ default: 'au/LightRail/signs/SL' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AU:LightRail:NSW:SL' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Stop + country: AU + icon: [ default: 'au/LightRail/signs/stop' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:LightRail:NSW:stop' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop with Instruction + country: AU + icon: [ default: 'au/LightRail/signs/SWI' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:LightRail:NSW:SWI' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Shunting Zone + country: AU + icon: [ default: 'au/LightRail/signs/SZ' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AU:LightRail:NSW:SZ' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + # --- AU-LightRail-Signals --- # + + - description: Ground Signal + country: AU + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'stop', value: 'au/LightRail/signals/ground-stop' } + default: 'au/LightRail/signals/ground-clear' + tags: + - { tag: 'railway:signal:main', value: 'AU:LightRail:NSW:ground' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Route Indicator + country: AU + icon: [ default: 'au/LightRail/signals/route_indicator' ] + tags: + - { tag: 'railway:signal:route', value: 'AU:LightRail:route_indicator' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Signal + country: AU + icon: [ default: 'au/LightRail/signals/NSW_SI' ] + tags: + - { tag: 'railway:signal:main', value: 'AU:LightRail:NSW:SI' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Points Indicator + country: AU + icon: [ default: 'au/LightRail/signals/NSW_PI' ] + tags: + - { tag: 'railway:signal:main', value: 'AU:LightRail:NSW:PI' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Points Indicator + country: AU + exampleIcon: au/LightRail/signals/PI/straight + icon: + - match: 'railway:signal:minor:states' + cases: + - { exact: 'stop', value: 'au/LightRail/signals/PI/stop' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'stop_red', value: 'au/LightRail/signals/PI/stop_red' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'straight', value: 'au/LightRail/signals/PI/straight' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'right', value: 'au/LightRail/signals/PI/right' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'left', value: 'au/LightRail/signals/PI/left' } + position: bottom + tags: + - { tag: 'railway:signal:minor', value: 'AU:LightRail:PI' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Signal Operated Points Indicator + country: AU + exampleIcon: au/LightRail/signals/SPI/straight + icon: + - match: 'railway:signal:minor:states' + cases: + - { exact: 'locked', value: 'au/LightRail/signals/SPI/locked' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'straight', value: 'au/LightRail/signals/SPI/straight' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'right', value: 'au/LightRail/signals/SPI/right' } + position: bottom + + - match: 'railway:signal:minor:states' + cases: + - { exact: 'left', value: 'au/LightRail/signals/SPI/left' } + position: bottom + tags: + - { tag: 'railway:signal:minor', value: 'AU:LightRail:SPI' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Signal System Lanterns + country: AU + exampleIcon: au/LightRail/signals/SI/straight + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'stop', value: 'au/LightRail/signals/SI/stop' } + position: bottom + + - match: 'railway:signal:main:states' + cases: + - { exact: 'straight', value: 'au/LightRail/signals/SI/straight' } + position: bottom + + - match: 'railway:signal:main:states' + cases: + - { exact: 'right', value: 'au/LightRail/signals/SI/right' } + position: bottom + + - match: 'railway:signal:main:states' + cases: + - { exact: 'left', value: 'au/LightRail/signals/SI/left' } + position: bottom + + - match: 'railway:signal:main:states' + cases: + - { exact: 'error', value: 'au/LightRail/signals/SI/error' } + position: bottom + + - match: 'railway:signal:main:states' + cases: + - { exact: 'warning', value: 'au/LightRail/signals/SI/warning' } + position: bottom + tags: + - { tag: 'railway:signal:main', value: 'AU:LightRail:SI' } + - { tag: 'railway:signal:main:form', value: 'light' } + + # --- AU-NSW-signs --- # + + - description: Alert + country: AU + icon: [ default: 'au/nsw/signs/alert' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'AU:NSW:alert' } + - { tag: 'railway:signal:main_repeated:form', value: 'sign' } + + - description: Begin ATP + country: AU + icon: [ default: 'au/nsw/signs/begin_ATP' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:begin_ATP' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Begin Single Light Indication + country: AU + icon: [ default: 'au/nsw/signs/begin_single_light' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:begin_single_light' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Begin Train Order Working + country: AU + icon: [ default: 'au/nsw/signs/begin_TOW' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:begin_TOW' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Block Join + country: AU + icon: [ default: 'au/nsw/signs/block_join' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:NSW:block_join' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Catch Point + country: AU + icon: [ default: 'au/nsw/signs/catch_point' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:catch_point' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Derail + country: AU + icon: [ default: 'au/nsw/signs/derail' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:derail' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Electric Train Stop + country: AU + icon: [ default: 'au/nsw/signs/electric_limit' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:NSW:electric_limit' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: End ATP + country: AU + icon: [ default: 'au/nsw/signs/end_ATP' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:end_ATP' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: End Signalled Authority + country: AU + icon: [ default: 'au/nsw/signs/end_signalled_authority' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:end_signalled_authority' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: End Single Light Indication + country: AU + icon: [ default: 'au/nsw/signs/end_single_light' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:end_single_light' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: End Train Order Working + country: AU + icon: [ default: 'au/nsw/signs/end_TOW' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:end_TOW' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: End Yard Limit + country: AU + icon: [ default: 'au/nsw/signs/EYL' ] + tags: + - { tag: 'railway:signal:departure', value: 'AU:NSW:EYL' } + - { tag: 'railway:signal:departure:form', value: 'sign' } + + - description: Landmark + country: AU + icon: [ default: 'au/nsw/signs/landmark' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'AU:NSW:landmark' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Loading Gauge Limit + country: AU + icon: [ default: 'au/nsw/signs/loading_gauge' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:loading_gauge' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Location + country: AU + icon: [ default: 'au/nsw/signs/location' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'AU:NSW:location' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: No Whistle + country: AU + icon: [ default: 'au/nsw/signs/no_whistle' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AU:NSW:no_whistle' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Points Cleared + country: AU + icon: [ default: 'au/nsw/signs/points_cleared' ] + tags: + - { tag: 'railway:signal:fouling_point', value: 'AU:NSW:points_cleared' } + + - description: Shunting Limit + country: AU + icon: [ default: 'au/nsw/signs/shunting_limit' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AU:NSW:shunting_limit' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Signalised Level Crossing + country: AU + icon: [ default: 'au/nsw/signs/signalised' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'AU:NSW:signalised' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + - description: Stop Position + country: AU + exampleIcon: 'au/nsw/signs/stop_position/unknown' + icon: + - match: 'railway:signal:stop:states' + cases: + - { any: [ 'X', 'XPT', 'XPL' ], value: 'au/nsw/signs/stop_position/X' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '10', value: 'au/nsw/signs/stop_position/10' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '8', value: 'au/nsw/signs/stop_position/8' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '8H', value: 'au/nsw/signs/stop_position/8H' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '8V', value: 'au/nsw/signs/stop_position/8V' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '6', value: 'au/nsw/signs/stop_position/6' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '6V', value: 'au/nsw/signs/stop_position/6V' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '4', value: 'au/nsw/signs/stop_position/4' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { any: ['4H', 'H4'], value: 'au/nsw/signs/stop_position/4H' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '4V', value: 'au/nsw/signs/stop_position/4V' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { exact: '2', value: 'au/nsw/signs/stop_position/2' } + position: bottom + - match: 'railway:signal:stop:states' + cases: + - { any: ['2C', 'C2'], value: 'au/nsw/signs/stop_position/2C' } + position: bottom + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:stop_position' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop + country: AU + icon: [ default: 'au/nsw/signs/stop' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:stop' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Unelectrified Turnout + country: AU + icon: [ default: 'au/nsw/signs/turnout' ] + tags: + - { tag: 'railway:signal:electricity', value: 'AU:NSW:turnout' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Unsignalised Level Crossing + country: AU + icon: [ default: 'au/nsw/signs/unsignalised' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'AU:NSW:unsignalised' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + - description: Whistle + country: AU + icon: [ default: 'au/nsw/signs/whistle' ] + tags: + - { tag: 'railway:signal:whistle', value: 'AU:NSW:whistle' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Yard Limit + country: AU + icon: [ default: 'au/nsw/signs/YL' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'AU:NSW:YL' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + # --- AU-NSW-signals --- # + + # shunt + - description: Shunt Signal + country: AU + icon: + - match: 'railway:signal:shunting:shape' + cases: + - { exact: 'vertical', value: 'au/nsw/signals/shunt_vertical' } + default: 'au/nsw/signals/shunt_box' + tags: + - { tag: 'railway:signal:shunting', value: 'AU:NSW:shunt' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Intermediate Shunt Signal Signal + country: AU + icon: + - match: 'railway:signal:shunting:shape' + cases: + - { exact: 'vertical', value: 'au/nsw/signals/shunt_vertical_int' } + default: 'au/nsw/signals/shunt_box_int' + tags: + - { tag: 'railway:signal:shunting', value: 'AU:NSW:intermediate' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Facing Points Indicator + country: AU + icon: [ default: 'au/nsw/signals/points_indicator_facing' ] + tags: + - { tag: 'railway:signal:switch', value: 'AU:NSW:facing_points' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: Trailing Points Indicator + country: AU + icon: [ default: 'au/nsw/signals/points_indicator_trailing' ] + tags: + - { tag: 'railway:signal:switch', value: 'AU:NSW:trailing_points' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + # repeaters + - description: LED Repeater + country: AU + icon: [ default: 'au/nsw/signals/LED_repeater' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'AU:NSW:LED_repeater' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + # other + - description: End of Track + country: AU + icon: [ default: 'au/nsw/signals/end_of_track_R' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:end_of_track' } + - { tag: 'railway:signal:stop:form', value: 'light' } + - { tag: 'railway:signal:stop:states', value: 'R' } + + - description: End of Track + country: AU + icon: [ default: 'au/nsw/signals/end_of_track_WR' ] + tags: + - { tag: 'railway:signal:stop', value: 'AU:NSW:end_of_track' } + - { tag: 'railway:signal:stop:form', value: 'light' } + - { tag: 'railway:signal:stop:states', value: 'WR' } + + - description: Guards Indicator + country: AU + icon: [ default: 'au/nsw/signals/guards_indicator' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'AU:NSW:guards_indicator' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Warning Light + country: AU + icon: [ default: 'au/nsw/signals/warning_light_bulb' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:warning_light' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + - { tag: 'railway:signal:train_protection:shape', value: 'bulb' } + + - description: Warning Light + country: AU + icon: [ default: 'au/nsw/signals/warning_light_array' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:warning_light' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + - { tag: 'railway:signal:train_protection:shape', value: 'array' } + + # main/distant + subsidiaries + - description: Tonnage Light + country: AU + icon: [ default: 'au/nsw/signals/tonnage' ] + tags: + - { tag: 'railway:signal:helper_engine', value: 'AU:NSW:tonnage' } + - { tag: 'railway:signal:helper_engine:form', value: 'light' } + + - description: Automatic Light + country: AU + icon: [ default: 'au/nsw/signals/automatic' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'AU:NSW:A' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + + - description: Dead End Siding (Right) + country: AU + icon: [ default: 'au/nsw/signals/dead_end_right' ] + tags: + - { tag: 'railway:signal:short_route', value: 'AU:NSW:dead_end' } + - { tag: 'railway:signal:short_route:form', value: 'light' } + - { tag: 'railway:signal:short_route:shape', value: 'right' } + + - description: Dead End Siding (Left) + country: AU + icon: [ default: 'au/nsw/signals/dead_end_left' ] + tags: + - { tag: 'railway:signal:short_route', value: 'AU:NSW:dead_end' } + - { tag: 'railway:signal:short_route:form', value: 'light' } + - { tag: 'railway:signal:short_route:shape', value: 'left' } + + - description: Calling-On / Shunt Ahead + country: AU + icon: [ default: 'au/nsw/signals/subsidiary' ] + tags: + - { tag: 'railway:signal:shunting', value: 'AU:NSW:subsidiary' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + + - description: Shunt Route Indicator + country: AU + icon: [ default: 'au/nsw/signals/stencil' ] + tags: + - { tag: 'railway:signal:shunting_route', value: 'AU:NSW:stencil' } + - { tag: 'railway:signal:shunting_route:form', value: 'light' } + + - description: Close Up + country: AU + icon: [ default: 'au/nsw/signals/close_up' ] + tags: + - { tag: 'railway:signal:minor', value: 'AU:NSW:close_up' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Low Speed + country: AU + icon: [ default: 'au/nsw/signals/low_speed' ] + tags: + - { tag: 'railway:signal:minor', value: 'AU:NSW:low_speed' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Turnout Route + country: AU + icon: + - match: 'railway:signal:switch:states' + cases: + - { all: ['right', 'left'], value: 'au/nsw/signals/turnout_both' } + - { exact: 'right', value: 'au/nsw/signals/turnout_right', description: 'right' } + - { exact: 'left', value: 'au/nsw/signals/turnout_left', description: 'left' } + default: 'au/nsw/signals/turnout_off' + tags: + - { tag: 'railway:signal:switch', value: 'AU:NSW:turnout_route' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: Mainline Indicator – Turnout + country: AU + icon: + - match: 'railway:signal:switch:states' + cases: + - { all: ['right', 'left'], value: 'au/nsw/signals/MLI/turnout_both' } + - { exact: 'right', value: 'au/nsw/signals/MLI/turnout_right', description: 'right' } + - { exact: 'left', value: 'au/nsw/signals/MLI/turnout_left', description: 'left' } + default: 'au/nsw/signals/MLI/turnout_off' + tags: + - { tag: 'railway:signal:switch', value: 'AU:NSW:MLI_turnout' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: Mainline Indicator + country: AU + icon: + - match: 'railway:signal:minor:states' + cases: + - { exact: 'WYR', value: 'au/nsw/signals/MLI/WYR', description: 'WYR' } + - { exact: 'WR', value: 'au/nsw/signals/MLI/WR', description: 'WR' } + default: 'au/nsw/signals/MLI/unknown' + tags: + - { tag: 'railway:signal:minor', value: 'AU:NSW:MLI' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Distant Signal (searchlight) + country: AU + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'GYR', value: 'au/nsw/signals/distant/searchlight/GYR', description: 'GYR' } + - { exact: 'GR', value: 'au/nsw/signals/distant/searchlight/GR', description: 'GR' } + - { exact: 'YR', value: 'au/nsw/signals/distant/searchlight/YR', description: 'YR' } + - { exact: 'R', value: 'au/nsw/signals/distant/searchlight/R', description: 'R' } + - { exact: 'GYRg', value: 'au/nsw/signals/distant/searchlight/GYRg', description: 'GYRg' } + - { exact: 'GRg', value: 'au/nsw/signals/distant/searchlight/GRg', description: 'GRg' } + - { exact: 'YRg', value: 'au/nsw/signals/distant/searchlight/YRg', description: 'YRg' } + default: 'au/nsw/signals/distant/searchlight/unknown' + tags: + - { tag: 'railway:signal:distant', value: 'AU:NSW:distant' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:shape', value: 'searchlight' } + + - description: Distant Signal + country: AU + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'GYR', value: 'au/nsw/signals/distant/multi-unit/GYR', description: 'GYR' } + - { exact: 'GR', value: 'au/nsw/signals/distant/multi-unit/GR', description: 'GR' } + - { exact: 'YR', value: 'au/nsw/signals/distant/multi-unit/YR', description: 'YR' } + - { exact: 'R', value: 'au/nsw/signals/distant/multi-unit/R', description: 'R' } + - { exact: 'GYRg', value: 'au/nsw/signals/distant/multi-unit/GYRg', description: 'GYRg' } + - { exact: 'GRg', value: 'au/nsw/signals/distant/multi-unit/GRg', description: 'GRg' } + - { exact: 'YRg', value: 'au/nsw/signals/distant/multi-unit/YRg', description: 'YRg' } + - { exact: 'GY', value: 'au/nsw/signals/distant/multi-unit/GY', description: 'GY' } + default: 'au/nsw/signals/distant/multi-unit/unknown' + tags: + - { tag: 'railway:signal:distant', value: 'AU:NSW:distant' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Distant Signal (semaphore) + country: AU + icon: [ default: 'au/nsw/signals/distant/semaphore/GY' ] + tags: + - { tag: 'railway:signal:distant', value: 'AU:NSW:distant' } + - { tag: 'railway:signal:distant:form', value: 'semaphore' } + + + - description: Main Signal (searchlight) + country: AU + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'GYR', value: 'au/nsw/signals/main/searchlight/GYR', description: 'GYR' } + - { exact: 'GR', value: 'au/nsw/signals/main/searchlight/GR', description: 'GR' } + - { exact: 'YR', value: 'au/nsw/signals/main/searchlight/YR', description: 'YR' } + - { exact: 'R', value: 'au/nsw/signals/main/searchlight/R', description: 'R' } + - { exact: 'G', value: 'au/nsw/signals/main/searchlight/G', description: 'G' } + default: 'au/nsw/signals/main/searchlight/unknown' + tags: + - { tag: 'railway:signal:main', value: 'AU:NSW:main' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'searchlight' } + + - description: Main Signal + country: AU + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'GYR', value: 'au/nsw/signals/main/multi-unit/GYR', description: 'GYR' } + - { exact: 'GR', value: 'au/nsw/signals/main/multi-unit/GR', description: 'GR' } + - { exact: 'YR', value: 'au/nsw/signals/main/multi-unit/YR', description: 'YR' } + - { exact: 'R', value: 'au/nsw/signals/main/multi-unit/R', description: 'R' } + - { exact: 'G', value: 'au/nsw/signals/main/multi-unit/G', description: 'G' } + default: 'au/nsw/signals/main/multi-unit/unknown' + tags: + - { tag: 'railway:signal:main', value: 'AU:NSW:main' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Main Signal (semaphore) + country: AU + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'GYR', value: 'au/nsw/signals/main/semaphore/GYR', description: 'Upper quadrant' } + - { exact: 'GR', value: 'au/nsw/signals/main/semaphore/GR', description: 'Lower quadrant' } + default: 'au/nsw/signals/main/semaphore/unknown' + tags: + - { tag: 'railway:signal:main', value: 'AU:NSW:main' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: Mainline Route Indicator + country: AU + icon: [ default: 'au/nsw/signals/route_indicator' ] + tags: + - { tag: 'railway:signal:route', value: 'AU:NSW:theatre_box' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Turnout Repeater + country: AU + icon: [ default: 'au/nsw/signals/route_distant_theatre_box' ] + tags: + - { tag: 'railway:signal:route_distant', value: 'AU:NSW:turnout_repeater' } + - { tag: 'railway:signal:route_distant:form', value: 'light' } + - { tag: 'railway:signal:route_distant:shape', value: 'theatre_box' } + + - description: Turnout Repeater (feather-style) + country: AU + icon: [ default: 'au/nsw/signals/route_distant_feather' ] + tags: + - { tag: 'railway:signal:route_distant', value: 'AU:NSW:turnout_repeater' } + - { tag: 'railway:signal:route_distant:form', value: 'light' } + - { tag: 'railway:signal:route_distant:shape', value: 'feather' } + + # --- BE --- # + + - description: Speed limit light (part of main signal) + country: BE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([4-9]0)$', value: 'be/VIS-{}', example: 'be/VIS-{60}' } + default: 'be/VIS-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:VIS' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Reference speed + country: BE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[4-9]0$|^1[0-6]0$', value: 'be/PVR-{}', example: 'be/PVR-{120}' } + default: 'be/PVR-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:PVR' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Announcement of a speed limit + country: BE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^5$|^[0-9]0$|^1[0-5]0$', value: 'be/PVA-{}', example: 'be/PVA-{90}' } + default: 'be/PVA-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'BE:PVA' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Beginning of a speed limit + country: BE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^5$|^[0-9]0$|^1[0-5]0$', value: 'be/PVO-{}', example: 'be/PVO-{100}' } + default: 'be/PVO-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:PVO' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Higher speed limit below reference speed + country: BE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^5$|^[0-9]0$|^1[0-5]0$', value: 'be/PVJ-{}', example: 'be/PVJ-{60}' } + default: 'be/PVJ-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:PVJ' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Higher speed limit for some traffic + country: BE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^5$|^[0-9]0$|^1[0-5]0$', value: 'be/PVV-{}', example: 'be/PVV-{60}' } + default: 'be/PVV-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:PVV' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Speed sign for distant signal + country: BE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^90$', value: 'be/PVSA-{}', example: 'be/PVSA-{90}' } + default: 'be/PVSA-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'BE:PVSA' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Carwash + country: BE + icon: [ default: 'be/SSC' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'BE:SSC' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Grand Signal d'Arrêt (opposite regime) + country: BE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'BE:RB', value: 'be/GSA-opposite-RB' } + - { exact: 'BE:2J', value: 'be/GSA-opposite-2J' } + - { exact: 'BE:VJV', value: 'be/GSA-opposite-VJV' } + - { exact: 'BE:VJH', value: 'be/GSA-opposite-VJH' } + - { exact: 'BE:V', value: 'be/GSA-opposite-V' } + default: 'be/GSA-opposite-R' + tags: + - { tag: 'railway:signal:main', value: 'BE:GSA' } + - { tag: 'railway:signal:regime', value: 'opposite' } + + - description: Grand Signal d'Arrêt (normal regime) + country: BE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'BE:RB', value: 'be/GSA-RB' } + - { exact: 'BE:2J', value: 'be/GSA-2J' } + - { exact: 'BE:VJV', value: 'be/GSA-VJV' } + - { exact: 'BE:VJH', value: 'be/GSA-VJH' } + - { exact: 'BE:V', value: 'be/GSA-V' } + default: 'be/GSA-R' + tags: + - { tag: 'railway:signal:main', value: 'BE:GSA' } + + - description: Distant signal (opposite regime) + country: BE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'BE:2J', value: 'be/SAI-opposite-2J' } + - { exact: 'BE:VJV', value: 'be/SAI-opposite-VJV' } + - { exact: 'BE:VJH', value: 'be/SAI-opposite-VJH' } + default: 'be/SAI-opposite-V' + tags: + - { tag: 'railway:signal:distant', value: 'BE:SAI' } + - { tag: 'railway:signal:regime', value: 'opposite' } + + - description: Distant signal (normal regime) + country: BE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'BE:2J', value: 'be/SAI-2J' } + - { exact: 'BE:VJV', value: 'be/SAI-VJV' } + - { exact: 'BE:VJH', value: 'be/SAI-VJH' } + default: 'be/SAI-V' + tags: + - { tag: 'railway:signal:distant', value: 'BE:SAI' } + + - description: (BME) Approach (semaphore) + country: BE + icon: [ default: 'be/bme/semaphore_approach' ] + tags: + - { tag: 'railway:signal:main', value: 'BE-SME:simplified_stop_signal' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: (BME) Simplified main signal + country: BE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'BE-SME:W', value: 'be/bme/simplified_xnw' } + - { exact: 'BE-SME:N', value: 'be/bme/simplified_ny' } + default: 'be/bme/simplified_unknown' + tags: + - { tag: 'railway:signal:main', value: 'BE-SME:simplified_stop_signal' } + + - description: Répétiteur à Traits Lumineux + country: BE + icon: [ default: 'be/RTL-open' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'BE:RTL' } + + - description: Signal d'Arrêt Simplifié + country: BE + icon: [ default: 'be/SAS' ] + tags: + - { tag: 'railway:signal:minor', value: 'BE:SAS' } + + - description: Petit Signal d'Arrêt (light) + country: BE + icon: [ default: 'be/PSA-light' ] + tags: + - { tag: 'railway:signal:shunting', any: [ 'BE:PSA', 'BE-SME:small_signal_triangle' ] } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Petit Signal d'Arrêt (sign) + country: BE + icon: [ default: 'be/PSA-sign' ] + tags: + - { tag: 'railway:signal:shunting', value: 'BE:PSA' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: (BME) Shunting signal, 2 color + country: BE + icon: [ default: 'be/bme/shunting_twocolour_ny' ] + tags: + - { tag: 'railway:signal:shunting', value: 'BE-SME:small_signal_two_colour' } + + - description: Buffer stop (sign) + country: BE + icon: [ default: 'be/RH-sign' ] + tags: + - { tag: 'railway:signal:stop', value: 'BE:RH' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Buffer stop (light) + country: BE + icon: [ default: 'be/RH-light' ] + tags: + - { tag: 'railway:signal:stop', value: 'BE:RH' } + - { tag: 'railway:signal:stop:form', value: 'light' } + + - description: Stop position + country: BE + icon: + - match: 'railway:signal:stop:carriages' + cases: + - { regex: '^(2|3|4|6|8|10|12)$', value: 'be/PMQ-{}', example: 'be/PMQ-{8}' } + default: 'be/PMQ-unknown' + tags: + - { tag: 'railway:signal:stop', value: 'BE:PMQ' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: End of platform + country: BE + icon: [ default: 'be/PREQ' ] + tags: + - { tag: 'railway:signal:stop', value: 'BE:PREQ' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Main signal indicator + country: BE + icon: + - match: 'railway:signal:route:states' + cases: + - { exact: 'BE:ECS-V', value: 'be/ECS-V', description: 'regime change' } + - { exact: 'BE:ECS-U', value: 'be/ECS-U', description: 'dead end' } + - { exact: 'BE:ECS-CAB', value: 'be/ECS-CAB', description: 'cab signalling' } + default: 'be/ECS-unknown' + tags: + - { tag: 'railway:signal:route', value: 'BE:ECS' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Distant speed limit light (part of main signal) + country: BE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([4-9]0)$', value: 'be/ARV-{}', example: 'be/ARV-{60}' } + default: 'be/ARV-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'BE:ARV' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: Balise marker + country: BE + icon: [ default: 'be/PRB' ] + tags: + - { tag: 'railway:signal:fouling_point', value: 'BE:PRB' } + + - description: Station announcement + country: BE + icon: [ default: 'be/PAPA' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'BE:PAPA' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Panto distant + country: BE + icon: [ default: 'be/PBA' ] + tags: + - { tag: 'railway:signal:electricity', value: 'BE:PBA' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: Panto down + country: BE + icon: [ default: 'be/PBE' ] + tags: + - { tag: 'railway:signal:electricity', value: 'BE:PBE' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: Panto up + country: BE + icon: [ default: 'be/PRL' ] + tags: + - { tag: 'railway:signal:electricity', value: 'BE:PRL' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: End of contact line + country: BE + icon: [ default: 'be/FLC' ] + tags: + - { tag: 'railway:signal:electricity', value: 'BE:FLC' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + + - description: Contact line segmentation + country: BE + icon: [ default: 'be/SLC' ] + tags: + - { tag: 'railway:signal:electricity', value: 'BE:SLC' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: train protection block markers (arrow) + country: BE + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'be/PRA-arrow-right' } + - { exact: 'overhead', value: 'be/PRA-arrow-down' } + default: 'be/PRA-arrow-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:PRA' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + - { tag: 'railway:signal:train_protection:shape', value: 'arrow' } + + - description: train protection block markers (triangle) + country: BE + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'be/PRA-triangle-right' } + - { exact: 'overhead', value: 'be/PRA-triangle-down' } + default: 'be/PRA-triangle-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:PRA' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: Start ETCS Level 1 Limited Supervision zone + country: BE + icon: [ default: 'be/ETCS1LS' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:ETCS-1LS' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'start' } + + - description: Start ETCS Level 1 Full Supervision zone + country: BE + icon: [ default: 'be/ETCS1' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:ETCS-1FS' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'start' } + + - description: Start ETCS Level 2 Full Supervision zone + country: BE + icon: [ default: 'be/ETCS2' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:ETCS-2' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'start' } + + - description: End ETCS zone + country: BE + icon: [ default: 'be/ETCS-end' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'BE:ETCS-end' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'end' } + + # --- CA --- # + + - description: Main signal + country: CA + icon: [ default: 'ca/main' ] + tags: + - { tag: 'railway:signal:main', value: 'CA:main' } + - { tag: 'railway:signal:main:form', value: 'light' } + + # --- CH --- # + + - description: Hauptsignal System L + country: CH + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'CH-FDV:550', value: 'ch/fdv-l-550' } + - { exact: 'CH-FDV:547', value: 'ch/fdv-l-547' } + - { exact: 'CH-FDV:542', value: 'ch/fdv-l-542' } + - { exact: 'CH-FDV:545', value: 'ch/fdv-l-545' } + - { exact: 'CH-FDV:530', value: 'ch/fdv-l-530' } + default: 'ch/fdv-l-524' + tags: + - { tag: 'railway:signal:main', value: 'CH-FDV:l' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Mini-Hauptsignal System L + country: CH + icon: [ default: 'ch/fdv-l-522.1' ] + tags: + - { tag: 'railway:signal:combined', value: 'CH-FDV:512' } + - { tag: 'railway:signal:combined:form', value: 'light' } + - { tag: 'railway:signal:combined:height', value: 'dwarf' } + + - description: Hauptsignal System L (combined) + country: CH + icon: + - match: 'railway:signal:combined:states' + cases: + - { exact: 'CH-FDV:548', value: 'ch/fdv-l-548' } + - { exact: 'CH-FDV:551', value: 'ch/fdv-l-551' } + - { exact: 'CH-FDV:546', value: 'ch/fdv-l-546' } + - { exact: 'CH-FDV:543', value: 'ch/fdv-l-543' } + - { exact: 'CH-FDV:539', value: 'ch/fdv-l-539' } + - { exact: 'CH-FDV:537', value: 'ch/fdv-l-537' } + - { exact: 'CH-FDV:535', value: 'ch/fdv-l-535' } + - { exact: 'CH-FDV:531', value: 'ch/fdv-l-531' } + default: 'ch/fdv-l-525' + tags: + - { tag: 'railway:signal:combined', value: 'CH-FDV:l' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Hauptsignal System N + country: CH + icon: + - match: 'railway:signal:combined:states' + cases: + - { exact: 'CH-FDV:523', value: 'ch/fdv-n-523' } + - { exact: 'CH-FDV:552', value: 'ch/fdv-n-552' } + - { any: [ 'CH-FDV:532', 'CH-FDV:533' ], value: 'ch/fdv-n-532' } + default: 'ch/fdv-n-526' + tags: + - { tag: 'railway:signal:combined', value: 'CH-FDV:n' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Vorsignal System L + country: CH + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'CH-FDV:538', value: 'ch/fdv-l-538' } + - { exact: 'CH-FDV:536', value: 'ch/fdv-l-536' } + - { exact: 'CH-FDV:529', value: 'ch/fdv-l-529' } + - { exact: 'CH-FDV:534', value: 'ch/fdv-l-534' } + default: 'ch/fdv-l-528' + tags: + - { tag: 'railway:signal:distant', value: 'CH-FDV:l' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Vorsignal System N + country: CH + icon: + - match: 'railway:signal:distant:states' + cases: + - { any: [ 'CH-FDV:522', 'CH-FDV:521' ], value: 'ch/fdv-n-521' } + default: 'ch/fdv-n-533' + tags: + - { tag: 'railway:signal:distant', value: 'CH-FDV:n' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Fahrtstellungsmelder + country: CH + icon: [ default: 'ch/fdv-559' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'CH-FDV:559' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Minor signal + country: CH + icon: [ default: 'ch/fdv-232' ] + tags: + - { tag: 'railway:signal:minor', value: 'CH-FDV:232' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Vorsignal verminderte Geschwindigkeit + country: CH + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([6-9][05]|1[0-1][05])$', value: 'ch/fdv-209-{}', example: 'ch/fdv-209-{90}' } + default: 'ch/fdv-209-empty' + tags: + # TODO support CH-FDV:210, with railway:signal:speed_limit_distant:speed:trainclass_low + - { tag: 'railway:signal:speed_limit_distant', any: [ 'CH-FDV:209', 'CH-FDV:210' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Anfangssignal verminderte Geschwindigkeit + country: CH + icon: [ default: 'ch/fdv-211' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:211' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Endesignal verminderte Geschwindigkeit + country: CH + icon: [ default: 'ch/fdv-212' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:212' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Vorsignal verminderte Geschwindigkeit für Neigetechnikzüge + country: CH + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^1[1-4]0$', value: 'ch/fdv-213-{}', example: 'ch/fdv-213-{120}' } + default: 'ch/fdv-213-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'CH-FDV:213' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Anfangssignal verminderte Geschwindigkeit + country: CH + icon: [ default: 'ch/fdv-214' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:214' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Endesignal verminderte Geschwindigkeit + country: CH + icon: [ default: 'ch/fdv-215' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:215' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Merktafel für Änderung der Höchstgeschwindigkeit + country: CH + icon: [ default: 'ch/fdv-217' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:217' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Geschwindigkeits-Ankündigung + country: CH + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([4-9]|1[0-2])0$', value: 'ch/fdv-540-{}', example: 'ch/fdv-540-{40}' } + default: 'ch/fdv-540-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'CH-FDV:540', 'CH-FDV:541' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: Geschwindigkeits-Ausführung + country: CH + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([4-9]|1[0-2])0$', value: 'ch/fdv-549-{}', example: 'ch/fdv-549-{100}' } + default: 'ch/fdv-549-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:549' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Merktafel für Streckengeschwindigkeit beim Signalsystem N + country: CH + icon: [ default: 'ch/fdv-569' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'CH-FDV:569' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Vorsignal zum Senksignal + country: CH + icon: [ default: 'ch/fdv-703' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:703' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: Senksignal + country: CH + icon: [ default: 'ch/fdv-704' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:704' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'semaphore' ] } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: Endsignal zum Senksignal + country: CH + icon: [ default: 'ch/fdv-705' ] + tags: + - { tag: 'railway:signal:electricity', any: [ 'CH-FDV:705', 'CH-FDV:706' ] } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: Aufhebungssignal zum Senksignal + country: CH + icon: [ default: 'ch/fdv-707' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:707' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: Vorsignal zum Ausschaltsignal (sign) + country: CH + icon: [ default: 'ch/fdv-708' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:708' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + + - description: Vorsignal zum Ausschaltsignal (light) + country: CH + icon: [ default: 'ch/fdv-709' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:709' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + + - description: Ausschaltsignal (sign) + country: CH + icon: [ default: 'ch/fdv-710' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:710' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: Ausschaltsignal (light) + country: CH + icon: [ default: 'ch/fdv-711' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:711' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: Einschaltsignal (sign) + country: CH + icon: [ default: 'ch/fdv-712' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:712' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: Einschaltsignal (light) + country: CH + icon: [ default: 'ch/fdv-713' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:713' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: Streckentrennung + country: CH + icon: [ default: 'ch/fdv-714' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:714' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'joint' } # TODO why joint? + + - description: Zonen-Schutzstreckensignal + country: CH + icon: [ default: 'ch/fdv-715' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:715' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'main_switch_off' } + + - description: Zonensignal + country: CH + # TODO support voltage values + icon: [ default: 'ch/fdv-716' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:716' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'system_changeable' } + + - description: Vorsignal zum Umschaltsignal + country: CH + icon: [ default: 'ch/fdv-719' ] + tags: + - { tag: 'railway:signal:electricity', any: [ 'CH-FDV:719', 'CH-SBB:719' ] } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'system_change_advance' } + + - description: Umschaltsignal anfang (sign) + country: CH + icon: [ default: 'ch/fdv-717' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:717' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'system_change_start' } + + - description: Umschaltsignal anfang (light) + country: CH + icon: [ default: 'ch/fdv-717.1' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:717.1' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'system_change_start' } + + - description: Umschaltsignal ende (sign) + country: CH + icon: [ default: 'ch/fdv-718' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:718' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'system_change_end' } + + - description: Umschaltsignal ende (light) + country: CH + icon: [ default: 'ch/fdv-718.1' ] + tags: + - { tag: 'railway:signal:electricity', value: 'CH-FDV:718.1' } + - { tag: 'railway:signal:electricity:form', value: 'light' } + - { tag: 'railway:signal:electricity:type', value: 'system_change_end' } + + # --- CZ --- # + + - description: End of shunting marker + country: CZ + icon: [ default: 'cz/shunting-end' ] + tags: + - { tag: 'railway:signal:shunting', value: 'CZ-D1:oznacnik' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Shunting stop + country: CZ + icon: [ default: 'cz/shunting-stop' ] + tags: + - { tag: 'railway:signal:shunting', value: 'CZ-D1:posun_zakazan' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Shunting wait (sign) + country: CZ + icon: [ default: 'cz/shunting-wait-sign' ] + tags: + - { tag: 'railway:signal:shunting', value: 'CZ-D1:vyckavaci_navestidlo' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Shunting wait (light) + country: CZ + # TODO shunting group signal (group marker) + icon: [ default: 'cz/shunting-wait-light' ] + tags: + - { tag: 'railway:signal:shunting', value: 'CZ-D1:vyckavaci_navestidlo' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Shunting (light) + country: CZ + icon: [ default: 'cz/shunting' ] + tags: + - { tag: 'railway:signal:shunting', any: [ 'CZ', 'CZ-D1:serazovaci_navestidlo', 'CZ-D1:posun_zakazan' ] } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Distant (light) + country: CZ + icon: [ default: 'cz/distant' ] + tags: + - { tag: 'railway:signal:distant', any: [ 'CZ', 'CZ-D1:samostatna_predvest' ] } + - { tag: 'railway:signal:distant:form', value: 'light' } + + # TODO speed limit "5" or "3" on main/combined signal + + # TODO route signal for departure (green number) below main/combined signal + # TODO route signal (white letter) below main/combined signal + + - description: Distant speed limit NS (sign) + country: CZ + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-9]0|1[0-4]0$', value: 'cz/speed-NS-distant-{}', example: 'cz/speed-NS-distant-{80}' } + default: 'cz/speed-NS-distant-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'CZ-D1:predvestnik_ns' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Distant speed limit N (sign) + country: CZ + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-9]0|1[0-4]0$', value: 'cz/speed-distant-{}', example: 'cz/speed-distant-{80}' } + default: 'cz/speed-distant-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'CZ', 'CZ-D1:predvestnik_n', 'CZ-D1:horni_predvestnik_n' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Speed limit NS (sign) + country: CZ + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[3-9]0|1[0-356]0|95|135$', value: 'cz/speed-NS-sign-{}', example: 'cz/speed-NS-sign-{80}' } + default: 'cz/speed-NS-sign-empty' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'CZ-D1:rychlostnik_ns' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Speed limit N (sign) + country: CZ + # TODO handle two speed limits on one sign, speed switch (black || with white dots) + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-9]0|1[0-36]0|[1678]5|1[02]5$', value: 'cz/speed-N-sign-{}', example: 'cz/speed-N-sign-{80}' } + default: 'cz/speed-N-sign-empty' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'CZ', 'CZ-D1:rychlostnik_n', 'CZ-D1:horni_rychlostnik_n' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Speed limit (light) + country: CZ + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + # TODO differentiate for 30 km/h with |3| form (yellow) + - { regex: '^(1[0-6]|[1-9]|20)0$', value: 'cz/hlavni_navestidlo-light-{}', example: 'cz/hlavni_navestidlo-light-{60}' } + default: 'cz/hlavni_navestidlo-light-unknown' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'CZ', 'CZ-D1:hlavni_navestidlo' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + # TODO semaphore distant signal (orange disk) + + # TODO semaphore main signals (red / yellow arms) + + - description: Main stop (sign) + country: CZ + icon: [ default: 'cz/main-sign-stop' ] + tags: + - { tag: 'railway:signal:main', value: 'CZ-D1:stuj' } + - { tag: 'railway:signal:main:form', value: 'sign' } + + # TODO handle railway:signal:main:substitute_signal=CZ-D1:privolavaci_navest (white light) + - description: Main (light) + country: CZ + # TODO differentiate main signal forms + icon: [ default: 'cz/main-clear' ] + tags: + - { tag: 'railway:signal:main', any: [ 'CZ', 'CZ-D1:hlavni_navestidlo' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Combined (light) + country: CZ + # TODO differentiate combined signal forms + icon: [ default: 'cz/combined-clear' ] + tags: + - { tag: 'railway:signal:combined', any: [ 'CZ', 'CZ-D1:hlavni_navestidlo' ] } + - { tag: 'railway:signal:combined:form', value: 'light' } + + # TODO: distant signal without home signal (different display form) + - description: Distant speed limit (light) + country: CZ + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-6]|[1-9]|20)0$', value: 'cz/hlavni_navestidlo-distant-light-{}', example: 'cz/hlavni_navestidlo-distant-light-{60}' } + default: 'cz/hlavni_navestidlo-distant-light-unknown' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'CZ', 'CZ-D1:hlavni_navestidlo', 'CZ-D1:samostatna_predvest' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + # TODO: Skupinové návěstidlo -- Group signal + + # TODO Zkrácená vzdálenost -- reduced distanace marker + + # TODO entry / exit signal markers + + # TODO electricity signals, blue and orange + + # --- DE --- # + + - description: shunting stop sign Ra 10 + country: DE + icon: [ default: 'de/ra10' ] + tags: + - { tag: 'railway:signal:shunting', value: 'DE-ESO:ra10' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: main signal invalid for shunting trains Zs 103 (sign) + country: DE + icon: [ default: 'de/zs103' ] + tags: + - { tag: 'railway:signal:shunting', value: 'DE-ESO:zs103' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: shunting signal Ra 11 without Sh 1 + country: DE + icon: [ default: 'de/ra11-sign' ] + tags: + - { tag: 'railway:signal:shunting', value: 'DE-ESO:ra11' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: shunting signal Ra 11 with Sh 1 + country: DE + icon: [ default: 'de/ra11-sh1' ] + tags: + - { tag: 'railway:signal:shunting', value: 'DE-ESO:ra11' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: shunting signal Ra 11b (without Sh 1) + country: DE + icon: [ default: 'de/ra11b' ] + tags: + - { tag: 'railway:signal:shunting', value: 'DE-ESO:ra11b' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: tram minor stop sign Sh 1 + country: DE + icon: [ default: 'de/bostrab/sh1' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-BOStrab:sh1' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: minor light signals type Sh + country: DE + icon: + - match: 'railway:signal:minor:height' + cases: + - { exact: 'normal', value: 'de/sh1-light-normal', description: 'normal height' } + default: 'de/sh0-light-dwarf' + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: minor light signals type Sh attached to main signals + country: DE + icon: [ default: 'de/sh1-light-dwarf' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh1' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: minor semaphore signals type Sh with wn7 + country: DE + icon: [ default: 'de/wn7-semaphore-normal' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh' } + - { tag: 'railway:signal:minor:form', value: 'semaphore' } + - { tag: 'railway:signal:minor:states', all: [ 'DE-ESO:sh0', 'DE-ESO:wn7' ] } + + - description: minor semaphore signals type Sh + country: DE + icon: + - match: 'railway:signal:minor:height' + cases: + - { exact: 'normal', value: 'de/sh1-semaphore-normal' } + default: 'de/sh0-semaphore-dwarf' + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh' } + - { tag: 'railway:signal:minor:form', value: 'semaphore' } + + - description: minor sign signal type Sh + country: DE + icon: [ default: 'de/sh0-sign' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh0' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Sh 2 buffer stop + country: DE + icon: [ default: 'de/sh2' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-ESO:sh2' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: tram signal Sh 2 + country: DE + icon: [ default: 'de/bostrab/sh2' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-BOStrab:sh2' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Hamburger Hochbahn Sh 3 + country: DE + icon: [ default: 'de/hha/sh3' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-HHA:sh3' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: tram signal "start of train protection" So 1 + country: DE + icon: [ default: 'de/bostrab/so1' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'DE-BOStrab:so1', 'DE-AVG:so1' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'start' } + + - description: tram signal "end of train protection" So 2 + country: DE + icon: [ default: 'de/bostrab/so2' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'DE-BOStrab:so2', 'DE-AVG:so2' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'end' } + + - description: ETCS block marker Ne 14 + country: DE + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'de/ne14-right' } + - { exact: 'overhead', value: 'de/ne14-down' } + default: 'de/ne14-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'DE-ESO:ne14' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: LZB section start + country: DE + icon: [ default: 'de/lzb-section-start' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'DE-ESO:lzb-bereichskennzeichen' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Blockkennzeichen + country: DE + icon: [ default: 'de/blockkennzeichen' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'DE-ESO:blockkennzeichen' } + + - description: Signalhaltmelder Zugleitbetrieb + country: DE + icon: [ default: 'de/zlb-haltmelder-light' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'DE-DB:signalhaltmelder' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Fahrtanzeiger + country: DE + icon: [ default: 'de/fahrtanzeiger' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'DE-ESO:fahrtanzeiger' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: tram passing prohibited sign So 5 + country: DE + icon: [ default: 'de/bostrab/so5' ] + tags: + - { tag: 'railway:signal:passing', value: 'DE-BOStrab:so5' } + - { tag: 'railway:signal:passing:form', value: 'sign' } + - { tag: 'railway:signal:passing:type', value: 'no_passing' } + + - description: tram passing prohibited end sign So 6 + country: DE + icon: [ default: 'de/bostrab/so6' ] + tags: + - { tag: 'railway:signal:passing', value: 'DE-BOStrab:so6' } + - { tag: 'railway:signal:passing:form', value: 'sign' } + - { tag: 'railway:signal:passing:type', value: 'passing_allowed' } + + - description: stop demand post Ne 5 (light) + country: DE + icon: [ default: 'de/ne5-light' ] + tags: + - { tag: 'railway:signal:stop_demand', value: 'DE-ESO:ne5' } + - { tag: 'railway:signal:stop_demand:form', value: 'light' } + + - description: stop demand post Ne 5 (sign) + country: DE + icon: [ default: 'de/ne5-sign' ] + tags: + - { tag: 'railway:signal:stop', value: 'DE-ESO:ne5' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: train length stopping marker + country: DE + icon: [ default: 'de/zuglaenge' ] + tags: + - { tag: 'railway:signal:stop', value: 'DE-ESO:zuglänge' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: stop demand post BOStrab Sh 7 (sign) + country: DE + icon: [ default: 'de/bostrab/sh7' ] + tags: + - { tag: 'railway:signal:stop', value: 'DE-BOStrab:sh7' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: station distant sign Ne 6 + country: DE + icon: [ default: 'de/ne6' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'DE-ESO:ne6' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + # TODO support variants of same feature + - description: Bü 0/1 (sign, repeated) + country: DE + icon: [ default: 'de/bue0-ds-repeated' ] + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:bü' } + - { tag: 'railway:signal:crossing:form', value: 'sign' } + - { tag: 'railway:signal:crossing:repeated' } + + - description: Bü 0/1 (sign) + country: DE + icon: + - match: 'railway:signal:crossing:shortened' + cases: + - { value: 'de/bue0-ds-shortened', description: 'shortened' } + default: 'de/bue0-ds' + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:bü' } + - { tag: 'railway:signal:crossing:form', value: 'sign' } + + - description: Bü 0/1 (light, repeated) + country: DE + icon: [ default: 'de/bue1-ds-repeated' ] + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:bü' } + - { tag: 'railway:signal:crossing:repeated' } + + - description: Bü 0/1 (light) + country: DE + icon: + - match: 'railway:signal:crossing:shortened' + cases: + - { value: 'de/bue1-ds-shortened', description: 'shortened' } + default: 'de/bue1-ds' + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:bü' } + + - description: So 16a/b (repeated) + country: DE + icon: [ default: 'de/bue1-dv-repeated' ] + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:so16' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + - { tag: 'railway:signal:crossing:repeated' } + + - description: So 16a/b + country: DE + icon: + - match: 'railway:signal:crossing:shortened' + cases: + - { value: 'de/bue1-dv-shortened', description: 'shortened' } + default: 'de/bue1-dv' + tags: + - { tag: 'railway:signal:crossing', value: 'DE-ESO:so16' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: crossing distant sign (warning board) So 15 (DV 301) + country: DE + icon: [ default: 'de/so15' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-ESO:so15' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: distant crossing So 14 + country: DE + icon: [ default: 'de/so14' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-ESO:so14' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: crossing distant sign Bü 2 + country: DE + icon: + - match: 'railway:signal:crossing_distant:shortened' + cases: + - { value: 'de/bue2-ds-reduced-distance', description: 'reduced distance' } + default: 'de/bue2-ds' + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-ESO:bü2' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: crossing distant sign Bü 3 + country: DE + icon: [ default: 'de/bue3' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-ESO:bü3' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: tram crossing light Bü + country: DE + icon: [ default: 'de/bostrab/bü' ] + tags: + - { tag: 'railway:signal:crossing', value: 'DE-BOStrab:bü' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: tram distant crossing light Bü 2 + country: DE + icon: [ default: 'de/bostrab/bü2' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-BOStrab:bü2' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: Bü 4 Whistle Sign + country: DE + icon: + - match: 'railway:signal:whistle:only_transit' + cases: + - { value: 'de/bue4-ds-only-transit', description: 'only transit' } + default: 'de/bue4-ds' + tags: + - { tag: 'railway:signal:whistle', value: 'DE-ESO:db:bü4' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: whistle sign Pf 1 (DV 301) + country: DE + icon: + - match: 'railway:signal:whistle:only_transit' + cases: + - { value: 'de/pf1-dv-only-transit', description: 'only transit' } + default: 'de/pf1-dv' + tags: + - { tag: 'railway:signal:whistle', value: 'DE-ESO:dr:pf1' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: whistle twice sign Pf 2 (DV 301) + country: DE + icon: [ default: 'de/pf2-dv' ] + tags: + - { tag: 'railway:signal:whistle', value: 'DE-ESO:dr:pf2' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: ring sign Bü 5 + country: DE + icon: + - match: 'railway:signal:ring:only_transit' + cases: + - { value: 'de/bue5-only-transit', description: 'only transit' } + default: 'de/bue5' + tags: + - { tag: 'railway:signal:ring', value: 'DE-ESO:bü5' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: start ringing Pl 3 + country: DE + icon: [ default: 'de/pl3' ] + tags: + - { tag: 'railway:signal:ring', value: 'DE-ESO:dr:pl3' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: stop ringing Pl 4 + country: DE + icon: [ default: 'de/pl4' ] + tags: + - { tag: 'railway:signal:ring', value: 'DE-ESO:dr:pl4' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: start ringing LP 4 + country: DE + icon: [ default: 'de/lp4' ] + tags: + - { tag: 'railway:signal:ring', value: 'DE-ESO:db:lp4' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: stop ringing LP 5 + country: DE + icon: [ default: 'de/lp5' ] + tags: + - { tag: 'railway:signal:ring', value: 'DE-ESO:db:lp5' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: Lift / Fold snowplow Ne 7 (sign) + country: DE + icon: + - match: 'railway:signal:snowplow:type' + cases: + - { exact: 'down', value: 'de/ne7-yellow-down' } + default: 'de/ne7-yellow-up' + tags: + - { tag: 'railway:signal:snowplow', value: 'DE-ESO:ne7' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Ne13 resetting switch signal + country: DE + icon: [ default: 'de/ne13a' ] + tags: + - { tag: 'railway:signal:resetting_switch', value: 'DE-ESO:ne13' } + - { tag: 'railway:signal:resetting_switch:form', value: 'light' } + + - description: Ne12 resetting switch distant signal + country: DE + icon: [ default: 'de/ne12' ] + tags: + - { tag: 'railway:signal:resetting_switch_distant', value: 'DE-ESO:ne12' } + - { tag: 'railway:signal:resetting_switch_distant:form', value: 'sign' } + + - description: humping signal Ra 6-9 + country: DE + icon: + - match: 'railway:signal:humping:form' + cases: + - { exact: 'semaphore', value: 'de/ra7-semaphore', description: 'semaphore' } + default: 'de/ra7' + tags: + - { tag: 'railway:signal:humping', value: 'DE-ESO:ra' } + + - description: tram läuten Sh 4 + country: DE + icon: [ default: 'de/bostrab/sh4' ] + tags: + - { tag: 'railway:signal:ring', value: 'DE-BOStrab:sh4' } + - { tag: 'railway:signal:ring:form', value: 'sign' } + + - description: helper engine signal Ts + country: DE + icon: [ default: 'de/ts1' ] + tags: + - { tag: 'railway:signal:helper_engine', value: 'DE-ESO:ts' } + - { tag: 'railway:signal:helper_engine:form', value: 'sign' } + + - description: brake test signal Zp 6-8 + country: DE + icon: [ default: 'de/zp8' ] + tags: + - { tag: 'railway:signal:brake_test', value: 'DE-ESO:zp' } + - { tag: 'railway:signal:brake_test:form', value: 'light' } + + - description: Zp 9 (departure order) or Zp 10 (close doors) + country: DE + icon: + - match: 'railway:signal:departure:states' + cases: + - { exact: 'DE-ESO:zp10', value: 'de/zp10-db' } + default: 'de/zp9-db' + tags: + - { tag: 'railway:signal:departure', value: 'DE-ESO:zp' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: tram departure signals + country: DE + icon: + - match: 'railway:signal:departure:states' + cases: + - { exact: 'DE-BOStrab:a2', value: 'de/bostrab/a2' } + default: 'de/bostrab/a1' + tags: + - { tag: 'railway:signal:departure', any: [ 'DE-BOStrab:a', 'DE-BOStrab:a1', 'DE-BOStrab:a2' ] } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: crossing info sign + country: DE + icon: [ default: 'de/bue-crossing-info' ] + tags: + - { tag: 'railway:signal:crossing_info', value: 'DE-ESO:bü-kennzeichentafel' } + - { tag: 'railway:signal:crossing_info:form', value: 'sign' } + + - description: crossing anouncement sign + country: DE + icon: [ default: 'de/bue-crossing-hint' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'DE-ESO:bü-ankündetafel' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + - description: Karlsruhe AVG crossing signals + country: DE + icon: [ default: 'de/avg/bue201' ] + tags: + - { tag: 'railway:signal:crossing', value: 'DE-AVG:bü200' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Karlsruhe AVG distant crossing signals + country: DE + icon: [ default: 'de/avg/bue201v' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'DE-AVG:bü200v' } + - { tag: 'railway:signal:crossing_distant:form', value: 'light' } + + - description: Karlsruhe AVG Stop Demand + country: DE + icon: [ default: 'de/avg/hw1' ] + tags: + - { tag: 'railway:signal:stop_demand', value: 'DE-AVG:hw1' } + - { tag: 'railway:signal:stop_demand:form', value: 'light' } + + - description: Karlsruhe AVG end of EBO structure gauge Ra 14 + country: DE + icon: [ default: 'de/avg/ra14' ] + tags: + - { tag: 'railway:signal:minor', value: 'DE-AVG:ra14' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: wrong road signal Zs 6 (DB) (sign) + country: DE + icon: [ default: 'de/zs6-sign' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'DE-ESO:db:zs6' } + - { tag: 'railway:signal:wrong_road:form', value: 'sign' } + + - description: wrong road signal Zs 6 (DB) (light) + country: DE + icon: [ default: 'de/zs6-db-light' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'DE-ESO:db:zs6' } + - { tag: 'railway:signal:wrong_road:form', value: 'light' } + + - description: wrong road signal Zs 7 (DR) (light) + country: DE + icon: [ default: 'de/zs7-dr-light' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'DE-ESO:dr:zs7' } + - { tag: 'railway:signal:wrong_road:form', value: 'light' } + + - description: entry into dead-end / early stop marker Zs 13 / Zs 6 (DR) (sign) + country: DE + icon: [ default: 'de/zs13-sign' ] + tags: + - { tag: 'railway:signal:short_route', any: [ 'DE-ESO:zs13', 'DE-ESO:dr:zs6' ] } + - { tag: 'railway:signal:short_route:form', value: 'sign' } + + - description: entry into dead-end / early stop marker Zs 13 / Zs 6 (DR) (light) + country: DE + icon: [ default: 'de/zs13-light' ] + tags: + - { tag: 'railway:signal:short_route', any: [ 'DE-ESO:zs13', 'DE-ESO:dr:zs6' ] } + - { tag: 'railway:signal:short_route:form', value: 'light' } + + - description: Richtungsvoranzeiger (Zs 2v) + country: DE + icon: + - match: 'railway:signal:route_distant:states' + cases: + - { regex: '^([A-ZÄÖÜẞ])$', value: 'de/zs2v-{}', example: 'de/zs2v-{ẞ}' } + default: 'de/zs2v-unknown' + tags: + - { tag: 'railway:signal:route_distant', value: 'DE-ESO:zs2v' } + - { tag: 'railway:signal:route_distant:form', value: 'light' } + + - description: Speed signals (Zs 3v) (sign) + country: DE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-6]|[1-9])0$', value: 'de/zs3v-sign-down-{}', example: 'de/zs3v-sign-down-{60}' } + default: 'de/zs3v-empty-sign-down' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:zs3v' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Speed signals (Zs 3v) (light) + country: DE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([1-9]|1[0-6]|20)0$', value: 'de/zs3v-light-{}', example: 'de/zs3v-light-{20}' } + default: 'de/zs3v-light-unknown' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:zs3v' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: West German branch line speed signals (Lf 4 DS 301) + country: DE + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([2-8]0|1?[05])$', value: 'de/lf4-ds301-sign-down-{}', example: 'de/lf4-ds301-sign-down-{80}' } + default: 'de/lf4-ds301-empty-sign-down' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:db:lf4' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: East German branch line speed signals (Lf 4) + country: DE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(100|[2-8]0|1?[05])$', value: 'de/lf4-dr-sign-down-{}', example: 'de/lf4-dr-sign-down-{70}' } + default: 'de/lf4-dr-sign-down-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:dr:lf4' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: East German branch line speed signals (Lf 4) + country: DE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(100|[2-8]0|1?[05])$', value: 'de/lf4-dr-sign-down-speed-limit-{}', example: 'de/lf4-dr-sign-down-speed-limit-{70}' } + default: 'de/lf4-dr-sign-down-speed-limit-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:dr:lf4' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: German line speed signals (Lf 6) + country: DE + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^((1[0-9]|[1-9])0|5|15)$', value: 'de/lf6-sign-down-{}', example: 'de/lf6-sign-down-{30}' } + default: 'de/lf6-empty-sign-down' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:lf6' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Langsamfahrscheibe + country: DE + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(5|15|[1-9]0|1[0-9]0|200)$', value: 'de/lf1-sign-down-{}', example: 'de/lf1-sign-down-{200}' } + default: 'de/lf1-empty-sign-down' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-ESO:lf1' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Hamburger Hochbahn L1 + country: DE + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([3-7]0)$', value: 'de/hha/l1-sign-{}', example: 'de/hha/l1-sign-{70}' } + default: 'de/hha/l1-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'DE-HHA:l1' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Tram distance speed limit (G 1a) (sign) + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(5|[1-7][0-5])$', value: 'de/bostrab/g1a-{}', example: 'de/bostrab/g1a-{40}' } + default: 'de/bostrab/g1a-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'DE-BOStrab:g1', 'DE-BOStrab:g1a', 'DE-BSVG:g1a' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Tram distance speed limit (G 1b) (light) + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-7]0$', value: 'de/bostrab/g1b-{}', example: 'de/bostrab/g1b-{40}' } + default: 'de/bostrab/g1b-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'DE-BOStrab:g1', 'DE-BOStrab:g1b' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: distant signal announcement signs Ne 3 (dwarf) + country: DE + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'de/ne3-dwarf-II' } + - { exact: 'III', value: 'de/ne3-dwarf-III' } + - { exact: 'IV', value: 'de/ne3-dwarf-IV' } + default: 'de/ne3-dwarf-I' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:ne3' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + - { tag: 'railway:signal:distant:height', value: 'dwarf' } + + - description: distant signal announcement signs Ne 3 (normal) + country: DE + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'de/ne3-normal-II' } + - { exact: 'III', value: 'de/ne3-normal-III' } + - { exact: 'IV', value: 'de/ne3-normal-IV' } + - { exact: 'V', value: 'de/ne3-normal-V' } + default: 'de/ne3-normal-I' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:ne3' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: main signal announcement signs So 19 (normal) + country: DE + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'de/so19-normal-II' } + - { exact: 'III', value: 'de/so19-normal-III' } + default: 'de/so19-normal-I' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:so19' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: main signal announcement signs So 19 (dwarf) + country: DE + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'de/so19-dwarf-II' } + - { exact: 'III', value: 'de/so19-dwarf-III' } + default: 'de/so19-dwarf-I' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:so19' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + - { tag: 'railway:signal:distant:height', value: 'dwarf' } + + - description: Hamburger Hochbahn distant signal + country: DE + icon: [ default: 'de/hha/v1' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-HHA:v' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant signal replacement by sign So 106 + country: DE + icon: [ default: 'de/so106' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:so106' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: distant light signals type Vr (repeated) + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-ESO:vr2', value: 'de/vr2-light-repeated' } + - { exact: 'DE-ESO:vr1', value: 'de/vr1-light-repeated' } + default: 'de/vr0-light-repeated' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:vr' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:repeated' } + + - description: distant light signals type Vr (shortened) + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-ESO:vr2', value: 'de/vr2-light-shortened' } + - { exact: 'DE-ESO:vr1', value: 'de/vr1-light-shortened' } + default: 'de/vr0-light-shortened' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:vr' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:shortened' } + + - description: distant light signals type Vr + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-ESO:vr2', value: 'de/vr2-light' } + - { exact: 'DE-ESO:vr1', value: 'de/vr1-light' } + default: 'de/vr0-light' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:vr' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant semaphore signals type Vr + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-ESO:vr2', value: 'de/vr2-semaphore' } + - { exact: 'DE-ESO:vr1', value: 'de/vr1-semaphore' } + default: 'de/vr0-semaphore' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:vr' } + - { tag: 'railway:signal:distant:form', value: 'semaphore' } + + - description: distant signal replacement by sign Ne 2 + country: DE + icon: + - match: 'railway:signal:distant:shortened' + cases: + - { value: 'de/ne2-reduced-distance' } + default: 'de/ne2' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:db:ne2' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: distant signal replacement at reduced distance by sign So 3 (DV 301) + country: DE + icon: [ default: 'de/ne2-dv301-reduced-distance' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:dr:so3' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + - { tag: 'railway:signal:distant:shortened' } + + - description: distant light signals type Hl + country: DE + icon: + - match: 'railway:signal:distant:repeated' + cases: + - { value: 'de/hl1-distant-repeated' } + default: 'de/hl1-distant' + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:hl' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Karlsruhe VBK Vorsignale (light) + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-VBK:fv2', value: 'de/vbk/fv2' } + - { exact: 'DE-VBK:fv3', value: 'de/vbk/fv3' } + default: 'de/vbk/fv1' + tags: + - { tag: 'railway:signal:distant', value: 'DE-VBK:fv' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Karlsruhe VBK Vorsignale (sign) + country: DE + icon: [ default: 'de/vbk/fv0' ] + tags: + - { tag: 'railway:signal:distant', any: [ 'DE-VBK:fv', 'DE-VBK:fv0' ] } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: BOStrab distant signal + country: DE + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'DE-BOStrab:v2', value: 'de/bostrab/v2' } + - { exact: 'DE-BOStrab:v1', value: 'de/bostrab/v1' } + - { exact: 'DE-VAGN:vr2', value: 'de/vag-nuremberg/vr2' } + - { exact: 'DE-VAGN:vr1', value: 'de/vag-nuremberg/vr1' } + - { exact: 'DE-VAGN:vr0', value: 'de/vag-nuremberg/vr0' } + default: 'de/bostrab/v0' + tags: + - { tag: 'railway:signal:distant', value: 'DE-BOStrab:v' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant signals type Sk (repeated) + country: DE + icon: [ default: 'de/sk-distant-repeated' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:sk' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:repeated' } + + - description: distant signals type Sk + country: DE + icon: [ default: 'de/sk-distant' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:sk' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant signals type Ks (repeated) + country: DE + icon: [ default: 'de/ks-distant-repeated' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:ks' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:repeated' } + + - description: distant signals type Ks (shortened) + country: DE + icon: [ default: 'de/ks-distant-shortened' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:ks' } + - { tag: 'railway:signal:distant:form', value: 'light' } + - { tag: 'railway:signal:distant:shortened' } + + - description: distant signals type Ks + country: DE + icon: [ default: 'de/ks-distant' ] + tags: + - { tag: 'railway:signal:distant', value: 'DE-ESO:ks' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: main entry sign Ne 1 + country: DE + icon: [ default: 'de/ne1' ] + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:ne1' } + - { tag: 'railway:signal:main:form', value: 'sign' } + + - description: main semaphore signals type Hp + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'DE-ESO:hp2', value: 'de/hp2-semaphore' } + - { exact: 'DE-ESO:hp1', value: 'de/hp1-semaphore' } + default: 'de/hp0-semaphore' + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:hp' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: main light signals type Hp + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'DE-ESO:hp2', value: 'de/hp2-light' } + - { exact: 'DE-ESO:hp1', value: 'de/hp1-light' } + default: 'de/hp0-light' + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:hp' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: main light signals type Hl + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'DE-ESO:hl2', value: 'de/hl2' } + - { exact: 'DE-ESO:hl3b', value: 'de/hl3b' } + - { exact: 'DE-ESO:hl3a', value: 'de/hl3a' } + - { exact: 'DE-ESO:hl1', value: 'de/hl1' } + default: 'de/hl0-main' + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:hl' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: tram Fahrsignal mit Anmeldung LSA + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { any: [ 'DE-AVG:f5', 'DE-BOStrab:f5' ], value: 'de/bostrab/f5-st9' } + - { any: [ 'DE-AVG:f3', 'DE-BOStrab:f3' ], value: 'de/bostrab/f3-st9' } + - { any: [ 'DE-AVG:f2', 'DE-BOStrab:f2' ], value: 'de/bostrab/f2-st9' } + - { any: [ 'DE-AVG:f1', 'DE-BOStrab:f1' ], value: 'de/bostrab/f1-st9' } + default: 'de/bostrab/f0-st9' + tags: + - { tag: 'railway:signal:main', any: [ 'DE-AVG:f', 'DE-BOStrab:f' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:PT_priority', value: 'requested;off' } + + - description: tram Fahrsignal + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { any: [ 'DE-AVG:f5', 'DE-BOStrab:f5' ], value: 'de/bostrab/f5' } + - { any: [ 'DE-AVG:f3', 'DE-BOStrab:f3' ], value: 'de/bostrab/f3' } + - { any: [ 'DE-AVG:f2', 'DE-BOStrab:f2' ], value: 'de/bostrab/f2' } + - { any: [ 'DE-AVG:f1', 'DE-BOStrab:f1' ], value: 'de/bostrab/f1' } + default: 'de/bostrab/f0' + tags: + - { tag: 'railway:signal:main', any: [ 'DE-AVG:f', 'DE-BOStrab:f' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: tram Fahrsignal (sign) + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { any: [ 'DE-AVG:f5', 'DE-BOStrab:f5' ], value: 'de/bostrab/f5-sign' } + - { any: [ 'DE-AVG:f3', 'DE-BOStrab:f3' ], value: 'de/bostrab/f3-sign' } + - { any: [ 'DE-AVG:f2', 'DE-BOStrab:f2' ], value: 'de/bostrab/f2-sign' } + - { any: [ 'DE-AVG:f1', 'DE-BOStrab:f1' ], value: 'de/bostrab/f1-sign' } + default: 'de/bostrab/f0-sign' + tags: + - { tag: 'railway:signal:main', any: [ 'DE-AVG:f', 'DE-BOStrab:f' ] } + - { tag: 'railway:signal:main:form', value: 'sign' } + + - description: BOStrab Hauptsignal + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'DE-BOStrab:h2', value: 'de/bostrab/h2' } + - { exact: 'DE-BOStrab:h1', value: 'de/bostrab/h1' } + - { exact: 'DE-VAGN:hp2', value: 'de/vag-nuremberg/hp2' } + - { exact: 'DE-VAGN:hp1', value: 'de/vag-nuremberg/hp1' } + - { all: [ 'DE-VAGN:hp0', 'off' ], value: 'de/vag-nuremberg/off' } + - { exact: 'DE-VAGN:hp3', value: 'de/vag-nuremberg/hp3' } + - { exact: 'DE-VAGN:hp0', value: 'de/vag-nuremberg/hp0' } + default: 'de/bostrab/h0' + tags: + - { tag: 'railway:signal:main', value: 'DE-BOStrab:h' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Hamburger Hochbahn main signal + country: DE + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'DE-HHA:h1', value: 'de/hha/h1' } + default: 'de/hha/h0' + tags: + - { tag: 'railway:signal:main', value: 'DE-HHA:h' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: main signals type Ks + country: DE + icon: [ default: 'de/ks-main' ] + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:ks' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: combined light signals type Hl + country: DE + icon: + - match: 'railway:signal:combined:states' + cases: + - { exact: 'DE-ESO:hl11', value: 'de/hl11' } + - { exact: 'DE-ESO:hl12b', value: 'de/hl12b' } + - { exact: 'DE-ESO:hl12a', value: 'de/hl12a' } + - { exact: 'DE-ESO:hl10', value: 'de/hl10' } + default: 'de/hl0-combined' + tags: + - { tag: 'railway:signal:combined', value: 'DE-ESO:hl' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: combined light signals type Sv + country: DE + icon: + # TODO add shortened + - match: 'railway:signal:combined:states' + cases: + - { exact: 'DE-ESO:hp0', value: 'de/sv-hp0' } + default: 'de/sv-sv0' + tags: + - { tag: 'railway:signal:combined', value: 'DE-ESO:sv' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: tram Hauptsignal mit Vorsignal + country: DE + icon: [ default: 'de/bostrab/h' ] + tags: + - { tag: 'railway:signal:combined', value: 'DE-BOStrab:h' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: main signals type Sk + country: DE + icon: [ default: 'de/sk1-light' ] + tags: + - { tag: 'railway:signal:main', value: 'DE-ESO:sk' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: combined signals type Sk + country: DE + icon: [ default: 'de/sk0-light' ] + tags: + - { tag: 'railway:signal:combined', value: 'DE-ESO:sk' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: combined signals type Ks + country: DE + icon: + - match: 'railway:signal:combined:shortened' + cases: + - { value: 'de/ks-combined-shortened' } + default: 'de/ks-combined' + tags: + - { tag: 'railway:signal:combined', value: 'DE-ESO:ks' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Speed signals (Zs 3) (light) + country: DE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([1-9]|1[0-6])0$', value: 'de/zs3-sign-up-{}', example: 'de/zs3-sign-up-{50}' } + default: 'de/zs3-empty-sign-up' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:zs3' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Speed signals (Zs 3) (light) + country: DE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([1-9]|1[0-6]|20)0$', value: 'de/zs3-light-{}', example: 'de/zs3-light-{70}' } + default: 'de/zs3-light-unknown' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:zs3' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Tram speed limit (G 2a) (sign) + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(5|[1-7][05])$', value: 'de/bostrab/g2a-{}', example: 'de/bostrab/g2a-{40}' } + default: 'de/bostrab/g2a-empty' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'DE-BOStrab:g2', 'DE-BOStrab:g2a', 'DE-BSVG:g2a' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Tram speed limit (G 2b) (light) + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-7]0$', value: 'de/bostrab/g2b-{}', example: 'de/bostrab/g2b-{40}' } + default: 'de/bostrab/g2b-empty' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'DE-BOStrab:g2', 'DE-BOStrab:g2b' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Tram signal G3 + country: DE + type: tram + icon: [ default: 'de/bostrab/g3' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-BOStrab:g3' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: German tram speed limit signals as signs (G 4) + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(100|[1-9]0|[235]5)$', value: 'de/bostrab/g4-{}', example: 'de/bostrab/g4-{40}' } + default: 'de/bostrab/g4-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-BOStrab:g4' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Hannover tram speed limit G5 + country: DE + type: tram + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(5|[1-6][05])$', value: 'de/bostrab/g5-{}', example: 'de/bostrab/g5-{40}' } + default: 'de/bostrab/g5-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-UESTRA:g5' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: East German line speed signal "Eckentafel" (Lf 5) + country: DE + type: line + icon: [ default: 'de/lf5-dv301-sign' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:dr:lf5' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: West German line speed signal "Anfangstafel" (Lf 5) + country: DE + type: line + icon: [ default: 'de/lf5-ds301-sign' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:db:lf5' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: German line speed signals (Lf 7) + country: DE + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(5|15|[1-9]0|1[0-9]0|200)$', value: 'de/lf7-sign-{}', example: 'de/lf7-sign-{180}' } + default: 'de/lf7-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:lf7' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Hamburger Hochbahn L4 + country: DE + type: line + icon: [ default: 'de/hha/l4' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-HHA:l4' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Anfangsscheibe + country: DE + icon: [ default: 'de/lf2-sign' ] + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'DE-ESO:lf2', 'DE-ESO:db:lf2' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Langsamfahrbeginnscheibe + country: DE + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(5|[1-9]0|1[0-2]0)$', value: 'de/lf1-2-sign-{}', example: 'de/lf1-2-sign-{80}' } + default: 'de/lf1-2-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:dr:lf1/2' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Endscheibe + country: DE + icon: [ default: 'de/lf3-sign' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:lf3' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Ende der Geschwindigkeitsbeschränkung (sign) + country: DE + icon: [ default: 'de/zs10-sign' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:db:zs10' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Ende der Geschwindigkeitsbeschränkung (light) + country: DE + icon: [ default: 'de/zs10-light' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'DE-ESO:db:zs10' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Richtungsanzeiger (Zs 2) + country: DE + icon: + - match: 'railway:signal:route:states' + cases: + - { regex: '^([A-ZÄÖÜẞ])$', value: 'de/zs2-{}', example: 'de/zs2-{ẞ}' } + default: 'de/zs2-unknown' + tags: + - { tag: 'railway:signal:route', value: 'DE-ESO:zs2' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: tram no trailing-point movement W 14 (sign) + country: DE + icon: [ default: 'de/bostrab/w14-sign' ] + tags: + - { tag: 'railway:signal:switch', value: 'DE-BOStrab:w' } + - { tag: 'railway:signal:switch:form', value: 'sign' } + - { tag: 'railway:signal:switch:states', value: 'DE-BOStrab:w14' } + + - description: tram switch signal + country: DE + icon: + - match: 'railway:signal:switch:states' + cases: + - { exact: 'DE-BOStrab:w14', value: 'de/bostrab/w14', description: 'no trailing-point movement' } + - { exact: 'DE-BOStrab:w13', value: 'de/bostrab/w13', description: 'switch set to the left' } + - { exact: 'DE-BOStrab:w3', value: 'de/bostrab/w3', description: 'switch set to the left (low speed)' } + - { exact: 'DE-BOStrab:w12', value: 'de/bostrab/w12', description: 'switch set to the right' } + - { exact: 'DE-BOStrab:w2', value: 'de/bostrab/w2', description: 'switch set to the right (low speed)' } + - { exact: 'DE-BOStrab:w11', value: 'de/bostrab/w11', description: 'switch set to straight-ahead' } + - { exact: 'DE-BOStrab:w1', value: 'de/bostrab/w1', description: 'switch set to straight-ahead (low speed)' } + - { exact: 'DE-BOStrab:w0', value: 'de/bostrab/w0', description: 'switch in use' } + default: 'de/bostrab/w-unknown' + tags: + - { tag: 'railway:signal:switch', value: 'DE-BOStrab:w' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: Karlsruhe tram switch signal + country: DE + icon: + - match: 'railway:signal:switch:states' + cases: + - { exact: 'DE-VBK:w15', value: 'de/bostrab/w14-yellow', description: 'trailing-point movement allowed' } + - { exact: 'DE-VBK:w13', value: 'de/bostrab/w13-yellow', description: 'switch set to the left' } + - { exact: 'DE-VBK:w3', value: 'de/bostrab/w3-yellow', description: 'switch set to the left (low speed)' } + - { exact: 'DE-VBK:w12', value: 'de/bostrab/w12-yellow', description: 'switch set to the right' } + - { exact: 'DE-VBK:w2', value: 'de/bostrab/w2-yellow', description: 'switch set to the right (low speed)' } + - { exact: 'DE-VBK:w11', value: 'de/bostrab/w11-yellow', description: 'switch set to straight-ahead' } + - { exact: 'DE-VBK:w1', value: 'de/bostrab/w1-yellow', description: 'switch set to straight-ahead (low speed)' } + - { exact: 'DE-VBK:w0', value: 'de/vbk/w0', description: 'stop, switch in use' } + default: 'de/vbk/w5' + tags: + - { tag: 'railway:signal:switch', value: 'DE-VBK:w' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: Karlsruhe tram switch distant signal + country: DE + icon: [ default: 'de/vbk/wv1' ] + tags: + - { tag: 'railway:signal:switch', value: 'DE-VBK:wv' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + - description: tram signal contact St 1 + country: DE + icon: [ default: 'de/bostrab/st1' ] + tags: + - { tag: 'railway:signal:switch', value: 'DE-BOStrab:st1' } + - { tag: 'railway:signal:switch:form', value: 'sign' } + + - description: tram switch contact St 2 + country: DE + icon: [ default: 'de/bostrab/st2' ] + tags: + - { tag: 'railway:signal:switch', value: 'DE-BOStrab:st2' } + - { tag: 'railway:signal:switch:form', value: 'sign' } + + - description: power off advance sign El 1v + country: DE + icon: [ default: 'de/el1v' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-ESO:el1v' } + + - description: power off sign El 1 + country: DE + icon: [ default: 'de/el1' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el1', 'DE-BOStrab:st3', 'DE-HHA:s1' ] } + + - description: power on sign El 2 + country: DE + icon: [ default: 'de/el2' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el2', 'DE-BOStrab:st4', 'DE-HHA:s2' ] } + + - description: pantograph down advance El 3 + country: DE + icon: [ default: 'de/el3' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-ESO:el3' } + + - description: pantograph down El 4 + country: DE + icon: [ default: 'de/el4' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el4', 'DE-BOStrab:st5' ] } + + - description: pantograph up El 5 + country: DE + icon: [ default: 'de/el5' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el5', 'DE-BOStrab:st6' ] } + + - description: end of catenary sign El 6 + country: DE + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'left', value: 'de/el6-left' } + - { exact: 'through', value: 'de/el6-through' } + - { exact: 'right', value: 'de/el6-right' } + default: 'de/el6' + tags: + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light', 'semaphore' ] } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el6', 'DE-BOStrab:st8' ] } + + - description: power off shortly sign El 7 (S-Bahn Berlin) + country: DE + icon: [ default: 'de/el7' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-ESO:el7' } + + - description: tram power off shortly signal (St 7) + country: DE + icon: [ default: 'de/bostrab/st7' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-BOStrab:st7', 'DE-AVG:st7' ] } + + - description: power off shortly + country: DE + icon: [ default: 'de/el1-el2' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', any: [ 'DE-ESO:el1;DE-ESO:el2', 'DE-ESO:el2:DE-ESO:el1' ] } + + - description: tram sign power off shortly El 1 + country: DE + icon: [ default: 'de/avg/el1' ] + tags: + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-AVG:el1' } + + - description: Streckentrennung (anfang) + country: DE + icon: [ default: 'de/streckentrennung-anfang' ] + tags: + - { tag: 'railway:signal:electricity', value: 'DE-ESO:streckentrennung' } + - { tag: 'railway:signal:electricity:type', value: 'begin_of_isolated_overlap' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Streckentrennung (ende) + country: DE + icon: [ default: 'de/streckentrennung-ende' ] + tags: + - { tag: 'railway:signal:electricity', value: 'DE-ESO:streckentrennung' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_isolated_overlap' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: ICE-Schaltmerkhilfe + country: DE + icon: [ default: 'de/ice-schaltmerkhilfe' ] + tags: + - { tag: 'railway:signal:electricity', value: 'DE-ESO:ice-schaltmerkhilfe' } + - { tag: 'railway:signal:electricity:type', value: 'power_on_for_long_trains' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: VGF st9 + country: DE + icon: [ default: 'de/vgf/st9' ] + tags: + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-VGF:st9' } + + - description: VGF st10 + country: DE + icon: [ default: 'de/vgf/st10' ] + tags: + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-VGF:st10' } + + - description: VGF st9 & st10 + country: DE + icon: [ default: 'de/vgf/st9-st10' ] + tags: + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity', value: 'DE-VGF:st9;DE-VGF:st10' } + + - description: RSAG Vorfahrt gewähren (So 11) + country: DE + icon: [ default: 'de/rsag/so11' ] + tags: + - { tag: 'railway:signal:minor:form', value: 'sign' } + - { tag: 'railway:signal:minor', value: 'DE-RSAG:so11' } + + - description: RSAG Vorfahrt (So 12) + country: DE + icon: [ default: 'de/rsag/so12' ] + tags: + - { tag: 'railway:signal:minor:form', value: 'sign' } + - { tag: 'railway:signal:minor', value: 'DE-RSAG:so12' } + + - description: RSAG Halt bei Überflutung (So 13) + country: DE + icon: [ default: 'de/rsag/so13' ] + tags: + - { tag: 'railway:signal:minor:form', value: 'sign' } + - { tag: 'railway:signal:minor', value: 'DE-RSAG:so13' } + + - description: radio channel notice + country: DE + icon: [ default: 'de/zugfunk' ] + tags: + - { tag: 'railway:signal:radio', value: 'DE-ESO:zugfunk-kanalhinweis' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + # --- DK --- # + + - description: Perronudkørselssignal + country: DK + icon: [ default: 'dk/main-PU' ] + tags: + - { tag: 'railway:signal:main', value: 'DK-SR:PU' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Stationsbloksignal for Udkørsel + country: DK + icon: [ default: 'dk/main-SU' ] + tags: + - { tag: 'railway:signal:main', value: 'DK-SR:SU' } + - { tag: 'railway:signal:main:form', value: 'light' } + + # --- ES --- # + + - description: end of catenary + country: ES + # TODO add turn direction + icon: [ default: 'es/FI14A' ] + tags: + - { tag: 'railway:signal:electricity', any: [ 'ES:FI14A', 'ES:FI14B' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenaxy' } + + - description: power off shortly + country: ES + icon: [ default: 'es/FI14C' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14C' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + + - description: power off shortly (full) + country: ES + icon: [ default: 'es/FI14D' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14D' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_shortly' } + + - description: pantograph down + country: ES + icon: [ default: 'es/FI14E' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14E' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: pantograph up + country: ES + icon: [ default: 'es/FI14F' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14F' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: pantograph down announcement + country: ES + icon: [ default: 'es/FI14G' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14G' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: power off announcement + country: ES + icon: [ default: 'es/FI14H' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14H' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + + - description: power off + country: ES + icon: [ default: 'es/FI14I' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14I' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: power on + country: ES + icon: [ default: 'es/FI14J' ] + tags: + - { tag: 'railway:signal:electricity', value: 'ES:FI14J' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + # --- FI --- # + + - description: Balise + country: FI + icon: [ default: 'fi/t-262' ] + tags: + - { tag: 'railway:signal:main', value: 'FI:Po' } + - { tag: 'railway:signal:main:form', value: 'balise' } + + - description: main light signals (new) + country: FI + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'FI:Po2', value: 'fi/po2-new' } + - { exact: 'FI:Po1', value: 'fi/po1-new' } + default: 'fi/po0-new' + tags: + - { tag: 'railway:signal:main', value: 'FI:Po' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: main light signals (old) + country: FI + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'FI:Po2', value: 'fi/po2-old' } + - { exact: 'FI:Po1', value: 'fi/po1-old' } + default: 'fi/po0-old' + tags: + - { tag: 'railway:signal:main', value: 'FI:Po-v' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Main signal type Yo + country: FI + icon: [ default: 'fi/yo-main' ] + tags: + - { tag: 'railway:signal:main', value: 'FI:Yo' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: combined block signal type So + country: FI + icon: [ default: 'fi/eo1-po1-combined-block' ] + tags: + - { tag: 'railway:signal:combined', value: 'FI:So' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Combined signal type Yo + country: FI + icon: [ default: 'fi/yo-combined' ] + tags: + - { tag: 'railway:signal:combined', value: 'FI:Yo' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: distant light signals (new) + country: FI + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'FI:Eo2', value: 'fi/eo2-new' } + - { exact: 'FI:Eo1', value: 'fi/eo1-new' } + default: 'fi/eo0-new' + tags: + - { tag: 'railway:signal:distant', value: 'FI:Eo' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant light signals (old) + country: FI + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'FI:Eo1', value: 'fi/eo1-old' } + default: 'fi/eo0-old' + tags: + - { tag: 'railway:signal:distant', value: 'FI:Eo-v' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Distant signal type Yo + country: FI + icon: [ default: 'fi/yo-distant' ] + tags: + - { tag: 'railway:signal:distant', value: 'FI:Yo' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: distant signal + country: FI + icon: [ default: 'fi/t-301A' ] + tags: + - { tag: 'railway:signal:distant', value: 'FI:T-301A' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: JKV alkaa + country: FI + icon: [ default: 'fi/t-140' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FI:T-140', 'FI:T-140A' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: JKV päättyy + country: FI + icon: [ default: 'fi/t-141' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FI:T-141', 'FI:T-141A' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: JKV rakennusalue alkaa + country: FI + icon: [ default: 'fi/t-142' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FI:T-142', 'FI:T-142A' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: JKV rakennusalue päättyy + country: FI + icon: [ default: 'fi/t-143' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FI:T-143', 'FI:T-143A' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Baliisiryhmämerkki (old) + country: FI + icon: [ default: 'fi/t-144' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'FI:T-144' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Baliisiryhmämerkki (new) + country: FI + icon: + - default: 'fi/t-144A' + - match: 'railway:signal:train_protection' + cases: + - { exact: 'FI:T-144B', value: 'fi/t-144-right' } + - { exact: 'FI:T-144C', value: 'fi/t-144-left' } + - { exact: 'FI:T-144D', value: 'fi/t-144-both' } + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FI:T-144A', 'FI:T-144B', 'FI:T-144C', 'FI:T-144D' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Stopping position (single) + country: FI + icon: + - default: 'fi/t-270' + - match: 'railway:signal:stop:caption' + cases: + - { any: ['1', '2', '3', '4', '5'], value: 'fi/t-270-{}', example: 'fi/t-270-{2}' } + default: 'fi/t-270-unknown' + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-270B', value: 'fi/t-270-right' } + - { exact: 'FI:T-270C', value: 'fi/t-270-left' } + - { exact: 'FI:T-270D', value: 'fi/t-270-both' } + exampleIcon: 'fi/t-270-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-270A', 'FI:T-270B', 'FI:T-270C', 'FI:T-270D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stopping position (combination) + country: FI + icon: + - default: 'fi/t-270' + - match: 'railway:signal:stop:caption' + cases: + - { regex: '^([1-5]);[^;]+$', value: 'fi/t-271-top-{}', example: 'fi/t-271-top-{1}' } + - { regex: '^([^;]+);[^;]+$', value: 'fi/t-271-top-unknown' } + - match: 'railway:signal:stop:caption' + cases: + - { regex: '^[^;]+;(1|2|3|4|5)$', value: 'fi/t-271-bottom-{}', example: 'fi/t-271-bottom-{2}' } + - { regex: '^[^;]+;([^;]+)$', value: 'fi/t-271-bottom-unknown' } + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-271B', value: 'fi/t-271-right' } + - { exact: 'FI:T-271C', value: 'fi/t-271-left' } + - { exact: 'FI:T-271D', value: 'fi/t-271-both' } + exampleIcon: 'fi/t-271-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-271A', 'FI:T-271B', 'FI:T-271C', 'FI:T-271D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stopping position point + country: FI + icon: + - default: 'fi/t-270' + - default: 'fi/t-272' + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-272B', value: 'fi/t-270-right' } + - { exact: 'FI:T-272C', value: 'fi/t-270-left' } + - { exact: 'FI:T-272D', value: 'fi/t-270-both' } + exampleIcon: 'fi/t-272-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-272A', 'FI:T-272B', 'FI:T-272C', 'FI:T-272D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Train composition (single) + country: FI + icon: + - default: 'fi/t-273' + - match: 'railway:signal:stop:caption' + cases: + - { any: ['1', '2', '3', '4'], value: 'fi/t-273-{}', example: 'fi/t-273-{2}' } + default: 'fi/t-273-unknown' + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-273B', value: 'fi/t-273-right' } + - { exact: 'FI:T-273C', value: 'fi/t-273-left' } + - { exact: 'FI:T-273D', value: 'fi/t-273-both' } + exampleIcon: 'fi/t-273-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-273A', 'FI:T-273B', 'FI:T-273C', 'FI:T-273D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Train composition (combination) + country: FI + icon: + - default: 'fi/t-273' + - match: 'railway:signal:stop:caption' + cases: + - { regex: '^([1-4]);[^;]+$', value: 'fi/t-274-top-{}', example: 'fi/t-274-top-{2}' } + - { regex: '^([^;]+);[^;]+$', value: 'fi/t-274-top-unknown' } + - match: 'railway:signal:stop:caption' + cases: + - { regex: '^[^;]+;(1|2|3|4)$', value: 'fi/t-274-bottom-{}', example: 'fi/t-274-bottom-{4}' } + - { regex: '^[^;]+;([^;]+)$', value: 'fi/t-274-bottom-unknown' } + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-274B', value: 'fi/t-274-right' } + - { exact: 'FI:T-274C', value: 'fi/t-274-left' } + - { exact: 'FI:T-274D', value: 'fi/t-274-both' } + exampleIcon: 'fi/t-274-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-274A', 'FI:T-274B', 'FI:T-274C', 'FI:T-274D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Train composition point + country: FI + icon: + - default: 'fi/t-273' + - default: 'fi/t-275' + - match: 'railway:signal:stop' + cases: + - { exact: 'FI:T-275B', value: 'fi/t-273-right' } + - { exact: 'FI:T-275C', value: 'fi/t-273-left' } + - { exact: 'FI:T-275D', value: 'fi/t-273-both' } + exampleIcon: 'fi/t-275-example' + tags: + - { tag: 'railway:signal:stop', any: ['FI:T-275A', 'FI:T-275B', 'FI:T-275C', 'FI:T-275D'] } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Main repeated light + country: FI + icon: [ default: 'fi/ko1' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'FI:Ko' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: minor light signals type Lo at moveable bridges + country: FI + icon: [ default: 'fi/lo0' ] + tags: + - { tag: 'railway:signal:minor', value: 'FI:Lo' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: shunting light signals type Ro (new) + country: FI + icon: [ default: 'fi/ro0-new' ] + tags: + - { tag: 'railway:signal:shunting', value: 'FI:Ro' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Shunting signal type Yo + country: FI + icon: [ default: 'fi/yo-shunting' ] + tags: + - { tag: 'railway:signal:shunting', value: 'FI:Yo' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Stop + country: FI + icon: [ default: 'fi/t-259' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-259' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Seismerkki (old) + country: FI + icon: [ default: 'fi/t-150' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-150' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Seismerkki (new) + country: FI + icon: [ default: 'fi/t-150B' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-150B' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Seislevy (old) + country: FI + icon: [ default: 'fi/t-151' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-151' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Seislevy (new) + country: FI + icon: [ default: 'fi/t-151A' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-151A' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Liikennöinnin raja + country: FI + icon: [ default: 'fi/t-152' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-152' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Veturin ajokieltomerkki + country: FI + icon: [ default: 'fi/t-310' ] + tags: + - { tag: 'railway:signal:stop', value: 'FI:T-310' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: crossing signal To + country: FI + icon: [ default: 'fi/to1' ] + tags: + - { tag: 'railway:signal:crossing', value: 'FI:To' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Nopeusmerkki, speed signal + country: FI + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([2-6]0)$', value: 'fi/t-101-{}', example: 'fi/t-101-{40}' } + default: 'fi/t-101-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'FI:T-101' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Nopeusmerkin etumerkki, distant signal + country: FI + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([2-6]0)$', value: 'fi/t-102-{}', example: 'fi/t-102-{40}' } + default: 'fi/t-102-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FI:T-102' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Merkitty nopeus päättyy -merkki, end of speed limit + country: FI + icon: [ default: 'fi/t-110' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FI:T-110' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: JKV-nopeus, JKV speed limit + country: FI + icon: [ default: 'fi/t-115' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FI:T-115' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Erotusjakson etumerkki + country: FI + icon: [ default: 'fi/t-120' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-120' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Erotusjakso alkaa + country: FI + icon: [ default: 'fi/t-122' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-122' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Erotusjakso päättyy + country: FI + icon: [ default: 'fi/t-123' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-123' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Ajojohdin päättyy + country: FI + icon: [ default: 'fi/t-121' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-121' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Laske virroitin + country: FI + icon: [ default: 'fi/t-124A' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-124A' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Laske virroitin -etumerkki + country: FI + icon: [ default: 'fi/t-133' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-133' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Nosta virroitin + country: FI + icon: [ default: 'fi/t-125' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FI:T-125' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Liikennepaikan raja -merkki + country: FI + icon: [ default: 'fi/t-164' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FI:T-164' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Liikennepaikka päättyy + country: FI + icon: [ default: 'fi/t-165' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FI:T-165' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Matkustajalaiturin ennakkomerkki + country: FI + icon: [ default: 'fi/t-166' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FI:T-166' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Järjestelyopastin + country: FI + icon: [ default: 'fi/jo4' ] + tags: + - { tag: 'railway:signal:humping', value: 'FI:Jo' } + - { tag: 'railway:signal:humping:form', value: 'light' } + + - description: Raise snowplow blades (point) + country: FI + icon: [ default: 'fi/t-171' ] + tags: + - { tag: 'railway:signal:snowplow', any: [ 'FI:T-170A', 'FI:T-171' ] } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Raise snowplow blades (area) + country: FI + icon: [ default: 'fi/t-171A' ] + tags: + - { tag: 'railway:signal:snowplow', any: [ 'FI:T-170B', 'FI:T-171A' ] } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Raise snowplow blades (old) + country: FI + icon: [ default: 'fi/t-170-v' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'FI:T-170-v' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Lower snowplow blades + country: FI + icon: [ default: 'fi/t-171B' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'FI:T-171B' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + - description: Lower snowplow blades (old) + country: FI + icon: [ default: 'fi/t-171-v' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'FI:T-171-v' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + + # --- FR --- # + + - description: Carré + country: FR + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'FR:Cv', value: 'fr/C-Cv' } + - { any: [ 'FR:M', 'FR:Mr' ], value: 'fr/C-M' } + - { any: [ 'FR:RR(A)', 'FR:RRc(A)', 'FR:RR(Ac)', 'FR:RRc(Ac)' ], value: 'fr/C-RR-A' } + - { any: [ 'FR:R(A)', 'FR:Rc(A)', 'FR:R(Ac)', 'FR:Rc(Ac)' ], value: 'fr/C-R-A' } + - { any: [ 'FR:RR', 'FR:RRc' ], value: 'fr/C-RR' } + - { any: [ 'FR:R', 'FR:Rc' ], value: 'fr/C-R' } + - { any: [ 'FR:A', 'FR:Ac' ], value: 'fr/C-A' } + - { any: [ 'FR:VL', 'FR:VLc' ], value: 'fr/C-VL' } + - { any: [ 'FR:S', 'FR:Sc' ], value: 'fr/C-S' } + # TODO split on shape + default: 'fr/C-C' + tags: + - { tag: 'railway:signal:main', any: [ 'FR:C', 'FR:CV', 'FR:CARRE' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Sémaphore + country: FR + icon: + - match: 'railway:signal:main:states' + cases: + - { any: [ 'FR:R(A)', 'FR:Rc(A)', 'FR:R(Ac)', 'FR:Rc(Ac)' ], value: 'fr/S-R-A' } + - { any: [ 'FR:R', 'FR:Rc' ], value: 'fr/S-R' } + - { any: [ 'FR:A', 'FR:Ac' ], value: 'fr/S-A' } + - { any: [ 'FR:VL', 'FR:VLc' ], value: 'fr/S-VL' } + # TODO split on shape + default: 'fr/S-S' + tags: + - { tag: 'railway:signal:main', value: 'FR:S' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Avertissement + country: FR + icon: + - match: 'railway:signal:distant:states' + cases: + - { exact: 'FR:R', value: 'fr/A-R' } + - { exact: 'FR:A', value: 'fr/A-A' } + default: 'fr/A-VL' + tags: + - { tag: 'railway:signal:distant', value: 'FR:A' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Disque + country: FR + icon: [ default: 'fr/D-D' ] + tags: + - { tag: 'railway:signal:distant', value: 'FR:D' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Pancarte Z & TIV-D + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([3-9]0|1[0-3]0)$', value: 'fr/Z-TIV-distance-sign-{}', example: 'fr/Z-TIV-distance-sign-{120}' } + default: 'fr/Z-TIV-distance-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:Z' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Pancarte Z & TIV-D (B) + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[5-9]0|200)$', value: 'fr/Z-TIV-type-B-{}', example: 'fr/Z-TIV-type-B-{160}' } + default: 'fr/Z-TIV-type-B-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:Z' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D_B' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Pancarte Z + country: FR + icon: [ default: 'fr/Tableau_Z' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:Z' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Tableau R + country: FR + icon: [ default: 'fr/Tableau_R' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:R' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Tableau P + country: FR + icon: [ default: 'fr/Tableau_P' ] + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:P' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Chevron pointe en bas + country: FR + icon: [ default: 'fr/chevron pointe en bas' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:Chevron' } + - { tag: 'railway:signal:speed_limit:pointing', value: 'downwards' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Chevron pointe en haut + country: FR + icon: [ default: 'fr/chevron pointe en haut' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'FR:Chevron' } + - { tag: 'railway:signal:speed_limit:pointing', value: 'upwards' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: TIV-D (mobile) + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([3-9]0|1[0-3]0)$', value: 'fr/TIV-distance-light-{}', example: 'fr/TIV-distance-light-{80}' } + default: 'fr/TIV-distance-empty-light' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D' } + - { tag: 'railway:signal:speed_limit_distant:mobile' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: TIV-D (fixed) + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^([3-9]0|1[0-3]0)$', value: 'fr/TIV-distance-sign-{}', example: 'fr/TIV-distance-sign-{70}' } + default: 'fr/TIV-distance-empty-sign' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + # TODO support TIV-R + # - description: TIV-R + # country: FR + # icon: + # - match: 'railway:signal:speed_limit_reminder:speed' + # cases: + # - { regex: '^([3-9]0|1[0-3]0)$', value: 'fr/TIV-reminder-sign-{}', example: 'fr/TIV-reminder-sign-{110}' } + # default: 'fr/TIV-reminder-empty-sign' + # tags: + # - { tag: 'railway:signal:speed_limit_reminder', value: 'FR:TIV-R' } + # - { tag: 'railway:signal:speed_limit_reminder:form', value: 'sign' } + + - description: TIV-D (B) + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[5-9]0|200)$', value: 'fr/TIV-type-B-{}', example: 'fr/TIV-type-B-{160}' } + default: 'fr/TIV-type-B-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D_B' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: TIV-D (C) + country: FR + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[5-9]0)$', value: 'fr/TIV-type-C-{}', example: 'fr/TIV-type-C-{160}' } + default: 'fr/TIV-type-C-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'FR:TIV-D_C' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Neutral Zone Announcement + country: FR + icon: [ default: 'fr/SECT' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:SECT' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + + - description: Start of Neutral Zone + country: FR + icon: [ default: 'fr/CC_EXE' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:CC_EXE' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: End of Neutral Zone + country: FR + icon: [ default: 'fr/CC_FIN' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:CC_FIN' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + - description: End of Neutral Zone (reversible trains) + country: FR + icon: [ default: 'fr/REV' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:REV' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + - description: Pantograph Down Announcement + country: FR + icon: [ default: 'fr/BP_DIS' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:BP_DIS' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: Start of Pantograph Down + country: FR + icon: [ default: 'fr/BP_EXE' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:BP_EXE' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: End of Pantograph Down + country: FR + icon: [ default: 'fr/BP_FIN' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:BP_FIN' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: Dual-Mode Traffic + country: FR + icon: [ default: 'fr/BIMODE' ] + tags: + - { tag: 'railway:signal:electricity', any: [ 'FR:BIMODE', 'FR:BIMODE_A' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: End of Catenaries + country: FR + icon: [ default: 'fr/FIN_CAT' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:FIN_CAT' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + + - description: Stop Markers + country: FR + icon: [ default: 'fr/JALON_ARRET' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:JALON_ARRET' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + - description: Frost Board + country: FR + icon: [ default: 'fr/GIVRE' ] + tags: + - { tag: 'railway:signal:electricity', value: 'FR:GIVRE' } + - { tag: 'railway:signal:electricity:form', any: [ 'sign', 'light' ] } + + - description: Cab signalling announcement + country: FR + icon: [ default: 'fr/CAB_E' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FR:CAB_E', 'FR:pancarte_CAB_entrée' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Cab signalling start + country: FR + icon: [ default: 'fr/CAB_R' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'FR:CAB_R' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Cab signalling end + country: FR + icon: [ default: 'fr/CAB_S' ] + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FR:CAB_S', 'FR:pancarte_CAB_sortie' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: TVM block marker + country: FR + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'fr/REP_TVM-right' } + - { exact: 'overhead', value: 'fr/REP_TVM-down' } + default: 'fr/REP_TVM-left' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FR:REP_TVM', 'FR:repère_arrêt_TVM' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ETCS block marker + country: FR + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'fr/REP_ETCS-right' } + - { exact: 'overhead', value: 'fr/REP_ETCS-down' } + default: 'fr/REP_ETCS-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'FR:REP_ETCS' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: TVM and ETCS block marker + country: FR + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'fr/REP_TVM_ETCS-right' } + - { exact: 'overhead', value: 'fr/REP_TVM_ETCS-down' } + default: 'fr/REP_TVM_ETCS-left' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'FR:REP_ETCS;FR:REP_TVM', 'FR:repère_arrêt_ETCS;FR:repère_arrêt_TVM' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Shunting marker + country: FR + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'right', value: 'fr/JAL_MAN-left' } + default: 'fr/JAL_MAN-right' + tags: + - { tag: 'railway:signal:shunting', any: [ 'FR:JAL_MAN', 'FR:jalon_de_manoeuvre_TVM' ] } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Distant route indicator + country: FR + icon: + - match: 'railway:signal:route_distant:states' + cases: + - { exact: 'right', value: 'fr/TIDD-right' } + - { exact: 'left', value: 'fr/TIDD-left' } + default: 'fr/TIDD-off' + tags: + - { tag: 'railway:signal:route_distant', value: 'FR:TIDD' } + - { tag: 'railway:signal:route_distant:form', value: 'light' } + + - description: Branch line + country: FR + icon: [ default: 'fr/BIF' ] + tags: + - { tag: 'railway:signal:route_distant', value: 'FR:BIF' } + - { tag: 'railway:signal:route_distant:form', value: 'sign' } + + - description: Switch junction + country: FR + icon: [ default: 'fr/Y' ] + tags: + - { tag: 'railway:signal:route_distant', value: 'FR:Y' } + - { tag: 'railway:signal:route_distant:form', value: 'sign' } + + - description: Route indicator + country: FR + icon: [ default: 'fr/ID' ] + tags: + - { tag: 'railway:signal:route', value: 'FR:ID' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Wrong route (entry) + country: FR + icon: [ default: 'fr/TECS' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'FR:TECS' } + - { tag: 'railway:signal:wrong_road:form', any: [ 'sign', 'light' ] } + + - description: Wrong route (exit) + country: FR + icon: [ default: 'fr/TSCS' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'FR:TSCS' } + - { tag: 'railway:signal:wrong_road:form', any: [ 'sign', 'light' ] } + + - description: Distant station + country: FR + icon: [ default: 'fr/GARE' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FR:GARE' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Distant site + country: FR + icon: [ default: 'fr/APPROCHE_ETS_A' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FR:APPROCHE_ETS_A' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Distant site + country: FR + icon: [ default: 'fr/APPROCHE_ETS' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FR:APPROCHE_ETS' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Station boundary + country: FR + icon: [ default: 'fr/LIMITE_ETS' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'FR:LIMITE_ETS' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Stop ARRET announcement + country: FR + icon: [ default: 'fr/ARRET_A' ] + tags: + - { tag: 'railway:signal:stop_distant', value: 'FR:ARRET_A' } + - { tag: 'railway:signal:stop_distant:form', value: 'sign' } + + - description: Stop ARRET + country: FR + icon: [ default: 'fr/ARRET' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop ATC + country: FR + icon: [ default: 'fr/ATC' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ATC' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: STOP announcement + country: FR + icon: [ default: 'fr/STOP_A' ] + tags: + - { tag: 'railway:signal:stop_distant', value: 'FR:STOP_A' } + - { tag: 'railway:signal:stop_distant:form', value: 'sign' } + + - description: STOP + country: FR + icon: [ default: 'fr/STOP' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:STOP' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: STOP + country: FR + icon: [ default: 'fr/JAL_ARRET' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:JAL_ARRET' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop position for passenger trains + country: FR + icon: [ default: 'fr/ARRET_TT' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TT' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop position front of train + country: FR + icon: [ default: 'fr/ARRET_TTL' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TTL' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop position EAS + country: FR + icon: [ default: 'fr/ARRET_TT_EAS' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TT_EAS' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop position for carriages + country: FR + # TODO match number of carriages + icon: [ default: 'fr/ARRET_V' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_V' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop for TGV 1 + country: FR + icon: [ default: 'fr/ARRET_TGV1' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TGV1' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop for TGV 2 + country: FR + icon: [ default: 'fr/ARRET_TGV2' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TGV2' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop for TGV 1-2 + country: FR + icon: [ default: 'fr/ARRET_TGV1-2' ] + tags: + - { tag: 'railway:signal:stop', value: 'FR:ARRET_TGV1-2' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Shunting to garage + country: FR + icon: [ default: 'fr/G' ] + tags: + - { tag: 'railway:signal:shunting', value: 'FR:G' } + - { tag: 'railway:signal:shunting:form', any: [ 'sign', 'light' ] } + + - description: Shunting to depot + country: FR + icon: [ default: 'fr/D' ] + tags: + - { tag: 'railway:signal:shunting', value: 'FR:D' } + - { tag: 'railway:signal:shunting:form', any: [ 'sign', 'light' ] } + + # --- GB --- # + + - description: Whistle stencil + country: GB + icon: [ default: 'gb/whistle-stencil' ] + tags: + - { tag: 'railway:signal:whistle', value: 'GB-NR:stencil' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Whistle board + country: GB + icon: [ default: 'gb/whistle-board' ] + tags: + - { tag: 'railway:signal:whistle', value: 'GB-NR:board' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Whistle continuous + country: GB + icon: [ default: 'gb/whistle-continuous' ] + tags: + - { tag: 'railway:signal:whistle', value: 'GB-NR:continuous' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Cab Signalling Start Warning Board + country: GB + icon: [ default: 'gb/cab-entry-warning' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:warning' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Cab Signalling Start Board + country: GB + icon: [ default: 'gb/cab-entry' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:entry' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'start' } + + - description: Cab Signalling End Board + country: GB + icon: [ default: 'gb/cab-exit' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:exit' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'end' } + + - description: Cab Signalling Directional arrow + country: GB + icon: + - match: 'railway:signal:train_protection:turn_direction' + cases: + - { exact: 'GB-NR:left', value: 'gb/cab-arrow-left' } + - { exact: 'GB-NR:right', value: 'gb/cab-arrow-right' } + default: 'gb/cab-arrow-unknown' + tags: + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Block Marker Passable Plate + country: GB + icon: [ default: 'gb/block-passable' ] + tags: + - { tag: 'railway:signal:train_protection:block_marker:type', value: 'passable' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Block Marker Non-Passable Plate + country: GB + icon: [ default: 'gb/block-absolute' ] + tags: + - { tag: 'railway:signal:train_protection:block_marker:type', value: 'absolute' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ETCS Block Marker + country: GB + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'right', value: 'gb/ETCS-left' } + - { exact: 'overhead', value: 'gb/ETCS-overhead' } + default: 'gb/ETCS-right' + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:ETCS' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: TVM/CBTC Block Marker + country: GB + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'right', value: 'gb/TVM-CBTC-left' } + - { exact: 'overhead', value: 'gb/TVM-CBTC-overhead' } + default: 'gb/TVM-CBTC-right' + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:TVM-CBTC' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: Cab Signalling Shunt Entry Board + country: GB + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'right', value: 'gb/cab-shunt-left' } + - { exact: 'overhead', value: 'gb/cab-shunt-overhead' } + default: 'gb/cab-shunt-right' + tags: + - { tag: 'railway:signal:train_protection', value: 'GB-NR:shunt-entry' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: Main (light) + country: GB + icon: + - match: 'railway:signal:main:design' + cases: + - { exact: 'combined', value: 'gb/main-combined-light' } + default: 'gb/main-individual-light' + tags: + - { tag: 'railway:signal:main', value: 'GB-NR:main' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Main (semaphore) + country: GB + icon: [ default: 'gb/main-semaphore' ] + tags: + - { tag: 'railway:signal:main', value: 'GB-NR:main' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: SPAD + country: GB + icon: [ default: 'gb/SPAD' ] + tags: + - { tag: 'railway:signal:main', value: 'GB-NR:SPAD' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Distant + country: GB + icon: [ default: 'gb/distant-light' ] + tags: + - { tag: 'railway:signal:distant', value: 'GB-NR:distant' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Distant (semaphore) + country: GB + icon: [ default: 'gb/distant-semaphore' ] + tags: + - { tag: 'railway:signal:distant', value: 'GB-NR:distant' } + - { tag: 'railway:signal:distant:form', value: 'semaphore' } + + - description: Distant (board) + country: GB + icon: [ default: 'gb/distant-board' ] + tags: + - { tag: 'railway:signal:distant', value: 'GB-NR:distant' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Repeated (banner) + country: GB + icon: [ default: 'gb/repeated-banner' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'GB-NR:banner' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Repeated off + country: GB + icon: [ default: 'gb/repeated-off' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'GB-NR:off' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Shunting + country: GB + icon: [ default: 'gb/shunting' ] + tags: + - { tag: 'railway:signal:shunting', value: 'GB-NR:shunting' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Shunting limit + country: GB + icon: [ default: 'gb/limit-shunt' ] + tags: + - { tag: 'railway:signal:shunting', value: 'GB-NR:limit' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Junction signals (feather & theatre) + country: GB + icon: + - match: 'railway:signal:route:states' + cases: + - { all: [ 'position_1', 'position_2', 'position_3', 'position_4' ], value: 'gb/route-feather-1234' } + - { all: [ 'position_1', 'position_4', 'position_5', 'position_6' ], value: 'gb/route-feather-1456' } + - { all: [ 'position_1', 'position_4', 'position_5' ], value: 'gb/route-feather-145' } + - { all: [ 'position_4', 'position_5', 'position_6' ], value: 'gb/route-feather-456' } + - { all: [ 'position_1', 'position_2', 'position_3' ], value: 'gb/route-feather-123' } + - { all: [ 'position_1', 'position_2', 'position_4' ], value: 'gb/route-feather-124' } + - { all: [ 'position_4', 'position_5' ], value: 'gb/route-feather-45' } + - { all: [ 'position_1', 'position_4' ], value: 'gb/route-feather-14' } + - { all: [ 'position_1', 'position_2' ], value: 'gb/route-feather-12' } + - { exact: 'position_4', value: 'gb/route-feather-4' } + - { exact: 'position_1', value: 'gb/route-feather-1' } + default: 'gb/route-feather-unknown' + - match: 'railway:signal:route:states' + cases: + - { regex: '^[CFSU]$', value: 'gb/route-theatre-{}', example: 'gb/route-theatre-{U}' } + default: 'gb/route-theatre-unknown' + position: bottom + tags: + - { tag: 'railway:signal:route', value: 'GB-NR:junction' } + - { tag: 'railway:signal:route:form', value: 'light' } + - { tag: 'railway:signal:route:design', value: 'feather;theatre' } + + - description: Junction signals (feather) + country: GB + icon: + - match: 'railway:signal:route:states' + cases: + - { all: [ 'position_1', 'position_2', 'position_3', 'position_4' ], value: 'gb/route-feather-1234' } + - { all: [ 'position_1', 'position_4', 'position_5', 'position_6' ], value: 'gb/route-feather-1456' } + - { all: [ 'position_1', 'position_4', 'position_5' ], value: 'gb/route-feather-145' } + - { all: [ 'position_4', 'position_5', 'position_6' ], value: 'gb/route-feather-456' } + - { all: [ 'position_1', 'position_2', 'position_3' ], value: 'gb/route-feather-123' } + - { all: [ 'position_1', 'position_2', 'position_4' ], value: 'gb/route-feather-124' } + - { all: [ 'position_4', 'position_5' ], value: 'gb/route-feather-45' } + - { all: [ 'position_1', 'position_4' ], value: 'gb/route-feather-14' } + - { all: [ 'position_1', 'position_2' ], value: 'gb/route-feather-12' } + - { exact: 'position_4', value: 'gb/route-feather-4' } + - { exact: 'position_1', value: 'gb/route-feather-1' } + default: 'gb/route-feather-unknown' + tags: + - { tag: 'railway:signal:route', value: 'GB-NR:junction' } + - { tag: 'railway:signal:route:form', value: 'light' } + - { tag: 'railway:signal:route:design', value: 'feather' } + + - description: Junction signals (theatre) + country: GB + icon: + - match: 'railway:signal:route:states' + cases: + - { regex: '^[CFSU]$', value: 'gb/route-theatre-{}', example: 'gb/route-theatre-{U}' } + default: 'gb/route-theatre-unknown' + tags: + - { tag: 'railway:signal:route', value: 'GB-NR:junction' } + - { tag: 'railway:signal:route:form', value: 'light' } + - { tag: 'railway:signal:route:design', value: 'theatre' } + + - description: Departure + country: GB + icon: [ default: 'gb/departure-RA' ] + tags: + - { tag: 'railway:signal:departure', value: 'GB-NR:RA' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Stop board + country: GB + icon: [ default: 'gb/stop-board' ] + tags: + - { tag: 'railway:signal:stop', value: 'GB-NR:stop' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Crossing + country: GB + icon: [ default: 'gb/crossing' ] + tags: + - { tag: 'railway:signal:crossing', value: 'GB-NR:crossing' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + # --- IT --- # + + - description: Route + country: IT + icon: + - match: 'railway:signal:route:states' + cases: + - { regex: '^[1-4]$', value: 'it/route-{}', example: 'it/route-{4}' } + default: 'it/route-unknown' + tags: + - { tag: 'railway:signal:route', value: 'IT:ROUTE' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Indicatori di partenza (Avvio) + country: IT + icon: [ default: 'it/PAR-AVV' ] + tags: + - { tag: 'railway:signal:departure', value: 'IT:PAR' } + - { tag: 'railway:signal:departure:form', value: 'light' } + - { tag: 'railway:signal:departure:substitute_signal', value: 'IT:AVV' } + + - description: Indicatori di partenza + country: IT + icon: [ default: 'it/PAR' ] + tags: + - { tag: 'railway:signal:departure', value: 'IT:PAR' } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: 1ª categoria (1 light) + country: IT + icon: + - match: 'railway:signal:main:shape' + cases: + - { exact: 'square', value: 'it/main-s-1v', description: 'quadro' } + default: 'it/main-1v' + - match: 'railway:signal:main:states' + cases: + - { any: [ '(Y)', 'Y' ], value: "it/1v-Y" } + - { exact: 'G', value: "it/1v-G" } + default: "it/1v-R" + - match: 'railway:signal:main:substitute_signal' + cases: + - { all: ['IT:AVA', 'IT:AVV'], value: 'it/AVV-AVA', description: 'Avvio & Avanzamento' } + - { exact: 'IT:AVA', value: 'it/AVA', description: 'Avanzamento' } + - { exact: 'IT:AVV', value: 'it/AVV', description: 'Avvio' } + position: 'bottom' + exampleIcon: 'it/main-1v-example' + tags: + - { tag: 'railway:signal:main', value: 'IT:1V' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: 1ª categoria (2 lights) + country: IT + icon: + - match: 'railway:signal:main:shape' + cases: + - { exact: 'square', value: 'it/main-s-2v', description: 'quadro' } + default: 'it/main-2v' + - match: 'railway:signal:main:states' + cases: + - { any: [ 'R-(Y)', 'R-Y' ], value: 'it/2v-RY' } + - { exact: 'R-G', value: 'it/2v-RG' } + - { any: [ 'Y-G', '(Y-G)', '(Y)-(G)' ], value: 'it/2v-YG' } + - { exact: 'Y-Y', value: 'it/2v-YY' } + - { any: [ '(Y)', 'Y' ], value: 'it/2v-Y' } + - { exact: 'G', value: 'it/2v-G' } + default: 'it/2v-R' + - match: 'railway:signal:main:substitute_signal' + cases: + - { all: ['IT:AVA', 'IT:AVV'], value: 'it/AVV-AVA', description: 'Avvio & Avanzamento' } + - { exact: 'IT:AVA', value: 'it/AVA', description: 'Avanzamento' } + - { exact: 'IT:AVV', value: 'it/AVV', description: 'Avvio' } + position: 'bottom' + exampleIcon: 'it/main-2v-example' + tags: + - { tag: 'railway:signal:main', value: 'IT:2V' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: 1ª categoria (3 lights) + country: IT + icon: + - match: 'railway:signal:main:shape' + cases: + - { exact: 'square', value: 'it/main-s-3v', description: 'quadro' } + default: 'it/main-3v' + - match: 'railway:signal:main:states' + cases: + - { any: [ 'R-Y-G', 'R-(Y-G)', 'R-(Y)-(G)' ], value: 'it/3v-RYG' } + - { exact: 'R-Y-Y', value: 'it/3v-RYY' } + - { any: [ 'R-(Y)', 'R-Y' ], value: 'it/3v-RY' } + - { exact: 'R-G', value: 'it/3v-RG' } + - { any: [ 'Y-G', '(Y-G)', '(Y)-(G)' ], value: 'it/3v-YG' } + - { exact: 'Y-Y', value: 'it/3v-YY' } + - { any: [ '(Y)', 'Y' ], value: 'it/3v-Y' } + - { exact: 'G', value: 'it/3v-G' } + default: 'it/3v-R' + - match: 'railway:signal:main:substitute_signal' + cases: + - { all: ['IT:AVA', 'IT:AVV'], value: 'it/AVV-AVA', description: 'Avvio & Avanzamento' } + - { exact: 'IT:AVA', value: 'it/AVA', description: 'Avanzamento' } + - { exact: 'IT:AVV', value: 'it/AVV', description: 'Avvio' } + position: 'bottom' + exampleIcon: 'it/main-3v-example' + tags: + - { tag: 'railway:signal:main', value: 'IT:3V' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Segnale accoppiato (1 light) + country: IT + icon: + - match: 'railway:signal:combined:shape' + cases: + - { exact: 'square', value: 'it/combined-s-1v', description: 'quadro' } + default: 'it/combined-1v' + - match: 'railway:signal:combined:states' + cases: + - { any: [ '(Y)', 'Y' ], value: 'it/1v-Y' } + - { exact: 'G', value: 'it/1v-G' } + default: 'it/1v-R' + exampleIcon: 'it/combined-1v-example' + tags: + - { tag: 'railway:signal:combined', value: 'IT:1V' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Segnale accoppiato (2 lights) + country: IT + icon: + - match: 'railway:signal:combined:shape' + cases: + - { exact: 'square', value: 'it/combined-s-2v', description: 'quadro' } + default: 'it/combined-2v' + - match: 'railway:signal:combined:states' + cases: + - { any: [ 'R-(Y)', 'R-Y' ], value: 'it/2v-RY' } + - { exact: 'R-G', value: 'it/2v-RG' } + - { any: [ 'Y-G', '(Y-G)', '(Y)-(G)' ], value: 'it/2v-YG' } + - { exact: 'Y-Y', value: 'it/2v-YY' } + - { any: [ '(Y)', 'Y' ], value: 'it/2v-Y' } + - { exact: 'G', value: 'it/2v-G' } + default: 'it/2v-R' + exampleIcon: 'it/combined-2v-example' + tags: + - { tag: 'railway:signal:combined', value: 'IT:2V' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Segnale accoppiato (3 lights) + country: IT + icon: + - match: 'railway:signal:combined:shape' + cases: + - { exact: 'square', value: 'it/combined-s-3v', description: 'quadro' } + default: 'it/combined-3v' + - match: 'railway:signal:combined:states' + cases: + - { any: [ 'R-Y-G', 'R-(Y-G)', 'R-(Y)-(G)' ], value: 'it/3v-RYG' } + - { exact: 'R-Y-Y', value: 'it/3v-RYY' } + - { any: [ 'R-(Y)', 'R-Y' ], value: 'it/3v-RY' } + - { exact: 'R-G', value: 'it/3v-RG' } + - { any: [ 'Y-G', '(Y-G)', '(Y)-(G)' ], value: 'it/3v-YG' } + - { exact: 'Y-Y', value: 'it/3v-YY' } + - { any: [ '(Y)', 'Y' ], value: 'it/3v-Y' } + - { exact: 'G', value: 'it/3v-G' } + default: 'it/3v-R' + exampleIcon: 'it/combined-3v-example' + tags: + - { tag: 'railway:signal:combined', value: 'IT:3V' } + - { tag: 'railway:signal:combined:form', value: 'light' } + - { tag: 'railway:signal:combined:shape', value: 'square' } + + - description: Avviso (1 light) + country: IT + icon: + - match: 'railway:signal:distant:shape' + cases: + - { exact: 'square', value: 'it/avviso-s-1v', description: 'quadro' } + default: 'it/avviso-1v' + - match: 'railway:signal:distant:states' + cases: + - { any: [ '(Y)', 'Y' ], value: 'it/1v-Y' } + default: 'it/1v-G' + - default: 'it/avviso' + position: 'bottom' + exampleIcon: 'it/avviso-1v-example' + tags: + - { tag: 'railway:signal:distant', value: 'IT:1V' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Avviso (2 lights) + country: IT + icon: + - match: 'railway:signal:distant:shape' + cases: + - { exact: 'square', value: 'it/avviso-s-2v', description: 'quadro' } + default: 'it/avviso-2v' + - match: 'railway:signal:distant:states' + cases: + - { any: [ 'Y-G', '(Y-G)', '(Y)-(G)' ], value: 'it/2v-YG' } + - { any: [ '(Y)', 'Y' ], value: 'it/2v-Y' } + default: 'it/2v-G' + - default: 'it/avviso' + position: 'bottom' + exampleIcon: 'it/avviso-2v-example' + tags: + - { tag: 'railway:signal:distant', value: 'IT:2V' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Triangle speed limit + country: IT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { exact: '30', value: 'it/tri-30', description: '30 km/h' } + - { exact: '60', value: 'it/tri-60', description: '60 km/h' } + default: 'it/tri-unknown' + tags: + - { tag: 'railway:signal:speed_limit', value: 'IT:TRI' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Rappel + country: IT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { exact: '100', value: 'it/rappel-100', description: '100 km/h' } + - { exact: '60', value: 'it/rappel-60', description: '60 km/h' } + default: 'it/rappel-30' + tags: + - { tag: 'railway:signal:speed_limit', value: 'IT:RAP' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: Speed limit + country: IT + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^160$', value: 'it/speed-{}', example: 'it/speed-{160}' } + default: 'it/speed-unknown' + tags: + - { tag: 'railway:signal:speed_limit', any: [ 'IT:1R', 'IT:2R', 'IT:3R' ] } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Distant speed limit (distance 1) + country: IT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^160$', value: 'it/speed-distant-1-{}', example: 'it/speed-distant-1-{160}' } + default: 'it/speed-distant-1-unknown' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'IT:1R', 'IT:2R', 'IT:3R' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit_distant:distance', value: '1' } + + - description: Distant speed limit (distance 2) + country: IT + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^160$', value: 'it/speed-distant-2-{}', example: 'it/speed-distant-2-{160}' } + default: 'it/speed-distant-2-unknown' + tags: + - { tag: 'railway:signal:speed_limit_distant', any: [ 'IT:1R', 'IT:2R', 'IT:3R' ] } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit_distant:distance', value: '2' } + + - description: Halt + country: IT + icon: [ default: 'it/stop' ] + tags: + - { tag: 'railway:signal:stop', value: 'IT:HALT' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Distant Halt (distance 1) + country: IT + icon: [ default: 'it/stop-distant-1' ] + tags: + - { tag: 'railway:signal:stop_distant', value: 'IT:HALT' } + - { tag: 'railway:signal:stop_distant:form', value: 'sign' } + - { tag: 'railway:signal:stop_distant:distance', value: '1' } + + - description: Distant Halt (distance 2) + country: IT + icon: [ default: 'it/stop-distant-2' ] + tags: + - { tag: 'railway:signal:stop_distant', value: 'IT:HALT' } + - { tag: 'railway:signal:stop_distant:form', value: 'sign' } + - { tag: 'railway:signal:stop_distant:distance', value: '2' } + + - description: Marmotte + country: IT + icon: [ default: 'it/marmotte' ] + tags: + - { tag: 'railway:signal:shunting', value: 'IT:MAR' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Segnali alti di manovra + country: IT + icon: [ default: 'it/MAN' ] + tags: + - { tag: 'railway:signal:shunting', value: 'IT:MAN' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Picchetto limite di manovra + country: IT + icon: [ default: 'it/PLIM' ] + tags: + - { tag: 'railway:signal:shunting', value: 'IT:PLIM' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Distant crossing + country: IT + icon: [ default: 'it/crossing-distant' ] + tags: + - { tag: 'railway:signal:crossing_distant', any: [ 'IT:D_CT' ] } + - { tag: 'railway:signal:crossing_distant:form', value: 'light' } + + - description: Level crossing (light) + country: IT + icon: [ default: 'it/crossing-light' ] + tags: + - { tag: 'railway:signal:crossing', value: 'IT:CT' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Level crossing (sign) + country: IT + icon: [ default: 'it/crossing-sign' ] + tags: + - { tag: 'railway:signal:crossing', value: 'IT:PL' } + - { tag: 'railway:signal:crossing:form', value: 'sign' } + + # --- LU --- # + + - description: ESFA + country: LU + icon: [ default: 'lu/ESFA' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFA' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + + - description: ESFAp/TA + country: LU + icon: [ default: 'lu/ESFAp_TA' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFAp/TA' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: ESFAp/TE + country: LU + icon: [ default: 'lu/ESFAp_TE' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFAp/TE' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: ESFAp/TR + country: LU + icon: [ default: 'lu/ESFAp_TR' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFAp/TR' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: ESFCC/A + country: LU + icon: [ default: 'lu/ESFCC_A' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFCC/A' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off_advance' } + + - description: ESFCC/E + country: LU + icon: [ default: 'lu/ESFCC_E' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFCC/E' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: ESFCC/F + country: LU + icon: [ default: 'lu/ESFCC_F' ] + tags: + - { tag: 'railway:signal:electricity', value: 'LU-CFL:ESFCC/F' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + # --- NL --- # + + - description: dwarf shunting signals + country: NL + icon: [ default: 'nl/main_light_dwarf_shunting' ] + tags: + - { tag: 'railway:signal:main', value: 'NL' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:height', value: 'dwarf' } + - { tag: 'railway:signal:shunting', value: 'NL' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: train protection block marker light + country: NL + icon: [ default: 'nl/main_light_white_bar' ] + tags: + - { tag: 'railway:signal:main', value: 'NL' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:train_protection', value: 'NL:228' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: main dwarf signals + country: NL + icon: [ default: 'nl/main_light_dwarf' ] + tags: + - { tag: 'railway:signal:main', value: 'NL' } + - { tag: 'railway:signal:main:height', value: 'dwarf' } + + - description: main shunting light + country: NL + icon: [ default: 'nl/main_light_shunting' ] + tags: + - { tag: 'railway:signal:main', value: 'NL' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:shunting', value: 'NL' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: main repeated light + country: NL + icon: [ default: 'nl/main_repeated_light' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'NL' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: main light + country: NL + icon: [ default: 'nl/main_light' ] + tags: + - { tag: 'railway:signal:main', value: 'NL' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: distant light + country: NL + icon: [ default: 'nl/distant_light' ] + tags: + - { tag: 'railway:signal:distant', value: 'NL' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: block marker light + country: NL + icon: [ default: 'nl/227a' ] + tags: + - { tag: 'railway:signal:shunting', any: [ 'NL:227', 'NL' ] } + - { tag: 'railway:signal:shunting:form', value: 'light' } + - { tag: 'railway:signal:shunting:states', all: [ 'NL:227a', 'NL:227c' ] } + + - description: block marker (arrow) + country: NL + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'nl/227b-arrow-right' } + - { exact: 'overhead', value: 'nl/227b-arrow-down' } + default: 'nl/227b-arrow-left' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'NL:227b', 'NL:227' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + - { tag: 'railway:signal:train_protection:shape', value: 'arrow' } + + - description: block marker (triangle) + country: NL + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'nl/227b-triangle-right' } + - { exact: 'overhead', value: 'nl/227b-triangle-down' } + default: 'nl/227b-triangle-left' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'NL:227b', 'NL:227' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: drive on sight + country: NL + icon: [ default: 'nl/317' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:317' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ETCS cab signalling (start) + country: NL + icon: [ default: 'nl/336' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:336' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ETCS cab signalling (end) + country: NL + icon: [ default: 'nl/337' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:337' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ATB distant + country: NL + icon: [ default: 'nl/328a' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:328a' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ATB start + country: NL + icon: [ default: 'nl/328' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:328' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ATB code + country: NL + icon: [ default: 'nl/328b' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:328b' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ATB end + country: NL + icon: [ default: 'nl/329' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:329' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: ATB codewissel + country: NL + icon: [ default: 'nl/330' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:330' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + + - description: Einde beveiligd gebied + country: NL + icon: [ default: 'nl/333' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NL:333' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: middenvoetbrugsein + country: NL + icon: [ default: 'nl/215b' ] + tags: + - { tag: 'railway:signal:minor', value: 'NL:middenvoetbrugsein' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: departure signal + country: NL + icon: [ default: 'nl/departure' ] + tags: + - { tag: 'railway:signal:departure', any: [ 'NL', 'NL:VL' ] } + - { tag: 'railway:signal:departure:form', value: 'light' } + + - description: Humping ("heuvelen") + country: NL + icon: [ default: 'nl/270a' ] + tags: + - { tag: 'railway:signal:humping', value: 'NL:270' } + - { tag: 'railway:signal:humping:form', value: 'light' } + + - description: stopplaatssein + country: NL + icon: [ default: 'nl/303' ] + tags: + - { tag: 'railway:signal:stop', any: [ 'NL:303', 'NL:stopplaatssein' ] } + - { tag: 'railway:signal:stop:form', value: 'light' } + + - description: treinlengtebord + country: NL + # TODO implement partial platform train length values (railway:signal:stop:carriages_partial_platform=*) + icon: + - match: 'railway:signal:stop:carriages' + cases: + - { regex: '^([2-9]|1[0-68])$', value: 'nl/304-{}', example: 'nl/304-{8}' } + default: 'nl/304-empty' + tags: + - { tag: 'railway:signal:stop', value: 'NL:304' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: distant crossing + country: NL + # TODO process caption / distant crossing position + icon: [ default: 'nl/318a' ] + tags: + - { tag: 'railway:signal:crossing_distant', any: [ 'NL:318a', 'NL:318b' ] } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: station + country: NL + icon: [ default: 'nl/305' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'NL:305' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: L signal + country: NL + icon: [ default: 'nl/276' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + - { tag: 'railway:signal:speed_limit:states', all: [ 'L', 'off' ] } + + - description: H signal + country: NL + icon: [ default: 'nl/277' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + - { tag: 'railway:signal:speed_limit:states', all: [ 'H', 'off' ] } + + - description: X/G signal + country: NL + icon: [ default: 'nl/279' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + - { tag: 'railway:signal:speed_limit:states', all: [ 'X', 'G', 'off' ] } + + - description: distant speed limit distant (sign) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-9]0|1[0-4]0|125$', value: 'nl/313-{}', example: 'nl/313-{80}' } + default: 'nl/313-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'NL:313' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: speed limit (sign) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-9]0|1[0-46]0|[12]5|125$', value: 'nl/314-{}', example: 'nl/314-{70}' } + default: 'nl/314-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL:314' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: speed limit increase (sign) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[3-9]0|1[0-46]0|125$', value: 'nl/316-{}', example: 'nl/316-{130}' } + default: 'nl/316-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL:316' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: distant speed limit (light) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^[1-9]0|1[0-9]0$', value: 'nl/speed_limit_distant_light-{}', example: 'nl/speed_limit_distant_light-{60}' } + default: 'nl/speed_limit_distant_light-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'NL' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'light' } + + - description: speed limit (light) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-9]0|1[0-9]0$', value: 'nl/speed_limit_light-{}', example: 'nl/speed_limit_light-{60}' } + default: 'nl/speed_limit_light-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: tunnel distant speed limit + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^80$', value: 'nl/286-{}', example: 'nl/286-{80}' } + default: 'nl/286-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'NL:286' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: tunnel entry speed limit + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[3-8]0$', value: 'nl/281-{}', example: 'nl/281-{40}' } + default: 'nl/281-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL:281' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: advisory speed (sign) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^15|35|[4-9]0|120$', value: 'nl/282-{}', example: 'nl/282-{40}' } + default: 'nl/282-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL:282' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: advisory speed (light) + country: NL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^15|35|[4-9]0|120$', value: 'nl/282a-{}', example: 'nl/282a-{40}' } + default: 'nl/282a-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'NL:282' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + - description: power off + country: NL + icon: [ default: 'nl/306a' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NL:306' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + # TODO support carriages + - description: power on + country: NL + icon: [ default: 'nl/307a' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NL:307' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + - description: announcement pantograph down + country: NL + icon: [ default: 'nl/308a' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NL:308' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + # TODO support wash + - description: pantograph down + country: NL + icon: [ default: 'nl/309a' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NL:309' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + # TODO support carriages + - description: pantograph up + country: NL + icon: [ default: 'nl/310a' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NL:310' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: end of catenary + country: NL + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'right', value: 'nl/311-right' } + - { exact: 'left', value: 'nl/311-left' } + default: 'nl/311' + tags: + - { tag: 'railway:signal:electricity', value: 'NL:311' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + + - description: voltage change + country: NL + icon: + - match: 'railway:signal:electricity:voltage' + cases: + - { exact: '1500', value: 'nl/320-1500' } + - { exact: '25000', value: 'nl/320-25000' } + default: 'nl/320-unknown' + tags: + - { tag: 'railway:signal:electricity', value: 'NL:320' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'voltage_change' } + + # --- NZ --- # + + # crossing_hint + - description: Level Crossing Ahead + country: NZ + icon: [ default: 'nz/saltire' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'NZ:saltire' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + # crossing_info + - description: Alarms Start Here + country: NZ + icon: [ default: 'nz/alarms_start_here' ] + tags: + - { tag: 'railway:signal:crossing_info', value: 'NZ:alarms_start_here' } + - { tag: 'railway:signal:crossing_info:form', value: 'sign' } + + # crossing + - description: Crossing Indicator + country: NZ + icon: [ default: 'nz/XI' ] + tags: + - { tag: 'railway:signal:crossing', value: 'NZ:XI' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + # stop + - description: All Trains Stop + country: NZ + icon: [ default: 'nz/all_trains_stop' ] + tags: + - { tag: 'railway:signal:stop', value: 'NZ:all_trains_stop' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop Block Entry + country: NZ + icon: [ default: 'nz/stop_block_entry' ] + tags: + - { tag: 'railway:signal:stop', value: 'NZ:stop_block' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop Plate + country: NZ + icon: [ default: 'nz/stop_plate' ] + tags: + - { tag: 'railway:signal:stop', value: 'NZ:stop_plate' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop Disk + country: NZ + icon: [ default: 'nz/stop_disk' ] + tags: + - { tag: 'railway:signal:stop', value: 'NZ:stop_disk' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: EMU Stop Position + country: NZ + exampleIcon: nz/stop_position/6 + icon: + - match: 'railway:signal:stop:states' + cases: + - { exact: '2', value: 'nz/stop_position/2' } + position: bottom + + - match: 'railway:signal:stop:states' + cases: + - { exact: '3', value: 'nz/stop_position/3' } + position: bottom + + - match: 'railway:signal:stop:states' + cases: + - { exact: '4', value: 'nz/stop_position/4' } + position: bottom + + - match: 'railway:signal:stop:states' + cases: + - { exact: '6', value: 'nz/stop_position/6' } + position: bottom + + - match: 'railway:signal:stop:states' + cases: + - { exact: '8', value: 'nz/stop_position/8' } + position: bottom + tags: + - { tag: 'railway:signal:stop', value: 'NZ:emu_stop' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + # switch + - description: Arrow Indicator + country: NZ + icon: + - default: 'nz/AI_unknown' + - match: 'railway:signal:switch:states' + cases: + - { exact: 'left', value: 'nz/AI_L' } + - { exact: 'right', value: 'nz/AI_R' } + - { all: ['left', 'right'], value: 'nz/AI_LR' } + tags: + - { tag: 'railway:signal:switch', value: 'NZ:AI' } + - { tag: 'railway:signal:switch:form', value: 'light' } + + # main_repeated + - description: Single Banner Indicator + country: NZ + icon: [ default: 'nz/banner_indicator3D' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'NZ:banner_indicator3D' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Double Banner Indicator + country: NZ + icon: [ default: 'nz/banner_indicator33' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'NZ:banner_indicator33' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + # route + - description: Route Indicator + country: NZ + icon: [ default: 'nz/route_indicator' ] + tags: + - { tag: 'railway:signal:route', value: 'NZ:route_indicator' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Loop Light + country: NZ + icon: [ default: 'nz/L' ] + tags: + - { tag: 'railway:signal:route', value: 'NZ:L' } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Electrified Route Light + country: NZ + icon: [ default: 'nz/E' ] + tags: + - { tag: 'railway:signal:route', value: 'NZ:E' } + - { tag: 'railway:signal:route:form', value: 'light' } + + # train_protection + - description: A-Light + country: NZ + icon: [ default: 'nz/A' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:A' } + - { tag: 'railway:signal:train_protection:form', value: 'light' } + + - description: Automatic Signaling Begins + country: NZ + icon: [ default: 'nz/begin_AS' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:AS_begins' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Automatic Signaling Ends + country: NZ + icon: [ default: 'nz/end_AS' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:AS_ends' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Centralized Traffic Control Begins + country: NZ + icon: [ default: 'nz/begin_CTC' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:CTC_begins' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Centralized Traffic Control Ends + country: NZ + icon: [ default: 'nz/end_CTC' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:CTC_ends' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Entry to European Train Control System + country: NZ + icon: [ default: 'nz/begin_ETCS' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:ETCS_begins' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Exit from European Train Control System + country: NZ + icon: [ default: 'nz/end_ETCS' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:ETCS_ends' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Track Warrant Control Begins + country: NZ + icon: [ default: 'nz/begin_TWC' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:TWC_begins' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Track Warrant Control Ends + country: NZ + icon: [ default: 'nz/end_TWC' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'NZ:TWC_ends' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + # electricity + - description: Electric Services Limit + country: NZ + icon: [ default: 'nz/electric_limit' ] + tags: + - { tag: 'railway:signal:electricity', value: 'NZ:electric_limit' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + + # radio + - description: Entering Radio Channel Area + country: NZ + icon: [ default: 'nz/channel_area' ] + tags: + - { tag: 'railway:signal:radio', value: 'NZ:channel_area' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + # minor + - description: Restricted-speed Light + country: NZ + icon: [ default: 'nz/R' ] + tags: + - { tag: 'railway:signal:minor', value: 'NZ:R' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Low-speed Light + country: NZ + icon: [ default: 'nz/low_speed' ] + tags: + - { tag: 'railway:signal:minor', value: 'NZ:low_speed' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: TWC Siding + country: NZ + icon: [ default: 'nz/TWC_siding' ] + tags: + - { tag: 'railway:signal:minor', value: 'NZ:TWC_siding' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: TWC Intermediate Board + country: NZ + icon: [ default: 'nz/TWC_intermediate' ] + tags: + - { tag: 'railway:signal:minor', value: 'NZ:TWC_intermediate' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + # station_distant + - description: TWC (signalled) Station Warning + country: NZ + icon: [ default: 'nz/TWC_signalled' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'NZ:TWC_signalled' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: TWC (unsignalled) Station Warning + country: NZ + icon: [ default: 'nz/TWC_unsignalled' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'NZ:TWC_unsignalled' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + # whistle + - description: Whistle + country: NZ + icon: [ default: 'nz/whistle' ] + tags: + - { tag: 'railway:signal:whistle', value: 'NZ:whistle' } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + # shunting + - description: Shunting Limit + country: NZ + icon: [ default: 'nz/shunting_limit' ] + tags: + - { tag: 'railway:signal:shunting', value: 'NZ:shunting_limit' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Shunt Signal (3-position) + country: NZ + icon: [ default: 'nz/shunt3' ] + tags: + - { tag: 'railway:signal:shunting', value: 'NZ:shunt' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + - { tag: 'railway:signal:shunting:states', value: 'RYG' } + + - description: Shunt Signal (2-position) + country: NZ + icon: [ default: 'nz/shunt2' ] + tags: + - { tag: 'railway:signal:shunting', value: 'NZ:shunt' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + - { tag: 'railway:signal:shunting:states', value: 'RY' } + + # main + - description: Double multi-unit (permissive) + country: NZ + icon: [ default: 'nz/main/MM-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MM' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Double multi-unit (absolute) + country: NZ + icon: [ default: 'nz/main/MM' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MM' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Multi-unit above Searchlight (permissive) + country: NZ + icon: [ default: 'nz/main/MS-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MS' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Multi-unit above Searchlight (absolute) + country: NZ + icon: [ default: 'nz/main/MS' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MS' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Multi-unit with marker disk (permissive) + country: NZ + icon: [ default: 'nz/main/MD-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MD' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Multi-unit with marker disk (absolute) + country: NZ + icon: [ default: 'nz/main/MD' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_MD' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Searchlight above multi-unit (permissive) + country: NZ + icon: [ default: 'nz/main/SM-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SM' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Searchlight above multi-unit (absolute) + country: NZ + icon: [ default: 'nz/main/SM' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SM' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Double Searchlight (permissive) + country: NZ + icon: [ default: 'nz/main/SS-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SS' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Double Searchlight (absolute) + country: NZ + icon: [ default: 'nz/main/SS' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SS' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Searchlight with marker disk (permissive) + country: NZ + icon: [ default: 'nz/main/SD-staggered' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SD' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:shape', value: 'staggered' } + + - description: Searchlight with marker disk (absolute) + country: NZ + icon: [ default: 'nz/main/SD' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:main_SD' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: 2-position main signal + country: NZ + icon: [ default: 'nz/main/M' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:M' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Semaphore main signal + country: NZ + icon: [ default: 'nz/main/semaphore' ] + tags: + - { tag: 'railway:signal:main', value: 'NZ:M' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + # distant + - description: 2-position distant signal + country: NZ + icon: [ default: 'nz/distant/M' ] + tags: + - { tag: 'railway:signal:distant', value: 'NZ:M' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Semaphore distant signal + country: NZ + icon: [ default: 'nz/distant/semaphore' ] + tags: + - { tag: 'railway:signal:distant', value: 'NZ:M' } + - { tag: 'railway:signal:distant:form', value: 'semaphore' } + + # speed + - description: Dynamic Speed Indicator + country: NZ + icon: [ default: 'nz/speed_indicator' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'NZ:speed_indicator' } + - { tag: 'railway:signal:speed_limit:form', value: 'light' } + + # --- PL --- # + + - description: Wskaźnik usytuowania (W1) + country: PL + icon: [ default: 'pl/w1' ] + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:w1' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Sygnalizator powtarzający (Sp) + country: PL + icon: + - match: 'railway:signal:main_repeated:states' + cases: + - { exact: 'PL-PKP:sp2', value: 'pl/sp2-3' } + - { exact: 'PL-PKP:sp3', value: 'pl/sp1-3' } + default: 'pl/sp1-2' + tags: + - { tag: 'railway:signal:main_repeated', value: 'PL-PKP:sp' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Wskaźniki ETCS L1 Limited Supervision + country: PL + icon: + - match: 'railway:signal:train_protection' + cases: + - { exact: 'PL-PKP:wetcs2', value: 'pl/wetcs2' } + - { exact: 'PL-PKP:wetcs3', value: 'pl/wetcs3' } + default: 'pl/wetcs1' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'PL-PKP:wetcs1', 'PL-PKP:wetcs2', 'PL-PKP:wetcs3' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Wskaźniki ETCS L1 + country: PL + icon: + - match: 'railway:signal:train_protection' + cases: + - { exact: 'PL-PKP:wetcs5', value: 'pl/wetcs5' } + - { exact: 'PL-PKP:wetcs6', value: 'pl/wetcs6' } + default: 'pl/wetcs4' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'PL-PKP:wetcs4', 'PL-PKP:wetcs5', 'PL-PKP:wetcs6' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Wskaźniki ETCS L2 + country: PL + icon: + - match: 'railway:signal:train_protection' + cases: + - { exact: 'PL-PKP:wetcs8', value: 'pl/wetcs8' } + - { exact: 'PL-PKP:wetcs9', value: 'pl/wetcs9' } + default: 'pl/wetcs7' + tags: + - { tag: 'railway:signal:train_protection', any: [ 'PL-PKP:wetcs7', 'PL-PKP:wetcs8', 'PL-PKP:wetcs9' ] } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Wskaźnik zatrzymania ETCS (WETCS10) + country: PL + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'pl/wetcs10-right' } + - { exact: 'overhead', value: 'pl/wetcs10-down' } + default: 'pl/wetcs10-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'PL-PKP:wetcs10' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'block_marker' } + + - description: Wskaźnik lokalizacji ETCS (WETCS11) + country: PL + icon: + - match: 'railway:signal:position' + cases: + - { exact: 'left', value: 'pl/wetcs11-right' } + - { exact: 'overhead', value: 'pl/wetcs11-down' } + default: 'pl/wetcs11-left' + tags: + - { tag: 'railway:signal:train_protection', value: 'PL-PKP:wetcs11' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + - { tag: 'railway:signal:train_protection:type', value: 'location_marker' } + + - description: Wskaźnik WKD W2 + country: PL + icon: [ default: 'pl/wkd/w2' ] + tags: + - { tag: 'railway:signal:distant', value: 'PL-WKD:w2' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Wskaźniki uprzedzające (W11a, niskie) + country: PL + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'pl/w11a-dwarf-II' } + - { exact: 'III', value: 'pl/w11a-dwarf-III' } + - { exact: 'IV', value: 'pl/w11a-dwarf-IV' } + default: 'pl/w11a-dwarf-I' + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:w11a' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + - { tag: 'railway:signal:distant:height', value: 'dwarf' } + + - description: Wskaźniki uprzedzające (W11a, wysokie) + country: PL + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'pl/w11a-normal-II' } + - { exact: 'III', value: 'pl/w11a-normal-III' } + - { exact: 'IV', value: 'pl/w11a-normal-IV' } + default: 'pl/w11a-normal-I' + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:w11a' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Wskaźniki uprzedzające (W11b, niskie) + country: PL + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'pl/w11b-dwarf-II' } + - { exact: 'III', value: 'pl/w11b-dwarf-III' } + - { exact: 'IV', value: 'pl/w11b-dwarf-IV' } + default: 'pl/w11b-dwarf-I' + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:w11b' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + - { tag: 'railway:signal:distant:height', value: 'dwarf' } + + - description: Wskaźniki uprzedzające (W11b, wysokie) + country: PL + icon: + - match: 'railway:signal:distant:type' + cases: + - { exact: 'II', value: 'pl/w11b-normal-II' } + - { exact: 'III', value: 'pl/w11b-normal-III' } + - { exact: 'IV', value: 'pl/w11b-normal-IV' } + default: 'pl/w11b-normal-I' + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:w11b' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Sygnalizator sygnału zastępczego (Sz) + country: PL + icon: [ default: 'pl/sz-1' ] + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:sz' } + - { tag: 'railway:signal:minor:form', value: 'light' } + - { tag: 'railway:signal:minor:substitute_signal', value: 'PL-PKP:sz' } + + # TODO Tarcze rozrządowe https://www.transportszynowy.pl/Kolej/tarczerozrzadowe + + - description: Tarcza zaporowa kształtowa (Tz, nieruchoma) + country: PL + icon: [ default: 'pl/z-sign' ] + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:z' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Tarcza zaporowa kształtowa (Tz, ruchoma) + country: PL + icon: [ default: 'pl/z-semaphore' ] + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:z' } + - { tag: 'railway:signal:minor:form', value: 'semaphore' } + + - description: Tarcza zaporowa świetlna (Tz) + country: PL + icon: + - match: 'railway:signal:minor:substitute_signal' + cases: + - { exact: 'PL-PKP:sz', value: 'pl/z-2-s1' } + default: 'pl/z-1-s1' + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:z' } + - { tag: 'railway:signal:minor:form', value: 'light' } + + - description: Tarcza ostrzegawcza nieruchoma (DO) + country: PL + icon: [ default: 'pl/do' ] + tags: + - { tag: 'railway:signal:minor_distant', value: 'PL-PKP:do' } + - { tag: 'railway:signal:minor_distant:form', value: 'sign' } + + - description: Tarcza ostrzegawcza świetlna (To) + country: PL + icon: + - match: 'railway:signal:distant:states' + cases: + - { any: [ 'PL-PKP:os2', 'PL-PKP:os3' ], value: 'pl/os1-2' } + default: 'pl/os1-1' + tags: + - { tag: 'railway:signal:distant', value: 'PL-PKP:os' } + - { tag: 'railway:signal:distant:form', any: [ 'light', 'semaphore' ] } + + - description: Tarcze ostrzegawcze przejazdowe (ToP) + country: PL + icon: [ default: 'pl/osp' ] + tags: + - { tag: 'railway:signal:crossing', value: 'PL-PKP:osp' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Tarcza manewrowa kształtowa (Tm) + country: PL + icon: [ default: 'pl/m-semaphore' ] + tags: + - { tag: 'railway:signal:shunting', value: 'PL-PKP:m' } + - { tag: 'railway:signal:shunting:form', value: 'semaphore' } + + - description: Tarcza manewrowa świetlna (Tm) + country: PL + icon: + - match: 'railway:signal:shunting:states' + cases: + - { exact: 'PL-PKP:ms2', value: 'pl/ms-2' } + default: 'pl/ms-1' + tags: + - { tag: 'railway:signal:shunting', value: 'PL-PKP:ms' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Tarcza ostrzegawcze kształtowe (To, nieruchoma, dwustawna i trzystawna) + country: PL + icon: + - match: 'railway:signal:distant' + cases: + - { exact: 'PL-PKP:od', value: 'pl/od' } + - { exact: 'PL-PKP:ot', value: 'pl/ot' } + default: 'pl/on' + tags: + - { tag: 'railway:signal:distant', any: [ 'PL-PKP:on', 'PL-PKP:od', 'PL-PKP:ot' ] } + + - description: Tarcze rozrządowe (Tr, kształtowa i świetlna) + country: PL + icon: + - match: 'railway:signal:humping:form' + cases: + - { exact: 'light', value: 'pl/rt3-light' } + default: 'pl/rt3-semaphore' + tags: + - { tag: 'railway:signal:humping', value: 'PL-PKP:rt' } + + - description: Tarcza zatrzymania (D1) + country: PL + icon: [ default: 'pl/d1' ] + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:d1' } + - { tag: 'railway:signal:minor:form', value: 'sign' } + + - description: Wskaźnik jazdy pociągu towarowego (W22) + country: PL + icon: [ default: 'pl/w22' ] + tags: + - { tag: 'railway:signal:passing', value: 'PL-PKP:w22' } + + - description: Wskaźnik SBL (W18) + country: PL + icon: [ default: 'pl/w18' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'PL-PKP:w18' } + + - description: Wskaźniki kierunku jazdy (W2, W26a, W26b) + country: PL + icon: + - match: 'railway:signal:route:states' + cases: + - { regex: '^[A-ZŁ]$', value: 'pl/w2-{}', example: 'pl/w2-{K}' } + default: 'pl/w2-{W}' + tags: + - { tag: 'railway:signal:route', any: [ 'PL-PKP:w2', 'PL-PKP:w26a', 'PL-PKP:w26b' ] } + - { tag: 'railway:signal:route:form', value: 'light' } + + - description: Wskaźnik unieważnienia (W3) + country: PL + icon: [ default: 'pl/w3' ] + tags: + - { tag: 'railway:signal:minor', value: 'PL-PKP:w3' } + - { tag: 'railway:signal:minor:form', any: [ 'light', 'semaphore' ] } + + - description: Wskaźnik zatrzymania (W4) + country: PL + icon: [ default: 'pl/w4' ] + tags: + - { tag: 'railway:signal:stop', value: 'PL-PKP:w4' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Wskaźnik przetaczania (W5) + country: PL + icon: [ default: 'pl/w5' ] + tags: + - { tag: 'railway:signal:shunting', value: 'PL-PKP:w5' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Wskaźniki ostrzegania (W6, W6a, W6b i W7) + country: PL + icon: + - match: 'railway:signal:whistle' + cases: + - { exact: 'PL-PKP:w6a', value: 'pl/w6a' } + - { exact: 'PL-PKP:w6b', value: 'pl/w6b' } + - { exact: 'PL-PKP:w7', value: 'pl/w7' } + default: 'pl/w6' + tags: + - { tag: 'railway:signal:whistle', any: [ 'PL-PKP:w6', 'PL-PKP:w6a', 'PL-PKP:w6b', 'PL-PKP:w7' ] } + - { tag: 'railway:signal:whistle:form', value: 'sign' } + + - description: Wskaźniki odcinka z popychaniem (W10a i W10b) + country: PL + icon: + - match: 'railway:signal:helper_engine' + cases: + - { exact: 'PL-PKP:w10b', value: 'pl/w10b' } + default: 'pl/w10a' + tags: + - { tag: 'railway:signal:helper_engine', any: [ 'PL-PKP:w10a', 'PL-PKP:w10b' ] } + - { tag: 'railway:signal:helper_engine:form', value: 'sign' } + + - description: Wskaźnik przejazdowy (W11p) + country: PL + icon: + - match: 'railway:signal:crossing:repeated' + cases: + - { value: 'pl/w11p-2' } + default: 'pl/w11p-1' + tags: + - { tag: 'railway:signal:crossing_distant', value: 'PL-PKP:w11p' } + - { tag: 'railway:signal:crossing_distant:form', value: 'sign' } + + - description: Wskaźnik parowozowy (W12) + country: PL + icon: [ default: 'pl/w12' ] + tags: + - { tag: 'railway:signal:steam_locomotive', value: 'PL-PKP:w12' } + - { tag: 'railway:signal:steam_locomotive:form', value: 'sign' } + + - description: Wskaźnik torowy (W13) + country: PL + icon: [ default: 'pl/w13' ] + tags: + - { tag: 'railway:signal:snowplow', value: 'PL-PKP:w13' } + - { tag: 'railway:signal:snowplow:form', value: 'sign' } + - { tag: 'railway:signal:snowplow:type', value: 'up' } + + - description: Wskaźnik przystanku osobowego (W16) + country: PL + icon: [ default: 'pl/w16' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'PL-PKP:w16' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Wskaźnik ukresu (W17) + country: PL + icon: [ default: 'pl/w17' ] + tags: + - { tag: 'railway:signal:fouling_point', value: 'PL-PKP:w17' } + + - description: Wskaźniki braku drogi hamowania (W19 i W20) + country: PL + icon: + - match: 'railway:signal:short_route' + cases: + - { exact: 'PL-PKP:w20', value: 'pl/w20' } + - { exact: 'PL-PKP:w19;PL-PKP:w20', value: 'pl/w19-20' } + default: 'pl/w19' + tags: + - { tag: 'railway:signal:short_route', any: [ 'PL-PKP:w19', 'PL-PKP:w20', 'PL-PKP:w19;PL-PKP:w20' ] } + + - description: Wskaźnik kierunku przeciwnego (W24) + country: PL + icon: [ default: 'pl/w24' ] + tags: + - { tag: 'railway:signal:wrong_road', value: 'PL-PKP:w24' } + + - description: Wskaźnik ogrzewania (W25) + country: PL + icon: [ default: 'pl/w25' ] + tags: + - { tag: 'railway:signal:preheating', value: 'PL-PKP:w25' } + - { tag: 'railway:signal:preheating:form', value: 'light' } + + - description: Wskaźnik kanału radiowego (W28) + country: PL + icon: + - match: 'railway:signal:radio:frequency' + cases: + - { regex: '^(R[1-8]|S5)$', value: 'pl/w28-{}', example: 'pl/w28-{R3}' } + default: 'pl/w28-{R1}' + tags: + - { tag: 'railway:signal:radio', value: 'PL-PKP:w28' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + - description: Wskaźnik nawiązania łączności (W29) + country: PL + icon: [ default: 'pl/w29' ] + tags: + - { tag: 'railway:signal:radio', value: 'PL-PKP:w29' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + - description: Wskaźnik czoła pociągu (W32) + country: PL + icon: + - match: 'railway:signal:stop:caption' + cases: + - { regex: '^([568]0|[1-3][50]0)$', value: 'pl/w32-{}', example: 'pl/w32-{150}' } + default: 'pl/w32-empty' + tags: + - { tag: 'railway:signal:stop', value: 'PL-PKP:w32' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Wskaźnik początku obowiązywania systemu ERTMS/GSM-R (W33) + country: PL + icon: [ default: 'pl/w33' ] + tags: + - { tag: 'railway:signal:radio', value: 'PL-PKP:w33' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + - description: Wskaźnik końca obowiązywania systemu ERTMS/GSM-R (W34) + country: PL + icon: + - match: 'railway:signal:radio:frequency' + cases: + - { regex: '^R[1-8]$', value: 'pl/w34-{}', example: 'pl/w34-{R4}' } + default: 'pl/w34' + tags: + - { tag: 'railway:signal:radio', value: 'PL-PKP:w34' } + - { tag: 'railway:signal:radio:form', value: 'sign' } + + - description: Wskaźnik WKD Wk + country: PL + icon: [ default: 'pl/wkd/wk' ] + tags: + - { tag: 'railway:signal:crossing', value: 'PL-WKD:wk' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Miejsce zatrzymania czoła pociągu (Wm4) + country: PL + icon: [ default: 'pl/metro/wm4' ] + tags: + - { tag: 'railway:signal:stop', value: 'PL-metro:wm4' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Rozpocząć hamowanie przed peronem (Wm16) + country: PL + icon: [ default: 'pl/metro/wm16' ] + tags: + - { tag: 'railway:signal:station_distant', value: 'PL-metro:wm16' } + - { tag: 'railway:signal:station_distant:form', value: 'sign' } + + - description: Wskaźnik ukresu (Wm17) + country: PL + icon: [ default: 'pl/metro/wm17' ] + tags: + - { tag: 'railway:signal:fouling_point', value: 'PL-metro:wm17' } + + - description: Sygnalizacja świetlna (AT-1) + country: PL + icon: [ default: 'pl/tram/at-1' ] + tags: + - { tag: 'railway:signal:distant', value: 'PL-tram:at-1' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Sygnalizacja świetlna wzbudzana (AT-2) + country: PL + icon: [ default: 'pl/tram/at-2' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'PL-tram:at-2' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + # TODO AT-3 and AT-4 + + - description: Ruch kolizyjny (AT-5) + country: PL + icon: [ default: 'pl/tram/at-5' ] + tags: + - { tag: 'railway:signal:crossing_hint', value: 'PL-tram:at-5' } + - { tag: 'railway:signal:crossing_hint:form', value: 'sign' } + + - description: Blokada zwrotnicy (BT-3) + country: PL + icon: [ default: 'pl/tram/bt-3' ] + tags: + - { tag: 'railway:signal:stop', value: 'PL-tram:bt-3' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Stop – zwrotnica eksploatowana jednostronnie (BT-4) + country: PL + icon: [ default: 'pl/tram/bt-4' ] + tags: + - { tag: 'railway:signal:stop', value: 'PL-tram:bt-4' } + - { tag: 'railway:signal:stop:form', value: 'sign' } + + - description: Zwrotnica elektryczna lewoskrętna (DT-1) + country: PL + icon: [ default: 'pl/tram/dt-1' ] + tags: + - { tag: 'railway:signal:switch', value: 'PL-tram:dt-1' } + - { tag: 'railway:signal:switch:form', value: 'sign' } + + - description: Zwrotnica elektryczna lewoskrętna (DT-2) + country: PL + icon: [ default: 'pl/tram/dt-2' ] + tags: + - { tag: 'railway:signal:switch', value: 'PL-tram:dt-2' } + - { tag: 'railway:signal:switch:form', value: 'sign' } + + - description: Znaki sterowania zwrotnicy + country: PL + icon: + - match: 'railway:signal:switch' + cases: + - { exact: 'PL-tram:switch_olsztyn', value: 'pl/tram/switch_olsztyn' } + - { exact: 'PL-tram:switch_poznan', value: 'pl/tram/switch_poznan' } + - { exact: 'PL-tram:switch_wroclaw', value: 'pl/tram/switch_wroclaw' } + default: 'pl/tram/switch_warszawa' + tags: + - { tag: 'railway:signal:switch', any: [ 'PL-tram:switch_olsztyn', 'PL-tram:switch_poznan', 'PL-tram:switch_wroclaw', 'PL-tram:switch_warszawa' ] } + - { tag: 'railway:signal:switch:form', value: 'sign' } + + - description: Tarcza zwolnić bieg (D6) + country: PL + icon: + - match: 'railway:signal:speed_limit_distant:speed' + # TODO update signs from https://wiki.openstreetmap.org/wiki/Pl:OpenRailwayMap/Tagging_in_Poland#Tarcza_zwolnić_bieg_D_6 + # TODO handle dwarf signals + cases: + - { regex: '^([1-9]|1[0-9]|2[0-4])0$', value: 'pl/d6-{}', example: 'pl/d6-{70}' } + default: 'pl/d6-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'PL-PKP:d6' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Wskaźnik ograniczenia prędkości (W8) + country: PL + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-9]|2[0-4])0|[1-9][05]$', value: 'pl/w8-{}', example: 'pl/w8-{60}' } + default: 'pl/w8-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'PL-PKP:w8' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Wskaźnik odcinka ograniczonej prędkości (czoło pociągu) (W9) + country: PL + icon: [ default: 'pl/w9-C' ] + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-PKP:w9' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + - { tag: 'railway:signal:speed_limit:caption', value: 'C' } + + - description: Wskaźnik odcinka ograniczonej prędkości (W9) + country: PL + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(1[0-9]|2[0-4])0|[1-9][05]$', value: 'pl/w9-{}', example: 'pl/w9-{60}' } + default: 'pl/w9-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-PKP:w9' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Wskaźniki podwyższenia prędkości (W21) + country: PL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([5-9]|1[0-5])0$', value: 'pl/w21-{}', example: 'pl/w21-{80}' } + default: 'pl/w21-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-PKP:w21' } + - { tag: 'railway:signal:speed_limit:form', any: [ 'light', 'sign' ] } + + - description: Wskaźnik zmiany prędkości (W27a) + country: PL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^(1[0-9]|2[0-4])0|[1-9][05]$', value: 'pl/w27a-{}', example: 'pl/w27a-{80}' } + default: 'pl/w27a-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-PKP:w27a' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Wskaźnik ważenia składu (W30) + country: PL + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^5$', value: 'pl/w30-{}', example: 'pl/w30-{5}' } + default: 'pl/w30-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-PKP:w30' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Ograniczenie prędkości (BT-1) + country: PL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-9][05]$', value: 'pl/bt-1-{}', example: 'pl/bt-1-{60}' } + default: 'pl/bt-1-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-tram:bt-1' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Koniec ograniczenia prędkości (BT-2) + country: PL + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^[1-9][05]$', value: 'pl/bt-2-{}', example: 'pl/bt-2-{30}' } + default: 'pl/bt-2-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'PL-tram:bt-2' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Semafor kształtowy + country: PL + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'PL-PKP:sr3', value: 'pl/sr3' } + - { all: [ 'PL-PKP:sr1', 'PL-PKP:sr2' ], value: 'pl/sr2' } + default: 'pl/sr1' + tags: + - { tag: 'railway:signal:main', value: 'PL-PKP:sr' } + - { tag: 'railway:signal:main:form', value: 'semaphore' } + + - description: Semafory półsamoczynne + country: PL + icon: + - match: 'railway:signal:main:states' + cases: + - { all: [ 'PL-PKP:s2', 'PL-PKP:s4' ], value: 'pl/s1-4' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s4' ], value: 'pl/s1-4' } + - { all: [ 'PL-PKP:s2', 'PL-PKP:s5' ], value: 'pl/s1-4' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s5' ], value: 'pl/s1-4' } + - { all: [ 'PL-PKP:s1', 'PL-PKP:s4' ], value: 'pl/s5-3' } + - { all: [ 'PL-PKP:s1', 'PL-PKP:s5' ], value: 'pl/s5-3' } + default: 'pl/s2-3' + tags: + - { tag: 'railway:signal:main', value: 'PL-PKP:s' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:substitute_signal', value: 'PL-PKP:sz' } + + - description: Semafory SBL i półsamoczynne + country: PL + icon: + - match: 'railway:signal:main:states' + cases: + - { exact: 'PL-PKP:s1a', value: 'pl/s1a-4' } + - { all: [ 'PL-PKP:s2', 'PL-PKP:s4' ], value: 'pl/s1-3' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s4' ], value: 'pl/s1-3' } + - { all: [ 'PL-PKP:s2', 'PL-PKP:s5' ], value: 'pl/s1-3' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s5' ], value: 'pl/s1-3' } + - { all: [ 'PL-PKP:s1', 'PL-PKP:s4' ], value: 'pl/s1-2' } + - { all: [ 'PL-PKP:s1', 'PL-PKP:s5' ], value: 'pl/s1-2' } + default: 'pl/s2-2' + tags: + - { tag: 'railway:signal:main', value: 'PL-PKP:s' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Semafory półsamoczynne (dwukolumnowe, 6-komorowe) + country: PL + icon: + - match: 'railway:signal:combined:states' + cases: + - { all: [ 'PL-PKP:s6', 'PL-PKP:s12a' ], value: 'pl/s6-10a-6' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s12a' ], value: 'pl/s6-10a-6' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s13a' ], value: 'pl/s6-10a-6' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s13a' ], value: 'pl/s6-10a-6' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s8' ], value: 'pl/s6-6' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s8' ], value: 'pl/s6-6' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s9' ], value: 'pl/s6-6' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s9' ], value: 'pl/s6-6' } + - { all: [ 'PL-PKP:s10a', 'PL-PKP:s12a' ], value: 'pl/s10a-6' } + - { all: [ 'PL-PKP:s11a', 'PL-PKP:s12a' ], value: 'pl/s10a-6' } + - { all: [ 'PL-PKP:s10a', 'PL-PKP:s13a' ], value: 'pl/s10a-6' } + - { all: [ 'PL-PKP:s11a', 'PL-PKP:s13a' ], value: 'pl/s10a-6' } + default: 'pl/s10-6' + tags: + - { tag: 'railway:signal:combined', value: 'PL-PKP:s' } + - { tag: 'railway:signal:combined:form', value: 'light' } + - { tag: 'railway:signal:combined:substitute_signal', value: 'PL-PKP:sz' } + - { tag: 'railway:signal:combined:shape', value: 'two_column' } + + - description: Semafory półsamoczynne (4- i 5-komorowe) + country: PL + icon: + - match: 'railway:signal:combined:states' + cases: + - { all: [ 'PL-PKP:s6', 'PL-PKP:s12a' ], value: 'pl/s6-10a-5' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s12a' ], value: 'pl/s6-10a-5' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s13a' ], value: 'pl/s6-10a-5' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s13a' ], value: 'pl/s6-10a-5' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s8' ], value: 'pl/s6-5' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s8' ], value: 'pl/s6-5' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s9' ], value: 'pl/s6-5' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s9' ], value: 'pl/s6-5' } + - { all: [ 'PL-PKP:s10a', 'PL-PKP:s12a' ], value: 'pl/s10a-5' } + - { all: [ 'PL-PKP:s11a', 'PL-PKP:s12a' ], value: 'pl/s10a-5' } + - { all: [ 'PL-PKP:s10a', 'PL-PKP:s13a' ], value: 'pl/s10a-5' } + - { all: [ 'PL-PKP:s11a', 'PL-PKP:s13a' ], value: 'pl/s10a-5' } + - { all: [ 'PL-PKP:s10', 'PL-PKP:s12' ], value: 'pl/s10-5' } + - { all: [ 'PL-PKP:s11', 'PL-PKP:s12' ], value: 'pl/s10-5' } + - { all: [ 'PL-PKP:s10', 'PL-PKP:s13' ], value: 'pl/s10-5' } + - { all: [ 'PL-PKP:s11', 'PL-PKP:s13' ], value: 'pl/s10-5' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s10a' ], value: 'pl/s6-10a-4' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s10a' ], value: 'pl/s6-10a-4' } + - { all: [ 'PL-PKP:s6', 'PL-PKP:s11a' ], value: 'pl/s6-10a-4' } + - { all: [ 'PL-PKP:s7', 'PL-PKP:s11a' ], value: 'pl/s6-10a-4' } + - { all: [ 'PL-PKP:s2', 'PL-PKP:s12' ], value: 'pl/s13-5' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s12' ], value: 'pl/s13-5' } + - { all: [ 'PL-PKP:s2', 'PL-PKP:s13' ], value: 'pl/s13-5' } + - { all: [ 'PL-PKP:s3', 'PL-PKP:s13' ], value: 'pl/s13-5' } + - { any: [ 'PL-PKP:s6', 'PL-PKP:s7' ], value: 'pl/s6-4' } + - { any: [ 'PL-PKP:s8', 'PL-PKP:s9' ], value: 'pl/s9-4' } + - { any: [ 'PL-PKP:s10a', 'PL-PKP:s11a' ], value: 'pl/s10a-4' } + - { any: [ 'PL-PKP:s12a', 'PL-PKP:s13a' ], value: 'pl/s13a-4' } + - { any: [ 'PL-PKP:s10', 'PL-PKP:s11' ], value: 'pl/s10-4' } + default: 'pl/s13-4' + tags: + - { tag: 'railway:signal:combined', value: 'PL-PKP:s' } + - { tag: 'railway:signal:combined:form', value: 'light' } + - { tag: 'railway:signal:combined:substitute_signal', value: 'PL-PKP:sz' } + + - description: Semafory półsamoczynne (3-komorowe) + country: PL + icon: + - match: 'railway:signal:combined:states' + cases: + - { any: [ 'PL-PKP:s10a', 'PL-PKP:s11a' ], value: 'pl/s10a-3' } + - { any: [ 'PL-PKP:s12a', 'PL-PKP:s13a' ], value: 'pl/s13a-3' } + - { any: [ 'PL-PKP:s10', 'PL-PKP:s11' ], value: 'pl/s10-3' } + default: 'pl/s13-3' + tags: + - { tag: 'railway:signal:combined', value: 'PL-PKP:s' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Wskaźniki uprzedzające o opuszczeniu pantografu (We1) + country: PL + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'right', value: 'pl/we1b' } + - { exact: 'left', value: 'pl/we1c' } + default: 'pl/we1a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we1a', 'PL-PKP:we1b', 'PL-PKP:we1c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down_advance' } + + - description: Wskaźniki opuszczenia pantografu (We2) + country: PL + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'right', value: 'pl/we2b' } + - { exact: 'left', value: 'pl/we2c' } + default: 'pl/we2a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we2a', 'PL-PKP:we2b', 'PL-PKP:we2c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_down' } + + - description: Wskaźniki podniesienia pantografu (We3) + country: PL + icon: + - match: 'railway:signal:electricity' + cases: + - { exact: 'PL-PKP:we3b', value: 'pl/we3b' } + - { exact: 'PL-PKP:we3c', value: 'pl/we3c' } + default: 'pl/we3a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we3a', 'PL-PKP:we3b', 'PL-PKP:we3c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'pantograph_up' } + + - description: Wskaźniki zakazu wjazdu elektrycznych pojazdów trakcyjnych (We4) + country: PL + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'right', value: 'pl/we4b' } + - { exact: 'left', value: 'pl/we4c' } + default: 'pl/we4a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we4a', 'PL-PKP:we4b', 'PL-PKP:we4c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'end_of_catenary' } + + - description: Wskaźniki jazdy bezprądowej (We8) + country: PL + icon: + - match: 'railway:signal:electricity:turn_direction' + cases: + - { exact: 'right', value: 'pl/we8b' } + - { exact: 'left', value: 'pl/we8c' } + default: 'pl/we8a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we8a', 'PL-PKP:we8b', 'PL-PKP:we8c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_off' } + + - description: Wskaźniki jazdy pod prądem (We9) + country: PL + icon: + - match: 'railway:signal:electricity' + cases: + - { exact: 'PL-PKP:we9b', value: 'pl/we9b' } + - { exact: 'PL-PKP:we9c', value: 'pl/we9c' } + default: 'pl/we9a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we9a', 'PL-PKP:we9b', 'PL-PKP:we9c' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_on' } + + - description: Wskaźniki zmiany systemu zasilania (We10) + country: PL + icon: + - match: 'railway:signal:electricity' + cases: + - { exact: 'PL-PKP:we10b', value: 'pl/we10b' } + - { exact: 'PL-PKP:we10c', value: 'pl/we10c' } + - { exact: 'PL-PKP:we10d', value: 'pl/we10d' } + - { exact: 'PL-PKP:we10e', value: 'pl/we10e' } + - { exact: 'PL-PKP:we10f', value: 'pl/we10f' } + default: 'pl/we10a' + tags: + - { tag: 'railway:signal:electricity', any: [ 'PL-PKP:we10a', 'PL-PKP:we10b', 'PL-PKP:we10c', 'PL-PKP:we10d', 'PL-PKP:we10e', 'PL-PKP:we10f' ] } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_change' } + + - description: Granica zasilania wraz z izolatorem sekcyjnym (CT-1 i CT-2) + country: PL + icon: [ default: 'pl/ct-1-2' ] + tags: + - { tag: 'railway:signal:electricity', value: 'PL-tram:ct-1;PL-tram:ct-2' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'isolation;power_limit' } + + - description: Izolator sekcyjny (CT-1) + country: PL + icon: [ default: 'pl/ct-1' ] + tags: + - { tag: 'railway:signal:electricity', value: 'PL-tram:ct-1' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'isolation' } + + - description: Granica zasilania (CT-2) + country: PL + icon: [ default: 'pl/ct-2' ] + tags: + - { tag: 'railway:signal:electricity', value: 'PL-tram:ct-2' } + - { tag: 'railway:signal:electricity:form', value: 'sign' } + - { tag: 'railway:signal:electricity:type', value: 'power_limit' } + + # --- SE --- # + + - description: Mellanblocksignal, Utfartsblocksignal (main) + country: SE + # TODO support icons for each variant + icon: [ default: 'se/main-block' ] + tags: + - { tag: 'railway:signal:main', any: [ 'SE:Utfartsblocksignal', 'SE:Mellanblocksignal' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Linjeplatssignal (main) + country: SE + icon: [ default: 'se/main-section' ] + tags: + - { tag: 'railway:signal:main', value: 'SE:Linjeplatssignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Infartssignal, Mellansignal, Utfartssignal (main) + country: SE + # TODO support icons for each variant + icon: [ default: 'se/main' ] + tags: + - { tag: 'railway:signal:main', any: [ 'SE:Huvudsignal', 'SE:Utfartssignal', 'SE:Infartssignal', 'SE:Mellansignal' ] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Mellanblocksignal, Utfartsblocksignal (combined) + country: SE + # TODO support icons for each variant + icon: [ default: 'se/combined-block' ] + tags: + - { tag: 'railway:signal:combined', any: [ 'SE:Utfartsblocksignal', 'SE:Mellanblocksignal' ] } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Infartssignal, Mellansignal, Utfartssignal (combined) + country: SE + # TODO support icons for each variant + icon: [ default: 'se/combined' ] + tags: + - { tag: 'railway:signal:combined', any: [ 'SE:Huvudsignal', 'SE:Utfartssignal', 'SE:Infartssignal', 'SE:Mellansignal' ] } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Linjeplatssignal (combined) + country: SE + icon: [ default: 'se/combined-section' ] + tags: + - { tag: 'railway:signal:combined', value: 'SE:Linjeplatssignal' } + - { tag: 'railway:signal:combined:form', value: 'light' } + + - description: Försignal + country: SE + icon: [ default: 'se/försignal' ] + tags: + - { tag: 'railway:signal:distant', value: 'SE:Försignal' } + - { tag: 'railway:signal:distant:form', value: 'light' } + + - description: Repeterbalister + country: SE + icon: [ default: 'se/repeterbaliser' ] + tags: + - { tag: 'railway:signal:train_protection', value: 'SE:Repeterbaliser' } + - { tag: 'railway:signal:train_protection:form', value: 'sign' } + + - description: Repetersignal + country: SE + icon: [ default: 'se/repetersignal' ] + tags: + - { tag: 'railway:signal:main_repeated', value: 'SE:Repetersignal' } + - { tag: 'railway:signal:main_repeated:form', value: 'light' } + + - description: Orienteringstavla huvudsignal + country: SE + icon: + - match: 'railway:signal:distant:distance' + cases: + - { regex: '^.+$', value: 'se/orienteringstavla-huvudsignal-avstånd' } + default: 'se/orienteringstavla-huvudsignal' + tags: + - { tag: 'railway:signal:distant', value: 'SE:orienteringstavla' } + - { tag: 'railway:signal:distant:form', value: 'sign' } + + - description: Mellansignal (dvärg) + country: SE + icon: [ default: 'se/shunting-main' ] + tags: + - { tag: 'railway:signal:main', value: 'SE:Mellansignal' } + - { tag: 'railway:signal:main:form', value: 'light' } + - { tag: 'railway:signal:main:height', value: 'dwarf' } + + - description: Växlingsdvärgsignal + country: SE + icon: [ default: 'se/shunting' ] + tags: + - { tag: 'railway:signal:shunting', value: 'SE:Växlingsdvärgsignal' } + - { tag: 'railway:signal:shunting:form', value: 'light' } + + - description: Skyddsstopplykta + country: SE + icon: [ default: 'se/skyddsstopplykta' ] + tags: + - { tag: 'railway:signal:shunting', value: 'SE:Skyddsstopplykta' } + - { tag: 'railway:signal:shunting:form', value: 'sign' } + + - description: Vägskyddssignal + country: SE + icon: [ default: 'se/vägskyddssignal' ] + tags: + - { tag: 'railway:signal:crossing', value: 'SE:Vägskyddssignal' } + - { tag: 'railway:signal:crossing:form', value: 'light' } + + - description: Vägskyddsförsignal + country: SE + icon: [ default: 'se/vägskyddsförsignal' ] + tags: + - { tag: 'railway:signal:crossing_distant', value: 'SE:Vägskyddsförsignal' } + - { tag: 'railway:signal:crossing_distant:form', value: 'light' } + + - description: Hastighetstavla + country: SE + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^([3-9]0|1[0-5]0|1[01]5)$', value: 'se/hastighetstavla-{}', example: 'se/hastighetstavla-{90}' } + default: 'se/hastighetstavla-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'SE:hastighetstavla' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Hastighetstavla med pilspets uppåt + country: SE + type: line + icon: + - match: 'railway:signal:speed_limit:speed' + cases: + - { regex: '^140$', value: 'se/hastighetstavla-pilspets-uppåt-{}', example: 'se/hastighetstavla-pilspets-uppåt-{140}' } + default: 'se/hastighetstavla-pilspets-uppåt-empty' + tags: + - { tag: 'railway:signal:speed_limit', value: 'SE:hastighetstavla med pilspets uppåt' } + - { tag: 'railway:signal:speed_limit:form', value: 'sign' } + + - description: Orienteringstavla för lägre hastighet + country: SE + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^(1[0-4]0|[7-9]0)|105$', value: 'se/orienteringstavla-hastighet-{}', example: 'se/orienteringstavla-hastighet-{80}' } + default: 'se/orienteringstavla-hastighet-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'SE:lägre_hastighet' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Orienteringstavla med tilläggsskylt ”ATC-överskridande” + country: SE + type: line + icon: + - match: 'railway:signal:speed_limit_distant:speed' + cases: + - { regex: '^150$', value: 'se/orienteringstavla-hastighet-atc-överskridande-{}', example: 'se/orienteringstavla-hastighet-atc-överskridande-{150}' } + default: 'se/orienteringstavla-hastighet-atc-överskridande-empty' + tags: + - { tag: 'railway:signal:speed_limit_distant', value: 'SE:atc_överskridande' } + - { tag: 'railway:signal:speed_limit_distant:form', value: 'sign' } + + - description: Slutpunktstopplykta + country: SE + icon: [ default: 'se/slutpunktstopplykta' ] + tags: + - { tag: 'railway:signal:stop', value: 'SE:Slutpunktstopplykta' } + - { tag: 'railway:signal:stop:form', value: 'light' } + + # --- US --- # + + - description: Main signal + country: US + icon: [ default: 'us/main' ] + tags: + - { tag: 'railway:signal:main', any: ['US:main', 'US-ABS:main', 'US:GCOR:main'] } + - { tag: 'railway:signal:main:form', value: 'light' } + + - description: Distant signal + country: US + icon: [ default: 'us/distant' ] + tags: + - { tag: 'railway:signal:distant', value: 'US:distant' } + - { tag: 'railway:signal:distant:form', value: 'light' } diff --git a/features/stations.yaml b/features/stations.yaml new file mode 100644 index 000000000..89caa072b --- /dev/null +++ b/features/stations.yaml @@ -0,0 +1,118 @@ +features: + - description: Station + feature: station + example: + label: Gd + name: Gouda + feature: station + state: present + station_size: normal + variants: + - description: large + example: + label: MH + name: München + station_size: large + - description: small + minzoom: 10 + example: + label: HMEL + name: Melle + station_size: small + - description: disused, abandoned, preserved + minzoom: 10 + example: + name: "جرسيف" + station_size: small + state: disused + - description: construction + minzoom: 10 + example: + name: "هدية" + station_size: small + state: construction + mapState: + showConstructionInfrastructure: true + - description: proposed + minzoom: 10 + example: + name: "სამგორი" + station_size: small + state: proposed + mapState: + showProposedInfrastructure: true + + - description: Halt + feature: halt + minzoom: 10 + example: + name: Deventer + station_size: small + feature: halt + state: present + + - description: Tram stop + feature: tram_stop + minzoom: 13 + example: + name: Llacuna + count: 2 + station_size: small + feature: tram_stop + state: present + + - description: Service station + feature: service_station + minzoom: 10 + example: + name: Wiederitzsch + station_size: small + feature: service_station + state: present + + - description: Railway yard + feature: yard + minzoom: 8 + example: + label: KCM + name: Murray + station_size: small + feature: yard + state: present + + - description: Junction + feature: junction + minzoom: 10 + example: + label: Han + name: Haanrade + station_size: small + feature: junction + state: present + + - description: Spur junction + feature: spur_junction + minzoom: 10 + example: + name: Neusüdende + station_size: small + feature: spur_junction + state: present + + - description: Railway site + feature: site + minzoom: 10 + example: + name: Pápateszér + station_size: small + feature: site + state: present + + - description: Crossover + feature: crossover + minzoom: 10 + example: + name: Przemiarki + station_size: small + feature: crossover + state: present diff --git a/features/track_class.yaml b/features/track_class.yaml new file mode 100644 index 000000000..9117954f0 --- /dev/null +++ b/features/track_class.yaml @@ -0,0 +1,34 @@ +track_classes: + - { value: 'A', color: 'hsl(248, 100%, 40%)' } + - { value: 'B1', color: 'hsl(220, 100%, 40%)' } + - { value: 'B2', color: 'hsl(200, 100%, 40%)' } + - { value: 'C1', color: 'hsl(190, 100%, 40%)' } + - { value: 'C2', color: 'hsl(180, 100%, 40%)' } + - { value: 'C3', color: 'hsl(160, 100%, 40%)' } + - { value: 'C3L', color: 'hsl(140, 100%, 40%)' } + - { value: 'C4', color: 'hsl(120, 100%, 40%)' } + - { value: 'CE', color: 'hsl(100, 100%, 40%)' } + - { value: 'CM2', color: 'hsl(80, 100%, 40%)' } + - { value: 'CM3', color: 'hsl(60, 100%, 40%)' } + - { value: 'CM4', color: 'hsl(40, 100%, 40%)' } + - { value: 'D', color: 'hsl(10, 100%, 40%)' } + - { value: 'D2', color: 'hsl(30, 100%, 40%)' } + - { value: 'D3', color: 'hsl(20, 100%, 40%)' } + - { value: 'D4', color: 'hsl(10, 100%, 40%)' } + - { value: 'D4L', color: 'hsl(0, 100%, 40%)' } + - { value: 'E4', color: 'hsl(340, 100%, 40%)' } + - { value: 'E5', color: 'hsl(320, 100%, 40%)' } + - { value: 'F', color: 'hsl(300, 100%, 40%)' } + - { value: 'G', color: 'hsl(280, 100%, 40%)' } + - { value: '1', color: 'hsl(240, 100%, 40%)' } + - { value: '2', color: 'hsl(210, 100%, 40%)' } + - { value: '3', color: 'hsl(180, 100%, 40%)' } + - { value: '4', color: 'hsl(150, 100%, 40%)' } + - { value: '5', color: 'hsl(120, 100%, 40%)' } + - { value: '6', color: 'hsl(90, 100%, 40%)' } + - { value: '7', color: 'hsl(60, 100%, 40%)' } + - { value: '8', color: 'hsl(30, 100%, 40%)' } + - { value: '9', color: 'hsl(0, 100%, 40%)' } + - { value: '10', color: 'hsl(330, 100%, 40%)' } + - { value: '11', color: 'hsl(300, 100%, 40%)' } + - { value: 'excepted', color: 'black' } diff --git a/features/train_protection.yaml b/features/train_protection.yaml new file mode 100644 index 000000000..352c210f8 --- /dev/null +++ b/features/train_protection.yaml @@ -0,0 +1,385 @@ +train_protections: + - { train_protection: 'etcs', legend: 'European Train Control System (ETCS)', color: 'hsl(214, 100%, 70%)' } + - { train_protection: 'etcs_1', legend: 'European Train Control System (ETCS) level 1', color: 'hsl(214, 100%, 50%)' } + - { train_protection: 'etcs_2', legend: 'European Train Control System (ETCS) level 2', color: 'hsl(214, 100%, 40%)' } + - { train_protection: 'ctcs', legend: 'Chinese Train Control System (CTCS)', color: 'hsl(190, 100%, 40%)' } + - { train_protection: 'zsi127', legend: 'ZSI 127', color: '#884400' } + - { train_protection: 'ptc', legend: 'Positive train control (PTC)', color: '#cc0033' } + - { train_protection: 'tvm', legend: 'Transmission Voie-Machine (TVM)', color: '#009966' } + - { train_protection: 'kvb', legend: 'Contrôle de vitesse par balises (KVB)', color: '#66cc33' } + - { train_protection: 'nexteo', legend: 'Nouveau système d''EXploitation des Trains Est-Ouest (NEXTEO)', color: '#9133cc' } + - { train_protection: 'asfa', legend: 'Anuncio de Señales y Frenado Automático (ASFA)', color: '#ff9092' } + - { train_protection: 'scmt', legend: 'Sistema Controllo Marcia Treno (SCMT)', color: '#dd11ff' } + - { train_protection: 'atc', legend: 'Automatic train control (ATC)', color: '#6600cc' } + - { train_protection: 'atb', legend: 'Automatische treinbeïnvloeding (ATB)', color: '#ff8c00' } + - { train_protection: 'lzb', legend: 'Linienzugbeeinflussung (LZB)', color: 'red' } + - { train_protection: 'pzb', legend: 'Punktförmige Zugbeeinflussung (PZB)', color: '#ffb900' } + - { train_protection: 'acses', legend: 'Advanced Civil Speed Enforcement System (ACSES)', color: '#43b54d' } + - { train_protection: 'ases', legend: 'Advanced Speed Enforcement System (ASES)', color: '#43b54d' } + - { train_protection: 'atms', legend: 'Advanced Train Management System (ATMS)', color: '#43b54d' } + - { train_protection: 'als', legend: 'Автоматическая локомотивная сигнализация (ALS)', color: 'hsl(284, 100%, 40%)' } + - { train_protection: 'atp', legend: 'Automatic Train Protection (ATP)', color: 'hsl(305, 100%, 40%)' } + - { train_protection: 'aws', legend: 'Automatic Warning System (AWS)', color: 'hsl(50, 100%, 40%)' } + - { train_protection: 'caws', legend: 'Continuous Automatic Warning System (CAWS)', color: 'hsl(60, 100%, 40%)' } + - { train_protection: 'tcb', legend: 'Track Circuit Block (TCB)', color: 'hsl(147, 100%, 40%)' } + - { train_protection: 'cbtc', legend: 'Communications Based Train Control (CBTC)', color: 'hsl(336, 100%, 40%)' } + - { train_protection: 'ebicab', legend: 'EBICAB', color: 'pink' } # portugal & bulgaria + - { train_protection: 'jkv', legend: 'Junakulunvalvonta (JKV)', color: 'pink' } # finland + - { train_protection: 'etms', legend: 'Electronic Train Management System (ETMS)', color: 'hsl(48, 100%, 40%)' } + - { train_protection: 'evm', legend: 'Elektronikus Vonatmegállító (EVM)', color: 'hsl(137, 100%, 40%)' } + - { train_protection: 'itcs', legend: 'Incremental Train Control System (ITCS)', color: 'hsl(35, 100%, 40%)' } + - { train_protection: 'ls', legend: 'Liniový Systém (LS)', color: 'hsl(319, 100%, 40%)' } + - { train_protection: 'octys', legend: 'Open Control of Trains, Interchangeable & Integrated System (OCTYS)', color: 'hsl(360, 100%, 40%)' } + - { train_protection: 'ouragan', legend: 'Offre Urbaine Renouvelée et Améliorée, Gérée par un Automatisme Nouveau (OURAGAN)', color: 'hsl(48, 100%, 40%)' } + - { train_protection: 'sacem', legend: 'Système d''Aide à la Conduite, à l''Exploitation et à la Maintenance (SACEM)', color: 'hsl(190, 100%, 40%)' } + - { train_protection: 'saet', legend: 'Système d''Automatisation de l''Exploitation des Trains (SAET)', color: 'hsl(305, 100%, 40%)' } + - { train_protection: 'shp', legend: 'Samoczynne Hamowanie Pociągu (SHP)', color: 'hsl(35, 100%, 40%)' } + - { train_protection: 'ssc', legend: 'Sistema di Supporto alla Condotta (SSC)', color: 'hsl(155, 100%, 40%)' } + - { train_protection: 'tasc', legend: '定位置停止装置 (TASC)', color: 'hsl(155, 100%, 40%)' } + - { train_protection: 'ats', legend: 'Automatic Train Stop (ATS)', color: '#b58a00' } + - { train_protection: 'atacs', legend: 'Advanced Train Administration and Communications System (ATACS)', color: '#008e2d' } + - { train_protection: 'ktcs', legend: '한국형 열차제어시스템 (KTCS)', color: '#008e2d' } + - { train_protection: 'tbl', legend: 'Transmissie Baken-Lokomotief (TBL)', color: 'hsl(305, 100%, 40%)' } + - { train_protection: 'tmacs', legend: 'Train Management and Control System (TMACS)', color: '#ffcc00' } + - { train_protection: 'tpws', legend: 'Train Protection & Warning System (TPWS)', color: 'pink' } + - { train_protection: 'zbs', legend: 'Zugbeeinflussung S-Bahn Berlin (ZBS)', color: 'hsl(155, 100%, 40%)' } + - { train_protection: 'zsl90', legend: 'Zugsicherung mit Linienleiter 1990 (ZSL 90)', color: 'pink' } + - { train_protection: 'zub', legend: 'Zugbeeinflussung (ZUB)', color: 'hsl(118, 100%, 30%)' } + - { train_protection: 'satp', legend: 'Автоматическая блокировка (SATP)', color: 'hsl(187, 100%, 40%)' } + - { train_protection: 'twc', legend: 'Track Warrant Control (TWC)', color: '#884400' } + - { train_protection: 'none', legend: 'No train protection', color: 'black' } + +features: + + - train_protection: etcs + tags: + - { tag: 'railway:etcs', value: 'yes' } + + - train_protection: etcs_1 + tags: + - { tag: 'railway:etcs', value: '1' } + + - train_protection: etcs_2 + tags: + - { tag: 'railway:etcs', value: '2' } + + - train_protection: etcs_2 + tags: + - { tag: 'railway:etcs', value: '1;2' } + + - train_protection: etcs_2 + tags: + - { tag: 'railway:etcs', value: '3' } + + - train_protection: acses + tags: + - { tag: 'railway:acses', value: 'yes' } + + - train_protection: ases + tags: + - { tag: 'railway:ases', value: 'yes' } + + - train_protection: itcs + tags: + - { tag: 'railway:itcs', value: 'yes' } + + - train_protection: etms + tags: + - { tag: 'railway:etms', value: 'yes' } + + - train_protection: cbtc + tags: + - { tag: 'railway:cbtc', values: ['yes', 'uto', 'sto', 'dto'] } + + - train_protection: ptc + tags: + - { tag: 'railway:ptc', value: 'yes' } + + - train_protection: atc + tags: + - { tag: 'railway:atc', value: 'yes' } + + - train_protection: asfa + tags: + - { tag: 'railway:asfa', value: 'yes' } + + - train_protection: asfa + tags: + - { tag: 'railway:asfa_fac', value: 'yes' } + + - train_protection: asfa + tags: + - { tag: 'railway:asfa_200', value: 'yes' } + + - train_protection: scmt + tags: + - { tag: 'railway:scmt', value: 'yes' } + + - train_protection: tvm + tags: + - { tag: 'railway:tvm', values: ['300', '430'] } + + - train_protection: nexteo + tags: + - { tag: 'railway:nexteo', value: 'yes' } + + - train_protection: kvb + tags: + - { tag: 'railway:kvb', value: 'yes' } + + - train_protection: atb + tags: + - { tag: 'railway:atb', value: 'yes' } + + - train_protection: atb + tags: + - { tag: 'railway:atb-eg', value: 'yes' } + + - train_protection: atb + tags: + - { tag: 'railway:atb-ng', value: 'yes' } + + - train_protection: atb + tags: + - { tag: 'railway:atb-vv', value: 'yes' } + + - train_protection: atms + tags: + - { tag: 'railway:atms', value: 'yes' } + + - train_protection: zsi127 + tags: + - { tag: 'railway:zsi127', value: 'yes' } + + - train_protection: lzb + tags: + - { tag: 'railway:lzb', value: 'yes' } + + - train_protection: pzb + tags: + - { tag: 'railway:pzb', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:als', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:alsn', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:alst', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:also', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:als-en', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:alsr', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:als-ars', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:integra_signum:ALS', value: 'yes' } + + - train_protection: als + tags: + - { tag: 'railway:integra_signum:ALSO', value: 'yes' } + + - train_protection: atp + tags: + - { tag: 'railway:atp', value: 'yes' } + + - train_protection: aws + tags: + - { tag: 'railway:aws', value: 'yes' } + + - train_protection: caws + tags: + - { tag: 'railway:caws', value: 'yes' } + + - train_protection: tcb + tags: + - { tag: 'railway:tcb', value: 'yes' } + + - train_protection: ctcs + tags: + - { tag: 'railway:ctcs', values: ['yes', '0', '1', '2', '3D', '4'] } + + - train_protection: ebicab + tags: + - { tag: 'railway:ebicab', values: ['yes', '700', '900'] } + + - train_protection: jkv + tags: + - { tag: 'railway:jkv', value: 'yes' } + + - train_protection: evm + tags: + - { tag: 'railway:evm', value: 'yes' } + + - train_protection: ls + tags: + - { tag: 'railway:ls', value: 'yes' } + + - train_protection: octys + tags: + - { tag: 'railway:octys', value: 'yes' } + + - train_protection: ouragan + tags: + - { tag: 'railway:ouragan', value: 'yes' } + + - train_protection: sacem + tags: + - { tag: 'railway:sacem', value: 'yes' } + + - train_protection: saet + tags: + - { tag: 'railway:saet', value: 'yes' } + + - train_protection: shp + tags: + - { tag: 'railway:shp', value: 'yes' } + + - train_protection: ssc + tags: + - { tag: 'railway:ssc', value: 'yes' } + + - train_protection: tasc + tags: + - { tag: 'railway:tasc', value: 'yes' } + + - train_protection: ats + tags: + - { tag: 'railway:ats', values: ['yes', 'B', 'Dx', 'S', 'S1', 'S2', 'S1;S2', 'Sx', 'P', 'Ps'] } + + - train_protection: atacs + tags: + - { tag: 'railway:atacs', value: 'yes' } + + - train_protection: ktcs + tags: + - { tag: 'railway:ktcs', values: ['yes', '2', '3', 'M'] } + + - train_protection: tbl + tags: + - { tag: 'railway:tbl', values: ['yes', '1', '1+', '2'] } + + - train_protection: tmacs + tags: + - { tag: 'railway:tmacs', value: 'yes' } + + - train_protection: tpws + tags: + - { tag: 'railway:tpws', value: 'yes' } + + - train_protection: zbs + tags: + - { tag: 'railway:zbs', value: 'yes' } + + - train_protection: zsl90 + tags: + - { tag: 'railway:zsl90', value: 'yes' } + + - train_protection: zub + tags: + - { tag: 'railway:zub', value: 'yes' } + + - train_protection: zub + tags: + - { tag: 'railway:zub121', value: 'yes' } + + - train_protection: zub + tags: + - { tag: 'railway:zub122', value: 'yes' } + + - train_protection: zub + tags: + - { tag: 'railway:zub123', value: 'yes' } + + - train_protection: zub + tags: + - { tag: 'railway:zub222c', value: 'yes' } + + - train_protection: satp + tags: + - { tag: 'railway:satp', value: 'yes' } + + - train_protection: satp + tags: + - { tag: 'railway:atp3b', value: 'yes' } + + - train_protection: satp + tags: + - { tag: 'railway:atp4b', value: 'yes' } + + - train_protection: twc + tags: + - { tag: 'railway:twc', value: 'yes' } + + - train_protection: none + tags: + - { tag: 'railway:pzb', value: 'no' } + - { tag: 'railway:lzb', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:atb', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:atc', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:atc', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:etms', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:ptc', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:scmt', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:asfa', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:kvb', value: 'no' } + - { tag: 'railway:tvm', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:ls', value: 'no' } + - { tag: 'railway:etcs', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:zsi127', value: 'no' } + + - train_protection: none + tags: + - { tag: 'railway:jkv', value: 'no' } diff --git a/fonts.mss b/fonts.mss deleted file mode 100644 index 7df1c50ab..000000000 --- a/fonts.mss +++ /dev/null @@ -1,182 +0,0 @@ -/* This file has been taken from OpenStreetMap Carto - https://github.com/gravitystorm/openstreetmap-carto/blob/master/fonts.mss - license: CC-0 */ - -/* -About fonts: - -Noto is a font family that wants to cover most of Unicode with a harmonic -design across various scripts. We use Noto for most text, with some support -for backward-compatibility and some fallback fonts. - -By order: - -1. Noto Sans is available for most scripts and it is used as a first choice. -Where available the UI version of the fonts – which provides tighter vertical -metrics – is used (except for the base font, where the UI version is deprecated -since Noto Phase III, and Sinhala where both versions are used for backwards -compatibility with Ubuntu 16.04). Most of the list is in alphabetical order, -but there are some exceptions. - - - Noto Sans is before all other fonts - - The CJK fonts are manually ordered. The used CJK font covers all CJK - languages, but defaults to the japanese glyph style if various glyph - styles are available. (We have to default to one of JP, KR, SC, TC because - this carto style has no knowledge about what language the “names” tag - contains. As in Korea Han characters are not so widely used, it seems - better to default to either Chinese or Japanese. As Chinese exists in the - two variants SC/TC, it won’t be a uniform rendering anyway. So we default - to Japanese. However, this choise stays somewhat arbitrary and subjective. - See also https://github.com/gravitystorm/openstreetmap-carto/issues/2208) - -2. Noto provides various variants of Arabic: Noto Kufi Arabic, Noto Naskh -Arabic, Noto Nastaliq Urdu and Noto Sans Arabic. Kufi and Urdu styles are not -widespread in use. Noto Sans Arabic (a Naskh-style low-contrast “Sans” font) and -Noto Naskh Arabic are the fonts with the greatest coverage and provide an UI -variant. This style uses Noto Sans Arabic UI because it’s consistent with the -other Sans fonts and legible. The Arabic fonts are placed behind Sans fonts -because they might re-define some commonly used signs like parenthesis or -quotation marks, and the arabic design should not overwrite the standard design. - -3. Noto provides two variants of Emoji: Noto Color Emoji and Noto Emoji. The -colour variant is a SVG flavoured OpenType font that contains coloured emojis. -This is not useful in cartography, so we use the “normal” monochromatic -Noto Emoji. - -4. The list still includes Noto Naskh Arabic UI for compatibility on systems -without Noto Sans Arabic UI. - -5. The list still includes DejaVu for compatibility on systems without Noto. - -6. Fallback fonts. Hanazono covers almost all CJK characters, even in Unicode -Plane 2. Unifont is a fallback of last resort with full coverage in Plane 0 -(Unifont Medium), some coverage in Plane 1 (Unifont Upper Medium) and no -coverage in Plane 2. Unifont Medium Sample would cover the BMP PUA with -replacement characters, but cannot be used because Mapnik does not -support SBIT TTF. -*/ - -/* -A regular style. -*/ -@book-fonts: "Noto Sans Regular", - "Noto Sans CJK JP Regular", - "Noto Sans Adlam Regular", "Noto Sans Adlam Unjoined Regular" - "Noto Sans Armenian Regular", - "Noto Sans Balinese Regular", - "Noto Sans Bamum Regular", - "Noto Sans Batak Regular", - "Noto Sans Bengali UI Regular", - "Noto Sans Buginese Regular", - "Noto Sans Buhid Regular", - "Noto Sans Canadian Aboriginal Regular", - "Noto Sans Chakma Regular", - "Noto Sans Cham Regular", - "Noto Sans Cherokee Regular", - "Noto Sans Coptic Regular", - "Noto Sans Devanagari UI Regular", - "Noto Sans Ethiopic Regular", - "Noto Sans Georgian Regular", - "Noto Sans Gujarati UI Regular", - "Noto Sans Gurmukhi UI Regular", - "Noto Sans Hanunoo Regular", - "Noto Sans Hebrew Regular", - "Noto Sans Javanese Regular", - "Noto Sans Kannada UI Regular", - "Noto Sans Kayah Li Regular", - "Noto Sans Khmer UI Regular", - "Noto Sans Lao UI Regular", - "Noto Sans Lepcha Regular", - "Noto Sans Limbu Regular", - "Noto Sans Lisu Regular", - "Noto Sans Malayalam UI Regular", - "Noto Sans Mandaic Regular", - "Noto Sans Mongolian Regular", - "Noto Sans Myanmar UI Regular", - "Noto Sans New Tai Lue Regular", - "Noto Sans NKo Regular", - "Noto Sans Ol Chiki Regular", - "Noto Sans Oriya UI Regular", - "Noto Sans Osage Regular", - "Noto Sans Osmanya Regular", - "Noto Sans Samaritan Regular", - "Noto Sans Saurashtra Regular", - "Noto Sans Shavian Regular", - "Noto Sans Sinhala UI Regular", - "Noto Sans Sinhala Regular", - "Noto Sans Sundanese Regular", - "Noto Sans Symbols Regular", - "Noto Sans Symbols2 Regular", - "Noto Sans Syriac Eastern Regular", - "Noto Sans Syriac Estrangela Regular", - "Noto Sans Syriac Western Regular", - "Noto Sans Tagalog Regular", - "Noto Sans Tagbanwa Regular", - "Noto Sans Tai Le Regular", - "Noto Sans Tai Tham Regular", - "Noto Sans Tai Viet Regular", - "Noto Sans Tamil UI Regular", - "Noto Sans Telugu UI Regular", - "Noto Sans Thaana Regular", - "Noto Sans Thai UI Regular", - "Noto Sans Tibetan Regular", - "Noto Sans Tifinagh Regular", - "Noto Sans Vai Regular", - "Noto Sans Yi Regular", - - "Noto Sans Arabic UI Regular", - - "Noto Emoji Regular", - - "Noto Naskh Arabic UI Regular", - - "DejaVu Sans Book", - - "HanaMinA Regular", "HanaMinB Regular", - "Unifont Medium", "unifont Medium", "Unifont Upper Medium"; - -/* -A bold style is available for almost all scripts. Bold text is heavier than -regular text and can be used for emphasis. Fallback is a regular style. -*/ -@bold-fonts: "Noto Sans Bold", - "Noto Sans CJK JP Bold", - "Noto Sans Armenian Bold", - "Noto Sans Bengali UI Bold", - "Noto Sans Cham Bold", - "Noto Sans Cherokee Bold", - "Noto Sans Devanagari UI Bold", - "Noto Sans Ethiopic Bold", - "Noto Sans Georgian Bold", - "Noto Sans Gujarati UI Bold", - "Noto Sans Gurmukhi UI Bold", - "Noto Sans Hebrew Bold", - "Noto Sans Kannada UI Bold", - "Noto Sans Khmer UI Bold", - "Noto Sans Lao UI Bold", - "Noto Sans Malayalam UI Bold", - "Noto Sans Myanmar UI Bold", - "Noto Sans Oriya UI Bold", - "Noto Sans Sinhala UI Bold", - "Noto Sans Sinhala Bold", - "Noto Sans Symbols Bold", - "Noto Sans Tamil UI Bold", - "Noto Sans Telugu UI Bold", - "Noto Sans Thaana Bold", - "Noto Sans Thai UI Bold", - "Noto Sans Tibetan Bold", - - "Noto Sans Arabic UI Bold", - - "Noto Naskh Arabic UI Bold", - - "DejaVu Sans Bold", - - @book-fonts; - -/* -Italics are only available for the base font, not the other scripts. -For a considerable number of labels this style will make no difference to the regular style. -*/ -@oblique-fonts: "Noto Sans Italic", @book-fonts; - diff --git a/gauge.mml b/gauge.mml deleted file mode 100644 index 897d7bb61..000000000 --- a/gauge.mml +++ /dev/null @@ -1,366 +0,0 @@ -scale: 1 -metatile: 2 -name: OpenRailwayMap Gauge -description: A map style for railway gauge -bounds: &world - - -180 - - -85.05112877980659 - - 180 - - 85.05112877980659 -center: - - 0 - - 0 - - 4 -format: png -interactivity: false -minzoom: 0 -maxzoom: 22 -srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" - -# Various parts to be included later on -_parts: - # Extents are used for tilemill, and don't actually make it to the generated XML - extents: &extents - extent: *world - srs-name: "900913" - srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" - extents84: &extents84 - extent: *world - srs-name: "WGS84" - srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" - osm2pgsql: &osm2pgsql - type: "postgis" - dbname: "gis" - key_field: "" - geometry_field: "way" - extent: "-20037508,-20037508,20037508,20037508" - -Stylesheet: - - fonts.mss - - gauge.mss - - common.mss - -Layer: - - id: railway_line_casing - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - railway_desired_value_from_list(1, COALESCE(tags->'gauge', tags->'construction:gauge')) AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'monorail', 'miniature') - ) AS r - ORDER by layer, rank NULLS LAST - ) AS railway_line_casing - properties: - minzoom: 9 - - id: railway_line_low - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - NULL AS service, - NULL AS construction, - NULL AS construction_railway, - NULL AS construction_usage, - NULL AS construction_service, - NULL AS preserved_railway, - NULL AS preserved_usage, - NULL AS preserved_service, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, - railway_desired_value_from_list(1, tags->'gauge') AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage = 'main' AND service IS NULL - ) AS r - ORDER BY layer NULLS LAST - ) AS openrailwaymap_line_low - properties: - maxzoom: 7 - - id: railway_line_med - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - NULL AS service, - NULL AS construction, - NULL AS construction_railway, - NULL AS construction_usage, - NULL AS construction_service, - NULL AS preserved_railway, - NULL AS preserved_usage, - NULL AS preserved_service, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, - railway_desired_value_from_list(1, tags->'gauge') AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_line_med - properties: - minzoom: 8 - maxzoom: 8 - - id: railway_line_fill - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - construction_usage, - construction_service, - preserved_railway, - preserved_usage, - preserved_service, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - tags->'construction:usage' AS construction_usage, - tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, - tags->'preserved:usage' AS preserved_usage, - tags->'preserved:service' AS preserved_service, - railway_desired_value_from_list(1, COALESCE(tags->'gauge', tags->'construction:gauge')) AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved', 'monorail', 'miniature') - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_line_fill - properties: - minzoom: 9 -# railway_dual_gauge_line renders with almost the same styling on top of the line fill and thereby adds dashing. - - id: railway_dual_gauge_line - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - construction_usage, - construction_service, - preserved_railway, - preserved_usage, - preserved_service, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - tags->'construction:usage' AS construction_usage, - tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, - tags->'preserved:usage' AS preserved_usage, - tags->'preserved:service' AS preserved_service, - railway_desired_value_from_list(2, COALESCE(tags->'gauge', tags->'construction:gauge')) AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved', 'monorail', 'miniature') - AND railway_desired_value_from_list(2, COALESCE(tags->'gauge', tags->'construction:gauge')) IS NOT NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_dual_gauge_line - properties: - minzoom: 9 -# railway_multi_gauge_line renders with almost the same styling on top of the railway_dual_gauge_line and thereby adds a second dashed line. - - id: railway_multi_gauge_line - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - construction_railway, - construction_usage, - construction_service, - preserved_railway, - preserved_usage, - preserved_service, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - railway_to_int(gauge) AS gaugeint, - gauge - FROM - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - tags->'construction:usage' AS construction_usage, - tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, - tags->'preserved:usage' AS preserved_usage, - tags->'preserved:service' AS preserved_service, - railway_desired_value_from_list(3, COALESCE(tags->'gauge', tags->'construction:gauge')) AS gauge, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved', 'monorail', 'miniature') - AND railway_desired_value_from_list(3, COALESCE(tags->'gauge', tags->'construction:gauge')) IS NOT NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST - ) AS railway_multi_gauge_line - properties: - minzoom: 9 - - id: railway_text_med - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank, - layer, - railway_gauge_label(tags->'gauge') AS label, - tags->'gauge' AS gauge, - NULL AS construction_gauge - FROM openrailwaymap_osm_line - WHERE - railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL - ORDER by layer, rank NULLS LAST - ) AS railway_text_high - properties: - minzoom: 8 - maxzoom: 8 - - id: railway_text_high - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - construction, - tags->'construction:railway' AS construction_railway, - CASE WHEN railway = 'rail' AND usage IN ('usage', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - ELSE 50 - END AS rank, - layer, - railway_gauge_label(COALESCE(tags->'gauge', tags->'construction:gauge')) AS label, - tags->'gauge' AS gauge, - tags->'construction:gauge' AS construction_gauge - FROM openrailwaymap_osm_line - WHERE - railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'construction', 'preserved', 'monorail', 'miniature') - ORDER by layer, rank NULLS LAST - ) AS railway_text_high - properties: - minzoom: 9 diff --git a/gauge.mss b/gauge.mss deleted file mode 100644 index 8d704e27e..000000000 --- a/gauge.mss +++ /dev/null @@ -1,536 +0,0 @@ -@text-halo-color: white; -@text-halo-radius: 1; - -@construction-dashes: 6,6; -@dual-construction-dashes: 3,9; -@multi-construction-dashes: 0,2,2,8; - -@proposed-dashes: 4,8; - -@dual-gauge-dashes: 9,9; -@multi-gauge-dashes: 0,6,6,6; - -@color_gauge_0064: #006060; -@color_gauge_0089: #008080; -@color_gauge_0127: #00A0A0; -@color_gauge_0184: #00C0C0; -@color_gauge_0190: #00E0E0; -@color_gauge_0260: #00FFFF; -@color_gauge_0381: #80FFFF; -@color_gauge_0500: #A0FFFF; -@color_gauge_0597: #C0FFFF; -@color_gauge_0600: #E0FFFF; -@color_gauge_0610: #FFE0FF; -@color_gauge_0700: #FFC0FF; -@color_gauge_0750: #FFA0FF; -@color_gauge_0760: #FF80FF; -@color_gauge_0762: #FF60FF; -@color_gauge_0785: #FF40FF; -@color_gauge_0800: #FF00FF; -@color_gauge_0891: #E000FF; -@color_gauge_0900: #C000FF; -@color_gauge_0914: #A000FF; -@color_gauge_0950: #8000FF; -@color_gauge_1000: #6000FF; -@color_gauge_1009: #4000FF; -@color_gauge_1050: #0000FF; -@color_gauge_1067: #0000E0; -@color_gauge_1100: #0000C0; -@color_gauge_1200: #0000A0; -@color_gauge_1372: #000080; -@color_gauge_1422: #000060; -@color_gauge_1432: #000040; -@color_gauge_1435: #000000; -@color_gauge_1440: #400000; -@color_gauge_1445: #600000; -@color_gauge_1450: #700000; -@color_gauge_1458: #800000; -@color_gauge_1495: #A00000; -@color_gauge_1520: #C00000; -@color_gauge_1522: #E00000; -@color_gauge_1524: #FF0000; -@color_gauge_1581: #FF6000; -@color_gauge_1588: #FF8000; -@color_gauge_1600: #FFA000; -@color_gauge_1668: #FFC000; -@color_gauge_1676: #FFE000; -@color_gauge_1700: #FFFF00; -@color_gauge_1800: #E0FF00; -@color_gauge_1880: #C0FF00; -@color_gauge_2000: #A0FF00; -@color_gauge_miniature: #80C0C0; -@color_gauge_monorail: #C0C080; -@color_gauge_broad: #FFC0C0; -@color_gauge_narrow: #C0C0FF; -@color_gauge_standard: #808080; -@color_gauge_unknown: #C0C0C0; - -/** - * Railway tracks with dual gauge or multiple gauge are rendered with a second symbolizer - * called railway_dual_gauge_line and a third symbolizer called railway_multi_gauge_line. - * It adds dashed lines on top of existing lines (e.g. a red dashed line - * on a black line, for the dual gauge 1435mm/1524mm). - * - * Common rules in common.mss are defined for the ::fill and ::casing symbolizers only. - * Therefore, the rules from common.mss for ::fill need to be repeated here. - */ -#railway_dual_gauge_line[zoom>=9], -#railway_multi_gauge_line[zoom>=9] { - ["railway"="rail"] { - ["usage"="main"]["service"=null] { - line-color: @railway_fill_color; - line-width: 1.5; - - [zoom>=6][zoom<=8] { - line-width: 2.5; - } - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom>=8]["usage"="branch"]["service"=null] { - line-color: @railway_fill_color; - line-width: 2.5; - - [zoom>=9] { - line-width: 3.5; - } - } - - [zoom=10]["usage"="industrial"]["service"=null], - [zoom>=11]["usage"="industrial"] { - line-color: @railway_fill_color; - line-width: 2; - - ["service"!=null] { - line-width: 1.5; - } - } - - [zoom>=13]["usage"=null]["service"=null], - [zoom>=11]["usage"=null]["service"="siding"], - [zoom>=11]["usage"=null]["service"="crossover"] { - line-color: @railway_fill_color; - line-width: 2; - } - - [zoom>=12]["usage"=null]["service"="yard"], - [zoom>=11]["usage"=null]["service"="spur"] { - line-color: @railway_fill_color; - line-width: 1.5; - } - } - - ["railway"="narrow_gauge"] { - [zoom>=10]["service"=null], - [zoom>=11]["service"="spur"], - [zoom>=11]["service"="siding"], - [zoom>=11]["service"="crossover"], - [zoom>=12]["service"="yard"] { - line-width: 3; - line-color: @railway_fill_color; - - ["usage"="industrial"], - ["service"="spur"], - ["service"!=null] { - line-width: 2; - } - } - } - - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9] ["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"] { - line-color: @railway_fill_color; - line-width: 3; - - [service!=null] { - line-width: 1.5; - } - } -} - -#railway_line_low[zoom<=7]::fill, -#railway_line_med[zoom=8]::fill, -#railway_line_fill[zoom>=9]::fill, -#railway_dual_gauge_line[zoom>=9], -#railway_multi_gauge_line[zoom>=9] { - ["railway"="rail"]["usage"="main"]["service"=null], - [zoom>=8]["railway"="rail"]["usage"="branch"]["service"=null], - [zoom=10]["railway"="rail"]["usage"="industrial"]["service"=null], - [zoom>=13]["railway"="rail"]["usage"=null]["service"=null], - [zoom>=11]["railway"="rail"]["usage"="industrial"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="siding"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="crossover"], - [zoom>=12]["railway"="rail"]["usage"=null]["service"="yard"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="spur"], - [zoom>=10]["railway"="narrow_gauge"]["service"=null], - [zoom>=11]["railway"="narrow_gauge"]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"="siding"], - [zoom>=11]["railway"="narrow_gauge"]["service"="crossover"], - [zoom>=12]["railway"="narrow_gauge"]["service"="yard"], - /* service!=null is required to get a smaller Mapnik XML style with the Carto compiler. */ - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"]["service"!=null], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"]["service"!=null], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"]["service"!=null], - [zoom>=10]["railway"="monorail"]["service"=null], - [zoom>=13]["railway"="monorail"]["service"!=null], - [zoom>=11]["railway"="miniature"]["service"=null], - [zoom>=13]["railway"="miniature"]["service"!=null] { - - /* fill rules for monorail and miniature */ - [zoom>=10]["railway"="monorail"]["service"=null], - [zoom>=13]["railway"="monorail"]["service"!=null], - [zoom>=11]["railway"="miniature"]["service"=null], - [zoom>=13]["railway"="miniature"]["service"!=null] { - line-width: 3; - - [service!=null] { - line-width: 1.5; - } - } - - #railway_line_fill["railway"="construction"] { - line-dasharray: @construction-dashes; - } - - #railway_dual_gauge_line["railway"="construction"] { - line-dasharray: @dual-construction-dashes; - } - - #railway_multi_gauge_line["railway"="construction"] { - line-dasharray: @multi-construction-dashes; - } - - #railway_dual_gauge_line["railway"!="construction"] { - line-dasharray: @dual-gauge-dashes; - } - - #railway_multi_gauge_line["railway"!="construction"] { - line-dasharray: @multi-gauge-dashes; - } - - /* color for unknown low numeric gauge values */ - - [gaugeint>0][gaugeint<63] { - line-color: @color_gauge_unknown; - } - - /* colors for numeric gauge values */ - - [gaugeint>=63][gaugeint<88] { - line-color: @color_gauge_0064; - } - - [gaugeint>=88][gaugeint<127] { - line-color: @color_gauge_0089; - } - - [gaugeint>=127][gaugeint<184] { - line-color: @color_gauge_0127; - } - - [gaugeint>=184][gaugeint<190] { - line-color: @color_gauge_0184; - } - - [gaugeint>=190][gaugeint<260] { - line-color: @color_gauge_0190; - } - - [gaugeint>=260][gaugeint<380] { - line-color: @color_gauge_0260; - } - - [gaugeint>=380][gaugeint<500] { - line-color: @color_gauge_0381; - } - - [gaugeint>=500][gaugeint<597] { - line-color: @color_gauge_0500; - } - - [gaugeint>=597][gaugeint<600] { - line-color: @color_gauge_0597; - } - - [gaugeint>=600][gaugeint<609] { - line-color: @color_gauge_0600; - } - - [gaugeint>=609][gaugeint<700] { - line-color: @color_gauge_0610; - } - - [gaugeint>=700][gaugeint<750] { - line-color: @color_gauge_0700; - } - - [gaugeint>=750][gaugeint<760] { - line-color: @color_gauge_0750; - } - - [gaugeint>=760][gaugeint<762] { - line-color: @color_gauge_0760; - } - - [gaugeint>=762][gaugeint<785] { - line-color: @color_gauge_0762; - } - - [gaugeint>=785][gaugeint<800] { - line-color: @color_gauge_0785; - } - - [gaugeint>=800][gaugeint<891] { - line-color: @color_gauge_0800; - } - - [gaugeint>=891][gaugeint<900] { - line-color: @color_gauge_0891; - } - - [gaugeint>=900][gaugeint<914] { - line-color: @color_gauge_0900; - } - - [gaugeint>=914][gaugeint<950] { - line-color: @color_gauge_0914; - } - - [gaugeint>=950][gaugeint<1000] { - line-color: @color_gauge_0950; - } - - [gaugeint>=1000][gaugeint<1009] { - line-color: @color_gauge_1000; - } - - [gaugeint>=1009][gaugeint<1050] { - line-color: @color_gauge_1009; - } - - [gaugeint>=1050][gaugeint<1066] { - line-color: @color_gauge_1050; - } - - [gaugeint>=1066][gaugeint<1100] { - line-color: @color_gauge_1067; - } - - [gaugeint>=1100][gaugeint<1200] { - line-color: @color_gauge_1100; - } - - [gaugeint>=1200][gaugeint<1372] { - line-color: @color_gauge_1200; - } - - [gaugeint>=1372][gaugeint<1422] { - line-color: @color_gauge_1372; - } - - [gaugeint>=1422][gaugeint<1432] { - line-color: @color_gauge_1422; - } - - [gaugeint>=1432][gaugeint<1435] { - line-color: @color_gauge_1432; - } - - [gaugeint>=1435][gaugeint<1440] { - line-color: @color_gauge_1435; - } - - [gaugeint>=1440][gaugeint<1445] { - line-color: @color_gauge_1440; - } - - [gaugeint>=1445][gaugeint<1450] { - line-color: @color_gauge_1445; - } - - [gaugeint>=1450][gaugeint<1458] { - line-color: @color_gauge_1450; - } - - [gaugeint>=1458][gaugeint<1495] { - line-color: @color_gauge_1458; - } - - [gaugeint>=1495][gaugeint<1520] { - line-color: @color_gauge_1495; - } - - [gaugeint>=1520][gaugeint<1522] { - line-color: @color_gauge_1520; - } - - [gaugeint>=1522][gaugeint<1524] { - line-color: @color_gauge_1522; - } - - [gaugeint>=1524][gaugeint<1581] { - line-color: @color_gauge_1524; - } - - [gaugeint>=1581][gaugeint<1588] { - line-color: @color_gauge_1581; - } - - [gaugeint>=1588][gaugeint<1600] { - line-color: @color_gauge_1588; - } - - [gaugeint>=1600][gaugeint<1668] { - line-color: @color_gauge_1600; - } - - [gaugeint>=1668][gaugeint<1672] { - line-color: @color_gauge_1668; - } - - [gaugeint>=1672][gaugeint<1700] { - line-color: @color_gauge_1676; - } - - [gaugeint>=1700][gaugeint<1800] { - line-color: @color_gauge_1700; - } - - [gaugeint>=1800][gaugeint<1880] { - line-color: @color_gauge_1800; - } - - [gaugeint>=1880][gaugeint<2000] { - line-color: @color_gauge_1880; - } - - [gaugeint>=2000][gaugeint<3000] { - line-color: @color_gauge_2000; - } - - /* color for unknown high numeric gauge values */ - - [gaugeint>=3000] { - line-color: @color_gauge_unknown; - } - - /* miniature tracks with inaccurate gauge value */ - - ["railway"="miniature"]["gauge"="narrow"], - ["railway"="miniature"]["gauge"="broad"], - ["railway"="miniature"]["gauge"="standard"], - ["railway"="miniature"]["gauge"="unknown"], - ["railway"="miniature"]["gauge"=null] { - line-color: @color_gauge_miniature; - } - - /* other tracks with inaccurate gauge value */ - - ["railway"="narrow_gauge"]["gauge"="narrow"], - ["railway"="narrow_gauge"]["gauge"="broad"], - ["railway"="narrow_gauge"]["gauge"="standard"], - ["railway"="narrow_gauge"]["gauge"="unknown"], - ["railway"="narrow_gauge"]["gauge"=null], - ["railway"="rail"]["gauge"="narrow"], - ["railway"="light_rail"]["gauge"="narrow"], - ["railway"="subway"]["gauge"="narrow"], - ["railway"="tram"]["gauge"="narrow"] { - line-color: @color_gauge_narrow; - } - - ["railway"="rail"]["gauge"="broad"], - ["railway"="light_rail"]["gauge"="broad"], - ["railway"="subway"]["gauge"="broad"], - ["railway"="tram"]["gauge"="broad"] { - line-color: @color_gauge_broad; - } - - ["railway"="rail"]["gauge"="standard"], - ["railway"="light_rail"]["gauge"="standard"], - ["railway"="subway"]["gauge"="standard"], - ["railway"="tram"]["gauge"="standard"] { - line-color: @color_gauge_standard; - } - - /* monorails or tracks with monorail gauge value */ - - ["railway"="monorail"], - ["railway"="rail"]["gauge"="monorail"], - ["railway"="light_rail"]["gauge"="monorail"], - ["railway"="subway"]["gauge"="monorail"], - ["railway"="tram"]["gauge"="monorail"] { - line-color: @color_gauge_monorail; - } - } -} - -#railway_text_med[zoom=8], -#railway_text_high[zoom>=9] { - ["railway"="rail"]["usage"="main"]["service"=null], - ["railway"="rail"]["usage"="branch"]["service"=null], - [zoom=10]["railway"="rail"]["usage"="industrial"]["service"=null], - [zoom>=13]["railway"="rail"]["usage"=null]["service"=null], - [zoom>=11]["railway"="rail"]["usage"="industrial"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="siding"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="crossover"], - [zoom>=12]["railway"="rail"]["usage"=null]["service"="yard"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"=null], - [zoom>=11]["railway"="narrow_gauge"]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"="siding"], - [zoom>=11]["railway"="narrow_gauge"]["service"="crossover"], - [zoom>=12]["railway"="narrow_gauge"]["service"="yard"], - /* service!=null is required to get a smaller Mapnik XML style with the Carto compiler. */ - [zoom>=11]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=12]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=12]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=12]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"]["service"!=null], - [zoom>=12]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"]["service"!=null], - [zoom>=13]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"]["service"!=null], - [zoom>=12]["railway"="monorail"]["service"=null], - [zoom>=13]["railway"="monorail"]["service"!=null], - [zoom>=13]["railway"="miniature"]["service"=null], - [zoom>=13]["railway"="miniature"]["service"!=null] { - text-name: [label]; - text-face-name: @bold-fonts; - text-size: 11; - text-placement: line; - text-spacing: 100; - text-min-distance: 30; - text-halo-radius: @text-halo-radius; - text-halo-fill: @text-halo-color; - ["gauge"=null]["construction_gauge"!=null] { - text-face-name: @oblique-fonts; - } - } -} diff --git a/import/Dockerfile b/import/Dockerfile new file mode 100644 index 000000000..153be6f94 --- /dev/null +++ b/import/Dockerfile @@ -0,0 +1,100 @@ +FROM node:22-alpine@sha256:dbcedd8aeab47fbc0f4dd4bffa55b7c3c729a707875968d467aaaea42d6225af AS build-lua + +WORKDIR /build + +RUN npm install yaml + +RUN --mount=type=bind,source=import/tags.lua.js,target=tags.lua.js \ + --mount=type=bind,source=features/train_protection.yaml,target=train_protection.yaml \ + --mount=type=bind,source=features/signals_railway_signals.yaml,target=signals_railway_signals.yaml \ + --mount=type=bind,source=features/poi.yaml,target=poi.yaml \ + node tags.lua.js \ + > /build/tags.lua + +FROM node:22-alpine@sha256:dbcedd8aeab47fbc0f4dd4bffa55b7c3c729a707875968d467aaaea42d6225af AS build-signals + +WORKDIR /build + +RUN npm install yaml + +RUN --mount=type=bind,source=import/sql/signal_features.sql.js,target=signal_features.sql.js \ + --mount=type=bind,source=features/signals_railway_signals.yaml,target=signals_railway_signals.yaml \ + --mount=type=bind,source=symbols,target=symbols \ + node signal_features.sql.js \ + > /build/signal_features.sql + +FROM node:22-alpine@sha256:dbcedd8aeab47fbc0f4dd4bffa55b7c3c729a707875968d467aaaea42d6225af AS build-operators + +WORKDIR /build + +RUN npm install yaml + +RUN --mount=type=bind,source=import/sql/operators.sql.js,target=operators.sql.js \ + --mount=type=bind,source=features/operators.yaml,target=operators.yaml \ + node operators.sql.js \ + > /build/operators.sql + +FROM debian:trixy-slim@sha256:1caf1c703c8f7e15dcf2e7769b35000c764e6f50e4d7401c355fb0248f3ddfdb AS test + +# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + lua5.4 \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +COPY --from=build-lua \ + /build/tags.lua tags.lua + +COPY import/openrailwaymap.lua openrailwaymap.lua +COPY import/test test + +CMD ["lua", "test/test_all.lua"] + +FROM debian:trixy-slim@sha256:1caf1c703c8f7e15dcf2e7769b35000c764e6f50e4d7401c355fb0248f3ddfdb + +# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + gnupg \ + osm2pgsql \ + osmium-tool \ + pyosmium \ + gdal-bin \ + python3-psycopg2 \ + python3-yaml \ + python3-requests \ + unzip \ + postgresql-client \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +RUN mkdir -p /openrailwaymap +WORKDIR /openrailwaymap + +COPY import/sql sql +COPY import/docker-startup.sh docker-startup.sh +COPY import/openrailwaymap.lua openrailwaymap.lua +COPY import/osmium-tags-filter osmium-tags-filter + +RUN echo '\\timing' >> ~/.psqlrc + +COPY --from=build-lua \ + /build/tags.lua tags.lua + +COPY --from=build-signals \ + /build/signal_features.sql sql/signal_features.sql + +COPY --from=build-operators \ + /build/operators.sql sql/operators.sql + +ENTRYPOINT ["/openrailwaymap/docker-startup.sh"] + +# Empty command for adding arguments to the startup script +CMD [] diff --git a/import/Dockerfile.dockerignore b/import/Dockerfile.dockerignore new file mode 100644 index 000000000..015a2a1a6 --- /dev/null +++ b/import/Dockerfile.dockerignore @@ -0,0 +1,4 @@ +** +!import +!features +!symbols diff --git a/import/docker-startup.sh b/import/docker-startup.sh new file mode 100755 index 000000000..bd8a6635f --- /dev/null +++ b/import/docker-startup.sh @@ -0,0 +1,169 @@ +#!/bin/bash + +set -e +set -o pipefail + +# Filter the data for more efficient import +# Store the filtered data for future use in the data directory +OSM2PGSQL_INPUT_FILE="/data/${OSM2PGSQL_DATAFILE:-data.osm.pbf}" +OSM2PGSQL_FILTERED_FILE="/data/filtered/${OSM2PGSQL_DATAFILE:-data.osm.pbf}" + +# For debugging, add --echo-queries +PSQL="psql --dbname gis --variable ON_ERROR_STOP=on --pset pager=off" + +function filter_data() { + if [[ ! -f "$OSM2PGSQL_FILTERED_FILE" ]]; then + echo "Filtering data from $OSM2PGSQL_INPUT_FILE to $OSM2PGSQL_FILTERED_FILE" + + mkdir -p "$(dirname "$OSM2PGSQL_FILTERED_FILE")" + + osmium tags-filter \ + "$OSM2PGSQL_INPUT_FILE" \ + --output "$OSM2PGSQL_FILTERED_FILE" \ + --expressions osmium-tags-filter + fi +} + +function enable_disable_extensions() { + echo "Enabling and disabling Postgres extensions" + + $PSQL -c 'CREATE EXTENSION IF NOT EXISTS postgis;' + $PSQL -c 'CREATE EXTENSION IF NOT EXISTS hstore;' + $PSQL -c 'CREATE EXTENSION IF NOT EXISTS unaccent;' + $PSQL -c 'DROP EXTENSION IF EXISTS postgis_topology;' + $PSQL -c 'DROP EXTENSION IF EXISTS postgis_tiger_geocoder;' + $PSQL -c 'DROP EXTENSION IF EXISTS fuzzystrmatch;' +} + +function import_db() { + echo "Importing data (${OSM2PGSQL_NUMPROC:-4} processes)" + # Importing data to a database + osm2pgsql \ + --create \ + --database gis \ + --drop \ + --output flex \ + --style openrailwaymap.lua \ + --number-processes "${OSM2PGSQL_NUMPROC:-4}" \ + "$OSM2PGSQL_FILTERED_FILE" +} + +function update_datafile() { + # This command may exit with non-zero exit codes + # in case there are more updates, or if no updates were performed + # This uses the replication server as defined in the input file + pyosmium-up-to-date \ + -v \ + --tmpdir /tmp \ + --force-update-of-old-planet \ + --size 10000 \ + -o "/tmp/data.osm.pbf" \ + "$OSM2PGSQL_FILTERED_FILE" \ + || true + + [[ ! -f "/tmp/data.osm.pbf" ]] \ + || mv "/tmp/data.osm.pbf" "$OSM2PGSQL_FILTERED_FILE" + + # Ensure the data file is filtered to contain only interesting data + osmium tags-filter \ + "$OSM2PGSQL_FILTERED_FILE" \ + --output "/tmp/data.osm.pbf" \ + --expressions osmium-tags-filter \ + && mv "/tmp/data.osm.pbf" "$OSM2PGSQL_FILTERED_FILE" +} + +function reduce_data() { + # Remove platforms which are not near any railway line, and also not part of any railway route + $PSQL -c "delete from platforms p where not exists(select * from routes r where r.platform_ref_ids @> Array[p.osm_id]) and not exists(select * from railway_line l where st_dwithin(p.way, l.way, 20));" +} + +function transform_data() { + # Yard nodes which are contained in a landuse=railway area, assume the landuse area as yard geometry. + $PSQL -c "update stations s set way = l.way from landuse l where ST_Within(s.way, l.way) and feature = 'yard' and GeometryType(s.way) = 'POINT' and s.osm_type = 'N';" +} + +function create_update_functions_views() { + echo "Post processing imported data" + + # Functions + $PSQL -f sql/tile_functions.sql + $PSQL -f sql/api_facility_functions.sql + $PSQL -f sql/api_milestone_functions.sql + + # YAML data + $PSQL -f sql/signal_features.sql + $PSQL -f sql/operators.sql + + # Post processing + $PSQL -f sql/get_station_importance.sql + $PSQL -f sql/update_station_importance.sql + osm2pgsql-gen \ + --database gis \ + --style openrailwaymap.lua + $PSQL -f sql/stations_clustered.sql + + # Tile and API views on processed data + $PSQL -f sql/tile_views.sql + $PSQL -f sql/api_facility_views.sql +} + +function refresh_materialized_views() { + echo "Updating materialized views" + $PSQL -f sql/update_operators.sql + $PSQL -f sql/update_signal_features.sql + $PSQL -f sql/update_station_importance.sql + osm2pgsql-gen \ + --database gis \ + --style openrailwaymap.lua + $PSQL -f sql/update_stations_clustered.sql + $PSQL -f sql/update_api_views.sql +} + +function print_summary() { + echo "Database summary" + $PSQL -c "select concat(relname, ' (', relkind ,')') as name, pg_size_pretty(pg_table_size(oid)) as size from pg_class where relkind in ('m', 'r', 'i') and relname not like 'pg_%' order by pg_table_size(oid) desc;" + $PSQL -c "select pg_size_pretty(SUM(pg_table_size(oid))) as size from pg_class where relkind in ('m', 'r', 'i') and relname not like 'pg_%';" +} + +case "$1" in +import) + + filter_data + enable_disable_extensions + import_db + reduce_data + transform_data + create_update_functions_views + print_summary + + ;; + +update) + + filter_data + update_datafile + + ;; + +refresh) + + create_update_functions_views + refresh_materialized_views + print_summary + + ;; + +filter) + + filter_data + + ;; + +*) + + echo "Invalid argument '$1'. Supported: import, update, refresh, filter" + exit 1 + + ;; + +esac diff --git a/import/openrailwaymap.lua b/import/openrailwaymap.lua new file mode 100644 index 000000000..83b86d244 --- /dev/null +++ b/import/openrailwaymap.lua @@ -0,0 +1,1591 @@ +local tag_functions = require('tags') + +function dump(o) + if type(o) == 'table' then + local s = '{ ' + local first = true + for k, v in pairs(o) do + if first then + first = false + else + s = s .. ', ' + end + if type(k) ~= 'number' then + k = '"'..k..'"' + end + s = s .. '['..k..'] = ' .. dump(v) + end + return s .. ' }' + else + return tostring(o) + end +end + +function map(tbl, f) + if not tbl then + return nil + end + + local t = {} + for k, v in pairs(tbl) do + t[k] = f(v) + end + + return t +end + +function strip_prefix(value, prefix) + if osm2pgsql.has_prefix(value, prefix) then + return value:sub(prefix:len() + 1) + else + return value + end +end + +-- Convert a speed number from text to integer but not convert units +function speed_int_noconvert(value) + if not value then + return nil + end + + local _, _, match = value:find('^(%d+%.?%d*)$') + if match then + return tonumber(match) + end + + local _, _, match = value:find('^(%d+%.?%d*) ?mph$') + if match then + return tonumber(match) + end + + return nil +end + +-- Convert a speed number from text to integer with unit conversion +function speed_int(value) + if not value then + return nil + end + + local _, _, match = value:find('^(%d+%.?%d*)$') + if match then + return tonumber(match) + end + + local _, _, match = value:find('^(%d+%.?%d*) ?mph$') + if match then + return tonumber(match) * 1.609344 + end + + return nil +end + +-- Get the largest speed from a list of speed values (common at light speed signals) +function largest_speed_noconvert(value) + if not value then + return nil + end + + local largest_speed = nil + for elem in string.gmatch(value, '[^;]+') do + if elem then + local speed = speed_int_noconvert(elem) + if speed ~= nil and (largest_speed == nil or largest_speed < speed) then + largest_speed = speed + end + end + end + + return largest_speed +end + +-- Speed label and dominant speed, taking the preferred direction and forward, backward an non-directional speed into account +function dominant_speed_label(state, preferred_direction, speed, forward_speed, backward_speed) + if state == 'abandoned' or state == 'razed' then + return nil, nil + elseif (not speed) and (not forward_speed) and (not backward_speed) then + return nil, nil + elseif speed and (not forward_speed) and (not backward_speed) then + return speed_int(speed), speed + elseif speed then + return nil, nil + end + + if preferred_direction == 'forward' then + return speed_int(forward_speed), (forward_speed or '-') .. ' (' .. (backward_speed or '-') .. ')' + elseif preferred_direction == 'backward' then + return speed_int(backward_speed), (backward_speed or '-') .. ' (' .. (forward_speed or '-') .. ')' + elseif preferred_direction == 'both' or (not preferred_direction) then + return speed_int(forward_speed), (forward_speed or '-') .. ' / ' .. (backward_speed or '-') + else + return speed_int(forward_speed), (forward_speed or '-') .. ' / ' .. (backward_speed or '-') + end +end + +-- Protect against unwanted links in the UI +local file_prefix_length = string.len('File:') +function wikimedia_commons_or_image(wikimedia_commons, image) + local image_https = (image and image:find('^https://') and image) or nil + local image_wikimedia_commons_file = (image and image:find('^File:') and image:sub(file_prefix_length + 1)) or nil + local wikimedia_commons_file = (wikimedia_commons and wikimedia_commons:find('^File:') and wikimedia_commons:sub(file_prefix_length + 1)) or nil + local wikimedia_commons_not_file = (wikimedia_commons and (not wikimedia_commons:find('^File:')) and wikimedia_commons) or nil + + return wikimedia_commons_not_file, image_wikimedia_commons_file or wikimedia_commons_file, image_https +end + +function signal_caption(tags) + return tags['railway:signal:crossing_info:caption'] + or tags['railway:signal:stop:caption'] + or tags['railway:signal:crossing_hint:caption'] + or tags['railway:signal:station_distant:caption'] + or tags['railway:signal:crossing_distant:caption'] + or tags['railway:signal:speed_limit:caption'] + or tags['railway:signal:crossing:caption'] + or tags['railway:signal:passing:caption'] + or tags['railway:signal:automatic_marker:caption'] + or tags['railway:signal:whistle:caption'] + or tags['railway:signal:caption'] + or tags['railway:signal:minor:caption'] + or tags['railway:signal:main:caption'] + or tags['railway:signal:main_repeated:caption'] + or tags['railway:signal:distant:caption'] + or tags['railway:signal:electricity:caption'] + or tags['railway:signal:shunting:caption'] + or tags['railway:signal:fouling_point:caption'] + or tags['railway:signal:workrules:caption'] + or tags['railway:signal:resetting_switch:caption'] + or tags['railway:signal:switch:caption'] + or tags['railway:signal:route:caption'] + or tags['railway:signal:dual_mode:caption'] + or tags['railway:signal:train_protection:caption'] + or tags['railway:signal:radio:frequency'] +end + +local railway_line = osm2pgsql.define_table({ + name = 'railway_line', + ids = { type = 'way', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'linestring', not_null = true }, + { column = 'way_length', type = 'real' }, + { column = 'feature', type = 'text' }, + { column = 'state', type = 'text' }, + { column = 'rank', type = 'integer' }, + { column = 'service', type = 'text' }, + { column = 'usage', type = 'text' }, + { column = 'highspeed', type = 'boolean' }, + { column = 'layer', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'track_ref', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'construction', type = 'text' }, + { column = 'tunnel', type = 'boolean' }, + { column = 'bridge', type = 'boolean' }, + { column = 'maxspeed', type = 'real' }, + { column = 'preferred_direction', type = 'text' }, + { column = 'speed_label', type = 'text' }, + { column = 'frequency', type = 'real' }, + { column = 'voltage', type = 'integer' }, + { column = 'maximum_current', type = 'integer' }, + { column = 'electrification_state', type = 'text' }, + { column = 'future_frequency', type = 'real' }, + { column = 'future_voltage', type = 'integer' }, + { column = 'future_maximum_current', type = 'integer' }, + { column = 'gauges', sql_type = 'text[]' }, + { column = 'loading_gauge', type = 'text' }, + { column = 'track_class', type = 'text' }, + { column = 'reporting_marks', sql_type = 'text[]' }, + { column = 'train_protection', type = 'text' }, + { column = 'train_protection_rank', type = 'smallint' }, + { column = 'train_protection_construction', type = 'text' }, + { column = 'train_protection_construction_rank', type = 'smallint' }, + { column = 'operator', sql_type = 'text[]' }, + { column = 'owner', sql_type = 'text' }, + { column = 'traffic_mode', type = 'text' }, + { column = 'radio', type = 'text' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local pois = osm2pgsql.define_table({ + name = 'pois', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'feature', type = 'text' }, + { column = 'rank', type = 'integer' }, + { column = 'minzoom', type = 'integer' }, + { column = 'layer', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local stations = osm2pgsql.define_table({ + name = 'stations', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'geometry', not_null = true }, + { column = 'feature', type = 'text' }, + { column = 'state', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'station', type = 'text' }, + { column = 'railway_ref', type = 'text' }, + { column = 'uic_ref', type = 'text' }, + { column = 'name_tags', type = 'hstore' }, + { column = 'operator', sql_type = 'text[]' }, + { column = 'network', sql_type = 'text[]' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'yard_purpose', sql_type = 'text[]' }, + { column = 'yard_hump', type = 'boolean' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, + indexes = { + -- For joining grouped_stations_with_importance with metadata from this table + { column = 'id', method = 'btree', unique = true }, + { column = 'way', method = 'gist' }, + { column = 'uic_ref', method = 'btree', where = 'uic_ref IS NOT NULL' }, + { column = 'railway_ref', method = 'btree', where = 'railway_ref IS NOT NULL' }, + }, +}) + +local stop_positions = osm2pgsql.define_table({ + name = 'stop_positions', + ids = { type = 'node', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'name', type = 'text' }, + { column = 'type', type = 'text' }, + }, +}) + +local platforms = osm2pgsql.define_table({ + name = 'platforms', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'geometry', not_null = true }, + { column = 'name', type = 'text' }, + { column = 'ref', sql_type = 'text[]' }, + { column = 'height', type = 'real' }, + { column = 'surface', type = 'text' }, + { column = 'elevator', type = 'boolean' }, + { column = 'shelter', type = 'boolean' }, + { column = 'lit', type = 'boolean' }, + { column = 'bin', type = 'boolean' }, + { column = 'bench', type = 'boolean' }, + { column = 'wheelchair', type = 'boolean' }, + { column = 'departures_board', type = 'boolean' }, + { column = 'tactile_paving', type = 'boolean' }, + }, +}) + +local platform_edge = osm2pgsql.define_table({ + name = 'platform_edge', + ids = { type = 'way', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'linestring', not_null = true }, + { column = 'ref', sql_type = 'text' }, + { column = 'height', type = 'real' }, + { column = 'tactile_paving', type = 'boolean' }, + }, +}) + +local station_entrances = osm2pgsql.define_table({ + name = 'station_entrances', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'name', type = 'text' }, + { column = 'type', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local signal_columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'railway', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'signal_direction', type = 'text' }, + { column = 'caption', type = 'text' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, +} +local osm2psql_types = { + boolean = 'boolean', + array = 'text', +} +local sql_types = { + boolean = 'boolean', + array = 'text[]', +} +for _, tag in ipairs(tag_functions.signal_tags) do + local definition = { + column = tag.tag, + type = (tag.type and osm2psql_types[tag.type] or 'text'), + sql_type = (tag.type and sql_types[tag.type] or 'text'), + } + table.insert(signal_columns, definition) +end +local signals = osm2pgsql.define_table({ + name = 'signals', + ids = { type = 'node', id_column = 'osm_id' }, + columns = signal_columns, +}) + +local boxes = osm2pgsql.define_table({ + name = 'boxes', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'geometry', not_null = true }, + { column = 'center', type = 'geometry', not_null = true }, + { column = 'way_area', type = 'real' }, + { column = 'feature', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'operator', type = 'text' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local turntables = osm2pgsql.define_table({ + name = 'turntables', + ids = { type = 'way', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'polygon', not_null = true }, + { column = 'feature', type = 'text' }, + }, +}) + +local railway_positions = osm2pgsql.define_table({ + name = 'railway_positions', + ids = { type = 'node', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'railway', type = 'text' }, + { column = 'position_numeric', type = 'real' }, + { column = 'position_text', type = 'text', not_null = true }, + { column = 'position_exact', type = 'text' }, + { column = 'type', type = 'text', not_null = true }, + { column = 'zero', type = 'boolean' }, + { column = 'line', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'operator', type = 'text' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, + indexes = { + { column = 'way', method = 'gist' }, + { column = 'position_numeric', method = 'btree', where = 'position_numeric IS NOT NULL' }, + }, +}) + +local catenary = osm2pgsql.define_table({ + name = 'catenary', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'geometry', not_null = true }, + { column = 'feature', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'transition', type = 'boolean' }, + { column = 'structure', type = 'text' }, + { column = 'supporting', type = 'text' }, + { column = 'attachment', type = 'text' }, + { column = 'tensioning', type = 'text' }, + { column = 'insulator', type = 'text' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local railway_switches = osm2pgsql.define_table({ + name = 'railway_switches', + ids = { type = 'node', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'point', not_null = true }, + { column = 'railway', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'type', type = 'text' }, + { column = 'turnout_side', type = 'text' }, + { column = 'local_operated', type = 'boolean' }, + { column = 'resetting', type = 'boolean' }, + { column = 'position', sql_type = 'text[]' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local routes = osm2pgsql.define_table({ + name = 'routes', + ids = { type = 'relation', id_column = 'osm_id' }, + columns = { + { column = 'type', sql_type = 'route_type', not_null = true }, + { column = 'from', type = 'text' }, + { column = 'to', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'operator', type = 'text' }, + { column = 'brand', type = 'text' }, + { column = 'color', type = 'text' }, + { column = 'platform_ref_ids', sql_type = 'int8[]' }, + { column = 'stop_ref_ids', sql_type = 'int8[]' }, + }, + indexes = { + { column = 'platform_ref_ids', method = 'gin' }, + { column = 'stop_ref_ids', method = 'gin' }, + }, +}) + +local route_line = osm2pgsql.define_table({ + name = 'route_line', + ids = { type = 'relation', id_column = 'route_id' }, + columns = { + { column = 'line_id', sql_type = 'int8', not_null = true }, + }, + indexes = { + { column = 'route_id', method = 'btree' }, + { column = 'line_id', method = 'btree' }, + }, +}) + +local stop_areas = osm2pgsql.define_table({ + name = 'stop_areas', + ids = { type = 'relation', id_column = 'osm_id' }, + columns = { + { column = 'platform_ref_ids', sql_type = 'int8[]' }, + { column = 'stop_ref_ids', sql_type = 'int8[]' }, + { column = 'node_ref_ids', sql_type = 'int8[]' }, + { column = 'way_ref_ids', sql_type = 'int8[]' }, + }, + indexes = { + { column = 'platform_ref_ids', method = 'gin' }, + { column = 'stop_ref_ids', method = 'gin' }, + { column = 'node_ref_ids', method = 'gin' }, + { column = 'way_ref_ids', method = 'gin' }, + }, +}) + +local stop_area_groups = osm2pgsql.define_table({ + name = 'stop_area_groups', + ids = { type = 'relation', id_column = 'osm_id' }, + columns = { + { column = 'stop_area_ref_ids', sql_type = 'int8[]' }, + }, + indexes = { + { column = 'stop_area_ref_ids', method = 'gin' }, + }, +}) + +local landuse = osm2pgsql.define_table({ + name = 'landuse', + ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'geometry', not_null = true }, + }, +}) + +local substation = osm2pgsql.define_table({ + name = 'substation', + ids = { type = 'way', id_column = 'osm_id' }, + columns = { + { column = 'id', sql_type = 'serial', create_only = true }, + { column = 'way', type = 'polygon', not_null = true }, + { column = 'feature', type = 'text' }, + { column = 'ref', type = 'text' }, + { column = 'name', type = 'text' }, + { column = 'location', type = 'text' }, + { column = 'operator', type = 'text' }, + { column = 'voltage', sql_type = 'text[]' }, + { column = 'wikidata', type = 'text' }, + { column = 'wikimedia_commons', type = 'text' }, + { column = 'wikimedia_commons_file', type = 'text' }, + { column = 'image', type = 'text' }, + { column = 'mapillary', type = 'text' }, + { column = 'wikipedia', type = 'text' }, + { column = 'note', type = 'text' }, + { column = 'description', type = 'text' }, + }, +}) + +local railway_line_states = {} +-- ordered from lower to higher importance +local states = {'razed', 'abandoned', 'disused', 'proposed', 'construction', 'preserved'} +for index, state in ipairs(states) do + railway_line_states[state] = { + state = state, + railway = state .. ':railway', + usage = state .. ':usage', + service = state .. ':service', + name = state .. ':name', + gauge = state .. ':gauge', + rank = index + 1, + } +end + +function railway_line_state(tags) + local preserved = tags['railway:preserved'] == 'yes' or tags['railway'] == 'preserved' + local railway = tags['railway'] == 'preserved' and 'rail' or tags['railway'] + local usage = tags['usage'] + local service = tags['service'] + local name = tags['name'] + local gauge = tags['gauge'] + local highspeed = tags['highspeed'] == 'yes' + + -- map known railway state values to their state values + local mapped_railway = railway_line_states[railway] + if mapped_railway then + return mapped_railway.state, + tags[mapped_railway.railway] or (tags['railway:preserved'] == 'yes' and tags['railway']) or tags[railway] or 'rail', + tags[mapped_railway.usage] or usage, + tags[mapped_railway.service] or service, + tags[mapped_railway.name] or name, + tags[mapped_railway.gauge] or gauge, + highspeed, + mapped_railway.rank + else + + if usage == 'main' and (not service) and highspeed then rank = 200 + elseif usage == 'main' and (not service) then rank = 110 + elseif usage == 'branch' and (not service) then rank = 100 + elseif (usage == 'main' or usage == 'branch') and service == 'spur' then rank = 98 + elseif (usage == 'main' or usage == 'branch') and service == 'siding' then rank = 97 + elseif (usage == 'main' or usage == 'branch') and service == 'yard' then rank = 96 + elseif (usage == 'main' or usage == 'branch') and service == 'crossover' then rank = 95 + elseif (not usage) and service == 'spur' then rank = 88 + elseif (not usage) and service == 'siding' then rank = 87 + elseif (not usage) and service == 'yard' then rank = 86 + elseif (not usage) and service == 'crossover' then rank = 85 + elseif usage == 'industrial' and (not service) then rank = 75 + elseif usage == 'industrial' and (service == 'siding' or service == 'spur' or service == 'yard' or service == 'crossover') then rank = 74 + elseif (usage == 'tourism' or usage == 'military' or usage == 'test') and (not service) then rank = 55 + elseif (usage == 'tourism' or usage == 'military' or usage == 'test') and (service == 'siding' or service == 'spur' or service == 'yard' or service == 'crossover') then rank = 54 + elseif (not service) then rank = 40 + elseif service == 'spur' then rank = 38 + elseif service == 'siding' then rank = 37 + elseif service == 'yard' then rank = 36 + elseif service == 'crossover' then rank = 35 + else rank = 10 + end + + return 'present', railway, usage, service, name, gauge, highspeed, rank + end +end + +function railway_line_name(name, tunnel, tunnel_name, bridge, bridge_name) + if tunnel then + return tunnel_name or name + elseif bridge then + return bridge_name or name + else + return name + end +end + +local electrification_values = osm2pgsql.make_check_values_func({'contact_line', 'yes', 'rail', 'ground-level_power_supply', '4th_rail', 'contact_line;rail', 'rail;contact_line'}) +function electrification_state(tags) + local electrified = tags['electrified'] + + if electrification_values(electrified) then + return 'present', tonumber(tags['voltage']), tonumber(tags['frequency']), tonumber(tags['railway:maximum_current']), nil, nil, nil + end + if electrification_values(tags['construction:electrified']) then + return 'construction', nil, nil, nil, tonumber(tags['construction:voltage']), tonumber(tags['construction:frequency']), tonumber(tags['construction:railway:maximum_current']) + end + if electrification_values(tags['proposed:electrified']) then + return 'proposed', nil, nil, nil, tonumber(tags['proposed:voltage']), tonumber(tags['proposed:frequency']), tonumber(tags['proposed:railway:maximum_current']) + end + + if electrified == 'no' then + if electrification_values(tags['deelectrified']) then + return 'deelectrified', nil, nil, nil, nil, nil, nil + end + if electrification_values(tags['abandoned:electrified']) then + return 'abandoned', nil, nil, nil, nil, nil, nil + end + + return 'no', nil, nil, nil, nil, nil, nil + end + + return nil, nil, nil, nil, nil +end + +function to_sql_array(items) + -- Put the items in a table into a raw SQL array string (quoted and comma-delimited) + if not items then + return nil + end + + local result = '{' + + for index, item in ipairs(items) do + if index > 1 then + result = result .. ',' + end + + -- Raw SQL array syntax + result = result .. "\"" .. item:gsub("\\", "\\\\"):gsub("\"", "\\\"") .. "\"" + end + + return result .. '}' +end + +-- Split a value and turn it into a raw SQL array (quoted and comma-delimited) +function split_semicolon_to_sql_array(value) + if not value then + return nil + end + + local items = {} + + if value then + for part in string.gmatch(value, '[^;]+') do + local stripped_part = strip_prefix(part, ' ') + if stripped_part then + table.insert(items, stripped_part) + end + end + end + + return to_sql_array(items) +end + +local railway_state_tags = { + present = 'railway', + construction = 'construction:railway', + proposed = 'proposed:railway', + disused = 'disused:railway', + abandoned = 'abandoned:railway', + preserved = 'preserved:railway', + razed = 'razed:railway', +} +function railway_feature_and_state(tags, railway_value_func) + for state, railway_tag in pairs(railway_state_tags) do + local feature = railway_value_func(tags[railway_tag]) + if feature then + return feature, state + end + end + + return nil, nil +end + +local vehicles = {'train', 'subway', 'light_rail', 'tram', 'monorail', 'funicular', 'miniature'} +function station_type(tags) + -- Determine the type of station + local feature_stations = {} + local has_entries = false + + if tags.station then + for station in string.gmatch(tags.station, '[^;]+') do + feature_stations[station] = true + has_entries = true + end + else + for _, vehicle in ipairs(vehicles) do + if tags[vehicle] == 'yes' then + feature_stations[vehicle] = true + has_entries = true + end + end + end + + if not has_entries then + if tags.railway == 'tram_stop' then + feature_stations['tram'] = true + else + feature_stations['train'] = true + end + end + + return feature_stations +end + +local known_name_tags = {'name', 'alt_name', 'short_name', 'long_name', 'official_name', 'old_name', 'uic_name'} +function name_tags(tags) + -- Gather name tags for searching + local found_name_tags = {} + + for key, value in pairs(tags) do + for _, name_tag in ipairs(known_name_tags) do + if key == name_tag or (key:find('^' .. name_tag .. ':') ~= nil) then + found_name_tags[key] = value + break + end + end + end + + return found_name_tags +end + +function position_is_zero(position) + if position:find('^%-?%d+$') or position:find('^%-?%d*[,/.]0*$') then + return true + else + return false + end +end + +function parse_railway_position(position, line) + if not position then + return nil + end + + if position:find('^mi:') then + local stripped_position = position:gsub('^mi: ?', '') + local position_with_dot = stripped_position:gsub(',', '.') + + return { + text = stripped_position, + numeric = tonumber(position_with_dot), + type = 'mi', + zero = position_is_zero(stripped_position), + exact = nil, + line = line, + } + elseif position:find('^pkm:') then + local stripped_position = position:gsub('^pkm: ?', '') + local position_with_dot = stripped_position:gsub(',', '.') + + return { + text = stripped_position, + numeric = tonumber(position_with_dot), + type = 'pkm', + zero = position_is_zero(stripped_position), + exact = nil, + line = line, + } + else + local position_with_dot = position:gsub(',', '.') + + return { + text = position, + numeric = tonumber(position_with_dot), + type = 'km', + zero = position_is_zero(position), + exact = nil, + line = line, + } + end +end + +function find_position_tags(tags) + local position, position_exact = tags['railway:position'], tags['railway:position:exact'] + + local exact_line_position_prefix = 'railway:position:exact:' + local line_positions = {} + for tag, value in pairs(tags) do + if osm2pgsql.has_prefix(tag, exact_line_position_prefix) then + line_positions[tag:sub(exact_line_position_prefix:len() + 1)] = value + end + end + + return position, position_exact, line_positions +end + +function parse_railway_positions(position, position_exact, line_positions) + -- Collect positions, from both normal and exact positions, eliminating duplicates + -- Parsing is ordered from least specific to most specific + + local parsed_positions = {} + local found_positions = false + + if position then + for part in string.gmatch(position, '[^;]+') do + local stripped_part = part:gsub('^ ', '') + local parsed_position = parse_railway_position(stripped_part, nil) + + if parsed_position then + table.insert(parsed_positions, parsed_position) + found_positions = true + end + end + end + + if position_exact then + for part in string.gmatch(position_exact, '[^;]+') do + local stripped_part = part:gsub('^ ', '') + local parsed_position = parse_railway_position(stripped_part, nil) + + if parsed_position then + local found_existing_position = false + + if found_positions and parsed_position.numeric ~= nil then + for _, existing_position in ipairs(parsed_positions) do + -- Verify if the position is close to another position. Note that this matches slightly outside the first decimal's precision. + if existing_position.numeric ~= nil and math.abs(existing_position.numeric - parsed_position.numeric) < 0.1 then + existing_position.numeric = parsed_position.numeric + existing_position.exact = parsed_position.text + found_existing_position = true + end + end + end + + if not found_existing_position then + table.insert(parsed_positions, parsed_position) + found_positions = true + end + end + end + end + + for line, line_position in pairs(line_positions) do + local parsed_position = parse_railway_position(line_position, line) + + if parsed_position then + local found_existing_position = false + + if found_positions and parsed_position.numeric ~= nil then + for _, existing_position in ipairs(parsed_positions) do + -- Verify if the position is close to another position. Note that this matches slightly outside the first decimal's precision. + if existing_position.numeric ~= nil and math.abs(existing_position.numeric - parsed_position.numeric) < 0.1 then + existing_position.numeric = parsed_position.numeric + existing_position.exact = parsed_position.text + existing_position.line = parsed_position.line + found_existing_position = true + end + end + end + + if not found_existing_position then + table.insert(parsed_positions, parsed_position) + found_positions = true + end + end + end + + if found_positions then + return parsed_positions + else + return nil + end +end + +function format_railway_position(item) + return item.text .. (item.exact and (' @ ' .. item.exact) or '') .. ' (' .. item.type .. ')' .. (item.line and (' on ' .. item.line) or '') +end + +function is_railway_platform(tags) + -- Ignore non-railway platforms + return tags.railway == 'platform' + or ( + tags.public_transport == 'platform' + and ( + tags.train == 'yes' + or tags.tram == 'yes' + or tags.subway == 'yes' + or tags.light_rail == 'yes' + or not ( + tags.bus == 'yes' + or tags.trolleybus == 'yes' + or tags.share_taxi == 'yes' + or tags.ferry == 'yes' + ) + ) + ) +end + +function stop_position_type(tags) + -- Assumption: a stop position is valid for a single transport modality + if tags.train == 'yes' then + return 'train' + elseif tags.tram == 'yes' then + return 'tram' + elseif tags.light_rail == 'yes' then + return 'light_rail' + elseif tags.subway == 'yes' then + return 'subway' + elseif tags.funicular == 'yes' then + return 'funicular' + elseif tags.monorail == 'yes' then + return 'monorail' + elseif tags.miniature == 'yes' then + return 'miniature' + elseif tags.bus == 'yes' or tags.trolleybus == 'yes' or tags.share_taxi == 'yes' or tags.ferry == 'yes' then + return nil + else + -- Default to train + return 'train' + end +end + +local railway_station_values = osm2pgsql.make_check_values_func({'station', 'halt', 'tram_stop', 'service_station', 'yard', 'junction', 'spur_junction', 'crossover', 'site'}) +local railway_poi_values = osm2pgsql.make_check_values_func(tag_functions.poi_railway_values) +local railway_signal_values = osm2pgsql.make_check_values_func({'signal', 'buffer_stop', 'derail', 'vacancy_detection'}) +local railway_position_values = osm2pgsql.make_check_values_func({'milestone', 'level_crossing', 'crossing'}) +local railway_switch_values = osm2pgsql.make_check_values_func({'switch', 'railway_crossing'}) +local railway_box_values = osm2pgsql.make_check_values_func({'signal_box', 'crossing_box', 'blockpost'}) +local railway_entrances_values = osm2pgsql.make_check_values_func({'subway_entrance', 'train_station_entrance'}) +local entrance_types = { + subway_entrance = 'subway', + train_station_entrance = 'train', +} +local reversed_signal_position = { + right = 'left', + left = 'right', +} +function osm2pgsql.process_node(object) + local tags = object.tags + local wikimedia_commons, wikimedia_commons_file, image = wikimedia_commons_or_image(tags.wikimedia_commons, tags.image) + local position, position_exact, line_positions = find_position_tags(tags) + + if railway_box_values(tags.railway) then + local point = object:as_point() + boxes:insert({ + way = point, + center = point, + way_area = 0, + feature = tags.railway, + ref = tags['railway:ref'], + name = tags.name, + operator = tags.operator, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + local station_feature, station_state = railway_feature_and_state(tags, railway_station_values) + if station_feature then + for station, _ in pairs(station_type(tags)) do + stations:insert({ + way = object:as_point(), + feature = station_feature, + state = station_state, + name = tags.name or tags.short_name, + ref = tags.ref, + station = station, + railway_ref = tags['railway:ref'] or tags['ref:crs'], + uic_ref = tags['uic_ref'], + name_tags = name_tags(tags), + operator = split_semicolon_to_sql_array(tags.operator), + network = split_semicolon_to_sql_array(tags.network), + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + yard_purpose = split_semicolon_to_sql_array(tags['railway:yard:purpose']), + yard_hump = tags['railway:yard:hump'] == 'yes' or nil, + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + end + + if railway_poi_values(tags.railway) or tags['tourism'] == 'museum' then + local feature, rank, minzoom, layer = tag_functions.poi(tags) + + pois:insert({ + way = object:as_point(), + feature = feature, + rank = rank, + minzoom = minzoom, + layer = layer, + name = tags.name, + ref = tags.ref, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + if tags.public_transport == 'stop_position' and tags.name then + local type = stop_position_type(tags) + if type then + stop_positions:insert({ + way = object:as_point(), + name = tags.name, + type = type, + }) + end + end + + if is_railway_platform(tags) then + platforms:insert({ + way = object:as_point(), + name = tags.name, + ref = split_semicolon_to_sql_array(tags.ref), + height = tags.height, + surface = tags.surface, + elevator = tags.elevator == 'yes', + shelter = tags.shelter == 'yes', + lit = tags.lit == 'yes', + bin = tags.bin == 'yes', + bench = tags.bench == 'yes', + wheelchair = tags.wheelchair == 'yes', + departures_board = tags.departures_board == 'yes', + tactile_paving = tags.tactile_paving == 'yes', + }) + end + + if railway_entrances_values(tags.railway) then + station_entrances:insert({ + way = object:as_point(), + type = entrance_types[tags.railway], + ref = tags.ref, + name = tags.name, + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + if railway_signal_values(tags.railway) then + local signal = { + way = object:as_point(), + railway = tags.railway, + ref = tags.ref, + signal_direction = tags['railway:signal:direction'], + caption = signal_caption(tags), + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + } + + for _, tag in ipairs(tag_functions.signal_tags) do + if tag.type == 'boolean' then + signal[tag.tag] = tags[tag.tag] == 'yes' + elseif tag.type == 'array' then + signal[tag.tag] = split_semicolon_to_sql_array(tags[tag.tag]) + else + signal[tag.tag] = tags[tag.tag] + end + end + + -- Special handling for signal position: flip position if reversed signal direction + if signal.signal_direction == 'backward' and signal["railway:signal:position"] then + signal["railway:signal:position"] = reversed_signal_position[signal["railway:signal:position"]] or signal["railway:signal:position"] + end + + signals:insert(signal) + end + + if railway_position_values(tags.railway) and (position or position_exact) then + for _, position in ipairs(parse_railway_positions(position, position_exact, line_positions)) do + railway_positions:insert({ + way = object:as_point(), + railway = tags.railway, + position_numeric = position.numeric, + position_text = position.text, + position_exact = position.exact, + type = position.type, + zero = position.zero, + line = position.line, + name = tags['name'], + ref = tags['ref'], + operator = tags['operator'], + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + end + + if railway_switch_values(tags.railway) then + railway_switches:insert({ + way = object:as_point(), + railway = tags.railway, + ref = tags.ref, + type = tags['railway:switch'], + turnout_side = tags['railway:turnout_side'], + local_operated = tags['railway:local_operated'] == 'yes', + resetting = tags['railway:switch:resetting'] == 'yes', + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + if tags.power == 'catenary_mast' then + catenary:insert({ + way = object:as_point(), + ref = tags.ref, + feature = 'mast', + transition = tags['location:transition'] == 'yes', + structure = tags.structure, + supporting = tags['catenary_mast:supporting'], + attachment = tags['catenary_mast:attachment'], + tensioning = tags.tensioning, + insulator = tags.insulator, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + note = tags.note, + description = tags.description, + }) + end +end + +local max_segment_length = 10000 +local railway_values = osm2pgsql.make_check_values_func({'rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'abandoned', 'razed', 'construction', 'proposed', 'preserved', 'monorail', 'miniature', 'funicular', 'ferry'}) +local railway_turntable_values = osm2pgsql.make_check_values_func({'turntable', 'traverser'}) +function osm2pgsql.process_way(object) + local tags = object.tags + local wikimedia_commons, wikimedia_commons_file, image = wikimedia_commons_or_image(tags.wikimedia_commons, tags.image) + + if railway_values(tags.railway) then + local state, feature, usage, service, state_name, gauge, highspeed, rank = railway_line_state(tags) + local railway_train_protection, railway_train_protection_rank = tag_functions.train_protection(tags, '') + local train_protection_construction, train_protection_construction_rank = tag_functions.train_protection(tags, 'construction:') + + local current_electrification_state, voltage, frequency, maximum_current, future_voltage, future_frequency, future_maximum_current = electrification_state(tags) + + local tunnel = tags['tunnel'] and tags['tunnel'] ~= 'no' or false + local bridge = tags['bridge'] and tags['bridge'] ~= 'no' or false + local name = railway_line_name(state_name, tunnel, tags['tunnel:name'], bridge, tags['bridge:name']) + + local oneway_map = { + ['yes'] = 'forward', + ['-1'] = 'backward', + ['no'] = 'both', + ['alternating'] = 'both', + ['reversible'] = 'both', + } + local preferred_direction = tags['railway:preferred_direction'] or oneway_map[tags['oneway']] + local dominant_speed, speed_label = dominant_speed_label(state, preferred_direction, tags['maxspeed'], tags['maxspeed:forward'], tags['maxspeed:backward']) + + -- Segmentize linestring to optimize tile queries + for way in object:as_linestring():transform(3857):segmentize(max_segment_length):geometries() do + railway_line:insert({ + way = way, + way_length = way:length(), + feature = feature, + state = state, + service = service, + usage = usage, + rank = rank, + highspeed = highspeed, + layer = tags['layer'], + ref = tags['ref'], + track_ref = tags['railway:track_ref'], + name = name, + public_transport = tags['public_transport'], + construction = tags['construction'], + tunnel = tunnel, + bridge = bridge, + preferred_direction = preferred_direction, + maxspeed = dominant_speed, + speed_label = speed_label, + electrification_state = current_electrification_state, + frequency = frequency, + voltage = voltage, + maximum_current = maximum_current, + future_frequency = future_frequency, + future_voltage = future_voltage, + future_maximum_current = future_maximum_current, + gauges = split_semicolon_to_sql_array(gauge), + loading_gauge = tags['loading_gauge'], + track_class = tags['railway:track_class'], + reporting_marks = split_semicolon_to_sql_array(tags['reporting_marks']), + train_protection = railway_train_protection, + train_protection_rank = railway_train_protection_rank, + train_protection_construction = train_protection_construction, + train_protection_construction_rank = train_protection_construction_rank, + operator = split_semicolon_to_sql_array(tags['operator']), + owner = tags.owner, + traffic_mode = tags['railway:traffic_mode'], + radio = tags['railway:radio'], + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + end + + local station_feature, station_state = railway_feature_and_state(tags, railway_station_values) + if station_feature then + for station, _ in pairs(station_type(tags)) do + stations:insert({ + way = object.is_closed and object:as_polygon() or object:as_linestring(), + feature = station_feature, + state = station_state, + name = tags.name or tags.short_name, + ref = tags.ref, + station = station, + railway_ref = tags['railway:ref'] or tags['ref:crs'], + uic_ref = tags['uic_ref'], + name_tags = name_tags(tags), + operator = split_semicolon_to_sql_array(tags.operator), + network = split_semicolon_to_sql_array(tags.network), + yard_purpose = split_semicolon_to_sql_array(tags['railway:yard:purpose']), + yard_hump = tags['railway:yard:hump'] == 'yes' or nil, + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + end + + if is_railway_platform(tags) then + platforms:insert({ + way = object.is_closed and object:as_polygon() or object:as_linestring(), + name = tags.name, + ref = split_semicolon_to_sql_array(tags.ref), + height = tags.height, + surface = tags.surface, + elevator = tags.elevator == 'yes', + shelter = tags.shelter == 'yes', + lit = tags.lit == 'yes', + bin = tags.bin == 'yes', + bench = tags.bench == 'yes', + wheelchair = tags.wheelchair == 'yes', + departures_board = tags.departures_board == 'yes', + tactile_paving = tags.tactile_paving == 'yes', + }) + end + + if railway_turntable_values(tags.railway) then + turntables:insert({ + way = object:as_polygon(), + feature = tags.railway, + }) + end + + if railway_box_values(tags.railway) then + local polygon = object:as_polygon():transform(3857) + local position, position_exact, line_positions = find_position_tags(tags) + + boxes:insert({ + way = polygon, + center = polygon:centroid(), + way_area = polygon:area(), + feature = tags.railway, + ref = tags['railway:ref'], + name = tags.name, + operator = tags.operator, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + if railway_poi_values(tags.railway) or tags['tourism'] == 'museum' then + local feature, rank, minzoom, layer = tag_functions.poi(tags) + local position, position_exact, line_positions = find_position_tags(tags) + + pois:insert({ + way = object:as_polygon():centroid(), + feature = feature, + rank = rank, + minzoom = minzoom, + layer = layer, + name = tags.name, + ref = tags.ref, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end + + if tags.power == 'catenary_portal' then + local position, position_exact, line_positions = find_position_tags(tags) + + catenary:insert({ + way = object:as_linestring(), + ref = tags.ref, + feature = 'portal', + transition = tags['location:transition'] == 'yes', + structure = tags.structure, + supporting = nil, + attachment = nil, + tensioning = tags.tensioning, + insulator = tags.insulator, + position = to_sql_array(map(parse_railway_positions(position, position_exact, line_positions), format_railway_position)), + note = tags.note, + description = tags.description, + }) + end + + if tags.railway == 'platform_edge' then + platform_edge:insert({ + way = object:as_linestring(), + ref = tags.ref, + height = tags.height, + tactile_paving = tags.tactile_paving == 'yes', + }) + end + + if tags.landuse == 'railway' then + landuse:insert({ + way = object:as_polygon(), + }) + end + + if tags.power == 'substation' and tags.substation == 'traction' then + substation:insert({ + way = object:as_polygon(), + feature = 'traction', + name = tags.name, + ref = tags.ref, + location = tags.location, + operator = tags.operator, + voltage = split_semicolon_to_sql_array(tags.voltage), + wikidata = tags.wikidata, + wikimedia_commons = wikimedia_commons, + wikimedia_commons_file = wikimedia_commons_file, + image = image, + mapillary = tags.mapillary, + wikipedia = tags.wikipedia, + note = tags.note, + description = tags.description, + }) + end +end + +local route_values = osm2pgsql.make_check_values_func({'train', 'subway', 'tram', 'light_rail'}) +local route_stop_relation_roles = osm2pgsql.make_check_values_func({'stop', 'station', 'stop_exit_only', 'stop_entry_only', 'forward_stop', 'backward_stop', 'forward:stop', 'backward:stop', 'stop_position', 'halt'}) +local route_platform_relation_roles = osm2pgsql.make_check_values_func({'platform', 'platform_exit_only', 'platform_entry_only', 'forward:platform', 'backward:platform'}) +function osm2pgsql.process_relation(object) + local tags = object.tags + + if is_railway_platform(tags) then + platforms:insert({ + way = object:as_multipolygon(), + name = tags.name, + ref = split_semicolon_to_sql_array(tags.ref), + height = tags.height, + surface = tags.surface, + elevator = tags.elevator == 'yes', + shelter = tags.shelter == 'yes', + lit = tags.lit == 'yes', + bin = tags.bin == 'yes', + bench = tags.bench == 'yes', + wheelchair = tags.wheelchair == 'yes', + departures_board = tags.departures_board == 'yes', + tactile_paving = tags.tactile_paving == 'yes', + }) + end + + if tags.type == 'route' and route_values(tags.route) then + local has_members = false + local stop_members = {} + local platform_members = {} + for _, member in ipairs(object.members) do + if route_stop_relation_roles(member.role) then + table.insert(stop_members, member.ref) + has_members = true + elseif route_platform_relation_roles(member.role) then + table.insert(platform_members, member.ref) + has_members = true + elseif (member.role == nil or member.role == '') and member.type == 'w' then + route_line:insert({ + line_id = member.ref, + }) + has_members = true + end + end + + if has_members then + routes:insert({ + type = tags.route, + from = tags.from, + to = tags.to, + name = tags.name, + ref = tags.ref, + operator = tags.operator, + brand = tags.brand, + color = tags.colour, + stop_ref_ids = '{' .. table.concat(stop_members, ',') .. '}', + platform_ref_ids = '{' .. table.concat(platform_members, ',') .. '}', + }) + end + end + + if tags.type == 'public_transport' and tags.public_transport == 'stop_area' then + local has_members = false + local stop_members = {} + local platform_members = {} + local node_members = {} + local way_members = {} + for _, member in ipairs(object.members) do + if member.role == 'stop' and member.type == 'n' then + table.insert(stop_members, member.ref) + has_members = true + elseif member.role == 'platform' then + table.insert(platform_members, member.ref) + has_members = true + elseif member.type == 'n' then + -- Station has no role defined + table.insert(node_members, member.ref) + has_members = true + elseif member.type == 'w' then + -- Station has no role defined + table.insert(way_members, member.ref) + has_members = true + end + end + + if has_members then + stop_areas:insert({ + stop_ref_ids = '{' .. table.concat(stop_members, ',') .. '}', + platform_ref_ids = '{' .. table.concat(platform_members, ',') .. '}', + node_ref_ids = '{' .. table.concat(node_members, ',') .. '}', + way_ref_ids = '{' .. table.concat(way_members, ',') .. '}', + }) + end + end + + if tags.type == 'public_transport' and tags.public_transport == 'stop_area_group' then + local has_members = false + local stop_area_members = {} + for _, member in ipairs(object.members) do + if member.type == 'r' then + table.insert(stop_area_members, member.ref) + has_members = true + end + end + + if has_members then + stop_area_groups:insert({ + stop_area_ref_ids = '{' .. table.concat(stop_area_members, ',') .. '}', + }) + end + end + + if tags.landuse == 'railway' then + landuse:insert({ + way = object:as_multipolygon(), + }) + end +end + +function osm2pgsql.process_gen() + -- Discrete isolation to assign a "local" importance to each station + osm2pgsql.run_gen('discrete-isolation', { + name = 'station_importance', + debug = true, + src_table = 'stations_with_importance', + dest_table = 'stations_with_importance', + geom_column = 'way', + id_column = 'id', + importance_column = 'importance', + }) +end diff --git a/import/osmium-tags-filter b/import/osmium-tags-filter new file mode 100644 index 000000000..740a420e3 --- /dev/null +++ b/import/osmium-tags-filter @@ -0,0 +1,19 @@ +nwr/railway +nwr/disused:railway +nwr/abandoned:railway +nwr/razed:railway +nwr/construction:railway +nwr/proposed:railway +n/public_transport=stop_position +nwr/public_transport=platform +n/power=catenary_mast +nw/museum=railway +w/power=catenary_portal +wr/landuse=railway +w/substation=traction +r/public_transport=stop_area +r/public_transport=stop_area_group +r/route=train +r/route=tram +r/route=light_rail +r/route=subway diff --git a/import/sql/api_facility_functions.sql b/import/sql/api_facility_functions.sql new file mode 100644 index 000000000..db40aee65 --- /dev/null +++ b/import/sql/api_facility_functions.sql @@ -0,0 +1,264 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later + +CREATE OR REPLACE FUNCTION openrailwaymap_hyphen_to_space(str TEXT) RETURNS TEXT AS $$ +BEGIN + RETURN regexp_replace(str, '(\w)-(\w)', '\1 \2', 'g'); +END; +$$ LANGUAGE plpgsql + IMMUTABLE + LEAKPROOF + PARALLEL SAFE; + +CREATE OR REPLACE FUNCTION openrailwaymap_name_rank(tsquery_str tsquery, tsvec_col tsvector, importance NUMERIC, feature TEXT, station TEXT) RETURNS NUMERIC AS $$ +DECLARE + factor FLOAT; +BEGIN + IF feature = 'tram_stop' OR station IN ('light_rail', 'monorail', 'subway') THEN + factor := 0.5; + ELSIF feature = 'halt' THEN + factor := 0.8; + END IF; + IF tsvec_col @@ tsquery_str THEN + factor := 2.0; + END IF; + RETURN (factor * COALESCE(importance, 0))::NUMERIC; +END; +$$ LANGUAGE plpgsql + IMMUTABLE + LEAKPROOF + PARALLEL SAFE; + +CREATE OR REPLACE FUNCTION query_facilities_by_name( + input_name text, + input_language text, + input_limit integer +) RETURNS TABLE( + "osm_ids" bigint[], + "osm_types" char[], + "name" text, + "localized_name" text, + "feature" text, + "state" text, + "railway_ref" text, + "station" text, + "uic_ref" text, + "operator" text[], + "network" text[], + "wikidata" text[], + "wikimedia_commons" text[], + "wikimedia_commons_file" text[], + "image" text[], + "mapillary" text[], + "wikipedia" text[], + "note" text[], + "description" text[], + "latitude" double precision, + "longitude" double precision, + "rank" numeric +) AS $$ + BEGIN + -- We do not sort the result, although we use DISTINCT ON because osm_ids is sufficient to sort out duplicates. + RETURN QUERY + SELECT + b.osm_ids, + b.osm_types, + b.name, + b.localized_name, + b.feature, + b.state, + b.railway_ref, + b.station, + b.uic_ref, + b.operator, + b.network, + b.wikidata, + b.wikimedia_commons, + b.wikimedia_commons_file, + b.image, + b.mapillary, + b.wikipedia, + b.note, + b.description, + b.latitude, + b.longitude, + b.rank + FROM ( + SELECT DISTINCT ON (a.osm_ids) + a.osm_ids, + a.osm_types, + a.name, + a.localized_name, + a.feature, + a.state, + a.railway_ref, + a.station, + a.uic_ref, + a.operator, + a.network, + a.wikidata, + a.wikimedia_commons, + a.wikimedia_commons_file, + a.image, + a.mapillary, + a.wikipedia, + a.note, + a.description, + a.latitude, + a.longitude, + a.rank + FROM ( + SELECT + fs.osm_ids, + fs.osm_types, + fs.name, + COALESCE(fs.name_tags['name:' || input_language], fs.name) as localized_name, + fs.feature, + fs.state, + fs.railway_ref, + fs.station, + fs.uic_ref, + fs.operator, + fs.network, + fs.wikidata, + fs.wikimedia_commons, + fs.wikimedia_commons_file, + fs.image, + fs.mapillary, + fs.wikipedia, + fs.note, + fs.description, + ST_X(ST_Transform(fs.geom, 4326)) AS latitude, + ST_Y(ST_Transform(fs.geom, 4326)) AS longitude, + openrailwaymap_name_rank(phraseto_tsquery('simple', unaccent(openrailwaymap_hyphen_to_space(input_name))), fs.terms, fs.importance::numeric, fs.feature, fs.station) AS rank + FROM openrailwaymap_facilities_for_search fs + WHERE fs.terms @@ phraseto_tsquery('simple', unaccent(openrailwaymap_hyphen_to_space(input_name))) + ) AS a + ) AS b + ORDER BY b.rank DESC NULLS LAST + LIMIT input_limit; + END +$$ LANGUAGE plpgsql + LEAKPROOF + PARALLEL SAFE; + +CREATE OR REPLACE FUNCTION query_facilities_by_ref( + input_ref text, + input_language text, + input_limit integer +) RETURNS TABLE( + "osm_ids" bigint[], + "osm_types" char[], + "name" text, + "localized_name" text, + "feature" text, + "state" text, + "railway_ref" text, + "station" text, + "uic_ref" text, + "operator" text[], + "network" text[], + "wikidata" text[], + "wikimedia_commons" text[], + "wikimedia_commons_file" text[], + "image" text[], + "mapillary" text[], + "wikipedia" text[], + "note" text[], + "description" text[], + "latitude" double precision, + "longitude" double precision +) AS $$ + BEGIN + RETURN QUERY + -- We do not sort the result, although we use DISTINCT ON because osm_ids is sufficient to sort out duplicates. + SELECT + DISTINCT ON (s.osm_id) + ARRAY[s.osm_id] as osm_ids, + ARRAY[s.osm_type] as osm_types, + s.name, + COALESCE(name_tags['name:' || input_language], s.name) as localized_name, + s.feature, + s.state, + s.railway_ref, + s.station, + s.uic_ref, + s.operator AS operator, + s.network AS network, + ARRAY[s.wikidata] AS wikidata, + ARRAY[s.wikimedia_commons] AS wikimedia_commons, + ARRAY[s.wikimedia_commons_file] AS wikimedia_commons_file, + ARRAY[s.image] AS image, + ARRAY[s.mapillary] AS mapillary, + ARRAY[s.wikipedia] AS wikipedia, + ARRAY[s.note] AS note, + ARRAY[s.description] AS description, + ST_X(ST_Transform(s.way, 4326)) AS latitude, + ST_Y(ST_Transform(s.way, 4326)) AS longitude + FROM stations s + WHERE s.railway_ref = input_ref + LIMIT input_limit; + END +$$ LANGUAGE plpgsql + LEAKPROOF + PARALLEL SAFE; + +CREATE OR REPLACE FUNCTION query_facilities_by_uic_ref( + input_uic_ref text, + input_language text, + input_limit integer +) RETURNS TABLE( + "osm_ids" bigint[], + "osm_types" char[], + "name" text, + "localized_name" text, + "feature" text, + "state" text, + "railway_ref" text, + "station" text, + "uic_ref" text, + "operator" text[], + "network" text[], + "wikidata" text[], + "wikimedia_commons" text[], + "wikimedia_commons_file" text[], + "image" text[], + "mapillary" text[], + "wikipedia" text[], + "note" text[], + "description" text[], + "latitude" double precision, + "longitude" double precision +) AS $$ + BEGIN + RETURN QUERY + -- We do not sort the result, although we use DISTINCT ON because osm_ids is sufficient to sort out duplicates. + SELECT + DISTINCT ON (s.osm_id) + ARRAY[s.osm_id] as osm_ids, + ARRAY[s.osm_type] as osm_types, + s.name, + COALESCE(name_tags['name:' || input_language], s.name) as localized_name, + s.feature, + s.state, + s.railway_ref, + s.station, + s.uic_ref, + s.operator AS operator, + s.network AS network, + ARRAY[s.wikidata] AS wikidata, + ARRAY[s.wikimedia_commons] AS wikimedia_commons, + ARRAY[s.wikimedia_commons_file] AS wikimedia_commons_file, + ARRAY[s.image] AS image, + ARRAY[s.mapillary] AS mapillary, + ARRAY[s.wikipedia] AS wikipedia, + ARRAY[s.note] AS note, + ARRAY[s.description] AS description, + ST_X(ST_Transform(s.way, 4326)) AS latitude, + ST_Y(ST_Transform(s.way, 4326)) AS longitude + FROM stations s + WHERE s.uic_ref = input_uic_ref + LIMIT input_limit; + END +$$ LANGUAGE plpgsql + LEAKPROOF + PARALLEL SAFE; diff --git a/import/sql/api_facility_views.sql b/import/sql/api_facility_views.sql new file mode 100644 index 000000000..efe5cb1f8 --- /dev/null +++ b/import/sql/api_facility_views.sql @@ -0,0 +1,61 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later + +CREATE MATERIALIZED VIEW IF NOT EXISTS openrailwaymap_facilities_for_search AS + SELECT + id, + osm_ids, + osm_types, + to_tsvector('simple', unaccent(openrailwaymap_hyphen_to_space(value))) AS terms, + name, + name_tags, + key AS name_key, + value AS name_value, + feature, + state, + station, + railway_ref, + uic_ref, + importance, + operator, + network, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + geom + FROM ( + SELECT DISTINCT ON (osm_ids, key, value, name, feature, state, station, railway_ref, uic_ref, importance, geom) + id, + osm_ids, + osm_types, + (each(name_tags)).key AS key, + (each(name_tags)).value AS value, + name, + name_tags, + feature, + state, + station, + railway_ref, + uic_ref, + importance, + operator, + network, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + center as geom + FROM grouped_stations_with_importance + ) AS duplicated; + +CREATE INDEX IF NOT EXISTS openrailwaymap_facilities_name_index + ON openrailwaymap_facilities_for_search + USING gin(terms); diff --git a/import/sql/api_milestone_functions.sql b/import/sql/api_milestone_functions.sql new file mode 100644 index 000000000..1b6ffb7de --- /dev/null +++ b/import/sql/api_milestone_functions.sql @@ -0,0 +1,169 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later + +CREATE OR REPLACE FUNCTION query_milestones( + input_pos double precision, + input_ref text, + input_limit integer +) RETURNS TABLE( + "osm_id" bigint, + "railway" text, + "position" text, + "latitude" double precision, + "longitude" double precision, + "line_ref" text, + "milestone_ref" text, + "operator" text, + "wikidata" text, + "wikimedia_commons" text, + "wikimedia_commons_file" text, + "image" text, + "mapillary" text, + "wikipedia" text, + "note" text, + "description" text +) AS $$ + BEGIN + -- We do not sort the result, although we use DISTINCT ON because osm_id is sufficient to sort out duplicates + RETURN QUERY + SELECT + ranked.osm_id, + ranked.railway, + ranked.position, + ST_X(ranked.geom) AS latitude, + ST_Y(ranked.geom) As longitude, + ranked.line_ref, + ranked.milestone_ref, + ranked.operator, + ranked.wikidata, + ranked.wikimedia_commons, + ranked.wikimedia_commons_file, + ranked.image, + ranked.mapillary, + ranked.wikipedia, + ranked.note, + ranked.description + FROM ( + SELECT + top_of_array.osm_id, + top_of_array.railway, + top_of_array.position, + top_of_array.geom, + top_of_array.line_ref, + top_of_array.milestone_ref, + top_of_array.operator, + top_of_array.wikidata, + top_of_array.wikimedia_commons, + top_of_array.wikimedia_commons_file, + top_of_array.image, + top_of_array.mapillary, + top_of_array.wikipedia, + top_of_array.note, + top_of_array.description, + -- We use rank(), not row_number() to get the closest and all second closest in cases like this: + -- A B x C + -- where A is as far from the searched location x than C. + rank() OVER (PARTITION BY top_of_array.operator ORDER BY top_of_array.error) AS grouped_rank + FROM ( + SELECT + -- Sort out duplicates which origin from tracks being split at milestones + DISTINCT ON (unique_milestones.osm_id) + unique_milestones.osm_id[1] AS osm_id, + unique_milestones.railway[1] AS railway, + unique_milestones.position, + unique_milestones.geom[1] AS geom, + unique_milestones.line_ref, + unique_milestones.milestone_ref[1] AS milestone_ref, + unique_milestones.operator, + unique_milestones.wikidata[1] AS wikidata, + unique_milestones.wikimedia_commons[1] AS wikimedia_commons, + unique_milestones.wikimedia_commons_file[1] AS wikimedia_commons_file, + unique_milestones.image[1] AS image, + unique_milestones.mapillary[1] AS mapillary, + unique_milestones.wikipedia[1] AS wikipedia, + unique_milestones.note[1] AS note, + unique_milestones.description[1] AS description, + unique_milestones.error + FROM ( + SELECT + array_agg(milestones.osm_id) AS osm_id, + array_agg(milestones.railway) AS railway, + milestones.position_text AS position, + array_agg(milestones.geom) AS geom, + milestones.line_ref, + milestones.operator, + array_agg(milestones.milestone_ref) AS milestone_ref, + array_agg(milestones.wikidata) AS wikidata, + array_agg(milestones.wikimedia_commons) AS wikimedia_commons, + array_agg(milestones.wikimedia_commons_file) AS wikimedia_commons_file, + array_agg(milestones.image) AS image, + array_agg(milestones.mapillary) AS mapillary, + array_agg(milestones.wikipedia) AS wikipedia, + array_agg(milestones.note) AS note, + array_agg(milestones.description) AS description, + milestones.error + FROM ( + SELECT + m.osm_id, + m.railway, + m.position_text, + ST_Transform(m.way, 4326) AS geom, + t.ref AS line_ref, + m.ref AS milestone_ref, + m.wikidata, + m.wikimedia_commons, + m.wikimedia_commons_file, + m.image, + m.mapillary, + m.wikipedia, + m.note, + m.description, + m.operator, + ABS(input_pos - m.position_numeric) AS error + FROM railway_positions AS m + JOIN railway_line AS t + ON t.way && m.way + AND ST_Intersects(t.way, m.way) + AND t.ref = input_ref + AND feature in ('rail', 'narrow_gauge', 'subway', 'light_rail', 'tram') + AND (service IS NULL OR usage IN ('industrial', 'military', 'test')) + WHERE position_numeric IS NOT NULL + AND position_numeric BETWEEN (input_pos - 10.0)::FLOAT AND (input_pos + 10.0)::FLOAT + AND m.line IS NULL + + UNION ALL + + SELECT + m.osm_id, + m.railway, + m.position_text, + ST_Transform(m.way, 4326) AS geom, + m.line AS line_ref, + m.ref AS milestone_ref, + m.wikidata, + m.wikimedia_commons, + m.wikimedia_commons_file, + m.image, + m.mapillary, + m.wikipedia, + m.note, + m.description, + m.operator, + ABS(input_pos - m.position_numeric) AS error + FROM railway_positions AS m + WHERE position_numeric IS NOT NULL + AND position_numeric BETWEEN (input_pos - 10.0)::FLOAT AND (input_pos + 10.0)::FLOAT + AND m.line = input_ref + + -- sort by distance from searched location, then osm_id for stable sorting + ORDER BY error, osm_id + ) AS milestones + GROUP BY milestones.position_text, milestones.error, milestones.line_ref, milestones.operator + ) AS unique_milestones + ) AS top_of_array + ) AS ranked + WHERE ranked.grouped_rank <= input_limit + LIMIT input_limit; + END +$$ LANGUAGE plpgsql + LEAKPROOF + PARALLEL SAFE; diff --git a/import/sql/get_station_importance.sql b/import/sql/get_station_importance.sql new file mode 100644 index 000000000..0d9a042be --- /dev/null +++ b/import/sql/get_station_importance.sql @@ -0,0 +1,162 @@ +-- Assign a numeric rank to passenger train stations + +-- Relevant objects referenced by route relations: railway=station, railway=halt, public_transport=stop_position, public_transport=platform, railway=platform + +-- Get OSM IDs route relations referencing a stop position or a station/halt node +CREATE OR REPLACE VIEW stops_and_route_relations AS + SELECT + r.osm_id AS rel_id, + sp.osm_id AS stop_id, + sp.name AS stop_name, + sp.way AS geom + FROM stop_positions AS sp + JOIN routes AS r + ON r.stop_ref_ids @> Array[sp.osm_id]; + +-- Get OSM IDs of route relations referencing a platform (all except nodes) +CREATE OR REPLACE VIEW platforms_route_relations AS + SELECT + r.osm_id AS rel_id, + sp.osm_id AS stop_id, + sp.name AS stop_name, + sp.way AS geom + FROM platforms AS sp + JOIN routes AS r + ON r.platform_ref_ids @> Array[sp.osm_id]; + +-- Cluster stop positions with equal name +CREATE OR REPLACE VIEW stop_positions_and_their_routes_clustered AS + SELECT + ST_CollectionExtract(unnest(ST_ClusterWithin(srr.geom, 400)), 1) AS geom, + srr.stop_name AS stop_name, + ARRAY_AGG(DISTINCT(srr.rel_id)) AS route_ids + FROM stops_and_route_relations AS srr + GROUP BY stop_name, geom; + +-- Cluster platforms in close distance +CREATE OR REPLACE VIEW platforms_and_their_routes_clustered AS + WITH clusters as ( + SELECT + ST_ClusterDBSCAN(srr.geom, 50, 1) OVER () AS cluster_id, + srr.geom, + srr.rel_id + FROM platforms_route_relations AS srr + ) + SELECT + ST_collect(clusters.geom) as geom, + ARRAY_AGG(DISTINCT(clusters.rel_id)) AS route_ids + FROM clusters + group by cluster_id; + +-- Join clustered stop positions with station nodes +CREATE OR REPLACE VIEW station_nodes_stop_positions_rel_count AS + SELECT + id, + array_agg(route_id) as route_ids + FROM ( + SELECT + s.id as id, + UNNEST(sprc.route_ids) as route_id + FROM stations AS s + LEFT OUTER JOIN stop_positions_and_their_routes_clustered AS sprc + ON (sprc.stop_name = s.name AND ST_DWithin(s.way, sprc.geom, 400)) + + UNION ALL + + SELECT + s.id as id, + r.osm_id as route_id + FROM stations s + JOIN stop_areas sa + ON (ARRAY[s.osm_id] <@ sa.node_ref_ids AND s.osm_type = 'N') + OR (ARRAY[s.osm_id] <@ sa.way_ref_ids AND s.osm_type = 'W') + JOIN routes r + ON sa.stop_ref_ids && r.stop_ref_ids + ) sr + GROUP BY id; + +-- Join clustered platforms with station nodes +CREATE OR REPLACE VIEW station_nodes_platforms_rel_count AS + SELECT + id, + array_agg(route_id) as route_ids + FROM ( + SELECT + s.id as id, + UNNEST(sprc.route_ids) as route_id + FROM stations AS s + JOIN platforms_and_their_routes_clustered AS sprc + ON (ST_DWithin(s.way, sprc.geom, 60)) + WHERE s.feature IN ('station', 'halt', 'tram_stop') + + UNION ALL + + SELECT + s.id as id, + r.osm_id as route_id + FROM stations s + JOIN stop_areas sa + ON (ARRAY[s.osm_id] <@ sa.node_ref_ids AND s.osm_type = 'N') + OR (ARRAY[s.osm_id] <@ sa.way_ref_ids AND s.osm_type = 'W') + JOIN routes r + ON sa.platform_ref_ids && r.platform_ref_ids + ) sr + GROUP BY id; + +CREATE OR REPLACE VIEW stations_with_importance_view AS + SELECT + id, + 1 + max(importance) as importance + FROM ( + SELECT + id, + COUNT(DISTINCT route_id) AS importance + FROM ( + SELECT + id, + UNNEST(route_ids) AS route_id + FROM station_nodes_stop_positions_rel_count + + UNION ALL + + SELECT + id, + UNNEST(route_ids) AS route_id + FROM station_nodes_platforms_rel_count + ) stations_that_have_routes + GROUP BY id + + UNION ALL + + -- Yards have no routes but measure track length instead + SELECT + s.id, + -- The square root and factor are made to align the importance factors of yards + -- with stations. A 320 km yard is equivalent to a station with 140 routes. + SQRT( + SUM(ST_Length(ST_Intersection(ST_Buffer(s.way, 50), l.way))) + ) / 4 AS importance + FROM stations s + JOIN railway_line l + ON ST_DWithin(s.way, l.way, 50) + WHERE s.feature = 'yard' + GROUP BY s.id + + UNION ALL + + SELECT + id, + 0 AS importance + FROM stations + ) all_stations_with_importance + GROUP BY id; + +-- Not a materialized view because the Osm2Pgsql scripts update the discrete isolation values +CREATE TABLE IF NOT EXISTS stations_with_importance ( + id BIGINT NOT NULL PRIMARY KEY, + way GEOMETRY NOT NULL, + importance NUMERIC NOT NULL DEFAULT 0, + discr_iso REAL NOT NULL DEFAULT 0.0, -- Column name is fixed + irank BIGINT NOT NULL DEFAULT 0, -- Column name is fixed + dirank BIGINT NOT NULL DEFAULT 0 -- Column name is fixed +); diff --git a/import/sql/operators.sql.js b/import/sql/operators.sql.js new file mode 100644 index 000000000..cd5a94ca7 --- /dev/null +++ b/import/sql/operators.sql.js @@ -0,0 +1,34 @@ +import fs from 'fs' +import yaml from 'yaml' + +const operators = yaml.parse(fs.readFileSync('operators.yaml', 'utf8')) + +const operatorsByName = operators.operators + .flatMap(({names, color}) => names.map(name => ({name, color}))); + +/** + * Template that builds the SQL view taking the YAML configuration into account + */ +const sql = ` +CREATE OR REPLACE VIEW railway_operator_view AS + SELECT + row_number() over () as id, + name, + color + FROM (VALUES${operatorsByName.map(({name, color}) => ` + ('${name}', '${color}')`).join(',')} + ) operator_data (name, color); + +-- Use the view directly such that the query in the view can be updated +CREATE MATERIALIZED VIEW IF NOT EXISTS railway_operator AS + SELECT + * + FROM + railway_operator_view; + +CREATE INDEX IF NOT EXISTS railway_operator_name + ON railway_operator + USING btree(name); +` + +console.log(sql); diff --git a/import/sql/signal_features.sql.js b/import/sql/signal_features.sql.js new file mode 100644 index 000000000..09adb16f0 --- /dev/null +++ b/import/sql/signal_features.sql.js @@ -0,0 +1,577 @@ +import fs from 'fs' +import yaml from 'yaml' + +const signals_railway_signals = yaml.parse(fs.readFileSync('signals_railway_signals.yaml', 'utf8')) + +const layers = [...new Set(signals_railway_signals.types.map(type => type.layer))] + +async function parseSvgDimensions(feature) { + const svg = await fs.promises.readFile(`symbols/${feature}.svg`, 'utf8') + // Crude way of parsing SVG width/height. But given that all SVG icons are compressed and similar SVG content, this works fine. + const matches = svg.match(//) + if (!matches) { + throw new Error(`Could not find element with width/height for feature ${feature} in SVG content "${svg}"`) + } + return { + width: parseFloat(matches[1]), + height: parseFloat(matches[2]), + } +} + +const signalsWithSignalType = await Promise.all( + signals_railway_signals.features + // Determine a signal type per layer such that combined matching does not try to match other signal types for the same feature + .map(feature => ({ + ...feature, + signalTypes: Object.fromEntries( + layers.map(layer => + [layer, signals_railway_signals.types.filter(type => type.layer === layer).find(type => feature.tags.find(it => it.tag === `railway:signal:${type.type}`))?.type] + ) + )}) + ) + // Determine icon dimensions + .map(async feature => ({ + ...feature, + feature: feature.feature, + icon: await Promise.all(feature.icon.map(async icon => ({ + ...icon, + cases: icon.cases + ? await Promise.all(icon.cases.map(async iconCase => ({ + ...iconCase, + dimensions: await parseSvgDimensions(iconCase.example ?? iconCase.value) + }))) + : undefined, + dimensions: icon.default ? await parseSvgDimensions(icon.default) : undefined, + }))), + })) +); + +const tagTypes = Object.fromEntries(signals_railway_signals.tags.map(tag => + [tag.tag, tag.type])) + +function matchTagValueSql(tag, value) { + switch (tagTypes[tag]) { + case 'array': + return `'${value}' = ANY("${tag}")` + case 'boolean': + if (value) { + throw new Error(`Value given for boolean tag '${tag}' ('${value}')`) + } + return `"${tag}"` + default: + return `"${tag}" = '${value}'` + } +} + +function matchTagAllValuesSql(tag, values) { + switch (tagTypes[tag]) { + case 'array': + return `ARRAY[${values.map(value => `'${value}'`).join(', ')}] <@ "${tag}"` + case 'boolean': + if (values) { + throw new Error(`Values given for boolean tag '${tag}' ('${values}')`) + } + return `"${tag}"` + default: + return `false` + } +} + +function matchTagAnyValueSql(tag, values) { + switch (tagTypes[tag]) { + case 'array': + return `ARRAY[${values.map(value => `'${value}'`).join(', ')}] && "${tag}"` + case 'boolean': + if (values) { + throw new Error(`Values given for boolean tag '${tag}' ('${values}')`) + } + return `"${tag}"` + default: + return `"${tag}" IN (${values.map(value => `'${value}'`).join(', ')})` + } +} + +function matchTagRegexSql(tag, regex) { + switch (tagTypes[tag]) { + case 'array': + return `'${regex}' ~!@# ANY("${tag}")` + case 'boolean': + if (regex) { + throw new Error(`Regex given for boolean tag '${tag}' ('${regex}')`) + } + return `"${tag}"` + default: + return `"${tag}" ~ '${regex}'` + } +} + +function stringSql(tag, matchCase) { + switch (tagTypes[tag]) { + case 'array': + return `(select match from (select regexp_substr(match, '${matchCase.regex}') as match from (select unnest("${tag}") as match) matches1) matches2 where match is not null order by length(match) desc, match desc limit 1)` + case 'boolean': + return `"${tag}"` + default: + if (matchCase.regex) { + return `regexp_substr("${tag}", '${matchCase.regex}', 1, 1, '', 1)` + } else { + return `"${tag}"` + } + } +} + +function matchFeatureTagsSql(tags) { + return tags.map(tag => tag.value ? matchTagValueSql(tag.tag, tag.value) : tag.all ? matchTagAllValuesSql(tag.tag, tag.all) : matchTagAnyValueSql(tag.tag, tag.any)).join(' AND ') +} + +function matchIconCase(tag, iconCase) { + if (iconCase.regex) { + return matchTagRegexSql(tag, iconCase.regex) + } else if (iconCase.all) { + return matchTagAllValuesSql(tag, iconCase.all) + } else if (iconCase.any) { + return matchTagAnyValueSql(tag, iconCase.any) + } else { + return matchTagValueSql(tag, iconCase.exact); + } +} + +function iconCaseSql(iconCase, matchTag, position) { + if (iconCase.value.includes('{}')) { + return `ARRAY[CONCAT('${iconCase.value.replace(/\{}.*$/, '{')}', ${stringSql(matchTag, iconCase)}, '${iconCase.value.replace(/^.*\{}/, '}')}${position ? `@${position}` : ''}'), ${stringSql(matchTag, iconCase)}, '${(position ?? 'center') === 'center' ? iconCase.dimensions.height : 0}', '${['top', 'bottom'].includes(position) ? iconCase.dimensions.height : 0}', '${['left', 'right'].includes(position) ? iconCase.dimensions.height : 0}']` + } else { + return `ARRAY['${iconCase.value}${position ? `@${position}` : ''}', NULL, '${(position ?? 'center') === 'center' ? iconCase.dimensions.height : 0}', '${['top', 'bottom'].includes(position) ? iconCase.dimensions.height : 0}', '${['left', 'right'].includes(position) ? iconCase.dimensions.height : 0}']` + } +} + +function featureIconSql(icon) { + const defaultIconSql = icon.default ? `ARRAY['${icon.default}${icon.position ? `@${icon.position}` : ''}', NULL, '${(icon.position ?? 'center') === 'center' ? icon.dimensions.height : 0}', '${['top', 'bottom'].includes(icon.position) ? icon.dimensions.height : 0}', '${['left', 'right'].includes(icon.position) ? icon.dimensions.height : 0}']` : 'NULL' + + if (icon.match) { + return `CASE ${icon.cases.map(iconCase => ` + WHEN ${matchIconCase(icon.match, iconCase)} THEN ${iconCaseSql(iconCase, icon.match, icon.position)}`).join('')} + ${icon.default ? `ELSE ${defaultIconSql}` : ''} + END` + } else { + return defaultIconSql + } +} + +function featureIconsSql(icons) { + if (icons.length === 1) { + // Avoid complex SQL for the single icon case + return featureIconSql(icons[0]) + } else { + return `( + SELECT ARRAY[string_agg(icon[1], '|'), string_agg(COALESCE(icon[2], ''), '|'), MAX(icon[3]::numeric)::text, SUM(icon[4]::numeric)::text, MAX(icon[5]::numeric)::text] + FROM ( + ${icons.map(icon => `SELECT ${featureIconSql(icon)} as icon`).join(` + UNION ALL + `)} + ) icons + WHERE icon[1] IS NOT NULL + )` + } +} + +/** + * Template that builds the SQL view taking the YAML configuration into account + */ +const sql = ` +CREATE OR REPLACE VIEW signal_direction_view AS + SELECT + s.id as signal_id, + (signal_direction = 'both') as direction_both, + degrees(ST_Azimuth( + st_lineinterpolatepoint(sl.way, greatest(0, st_linelocatepoint(sl.way, ST_ClosestPoint(sl.way, s.way)) - 0.01)), + st_lineinterpolatepoint(sl.way, least(1, st_linelocatepoint(sl.way, ST_ClosestPoint(sl.way, s.way)) + 0.01)) + )) + (CASE WHEN signal_direction = 'backward' THEN 180.0 ELSE 0.0 END) as azimuth + FROM signals s + LEFT JOIN LATERAL ( + SELECT line.way as way + FROM railway_line line + WHERE st_dwithin(s.way, line.way, 10) AND line.feature IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'monorail', 'miniature', 'funicular') + ORDER BY s.way <-> line.way + LIMIT 1 + ) as sl ON true + WHERE + (railway IN ('signal', 'buffer_stop') AND signal_direction IS NOT NULL) + OR railway IN ('derail', 'vacancy_detection'); + +-- Use the view directly such that the query in the view can be updated +CREATE MATERIALIZED VIEW IF NOT EXISTS signal_direction AS + SELECT + * + FROM + signal_direction_view; + +CREATE INDEX IF NOT EXISTS signal_direction_signal_id_index + ON signal_direction + USING btree(signal_id); + +CLUSTER signal_direction + USING signal_direction_signal_id_index; + +-- Table with functional signal features +CREATE OR REPLACE VIEW signal_features_view AS + -- For every type of signal, generate the feature and related metadata + WITH signals_with_features_0 AS ( + SELECT + id as signal_id, + railway, + ${signals_railway_signals.types.map(type => ` + CASE + WHEN "railway:signal:${type.type}" IS NOT NULL THEN + CASE ${signalsWithSignalType.map((feature, index) => ({...feature, rank: index })).filter(feature => feature.tags.find(it => it.tag === `railway:signal:${type.type}`)).map(feature => ` + -- ${feature.country ? `(${feature.country}) ` : ''}${feature.description} + WHEN ${matchFeatureTagsSql(feature.tags)} + THEN ${feature.signalTypes[type.layer] === type.type ? `array_cat(${featureIconsSql(feature.icon)}, ARRAY[${feature.type ? `'${feature.type}'` : 'NULL'}, "railway:signal:${type.type}:deactivated"::text, '${type.layer}', '${feature.rank}'])` : 'NULL'} + `).join('')} + -- Unknown signal (${type.type}) + ELSE + ARRAY['general/signal-unknown-${type.type}', NULL, '17.1', '0', '0', NULL, 'false', '${type.layer}', NULL] + END + END as feature_${type.type}`).join(',')} + FROM signals s + WHERE + (railway IN ('signal', 'buffer_stop') AND signal_direction IS NOT NULL) + OR railway IN ('derail', 'vacancy_detection') + ), + -- Output a feature row for every feature + signals_with_features_1 AS ( + ${signals_railway_signals.types.map(type => ` + SELECT + signal_id, + feature_${type.type}[1] as feature, + feature_${type.type}[2] as feature_variable, + GREATEST(feature_${type.type}[3]::REAL + feature_${type.type}[4]::REAL, feature_${type.type}[5]::REAL) as icon_height, + feature_${type.type}[6] as type, + feature_${type.type}[7]::boolean as deactivated, + feature_${type.type}[8]::signal_layer as layer, + feature_${type.type}[9]::INT as rank + FROM signals_with_features_0 + WHERE feature_${type.type} IS NOT NULL + `).join(` + UNION ALL + `)} + UNION ALL + SELECT + signal_id, + 'general/signal-unknown' as feature, + NULL as feature_variable, + 17.1 as icon_height, + NULL as type, + false as deactivated, + 'signals' as layer, + NULL as rank + FROM signals_with_features_0 + WHERE railway = 'signal' + AND ${signals_railway_signals.types.map(type => `feature_${type.type} IS NULL`).join(' AND ')} + ) + -- Group features by signal, and aggregate the results + SELECT + signal_id, + any_value(type) as type, + layer, + array_agg(feature ORDER BY rank ASC NULLS LAST) as features, + array_agg(deactivated ORDER BY rank ASC NULLS LAST) as deactivated, + array_agg(icon_height ORDER BY rank ASC NULLS LAST) as icon_height, + MAX(rank) as rank + FROM signals_with_features_1 sf + GROUP BY signal_id, layer; + +-- Use the view directly such that the query in the view can be updated +CREATE MATERIALIZED VIEW IF NOT EXISTS signal_features AS + SELECT + * + FROM + signal_features_view; + +CREATE INDEX IF NOT EXISTS signal_features_signal_id_index + ON signal_features + USING btree(signal_id); + +CLUSTER signal_features + USING signal_features_signal_id_index; + +--- Speed --- + +CREATE OR REPLACE FUNCTION speed_railway_signals(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE + RETURN ( + SELECT + ST_AsMVT(tile, 'speed_railway_signals', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + sd.direction_both, + ref, + caption, + nullif(array_to_string(position, U&'\\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + sd.azimuth,${signals_railway_signals.tags.map(tag => ` + ${tag.type === 'array' ? `array_to_string("${tag.tag}", U&'\\001E') as "${tag.tag}"` : `"${tag.tag}"`},`).join('')} + features[1] as feature0, + features[2] as feature1, + deactivated[1] as deactivated0, + deactivated[2] as deactivated1, + CEIL(icon_height[1] / 2) as offset0, + CEIL(icon_height[1] / 2 + icon_height[2] / 2) as offset1, + type + FROM signals s + JOIN signal_features sf + ON s.id = sf.signal_id + JOIN signal_direction sd + ON s.id = sd.signal_id + WHERE way && ST_TileEnvelope(z, x, y) + AND layer = 'speed' + ORDER BY rank NULLS FIRST + ) as tile + WHERE way IS NOT NULL + ); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION speed_railway_signals IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "speed_railway_signals", + "fields": { + "id": "integer", + "osm_id": "integer", + "ref": "string", + "caption": "string", + "azimuth": "number", + "direction_both": "boolean", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string",${signals_railway_signals.tags.map(tag => ` + "${tag.tag}": "${tag.type === 'boolean' ? `boolean` : `string`}",`).join('')} + "feature0": "string", + "feature1": "string", + "deactivated0": "boolean", + "deactivated1": "boolean", + "offset0": "number", + "offset1": "number", + "type": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Signals --- + +CREATE OR REPLACE FUNCTION signals_railway_signals(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE + RETURN ( + SELECT + ST_AsMVT(tile, 'signals_railway_signals', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + sd.direction_both, + ref, + caption, + railway, + nullif(array_to_string(position, U&'\\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + sd.azimuth,${signals_railway_signals.tags.map(tag => ` + ${tag.type === 'array' ? `array_to_string("${tag.tag}", U&'\\001E') as "${tag.tag}"` : `"${tag.tag}"`},`).join('')} + features[1] as feature0, + features[2] as feature1, + features[3] as feature2, + features[4] as feature3, + features[5] as feature4, + features[6] as feature5, + deactivated[1] as deactivated0, + deactivated[2] as deactivated1, + deactivated[3] as deactivated2, + deactivated[4] as deactivated3, + deactivated[5] as deactivated4, + deactivated[6] as deactivated5, + CEIL(icon_height[1] / 2) as offset0, + CEIL(icon_height[1] / 2 + icon_height[2] / 2) as offset1, + CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] / 2) as offset2, + CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] / 2) as offset3, + CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] + icon_height[5] / 2) as offset4, + CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] + icon_height[5] + icon_height[6] / 2) as offset5, + type + FROM signals s + JOIN signal_features sf + ON s.id = sf.signal_id + JOIN signal_direction sd + ON s.id = sd.signal_id + WHERE way && ST_TileEnvelope(z, x, y) + AND layer = 'signals' + ORDER BY rank NULLS FIRST + ) as tile + WHERE way IS NOT NULL + ); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION signals_railway_signals IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "signals_railway_signals", + "fields": { + "id": "integer", + "osm_id": "integer", + "railway": "string", + "ref": "string", + "caption": "string", + "azimuth": "number", + "direction_both": "boolean", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string",${signals_railway_signals.tags.map(tag => ` + "${tag.tag}": "${tag.type === 'boolean' ? `boolean` : `string`}",`).join('')} + "feature0": "string", + "feature1": "string", + "feature2": "string", + "feature3": "string", + "feature4": "string", + "feature5": "string", + "deactivated0": "boolean", + "deactivated1": "boolean", + "deactivated2": "boolean", + "deactivated3": "boolean", + "deactivated4": "boolean", + "deactivated5": "boolean", + "offset0": "number", + "offset1": "number", + "offset2": "number", + "offset3": "number", + "offset4": "number", + "offset5": "number", + "type": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Electrification --- + +CREATE OR REPLACE FUNCTION electrification_signals(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE + RETURN ( + SELECT + ST_AsMVT(tile, 'electrification_signals', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + sd.direction_both, + ref, + caption, + nullif(array_to_string(position, U&'\\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + sd.azimuth,${signals_railway_signals.tags.map(tag => ` + ${tag.type === 'array' ? `array_to_string("${tag.tag}", U&'\\001E') as "${tag.tag}"` : `"${tag.tag}"`},`).join('')} + features[1] as feature, + deactivated[1] as deactivated, + CEIL(icon_height[1] / 2) as offset, + type as type + FROM signals s + JOIN signal_features sf + ON s.id = sf.signal_id + JOIN signal_direction sd + ON s.id = sd.signal_id + WHERE way && ST_TileEnvelope(z, x, y) + AND layer = 'electrification' + ORDER BY rank NULLS FIRST + ) as tile + WHERE way IS NOT NULL + ); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION electrification_signals IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "electrification_signals", + "fields": { + "id": "integer", + "osm_id": "integer", + "azimuth": "number", + "direction_both": "boolean", + "ref": "string", + "caption": "string", + "frequency": "number", + "voltage": "integer", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string",${signals_railway_signals.tags.map(tag => ` + "${tag.tag}": "${tag.type === 'boolean' ? `boolean` : `string`}",`).join('')} + "feature": "string", + "deactivated": "boolean", + "offset": "number" + } + } + ] + } + $$::json || '$tj$'; +END $do$; +` + +console.log(sql); diff --git a/import/sql/stations_clustered.sql b/import/sql/stations_clustered.sql new file mode 100644 index 000000000..1a073e99f --- /dev/null +++ b/import/sql/stations_clustered.sql @@ -0,0 +1,181 @@ +-- Clustered stations without importance +CREATE MATERIALIZED VIEW IF NOT EXISTS stations_clustered AS + SELECT + row_number() over (order by name, station, railway_ref, uic_ref, feature) as id, + name, + station, + railway_ref, + uic_ref, + feature, + state, + array_agg(facilities.id) as station_ids, + CASE feature + WHEN 'yard' THEN ST_PointOnSurface(ST_RemoveRepeatedPoints(ST_Collect(way))) + ELSE ST_Centroid(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(way)))) + END as center, + CASE feature + WHEN 'yard' THEN ST_Buffer(ST_RemoveRepeatedPoints(ST_Collect(way)), 10) + ELSE ST_Buffer(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(way))), 50) + END as buffered, + ST_NumGeometries(ST_RemoveRepeatedPoints(ST_Collect(way))) as count + FROM ( + SELECT + *, + ST_ClusterDBSCAN(way, 400, 1) OVER (PARTITION BY name, station, railway_ref, uic_ref, feature, state) AS cluster_id + FROM ( + SELECT + st_collect(any_value(s.way), st_collect(distinct q.way)) as way, + name, + station, + railway_ref, + uic_ref, + feature, + state, + id + FROM stations s + left join stop_areas sa + ON (ARRAY[s.osm_id] <@ sa.node_ref_ids AND s.osm_type = 'N') + OR (ARRAY[s.osm_id] <@ sa.way_ref_ids AND s.osm_type = 'W') + OR (ARRAY[s.osm_id] <@ sa.stop_ref_ids AND s.osm_type = 'N') + left join ( + select + sa.osm_id as stop_area_id, + se.way + from stop_areas sa + join station_entrances se + on array[se.osm_id] <@ sa.node_ref_ids + + union all + + select + sa.osm_id as stop_area_id, + pl.way + from stop_areas sa + join platforms pl + on array[pl.osm_id] <@ sa.platform_ref_ids + ) q on q.stop_area_id = sa.osm_id + group by name, station, railway_ref, uic_ref, feature, state, id + ) stations_with_entrances + ) AS facilities + GROUP BY cluster_id, name, station, railway_ref, uic_ref, feature, state; + +CREATE INDEX IF NOT EXISTS stations_clustered_station_ids + ON stations_clustered + USING gin(station_ids); + +-- Final table with station nodes and the number of route relations +-- needs about 3 to 4 minutes for whole Germany +-- or about 20 to 30 minutes for the whole planet +CREATE MATERIALIZED VIEW IF NOT EXISTS grouped_stations_with_importance AS + SELECT + -- Aggregated station columns + array_agg(DISTINCT station_id ORDER BY station_id) as station_ids, + hstore(string_agg(nullif(name_tags::text, ''), ',')) as name_tags, + array_agg(osm_id ORDER BY osm_id) as osm_ids, + array_agg(osm_type ORDER BY osm_id) as osm_types, + array_remove(string_to_array(array_to_string(array_agg(DISTINCT array_to_string(s.operator, U&'\001E')), U&'\001E'), U&'\001E'), null) as operator, + array_remove(string_to_array(array_to_string(array_agg(DISTINCT array_to_string(s.network, U&'\001E')), U&'\001E'), U&'\001E'), null) as network, + array_remove(string_to_array(array_to_string(array_agg(DISTINCT array_to_string(s.position, U&'\001E')), U&'\001E'), U&'\001E'), null) as position, + array_remove(array_agg(DISTINCT s.wikidata ORDER BY s.wikidata), null) as wikidata, + array_remove(array_agg(DISTINCT s.wikimedia_commons ORDER BY s.wikimedia_commons), null) as wikimedia_commons, + array_remove(array_agg(DISTINCT s.wikimedia_commons_file ORDER BY s.wikimedia_commons_file), null) as wikimedia_commons_file, + array_remove(array_agg(DISTINCT s.wikipedia ORDER BY s.wikipedia), null) as wikipedia, + array_remove(array_agg(DISTINCT s.image ORDER BY s.image), null) as image, + array_remove(array_agg(DISTINCT s.mapillary ORDER BY s.mapillary), null) as mapillary, + array_remove(array_agg(DISTINCT s.note ORDER BY s.note), null) as note, + array_remove(array_agg(DISTINCT s.description ORDER BY s.description), null) as description, + array_remove(string_to_array(array_to_string(array_agg(DISTINCT array_to_string(s.yard_purpose, U&'\001E')), U&'\001E'), U&'\001E'), null) as yard_purpose, + bool_or(s.yard_hump) as yard_hump, + -- Routes + array_remove(string_to_array(array_to_string(array_agg(DISTINCT array_to_string(sr.route_ids, U&'\001E')), U&'\001E'), U&'\001E'), null)::bigint[] as route_ids, + -- Aggregated importance + max(si.importance) as importance, + max(si.discr_iso) as discr_iso, + -- Re-grouped clustered stations columns + clustered.id as id, + any_value(clustered.center) as center, + any_value(clustered.buffered) as buffered, + any_value(clustered.name) as name, + any_value(clustered.station) as station, + any_value(clustered.railway_ref) as railway_ref, + any_value(clustered.uic_ref) as uic_ref, + any_value(clustered.feature) as feature, + any_value(clustered.state) as state, + any_value(clustered.count) as count + FROM ( + SELECT + id, + UNNEST(sc.station_ids) as station_id, + name, station, railway_ref, uic_ref, feature, state, station_ids, center, buffered, count + FROM stations_clustered sc + ) clustered + JOIN stations s + ON clustered.station_id = s.id + JOIN stations_with_importance si + ON clustered.station_id = si.id + LEFT JOIN ( + SELECT + id, + array_agg(DISTINCT route_id ORDER BY route_id) as route_ids + FROM ( + select + id, + unnest(route_ids) as route_id + from station_nodes_platforms_rel_count + + UNION + + select + id, + unnest(route_ids) as route_id + from station_nodes_stop_positions_rel_count + ) station_routes_multiple + GROUP BY id + ) sr + ON clustered.station_id = sr.id + GROUP BY clustered.id; + +CREATE INDEX IF NOT EXISTS grouped_stations_with_importance_center_index + ON grouped_stations_with_importance + USING GIST(center); + +CREATE INDEX IF NOT EXISTS grouped_stations_with_importance_buffered_index + ON grouped_stations_with_importance + USING GIST(buffered); + +CREATE INDEX IF NOT EXISTS grouped_stations_with_importance_osm_ids_index + ON grouped_stations_with_importance + USING GIN(osm_ids); + +CLUSTER grouped_stations_with_importance + USING grouped_stations_with_importance_center_index; + +CREATE MATERIALIZED VIEW IF NOT EXISTS stop_area_groups_buffered AS + SELECT + sag.osm_id, + ST_Buffer(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(gs.buffered))), 20) as way + FROM stop_area_groups sag + JOIN stop_areas sa + ON ARRAY[sa.osm_id] <@ sag.stop_area_ref_ids + JOIN stations s + ON (ARRAY[s.osm_id] <@ sa.node_ref_ids AND s.osm_type = 'N') + OR (ARRAY[s.osm_id] <@ sa.way_ref_ids AND s.osm_type = 'W') + OR (ARRAY[s.osm_id] <@ sa.stop_ref_ids AND s.osm_type = 'N') + JOIN ( + SELECT + unnest(osm_ids) AS osm_id, + unnest(osm_types) AS osm_type, + buffered + FROM grouped_stations_with_importance + ) gs + ON s.osm_id = gs.osm_id and s.osm_type = gs.osm_type + GROUP BY sag.osm_id + -- Only use station area groups that have more than one station area + HAVING COUNT(distinct sa.osm_id) > 1; + +CREATE INDEX IF NOT EXISTS stop_area_groups_buffered_index + ON stop_area_groups_buffered + USING GIST(way); + +CLUSTER stop_area_groups_buffered + USING stop_area_groups_buffered_index; diff --git a/import/sql/tile_functions.sql b/import/sql/tile_functions.sql new file mode 100644 index 000000000..d7ec0e908 --- /dev/null +++ b/import/sql/tile_functions.sql @@ -0,0 +1,45 @@ +CREATE OR REPLACE FUNCTION railway_to_int(value TEXT) RETURNS INTEGER AS $$ +BEGIN + IF value ~ '^-?[0-9]+$' THEN + RETURN value::INTEGER; + END IF; + RETURN NULL; +END; +$$ LANGUAGE plpgsql + IMMUTABLE + LEAKPROOF + PARALLEL SAFE; + +-- Get label for electrification +CREATE OR REPLACE FUNCTION railway_electrification_label(voltage INT, frequency REAL) RETURNS TEXT AS $$ +DECLARE + + volt_int INTEGER; + volt_text TEXT; +BEGIN + -- Grounded sections + IF voltage = 0 THEN + RETURN '0V'; + END IF; + -- Round voltage nicely + volt_int := voltage::INT; + IF volt_int < 1000 THEN + volt_text := voltage || 'V'; + ELSIF volt_int % 1000 = 0 THEN + volt_text := (volt_int/1000)::TEXT || 'kV'; + ELSE + volt_text := round((volt_int::FLOAT / 1000::FLOAT)::numeric, 1) || 'kV'; + END IF; + -- Output voltage and frequency + IF frequency = 0 THEN + RETURN volt_text || ' ='; + END IF; + IF frequency IS NOT NULL THEN + RETURN volt_text || ' ' || frequency || 'Hz'; + END IF; + RETURN volt_text; +END; +$$ LANGUAGE plpgsql + IMMUTABLE + LEAKPROOF + PARALLEL SAFE; diff --git a/import/sql/tile_views.sql b/import/sql/tile_views.sql new file mode 100644 index 000000000..4c7a48e94 --- /dev/null +++ b/import/sql/tile_views.sql @@ -0,0 +1,1938 @@ +--- Shared --- + +CREATE OR REPLACE FUNCTION railway_line_high(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'railway_line_high', 4096, 'way', 'id') + FROM ( + -- TODO calculate labels in frontend + SELECT + r.id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + way_length, + feature, + state, + usage, + service, + highspeed, + tunnel, + bridge, + CASE + WHEN ref IS NOT NULL AND r.name IS NOT NULL THEN ref || ' ' || r.name + ELSE COALESCE(ref, r.name) + END AS standard_label, + ref, + track_ref, + track_class, + array_to_string(reporting_marks, ', ') as reporting_marks, + preferred_direction, + rank, + maxspeed, + speed_label, + train_protection_rank, + train_protection, + train_protection_construction_rank, + train_protection_construction, + electrification_state, + voltage, + frequency, + maximum_current, + electrification_label, + future_voltage, + future_frequency, + future_maximum_current, + railway_to_int(gauge0) AS gaugeint0, + gauge0, + railway_to_int(gauge1) AS gaugeint1, + gauge1, + railway_to_int(gauge2) AS gaugeint2, + gauge2, + gauge_label, + loading_gauge, + operator, + COALESCE( + ro.color, + 'hsl(' || get_byte(sha256(primary_operator::bytea), 0) || ', 100%, 30%)' + ) as operator_color, + primary_operator, + owner, + traffic_mode, + radio, + line_routes, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM ( + SELECT + id, + osm_id, + way, + way_length, + feature, + state, + usage, + service, + rank, + highspeed, + reporting_marks, + layer, + bridge, + tunnel, + track_ref, + track_class, + ref, + name, + preferred_direction, + maxspeed, + speed_label, + train_protection_rank, + train_protection, + train_protection_construction_rank, + train_protection_construction, + electrification_state, + voltage, + frequency, + maximum_current, + railway_electrification_label(COALESCE(voltage, future_voltage), COALESCE(frequency, future_frequency)) AS electrification_label, + future_voltage, + future_frequency, + future_maximum_current, + gauges[1] AS gauge0, + gauges[2] AS gauge1, + gauges[3] AS gauge2, + (select string_agg(gauge, ' | ') from unnest(gauges) as gauge where gauge ~ '^[0-9]+$') as gauge_label, + loading_gauge, + array_to_string(operator, U&'\001E') as operator, + owner, + CASE + WHEN ARRAY[owner] <@ operator THEN owner + ELSE operator[1] + END AS primary_operator, + traffic_mode, + radio, + (select nullif(array_to_string(array_agg(r.osm_id || U&'\001E' || coalesce(r.color, '') || U&'\001E' || coalesce(r.name, '')), U&'\001D'), '') from route_line rl join routes r on rl.route_id = r.osm_id where rl.line_id = l.osm_id) as line_routes, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM railway_line l + WHERE + way && ST_TileEnvelope(z, x, y) + -- conditionally include features based on zoom level + AND CASE + -- Zooms < 7 are handled in the low zoom tiles + WHEN z < 8 THEN + state = 'present' + AND service IS NULL + AND ( + feature IN ('rail', 'ferry') AND usage IN ('main', 'branch') + ) + WHEN z < 9 THEN + state IN ('present', 'construction', 'proposed') + AND service IS NULL + AND ( + feature IN ('rail', 'ferry') AND usage IN ('main', 'branch') + ) + WHEN z < 10 THEN + state IN ('present', 'construction', 'proposed') + AND service IS NULL + AND ( + feature IN ('rail', 'ferry') AND usage IN ('main', 'branch', 'industrial') + OR (feature = 'light_rail' AND usage IN ('main', 'branch')) + ) + WHEN z < 11 THEN + state IN ('present', 'construction', 'proposed') + AND service IS NULL + AND ( + feature IN ('rail', 'ferry', 'narrow_gauge', 'light_rail', 'monorail', 'subway', 'tram') + ) + WHEN z < 12 THEN + (service IS NULL OR service IN ('spur', 'yard')) + AND ( + feature IN ('rail', 'ferry', 'narrow_gauge', 'light_rail') + OR (feature IN ('monorail', 'subway', 'tram') AND service IS NULL) + ) + ELSE + true + END + ) AS r + LEFT JOIN railway_operator ro + ON ro.name = primary_operator + ORDER by + layer, + rank NULLS LAST, + maxspeed NULLS FIRST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION railway_line_high IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "railway_line_high", + "fields": { + "id": "integer", + "osm_id": "integer", + "way_length": "number", + "feature": "string", + "state": "string", + "usage": "string", + "service": "string", + "highspeed": "boolean", + "preferred_direction": "string", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "track_ref": "string", + "maxspeed": "number", + "speed_label": "string", + "train_protection": "string", + "train_protection_rank": "integer", + "train_protection_construction": "string", + "train_protection_construction_rank": "integer", + "electrification_state": "string", + "frequency": "number", + "voltage": "integer", + "maximum_current": "integer", + "future_frequency": "number", + "future_voltage": "integer", + "future_maximum_current": "integer", + "electrification_label": "string", + "gauge0": "string", + "gaugeint0": "number", + "gauge1": "string", + "gaugeint1": "number", + "gauge2": "string", + "gaugeint2": "number", + "gauge_label": "string", + "loading_gauge": "string", + "track_class": "string", + "reporting_marks": "string", + "operator": "string", + "operator_color": "string", + "primary_operator": "string", + "owner": "string", + "traffic_mode": "string", + "radio": "string", + "line_routes": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +-- Reusable view for low railway line tiles, grouped per layer +CREATE OR REPLACE VIEW railway_line_low AS + SELECT + r.id, + way, + feature, + state, + usage, + highspeed, + ref, + CASE + WHEN ref IS NOT NULL AND r.name IS NOT NULL THEN ref || ' ' || r.name + ELSE COALESCE(ref, r.name) + END AS standard_label, + speed_label, + maxspeed, + train_protection_rank, + train_protection, + train_protection_construction_rank, + train_protection_construction, + electrification_state, + railway_electrification_label(COALESCE(voltage, future_voltage), COALESCE(frequency, future_frequency)) AS electrification_label, + voltage, + frequency, + maximum_current, + railway_to_int(gauges[1]) AS gaugeint0, + gauges[1] as gauge0, + (select string_agg(gauge, ' | ') from unnest(gauges) as gauge where gauge ~ '^[0-9]+$') as gauge_label, + loading_gauge, + track_class, + nullif(array_to_string(operator, U&'\001E'), '') as operator, + COALESCE( + ro.color, + 'hsl(' || get_byte(sha256(primary_operator::bytea), 0) || ', 100%, 30%)' + ) as operator_color, + primary_operator, + owner, + rank + FROM ( + SELECT + *, + CASE + WHEN ARRAY[owner] <@ operator THEN owner + ELSE operator[1] + END AS primary_operator + from railway_line + ) as r + LEFT JOIN railway_operator ro + ON ro.name = primary_operator + WHERE + state = 'present' + AND feature IN ('rail', 'ferry') + AND usage = 'main' + AND service IS NULL; + +--- Standard --- + +CREATE OR REPLACE FUNCTION standard_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom( + st_simplify(st_collect(way), 100000), + ST_TileEnvelope(z, x, y), + 4096, 64, true + ) as way, + feature, + any_value(state) as state, + any_value(usage) as usage, + highspeed, + ref, + standard_label, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + highspeed + ORDER by + rank NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "highspeed": "boolean", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE VIEW railway_text_stations AS + SELECT + gs.id, + nullif(array_to_string(osm_ids, U&'\001E'), '') as osm_id, + nullif(array_to_string(osm_types, U&'\001E'), '') as osm_type, + center as way, + railway_ref, + feature, + state, + station, + -- Importance determines the station size. + -- For stations, it is made up of the number of routes. + -- For yards, it is made up of the (scaled) rail length. + CASE + WHEN importance >= 21 THEN 'large' + WHEN importance >= 9 THEN 'normal' + ELSE 'small' + END AS station_size, + gs.name, + name_tags, + CASE + WHEN state != 'present' THEN 100 + WHEN feature = 'station' AND station = 'light_rail' THEN 450 + WHEN feature = 'station' AND station = 'subway' THEN 400 + WHEN feature = 'station' THEN 800 + WHEN feature = 'halt' AND station = 'light_rail' THEN 500 + WHEN feature = 'halt' THEN 550 + WHEN feature = 'tram_stop' THEN 300 + WHEN feature = 'service_station' THEN 600 + WHEN feature = 'yard' THEN 700 + WHEN feature = 'junction' THEN 650 + WHEN feature = 'spur_junction' THEN 420 + WHEN feature = 'site' THEN 600 + WHEN feature = 'crossover' THEN 700 + ELSE 50 + END AS rank, + uic_ref, + importance, + discr_iso, + count, + nullif(array_to_string(operator, U&'\001E'), '') as operator, + nullif(array_to_string(network, U&'\001E'), '') as network, + COALESCE( + ro.color, + 'hsl(' || get_byte(sha256(operator[1]::bytea), 0) || ', 100%, 30%)' + ) as operator_color, + nullif(array_to_string(position, U&'\001E'), '') as position, + nullif(array_to_string(wikidata, U&'\001E'), '') as wikidata, + nullif(array_to_string(wikimedia_commons, U&'\001E'), '') as wikimedia_commons, + nullif(array_to_string(wikimedia_commons_file, U&'\001E'), '') as wikimedia_commons_file, + nullif(array_to_string(image, U&'\001E'), '') as image, + nullif(array_to_string(mapillary, U&'\001E'), '') as mapillary, + nullif(array_to_string(wikipedia, U&'\001E'), '') as wikipedia, + nullif(array_to_string(note, U&'\001E'), '') as note, + nullif(array_to_string(description, U&'\001E'), '') as description, + nullif(array_to_string(yard_purpose, U&'\001E'), '') as yard_purpose, + yard_hump, + (select nullif(array_to_string(array_agg(r.osm_id || U&'\001E' || coalesce(r.color, '') || U&'\001E' || coalesce(r.name, '')), U&'\001D'), '') from routes r where ARRAY[r.osm_id] <@ gs.route_ids) as station_routes + FROM grouped_stations_with_importance gs + LEFT JOIN railway_operator ro + ON ro.name = operator[1] + ORDER BY + rank DESC NULLS LAST, + importance DESC NULLS LAST; + +CREATE OR REPLACE FUNCTION standard_railway_text_stations_low(z integer, x integer, y integer, query json) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_text_stations_low', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id as id, + osm_id, + osm_type, + feature, + state, + station, + station_size, + railway_ref as label, + name, + COALESCE(name_tags['name:' || (query->>'lang')::text], name) as localized_name, + uic_ref, + operator, + operator_color, + network, + position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + yard_purpose, + yard_hump, + station_routes + FROM railway_text_stations + WHERE way && ST_TileEnvelope(z, x, y) + AND feature = 'station' + AND state = 'present' + AND (station IS NULL OR station NOT IN ('light_rail', 'monorail', 'subway')) + AND 213000 * exp(-0.33 * z) - 18000 < discr_iso + AND station_size IN ('large', 'normal') + ORDER BY + importance DESC NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_text_stations_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_text_stations_low", + "fields": { + "id": "integer", + "osm_id": "string", + "osm_type": "string", + "feature": "string", + "state": "string", + "station": "string", + "station_size": "string", + "label": "string", + "name": "string", + "localized_name": "string", + "operator": "string", + "operator_color": "string", + "network": "string", + "position": "string", + "uic_ref": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string", + "yard_purpose": "string", + "yard_hump": "boolean", + "station_routes": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_text_stations_med(z integer, x integer, y integer, query json) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_text_stations_med', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + osm_type, + feature, + state, + station, + station_size, + railway_ref as label, + name, + COALESCE(name_tags['name:' || (query->>'lang')::text], name) as localized_name, + uic_ref, + operator, + operator_color, + network, + position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + yard_purpose, + yard_hump, + station_routes + FROM railway_text_stations + WHERE way && ST_TileEnvelope(z, x, y) + AND feature = 'station' + AND state = 'present' + AND (station IS NULL OR station NOT IN ('light_rail', 'monorail', 'subway')) + AND 213000 * exp(-0.33 * z) - 18000 < discr_iso + ORDER BY + importance DESC NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_text_stations_med IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_text_stations_med", + "fields": { + "id": "integer", + "osm_id": "string", + "osm_type": "string", + "feature": "string", + "state": "string", + "station": "string", + "station_size": "string", + "label": "string", + "name": "string", + "localized_name": "string", + "operator": "string", + "operator_color": "string", + "network": "string", + "position": "string", + "uic_ref": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string", + "yard_purpose": "string", + "yard_hump": "boolean", + "station_routes": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_turntables(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_turntables', 4096, 'way', 'id') + FROM ( + SELECT + id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + osm_id, + feature + FROM turntables + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_turntables IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_turntables", + "fields": { + "id": "integer", + "osm_id": "integer", + "feature": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_station_entrances(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_station_entrances', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + type, + name, + ref, + CASE + WHEN name IS NOT NULL AND ref IS NOT NULL THEN CONCAT(name, ' (', ref, ')') + ELSE COALESCE(name, ref) + END AS label, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM station_entrances + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_station_entrances IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_station_entrances", + "fields": { + "id": "integer", + "osm_id": "integer", + "type": "string", + "name": "string", + "ref": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_text_stations(z integer, x integer, y integer, query json) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_text_stations', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + osm_type, + feature, + state, + station, + station_size, + railway_ref as label, + name, + COALESCE(name_tags['name:' || (query->>'lang')::text], name) as localized_name, + count, + uic_ref, + operator, + operator_color, + network, + position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description, + yard_purpose, + yard_hump, + station_routes + FROM railway_text_stations + WHERE way && ST_TileEnvelope(z, x, y) + AND name IS NOT NULL + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_text_stations IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_text_stations", + "fields": { + "id": "integer", + "osm_id": "string", + "osm_type": "string", + "feature": "string", + "state": "string", + "station": "string", + "station_size": "string", + "label": "string", + "name": "string", + "localized_name": "string", + "operator": "string", + "operator_color": "string", + "network": "string", + "position": "string", + "count": "integer", + "uic_ref": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string", + "yard_purpose": "string", + "yard_hump": "boolean", + "station_routes": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_grouped_stations(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_grouped_stations', 4096, 'way', 'id') + FROM ( + SELECT + gs.id, + nullif(array_to_string(osm_ids, U&'\001E'), '') as osm_id, + nullif(array_to_string(osm_types, U&'\001E'), '') as osm_type, + ST_AsMVTGeom(buffered, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + state, + station, + railway_ref as label, + gs.name, + uic_ref, + nullif(array_to_string(operator, U&'\001E'), '') as operator, + nullif(array_to_string(network, U&'\001E'), '') as network, + nullif(array_to_string(position, U&'\001E'), '') as position, + COALESCE( + ro.color, + 'hsl(' || get_byte(sha256(operator[1]::bytea), 0) || ', 100%, 30%)' + ) as operator_color, + (select nullif(array_to_string(array_agg(r.osm_id || U&'\001E' || coalesce(r.color, '') || U&'\001E' || coalesce(r.name, '')), U&'\001D'), '') from routes r where ARRAY[r.osm_id] <@ gs.route_ids) as station_routes, + nullif(array_to_string(wikidata, U&'\001E'), '') as wikidata, + nullif(array_to_string(wikimedia_commons, U&'\001E'), '') as wikimedia_commons, + nullif(array_to_string(wikimedia_commons_file, U&'\001E'), '') as wikimedia_commons_file, + nullif(array_to_string(image, U&'\001E'), '') as image, + nullif(array_to_string(mapillary, U&'\001E'), '') as mapillary, + nullif(array_to_string(wikipedia, U&'\001E'), '') as wikipedia, + nullif(array_to_string(note, U&'\001E'), '') as note, + nullif(array_to_string(description, U&'\001E'), '') as description + FROM grouped_stations_with_importance gs + LEFT JOIN railway_operator ro + ON ro.name = operator[1] + WHERE buffered && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_grouped_stations IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_grouped_stations", + "fields": { + "id": "integer", + "osm_id": "string", + "osm_type": "string", + "feature": "string", + "state": "string", + "station": "string", + "label": "string", + "name": "string", + "operator": "string", + "operator_color": "string", + "network": "string", + "position": "string", + "uic_ref": "string", + "station_routes": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_symbols(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_symbols', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + osm_type, + feature, + ref, + name, + nullif(array_to_string(position, U&'\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM pois + WHERE way && ST_TileEnvelope(z, x, y) + AND z >= minzoom + AND layer = 'standard' + ORDER BY rank DESC + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_symbols IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_symbols", + "fields": { + "id": "integer", + "osm_id": "integer", + "osm_type": "string", + "feature": "string", + "ref": "string", + "name": "string", + "minzoom": "integer", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_platforms(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_platforms', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + osm_type, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + 'platform' as feature, + name, + nullif(array_to_string(ref, U&'\001E'), '') as ref, + height, + surface, + elevator, + shelter, + lit, + bin, + bench, + wheelchair, + departures_board, + tactile_paving, + (select nullif(array_to_string(array_agg(r.osm_id || U&'\001E' || coalesce(r.color, '') || U&'\001E' || coalesce(r.name, '')), U&'\001D'), '') from routes r where r.platform_ref_ids @> Array[p.osm_id]) as platform_routes + FROM platforms p + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_platforms IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_platforms", + "fields": { + "id": "integer", + "osm_id": "string", + "osm_type": "string", + "feature": "string", + "name": "string", + "ref": "string", + "height": "string", + "surface": "boolean", + "elevator": "boolean", + "shelter": "boolean", + "lit": "boolean", + "bin": "boolean", + "bench": "boolean", + "wheelchair": "boolean", + "departures_board": "boolean", + "tactile_paving": "boolean" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_platform_edges(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_platform_edges', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + 'platform_edge' as feature, + ref, + height, + tactile_paving + FROM platform_edge + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_platform_edges IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_platform_edges", + "fields": { + "id": "integer", + "osm_id": "string", + "feature": "string", + "ref": "string", + "height": "string", + "tactile_paving": "boolean" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_stop_positions(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_stop_positions', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + 'stop_position' as feature, + name, + type, + (select nullif(array_to_string(array_agg(r.osm_id || U&'\001E' || coalesce(r.color, '') || U&'\001E' || coalesce(r.name, '')), U&'\001D'), '') from routes r where r.stop_ref_ids @> Array[sp.osm_id]) as stop_position_routes + FROM stop_positions sp + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_stop_positions IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_stop_positions", + "fields": { + "id": "integer", + "osm_id": "string", + "feature": "string", + "name": "string", + "type": "string", + "stop_position_routes": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION railway_text_km(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'railway_text_km', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + railway, + position_text as pos, + position_exact as pos_exact, + zero, + round(position_numeric) as pos_int, + type, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM railway_positions + WHERE way && ST_TileEnvelope(z, x, y) + ORDER by zero + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION railway_text_km IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "railway_text_km", + "fields": { + "id": "integer", + "osm_id": "integer", + "railway": "string", + "pos": "string", + "pos_exact": "string", + "pos_int": "integer", + "zero": "boolean", + "type": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION standard_railway_switch_ref(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_switch_ref', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + railway, + ref, + type, + turnout_side, + local_operated, + resetting, + nullif(array_to_string(position, U&'\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM railway_switches + WHERE way && ST_TileEnvelope(z, x, y) + ORDER by char_length(ref) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_switch_ref IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_switch_ref", + "fields": { + "id": "integer", + "osm_id": "integer", + "railway": "string", + "ref": "string", + "type": "string", + "turnout_side": "string", + "local_operated": "boolean", + "resetting": "boolean", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + + +CREATE OR REPLACE FUNCTION standard_railway_grouped_station_areas(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'standard_railway_grouped_station_areas', 4096, 'way', 'id') + FROM ( + SELECT + osm_id as id, + osm_id, + 'station_area_group' as feature, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way + FROM stop_area_groups_buffered + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION standard_railway_grouped_station_areas IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "standard_railway_grouped_station_areas", + "fields": { + "id": "integer", + "osm_id": "integer", + "feature": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Speed --- + +CREATE OR REPLACE FUNCTION speed_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'speed_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom(st_simplify(st_collect(way), 100000), ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + any_value(state) as state, + any_value(usage) as usage, + maxspeed, + highspeed, + ref, + standard_label, + speed_label, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + speed_label, + maxspeed, + highspeed + ORDER by + rank NULLS LAST, + maxspeed NULLS FIRST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION speed_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "speed_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "highspeed": "boolean", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "maxspeed": "number", + "speed_label": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Signals --- + + +CREATE OR REPLACE FUNCTION signals_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'signals_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom(st_simplify(st_collect(way), 100000), ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + any_value(state) as state, + any_value(usage) as usage, + ref, + standard_label, + train_protection_rank, + train_protection, + train_protection_construction_rank, + train_protection_construction, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + train_protection_rank, + train_protection, + train_protection_construction_rank, + train_protection_construction + ORDER by + rank NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION signals_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "signals_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "train_protection": "string", + "train_protection_rank": "integer", + "train_protection_construction": "string", + "train_protection_construction_rank": "integer" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Signals --- + +CREATE OR REPLACE FUNCTION signals_signal_boxes(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE + RETURN ( + SELECT + ST_AsMVT(tile, 'signals_signal_boxes', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom( + CASE + WHEN z >= 14 THEN way + ELSE center + END, + ST_TileEnvelope(z, x, y), + extent => 4096, buffer => 64, clip_geom => true + ) AS way, + b.id, + osm_id, + osm_type, + feature, + ref, + b.name, + operator, + COALESCE( + ro.color, + 'hsl(' || get_byte(sha256(operator::bytea), 0) || ', 100%, 30%)' + ) as operator_color, + nullif(array_to_string(position, U&'\001E'), '') as position, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM boxes b + LEFT JOIN railway_operator ro + ON ro.name = operator + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL + ); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION signals_signal_boxes IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "signals_signal_boxes", + "fields": { + "id": "integer", + "osm_id": "integer", + "osm_type": "string", + "feature": "string", + "ref": "string", + "name": "string", + "operator": "string", + "operator_color": "string", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Electrification --- + +CREATE OR REPLACE FUNCTION electrification_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'electrification_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom(st_simplify(st_collect(way), 100000), ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + any_value(state) as state, + any_value(usage) as usage, + ref, + standard_label, + electrification_state, + electrification_label, + voltage, + frequency, + maximum_current, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + electrification_state, + electrification_label, + voltage, + frequency, + maximum_current + ORDER by + rank NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION electrification_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "electrification_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "electrification_state": "string", + "frequency": "number", + "voltage": "integer", + "maximum_current": "integer", + "future_frequency": "number", + "future_voltage": "integer", + "future_maximum_current": "integer", + "electrification_label": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION electrification_railway_symbols(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'electrification_railway_symbols', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + osm_type, + feature, + ref, + nullif(array_to_string(position, U&'\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM pois + WHERE way && ST_TileEnvelope(z, x, y) + AND z >= minzoom + AND layer = 'electrification' + ORDER BY rank DESC + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION electrification_railway_symbols IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "electrification_railway_symbols", + "fields": { + "id": "integer", + "osm_id": "integer", + "osm_type": "string", + "feature": "string", + "ref": "string", + "minzoom": "integer", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION electrification_catenary(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'electrification_catenary', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + osm_type, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + ref, + transition, + structure, + supporting, + attachment, + tensioning, + insulator, + nullif(array_to_string(position, U&'\001E'), '') as position, + note, + description + FROM catenary + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION electrification_catenary IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "electrification_catenary", + "fields": { + "id": "integer", + "osm_id": "integer", + "osm_type": "string", + "ref": "string", + "feature": "string", + "transition": "boolean", + "structure": "string", + "supporting": "string", + "attachment": "string", + "tensioning": "string", + "insulator": "string", + "position": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION electrification_substation(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'electrification_substation', 4096, 'way', 'id') + FROM ( + SELECT + id, + osm_id, + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + ref, + name, + location, + operator, + nullif(array_to_string(voltage, U&'\001E'), '') as voltage, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM substation + WHERE way && ST_TileEnvelope(z, x, y) + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION electrification_substation IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "electrification_substation", + "fields": { + "id": "integer", + "osm_id": "integer", + "feature": "string", + "ref": "string", + "name": "string", + "location": "string", + "operator": "string", + "voltage": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "wikimedia_commons_file": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Track --- + +CREATE OR REPLACE FUNCTION track_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'track_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom(st_simplify(st_collect(way), 100000), ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + any_value(state) as state, + any_value(usage) as usage, + ref, + standard_label, + gaugeint0, + gauge0, + gauge_label, + track_class, + loading_gauge, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + gauge0, + gaugeint0, + gauge_label, + track_class, + loading_gauge + ORDER by + rank NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION track_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "track_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "gauge0": "string", + "gaugeint0": "number", + "gauge_label": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +--- Operator --- + +CREATE OR REPLACE FUNCTION operator_railway_line_low(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'operator_railway_line_low', 4096, 'way', 'id') + FROM ( + SELECT + min(id) as id, + ST_AsMVTGeom(st_simplify(st_collect(way), 100000), ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + feature, + any_value(state) as state, + any_value(usage) as usage, + ref, + standard_label, + operator, + operator_color, + primary_operator, + owner, + max(rank) as rank + FROM railway_line_low + WHERE way && ST_TileEnvelope(z, x, y) + GROUP BY + feature, + ref, + standard_label, + operator, + operator_color, + primary_operator, + owner + ORDER by + rank NULLS LAST + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION operator_railway_line_low IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "operator_railway_line_low", + "fields": { + "id": "integer", + "feature": "string", + "state": "string", + "usage": "string", + "tunnel": "boolean", + "bridge": "boolean", + "ref": "string", + "standard_label": "string", + "operator": "string", + "operator_color": "string", + "primary_operator": "string", + "owner": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; + +CREATE OR REPLACE FUNCTION operator_railway_symbols(z integer, x integer, y integer) + RETURNS bytea + LANGUAGE SQL + IMMUTABLE + STRICT + PARALLEL SAFE +RETURN ( + SELECT + ST_AsMVT(tile, 'operator_railway_symbols', 4096, 'way', 'id') + FROM ( + SELECT + ST_AsMVTGeom(way, ST_TileEnvelope(z, x, y), extent => 4096, buffer => 64, clip_geom => true) AS way, + id, + osm_id, + osm_type, + feature, + ref, + nullif(array_to_string(position, U&'\001E'), '') as position, + wikidata, + wikimedia_commons, + wikimedia_commons_file, + image, + mapillary, + wikipedia, + note, + description + FROM pois + WHERE way && ST_TileEnvelope(z, x, y) + AND z >= minzoom + AND layer = 'operator' + ORDER BY rank DESC + ) as tile + WHERE way IS NOT NULL +); + +DO $do$ BEGIN + EXECUTE 'COMMENT ON FUNCTION operator_railway_symbols IS $tj$' || $$ + { + "vector_layers": [ + { + "id": "operator_railway_symbols", + "fields": { + "id": "integer", + "osm_id": "integer", + "osm_type": "string", + "feature": "string", + "ref": "string", + "minzoom": "integer", + "position": "string", + "wikidata": "string", + "wikimedia_commons": "string", + "image": "string", + "mapillary": "string", + "wikipedia": "string", + "note": "string", + "description": "string" + } + } + ] + } + $$::json || '$tj$'; +END $do$; diff --git a/import/sql/update_api_views.sql b/import/sql/update_api_views.sql new file mode 100644 index 000000000..48d72c841 --- /dev/null +++ b/import/sql/update_api_views.sql @@ -0,0 +1,2 @@ +-- Refresh facilities API views +REFRESH MATERIALIZED VIEW openrailwaymap_facilities_for_search; diff --git a/import/sql/update_operators.sql b/import/sql/update_operators.sql new file mode 100644 index 000000000..30b5b885b --- /dev/null +++ b/import/sql/update_operators.sql @@ -0,0 +1,2 @@ +-- Refresh materialized view of operator names and colors +REFRESH MATERIALIZED VIEW railway_operator; diff --git a/import/sql/update_signal_features.sql b/import/sql/update_signal_features.sql new file mode 100644 index 000000000..e8b9366e2 --- /dev/null +++ b/import/sql/update_signal_features.sql @@ -0,0 +1,2 @@ +-- Refresh materialized view of signals and their features +REFRESH MATERIALIZED VIEW signal_features; diff --git a/import/sql/update_station_importance.sql b/import/sql/update_station_importance.sql new file mode 100644 index 000000000..88beb8369 --- /dev/null +++ b/import/sql/update_station_importance.sql @@ -0,0 +1,14 @@ +BEGIN; + +TRUNCATE stations_with_importance; + +INSERT INTO stations_with_importance (id, way, importance) + SELECT + s.id as id, + ST_Centroid(s.way) as way, + siv.importance + FROM stations_with_importance_view siv + JOIN stations s + ON s.id = siv.id; + +COMMIT; diff --git a/import/sql/update_stations_clustered.sql b/import/sql/update_stations_clustered.sql new file mode 100644 index 000000000..6a013e75c --- /dev/null +++ b/import/sql/update_stations_clustered.sql @@ -0,0 +1,5 @@ +-- Refresh materialized view of stations and their importance + +REFRESH MATERIALIZED VIEW stations_clustered; +REFRESH MATERIALIZED VIEW grouped_stations_with_importance; +REFRESH MATERIALIZED VIEW stop_area_groups_buffered; diff --git a/import/tags.lua.js b/import/tags.lua.js new file mode 100644 index 000000000..3bc081149 --- /dev/null +++ b/import/tags.lua.js @@ -0,0 +1,40 @@ +import fs from 'fs' +import yaml from 'yaml' + +const signals_railway_line = yaml.parse(fs.readFileSync('train_protection.yaml', 'utf8')) +const signals_railway_signals = yaml.parse(fs.readFileSync('signals_railway_signals.yaml', 'utf8')) +const pois = yaml.parse(fs.readFileSync('poi.yaml', 'utf8')) + +/** + * Template that builds Lua functions used in the Osm2Psql Lua import, and taking the YAML configuration into account + */ +const lua = ` +function train_protection(tags, prefix)${signals_railway_line.features.map((feature, featureIndex) => ` + if ${feature.tags.map(tag => `${tag.value ? `tags[prefix .. '${tag.tag}'] == '${tag.value}'`: `(${tag.values.map(value => `tags[prefix .. '${tag.tag}'] == '${value}'`).join(' or ')})`}`).join(' and ')} then return '${feature.train_protection}', ${signals_railway_line.features.length - featureIndex} end`).join('')} + + return nil, 0 +end + +local signal_tags = {${signals_railway_signals.tags.map(tag => ` + { tag = '${tag.tag}', type = '${tag.type}' },`).join('')} +} + +local poi_railway_values = {${pois.features.flatMap(feature => [...(feature.variants || []), feature]).flatMap(feature => feature.tags).filter(tag => tag.tag === 'railway').flatMap(tag => tag.value ? [tag.value] : (tag.values ? tag.values : [])).map(tag => ` + '${tag}',`).join('')} +} + +function poi(tags)${pois.features.flatMap(feature => [...(feature.variants || []).map(variant => ({...variant, minzoom: feature.minzoom, layer: feature.layer })), feature]).map((feature, featureIndex) => ` + if ${feature.tags.map(tag => `${tag.value ? `tags['${tag.tag}'] == '${tag.value}'`: `(${tag.values.map(value => `tags['${tag.tag}'] == '${value}'`).join(' or ')})`}`).join(' and ')} then return '${feature.feature}', ${featureIndex + 1}, ${feature.minzoom}, '${feature.layer}' end`).join('')} + + return nil, 0, 100 +end + +return { + train_protection = train_protection, + signal_tags = signal_tags, + poi_railway_values = poi_railway_values, + poi = poi, +} +`; + +console.log(lua) diff --git a/import/test/assert.lua b/import/test/assert.lua new file mode 100644 index 000000000..e078df91f --- /dev/null +++ b/import/test/assert.lua @@ -0,0 +1,31 @@ +function eq(actual, expected) + if type(expected) == 'table' then + if type(actual) ~= 'table' then + error("Expected table " .. dump(expected) .. ", got " .. dump(actual)) + else + for k, v in pairs(expected) do + if expected[k] and not actual[k] then + error("Expected key " .. k .. ", but actual does not contain key (expected " .. dump(expected) .. ", got " .. dump(actual) .. ")") + else + eq(actual[k], expected[k]) + end + end + + for k, v in pairs(actual) do + if actual[k] and not expected[k] then + error("Actual has key " .. k .. ", but expected does not contain key (expected " .. dump(expected) .. ", got " .. dump(actual) .. ")") + else + eq(actual[k], expected[k]) + end + end + end + else + if expected ~= actual then + error("Expected " .. dump(expected) .. ", got " .. dump(actual)) + end + end +end + +return { + eq = eq, +} diff --git a/import/test/mock_osm2psql.lua b/import/test/mock_osm2psql.lua new file mode 100644 index 000000000..f96b7bfcd --- /dev/null +++ b/import/test/mock_osm2psql.lua @@ -0,0 +1,51 @@ +-- Mock implementation of the Osm2psql Lua library +-- See https://osm2pgsql.org/doc/manual.html + +-- Global mock +osm2pgsql = {} + +local tables = {} +local data = {} + +function osm2pgsql.define_table(table_structure) + local name = table_structure.name + if tables[name] then + error("Table" .. name .. " is already defined") + end + tables[name] = table_structure + + return { + insert = function (_, item) + if not data[name] then + data[name] = {} + end + + table.insert(data[name], item) + end, + } +end + +function osm2pgsql.make_check_values_func(values) + local checker = {} + for _, value in ipairs(values) do + checker[value] = value + end + + return function (check) + return checker[check] or false + end +end + +function osm2pgsql.has_prefix(a, b) + return a:sub(1, b:len()) == b +end + +-- State functions for testing +function osm2pgsql.get_and_clear_imported_data() + local old_data = data + + -- Clear data + data = {} + + return old_data +end diff --git a/import/test/test_all.lua b/import/test/test_all.lua new file mode 100644 index 000000000..baa5ece11 --- /dev/null +++ b/import/test/test_all.lua @@ -0,0 +1,21 @@ +package.path = package.path .. ";test/?.lua" + +-- Logic +require('test_openrailwaymap') + +-- Features +require('test_import_box') +require('test_import_catenary') +require('test_import_entrance') +require('test_import_milestone') +require('test_import_platform') +require('test_import_poi') +require('test_import_railway_line') +require('test_import_route') +require('test_import_stop_position') +require('test_import_stop_area') +require('test_import_station') +require('test_import_switch') +require('test_import_turntable') +require('test_import_landuse') +require('test_import_substation') diff --git a/import/test/test_import_box.lua b/import/test/test_import_box.lua new file mode 100644 index 000000000..512be2e42 --- /dev/null +++ b/import/test/test_import_box.lua @@ -0,0 +1,94 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local polygon_way = { + centroid = function () end, + polygon = function () end, + area = function () return 2.0 end, +} +local as_polygon_mock = function () + return { + centroid = function () + return polygon_way + end, + transform = function () + return polygon_way + end + } +end + +-- Boxes + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'signal_box', + ['railway:position'] = '1.2', + ['railway:position:exact'] = '1.2345', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + boxes = { + { way_area = 0, feature = 'signal_box', ref = 'ref', name = 'name', operator = 'operator', position = '{"1.2 @ 1.2345 (km)"}' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'crossing_box', + ['railway:position'] = '1.2', + ['railway:position:exact'] = '1.2345', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + boxes = { + { way_area = 0, feature = 'crossing_box', ref = 'ref', name = 'name', operator = 'operator', position = '{"1.2 @ 1.2345 (km)"}' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'blockpost', + ['railway:position'] = '1.2', + ['railway:position:exact'] = '1.2345', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + boxes = { + { way_area = 0, feature = 'blockpost', ref = 'ref', name = 'name', operator = 'operator', position = '{"1.2 @ 1.2345 (km)"}' }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'signal_box', + ['railway:position'] = '1.2', + ['railway:position:exact'] = '1.2345', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + boxes = { + { way_area = 2.0, feature = 'signal_box', ref = 'ref', name = 'name', operator = 'operator', position = '{"1.2 @ 1.2345 (km)"}', way = polygon_way }, + }, +}) diff --git a/import/test/test_import_catenary.lua b/import/test/test_import_catenary.lua new file mode 100644 index 000000000..31a249509 --- /dev/null +++ b/import/test/test_import_catenary.lua @@ -0,0 +1,54 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Catenary mast + +osm2pgsql.process_node({ + tags = { + ['power'] = 'catenary_mast', + ['ref'] = '22', + ['location:transition'] = 'yes', + ['structure'] = 'structure', + ['catenary_mast:supporting'] = 'supporting', + ['catenary_mast:attachment'] = 'attachment', + ['tensioning'] = 'tensioning', + ['insulator'] = 'insulator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + catenary = { + { structure = 'structure', tensioning = 'tensioning', ref = '22', feature = 'mast', supporting = 'supporting', transition = true, insulator = 'insulator', attachment = 'attachment' }, + }, +}) + +-- Catenary portal + +osm2pgsql.process_way({ + tags = { + ['power'] = 'catenary_portal', + ['ref'] = '22', + ['location:transition'] = 'yes', + ['structure'] = 'structure', + ['tensioning'] = 'tensioning', + ['insulator'] = 'insulator', + }, + as_linestring = function () + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + catenary = { + { structure = 'structure', tensioning = 'tensioning', ref = '22', feature = 'portal', transition = true, insulator = 'insulator', way = way }, + }, +}) diff --git a/import/test/test_import_entrance.lua b/import/test/test_import_entrance.lua new file mode 100644 index 000000000..5103d60a0 --- /dev/null +++ b/import/test/test_import_entrance.lua @@ -0,0 +1,38 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +-- Entrances + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'subway_entrance', + ['name'] = 'name', + ['ref'] = '47', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + station_entrances = { + { type = 'subway', name = 'name', ref = '47' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'train_station_entrance', + ['name'] = 'name', + ['ref'] = '47', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + station_entrances = { + { type = 'train', name = 'name', ref = '47' }, + }, +}) diff --git a/import/test/test_import_landuse.lua b/import/test/test_import_landuse.lua new file mode 100644 index 000000000..0829cb65e --- /dev/null +++ b/import/test/test_import_landuse.lua @@ -0,0 +1,38 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Landuse + +osm2pgsql.process_way({ + tags = { + landuse = 'railway', + }, + as_polygon = function () return way end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + landuse = { + { way = way }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + landuse = 'railway', + }, + as_multipolygon = function () return way end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + landuse = { + { way = way }, + }, +}) diff --git a/import/test/test_import_milestone.lua b/import/test/test_import_milestone.lua new file mode 100644 index 000000000..8edadb763 --- /dev/null +++ b/import/test/test_import_milestone.lua @@ -0,0 +1,24 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +-- Milestones + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'milestone', + ['railway:position'] = '1.2', + ['railway:position:exact'] = '1.2345', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + railway_positions = { + { railway = 'milestone', position_text = '1.2', position_exact = '1.2345', zero = false, type = 'km', position_numeric = 1.2345 }, + }, +}) diff --git a/import/test/test_import_platform.lua b/import/test/test_import_platform.lua new file mode 100644 index 000000000..89cc6b3fe --- /dev/null +++ b/import/test/test_import_platform.lua @@ -0,0 +1,201 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Platforms + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'platform', + ['name'] = 'name', + ['ref'] = '1;2', + ['height'] = '0.3', + ['surface'] = 'concrete', + ['elevator'] = 'yes', + ['shelter'] = 'yes', + ['lit'] = 'yes', + ['bin'] = 'yes', + ['bench'] = 'yes', + ['wheelchair'] = 'yes', + ['departures_board'] = 'yes', + ['tactile_paving'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { name = 'name', bench = true, shelter = true, elevator = true, departures_board = true, surface = 'concrete', height = '0.3', bin = true, ref = '{"1","2"}', tactile_paving = true, wheelchair = true, lit = true }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['train'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['tram'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['subway'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['light_rail'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['bus'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['trolleybus'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['share_taxi'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'platform', + ['ferry'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_way({ + tags = { + ['public_transport'] = 'platform', + }, + is_closed = true, + as_polygon = function() + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false, way = way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['public_transport'] = 'platform', + }, + is_closed = false, + as_linestring = function() + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false, way = way }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + ['public_transport'] = 'platform', + }, + as_multipolygon = function() + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platforms = { + { bench = false, shelter = false, elevator = false, departures_board = false, bin = false, tactile_paving = false, wheelchair = false, lit = false, way = way }, + }, +}) + +-- Platform edge + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'platform_edge', + ['ref'] = '4', + ['height'] = '0.4', + ['tactile_paving'] = 'yes', + }, + as_linestring = function () + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + platform_edge = { + { ref = '4', height = '0.4', tactile_paving = true, way = way }, + }, +}) diff --git a/import/test/test_import_poi.lua b/import/test/test_import_poi.lua new file mode 100644 index 000000000..8837649db --- /dev/null +++ b/import/test/test_import_poi.lua @@ -0,0 +1,1301 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local polygon_way = { + centroid = function () end, + polygon = function () end, + area = function () return 2.0 end, +} +local as_polygon_mock = function () + return { + centroid = function () + return polygon_way + end, + transform = function () + return polygon_way + end + } +end + +-- Places of interest + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'border', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/border', rank = 1, layer = 'operator', minzoom = 10 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'owner_change', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/owner-change', rank = 2, layer = 'operator', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'antenna', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-antenna', rank = 3, layer = 'standard', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'mast', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-mast', rank = 4, layer = 'standard', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'tower', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-mast', rank = 4, layer = 'standard', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'container_terminal', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/container-terminal', rank = 5, layer = 'standard', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'ferry_terminal', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/ferry-terminal', rank = 6, layer = 'standard', minzoom = 12 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'lubricator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/lubricator', rank = 7, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'fuel', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/fuel', rank = 8, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'sand_store', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/sand_store', rank = 9, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'defect_detector', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/defect_detector', rank = 10, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'aei', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/aei', rank = 11, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'hump_yard', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/hump_yard', rank = 12, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'loading_gauge', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading_gauge', rank = 13, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'preheating', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/preheating', rank = 14, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'compressed_air_supply', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/compressed_air_supply', rank = 15, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'waste_disposal', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/waste_disposal', rank = 16, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'coaling_facility', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/coaling_facility', rank = 17, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'wash', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/wash', rank = 18, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'water_crane', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/water_crane', rank = 19, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'water_tower', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/water_tower', rank = 20, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'workshop', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/workshop', rank = 21, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'engine_shed', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/engine_shed', rank = 22, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['tourism'] = 'museum', + ['museum'] = 'railway', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/museum-rail-transport', rank = 23, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'museum', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/museum', rank = 24, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'power_supply', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/power_supply', rank = 25, layer = 'electrification', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'rolling_highway', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/rolling_highway', rank = 26, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'pit', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/pit', rank = 27, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'loading_rack', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-rack', rank = 28, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'loading_ramp', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-ramp', rank = 29, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'loading_tower', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-tower', rank = 30, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'unloading_hole', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/unloading-hole', rank = 31, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'track_scale', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/track-scale', rank = 32, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'carrier_truck_pit', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/carrier-truck-pit', rank = 33, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'gauge_conversion', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/gauge-conversion', rank = 34, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'car_shuttle', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/car-shuttle', rank = 35, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'car_dumper', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/car-dumper', rank = 36, layer = 'standard', minzoom = 13 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'isolated_track_section', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/isolated-track-section', rank = 37, layer = 'electrification', minzoom = 14 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'level_crossing', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing', rank = 41, layer = 'standard', minzoom = 15 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:light'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-light', rank = 40, layer = 'standard', minzoom = 15 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:barrier'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-barrier', rank = 39, layer = 'standard', minzoom = 15 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:light'] = 'yes', + ['crossing:barrier'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-light-barrier', rank = 38, layer = 'standard', minzoom = 15 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'crossing', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/crossing', rank = 42, layer = 'standard', minzoom = 15 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'hirail_access', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/hirail_access', rank = 43, layer = 'standard', minzoom = 16 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'phone', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/phone', rank = 44, layer = 'standard', minzoom = 16 }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'buffer_stop', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/buffer_stop', rank = 45, layer = 'standard', minzoom = 16 }, + }, + signals = { + { + railway = 'buffer_stop', + ["railway:signal:crossing_hint:deactivated"] = false, + ["railway:signal:crossing_info:deactivated"] = false, + ["railway:signal:whistle:only_transit"] = false, + ["railway:signal:crossing_distant:deactivated"] = false, + ["railway:signal:switch:deactivated"] = false, + ["railway:signal:electricity:deactivated"] = false, + ["railway:signal:helper_engine:deactivated"] = false, + ["railway:signal:route:deactivated"] = false, + ["railway:signal:crossing_distant:shortened"] = false, + ["railway:signal:brake_test:deactivated"] = false, + ["railway:signal:speed_limit_distant:mobile"] = false, + ["railway:signal:wrong_road:deactivated"] = false, + ["railway:signal:route_distant:deactivated"] = false, + ["railway:signal:fouling_point:deactivated"] = false, + ["railway:signal:passing:deactivated"] = false, + ["railway:signal:steam_locomotive:deactivated"] = false, + ["railway:signal:short_route:deactivated"] = false, + ["railway:signal:minor:deactivated"] = false, + ["railway:signal:crossing:repeated"] = false, + ["railway:signal:humping:deactivated"] = false, + ["railway:signal:whistle:deactivated"] = false, + ["railway:signal:main_repeated:deactivated"] = false, + ["railway:signal:train_protection:deactivated"] = false, + ["railway:signal:stop_demand:deactivated"] = false, + ["railway:signal:crossing:deactivated"] = false, + ["railway:signal:minor_distant:deactivated"] = false, + ["railway:signal:station_distant:deactivated"] = false, + ["railway:signal:resetting_switch_distant:deactivated"] = false, + ["railway:signal:stop:deactivated"] = false, + ["railway:signal:snowplow:deactivated"] = false, + ["railway:signal:combined:shortened"] = false, + ["railway:signal:radio:deactivated"] = false, + ["railway:signal:ring:deactivated"] = false, + ["railway:signal:departure:deactivated"] = false, + ["railway:signal:shunting:deactivated"] = false, + ["railway:signal:speed_limit_distant:deactivated"] = false, + ["railway:signal:distant:shortened"] = false, + ["railway:signal:crossing:shortened"] = false, + ["railway:signal:combined:deactivated"] = false, + ["railway:signal:ring:only_transit"] = false, + ["railway:signal:distant:deactivated"] = false, + ["railway:signal:resetting_switch:deactivated"] = false, + ["railway:signal:distant:repeated"] = false, + ["railway:signal:speed_limit:deactivated"] = false, + ["railway:signal:main_repeated:magnet"] = false, + ["railway:signal:main:deactivated"] = false, + ["railway:signal:shunting_route:deactivated"] = false, + }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'derail', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/derail', rank = 46, layer = 'standard', minzoom = 16 }, + }, + signals = { + { + railway = 'derail', + ["railway:signal:crossing_hint:deactivated"] = false, + ["railway:signal:crossing_info:deactivated"] = false, + ["railway:signal:whistle:only_transit"] = false, + ["railway:signal:crossing_distant:deactivated"] = false, + ["railway:signal:switch:deactivated"] = false, + ["railway:signal:electricity:deactivated"] = false, + ["railway:signal:helper_engine:deactivated"] = false, + ["railway:signal:route:deactivated"] = false, + ["railway:signal:crossing_distant:shortened"] = false, + ["railway:signal:brake_test:deactivated"] = false, + ["railway:signal:speed_limit_distant:mobile"] = false, + ["railway:signal:wrong_road:deactivated"] = false, + ["railway:signal:route_distant:deactivated"] = false, + ["railway:signal:fouling_point:deactivated"] = false, + ["railway:signal:passing:deactivated"] = false, + ["railway:signal:steam_locomotive:deactivated"] = false, + ["railway:signal:short_route:deactivated"] = false, + ["railway:signal:minor:deactivated"] = false, + ["railway:signal:crossing:repeated"] = false, + ["railway:signal:humping:deactivated"] = false, + ["railway:signal:whistle:deactivated"] = false, + ["railway:signal:main_repeated:deactivated"] = false, + ["railway:signal:train_protection:deactivated"] = false, + ["railway:signal:stop_demand:deactivated"] = false, + ["railway:signal:crossing:deactivated"] = false, + ["railway:signal:minor_distant:deactivated"] = false, + ["railway:signal:station_distant:deactivated"] = false, + ["railway:signal:resetting_switch_distant:deactivated"] = false, + ["railway:signal:stop:deactivated"] = false, + ["railway:signal:snowplow:deactivated"] = false, + ["railway:signal:combined:shortened"] = false, + ["railway:signal:radio:deactivated"] = false, + ["railway:signal:ring:deactivated"] = false, + ["railway:signal:departure:deactivated"] = false, + ["railway:signal:shunting:deactivated"] = false, + ["railway:signal:speed_limit_distant:deactivated"] = false, + ["railway:signal:distant:shortened"] = false, + ["railway:signal:crossing:shortened"] = false, + ["railway:signal:combined:deactivated"] = false, + ["railway:signal:ring:only_transit"] = false, + ["railway:signal:distant:deactivated"] = false, + ["railway:signal:resetting_switch:deactivated"] = false, + ["railway:signal:distant:repeated"] = false, + ["railway:signal:speed_limit:deactivated"] = false, + ["railway:signal:main_repeated:magnet"] = false, + ["railway:signal:main:deactivated"] = false, + ["railway:signal:shunting_route:deactivated"] = false, + }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'rail_brake', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/retarder', rank = 47, layer = 'standard', minzoom = 16 }, + }, +}) + + +-- Places of interest + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'border', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/border', rank = 1, layer = 'operator', minzoom = 10, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'owner_change', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/owner-change', rank = 2, layer = 'operator', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'antenna', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-antenna', rank = 3, layer = 'standard', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'mast', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-mast', rank = 4, layer = 'standard', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'radio', + ['man_made'] = 'tower', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/radio-mast', rank = 4, layer = 'standard', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'container_terminal', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/container-terminal', rank = 5, layer = 'standard', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'ferry_terminal', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/ferry-terminal', rank = 6, layer = 'standard', minzoom = 12, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'lubricator', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/lubricator', rank = 7, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'fuel', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/fuel', rank = 8, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'sand_store', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/sand_store', rank = 9, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'defect_detector', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/defect_detector', rank = 10, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'aei', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/aei', rank = 11, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'hump_yard', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/hump_yard', rank = 12, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'loading_gauge', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading_gauge', rank = 13, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'preheating', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/preheating', rank = 14, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'compressed_air_supply', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/compressed_air_supply', rank = 15, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'waste_disposal', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/waste_disposal', rank = 16, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'coaling_facility', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/coaling_facility', rank = 17, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'wash', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/wash', rank = 18, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'water_crane', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/water_crane', rank = 19, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'water_tower', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/water_tower', rank = 20, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'workshop', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/workshop', rank = 21, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'engine_shed', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/engine_shed', rank = 22, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['tourism'] = 'museum', + ['museum'] = 'railway', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/museum-rail-transport', rank = 23, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'museum', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/museum', rank = 24, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'power_supply', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/power_supply', rank = 25, layer = 'electrification', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'rolling_highway', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/rolling_highway', rank = 26, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'pit', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/pit', rank = 27, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'loading_rack', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-rack', rank = 28, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'loading_ramp', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-ramp', rank = 29, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'loading_tower', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/loading-tower', rank = 30, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'unloading_hole', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/unloading-hole', rank = 31, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'track_scale', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/track-scale', rank = 32, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'carrier_truck_pit', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/carrier-truck-pit', rank = 33, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'gauge_conversion', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/gauge-conversion', rank = 34, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'car_shuttle', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/car-shuttle', rank = 35, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'car_dumper', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/car-dumper', rank = 36, layer = 'standard', minzoom = 13, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'isolated_track_section', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/isolated-track-section', rank = 37, layer = 'electrification', minzoom = 14, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'level_crossing', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing', rank = 41, layer = 'standard', minzoom = 15, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:light'] = 'yes', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-light', rank = 40, layer = 'standard', minzoom = 15, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:barrier'] = 'yes', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-barrier', rank = 39, layer = 'standard', minzoom = 15, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'level_crossing', + ['crossing:light'] = 'yes', + ['crossing:barrier'] = 'yes', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/level-crossing-light-barrier', rank = 38, layer = 'standard', minzoom = 15, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'crossing', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/crossing', rank = 42, layer = 'standard', minzoom = 15, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'hirail_access', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/hirail_access', rank = 43, layer = 'standard', minzoom = 16, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'phone', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/phone', rank = 44, layer = 'standard', minzoom = 16, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'buffer_stop', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/buffer_stop', rank = 45, layer = 'standard', minzoom = 16, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'derail', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/derail', rank = 46, layer = 'standard', minzoom = 16, way = polygon_way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'rail_brake', + }, + as_polygon = as_polygon_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + pois = { + { feature = 'general/retarder', rank = 47, layer = 'standard', minzoom = 16, way = polygon_way }, + }, +}) diff --git a/import/test/test_import_railway_line.lua b/import/test/test_import_railway_line.lua new file mode 100644 index 000000000..de22d1881 --- /dev/null +++ b/import/test/test_import_railway_line.lua @@ -0,0 +1,49 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} +local as_linestring_mock = function () + return { + transform = function () + return { + segmentize = function () + return { + geometries = function () + first = true + return function () + if first then + first = false + return way + else + return nil + end + end + end + } + end + } + end, + } +end + +-- Railway lines + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'rail', + }, + as_linestring = as_linestring_mock, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + railway_line = { + { tunnel = false, bridge = false, highspeed = false, rank = 40, train_protection_rank = 0, way_length = 1, way = way, feature = 'rail', state = 'present', train_protection_construction_rank = 0 }, + }, +}) diff --git a/import/test/test_import_route.lua b/import/test/test_import_route.lua new file mode 100644 index 000000000..13638e9c8 --- /dev/null +++ b/import/test/test_import_route.lua @@ -0,0 +1,134 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local polygon_way = { + centroid = function () end, + polygon = function () end, + area = function () return 2.0 end, +} +local as_polygon_mock = function () + return { + centroid = function () + return polygon_way + end, + transform = function () + return polygon_way + end + } +end + +-- Routes + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'route', + ['route'] = 'train', + }, + members = {}, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'route', + ['route'] = 'train', + ['from'] = 'Driebergen-Zeist', + ['to'] = 'Uitgeest', + ['name'] = '7400: Driebergen-Zeist - Uitgeest', + ['ref'] = '7400', + ['colour'] = 'orange', + ['operator'] = 'Nederlandse Spoorwegen', + ['brand'] = 'Sprinter', + }, + members = { + -- stops + { role = 'stop', ref = 1, type = 'n' }, + { role = 'station', ref = 2, type = 'n' }, + { role = 'stop_exit_only', ref = 3, type = 'n' }, + { role = 'stop_entry_only', ref = 4, type = 'n' }, + { role = 'forward_stop', ref = 5, type = 'n' }, + { role = 'backward_stop', ref = 6, type = 'n' }, + { role = 'forward:stop', ref = 7, type = 'n' }, + { role = 'backward:stop', ref = 8, type = 'n' }, + { role = 'stop_position', ref = 9, type = 'n' }, + { role = 'halt', ref = 10, type = 'n' }, + + -- platforms + { role = 'platform', ref = 11, type = 'w' }, + { role = 'platform_exit_only', ref = 12, type = 'w' }, + { role = 'platform_entry_only', ref = 13, type = 'w' }, + { role = 'forward:platform', ref = 14, type = 'w' }, + { role = 'backward:platform', ref = 15, type = 'w' }, + + -- ways + { ref = 20, type = 'w' }, + { role = '', ref = 21, type = 'w' }, + + -- other, ignored + { role = 'other', ref = 30, type = 'n' }, + { role = 'other', ref = 31, type = 'w' }, + { role = 'other', ref = 32, type = 'r' }, + { ref = 33, type = 'n' }, + { ref = 34, type = 'r' }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + routes = { + { type = 'train', from = 'Driebergen-Zeist', to = 'Uitgeest', name = '7400: Driebergen-Zeist - Uitgeest', ref = '7400', color = 'orange', operator = 'Nederlandse Spoorwegen', brand = 'Sprinter', stop_ref_ids = '{1,2,3,4,5,6,7,8,9,10}', platform_ref_ids = '{11,12,13,14,15}' }, + }, + route_line = { + { line_id = 20 }, + { line_id = 21 }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'route', + ['route'] = 'subway', + }, + members = { + { role = 'stop', ref = 1 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + routes = { + { type = 'subway', stop_ref_ids = '{1}', platform_ref_ids = '{}' }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'route', + ['route'] = 'tram', + }, + members = { + { role = 'stop', ref = 1 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + routes = { + { type = 'tram', stop_ref_ids = '{1}', platform_ref_ids = '{}' }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'route', + ['route'] = 'light_rail', + }, + members = { + { role = 'stop', ref = 1 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + routes = { + { type = 'light_rail', stop_ref_ids = '{1}', platform_ref_ids = '{}' }, + }, +}) diff --git a/import/test/test_import_station.lua b/import/test/test_import_station.lua new file mode 100644 index 000000000..1f69bbe00 --- /dev/null +++ b/import/test/test_import_station.lua @@ -0,0 +1,167 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Stations + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'station', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'station', state = 'present', railway_ref = 'ref', operator = '{"operator"}', station = 'train', name_tags = { name = 'name' }, name = 'name' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'halt', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'halt', state = 'present', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'tram_stop', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'tram_stop', state = 'present', station = 'tram', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'service_station', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'service_station', state = 'present', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['preserved:railway'] = 'yard', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'yard', state = 'preserved', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'yard', + ['railway:yard:purpose'] = 'transloading;manifest', + ['railway:yard:hump'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'yard', state = 'present', station = 'train', name_tags = {}, yard_hump = true, yard_purpose = '{"transloading","manifest"}' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['abandoned:railway'] = 'junction', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'junction', state = 'abandoned', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['disused:railway'] = 'spur_junction', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'spur_junction', state = 'disused', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['proposed:railway'] = 'crossover', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'crossover', state = 'proposed', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['construction:railway'] = 'site', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'site', state = 'construction', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['razed:railway'] = 'station', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'station', state = 'razed', station = 'train', name_tags = {} }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'station', + name = 'name', + ['railway:ref'] = 'ref', + operator = 'operator', + }, + is_closed = true, + as_polygon = function () return way end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stations = { + { feature = 'station', state = 'present', railway_ref = 'ref', operator = '{"operator"}', station = 'train', name_tags = { name = 'name' }, name = 'name', way = way }, + }, +}) diff --git a/import/test/test_import_stop_area.lua b/import/test/test_import_stop_area.lua new file mode 100644 index 000000000..3205c163d --- /dev/null +++ b/import/test/test_import_stop_area.lua @@ -0,0 +1,99 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local polygon_way = { + centroid = function () end, + polygon = function () end, + area = function () return 2.0 end, +} +local as_polygon_mock = function () + return { + centroid = function () + return polygon_way + end, + transform = function () + return polygon_way + end + } +end + +-- Stop areas + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'public_transport', + ['public_transport'] = 'stop_area', + }, + members = {}, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'public_transport', + ['public_transport'] = 'stop_area', + }, + members = { + { role = 'stop', type = 'n', ref = 1 }, + { role = 'platform', type = 'n', ref = 2 }, + { role = 'platform', type = 'w', ref = 3 }, + { role = 'platform', type = 'r', ref = 4 }, + { type = 'n', ref = 5 }, + { type = 'w', ref = 6 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_areas = { + { stop_ref_ids = '{1}', way_ref_ids = '{6}', platform_ref_ids = '{2,3,4}', node_ref_ids = '{5}' }, + }, +}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'public_transport', + ['public_transport'] = 'stop_area', + }, + members = { + { role = 'stop', type = 'n', ref = 1 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_areas = { + { stop_ref_ids = '{1}', way_ref_ids = '{}', platform_ref_ids = '{}', node_ref_ids = '{}' }, + }, +}) + +-- Stop area groups + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'public_transport', + ['public_transport'] = 'stop_area_group', + }, + members = {}, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_relation({ + tags = { + ['type'] = 'public_transport', + ['public_transport'] = 'stop_area_group', + }, + members = { + { type = 'n', ref = 1 }, + { type = 'w', ref = 2 }, + { type = 'r', ref = 3 }, + { type = 'r', ref = 4 }, + }, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_area_groups = { + { stop_area_ref_ids = '{3,4}' }, + }, +}) diff --git a/import/test/test_import_stop_position.lua b/import/test/test_import_stop_position.lua new file mode 100644 index 000000000..cd7f1d241 --- /dev/null +++ b/import/test/test_import_stop_position.lua @@ -0,0 +1,155 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +-- Stop positions + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'train' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['train'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'train' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['tram'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'tram' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['light_rail'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'light_rail' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['funicular'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'funicular' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['monorail'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'monorail' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['miniature'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + stop_positions = { + { name = 'name', type = 'miniature' }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['bus'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['trolleybus'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['share_taxi'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_node({ + tags = { + ['public_transport'] = 'stop_position', + ['name'] = 'name', + ['ferry'] = 'yes', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) diff --git a/import/test/test_import_substation.lua b/import/test/test_import_substation.lua new file mode 100644 index 000000000..5d0a47081 --- /dev/null +++ b/import/test/test_import_substation.lua @@ -0,0 +1,44 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Substation + +osm2pgsql.process_way({ + tags = { + ['power'] = 'substation', + }, + as_polygon = function () + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), {}) + +osm2pgsql.process_way({ + tags = { + ['power'] = 'substation', + ['substation'] = 'traction', + ['location'] = 'indoor', + ['voltage'] = '400000;225000;63000', + ['name'] = 'name', + ['ref'] = 'ref', + ['operator'] = 'operator', + }, + as_polygon = function () + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + substation = { + { feature = 'traction', location = 'indoor', voltage = '{"400000","225000","63000"}', name = 'name', ref = 'ref', operator = 'operator', way = way }, + }, +}) diff --git a/import/test/test_import_switch.lua b/import/test/test_import_switch.lua new file mode 100644 index 000000000..b00f28b89 --- /dev/null +++ b/import/test/test_import_switch.lua @@ -0,0 +1,40 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +-- Switches + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'switch', + ['ref'] = '22', + ['railway:switch'] = 'curved', + ['railway:local_operated'] = 'yes', + ['railway:switch:resetting'] = 'yes', + ['railway:turnout_side'] = 'right', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + railway_switches = { + { railway = 'switch' , ref = '22', type = 'curved', turnout_side = 'right', local_operated = true, resetting = true }, + }, +}) + +osm2pgsql.process_node({ + tags = { + ['railway'] = 'railway_crossing', + ['ref'] = '22', + }, + as_point = function () end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + railway_switches = { + { railway = 'railway_crossing' , ref = '22', resetting = false, local_operated = false }, + }, +}) diff --git a/import/test/test_import_turntable.lua b/import/test/test_import_turntable.lua new file mode 100644 index 000000000..b691345b2 --- /dev/null +++ b/import/test/test_import_turntable.lua @@ -0,0 +1,42 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +local way = { + length = function () return 1 end, +} + +-- Turntables + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'turntable', + }, + as_polygon = function() + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + turntables = { + { feature = 'turntable', way = way }, + }, +}) + +osm2pgsql.process_way({ + tags = { + ['railway'] = 'traverser', + }, + as_polygon = function() + return way + end, +}) +assert.eq(osm2pgsql.get_and_clear_imported_data(), { + turntables = { + { feature = 'traverser', way = way }, + }, +}) diff --git a/import/test/test_openrailwaymap.lua b/import/test/test_openrailwaymap.lua new file mode 100644 index 000000000..03ad966b7 --- /dev/null +++ b/import/test/test_openrailwaymap.lua @@ -0,0 +1,52 @@ +package.path = package.path .. ";test/?.lua" + +local assert = require('assert') + +-- Global mock +require('mock_osm2psql') + +local openrailwaymap = require('openrailwaymap') + +-- Parse single position +local position1, position1_exact, position1_line_positions = find_position_tags({ + ["railway:position"] = "123", + ["railway:position:exact"] = "123.0", + ["railway:position:exact:L123"] = "123.0", + ["railway:position:exact:AA1"] = "1.0", +}) +assert.eq(position1, "123") +assert.eq(position1_exact, "123.0") +assert.eq(position1_line_positions, {L123 = "123.0", AA1 = "1.0"}) + +local positions1 = parse_railway_positions("1.0", "1.05", {}) +assert.eq(positions1, {{zero = true, numeric = 1.05, text = "1.0", type = "km", exact = "1.05"}}) + +local positions2 = parse_railway_positions("1.0", nil, {}) +assert.eq(positions2, {{zero = true, numeric = 1.0, text = "1.0", type = "km", exact = nil}}) + +local positions3 = parse_railway_positions(nil, "1.05", {}) +assert.eq(positions3, {{zero = false, numeric = 1.05, text = "1.05", type = "km", exact = nil}}) + +local positions4 = parse_railway_positions("1.05", "1.05", {L123 = "1.05"}) +assert.eq(positions4, {{zero = false, numeric = 1.05, text = "1.05", type = "km", exact = "1.05", line = "L123"}}) + +local positions5 = parse_railway_positions("1.3", "1.05", {L123 = "1.05"}) +assert.eq(positions5, { + {zero = false, numeric = 1.3, text = "1.3", type = "km"}, + {zero = false, numeric = 1.05, text = "1.05", type = "km", exact = "1.05", line = "L123"}, +}) + +assert.eq(position_is_zero(''), false) +assert.eq(position_is_zero('1'), true) +assert.eq(position_is_zero('1.0'), true) +assert.eq(position_is_zero('1.1'), false) +assert.eq(position_is_zero('0.9'), false) +assert.eq(position_is_zero('11.0'), true) +assert.eq(position_is_zero('-1.0'), true) +assert.eq(position_is_zero('1.'), true) +assert.eq(position_is_zero('0.0'), true) +assert.eq(position_is_zero('0.000'), true) +assert.eq(position_is_zero('0.001'), false) +assert.eq(position_is_zero('-0.001'), false) +assert.eq(position_is_zero('.01'), false) +assert.eq(position_is_zero('.00'), true) diff --git a/martin.Dockerfile b/martin.Dockerfile new file mode 100644 index 000000000..bc5a074de --- /dev/null +++ b/martin.Dockerfile @@ -0,0 +1,6 @@ +FROM ghcr.io/maplibre/martin:main + +COPY martin /config +COPY symbols /symbols + +CMD ["--config", "/config/configuration.yml", "--sprite", "/symbols", "--font", "/config/fonts"] diff --git a/martin.Dockerfile.dockerignore b/martin.Dockerfile.dockerignore new file mode 100644 index 000000000..2993b6546 --- /dev/null +++ b/martin.Dockerfile.dockerignore @@ -0,0 +1,3 @@ +** +!martin +!symbols diff --git a/martin/configuration.yml b/martin/configuration.yml new file mode 100644 index 000000000..9a765ea01 --- /dev/null +++ b/martin/configuration.yml @@ -0,0 +1,188 @@ +cache_size_mb: 0 + +# Database configuration. This can also be a list of PG configs. +postgres: + # Database connection string + connection_string: ${DATABASE_URL} + + # # Maximum Postgres connections pool size [default: 20] + # pool_size: 20 + + # # Limit the number of table geo features included in a tile. Unlimited by default. + # max_feature_count: 1000 + + # # Control the automatic generation of bounds for spatial tables [default: quick] + # # 'calc' - compute table geometry bounds on startup. + # # 'quick' - same as 'calc', but the calculation will be aborted if it takes more than 5 seconds. + # # 'skip' - do not compute table geometry bounds on startup. + auto_bounds: skip + + # # Enable automatic discovery of tables and functions. + # # You may set this to `false` to disable. + auto_publish: false + + # No tables, see function sources below + tables: {} + + # Function sources + functions: + + # --- Shared --- # + + railway_line_high: + schema: public + function: railway_line_high + minzoom: 7 + + railway_text_km: + schema: public + function: railway_text_km + minzoom: 10 + + # --- Standard --- # + + standard_railway_line_low: + schema: public + function: standard_railway_line_low + maxzoom: 7 + + standard_railway_text_stations_low: + schema: public + function: standard_railway_text_stations_low + minzoom: 4 + maxzoom: 7 + + standard_railway_text_stations_med: + schema: public + function: standard_railway_text_stations_med + minzoom: 7 + maxzoom: 8 + + standard_railway_turntables: + schema: public + function: standard_railway_turntables + minzoom: 10 + + standard_railway_text_stations: + schema: public + function: standard_railway_text_stations + minzoom: 8 + + standard_railway_grouped_stations: + schema: public + function: standard_railway_grouped_stations + minzoom: 13 + + standard_railway_grouped_station_areas: + schema: public + function: standard_railway_grouped_station_areas + minzoom: 13 + + standard_railway_symbols: + schema: public + function: standard_railway_symbols + minzoom: 10 + + standard_station_entrances: + schema: public + function: standard_station_entrances + minzoom: 16 + + standard_railway_platforms: + schema: public + function: standard_railway_platforms + minzoom: 15 + + standard_railway_stop_positions: + schema: public + function: standard_railway_stop_positions + minzoom: 16 + + standard_railway_platform_edges: + schema: public + function: standard_railway_platform_edges + minzoom: 17 + + standard_railway_switch_ref: + schema: public + function: standard_railway_switch_ref + minzoom: 17 + + # --- Speed --- # + + speed_railway_line_low: + schema: public + function: speed_railway_line_low + maxzoom: 7 + + speed_railway_signals: + schema: public + function: speed_railway_signals + minzoom: 13 + + # --- Signals --- # + + signals_railway_line_low: + schema: public + function: signals_railway_line_low + maxzoom: 7 + + signals_signal_boxes: + schema: public + function: signals_signal_boxes + minzoom: 8 + maxzoom: 14 + + signals_railway_signals: + schema: public + function: signals_railway_signals + minzoom: 13 + + # --- Electrification --- # + + electrification_railway_line_low: + schema: public + function: electrification_railway_line_low + maxzoom: 7 + + electrification_signals: + schema: public + function: electrification_signals + minzoom: 13 + + electrification_railway_symbols: + schema: public + function: electrification_railway_symbols + minzoom: 13 + + electrification_substation: + schema: public + function: electrification_substation + minzoom: 13 + + electrification_catenary: + schema: public + function: electrification_catenary + minzoom: 14 + + # --- Track --- # + + track_railway_line_low: + schema: public + function: track_railway_line_low + maxzoom: 7 + + # --- Operator --- # + + operator_railway_line_low: + schema: public + function: operator_railway_line_low + maxzoom: 7 + + operator_railway_symbols: + schema: public + function: operator_railway_symbols + minzoom: 13 + +fonts: + - /config/fonts diff --git a/martin/fonts/FiraCode-Bold.ttf b/martin/fonts/FiraCode-Bold.ttf new file mode 100644 index 000000000..f891bde43 Binary files /dev/null and b/martin/fonts/FiraCode-Bold.ttf differ diff --git a/martin/fonts/FiraCode-Regular.ttf b/martin/fonts/FiraCode-Regular.ttf new file mode 100644 index 000000000..bd7368519 Binary files /dev/null and b/martin/fonts/FiraCode-Regular.ttf differ diff --git a/martin/fonts/LICENSE b/martin/fonts/LICENSE new file mode 100644 index 000000000..d952d62c0 --- /dev/null +++ b/martin/fonts/LICENSE @@ -0,0 +1,92 @@ +This Font Software is licensed under the SIL Open Font License, +Version 1.1. + +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font +creation efforts of academic and linguistic communities, and to +provide a free and open framework in which fonts may be shared and +improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply to +any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software +components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, +deleting, or substituting -- in part or in whole -- any of the +components of the Original Version, by changing formats or by porting +the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, +modify, redistribute, and sell modified and unmodified copies of the +Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in +Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the +corresponding Copyright Holder. This restriction only applies to the +primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created using +the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/martin/fonts/NotoNaskhArabic-Bold.ttf b/martin/fonts/NotoNaskhArabic-Bold.ttf new file mode 100644 index 000000000..b3c2ee242 Binary files /dev/null and b/martin/fonts/NotoNaskhArabic-Bold.ttf differ diff --git a/martin/fonts/NotoNaskhArabic-Regular.ttf b/martin/fonts/NotoNaskhArabic-Regular.ttf new file mode 100644 index 000000000..8658bce4a Binary files /dev/null and b/martin/fonts/NotoNaskhArabic-Regular.ttf differ diff --git a/martin/fonts/NotoSans-Bold.ttf b/martin/fonts/NotoSans-Bold.ttf new file mode 100644 index 000000000..ab11d3163 Binary files /dev/null and b/martin/fonts/NotoSans-Bold.ttf differ diff --git a/martin/fonts/NotoSans-Italic.ttf b/martin/fonts/NotoSans-Italic.ttf new file mode 100644 index 000000000..d9b9e148c Binary files /dev/null and b/martin/fonts/NotoSans-Italic.ttf differ diff --git a/martin/fonts/NotoSans-Regular.ttf b/martin/fonts/NotoSans-Regular.ttf new file mode 100644 index 000000000..ebd7703f6 Binary files /dev/null and b/martin/fonts/NotoSans-Regular.ttf differ diff --git a/martin/fonts/NotoSansArmenian-Bold.ttf b/martin/fonts/NotoSansArmenian-Bold.ttf new file mode 100644 index 000000000..051935827 Binary files /dev/null and b/martin/fonts/NotoSansArmenian-Bold.ttf differ diff --git a/martin/fonts/NotoSansArmenian-Regular.ttf b/martin/fonts/NotoSansArmenian-Regular.ttf new file mode 100644 index 000000000..9671becb0 Binary files /dev/null and b/martin/fonts/NotoSansArmenian-Regular.ttf differ diff --git a/martin/fonts/NotoSansBalinese-Regular.ttf b/martin/fonts/NotoSansBalinese-Regular.ttf new file mode 100644 index 000000000..0b0f58f07 Binary files /dev/null and b/martin/fonts/NotoSansBalinese-Regular.ttf differ diff --git a/martin/fonts/NotoSansBengali-Bold.ttf b/martin/fonts/NotoSansBengali-Bold.ttf new file mode 100644 index 000000000..57bd9d42b Binary files /dev/null and b/martin/fonts/NotoSansBengali-Bold.ttf differ diff --git a/martin/fonts/NotoSansBengali-Regular.ttf b/martin/fonts/NotoSansBengali-Regular.ttf new file mode 100644 index 000000000..320b43e3a Binary files /dev/null and b/martin/fonts/NotoSansBengali-Regular.ttf differ diff --git a/martin/fonts/NotoSansDevanagari-Bold.ttf b/martin/fonts/NotoSansDevanagari-Bold.ttf new file mode 100644 index 000000000..696f91842 Binary files /dev/null and b/martin/fonts/NotoSansDevanagari-Bold.ttf differ diff --git a/martin/fonts/NotoSansDevanagari-Regular.ttf b/martin/fonts/NotoSansDevanagari-Regular.ttf new file mode 100644 index 000000000..19a50993a Binary files /dev/null and b/martin/fonts/NotoSansDevanagari-Regular.ttf differ diff --git a/martin/fonts/NotoSansEthiopic-Bold.ttf b/martin/fonts/NotoSansEthiopic-Bold.ttf new file mode 100644 index 000000000..5aed1dcdb Binary files /dev/null and b/martin/fonts/NotoSansEthiopic-Bold.ttf differ diff --git a/martin/fonts/NotoSansEthiopic-Regular.ttf b/martin/fonts/NotoSansEthiopic-Regular.ttf new file mode 100644 index 000000000..dc52c8a28 Binary files /dev/null and b/martin/fonts/NotoSansEthiopic-Regular.ttf differ diff --git a/martin/fonts/NotoSansGeorgian-Bold.ttf b/martin/fonts/NotoSansGeorgian-Bold.ttf new file mode 100644 index 000000000..de691986c Binary files /dev/null and b/martin/fonts/NotoSansGeorgian-Bold.ttf differ diff --git a/martin/fonts/NotoSansGeorgian-Regular.ttf b/martin/fonts/NotoSansGeorgian-Regular.ttf new file mode 100644 index 000000000..3ee3f606e Binary files /dev/null and b/martin/fonts/NotoSansGeorgian-Regular.ttf differ diff --git a/martin/fonts/NotoSansGujarati-Bold.ttf b/martin/fonts/NotoSansGujarati-Bold.ttf new file mode 100644 index 000000000..59e32b776 Binary files /dev/null and b/martin/fonts/NotoSansGujarati-Bold.ttf differ diff --git a/martin/fonts/NotoSansGujarati-Regular.ttf b/martin/fonts/NotoSansGujarati-Regular.ttf new file mode 100644 index 000000000..11fe8c7fd Binary files /dev/null and b/martin/fonts/NotoSansGujarati-Regular.ttf differ diff --git a/martin/fonts/NotoSansGurmukhi-Bold.ttf b/martin/fonts/NotoSansGurmukhi-Bold.ttf new file mode 100644 index 000000000..d68ee99c7 Binary files /dev/null and b/martin/fonts/NotoSansGurmukhi-Bold.ttf differ diff --git a/martin/fonts/NotoSansGurmukhi-Regular.ttf b/martin/fonts/NotoSansGurmukhi-Regular.ttf new file mode 100644 index 000000000..39a7ed393 Binary files /dev/null and b/martin/fonts/NotoSansGurmukhi-Regular.ttf differ diff --git a/martin/fonts/NotoSansHebrew-Bold.ttf b/martin/fonts/NotoSansHebrew-Bold.ttf new file mode 100644 index 000000000..b0eb2f5da Binary files /dev/null and b/martin/fonts/NotoSansHebrew-Bold.ttf differ diff --git a/martin/fonts/NotoSansHebrew-Regular.ttf b/martin/fonts/NotoSansHebrew-Regular.ttf new file mode 100644 index 000000000..8e980374f Binary files /dev/null and b/martin/fonts/NotoSansHebrew-Regular.ttf differ diff --git a/martin/fonts/NotoSansJavanese-Regular.ttf b/martin/fonts/NotoSansJavanese-Regular.ttf new file mode 100644 index 000000000..303067add Binary files /dev/null and b/martin/fonts/NotoSansJavanese-Regular.ttf differ diff --git a/martin/fonts/NotoSansKannada-Bold.ttf b/martin/fonts/NotoSansKannada-Bold.ttf new file mode 100644 index 000000000..77f74e004 Binary files /dev/null and b/martin/fonts/NotoSansKannada-Bold.ttf differ diff --git a/martin/fonts/NotoSansKannada-Regular.ttf b/martin/fonts/NotoSansKannada-Regular.ttf new file mode 100644 index 000000000..7366f378c Binary files /dev/null and b/martin/fonts/NotoSansKannada-Regular.ttf differ diff --git a/martin/fonts/NotoSansKhmer-Bold.ttf b/martin/fonts/NotoSansKhmer-Bold.ttf new file mode 100644 index 000000000..d14b84b91 Binary files /dev/null and b/martin/fonts/NotoSansKhmer-Bold.ttf differ diff --git a/martin/fonts/NotoSansKhmer-Regular.ttf b/martin/fonts/NotoSansKhmer-Regular.ttf new file mode 100644 index 000000000..e665ed785 Binary files /dev/null and b/martin/fonts/NotoSansKhmer-Regular.ttf differ diff --git a/martin/fonts/NotoSansLao-Bold.ttf b/martin/fonts/NotoSansLao-Bold.ttf new file mode 100644 index 000000000..c566e9f57 Binary files /dev/null and b/martin/fonts/NotoSansLao-Bold.ttf differ diff --git a/martin/fonts/NotoSansLao-Regular.ttf b/martin/fonts/NotoSansLao-Regular.ttf new file mode 100644 index 000000000..146231490 Binary files /dev/null and b/martin/fonts/NotoSansLao-Regular.ttf differ diff --git a/martin/fonts/NotoSansMongolian-Regular.ttf b/martin/fonts/NotoSansMongolian-Regular.ttf new file mode 100644 index 000000000..29fbdadef Binary files /dev/null and b/martin/fonts/NotoSansMongolian-Regular.ttf differ diff --git a/martin/fonts/NotoSansMyanmar-Bold.ttf b/martin/fonts/NotoSansMyanmar-Bold.ttf new file mode 100644 index 000000000..af7086ad0 Binary files /dev/null and b/martin/fonts/NotoSansMyanmar-Bold.ttf differ diff --git a/martin/fonts/NotoSansMyanmar-Regular.ttf b/martin/fonts/NotoSansMyanmar-Regular.ttf new file mode 100644 index 000000000..b4da5e658 Binary files /dev/null and b/martin/fonts/NotoSansMyanmar-Regular.ttf differ diff --git a/martin/fonts/NotoSansOriya-Bold.ttf b/martin/fonts/NotoSansOriya-Bold.ttf new file mode 100644 index 000000000..258751783 Binary files /dev/null and b/martin/fonts/NotoSansOriya-Bold.ttf differ diff --git a/martin/fonts/NotoSansOriya-Regular.ttf b/martin/fonts/NotoSansOriya-Regular.ttf new file mode 100644 index 000000000..ab57812ea Binary files /dev/null and b/martin/fonts/NotoSansOriya-Regular.ttf differ diff --git a/martin/fonts/NotoSansSinhala-Bold.ttf b/martin/fonts/NotoSansSinhala-Bold.ttf new file mode 100644 index 000000000..1278b3d6c Binary files /dev/null and b/martin/fonts/NotoSansSinhala-Bold.ttf differ diff --git a/martin/fonts/NotoSansSinhala-Regular.ttf b/martin/fonts/NotoSansSinhala-Regular.ttf new file mode 100644 index 000000000..3ad432763 Binary files /dev/null and b/martin/fonts/NotoSansSinhala-Regular.ttf differ diff --git a/martin/fonts/NotoSansSymbols-Bold.ttf b/martin/fonts/NotoSansSymbols-Bold.ttf new file mode 100644 index 000000000..0133ddc3c Binary files /dev/null and b/martin/fonts/NotoSansSymbols-Bold.ttf differ diff --git a/martin/fonts/NotoSansSymbols-Regular.ttf b/martin/fonts/NotoSansSymbols-Regular.ttf new file mode 100644 index 000000000..6ab0ca088 Binary files /dev/null and b/martin/fonts/NotoSansSymbols-Regular.ttf differ diff --git a/martin/fonts/NotoSansTamil-Bold.ttf b/martin/fonts/NotoSansTamil-Bold.ttf new file mode 100644 index 000000000..8c07ddda3 Binary files /dev/null and b/martin/fonts/NotoSansTamil-Bold.ttf differ diff --git a/martin/fonts/NotoSansTamil-Regular.ttf b/martin/fonts/NotoSansTamil-Regular.ttf new file mode 100644 index 000000000..b8259eac7 Binary files /dev/null and b/martin/fonts/NotoSansTamil-Regular.ttf differ diff --git a/martin/fonts/NotoSansThai-Bold.ttf b/martin/fonts/NotoSansThai-Bold.ttf new file mode 100644 index 000000000..077caf374 Binary files /dev/null and b/martin/fonts/NotoSansThai-Bold.ttf differ diff --git a/martin/fonts/NotoSansThai-Regular.ttf b/martin/fonts/NotoSansThai-Regular.ttf new file mode 100644 index 000000000..7f72a6e14 Binary files /dev/null and b/martin/fonts/NotoSansThai-Regular.ttf differ diff --git a/martin/fonts/NotoSansTibetan-Bold.ttf b/martin/fonts/NotoSansTibetan-Bold.ttf new file mode 100644 index 000000000..313d7cdae Binary files /dev/null and b/martin/fonts/NotoSansTibetan-Bold.ttf differ diff --git a/martin/fonts/NotoSansTibetan-Regular.ttf b/martin/fonts/NotoSansTibetan-Regular.ttf new file mode 100644 index 000000000..4ba7e91c9 Binary files /dev/null and b/martin/fonts/NotoSansTibetan-Regular.ttf differ diff --git a/martin/fonts/NotoSansTifinagh-Regular.ttf b/martin/fonts/NotoSansTifinagh-Regular.ttf new file mode 100644 index 000000000..bbfd963bf Binary files /dev/null and b/martin/fonts/NotoSansTifinagh-Regular.ttf differ diff --git a/maxspeed.mml b/maxspeed.mml deleted file mode 100644 index 5485f172c..000000000 --- a/maxspeed.mml +++ /dev/null @@ -1,317 +0,0 @@ -scale: 1 -metatile: 2 -name: OpenRailwayMap Maxspeed -description: A map style for railway speed limits -bounds: &world - - -180 - - -85.05112877980659 - - 180 - - 85.05112877980659 -center: - - 0 - - 0 - - 4 -format: png -interactivity: false -minzoom: 0 -maxzoom: 22 -srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" - -# Various parts to be included later on -_parts: - # Extents are used for tilemill, and don't actually make it to the generated XML - extents: &extents - extent: *world - srs-name: "900913" - srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" - extents84: &extents84 - extent: *world - srs-name: "WGS84" - srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" - osm2pgsql: &osm2pgsql - type: "postgis" - dbname: "gis" - key_field: "" - geometry_field: "way" - extent: "-20037508,-20037508,20037508,20037508" - -Stylesheet: - - fonts.mss - - maxspeed_signals.mss - - maxspeed.mss - - common.mss - - common_disused.mss - -Layer: - - id: railway_line_casing - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - disused, construction, - disused_railway, - construction_railway, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - WHEN railway = 'disused' THEN 300 - ELSE 50 - END AS rank - FROM - (SELECT - way, railway, usage, service, - tags->'disused' AS disused, construction, - tags->'disused:railway' AS disused_railway, - tags->'construction:railway' AS construction_railway, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'construction') - ) AS r - ORDER by layer, rank NULLS LAST - ) AS railway_line_casing - properties: - minzoom: 9 - - id: railway_line_low - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - -- speeds are converted to kph in this layer because it is used for colouring - railway_dominant_speed(preferred_direction, maxspeed, maxspeed_forward, maxspeed_backward) AS maxspeed, - NULL AS service, - NULL AS disused, NULL AS construction, - NULL AS disused_railway, - NULL AS construction_railway, - NULL AS disused_usage, NULL AS disused_service, - NULL AS construction_usage, NULL AS construction_service, - NULL AS preserved_railway, NULL AS preserved_service, - NULL AS preserved_usage, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank - FROM - (SELECT - way, railway, usage, - maxspeed, - maxspeed_forward, - maxspeed_backward, - preferred_direction, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST, - maxspeed ASC NULLS FIRST - ) AS openrailwaymap_line_low - properties: - maxzoom: 7 - - id: railway_line_med - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, - -- speeds are converted to kph in this layer because it is used for colouring - railway_dominant_speed(preferred_direction, maxspeed, maxspeed_forward, maxspeed_backward) AS maxspeed, - NULL AS service, - NULL AS disused, NULL AS construction, - NULL AS disused_railway, - NULL AS construction_railway, - NULL AS disused_usage, NULL AS disused_service, - NULL AS construction_usage, NULL AS construction_service, - NULL AS preserved_railway, NULL AS preserved_service, - NULL AS preserved_usage, - CASE WHEN railway = 'rail' AND usage = 'main' THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' THEN 1000 - ELSE 50 - END AS rank - FROM - (SELECT - way, railway, usage, - maxspeed, - maxspeed_forward, - maxspeed_backward, - preferred_direction, - layer - FROM openrailwaymap_osm_line - WHERE railway = 'rail' AND usage = 'main' AND service IS NULL - ) AS r - ORDER BY - layer, - rank NULLS LAST, - maxspeed ASC NULLS FIRST - ) AS railway_line_med - properties: - minzoom: 8 - maxzoom: 8 - - id: railway_line_fill - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, railway, usage, service, - -- speeds are converted to kph in this layer because it is used for colouring - railway_dominant_speed(preferred_direction, maxspeed, maxspeed_forward, maxspeed_backward) AS maxspeed, - disused, construction, - disused_railway, - construction_railway, - disused_usage, disused_service, - construction_usage, construction_service, - preserved_railway, preserved_service, - preserved_usage, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - WHEN railway = 'disused' THEN 300 - - ELSE 50 - END AS rank - FROM - (SELECT - way, railway, usage, service, - maxspeed, - maxspeed_forward, - maxspeed_backward, - preferred_direction, - tags->'disused' AS disused, construction, - tags->'disused:railway' AS disused_railway, - tags->'construction:railway' AS construction_railway, - tags->'disused:usage' AS disused_usage, tags->'disused:service' AS disused_service, - tags->'construction:usage' AS construction_usage, tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, tags->'preserved:service' AS preserved_service, - tags->'preserved:usage' AS preserved_usage, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'construction', 'preserved') - ) AS r - ORDER BY - layer, - rank NULLS LAST, - maxspeed ASC NULLS FIRST - ) AS railway_line_fill - properties: - minzoom: 9 - - id: railway_signals - geometry: point - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way AS way, - railway AS railway, - COALESCE(signal_speed_limit, signal_speed_limit_distant) AS feature, - signal_speed_limit_form AS signal_speed_limit_form, - -- We cast the lowest speed to text to make it possible to only select those speeds in - -- CartoCSS we have an icon for. Otherwise we might render an icon for 40 kph if - -- 42 is tagged (but invalid tagging). - railway_largest_speed_noconvert(signal_speed_limit_speed)::text AS signal_speed_limit_speed, - signal_speed_limit_distant_form AS signal_speed_limit_distant_form, - railway_largest_speed_noconvert(signal_speed_limit_distant_speed)::text AS signal_speed_limit_distant_speed - FROM openrailwaymap_osm_point - WHERE - railway = 'signal' - AND "signal_direction" IS NOT NULL - AND ( - "signal_speed_limit" IS NOT NULL - OR "signal_speed_limit_distant" IS NOT NULL - ) - ORDER BY - -- distant signals are less important, signals for slower speeds are more important - (CASE WHEN signal_speed_limit IS NOT NULL THEN 1 ELSE 2 END) DESC NULLS FIRST, - railway_speed_int(COALESCE(signal_speed_limit_speed, signal_speed_limit_distant_speed)) DESC NULLS FIRST - ) AS railway_line_text - properties: - minzoom: 14 - - id: railway_line_text - geometry: line - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - railway, usage, service, - CASE WHEN (speed_info).primary_direction = 4 THEN (speed_info).forward - WHEN (speed_info).primary_direction = 3 THEN (speed_info).forward - WHEN (speed_info).primary_direction = 2 THEN (speed_info).backward - WHEN (speed_info).primary_direction = 1 THEN (speed_info).forward - END AS maxspeed, - railway_speed_label((speed_info)) AS label, - disused, construction, - disused_railway, - construction_railway, - disused_usage, disused_service, - construction_usage, construction_service, - preserved_railway, preserved_service, - preserved_usage, - CASE WHEN railway = 'rail' AND usage IN ('tourism', 'military', 'test') AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service IS NULL THEN 400 - WHEN railway = 'rail' AND usage IS NULL AND service = 'siding' THEN 870 - WHEN railway = 'rail' AND usage IS NULL AND service = 'yard' THEN 860 - WHEN railway = 'rail' AND usage IS NULL AND service = 'spur' THEN 880 - WHEN railway = 'rail' AND usage IS NULL AND service = 'crossover' THEN 300 - WHEN railway = 'rail' AND usage = 'main' AND service IS NULL THEN 1100 - WHEN railway = 'rail' AND usage = 'branch' AND service IS NULL THEN 1000 - WHEN railway = 'rail' AND usage = 'industrial' AND service IS NULL THEN 850 - WHEN railway = 'rail' AND usage = 'industrial' AND service IN ('siding', 'spur', 'yard', 'crossover') THEN 850 - WHEN railway IN ('preserved', 'construction') THEN 400 - WHEN railway = 'disused' THEN 300 - - ELSE 50 - END AS rank - FROM - (SELECT - ST_Area(ST_Envelope(way)) / NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS bbox_pixels, - way, railway, usage, service, - -- does no unit conversion - railway_direction_speed_limit(tags->'railway:preferred_direction',tags->'maxspeed', tags->'maxspeed:forward', tags->'maxspeed:backward') AS speed_info, - tags->'disused' AS disused, construction, - tags->'disused:railway' AS disused_railway, - tags->'construction:railway' AS construction_railway, - tags->'disused:usage' AS disused_usage, tags->'disused:service' AS disused_service, - tags->'construction:usage' AS construction_usage, tags->'construction:service' AS construction_service, - tags->'preserved:railway' AS preserved_railway, tags->'preserved:service' AS preserved_service, - tags->'preserved:usage' AS preserved_usage, - layer - FROM openrailwaymap_osm_line - WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'construction', 'preserved') - - ) AS r - WHERE bbox_pixels > 150 - ORDER BY - layer, - rank NULLS LAST, - maxspeed DESC NULLS LAST - ) AS railway_line_text - properties: - minzoom: 9 diff --git a/maxspeed.mss b/maxspeed.mss deleted file mode 100644 index d9633e930..000000000 --- a/maxspeed.mss +++ /dev/null @@ -1,208 +0,0 @@ -@text-halo-color: white; -@text-halo-radius: 1; - -@maxspeed_fill_color_10: #0100CB; -@maxspeed_fill_color_20: #001ECB; -@maxspeed_fill_color_30: #003DCB; -@maxspeed_fill_color_40: #005BCB; -@maxspeed_fill_color_50: #007ACB; -@maxspeed_fill_color_60: #0098CB; -@maxspeed_fill_color_70: #00B7CB; -@maxspeed_fill_color_80: #00CBC1; -@maxspeed_fill_color_90: #00CBA2; -@maxspeed_fill_color_100: #00CB84; -@maxspeed_fill_color_110: #00CB66; -@maxspeed_fill_color_120: #00CB47; -@maxspeed_fill_color_130: #00CB29; -@maxspeed_fill_color_140: #00CB0A; -@maxspeed_fill_color_150: #14CB00; -@maxspeed_fill_color_160: #33CB00; -@maxspeed_fill_color_170: #51CB00; -@maxspeed_fill_color_180: #70CB00; -@maxspeed_fill_color_190: #8ECB00; -@maxspeed_fill_color_200: #ADCB00; -@maxspeed_fill_color_210: #CBCB00; -@maxspeed_fill_color_220: #CBAD00; -@maxspeed_fill_color_230: #CB8E00; -@maxspeed_fill_color_240: #CB7000; -@maxspeed_fill_color_250: #CB5100; -@maxspeed_fill_color_260: #CB3300; -@maxspeed_fill_color_270: #CB1400; -@maxspeed_fill_color_280: #CB0007; -@maxspeed_fill_color_290: #CB0025; -@maxspeed_fill_color_300: #CB0044; -@maxspeed_fill_color_320: #CB0062; -@maxspeed_fill_color_340: #CB0081; -@maxspeed_fill_color_360: #CB009F; -@maxspeed_fill_color_380: #CB00BD; - -#railway_line_fill[zoom>=9]::fill, -#railway_line_low[zoom<=7]::fill, -#railway_line_med[zoom>7][zoom<9]::fill { - ["railway"="rail"]["usage"="main"]["service"=null], - [zoom>=8]["railway"="rail"]["usage"="branch"]["service"=null], - [zoom=10]["railway"="rail"]["usage"="industrial"]["service"=null], - [zoom>=11]["railway"="rail"]["usage"="industrial"], - [zoom>=13]["railway"="rail"]["usage"=null]["service"=null], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="siding"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="crossover"], - [zoom>=12]["railway"="rail"]["usage"=null]["service"="yard"], - [zoom>=11]["railway"="rail"]["usage"=null]["service"="spur"], - [zoom>=10]["railway"="narrow_gauge"]["service"=null], - [zoom>=11]["railway"="narrow_gauge"]["service"="spur"], - [zoom>=11]["railway"="narrow_gauge"]["service"="siding"], - [zoom>=11]["railway"="narrow_gauge"]["service"="crossover"], - [zoom>=12]["railway"="narrow_gauge"]["service"="yard"], - [zoom>=9]["railway"="disused"]["disused_railway"="rail"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="subway"]["service"=null], - [zoom>=11]["railway"="disused"]["disused_railway"="light_rail"]["service"=null], - [zoom>=12]["railway"="disused"]["disused_railway"="tram"]["service"=null], - [zoom>=13]["railway"="disused"], - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="main"]["service"=null], - [zoom>=9]["railway"="construction"]["construction_railway"="rail"]["usage"="branch"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="subway"]["service"=null], - [zoom>=10]["railway"="construction"]["construction_railway"="light_rail"]["service"=null], - [zoom>=11]["railway"="construction"]["construction_railway"="tram"]["service"=null], - [zoom>=13]["railway"="construction"]["construction_railway"="narrow_gauge"], - [zoom>=13]["railway"="construction"]["construction_railway"=null], - [zoom>=10]["railway"="subway"]["service"=null], - [zoom>=13]["railway"="subway"], - [zoom>=10]["railway"="light_rail"]["service"=null], - [zoom>=13]["railway"="light_rail"], - [zoom>=11]["railway"="tram"]["service"=null], - [zoom>=13]["railway"="tram"] { - [maxspeed>360] { - line-color: @maxspeed_fill_color_380; - } - [maxspeed<=360] { - line-color: @maxspeed_fill_color_360; - } - [maxspeed<=340] { - line-color: @maxspeed_fill_color_340; - } - [maxspeed<=320] { - line-color: @maxspeed_fill_color_320; - } - [maxspeed<=300] { - line-color: @maxspeed_fill_color_300; - } - [maxspeed<=290] { - line-color: @maxspeed_fill_color_290; - } - [maxspeed<=280] { - line-color: @maxspeed_fill_color_280; - } - [maxspeed<=270] { - line-color: @maxspeed_fill_color_270; - } - [maxspeed<=260] { - line-color: @maxspeed_fill_color_260; - } - [maxspeed<=250] { - line-color: @maxspeed_fill_color_250; - } - [maxspeed<=240] { - line-color: @maxspeed_fill_color_240; - } - [maxspeed<=230] { - line-color: @maxspeed_fill_color_230; - } - [maxspeed<=220] { - line-color: @maxspeed_fill_color_220; - } - [maxspeed<=210] { - line-color: @maxspeed_fill_color_210; - } - [maxspeed<=200] { - line-color: @maxspeed_fill_color_200; - } - [maxspeed<=190] { - line-color: @maxspeed_fill_color_190; - } - [maxspeed<=180] { - line-color: @maxspeed_fill_color_180; - } - [maxspeed<=170] { - line-color: @maxspeed_fill_color_170; - } - [maxspeed<=160] { - line-color: @maxspeed_fill_color_160; - } - [maxspeed<=150] { - line-color: @maxspeed_fill_color_150; - } - [maxspeed<=140] { - line-color: @maxspeed_fill_color_140; - } - [maxspeed<=130] { - line-color: @maxspeed_fill_color_130; - } - [maxspeed<=120] { - line-color: @maxspeed_fill_color_120; - } - [maxspeed<=110] { - line-color: @maxspeed_fill_color_110; - } - [maxspeed<=100] { - line-color: @maxspeed_fill_color_100; - } - [maxspeed<=90] { - line-color: @maxspeed_fill_color_90; - } - [maxspeed<=80] { - line-color: @maxspeed_fill_color_80; - } - [maxspeed<=70] { - line-color: @maxspeed_fill_color_70; - } - [maxspeed<=60] { - line-color: @maxspeed_fill_color_60; - } - [maxspeed<=50] { - line-color: @maxspeed_fill_color_50; - } - [maxspeed<=40] { - line-color: @maxspeed_fill_color_40; - } - [maxspeed<=30] { - line-color: @maxspeed_fill_color_30; - } - [maxspeed<=20] { - line-color: @maxspeed_fill_color_20; - } - [maxspeed<=10] { - line-color: @maxspeed_fill_color_10; - } - /* [disused!=null], - [construction!=null] { - comp-op: screen; - }*/ - } -} - -#railway_line_text[zoom>=9] { - [railway="rail"], - [railway="construction"][construction_railway="rail"], - [railway="disused"][disused_railway="rail"], - [zoom>=11][railway="narrow_gauge"], - [zoom>=11][railway="construction"][construction_railway="narrow_gauge"], - [zoom>=11][railway="disused"][disused_railway="narrow_gauge"], - [zoom>=12][railway="light_rail"], - [zoom>=12][railway="construction"][construction_railway="light_rail"], - [zoom>=12][railway="disused"][disused_railway="light_rail"], - [zoom>=12][railway="subway"], - [zoom>=12][railway="construction"][construction_railway="subway"], - [zoom>=12][railway="disused"][disused_railway="subway"], - [zoom>=13][railway="tram"], - [zoom>=13][railway="construction"][construction_railway="tram"], - [zoom>=13][railway="disused"][disused_railway="tram"] { - text-name: [label]; - text-face-name: @bold-fonts; - text-size: 11; - text-placement: line; - text-spacing: 100; - text-min-distance: 30; - text-halo-radius: @text-halo-radius; - text-halo-fill: @text-halo-color; - } -} diff --git a/maxspeed_signals.mss b/maxspeed_signals.mss deleted file mode 100644 index 8a6c937ab..000000000 --- a/maxspeed_signals.mss +++ /dev/null @@ -1,888 +0,0 @@ -#railway_signals { - [zoom>=17] { - /* German speed signals (Zs 10) */ - ["feature"="DE-ESO:db:zs10"]["signal_speed_limit_speed"=null] { - ["signal_speed_limit_form"="sign"] { - marker-allow-overlap: true; - marker-file: url('symbols/de/zs10-sign.svg'); - marker-width: 7; - marker-height: 22; - } - - ["signal_speed_limit_form"="light"] { - marker-allow-overlap: true; - marker-file: url('symbols/de/zs10-light.svg'); - marker-width: 10; - marker-height: 22; - } - } - - /* German speed signals (Zs 3v) as signs */ - ["feature"="DE-ESO:zs3v"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=null], - ["signal_speed_limit_distant_speed"=~"^(1[0-6]|[1-9])0$"] { - marker-width: 22; - marker-height: 19; - marker-allow-overlap: true; - } - ["signal_speed_limit_distant_speed"=null] { - marker-file: url('symbols/de/zs3v-empty-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/de/zs3v-10-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/de/zs3v-20-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/zs3v-30-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/zs3v-40-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/zs3v-50-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/zs3v-60-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/de/zs3v-70-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/de/zs3v-80-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/de/zs3v-90-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/de/zs3v-100-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="110"] { - marker-file: url('symbols/de/zs3v-110-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="120"] { - marker-file: url('symbols/de/zs3v-120-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="130"] { - marker-file: url('symbols/de/zs3v-130-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="140"] { - marker-file: url('symbols/de/zs3v-140-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="150"] { - marker-file: url('symbols/de/zs3v-150-sign-down.svg'); - } - } - - /* German speed signals (Zs 3v) as light signals */ - ["feature"="DE-ESO:zs3v"]["signal_speed_limit_distant_form"="light"] { - ["signal_speed_limit_distant_speed"=null], - ["signal_speed_limit_distant_speed"="^off;\?$"], - ["signal_speed_limit_distant_speed"=~"^(1[0-2]|[2-9])0$"] { - marker-allow-overlap: true; - marker-width: 14; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"=null], - ["signal_speed_limit_distant_speed"="^off;\?$"] { - marker-file: url('symbols/de/zs2v-unknown.svg'); /* for light signals: empty Zs3v "looks" exactly like empty Zs2v*/ - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/de/zs3v-20-light.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/zs3v-30-light.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/zs3v-30-light.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/zs3v-40-light.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/zs3v-50-light.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/zs3v-60-light.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/de/zs3v-70-light.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/de/zs3v-80-light.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/de/zs3v-90-light.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/de/zs3v-100-light.svg'); - } - ["signal_speed_limit_distant_speed"="110"] { - marker-file: url('symbols/de/zs3v-110-light.svg'); - } - ["signal_speed_limit_distant_speed"="120"] { - marker-file: url('symbols/de/zs3v-120-light.svg'); - } - } - - /* Austrian speed signals (Geschwindigkeitsvoranzeiger) as signs */ - ["feature"="AT-V2:geschwindigkeitsvoranzeiger"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^(10|[1-9])0$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-10-sign.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-20-sign.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-30-sign.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-40-sign.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-50-sign.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-60-sign.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-70-sign.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-80-sign.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-90-sign.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-100-sign.svg'); - } - } - - /* Austrian speed signals (Geschwindigkeitsvoranzeiger) as light signals */ - ["feature"="AT-V2:geschwindigkeitsvoranzeiger"]["signal_speed_limit_distant_form"="light"] { - ["signal_speed_limit_distant_speed"=~"^(1[0-2]|[3-9])0$"] { - marker-allow-overlap: true; - marker-width: 14; - marker-height: 14; - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-30-light.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-40-light.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-50-light.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-60-light.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-70-light.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-80-light.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-90-light.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-100-light.svg'); - } - ["signal_speed_limit_distant_speed"="120"] { - marker-file: url('symbols/at/geschwindigkeitsvoranzeiger-120-light.svg'); - } - } - - /* German speed signals (Zs 3) as signs */ - ["feature"="DE-ESO:zs3"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^(1[0-6]|[1-9])0$"], - ["signal_speed_limit_speed"=null] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_speed"=null] { - marker-file: url('symbols/de/zs3-empty-sign-up.svg'); - } - ["signal_speed_limit_speed"="10"] { - marker-file: url('symbols/de/zs3-10-sign-up.svg'); - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/de/zs3-20-sign-up.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/de/zs3-30-sign-up.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/de/zs3-40-sign-up.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/de/zs3-50-sign-up.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/de/zs3-60-sign-up.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/de/zs3-70-sign-up.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/de/zs3-80-sign-up.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/de/zs3-90-sign-up.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/de/zs3-100-sign-up.svg'); - } - ["signal_speed_limit_speed"="110"] { - marker-file: url('symbols/de/zs3-110-sign-up.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/de/zs3-120-sign-up.svg'); - } - ["signal_speed_limit_speed"="130"] { - marker-file: url('symbols/de/zs3-130-sign-up.svg'); - } - ["signal_speed_limit_speed"="140"] { - marker-file: url('symbols/de/zs3-140-sign-up.svg'); - } - ["signal_speed_limit_speed"="150"] { - marker-file: url('symbols/de/zs3-150-sign-up.svg'); - } - ["signal_speed_limit_speed"="160"] { - marker-file: url('symbols/de/zs3-160-sign-up.svg'); - } - } - - /* German speed signals (Zs 3) as light signals */ - ["feature"="DE-ESO:zs3"]["signal_speed_limit_form"="light"] { - ["signal_speed_limit_speed"=null], - ["signal_speed_limit_speed"="^off;\?$"], - ["signal_speed_limit_speed"=~"^(1[0-2]|[2-9])0$"] { - marker-width: 14; - marker-height: 19; - marker-allow-overlap: true; - } - ["signal_speed_limit_speed"=null], - ["signal_speed_limit_speed"="^off;\?$"] { - marker-file: url('symbols/de/zs2-unknown.svg'); /* for light signals: empty Zs3 "looks" exactly like empty Zs2 */ - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/de/zs3-20-light.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/de/zs3-30-light.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/de/zs3-40-light.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/de/zs3-50-light.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/de/zs3-60-light.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/de/zs3-70-light.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/de/zs3-80-light.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/de/zs3-90-light.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/de/zs3-100-light.svg'); - } - ["signal_speed_limit_speed"="110"] { - marker-file: url('symbols/de/zs3-110-light.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/de/zs3-120-light.svg'); - } - } - - /* Austrian speed signals (Geschwindigkeitsanzeiger)*/ - ["feature"="AT-V2:geschwindigkeitsanzeiger"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^(1[0-26]|[1-9])0$"] { - marker-allow-overlap: true; - marker-width: 14; - marker-height: 14; - } - ["signal_speed_limit_speed"="10"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-10-sign.svg'); - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-20-sign.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-30-sign.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-40-sign.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-50-sign.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-60-sign.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-70-sign.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-80-sign.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-90-sign.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-100-sign.svg'); - } - ["signal_speed_limit_speed"="110"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-110-sign.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-120-sign.svg'); - } - ["signal_speed_limit_speed"="160"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-160-sign.svg'); - } - } - ["feature"="AT-V2:geschwindigkeitsanzeiger"]["signal_speed_limit_form"="light"] { - ["signal_speed_limit_speed"=~"^(1[02]|[3-9])0$"] { - marker-allow-overlap: true; - marker-width: 14; - marker-height: 14; - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-30-light.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-40-light.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-50-light.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-60-light.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-70-light.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-80-light.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-90-light.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-100-light.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/at/geschwindigkeitsanzeiger-120-light.svg'); - } - } - } - - [zoom>=14] { - /* West German branch line speed signals (Lf 4 DS 301) */ - ["feature"="DE-ESO:db:lf4"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^([2-8]0|1[05]|0)$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="0"] { - marker-file: url('symbols/de/lf4-ds301-0-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/de/lf4-ds301-10-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="15"] { - marker-file: url('symbols/de/lf4-ds301-15-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/de/lf4-ds301-20-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/lf4-ds301-30-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/lf4-ds301-40-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/lf4-ds301-50-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/lf4-ds301-60-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/de/lf4-ds301-70-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/de/lf4-ds301-80-sign-down.svg'); - } - } - - /* German line speed signals (Lf 6) */ - ["feature"="DE-ESO:lf6"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^((1[0-9]|[1-9])0|5|15)$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="5"] { - marker-file: url('symbols/de/lf6-5-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/de/lf6-10-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="15"] { - marker-file: url('symbols/de/lf6-15-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/de/lf6-20-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/lf6-30-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/lf6-40-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/lf6-50-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/lf6-60-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/de/lf6-70-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/de/lf6-80-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/de/lf6-90-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/de/lf6-100-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="110"] { - marker-file: url('symbols/de/lf6-110-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="120"] { - marker-file: url('symbols/de/lf6-120-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="130"] { - marker-file: url('symbols/de/lf6-130-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="140"] { - marker-file: url('symbols/de/lf6-140-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="150"] { - marker-file: url('symbols/de/lf6-150-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="160"] { - marker-file: url('symbols/de/lf6-160-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="170"] { - marker-file: url('symbols/de/lf6-170-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="180"] { - marker-file: url('symbols/de/lf6-180-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="190"] { - marker-file: url('symbols/de/lf6-190-sign-down.svg'); - } - ["signal_speed_limit_distant_speed"="200"] { - marker-file: url('symbols/de/lf6-200-sign-down.svg'); - } - } - - /* Austrian line speed signals (Ankündigungstafel) */ - ["feature"="AT-V2:ankündigungstafel"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^(1[0-4]|[1-9])0$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/at/ankuendigungstafel-10-sign.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/at/ankuendigungstafel-20-sign.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/at/ankuendigungstafel-30-sign.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/at/ankuendigungstafel-40-sign.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/at/ankuendigungstafel-50-sign.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/at/ankuendigungstafel-60-sign.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/at/ankuendigungstafel-70-sign.svg'); - } - ["signal_speed_limit_distant_speed"="80"] { - marker-file: url('symbols/at/ankuendigungstafel-80-sign.svg'); - } - ["signal_speed_limit_distant_speed"="90"] { - marker-file: url('symbols/at/ankuendigungstafel-90-sign.svg'); - } - ["signal_speed_limit_distant_speed"="100"] { - marker-file: url('symbols/at/ankuendigungstafel-100-sign.svg'); - } - ["signal_speed_limit_distant_speed"="110"] { - marker-file: url('symbols/at/ankuendigungstafel-110-sign.svg'); - } - ["signal_speed_limit_distant_speed"="120"] { - marker-file: url('symbols/at/ankuendigungstafel-120-sign.svg'); - } - ["signal_speed_limit_distant_speed"="130"] { - marker-file: url('symbols/at/ankuendigungstafel-130-sign.svg'); - } - ["signal_speed_limit_distant_speed"="140"] { - marker-file: url('symbols/at/ankuendigungstafel-140-sign.svg'); - } - } - - ["feature"="DE-HHA:l1"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^[3-7]0$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/hha/l1-30-sign.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/hha/l1-40-sign.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/hha/l1-50-sign.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/hha/l1-60-sign.svg'); - } - ["signal_speed_limit_distant_speed"="70"] { - marker-file: url('symbols/de/hha/l1-70-sign.svg'); - } - } - } - - [zoom>=15] { - ["feature"="DE-BOStrab:g3"]["signal_speed_limit_form"="sign"] { - marker-width: 11; - marker-height: 16; - marker-file: url('symbols/de/bostrab/g3.svg'); - marker-allow-overlap: true; - } - - /* German tram distance speed limit signals as signs (G 1a) */ - ["feature"="DE-BOStrab:g1a"]["signal_speed_limit_distant_form"="sign"] { - ["signal_speed_limit_distant_speed"=~"^[1-6]0$"], - ["signal_speed_limit_distant_speed"=~"^[1-3]5$"] { - marker-allow-overlap: true; - marker-width: 22; - marker-height: 19; - } - ["signal_speed_limit_distant_speed"="10"] { - marker-file: url('symbols/de/bostrab/g1a-10.svg'); - } - ["signal_speed_limit_distant_speed"="15"] { - marker-file: url('symbols/de/bostrab/g1a-15.svg'); - } - ["signal_speed_limit_distant_speed"="20"] { - marker-file: url('symbols/de/bostrab/g1a-20.svg'); - } - ["signal_speed_limit_distant_speed"="25"] { - marker-file: url('symbols/de/bostrab/g1a-25.svg'); - } - ["signal_speed_limit_distant_speed"="30"] { - marker-file: url('symbols/de/bostrab/g1a-30.svg'); - } - ["signal_speed_limit_distant_speed"="35"] { - marker-file: url('symbols/de/bostrab/g1a-35.svg'); - } - ["signal_speed_limit_distant_speed"="40"] { - marker-file: url('symbols/de/bostrab/g1a-40.svg'); - } - ["signal_speed_limit_distant_speed"="50"] { - marker-file: url('symbols/de/bostrab/g1a-50.svg'); - } - ["signal_speed_limit_distant_speed"="60"] { - marker-file: url('symbols/de/bostrab/g1a-60.svg'); - } - } - - /* German tram speed limit signals as signs (G 4) */ - ["feature"="DE-BOStrab:g4"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^[2-7]0$"], - ["signal_speed_limit_speed"=~"^[23]5$"] { - marker-allow-overlap: true; - marker-width: 11; - marker-height: 16; - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/de/bostrab/g4-20.svg'); - } - ["signal_speed_limit_speed"="25"] { - marker-file: url('symbols/de/bostrab/g4-25.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/de/bostrab/g4-30.svg'); - } - ["signal_speed_limit_speed"="35"] { - marker-file: url('symbols/de/bostrab/g4-35.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/de/bostrab/g4-40.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/de/bostrab/g4-50.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/de/bostrab/g4-60.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/de/bostrab/g4-70.svg'); - } - } - - /* German tram speed limit signals as signs (G 2a) */ - ["feature"="DE-BOStrab:g2a"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^([1-3]?5|[1-6]0)$"] { - marker-allow-overlap: true; - marker-width: 11; - marker-height: 16; - } - ["signal_speed_limit_speed"="5"] { - marker-file: url('symbols/de/bostrab/g2a-5.svg'); - } - ["signal_speed_limit_speed"="10"] { - marker-file: url('symbols/de/bostrab/g2a-10.svg'); - } - ["signal_speed_limit_speed"="15"] { - marker-file: url('symbols/de/bostrab/g2a-15.svg'); - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/de/bostrab/g2a-20.svg'); - } - ["signal_speed_limit_speed"="25"] { - marker-file: url('symbols/de/bostrab/g2a-25.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/de/bostrab/g2a-30.svg'); - } - ["signal_speed_limit_speed"="35"] { - marker-file: url('symbols/de/bostrab/g2a-35.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/de/bostrab/g2a-40.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/de/bostrab/g2a-50.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/de/bostrab/g2a-60.svg'); - } - } - } - - [zoom>=14] { - /* East German line speed signal "Eckentafel" (Lf 5) */ - ["feature"="DE-ESO:dr:lf5"]["signal_speed_limit_form"="sign"] { - marker-allow-overlap: true; - marker-width: 12; - marker-height: 16; - marker-file: url('symbols/de/lf5-dv301-sign.svg'); - } - - /* West German line speed signal "Anfangstafel" (Lf 5) */ - ["feature"="DE-ESO:db:lf5"]["signal_speed_limit_form"="sign"] { - marker-allow-overlap: true; - marker-width: 11; - marker-height: 16; - marker-file: url('symbols/de/lf5-ds301-sign.svg'); - } - - /* German line speed signals (Lf 7) */ - ["feature"="DE-ESO:lf7"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^((1?[1-9]|[12]0)0|5|15)$"] { - marker-allow-overlap: true; - marker-width: 13; - marker-height: 16; - } - ["signal_speed_limit_speed"="5"] { - marker-file: url('symbols/de/lf7-5-sign.svg'); - } - ["signal_speed_limit_speed"="10"] { - marker-file: url('symbols/de/lf7-10-sign.svg'); - } - ["signal_speed_limit_speed"="15"] { - marker-file: url('symbols/de/lf7-15-sign.svg'); - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/de/lf7-20-sign.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/de/lf7-30-sign.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/de/lf7-40-sign.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/de/lf7-50-sign.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/de/lf7-60-sign.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/de/lf7-70-sign.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/de/lf7-80-sign.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/de/lf7-90-sign.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/de/lf7-100-sign.svg'); - } - ["signal_speed_limit_speed"="110"] { - marker-file: url('symbols/de/lf7-110-sign.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/de/lf7-120-sign.svg'); - } - ["signal_speed_limit_speed"="130"] { - marker-file: url('symbols/de/lf7-130-sign.svg'); - } - ["signal_speed_limit_speed"="140"] { - marker-file: url('symbols/de/lf7-140-sign.svg'); - } - ["signal_speed_limit_speed"="150"] { - marker-file: url('symbols/de/lf7-150-sign.svg'); - } - ["signal_speed_limit_speed"="160"] { - marker-file: url('symbols/de/lf7-160-sign.svg'); - } - ["signal_speed_limit_speed"="170"] { - marker-file: url('symbols/de/lf7-170-sign.svg'); - } - ["signal_speed_limit_speed"="180"] { - marker-file: url('symbols/de/lf7-180-sign.svg'); - } - ["signal_speed_limit_speed"="190"] { - marker-file: url('symbols/de/lf7-190-sign.svg'); - } - ["signal_speed_limit_speed"="200"] { - marker-file: url('symbols/de/lf7-200-sign.svg'); - } - } - - /* Austrian line speed signals (Geschwindigkeitstafel) */ - ["feature"="AT-V2:geschwindigkeitstafel"]["signal_speed_limit_form"="sign"] { - ["signal_speed_limit_speed"=~"^(1[0-6]0|[1-9][05])$"] { - marker-allow-overlap: true; - marker-width: 16; - marker-height: 16; - } - ["signal_speed_limit_speed"="10"] { - marker-file: url('symbols/at/geschwindigkeitstafel-10-sign.svg'); - } - ["signal_speed_limit_speed"="15"] { - marker-file: url('symbols/at/geschwindigkeitstafel-15-sign.svg'); - } - ["signal_speed_limit_speed"="20"] { - marker-file: url('symbols/at/geschwindigkeitstafel-20-sign.svg'); - } - ["signal_speed_limit_speed"="25"] { - marker-file: url('symbols/at/geschwindigkeitstafel-25-sign.svg'); - } - ["signal_speed_limit_speed"="30"] { - marker-file: url('symbols/at/geschwindigkeitstafel-30-sign.svg'); - } - ["signal_speed_limit_speed"="35"] { - marker-file: url('symbols/at/geschwindigkeitstafel-35-sign.svg'); - } - ["signal_speed_limit_speed"="40"] { - marker-file: url('symbols/at/geschwindigkeitstafel-40-sign.svg'); - } - ["signal_speed_limit_speed"="45"] { - marker-file: url('symbols/at/geschwindigkeitstafel-45-sign.svg'); - } - ["signal_speed_limit_speed"="50"] { - marker-file: url('symbols/at/geschwindigkeitstafel-50-sign.svg'); - } - ["signal_speed_limit_speed"="55"] { - marker-file: url('symbols/at/geschwindigkeitstafel-55-sign.svg'); - } - ["signal_speed_limit_speed"="60"] { - marker-file: url('symbols/at/geschwindigkeitstafel-60-sign.svg'); - } - ["signal_speed_limit_speed"="65"] { - marker-file: url('symbols/at/geschwindigkeitstafel-65-sign.svg'); - } - ["signal_speed_limit_speed"="70"] { - marker-file: url('symbols/at/geschwindigkeitstafel-70-sign.svg'); - } - ["signal_speed_limit_speed"="75"] { - marker-file: url('symbols/at/geschwindigkeitstafel-75-sign.svg'); - } - ["signal_speed_limit_speed"="80"] { - marker-file: url('symbols/at/geschwindigkeitstafel-80-sign.svg'); - } - ["signal_speed_limit_speed"="85"] { - marker-file: url('symbols/at/geschwindigkeitstafel-85-sign.svg'); - } - ["signal_speed_limit_speed"="90"] { - marker-file: url('symbols/at/geschwindigkeitstafel-90-sign.svg'); - } - ["signal_speed_limit_speed"="95"] { - marker-file: url('symbols/at/geschwindigkeitstafel-95-sign.svg'); - } - ["signal_speed_limit_speed"="100"] { - marker-file: url('symbols/at/geschwindigkeitstafel-100-sign.svg'); - } - ["signal_speed_limit_speed"="110"] { - marker-file: url('symbols/at/geschwindigkeitstafel-110-sign.svg'); - } - ["signal_speed_limit_speed"="120"] { - marker-file: url('symbols/at/geschwindigkeitstafel-120-sign.svg'); - } - ["signal_speed_limit_speed"="130"] { - marker-file: url('symbols/at/geschwindigkeitstafel-130-sign.svg'); - } - ["signal_speed_limit_speed"="140"] { - marker-file: url('symbols/at/geschwindigkeitstafel-140-sign.svg'); - } - ["signal_speed_limit_speed"="150"] { - marker-file: url('symbols/at/geschwindigkeitstafel-150-sign.svg'); - } - ["signal_speed_limit_speed"="160"] { - marker-file: url('symbols/at/geschwindigkeitstafel-160-sign.svg'); - } - } - - ["feature"="DE-HHA:l4"]["signal_speed_limit_form"="sign"] { - marker-allow-overlap: true; - marker-file: url('symbols/de/hha/l4.svg'); - marker-width: 11; - marker-height: 16; - } - } -} diff --git a/orm-simple.style b/orm-simple.style deleted file mode 100644 index 2bac36a8f..000000000 --- a/orm-simple.style +++ /dev/null @@ -1,22 +0,0 @@ -# osm2pgsql .style file OpenRailwayMap CartoCSS styles -# OsmType Tag DataType Flags -node,way abandoned text linear -node,way area text polygon # hard coded support for area=1/yes => polygon is in osm2pgsql -node,way bridge text linear -node,way construction text linear -node,way cutting text linear -node,way disused text linear -node ele text linear -node,way embankment text linear -node,way layer text linear -node,way man_made text polygon -node,way power text polygon -node,way proposed text linear -node,way public_transport text polygon -node,way railway text linear -node,way razed text linear -node,way service text linear -node,way tunnel text linear -node,way usage text linear -node,way z_order int4 linear # This is calculated during import -way way_area real linear # This is calculated during import diff --git a/proxy.Dockerfile b/proxy.Dockerfile new file mode 100644 index 000000000..627b46bcc --- /dev/null +++ b/proxy.Dockerfile @@ -0,0 +1,86 @@ +FROM node:22-alpine AS build-yaml + +WORKDIR /build + +RUN npm install yaml@2.8.1 + +FROM build-yaml AS build-styles + +RUN --mount=type=bind,source=proxy/js/styles.mjs,target=styles.mjs \ + --mount=type=bind,source=features,target=features \ + node /build/styles.mjs + +FROM build-yaml AS build-legend + +RUN --mount=type=bind,source=proxy/js/legend.mjs,target=legend.mjs \ + --mount=type=bind,source=features,target=features \ + node /build/legend.mjs \ + > /build/legend.json + +FROM build-yaml AS build-taginfo + +RUN npm install chroma-js@3.1.2 + +RUN --mount=type=bind,source=proxy,target=proxy \ + --mount=type=bind,source=features,target=features \ + node proxy/js/taginfo.mjs \ + > /build/taginfo.json + +FROM build-yaml AS build-features + +RUN --mount=type=bind,source=proxy/js/features.mjs,target=features.mjs \ + --mount=type=bind,source=features,target=features \ + node /build/features.mjs \ + > /build/features.json + +FROM python:3-alpine AS build-preset + +RUN apk add --no-cache zip + +RUN pip install --no-cache-dir \ + pyyaml \ + yattag + +WORKDIR /build + +ARG PRESET_VERSION +RUN --mount=type=bind,source=proxy/preset.py,target=preset.py \ + --mount=type=bind,source=features,target=features \ + python preset.py \ + > preset.xml + +RUN --mount=type=bind,source=symbols,target=symbols \ + zip -o /build/preset.zip -r -q \ + symbols \ + preset.xml + +FROM nginx:1-alpine + +COPY proxy/script/with-news-hash.sh /with-news-hash.sh +COPY proxy/proxy.conf.template /etc/nginx/templates/proxy.conf.template +COPY proxy/manifest.json /etc/nginx/public/manifest.json +COPY proxy/index.html /etc/nginx/public/index.html +COPY proxy/news.html /etc/nginx/public/news.html +COPY proxy/api /etc/nginx/public/api +COPY proxy/js /etc/nginx/public/js +COPY proxy/css /etc/nginx/public/css +COPY proxy/image /etc/nginx/public/image +COPY proxy/ssl /etc/nginx/ssl + +COPY --from=build-styles \ + /build /etc/nginx/public/style + +COPY --from=build-legend \ + /build/legend.json /etc/nginx/public/legend.json + +COPY --from=build-taginfo \ + /build/taginfo.json /etc/nginx/public/taginfo.json + +COPY --from=build-preset \ + /build/preset.zip /etc/nginx/public/preset.zip + +COPY --from=build-features \ + /build/features.json /etc/nginx/public/features.json + +ENTRYPOINT ["/with-news-hash.sh"] +CMD ["nginx", "-g", "daemon off;"] diff --git a/proxy.Dockerfile.dockerignore b/proxy.Dockerfile.dockerignore new file mode 100644 index 000000000..14b554dc4 --- /dev/null +++ b/proxy.Dockerfile.dockerignore @@ -0,0 +1,4 @@ +** +!proxy +!features +!symbols diff --git a/proxy/api/api.html b/proxy/api/api.html new file mode 100644 index 000000000..1dfc3ed30 --- /dev/null +++ b/proxy/api/api.html @@ -0,0 +1,22 @@ + + + + + + + OpenRailwayMap API + + + +
+ + + + diff --git a/proxy/api/openapi.yaml b/proxy/api/openapi.yaml new file mode 100644 index 000000000..eddbc05bd --- /dev/null +++ b/proxy/api/openapi.yaml @@ -0,0 +1,483 @@ +openapi: 3.1.0 + +info: + description: API to search for OpenRailwayMap-vector + contact: + name: Hidde Wieringa + email: openrailwaymap@hiddewieringa.nl + url: https://github.com/hiddewie/OpenRailwayMap-vector + license: + identifier: GPL-2.0-or-later + name: GNU General Public License v2.0 or later + title: OpenRailwayMap API + version: current + +servers: + - url: https://openrailwaymap.app + - url: http://localhost:8000 + +tags: + - name: search + description: Search API + - name: status + description: Status API + +externalDocs: + description: GitHub + url: https://github.com/hiddewie/OpenRailwayMap-vector#readme + +paths: + /api/status: + get: + operationId: status + description: Status endpoint + summary: Status endpoint + tags: + - status + + /api/replication_timestamp: + get: + operationId: replicationTimestamp + description: The replication timestamp of the OpenStreetMap data + summary: Replication endpoint + tags: + - replication + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + replication_timestamp: + type: string + + /api/facility: + get: + operationId: searchFacilities + summary: Facility search + description: | + The facility endpoint returns detail of a facility (station, junction, yard, …) by its name, UIC reference or reference. + + The parameters q, name, ref and uic_ref are mutually exclusive. + + It takes the first keyword of (name,uicref,ref) and the optional the operator to search for the data. + tags: + - search + parameters: + - name: q + in: query + schema: + type: string + example: Karlsruhe + description: | + search term (will be looked up in all `name=*` tags, `railway:ref=*` and `uic_ref=*`) + - name: name + in: query + schema: + type: string + example: Karlsruhe + description: | + search term (name search only) + - name: ref + in: query + schema: + type: string + example: Gd + description: | + search by official facility reference number/code only + - name: uic_ref + in: query + schema: + type: string + description: | + search by UIC reference number of a station (uses OSM tag `uic_ref=*`) + - name: limit + in: query + schema: + type: integer + default: 20 + maximum: 200 + description: maximum number of results + - name: lang + in: query + schema: + type: string + required: false + description: language to use for determining localized name + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + type: object + properties: + latitude: + type: number + longitude: + type: number + osm_ids: + type: array + items: + type: integer + description: | + OSM node ID + osm_types: + type: array + items: + type: string + enum: + - 'N' + - 'W' + description: | + The type of OSM object, same order as the IDs + name: + type: string + nullable: true + localized_name: + type: string + nullable: true + description: The localized name, if the `lang` parameter is given and present, otherwise equal to the name + railway: + type: string + nullable: true + station: + type: string + nullable: true + railway_ref: + type: string + nullable: true + uic_ref: + type: string + nullable: true + operator: + type: array + items: + type: string + network: + type: array + items: + type: string + wikidata: + type: array + items: + type: string + wikimedia_commons: + type: array + items: + type: string + image: + type: array + items: + type: string + mapillary: + type: array + items: + type: string + wikipedia: + type: array + items: + type: string + note: + type: array + items: + type: string + description: + type: array + items: + type: string + rank: + type: integer + description: | + an importance rank calculated by taking the public transport route relations into account using this station/halt + example: + - osm_ids: + - 271777826 + - 244129991 + - 1787945074 + - 1679221136 + osm_types: [N, N, N, N] + name: Landsberger Allee/Petersburger Straße + railway: tram_stop + railway_ref: + station: + uic_ref: + operator: [ ] + network: [ ] + wikidata: [ ] + wikimedia_commons: [ ] + image: [ ] + mapillary: [ ] + wikipedia: [ ] + note: [ ] + description: [ ] + latitude: 13.446564275 + longitude: 52.52637340222645 + rank: 32 + - osm_ids: + - 1860777038 + - 98878581 + osm_types: [N, N] + name: S Landsberger Allee + railway: tram_stop + railway_ref: + station: + uic_ref: + operator: [ ] + network: [ ] + wikidata: [ ] + wikimedia_commons: [ ] + image: [ ] + mapillary: [ ] + wikipedia: [ ] + note: [ ] + description: [ ] + latitude: 13.4564517 + longitude: 52.528652549251355 + rank: 28 + - osm_ids: + - 3872632789 + osm_types: [N] + name: Landsberger Allee + railway: station + railway_ref: BLST + station: light_rail + uic_ref: '8089020' + operator: + - DB InfraGO AG + network: + - Verkehrsverbund Berlin-Brandenburg + wikidata: + - Q800507 + wikimedia_commons: [ ] + image: [ ] + mapillary: [ ] + wikipedia: + - de:Bahnhof Berlin Landsberger Allee + note: [ ] + description: [ ] + latitude: 13.454780299999998 + longitude: 52.52948199908725 + rank: 16 + '400': + description: | + Bad request: invalid parameter values + + /api/milestone: + get: + operationId: searchMilestones + summary: Milestone search + description: | + The milestone endpoint returns the position of milestones or other items such as signals or level crossings with a mapped position on a line. + + The API will return the features within a maximum distance of 10 km (hardcoded). The presence of an `operator=*` tag on the tracks is honoured, it will be used to + distinguish reference numbers used by different infrastructure operators and/or in different countries. + + Mileage is read from the OSM tags `railway:position=*` and `railway:position:exact=*` with precedence of the exact mileage. The tracks must be tagged with a reference number (OSM tag `ref=*`). + + The tracks must not tagged with `service=*` (this condition does not apply to tracks with `usage=industrial/military/test`). + + Negative mileage is supported but gaps in mileage or duplicated positions (if railway lines are reroute) are not supported. For example, you cannot query for `16.8+200` or things like that. + tags: + - search + parameters: + - name: ref + required: true + in: query + schema: + type: string + example: '4201' + description: | + reference number of the railway route the mileage refers to (in this case, route means lines as infrastructure, not the services using the tracks) + - name: position + required: true + in: query + schema: + type: number + example: 18.4 + description: | + position (can be negative) + - name: limit + in: query + schema: + type: integer + default: 20 + maximum: 200 + description: maximum number of results + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + type: object + properties: + latitude: + type: number + longitude: + type: number + osm_id: + type: integer + description: | + OSM node ID + line_ref: + type: string + description: | + Reference number of the railway line the feature is located on. + nullable: true + milestone_ref: + type: string + nullable: true + description: | + Reference number of the feature. + operator: + type: string + description: | + operator of the infrastructure + nullable: true + railway: + type: string + description: | + type of the facility following Tagging rules (https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging#Operating_Sites), e.g. `milestone`, `level_crossing`, `signal`. + nullable: true + position: + type: string + description: | + Mileage of the feature + nullable: true + wikidata: + type: string + nullable: true + wikimedia_commons: + type: string + nullable: true + image: + type: string + nullable: true + mapillary: + type: string + nullable: true + wikipedia: + type: string + nullable: true + note: + type: string + nullable: true + description: + type: string + nullable: true + example: + - description: + image: + latitude: 13.372542999999999 + line_ref: '6020' + longitude: 52.471930899089024 + mapillary: + milestone_ref: + note: + operator: DB InfraGO AG + osm_id: 11562536788 + position: 22.7 + railway: milestone + wikidata: + wikimedia_commons: + wikipedia: + - description: + image: + latitude: 13.3739671 + line_ref: '6020' + longitude: 52.47137729908903 + mapillary: + milestone_ref: + note: + operator: DB InfraGO AG + osm_id: 11558214672 + position: 22.6 + railway: milestone + wikidata: + wikimedia_commons: + wikipedia: + '400': + description: | + Bad request: invalid parameter values + + /api/wikidata/{entity}: + get: + operationId: wikidataImage + summary: Find the image from Wikidata + description: | + The Wikidata image endpoint returns the URL of the image thumbnail for a given Wikidata entity. + tags: + - wikidata + parameters: + - name: entity + required: true + in: path + schema: + type: string + example: 'Q2655858' + description: | + The Wikidata entity ID + responses: + '404': + description: Entity not found + content: + text/plain: + schema: + type: string + description: The reason that the entity was not found + '307': + description: | + Location of the Wikikdata thumbnail image + + /api/route/{osm_id}: + get: + operationId: route + summary: Fetch a route + description: | + The route API returns the geometry and metadata of railway, tram, subway and lightrail OpenStreetMap route relations. + tags: + - route + parameters: + - name: osm_id + required: true + in: path + schema: + type: integer + example: 324092 + description: | + The OpenStreetMap route relation ID + responses: + '200': + description: Success + content: + application/geo+json: + schema: + type: object + description: | + A single GeoJSON feature containing the geometry and features of the route + example: + id: 64050 + type: Feature + geometry: + type: 'MultiLineString' + coordinates: [[[5.9004266, 51.985173599], [5.900491, 51.985163999]]] + properties: + to: 'S Spindlersfeld' + ref: 'S47' + from: 'S Hermannstraße' + name: 'S47: S Hermannstraße => S Spindlersfeld' + type: 'light_rail' + brand: null + color: '#BA8A4D' + osm_id: 64050 + operator: 'S-Bahn Berlin GmbH' + '404': + description: | + The route could not be found diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-grid.css b/proxy/css/bootstrap-5.3.3/bootstrap-grid.css new file mode 100644 index 000000000..3882a8199 --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-grid.css @@ -0,0 +1,4085 @@ +/*! + * Bootstrap Grid v5.3.3 (https://getbootstrap.com/) + * Copyright 2011-2024 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +.container, +.container-fluid, +.container-xxl, +.container-xl, +.container-lg, +.container-md, +.container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .container-sm, .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container-md, .container-sm, .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container-lg, .container-md, .container-sm, .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1320px; + } +} +:root { + --bs-breakpoint-xs: 0; + --bs-breakpoint-sm: 576px; + --bs-breakpoint-md: 768px; + --bs-breakpoint-lg: 992px; + --bs-breakpoint-xl: 1200px; + --bs-breakpoint-xxl: 1400px; +} + +.row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} +.row > * { + box-sizing: border-box; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.33333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-left: 8.33333333%; +} + +.offset-2 { + margin-left: 16.66666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.33333333%; +} + +.offset-5 { + margin-left: 41.66666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.33333333%; +} + +.offset-8 { + margin-left: 66.66666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.33333333%; +} + +.offset-11 { + margin-left: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.33333333%; + } + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.33333333%; + } + .offset-sm-2 { + margin-left: 16.66666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.33333333%; + } + .offset-sm-5 { + margin-left: 41.66666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.33333333%; + } + .offset-sm-8 { + margin-left: 66.66666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.33333333%; + } + .offset-sm-11 { + margin-left: 91.66666667%; + } + .g-sm-0, + .gx-sm-0 { + --bs-gutter-x: 0; + } + .g-sm-0, + .gy-sm-0 { + --bs-gutter-y: 0; + } + .g-sm-1, + .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + .g-sm-1, + .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + .g-sm-2, + .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + .g-sm-2, + .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + .g-sm-3, + .gx-sm-3 { + --bs-gutter-x: 1rem; + } + .g-sm-3, + .gy-sm-3 { + --bs-gutter-y: 1rem; + } + .g-sm-4, + .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + .g-sm-4, + .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + .g-sm-5, + .gx-sm-5 { + --bs-gutter-x: 3rem; + } + .g-sm-5, + .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.33333333%; + } + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333333%; + } + .offset-md-2 { + margin-left: 16.66666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333333%; + } + .offset-md-5 { + margin-left: 41.66666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333333%; + } + .offset-md-8 { + margin-left: 66.66666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333333%; + } + .offset-md-11 { + margin-left: 91.66666667%; + } + .g-md-0, + .gx-md-0 { + --bs-gutter-x: 0; + } + .g-md-0, + .gy-md-0 { + --bs-gutter-y: 0; + } + .g-md-1, + .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + .g-md-1, + .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + .g-md-2, + .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + .g-md-2, + .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + .g-md-3, + .gx-md-3 { + --bs-gutter-x: 1rem; + } + .g-md-3, + .gy-md-3 { + --bs-gutter-y: 1rem; + } + .g-md-4, + .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + .g-md-4, + .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + .g-md-5, + .gx-md-5 { + --bs-gutter-x: 3rem; + } + .g-md-5, + .gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.33333333%; + } + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.33333333%; + } + .offset-lg-2 { + margin-left: 16.66666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.33333333%; + } + .offset-lg-5 { + margin-left: 41.66666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.33333333%; + } + .offset-lg-8 { + margin-left: 66.66666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.33333333%; + } + .offset-lg-11 { + margin-left: 91.66666667%; + } + .g-lg-0, + .gx-lg-0 { + --bs-gutter-x: 0; + } + .g-lg-0, + .gy-lg-0 { + --bs-gutter-y: 0; + } + .g-lg-1, + .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + .g-lg-1, + .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + .g-lg-2, + .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + .g-lg-2, + .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + .g-lg-3, + .gx-lg-3 { + --bs-gutter-x: 1rem; + } + .g-lg-3, + .gy-lg-3 { + --bs-gutter-y: 1rem; + } + .g-lg-4, + .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + .g-lg-4, + .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + .g-lg-5, + .gx-lg-5 { + --bs-gutter-x: 3rem; + } + .g-lg-5, + .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.33333333%; + } + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333333%; + } + .offset-xl-2 { + margin-left: 16.66666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333333%; + } + .offset-xl-5 { + margin-left: 41.66666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333333%; + } + .offset-xl-8 { + margin-left: 66.66666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333333%; + } + .offset-xl-11 { + margin-left: 91.66666667%; + } + .g-xl-0, + .gx-xl-0 { + --bs-gutter-x: 0; + } + .g-xl-0, + .gy-xl-0 { + --bs-gutter-y: 0; + } + .g-xl-1, + .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xl-1, + .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xl-2, + .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xl-2, + .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xl-3, + .gx-xl-3 { + --bs-gutter-x: 1rem; + } + .g-xl-3, + .gy-xl-3 { + --bs-gutter-y: 1rem; + } + .g-xl-4, + .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xl-4, + .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xl-5, + .gx-xl-5 { + --bs-gutter-x: 3rem; + } + .g-xl-5, + .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.33333333%; + } + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xxl-0 { + margin-left: 0; + } + .offset-xxl-1 { + margin-left: 8.33333333%; + } + .offset-xxl-2 { + margin-left: 16.66666667%; + } + .offset-xxl-3 { + margin-left: 25%; + } + .offset-xxl-4 { + margin-left: 33.33333333%; + } + .offset-xxl-5 { + margin-left: 41.66666667%; + } + .offset-xxl-6 { + margin-left: 50%; + } + .offset-xxl-7 { + margin-left: 58.33333333%; + } + .offset-xxl-8 { + margin-left: 66.66666667%; + } + .offset-xxl-9 { + margin-left: 75%; + } + .offset-xxl-10 { + margin-left: 83.33333333%; + } + .offset-xxl-11 { + margin-left: 91.66666667%; + } + .g-xxl-0, + .gx-xxl-0 { + --bs-gutter-x: 0; + } + .g-xxl-0, + .gy-xxl-0 { + --bs-gutter-y: 0; + } + .g-xxl-1, + .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xxl-1, + .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xxl-2, + .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xxl-2, + .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xxl-3, + .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + .g-xxl-3, + .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + .g-xxl-4, + .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xxl-4, + .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xxl-5, + .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + .g-xxl-5, + .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-inline-grid { + display: inline-grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-right: 0 !important; +} + +.me-1 { + margin-right: 0.25rem !important; +} + +.me-2 { + margin-right: 0.5rem !important; +} + +.me-3 { + margin-right: 1rem !important; +} + +.me-4 { + margin-right: 1.5rem !important; +} + +.me-5 { + margin-right: 3rem !important; +} + +.me-auto { + margin-right: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-left: 0 !important; +} + +.ms-1 { + margin-left: 0.25rem !important; +} + +.ms-2 { + margin-left: 0.5rem !important; +} + +.ms-3 { + margin-left: 1rem !important; +} + +.ms-4 { + margin-left: 1.5rem !important; +} + +.ms-5 { + margin-left: 3rem !important; +} + +.ms-auto { + margin-left: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-right: 0 !important; +} + +.pe-1 { + padding-right: 0.25rem !important; +} + +.pe-2 { + padding-right: 0.5rem !important; +} + +.pe-3 { + padding-right: 1rem !important; +} + +.pe-4 { + padding-right: 1.5rem !important; +} + +.pe-5 { + padding-right: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-left: 0 !important; +} + +.ps-1 { + padding-left: 0.25rem !important; +} + +.ps-2 { + padding-left: 0.5rem !important; +} + +.ps-3 { + padding-left: 1rem !important; +} + +.ps-4 { + padding-left: 1.5rem !important; +} + +.ps-5 { + padding-left: 3rem !important; +} + +@media (min-width: 576px) { + .d-sm-inline { + display: inline !important; + } + .d-sm-inline-block { + display: inline-block !important; + } + .d-sm-block { + display: block !important; + } + .d-sm-grid { + display: grid !important; + } + .d-sm-inline-grid { + display: inline-grid !important; + } + .d-sm-table { + display: table !important; + } + .d-sm-table-row { + display: table-row !important; + } + .d-sm-table-cell { + display: table-cell !important; + } + .d-sm-flex { + display: flex !important; + } + .d-sm-inline-flex { + display: inline-flex !important; + } + .d-sm-none { + display: none !important; + } + .flex-sm-fill { + flex: 1 1 auto !important; + } + .flex-sm-row { + flex-direction: row !important; + } + .flex-sm-column { + flex-direction: column !important; + } + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + .flex-sm-wrap { + flex-wrap: wrap !important; + } + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-sm-start { + justify-content: flex-start !important; + } + .justify-content-sm-end { + justify-content: flex-end !important; + } + .justify-content-sm-center { + justify-content: center !important; + } + .justify-content-sm-between { + justify-content: space-between !important; + } + .justify-content-sm-around { + justify-content: space-around !important; + } + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + .align-items-sm-start { + align-items: flex-start !important; + } + .align-items-sm-end { + align-items: flex-end !important; + } + .align-items-sm-center { + align-items: center !important; + } + .align-items-sm-baseline { + align-items: baseline !important; + } + .align-items-sm-stretch { + align-items: stretch !important; + } + .align-content-sm-start { + align-content: flex-start !important; + } + .align-content-sm-end { + align-content: flex-end !important; + } + .align-content-sm-center { + align-content: center !important; + } + .align-content-sm-between { + align-content: space-between !important; + } + .align-content-sm-around { + align-content: space-around !important; + } + .align-content-sm-stretch { + align-content: stretch !important; + } + .align-self-sm-auto { + align-self: auto !important; + } + .align-self-sm-start { + align-self: flex-start !important; + } + .align-self-sm-end { + align-self: flex-end !important; + } + .align-self-sm-center { + align-self: center !important; + } + .align-self-sm-baseline { + align-self: baseline !important; + } + .align-self-sm-stretch { + align-self: stretch !important; + } + .order-sm-first { + order: -1 !important; + } + .order-sm-0 { + order: 0 !important; + } + .order-sm-1 { + order: 1 !important; + } + .order-sm-2 { + order: 2 !important; + } + .order-sm-3 { + order: 3 !important; + } + .order-sm-4 { + order: 4 !important; + } + .order-sm-5 { + order: 5 !important; + } + .order-sm-last { + order: 6 !important; + } + .m-sm-0 { + margin: 0 !important; + } + .m-sm-1 { + margin: 0.25rem !important; + } + .m-sm-2 { + margin: 0.5rem !important; + } + .m-sm-3 { + margin: 1rem !important; + } + .m-sm-4 { + margin: 1.5rem !important; + } + .m-sm-5 { + margin: 3rem !important; + } + .m-sm-auto { + margin: auto !important; + } + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-sm-0 { + margin-top: 0 !important; + } + .mt-sm-1 { + margin-top: 0.25rem !important; + } + .mt-sm-2 { + margin-top: 0.5rem !important; + } + .mt-sm-3 { + margin-top: 1rem !important; + } + .mt-sm-4 { + margin-top: 1.5rem !important; + } + .mt-sm-5 { + margin-top: 3rem !important; + } + .mt-sm-auto { + margin-top: auto !important; + } + .me-sm-0 { + margin-right: 0 !important; + } + .me-sm-1 { + margin-right: 0.25rem !important; + } + .me-sm-2 { + margin-right: 0.5rem !important; + } + .me-sm-3 { + margin-right: 1rem !important; + } + .me-sm-4 { + margin-right: 1.5rem !important; + } + .me-sm-5 { + margin-right: 3rem !important; + } + .me-sm-auto { + margin-right: auto !important; + } + .mb-sm-0 { + margin-bottom: 0 !important; + } + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + .mb-sm-3 { + margin-bottom: 1rem !important; + } + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + .mb-sm-5 { + margin-bottom: 3rem !important; + } + .mb-sm-auto { + margin-bottom: auto !important; + } + .ms-sm-0 { + margin-left: 0 !important; + } + .ms-sm-1 { + margin-left: 0.25rem !important; + } + .ms-sm-2 { + margin-left: 0.5rem !important; + } + .ms-sm-3 { + margin-left: 1rem !important; + } + .ms-sm-4 { + margin-left: 1.5rem !important; + } + .ms-sm-5 { + margin-left: 3rem !important; + } + .ms-sm-auto { + margin-left: auto !important; + } + .p-sm-0 { + padding: 0 !important; + } + .p-sm-1 { + padding: 0.25rem !important; + } + .p-sm-2 { + padding: 0.5rem !important; + } + .p-sm-3 { + padding: 1rem !important; + } + .p-sm-4 { + padding: 1.5rem !important; + } + .p-sm-5 { + padding: 3rem !important; + } + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-sm-0 { + padding-top: 0 !important; + } + .pt-sm-1 { + padding-top: 0.25rem !important; + } + .pt-sm-2 { + padding-top: 0.5rem !important; + } + .pt-sm-3 { + padding-top: 1rem !important; + } + .pt-sm-4 { + padding-top: 1.5rem !important; + } + .pt-sm-5 { + padding-top: 3rem !important; + } + .pe-sm-0 { + padding-right: 0 !important; + } + .pe-sm-1 { + padding-right: 0.25rem !important; + } + .pe-sm-2 { + padding-right: 0.5rem !important; + } + .pe-sm-3 { + padding-right: 1rem !important; + } + .pe-sm-4 { + padding-right: 1.5rem !important; + } + .pe-sm-5 { + padding-right: 3rem !important; + } + .pb-sm-0 { + padding-bottom: 0 !important; + } + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + .pb-sm-3 { + padding-bottom: 1rem !important; + } + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + .pb-sm-5 { + padding-bottom: 3rem !important; + } + .ps-sm-0 { + padding-left: 0 !important; + } + .ps-sm-1 { + padding-left: 0.25rem !important; + } + .ps-sm-2 { + padding-left: 0.5rem !important; + } + .ps-sm-3 { + padding-left: 1rem !important; + } + .ps-sm-4 { + padding-left: 1.5rem !important; + } + .ps-sm-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 768px) { + .d-md-inline { + display: inline !important; + } + .d-md-inline-block { + display: inline-block !important; + } + .d-md-block { + display: block !important; + } + .d-md-grid { + display: grid !important; + } + .d-md-inline-grid { + display: inline-grid !important; + } + .d-md-table { + display: table !important; + } + .d-md-table-row { + display: table-row !important; + } + .d-md-table-cell { + display: table-cell !important; + } + .d-md-flex { + display: flex !important; + } + .d-md-inline-flex { + display: inline-flex !important; + } + .d-md-none { + display: none !important; + } + .flex-md-fill { + flex: 1 1 auto !important; + } + .flex-md-row { + flex-direction: row !important; + } + .flex-md-column { + flex-direction: column !important; + } + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + .flex-md-grow-0 { + flex-grow: 0 !important; + } + .flex-md-grow-1 { + flex-grow: 1 !important; + } + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + .flex-md-wrap { + flex-wrap: wrap !important; + } + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-md-start { + justify-content: flex-start !important; + } + .justify-content-md-end { + justify-content: flex-end !important; + } + .justify-content-md-center { + justify-content: center !important; + } + .justify-content-md-between { + justify-content: space-between !important; + } + .justify-content-md-around { + justify-content: space-around !important; + } + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + .align-items-md-start { + align-items: flex-start !important; + } + .align-items-md-end { + align-items: flex-end !important; + } + .align-items-md-center { + align-items: center !important; + } + .align-items-md-baseline { + align-items: baseline !important; + } + .align-items-md-stretch { + align-items: stretch !important; + } + .align-content-md-start { + align-content: flex-start !important; + } + .align-content-md-end { + align-content: flex-end !important; + } + .align-content-md-center { + align-content: center !important; + } + .align-content-md-between { + align-content: space-between !important; + } + .align-content-md-around { + align-content: space-around !important; + } + .align-content-md-stretch { + align-content: stretch !important; + } + .align-self-md-auto { + align-self: auto !important; + } + .align-self-md-start { + align-self: flex-start !important; + } + .align-self-md-end { + align-self: flex-end !important; + } + .align-self-md-center { + align-self: center !important; + } + .align-self-md-baseline { + align-self: baseline !important; + } + .align-self-md-stretch { + align-self: stretch !important; + } + .order-md-first { + order: -1 !important; + } + .order-md-0 { + order: 0 !important; + } + .order-md-1 { + order: 1 !important; + } + .order-md-2 { + order: 2 !important; + } + .order-md-3 { + order: 3 !important; + } + .order-md-4 { + order: 4 !important; + } + .order-md-5 { + order: 5 !important; + } + .order-md-last { + order: 6 !important; + } + .m-md-0 { + margin: 0 !important; + } + .m-md-1 { + margin: 0.25rem !important; + } + .m-md-2 { + margin: 0.5rem !important; + } + .m-md-3 { + margin: 1rem !important; + } + .m-md-4 { + margin: 1.5rem !important; + } + .m-md-5 { + margin: 3rem !important; + } + .m-md-auto { + margin: auto !important; + } + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-md-0 { + margin-top: 0 !important; + } + .mt-md-1 { + margin-top: 0.25rem !important; + } + .mt-md-2 { + margin-top: 0.5rem !important; + } + .mt-md-3 { + margin-top: 1rem !important; + } + .mt-md-4 { + margin-top: 1.5rem !important; + } + .mt-md-5 { + margin-top: 3rem !important; + } + .mt-md-auto { + margin-top: auto !important; + } + .me-md-0 { + margin-right: 0 !important; + } + .me-md-1 { + margin-right: 0.25rem !important; + } + .me-md-2 { + margin-right: 0.5rem !important; + } + .me-md-3 { + margin-right: 1rem !important; + } + .me-md-4 { + margin-right: 1.5rem !important; + } + .me-md-5 { + margin-right: 3rem !important; + } + .me-md-auto { + margin-right: auto !important; + } + .mb-md-0 { + margin-bottom: 0 !important; + } + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + .mb-md-3 { + margin-bottom: 1rem !important; + } + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + .mb-md-5 { + margin-bottom: 3rem !important; + } + .mb-md-auto { + margin-bottom: auto !important; + } + .ms-md-0 { + margin-left: 0 !important; + } + .ms-md-1 { + margin-left: 0.25rem !important; + } + .ms-md-2 { + margin-left: 0.5rem !important; + } + .ms-md-3 { + margin-left: 1rem !important; + } + .ms-md-4 { + margin-left: 1.5rem !important; + } + .ms-md-5 { + margin-left: 3rem !important; + } + .ms-md-auto { + margin-left: auto !important; + } + .p-md-0 { + padding: 0 !important; + } + .p-md-1 { + padding: 0.25rem !important; + } + .p-md-2 { + padding: 0.5rem !important; + } + .p-md-3 { + padding: 1rem !important; + } + .p-md-4 { + padding: 1.5rem !important; + } + .p-md-5 { + padding: 3rem !important; + } + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-md-0 { + padding-top: 0 !important; + } + .pt-md-1 { + padding-top: 0.25rem !important; + } + .pt-md-2 { + padding-top: 0.5rem !important; + } + .pt-md-3 { + padding-top: 1rem !important; + } + .pt-md-4 { + padding-top: 1.5rem !important; + } + .pt-md-5 { + padding-top: 3rem !important; + } + .pe-md-0 { + padding-right: 0 !important; + } + .pe-md-1 { + padding-right: 0.25rem !important; + } + .pe-md-2 { + padding-right: 0.5rem !important; + } + .pe-md-3 { + padding-right: 1rem !important; + } + .pe-md-4 { + padding-right: 1.5rem !important; + } + .pe-md-5 { + padding-right: 3rem !important; + } + .pb-md-0 { + padding-bottom: 0 !important; + } + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + .pb-md-3 { + padding-bottom: 1rem !important; + } + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + .pb-md-5 { + padding-bottom: 3rem !important; + } + .ps-md-0 { + padding-left: 0 !important; + } + .ps-md-1 { + padding-left: 0.25rem !important; + } + .ps-md-2 { + padding-left: 0.5rem !important; + } + .ps-md-3 { + padding-left: 1rem !important; + } + .ps-md-4 { + padding-left: 1.5rem !important; + } + .ps-md-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 992px) { + .d-lg-inline { + display: inline !important; + } + .d-lg-inline-block { + display: inline-block !important; + } + .d-lg-block { + display: block !important; + } + .d-lg-grid { + display: grid !important; + } + .d-lg-inline-grid { + display: inline-grid !important; + } + .d-lg-table { + display: table !important; + } + .d-lg-table-row { + display: table-row !important; + } + .d-lg-table-cell { + display: table-cell !important; + } + .d-lg-flex { + display: flex !important; + } + .d-lg-inline-flex { + display: inline-flex !important; + } + .d-lg-none { + display: none !important; + } + .flex-lg-fill { + flex: 1 1 auto !important; + } + .flex-lg-row { + flex-direction: row !important; + } + .flex-lg-column { + flex-direction: column !important; + } + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + .flex-lg-wrap { + flex-wrap: wrap !important; + } + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-lg-start { + justify-content: flex-start !important; + } + .justify-content-lg-end { + justify-content: flex-end !important; + } + .justify-content-lg-center { + justify-content: center !important; + } + .justify-content-lg-between { + justify-content: space-between !important; + } + .justify-content-lg-around { + justify-content: space-around !important; + } + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + .align-items-lg-start { + align-items: flex-start !important; + } + .align-items-lg-end { + align-items: flex-end !important; + } + .align-items-lg-center { + align-items: center !important; + } + .align-items-lg-baseline { + align-items: baseline !important; + } + .align-items-lg-stretch { + align-items: stretch !important; + } + .align-content-lg-start { + align-content: flex-start !important; + } + .align-content-lg-end { + align-content: flex-end !important; + } + .align-content-lg-center { + align-content: center !important; + } + .align-content-lg-between { + align-content: space-between !important; + } + .align-content-lg-around { + align-content: space-around !important; + } + .align-content-lg-stretch { + align-content: stretch !important; + } + .align-self-lg-auto { + align-self: auto !important; + } + .align-self-lg-start { + align-self: flex-start !important; + } + .align-self-lg-end { + align-self: flex-end !important; + } + .align-self-lg-center { + align-self: center !important; + } + .align-self-lg-baseline { + align-self: baseline !important; + } + .align-self-lg-stretch { + align-self: stretch !important; + } + .order-lg-first { + order: -1 !important; + } + .order-lg-0 { + order: 0 !important; + } + .order-lg-1 { + order: 1 !important; + } + .order-lg-2 { + order: 2 !important; + } + .order-lg-3 { + order: 3 !important; + } + .order-lg-4 { + order: 4 !important; + } + .order-lg-5 { + order: 5 !important; + } + .order-lg-last { + order: 6 !important; + } + .m-lg-0 { + margin: 0 !important; + } + .m-lg-1 { + margin: 0.25rem !important; + } + .m-lg-2 { + margin: 0.5rem !important; + } + .m-lg-3 { + margin: 1rem !important; + } + .m-lg-4 { + margin: 1.5rem !important; + } + .m-lg-5 { + margin: 3rem !important; + } + .m-lg-auto { + margin: auto !important; + } + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-lg-0 { + margin-top: 0 !important; + } + .mt-lg-1 { + margin-top: 0.25rem !important; + } + .mt-lg-2 { + margin-top: 0.5rem !important; + } + .mt-lg-3 { + margin-top: 1rem !important; + } + .mt-lg-4 { + margin-top: 1.5rem !important; + } + .mt-lg-5 { + margin-top: 3rem !important; + } + .mt-lg-auto { + margin-top: auto !important; + } + .me-lg-0 { + margin-right: 0 !important; + } + .me-lg-1 { + margin-right: 0.25rem !important; + } + .me-lg-2 { + margin-right: 0.5rem !important; + } + .me-lg-3 { + margin-right: 1rem !important; + } + .me-lg-4 { + margin-right: 1.5rem !important; + } + .me-lg-5 { + margin-right: 3rem !important; + } + .me-lg-auto { + margin-right: auto !important; + } + .mb-lg-0 { + margin-bottom: 0 !important; + } + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + .mb-lg-3 { + margin-bottom: 1rem !important; + } + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + .mb-lg-5 { + margin-bottom: 3rem !important; + } + .mb-lg-auto { + margin-bottom: auto !important; + } + .ms-lg-0 { + margin-left: 0 !important; + } + .ms-lg-1 { + margin-left: 0.25rem !important; + } + .ms-lg-2 { + margin-left: 0.5rem !important; + } + .ms-lg-3 { + margin-left: 1rem !important; + } + .ms-lg-4 { + margin-left: 1.5rem !important; + } + .ms-lg-5 { + margin-left: 3rem !important; + } + .ms-lg-auto { + margin-left: auto !important; + } + .p-lg-0 { + padding: 0 !important; + } + .p-lg-1 { + padding: 0.25rem !important; + } + .p-lg-2 { + padding: 0.5rem !important; + } + .p-lg-3 { + padding: 1rem !important; + } + .p-lg-4 { + padding: 1.5rem !important; + } + .p-lg-5 { + padding: 3rem !important; + } + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-lg-0 { + padding-top: 0 !important; + } + .pt-lg-1 { + padding-top: 0.25rem !important; + } + .pt-lg-2 { + padding-top: 0.5rem !important; + } + .pt-lg-3 { + padding-top: 1rem !important; + } + .pt-lg-4 { + padding-top: 1.5rem !important; + } + .pt-lg-5 { + padding-top: 3rem !important; + } + .pe-lg-0 { + padding-right: 0 !important; + } + .pe-lg-1 { + padding-right: 0.25rem !important; + } + .pe-lg-2 { + padding-right: 0.5rem !important; + } + .pe-lg-3 { + padding-right: 1rem !important; + } + .pe-lg-4 { + padding-right: 1.5rem !important; + } + .pe-lg-5 { + padding-right: 3rem !important; + } + .pb-lg-0 { + padding-bottom: 0 !important; + } + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + .pb-lg-3 { + padding-bottom: 1rem !important; + } + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + .pb-lg-5 { + padding-bottom: 3rem !important; + } + .ps-lg-0 { + padding-left: 0 !important; + } + .ps-lg-1 { + padding-left: 0.25rem !important; + } + .ps-lg-2 { + padding-left: 0.5rem !important; + } + .ps-lg-3 { + padding-left: 1rem !important; + } + .ps-lg-4 { + padding-left: 1.5rem !important; + } + .ps-lg-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1200px) { + .d-xl-inline { + display: inline !important; + } + .d-xl-inline-block { + display: inline-block !important; + } + .d-xl-block { + display: block !important; + } + .d-xl-grid { + display: grid !important; + } + .d-xl-inline-grid { + display: inline-grid !important; + } + .d-xl-table { + display: table !important; + } + .d-xl-table-row { + display: table-row !important; + } + .d-xl-table-cell { + display: table-cell !important; + } + .d-xl-flex { + display: flex !important; + } + .d-xl-inline-flex { + display: inline-flex !important; + } + .d-xl-none { + display: none !important; + } + .flex-xl-fill { + flex: 1 1 auto !important; + } + .flex-xl-row { + flex-direction: row !important; + } + .flex-xl-column { + flex-direction: column !important; + } + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xl-wrap { + flex-wrap: wrap !important; + } + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xl-start { + justify-content: flex-start !important; + } + .justify-content-xl-end { + justify-content: flex-end !important; + } + .justify-content-xl-center { + justify-content: center !important; + } + .justify-content-xl-between { + justify-content: space-between !important; + } + .justify-content-xl-around { + justify-content: space-around !important; + } + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + .align-items-xl-start { + align-items: flex-start !important; + } + .align-items-xl-end { + align-items: flex-end !important; + } + .align-items-xl-center { + align-items: center !important; + } + .align-items-xl-baseline { + align-items: baseline !important; + } + .align-items-xl-stretch { + align-items: stretch !important; + } + .align-content-xl-start { + align-content: flex-start !important; + } + .align-content-xl-end { + align-content: flex-end !important; + } + .align-content-xl-center { + align-content: center !important; + } + .align-content-xl-between { + align-content: space-between !important; + } + .align-content-xl-around { + align-content: space-around !important; + } + .align-content-xl-stretch { + align-content: stretch !important; + } + .align-self-xl-auto { + align-self: auto !important; + } + .align-self-xl-start { + align-self: flex-start !important; + } + .align-self-xl-end { + align-self: flex-end !important; + } + .align-self-xl-center { + align-self: center !important; + } + .align-self-xl-baseline { + align-self: baseline !important; + } + .align-self-xl-stretch { + align-self: stretch !important; + } + .order-xl-first { + order: -1 !important; + } + .order-xl-0 { + order: 0 !important; + } + .order-xl-1 { + order: 1 !important; + } + .order-xl-2 { + order: 2 !important; + } + .order-xl-3 { + order: 3 !important; + } + .order-xl-4 { + order: 4 !important; + } + .order-xl-5 { + order: 5 !important; + } + .order-xl-last { + order: 6 !important; + } + .m-xl-0 { + margin: 0 !important; + } + .m-xl-1 { + margin: 0.25rem !important; + } + .m-xl-2 { + margin: 0.5rem !important; + } + .m-xl-3 { + margin: 1rem !important; + } + .m-xl-4 { + margin: 1.5rem !important; + } + .m-xl-5 { + margin: 3rem !important; + } + .m-xl-auto { + margin: auto !important; + } + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xl-0 { + margin-top: 0 !important; + } + .mt-xl-1 { + margin-top: 0.25rem !important; + } + .mt-xl-2 { + margin-top: 0.5rem !important; + } + .mt-xl-3 { + margin-top: 1rem !important; + } + .mt-xl-4 { + margin-top: 1.5rem !important; + } + .mt-xl-5 { + margin-top: 3rem !important; + } + .mt-xl-auto { + margin-top: auto !important; + } + .me-xl-0 { + margin-right: 0 !important; + } + .me-xl-1 { + margin-right: 0.25rem !important; + } + .me-xl-2 { + margin-right: 0.5rem !important; + } + .me-xl-3 { + margin-right: 1rem !important; + } + .me-xl-4 { + margin-right: 1.5rem !important; + } + .me-xl-5 { + margin-right: 3rem !important; + } + .me-xl-auto { + margin-right: auto !important; + } + .mb-xl-0 { + margin-bottom: 0 !important; + } + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xl-3 { + margin-bottom: 1rem !important; + } + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xl-5 { + margin-bottom: 3rem !important; + } + .mb-xl-auto { + margin-bottom: auto !important; + } + .ms-xl-0 { + margin-left: 0 !important; + } + .ms-xl-1 { + margin-left: 0.25rem !important; + } + .ms-xl-2 { + margin-left: 0.5rem !important; + } + .ms-xl-3 { + margin-left: 1rem !important; + } + .ms-xl-4 { + margin-left: 1.5rem !important; + } + .ms-xl-5 { + margin-left: 3rem !important; + } + .ms-xl-auto { + margin-left: auto !important; + } + .p-xl-0 { + padding: 0 !important; + } + .p-xl-1 { + padding: 0.25rem !important; + } + .p-xl-2 { + padding: 0.5rem !important; + } + .p-xl-3 { + padding: 1rem !important; + } + .p-xl-4 { + padding: 1.5rem !important; + } + .p-xl-5 { + padding: 3rem !important; + } + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xl-0 { + padding-top: 0 !important; + } + .pt-xl-1 { + padding-top: 0.25rem !important; + } + .pt-xl-2 { + padding-top: 0.5rem !important; + } + .pt-xl-3 { + padding-top: 1rem !important; + } + .pt-xl-4 { + padding-top: 1.5rem !important; + } + .pt-xl-5 { + padding-top: 3rem !important; + } + .pe-xl-0 { + padding-right: 0 !important; + } + .pe-xl-1 { + padding-right: 0.25rem !important; + } + .pe-xl-2 { + padding-right: 0.5rem !important; + } + .pe-xl-3 { + padding-right: 1rem !important; + } + .pe-xl-4 { + padding-right: 1.5rem !important; + } + .pe-xl-5 { + padding-right: 3rem !important; + } + .pb-xl-0 { + padding-bottom: 0 !important; + } + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xl-3 { + padding-bottom: 1rem !important; + } + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xl-5 { + padding-bottom: 3rem !important; + } + .ps-xl-0 { + padding-left: 0 !important; + } + .ps-xl-1 { + padding-left: 0.25rem !important; + } + .ps-xl-2 { + padding-left: 0.5rem !important; + } + .ps-xl-3 { + padding-left: 1rem !important; + } + .ps-xl-4 { + padding-left: 1.5rem !important; + } + .ps-xl-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1400px) { + .d-xxl-inline { + display: inline !important; + } + .d-xxl-inline-block { + display: inline-block !important; + } + .d-xxl-block { + display: block !important; + } + .d-xxl-grid { + display: grid !important; + } + .d-xxl-inline-grid { + display: inline-grid !important; + } + .d-xxl-table { + display: table !important; + } + .d-xxl-table-row { + display: table-row !important; + } + .d-xxl-table-cell { + display: table-cell !important; + } + .d-xxl-flex { + display: flex !important; + } + .d-xxl-inline-flex { + display: inline-flex !important; + } + .d-xxl-none { + display: none !important; + } + .flex-xxl-fill { + flex: 1 1 auto !important; + } + .flex-xxl-row { + flex-direction: row !important; + } + .flex-xxl-column { + flex-direction: column !important; + } + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xxl-start { + justify-content: flex-start !important; + } + .justify-content-xxl-end { + justify-content: flex-end !important; + } + .justify-content-xxl-center { + justify-content: center !important; + } + .justify-content-xxl-between { + justify-content: space-between !important; + } + .justify-content-xxl-around { + justify-content: space-around !important; + } + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + .align-items-xxl-start { + align-items: flex-start !important; + } + .align-items-xxl-end { + align-items: flex-end !important; + } + .align-items-xxl-center { + align-items: center !important; + } + .align-items-xxl-baseline { + align-items: baseline !important; + } + .align-items-xxl-stretch { + align-items: stretch !important; + } + .align-content-xxl-start { + align-content: flex-start !important; + } + .align-content-xxl-end { + align-content: flex-end !important; + } + .align-content-xxl-center { + align-content: center !important; + } + .align-content-xxl-between { + align-content: space-between !important; + } + .align-content-xxl-around { + align-content: space-around !important; + } + .align-content-xxl-stretch { + align-content: stretch !important; + } + .align-self-xxl-auto { + align-self: auto !important; + } + .align-self-xxl-start { + align-self: flex-start !important; + } + .align-self-xxl-end { + align-self: flex-end !important; + } + .align-self-xxl-center { + align-self: center !important; + } + .align-self-xxl-baseline { + align-self: baseline !important; + } + .align-self-xxl-stretch { + align-self: stretch !important; + } + .order-xxl-first { + order: -1 !important; + } + .order-xxl-0 { + order: 0 !important; + } + .order-xxl-1 { + order: 1 !important; + } + .order-xxl-2 { + order: 2 !important; + } + .order-xxl-3 { + order: 3 !important; + } + .order-xxl-4 { + order: 4 !important; + } + .order-xxl-5 { + order: 5 !important; + } + .order-xxl-last { + order: 6 !important; + } + .m-xxl-0 { + margin: 0 !important; + } + .m-xxl-1 { + margin: 0.25rem !important; + } + .m-xxl-2 { + margin: 0.5rem !important; + } + .m-xxl-3 { + margin: 1rem !important; + } + .m-xxl-4 { + margin: 1.5rem !important; + } + .m-xxl-5 { + margin: 3rem !important; + } + .m-xxl-auto { + margin: auto !important; + } + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xxl-0 { + margin-top: 0 !important; + } + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + .mt-xxl-3 { + margin-top: 1rem !important; + } + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + .mt-xxl-5 { + margin-top: 3rem !important; + } + .mt-xxl-auto { + margin-top: auto !important; + } + .me-xxl-0 { + margin-right: 0 !important; + } + .me-xxl-1 { + margin-right: 0.25rem !important; + } + .me-xxl-2 { + margin-right: 0.5rem !important; + } + .me-xxl-3 { + margin-right: 1rem !important; + } + .me-xxl-4 { + margin-right: 1.5rem !important; + } + .me-xxl-5 { + margin-right: 3rem !important; + } + .me-xxl-auto { + margin-right: auto !important; + } + .mb-xxl-0 { + margin-bottom: 0 !important; + } + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + .mb-xxl-auto { + margin-bottom: auto !important; + } + .ms-xxl-0 { + margin-left: 0 !important; + } + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + .ms-xxl-3 { + margin-left: 1rem !important; + } + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + .ms-xxl-5 { + margin-left: 3rem !important; + } + .ms-xxl-auto { + margin-left: auto !important; + } + .p-xxl-0 { + padding: 0 !important; + } + .p-xxl-1 { + padding: 0.25rem !important; + } + .p-xxl-2 { + padding: 0.5rem !important; + } + .p-xxl-3 { + padding: 1rem !important; + } + .p-xxl-4 { + padding: 1.5rem !important; + } + .p-xxl-5 { + padding: 3rem !important; + } + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xxl-0 { + padding-top: 0 !important; + } + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + .pt-xxl-3 { + padding-top: 1rem !important; + } + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + .pt-xxl-5 { + padding-top: 3rem !important; + } + .pe-xxl-0 { + padding-right: 0 !important; + } + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + .pe-xxl-3 { + padding-right: 1rem !important; + } + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + .pe-xxl-5 { + padding-right: 3rem !important; + } + .pb-xxl-0 { + padding-bottom: 0 !important; + } + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + .ps-xxl-0 { + padding-left: 0 !important; + } + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + .ps-xxl-3 { + padding-left: 1rem !important; + } + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + .ps-xxl-5 { + padding-left: 3rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + .d-print-inline-block { + display: inline-block !important; + } + .d-print-block { + display: block !important; + } + .d-print-grid { + display: grid !important; + } + .d-print-inline-grid { + display: inline-grid !important; + } + .d-print-table { + display: table !important; + } + .d-print-table-row { + display: table-row !important; + } + .d-print-table-cell { + display: table-cell !important; + } + .d-print-flex { + display: flex !important; + } + .d-print-inline-flex { + display: inline-flex !important; + } + .d-print-none { + display: none !important; + } +} + +/*# sourceMappingURL=bootstrap-grid.css.map */ \ No newline at end of file diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-grid.css.map b/proxy/css/bootstrap-5.3.3/bootstrap-grid.css.map new file mode 100644 index 000000000..ce99ec196 --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-grid.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/mixins/_banner.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","bootstrap-grid.css","../../scss/mixins/_breakpoints.scss","../../scss/_variables.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AACE;;;;EAAA;ACKA;;;;;;;ECHA,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,6CAAA;EACA,4CAAA;EACA,kBAAA;EACA,iBAAA;ACUF;;AC4CI;EH5CE;IACE,gBIkee;EF9drB;AACF;ACsCI;EH5CE;IACE,gBIkee;EFzdrB;AACF;ACiCI;EH5CE;IACE,gBIkee;EFpdrB;AACF;AC4BI;EH5CE;IACE,iBIkee;EF/crB;AACF;ACuBI;EH5CE;IACE,iBIkee;EF1crB;AACF;AGzCA;EAEI,qBAAA;EAAA,yBAAA;EAAA,yBAAA;EAAA,yBAAA;EAAA,0BAAA;EAAA,2B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A;ELm5HV;EK15HM;IAOI,+BAAA;ELs5HV;EK75HM;IAOI,yBAAA;ELy5HV;EKh6HM;IAOI,6BAAA;EL45HV;EKn6HM;IAOI,8BAAA;EL+5HV;EKt6HM;IAOI,wBAAA;ELk6HV;EKz6HM;IAOI,+BAAA;ELq6HV;EK56HM;IAOI,wBAAA;ELw6HV;AACF","file":"bootstrap-grid.css","sourcesContent":["@mixin bsBanner($file) {\n /*!\n * Bootstrap #{$file} v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n}\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-container-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n --#{$prefix}gutter-x: #{$gutter};\n --#{$prefix}gutter-y: 0;\n width: 100%;\n padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-right: auto;\n margin-left: auto;\n}\n","/*!\n * Bootstrap Grid v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n width: 100%;\n padding-right: calc(var(--bs-gutter-x) * 0.5);\n padding-left: calc(var(--bs-gutter-x) * 0.5);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n:root {\n --bs-breakpoint-xs: 0;\n --bs-breakpoint-sm: 576px;\n --bs-breakpoint-md: 768px;\n --bs-breakpoint-lg: 992px;\n --bs-breakpoint-xl: 1200px;\n --bs-breakpoint-xxl: 1400px;\n}\n\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(-1 * var(--bs-gutter-y));\n margin-right: calc(-0.5 * var(--bs-gutter-x));\n margin-left: calc(-0.5 * var(--bs-gutter-x));\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * 0.5);\n padding-left: calc(var(--bs-gutter-x) * 0.5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-sm-0 {\n margin-left: 0;\n }\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n .offset-sm-3 {\n margin-left: 25%;\n }\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n .offset-sm-6 {\n margin-left: 50%;\n }\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n .offset-sm-9 {\n margin-left: 75%;\n }\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n .g-sm-0,\n .gx-sm-0 {\n --bs-gutter-x: 0;\n }\n .g-sm-0,\n .gy-sm-0 {\n --bs-gutter-y: 0;\n }\n .g-sm-1,\n .gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-sm-1,\n .gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-sm-2,\n .gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-sm-2,\n .gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-sm-3,\n .gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n .g-sm-3,\n .gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n .g-sm-4,\n .gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-sm-4,\n .gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-sm-5,\n .gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n .g-sm-5,\n .gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-md-0 {\n margin-left: 0;\n }\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n .offset-md-3 {\n margin-left: 25%;\n }\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n .offset-md-6 {\n margin-left: 50%;\n }\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n .offset-md-9 {\n margin-left: 75%;\n }\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n .g-md-0,\n .gx-md-0 {\n --bs-gutter-x: 0;\n }\n .g-md-0,\n .gy-md-0 {\n --bs-gutter-y: 0;\n }\n .g-md-1,\n .gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-md-1,\n .gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-md-2,\n .gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-md-2,\n .gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-md-3,\n .gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n .g-md-3,\n .gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n .g-md-4,\n .gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-md-4,\n .gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-md-5,\n .gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n .g-md-5,\n .gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-lg-0 {\n margin-left: 0;\n }\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n .offset-lg-3 {\n margin-left: 25%;\n }\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n .offset-lg-6 {\n margin-left: 50%;\n }\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n .offset-lg-9 {\n margin-left: 75%;\n }\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n .g-lg-0,\n .gx-lg-0 {\n --bs-gutter-x: 0;\n }\n .g-lg-0,\n .gy-lg-0 {\n --bs-gutter-y: 0;\n }\n .g-lg-1,\n .gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-lg-1,\n .gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-lg-2,\n .gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-lg-2,\n .gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-lg-3,\n .gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n .g-lg-3,\n .gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n .g-lg-4,\n .gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-lg-4,\n .gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-lg-5,\n .gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n .g-lg-5,\n .gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-xl-0 {\n margin-left: 0;\n }\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n .offset-xl-3 {\n margin-left: 25%;\n }\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n .offset-xl-6 {\n margin-left: 50%;\n }\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n .offset-xl-9 {\n margin-left: 75%;\n }\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n .g-xl-0,\n .gx-xl-0 {\n --bs-gutter-x: 0;\n }\n .g-xl-0,\n .gy-xl-0 {\n --bs-gutter-y: 0;\n }\n .g-xl-1,\n .gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-xl-1,\n .gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-xl-2,\n .gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-xl-2,\n .gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-xl-3,\n .gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n .g-xl-3,\n .gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n .g-xl-4,\n .gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-xl-4,\n .gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-xl-5,\n .gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n .g-xl-5,\n .gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-xxl-0 {\n margin-left: 0;\n }\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n .offset-xxl-3 {\n margin-left: 25%;\n }\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n .offset-xxl-6 {\n margin-left: 50%;\n }\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n .offset-xxl-9 {\n margin-left: 75%;\n }\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n .g-xxl-0,\n .gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n .g-xxl-0,\n .gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n .g-xxl-1,\n .gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-xxl-1,\n .gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-xxl-2,\n .gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-xxl-2,\n .gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-xxl-3,\n .gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n .g-xxl-3,\n .gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n .g-xxl-4,\n .gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-xxl-4,\n .gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-xxl-5,\n .gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n .g-xxl-5,\n .gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-inline-grid {\n display: inline-grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n .d-sm-inline-block {\n display: inline-block !important;\n }\n .d-sm-block {\n display: block !important;\n }\n .d-sm-grid {\n display: grid !important;\n }\n .d-sm-inline-grid {\n display: inline-grid !important;\n }\n .d-sm-table {\n display: table !important;\n }\n .d-sm-table-row {\n display: table-row !important;\n }\n .d-sm-table-cell {\n display: table-cell !important;\n }\n .d-sm-flex {\n display: flex !important;\n }\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n .d-sm-none {\n display: none !important;\n }\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n .flex-sm-row {\n flex-direction: row !important;\n }\n .flex-sm-column {\n flex-direction: column !important;\n }\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n .justify-content-sm-center {\n justify-content: center !important;\n }\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n .align-items-sm-center {\n align-items: center !important;\n }\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n .align-content-sm-center {\n align-content: center !important;\n }\n .align-content-sm-between {\n align-content: space-between !important;\n }\n .align-content-sm-around {\n align-content: space-around !important;\n }\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n .align-self-sm-auto {\n align-self: auto !important;\n }\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n .align-self-sm-center {\n align-self: center !important;\n }\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n .order-sm-first {\n order: -1 !important;\n }\n .order-sm-0 {\n order: 0 !important;\n }\n .order-sm-1 {\n order: 1 !important;\n }\n .order-sm-2 {\n order: 2 !important;\n }\n .order-sm-3 {\n order: 3 !important;\n }\n .order-sm-4 {\n order: 4 !important;\n }\n .order-sm-5 {\n order: 5 !important;\n }\n .order-sm-last {\n order: 6 !important;\n }\n .m-sm-0 {\n margin: 0 !important;\n }\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n .m-sm-3 {\n margin: 1rem !important;\n }\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n .m-sm-5 {\n margin: 3rem !important;\n }\n .m-sm-auto {\n margin: auto !important;\n }\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n .mt-sm-auto {\n margin-top: auto !important;\n }\n .me-sm-0 {\n margin-right: 0 !important;\n }\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n .me-sm-auto {\n margin-right: auto !important;\n }\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n .ms-sm-auto {\n margin-left: auto !important;\n }\n .p-sm-0 {\n padding: 0 !important;\n }\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n .p-sm-3 {\n padding: 1rem !important;\n }\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n .p-sm-5 {\n padding: 3rem !important;\n }\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n .d-md-inline-block {\n display: inline-block !important;\n }\n .d-md-block {\n display: block !important;\n }\n .d-md-grid {\n display: grid !important;\n }\n .d-md-inline-grid {\n display: inline-grid !important;\n }\n .d-md-table {\n display: table !important;\n }\n .d-md-table-row {\n display: table-row !important;\n }\n .d-md-table-cell {\n display: table-cell !important;\n }\n .d-md-flex {\n display: flex !important;\n }\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n .d-md-none {\n display: none !important;\n }\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n .flex-md-row {\n flex-direction: row !important;\n }\n .flex-md-column {\n flex-direction: column !important;\n }\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n .justify-content-md-center {\n justify-content: center !important;\n }\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-md-start {\n align-items: flex-start !important;\n }\n .align-items-md-end {\n align-items: flex-end !important;\n }\n .align-items-md-center {\n align-items: center !important;\n }\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n .align-content-md-start {\n align-content: flex-start !important;\n }\n .align-content-md-end {\n align-content: flex-end !important;\n }\n .align-content-md-center {\n align-content: center !important;\n }\n .align-content-md-between {\n align-content: space-between !important;\n }\n .align-content-md-around {\n align-content: space-around !important;\n }\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n .align-self-md-auto {\n align-self: auto !important;\n }\n .align-self-md-start {\n align-self: flex-start !important;\n }\n .align-self-md-end {\n align-self: flex-end !important;\n }\n .align-self-md-center {\n align-self: center !important;\n }\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n .order-md-first {\n order: -1 !important;\n }\n .order-md-0 {\n order: 0 !important;\n }\n .order-md-1 {\n order: 1 !important;\n }\n .order-md-2 {\n order: 2 !important;\n }\n .order-md-3 {\n order: 3 !important;\n }\n .order-md-4 {\n order: 4 !important;\n }\n .order-md-5 {\n order: 5 !important;\n }\n .order-md-last {\n order: 6 !important;\n }\n .m-md-0 {\n margin: 0 !important;\n }\n .m-md-1 {\n margin: 0.25rem !important;\n }\n .m-md-2 {\n margin: 0.5rem !important;\n }\n .m-md-3 {\n margin: 1rem !important;\n }\n .m-md-4 {\n margin: 1.5rem !important;\n }\n .m-md-5 {\n margin: 3rem !important;\n }\n .m-md-auto {\n margin: auto !important;\n }\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-md-0 {\n margin-top: 0 !important;\n }\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n .mt-md-auto {\n margin-top: auto !important;\n }\n .me-md-0 {\n margin-right: 0 !important;\n }\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n .me-md-3 {\n margin-right: 1rem !important;\n }\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n .me-md-5 {\n margin-right: 3rem !important;\n }\n .me-md-auto {\n margin-right: auto !important;\n }\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n .ms-md-0 {\n margin-left: 0 !important;\n }\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n .ms-md-auto {\n margin-left: auto !important;\n }\n .p-md-0 {\n padding: 0 !important;\n }\n .p-md-1 {\n padding: 0.25rem !important;\n }\n .p-md-2 {\n padding: 0.5rem !important;\n }\n .p-md-3 {\n padding: 1rem !important;\n }\n .p-md-4 {\n padding: 1.5rem !important;\n }\n .p-md-5 {\n padding: 3rem !important;\n }\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-md-0 {\n padding-top: 0 !important;\n }\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n .pe-md-0 {\n padding-right: 0 !important;\n }\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n .ps-md-0 {\n padding-left: 0 !important;\n }\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n .d-lg-inline-block {\n display: inline-block !important;\n }\n .d-lg-block {\n display: block !important;\n }\n .d-lg-grid {\n display: grid !important;\n }\n .d-lg-inline-grid {\n display: inline-grid !important;\n }\n .d-lg-table {\n display: table !important;\n }\n .d-lg-table-row {\n display: table-row !important;\n }\n .d-lg-table-cell {\n display: table-cell !important;\n }\n .d-lg-flex {\n display: flex !important;\n }\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n .d-lg-none {\n display: none !important;\n }\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n .flex-lg-row {\n flex-direction: row !important;\n }\n .flex-lg-column {\n flex-direction: column !important;\n }\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n .justify-content-lg-center {\n justify-content: center !important;\n }\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n .align-items-lg-center {\n align-items: center !important;\n }\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n .align-content-lg-center {\n align-content: center !important;\n }\n .align-content-lg-between {\n align-content: space-between !important;\n }\n .align-content-lg-around {\n align-content: space-around !important;\n }\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n .align-self-lg-auto {\n align-self: auto !important;\n }\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n .align-self-lg-center {\n align-self: center !important;\n }\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n .order-lg-first {\n order: -1 !important;\n }\n .order-lg-0 {\n order: 0 !important;\n }\n .order-lg-1 {\n order: 1 !important;\n }\n .order-lg-2 {\n order: 2 !important;\n }\n .order-lg-3 {\n order: 3 !important;\n }\n .order-lg-4 {\n order: 4 !important;\n }\n .order-lg-5 {\n order: 5 !important;\n }\n .order-lg-last {\n order: 6 !important;\n }\n .m-lg-0 {\n margin: 0 !important;\n }\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n .m-lg-3 {\n margin: 1rem !important;\n }\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n .m-lg-5 {\n margin: 3rem !important;\n }\n .m-lg-auto {\n margin: auto !important;\n }\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n .mt-lg-auto {\n margin-top: auto !important;\n }\n .me-lg-0 {\n margin-right: 0 !important;\n }\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n .me-lg-auto {\n margin-right: auto !important;\n }\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n .ms-lg-auto {\n margin-left: auto !important;\n }\n .p-lg-0 {\n padding: 0 !important;\n }\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n .p-lg-3 {\n padding: 1rem !important;\n }\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n .p-lg-5 {\n padding: 3rem !important;\n }\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n .d-xl-inline-block {\n display: inline-block !important;\n }\n .d-xl-block {\n display: block !important;\n }\n .d-xl-grid {\n display: grid !important;\n }\n .d-xl-inline-grid {\n display: inline-grid !important;\n }\n .d-xl-table {\n display: table !important;\n }\n .d-xl-table-row {\n display: table-row !important;\n }\n .d-xl-table-cell {\n display: table-cell !important;\n }\n .d-xl-flex {\n display: flex !important;\n }\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n .d-xl-none {\n display: none !important;\n }\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n .flex-xl-row {\n flex-direction: row !important;\n }\n .flex-xl-column {\n flex-direction: column !important;\n }\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n .justify-content-xl-center {\n justify-content: center !important;\n }\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n .align-items-xl-center {\n align-items: center !important;\n }\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n .align-content-xl-center {\n align-content: center !important;\n }\n .align-content-xl-between {\n align-content: space-between !important;\n }\n .align-content-xl-around {\n align-content: space-around !important;\n }\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n .align-self-xl-auto {\n align-self: auto !important;\n }\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n .align-self-xl-center {\n align-self: center !important;\n }\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n .order-xl-first {\n order: -1 !important;\n }\n .order-xl-0 {\n order: 0 !important;\n }\n .order-xl-1 {\n order: 1 !important;\n }\n .order-xl-2 {\n order: 2 !important;\n }\n .order-xl-3 {\n order: 3 !important;\n }\n .order-xl-4 {\n order: 4 !important;\n }\n .order-xl-5 {\n order: 5 !important;\n }\n .order-xl-last {\n order: 6 !important;\n }\n .m-xl-0 {\n margin: 0 !important;\n }\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n .m-xl-3 {\n margin: 1rem !important;\n }\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n .m-xl-5 {\n margin: 3rem !important;\n }\n .m-xl-auto {\n margin: auto !important;\n }\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n .mt-xl-auto {\n margin-top: auto !important;\n }\n .me-xl-0 {\n margin-right: 0 !important;\n }\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n .me-xl-auto {\n margin-right: auto !important;\n }\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n .ms-xl-auto {\n margin-left: auto !important;\n }\n .p-xl-0 {\n padding: 0 !important;\n }\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n .p-xl-3 {\n padding: 1rem !important;\n }\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n .p-xl-5 {\n padding: 3rem !important;\n }\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n .d-xxl-block {\n display: block !important;\n }\n .d-xxl-grid {\n display: grid !important;\n }\n .d-xxl-inline-grid {\n display: inline-grid !important;\n }\n .d-xxl-table {\n display: table !important;\n }\n .d-xxl-table-row {\n display: table-row !important;\n }\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n .d-xxl-flex {\n display: flex !important;\n }\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n .d-xxl-none {\n display: none !important;\n }\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n .flex-xxl-row {\n flex-direction: row !important;\n }\n .flex-xxl-column {\n flex-direction: column !important;\n }\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n .align-items-xxl-center {\n align-items: center !important;\n }\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n .align-content-xxl-center {\n align-content: center !important;\n }\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n .align-self-xxl-center {\n align-self: center !important;\n }\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n .order-xxl-first {\n order: -1 !important;\n }\n .order-xxl-0 {\n order: 0 !important;\n }\n .order-xxl-1 {\n order: 1 !important;\n }\n .order-xxl-2 {\n order: 2 !important;\n }\n .order-xxl-3 {\n order: 3 !important;\n }\n .order-xxl-4 {\n order: 4 !important;\n }\n .order-xxl-5 {\n order: 5 !important;\n }\n .order-xxl-last {\n order: 6 !important;\n }\n .m-xxl-0 {\n margin: 0 !important;\n }\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n .m-xxl-3 {\n margin: 1rem !important;\n }\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n .m-xxl-5 {\n margin: 3rem !important;\n }\n .m-xxl-auto {\n margin: auto !important;\n }\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n .me-xxl-auto {\n margin-right: auto !important;\n }\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n .p-xxl-0 {\n padding: 0 !important;\n }\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n .p-xxl-3 {\n padding: 1rem !important;\n }\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n .p-xxl-5 {\n padding: 3rem !important;\n }\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n .d-print-inline-block {\n display: inline-block !important;\n }\n .d-print-block {\n display: block !important;\n }\n .d-print-grid {\n display: grid !important;\n }\n .d-print-inline-grid {\n display: inline-grid !important;\n }\n .d-print-table {\n display: table !important;\n }\n .d-print-table-row {\n display: table-row !important;\n }\n .d-print-table-cell {\n display: table-cell !important;\n }\n .d-print-flex {\n display: flex !important;\n }\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Variables\n//\n// Variables should follow the `$component-state-property-size` formula for\n// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.\n\n// Color system\n\n// scss-docs-start gray-color-variables\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n// scss-docs-end gray-color-variables\n\n// fusv-disable\n// scss-docs-start gray-colors-map\n$grays: (\n \"100\": $gray-100,\n \"200\": $gray-200,\n \"300\": $gray-300,\n \"400\": $gray-400,\n \"500\": $gray-500,\n \"600\": $gray-600,\n \"700\": $gray-700,\n \"800\": $gray-800,\n \"900\": $gray-900\n) !default;\n// scss-docs-end gray-colors-map\n// fusv-enable\n\n// scss-docs-start color-variables\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #ffc107 !default;\n$green: #198754 !default;\n$teal: #20c997 !default;\n$cyan: #0dcaf0 !default;\n// scss-docs-end color-variables\n\n// scss-docs-start colors-map\n$colors: (\n \"blue\": $blue,\n \"indigo\": $indigo,\n \"purple\": $purple,\n \"pink\": $pink,\n \"red\": $red,\n \"orange\": $orange,\n \"yellow\": $yellow,\n \"green\": $green,\n \"teal\": $teal,\n \"cyan\": $cyan,\n \"black\": $black,\n \"white\": $white,\n \"gray\": $gray-600,\n \"gray-dark\": $gray-800\n) !default;\n// scss-docs-end colors-map\n\n// The contrast ratio to reach against white, to determine if color changes from \"light\" to \"dark\". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.\n// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast\n$min-contrast-ratio: 4.5 !default;\n\n// Customize the light and dark text colors for use in our color contrast function.\n$color-contrast-dark: $black !default;\n$color-contrast-light: $white !default;\n\n// fusv-disable\n$blue-100: tint-color($blue, 80%) !default;\n$blue-200: tint-color($blue, 60%) !default;\n$blue-300: tint-color($blue, 40%) !default;\n$blue-400: tint-color($blue, 20%) !default;\n$blue-500: $blue !default;\n$blue-600: shade-color($blue, 20%) !default;\n$blue-700: shade-color($blue, 40%) !default;\n$blue-800: shade-color($blue, 60%) !default;\n$blue-900: shade-color($blue, 80%) !default;\n\n$indigo-100: tint-color($indigo, 80%) !default;\n$indigo-200: tint-color($indigo, 60%) !default;\n$indigo-300: tint-color($indigo, 40%) !default;\n$indigo-400: tint-color($indigo, 20%) !default;\n$indigo-500: $indigo !default;\n$indigo-600: shade-color($indigo, 20%) !default;\n$indigo-700: shade-color($indigo, 40%) !default;\n$indigo-800: shade-color($indigo, 60%) !default;\n$indigo-900: shade-color($indigo, 80%) !default;\n\n$purple-100: tint-color($purple, 80%) !default;\n$purple-200: tint-color($purple, 60%) !default;\n$purple-300: tint-color($purple, 40%) !default;\n$purple-400: tint-color($purple, 20%) !default;\n$purple-500: $purple !default;\n$purple-600: shade-color($purple, 20%) !default;\n$purple-700: shade-color($purple, 40%) !default;\n$purple-800: shade-color($purple, 60%) !default;\n$purple-900: shade-color($purple, 80%) !default;\n\n$pink-100: tint-color($pink, 80%) !default;\n$pink-200: tint-color($pink, 60%) !default;\n$pink-300: tint-color($pink, 40%) !default;\n$pink-400: tint-color($pink, 20%) !default;\n$pink-500: $pink !default;\n$pink-600: shade-color($pink, 20%) !default;\n$pink-700: shade-color($pink, 40%) !default;\n$pink-800: shade-color($pink, 60%) !default;\n$pink-900: shade-color($pink, 80%) !default;\n\n$red-100: tint-color($red, 80%) !default;\n$red-200: tint-color($red, 60%) !default;\n$red-300: tint-color($red, 40%) !default;\n$red-400: tint-color($red, 20%) !default;\n$red-500: $red !default;\n$red-600: shade-color($red, 20%) !default;\n$red-700: shade-color($red, 40%) !default;\n$red-800: shade-color($red, 60%) !default;\n$red-900: shade-color($red, 80%) !default;\n\n$orange-100: tint-color($orange, 80%) !default;\n$orange-200: tint-color($orange, 60%) !default;\n$orange-300: tint-color($orange, 40%) !default;\n$orange-400: tint-color($orange, 20%) !default;\n$orange-500: $orange !default;\n$orange-600: shade-color($orange, 20%) !default;\n$orange-700: shade-color($orange, 40%) !default;\n$orange-800: shade-color($orange, 60%) !default;\n$orange-900: shade-color($orange, 80%) !default;\n\n$yellow-100: tint-color($yellow, 80%) !default;\n$yellow-200: tint-color($yellow, 60%) !default;\n$yellow-300: tint-color($yellow, 40%) !default;\n$yellow-400: tint-color($yellow, 20%) !default;\n$yellow-500: $yellow !default;\n$yellow-600: shade-color($yellow, 20%) !default;\n$yellow-700: shade-color($yellow, 40%) !default;\n$yellow-800: shade-color($yellow, 60%) !default;\n$yellow-900: shade-color($yellow, 80%) !default;\n\n$green-100: tint-color($green, 80%) !default;\n$green-200: tint-color($green, 60%) !default;\n$green-300: tint-color($green, 40%) !default;\n$green-400: tint-color($green, 20%) !default;\n$green-500: $green !default;\n$green-600: shade-color($green, 20%) !default;\n$green-700: shade-color($green, 40%) !default;\n$green-800: shade-color($green, 60%) !default;\n$green-900: shade-color($green, 80%) !default;\n\n$teal-100: tint-color($teal, 80%) !default;\n$teal-200: tint-color($teal, 60%) !default;\n$teal-300: tint-color($teal, 40%) !default;\n$teal-400: tint-color($teal, 20%) !default;\n$teal-500: $teal !default;\n$teal-600: shade-color($teal, 20%) !default;\n$teal-700: shade-color($teal, 40%) !default;\n$teal-800: shade-color($teal, 60%) !default;\n$teal-900: shade-color($teal, 80%) !default;\n\n$cyan-100: tint-color($cyan, 80%) !default;\n$cyan-200: tint-color($cyan, 60%) !default;\n$cyan-300: tint-color($cyan, 40%) !default;\n$cyan-400: tint-color($cyan, 20%) !default;\n$cyan-500: $cyan !default;\n$cyan-600: shade-color($cyan, 20%) !default;\n$cyan-700: shade-color($cyan, 40%) !default;\n$cyan-800: shade-color($cyan, 60%) !default;\n$cyan-900: shade-color($cyan, 80%) !default;\n\n$blues: (\n \"blue-100\": $blue-100,\n \"blue-200\": $blue-200,\n \"blue-300\": $blue-300,\n \"blue-400\": $blue-400,\n \"blue-500\": $blue-500,\n \"blue-600\": $blue-600,\n \"blue-700\": $blue-700,\n \"blue-800\": $blue-800,\n \"blue-900\": $blue-900\n) !default;\n\n$indigos: (\n \"indigo-100\": $indigo-100,\n \"indigo-200\": $indigo-200,\n \"indigo-300\": $indigo-300,\n \"indigo-400\": $indigo-400,\n \"indigo-500\": $indigo-500,\n \"indigo-600\": $indigo-600,\n \"indigo-700\": $indigo-700,\n \"indigo-800\": $indigo-800,\n \"indigo-900\": $indigo-900\n) !default;\n\n$purples: (\n \"purple-100\": $purple-100,\n \"purple-200\": $purple-200,\n \"purple-300\": $purple-300,\n \"purple-400\": $purple-400,\n \"purple-500\": $purple-500,\n \"purple-600\": $purple-600,\n \"purple-700\": $purple-700,\n \"purple-800\": $purple-800,\n \"purple-900\": $purple-900\n) !default;\n\n$pinks: (\n \"pink-100\": $pink-100,\n \"pink-200\": $pink-200,\n \"pink-300\": $pink-300,\n \"pink-400\": $pink-400,\n \"pink-500\": $pink-500,\n \"pink-600\": $pink-600,\n \"pink-700\": $pink-700,\n \"pink-800\": $pink-800,\n \"pink-900\": $pink-900\n) !default;\n\n$reds: (\n \"red-100\": $red-100,\n \"red-200\": $red-200,\n \"red-300\": $red-300,\n \"red-400\": $red-400,\n \"red-500\": $red-500,\n \"red-600\": $red-600,\n \"red-700\": $red-700,\n \"red-800\": $red-800,\n \"red-900\": $red-900\n) !default;\n\n$oranges: (\n \"orange-100\": $orange-100,\n \"orange-200\": $orange-200,\n \"orange-300\": $orange-300,\n \"orange-400\": $orange-400,\n \"orange-500\": $orange-500,\n \"orange-600\": $orange-600,\n \"orange-700\": $orange-700,\n \"orange-800\": $orange-800,\n \"orange-900\": $orange-900\n) !default;\n\n$yellows: (\n \"yellow-100\": $yellow-100,\n \"yellow-200\": $yellow-200,\n \"yellow-300\": $yellow-300,\n \"yellow-400\": $yellow-400,\n \"yellow-500\": $yellow-500,\n \"yellow-600\": $yellow-600,\n \"yellow-700\": $yellow-700,\n \"yellow-800\": $yellow-800,\n \"yellow-900\": $yellow-900\n) !default;\n\n$greens: (\n \"green-100\": $green-100,\n \"green-200\": $green-200,\n \"green-300\": $green-300,\n \"green-400\": $green-400,\n \"green-500\": $green-500,\n \"green-600\": $green-600,\n \"green-700\": $green-700,\n \"green-800\": $green-800,\n \"green-900\": $green-900\n) !default;\n\n$teals: (\n \"teal-100\": $teal-100,\n \"teal-200\": $teal-200,\n \"teal-300\": $teal-300,\n \"teal-400\": $teal-400,\n \"teal-500\": $teal-500,\n \"teal-600\": $teal-600,\n \"teal-700\": $teal-700,\n \"teal-800\": $teal-800,\n \"teal-900\": $teal-900\n) !default;\n\n$cyans: (\n \"cyan-100\": $cyan-100,\n \"cyan-200\": $cyan-200,\n \"cyan-300\": $cyan-300,\n \"cyan-400\": $cyan-400,\n \"cyan-500\": $cyan-500,\n \"cyan-600\": $cyan-600,\n \"cyan-700\": $cyan-700,\n \"cyan-800\": $cyan-800,\n \"cyan-900\": $cyan-900\n) !default;\n// fusv-enable\n\n// scss-docs-start theme-color-variables\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-900 !default;\n// scss-docs-end theme-color-variables\n\n// scss-docs-start theme-colors-map\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"light\": $light,\n \"dark\": $dark\n) !default;\n// scss-docs-end theme-colors-map\n\n// scss-docs-start theme-text-variables\n$primary-text-emphasis: shade-color($primary, 60%) !default;\n$secondary-text-emphasis: shade-color($secondary, 60%) !default;\n$success-text-emphasis: shade-color($success, 60%) !default;\n$info-text-emphasis: shade-color($info, 60%) !default;\n$warning-text-emphasis: shade-color($warning, 60%) !default;\n$danger-text-emphasis: shade-color($danger, 60%) !default;\n$light-text-emphasis: $gray-700 !default;\n$dark-text-emphasis: $gray-700 !default;\n// scss-docs-end theme-text-variables\n\n// scss-docs-start theme-bg-subtle-variables\n$primary-bg-subtle: tint-color($primary, 80%) !default;\n$secondary-bg-subtle: tint-color($secondary, 80%) !default;\n$success-bg-subtle: tint-color($success, 80%) !default;\n$info-bg-subtle: tint-color($info, 80%) !default;\n$warning-bg-subtle: tint-color($warning, 80%) !default;\n$danger-bg-subtle: tint-color($danger, 80%) !default;\n$light-bg-subtle: mix($gray-100, $white) !default;\n$dark-bg-subtle: $gray-400 !default;\n// scss-docs-end theme-bg-subtle-variables\n\n// scss-docs-start theme-border-subtle-variables\n$primary-border-subtle: tint-color($primary, 60%) !default;\n$secondary-border-subtle: tint-color($secondary, 60%) !default;\n$success-border-subtle: tint-color($success, 60%) !default;\n$info-border-subtle: tint-color($info, 60%) !default;\n$warning-border-subtle: tint-color($warning, 60%) !default;\n$danger-border-subtle: tint-color($danger, 60%) !default;\n$light-border-subtle: $gray-200 !default;\n$dark-border-subtle: $gray-500 !default;\n// scss-docs-end theme-border-subtle-variables\n\n// Characters which are escaped by the escape-svg function\n$escaped-characters: (\n (\"<\", \"%3c\"),\n (\">\", \"%3e\"),\n (\"#\", \"%23\"),\n (\"(\", \"%28\"),\n (\")\", \"%29\"),\n) !default;\n\n// Options\n//\n// Quickly modify global styling by enabling or disabling optional features.\n\n$enable-caret: true !default;\n$enable-rounded: true !default;\n$enable-shadows: false !default;\n$enable-gradients: false !default;\n$enable-transitions: true !default;\n$enable-reduced-motion: true !default;\n$enable-smooth-scroll: true !default;\n$enable-grid-classes: true !default;\n$enable-container-classes: true !default;\n$enable-cssgrid: false !default;\n$enable-button-pointers: true !default;\n$enable-rfs: true !default;\n$enable-validation-icons: true !default;\n$enable-negative-margins: false !default;\n$enable-deprecation-messages: true !default;\n$enable-important-utilities: true !default;\n\n$enable-dark-mode: true !default;\n$color-mode-type: data !default; // `data` or `media-query`\n\n// Prefix for :root CSS variables\n\n$variable-prefix: bs- !default; // Deprecated in v5.2.0 for the shorter `$prefix`\n$prefix: $variable-prefix !default;\n\n// Gradient\n//\n// The gradient which is added to components if `$enable-gradients` is `true`\n// This gradient is also added to elements with `.bg-gradient`\n// scss-docs-start variable-gradient\n$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;\n// scss-docs-end variable-gradient\n\n// Spacing\n//\n// Control the default styling of most Bootstrap elements by modifying these\n// variables. Mostly focused on spacing.\n// You can add more entries to the $spacers map, should you need more variation.\n\n// scss-docs-start spacer-variables-maps\n$spacer: 1rem !default;\n$spacers: (\n 0: 0,\n 1: $spacer * .25,\n 2: $spacer * .5,\n 3: $spacer,\n 4: $spacer * 1.5,\n 5: $spacer * 3,\n) !default;\n// scss-docs-end spacer-variables-maps\n\n// Position\n//\n// Define the edge positioning anchors of the position utilities.\n\n// scss-docs-start position-map\n$position-values: (\n 0: 0,\n 50: 50%,\n 100: 100%\n) !default;\n// scss-docs-end position-map\n\n// Body\n//\n// Settings for the `` element.\n\n$body-text-align: null !default;\n$body-color: $gray-900 !default;\n$body-bg: $white !default;\n\n$body-secondary-color: rgba($body-color, .75) !default;\n$body-secondary-bg: $gray-200 !default;\n\n$body-tertiary-color: rgba($body-color, .5) !default;\n$body-tertiary-bg: $gray-100 !default;\n\n$body-emphasis-color: $black !default;\n\n// Links\n//\n// Style anchor elements.\n\n$link-color: $primary !default;\n$link-decoration: underline !default;\n$link-shade-percentage: 20% !default;\n$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;\n$link-hover-decoration: null !default;\n\n$stretched-link-pseudo-element: after !default;\n$stretched-link-z-index: 1 !default;\n\n// Icon links\n// scss-docs-start icon-link-variables\n$icon-link-gap: .375rem !default;\n$icon-link-underline-offset: .25em !default;\n$icon-link-icon-size: 1em !default;\n$icon-link-icon-transition: .2s ease-in-out transform !default;\n$icon-link-icon-transform: translate3d(.25em, 0, 0) !default;\n// scss-docs-end icon-link-variables\n\n// Paragraphs\n//\n// Style p element.\n\n$paragraph-margin-bottom: 1rem !default;\n\n\n// Grid breakpoints\n//\n// Define the minimum dimensions at which your layout will change,\n// adapting to different screen sizes, for use in media queries.\n\n// scss-docs-start grid-breakpoints\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1400px\n) !default;\n// scss-docs-end grid-breakpoints\n\n@include _assert-ascending($grid-breakpoints, \"$grid-breakpoints\");\n@include _assert-starts-at-zero($grid-breakpoints, \"$grid-breakpoints\");\n\n\n// Grid containers\n//\n// Define the maximum width of `.container` for different screen sizes.\n\n// scss-docs-start container-max-widths\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1320px\n) !default;\n// scss-docs-end container-max-widths\n\n@include _assert-ascending($container-max-widths, \"$container-max-widths\");\n\n\n// Grid columns\n//\n// Set the number of columns and specify the width of the gutters.\n\n$grid-columns: 12 !default;\n$grid-gutter-width: 1.5rem !default;\n$grid-row-columns: 6 !default;\n\n// Container padding\n\n$container-padding-x: $grid-gutter-width !default;\n\n\n// Components\n//\n// Define common padding and border radius sizes and more.\n\n// scss-docs-start border-variables\n$border-width: 1px !default;\n$border-widths: (\n 1: 1px,\n 2: 2px,\n 3: 3px,\n 4: 4px,\n 5: 5px\n) !default;\n$border-style: solid !default;\n$border-color: $gray-300 !default;\n$border-color-translucent: rgba($black, .175) !default;\n// scss-docs-end border-variables\n\n// scss-docs-start border-radius-variables\n$border-radius: .375rem !default;\n$border-radius-sm: .25rem !default;\n$border-radius-lg: .5rem !default;\n$border-radius-xl: 1rem !default;\n$border-radius-xxl: 2rem !default;\n$border-radius-pill: 50rem !default;\n// scss-docs-end border-radius-variables\n// fusv-disable\n$border-radius-2xl: $border-radius-xxl !default; // Deprecated in v5.3.0\n// fusv-enable\n\n// scss-docs-start box-shadow-variables\n$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;\n$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;\n// scss-docs-end box-shadow-variables\n\n$component-active-color: $white !default;\n$component-active-bg: $primary !default;\n\n// scss-docs-start focus-ring-variables\n$focus-ring-width: .25rem !default;\n$focus-ring-opacity: .25 !default;\n$focus-ring-color: rgba($primary, $focus-ring-opacity) !default;\n$focus-ring-blur: 0 !default;\n$focus-ring-box-shadow: 0 0 $focus-ring-blur $focus-ring-width $focus-ring-color !default;\n// scss-docs-end focus-ring-variables\n\n// scss-docs-start caret-variables\n$caret-width: .3em !default;\n$caret-vertical-align: $caret-width * .85 !default;\n$caret-spacing: $caret-width * .85 !default;\n// scss-docs-end caret-variables\n\n$transition-base: all .2s ease-in-out !default;\n$transition-fade: opacity .15s linear !default;\n// scss-docs-start collapse-transition\n$transition-collapse: height .35s ease !default;\n$transition-collapse-width: width .35s ease !default;\n// scss-docs-end collapse-transition\n\n// stylelint-disable function-disallowed-list\n// scss-docs-start aspect-ratios\n$aspect-ratios: (\n \"1x1\": 100%,\n \"4x3\": calc(3 / 4 * 100%),\n \"16x9\": calc(9 / 16 * 100%),\n \"21x9\": calc(9 / 21 * 100%)\n) !default;\n// scss-docs-end aspect-ratios\n// stylelint-enable function-disallowed-list\n\n// Typography\n//\n// Font, line-height, and color for body text, headings, and more.\n\n// scss-docs-start font-variables\n// stylelint-disable value-keyword-case\n$font-family-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace !default;\n// stylelint-enable value-keyword-case\n$font-family-base: var(--#{$prefix}font-sans-serif) !default;\n$font-family-code: var(--#{$prefix}font-monospace) !default;\n\n// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins\n// $font-size-base affects the font size of the body text\n$font-size-root: null !default;\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-sm: $font-size-base * .875 !default;\n$font-size-lg: $font-size-base * 1.25 !default;\n\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-medium: 500 !default;\n$font-weight-semibold: 600 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n\n$font-weight-base: $font-weight-normal !default;\n\n$line-height-base: 1.5 !default;\n$line-height-sm: 1.25 !default;\n$line-height-lg: 2 !default;\n\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n// scss-docs-end font-variables\n\n// scss-docs-start font-sizes\n$font-sizes: (\n 1: $h1-font-size,\n 2: $h2-font-size,\n 3: $h3-font-size,\n 4: $h4-font-size,\n 5: $h5-font-size,\n 6: $h6-font-size\n) !default;\n// scss-docs-end font-sizes\n\n// scss-docs-start headings-variables\n$headings-margin-bottom: $spacer * .5 !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: inherit !default;\n// scss-docs-end headings-variables\n\n// scss-docs-start display-headings\n$display-font-sizes: (\n 1: 5rem,\n 2: 4.5rem,\n 3: 4rem,\n 4: 3.5rem,\n 5: 3rem,\n 6: 2.5rem\n) !default;\n\n$display-font-family: null !default;\n$display-font-style: null !default;\n$display-font-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n// scss-docs-end display-headings\n\n// scss-docs-start type-variables\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n\n$small-font-size: .875em !default;\n\n$sub-sup-font-size: .75em !default;\n\n// fusv-disable\n$text-muted: var(--#{$prefix}secondary-color) !default; // Deprecated in 5.3.0\n// fusv-enable\n\n$initialism-font-size: $small-font-size !default;\n\n$blockquote-margin-y: $spacer !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$blockquote-footer-color: $gray-600 !default;\n$blockquote-footer-font-size: $small-font-size !default;\n\n$hr-margin-y: $spacer !default;\n$hr-color: inherit !default;\n\n// fusv-disable\n$hr-bg-color: null !default; // Deprecated in v5.2.0\n$hr-height: null !default; // Deprecated in v5.2.0\n// fusv-enable\n\n$hr-border-color: null !default; // Allows for inherited colors\n$hr-border-width: var(--#{$prefix}border-width) !default;\n$hr-opacity: .25 !default;\n\n// scss-docs-start vr-variables\n$vr-border-width: var(--#{$prefix}border-width) !default;\n// scss-docs-end vr-variables\n\n$legend-margin-bottom: .5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n\n$dt-font-weight: $font-weight-bold !default;\n\n$list-inline-padding: .5rem !default;\n\n$mark-padding: .1875em !default;\n$mark-color: $body-color !default;\n$mark-bg: $yellow-100 !default;\n// scss-docs-end type-variables\n\n\n// Tables\n//\n// Customizes the `.table` component with basic values, each used across all table variations.\n\n// scss-docs-start table-variables\n$table-cell-padding-y: .5rem !default;\n$table-cell-padding-x: .5rem !default;\n$table-cell-padding-y-sm: .25rem !default;\n$table-cell-padding-x-sm: .25rem !default;\n\n$table-cell-vertical-align: top !default;\n\n$table-color: var(--#{$prefix}emphasis-color) !default;\n$table-bg: var(--#{$prefix}body-bg) !default;\n$table-accent-bg: transparent !default;\n\n$table-th-font-weight: null !default;\n\n$table-striped-color: $table-color !default;\n$table-striped-bg-factor: .05 !default;\n$table-striped-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-striped-bg-factor) !default;\n\n$table-active-color: $table-color !default;\n$table-active-bg-factor: .1 !default;\n$table-active-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-active-bg-factor) !default;\n\n$table-hover-color: $table-color !default;\n$table-hover-bg-factor: .075 !default;\n$table-hover-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-hover-bg-factor) !default;\n\n$table-border-factor: .2 !default;\n$table-border-width: var(--#{$prefix}border-width) !default;\n$table-border-color: var(--#{$prefix}border-color) !default;\n\n$table-striped-order: odd !default;\n$table-striped-columns-order: even !default;\n\n$table-group-separator-color: currentcolor !default;\n\n$table-caption-color: var(--#{$prefix}secondary-color) !default;\n\n$table-bg-scale: -80% !default;\n// scss-docs-end table-variables\n\n// scss-docs-start table-loop\n$table-variants: (\n \"primary\": shift-color($primary, $table-bg-scale),\n \"secondary\": shift-color($secondary, $table-bg-scale),\n \"success\": shift-color($success, $table-bg-scale),\n \"info\": shift-color($info, $table-bg-scale),\n \"warning\": shift-color($warning, $table-bg-scale),\n \"danger\": shift-color($danger, $table-bg-scale),\n \"light\": $light,\n \"dark\": $dark,\n) !default;\n// scss-docs-end table-loop\n\n\n// Buttons + Forms\n//\n// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.\n\n// scss-docs-start input-btn-variables\n$input-btn-padding-y: .375rem !default;\n$input-btn-padding-x: .75rem !default;\n$input-btn-font-family: null !default;\n$input-btn-font-size: $font-size-base !default;\n$input-btn-line-height: $line-height-base !default;\n\n$input-btn-focus-width: $focus-ring-width !default;\n$input-btn-focus-color-opacity: $focus-ring-opacity !default;\n$input-btn-focus-color: $focus-ring-color !default;\n$input-btn-focus-blur: $focus-ring-blur !default;\n$input-btn-focus-box-shadow: $focus-ring-box-shadow !default;\n\n$input-btn-padding-y-sm: .25rem !default;\n$input-btn-padding-x-sm: .5rem !default;\n$input-btn-font-size-sm: $font-size-sm !default;\n\n$input-btn-padding-y-lg: .5rem !default;\n$input-btn-padding-x-lg: 1rem !default;\n$input-btn-font-size-lg: $font-size-lg !default;\n\n$input-btn-border-width: var(--#{$prefix}border-width) !default;\n// scss-docs-end input-btn-variables\n\n\n// Buttons\n//\n// For each of Bootstrap's buttons, define text, background, and border color.\n\n// scss-docs-start btn-variables\n$btn-color: var(--#{$prefix}body-color) !default;\n$btn-padding-y: $input-btn-padding-y !default;\n$btn-padding-x: $input-btn-padding-x !default;\n$btn-font-family: $input-btn-font-family !default;\n$btn-font-size: $input-btn-font-size !default;\n$btn-line-height: $input-btn-line-height !default;\n$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping\n\n$btn-padding-y-sm: $input-btn-padding-y-sm !default;\n$btn-padding-x-sm: $input-btn-padding-x-sm !default;\n$btn-font-size-sm: $input-btn-font-size-sm !default;\n\n$btn-padding-y-lg: $input-btn-padding-y-lg !default;\n$btn-padding-x-lg: $input-btn-padding-x-lg !default;\n$btn-font-size-lg: $input-btn-font-size-lg !default;\n\n$btn-border-width: $input-btn-border-width !default;\n\n$btn-font-weight: $font-weight-normal !default;\n$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;\n$btn-focus-width: $input-btn-focus-width !default;\n$btn-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$btn-disabled-opacity: .65 !default;\n$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;\n\n$btn-link-color: var(--#{$prefix}link-color) !default;\n$btn-link-hover-color: var(--#{$prefix}link-hover-color) !default;\n$btn-link-disabled-color: $gray-600 !default;\n$btn-link-focus-shadow-rgb: to-rgb(mix(color-contrast($link-color), $link-color, 15%)) !default;\n\n// Allows for customizing button radius independently from global border radius\n$btn-border-radius: var(--#{$prefix}border-radius) !default;\n$btn-border-radius-sm: var(--#{$prefix}border-radius-sm) !default;\n$btn-border-radius-lg: var(--#{$prefix}border-radius-lg) !default;\n\n$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$btn-hover-bg-shade-amount: 15% !default;\n$btn-hover-bg-tint-amount: 15% !default;\n$btn-hover-border-shade-amount: 20% !default;\n$btn-hover-border-tint-amount: 10% !default;\n$btn-active-bg-shade-amount: 20% !default;\n$btn-active-bg-tint-amount: 20% !default;\n$btn-active-border-shade-amount: 25% !default;\n$btn-active-border-tint-amount: 10% !default;\n// scss-docs-end btn-variables\n\n\n// Forms\n\n// scss-docs-start form-text-variables\n$form-text-margin-top: .25rem !default;\n$form-text-font-size: $small-font-size !default;\n$form-text-font-style: null !default;\n$form-text-font-weight: null !default;\n$form-text-color: var(--#{$prefix}secondary-color) !default;\n// scss-docs-end form-text-variables\n\n// scss-docs-start form-label-variables\n$form-label-margin-bottom: .5rem !default;\n$form-label-font-size: null !default;\n$form-label-font-style: null !default;\n$form-label-font-weight: null !default;\n$form-label-color: null !default;\n// scss-docs-end form-label-variables\n\n// scss-docs-start form-input-variables\n$input-padding-y: $input-btn-padding-y !default;\n$input-padding-x: $input-btn-padding-x !default;\n$input-font-family: $input-btn-font-family !default;\n$input-font-size: $input-btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $input-btn-line-height !default;\n\n$input-padding-y-sm: $input-btn-padding-y-sm !default;\n$input-padding-x-sm: $input-btn-padding-x-sm !default;\n$input-font-size-sm: $input-btn-font-size-sm !default;\n\n$input-padding-y-lg: $input-btn-padding-y-lg !default;\n$input-padding-x-lg: $input-btn-padding-x-lg !default;\n$input-font-size-lg: $input-btn-font-size-lg !default;\n\n$input-bg: var(--#{$prefix}body-bg) !default;\n$input-disabled-color: null !default;\n$input-disabled-bg: var(--#{$prefix}secondary-bg) !default;\n$input-disabled-border-color: null !default;\n\n$input-color: var(--#{$prefix}body-color) !default;\n$input-border-color: var(--#{$prefix}border-color) !default;\n$input-border-width: $input-btn-border-width !default;\n$input-box-shadow: var(--#{$prefix}box-shadow-inset) !default;\n\n$input-border-radius: var(--#{$prefix}border-radius) !default;\n$input-border-radius-sm: var(--#{$prefix}border-radius-sm) !default;\n$input-border-radius-lg: var(--#{$prefix}border-radius-lg) !default;\n\n$input-focus-bg: $input-bg !default;\n$input-focus-border-color: tint-color($component-active-bg, 50%) !default;\n$input-focus-color: $input-color !default;\n$input-focus-width: $input-btn-focus-width !default;\n$input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$input-placeholder-color: var(--#{$prefix}secondary-color) !default;\n$input-plaintext-color: var(--#{$prefix}body-color) !default;\n\n$input-height-border: calc(#{$input-border-width} * 2) !default; // stylelint-disable-line function-disallowed-list\n\n$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;\n$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;\n$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;\n\n$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;\n$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;\n$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;\n\n$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$form-color-width: 3rem !default;\n// scss-docs-end form-input-variables\n\n// scss-docs-start form-check-variables\n$form-check-input-width: 1em !default;\n$form-check-min-height: $font-size-base * $line-height-base !default;\n$form-check-padding-start: $form-check-input-width + .5em !default;\n$form-check-margin-bottom: .125rem !default;\n$form-check-label-color: null !default;\n$form-check-label-cursor: null !default;\n$form-check-transition: null !default;\n\n$form-check-input-active-filter: brightness(90%) !default;\n\n$form-check-input-bg: $input-bg !default;\n$form-check-input-border: var(--#{$prefix}border-width) solid var(--#{$prefix}border-color) !default;\n$form-check-input-border-radius: .25em !default;\n$form-check-radio-border-radius: 50% !default;\n$form-check-input-focus-border: $input-focus-border-color !default;\n$form-check-input-focus-box-shadow: $focus-ring-box-shadow !default;\n\n$form-check-input-checked-color: $component-active-color !default;\n$form-check-input-checked-bg-color: $component-active-bg !default;\n$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;\n$form-check-input-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-check-radio-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-indeterminate-color: $component-active-color !default;\n$form-check-input-indeterminate-bg-color: $component-active-bg !default;\n$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;\n$form-check-input-indeterminate-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-disabled-opacity: .5 !default;\n$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default;\n$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default;\n\n$form-check-inline-margin-end: 1rem !default;\n// scss-docs-end form-check-variables\n\n// scss-docs-start form-switch-variables\n$form-switch-color: rgba($black, .25) !default;\n$form-switch-width: 2em !default;\n$form-switch-padding-start: $form-switch-width + .5em !default;\n$form-switch-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-border-radius: $form-switch-width !default;\n$form-switch-transition: background-position .15s ease-in-out !default;\n\n$form-switch-focus-color: $input-focus-border-color !default;\n$form-switch-focus-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-switch-checked-color: $component-active-color !default;\n$form-switch-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-checked-bg-position: right center !default;\n// scss-docs-end form-switch-variables\n\n// scss-docs-start input-group-variables\n$input-group-addon-padding-y: $input-padding-y !default;\n$input-group-addon-padding-x: $input-padding-x !default;\n$input-group-addon-font-weight: $input-font-weight !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: var(--#{$prefix}tertiary-bg) !default;\n$input-group-addon-border-color: $input-border-color !default;\n// scss-docs-end input-group-variables\n\n// scss-docs-start form-select-variables\n$form-select-padding-y: $input-padding-y !default;\n$form-select-padding-x: $input-padding-x !default;\n$form-select-font-family: $input-font-family !default;\n$form-select-font-size: $input-font-size !default;\n$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image\n$form-select-font-weight: $input-font-weight !default;\n$form-select-line-height: $input-line-height !default;\n$form-select-color: $input-color !default;\n$form-select-bg: $input-bg !default;\n$form-select-disabled-color: null !default;\n$form-select-disabled-bg: $input-disabled-bg !default;\n$form-select-disabled-border-color: $input-disabled-border-color !default;\n$form-select-bg-position: right $form-select-padding-x center !default;\n$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions\n$form-select-indicator-color: $gray-800 !default;\n$form-select-indicator: url(\"data:image/svg+xml,\") !default;\n\n$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;\n$form-select-feedback-icon-position: center right $form-select-indicator-padding !default;\n$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;\n\n$form-select-border-width: $input-border-width !default;\n$form-select-border-color: $input-border-color !default;\n$form-select-border-radius: $input-border-radius !default;\n$form-select-box-shadow: var(--#{$prefix}box-shadow-inset) !default;\n\n$form-select-focus-border-color: $input-focus-border-color !default;\n$form-select-focus-width: $input-focus-width !default;\n$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;\n\n$form-select-padding-y-sm: $input-padding-y-sm !default;\n$form-select-padding-x-sm: $input-padding-x-sm !default;\n$form-select-font-size-sm: $input-font-size-sm !default;\n$form-select-border-radius-sm: $input-border-radius-sm !default;\n\n$form-select-padding-y-lg: $input-padding-y-lg !default;\n$form-select-padding-x-lg: $input-padding-x-lg !default;\n$form-select-font-size-lg: $input-font-size-lg !default;\n$form-select-border-radius-lg: $input-border-radius-lg !default;\n\n$form-select-transition: $input-transition !default;\n// scss-docs-end form-select-variables\n\n// scss-docs-start form-range-variables\n$form-range-track-width: 100% !default;\n$form-range-track-height: .5rem !default;\n$form-range-track-cursor: pointer !default;\n$form-range-track-bg: var(--#{$prefix}secondary-bg) !default;\n$form-range-track-border-radius: 1rem !default;\n$form-range-track-box-shadow: var(--#{$prefix}box-shadow-inset) !default;\n\n$form-range-thumb-width: 1rem !default;\n$form-range-thumb-height: $form-range-thumb-width !default;\n$form-range-thumb-bg: $component-active-bg !default;\n$form-range-thumb-border: 0 !default;\n$form-range-thumb-border-radius: 1rem !default;\n$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;\n$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;\n$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge\n$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default;\n$form-range-thumb-disabled-bg: var(--#{$prefix}secondary-color) !default;\n$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n// scss-docs-end form-range-variables\n\n// scss-docs-start form-file-variables\n$form-file-button-color: $input-color !default;\n$form-file-button-bg: var(--#{$prefix}tertiary-bg) !default;\n$form-file-button-hover-bg: var(--#{$prefix}secondary-bg) !default;\n// scss-docs-end form-file-variables\n\n// scss-docs-start form-floating-variables\n$form-floating-height: add(3.5rem, $input-height-border) !default;\n$form-floating-line-height: 1.25 !default;\n$form-floating-padding-x: $input-padding-x !default;\n$form-floating-padding-y: 1rem !default;\n$form-floating-input-padding-t: 1.625rem !default;\n$form-floating-input-padding-b: .625rem !default;\n$form-floating-label-height: 1.5em !default;\n$form-floating-label-opacity: .65 !default;\n$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default;\n$form-floating-label-disabled-color: $gray-600 !default;\n$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;\n// scss-docs-end form-floating-variables\n\n// Form validation\n\n// scss-docs-start form-feedback-variables\n$form-feedback-margin-top: $form-text-margin-top !default;\n$form-feedback-font-size: $form-text-font-size !default;\n$form-feedback-font-style: $form-text-font-style !default;\n$form-feedback-valid-color: $success !default;\n$form-feedback-invalid-color: $danger !default;\n\n$form-feedback-icon-valid-color: $form-feedback-valid-color !default;\n$form-feedback-icon-valid: url(\"data:image/svg+xml,\") !default;\n$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;\n$form-feedback-icon-invalid: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end form-feedback-variables\n\n// scss-docs-start form-validation-colors\n$form-valid-color: $form-feedback-valid-color !default;\n$form-valid-border-color: $form-feedback-valid-color !default;\n$form-invalid-color: $form-feedback-invalid-color !default;\n$form-invalid-border-color: $form-feedback-invalid-color !default;\n// scss-docs-end form-validation-colors\n\n// scss-docs-start form-validation-states\n$form-validation-states: (\n \"valid\": (\n \"color\": var(--#{$prefix}form-valid-color),\n \"icon\": $form-feedback-icon-valid,\n \"tooltip-color\": #fff,\n \"tooltip-bg-color\": var(--#{$prefix}success),\n \"focus-box-shadow\": 0 0 $input-btn-focus-blur $input-focus-width rgba(var(--#{$prefix}success-rgb), $input-btn-focus-color-opacity),\n \"border-color\": var(--#{$prefix}form-valid-border-color),\n ),\n \"invalid\": (\n \"color\": var(--#{$prefix}form-invalid-color),\n \"icon\": $form-feedback-icon-invalid,\n \"tooltip-color\": #fff,\n \"tooltip-bg-color\": var(--#{$prefix}danger),\n \"focus-box-shadow\": 0 0 $input-btn-focus-blur $input-focus-width rgba(var(--#{$prefix}danger-rgb), $input-btn-focus-color-opacity),\n \"border-color\": var(--#{$prefix}form-invalid-border-color),\n )\n) !default;\n// scss-docs-end form-validation-states\n\n// Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n\n// scss-docs-start zindex-stack\n$zindex-dropdown: 1000 !default;\n$zindex-sticky: 1020 !default;\n$zindex-fixed: 1030 !default;\n$zindex-offcanvas-backdrop: 1040 !default;\n$zindex-offcanvas: 1045 !default;\n$zindex-modal-backdrop: 1050 !default;\n$zindex-modal: 1055 !default;\n$zindex-popover: 1070 !default;\n$zindex-tooltip: 1080 !default;\n$zindex-toast: 1090 !default;\n// scss-docs-end zindex-stack\n\n// scss-docs-start zindex-levels-map\n$zindex-levels: (\n n1: -1,\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3\n) !default;\n// scss-docs-end zindex-levels-map\n\n\n// Navs\n\n// scss-docs-start nav-variables\n$nav-link-padding-y: .5rem !default;\n$nav-link-padding-x: 1rem !default;\n$nav-link-font-size: null !default;\n$nav-link-font-weight: null !default;\n$nav-link-color: var(--#{$prefix}link-color) !default;\n$nav-link-hover-color: var(--#{$prefix}link-hover-color) !default;\n$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;\n$nav-link-disabled-color: var(--#{$prefix}secondary-color) !default;\n$nav-link-focus-box-shadow: $focus-ring-box-shadow !default;\n\n$nav-tabs-border-color: var(--#{$prefix}border-color) !default;\n$nav-tabs-border-width: var(--#{$prefix}border-width) !default;\n$nav-tabs-border-radius: var(--#{$prefix}border-radius) !default;\n$nav-tabs-link-hover-border-color: var(--#{$prefix}secondary-bg) var(--#{$prefix}secondary-bg) $nav-tabs-border-color !default;\n$nav-tabs-link-active-color: var(--#{$prefix}emphasis-color) !default;\n$nav-tabs-link-active-bg: var(--#{$prefix}body-bg) !default;\n$nav-tabs-link-active-border-color: var(--#{$prefix}border-color) var(--#{$prefix}border-color) $nav-tabs-link-active-bg !default;\n\n$nav-pills-border-radius: var(--#{$prefix}border-radius) !default;\n$nav-pills-link-active-color: $component-active-color !default;\n$nav-pills-link-active-bg: $component-active-bg !default;\n\n$nav-underline-gap: 1rem !default;\n$nav-underline-border-width: .125rem !default;\n$nav-underline-link-active-color: var(--#{$prefix}emphasis-color) !default;\n// scss-docs-end nav-variables\n\n\n// Navbar\n\n// scss-docs-start navbar-variables\n$navbar-padding-y: $spacer * .5 !default;\n$navbar-padding-x: null !default;\n\n$navbar-nav-link-padding-x: .5rem !default;\n\n$navbar-brand-font-size: $font-size-lg !default;\n// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link\n$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;\n$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;\n$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) * .5 !default;\n$navbar-brand-margin-end: 1rem !default;\n\n$navbar-toggler-padding-y: .25rem !default;\n$navbar-toggler-padding-x: .75rem !default;\n$navbar-toggler-font-size: $font-size-lg !default;\n$navbar-toggler-border-radius: $btn-border-radius !default;\n$navbar-toggler-focus-width: $btn-focus-width !default;\n$navbar-toggler-transition: box-shadow .15s ease-in-out !default;\n\n$navbar-light-color: rgba(var(--#{$prefix}emphasis-color-rgb), .65) !default;\n$navbar-light-hover-color: rgba(var(--#{$prefix}emphasis-color-rgb), .8) !default;\n$navbar-light-active-color: rgba(var(--#{$prefix}emphasis-color-rgb), 1) !default;\n$navbar-light-disabled-color: rgba(var(--#{$prefix}emphasis-color-rgb), .3) !default;\n$navbar-light-icon-color: rgba($body-color, .75) !default;\n$navbar-light-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-light-toggler-border-color: rgba(var(--#{$prefix}emphasis-color-rgb), .15) !default;\n$navbar-light-brand-color: $navbar-light-active-color !default;\n$navbar-light-brand-hover-color: $navbar-light-active-color !default;\n// scss-docs-end navbar-variables\n\n// scss-docs-start navbar-dark-variables\n$navbar-dark-color: rgba($white, .55) !default;\n$navbar-dark-hover-color: rgba($white, .75) !default;\n$navbar-dark-active-color: $white !default;\n$navbar-dark-disabled-color: rgba($white, .25) !default;\n$navbar-dark-icon-color: $navbar-dark-color !default;\n$navbar-dark-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-dark-toggler-border-color: rgba($white, .1) !default;\n$navbar-dark-brand-color: $navbar-dark-active-color !default;\n$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;\n// scss-docs-end navbar-dark-variables\n\n\n// Dropdowns\n//\n// Dropdown menu container and contents.\n\n// scss-docs-start dropdown-variables\n$dropdown-min-width: 10rem !default;\n$dropdown-padding-x: 0 !default;\n$dropdown-padding-y: .5rem !default;\n$dropdown-spacer: .125rem !default;\n$dropdown-font-size: $font-size-base !default;\n$dropdown-color: var(--#{$prefix}body-color) !default;\n$dropdown-bg: var(--#{$prefix}body-bg) !default;\n$dropdown-border-color: var(--#{$prefix}border-color-translucent) !default;\n$dropdown-border-radius: var(--#{$prefix}border-radius) !default;\n$dropdown-border-width: var(--#{$prefix}border-width) !default;\n$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default; // stylelint-disable-line function-disallowed-list\n$dropdown-divider-bg: $dropdown-border-color !default;\n$dropdown-divider-margin-y: $spacer * .5 !default;\n$dropdown-box-shadow: var(--#{$prefix}box-shadow) !default;\n\n$dropdown-link-color: var(--#{$prefix}body-color) !default;\n$dropdown-link-hover-color: $dropdown-link-color !default;\n$dropdown-link-hover-bg: var(--#{$prefix}tertiary-bg) !default;\n\n$dropdown-link-active-color: $component-active-color !default;\n$dropdown-link-active-bg: $component-active-bg !default;\n\n$dropdown-link-disabled-color: var(--#{$prefix}tertiary-color) !default;\n\n$dropdown-item-padding-y: $spacer * .25 !default;\n$dropdown-item-padding-x: $spacer !default;\n\n$dropdown-header-color: $gray-600 !default;\n$dropdown-header-padding-x: $dropdown-item-padding-x !default;\n$dropdown-header-padding-y: $dropdown-padding-y !default;\n// fusv-disable\n$dropdown-header-padding: $dropdown-header-padding-y $dropdown-header-padding-x !default; // Deprecated in v5.2.0\n// fusv-enable\n// scss-docs-end dropdown-variables\n\n// scss-docs-start dropdown-dark-variables\n$dropdown-dark-color: $gray-300 !default;\n$dropdown-dark-bg: $gray-800 !default;\n$dropdown-dark-border-color: $dropdown-border-color !default;\n$dropdown-dark-divider-bg: $dropdown-divider-bg !default;\n$dropdown-dark-box-shadow: null !default;\n$dropdown-dark-link-color: $dropdown-dark-color !default;\n$dropdown-dark-link-hover-color: $white !default;\n$dropdown-dark-link-hover-bg: rgba($white, .15) !default;\n$dropdown-dark-link-active-color: $dropdown-link-active-color !default;\n$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default;\n$dropdown-dark-link-disabled-color: $gray-500 !default;\n$dropdown-dark-header-color: $gray-500 !default;\n// scss-docs-end dropdown-dark-variables\n\n\n// Pagination\n\n// scss-docs-start pagination-variables\n$pagination-padding-y: .375rem !default;\n$pagination-padding-x: .75rem !default;\n$pagination-padding-y-sm: .25rem !default;\n$pagination-padding-x-sm: .5rem !default;\n$pagination-padding-y-lg: .75rem !default;\n$pagination-padding-x-lg: 1.5rem !default;\n\n$pagination-font-size: $font-size-base !default;\n\n$pagination-color: var(--#{$prefix}link-color) !default;\n$pagination-bg: var(--#{$prefix}body-bg) !default;\n$pagination-border-radius: var(--#{$prefix}border-radius) !default;\n$pagination-border-width: var(--#{$prefix}border-width) !default;\n$pagination-margin-start: calc(#{$pagination-border-width} * -1) !default; // stylelint-disable-line function-disallowed-list\n$pagination-border-color: var(--#{$prefix}border-color) !default;\n\n$pagination-focus-color: var(--#{$prefix}link-hover-color) !default;\n$pagination-focus-bg: var(--#{$prefix}secondary-bg) !default;\n$pagination-focus-box-shadow: $focus-ring-box-shadow !default;\n$pagination-focus-outline: 0 !default;\n\n$pagination-hover-color: var(--#{$prefix}link-hover-color) !default;\n$pagination-hover-bg: var(--#{$prefix}tertiary-bg) !default;\n$pagination-hover-border-color: var(--#{$prefix}border-color) !default; // Todo in v6: remove this?\n\n$pagination-active-color: $component-active-color !default;\n$pagination-active-bg: $component-active-bg !default;\n$pagination-active-border-color: $component-active-bg !default;\n\n$pagination-disabled-color: var(--#{$prefix}secondary-color) !default;\n$pagination-disabled-bg: var(--#{$prefix}secondary-bg) !default;\n$pagination-disabled-border-color: var(--#{$prefix}border-color) !default;\n\n$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$pagination-border-radius-sm: var(--#{$prefix}border-radius-sm) !default;\n$pagination-border-radius-lg: var(--#{$prefix}border-radius-lg) !default;\n// scss-docs-end pagination-variables\n\n\n// Placeholders\n\n// scss-docs-start placeholders\n$placeholder-opacity-max: .5 !default;\n$placeholder-opacity-min: .2 !default;\n// scss-docs-end placeholders\n\n// Cards\n\n// scss-docs-start card-variables\n$card-spacer-y: $spacer !default;\n$card-spacer-x: $spacer !default;\n$card-title-spacer-y: $spacer * .5 !default;\n$card-title-color: null !default;\n$card-subtitle-color: null !default;\n$card-border-width: var(--#{$prefix}border-width) !default;\n$card-border-color: var(--#{$prefix}border-color-translucent) !default;\n$card-border-radius: var(--#{$prefix}border-radius) !default;\n$card-box-shadow: null !default;\n$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;\n$card-cap-padding-y: $card-spacer-y * .5 !default;\n$card-cap-padding-x: $card-spacer-x !default;\n$card-cap-bg: rgba(var(--#{$prefix}body-color-rgb), .03) !default;\n$card-cap-color: null !default;\n$card-height: null !default;\n$card-color: null !default;\n$card-bg: var(--#{$prefix}body-bg) !default;\n$card-img-overlay-padding: $spacer !default;\n$card-group-margin: $grid-gutter-width * .5 !default;\n// scss-docs-end card-variables\n\n// Accordion\n\n// scss-docs-start accordion-variables\n$accordion-padding-y: 1rem !default;\n$accordion-padding-x: 1.25rem !default;\n$accordion-color: var(--#{$prefix}body-color) !default;\n$accordion-bg: var(--#{$prefix}body-bg) !default;\n$accordion-border-width: var(--#{$prefix}border-width) !default;\n$accordion-border-color: var(--#{$prefix}border-color) !default;\n$accordion-border-radius: var(--#{$prefix}border-radius) !default;\n$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;\n\n$accordion-body-padding-y: $accordion-padding-y !default;\n$accordion-body-padding-x: $accordion-padding-x !default;\n\n$accordion-button-padding-y: $accordion-padding-y !default;\n$accordion-button-padding-x: $accordion-padding-x !default;\n$accordion-button-color: var(--#{$prefix}body-color) !default;\n$accordion-button-bg: var(--#{$prefix}accordion-bg) !default;\n$accordion-transition: $btn-transition, border-radius .15s ease !default;\n$accordion-button-active-bg: var(--#{$prefix}primary-bg-subtle) !default;\n$accordion-button-active-color: var(--#{$prefix}primary-text-emphasis) !default;\n\n// fusv-disable\n$accordion-button-focus-border-color: $input-focus-border-color !default; // Deprecated in v5.3.3\n// fusv-enable\n$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;\n\n$accordion-icon-width: 1.25rem !default;\n$accordion-icon-color: $body-color !default;\n$accordion-icon-active-color: $primary-text-emphasis !default;\n$accordion-icon-transition: transform .2s ease-in-out !default;\n$accordion-icon-transform: rotate(-180deg) !default;\n\n$accordion-button-icon: url(\"data:image/svg+xml,\") !default;\n$accordion-button-active-icon: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end accordion-variables\n\n// Tooltips\n\n// scss-docs-start tooltip-variables\n$tooltip-font-size: $font-size-sm !default;\n$tooltip-max-width: 200px !default;\n$tooltip-color: var(--#{$prefix}body-bg) !default;\n$tooltip-bg: var(--#{$prefix}emphasis-color) !default;\n$tooltip-border-radius: var(--#{$prefix}border-radius) !default;\n$tooltip-opacity: .9 !default;\n$tooltip-padding-y: $spacer * .25 !default;\n$tooltip-padding-x: $spacer * .5 !default;\n$tooltip-margin: null !default; // TODO: remove this in v6\n\n$tooltip-arrow-width: .8rem !default;\n$tooltip-arrow-height: .4rem !default;\n// fusv-disable\n$tooltip-arrow-color: null !default; // Deprecated in Bootstrap 5.2.0 for CSS variables\n// fusv-enable\n// scss-docs-end tooltip-variables\n\n// Form tooltips must come after regular tooltips\n// scss-docs-start tooltip-feedback-variables\n$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;\n$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;\n$form-feedback-tooltip-font-size: $tooltip-font-size !default;\n$form-feedback-tooltip-line-height: null !default;\n$form-feedback-tooltip-opacity: $tooltip-opacity !default;\n$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;\n// scss-docs-end tooltip-feedback-variables\n\n\n// Popovers\n\n// scss-docs-start popover-variables\n$popover-font-size: $font-size-sm !default;\n$popover-bg: var(--#{$prefix}body-bg) !default;\n$popover-max-width: 276px !default;\n$popover-border-width: var(--#{$prefix}border-width) !default;\n$popover-border-color: var(--#{$prefix}border-color-translucent) !default;\n$popover-border-radius: var(--#{$prefix}border-radius-lg) !default;\n$popover-inner-border-radius: calc(#{$popover-border-radius} - #{$popover-border-width}) !default; // stylelint-disable-line function-disallowed-list\n$popover-box-shadow: var(--#{$prefix}box-shadow) !default;\n\n$popover-header-font-size: $font-size-base !default;\n$popover-header-bg: var(--#{$prefix}secondary-bg) !default;\n$popover-header-color: $headings-color !default;\n$popover-header-padding-y: .5rem !default;\n$popover-header-padding-x: $spacer !default;\n\n$popover-body-color: var(--#{$prefix}body-color) !default;\n$popover-body-padding-y: $spacer !default;\n$popover-body-padding-x: $spacer !default;\n\n$popover-arrow-width: 1rem !default;\n$popover-arrow-height: .5rem !default;\n// scss-docs-end popover-variables\n\n// fusv-disable\n// Deprecated in Bootstrap 5.2.0 for CSS variables\n$popover-arrow-color: $popover-bg !default;\n$popover-arrow-outer-color: var(--#{$prefix}border-color-translucent) !default;\n// fusv-enable\n\n\n// Toasts\n\n// scss-docs-start toast-variables\n$toast-max-width: 350px !default;\n$toast-padding-x: .75rem !default;\n$toast-padding-y: .5rem !default;\n$toast-font-size: .875rem !default;\n$toast-color: null !default;\n$toast-background-color: rgba(var(--#{$prefix}body-bg-rgb), .85) !default;\n$toast-border-width: var(--#{$prefix}border-width) !default;\n$toast-border-color: var(--#{$prefix}border-color-translucent) !default;\n$toast-border-radius: var(--#{$prefix}border-radius) !default;\n$toast-box-shadow: var(--#{$prefix}box-shadow) !default;\n$toast-spacing: $container-padding-x !default;\n\n$toast-header-color: var(--#{$prefix}secondary-color) !default;\n$toast-header-background-color: rgba(var(--#{$prefix}body-bg-rgb), .85) !default;\n$toast-header-border-color: $toast-border-color !default;\n// scss-docs-end toast-variables\n\n\n// Badges\n\n// scss-docs-start badge-variables\n$badge-font-size: .75em !default;\n$badge-font-weight: $font-weight-bold !default;\n$badge-color: $white !default;\n$badge-padding-y: .35em !default;\n$badge-padding-x: .65em !default;\n$badge-border-radius: var(--#{$prefix}border-radius) !default;\n// scss-docs-end badge-variables\n\n\n// Modals\n\n// scss-docs-start modal-variables\n$modal-inner-padding: $spacer !default;\n\n$modal-footer-margin-between: .5rem !default;\n\n$modal-dialog-margin: .5rem !default;\n$modal-dialog-margin-y-sm-up: 1.75rem !default;\n\n$modal-title-line-height: $line-height-base !default;\n\n$modal-content-color: null !default;\n$modal-content-bg: var(--#{$prefix}body-bg) !default;\n$modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;\n$modal-content-border-width: var(--#{$prefix}border-width) !default;\n$modal-content-border-radius: var(--#{$prefix}border-radius-lg) !default;\n$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;\n$modal-content-box-shadow-xs: var(--#{$prefix}box-shadow-sm) !default;\n$modal-content-box-shadow-sm-up: var(--#{$prefix}box-shadow) !default;\n\n$modal-backdrop-bg: $black !default;\n$modal-backdrop-opacity: .5 !default;\n\n$modal-header-border-color: var(--#{$prefix}border-color) !default;\n$modal-header-border-width: $modal-content-border-width !default;\n$modal-header-padding-y: $modal-inner-padding !default;\n$modal-header-padding-x: $modal-inner-padding !default;\n$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility\n\n$modal-footer-bg: null !default;\n$modal-footer-border-color: $modal-header-border-color !default;\n$modal-footer-border-width: $modal-header-border-width !default;\n\n$modal-sm: 300px !default;\n$modal-md: 500px !default;\n$modal-lg: 800px !default;\n$modal-xl: 1140px !default;\n\n$modal-fade-transform: translate(0, -50px) !default;\n$modal-show-transform: none !default;\n$modal-transition: transform .3s ease-out !default;\n$modal-scale-transform: scale(1.02) !default;\n// scss-docs-end modal-variables\n\n\n// Alerts\n//\n// Define alert colors, border radius, and padding.\n\n// scss-docs-start alert-variables\n$alert-padding-y: $spacer !default;\n$alert-padding-x: $spacer !default;\n$alert-margin-bottom: 1rem !default;\n$alert-border-radius: var(--#{$prefix}border-radius) !default;\n$alert-link-font-weight: $font-weight-bold !default;\n$alert-border-width: var(--#{$prefix}border-width) !default;\n$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side\n// scss-docs-end alert-variables\n\n// fusv-disable\n$alert-bg-scale: -80% !default; // Deprecated in v5.2.0, to be removed in v6\n$alert-border-scale: -70% !default; // Deprecated in v5.2.0, to be removed in v6\n$alert-color-scale: 40% !default; // Deprecated in v5.2.0, to be removed in v6\n// fusv-enable\n\n// Progress bars\n\n// scss-docs-start progress-variables\n$progress-height: 1rem !default;\n$progress-font-size: $font-size-base * .75 !default;\n$progress-bg: var(--#{$prefix}secondary-bg) !default;\n$progress-border-radius: var(--#{$prefix}border-radius) !default;\n$progress-box-shadow: var(--#{$prefix}box-shadow-inset) !default;\n$progress-bar-color: $white !default;\n$progress-bar-bg: $primary !default;\n$progress-bar-animation-timing: 1s linear infinite !default;\n$progress-bar-transition: width .6s ease !default;\n// scss-docs-end progress-variables\n\n\n// List group\n\n// scss-docs-start list-group-variables\n$list-group-color: var(--#{$prefix}body-color) !default;\n$list-group-bg: var(--#{$prefix}body-bg) !default;\n$list-group-border-color: var(--#{$prefix}border-color) !default;\n$list-group-border-width: var(--#{$prefix}border-width) !default;\n$list-group-border-radius: var(--#{$prefix}border-radius) !default;\n\n$list-group-item-padding-y: $spacer * .5 !default;\n$list-group-item-padding-x: $spacer !default;\n// fusv-disable\n$list-group-item-bg-scale: -80% !default; // Deprecated in v5.3.0\n$list-group-item-color-scale: 40% !default; // Deprecated in v5.3.0\n// fusv-enable\n\n$list-group-hover-bg: var(--#{$prefix}tertiary-bg) !default;\n$list-group-active-color: $component-active-color !default;\n$list-group-active-bg: $component-active-bg !default;\n$list-group-active-border-color: $list-group-active-bg !default;\n\n$list-group-disabled-color: var(--#{$prefix}secondary-color) !default;\n$list-group-disabled-bg: $list-group-bg !default;\n\n$list-group-action-color: var(--#{$prefix}secondary-color) !default;\n$list-group-action-hover-color: var(--#{$prefix}emphasis-color) !default;\n\n$list-group-action-active-color: var(--#{$prefix}body-color) !default;\n$list-group-action-active-bg: var(--#{$prefix}secondary-bg) !default;\n// scss-docs-end list-group-variables\n\n\n// Image thumbnails\n\n// scss-docs-start thumbnail-variables\n$thumbnail-padding: .25rem !default;\n$thumbnail-bg: var(--#{$prefix}body-bg) !default;\n$thumbnail-border-width: var(--#{$prefix}border-width) !default;\n$thumbnail-border-color: var(--#{$prefix}border-color) !default;\n$thumbnail-border-radius: var(--#{$prefix}border-radius) !default;\n$thumbnail-box-shadow: var(--#{$prefix}box-shadow-sm) !default;\n// scss-docs-end thumbnail-variables\n\n\n// Figures\n\n// scss-docs-start figure-variables\n$figure-caption-font-size: $small-font-size !default;\n$figure-caption-color: var(--#{$prefix}secondary-color) !default;\n// scss-docs-end figure-variables\n\n\n// Breadcrumbs\n\n// scss-docs-start breadcrumb-variables\n$breadcrumb-font-size: null !default;\n$breadcrumb-padding-y: 0 !default;\n$breadcrumb-padding-x: 0 !default;\n$breadcrumb-item-padding-x: .5rem !default;\n$breadcrumb-margin-bottom: 1rem !default;\n$breadcrumb-bg: null !default;\n$breadcrumb-divider-color: var(--#{$prefix}secondary-color) !default;\n$breadcrumb-active-color: var(--#{$prefix}secondary-color) !default;\n$breadcrumb-divider: quote(\"/\") !default;\n$breadcrumb-divider-flipped: $breadcrumb-divider !default;\n$breadcrumb-border-radius: null !default;\n// scss-docs-end breadcrumb-variables\n\n// Carousel\n\n// scss-docs-start carousel-variables\n$carousel-control-color: $white !default;\n$carousel-control-width: 15% !default;\n$carousel-control-opacity: .5 !default;\n$carousel-control-hover-opacity: .9 !default;\n$carousel-control-transition: opacity .15s ease !default;\n\n$carousel-indicator-width: 30px !default;\n$carousel-indicator-height: 3px !default;\n$carousel-indicator-hit-area-height: 10px !default;\n$carousel-indicator-spacer: 3px !default;\n$carousel-indicator-opacity: .5 !default;\n$carousel-indicator-active-bg: $white !default;\n$carousel-indicator-active-opacity: 1 !default;\n$carousel-indicator-transition: opacity .6s ease !default;\n\n$carousel-caption-width: 70% !default;\n$carousel-caption-color: $white !default;\n$carousel-caption-padding-y: 1.25rem !default;\n$carousel-caption-spacer: 1.25rem !default;\n\n$carousel-control-icon-width: 2rem !default;\n\n$carousel-control-prev-icon-bg: url(\"data:image/svg+xml,\") !default;\n$carousel-control-next-icon-bg: url(\"data:image/svg+xml,\") !default;\n\n$carousel-transition-duration: .6s !default;\n$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)\n// scss-docs-end carousel-variables\n\n// scss-docs-start carousel-dark-variables\n$carousel-dark-indicator-active-bg: $black !default;\n$carousel-dark-caption-color: $black !default;\n$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;\n// scss-docs-end carousel-dark-variables\n\n\n// Spinners\n\n// scss-docs-start spinner-variables\n$spinner-width: 2rem !default;\n$spinner-height: $spinner-width !default;\n$spinner-vertical-align: -.125em !default;\n$spinner-border-width: .25em !default;\n$spinner-animation-speed: .75s !default;\n\n$spinner-width-sm: 1rem !default;\n$spinner-height-sm: $spinner-width-sm !default;\n$spinner-border-width-sm: .2em !default;\n// scss-docs-end spinner-variables\n\n\n// Close\n\n// scss-docs-start close-variables\n$btn-close-width: 1em !default;\n$btn-close-height: $btn-close-width !default;\n$btn-close-padding-x: .25em !default;\n$btn-close-padding-y: $btn-close-padding-x !default;\n$btn-close-color: $black !default;\n$btn-close-bg: url(\"data:image/svg+xml,\") !default;\n$btn-close-focus-shadow: $focus-ring-box-shadow !default;\n$btn-close-opacity: .5 !default;\n$btn-close-hover-opacity: .75 !default;\n$btn-close-focus-opacity: 1 !default;\n$btn-close-disabled-opacity: .25 !default;\n$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;\n// scss-docs-end close-variables\n\n\n// Offcanvas\n\n// scss-docs-start offcanvas-variables\n$offcanvas-padding-y: $modal-inner-padding !default;\n$offcanvas-padding-x: $modal-inner-padding !default;\n$offcanvas-horizontal-width: 400px !default;\n$offcanvas-vertical-height: 30vh !default;\n$offcanvas-transition-duration: .3s !default;\n$offcanvas-border-color: $modal-content-border-color !default;\n$offcanvas-border-width: $modal-content-border-width !default;\n$offcanvas-title-line-height: $modal-title-line-height !default;\n$offcanvas-bg-color: var(--#{$prefix}body-bg) !default;\n$offcanvas-color: var(--#{$prefix}body-color) !default;\n$offcanvas-box-shadow: $modal-content-box-shadow-xs !default;\n$offcanvas-backdrop-bg: $modal-backdrop-bg !default;\n$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;\n// scss-docs-end offcanvas-variables\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n\n$kbd-padding-y: .1875rem !default;\n$kbd-padding-x: .375rem !default;\n$kbd-font-size: $code-font-size !default;\n$kbd-color: var(--#{$prefix}body-bg) !default;\n$kbd-bg: var(--#{$prefix}body-color) !default;\n$nested-kbd-font-weight: null !default; // Deprecated in v5.2.0, removing in v6\n\n$pre-color: null !default;\n\n@import \"variables-dark\"; // TODO: can be removed safely in v6, only here to avoid breaking changes in v5.3\n","// Row\n//\n// Rows contain your columns.\n\n:root {\n @each $name, $value in $grid-breakpoints {\n --#{$prefix}breakpoint-#{$name}: #{$value};\n }\n}\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$prefix}gutter-x: #{$gutter};\n --#{$prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed\n margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list\n margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list\n margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready() {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// number of columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: percentage(divide(1, $count));\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is an invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix: \"\", $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // Use custom CSS variable name if present, otherwise default to `class`\n $css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (e.g. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$prefix}#{$css-variable-name}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$prefix}#{$css-variable-name}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $variable in $is-local-vars {\n --#{$prefix}#{$local-var}: #{$variable};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $variable in $is-local-vars {\n --#{$prefix}#{$local-var}: #{$variable};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css b/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css new file mode 100644 index 000000000..49b843b19 --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap Grid v5.3.3 (https://getbootstrap.com/) + * Copyright 2011-2024 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.66666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.66666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.66666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.66666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.66666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.66666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}@media (min-width:576px){.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-inline-grid{display:inline-grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}}@media (min-width:768px){.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-inline-grid{display:inline-grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}}@media (min-width:992px){.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-inline-grid{display:inline-grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}}@media (min-width:1200px){.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-inline-grid{display:inline-grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}}@media (min-width:1400px){.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-inline-grid{display:inline-grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-inline-grid{display:inline-grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap-grid.min.css.map */ \ No newline at end of file diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css.map b/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css.map new file mode 100644 index 000000000..a0db8b57a --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-grid.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/mixins/_banner.scss","../../scss/_containers.scss","dist/css/bootstrap-grid.css","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AACE;;;;ACKA,WCAF,iBAGA,cACA,cACA,cAHA,cADA,eCJE,cAAA,OACA,cAAA,EACA,MAAA,KACA,cAAA,8BACA,aAAA,8BACA,aAAA,KACA,YAAA,KCsDE,yBH5CE,WAAA,cACE,UAAA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eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBCnCZ,aD4BQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["@mixin bsBanner($file) {\n /*!\n * Bootstrap #{$file} v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n}\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-container-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","/*!\n * Bootstrap Grid v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n width: 100%;\n padding-right: calc(var(--bs-gutter-x) * 0.5);\n padding-left: calc(var(--bs-gutter-x) * 0.5);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n:root {\n --bs-breakpoint-xs: 0;\n --bs-breakpoint-sm: 576px;\n --bs-breakpoint-md: 768px;\n --bs-breakpoint-lg: 992px;\n --bs-breakpoint-xl: 1200px;\n --bs-breakpoint-xxl: 1400px;\n}\n\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(-1 * var(--bs-gutter-y));\n margin-right: calc(-0.5 * var(--bs-gutter-x));\n margin-left: calc(-0.5 * var(--bs-gutter-x));\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * 0.5);\n padding-left: calc(var(--bs-gutter-x) * 0.5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-sm-0 {\n margin-left: 0;\n }\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n .offset-sm-3 {\n margin-left: 25%;\n }\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n .offset-sm-6 {\n margin-left: 50%;\n }\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n .offset-sm-9 {\n margin-left: 75%;\n }\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n .g-sm-0,\n .gx-sm-0 {\n --bs-gutter-x: 0;\n }\n .g-sm-0,\n .gy-sm-0 {\n --bs-gutter-y: 0;\n }\n .g-sm-1,\n .gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-sm-1,\n .gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-sm-2,\n .gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-sm-2,\n .gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-sm-3,\n .gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n .g-sm-3,\n .gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n .g-sm-4,\n .gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-sm-4,\n .gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-sm-5,\n .gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n .g-sm-5,\n .gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-md-0 {\n margin-left: 0;\n }\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n .offset-md-3 {\n margin-left: 25%;\n }\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n .offset-md-6 {\n margin-left: 50%;\n }\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n .offset-md-9 {\n margin-left: 75%;\n }\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n .g-md-0,\n .gx-md-0 {\n --bs-gutter-x: 0;\n }\n .g-md-0,\n .gy-md-0 {\n --bs-gutter-y: 0;\n }\n .g-md-1,\n .gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-md-1,\n .gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-md-2,\n .gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-md-2,\n .gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-md-3,\n .gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n .g-md-3,\n .gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n .g-md-4,\n .gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-md-4,\n .gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-md-5,\n .gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n .g-md-5,\n .gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-lg-0 {\n margin-left: 0;\n }\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n .offset-lg-3 {\n margin-left: 25%;\n }\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n .offset-lg-6 {\n margin-left: 50%;\n }\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n .offset-lg-9 {\n margin-left: 75%;\n }\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n .g-lg-0,\n .gx-lg-0 {\n --bs-gutter-x: 0;\n }\n .g-lg-0,\n .gy-lg-0 {\n --bs-gutter-y: 0;\n }\n .g-lg-1,\n .gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-lg-1,\n .gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-lg-2,\n .gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-lg-2,\n .gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-lg-3,\n .gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n .g-lg-3,\n .gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n .g-lg-4,\n .gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-lg-4,\n .gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-lg-5,\n .gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n .g-lg-5,\n .gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-xl-0 {\n margin-left: 0;\n }\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n .offset-xl-3 {\n margin-left: 25%;\n }\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n .offset-xl-6 {\n margin-left: 50%;\n }\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n .offset-xl-9 {\n margin-left: 75%;\n }\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n .g-xl-0,\n .gx-xl-0 {\n --bs-gutter-x: 0;\n }\n .g-xl-0,\n .gy-xl-0 {\n --bs-gutter-y: 0;\n }\n .g-xl-1,\n .gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-xl-1,\n .gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-xl-2,\n .gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-xl-2,\n .gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-xl-3,\n .gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n .g-xl-3,\n .gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n .g-xl-4,\n .gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-xl-4,\n .gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-xl-5,\n .gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n .g-xl-5,\n .gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n .offset-xxl-0 {\n margin-left: 0;\n }\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n .offset-xxl-3 {\n margin-left: 25%;\n }\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n .offset-xxl-6 {\n margin-left: 50%;\n }\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n .offset-xxl-9 {\n margin-left: 75%;\n }\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n .g-xxl-0,\n .gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n .g-xxl-0,\n .gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n .g-xxl-1,\n .gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n .g-xxl-1,\n .gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n .g-xxl-2,\n .gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n .g-xxl-2,\n .gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n .g-xxl-3,\n .gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n .g-xxl-3,\n .gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n .g-xxl-4,\n .gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n .g-xxl-4,\n .gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n .g-xxl-5,\n .gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n .g-xxl-5,\n .gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-inline-grid {\n display: inline-grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n .d-sm-inline-block {\n display: inline-block !important;\n }\n .d-sm-block {\n display: block !important;\n }\n .d-sm-grid {\n display: grid !important;\n }\n .d-sm-inline-grid {\n display: inline-grid !important;\n }\n .d-sm-table {\n display: table !important;\n }\n .d-sm-table-row {\n display: table-row !important;\n }\n .d-sm-table-cell {\n display: table-cell !important;\n }\n .d-sm-flex {\n display: flex !important;\n }\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n .d-sm-none {\n display: none !important;\n }\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n .flex-sm-row {\n flex-direction: row !important;\n }\n .flex-sm-column {\n flex-direction: column !important;\n }\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n .justify-content-sm-center {\n justify-content: center !important;\n }\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n .align-items-sm-center {\n align-items: center !important;\n }\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n .align-content-sm-center {\n align-content: center !important;\n }\n .align-content-sm-between {\n align-content: space-between !important;\n }\n .align-content-sm-around {\n align-content: space-around !important;\n }\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n .align-self-sm-auto {\n align-self: auto !important;\n }\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n .align-self-sm-center {\n align-self: center !important;\n }\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n .order-sm-first {\n order: -1 !important;\n }\n .order-sm-0 {\n order: 0 !important;\n }\n .order-sm-1 {\n order: 1 !important;\n }\n .order-sm-2 {\n order: 2 !important;\n }\n .order-sm-3 {\n order: 3 !important;\n }\n .order-sm-4 {\n order: 4 !important;\n }\n .order-sm-5 {\n order: 5 !important;\n }\n .order-sm-last {\n order: 6 !important;\n }\n .m-sm-0 {\n margin: 0 !important;\n }\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n .m-sm-3 {\n margin: 1rem !important;\n }\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n .m-sm-5 {\n margin: 3rem !important;\n }\n .m-sm-auto {\n margin: auto !important;\n }\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n .mt-sm-auto {\n margin-top: auto !important;\n }\n .me-sm-0 {\n margin-right: 0 !important;\n }\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n .me-sm-auto {\n margin-right: auto !important;\n }\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n .ms-sm-auto {\n margin-left: auto !important;\n }\n .p-sm-0 {\n padding: 0 !important;\n }\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n .p-sm-3 {\n padding: 1rem !important;\n }\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n .p-sm-5 {\n padding: 3rem !important;\n }\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n .d-md-inline-block {\n display: inline-block !important;\n }\n .d-md-block {\n display: block !important;\n }\n .d-md-grid {\n display: grid !important;\n }\n .d-md-inline-grid {\n display: inline-grid !important;\n }\n .d-md-table {\n display: table !important;\n }\n .d-md-table-row {\n display: table-row !important;\n }\n .d-md-table-cell {\n display: table-cell !important;\n }\n .d-md-flex {\n display: flex !important;\n }\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n .d-md-none {\n display: none !important;\n }\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n .flex-md-row {\n flex-direction: row !important;\n }\n .flex-md-column {\n flex-direction: column !important;\n }\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n .justify-content-md-center {\n justify-content: center !important;\n }\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-md-start {\n align-items: flex-start !important;\n }\n .align-items-md-end {\n align-items: flex-end !important;\n }\n .align-items-md-center {\n align-items: center !important;\n }\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n .align-content-md-start {\n align-content: flex-start !important;\n }\n .align-content-md-end {\n align-content: flex-end !important;\n }\n .align-content-md-center {\n align-content: center !important;\n }\n .align-content-md-between {\n align-content: space-between !important;\n }\n .align-content-md-around {\n align-content: space-around !important;\n }\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n .align-self-md-auto {\n align-self: auto !important;\n }\n .align-self-md-start {\n align-self: flex-start !important;\n }\n .align-self-md-end {\n align-self: flex-end !important;\n }\n .align-self-md-center {\n align-self: center !important;\n }\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n .order-md-first {\n order: -1 !important;\n }\n .order-md-0 {\n order: 0 !important;\n }\n .order-md-1 {\n order: 1 !important;\n }\n .order-md-2 {\n order: 2 !important;\n }\n .order-md-3 {\n order: 3 !important;\n }\n .order-md-4 {\n order: 4 !important;\n }\n .order-md-5 {\n order: 5 !important;\n }\n .order-md-last {\n order: 6 !important;\n }\n .m-md-0 {\n margin: 0 !important;\n }\n .m-md-1 {\n margin: 0.25rem !important;\n }\n .m-md-2 {\n margin: 0.5rem !important;\n }\n .m-md-3 {\n margin: 1rem !important;\n }\n .m-md-4 {\n margin: 1.5rem !important;\n }\n .m-md-5 {\n margin: 3rem !important;\n }\n .m-md-auto {\n margin: auto !important;\n }\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-md-0 {\n margin-top: 0 !important;\n }\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n .mt-md-auto {\n margin-top: auto !important;\n }\n .me-md-0 {\n margin-right: 0 !important;\n }\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n .me-md-3 {\n margin-right: 1rem !important;\n }\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n .me-md-5 {\n margin-right: 3rem !important;\n }\n .me-md-auto {\n margin-right: auto !important;\n }\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n .ms-md-0 {\n margin-left: 0 !important;\n }\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n .ms-md-auto {\n margin-left: auto !important;\n }\n .p-md-0 {\n padding: 0 !important;\n }\n .p-md-1 {\n padding: 0.25rem !important;\n }\n .p-md-2 {\n padding: 0.5rem !important;\n }\n .p-md-3 {\n padding: 1rem !important;\n }\n .p-md-4 {\n padding: 1.5rem !important;\n }\n .p-md-5 {\n padding: 3rem !important;\n }\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-md-0 {\n padding-top: 0 !important;\n }\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n .pe-md-0 {\n padding-right: 0 !important;\n }\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n .ps-md-0 {\n padding-left: 0 !important;\n }\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n .d-lg-inline-block {\n display: inline-block !important;\n }\n .d-lg-block {\n display: block !important;\n }\n .d-lg-grid {\n display: grid !important;\n }\n .d-lg-inline-grid {\n display: inline-grid !important;\n }\n .d-lg-table {\n display: table !important;\n }\n .d-lg-table-row {\n display: table-row !important;\n }\n .d-lg-table-cell {\n display: table-cell !important;\n }\n .d-lg-flex {\n display: flex !important;\n }\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n .d-lg-none {\n display: none !important;\n }\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n .flex-lg-row {\n flex-direction: row !important;\n }\n .flex-lg-column {\n flex-direction: column !important;\n }\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n .justify-content-lg-center {\n justify-content: center !important;\n }\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n .align-items-lg-center {\n align-items: center !important;\n }\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n .align-content-lg-center {\n align-content: center !important;\n }\n .align-content-lg-between {\n align-content: space-between !important;\n }\n .align-content-lg-around {\n align-content: space-around !important;\n }\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n .align-self-lg-auto {\n align-self: auto !important;\n }\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n .align-self-lg-center {\n align-self: center !important;\n }\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n .order-lg-first {\n order: -1 !important;\n }\n .order-lg-0 {\n order: 0 !important;\n }\n .order-lg-1 {\n order: 1 !important;\n }\n .order-lg-2 {\n order: 2 !important;\n }\n .order-lg-3 {\n order: 3 !important;\n }\n .order-lg-4 {\n order: 4 !important;\n }\n .order-lg-5 {\n order: 5 !important;\n }\n .order-lg-last {\n order: 6 !important;\n }\n .m-lg-0 {\n margin: 0 !important;\n }\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n .m-lg-3 {\n margin: 1rem !important;\n }\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n .m-lg-5 {\n margin: 3rem !important;\n }\n .m-lg-auto {\n margin: auto !important;\n }\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n .mt-lg-auto {\n margin-top: auto !important;\n }\n .me-lg-0 {\n margin-right: 0 !important;\n }\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n .me-lg-auto {\n margin-right: auto !important;\n }\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n .ms-lg-auto {\n margin-left: auto !important;\n }\n .p-lg-0 {\n padding: 0 !important;\n }\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n .p-lg-3 {\n padding: 1rem !important;\n }\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n .p-lg-5 {\n padding: 3rem !important;\n }\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n .d-xl-inline-block {\n display: inline-block !important;\n }\n .d-xl-block {\n display: block !important;\n }\n .d-xl-grid {\n display: grid !important;\n }\n .d-xl-inline-grid {\n display: inline-grid !important;\n }\n .d-xl-table {\n display: table !important;\n }\n .d-xl-table-row {\n display: table-row !important;\n }\n .d-xl-table-cell {\n display: table-cell !important;\n }\n .d-xl-flex {\n display: flex !important;\n }\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n .d-xl-none {\n display: none !important;\n }\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n .flex-xl-row {\n flex-direction: row !important;\n }\n .flex-xl-column {\n flex-direction: column !important;\n }\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n .justify-content-xl-center {\n justify-content: center !important;\n }\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n .align-items-xl-center {\n align-items: center !important;\n }\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n .align-content-xl-center {\n align-content: center !important;\n }\n .align-content-xl-between {\n align-content: space-between !important;\n }\n .align-content-xl-around {\n align-content: space-around !important;\n }\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n .align-self-xl-auto {\n align-self: auto !important;\n }\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n .align-self-xl-center {\n align-self: center !important;\n }\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n .order-xl-first {\n order: -1 !important;\n }\n .order-xl-0 {\n order: 0 !important;\n }\n .order-xl-1 {\n order: 1 !important;\n }\n .order-xl-2 {\n order: 2 !important;\n }\n .order-xl-3 {\n order: 3 !important;\n }\n .order-xl-4 {\n order: 4 !important;\n }\n .order-xl-5 {\n order: 5 !important;\n }\n .order-xl-last {\n order: 6 !important;\n }\n .m-xl-0 {\n margin: 0 !important;\n }\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n .m-xl-3 {\n margin: 1rem !important;\n }\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n .m-xl-5 {\n margin: 3rem !important;\n }\n .m-xl-auto {\n margin: auto !important;\n }\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n .mt-xl-auto {\n margin-top: auto !important;\n }\n .me-xl-0 {\n margin-right: 0 !important;\n }\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n .me-xl-auto {\n margin-right: auto !important;\n }\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n .ms-xl-auto {\n margin-left: auto !important;\n }\n .p-xl-0 {\n padding: 0 !important;\n }\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n .p-xl-3 {\n padding: 1rem !important;\n }\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n .p-xl-5 {\n padding: 3rem !important;\n }\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n .d-xxl-block {\n display: block !important;\n }\n .d-xxl-grid {\n display: grid !important;\n }\n .d-xxl-inline-grid {\n display: inline-grid !important;\n }\n .d-xxl-table {\n display: table !important;\n }\n .d-xxl-table-row {\n display: table-row !important;\n }\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n .d-xxl-flex {\n display: flex !important;\n }\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n .d-xxl-none {\n display: none !important;\n }\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n .flex-xxl-row {\n flex-direction: row !important;\n }\n .flex-xxl-column {\n flex-direction: column !important;\n }\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n .align-items-xxl-center {\n align-items: center !important;\n }\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n .align-content-xxl-center {\n align-content: center !important;\n }\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n .align-self-xxl-center {\n align-self: center !important;\n }\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n .order-xxl-first {\n order: -1 !important;\n }\n .order-xxl-0 {\n order: 0 !important;\n }\n .order-xxl-1 {\n order: 1 !important;\n }\n .order-xxl-2 {\n order: 2 !important;\n }\n .order-xxl-3 {\n order: 3 !important;\n }\n .order-xxl-4 {\n order: 4 !important;\n }\n .order-xxl-5 {\n order: 5 !important;\n }\n .order-xxl-last {\n order: 6 !important;\n }\n .m-xxl-0 {\n margin: 0 !important;\n }\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n .m-xxl-3 {\n margin: 1rem !important;\n }\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n .m-xxl-5 {\n margin: 3rem !important;\n }\n .m-xxl-auto {\n margin: auto !important;\n }\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n .me-xxl-auto {\n margin-right: auto !important;\n }\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n .p-xxl-0 {\n padding: 0 !important;\n }\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n .p-xxl-3 {\n padding: 1rem !important;\n }\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n .p-xxl-5 {\n padding: 3rem !important;\n }\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n .d-print-inline-block {\n display: inline-block !important;\n }\n .d-print-block {\n display: block !important;\n }\n .d-print-grid {\n display: grid !important;\n }\n .d-print-inline-grid {\n display: inline-grid !important;\n }\n .d-print-table {\n display: table !important;\n }\n .d-print-table-row {\n display: table-row !important;\n }\n .d-print-table-cell {\n display: table-cell !important;\n }\n .d-print-flex {\n display: flex !important;\n }\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n --#{$prefix}gutter-x: #{$gutter};\n --#{$prefix}gutter-y: 0;\n width: 100%;\n padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-right: auto;\n margin-left: auto;\n}\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Row\n//\n// Rows contain your columns.\n\n:root {\n @each $name, $value in $grid-breakpoints {\n --#{$prefix}breakpoint-#{$name}: #{$value};\n }\n}\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$prefix}gutter-x: #{$gutter};\n --#{$prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed\n margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list\n margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list\n margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready() {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// number of columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: percentage(divide(1, $count));\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is an invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix: \"\", $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // Use custom CSS variable name if present, otherwise default to `class`\n $css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (e.g. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$prefix}#{$css-variable-name}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$prefix}#{$css-variable-name}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $variable in $is-local-vars {\n --#{$prefix}#{$local-var}: #{$variable};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $variable in $is-local-vars {\n --#{$prefix}#{$local-var}: #{$variable};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css b/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css new file mode 100644 index 000000000..630541092 --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css @@ -0,0 +1,597 @@ +/*! + * Bootstrap Reboot v5.3.3 (https://getbootstrap.com/) + * Copyright 2011-2024 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +:root, +[data-bs-theme=light] { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-primary-text-emphasis: #052c65; + --bs-secondary-text-emphasis: #2b2f32; + --bs-success-text-emphasis: #0a3622; + --bs-info-text-emphasis: #055160; + --bs-warning-text-emphasis: #664d03; + --bs-danger-text-emphasis: #58151c; + --bs-light-text-emphasis: #495057; + --bs-dark-text-emphasis: #495057; + --bs-primary-bg-subtle: #cfe2ff; + --bs-secondary-bg-subtle: #e2e3e5; + --bs-success-bg-subtle: #d1e7dd; + --bs-info-bg-subtle: #cff4fc; + --bs-warning-bg-subtle: #fff3cd; + --bs-danger-bg-subtle: #f8d7da; + --bs-light-bg-subtle: #fcfcfd; + --bs-dark-bg-subtle: #ced4da; + --bs-primary-border-subtle: #9ec5fe; + --bs-secondary-border-subtle: #c4c8cb; + --bs-success-border-subtle: #a3cfbb; + --bs-info-border-subtle: #9eeaf9; + --bs-warning-border-subtle: #ffe69c; + --bs-danger-border-subtle: #f1aeb5; + --bs-light-border-subtle: #e9ecef; + --bs-dark-border-subtle: #adb5bd; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg: #fff; + --bs-body-bg-rgb: 255, 255, 255; + --bs-emphasis-color: #000; + --bs-emphasis-color-rgb: 0, 0, 0; + --bs-secondary-color: rgba(33, 37, 41, 0.75); + --bs-secondary-color-rgb: 33, 37, 41; + --bs-secondary-bg: #e9ecef; + --bs-secondary-bg-rgb: 233, 236, 239; + --bs-tertiary-color: rgba(33, 37, 41, 0.5); + --bs-tertiary-color-rgb: 33, 37, 41; + --bs-tertiary-bg: #f8f9fa; + --bs-tertiary-bg-rgb: 248, 249, 250; + --bs-heading-color: inherit; + --bs-link-color: #0d6efd; + --bs-link-color-rgb: 13, 110, 253; + --bs-link-decoration: underline; + --bs-link-hover-color: #0a58ca; + --bs-link-hover-color-rgb: 10, 88, 202; + --bs-code-color: #d63384; + --bs-highlight-color: #212529; + --bs-highlight-bg: #fff3cd; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-xxl: 2rem; + --bs-border-radius-2xl: var(--bs-border-radius-xxl); + --bs-border-radius-pill: 50rem; + --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); + --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-focus-ring-width: 0.25rem; + --bs-focus-ring-opacity: 0.25; + --bs-focus-ring-color: rgba(13, 110, 253, 0.25); + --bs-form-valid-color: #198754; + --bs-form-valid-border-color: #198754; + --bs-form-invalid-color: #dc3545; + --bs-form-invalid-border-color: #dc3545; +} + +[data-bs-theme=dark] { + color-scheme: dark; + --bs-body-color: #dee2e6; + --bs-body-color-rgb: 222, 226, 230; + --bs-body-bg: #212529; + --bs-body-bg-rgb: 33, 37, 41; + --bs-emphasis-color: #fff; + --bs-emphasis-color-rgb: 255, 255, 255; + --bs-secondary-color: rgba(222, 226, 230, 0.75); + --bs-secondary-color-rgb: 222, 226, 230; + --bs-secondary-bg: #343a40; + --bs-secondary-bg-rgb: 52, 58, 64; + --bs-tertiary-color: rgba(222, 226, 230, 0.5); + --bs-tertiary-color-rgb: 222, 226, 230; + --bs-tertiary-bg: #2b3035; + --bs-tertiary-bg-rgb: 43, 48, 53; + --bs-primary-text-emphasis: #6ea8fe; + --bs-secondary-text-emphasis: #a7acb1; + --bs-success-text-emphasis: #75b798; + --bs-info-text-emphasis: #6edff6; + --bs-warning-text-emphasis: #ffda6a; + --bs-danger-text-emphasis: #ea868f; + --bs-light-text-emphasis: #f8f9fa; + --bs-dark-text-emphasis: #dee2e6; + --bs-primary-bg-subtle: #031633; + --bs-secondary-bg-subtle: #161719; + --bs-success-bg-subtle: #051b11; + --bs-info-bg-subtle: #032830; + --bs-warning-bg-subtle: #332701; + --bs-danger-bg-subtle: #2c0b0e; + --bs-light-bg-subtle: #343a40; + --bs-dark-bg-subtle: #1a1d20; + --bs-primary-border-subtle: #084298; + --bs-secondary-border-subtle: #41464b; + --bs-success-border-subtle: #0f5132; + --bs-info-border-subtle: #087990; + --bs-warning-border-subtle: #997404; + --bs-danger-border-subtle: #842029; + --bs-light-border-subtle: #495057; + --bs-dark-border-subtle: #343a40; + --bs-heading-color: inherit; + --bs-link-color: #6ea8fe; + --bs-link-hover-color: #8bb9fe; + --bs-link-color-rgb: 110, 168, 254; + --bs-link-hover-color-rgb: 139, 185, 254; + --bs-code-color: #e685b5; + --bs-highlight-color: #dee2e6; + --bs-highlight-bg: #664d03; + --bs-border-color: #495057; + --bs-border-color-translucent: rgba(255, 255, 255, 0.15); + --bs-form-valid-color: #75b798; + --bs-form-valid-border-color: #75b798; + --bs-form-invalid-color: #ea868f; + --bs-form-invalid-border-color: #ea868f; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: var(--bs-border-width) solid; + opacity: 0.25; +} + +h6, h5, h4, h3, h2, h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; + color: var(--bs-heading-color); +} + +h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + h1 { + font-size: 2.5rem; + } +} + +h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + h2 { + font-size: 2rem; + } +} + +h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + h3 { + font-size: 1.75rem; + } +} + +h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + h4 { + font-size: 1.5rem; + } +} + +h5 { + font-size: 1.25rem; +} + +h6 { + font-size: 1rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul { + padding-left: 2rem; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: bolder; +} + +small { + font-size: 0.875em; +} + +mark { + padding: 0.1875em; + color: var(--bs-highlight-color); + background-color: var(--bs-highlight-bg); +} + +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +a { + color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)); + text-decoration: underline; +} +a:hover { + --bs-link-color-rgb: var(--bs-link-hover-color-rgb); +} + +a:not([href]):not([class]), a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +pre, +code, +kbd, +samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} +a > code { + color: inherit; +} + +kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} +kbd kbd { + padding: 0; + font-size: 1em; +} + +figure { + margin: 0 0 1rem; +} + +img, +svg { + vertical-align: middle; +} + +table { + caption-side: bottom; + border-collapse: collapse; +} + +caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-secondary-color); + text-align: left; +} + +th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +thead, +tbody, +tfoot, +tr, +td, +th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +label { + display: inline-block; +} + +button { + border-radius: 0; +} + +button:focus:not(:focus-visible) { + outline: 0; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +select { + text-transform: none; +} + +[role=button] { + cursor: pointer; +} + +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} + +[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button; +} +button:not(:disabled), +[type=button]:not(:disabled), +[type=reset]:not(:disabled), +[type=submit]:not(:disabled) { + cursor: pointer; +} + +::-moz-focus-inner { + padding: 0; + border-style: none; +} + +textarea { + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} + +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-year-field { + padding: 0; +} + +::-webkit-inner-spin-button { + height: auto; +} + +[type=search] { + -webkit-appearance: textfield; + outline-offset: -2px; +} + +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ +::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-color-swatch-wrapper { + padding: 0; +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +iframe { + border: 0; +} + +summary { + display: list-item; + cursor: pointer; +} + +progress { + vertical-align: baseline; +} + +[hidden] { + display: none !important; +} + +/*# sourceMappingURL=bootstrap-reboot.css.map */ \ No newline at end of file diff --git a/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css.map b/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css.map new file mode 100644 index 000000000..5fe522b6d --- /dev/null +++ b/proxy/css/bootstrap-5.3.3/bootstrap-reboot.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/mixins/_banner.scss","../../scss/_root.scss","../../scss/vendor/_rfs.scss","bootstrap-reboot.css","../../scss/mixins/_color-mode.scss","../../scss/_reboot.scss","../../scss/_variables.scss","../../scss/mixins/_border-radius.scss"],"names":[],"mappings":"AACE;;;;EAAA;ACDF;;EASI,kBAAA;EAAA,oBAAA;EAAA,oBAAA;EAAA,kBAAA;EAAA,iBAAA;EAAA,oBAAA;EAAA,oBAAA;EAAA,mBAAA;EAAA,kBAAA;EAAA,kBAAA;EAAA,gBAAA;EAAA,gBAAA;EAAA,kBAAA;EAAA,uBAAA;EAIA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAIA,qBAAA;EAAA,uBAAA;EAAA,qBAAA;EAAA,kBAAA;EAAA,qBAAA;EAAA,oBAAA;EAAA,mBAAA;EAAA,kBAAA;EAIA,8BAAA;EAAA,iCAAA;EAAA,6BAAA;EAAA,2BAAA;EAAA,6BAAA;EAAA,4BAAA;EAAA,6BAAA;EAAA,yBAAA;EAIA,mCAAA;EAAA,qCAAA;EAAA,mCAAA;EAAA,gCAAA;EAAA,mCAAA;EAAA,kCAAA;EAAA,iCAAA;EAAA,gCAAA;EAIA,+BAAA;EAAA,iCAAA;EAAA,+BAAA;EAAA,4BAAA;EAAA,+BAAA;EAAA,8BAAA;EAAA,6BAAA;EAAA,4BAAA;EAIA,mCAAA;EAAA,qCAAA;EAAA,mCAAA;EAAA,gCAAA;EAAA,mCAAA;EAAA,kCAAA;EAAA,iCAAA;EAAA,gCAAA;EAGF,6BAAA;EACA,uBAAA;EAMA,qNAAA;EACA,yGAAA;EACA,yFAAA;EAOA,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FyCJ;;AElCA;EACE,wBAAA;AFqCF;;AE7BA;;;;EAIE,0BAAA;AFgCF;AE7BI;;;;EACE,eAAA;AFkCN;;AE3BA;EACE,UAAA;EACA,kBAAA;AF8BF;;AEzBA;EACE,gBAAA;AF4BF;;AElBA;EACE,YAAA;EACA,UAAA;EACA,SAAA;EACA,SAAA;AFqBF;;AEbA;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,qBCmN4B;EJpatB,iCAAA;EGoNN,oBAAA;AFeF;AD/XI;EGyWJ;IHtMQ,iBAAA;ECgON;AACF;AElBE;EACE,WAAA;AFoBJ;;AEbA;;;;;;;EAOE,UAAA;AFgBF;;AEbA;EACE,YAAA;AFgBF;;AEPA;EACE,6BAAA;EACA,oBAAA;AFUF;;AEFA;;;;;;;CAAA;AAWA;EACE,wBAAA;AFEF;;AEGA;EACE,UAAA;AFAF;;AEOA;EACE,aAAA;EACA,0BAAA;AFJF;;AEEA;EACE,aAAA;EACA,0BAAA;AFJF;;AESA;EACE,qBAAA;AFNF;;AEWA;EACE,SAAA;AFRF;;AEeA;EACE,kBAAA;EACA,eAAA;AFZF;;AEoBA;EACE,wBAAA;AFjBF;;AEyBA;EACE,wBAAA;AFtBF","file":"bootstrap-reboot.css","sourcesContent":["@mixin bsBanner($file) {\n /*!\n * Bootstrap #{$file} v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n}\n",":root,\n[data-bs-theme=\"light\"] {\n // Note: Custom variable values only support SassScript inside `#{}`.\n\n // Colors\n //\n // Generate palettes for full colors, grays, and theme colors.\n\n @each $color, $value in $colors {\n --#{$prefix}#{$color}: #{$value};\n }\n\n @each $color, $value in $grays {\n --#{$prefix}gray-#{$color}: #{$value};\n }\n\n @each $color, $value in $theme-colors {\n --#{$prefix}#{$color}: #{$value};\n }\n\n @each $color, $value in $theme-colors-rgb {\n --#{$prefix}#{$color}-rgb: #{$value};\n }\n\n @each $color, $value in $theme-colors-text {\n --#{$prefix}#{$color}-text-emphasis: #{$value};\n }\n\n @each $color, $value in $theme-colors-bg-subtle {\n --#{$prefix}#{$color}-bg-subtle: #{$value};\n }\n\n @each $color, $value in $theme-colors-border-subtle {\n --#{$prefix}#{$color}-border-subtle: #{$value};\n }\n\n --#{$prefix}white-rgb: #{to-rgb($white)};\n --#{$prefix}black-rgb: #{to-rgb($black)};\n\n // Fonts\n\n // Note: Use `inspect` for lists so that quoted items keep the quotes.\n // See https://github.com/sass/sass/issues/2383#issuecomment-336349172\n --#{$prefix}font-sans-serif: #{inspect($font-family-sans-serif)};\n --#{$prefix}font-monospace: #{inspect($font-family-monospace)};\n --#{$prefix}gradient: #{$gradient};\n\n // Root and body\n // scss-docs-start root-body-variables\n @if $font-size-root != null {\n --#{$prefix}root-font-size: #{$font-size-root};\n }\n --#{$prefix}body-font-family: #{inspect($font-family-base)};\n @include rfs($font-size-base, --#{$prefix}body-font-size);\n --#{$prefix}body-font-weight: #{$font-weight-base};\n --#{$prefix}body-line-height: #{$line-height-base};\n @if $body-text-align != null {\n --#{$prefix}body-text-align: #{$body-text-align};\n }\n\n --#{$prefix}body-color: #{$body-color};\n --#{$prefix}body-color-rgb: #{to-rgb($body-color)};\n --#{$prefix}body-bg: #{$body-bg};\n --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};\n\n --#{$prefix}emphasis-color: #{$body-emphasis-color};\n --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)};\n\n --#{$prefix}secondary-color: #{$body-secondary-color};\n --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)};\n --#{$prefix}secondary-bg: #{$body-secondary-bg};\n --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)};\n\n --#{$prefix}tertiary-color: #{$body-tertiary-color};\n --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)};\n --#{$prefix}tertiary-bg: #{$body-tertiary-bg};\n --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};\n // scss-docs-end root-body-variables\n\n --#{$prefix}heading-color: #{$headings-color};\n\n --#{$prefix}link-color: #{$link-color};\n --#{$prefix}link-color-rgb: #{to-rgb($link-color)};\n --#{$prefix}link-decoration: #{$link-decoration};\n\n --#{$prefix}link-hover-color: #{$link-hover-color};\n --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)};\n\n @if $link-hover-decoration != null {\n --#{$prefix}link-hover-decoration: #{$link-hover-decoration};\n }\n\n --#{$prefix}code-color: #{$code-color};\n --#{$prefix}highlight-color: #{$mark-color};\n --#{$prefix}highlight-bg: #{$mark-bg};\n\n // scss-docs-start root-border-var\n --#{$prefix}border-width: #{$border-width};\n --#{$prefix}border-style: #{$border-style};\n --#{$prefix}border-color: #{$border-color};\n --#{$prefix}border-color-translucent: #{$border-color-translucent};\n\n --#{$prefix}border-radius: #{$border-radius};\n --#{$prefix}border-radius-sm: #{$border-radius-sm};\n --#{$prefix}border-radius-lg: #{$border-radius-lg};\n --#{$prefix}border-radius-xl: #{$border-radius-xl};\n --#{$prefix}border-radius-xxl: #{$border-radius-xxl};\n --#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency\n --#{$prefix}border-radius-pill: #{$border-radius-pill};\n // scss-docs-end root-border-var\n\n --#{$prefix}box-shadow: #{$box-shadow};\n --#{$prefix}box-shadow-sm: #{$box-shadow-sm};\n --#{$prefix}box-shadow-lg: #{$box-shadow-lg};\n --#{$prefix}box-shadow-inset: #{$box-shadow-inset};\n\n // Focus styles\n // scss-docs-start root-focus-variables\n --#{$prefix}focus-ring-width: #{$focus-ring-width};\n --#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};\n --#{$prefix}focus-ring-color: #{$focus-ring-color};\n // scss-docs-end root-focus-variables\n\n // scss-docs-start root-form-validation-variables\n --#{$prefix}form-valid-color: #{$form-valid-color};\n --#{$prefix}form-valid-border-color: #{$form-valid-border-color};\n --#{$prefix}form-invalid-color: #{$form-invalid-color};\n --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};\n // scss-docs-end root-form-validation-variables\n}\n\n@if $enable-dark-mode {\n @include color-mode(dark, true) {\n color-scheme: dark;\n\n // scss-docs-start root-dark-mode-vars\n --#{$prefix}body-color: #{$body-color-dark};\n --#{$prefix}body-color-rgb: #{to-rgb($body-color-dark)};\n --#{$prefix}body-bg: #{$body-bg-dark};\n --#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dark)};\n\n --#{$prefix}emphasis-color: #{$body-emphasis-color-dark};\n --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color-dark)};\n\n --#{$prefix}secondary-color: #{$body-secondary-color-dark};\n --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color-dark)};\n --#{$prefix}secondary-bg: #{$body-secondary-bg-dark};\n --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg-dark)};\n\n --#{$prefix}tertiary-color: #{$body-tertiary-color-dark};\n --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};\n --#{$prefix}tertiary-bg: #{$body-tertiary-bg-dark};\n --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};\n\n @each $color, $value in $theme-colors-text-dark {\n --#{$prefix}#{$color}-text-emphasis: #{$value};\n }\n\n @each $color, $value in $theme-colors-bg-subtle-dark {\n --#{$prefix}#{$color}-bg-subtle: #{$value};\n }\n\n @each $color, $value in $theme-colors-border-subtle-dark {\n --#{$prefix}#{$color}-border-subtle: #{$value};\n }\n\n --#{$prefix}heading-color: #{$headings-color-dark};\n\n --#{$prefix}link-color: #{$link-color-dark};\n --#{$prefix}link-hover-color: #{$link-hover-color-dark};\n --#{$prefix}link-color-rgb: #{to-rgb($link-color-dark)};\n --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color-dark)};\n\n --#{$prefix}code-color: #{$code-color-dark};\n --#{$prefix}highlight-color: #{$mark-color-dark};\n --#{$prefix}highlight-bg: #{$mark-bg-dark};\n\n --#{$prefix}border-color: #{$border-color-dark};\n --#{$prefix}border-color-translucent: #{$border-color-translucent-dark};\n\n --#{$prefix}form-valid-color: #{$form-valid-color-dark};\n --#{$prefix}form-valid-border-color: #{$form-valid-border-color-dark};\n --#{$prefix}form-invalid-color: #{$form-invalid-color-dark};\n --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color-dark};\n // scss-docs-end root-dark-mode-vars\n }\n}\n","// stylelint-disable scss/dimension-no-non-numeric-values\n\n// SCSS RFS mixin\n//\n// Automated responsive values for font sizes, paddings, margins and much more\n//\n// Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)\n\n// Configuration\n\n// Base value\n$rfs-base-value: 1.25rem !default;\n$rfs-unit: rem !default;\n\n@if $rfs-unit != rem and $rfs-unit != px {\n @error \"`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.\";\n}\n\n// Breakpoint at where values start decreasing if screen width is smaller\n$rfs-breakpoint: 1200px !default;\n$rfs-breakpoint-unit: px !default;\n\n@if $rfs-breakpoint-unit != px and $rfs-breakpoint-unit != em and $rfs-breakpoint-unit != rem {\n @error \"`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.\";\n}\n\n// Resize values based on screen height and width\n$rfs-two-dimensional: false !default;\n\n// Factor of decrease\n$rfs-factor: 10 !default;\n\n@if type-of($rfs-factor) != number or $rfs-factor <= 1 {\n @error \"`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.\";\n}\n\n// Mode. Possibilities: \"min-media-query\", \"max-media-query\"\n$rfs-mode: min-media-query !default;\n\n// Generate enable or disable classes. Possibilities: false, \"enable\" or \"disable\"\n$rfs-class: false !default;\n\n// 1 rem = $rfs-rem-value px\n$rfs-rem-value: 16 !default;\n\n// Safari iframe resize bug: https://github.com/twbs/rfs/issues/14\n$rfs-safari-iframe-resize-bug-fix: false !default;\n\n// Disable RFS by setting $enable-rfs to false\n$enable-rfs: true !default;\n\n// Cache $rfs-base-value unit\n$rfs-base-value-unit: unit($rfs-base-value);\n\n@function divide($dividend, $divisor, $precision: 10) {\n $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);\n $dividend: abs($dividend);\n $divisor: abs($divisor);\n @if $dividend == 0 {\n @return 0;\n }\n @if $divisor == 0 {\n @error \"Cannot divide by 0\";\n }\n $remainder: $dividend;\n $result: 0;\n $factor: 10;\n @while ($remainder > 0 and $precision >= 0) {\n $quotient: 0;\n @while ($remainder >= $divisor) {\n $remainder: $remainder - $divisor;\n $quotient: $quotient + 1;\n }\n $result: $result * 10 + $quotient;\n $factor: $factor * .1;\n $remainder: $remainder * 10;\n $precision: $precision - 1;\n @if ($precision < 0 and $remainder >= $divisor * 5) {\n $result: $result + 1;\n }\n }\n $result: $result * $factor * $sign;\n $dividend-unit: unit($dividend);\n $divisor-unit: unit($divisor);\n $unit-map: (\n \"px\": 1px,\n \"rem\": 1rem,\n \"em\": 1em,\n \"%\": 1%\n );\n @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {\n $result: $result * map-get($unit-map, $dividend-unit);\n }\n @return $result;\n}\n\n// Remove px-unit from $rfs-base-value for calculations\n@if $rfs-base-value-unit == px {\n $rfs-base-value: divide($rfs-base-value, $rfs-base-value * 0 + 1);\n}\n@else if $rfs-base-value-unit == rem {\n $rfs-base-value: divide($rfs-base-value, divide($rfs-base-value * 0 + 1, $rfs-rem-value));\n}\n\n// Cache $rfs-breakpoint unit to prevent multiple calls\n$rfs-breakpoint-unit-cache: unit($rfs-breakpoint);\n\n// Remove unit from $rfs-breakpoint for calculations\n@if $rfs-breakpoint-unit-cache == px {\n $rfs-breakpoint: divide($rfs-breakpoint, $rfs-breakpoint * 0 + 1);\n}\n@else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == \"em\" {\n $rfs-breakpoint: divide($rfs-breakpoint, divide($rfs-breakpoint * 0 + 1, $rfs-rem-value));\n}\n\n// Calculate the media query value\n$rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit});\n$rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);\n$rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);\n\n// Internal mixin used to determine which media query needs to be used\n@mixin _rfs-media-query {\n @if $rfs-two-dimensional {\n @if $rfs-mode == max-media-query {\n @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {\n @content;\n }\n }\n @else {\n @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {\n @content;\n }\n }\n }\n @else {\n @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {\n @content;\n }\n }\n}\n\n// Internal mixin that adds disable classes to the selector if needed.\n@mixin _rfs-rule {\n @if $rfs-class == disable and $rfs-mode == max-media-query {\n // Adding an extra class increases specificity, which prevents the media query to override the property\n &,\n .disable-rfs &,\n &.disable-rfs {\n @content;\n }\n }\n @else if $rfs-class == enable and $rfs-mode == min-media-query {\n .enable-rfs &,\n &.enable-rfs {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Internal mixin that adds enable classes to the selector if needed.\n@mixin _rfs-media-query-rule {\n\n @if $rfs-class == enable {\n @if $rfs-mode == min-media-query {\n @content;\n }\n\n @include _rfs-media-query () {\n .enable-rfs &,\n &.enable-rfs {\n @content;\n }\n }\n }\n @else {\n @if $rfs-class == disable and $rfs-mode == min-media-query {\n .disable-rfs &,\n &.disable-rfs {\n @content;\n }\n }\n @include _rfs-media-query () {\n @content;\n }\n }\n}\n\n// Helper function to get the formatted non-responsive value\n@function rfs-value($values) {\n // Convert to list\n $values: if(type-of($values) != list, ($values,), $values);\n\n $val: \"\";\n\n // Loop over each value and calculate value\n @each $value in $values {\n @if $value == 0 {\n $val: $val + \" 0\";\n }\n @else {\n // Cache $value unit\n $unit: if(type-of($value) == \"number\", unit($value), false);\n\n @if $unit == px {\n // Convert to rem if needed\n $val: $val + \" \" + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);\n }\n @else if $unit == rem {\n // Convert to px if needed\n $val: $val + \" \" + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);\n } @else {\n // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value\n $val: $val + \" \" + $value;\n }\n }\n }\n\n // Remove first space\n @return unquote(str-slice($val, 2));\n}\n\n// Helper function to get the responsive value calculated by RFS\n@function rfs-fluid-value($values) {\n // Convert to list\n $values: if(type-of($values) != list, ($values,), $values);\n\n $val: \"\";\n\n // Loop over each value and calculate value\n @each $value in $values {\n @if $value == 0 {\n $val: $val + \" 0\";\n } @else {\n // Cache $value unit\n $unit: if(type-of($value) == \"number\", unit($value), false);\n\n // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value\n @if not $unit or $unit != px and $unit != rem {\n $val: $val + \" \" + $value;\n } @else {\n // Remove unit from $value for calculations\n $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value)));\n\n // Only add the media query if the value is greater than the minimum value\n @if abs($value) <= $rfs-base-value or not $enable-rfs {\n $val: $val + \" \" + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);\n }\n @else {\n // Calculate the minimum value\n $value-min: $rfs-base-value + divide(abs($value) - $rfs-base-value, $rfs-factor);\n\n // Calculate difference between $value and the minimum value\n $value-diff: abs($value) - $value-min;\n\n // Base value formatting\n $min-width: if($rfs-unit == rem, #{divide($value-min, $rfs-rem-value)}rem, #{$value-min}px);\n\n // Use negative value if needed\n $min-width: if($value < 0, -$min-width, $min-width);\n\n // Use `vmin` if two-dimensional is enabled\n $variable-unit: if($rfs-two-dimensional, vmin, vw);\n\n // Calculate the variable width between 0 and $rfs-breakpoint\n $variable-width: #{divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};\n\n // Return the calculated value\n $val: $val + \" calc(\" + $min-width + if($value < 0, \" - \", \" + \") + $variable-width + \")\";\n }\n }\n }\n }\n\n // Remove first space\n @return unquote(str-slice($val, 2));\n}\n\n// RFS mixin\n@mixin rfs($values, $property: font-size) {\n @if $values != null {\n $val: rfs-value($values);\n $fluid-val: rfs-fluid-value($values);\n\n // Do not print the media query if responsive & non-responsive values are the same\n @if $val == $fluid-val {\n #{$property}: $val;\n }\n @else {\n @include _rfs-rule () {\n #{$property}: if($rfs-mode == max-media-query, $val, $fluid-val);\n\n // Include safari iframe resize fix if needed\n min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);\n }\n\n @include _rfs-media-query-rule () {\n #{$property}: if($rfs-mode == max-media-query, $fluid-val, $val);\n }\n }\n }\n}\n\n// Shorthand helper mixins\n@mixin font-size($value) {\n @include rfs($value);\n}\n\n@mixin padding($value) {\n @include rfs($value, padding);\n}\n\n@mixin padding-top($value) {\n @include rfs($value, padding-top);\n}\n\n@mixin padding-right($value) {\n @include rfs($value, padding-right);\n}\n\n@mixin padding-bottom($value) {\n @include rfs($value, padding-bottom);\n}\n\n@mixin padding-left($value) {\n @include rfs($value, padding-left);\n}\n\n@mixin margin($value) {\n @include rfs($value, margin);\n}\n\n@mixin margin-top($value) {\n @include rfs($value, margin-top);\n}\n\n@mixin margin-right($value) {\n @include rfs($value, margin-right);\n}\n\n@mixin margin-bottom($value) {\n @include rfs($value, margin-bottom);\n}\n\n@mixin margin-left($value) {\n @include rfs($value, margin-left);\n}\n","/*!\n * Bootstrap Reboot v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n:root,\n[data-bs-theme=light] {\n --bs-blue: #0d6efd;\n --bs-indigo: #6610f2;\n --bs-purple: #6f42c1;\n --bs-pink: #d63384;\n --bs-red: #dc3545;\n --bs-orange: #fd7e14;\n --bs-yellow: #ffc107;\n --bs-green: #198754;\n --bs-teal: #20c997;\n --bs-cyan: #0dcaf0;\n --bs-black: #000;\n --bs-white: #fff;\n --bs-gray: #6c757d;\n --bs-gray-dark: #343a40;\n --bs-gray-100: #f8f9fa;\n --bs-gray-200: #e9ecef;\n --bs-gray-300: #dee2e6;\n --bs-gray-400: #ced4da;\n --bs-gray-500: #adb5bd;\n --bs-gray-600: #6c757d;\n --bs-gray-700: #495057;\n --bs-gray-800: #343a40;\n --bs-gray-900: #212529;\n --bs-primary: #0d6efd;\n --bs-secondary: #6c757d;\n --bs-success: #198754;\n --bs-info: #0dcaf0;\n --bs-warning: #ffc107;\n --bs-danger: #dc3545;\n --bs-light: #f8f9fa;\n --bs-dark: #212529;\n --bs-primary-rgb: 13, 110, 253;\n --bs-secondary-rgb: 108, 117, 125;\n --bs-success-rgb: 25, 135, 84;\n --bs-info-rgb: 13, 202, 240;\n --bs-warning-rgb: 255, 193, 7;\n --bs-danger-rgb: 220, 53, 69;\n --bs-light-rgb: 248, 249, 250;\n --bs-dark-rgb: 33, 37, 41;\n --bs-primary-text-emphasis: #052c65;\n --bs-secondary-text-emphasis: #2b2f32;\n --bs-success-text-emphasis: #0a3622;\n --bs-info-text-emphasis: #055160;\n --bs-warning-text-emphasis: #664d03;\n --bs-danger-text-emphasis: #58151c;\n --bs-light-text-emphasis: #495057;\n --bs-dark-text-emphasis: #495057;\n --bs-primary-bg-subtle: #cfe2ff;\n --bs-secondary-bg-subtle: #e2e3e5;\n --bs-success-bg-subtle: #d1e7dd;\n --bs-info-bg-subtle: #cff4fc;\n --bs-warning-bg-subtle: #fff3cd;\n --bs-danger-bg-subtle: #f8d7da;\n --bs-light-bg-subtle: #fcfcfd;\n --bs-dark-bg-subtle: #ced4da;\n --bs-primary-border-subtle: #9ec5fe;\n --bs-secondary-border-subtle: #c4c8cb;\n --bs-success-border-subtle: #a3cfbb;\n --bs-info-border-subtle: #9eeaf9;\n --bs-warning-border-subtle: #ffe69c;\n --bs-danger-border-subtle: #f1aeb5;\n --bs-light-border-subtle: #e9ecef;\n --bs-dark-border-subtle: #adb5bd;\n --bs-white-rgb: 255, 255, 255;\n --bs-black-rgb: 0, 0, 0;\n --bs-font-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));\n --bs-body-font-family: var(--bs-font-sans-serif);\n --bs-body-font-size: 1rem;\n --bs-body-font-weight: 400;\n --bs-body-line-height: 1.5;\n --bs-body-color: #212529;\n --bs-body-color-rgb: 33, 37, 41;\n --bs-body-bg: #fff;\n --bs-body-bg-rgb: 255, 255, 255;\n --bs-emphasis-color: #000;\n --bs-emphasis-color-rgb: 0, 0, 0;\n --bs-secondary-color: rgba(33, 37, 41, 0.75);\n --bs-secondary-color-rgb: 33, 37, 41;\n --bs-secondary-bg: #e9ecef;\n --bs-secondary-bg-rgb: 233, 236, 239;\n --bs-tertiary-color: rgba(33, 37, 41, 0.5);\n --bs-tertiary-color-rgb: 33, 37, 41;\n --bs-tertiary-bg: #f8f9fa;\n --bs-tertiary-bg-rgb: 248, 249, 250;\n --bs-heading-color: inherit;\n --bs-link-color: #0d6efd;\n --bs-link-color-rgb: 13, 110, 253;\n --bs-link-decoration: underline;\n --bs-link-hover-color: #0a58ca;\n --bs-link-hover-color-rgb: 10, 88, 202;\n --bs-code-color: #d63384;\n --bs-highlight-color: #212529;\n --bs-highlight-bg: #fff3cd;\n --bs-border-width: 1px;\n --bs-border-style: solid;\n --bs-border-color: #dee2e6;\n --bs-border-color-translucent: rgba(0, 0, 0, 0.175);\n --bs-border-radius: 0.375rem;\n --bs-border-radius-sm: 0.25rem;\n --bs-border-radius-lg: 0.5rem;\n --bs-border-radius-xl: 1rem;\n --bs-border-radius-xxl: 2rem;\n --bs-border-radius-2xl: var(--bs-border-radius-xxl);\n --bs-border-radius-pill: 50rem;\n --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);\n --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);\n --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);\n --bs-focus-ring-width: 0.25rem;\n --bs-focus-ring-opacity: 0.25;\n --bs-focus-ring-color: rgba(13, 110, 253, 0.25);\n --bs-form-valid-color: #198754;\n --bs-form-valid-border-color: #198754;\n --bs-form-invalid-color: #dc3545;\n --bs-form-invalid-border-color: #dc3545;\n}\n\n[data-bs-theme=dark] {\n color-scheme: dark;\n --bs-body-color: #dee2e6;\n --bs-body-color-rgb: 222, 226, 230;\n --bs-body-bg: #212529;\n --bs-body-bg-rgb: 33, 37, 41;\n --bs-emphasis-color: #fff;\n --bs-emphasis-color-rgb: 255, 255, 255;\n --bs-secondary-color: rgba(222, 226, 230, 0.75);\n --bs-secondary-color-rgb: 222, 226, 230;\n --bs-secondary-bg: #343a40;\n --bs-secondary-bg-rgb: 52, 58, 64;\n --bs-tertiary-color: rgba(222, 226, 230, 0.5);\n --bs-tertiary-color-rgb: 222, 226, 230;\n --bs-tertiary-bg: #2b3035;\n --bs-tertiary-bg-rgb: 43, 48, 53;\n --bs-primary-text-emphasis: #6ea8fe;\n --bs-secondary-text-emphasis: #a7acb1;\n --bs-success-text-emphasis: #75b798;\n --bs-info-text-emphasis: #6edff6;\n --bs-warning-text-emphasis: #ffda6a;\n --bs-danger-text-emphasis: #ea868f;\n --bs-light-text-emphasis: #f8f9fa;\n --bs-dark-text-emphasis: #dee2e6;\n --bs-primary-bg-subtle: #031633;\n --bs-secondary-bg-subtle: #161719;\n --bs-success-bg-subtle: #051b11;\n --bs-info-bg-subtle: #032830;\n --bs-warning-bg-subtle: #332701;\n --bs-danger-bg-subtle: #2c0b0e;\n --bs-light-bg-subtle: #343a40;\n --bs-dark-bg-subtle: #1a1d20;\n --bs-primary-border-subtle: #084298;\n --bs-secondary-border-subtle: #41464b;\n --bs-success-border-subtle: #0f5132;\n --bs-info-border-subtle: #087990;\n --bs-warning-border-subtle: #997404;\n --bs-danger-border-subtle: #842029;\n --bs-light-border-subtle: #495057;\n --bs-dark-border-subtle: #343a40;\n --bs-heading-color: inherit;\n --bs-link-color: #6ea8fe;\n --bs-link-hover-color: #8bb9fe;\n --bs-link-color-rgb: 110, 168, 254;\n --bs-link-hover-color-rgb: 139, 185, 254;\n --bs-code-color: #e685b5;\n --bs-highlight-color: #dee2e6;\n --bs-highlight-bg: #664d03;\n --bs-border-color: #495057;\n --bs-border-color-translucent: rgba(255, 255, 255, 0.15);\n --bs-form-valid-color: #75b798;\n --bs-form-valid-border-color: #75b798;\n --bs-form-invalid-color: #ea868f;\n --bs-form-invalid-border-color: #ea868f;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :root {\n scroll-behavior: smooth;\n }\n}\n\nbody {\n margin: 0;\n font-family: var(--bs-body-font-family);\n font-size: var(--bs-body-font-size);\n font-weight: var(--bs-body-font-weight);\n line-height: var(--bs-body-line-height);\n color: var(--bs-body-color);\n text-align: var(--bs-body-text-align);\n background-color: var(--bs-body-bg);\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nhr {\n margin: 1rem 0;\n color: inherit;\n border: 0;\n border-top: var(--bs-border-width) solid;\n opacity: 0.25;\n}\n\nh6, h5, h4, h3, h2, h1 {\n margin-top: 0;\n margin-bottom: 0.5rem;\n font-weight: 500;\n line-height: 1.2;\n color: var(--bs-heading-color);\n}\n\nh1 {\n font-size: calc(1.375rem + 1.5vw);\n}\n@media (min-width: 1200px) {\n h1 {\n font-size: 2.5rem;\n }\n}\n\nh2 {\n font-size: calc(1.325rem + 0.9vw);\n}\n@media (min-width: 1200px) {\n h2 {\n font-size: 2rem;\n }\n}\n\nh3 {\n font-size: calc(1.3rem + 0.6vw);\n}\n@media (min-width: 1200px) {\n h3 {\n font-size: 1.75rem;\n }\n}\n\nh4 {\n font-size: calc(1.275rem + 0.3vw);\n}\n@media (min-width: 1200px) {\n h4 {\n font-size: 1.5rem;\n }\n}\n\nh5 {\n font-size: 1.25rem;\n}\n\nh6 {\n font-size: 1rem;\n}\n\np {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nabbr[title] {\n text-decoration: underline dotted;\n cursor: help;\n text-decoration-skip-ink: none;\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: 700;\n}\n\ndd {\n margin-bottom: 0.5rem;\n margin-left: 0;\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\nsmall {\n font-size: 0.875em;\n}\n\nmark {\n padding: 0.1875em;\n color: var(--bs-highlight-color);\n background-color: var(--bs-highlight-bg);\n}\n\nsub,\nsup {\n position: relative;\n font-size: 0.75em;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\na {\n color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));\n text-decoration: underline;\n}\na:hover {\n --bs-link-color-rgb: var(--bs-link-hover-color-rgb);\n}\n\na:not([href]):not([class]), a:not([href]):not([class]):hover {\n color: inherit;\n text-decoration: none;\n}\n\npre,\ncode,\nkbd,\nsamp {\n font-family: var(--bs-font-monospace);\n font-size: 1em;\n}\n\npre {\n display: block;\n margin-top: 0;\n margin-bottom: 1rem;\n overflow: auto;\n font-size: 0.875em;\n}\npre code {\n font-size: inherit;\n color: inherit;\n word-break: normal;\n}\n\ncode {\n font-size: 0.875em;\n color: var(--bs-code-color);\n word-wrap: break-word;\n}\na > code {\n color: inherit;\n}\n\nkbd {\n padding: 0.1875rem 0.375rem;\n font-size: 0.875em;\n color: var(--bs-body-bg);\n background-color: var(--bs-body-color);\n border-radius: 0.25rem;\n}\nkbd kbd {\n padding: 0;\n font-size: 1em;\n}\n\nfigure {\n margin: 0 0 1rem;\n}\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n color: var(--bs-secondary-color);\n text-align: left;\n}\n\nth {\n text-align: inherit;\n text-align: -webkit-match-parent;\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\nlabel {\n display: inline-block;\n}\n\nbutton {\n border-radius: 0;\n}\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\n[role=button] {\n cursor: pointer;\n}\n\nselect {\n word-wrap: normal;\n}\nselect:disabled {\n opacity: 1;\n}\n\n[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {\n display: none !important;\n}\n\nbutton,\n[type=button],\n[type=reset],\n[type=submit] {\n -webkit-appearance: button;\n}\nbutton:not(:disabled),\n[type=button]:not(:disabled),\n[type=reset]:not(:disabled),\n[type=submit]:not(:disabled) {\n cursor: pointer;\n}\n\n::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\ntextarea {\n resize: vertical;\n}\n\nfieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\nlegend {\n float: left;\n width: 100%;\n padding: 0;\n margin-bottom: 0.5rem;\n font-size: calc(1.275rem + 0.3vw);\n line-height: inherit;\n}\n@media (min-width: 1200px) {\n legend {\n font-size: 1.5rem;\n }\n}\nlegend + * {\n clear: left;\n}\n\n::-webkit-datetime-edit-fields-wrapper,\n::-webkit-datetime-edit-text,\n::-webkit-datetime-edit-minute,\n::-webkit-datetime-edit-hour-field,\n::-webkit-datetime-edit-day-field,\n::-webkit-datetime-edit-month-field,\n::-webkit-datetime-edit-year-field {\n padding: 0;\n}\n\n::-webkit-inner-spin-button {\n height: auto;\n}\n\n[type=search] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n/* rtl:raw:\n[type=\"tel\"],\n[type=\"url\"],\n[type=\"email\"],\n[type=\"number\"] {\n direction: ltr;\n}\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n::-webkit-color-swatch-wrapper {\n padding: 0;\n}\n\n::file-selector-button {\n font: inherit;\n -webkit-appearance: button;\n}\n\noutput {\n display: inline-block;\n}\n\niframe {\n border: 0;\n}\n\nsummary {\n display: list-item;\n cursor: pointer;\n}\n\nprogress {\n vertical-align: baseline;\n}\n\n[hidden] {\n display: none !important;\n}\n\n/*# sourceMappingURL=bootstrap-reboot.css.map */\n","// scss-docs-start color-mode-mixin\n@mixin color-mode($mode: light, $root: false) {\n @if $color-mode-type == \"media-query\" {\n @if $root == true {\n @media (prefers-color-scheme: $mode) {\n :root {\n @content;\n }\n }\n } @else {\n @media (prefers-color-scheme: $mode) {\n @content;\n }\n }\n } @else {\n [data-bs-theme=\"#{$mode}\"] {\n @content;\n }\n }\n}\n// scss-docs-end color-mode-mixin\n","// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix\n\n\n// Reboot\n//\n// Normalization of HTML elements, manually forked from Normalize.css to remove\n// styles targeting irrelevant browsers while applying new styles.\n//\n// Normalize is licensed MIT. https://github.com/necolas/normalize.css\n\n\n// Document\n//\n// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n\n// Root\n//\n// Ability to the value of the root font sizes, affecting the value of `rem`.\n// null by default, thus nothing is generated.\n\n:root {\n @if $font-size-root != null {\n @include font-size(var(--#{$prefix}root-font-size));\n }\n\n @if $enable-smooth-scroll {\n @media (prefers-reduced-motion: no-preference) {\n scroll-behavior: smooth;\n }\n }\n}\n\n\n// Body\n//\n// 1. Remove the margin in all browsers.\n// 2. As a best practice, apply a default `background-color`.\n// 3. Prevent adjustments of font size after orientation changes in iOS.\n// 4. Change the default tap highlight to be completely transparent in iOS.\n\n// scss-docs-start reboot-body-rules\nbody {\n margin: 0; // 1\n font-family: var(--#{$prefix}body-font-family);\n @include font-size(var(--#{$prefix}body-font-size));\n font-weight: var(--#{$prefix}body-font-weight);\n line-height: var(--#{$prefix}body-line-height);\n color: var(--#{$prefix}body-color);\n text-align: var(--#{$prefix}body-text-align);\n background-color: var(--#{$prefix}body-bg); // 2\n -webkit-text-size-adjust: 100%; // 3\n -webkit-tap-highlight-color: rgba($black, 0); // 4\n}\n// scss-docs-end reboot-body-rules\n\n\n// Content grouping\n//\n// 1. Reset Firefox's gray color\n\nhr {\n margin: $hr-margin-y 0;\n color: $hr-color; // 1\n border: 0;\n border-top: $hr-border-width solid $hr-border-color;\n opacity: $hr-opacity;\n}\n\n\n// Typography\n//\n// 1. Remove top margins from headings\n// By default, `

`-`

` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: var(--#{$prefix}heading-color);\n}\n\nh1 {\n @extend %heading;\n @include font-size($h1-font-size);\n}\n\nh2 {\n @extend %heading;\n @include font-size($h2-font-size);\n}\n\nh3 {\n @extend %heading;\n @include font-size($h3-font-size);\n}\n\nh4 {\n @extend %heading;\n @include font-size($h4-font-size);\n}\n\nh5 {\n @extend %heading;\n @include font-size($h5-font-size);\n}\n\nh6 {\n @extend %heading;\n @include font-size($h6-font-size);\n}\n\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `

`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 2. Add explicit cursor to indicate changed behavior.\n// 3. Prevent the text-decoration to be skipped.\n\nabbr[title] {\n text-decoration: underline dotted; // 1\n cursor: help; // 2\n text-decoration-skip-ink: none; // 3\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n color: var(--#{$prefix}highlight-color);\n background-color: var(--#{$prefix}highlight-bg);\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));\n text-decoration: $link-decoration;\n\n &:hover {\n --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: var(--#{$prefix}code-color);\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\n\n// Forms\n//\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// See https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Explicitly remove focus outline in Chromium when it shouldn't be\n// visible (e.g. as result of mouse click or touch tap). It already\n// should be doing this automatically, but seems to currently be\n// confused and applies its very visible two-tone outline anyway.\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // 1\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\n// Remove the inheritance of text transform in Firefox\nbutton,\nselect {\n text-transform: none;\n}\n// Set the cursor for non-` + +

+ + + + + + +
+
+
+
+ + + diff --git a/proxy/js/features.mjs b/proxy/js/features.mjs new file mode 100644 index 000000000..9b9dc37c5 --- /dev/null +++ b/proxy/js/features.mjs @@ -0,0 +1,1331 @@ +import fs from 'fs' +import yaml from 'yaml' + +const signals_railway_line = yaml.parse(fs.readFileSync('features/train_protection.yaml', 'utf8')) +const all_signals = yaml.parse(fs.readFileSync('features/signals_railway_signals.yaml', 'utf8')) +const loading_gauges = yaml.parse(fs.readFileSync('features/loading_gauge.yaml', 'utf8')) +const poi = yaml.parse(fs.readFileSync('features/poi.yaml', 'utf8')) +const stations = yaml.parse(fs.readFileSync('features/stations.yaml', 'utf8')) +const railway_lines = yaml.parse(fs.readFileSync('features/railway_line.yaml', 'utf8')) + +const signal_types = all_signals.types; + +const speed_railway_signals = all_signals.features.filter(feature => feature.tags.find(tag => all_signals.types.some(type => type.layer === 'speed' && `railway:signal:${type.type}` === tag.tag))) +const signals_railway_signals = all_signals.features.filter(feature => feature.tags.find(tag => all_signals.types.some(type => type.layer === 'signals' && `railway:signal:${type.type}` === tag.tag))) +const electrification_signals = all_signals.features.filter(feature => feature.tags.find(tag => all_signals.types.some(type => type.layer === 'electrification' && `railway:signal:${type.type}` === tag.tag))) + +// TODO add links to documentation + +const requireUniqueEntries = array => { + const count = Object.groupBy(array.filter(it => it[0]), it => it[0]); + if (Object.values(count).some(it => it.length > 1)) { + const offendingEntries = Object.entries(count).filter(it => it[1].length > 1).map(it => it[0]).join(', '); + throw new Error(`entries must be unique, offending entries: ${offendingEntries}`); + } + return Object.fromEntries(array); +} + +const links = { + wikimedia_commons: 'https://commons.wikimedia.org/wiki/%s', + wikipedia: 'https://wikipedia.org/wiki/%s', + wikidata: 'https://www.wikidata.org/wiki/%s', + mapillary: 'https://www.mapillary.com/app/?pKey=%s', +}; + +const featureLinks = { + openstreetmap: { + view: 'https://www.openstreetmap.org/{osm_type}/{osm_id}', + edit: 'https://www.openstreetmap.org/edit?{osm_type}={osm_id}', + }, + openhistoricalmap: { + view: 'https://www.openhistoricalmap.org/{osm_type}/{osm_id}#date={date}-01-01&layers=R', + edit: 'https://www.openhistoricalmap.org/edit?{osm_type}={osm_id}', + }, +}; + +function allIconCombinations(feature) { + const allIcons = feature.icon.map(icon => [ + {name: icon.description, icon: icon.default ? [icon.default] : []}, + ...((icon.cases ?? []).map(iconCase => ({ name: iconCase.description ?? icon.description, icon: [iconCase.example ?? iconCase.value]}))), + ]) + + let combinations = allIcons[0] + allIcons.slice(1).forEach(icons => { + const newCombinations = [] + + combinations.forEach(combination => { + icons.forEach(icon => { + newCombinations.push({ + name: [combination.name, icon.name].filter(it => it).join(', '), + icon: icon.icon ? [...combination.icon, ...icon.icon] : combination.icon, + }) + }) + }) + + combinations = newCombinations + }) + + const combinationsWithoutName = combinations.filter(combination => !combination.name) + const combinationsWithName = combinations.filter(combination => combination.name) + + return [ + ...[...new Set(combinationsWithoutName.map(combination => combination.icon.join('|')))].map(icon => [icon, {country: feature.country, name: feature.description}]), + ...combinationsWithName.map(combination => [combination.icon.join('|'), {country: feature.country, name: `${feature.description} (${combination.name})`}]), + ] +} + +const generateSignalFeatures = (features, types) => + requireUniqueEntries([ + ...features.flatMap(allIconCombinations), + ...types.map(type => [ + `general/signal-unknown-${type.type}`, + { + name: `Unknown signal (${type.type})`, + } + ]), + [ + 'general/signal-unknown', + { + name: 'Unknown signal', + }, + ], + ]); + +// TODO move icon SVGs to proxy +const railwayLineFeatures = { + labelProperties: ['standard_label'], + featureLinks: featureLinks.openstreetmap, + features: Object.fromEntries( + railway_lines.features.map(feature => [ + feature.type, + { + name: feature.description, + type: 'line', + }, + ]) + ), + properties: { + state: { + name: 'State', + }, + usage: { + name: 'Usage', + }, + service: { + name: 'Service', + }, + highspeed: { + name: 'High speed', + }, + preferred_direction: { + name: 'Preferred direction', + }, + tunnel: { + name: 'Tunnel', + }, + bridge: { + name: 'Bridge', + }, + ref: { + name: 'Reference', + }, + track_ref: { + name: 'Track', + }, + speed_label: { + name: 'Speed', + }, + train_protection: { + name: 'Train protection', + format: { + lookup: 'train_protection', + } + }, + train_protection_construction: { + name: 'Train protection under construction', + format: { + lookup: 'train_protection', + } + }, + electrification_state: { + name: 'Electrification', + }, + frequency: { + name: 'Frequency', + format: { + template: '%.2d Hz', + }, + }, + voltage: { + name: 'Voltage', + format: { + template: '%d V', + }, + }, + maximum_current: { + name: 'Maximum current', + format: { + template: '%d A', + }, + }, + future_frequency: { + name: 'Future frequency', + format: { + template: '%.2d Hz', + }, + }, + future_voltage: { + name: 'Future voltage', + format: { + template: '%d V', + }, + }, + future_maximum_current: { + name: 'Future maximum current', + format: { + template: '%d A', + }, + }, + gauge_label: { + name: 'Gauge', + }, + loading_gauge: { + name: 'Loading gauge', + format: { + lookup: 'loading_gauge', + }, + }, + track_class: { + name: 'Track class', + }, + reporting_marks: { + name: 'Reporting marks', + }, + operator: { + name: 'Operator', + }, + owner: { + name: 'Owner', + }, + traffic_mode: { + name: 'Traffic mode', + }, + radio: { + name: 'Radio', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + format: { + country_prefix: {} + }, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + line_routes: { + name: 'Routes', + list: { + routeIdProperty: 'route_id', + colorProperty: 'color', + labelProperty: 'label', + properties: [ + 'route_id', + 'color', + 'label', + ], + }, + }, + }, +}; + +const poiFeatures = layer => ({ + featureLinks: featureLinks.openstreetmap, + features: Object.fromEntries( + poi.features + .filter(feature => feature.layer === layer) + .flatMap(feature => + [ + [feature.feature, {name: feature.description}] + ].concat( + (feature.variants || []).map(variant => [variant.feature, {name: `${feature.description}${variant.description ? ` (${variant.description})` : ''}`}]) + ) + ) + ), + properties: { + ref: { + name: 'Reference', + }, + position: { + name: 'Position', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + format: { + country_prefix: {} + }, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, +}) + +// TODO move tram / metro stops to stations +const stationFeatures = { + featureProperty: 'feature', + labelProperties: ['localized_name', 'name'], + featureLinks: featureLinks.openstreetmap, + features: requireUniqueEntries( + stations.features.map(feature => [feature.feature, {name: feature.description}]) + ), + properties: { + station: { + name: 'Type', + }, + state: { + name: 'State', + }, + label: { + name: 'Reference', + }, + uic_ref: { + name: 'UIC reference', + }, + operator: { + name: 'Operator', + }, + network: { + name: 'Network', + }, + position: { + name: 'Position', + }, + yard_purpose: { + name: 'Yard purpose', + }, + yard_hump: { + name: 'Yard hump', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + format: { + country_prefix: {} + }, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + station_routes: { + name: 'Routes', + list: { + routeIdProperty: 'route_id', + colorProperty: 'color', + labelProperty: 'label', + properties: [ + 'route_id', + 'color', + 'label', + ], + }, + }, + }, +} + +// TODO move examples here +// TODO add icon +const features = { + 'high-railway_line_high': railwayLineFeatures, + 'openrailwaymap_low-railway_line_high': railwayLineFeatures, + 'standard_railway_line_low-standard_railway_line_low': railwayLineFeatures, + 'speed_railway_line_low-speed_railway_line_low': railwayLineFeatures, + 'signals_railway_line_low-signals_railway_line_low': railwayLineFeatures, + 'electrification_railway_line_low-electrification_railway_line_low': railwayLineFeatures, + 'track_railway_line_low-track_railway_line_low': railwayLineFeatures, + 'operator_railway_line_low-operator_railway_line_low': railwayLineFeatures, + 'openhistoricalmap-transport_lines': { + labelProperties: ['name'], + featureProperty: 'type', + featureLinks: featureLinks.openhistoricalmap, + features: { + rail: { + name: 'Historical railway', + type: 'line', + }, + tram: { + name: 'Historical tram', + type: 'line', + }, + light_rail: { + name: 'Historical light rail', + type: 'line', + }, + subway: { + name: 'Historical subway', + type: 'line', + }, + monorail: { + name: 'Historical monorail', + type: 'line', + }, + narrow_gauge: { + name: 'Historical narrow gauge railway', + type: 'line', + }, + miniature: { + name: 'Historical miniature railway', + type: 'line', + }, + funicular: { + name: 'Historical funicular', + type: 'line', + }, + construction: { + name: 'Historical railway under construction', + type: 'line', + }, + proposed: { + name: 'Historical proposed railway', + type: 'line', + }, + disused: { + name: 'Historical disused railway', + type: 'line', + }, + abandoned: { + name: 'Historical abandoned railway', + type: 'line', + }, + }, + properties: { + usage: { + name: 'Usage', + }, + service: { + name: 'Service', + }, + highspeed: { + name: 'Highspeed', + }, + preferred_direction: { + name: 'Preferred direction', + }, + tunnel: { + name: 'Tunnel', + format: { + lookup: 'boolean', + }, + }, + bridge: { + name: 'Bridge', + format: { + lookup: 'boolean', + }, + }, + ref: { + name: 'Reference', + }, + electrified: { + name: 'Electrified', + }, + start_date: { + name: 'Since', + }, + end_date: { + name: 'Until', + }, + }, + }, + 'openhistoricalmap-transport_points_centroids': { + featureProperty: 'type', + labelProperties: ['name'], + featureLinks: featureLinks.openhistoricalmap, + features: { + station: { + name: 'Historical station', + }, + halt: { + name: 'Historical halt', + }, + }, + properties: { + start_date: { + name: 'Since', + }, + end_date: { + name: 'Until', + }, + }, + }, + 'openhistoricalmap-landuse_areas': { + featureProperty: 'class', + labelProperties: ['name'], + featureLinks: featureLinks.openhistoricalmap, + features: { + landuse: { + name: 'Historical railway landuse', + }, + }, + properties: { + start_date: { + name: 'Since', + }, + end_date: { + name: 'Until', + }, + }, + }, + 'standard_railway_text_stations_low-standard_railway_text_stations_low': stationFeatures, + 'standard_railway_text_stations_med-standard_railway_text_stations_med': stationFeatures, + 'openrailwaymap_standard-standard_railway_text_stations': stationFeatures, + 'openrailwaymap_standard-standard_railway_grouped_stations': stationFeatures, + 'openrailwaymap_standard-standard_railway_grouped_station_areas': { + featureLinks: featureLinks.openstreetmap, + features: { + station_area_group: { + name: 'Station area group', + type: 'relation', + }, + }, + }, + 'openrailwaymap_standard-standard_railway_turntables': { + featureLinks: featureLinks.openstreetmap, + features: { + turntable: { + name: 'Turntable', + type: 'polygon', + }, + traverser: { + name: 'Transfer table', + type: 'polygon', + }, + }, + }, + 'openrailwaymap_standard-standard_railway_platforms': { + featureLinks: featureLinks.openstreetmap, + features: { + platform: { + name: 'Platform', + type: 'polygon', + }, + }, + labelProperties: ['name'], + properties: { + ref: { + name: 'Reference', + }, + height: { + name: 'Height', + format: { + template: '%.2d m', + }, + }, + surface: { + name: 'Surface', + }, + elevator: { + name: 'Elevator', + }, + shelter: { + name: 'Shelter', + }, + lit: { + name: 'Lit', + }, + bin: { + name: 'Bin', + }, + bench: { + name: 'Bench', + }, + wheelchair: { + name: 'Wheelchair accessible', + }, + departures_board: { + name: 'Departures board', + }, + tactile_paving: { + name: 'Tactile paving', + }, + platform_routes: { + name: 'Routes', + list: { + routeIdProperty: 'route_id', + colorProperty: 'color', + labelProperty: 'label', + properties: [ + 'route_id', + 'color', + 'label', + ], + }, + }, + } + }, + 'openrailwaymap_standard-standard_railway_platform_edges': { + featureLinks: featureLinks.openstreetmap, + features: { + platform_edge: { + name: 'Platform edge', + type: 'line', + }, + }, + labelProperties: ['ref'], + properties: { + height: { + name: 'Height', + format: { + template: '%.2d m', + }, + }, + tactile_paving: { + name: 'Tactile paving', + }, + } + }, + 'openrailwaymap_standard-standard_railway_stop_positions': { + featureLinks: featureLinks.openstreetmap, + labelProperties: ['name'], + features: { + stop_position: { + name: 'Stop position', + }, + }, + properties: { + type: { + name: 'Type', + }, + stop_position_routes: { + name: 'Routes', + list: { + routeIdProperty: 'route_id', + colorProperty: 'color', + labelProperty: 'label', + properties: [ + 'route_id', + 'color', + 'label', + ], + }, + }, + } + }, + 'openrailwaymap_standard-standard_station_entrances': { + featureLinks: featureLinks.openstreetmap, + featureProperty: 'type', + features: { + subway: { + name: 'Subway entrance', + }, + train: { + name: 'Train station entrance', + }, + }, + properties: { + name: { + name: 'Name', + }, + ref: { + name: 'Reference', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_standard-standard_railway_symbols': poiFeatures('standard'), + "high-railway_text_km": { + featureProperty: 'railway', + featureLinks: featureLinks.openstreetmap, + features: { + milestone: { + name: 'Milestone', + }, + level_crossing: { + name: 'Level crossing', + }, + crossing: { + name: 'Crossing', + }, + }, + properties: { + pos: { + name: 'Position', + }, + pos_exact: { + name: 'Exact position', + }, + type: { + name: 'Type', + }, + operator: { + name: 'Operator', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_standard-standard_railway_switch_ref': { + featureProperty: 'railway', + featureLinks: featureLinks.openstreetmap, + features: { + switch: { + name: 'Switch', + }, + railway_crossing: { + name: 'Railway crossing', + } + }, + properties: { + ref: { + name: 'Reference', + }, + type: { + name: 'Type', + }, + turnout_side: { + name: 'Turnout side', + }, + local_operated: { + name: 'Operated locally', + }, + resetting: { + name: 'Resetting', + }, + position: { + name: 'Position', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_speed-speed_railway_signals': { + featureProperty: 'railway', + featureLinks: featureLinks.openstreetmap, + features: { + signal: { + name: 'Signal', + }, + buffer_stop: { + name: 'Buffer stop', + }, + derail: { + name: 'Derailer', + }, + vacancy_detection: { + name: 'Vacancy detection', + }, + }, + properties: { + feature0: { + name: 'Primary signal', + format: { + lookup: 'speed_railway_signals', + }, + }, + feature1: { + name: 'Secondary signal', + format: { + lookup: 'speed_railway_signals', + }, + }, + ref: { + name: 'Reference', + }, + caption: { + name: 'Caption', + }, + type: { + name: 'Type', + }, + deactivated0: { + name: 'Primary deactivated', + }, + deactivated1: { + name: 'Secondary deactivated', + }, + direction_both: { + name: 'both directions', + }, + ...Object.fromEntries(all_signals.tags.map(tag => [tag.tag, { name: tag.title, description: tag.description, format: tag.format }])), + position: { + name: 'Position', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_signals-signals_railway_signals': { + featureProperty: 'railway', + featureLinks: featureLinks.openstreetmap, + features: { + signal: { + name: 'Signal', + }, + buffer_stop: { + name: 'Buffer stop', + }, + derail: { + name: 'Derailer', + }, + vacancy_detection: { + name: 'Vacancy detection', + }, + }, + properties: { + feature0: { + name: 'Primary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + feature1: { + name: 'Secondary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + feature2: { + name: 'Tertiary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + feature3: { + name: 'Quaternary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + feature4: { + name: 'Quinary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + feature5: { + name: 'Senary signal', + format: { + lookup: 'signals_railway_signals', + }, + }, + ref: { + name: 'Reference', + }, + caption: { + name: 'Caption', + }, + type: { + name: 'Type', + }, + deactivated0: { + name: 'Primary deactivated', + }, + deactivated1: { + name: 'Secondary deactivated', + }, + deactivated2: { + name: 'Tertiary deactivated', + }, + deactivated3: { + name: 'Quaternary deactivated', + }, + deactivated4: { + name: 'Quinary deactivated', + }, + direction_both: { + name: 'both directions', + }, + ...Object.fromEntries(all_signals.tags.map(tag => [tag.tag, { name: tag.title, description: tag.description, format: tag.format }])), + position: { + name: 'Position', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_signals-signals_signal_boxes': { + labelProperties: ['name'], + featureLinks: featureLinks.openstreetmap, + features: { + 'signal_box': { + name: 'Signal box', + }, + 'crossing_box': { + name: 'Crossing box', + }, + 'blockpost': { + name: 'Block post', + } + }, + properties: { + ref: { + name: 'Reference', + }, + position: { + name: 'Position', + }, + operator: { + name: 'Operator', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_electrification-electrification_signals': { + featureProperty: 'railway', + featureLinks: featureLinks.openstreetmap, + features: { + signal: { + name: 'Signal', + }, + buffer_stop: { + name: 'Buffer stop', + }, + derail: { + name: 'Derailer', + }, + vacancy_detection: { + name: 'Vacancy detection', + }, + }, + properties: { + feature: { + name: 'Signal', + format: { + lookup: 'electrification_signals', + }, + }, + direction_both: { + name: 'both directions', + }, + ref: { + name: 'Reference', + }, + caption: { + name: 'Caption', + }, + type: { + name: 'Type', + }, + deactivated: { + name: 'Deactivated', + }, + ...Object.fromEntries(all_signals.tags.map(tag => [tag.tag, { name: tag.title, description: tag.description, format: tag.format }])), + position: { + name: 'Position', + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_electrification-electrification_railway_symbols': poiFeatures('electrification'), + 'openrailwaymap_electrification-catenary': { + featureProperty: 'feature', + featureLinks: featureLinks.openstreetmap, + features: { + mast: { + name: 'Catenary mast', + }, + portal: { + name: 'Catenary portal', + }, + }, + properties: { + ref: { + name: 'Reference', + }, + position: { + name: 'Position', + }, + transition: { + name: 'Transition point', + }, + structure: { + name: 'Structure', + }, + supporting: { + name: 'Supporting', + }, + attachment: { + name: 'Attachment', + }, + tensioning: { + name: 'Tensioning', + }, + insulator: { + name: 'Insulator', + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_electrification-electrification_substation': { + featureProperty: 'feature', + featureLinks: featureLinks.openstreetmap, + labelProperties: ['name'], + features: { + traction: { + name: 'Traction substation', + }, + }, + properties: { + ref: { + name: 'Reference', + }, + location: { + name: 'Location', + }, + operator: { + name: 'Operator', + }, + voltage: { + name: 'Voltage', + format: { + template: '%s V', + }, + }, + wikidata: { + name: 'Wikidata', + link: links.wikidata, + }, + wikimedia_commons: { + name: 'Wikimedia', + link: links.wikimedia_commons, + }, + mapillary: { + name: 'Mapillary', + link: links.mapillary, + }, + wikipedia: { + name: 'Wikipedia', + link: links.wikipedia, + format: { + country_prefix: {} + }, + }, + note: { + name: 'Note', + paragraph: true, + }, + description: { + name: 'Description', + paragraph: true, + }, + }, + }, + 'openrailwaymap_operator-operator_railway_symbols': poiFeatures('operator'), + + // Search results + + search: { + labelProperties: ['label'], + featureLinks: featureLinks.openstreetmap, + features: [], + properties: { + name: { + name: 'Name', + }, + railway: { + name: 'Railway', + }, + }, + }, + + // Routes + route: { + labelProperties: ['name'], + featureProperty: 'type', + featureLinks: featureLinks.openstreetmap, + features: { + train: { + name: 'Train route', + type: 'relation', + }, + tram: { + name: 'Tram route', + type: 'relation', + }, + subway: { + name: 'Subway route', + type: 'relation', + }, + light_rail: { + name: 'Light rail route', + type: 'relation', + }, + }, + properties: { + ref: { + name: 'Reference', + }, + from: { + name: 'From', + }, + to: { + name: 'To', + }, + operator: { + name: 'Operator', + }, + brand: { + name: 'Brand', + }, + }, + }, + + // Features not part of a data source but for lookups + + train_protection: { + features: Object.fromEntries(signals_railway_line.train_protections.map(feature => [ + feature.train_protection, + { + name: feature.legend, + }, + ])), + }, + loading_gauge: { + features: Object.fromEntries(loading_gauges.loading_gauges.map(feature => [ + feature.value, + { + name: feature.legend, + }, + ])), + }, + speed_railway_signals: { + features: generateSignalFeatures(speed_railway_signals, signal_types.filter(type => type.layer === 'speed')), + }, + signals_railway_signals: { + features: generateSignalFeatures(signals_railway_signals, signal_types.filter(type => type.layer === 'signals')), + }, + electrification_signals: { + features: generateSignalFeatures(electrification_signals, signal_types.filter(type => type.layer === 'electrification')), + }, + + boolean: { + features: { + 0: { + name: 'no', + }, + 1: { + name: 'yes', + }, + }, + }, +}; + +if (import.meta.url.endsWith(process.argv[1])) { + console.log(JSON.stringify(features)) +} diff --git a/proxy/js/legend.mjs b/proxy/js/legend.mjs new file mode 100644 index 000000000..d3ea9a088 --- /dev/null +++ b/proxy/js/legend.mjs @@ -0,0 +1,3045 @@ +import fs from 'fs' +import yaml from 'yaml' + +const signals_railway_line = yaml.parse(fs.readFileSync('features/train_protection.yaml', 'utf8')) +const all_signals = yaml.parse(fs.readFileSync('features/signals_railway_signals.yaml', 'utf8')) +const loading_gauges = yaml.parse(fs.readFileSync('features/loading_gauge.yaml', 'utf8')) +const track_classes = yaml.parse(fs.readFileSync('features/track_class.yaml', 'utf8')) +const poi = yaml.parse(fs.readFileSync('features/poi.yaml', 'utf8')) +const stations = yaml.parse(fs.readFileSync('features/stations.yaml', 'utf8')) +const operators = yaml.parse(fs.readFileSync('features/operators.yaml', 'utf8')) + +const signal_types = all_signals.types; + +const speed_railway_signals = all_signals.features.filter(feature => feature.tags.find(tag => tag.tag === 'railway:signal:speed_limit' || tag.tag === 'railway:signal:speed_limit_distant')) +const signals_railway_signals = all_signals.features.filter(feature => !feature.tags.find(tag => tag.tag === 'railway:signal:speed_limit' || tag.tag === 'railway:signal:speed_limit_distant' || tag.tag === 'railway:signal:electricity')) +const electrification_signals = all_signals.features.filter(feature => feature.tags.find(tag => tag.tag === 'railway:signal:electricity')) + +const speedLegends = [ + 10, + 20, + 30, + 40, + 50, + 60, + 70, + 80, + 90, + 100, + 120, + 140, + 160, + 180, + 200, + 220, + 240, + 260, + 280, + 300, + 320, + 340, + 360 +]; + +const electrificationLegends = { + voltageFrequency: [ + { legend: '> 25 kV ~', voltage: 25000, frequency: 60, electrification_label: '26kV 60Hz' }, + { legend: '25 kV 60 Hz ~', voltage: 25000, frequency: 60, electrification_label: '25kV 60Hz' }, + { legend: '25 kV 50 Hz ~', voltage: 25000, frequency: 50, electrification_label: '25kV 50Hz' }, + { legend: '20 kV 60 Hz ~', voltage: 20000, frequency: 60, electrification_label: '20kV 60Hz' }, + { legend: '20 kV 50 Hz ~', voltage: 20000, frequency: 50, electrification_label: '20kV 50Hz' }, + { legend: '15 kV - 25 kV ~', voltage: 15001, frequency: 60, electrification_label: '16kV 60Hz' }, + { legend: '15 kV 16.7 Hz ~', voltage: 15000, frequency: 16.7, electrification_label: '15kV 16.7Hz' }, + { legend: '15 kV 16.67 Hz ~', voltage: 15000, frequency: 16.67, electrification_label: '15kV 16.67Hz' }, + { legend: '12.5 kV - 15 kV ~', voltage: 12501, frequency: 60, electrification_label: '13kV 60Hz' }, + { legend: '12.5 kV 60 Hz ~', voltage: 12500, frequency: 60, electrification_label: '12.5kV 60Hz' }, + { legend: '12.5 kV 25 Hz ~', voltage: 12500, frequency: 25, electrification_label: '12.5kV 25Hz' }, + { legend: '< 12.5 kV ~', voltage: 12499, frequency: 60, electrification_label: '11kV 60Hz' }, + { legend: '> 3 kV =', voltage: 3001, frequency: 0, electrification_label: '4kV =' }, + { legend: '3 kV =', voltage: 3000, frequency: 0, electrification_label: '3kV =' }, + { legend: '1.5 kV - 3 kV =', voltage: 1501, frequency: 0, electrification_label: '2kV =' }, + { legend: '1.5 kV =', voltage: 1500, frequency: 0, electrification_label: '1.5kV =' }, + { legend: '1 kV - 1.5 kV =', voltage: 1001, frequency: 0, electrification_label: '1.2kV =' }, + { legend: '1 kV =', voltage: 1000, frequency: 0, electrification_label: '1kV =' }, + { legend: '750 V - 1 kV =', voltage: 751, frequency: 0, electrification_label: '800V =' }, + { legend: '750 V =', voltage: 750, frequency: 0, electrification_label: '750V =' }, + { legend: '< 750 V =', voltage: 749, frequency: 0, electrification_label: '700V =' }, + ], + maximumCurrent: [ + { maximumCurrent: 500 }, + { maximumCurrent: 600 }, + { maximumCurrent: 1500 }, + { maximumCurrent: 1600 }, + { maximumCurrent: 1800 }, + { maximumCurrent: 2000 }, + { maximumCurrent: 2400 }, + { maximumCurrent: 2600 }, + { maximumCurrent: 3200 }, + { maximumCurrent: 4000 }, + ], + power: [ + { legend: '2 MW', voltage: 750, maximumCurrent: 2600 }, + { legend: '4.8 MW', voltage: 3000, maximumCurrent: 1600 }, + { legend: '6 MW', voltage: 3000, maximumCurrent: 2000 }, + { legend: '7.2 MW', voltage: 3000, maximumCurrent: 2400 }, + { legend: '9 MW', voltage: 15000, maximumCurrent: 600 }, + { legend: '12 MW', voltage: 3000, maximumCurrent: 4000 }, + { legend: '37.5 MW', voltage: 25000, maximumCurrent: 1500 }, + ], +}; + +const gaugeLegends = [ + {min: 63, legend: '63 - 88 mm'}, + {min: 88, legend: '88 - 127 mm'}, + {min: 127, legend: '127 - 184 mm'}, + {min: 184, legend: '184 - 190 mm'}, + {min: 190, legend: '190 - 260 mm'}, + {min: 260, legend: '260 - 380 mm'}, + {min: 380, legend: '380 - 500 mm'}, + {min: 500, legend: '500 - 597 mm'}, + {min: 597, legend: '597 - 600 mm'}, + {min: 600, legend: '600 - 609 mm'}, + {min: 609, legend: '609 - 700 mm'}, + {min: 700, legend: '700 - 750 mm'}, + {min: 750, legend: '750 - 760 mm'}, + {min: 760, legend: '760 - 762 mm'}, + {min: 762, legend: '762 - 785 mm'}, + {min: 785, legend: '785 - 800 mm'}, + {min: 800, legend: '800 - 891 mm'}, + {min: 891, legend: '891 - 900 mm'}, + {min: 900, legend: '900 - 914 mm'}, + {min: 914, legend: '914 - 950 mm'}, + {min: 950, legend: '950 - 1000 mm'}, + {min: 1000, legend: '1000 - 1009 mm'}, + {min: 1009, legend: '1009 - 1050 mm'}, + {min: 1050, legend: '1050 - 1066 mm'}, + {min: 1066, legend: '1066 - 1100 mm'}, + {min: 1100, legend: '1100 - 1200 mm'}, + {min: 1200, legend: '1200 - 1372 mm'}, + {min: 1372, legend: '1372 - 1422 mm'}, + {min: 1422, legend: '1422 - 1432 mm'}, + {min: 1432, legend: '1432 - 1435 mm'}, + {min: 1435, legend: '1435 - 1440 mm'}, + {min: 1440, legend: '1440 - 1445 mm'}, + {min: 1445, legend: '1445 - 1450 mm'}, + {min: 1450, legend: '1450 - 1458 mm'}, + {min: 1458, legend: '1458 - 1495 mm'}, + {min: 1495, legend: '1495 - 1520 mm'}, + {min: 1520, legend: '1520 - 1522 mm'}, + {min: 1522, legend: '1522 - 1524 mm'}, + {min: 1524, legend: '1524 - 1581 mm'}, + {min: 1581, legend: '1581 - 1588 mm'}, + {min: 1588, legend: '1588 - 1600 mm'}, + {min: 1600, legend: '1600 - 1668 mm'}, + {min: 1668, legend: '1668 - 1672 mm'}, + {min: 1672, legend: '1672 - 1700 mm'}, + {min: 1700, legend: '1700 - 1800 mm'}, + {min: 1800, legend: '1800 - 1880 mm'}, + {min: 1880, legend: '1880 - 2000 mm'}, + {min: 2000, legend: '2000 - 3000 mm'}, +]; + +const signalFeatures = (feature) => + // Generate signal features for each icon variant. For an icon variant, use the default (or last) variant of the other icon cases. + feature.icon.map((icon, i) => ({ + legend: icon.default ? icon.description : icon.cases[0].description, + icon: feature.icon + .map((otherIcon, j) => i === j + ? `${icon.default ?? icon.cases[0].example ?? icon.cases[0].value}${icon.position ? `@${icon.position}` : ''}` + : `${otherIcon.default ?? otherIcon.cases[otherIcon.cases.length - 1].example ?? otherIcon.cases[otherIcon.cases.length - 1].value}${otherIcon.position ? `@${otherIcon.position}` : ''}` + ) + .join('|'), + variants: (icon.cases ?? []).slice(icon.default ? 0 : 1).map(item => ({ + legend: item.description, + icon: feature.icon + .map((otherIcon, j) => i === j + ? `${item.example ?? item.value}${icon.position ? `@${icon.position}` : ''}` + : `${otherIcon.default ?? otherIcon.cases[otherIcon.cases.length - 1].example ?? otherIcon.cases[otherIcon.cases.length - 1].value}${otherIcon.position ? `@${otherIcon.position}` : ''}` + ) + .join('|'), + })), + })); + +const legendData = { + standard: { + "standard_railway_line_low-standard_railway_line_low": [ + { + legend: 'Highspeed main line', + type: 'line', + properties: { + highspeed: true, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'H1', + standard_label: 'H1 Name', + track_ref: '8b', + way_length: 1.0, + }, + }, + { + legend: 'Main line', + type: 'line', + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'L1', + standard_label: 'L1 Name', + track_ref: '8b', + way_length: 1.0, + }, + }, + { + legend: 'Ferry', + type: 'line', + properties: { + highspeed: false, + feature: 'ferry', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'F1', + standard_label: 'F1 Ship', + track_ref: null, + way_length: 1.0, + } + }, + ], + "openrailwaymap_low-railway_line_high": [ + { + legend: 'Highspeed main line', + type: 'line', + properties: { + highspeed: true, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'H1', + standard_label: 'H1 Name', + track_ref: '8b', + way_length: 1.0, + }, + }, + { + legend: 'Main line', + type: 'line', + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'L1', + standard_label: 'L1 Name', + track_ref: '8b', + way_length: 1.0, + }, + }, + { + legend: 'Branch line', + type: 'line', + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'branch', + service: null, + tunnel: false, + bridge: false, + ref: 'B1', + standard_label: 'B1 Name', + track_ref: '8b', + way_length: 1.0, + } + }, + { + legend: 'Ferry', + type: 'line', + properties: { + highspeed: false, + feature: 'ferry', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'F1', + standard_label: 'F1 Ship', + track_ref: null, + way_length: 1.0, + } + }, + ], + "high-railway_line_high": [ + { + legend: 'Highspeed main line', + type: 'line', + properties: { + highspeed: true, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'H1', + standard_label: 'H1 Name', + track_ref: '8b', + way_length: 1.0, + }, + }, + { + legend: 'Main line', + type: 'line', + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'L1', + standard_label: 'L1 Name', + track_ref: '8b', + way_length: 1.0, + }, + variants: [ + { + legend: 'bridge', + properties: { + bridge: true, + standard_label: null, + ref: null, + track_ref: null, + way_length: 100000, + }, + }, + { + legend: 'tunnel', + properties: { + tunnel: true, + standard_label: null, + ref: null, + track_ref: null, + way_length: 1.0, + }, + }, + ], + }, + { + legend: 'Branch line', + type: 'line', + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'branch', + service: null, + tunnel: false, + bridge: false, + ref: 'B1', + standard_label: 'B1 Name', + track_ref: '9b', + way_length: 1.0, + } + }, + { + legend: 'Industrial line', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'industrial', + service: null, + tunnel: false, + bridge: false, + ref: 'I1', + standard_label: 'I1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Narrow gauge line', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + feature: 'narrow_gauge', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'N1', + standard_label: 'N1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Subway', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'subway', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'S1', + standard_label: 'S1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Light rail', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'light_rail', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'L1', + standard_label: 'L1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Tram', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'tram', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'T1', + standard_label: 'T1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Monorail', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'monorail', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'M1', + standard_label: 'M1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Test railway', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'test', + service: null, + tunnel: false, + bridge: false, + ref: 'T1', + standard_label: 'T1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Military railway', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: 'military', + service: null, + tunnel: false, + bridge: false, + ref: 'M1', + standard_label: 'M1 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Miniature railway', + type: 'line', + minzoom: 12, + properties: { + highspeed: false, + feature: 'miniature', + state: 'present', + usage: null, + service: null, + tunnel: false, + bridge: false, + ref: 'M3', + standard_label: 'M3 Name', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Yard', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: null, + service: 'yard', + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Spur', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: null, + service: 'spur', + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Siding', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: null, + service: 'siding', + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Crossover', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + feature: 'rail', + state: 'present', + usage: null, + service: 'crossover', + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Tourism (preserved)', + type: 'line', + minzoom: 9, + properties: { + highspeed: false, + feature: 'rail', + state: 'preserved', + usage: 'tourism', + service: null, + tunnel: false, + bridge: false, + ref: 'T1', + standard_label: 'T1 Name', + track_ref: '8b', + way_length: 1.0, + } + }, + { + legend: 'Ferry', + type: 'line', + properties: { + highspeed: false, + feature: 'ferry', + state: 'present', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: 'F1', + standard_label: 'F1 Ship', + track_ref: null, + way_length: 1.0, + } + }, + { + legend: 'Under construction', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + state: 'construction', + feature: 'rail', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + }, + mapState: { + showConstructionInfrastructure: true, + }, + }, + { + legend: 'Proposed railway', + type: 'line', + minzoom: 10, + properties: { + highspeed: false, + state: 'proposed', + feature: 'rail', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + }, + mapState: { + showProposedInfrastructure: true, + }, + }, + { + legend: 'Disused railway', + type: 'line', + minzoom: 11, + properties: { + highspeed: false, + state: 'disused', + feature: 'rail', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + }, + }, + { + legend: 'Abandoned railway', + type: 'line', + minzoom: 12, + properties: { + highspeed: false, + state: 'abandoned', + feature: 'rail', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + }, + mapState: { + showAbandonedInfrastructure: true, + }, + }, + { + legend: 'Razed railway', + type: 'line', + minzoom: 12, + properties: { + highspeed: false, + state: 'razed', + feature: 'rail', + usage: 'main', + service: null, + tunnel: false, + bridge: false, + ref: null, + standard_label: null, + track_ref: null, + way_length: 1.0, + }, + mapState: { + showRazedInfrastructure: true, + }, + }, + ], + 'openhistoricalmap-transport_lines': [ + { + legend: 'Highspeed main line (historical)', + type: 'line', + minzoom: 5, + properties: { + type: 'rail', + highspeed: 'yes', + usage: 'main', + service: null, + tunnel: 0, + bridge: 0, + ref: 'H1', + name: 'H1 Name', + }, + }, + { + legend: 'Main line (historical)', + type: 'line', + minzoom: 5, + properties: { + type: 'rail', + highspeed: 'no', + usage: 'main', + service: null, + tunnel: 0, + bridge: 0, + ref: 'M1', + name: 'M1 Name', + }, + variants: [ + { + legend: 'bridge', + properties: { + bridge: 1, + ref: null, + name: null, + }, + }, + { + legend: 'tunnel', + properties: { + tunnel: 1, + ref: null, + name: null, + }, + }, + ], + }, + { + legend: 'Branch line (historical)', + type: 'line', + minzoom: 7, + properties: { + type: 'rail', + highspeed: 'no', + usage: 'branch', + service: null, + tunnel: 0, + bridge: 0, + ref: 'B1', + name: 'B1 Name', + } + }, + { + legend: 'Industrial line (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'rail', + highspeed: 'no', + usage: 'industrial', + service: null, + tunnel: 0, + bridge: 0, + ref: 'I1', + name: 'I1 Name', + } + }, + { + legend: 'Narrow gauge line (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'narrow_gauge', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'N1', + name: 'N1 Name', + } + }, + { + legend: 'Subway (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'subway', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'S1', + name: 'S1 Name', + } + }, + { + legend: 'Light rail (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'light_rail', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'L1', + name: 'L1 Name', + } + }, + { + legend: 'Tram (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'tram', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'T1', + name: 'T1 Name', + } + }, + { + legend: 'Monorail (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'monorail', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'M1', + name: 'M1 Name', + } + }, + { + legend: 'Miniature railway (historical)', + type: 'line', + minzoom: 12, + properties: { + type: 'miniature', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'M3', + name: 'N3 Name', + } + }, + { + legend: 'Yard (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'rail', + highspeed: 'no', + usage: null, + service: 'yard', + tunnel: 0, + bridge: 0, + ref: null, + name: null, + } + }, + { + legend: 'Spur (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'rail', + highspeed: 'no', + usage: null, + service: 'spur', + tunnel: 0, + bridge: 0, + ref: null, + name: null, + } + }, + { + legend: 'Siding (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'rail', + highspeed: 'no', + usage: null, + service: 'siding', + tunnel: 0, + bridge: 0, + ref: null, + name: null, + } + }, + { + legend: 'Crossover (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'rail', + highspeed: 'no', + usage: null, + service: 'crossover', + tunnel: 0, + bridge: 0, + ref: null, + name: null, + } + }, + { + legend: 'Tourism (preserved) (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'preserved', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'P1', + name: 'P1 Name', + } + }, + { + legend: 'Test railway (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'rail', + highspeed: 'no', + usage: 'test', + service: null, + tunnel: 0, + bridge: 0, + ref: 'T1', + name: 'T1 Name', + } + }, + { + legend: 'Military railway (historical)', + type: 'line', + minzoom: 9, + properties: { + type: 'rail', + highspeed: 'no', + usage: 'military', + service: null, + tunnel: 0, + bridge: 0, + ref: 'M2', + name: 'M2 Name', + } + }, + { + legend: 'Under construction (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'construction', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'C1', + name: 'C1 Name', + } + }, + { + legend: 'Proposed railway (historical)', + type: 'line', + minzoom: 10, + properties: { + type: 'proposed', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'P1', + name: 'P1 Name', + } + }, + { + legend: 'Disused railway (historical)', + type: 'line', + minzoom: 11, + properties: { + type: 'disused', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'D1', + name: 'D1 Name', + } + }, + { + legend: 'Abandoned railway (historical)', + type: 'line', + minzoom: 11, + properties: { + type: 'abandoned', + highspeed: 'no', + usage: null, + service: null, + tunnel: 0, + bridge: 0, + ref: 'A1', + name: 'A1 Name', + } + }, + ], + 'standard_railway_text_stations_low-standard_railway_text_stations_low': + stations.features + .filter(feature => feature.feature === 'station') + .map(feature => ({ + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + ...feature.example, + railway: feature.feature, + }, + variants: (feature.variants || []).map(variant => ({ + legend: variant.description, + properties: variant.example, + mapState: variant.mapState, + })), + mapState: feature.mapState, + })), + "standard_railway_text_stations_med-standard_railway_text_stations_med": + stations.features + .filter(feature => feature.feature === 'station') + .map(feature => ({ + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + ...feature.example, + railway: feature.feature, + }, + variants: (feature.variants || []).map(variant => ({ + legend: variant.description, + properties: variant.example, + mapState: variant.mapState, + })), + mapState: feature.mapState, + })), + "openrailwaymap_standard-standard_railway_text_stations": + stations.features.flatMap(feature => [ + { + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + ...feature.example, + railway: feature.feature, + }, + mapState: feature.mapState, + }, + ...(feature.variants || []).map(variant => ({ + legend: `${feature.description}: ${variant.description}`, + type: 'point', + minzoom: variant.minzoom ?? feature.minzoom, + properties: { + ...feature.example, + ...variant.example, + }, + mapState: variant.mapState, + })), + ]), + 'openhistoricalmap-transport_points_centroids': [ + { + legend: 'Station (historical)', + properties: { + class: 'railway', + type: 'station', + }, + }, + ], + 'openhistoricalmap-landuse_areas': [ + { + legend: 'Railway landuse', + type: 'polygon', + properties: { + class: 'landuse', + type: 'railway', + }, + }, + ], + "openrailwaymap_standard-standard_railway_grouped_stations": [], + "openrailwaymap_standard-standard_railway_grouped_station_areas": [], + "openrailwaymap_standard-standard_railway_turntables": [ + { + legend: 'Turntable', + type: 'polygon', + properties: { + feature: 'turntable' + }, + variants: [ + { + legend: 'Transfer table', + properties: { + feature: 'traverser', + } + } + ] + }, + ], + "openrailwaymap_standard-standard_station_entrances": [ + { + legend: 'Subway entrance', + type: 'point', + }, + ], + "openrailwaymap_standard-standard_railway_platforms": [ + { + legend: 'Platform', + type: 'polygon', + properties: { + ref: 1, + }, + }, + ], + "openrailwaymap_standard-standard_railway_platform_edges": [ + { + legend: 'Platform edge', + type: 'line', + properties: { + ref: 3, + }, + }, + ], + "openrailwaymap_standard-standard_railway_stop_positions": [ + { + legend: 'Stop position', + type: 'point', + properties: { + type: 'train', + }, + variants: [ + { + legend: 'light rail', + properties: { + type: 'light_rail', + }, + }, + { + legend: 'Tram', + properties: { + type: 'tram', + }, + }, + { + legend: 'Subway', + properties: { + type: 'Subway', + }, + }, + { + legend: 'funicular', + properties: { + type: 'funicular', + }, + }, + { + legend: 'monorail', + properties: { + type: 'monorail', + }, + }, + { + legend: 'miniature', + properties: { + type: 'miniature', + }, + }, + ] + }, + ], + "openrailwaymap_standard-standard_railway_symbols": + poi.features + .filter(feature => feature.layer === 'standard') + .map(feature => ({ + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + feature: feature.feature, + }, + variants: feature.variants ? feature.variants.map(variant => ({ + legend: variant.description, + properties: { + feature: variant.feature, + }, + })) : undefined, + })), + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + "openrailwaymap_standard-standard_railway_switch_ref": [ + { + legend: 'Switch', + type: 'point', + properties: { + railway: 'switch', + ref: '3A', + type: 'default', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + ref: null, + local_operated: true, + }, + }, + { + legend: '(left sided)', + type: 'point', + properties: { + ref: null, + turnout_side: 'left', + }, + }, + { + legend: '(right sided)', + type: 'point', + properties: { + ref: null, + turnout_side: 'right', + }, + }, + ], + }, + { + legend: 'Wye switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'wye', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Three-way switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'three_way', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Four-way switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'four_way', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Abt switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'abt', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Single slip switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'single_slip', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Double slip switch', + type: 'point', + properties: { + railway: 'switch', + ref: null, + type: 'double_slip', + turnout_side: null, + local_operated: false, + resetting: false, + }, + variants: [ + { + legend: '(locally operated)', + type: 'point', + properties: { + local_operated: true, + }, + }, + ], + }, + { + legend: 'Railway crossing', + type: 'point', + properties: { + railway: 'railway_crossing', + ref: null, + type: null, + turnout_side: null, + local_operated: false, + resetting: false, + }, + }, + ], + }, + + speed: { + 'speed_railway_line_low-speed_railway_line_low': [ + ...speedLegends.map(speed => ({ + legend: `${speed} km/h`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + tunnel: false, + bridge: false, + maxspeed: speed, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + tunnel: false, + bridge: false, + maxspeed: null, + }, + }, + ], + 'openrailwaymap_low-railway_line_high': [ + ...speedLegends.map(speed => ({ + legend: `${speed} km/h`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + tunnel: false, + bridge: false, + maxspeed: speed, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + tunnel: false, + bridge: false, + maxspeed: null, + }, + }, + ], + 'high-railway_line_high': [ + ...speedLegends.map(speed => ({ + legend: `${speed} km/h`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + maxspeed: speed, + tunnel: false, + bridge: false, + speed_label: `${speed}`, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + maxspeed: null, + tunnel: false, + bridge: false, + speed_label: '', + }, + }, + ], + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + 'openrailwaymap_speed-speed_railway_signals': [ + // TODO filter per country polygon + ...speed_railway_signals.flatMap(feature => + signalFeatures(feature).map(iconFeature => ({ + legend: `(${feature.country}) ${feature.description}${iconFeature.legend ? ` ${iconFeature.legend}` : ''}`, + type: 'point', + properties: { + feature0: iconFeature.icon, + type: 'line', + azimuth: null, + deactivated0: false, + direction_both: false, + }, + variants: iconFeature.variants.map(variant => ({ + legend: variant.legend, + properties: { + feature0: variant.icon, + }, + })), + }))), + { + legend: 'signal direction', + type: 'point', + properties: { + feature0: 'does-not-exist', + type: 'line', + azimuth: 135.5, + deactivated0: false, + direction_both: false, + }, + variants: [ + { + legend: '(both)', + properties: { + direction_both: true, + }, + }, + ], + }, + { + legend: '(deactivated)', + type: 'point', + properties: { + feature0: 'pl/w21-{40}', + type: 'line', + azimuth: null, + deactivated0: true, + direction_both: false, + }, + }, + ...signal_types.filter(type => type.layer === 'speed').map(type => ({ + legend: `unknown signal (${type.type})`, + type: 'point', + properties: { + feature0: `general/signal-unknown-${type.type}`, + type: 'line', + azimuth: null, + deactivated0: false, + direction_both: false, + }, + })), + ], + }, + signals: { + 'signals_railway_line_low-signals_railway_line_low': [ + ...signals_railway_line.train_protections.map(train_protection => ({ + legend: train_protection.legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: train_protection.train_protection, + train_protection_rank: 1, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + variants: [ + { + properties: { + train_protection: null, + train_protection_rank: 0, + train_protection_construction: train_protection.train_protection, + train_protection_construction_rank: 1, + } + } + ], + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: null, + train_protection_rank: 0, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + }, + ], + 'openrailwaymap_low-railway_line_high': [ + ...signals_railway_line.train_protections.map(train_protection => ({ + legend: train_protection.legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: train_protection.train_protection, + train_protection_rank: 1, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + variants: [ + { + properties: { + train_protection: null, + train_protection_rank: 0, + train_protection_construction: train_protection.train_protection, + train_protection_construction_rank: 1, + } + } + ], + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: null, + train_protection_rank: 0, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + }, + ], + 'high-railway_line_high': [ + ...signals_railway_line.train_protections.map(train_protection => ({ + legend: train_protection.legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: train_protection.train_protection, + train_protection_rank: 1, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + variants: [ + { + properties: { + train_protection: null, + train_protection_rank: 0, + train_protection_construction: train_protection.train_protection, + train_protection_construction_rank: 1, + } + } + ], + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: null, + train_protection_rank: 0, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + }, + { + legend: 'Under construction', + type: 'line', + properties: { + feature: 'rail', + state: 'construction', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: 'etcs', + train_protection_rank: 1, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + }, + { + legend: 'Proposed', + type: 'line', + properties: { + feature: 'rail', + state: 'proposed', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + train_protection: 'etcs', + train_protection_rank: 1, + train_protection_construction: null, + train_protection_construction_rank: 0, + }, + }, + ], + 'openrailwaymap_signals-signals_signal_boxes': [ + { + legend: 'Signal box', + type: 'point', + properties: { + ref: 'Rtd', + name: 'Rotterdam', + feature: 'signal_box', + }, + variants: [ + { + legend: 'crossing box', + properties: { + ref: 'Crs', + name: 'Cross', + feature: 'crossing_box', + }, + }, + { + legend: 'block post', + properties: { + ref: 'Blk', + name: 'KM 47', + feature: 'blockpost', + }, + }, + ], + }, + ], + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + 'openrailwaymap_signals-signals_railway_signals': [ + ...signals_railway_signals.flatMap(feature => + signalFeatures(feature).map(iconFeature => ({ + legend: `${feature.country ? `(${feature.country}) ` : ''}${feature.description}${iconFeature.legend ? ` ${iconFeature.legend}` : ''}`, + type: 'point', + properties: { + feature0: iconFeature.icon, + type: 'line', + azimuth: null, + deactivated0: false, + direction_both: false, + }, + variants: iconFeature.variants.map(variant => ({ + legend: variant.legend, + properties: { + feature0: variant.icon, + }, + })), + }))), + { + legend: 'signal direction', + type: 'point', + properties: { + feature0: 'does-not-exist', + type: 'line', + azimuth: 135.5, + deactivated0: false, + direction_both: false, + }, + variants: [ + { + legend: '(both)', + properties: { + direction_both: true, + }, + }, + ], + }, + // TODO country specific railway signals + { + legend: '(deactivated)', + type: 'point', + properties: { + feature0: 'de/ks-combined', + type: 'line', + azimuth: null, + deactivated0: true, + direction_both: false, + }, + }, + ...signal_types.filter(type => type.layer === 'signals').map(type => ({ + legend: `unknown signal (${type.type})`, + type: 'point', + properties: { + feature0: `general/signal-unknown-${type.type}`, + type: 'line', + azimuth: null, + deactivated0: false, + direction_both: false, + }, + })), + ], + }, + electrification: { + 'electrification_railway_line_low-electrification_railway_line_low': [ + ...electrificationLegends.voltageFrequency.map(({legend, voltage, frequency}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage, + frequency, + }, + mapState: { + electrificationRailwayLine: 'voltageFrequency', + }, + })), + ...electrificationLegends.maximumCurrent.map(({maximumCurrent}) => ({ + legend: `${maximumCurrent} A`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'maximumCurrent', + }, + })), + ...electrificationLegends.power.map(({legend, maximumCurrent, voltage}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage: voltage, + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'power', + }, + })), + { + legend: 'Not electrified', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'no', + voltage: null, + frequency: null, + }, + }, + { + legend: 'De-electrified / abandoned railway', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'abandoned', + voltage: null, + frequency: null, + }, + }, + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: null, + voltage: null, + frequency: null, + }, + }, + ], + 'openrailwaymap_low-railway_line_high': [ + ...electrificationLegends.voltageFrequency.map(({legend, voltage, frequency}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage, + frequency, + }, + mapState: { + electrificationRailwayLine: 'voltageFrequency', + }, + })), + ...electrificationLegends.maximumCurrent.map(({maximumCurrent}) => ({ + legend: `${maximumCurrent} A`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'maximumCurrent', + }, + })), + ...electrificationLegends.power.map(({legend, maximumCurrent, voltage}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage: voltage, + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'power', + }, + })), + { + legend: 'Not electrified', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'no', + voltage: null, + frequency: null, + }, + }, + { + legend: 'De-electrified / abandoned railway', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'abandoned', + voltage: null, + frequency: null, + }, + }, + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: null, + voltage: null, + frequency: null, + }, + }, + ], + 'high-railway_line_high': [ + ...electrificationLegends.voltageFrequency.map(({legend, voltage, frequency}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage, + frequency, + }, + mapState: { + electrificationRailwayLine: 'voltageFrequency', + }, + })), + ...electrificationLegends.maximumCurrent.map(({maximumCurrent}) => ({ + legend: `${maximumCurrent} A`, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'maximumCurrent', + }, + })), + ...electrificationLegends.power.map(({legend, maximumCurrent, voltage}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'present', + voltage: voltage, + maximum_current: maximumCurrent, + }, + mapState: { + electrificationRailwayLine: 'power', + }, + })), + { + legend: 'Proposed electrification', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'proposed', + voltage: null, + frequency: null, + future_voltage: 1500, + future_frequency: 0, + future_maximum_current: 1600, + electrification_label: '', + }, + }, + { + legend: 'Electrification under construction', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'construction', + voltage: null, + frequency: null, + future_voltage: 1500, + future_frequency: 0, + future_maximum_current: 1600, + electrification_label: '', + }, + }, + { + legend: 'Not electrified', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'no', + voltage: null, + frequency: null, + electrification_label: '', + }, + }, + { + legend: 'De-electrified / abandoned railway', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: 'abandoned', + voltage: null, + frequency: null, + electrification_label: '', + }, + }, + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + electrification_state: null, + voltage: null, + frequency: null, + electrification_label: '', + }, + }, + ], + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + 'openrailwaymap_electrification-electrification_signals': [ + ...electrification_signals.flatMap(feature => + signalFeatures(feature).map(iconFeature => ({ + legend: `(${feature.country}) ${feature.description}${iconFeature.legend ? ` ${iconFeature.legend}` : ''}`, + type: 'point', + properties: { + feature: iconFeature.icon, + type: 'line', + azimuth: null, + deactivated: false, + direction_both: false, + }, + variants: iconFeature.variants.map(variant => ({ + legend: variant.legend, + properties: { + feature: variant.icon, + }, + })), + }))), + { + legend: 'signal direction', + type: 'point', + properties: { + feature: 'does-not-exist', + type: 'line', + azimuth: 135.5, + deactivated: false, + direction_both: false, + }, + variants: [ + { + legend: '(both)', + properties: { + direction_both: true, + }, + }, + ], + }, + { + legend: '(deactivated)', + type: 'point', + properties: { + feature: 'de/el6', + type: 'line', + azimuth: null, + deactivated: true, + direction_both: false, + }, + }, + ...signal_types.filter(type => type.layer === 'electrification').map(type => ({ + legend: `unknown signal (${type.type})`, + type: 'point', + properties: { + feature: `general/signal-unknown-${type.type}`, + type: 'line', + azimuth: null, + deactivated: false, + direction_both: false, + }, + })), + ], + "openrailwaymap_electrification-electrification_railway_symbols": + poi.features + .filter(feature => feature.layer === 'electrification') + .map(feature => ({ + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + feature: feature.feature, + }, + variants: feature.variants ? feature.variants.map(variant => ({ + legend: variant.description, + properties: { + feature: variant.feature, + }, + })) : undefined, + })), + "openrailwaymap_electrification-electrification_catenary": [ + { + legend: 'Catenary mast', + type: 'point', + properties: { + feature: 'mast', + transition: false, + }, + variants: [ + { + legend: '(transition)', + properties: { + transition: true, + } + } + ] + }, + { + legend: 'Catenary portal', + type: 'line', + properties: { + feature: 'portal', + }, + }, + ], + "openrailwaymap_electrification-electrification_substation": [ + { + legend: 'Traction substation', + type: 'polygon', + properties: { + feature: 'traction', + } + } + ], + }, + track: { + 'track_railway_line_low-track_railway_line_low': [ + ...gaugeLegends.map(({min, legend}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: `${min}`, + gaugeint0: min, + label: `${min}`, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + })), + { + legend: 'Monorail', + type: 'line', + properties: { + feature: 'monorail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'monorail', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Narrow', + type: 'line', + properties: { + feature: 'narrow_gauge', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + variants: [ + { + type: 'line', + properties: { + feature: 'rail', + gauge0: 'narrow', + }, + }, + ], + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Broad', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'broad', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Standard', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + ...loading_gauges.loading_gauges.map(loading_gauge => ({ + legend: loading_gauge.legend, + type: 'line', + properties: { + loading_gauge: loading_gauge.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'loadingGauge', + }, + })), + ...track_classes.track_classes.map(track_class => ({ + legend: track_class.value, + type: 'line', + properties: { + track_class: track_class.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'trackClass', + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '3500', + gaugeint0: 3500, + label: '3500', + loading_gauge: null, + track_class: null, + }, + }, + ], + 'openrailwaymap_low-railway_line_high': [ + ...gaugeLegends.map(({min, legend}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: `${min}`, + gaugeint0: min, + label: `${min}`, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + })), + { + legend: 'Monorail', + type: 'line', + properties: { + feature: 'monorail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'monorail', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Narrow', + type: 'line', + properties: { + feature: 'narrow_gauge', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + variants: [ + { + type: 'line', + properties: { + feature: 'rail', + gauge0: 'narrow', + }, + }, + ], + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Broad', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'broad', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Standard', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + ...loading_gauges.loading_gauges.map(loading_gauge => ({ + legend: loading_gauge.legend, + type: 'line', + properties: { + loading_gauge: loading_gauge.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'loadingGauge', + }, + })), + ...track_classes.track_classes.map(track_class => ({ + legend: track_class.value, + type: 'line', + properties: { + track_class: track_class.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'trackClass', + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '3500', + gaugeint0: 3500, + label: '3500', + loading_gauge: null, + track_class: null, + }, + }, + ], + 'high-railway_line_high': [ + ...gaugeLegends.map(({min, legend}) => ({ + legend, + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: `${min}`, + gaugeint0: min, + gauge_label: `${min}`, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + })), + { + legend: 'Monorail', + type: 'line', + properties: { + feature: 'monorail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'monorail', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Narrow', + type: 'line', + properties: { + feature: 'narrow_gauge', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + variants: [ + { + type: 'line', + properties: { + feature: 'rail', + gauge0: 'narrow', + }, + }, + ], + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Broad', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'broad', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Miniature', + type: 'line', + properties: { + feature: 'miniature', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Standard', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: 'standard', + gaugeint0: null, + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Dual gauge', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '1435', + gaugeint0: 1435, + gauge1: '1520', + gaugeint1: 1520, + gauge_label: '', + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Multi gauge', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '1435', + gaugeint0: 1435, + gauge1: '1520', + gaugeint1: 1520, + gauge2: '1600', + gaugeint2: 1600, + gauge_label: '', + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Under construction', + type: 'line', + properties: { + feature: 'rail', + state: 'construction', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '1435', + gaugeint0: 1435, + gauge_label: '', + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Dual gauge under construction', + type: 'line', + properties: { + feature: 'rail', + state: 'construction', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '1435', + gaugeint0: 1435, + gauge1: '1520', + gaugeint1: 1520, + gauge_label: '', + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + { + legend: 'Multi gauge under construction', + type: 'line', + properties: { + feature: 'rail', + state: 'construction', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '1435', + gaugeint0: 1435, + gauge1: '1520', + gaugeint1: 1520, + gauge2: '1600', + gaugeint2: 1600, + gauge_label: '', + }, + mapState: { + trackRailwayLine: 'gauge', + }, + }, + ...loading_gauges.loading_gauges.map(loading_gauge => ({ + legend: loading_gauge.legend, + type: 'line', + properties: { + loading_gauge: loading_gauge.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'loadingGauge', + }, + })), + ...track_classes.track_classes.map(track_class => ({ + legend: track_class.value, + type: 'line', + properties: { + track_class: track_class.value, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + mapState: { + trackRailwayLine: 'trackClass', + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + gauge0: '3500', + gaugeint0: 3500, + gauge_label: '3500', + loading_gauge: null, + track_class: null, + }, + }, + ], + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + }, + + operator: { + 'operator_railway_line_low-operator_railway_line_low': [ + ...operators.operators.map(operator => ({ + legend: operator.names.join(', '), + type: 'line', + properties: { + operator: operator.names[0], + primary_operator: operator.names[0], + operator_color: operator.color, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + operator: null, + primary_operator: null, + operator_color: null, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + }, + ], + 'openrailwaymap_low-railway_line_high': [ + ...operators.operators.map(operator => ({ + legend: operator.names.join(', '), + type: 'line', + properties: { + operator: operator.names[0], + primary_operator: operator.names[0], + operator_color: operator.color, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + operator: null, + primary_operator: null, + operator_color: null, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + }, + ], + 'high-railway_line_high': [ + ...operators.operators.map(operator => ({ + legend: operator.names.join(', '), + type: 'line', + properties: { + operator: operator.names[0], + primary_operator: operator.names[0], + operator_color: operator.color, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + })), + { + legend: '(unknown)', + type: 'line', + properties: { + operator: null, + primary_operator: null, + operator_color: null, + feature: 'rail', + state: 'present', + usage: 'main', + service: null, + bridge: false, + tunnel: false, + }, + }, + ], + "high-railway_text_km": [ + { + legend: 'Milestone', + type: 'point', + properties: { + zero: true, + pos_int: '47', + pos: '47.0', + pos_exact: '47.012', + type: 'km', + }, + }, + ], + "openrailwaymap_operator-operator_railway_symbols": + poi.features + .filter(feature => feature.layer === 'operator') + .map(feature => ({ + legend: feature.description, + type: 'point', + minzoom: feature.minzoom, + properties: { + feature: feature.feature, + }, + variants: feature.variants ? feature.variants.map(variant => ({ + legend: variant.description, + properties: { + feature: variant.feature, + }, + })) : undefined, + })), + }, +} + +console.log(JSON.stringify(legendData)); diff --git a/proxy/js/mapbox-gl/mapbox-gl-rtl-text.js b/proxy/js/mapbox-gl/mapbox-gl-rtl-text.js new file mode 100644 index 000000000..ba4b45f4f --- /dev/null +++ b/proxy/js/mapbox-gl/mapbox-gl-rtl-text.js @@ -0,0 +1 @@ +var A,B;A=this,B=function(){var A,B="undefined"!=typeof document?document.currentScript:null,Q=(A="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:B&&B.src||new URL("mapbox-gl-rtl-text.js",document.baseURI).href,function(B={}){var Q,g,C=B,E=new Promise(((A,B)=>{Q=A,g=B})),I="object"==typeof window,F="function"==typeof importScripts;"object"==typeof process&&"object"==typeof process.versions&&process.versions.node;var w,U=Object.assign({},C),D="";(I||F)&&(F?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),A&&(D=A),D=D.startsWith("blob:")?"":D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1),F&&(w=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.responseType="arraybuffer",B.send(null),new Uint8Array(B.response)})),C.print||console.log.bind(console);var G,s,Y=C.printErr||console.error.bind(console);function o(A){if(h(A))return function(A){for(var B=atob(A),Q=new Uint8Array(B.length),g=0;gA.startsWith(J);function R(A){return Promise.resolve().then((()=>function(A){if(A==O&&G)return new Uint8Array(G);var B=o(A);if(B)return B;if(w)return w(A);throw"both async and sync fetching of the wasm failed"}(A)))}function x(A,B,Q,g){return function(A,B,Q){return R(A).then((A=>WebAssembly.instantiate(A,B))).then(Q,(A=>{Y(`failed to asynchronously prepare wasm: ${A}`),a(A)}))}(B,Q,g)}var H=A=>{for(;A.length>0;)A.shift()(C)};C.noExitRuntime;var b=A=>{var B=(A-s.buffer.byteLength+65535)/65536;try{return s.grow(B),n(),1}catch(A){}},r="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,t=A=>T(A),e=A=>{var B=(A=>{for(var B=0,Q=0;Q=55296&&g<=57343?(B+=4,++Q):B+=3}return B})(A)+1,Q=t(B);return((A,B,Q)=>{((A,B,Q,g)=>{if(!(g>0))return 0;for(var C=Q+g-1,E=0;E=55296&&I<=57343&&(I=65536+((1023&I)<<10)|1023&A.charCodeAt(++E)),I<=127){if(Q>=C)break;B[Q++]=I}else if(I<=2047){if(Q+1>=C)break;B[Q++]=192|I>>6,B[Q++]=128|63&I}else if(I<=65535){if(Q+2>=C)break;B[Q++]=224|I>>12,B[Q++]=128|I>>6&63,B[Q++]=128|63&I}else{if(Q+3>=C)break;B[Q++]=240|I>>18,B[Q++]=128|I>>12&63,B[Q++]=128|I>>6&63,B[Q++]=128|63&I}}B[Q]=0})(A,L,B,Q)})(A,Q,B),Q},j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,f=(A,B)=>A?((A,B,Q)=>{for(var g=B+Q,C=B;A[C]&&!(C>=g);)++C;if(C-B>16&&A.buffer&&j)return j.decode(A.subarray(B,C));for(var E="";B>10,56320|1023&U)}}else E+=String.fromCharCode((31&I)<<6|F)}else E+=String.fromCharCode(I)}return E})(L,A,B):"",q={c:()=>{a("")},b:A=>{var B=L.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var g,C,E=1;E<=4;E*=2){var I=B*(1+.2/E);I=Math.min(I,A+100663296);var F=Math.min(Q,(g=Math.max(A,I))+((C=65536)-g%C)%C);if(b(F))return!0}return!1},a:s},Z=function(){var A={a:q};function B(A,B){var Q;return Z=A.exports,Q=Z.d,X.unshift(Q),function(A){if(M--,C.monitorRunDependencies?.(M),0==M&&y){var B=y;y=null,B()}}(),Z}if(M++,C.monitorRunDependencies?.(M),C.instantiateWasm)try{return C.instantiateWasm(A,B)}catch(A){Y(`Module.instantiateWasm callback failed with error: ${A}`),g(A)}return O||(O="data:application/octet-stream;base64,AGFzbQEA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AAIAE2AgggACAIKAIINgIADAELIAAgCCAHQf8BcSACIAIQCgsgCEEgaiQACwIAC8kBAQR/IwBBEGsiAyQAIANBADYCDEGEvwQoAgAiAkUEQEGEvwQQHSICNgIAC0GAvwQoAgAgACABIAIgA0EMaiIEECgCQCADKAIMQQBKDQBBACEBAkBBhL8EKAIAIgBFDQAgACAAKAIAIgJHBEAgAkUNASACKAIAIAJHDQELIAAoAgwhAQsgAUEBaiICQQF0EAUhAEGEvwQoAgAgACACQQogBBAmGiADKAIMQQBKDQAgACABQQF0akEAOwEAIAAhBQsgA0EQaiQAIAUL/wEBBH8jAEEQayIFJAAgBUEANgIMAn8gACABQQF0aiEDIAJBAXRBAmoQBSEBIAIhAEEAIAVBDGoiBEUNABogBCgCAEEATAR/IANFIAJBf0hyIAJBAEhyQQEgASACRXIbBEAgBEEBNgIAQQAMAgsgAUUgASADTSABIABBAXRqIANLcUUgASADSSADIAJBAXRqIAFNcnFyRQRAIARBATYCAEEADAILIAJBf0YEQCADEA4hAgsgASAAIAJBAEwEf0EABSADIAIgASAAQQogBBAPCyAEEA0FQQALCyEAIAUoAgxBAEwEQCABIABBAXRqQQA7AQAgASEGCyAFQRBqJAAgBgsEACMACxAAIwAgAGtBcHEiACQAIAALBgAgACQAC3UBA38jAEEQayICJAAgAkEANgIMQYS/BCgCACIERQRAQYS/BBAdIgQ2AgALQYC/BCgCACAAIAEgBCACQQxqIgAQKCACKAIMQQBMBEAgAkEANgIMQYS/BCgCACAAECdBACACKAIMQQBMGyEDCyACQRBqJAAgAwsUAEGEvwQoAgAgACABIAIQEEEBRgvjAQEGfyMAQRBrIgEkACABQQA2AgwgAUEANgIIQYC/BCgCACEDIAFBCGohBQJAIAFBDGoiBEUNACAEKAIAQQBKDQACQAJAIANFDQAgAygCACICIANGDQEgAkUNACACKAIAIAJGDQELIARBGzYCAAwBCwJAIABBAE4EQCADKAKEASAASg0BCyAEQQE2AgAMAQsgAAR/IAIoAogBIABBA3RqQQhrKAIABUEACxog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wtDC0MLQwtDC0MLQwtDC0MLQwtDC0MLQwtDC0MLQwtDC0MLQwtDC0MLQx7A3sDewMSABIAEgASABIAEgASABIAEgAIAAcACAAJAAcAEgASABIAEgASABIAEgASABIAEgASABIAEgASAAcABwAHAAgACQAKAAoABAAEAAQACgAKAAoxCvIKAAMABgADAAYABgACAAIAAgACAAIAAgACAAIAAgACAAYACgAKUAoACtAKAAoAQebLAAsLClEKAArSCgAKAAoAQabMAAsJClEKAArSCgASAEGwzQALfxIAEgASABIAEgAHABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgAGAAoABAAEAAQABAAKAAoACgAKAAAACpAKALIACgAKAAQABAACAAIACgAAAAoACgAKAAIAAAAKkAoACgAKAAoAQd7OAAsBCgBBns8ACwEKAEGS0AALAwoACgBBpNAACzsKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBB6tAAC7UBCgAKAAoACgAKAAoACgAKAAoAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQBBqNIACwMKAAoAQbzSAAsBCgBByNIACwcKAAoAAAAKAEHE0wALAQoAQd7TAAsNsQCxALEAsQCxALEAsQBB3NQAC+kMCgAAAAAACgAKAAQAAQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQABALEAAQCxALEAAQCxALEAAQCxAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA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EAAAAAAAAAsQBBguYACw+xALEAsQCxALEAAACxALEAQZrmAAsBsQBBxOYACwOxALEAQeLmAAsBBABB9OYACwuxALEAsQCxALEAsQBBuOcACxGxAAAAAACxAAAAsQCxALEAsQBB2ucACwGxAEHq5wALA7EAsQBBhOgACwGxAEHA6AALAbEAQdroAAsBsQBBhukACw8KAAoACgAKAAoACgAEAAoAQaDpAAsJsQAAAAAAAACxAEHs6QALBbEAsQCxAEH86QALD7EAsQCxAAAAsQCxALEAsQBBmuoACwOxALEAQbTqAAsDsQCxAEHg6gALDQoACgAKAAoACgAKAAoAQajrAAsHsQAAAAAAoABBvOsACwGgAEHI6wALA7EAsQBBhuwACwOxALEAQaTsAAsBsQBBtOwACwmxALEAsQAAALEAQeLsAAsTsQAAAAAAsQCxALEAsQCxALEAsQBB/uwACwEEAEGO7QALD7EAsQCxALEAsQCxALEAsQBBwu0ACxexAAAAAACxALEAsQCxALEAsQCxALEAsQBB8O0ACwuxALEAsQCxALEAsQBBsO4ACwOxALEAQeLuAAsSsQAAALEAAACxAAoxCvIKMQryAEGa7wALLbEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQCxALEAsQAAALEAsQBB0u8AC1exALEAsQCxALEAsQCxALEAsQCxALEAAACxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQcrwAAsjsQCxALEAsQAAALEAsQCxALEAsQCxAAAAsQCxAAAAAACxALEAQaDxAAsDsQCxAEGs8QALBbEAsQCxAEHS8QALB7EAsQCxALEAQfTxAAsJsQAAAAAAsQCxAEGK8gALAbEAQaryAAsBsQBB6vIACwWxALEAsQBBkPMACxMKAAoACgAKAAoACgAKAAoACgAKAEGw8wALAQoAQfDzAAsBCQBBpvQACwQKMQryAEHU9AALBbEAsQCxAEGI9QALE7EAsQAAALEAsQCxALEAsQCxALEAQaz1AAsbsQAAAAAAsQCxALEAsQCxALEAsQCxALEAsQCxAEHW9QALTwQAAACxAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACxAEAAQdD2AAsdCgAKAAoACgAKAAoACgBKAAoACgAqALEAsQCxABIAQZD3AAsxQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABB0vcACzuxALEAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACxALEAsQBBlvgACwOxALEAQaz4AAsBsQBBuvgACwWxALEAsQBByPgACwsKAAAAAAAAAAoACgBBlPkAC0MKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGG+gALCbEAsQAAAAAAsQBBvPoACy2xAAAAsQCxALEAsQCxALEAsQAAALEAAACxAAAAAACxALEAsQCxALEAsQCxALEAQfb6AAsZsQCxALEAsQCxALEAsQCxALEAsQAAAAAAsQBBsPsACx+xALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAEH4+wALEbEAAACxALEAsQCxALEAAACxAEGm/AALEbEAsQCxALEAsQCxALEAsQCxAEHU/AALF7EAsQCxALEAAAAAALEAsQAAALEAsQCxAEGU/QALF7EAAACxALEAAAAAAAAAsQAAALEAsQCxAEHI/QALF7EAsQCxALEAsQCxALEAsQAAAAAAsQCxAEGA/gALMbEAsQCxAAAAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQCxALEAsQCxALEAQbr+AAsBsQBByP4ACwuxAAAAAAAAALEAsQBB4P4ACz+xALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAAACxALEAsQCxALEAQdr/AAsJCgAAAAoACgAKAEH6/wALBQoACgAKAEGagAELBQoACgAKAEG6gAELlAIKAAoAAAAKAAoACgAKAAYACjEK8goACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAkAsgCyALIAsgCyABIAFAgVCBMIFgiyALIAsgCyALIAsgACAAAAAAAAAAIAAgACAAIAAgACAAMAAwAKAAoxCvIAAAkACQAJAAkACQAJAAkACQAJAAkACQCyABIEMgSgCKEICgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAJAAcAqwiuCLAIrAivCAYABAAEAAQABAAEAAoACgAKAAoACjAK8AoACgAKAAoACgACAAIAAgACAAIAAgACAAIAAgACAAMAAwAKAAoxCvIAQfCCAQtzBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEACgAKAAAACgAKAAoACgAAAAoACgBB+IMBCwkKAAAACgAKAAoAQYyEAQsXCgAKAAoACgAKAAoAAAAKAAAACgAAAAoAQayEAQsBBABBxIQBCwMKAAoAQdCEAQsJChAKAAoACgAKAEHkhAELKwoACgAKAAoAAAAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQaKFAQsFCgAKAAoAQbCFAQvzBAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AoACgAKMArwCpAKkAqQChAKkAqQChAKEAqQCpAKkAqQCpAKEAoAChAKEAoQChAKAAoACgAKcApwCnAKsAqwCrAKAAoACgAKEAMABAAKAAqQChAKAAoACgAKEAoQChAKEAoACpAKkAqQCpAKAAqQCgAKEAoACgAKAAoAChAKEAoQChAKEAoQChAKEAoQCgAKAAoACgAKAAoQCgAKEAowCvAKEAoQChAKEAoQCpAKEAqQChAKEAoQChAKEAoQCpAKAAoACgAKAAoACjAK8AowCvAKAAoACgAKAAoACgAKAAoACgAKEAoQCgAKEAoACjAK8AowCvAKMArwCjAK8AoACgAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKEAoACgAKMArwCjAK8AoACgAKAAoACgAKkAoACgAKAAoACgAKAAoACgAKAAowCvAKAAoACpAKEAqQCpAKEAqQChAKEAoQChAKMArwCjAK8AowCvAKMArwCpAKAAoACgAKAAoAChAKEAoACgAKAAoACgAKAAoACgAKAAowCvAKMArwCpAKAAoACjAK8AoACgAKAAoACjAK8AowCvAKMArwCjAK8AowCvAKAAoACgAKAAoACgAKAAoACjEK8goxCvIKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAChAKEAoACgAKAAoACgAKAAoACjEK8goACgAKAAoACgAKAAoACgAKAAoACgBB3ooBC0cKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBB0IsBCzcKAAoACgAKAAoACgAKAAoAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAEGQjAEL3wgKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACjEK8goxCvIKMQryCjEK8goxCvIKMQryCjEK8goACgAKAAoACgAKAAoACgAKAAoAChAKAAoACjAK8AoxCvIKAAowCvAKAApQChAK0AoACgAKAAoACgAKEAoQCjAK8AoACgAKAAoACgAKkAowCvAKAAoACgAKMArwCjAK8AoxCvIKMQryCjEK8goxCvIKMQryCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoQCgAKEAoQChAKAAoACjAK8AoACgAKAAoACgAKAAoACgAKAAoAChAKkAoQChAKMArwCgAKAAoxCvIKAAoACgAKAAoACjEK8goxCvIKMQryCjEK8goxCvIKcQoyCvEKsgoxCvIKMQryCjEK8goxCvIKAAoACpAKEAoQChAKEAqQCgAKEAqQCjAK8AoQChAKMArwCjAK8AowCvAKMArwCgAKAAoACgAKAAoACgAKAAqQCgAKAAoACgAKAAoACgAKMArwChAKEAowCvAKAAoACgAKEAoACgAKAAoAChAKMArwCjAK8AoACjAK8AoACgAKMQryCjEK8goQCgAKAAoACgAKAAoQCpAKkAqQChAKAAoACgAKAAoACjAK8AqQCgAKAAoACgAKEAoACgAKAAowCvAKMArwChAKAAoQCgAKAAoACgAKAAoACgAKAAoACgAKAAoAChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKEAoQChAKAAoQChAKEAoQCgAKAAoQCgAKEAoACgAKEAoACjAK8AowCvAKAAoACgAKAAoACjAK8AoACgAKAAoACgAKAAowCvAKEAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoQChAKAAoACgAKAAoACgAKAAowCvAKAAoACgAKAAoQChAKEAoQCgAKEAoQCgAKAAoQChAKAAoACgAKAAowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKEAoACgAKMArwCjAK8AowCvAKMArwCgAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKMArwCjAK8AowCvAKAAoACgAKAAoAChAKAAqQCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKkAoAQfqUAQsLCgAKAAoACgAKAAoAQY6VAQsFsQCxALEAQaKVAQsNCgAKAAoACgAKAAoACgBB7pUBC4cBsQAKAAoACjAK8AowCvAKAAoACgAKMArwCgAKMArwCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAowCvAKAAoACjAK8AoxCvIKMQryCjEK8goxCvIKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGQlwELYwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBBmJgBCxcKAAoACgAKAAoACgAKAAoACgAKAAoACgBBuJgBCwEKAEHMmAELDbEAsQCxALEAAAAAAAoAQeSYAQsDCgAKAEHymAELRQoACgAKAAkACgAKAAoACgAAAAAAAAAKMQryCjEK8goxCvIKMQryCjEK8goACgAKMQryCjEK8goxCvIKMQryCgAKAAoACgBB6pkBCwexALEACgAKAEGYmgELHwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQfCaAQsFCgAKAAoAQZqbAQsdCgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQdCbAQsHCgAKAAoACgBBhpwBCwcKAAoACgAKAEGqnAELBQoACgAKAEHWnAELIbEAsQCxALEACgCxALEAsQCxALEAsQCxALEAsQCxAAoACgBBiJ0BCwEKAEG8nQELCbEAAAAAAAAAsQBBzp0BCwGxAEH6nQELD7EAsQAAAAoACgAKAAoAsQBBoJ4BCwMEAAQAQbCeAQsvQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAYAAAAAoACgAKAAoAQfCeAQsjsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQa6fAQsBsQBBvJ8BCw+xALEAsQCxALEAsQCxALEAQfafAQsVsQCxALEAsQCxALEAsQCxALEAsQCxAEG2oAELFbEAAAAAALEAsQCxALEAAAAAALEAsQBB4qABCxuxALEAsQCxALEAsQAAAAAAsQCxAAAAAACxALEAQZahAQsBsQBBqKEBCwGxAEHQoQELEbEAAACxALEAsQAAAAAAsQCxAEHsoQELA7EAsQBBiKIBCwOxALEAQZyiAQsBsQBBtKIBCwMKAAoAQeKiAQsHsQAAAAAAsQBB8qIBCwGxAEGYowELXwEAAQABAAEAAQABAAEAAQABAAMAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAEGypAEL2QEBALEAAQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQAKAAoADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ACgANAA0AsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAKAAoACgAKAAoACgAKAAoACgAKAEGYpgELd7EAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAGAAoABgAAAAoABgAKAAoACgAKMQryCjEK8goxCvIEAAoACgADAAMACjAK8AoAAAAKAAQABAAKAEGYpwELgQENAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANALIAAAAKAAoABAAEAAQACgAKAAoxCvIKAAMABgADAAYABgACAAIAAgACAAIAAgACAAIAAgACAAYACgAKUAoACtAKAAoAQc6oAQsVClEKAArSCgAKMQryCgAKMQryCgAKAEGYqQELQwQABAAKAAoACgAEAAQAAAAKAAoACgAKAAoACgAKAAAAEgASABIAEgASABIAEgASABIAqgCqAKoACgAKABIAEgAAAAoAQZiqAQt3CgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAAALEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAQbyrAQsJsQCxALEAsQCxAEHQqwELtwcBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAoAAQCxALEAsQABALEAsQABAAEAAQABAAEAsQCxALEAsQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQCxALEAsQABAAEAAQABALEAQQCBAAEAAQCBALEAsQABAAEAAQABAEEAQQBBAEEAgQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAEEAQQBBAEEAQQCBAAEAgQABAIEAgQABAAEAYQCBAIEAgQCBAIEAQQBBAEEAQQBhAEEAQQBBAEEAQQCBAEEAQQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAoACgAKAAoACgAKAAoAQQCBAEEAgQCBAIEAQQBBAEEAgQBBAEEAgQBBAIEAgQBBAIEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAgQCBAIEAgQBBAEEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAE0ATQCNAE0AsQCxALEAsQANAA0ADQANAA0ADQANAA0ABQAFAAUABQAFAAUABQAFAAUABQANAA0ADQANAA0ADQBtAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABAAEAAQABAAEAAQABAAEAAQABAAEAAQCxALEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQBNAE0ATQCNAE0ATQBNAE0ATQBNAE0ATQBNAE0ATQBNAE0ADQCxALEAsQCxALEAsQCxALEAsQCxALEATQBNAE0AjQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAQQABAEEAQQCBAIEAgQABAEEAgQCBAEEAQQCBAEEAQQABAEEAgQCBAEEAAQABAAEAAQCBAEEAYQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAQbizAQsVsQCxALEAsQCxALEAsQCxALEAsQCxAEHkswELHwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQba0AQsPsQCxALEAsQAAAAAAsQCxAEHWtAELG7EAsQCxALEAsQAAALEAsQCxALEAsQCxALEAsQBBnrUBCwGxAEHMtQELEbEAsQCxALEAsQCxALEAsQCxAEHytQELDbEAsQCxALEAAAAAALEAQaa2AQsRsQCxALEAAAAAALEAAACxALEAQcS2AQsBsQBBzrYBCw+xALEAsQCxALEAsQCxALEAQYy3AQsdsQCxALEAsQCxALEAsQAAAAAAAACxALEAsQCxALEAQcS3AQsJsQCxALEAAACxAEH8twELAbEAQaa4AQsPsQCxALEAsQCxALEAAACxAEG+uAELCbEAsQAAALEAsQBBhLkBCwexALEAsQCxAEGYuQELCbEAsQAAALEAsQBB2LkBCwOxALEAQYa6AQszsQCxALEAsQCxALEAsQCxAAAAAACxAAAAsQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEHmugELGbEAAACxAAAAAACxALEAsQCxALEAsQAAALEAQZS7AQsTsQCxALEAsQAAALEAsQCxALEAsQBB1rsBCxexALEAsQCxALEAsQCxALEAsQAAALEAsQBBprwBCwexALEAAACxAEG2vAELAbEAQfC8AQsPsQCxALEAsQAAAAAAsQCxAEGKvQELE7EAsQCxALEAsQCxAKAAoACxALEAQc69AQsXsQCxALEAsQCxALEAAAAAALEAsQCxALEAQfa9AQsBsQBBir4BCxWxALEAsQCxALEAsQAAAAAAsQCxALEAQbS+AQsfsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQAAALEAsQBB+L4BC02xALEAsQCxALEAsQCxAAAAsQCxALEAsQCxALEAAACgALEAsQCxALEAsQCxALEAsQAAAAAAsQCxALEAsQCxALEAsQAAALEAsQAAALEAsQBB7L8BCxuxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQarAAQstsQCxALEAsQCxALEAAAAAAAAAsQAAALEAsQAAALEAsQCxALEAsQCxALEAAACxAEGIwQELD7EAsQAAAAAAAACxAAAAsQBBqMEBCyMEAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgBB+sEBCxUKAAoACgAKAAoACgAKAAoABAAEAAQAQbDCAQsRoACgAKAAoACgAKAAoACgAKAAQejCAQsJsQCxALEAsQCxAEGYwwELDbEAsQCxALEAsQCxALEAQcbDAQsHsQCxALEAsQBB7MMBCwUKAAAAsQBBqMQBCweyALIAsgCyAEHuxAELBbEAsQCxAEGGxQELMbIAsgCyALIAsgCyALIAsgCxALEAsQCxALEAsQCxALEAAAAAALEAsQCxALEAsQCxALEAQeTFAQsHsQCxALEAsQBBkMYBCwsKAAoAsQCxALEACgBB1sYBCwIKEABBgscBCwIKEABBtscBCwIKEABBzMcBC3ECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQBBxsgBCxuxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAQfLIAQsBsQBBiMkBCwGxAEG2yQELKbEAsQCxALEAsQAAALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxAEGAygELVbEAsQCxALEAsQCxALEAAACxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAsQCxALEAAAAAALEAsQCxALEAsQCxALEAAACxALEAAACxALEAsQCxALEAQYDLAQsHsQCxALEAsQBBpssBC5ECBAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABALEAsQCxALEAsQCxALEAAQABAAEAAQABAAEAAQABAAEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBAEEAQQBBALEAsQCxALEAsQCxALEAoQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQAKAAoADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEHAzQELhwEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAIAAgACAAIAAgACAAIAAgACAAIAAgAKAAoACgAKAAoAQezOAQsLCgAKAAoACgAKAAoAQZrPAQsBCgBBwM8BCzEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAEGA0AELDwoACgAKAAoACgAKAAoACgBBoNABCxMKAAoACgAKAAoACgAKAAoACgAKAEHA0AELDwoACgAKAAoACgAKAAoACgBB4NABCysKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAACgAKAEGo0QELbQoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAAAAAAKAAoACgAKAAoAAAAAAAAACgAKAAoAQaDSAQsNCgAKAAoACgAKAAoACgBBwNIBCyEKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAQfDSAQsNCgAKAAoACgAKAAoACgBBmNMBCw0KAAoACgAKAAoACgAKAEG40wELPwoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgBBmNQBCxMCAAIAAgACAAIAAgACAAIAAgACAEHs1AELywESABIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyALIAsgCyABIAsgASABIAEgASABIAEgAS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kAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACjMRQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAoABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB3MRAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAdzEY0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0EjQSNBI0E0A7XDt8OjQTYBdgF2AXnDvcO7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QABAAEAFAAXABUAGgAWABoAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABQAGAAVABgADwBBqKACC9cKDwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAwAFwAZABkAGQAZABsAFwAaABsABQAcABgAEAAbABoAGwAYAEsDiwMaAAIAFwAXABoACwMFAB0AyzRLNMs8FwABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAGAABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgAAgACAAIAAgACAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgACAAEAAgABAAIAAQACAAEAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQABAAIAAQACAAEAAgACAAIAAQABAAIAAQACAAEAAQACAAEAAQABAAIAAgABAAEAAQABAAIAAQABAAIAAQABAAEAAgACAAIAAQABAAIAAQABAAIAAQACAAEAAgABAAEAAgABAAIAAgABAAIAAQABAAIAAQABAAEAAgABAAIAAQABAAIAAgAFAAEAAgACAAIABQAFAAUABQABAAMAAgABAAMAAgABAAMAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgABAAMAAgABAAIAAQABAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgACAAIAAgACAAIAAQABAAIAAQABAAIAAgABAAIAAQABAAEAAQACAAEAAgABAAIAAQACAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAFAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEABoAGgAaABoABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaAAQABAAEAAQABAAaABoAGgAaABoAGgAaAAQAGgAEABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAEAAgABAAIABAAaAAEAAgAAAAAABAACAAIAAgAXAAEAQYirAgvHBxoAGgABABcAAQABAAEAAAABAAAAAQABAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAgACAAEAAQABAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAgACAAIAAQACABgAAQACAAEAAQACAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAGwAGAAYABgAGAAYABwAHAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAAAAAAQAFwAXABcAFwAXABcAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFwATAAAAAAAbABsAGQAAAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGABMABgAXAAYABgAXAAYABgAXAAYAQeCyAgs1BQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZ6zAgsLBQAFAAUABQAXABcAQcCzAgvLBRAAEAAQABAAEAAQABgAGAAYABcAFwAZABcAFwAbABsABgAGAAYABgAGAAYABgAGAAYABgAGABcAEAAAABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXABcAFwAFAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcABQAGAAYABgAGAAYABgAGABAAGwAGAAYABgAGAAYABgAEAAQABgAGABsABgAGAAYABgAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAbABsABQAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAAAAQAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAUAQai5AgvVAkkAiQDJAAkBSQGJAckBCQJJAokCBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABAAEABsAFwAXABcABAAAAAAABgAZABkABgAGAAYABgAEAAYABgAGAAQABgAGAAYABgAGAAAAAAAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAEAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAAAAAAXAAAABQAFAAUABQAFAAUABQAFAAUABQAFAEGovAILfwYABgAQAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUAQb69Agu3AwYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFAAYABgAXABcASQCJAMkACQFJAYkByQEJAkkCiQIXAAQABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABQAIAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAgACAAGAAgACAAFAAYABgAGAAYABgAGAAYABQAFAAUABQAFAAUABQAFAAUABQAGAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCBQAFABkAGQDLN8s1yz/LNMs8SwkbABkABQAXAAYAAAAFAAYACAAIAAAABQAFAAUABQAFAAUABQAFAAAAAAAFAAUAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUAAAAFAAAAAAAAAAUABQAFAAUAAAAAAAYABQAIAAgACAAGAAYABgAGAAAAAAAIAAgAAAAAAAgACAAGAAUAQYbBAgsBCABBkMECCwcFAAUAAAAFAEGkwQILIUkAiQDJAAkBSQGJAckBCQJJAokCBgAGAAUABQAFAAYAFwBB2sECCxMGAAYACAAAAAUABQAFAAUABQAFAEH2wQILVwUABQAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAAAAUABQAAAAAABgAAAAgACAAIAAYABgBB1sICCxUGAAYAAAA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AAUABQAFAAUAAAAAAAAABQAGAAYABgAIAAgACAAIAAAABgAGAAYAAAAGAAYABgAGAEHCygILCwYABgAAAAUABQAFAEHYygILJQUABQAGAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCAAAFAAUAQZjLAguLAQUABgAIAAgAFwAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAAAAAABgAFAAgABgAIAAgACAAIAAgAAAAGAAgACAAAAAgACAAGAAYAQbLMAgsDCAAIAEHEzAILywEFAAAABQAFAAYABgAAAAAASQCJAMkACQFJAYkByQEJAkkCiQLLB0seS3jLNEs0yzzLN8s1yz8bAAUABQAFAAUABQAFAAYABgAIAAgABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABQAIAAgACAAGAAYABgAGAAAACAAIAAgAAAAIAAgACAAGAAUAGwBBmM4CCxcFAAUABQAIAAvMC8pLywvJSzZLyQs1BQBBvM4CCx1JAIkAyQAJAUkBiQHJAQkCSQKJAgAAAAAIAAgAFwBB8s4CC4sBBgAIAAgAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAABgBBhtACC1cIAAgACAAGAAYABgAAAAYAAAAIAAgACAAIAAgACAAIAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABQAFAAYABgAGAAYABgAGAAYAQebQAgs5GQAFAAUABQAFAAUABQAEAAYABgAGAAYABgAGAAYABgAXAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXAEGq0QIL9wIFAAUAAAAFAAAABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUABQAFAAUABQAFAAUABgAFAAUABgAGAAYABgAGAAYABgAGAAYABQAAAAAABQAFAAUABQAFAAAABAAAAAYABgAGAAYABgAGAAAAAABJAIkAyQAJAUkBiQHJAQkCSQKJAgAAAAAFAAUABQAFAAUAGwAbABsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAGwAXABsAGwAbAAYABgAbABsAGwAbABsAGwBJAIkAyQAJAUkBiQHJAQkCSQKJAks0SzxLREtMS1RLXEtkS2xLdEssGwAGABsABgAbAAYAFAAVABQAFQAIAAgABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQarUAgvLAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAIAAYABgAGAAYABgAXAAYABgAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAAABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAAAGwAbABsAGwAbABsAGwAbAAYAGwAbABsAGwAbABsAAAAbABsAFwAXABcAFwAXABsAGwAbABsAFwAXAEGA1gILzwIFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAYABgAGAAYACAAGAAYABgAGAAYABgAIAAYABgAIAAgABgAGAAUASQCJAMkACQFJAYkByQEJAkkCiQIXABcAFwAXABcAFwAFAAUABQAFAAUABQAIAAgABgAGAAUABQAFAAUABgAGAAYABQAIAAgACAAFAAUACAAIAAgACAAIAAgACAAFAAUABQAGAAYABgAGAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAgABgAGAAgACAAIAAgACAAIAAYABQAIAEkAiQDJAAkBSQGJAckBCQJJAokCCAAIAAgABgAbABsAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFwAEAAIAAgACAAEAAQABAAEAAQABAAAAAQBB2tgCC9kDAQAAAAAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAUAAAAFAAAABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAYABgAGABcAFwAXABcAFwAXABcAFwAXAAsDSwOLA8sDCwRLBIsEywQLBcsHSwrLDEsPyxFLFMsWSxnLG0sei3gAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABsAGwAbABsAGwAbABsAGwAbABsAQcDcAguZAgEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAAAAAAIAAgACAAIAAgACAAAAAAATAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAbABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAwABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABQAFQAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAFwAXABcAignKCQoKBQAFAAUABQAFAAUABQAFAEHo3gILKQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAYABgAGAEGo3wILLQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGABcAFwBB6N8CCycFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYAQajgAgsnBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAAABgAGAEHo4AILlAEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAgABgAGAAYABgAGAAYABgAIAAgACAAIAAgACAAIAAgABgAIAAgABgAGAAYABgAGAAYABgAGAAYABgAGABcAFwAXAAQAFwAXABcAGQAFAAYAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCAEGI4gILFEsFiwXLBQsGSwaLBssGCwdLB4sHAEGo4gILFQUABQAFAAUABQAFAAUABQAFAAYABQBByOICC1QFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcAFwAXABcAFwAXABMAFwAXABcAFwAGAAYABgAQAAAASQCJAMkACQFJAYkByQEJAkkCiQIAQajjAgtBBQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQfjjAgtDBQAFAAUABQAFAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB0OQCCxcGAAYABgAIAAgACAAIAAYABgAIAAgACABB8OQCCxcIAAgABgAIAAgACAAIAAgACAAGAAYABgBBkOUCC4kBGwAAAAAAAAAXABcASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUAQbDmAgsXBQAFAAUABQAFAAUABQAFAAUABQAFAAUAQdDmAgsjBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQYDnAgv0AkkAiQDJAAkBSQGJAckBCQJJAokCCwMAAAAAAAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYACAAIAAYAAAAAABcAFwAXABcAFwAXABcAFwAXAAQAFwAXABcAFwAXABcAAAAAAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAHAAYABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAGAAgABgAGAAYABgAGAAYABgAAAAYACAAGAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAgACAAIAAgABgAGAAYABgAGAAYABgAGAAYABgAAAAAABgBJAIkAyQAJAUkBiQHJAQkCSQKJAgBBgOoCCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBBoOoCC0EXABsAGwAbABsAGwAbABsAGwAbABsABgAGAAYABgAGAAYABgAGAAYAGwAbABsAGwAbABsAGwAbABsAAAAAAAAABgBBoOsCC28GAAYABgAGAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABgAGAAYABgAIAAYACAAIAAgACAAIAAYACAAIAAUABQAFAAUABQAFAAUAQZjsAgu/AUkAiQDJAAkBSQGJAckBCQJJAokCFwAXABcAFwAXABcABQAIAAYABgAGAAYACAAIAAYABgAIAAYABgAGAAUABQBJAIkAyQAJAUkBiQHJAQkCSQKJAgUABQAFAAUABQAFAAYABgAIAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYABgAIAAgACAAGAAgABgAGAAYACAAIAEHo7QIL0QEXABcAFwAXAEkAiQDJAAkBSQGJAckBCQJJAokCAAAAAAAABQAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUABQAIAAgACAAIAAgACAAIAAgABgAGAAYABgAGAAYABgAGAAgACAAGAAYAAAAAAAAAFwAXABcAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABAAEAAQABAAEABcAFwACAAIAAgACAAIAAgACAAIAAgBByO8CC08BAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAQABAAEAFwAXABcAFwAXABcAFwAXAEGo8AILVQYABgAGABcABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAIAAYABgAGAAYABgAGAAYABQAFAAUABQAGAAUABQAFAAUABQAFAAYABQAFAAgABgAGAAUAQYjxAgufCQIAAgACAAIAAgACAAIAAgACAAIAAgACAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAQAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIABAAEAAQABAAEAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAAAAYABgAGAAYABgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAIAAgACAAIAAgACAAIAAgABAAIAAgACAAIAAgACAAIAAgACAAEAAQABAAEAAQAaABoAGgAAAAAAAgACAAIAAAACAAIAAQABAAEAAQADABoAGgAAAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAAAAAAEAAQABAAEAAQABAAAAAAACAAIAAgACAAIAAgACAAIAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAAAAAAEAAQABAAEAAQABAAAAAAACAAIAAgACAAIAAgACAAIAAAABAAAAAQAAAAEAAAABAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAAAAAACAAIAAgACAAIAAgACAAIAAwADAAMAAwADAAMAAwADAAIAAgACAAIAAgACAAIAAgADAAMAAwADAAMAAwADAAMAAgACAAIAAgACAAAAAgACAAEAAQABAAEAAwAaAAIAGgAaABoAAgACAAIAAAACAAIAAQABAAEAAQADABoAGgAaAAIAAgACAAIAAAAAAAIAAgABAAEAAQABAAAAGgAaABoAFgAXABcAFwAYABQAFQAXABcAFwAXABcAFwAXABcAFwAXABcAGAAXABYAFwAXABcAFwAXABcAFwAXABcAFwAMABAAEAAQABAAEAAAABAAEAAQABAAEAAQABAAEAAQABAAywIEAAAAAADLAwsESwSLBMsECwUYABgAGAAUABUABAAMAAwADAAMAAwADAAMAAwADAAMAAwAEAAQABAAEAAQABMAEwATABMAEwATABcAFwAcAB0AFAAcABwAHQAUABwAFwAXABcAFwAXABcAFwAXAA0ADgAQABAAEAAQABAADAAXABcAFwAXABcAFwAXABcAFwAcAB0AFwAXABcAFwAWAMsCCwNLA4sDywMLBEsEiwTLBAsFGAAYABgAFAAVAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAQcj6AgtBBgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAHAAcABwAHAAYABwAHAAcABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQaj7AguXAhsAGwAbABsAAQAbAAEAGwABABsAAQABAAEAAQAbAAIAAQABAAEAAQACAAUABQAFAAUAAgAbABsAAgACAAEAAQAYABgAGAAYABgAAQACAAIAAgACABsAGAAbABsAAgAbAIs1CzZLNos0izgLNQs5Cz0LQUs1S0XLNcs9y0XLTYsFGwAbAAEAGwAbABsAGwABABsAGwACAAEAAQABAAIAAgABAAEAAQACABsAAQAbABsAGAABAAEAAQABAAEAGwAbAIoFygUKBkoGigbKBgoHSgeKB8oHCghKCMoRSh4KmEp4igXKBQoGSgaKBsoGCgdKB4oHygcKCEoIyhFKHgqYSnhKeEqYingBAAIAygbKEYqYynhLBRsAGwBByP0CC/0EGAAYABgAGAAYABsAGwAbABsAGwAYABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGwAbABgAGwAbABgAGwAbABsAGwAbABsAGwAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABsAGwAYABsAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABsAGwAbABsAGwAbABsAGwAUABUAFAAVABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGwAbABsAGwAbABsAGwAUABUAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGAAYABgAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+IIDC78JGwAbABsAGwAbABsAGwAbABsAGwDLAgsISwiLCMsICwlLCYsJywkLCksKCwNLA4sDywMLBEsEiwTLBAsFywfLAgsDSwOLA8sDCwRLBIsEywQLBcsHCwhLCIsIywgLCUsJiwnLCQsKSwoLA0sDiwPLAwsESwSLBMsECwXLBwsISwiLCMsICwlLCYsJywkLCksKGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABsAGwAbABsAGwAbABsAGwAbABgAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABQAFQAUABUAFAAVABQAFQAUABUAFAAVABQAFQALA0sDiwPLAwsESwSLBMsECwXLBwsDSwOLA8sDCwRLBIsEywQLBcsHCwNLA4sDywMLBEsEiwTLBAsFywcbABsAGwAbABsAGwAbABsAGwAbABsAGwAYABgAGAAYABgAFAAVABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFQAUABUAFAAVABQAFQAUABUAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABUAFAAVABQAFQAUABUAFAAVABQAFQAUABUAFAAVABQAFQAUABUAFAAVABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABQAFQAUABUAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABUAGAAYABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABsAGwAYABgAGAAYABgAGAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAGwAbABsAGwAbABsAGwAbABsAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAAAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAIAAQABAAEAAgACAAEAAgABAAIAAQACAAEAAQABAAEAAgABAAIAAgABAAIAAgACAAIAAgACAAQABAABAAEAAQACAAEAAgACABsAGwAbABsAGwAbAAEAAgABAAIABgAGAAYAAQACAEHCjAMLHRcAFwAXABcASzQXABcAAgACAAIAAgACAAIAAAACAEHqjAMLJQIAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZ6NAwsDBAAXAEG+jQMLbwYABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBwI4DC6UBFwAXABwAHQAcAB0AFwAXABcAHAAdABcAHAAdABcAFwAXABcAFwAXABcAFwAXABMAFwAXABMAFwAcAB0AFwAXABwAHQAUABUAFAAVABQAFQAUABUAFwAXABcAFwAXAAQAFwAXABcAFwAXABcAFwAXABcAFwATABMAFwAXABcAFwATABcAFAAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABsAGwAXAEGAkAMLXxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEH4kAMLKxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQciRAwsXGwAbABsAGwAbABsAGwAbABsAGwAbABsAQeiRAwv/ARsAigXKBQoGSgaKBsoGCgdKB4oHBgAGAAYABgAIAAgAEwAEAAQABAAEAAQAGwAbAMoHSgrKDAQABQAXABsAGwAMABcAFwAXABsABAAFAEoFFAAVABQAFQAUABUAFAAVABQAFQAbABsAFAAVABQAFQAUABUAFAAVABMAFAAVABUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAGAAYAGgAaAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABcABAAEAAQABQBB8pMDC30FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAGwAbAIsFywULBksGGwAbABsAGwAbABsAGwAbABsAGwBBiJUDC70QBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCLBcsFCwZLBosGywYLB0sHiwfLBxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAywdLCssMSw/LEUsUyxZLGRsAiwrLCgsLSwuLC8sLCwxLDIsMywwLDUsNiw3LDQsOGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEsOiw7LDgsPSw+LD8sPCxBLEIsQyxALEUsRixHLEQUABQAFAAUABQCFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUFBQAFAAUHBQAFAAUAhXgFAAUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUABQAFAAUAhQYFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIV5xQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFeAUABQAFAAUABQAFAAUABQAFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUARR4FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFeQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFegUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUARQcFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBwUARXhFCsUMBQAFAAUABQAFAAUARQ8FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFBgUGBQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFBQUABQAFAAUABQAFAAUAhQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIUFBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQCFB0UKBQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQXFBQUGBQDFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUeBQAFAAUABQAFAAUABQBFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhXgFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBQUABQAFAAUAxQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUFBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFeAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBgUABQAFAAUABQBFHgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBFBQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABQAFAAUABQAFAAUABQAFAAUABQAbABsAGwAbABsAGwAbAEHYpQMLXwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEkAiQDJAAkBSQGJAckBCQJJAokCBQAFAEHgpgMLrwEBAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAQABAAGAAYAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAUABgAHAAcABwAXAAYABgAGAAYABgAGAAYABgAGAAYAFwAEAAUABQAFAAUABQAFAIoFygUKBkoGigbKBgoHSgeKB0oFBgAGABcAFwAXABcAFwAXAEGgqAMLPxoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAEAAQABAAEAAQABAAEAAQABABBiqkDC4MCAQACAAUABAAEAAIABQAFAAUABQAFABoAGgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAgACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAQAAgACAAIAAgACAAIAAgACAAEAAgABAAIAAQABAAIAAQACAAEAAgABAAIAAQACAAQAGgAaAAEAAgABAAIABQABAAIAAQACAAIAAgABAAIAAQACAAEAAgABAAIAAQACAAEAAgABAAEAAQABAAEAAgABAAEAAQABAAEAAgABAAIAAQACAAEAAgABAAIAAQACAAAAAAABAAIAAQABAAEAAQACAAEAAgBBuKsDC3MFAAUABgAFAAUABQAGAAUABQAFAAUABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAYABgAIABsAGwAbABsABgAAAAAAAADLNEs0yzzLN8s1yz8bABsAGQAbAEG4rAMLLwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAXABcAFwAXAEH4rAMLCwgACAAIAAgABgAGAEGUrQMLGBcAFwBJAIkAyQAJAUkBiQHJAQkCSQKJAgBBuK0DC/cBCAAIAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAUABQAFAAUABQAFABcAFwAXAAUAFwAFAAUABgAFAAUABQAFAAUABQAGAAYABgAGAAYABgAGAAYAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAGAAgACABBxq8DC+8BFwAIABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAAAAEAEkAiQDJAAkBSQGJAckBCQJJAokCAAAAAAAAAAAXABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAgACAAGAAYABgAGAAgACAAGAAYACAAIAAUABQAFAAUABQAGAAQABQAFAAUABQAFAAUABQAFAAUASQCJAMkACQFJAYkByQEJAkkCiQIFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAIAAgABgAGAAgACAAGAAYAQcixAwvFAQUABQAFAAYABQAFAAUABQAFAAUABQAFAAYACAAAAAAASQCJAMkACQFJAYkByQEJAkkCiQIAAAAAFwAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAQABQAFAAUABQAFAAUAGwAbABsABQAIAAYACAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAUABgAGAAYABQAFAAYABgAFAAUABQAFAAUABgAGAAUABgAFAEG+swMLNwUABQAEABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUACAAGAAYACAAIABcAFwAFAAQABAAIAAYAQYq0AwsrBQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQBByLQDC3cFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAAAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoABAAEAAQABAACAAIAAgACAAIAAgACAAIAAgAEABoAGgBByLUDC1QCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUABQAFAAgACAAGAAgACAAGAAgACAAXAAgABgAAAAAASQCJAMkACQFJAYkByQEJAkkCiQIAQai2AwsHBQAFAAUABQBByLYDCzcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGItwMLDQUABQAFAAUABQAFAAUAQZ63AwuHBAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEABQAFAAUABQAFAAUABQAFAAUABQAFAAUGBQAFAAUABQAFAAUABQDFBwUABQAFAAUAxQUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAxQYFAMUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAMUHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAgACAAIAAgACAAIAAgBBvrsDCwkCAAIAAgACAAIAQdK7AwtJBQAGAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgBBvrwDC0EFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFABUAFABBoL0DCz8FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQZC+AwtTBQAFAAUABQAFAAUABQAFAAUABQAFAAUAGQAbAAAAAAAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGABcAFwAXABcAFwAXABcAFAAVABcAQfC+AwuPAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAFwATABMAFgAWABQAFQAUABUAFAAVABQAFQAUABUAFAAVABcAFwAUABUAFwAXABcAFwAWABYAFgAXABcAFwAAABcAFwAXABcAEwAUABUAFAAVABQAFQAXABcAFwAYABMAGAAYABgAAAAXABkAFwAXAEGIwAMLrQEFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAQAAAAAAAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAFAAAAAAAFAAUABQAAAAAAAAAZABkAGAAaABsAGQAZAAAAGwAYABgAGAAYABsAGwBBysEDC+MDEAAQABAAGwAbAAAAAAAAABcAFwAXABkAFwAXABcAFAAVABcAGAAXABMAFwAXAEkAiQDJAAkBSQGJAckBCQJJAokCFwAXABgAGAAYABcAGgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAFAAYABUAGAAUABUAFwAUABUAFwAXAAUABQAFAAUABQAFAAUABQAFAAUABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEAAQABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAFA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HSgpKHgBBkMwDC3QCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAABJAIkAyQAJAUkBiQHJAQkCSQKJAgBBkM0DC1cBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAQfDNAwsnAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAEGgzgMLHwIAAgACAAIAAgACAAIAAgAFAAUABQAFAAUABQAFAAUAQdDOAwsfBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBhs8DCwEXAEGozwML2AEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAAAAAAAAAUAAAAAAAUABQAFAAUABQAFAAUAAAAAAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAABcAiwXLBQsGywdLCkseS3iLeAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAbABsAiwXLBQsGSwaLBssHSwoAQY7RAwsSiwXLBQsGSwZLBosGywdLCkseAEHA0QMLKwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUAQfbRAwt9iwWLBssHSwpLHgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAiwXLB0sKSx7LBQsGAAAAAAAAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQf7SAwtxFwBLoEuoS7BLuIt4i4CLiIuQi5iLoIuoi7CLuMt4y4DLiMuQy5jLoMuoy7DLuMs2SzXLNIs0y0ZLNMtOizjLPEtFBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQfjTAwtay15LNAUABQCLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8sRSxTLFgAAAABLHguAC4gLkAuYC6ALqAuwC7hLeEuAS4hLkEuYCwNLA4sDywPLB0sKSx5LeEs0AEHg1AMLERcAFwAXABcAFwAXABcAFwAXAEGA1QMLDQUABgAGAAYAAAAGAAYAQZjVAwtVBgAGAAYABgAFAAUABQAFAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAGAAYABgBB9tUDC48BBgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAiwXLERcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAIsFywdLCgUABQAFAAUABQAGAAYAQY7XAwsXiwWLBssHSwpLHhcAFwAXABcAFwAXABcAQbjXAwu9AQUABQAFAAUABQAFAAUABQAbAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAFwAXABcAFwAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAACLBcsFCwZLBssHSwpLHkt4BQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBBgNkDCzOLBcsFCwZLBssHSwpLHkt4BQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQcLZAwsHFwAXABcAFwBB4tkDCw6LBcsFCwZLBssHSwpLHgBBkNoDCxEFAAUABQAFAAUABQAFAAUABQBB0NoDCyUBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAEGQ2wMLJQIAAgACAAIAAgAC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AAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYAFwAXAAUAQdjjAwuqAQgABQAFAAUABQAXABcAFwAXAAYABgAGAAYAFwAIAAYASQCJAMkACQFJAYkByQEJAkkCiQIFABcABQAXABcAFwAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAYABgAGAAgAAACLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8sRSxTLFksZyxtLHkt4AEGY5QMLywEFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAIAAgABgAIAAYABgAXABcAFwAXABcAFwAGAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUAFwBB8OYDCzUFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAYABgBBsOcDCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBB0OcDCykFAAUACAAIAAAAAAAGAAYABgAGAAYABgAGAAAAAAAAAAYABgAGAAYABgBBkOgDC5EBBgAGAAgACAAAAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAAABQAFAAAABQAFAAUABQAFAAAABgAGAAUACAAIAAYACAAIAAgACAAAAAAACAAIAAAAAAAIAAgACAAAAAAABQBBrukDCwEIAEG66QMLiQEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAGAAYABgAGAAYACAAIAAYABgAGAAgABgAFAAUABQAFABcAFwAXABcAFwBJAIkAyQAJAUkBiQHJAQkCSQKJAhcAFwAAABcABgAFAAUABQBBgOsDC08FAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgACAAIAAYABgAGAAYABgAGAAgABgAIAAgACAAIAAYABgAIAAYABgAFAAUAFwAFAEHg6wMLFEkAiQDJAAkBSQGJAckBCQJJAokCAEGA7AMLyQEFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAGAAYABgAGAAAAAAAIAAgACAAIAAYABgAIAAYABgAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcABQAFAAUABQAGAAYAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAGAAYABgAGAAgACAAGAAgABgAGABcAFwAXAAUAQeDtAwsUSQCJAMkACQFJAYkByQEJAkkCiQIAQYDuAwsZFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwBBwO4DCxRJAIkAyQAJAUkBiQHJAQkCSQKJAgBBgO8DCzEFAAUABQAFAAUABQAFAAUABQAFAAUABgAIAAYACAAIAAYABgAGAAYABgAGAAgABgAFAEHA7wMLFwgACAAGAAYABgAGAAgABgAGAAYABgAGAEHg7wMLV0kAiQDJAAkBSQGJAckBCQJJAokCywdLChcAFwAXABsABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAGAAYABgAGAAYACAAGAAYAFwBBwPADCyZJAIkAyQAJAUkBiQHJAQkCSQKJAssHSwrLDEsPyxFLFMsWSxnLGwBB/vADCw8FAAgABQAIAAYAFwAXABcAQaDxAwsUSQCJAMkACQFJAYkByQEJAkkCiQIAQcDxAwt5BQAFAAUABQAFAAUABQAAAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAAABQAFAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAIAAgACAAIAAgACAAAAAgACAAAAAAABgAGAAgABgAFAAYABQAXAAUACABB8PIDC68BBQAFAAUABQAFAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgABgAGAAYABgAAAAAABgAGAAgACAAIAAgABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAGAAYABgAGAAYABgAIAAUABgAGAAYABgAXABcAFwAXABcAFwAXABcABgBBsPQDC2UFAAYABgAGAAYABgAGAAgACAAGAAYABgAFAAUABQAFAAUABgAGAAYABgAGAAYABgAGAAYABgAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAXABcAFwBB0PUDC0sFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYACAAGAAYAFwAXABcABQAXABcABQAXABcAFwAXABcAQbD2AwvlAUkAiQDJAAkBSQGJAckBCQJJAokCiwXLBQsGSwaLBssGCwdLB4sHywdLCssMSw/LEUsUyxZLGcsbSx4AAAAAAAAXABcABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAgABgAGAAYABgAGAAYABgAAAAYABgAGAAYABgAGAAgABgAGAAYABgAGAAYABgAGAAYAAAAIAAYABgAGAAYABgAGAAYACAAGAAYACAAGAAYAQaj4AwtHBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAFAAYAQYD5AwsUSQCJAMkACQFJAYkByQEJAkkCiQIAQaD5AwuRAQUABQAFAAUABQAFAAUAAAAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAYABgAGAAYABgAGAAAAAAAAAAYAAAAGAAYAAAAGAAUABQAFAAUABQAFAAUABQAFAAUACAAIAAgACAAIAAAABgAGAAAACAAIAAY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OwUABQAFAEsFiwXLBQsGSwaLBssGCwdLB4sHywcLCEsIiwjLCAsJSwmLCcsJCwqLBcsFCwYXABcAFwAXAEHYgwQLFQUABQAFAAUABQAFAAUABQAFAAUABQBB9oMEC0kGAAUACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEHOhAQLKwYABgAGAAYABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAFwAEAAYAQZCFBAsDCAAIAEGwhQQLLwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGAhgQLBQUABQAFAEGghgQLBwUABQAFAAUAQbiGBAslBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQBB6IYECxkFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEGQhwQLJwUABQAFAAUABQAFAAUABQAFAAUAAAAAABsABgAGABcAEAAQABAAEABB8IcEC+kBGwAbABsAGwAbABsAGwAAAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsACAAIAAYABgAGABsAGwAbAAgACAAIAAgACAAIABAAEAAQABAAEAAQABAAEAAGAAYABgAGAAYABgAGAAYAGwAbAAYABgAGAAYABgAGAAYAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAGAAYABgAGABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQYiKBAsLGwAbAAYABgAGABsAQciKBAsoSwWLBcsFCwZLBosGywYLB0sHiwfLBwsISwiLCMsICwlLCYsJywkLCgBBiIsECzKLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8sRSxTLFksZyxuLBcsFCwZLBosGiwWLBgBByIsEC/8ISQKJAkkAiQDJAAkBSQGJAckBCQJJAokCSQCJAMkACQFJAYkByQEJAkkCiQJJAIkAyQAJAUkBiQHJAQkCSQKJAgEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAIAAgACAAAAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAAABAAEAAAAAAAEAAAAAAAEAAQAAAAAAAQABAAEAAQAAAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAAAAgAAAAIAAgACAAIAAgACAAIAAAACAAIAAgACAAIAAgACAAIAAgACAAIAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACAAIAAgACAAEAAQAAAAEAAQABAAEAAAAAAAEAAQABAAEAAQABAAEAAQAAAAEAAQABAAEAAQABAAEAAAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAQABAAAAAQABAAEAAQAAAAEAAQABAAEAAQAAAAEAAAAAAAAAAQABAAEAAQABAAEAAQAAAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAIAAgACAAIAAgACAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABgAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAYAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAGAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAYAAIAAgACAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAgACAAIAGAACAAIAAgACAAIAAgABAAIAAAAAAEkAiQDJAAkBSQGJAckBCQJJAokCSQCJAMkACQFJAYkByQEJAgAABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQeiUBAuHAQYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAbABsAGwAbAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAbABsAGwAbABsAGwAbABsABgAbABsAGwAbABsAGwAbABsAGwAbAAYAGwAbABcAFwAXABcAFwBBjpYEC1cGAAYABgAGAAYABgAGAAYAAAAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAAAAAAAYABgAGAAYABgAGAAYAAAAGAAYAAAAGAAYABgAGAAYAQZCXBAsfSQCJAMkACQFJAYkByQEJAkkCiQIAAAAAAAAAAAUAGwBB0JcEC3QFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAYABgAGAAYABgAGAAYABAAEAAQABAAEAAQABAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABgAGAAYABgBJAIkAyQAJAUkBiQHJAQkCSQKJAgBBzpgECy8ZAAUABQAFAAUABQAAAAAAiwXLBQsGSwaLBssGCwdLB4sHBgAGAAYABgAGAAYABgBBkJkECxcCAAIAAgACAAYABgAGAAYABgAGAAYABABBsJkEC19JAIkAyQAJAUkBiQHJAQkCSQKJAgAAAAAAAAAAFwAXAAEAAQACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgBBspoEC0iLBcsFCwZLBosGywYLB0sHiwfLB0sKywxLD8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GwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAEG4ogQLNxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQfiiBAsRGwAbABsAGwAbABsAGwAbABsAQZijBAsDGwAbAEG4owQLCxsAGwAbABsAGwAbAEH4owQLbxsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABoAGgAaABoAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+KQEC3EbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAAAAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwBB+KUECxcbABsAGwAbABsAGwAbABsAGwAbABsAGwBBuKYECw8bABsAGwAbABsAGwAbABsAQdimBAsTGwAbABsAGwAbABsAGwAbABsAGwBB+KYECw8bABsAGwAbABsAGwAbABsAQZinBAsrGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAAAAAABsAGwBB4KcEC5UBGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAAABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAAAAbABsAGwAbABsAAAAAAAAAGwAbABsAQYCpBAsNGwAbABsAGwAbABsAGwBBoKkECyEbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAQdCpBAsNGwAbABsAGwAbABsAGwBB+KkECw0bABsAGwAbABsAGwAbAEGYqgQLqQUbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAAAGwAbABsAGwAbABsAGwAbABsAGwAbABsABQAFBwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFDAUABQAFAAUABQAFAAUABQBFDwUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAEUPBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQDFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUGBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFBgUABQAFAAUABQAFAAUABQAFAAUABQAFAAUARQYFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAQYCwBAuDAQUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAhQcFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAQAEHAsQQLHwYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAQYCyBAs7EQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARABEAEQARAB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jBiQGJAYlBiUGJgYmBiYGJgYnBicGKAYoBigGKAYpBikGKgYqBioGKgYrBisGKwYrBiwGLAYsBiwGLQYtBi0GLQYuBi4GLgYuBi8GLwYwBjAGMQYxBjIGMgYzBjMGMwYzBjQGNAY0BjQGNQY1BjUGNQY2BjYGNgY2BjcGNwY3BjcGOAY4BjgGOAY5BjkGOQY5BjoGOgY6BjoGQQZBBkEGQQZCBkIGQgZCBkMGQwZDBkMGRAZEBkQGRAZFBkUGRQZFBkYGRgZGBkYGRwZHBkcGRwZIBkgGSQZJBkoGSgZKBkoGXAZcBl0GXQZeBl4GXwZfBgBB+b0ECxcBAAMAAQABAAACAgAAAQIAAQECAAEBAwBBmb4ECzsBAAMAAQADAAABAgAAAQIAAQECAAEBAwACBAYICgwOAAAAAAAAAAAiBiIGIwYjBiUGJQYnBicG7/7w/gBB4b4ECxsBAAAAAAABAAEAAQABAAFcBl0GXAZeBlwGXwYAQfy+BAsDkCEC"),x(0,O,A,(function(A){B(A.instance)})).catch(g),{}}();C._ushape_arabic=(A,B)=>(C._ushape_arabic=Z.e)(A,B),C._malloc=A=>(C._malloc=Z.f)(A),C._free=A=>(C._free=Z.g)(A),C._bidi_processText=(A,B)=>(C._bidi_processText=Z.h)(A,B),C._bidi_getParagraphEndIndex=A=>(C._bidi_getParagraphEndIndex=Z.i)(A),C._bidi_getVisualRun=(A,B,Q)=>(C._bidi_getVisualRun=Z.j)(A,B,Q),C._bidi_setLine=(A,B)=>(C._bidi_setLine=Z.k)(A,B),C._bidi_writeReverse=(A,B,Q)=>(C._bidi_writeReverse=Z.l)(A,B,Q),C._bidi_getLine=(A,B)=>(C._bidi_getLine=Z.m)(A,B);var p,u=A=>(u=Z.o)(A),T=A=>(T=Z.p)(A),v=()=>(v=Z.q)();function m(){function A(){p||(p=!0,C.calledRun=!0,N||(H(X),Q(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),function(){if(C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)A=C.postRun.shift(),d.unshift(A);var A;H(d)}()))}M>0||(function(){if(C.preRun)for("function"==typeof C.preRun&&(C.preRun=[C.preRun]);C.preRun.length;)A=C.preRun.shift(),S.unshift(A);var A;H(S)}(),M>0||(C.setStatus?(C.setStatus("Running..."),setTimeout((function(){setTimeout((function(){C.setStatus("")}),1),A()}),1)):A()))}if(C.ccall=(A,B,Q,g,E)=>{var I={string:A=>{var B=0;return null!=A&&0!==A&&(B=e(A)),B},array:A=>{var B,Q,g=t(A.length);return B=A,Q=g,c.set(B,Q),g}},F=(A=>C["_"+A])(A),w=[],U=0;if(g)for(var D=0;D{for(var Q=A,g=Q>>1,C=g+B/2;!(g>=C)&&i[g];)++g;if((Q=g<<1)-A>32&&r)return r.decode(L.subarray(A,Q));for(var E="",I=0;!(I>=B/2);++I){var F=K[A+2*I>>1];if(0==F)break;E+=String.fromCharCode(F)}return E},C.stringToUTF16=(A,B,Q)=>{if(Q??=2147483647,Q<2)return 0;for(var g=B,C=(Q-=2)<2*A.length?Q/2:A.length,E=0;E>1]=I,B+=2}return K[B>>1]=0,B-g},y=function A(){p||m(),p||(y=A)},C.preInit)for("function"==typeof C.preInit&&(C.preInit=[C.preInit]);C.preInit.length>0;)C.preInit.pop()();return m(),E});return async function(){const A=await Q();function B(B){if(!B)return B;const Q=2*(B.length+1),g=A._malloc(Q);A.stringToUTF16(B,g,Q);const C=A.ccall("ushape_arabic","number",["number","number"],[g,B.length]);if(A._free(g),0===C)return B;const E=A.UTF16ToString(C);return A._free(C),E}function g(B,Q){const g=[];for(let C=0;Cg[g.length-1])&&g.push(A);g.push(Q)}for(const A of B)A>g[g.length-1]&&g.push(A);return g}function C(B,Q,g){if(!B)return null;A.stringToUTF16(B,Q,g);const C=A.ccall("bidi_processText","number",["number","number"],[Q,B.length]);return 0===C?(A._free(Q),null):C}function E(B,Q){const E=2*(B.length+1),I=A._malloc(E),F=C(B,I,E);if(!F)return[B];const w=g(Q,F);let U=0;const D=[];for(const B of w){const Q=A.ccall("bidi_getLine","number",["number","number"],[U,B]);if(0===Q)return A._free(I),[];D.push(A.UTF16ToString(Q)),A._free(Q),U=B}return A._free(I),D}function I(){return A._malloc(4)}function F(B){const Q=new Int32Array(A.HEAPU8.buffer,B,1)[0];return A._free(B),Q}function w(B,Q,g){const C=A.ccall("bidi_writeReverse","number",["number","number","number"],[B,Q,g-Q]);if(0===C)return null;const E=A.UTF16ToString(C);return A._free(C),E}function U(B,Q,E){const U=2*(B.length+1),D=A._malloc(U),G=C(B,D,U);if(!G)return[{text:B,styleIndices:Q}];const s=g(E,G);let Y=0;const o=[];for(const g of s){let C="",E=[];const U=A.ccall("bidi_setLine","number",["number","number"],[Y,g]);if(!U)return A._free(D),[];for(let g=0;g=o;I--)if(g!==Q[I]||I===o){const F=I===o?I:I+1,U=w(D,F,B);if(!U)return A._free(D),[];C+=U;for(let A=0;A1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)i?a=r:o=r,r=.5*(o-a)+a;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},i}(),o=n(a);let l,u;function c(){return null==l&&(l="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),l}function h(){if(null==u&&(u=!1,c())){const t=5,e=new OffscreenCanvas(t,t).getContext("2d",{willReadFrequently:!0});if(e){for(let r=0;r4&&void 0!==arguments[4]?arguments[4]:"zyx",s=Math.PI/360;e*=s,n*=s,r*=s;var a=Math.sin(e),o=Math.cos(e),l=Math.sin(r),u=Math.cos(r),c=Math.sin(n),h=Math.cos(n);switch(i){case "xyz":t[0]=a*u*h+o*l*c,t[1]=o*l*h-a*u*c,t[2]=o*u*c+a*l*h,t[3]=o*u*h-a*l*c;break;case "xzy":t[0]=a*u*h-o*l*c,t[1]=o*l*h-a*u*c,t[2]=o*u*c+a*l*h,t[3]=o*u*h+a*l*c;break;case "yxz":t[0]=a*u*h+o*l*c,t[1]=o*l*h-a*u*c,t[2]=o*u*c-a*l*h,t[3]=o*u*h+a*l*c;break;case "yzx":t[0]=a*u*h+o*l*c,t[1]=o*l*h+a*u*c,t[2]=o*u*c-a*l*h,t[3]=o*u*h-a*l*c;break;case "zxy":t[0]=a*u*h-o*l*c,t[1]=o*l*h+a*u*c,t[2]=o*u*c+a*l*h,t[3]=o*u*h-a*l*c;break;case "zyx":t[0]=a*u*h-o*l*c,t[1]=o*l*h+a*u*c,t[2]=o*u*c-a*l*h,t[3]=o*u*h+a*l*c;break;default:throw new Error("Unknown angle order "+i)}return t}function T(){var t=new f(2);return f!=Float32Array&&(t[0]=0,t[1]=0),t}function I(t,e){var r=new f(2);return r[0]=t,r[1]=e,r}m(),_=new f(4),f!=Float32Array&&(_[0]=0,_[1]=0,_[2]=0,_[3]=0),m(),x(1,0,0),x(0,1,0),k(),k(),d(),T();const M=8192;function F(t,e,r){return e*(M/(t.tileSize*Math.pow(2,r-t.tileID.overscaledZ)))}function D(t,e){return (t%e+e)%e}function z(t,e,r){return t*(1-r)+e*r}function P(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function B(t,e,r,n){const i=new o(t,e,r,n);return t=>i.solve(t)}const V=B(.25,.1,.25,1);function C(t,e,r){return Math.min(r,Math.max(e,t))}function L(t,e,r){const n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function O(t,...e){for(const r of e)for(const e in r)t[e]=r[e];return t}let R=1;function N(t,e,r){const n={};for(const r in t)n[r]=e.call(this,t[r],r,t);return n}function $(t,e,r){const n={};for(const r in t)e.call(this,t[r],r,t)&&(n[r]=t[r]);return n}function U(t){return Array.isArray(t)?t.map(U):"object"==typeof t&&t?N(t,U):t}const q={};function j(t){q[t]||("undefined"!=typeof console&&console.warn(t),q[t]=!0);}function G(t,e,r){return (r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function X(t){return "undefined"!=typeof WorkerGlobalScope&&void 0!==t&&t instanceof WorkerGlobalScope}let Y=null;function Z(t){return "undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}const H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function K(t,r,n,i,s){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const e=new VideoFrame(t,{timestamp:0});try{const a=null==e?void 0:e.format;if(!a||!a.startsWith("BGR")&&!a.startsWith("RGB"))throw new Error(`Unrecognized format ${a}`);const o=a.startsWith("BGR"),l=new Uint8ClampedArray(i*s*4);if(yield e.copyTo(l,function(t,e,r,n,i){const s=4*Math.max(-e,0),a=(Math.max(0,r)-r)*n*4+s,o=4*n,l=Math.max(0,e),u=Math.max(0,r);return {rect:{x:l,y:u,width:Math.min(t.width,e+n)-l,height:Math.min(t.height,r+i)-u},layout:[{offset:a,stride:o}]}}(t,r,n,i,s)),o)for(let t=0;t{t.removeEventListener(e,r,n);}}}function tt(t){return t*Math.PI/180}function et(t){return t/Math.PI*180}const rt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},nt={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},it="AbortError";class st extends Error{constructor(t=it){super(t instanceof Error?t.message:t),this.name=it,t instanceof Error&&t.stack&&(this.stack=t.stack);}}function at(t){return t.name===it}const ot={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function lt(t){return ot.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}const ut="global-dispatcher";class ct extends Error{constructor(t,e,r,n){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=n;}}const ht=()=>X(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,pt=function(t,r){if(/:\/\//.test(t.url)&&!/^https?:|^file:/.test(t.url)){const e=lt(t.url);if(e)return e(t,r);if(X(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:ut},r)}if(!(/^file:/.test(n=t.url)||/^file:/.test(ht())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(t,r){return e(this,void 0,void 0,(function*(){const e=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:ht(),signal:r.signal});let n,i;"json"!==t.type||e.headers.has("Accept")||e.headers.set("Accept","application/json");try{n=yield fetch(e);}catch(e){if(at(e))throw e;throw new ct(0,e.message,t.url,new Blob)}if(!n.ok){const e=yield n.blob();throw new ct(n.status,n.statusText,t.url,e)}i="arrayBuffer"===t.type||"image"===t.type?n.arrayBuffer():"json"===t.type?n.json():n.text();const s=yield i;return r.signal.throwIfAborted(),{data:s,cacheControl:n.headers.get("Cache-Control"),expires:n.headers.get("Expires")}}))}(t,r);if(X(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:ut},r)}var n;return function(t,e){return new Promise(((r,n)=>{var i;const s=new XMLHttpRequest;s.open(t.method||"GET",t.url,!0),"arrayBuffer"!==t.type&&"image"!==t.type||(s.responseType="arraybuffer");for(const e in t.headers)s.setRequestHeader(e,t.headers[e]);"json"===t.type&&(s.responseType="text",(null===(i=t.headers)||void 0===i?void 0:i.Accept)||s.setRequestHeader("Accept","application/json")),s.withCredentials="include"===t.credentials,s.onerror=()=>{n(new Error(s.statusText));},s.onload=()=>{if(!e.signal.aborted)if((s.status>=200&&s.status<300||0===s.status)&&null!==s.response){let e=s.response;if("json"===t.type)try{e=JSON.parse(s.response);}catch(t){return void n(t)}r({data:e,cacheControl:s.getResponseHeader("Cache-Control"),expires:s.getResponseHeader("Expires")});}else {const e=new Blob([s.response],{type:s.getResponseHeader("Content-Type")});n(new ct(s.status,s.statusText,t.url,e));}},e.signal.addEventListener("abort",(()=>{s.abort(),n(new st(e.signal.reason));})),s.send(t.body);}))}(t,r)};function ft(t){if(!t||t.indexOf("://")<=0||0===t.indexOf("data:image/")||0===t.indexOf("blob:"))return !0;const e=new URL(t),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function dt(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e));}function yt(t,e,r){if(r&&r[t]){const n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1);}}class mt{constructor(t,e={}){O(this,e),this.type=t;}}class gt extends mt{constructor(t,e={}){super("error",O({error:t},e));}}class xt{on(t,e){return this._listeners=this._listeners||{},dt(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e);}}}off(t,e){return yt(t,e,this._listeners),yt(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},dt(t,e,this._oneTimeListeners),this):new Promise((e=>this.once(t,e)))}fire(t,e){"string"==typeof t&&(t=new mt(t,e||{}));const r=t.type;if(this.listens(r)){t.target=this;const e=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const r of e)r.call(this,t);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const e of n)yt(r,e,this._oneTimeListeners),e.call(this,t);const i=this._eventedParent;i&&(O(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(t));}else t instanceof gt&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var vt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};const bt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function wt(t,e){const r={};for(const e in t)"ref"!==e&&(r[e]=t[e]);return bt.forEach((t=>{t in e&&(r[t]=e[t]);})),r}function _t(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return !1;for(let r=0;r`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const Jt=[Vt,Ct,Lt,Ot,Rt,Nt,jt,$t,Kt(Ut),Gt,Yt,Xt,Zt,Ht];function Qt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Qt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else {if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of Jt)if(!Qt(t,e))return null}return `Expected ${Wt(t)} but found ${Wt(e)} instead.`}function te(t,e){return e.some((e=>e.kind===t.kind))}function ee(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}function re(t,e){return "array"===t.kind&&"array"===e.kind?t.itemType.kind===e.itemType.kind&&"number"==typeof t.N:t.kind===e.kind}const ne=.96422,ie=.82521,se=4/29,ae=6/29,oe=3*ae*ae,le=ae*ae*ae,ue=Math.PI/180,ce=180/Math.PI;function he(t){return (t%=360)<0&&(t+=360),t}function pe([t,e,r,n]){let i,s;const a=de((.2225045*(t=fe(t))+.7168786*(e=fe(e))+.0606169*(r=fe(r)))/1);t===e&&e===r?i=s=a:(i=de((.4360747*t+.3850649*e+.1430804*r)/ne),s=de((.0139322*t+.0971045*e+.7141733*r)/ie));const o=116*a-16;return [o<0?0:o,500*(i-a),200*(a-s),n]}function fe(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){return t>le?Math.pow(t,1/3):t/oe+se}function ye([t,e,r,n]){let i=(t+16)/116,s=isNaN(e)?i:i+e/500,a=isNaN(r)?i:i-r/200;return i=1*ge(i),s=ne*ge(s),a=ie*ge(a),[me(3.1338561*s-1.6168667*i-.4906146*a),me(-.9787684*s+1.9161415*i+.033454*a),me(.0719453*s-.2289914*i+1.4052427*a),n]}function me(t){return (t=t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055)<0?0:t>1?1:t}function ge(t){return t>ae?t*t*t:oe*(t-se)}const xe=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function ve(t,e){return xe(t,e)?t[e]:void 0}function be(t){return parseInt(t.padEnd(2,t),16)/255}function we(t,e){return _e(e?t/100:t,0,1)}function _e(t,e,r){return Math.min(Math.max(e,t),r)}function Se(t){return !t.some(Number.isNaN)}const Ae={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function ke(t,e,r){return t+r*(e-t)}function Ee(t,e,r){return t.map(((t,n)=>ke(t,e[n],r)))}class Te{constructor(t,e,r,n=1,i=!0){this.r=t,this.g=e,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[t,e,r,n]));}static parse(t){if(t instanceof Te)return t;if("string"!=typeof t)return;const e=function(t){if("transparent"===(t=t.toLowerCase().trim()))return [0,0,0,0];const e=ve(Ae,t);if(e){const[t,r,n]=e;return [t/255,r/255,n/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){const e=t.length<6?1:2;let r=1;return [be(t.slice(r,r+=e)),be(t.slice(r,r+=e)),be(t.slice(r,r+=e)),be(t.slice(r,r+e)||"ff")]}if(t.startsWith("rgb")){const e=t.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(e){const[t,r,n,i,s,a,o,l,u,c,h,p]=e,f=[i||" ",o||" ",c].join("");if(" "===f||" /"===f||",,"===f||",,,"===f){const t=[n,a,u].join(""),e="%%%"===t?100:""===t?255:0;if(e){const t=[_e(+r/e,0,1),_e(+s/e,0,1),_e(+l/e,0,1),h?we(+h,p):1];if(Se(t))return t}}return}}const r=t.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){const[t,e,n,i,s,a,o,l,u]=r,c=[n||" ",s||" ",o].join("");if(" "===c||" /"===c||",,"===c||",,,"===c){const t=[+e,_e(+i,0,100),_e(+a,0,100),l?we(+l,u):1];if(Se(t))return function([t,e,r,n]){function i(n){const i=(n+t/30)%12,s=e*Math.min(r,1-r);return r-s*Math.max(-1,Math.min(i-3,9-i,1))}return t=he(t),e/=100,r/=100,[i(0),i(8),i(4),n]}(t)}}}(t);return e?new Te(...e,!1):void 0}get rgb(){const{r:t,g:e,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[t/i,e/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",function(t){const[e,r,n,i]=pe(t),s=Math.sqrt(r*r+n*n);return [Math.round(1e4*s)?he(Math.atan2(n,r)*ce):NaN,s,e,i]}(this.rgb))}get lab(){return this.overwriteGetter("lab",pe(this.rgb))}overwriteGetter(t,e){return Object.defineProperty(this,t,{value:e}),e}toString(){const[t,e,r,n]=this.rgb;return `rgba(${[t,e,r].map((t=>Math.round(255*t))).join(",")},${n})`}static interpolate(t,e,r,n="rgb"){switch(n){case "rgb":{const[n,i,s,a]=Ee(t.rgb,e.rgb,r);return new Te(n,i,s,a,!1)}case "hcl":{const[n,i,s,a]=t.hcl,[o,l,u,c]=e.hcl;let h,p;if(isNaN(n)||isNaN(o))isNaN(n)?isNaN(o)?h=NaN:(h=o,1!==s&&0!==s||(p=l)):(h=n,1!==u&&0!==u||(p=i));else {let t=o-n;o>n&&t>180?t-=360:o180&&(t+=360),h=n+r*t;}const[f,d,y,m]=function([t,e,r,n]){return t=isNaN(t)?0:t*ue,ye([r,Math.cos(t)*e,Math.sin(t)*e,n])}([h,null!=p?p:ke(i,l,r),ke(s,u,r),ke(a,c,r)]);return new Te(f,d,y,m,!1)}case "lab":{const[n,i,s,a]=ye(Ee(t.lab,e.lab,r));return new Te(n,i,s,a,!1)}}}}Te.black=new Te(0,0,0,1),Te.white=new Te(1,1,1,1),Te.transparent=new Te(0,0,0,0),Te.red=new Te(1,0,0,1);class Ie{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"});}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Me=["bottom","center","top"];class Fe{constructor(t,e,r,n,i,s){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i,this.verticalAlign=s;}}class De{constructor(t){this.sections=t;}static fromString(t){return new De([new Fe(t,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof De?t:De.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}}class ze{constructor(t){this.values=t.slice();}static parse(t){if(t instanceof ze)return t;if("number"==typeof t)return new ze([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]];}return new ze(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,r){return new ze(Ee(t.values,e.values,r))}}class Pe{constructor(t){this.values=t.slice();}static parse(t){if(t instanceof Pe)return t;if("number"==typeof t)return new Pe([t]);if(Array.isArray(t)){for(const e of t)if("number"!=typeof e)return;return new Pe(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,r){return new Pe(Ee(t.values,e.values,r))}}class Be{constructor(t){this.values=t.slice();}static parse(t){if(t instanceof Be)return t;if("string"==typeof t){const e=Te.parse(t);if(!e)return;return new Be([e])}if(!Array.isArray(t))return;const e=[];for(const r of t){if("string"!=typeof r)return;const t=Te.parse(r);if(!t)return;e.push(t);}return new Be(e)}toString(){return JSON.stringify(this.values)}static interpolate(t,e,r,n="rgb"){const i=[];if(t.values.length!=e.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${e.values.length}), cannot interpolate.`);for(let s=0;s=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function $e(t){if(null===t||"string"==typeof t||"boolean"==typeof t||"number"==typeof t||t instanceof Re||t instanceof Te||t instanceof Ie||t instanceof De||t instanceof ze||t instanceof Pe||t instanceof Be||t instanceof Le||t instanceof Oe)return !0;if(Array.isArray(t)){for(const e of t)if(!$e(e))return !1;return !0}if("object"==typeof t){for(const e in t)if(!$e(t[e]))return !1;return !0}return !1}function Ue(t){if(null===t)return Vt;if("string"==typeof t)return Lt;if("boolean"==typeof t)return Ot;if("number"==typeof t)return Ct;if(t instanceof Te)return Rt;if(t instanceof Re)return Nt;if(t instanceof Ie)return qt;if(t instanceof De)return jt;if(t instanceof ze)return Gt;if(t instanceof Pe)return Yt;if(t instanceof Be)return Xt;if(t instanceof Le)return Ht;if(t instanceof Oe)return Zt;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=Ue(e);if(r){if(r===t)continue;r=Ut;break}r=t;}return Kt(r||Ut,e)}return $t}function qe(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Te||t instanceof Re||t instanceof De||t instanceof ze||t instanceof Pe||t instanceof Be||t instanceof Le||t instanceof Oe?t.toString():JSON.stringify(t)}class je{constructor(t,e){this.type=t,this.value=e;}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!$e(t[1]))return e.error("invalid value");const r=t[1];let n=Ue(r);const i=e.expectedType;return "array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new je(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return !0}}const Ge={string:Lt,number:Ct,boolean:Ot,object:$t};class Xe{constructor(t,e){this.type=t,this.args=e;}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,n=1;const i=t[0];if("array"===i){let i,s;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in Ge)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=Ge[r],n++;}else i=Ut;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);s=t[2],n++;}r=Kt(i,s);}else {if(!Ge[i])throw new Error(`Types doesn't contain name = ${i}`);r=Ge[i];}const s=[];for(;nt.outputDefined()))}}const Ye={"to-boolean":Ot,"to-color":Rt,"to-number":Ct,"to-string":Lt};class Ze{constructor(t,e){this.type=t,this.args=e;}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[0];if(!Ye[r])throw new Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");const n=Ye[r],i=[];for(let r=1;r4?`Invalid rgba value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:Ne(e[0],e[1],e[2],e[3]),!r))return new Te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Ve(r||`Could not parse color from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case "padding":{let e;for(const r of this.args){e=r.evaluate(t);const n=ze.parse(e);if(n)return n}throw new Ve(`Could not parse padding from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case "numberArray":{let e;for(const r of this.args){e=r.evaluate(t);const n=Pe.parse(e);if(n)return n}throw new Ve(`Could not parse numberArray from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case "colorArray":{let e;for(const r of this.args){e=r.evaluate(t);const n=Be.parse(e);if(n)return n}throw new Ve(`Could not parse colorArray from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case "variableAnchorOffsetCollection":{let e;for(const r of this.args){e=r.evaluate(t);const n=Le.parse(e);if(n)return n}throw new Ve(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}case "number":{let e=null;for(const r of this.args){if(e=r.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new Ve(`Could not convert ${JSON.stringify(e)} to number.`)}case "formatted":return De.fromString(qe(this.args[0].evaluate(t)));case "resolvedImage":return Oe.fromString(qe(this.args[0].evaluate(t)));case "projectionDefinition":return this.args[0].evaluate(t);default:return qe(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t);}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const He=["Unknown","Point","LineString","Polygon"];class Ke{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null;}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?He[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=Te.parse(t),this._parseColorCache.set(t,e)),e}}class We{constructor(t,e,r=[],n,i=new Bt,s=[]){this.registry=t,this.path=r,this.key=r.map((t=>`[${t}]`)).join(""),this.scope=i,this.errors=s,this.expectedType=n,this._isConstant=e;}parse(t,e,r,n,i={}){return e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)}_parse(t,e){function r(t,e,r){return "assert"===r?new Xe(e,[t]):"coerce"===r?new Ze(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=t[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[n];if(i){let n=i.parse(t,this);if(!n)return null;if(this.expectedType){const t=this.expectedType,i=n.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==i.kind){if("projectionDefinition"===t.kind&&["string","array"].includes(i.kind)||["color","formatted","resolvedImage"].includes(t.kind)&&["value","string"].includes(i.kind)||["padding","numberArray"].includes(t.kind)&&["value","number","array"].includes(i.kind)||"colorArray"===t.kind&&["value","string","array"].includes(i.kind)||"variableAnchorOffsetCollection"===t.kind&&["value","array"].includes(i.kind))n=r(n,t,e.typeAnnotation||"coerce");else if(this.checkSubtype(t,i))return null}else n=r(n,t,e.typeAnnotation||"assert");}if(!(n instanceof je)&&"resolvedImage"!==n.type.kind&&this._isConstant(n)){const t=new Ke;try{n=new je(n.type,n.evaluate(t));}catch(t){return this.error(t.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,e,r){const n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new We(this.registry,this._isConstant,n,e||null,i,this.errors)}error(t,...e){const r=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new Pt(r,t));}checkSubtype(t,e){const r=Qt(t,e);return r&&this.error(r),r}}class Je{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e;}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result);}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new Ve(`Array index out of bounds: ${e} > ${r.length-1}.`);if(e!==Math.floor(e))throw new Ve(`Array index must be an integer, but found ${e} instead.`);return r[e]}eachChild(t){t(this.index),t(this.input);}outputDefined(){return !1}}class er{constructor(t,e){this.type=Ot,this.needle=t,this.haystack=e;}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,Ut),n=e.parse(t[2],2,Ut);return r&&n?te(r.type,[Ot,Lt,Ct,Vt,Ut])?new er(r,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(r.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return !1;if(!ee(e,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(Ue(e))} instead.`);if(!ee(r,["string","array"]))throw new Ve(`Expected second argument to be of type array or string, but found ${Wt(Ue(r))} instead.`);return r.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack);}outputDefined(){return !0}}class rr{constructor(t,e,r){this.type=Ct,this.needle=t,this.haystack=e,this.fromIndex=r;}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,Ut),n=e.parse(t[2],2,Ut);if(!r||!n)return null;if(!te(r.type,[Ot,Lt,Ct,Vt,Ut]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,Ct);return i?new rr(r,n,i):null}return new rr(r,n)}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!ee(e,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(Ue(e))} instead.`);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(t)),ee(r,["string"])){const t=r.indexOf(e,n);return -1===t?-1:[...r.slice(0,t)].length}if(ee(r,["array"]))return r.indexOf(e,n);throw new Ve(`Expected second argument to be of type array or string, but found ${Wt(Ue(r))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex);}outputDefined(){return !1}}class nr{constructor(t,e,r,n,i,s){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=s;}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const i={},s=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,Ue(t)))return null}else r=Ue(t);if(void 0!==i[String(t)])return u.error("Branch labels must be unique.");i[String(t)]=s.length;}const c=e.parse(l,a,n);if(!c)return null;n=n||c.type,s.push(c);}const a=e.parse(t[1],1,Ut);if(!a)return null;const o=e.parse(t[t.length-1],t.length-1,n);return o?"value"!==a.type.kind&&e.concat(1).checkSubtype(r,a.type)?null:new nr(r,n,a,i,s,o):null}evaluate(t){const e=this.input.evaluate(t);return (Ue(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise);}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}}class ir{constructor(t,e,r){this.type=t,this.branches=e,this.otherwise=r;}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const n=[];for(let i=1;ie.outputDefined()))&&this.otherwise.outputDefined()}}class sr{constructor(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n;}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,Ut),n=e.parse(t[2],2,Ct);if(!r||!n)return null;if(!te(r.type,[Kt(Ut),Lt,Ut]))return e.error(`Expected first argument to be of type array or string, but found ${Wt(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,Ct);return i?new sr(r.type,r,n,i):null}return new sr(r.type,r,n)}evaluate(t){const e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);let n;if(this.endIndex&&(n=this.endIndex.evaluate(t)),ee(e,["string"]))return [...e].slice(r,n).join("");if(ee(e,["array"]))return e.slice(r,n);throw new Ve(`Expected first argument to be of type array or string, but found ${Wt(Ue(e))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex);}outputDefined(){return !1}}function ar(t,e){const r=t.length-1;let n,i,s=0,a=r,o=0;for(;s<=a;)if(o=Math.floor((s+a)/2),n=t[o],i=t[o+1],n<=e){if(o===r||ee))throw new Ve("Input is not a number.");a=o-1;}return 0}class or{constructor(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e);}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const r=e.parse(t[1],1,Ct);if(!r)return null;const n=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let r=1;r=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',o);const u=e.parse(a,l,i);if(!u)return null;i=i||u.type,n.push([s,u]);}return new or(i,r,n)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[ar(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e);}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ur,cr,hr=function(){if(cr)return ur;function t(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=r,this.p2y=n;}return cr=1,ur=t,t.prototype={sampleCurveX:function(t){return ((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return ((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return (3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)i?a=r:o=r,r=.5*(o-a)+a;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},ur}(),pr=lr(hr);class fr{constructor(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e);}static interpolationFactor(t,e,r,n){let i=0;if("exponential"===t.name)i=dr(e,t.base,r,n);else if("linear"===t.name)i=dr(e,1,r,n);else if("cubic-bezier"===t.name){const s=t.controlPoints;i=new pr(s[0],s[1],s[2],s[3]).solve(dr(e,1,r,n));}return i}static parse(t,e){let[r,n,i,...s]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t};}else {if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t};}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(i=e.parse(i,2,Ct),!i)return null;const a=[];let o=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||e.expectedType==Xt?e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType):o=Rt;for(let t=0;t=r)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const u=e.parse(n,l,o);if(!u)return null;o=o||u.type,a.push([r,u]);}return re(o,Ct)||re(o,Nt)||re(o,Rt)||re(o,Gt)||re(o,Yt)||re(o,Xt)||re(o,Ht)||re(o,Kt(Ct))?new fr(o,r,n,i,a):e.error(`Type ${Wt(o)} is not interpolatable.`)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);const s=ar(e,n),a=fr.interpolationFactor(this.interpolation,n,e[s],e[s+1]),o=r[s].evaluate(t),l=r[s+1].evaluate(t);switch(this.operator){case "interpolate":switch(this.type.kind){case "number":return ke(o,l,a);case "color":return Te.interpolate(o,l,a);case "padding":return ze.interpolate(o,l,a);case "colorArray":return Be.interpolate(o,l,a);case "numberArray":return Pe.interpolate(o,l,a);case "variableAnchorOffsetCollection":return Le.interpolate(o,l,a);case "array":return Ee(o,l,a);case "projectionDefinition":return Re.interpolate(o,l,a)}case "interpolate-hcl":switch(this.type.kind){case "color":return Te.interpolate(o,l,a,"hcl");case "colorArray":return Be.interpolate(o,l,a,"hcl")}case "interpolate-lab":switch(this.type.kind){case "color":return Te.interpolate(o,l,a,"lab");case "colorArray":return Be.interpolate(o,l,a,"lab")}}}eachChild(t){t(this.input);for(const e of this.outputs)t(e);}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function dr(t,e,r,n){const i=n-r,s=t-r;return 0===i?0:1===e?s/i:(Math.pow(e,s)-1)/(Math.pow(e,i)-1)}const yr={color:Te.interpolate,number:ke,padding:ze.interpolate,numberArray:Pe.interpolate,colorArray:Be.interpolate,variableAnchorOffsetCollection:Le.interpolate,array:Ee};class mr{constructor(t,e){this.type=t,this.args=e;}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r=null;const n=e.expectedType;n&&"value"!==n.kind&&(r=n);const i=[];for(const n of t.slice(1)){const t=e.parse(n,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!t)return null;r=r||t.type,i.push(t);}if(!r)throw new Error("No output type");const s=n&&i.some((t=>Qt(n,t.type)));return new mr(s?Ut:r,i)}evaluate(t){let e,r=null,n=0;for(const i of this.args)if(n++,r=i.evaluate(t),r&&r instanceof Oe&&!r.available&&(e||(e=r.name),r=null,n===this.args.length&&(r=e)),null!==r)break;return r}eachChild(t){this.args.forEach(t);}outputDefined(){return this.args.every((t=>t.outputDefined()))}}function gr(t,e){return "=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function xr(t,e,r,n){return 0===n.compare(e,r)}function vr(t,e,r){const n="=="!==t&&"!="!==t;return class i{constructor(t,e,r){this.type=Ot,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind;}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const r=t[0];let s=e.parse(t[1],1,Ut);if(!s)return null;if(!gr(r,s.type))return e.concat(1).error(`"${r}" comparisons are not supported for type '${Wt(s.type)}'.`);let a=e.parse(t[2],2,Ut);if(!a)return null;if(!gr(r,a.type))return e.concat(2).error(`"${r}" comparisons are not supported for type '${Wt(a.type)}'.`);if(s.type.kind!==a.type.kind&&"value"!==s.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${Wt(s.type)}' and '${Wt(a.type)}'.`);n&&("value"===s.type.kind&&"value"!==a.type.kind?s=new Xe(a.type,[s]):"value"!==s.type.kind&&"value"===a.type.kind&&(a=new Xe(s.type,[a])));let o=null;if(4===t.length){if("string"!==s.type.kind&&"string"!==a.type.kind&&"value"!==s.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(o=e.parse(t[3],3,qt),!o)return null}return new i(s,a,o)}evaluate(i){const s=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){const e=Ue(s),r=Ue(a);if(e.kind!==r.kind||"string"!==e.kind&&"number"!==e.kind)throw new Ve(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=Ue(s),r=Ue(a);if("string"!==t.kind||"string"!==r.kind)return e(i,s,a)}return this.collator?r(i,s,a,this.collator.evaluate(i)):e(i,s,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator);}outputDefined(){return !0}}}const br=vr("==",(function(t,e,r){return e===r}),xr),wr=vr("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return !xr(0,e,r,n)})),_r=vr("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Ar=vr("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=vr(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0}));class Er{constructor(t,e,r){this.type=qt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e;}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");const n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Ot);if(!n)return null;const i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Ot);if(!i)return null;let s=null;return r.locale&&(s=e.parse(r.locale,1,Lt),!s)?null:new Er(n,i,s)}evaluate(t){return new Ie(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale);}outputDefined(){return !1}}class Tr{constructor(t,e,r,n,i){this.type=Lt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i;}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,Ct);if(!r)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=e.parse(n.locale,1,Lt),!i))return null;let s=null;if(n.currency&&(s=e.parse(n.currency,1,Lt),!s))return null;let a=null;if(n["min-fraction-digits"]&&(a=e.parse(n["min-fraction-digits"],1,Ct),!a))return null;let o=null;return n["max-fraction-digits"]&&(o=e.parse(n["max-fraction-digits"],1,Ct),!o)?null:new Tr(r,i,s,a,o)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits);}outputDefined(){return !1}}class Ir{constructor(t){this.type=jt,this.sections=t;}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");const n=[];let i=!1;for(let r=1;r<=t.length-1;++r){const s=t[r];if(i&&"object"==typeof s&&!Array.isArray(s)){i=!1;let t=null;if(s["font-scale"]&&(t=e.parse(s["font-scale"],1,Ct),!t))return null;let r=null;if(s["text-font"]&&(r=e.parse(s["text-font"],1,Kt(Lt)),!r))return null;let a=null;if(s["text-color"]&&(a=e.parse(s["text-color"],1,Rt),!a))return null;let o=null;if(s["vertical-align"]){if("string"==typeof s["vertical-align"]&&!Me.includes(s["vertical-align"]))return e.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);if(o=e.parse(s["vertical-align"],1,Lt),!o)return null}const l=n[n.length-1];l.scale=t,l.font=r,l.textColor=a,l.verticalAlign=o;}else {const s=e.parse(t[r],1,Ut);if(!s)return null;const a=s.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:s,scale:null,font:null,textColor:null,verticalAlign:null});}}return new Ir(n)}evaluate(t){return new De(this.sections.map((e=>{const r=e.content.evaluate(t);return Ue(r)===Zt?new Fe("",r,null,null,null,e.verticalAlign?e.verticalAlign.evaluate(t):null):new Fe(qe(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null,e.verticalAlign?e.verticalAlign.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor),e.verticalAlign&&t(e.verticalAlign);}outputDefined(){return !1}}class Mr{constructor(t){this.type=Zt,this.input=t;}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,Lt);return r?new Mr(r):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),r=Oe.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r}eachChild(t){t(this.input);}outputDefined(){return !1}}class Fr{constructor(t){this.type=Ct,this.input=t;}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error(`Expected argument of type string or array, but found ${Wt(r.type)} instead.`):new Fr(r):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return [...e].length;if(Array.isArray(e))return e.length;throw new Ve(`Expected value to be of type string or array, but found ${Wt(Ue(e))} instead.`)}eachChild(t){t(this.input);}outputDefined(){return !1}}const Dr=8192;function zr(t,e){const r=(180+t[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return [Math.round(r*i*Dr),Math.round(n*i*Dr)]}function Pr(t,e){const r=Math.pow(2,e.z);return [(i=(t[0]/Dr+e.x)/r,360*i-180),(n=(t[1]/Dr+e.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90)];var n,i;}function Br(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1]);}function Vr(t,e){return !(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Cr(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],s=t[0]-r[0],a=t[1]-r[1];return n*a-s*i==0&&n*s<=0&&i*a<=0}function Lr(t,e,r,n){return 0!=(i=[n[0]-r[0],n[1]-r[1]])[0]*(s=[e[0]-t[0],e[1]-t[1]])[1]-i[1]*s[0]&&!(!qr(t,e,r,n)||!qr(r,n,t,e));var i,s;}function Or(t,e,r){for(const n of r)for(let r=0;r(i=t)[1]!=(a=o[e+1])[1]>i[1]&&i[0]<(a[0]-s[0])*(i[1]-s[1])/(a[1]-s[1])+s[0]&&(n=!n);}var i,s,a;return n}function Nr(t,e){for(const r of e)if(Rr(t,r))return !0;return !1}function $r(t,e){for(const r of t)if(!Rr(r,e))return !1;for(let r=0;r0&&o<0||a<0&&o>0}function jr(t,e,r){const n=[];for(let i=0;ir[2]){const e=.5*n;let i=t[0]-r[0]>e?-n:r[0]-t[0]>e?n:0;0===i&&(i=t[0]-r[2]>e?-n:r[2]-t[0]>e?n:0),t[0]+=i;}Br(e,t);}function Yr(t,e,r,n){const i=Math.pow(2,n.z)*Dr,s=[n.x*Dr,n.y*Dr],a=[];for(const n of t)for(const t of n){const n=[t.x+s[0],t.y+s[1]];Xr(n,e,r,i),a.push(n);}return a}function Zr(t,e,r,n){const i=Math.pow(2,n.z)*Dr,s=[n.x*Dr,n.y*Dr],a=[];for(const r of t){const t=[];for(const n of r){const r=[n.x+s[0],n.y+s[1]];Br(e,r),t.push(r);}a.push(t);}if(e[2]-e[0]<=i/2){(o=e)[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(const t of a)for(const n of t)Xr(n,e,r,i);}var o;return a}class Hr{constructor(t,e){this.type=Ot,this.geojson=t,this.geometries=e;}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if($e(t[1])){const e=t[1];if("FeatureCollection"===e.type){const t=[];for(const r of e.features){const{type:e,coordinates:n}=r.geometry;"Polygon"===e&&t.push(n),"MultiPolygon"===e&&t.push(...n);}if(t.length)return new Hr(e,{type:"MultiPolygon",coordinates:t})}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new Hr(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new Hr(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){const s=jr(e.coordinates,n,i),a=Yr(t.geometry(),r,n,i);if(!Vr(r,n))return !1;for(const t of a)if(!Rr(t,s))return !1}if("MultiPolygon"===e.type){const s=Gr(e.coordinates,n,i),a=Yr(t.geometry(),r,n,i);if(!Vr(r,n))return !1;for(const t of a)if(!Nr(t,s))return !1}return !0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){const s=jr(e.coordinates,n,i),a=Zr(t.geometry(),r,n,i);if(!Vr(r,n))return !1;for(const t of a)if(!$r(t,s))return !1}if("MultiPolygon"===e.type){const s=Gr(e.coordinates,n,i),a=Zr(t.geometry(),r,n,i);if(!Vr(r,n))return !1;for(const t of a)if(!Ur(t,s))return !1}return !0}(t,this.geometries)}return !1}eachChild(){}outputDefined(){return !0}}let Kr=class{constructor(t=[],e=(t,e)=>te?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t);}push(t){this.data.push(t),this._up(this.length++);}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return --this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,n=e[t];for(;t>0;){const i=t-1>>1,s=e[i];if(r(n,s)>=0)break;e[t]=s,t=i;}e[t]=n;}_down(t){const{data:e,compare:r}=this,n=this.length>>1,i=e[t];for(;t=0)break;e[t]=e[n],t=n;}e[t]=i;}};function Wr(t,e,r=0,n=t.length-1,i=Qr){for(;n>r;){if(n-r>600){const s=n-r+1,a=e-r+1,o=Math.log(s),l=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*l*(s-l)/s)*(a-s/2<0?-1:1);Wr(t,e,Math.max(r,Math.floor(e-a*l/s+u)),Math.min(n,Math.floor(e+(s-a)*l/s+u)),i);}const s=t[e];let a=r,o=n;for(Jr(t,r,e),i(t[n],s)>0&&Jr(t,r,n);a0;)o--;}0===i(t[r],s)?Jr(t,r,o):(o++,Jr(t,o,n)),o<=e&&(r=o+1),e<=o&&(n=o-1);}}function Jr(t,e,r){const n=t[e];t[e]=t[r],t[r]=n;}function Qr(t,e){return te?1:0}function tn(t,e){if(t.length<=1)return [t];const r=[];let n,i;for(const e of t){const t=rn(e);0!==t&&(e.area=Math.abs(t),void 0===i&&(i=t<0),i===t<0?(n&&r.push(n),n=[e]):n.push(e));}if(n&&r.push(n),e>1)for(let t=0;t1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=c/this.kx*p,u+=h/this.ky*p)),c=this.wrap(e[0]-l)*this.kx,h=(e[1]-u)*this.ky;const f=c*c+h*h;f180;)t-=360;return t}}function ln(t,e){return e[0]-t[0]}function un(t){return t[1]-t[0]+1}function cn(t,e){return t[1]>=t[0]&&t[1]t[1])return [null,null];const r=un(t);if(e){if(2===r)return [t,null];const e=Math.floor(r/2);return [[t[0],t[0]+e],[t[0]+e,t[1]]]}if(1===r)return [t,null];const n=Math.floor(r/2)-1;return [[t[0],t[0]+n],[t[0]+n+1,t[1]]]}function pn(t,e){if(!cn(e,t.length))return [1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let n=e[0];n<=e[1];++n)Br(r,t[n]);return r}function fn(t){const e=[1/0,1/0,-1/0,-1/0];for(const r of t)for(const t of r)Br(e,t);return e}function dn(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function yn(t,e,r){if(!dn(t)||!dn(e))return NaN;let n=0,i=0;return t[2]e[2]&&(n=t[0]-e[2]),t[1]>e[3]&&(i=t[1]-e[3]),t[3]=n)return n;if(Vr(i,s)){if(_n(t,e))return 0}else if(_n(e,t))return 0;let a=1/0;for(const n of t)for(let t=0,i=n.length,s=i-1;t0;){const i=a.pop();if(i[0]>=s)continue;const l=i[1],u=e?50:100;if(un(l)<=u){if(!cn(l,t.length))return NaN;if(e){const e=wn(t,l,r,n);if(isNaN(e)||0===e)return e;s=Math.min(s,e);}else for(let e=l[0];e<=l[1];++e){const i=bn(t[e],r,n);if(s=Math.min(s,i),0===s)return 0}}else {const r=hn(l,e);An(a,s,n,t,o,r[0]),An(a,s,n,t,o,r[1]);}}return s}function Tn(t,e,r,n,i,s=1/0){let a=Math.min(s,i.distance(t[0],r[0]));if(0===a)return a;const o=new Kr([[0,[0,t.length-1],[0,r.length-1]]],ln);for(;o.length>0;){const s=o.pop();if(s[0]>=a)continue;const l=s[1],u=s[2],c=e?50:100,h=n?50:100;if(un(l)<=c&&un(u)<=h){if(!cn(l,t.length)&&cn(u,r.length))return NaN;let s;if(e&&n)s=xn(t,l,r,u,i),a=Math.min(a,s);else if(e&&!n){const e=t.slice(l[0],l[1]+1);for(let t=u[0];t<=u[1];++t)if(s=mn(r[t],e,i),a=Math.min(a,s),0===a)return a}else if(!e&&n){const e=r.slice(u[0],u[1]+1);for(let r=l[0];r<=l[1];++r)if(s=mn(t[r],e,i),a=Math.min(a,s),0===a)return a}else s=vn(t,l,r,u,i),a=Math.min(a,s);}else {const s=hn(l,e),c=hn(u,n);kn(o,a,i,t,r,s[0],c[0]),kn(o,a,i,t,r,s[0],c[1]),kn(o,a,i,t,r,s[1],c[0]),kn(o,a,i,t,r,s[1],c[1]);}}return a}function In(t){return "MultiPolygon"===t.type?t.coordinates.map((t=>({type:"Polygon",coordinates:t}))):"MultiLineString"===t.type?t.coordinates.map((t=>({type:"LineString",coordinates:t}))):"MultiPoint"===t.type?t.coordinates.map((t=>({type:"Point",coordinates:t}))):[t]}class Mn{constructor(t,e){this.type=Ct,this.geojson=t,this.geometries=e;}static parse(t,e){if(2!==t.length)return e.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if($e(t[1])){const e=t[1];if("FeatureCollection"===e.type)return new Mn(e,e.features.map((t=>In(t.geometry))).flat());if("Feature"===e.type)return new Mn(e,In(e.geometry));if("type"in e&&"coordinates"in e)return new Mn(e,In(e))}return e.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const r=t.geometry(),n=r.flat().map((e=>Pr([e.x,e.y],t.canonical)));if(0===r.length)return NaN;const i=new on(n[0][1]);let s=1/0;for(const t of e){switch(t.type){case "Point":s=Math.min(s,Tn(n,!1,[t.coordinates],!1,i,s));break;case "LineString":s=Math.min(s,Tn(n,!1,t.coordinates,!0,i,s));break;case "Polygon":s=Math.min(s,En(n,!1,t.coordinates,i,s));}if(0===s)return s}return s}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const r=t.geometry(),n=r.flat().map((e=>Pr([e.x,e.y],t.canonical)));if(0===r.length)return NaN;const i=new on(n[0][1]);let s=1/0;for(const t of e){switch(t.type){case "Point":s=Math.min(s,Tn(n,!0,[t.coordinates],!1,i,s));break;case "LineString":s=Math.min(s,Tn(n,!0,t.coordinates,!0,i,s));break;case "Polygon":s=Math.min(s,En(n,!0,t.coordinates,i,s));}if(0===s)return s}return s}(t,this.geometries);if("Polygon"===t.geometryType())return function(t,e){const r=t.geometry();if(0===r.length||0===r[0].length)return NaN;const n=tn(r,0).map((e=>e.map((e=>e.map((e=>Pr([e.x,e.y],t.canonical))))))),i=new on(n[0][0][0][1]);let s=1/0;for(const t of e)for(const e of n){switch(t.type){case "Point":s=Math.min(s,En([t.coordinates],!1,e,i,s));break;case "LineString":s=Math.min(s,En(t.coordinates,!0,e,i,s));break;case "Polygon":s=Math.min(s,Sn(e,t.coordinates,i,s));}if(0===s)return s}return s}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return !0}}class Fn{constructor(t){this.type=Ut,this.key=t;}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=t[1];return null==r?e.error("Global state property must be defined."):"string"!=typeof r?e.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Fn(r)}evaluate(t){var e;const r=null===(e=t.globals)||void 0===e?void 0:e.globalState;return r&&0!==Object.keys(r).length?ve(r,this.key):null}eachChild(){}outputDefined(){return !1}}const Dn={"==":br,"!=":wr,">":Sr,"<":_r,">=":kr,"<=":Ar,array:Xe,at:tr,boolean:Xe,case:ir,coalesce:mr,collator:Er,format:Ir,image:Mr,in:er,"index-of":rr,interpolate:fr,"interpolate-hcl":fr,"interpolate-lab":fr,length:Fr,let:Je,literal:je,match:nr,number:Xe,"number-format":Tr,object:Xe,slice:sr,step:or,string:Xe,"to-boolean":Ze,"to-color":Ze,"to-number":Ze,"to-string":Ze,var:Qe,within:Hr,distance:Mn,"global-state":Fn};class zn{constructor(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n;}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t);}outputDefined(){return !1}static parse(t,e){const r=t[0],n=zn.definitions[r];if(!n)return e.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=s.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let o=null;for(const[n,s]of a){o=new We(e.registry,Ln,e.path,null,e.scope);const a=[];let l=!1;for(let e=1;e{return e=t,Array.isArray(e)?`(${e.map(Wt).join(", ")})`:`(${Wt(e.type)}...)`;var e;})).join(" | "),n=[];for(let r=1;r{r=e?r&&Ln(t):r&&t instanceof je;})),!!r&&On(t)&&Nn(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function On(t){if(t instanceof zn){if("get"===t.name&&1===t.args.length)return !1;if("feature-state"===t.name)return !1;if("has"===t.name&&1===t.args.length)return !1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return !1;if(/^filter-/.test(t.name))return !1}if(t instanceof Hr)return !1;if(t instanceof Mn)return !1;let e=!0;return t.eachChild((t=>{e&&!On(t)&&(e=!1);})),e}function Rn(t){if(t instanceof zn&&"feature-state"===t.name)return !1;let e=!0;return t.eachChild((t=>{e&&!Rn(t)&&(e=!1);})),e}function Nn(t,e){if(t instanceof zn&&e.indexOf(t.name)>=0)return !1;let r=!0;return t.eachChild((t=>{r&&!Nn(t,e)&&(r=!1);})),r}function $n(t){return {result:"success",value:t}}function Un(t){return {result:"error",value:t}}function qn(t){return "data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function jn(t){return !!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Gn(t){return !!t.expression&&t.expression.interpolated}function Xn(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Yn(t){return "object"==typeof t&&null!==t&&!Array.isArray(t)&&Ue(t)===$t}function Zn(t){return t}function Hn(t,e){const r=t.stops&&"object"==typeof t.stops[0][0],n=r||!(r||void 0!==t.property),i=t.type||(Gn(e)?"exponential":"interval"),s=function(t){switch(t.type){case "color":return Te.parse;case "padding":return ze.parse;case "numberArray":return Pe.parse;case "colorArray":return Be.parse;default:return null}}(e);if(s&&((t=zt({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],s(t[1])]))),t.default=s(t.default?t.default:e.default)),t.colorSpace&&"rgb"!==(a=t.colorSpace)&&"hcl"!==a&&"lab"!==a)throw new Error(`Unknown color space: "${t.colorSpace}"`);var a;const o=function(t){switch(t){case "exponential":return Qn;case "interval":return Jn;case "categorical":return Wn;case "identity":return ti;default:throw new Error(`Unknown function type "${t}"`)}}(i);let l,u;if("categorical"===i){l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];u=typeof t.stops[0][0];}if(r){const r={},n=[];for(let e=0;et[0])),evaluate:({zoom:r},n)=>Qn({stops:i,base:t.base},e,r).evaluate(r,n)}}if(n){const r="exponential"===i?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return {kind:"camera",interpolationType:r,interpolationFactor:fr.interpolationFactor.bind(void 0,r),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:r})=>o(t,e,r,l,u)}}return {kind:"source",evaluate(r,n){const i=n&&n.properties?n.properties[t.property]:void 0;return void 0===i?Kn(t.default,e.default):o(t,e,i,l,u)}}}function Kn(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Wn(t,e,r,n,i){return Kn(typeof r===i?n[r]:void 0,t.default,e.default)}function Jn(t,e,r){if("number"!==Xn(r))return Kn(t.default,e.default);const n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];const i=ar(t.stops.map((t=>t[0])),r);return t.stops[i][1]}function Qn(t,e,r){const n=void 0!==t.base?t.base:1;if("number"!==Xn(r))return Kn(t.default,e.default);const i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];const s=ar(t.stops.map((t=>t[0])),r),a=function(t,e,r,n){const i=n-r,s=t-r;return 0===i?0:1===e?s/i:(Math.pow(e,s)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[s][0],t.stops[s+1][0]),o=t.stops[s][1],l=t.stops[s+1][1],u=yr[e.type]||Zn;return "function"==typeof o.evaluate?{evaluate(...e){const r=o.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return u(r,n,a,t.colorSpace)}}:u(o,l,a,t.colorSpace)}function ti(t,e,r){switch(e.type){case "color":r=Te.parse(r);break;case "formatted":r=De.fromString(r.toString());break;case "resolvedImage":r=Oe.fromString(r.toString());break;case "padding":r=ze.parse(r);break;case "colorArray":r=Be.parse(r);break;case "numberArray":r=Pe.parse(r);break;default:Xn(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0);}return Kn(r,t.default,e.default)}zn.register(Dn,{error:[{kind:"error"},[Lt],(t,[e])=>{throw new Ve(e.evaluate(t))}],typeof:[Lt,[Ut],(t,[e])=>Wt(Ue(e.evaluate(t)))],"to-rgba":[Kt(Ct,4),[Rt],(t,[e])=>{const[r,n,i,s]=e.evaluate(t).rgb;return [255*r,255*n,255*i,s]}],rgb:[Rt,[Ct,Ct,Ct],Pn],rgba:[Rt,[Ct,Ct,Ct,Ct],Pn],has:{type:Ot,overloads:[[[Lt],(t,[e])=>Bn(e.evaluate(t),t.properties())],[[Lt,$t],(t,[e,r])=>Bn(e.evaluate(t),r.evaluate(t))]]},get:{type:Ut,overloads:[[[Lt],(t,[e])=>Vn(e.evaluate(t),t.properties())],[[Lt,$t],(t,[e,r])=>Vn(e.evaluate(t),r.evaluate(t))]]},"feature-state":[Ut,[Lt],(t,[e])=>Vn(e.evaluate(t),t.featureState||{})],properties:[$t,[],t=>t.properties()],"geometry-type":[Lt,[],t=>t.geometryType()],id:[Ut,[],t=>t.id()],zoom:[Ct,[],t=>t.globals.zoom],"heatmap-density":[Ct,[],t=>t.globals.heatmapDensity||0],elevation:[Ct,[],t=>t.globals.elevation||0],"line-progress":[Ct,[],t=>t.globals.lineProgress||0],accumulated:[Ut,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[Ct,Cn(Ct),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[Ct,Cn(Ct),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:Ct,overloads:[[[Ct,Ct],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[Ct],(t,[e])=>-e.evaluate(t)]]},"/":[Ct,[Ct,Ct],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[Ct,[Ct,Ct],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[Ct,[],()=>Math.LN2],pi:[Ct,[],()=>Math.PI],e:[Ct,[],()=>Math.E],"^":[Ct,[Ct,Ct],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[Ct,[Ct],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Ct,[Ct],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Ct,[Ct],(t,[e])=>Math.log(e.evaluate(t))],log2:[Ct,[Ct],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Ct,[Ct],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Ct,[Ct],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Ct,[Ct],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Ct,[Ct],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Ct,[Ct],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Ct,[Ct],(t,[e])=>Math.atan(e.evaluate(t))],min:[Ct,Cn(Ct),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[Ct,Cn(Ct),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[Ct,[Ct],(t,[e])=>Math.abs(e.evaluate(t))],round:[Ct,[Ct],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ct,[Ct],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Ct,[Ct],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Ot,[Lt,Ut],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[Ot,[Ut],(t,[e])=>t.id()===e.value],"filter-type-==":[Ot,[Lt],(t,[e])=>t.geometryType()===e.value],"filter-<":[Ot,[Lt,Ut],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n{const r=t.id(),n=e.value;return typeof r==typeof n&&r":[Ot,[Lt,Ut],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[Ot,[Ut],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[Ot,[Lt,Ut],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[Ot,[Ut],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[Ot,[Lt,Ut],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[Ot,[Ut],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[Ot,[Ut],(t,[e])=>e.value in t.properties()],"filter-has-id":[Ot,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[Ot,[Kt(Lt)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Ot,[Kt(Ut)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Ot,[Lt,Kt(Ut)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Ot,[Lt,Kt(Ut)],(t,[e,r])=>function(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return !0;e[i]>t?n=i-1:r=i+1;}return !1}(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Ot,overloads:[[[Ot,Ot],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[Cn(Ot),(t,e)=>{for(const r of e)if(!r.evaluate(t))return !1;return !0}]]},any:{type:Ot,overloads:[[[Ot,Ot],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[Cn(Ot),(t,e)=>{for(const r of e)if(r.evaluate(t))return !0;return !1}]]},"!":[Ot,[Ot],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Ot,[Lt],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return !r||r(e.evaluate(t))}],upcase:[Lt,[Lt],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Lt,[Lt],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Lt,Cn(Ut),(t,e)=>e.map((e=>qe(e.evaluate(t)))).join("")],"resolved-locale":[Lt,[qt],(t,[e])=>e.evaluate(t).resolvedLocale()]});class ei{constructor(t,e,r){this.expression=t,this._warningHistory={},this._evaluator=new Ke,this._defaultValue=e?function(t){if("color"===t.type&&Yn(t.default))return new Te(0,0,0,0);switch(t.type){case "color":return Te.parse(t.default)||null;case "padding":return ze.parse(t.default)||null;case "numberArray":return Pe.parse(t.default)||null;case "colorArray":return Be.parse(t.default)||null;case "variableAnchorOffsetCollection":return Le.parse(t.default)||null;case "projectionDefinition":return Re.parse(t.default)||null;default:return void 0===t.default?null:t.default}}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null,this._globalState=r;}evaluateWithoutErrorHandling(t,e,r,n,i,s){return this._globalState&&(t=ci(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=s,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,n,i,s){this._globalState&&(t=ci(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=s||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Ve(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function ri(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Dn}function ni(t,e,r){const n=new We(Dn,Ln,[],e?function(t){const e={color:Rt,string:Lt,number:Ct,enum:Lt,boolean:Ot,formatted:jt,padding:Gt,numberArray:Yt,colorArray:Xt,projectionDefinition:Nt,resolvedImage:Zt,variableAnchorOffsetCollection:Ht};return "array"===t.type?Kt(e[t.value]||Ut,t.length):e[t.type]}(e):void 0),i=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?$n(new ei(i,e,r)):Un(n.errors)}class ii{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Rn(e.expression),this.globalStateRefs=ui(e.expression),this._globalState=r;}evaluateWithoutErrorHandling(t,e,r,n,i,s){return this._globalState&&(t=ci(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,s)}evaluate(t,e,r,n,i,s){return this._globalState&&(t=ci(t,this._globalState)),this._styleExpression.evaluate(t,e,r,n,i,s)}}class si{constructor(t,e,r,n,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Rn(e.expression),this.globalStateRefs=ui(e.expression),this.interpolationType=n,this._globalState=i;}evaluateWithoutErrorHandling(t,e,r,n,i,s){return this._globalState&&(t=ci(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,s)}evaluate(t,e,r,n,i,s){return this._globalState&&(t=ci(t,this._globalState)),this._styleExpression.evaluate(t,e,r,n,i,s)}interpolationFactor(t,e,r){return this.interpolationType?fr.interpolationFactor(this.interpolationType,t,e,r):0}}function ai(t,e,r){const n=ni(t,e,r);if("error"===n.result)return n;const i=n.value.expression,s=On(i);if(!s&&!qn(e))return Un([new Pt("","data expressions not supported")]);const a=Nn(i,["zoom"]);if(!a&&!jn(e))return Un([new Pt("","zoom expressions not supported")]);const o=li(i);return o||a?o instanceof Pt?Un([o]):o instanceof fr&&!Gn(e)?Un([new Pt("",'"interpolate" expressions cannot be used with this property')]):$n(o?new si(s?"camera":"composite",n.value,o.labels,o instanceof fr?o.interpolation:void 0,r):new ii(s?"constant":"source",n.value,r)):Un([new Pt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class oi{constructor(t,e){this._parameters=t,this._specification=e,zt(this,Hn(this._parameters,this._specification));}static deserialize(t){return new oi(t._parameters,t._specification)}static serialize(t){return {_parameters:t._parameters,_specification:t._specification}}}function li(t){let e=null;if(t instanceof Je)e=li(t.result);else if(t instanceof mr){for(const r of t.args)if(e=li(r),e)break}else (t instanceof or||t instanceof fr)&&t.input instanceof zn&&"zoom"===t.input.name&&(e=t);return e instanceof Pt||t.eachChild((t=>{const r=li(t);r instanceof Pt?e=r:!e&&r?e=new Pt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Pt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));})),e}function ui(t,e=new Set){return t instanceof Fn&&e.add(t.key),t.eachChild((t=>{ui(t,e);})),e}function ci(t,e){const{zoom:r,heatmapDensity:n,elevation:i,lineProgress:s,isSupportedScript:a,accumulated:o}=null!=t?t:{};return {zoom:r,heatmapDensity:n,elevation:i,lineProgress:s,isSupportedScript:a,accumulated:o,globalState:e}}function hi(t){if(!0===t||!1===t)return !0;if(!Array.isArray(t)||0===t.length)return !1;switch(t[0]){case "has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case "in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case "!in":case "!has":case "none":return !1;case "==":case "!=":case ">":case ">=":case "<":case "<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case "any":case "all":for(const e of t.slice(1))if(!hi(e)&&"boolean"!=typeof e)return !1;return !0;default:return !0}}const pi={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function fi(t,e){if(null==t)return {filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};hi(t)||(t=mi(t));const r=ni(t,pi,e);if("error"===r.result)throw new Error(r.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return {filter:(t,e,n)=>r.value.evaluate(t,e,{},n),needGeometry:yi(t),getGlobalStateRefs:()=>ui(r.value.expression)}}function di(t,e){return te?1:0}function yi(t){if(!Array.isArray(t))return !1;if("within"===t[0]||"distance"===t[0])return !0;for(let e=1;e"===e||"<="===e||">="===e?gi(t[1],t[2],e):"any"===e?(r=t.slice(1),["any"].concat(r.map(mi))):"all"===e?["all"].concat(t.slice(1).map(mi)):"none"===e?["all"].concat(t.slice(1).map(mi).map(bi)):"in"===e?xi(t[1],t.slice(2)):"!in"===e?bi(xi(t[1],t.slice(2))):"has"===e?vi(t[1]):"!has"!==e||bi(vi(t[1]));var r;}function gi(t,e,r){switch(t){case "$type":return [`filter-type-${r}`,e];case "$id":return [`filter-id-${r}`,e];default:return [`filter-${r}`,t,e]}}function xi(t,e){if(0===e.length)return !1;switch(t){case "$type":return ["filter-type-in",["literal",e]];case "$id":return ["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(di)]]:["filter-in-small",t,["literal",e]]}}function vi(t){switch(t){case "$type":return !0;case "$id":return ["filter-has-id"];default:return ["filter-has",t]}}function bi(t){return ["!",t]}function wi(t){const e=typeof t;if("number"===e||"boolean"===e||"string"===e||null==t)return JSON.stringify(t);if(Array.isArray(t)){let e="[";for(const r of t)e+=`${wi(r)},`;return `${e}]`}const r=Object.keys(t).sort();let n="{";for(let e=0;en.maximum?[new Dt(e,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]}function Mi(t){const e=t.valueSpec,r=Ai(t.value.type);let n,i,s,a={};const o="categorical"!==r&&void 0===t.value.property,l=!o,u="array"===Xn(t.value.stops)&&"array"===Xn(t.value.stops[0])&&"object"===Xn(t.value.stops[0][0]),c=Ei({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===r)return [new Dt(t.key,t.value,'identity function may not have a "stops" property')];let e=[];const n=t.value;return e=e.concat(Ti({key:t.key,value:n,valueSpec:t.valueSpec,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===Xn(n)&&0===n.length&&e.push(new Dt(t.key,n,"array must have at least one stop")),e},default:function(t){return t.validateSpec({key:t.key,value:t.value,valueSpec:e,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec})}}});return "identity"===r&&o&&c.push(new Dt(t.key,t.value,'missing required property "property"')),"identity"===r||t.value.stops||c.push(new Dt(t.key,t.value,'missing required property "stops"')),"exponential"===r&&t.valueSpec.expression&&!Gn(t.valueSpec)&&c.push(new Dt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!qn(t.valueSpec)?c.push(new Dt(t.key,t.value,"property functions not supported")):o&&!jn(t.valueSpec)&&c.push(new Dt(t.key,t.value,"zoom functions not supported"))),"categorical"!==r&&!u||void 0!==t.value.property||c.push(new Dt(t.key,t.value,'"property" property is required')),c;function h(t){let r=[];const n=t.value,o=t.key;if("array"!==Xn(n))return [new Dt(o,n,`array expected, ${Xn(n)} found`)];if(2!==n.length)return [new Dt(o,n,`array length 2 expected, length ${n.length} found`)];if(u){if("object"!==Xn(n[0]))return [new Dt(o,n,`object expected, ${Xn(n[0])} found`)];if(void 0===n[0].zoom)return [new Dt(o,n,"object stop key must have zoom")];if(void 0===n[0].value)return [new Dt(o,n,"object stop key must have value")];if(s&&s>Ai(n[0].zoom))return [new Dt(o,n[0].zoom,"stop zoom values must appear in ascending order")];Ai(n[0].zoom)!==s&&(s=Ai(n[0].zoom),i=void 0,a={}),r=r.concat(Ei({key:`${o}[0]`,value:n[0],valueSpec:{zoom:{}},validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Ii,value:p}}));}else r=r.concat(p({key:`${o}[0]`,value:n[0],validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec},n));return ri(ki(n[1]))?r.concat([new Dt(`${o}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(t.validateSpec({key:`${o}[1]`,value:n[1],valueSpec:e,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec}))}function p(t,s){const o=Xn(t.value),l=Ai(t.value),u=null!==t.value?t.value:s;if(n){if(o!==n)return [new Dt(t.key,u,`${o} stop domain type must match previous stop domain type ${n}`)]}else n=o;if("number"!==o&&"string"!==o&&"boolean"!==o)return [new Dt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==o&&"categorical"!==r){let n=`number expected, ${o} found`;return qn(e)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dt(t.key,u,n)]}return "categorical"!==r||"number"!==o||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===o&&void 0!==i&&lnew Dt(`${t.key}${e.key}`,t.value,e.message)));const r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return [new Dt(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Rn(r))return [new Dt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Rn(r))return [new Dt(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Nn(r,["zoom","feature-state"]))return [new Dt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!On(r))return [new Dt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return []}function Di(t){const e=t.key,r=t.value,n=Xn(r);return "string"!==n?[new Dt(e,r,`color expected, ${n} found`)]:Te.parse(String(r))?[]:[new Dt(e,r,`color expected, "${r}" found`)]}function zi(t){const e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Ai(r))&&i.push(new Dt(e,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Ai(r))&&i.push(new Dt(e,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function Pi(t){return hi(ki(t.value))?Fi(zt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Bi(t)}function Bi(t){const e=t.value,r=t.key;if("array"!==Xn(e))return [new Dt(r,e,`array expected, ${Xn(e)} found`)];const n=t.styleSpec;let i,s=[];if(e.length<1)return [new Dt(r,e,"filter array must have at least 1 element")];switch(s=s.concat(zi({key:`${r}[0]`,value:e[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ai(e[0])){case "<":case "<=":case ">":case ">=":e.length>=2&&"$type"===Ai(e[1])&&s.push(new Dt(r,e,`"$type" cannot be use with operator "${e[0]}"`));case "==":case "!=":3!==e.length&&s.push(new Dt(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case "in":case "!in":e.length>=2&&(i=Xn(e[1]),"string"!==i&&s.push(new Dt(`${r}[1]`,e[1],`string expected, ${i} found`)));for(let a=2;a{t in r&&e.push(new Dt(n,r[t],`"${t}" is prohibited for ref layers`));})),i.layers.forEach((e=>{Ai(e.id)===o&&(t=e);})),t?t.ref?e.push(new Dt(n,r.ref,"ref cannot reference another ref layer")):a=Ai(t.type):e.push(new Dt(n,r.ref,`ref layer "${o}" not found`));}else if("background"!==a)if(r.source){const t=i.sources&&i.sources[r.source],s=t&&Ai(t.type);t?"vector"===s&&"raster"===a?e.push(new Dt(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==s&&"hillshade"===a||"raster-dem"!==s&&"color-relief"===a?e.push(new Dt(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===s&&"raster"!==a?e.push(new Dt(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==s||r["source-layer"]?"raster-dem"===s&&"hillshade"!==a&&"color-relief"!==a?e.push(new Dt(n,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"!==a||!r.paint||!r.paint["line-gradient"]||"geojson"===s&&t.lineMetrics||e.push(new Dt(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Dt(n,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new Dt(n,r.source,`source "${r.source}" not found`));}else e.push(new Dt(n,r,'missing required property "source"'));return e=e.concat(Ei({key:n,value:r,valueSpec:s.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":()=>[],type:()=>t.validateSpec({key:`${n}.type`,value:r.type,valueSpec:s.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"}),filter:Pi,layout:t=>Ei({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>Li(zt({layerType:a},t))}}),paint:t=>Ei({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>Ci(zt({layerType:a},t))}})}})),e}function Ri(t){const e=t.value,r=t.key,n=Xn(e);return "string"!==n?[new Dt(r,e,`string expected, ${n} found`)]:[]}const Ni={promoteId:function({key:t,value:e}){if("string"===Xn(e))return Ri({key:t,value:e});{const r=[];for(const n in e)r.push(...Ri({key:`${t}.${n}`,value:e[n]}));return r}}};function $i(t){const e=t.value,r=t.key,n=t.styleSpec,i=t.style,s=t.validateSpec;if(!e.type)return [new Dt(r,e,'"type" is required')];const a=Ai(e.type);let o;switch(a){case "vector":case "raster":return o=Ei({key:r,value:e,valueSpec:n[`source_${a.replace("-","_")}`],style:t.style,styleSpec:n,objectElementValidators:Ni,validateSpec:s}),o;case "raster-dem":return o=function(t){var e;const r=null!==(e=t.sourceName)&&void 0!==e?e:"",n=t.value,i=t.styleSpec,s=i.source_raster_dem,a=t.style;let o=[];const l=Xn(n);if(void 0===n)return o;if("object"!==l)return o.push(new Dt("source_raster_dem",n,`object expected, ${l} found`)),o;const u="custom"===Ai(n.encoding),c=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(const e in n)!u&&c.includes(e)?o.push(new Dt(e,n[e],`In "${r}": "${e}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):s[e]?o=o.concat(t.validateSpec({key:e,value:n[e],valueSpec:s[e],validateSpec:t.validateSpec,style:a,styleSpec:i})):o.push(new Dt(e,n[e],`unknown property "${e}"`));return o}({sourceName:r,value:e,style:t.style,styleSpec:n,validateSpec:s}),o;case "geojson":if(o=Ei({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:s,objectElementValidators:Ni}),e.cluster)for(const t in e.clusterProperties){const[n,i]=e.clusterProperties[t],s="string"==typeof n?[n,["accumulated"],["get",t]]:n;o.push(...Fi({key:`${r}.${t}.map`,value:i,expressionContext:"cluster-map"})),o.push(...Fi({key:`${r}.${t}.reduce`,value:s,expressionContext:"cluster-reduce"}));}return o;case "video":return Ei({key:r,value:e,valueSpec:n.source_video,style:i,validateSpec:s,styleSpec:n});case "image":return Ei({key:r,value:e,valueSpec:n.source_image,style:i,validateSpec:s,styleSpec:n});case "canvas":return [new Dt(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return zi({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Ui(t){const e=t.value,r=t.styleSpec,n=r.light,i=t.style;let s=[];const a=Xn(e);if(void 0===e)return s;if("object"!==a)return s=s.concat([new Dt("light",e,`object expected, ${a} found`)]),s;for(const a in e){const o=a.match(/^(.*)-transition$/);s=s.concat(o&&n[o[1]]&&n[o[1]].transition?t.validateSpec({key:a,value:e[a],valueSpec:r.transition,validateSpec:t.validateSpec,style:i,styleSpec:r}):n[a]?t.validateSpec({key:a,value:e[a],valueSpec:n[a],validateSpec:t.validateSpec,style:i,styleSpec:r}):[new Dt(a,e[a],`unknown property "${a}"`)]);}return s}function qi(t){const e=t.value,r=t.styleSpec,n=r.sky,i=t.style,s=Xn(e);if(void 0===e)return [];if("object"!==s)return [new Dt("sky",e,`object expected, ${s} found`)];let a=[];for(const s in e)a=a.concat(n[s]?t.validateSpec({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r}):[new Dt(s,e[s],`unknown property "${s}"`)]);return a}function ji(t){const e=t.value,r=t.styleSpec,n=r.terrain,i=t.style;let s=[];const a=Xn(e);if(void 0===e)return s;if("object"!==a)return s=s.concat([new Dt("terrain",e,`object expected, ${a} found`)]),s;for(const a in e)s=s.concat(n[a]?t.validateSpec({key:a,value:e[a],valueSpec:n[a],validateSpec:t.validateSpec,style:i,styleSpec:r}):[new Dt(a,e[a],`unknown property "${a}"`)]);return s}function Gi(t){let e=[];const r=t.value,n=t.key;if(Array.isArray(r)){const i=[],s=[];for(const a in r)r[a].id&&i.includes(r[a].id)&&e.push(new Dt(n,r,`all the sprites' ids must be unique, but ${r[a].id} is duplicated`)),i.push(r[a].id),r[a].url&&s.includes(r[a].url)&&e.push(new Dt(n,r,`all the sprites' URLs must be unique, but ${r[a].url} is duplicated`)),s.push(r[a].url),e=e.concat(Ei({key:`${n}[${a}]`,value:r[a],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:t.validateSpec}));return e}return Ri({key:n,value:r})}function Xi(t){return Boolean(t)&&t.constructor===Object}function Yi(t){return Xi(t.value)?[]:[new Dt(t.key,t.value,`object expected, ${Xn(t.value)} found`)]}const Zi={"*":()=>[],array:Ti,boolean:function(t){const e=t.value,r=t.key,n=Xn(e);return "boolean"!==n?[new Dt(r,e,`boolean expected, ${n} found`)]:[]},number:Ii,color:Di,constants:Si,enum:zi,filter:Pi,function:Mi,layer:Oi,object:Ei,source:$i,light:Ui,sky:qi,terrain:ji,projection:function(t){const e=t.value,r=t.styleSpec,n=r.projection,i=t.style,s=Xn(e);if(void 0===e)return [];if("object"!==s)return [new Dt("projection",e,`object expected, ${s} found`)];let a=[];for(const s in e)a=a.concat(n[s]?t.validateSpec({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r}):[new Dt(s,e[s],`unknown property "${s}"`)]);return a},projectionDefinition:function(t){const e=t.key;let r=t.value;r=r instanceof String?r.valueOf():r;const n=Xn(r);return "array"!==n||function(t){return Array.isArray(t)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]}(r)||function(t){return !!["interpolate","step","literal"].includes(t[0])}(r)?["array","string"].includes(n)?[]:[new Dt(e,r,`projection expected, invalid type "${n}" found`)]:[new Dt(e,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:Ri,formatted:function(t){return 0===Ri(t).length?[]:Fi(t)},resolvedImage:function(t){return 0===Ri(t).length?[]:Fi(t)},padding:function(t){const e=t.key,r=t.value;if("array"===Xn(r)){if(r.length<1||r.length>4)return [new Dt(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];const n={type:"number"};let i=[];for(let s=0;s[]}})),t.constants&&(r=r.concat(Si({key:"constants",value:t.constants}))),Qi(r)}function Ji(t){return function(e){return t(Object.assign({},e,{validateSpec:Hi}))}}function Qi(t){return [].concat(t).sort(((t,e)=>t.line-e.line))}function ts(t){return function(...e){return Qi(t.apply(this,e))}}Wi.source=ts(Ji($i)),Wi.sprite=ts(Ji(Gi)),Wi.glyphs=ts(Ji(Ki)),Wi.light=ts(Ji(Ui)),Wi.sky=ts(Ji(qi)),Wi.terrain=ts(Ji(ji)),Wi.state=ts(Ji(Yi)),Wi.layer=ts(Ji(Oi)),Wi.filter=ts(Ji(Pi)),Wi.paintProperty=ts(Ji(Ci)),Wi.layoutProperty=ts(Ji(Li));const es={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class rs{constructor(t,e){this._globalState=e,this.setValue(t);}evaluate(){var t;return null!==(t=this._literalValue)&&void 0!==t?t:this._compiledValue.evaluate({})}setValue(t){if(null==t||"visible"===t||"none"===t)return this._literalValue="none"===t?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);const e=ni(t,es,this._globalState);if("error"===e.result)throw this._literalValue="visible",this._compiledValue=void 0,new Error(e.value.map((t=>`${t.key}: ${t.message}`)).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=ui(e.value.expression);}getGlobalStateRefs(){return this._globalStateRefs}}const ns=vt,is=Wi,ss=is.light,as=is.sky,os=is.paintProperty,ls=is.layoutProperty;function us(t,e){let r=!1;if(e&&e.length)for(const n of e)t.fire(new gt(new Error(n.message))),r=!0;return r}class cs{constructor(t,e,r){const n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const i=new Int32Array(this.arrayBuffer);t=i[0],this.d=(e=i[1])+2*(r=i[2]);for(let t=0;t=u[l+0]&&n>=u[l+1])?(a[h]=!0,s.push(i[h])):a[h]=!1;}}}}_forEachCell(t,e,r,n,i,s,a,o){const l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),h=this._convertToCellCoord(n);for(let p=l;p<=c;p++)for(let l=u;l<=h;l++){const u=this.d*l+p;if((!o||o(this._convertFromCellCoord(p),this._convertFromCellCoord(l),this._convertFromCellCoord(p+1),this._convertFromCellCoord(l+1)))&&i.call(this,t,e,r,n,u,s,a,o))return}}_convertFromCellCoord(t){return (t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,e=3+this.cells.length+1+1;let r=0;for(let t=0;t=0)continue;const s=t[n];i[n]=hs[r].shallow.indexOf(n)>=0?s:ms(s,e);}t instanceof Error&&(i.message=t.message);}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return "Object"!==r&&(i.$name=r),i}function gs(t){if(ys(t))return t;if(Array.isArray(t))return t.map(gs);if("object"!=typeof t)throw new Error("can't deserialize object of type "+typeof t);const e=ds(t)||"Object";if(!hs[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:r}=hs[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(t);const n=Object.create(r.prototype);for(const r of Object.keys(t)){if("$name"===r)continue;const i=t[r];n[r]=hs[e].shallow.indexOf(r)>=0?i:gs(i);}return n}class xs{constructor(){this.first=!0;}update(t,e){const r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${t}}`,"u").source}catch(t){return null}})).filter((t=>t));return new RegExp(e.join("|"),"u")}const ks=As(["Arab","Dupl","Mong","Ougr","Syrc"]);function Es(t){return !ks.test(String.fromCodePoint(t))}function Ts(t){return !(bs(t)||(e=t,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))));var e;}const Is=As(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ms(t){return Is.test(String.fromCodePoint(t))}function Fs(t,e){return !(!e&&Ms(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))}function Ds(t){for(const e of t)if(Ms(e.codePointAt(0)))return !0;return !1}const zs=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{};}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL;}getState(){return {pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(zs.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve();}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,r){return e(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if("loading"!==t.pluginStatus)return this.setState(t),t;const e=t.pluginURL,n=new Promise((t=>{this.loadScriptResolve=t;}));r(e);const i=new Promise((t=>setTimeout((()=>t()),this.TIMEOUT)));if(yield Promise.race([n,i]),this.isParsed()){const t={pluginStatus:"loaded",pluginURL:e};return this.setState(t),t}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${e}`)}))}};class Ps{constructor(t,e){this.isSupportedScript=Bs,this.zoom=t,e?(this.now=e.now||0,this.fadeDuration=e.fadeDuration||0,this.zoomHistory=e.zoomHistory||new xs,this.transition=e.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new xs,this.transition={});}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}}function Bs(t){return function(t,e){for(const r of t)if(!Fs(r.codePointAt(0),e))return !1;return !0}(t,"loaded"===zs.getRTLTextPluginStatus())}const Vs="-transition";class Cs{constructor(t,e,r){this.property=t,this.value=e,this.expression=function(t,e,r){if(Yn(t))return new oi(t,e);if(ri(t)){const n=ai(t,e,r);if("error"===n.result)throw new Error(n.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return n.value}{let r=t;return "color"===e.type&&"string"==typeof t?r=Te.parse(t):"padding"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"numberArray"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"colorArray"!==e.type||"string"!=typeof t&&!Array.isArray(t)?"variableAnchorOffsetCollection"===e.type&&Array.isArray(t)?r=Le.parse(t):"projectionDefinition"===e.type&&"string"==typeof t&&(r=Re.parse(t)):r=Be.parse(t):r=Pe.parse(t):r=ze.parse(t),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>r}}}(void 0===e?t.specification.default:e,t.specification,r);}isDataDriven(){return "source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}}class Ls{constructor(t,e){this.property=t,this.value=new Cs(t,void 0,e);}transitioned(t,e){return new Rs(this.property,this.value,e,O({},t.transition,this.transition),t.now)}untransitioned(){return new Rs(this.property,this.value,null,{},0)}}class Os{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=e;}getValue(t){return U(this._values[t].value.value)}setValue(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ls(this._values[t].property,this._globalState)),this._values[t].value=new Cs(this._values[t].property,null===e?void 0:U(e),this._globalState);}getTransition(t){return U(this._values[t].transition)}setTransition(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ls(this._values[t].property,this._globalState)),this._values[t].transition=U(e)||void 0;}serialize(){const t={};for(const e of Object.keys(this._values)){const r=this.getValue(e);void 0!==r&&(t[e]=r);const n=this.getTransition(e);void 0!==n&&(t[`${e}${Vs}`]=n);}return t}transitioned(t,e){const r=new Ns(this._properties);for(const n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(t,e._values[n]);return r}untransitioned(){const t=new Ns(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class Rs{constructor(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r);}possiblyEvaluate(t,e,r){const n=t.now||0,i=this.value.possiblyEvaluate(t,e,r),s=this.prior;if(s){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(nn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}}class Ys{constructor(t){this.specification=t;}possiblyEvaluate(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){const i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new Ps(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ps(Math.floor(e.zoom),e)),t.expression.evaluate(new Ps(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}}class Zs{constructor(t){this.specification=t;}possiblyEvaluate(t,e,r,n){return !!t.expression.evaluate(e,null,{},r,n)}interpolate(){return !1}}class Hs{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const e in t){const r=t[e];r.specification.overridable&&this.overridableProperties.push(e);const n=this.defaultPropertyValues[e]=new Cs(r,void 0,void 0),i=this.defaultTransitionablePropertyValues[e]=new Ls(r,void 0);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({});}}}ps("DataDrivenProperty",Gs),ps("DataConstantProperty",js),ps("CrossFadedDataDrivenProperty",Xs),ps("CrossFadedProperty",Ys),ps("ColorRampProperty",Zs);class Ks extends xt{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,this._visibilityExpression=function(t,e){return new rs(t,e)}(this.visibility,r),"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=fi(t.filter,r)),e.layout&&(this._unevaluatedLayout=new $s(e.layout,r)),e.paint)){this._transitionablePaint=new Os(e.paint,r);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new qs(e.paint);}}setFilter(t){this.filter=t,this._featureFilter=fi(t,this._globalState);}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return "visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;for(const e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(const e in this._unevaluatedLayout._values){const r=this._unevaluatedLayout._values[e];for(const e of r.getGlobalStateRefs())t.add(e);}for(const e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var t;const e=new globalThis.Map;if(this._transitionablePaint)for(const r in this._transitionablePaint._values){const n=this._transitionablePaint._values[r].value;for(const i of n.getGlobalStateRefs()){const s=null!==(t=e.get(i))&&void 0!==t?t:[];s.push({name:r,value:n.value}),e.set(i,s);}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){if(null==e||!this._validate(ls,`layers.${this.id}.layout.${t}`,t,e,r))return "visibility"===t?(this.visibility=e,this._visibilityExpression.setValue(e),void this.recalculateVisibility()):void this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){return t.endsWith(Vs)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){if(null!=e&&this._validate(os,`layers.${this.id}.paint.${t}`,t,e,r))return !1;if(t.endsWith(Vs))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{const r=this._transitionablePaint._values[t],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),s=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const a=this._transitionablePaint._values[t].value;return a.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(t,s,a)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return !1}isHidden(t=this.minzoom,e=!1){return !!(this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint);}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate();}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e);}serialize(){const t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),$(t,((t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)))}_validate(t,e,r,n,i={}){return (!i||!1!==i.validate)&&us(this,t.call(is,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:vt,style:{glyphs:!0,sprite:!0}}))}is3D(){return !1}isTileClipped(){return !1}hasOffscreenPass(){return !1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof Us&&qn(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return !0}return !1}}let Ws;var Js={get paint(){return Ws=Ws||new Hs({"raster-opacity":new js(vt.paint_raster["raster-opacity"]),"raster-hue-rotate":new js(vt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new js(vt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new js(vt.paint_raster["raster-brightness-max"]),"raster-saturation":new js(vt.paint_raster["raster-saturation"]),"raster-contrast":new js(vt.paint_raster["raster-contrast"]),"raster-resampling":new js(vt.paint_raster["raster-resampling"]),"raster-fade-duration":new js(vt.paint_raster["raster-fade-duration"])})}};class Qs extends Ks{constructor(t,e){super(t,Js,e);}}const ta={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ea{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8;}}class ra{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0);}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews());}clear(){this.length=0;}resize(t){this.reserve(t),this.length=t;}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e);}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function na(t,e=1){let r=0,n=0;return {members:t.map((t=>{const i=ta[t.type].BYTES_PER_ELEMENT,s=r=ia(r,Math.max(e,i)),a=t.components||1;return n=Math.max(n,i),r+=i*a,{name:t.name,type:t.type,components:a,offset:s}})),size:ia(r,Math.max(n,e)),alignment:e}}function ia(t,e){return Math.ceil(t/e)*e}class sa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t}}sa.prototype.bytesPerElement=4,ps("StructArrayLayout2i4",sa);class aa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t}}aa.prototype.bytesPerElement=6,ps("StructArrayLayout3i6",aa);class oa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const s=4*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,t}}oa.prototype.bytesPerElement=8,ps("StructArrayLayout4i8",oa);class la extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,s)}emplace(t,e,r,n,i,s,a){const o=6*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,this.int16[o+4]=s,this.int16[o+5]=a,t}}la.prototype.bytesPerElement=12,ps("StructArrayLayout2i4i12",la);class ua extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,s)}emplace(t,e,r,n,i,s,a){const o=4*t,l=8*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=s,this.uint8[l+7]=a,t}}ua.prototype.bytesPerElement=8,ps("StructArrayLayout2i4ub8",ua);class ca extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t}}ca.prototype.bytesPerElement=8,ps("StructArrayLayout2f8",ca);class ha extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o,l,u){const c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,s,a,o,l,u)}emplace(t,e,r,n,i,s,a,o,l,u,c){const h=10*t;return this.uint16[h+0]=e,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=s,this.uint16[h+5]=a,this.uint16[h+6]=o,this.uint16[h+7]=l,this.uint16[h+8]=u,this.uint16[h+9]=c,t}}ha.prototype.bytesPerElement=20,ps("StructArrayLayout10ui20",ha);class pa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,s,a,o)}emplace(t,e,r,n,i,s,a,o,l){const u=8*t;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=n,this.uint16[u+3]=i,this.uint16[u+4]=s,this.uint16[u+5]=a,this.uint16[u+6]=o,this.uint16[u+7]=l,t}}pa.prototype.bytesPerElement=16,ps("StructArrayLayout8ui16",pa);class fa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o,l,u,c,h){const p=this.length;return this.resize(p+1),this.emplace(p,t,e,r,n,i,s,a,o,l,u,c,h)}emplace(t,e,r,n,i,s,a,o,l,u,c,h,p){const f=12*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.uint16[f+4]=s,this.uint16[f+5]=a,this.uint16[f+6]=o,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=p,t}}fa.prototype.bytesPerElement=24,ps("StructArrayLayout4i4ui4i24",fa);class da extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t}}da.prototype.bytesPerElement=12,ps("StructArrayLayout3f12",da);class ya extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer);}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint32[1*t+0]=e,t}}ya.prototype.bytesPerElement=4,ps("StructArrayLayout1ul4",ya);class ma extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o,l){const u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,s,a,o,l)}emplace(t,e,r,n,i,s,a,o,l,u){const c=10*t,h=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=s,this.int16[c+5]=a,this.uint32[h+3]=o,this.uint16[c+8]=l,this.uint16[c+9]=u,t}}ma.prototype.bytesPerElement=20,ps("StructArrayLayout6i1ul2ui20",ma);class ga extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,s)}emplace(t,e,r,n,i,s,a){const o=6*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,this.int16[o+4]=s,this.int16[o+5]=a,t}}ga.prototype.bytesPerElement=12,ps("StructArrayLayout2i2i2i12",ga);class xa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,n,i)}emplace(t,e,r,n,i,s){const a=4*t,o=8*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[o+6]=i,this.int16[o+7]=s,t}}xa.prototype.bytesPerElement=16,ps("StructArrayLayout2f1f2i16",xa);class va extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,s)}emplace(t,e,r,n,i,s,a){const o=16*t,l=4*t,u=8*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[u+6]=s,this.int16[u+7]=a,t}}va.prototype.bytesPerElement=16,ps("StructArrayLayout2ub2f2i16",va);class ba extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t}}ba.prototype.bytesPerElement=6,ps("StructArrayLayout3ui6",ba);class wa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m){const g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m)}emplace(t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m,g){const x=24*t,v=12*t,b=48*t;return this.int16[x+0]=e,this.int16[x+1]=r,this.uint16[x+2]=n,this.uint16[x+3]=i,this.uint32[v+2]=s,this.uint32[v+3]=a,this.uint32[v+4]=o,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[v+7]=h,this.float32[v+8]=p,this.uint8[b+36]=f,this.uint8[b+37]=d,this.uint8[b+38]=y,this.uint32[v+10]=m,this.int16[x+22]=g,t}}wa.prototype.bytesPerElement=48,ps("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",wa);class _a extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m,g,x,v,b,w,_,S,A,k,E,T){const I=this.length;return this.resize(I+1),this.emplace(I,t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m,g,x,v,b,w,_,S,A,k,E,T)}emplace(t,e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m,g,x,v,b,w,_,S,A,k,E,T,I){const M=32*t,F=16*t;return this.int16[M+0]=e,this.int16[M+1]=r,this.int16[M+2]=n,this.int16[M+3]=i,this.int16[M+4]=s,this.int16[M+5]=a,this.int16[M+6]=o,this.int16[M+7]=l,this.uint16[M+8]=u,this.uint16[M+9]=c,this.uint16[M+10]=h,this.uint16[M+11]=p,this.uint16[M+12]=f,this.uint16[M+13]=d,this.uint16[M+14]=y,this.uint16[M+15]=m,this.uint16[M+16]=g,this.uint16[M+17]=x,this.uint16[M+18]=v,this.uint16[M+19]=b,this.uint16[M+20]=w,this.uint16[M+21]=_,this.uint16[M+22]=S,this.uint32[F+12]=A,this.float32[F+13]=k,this.float32[F+14]=E,this.uint16[M+30]=T,this.uint16[M+31]=I,t}}_a.prototype.bytesPerElement=64,ps("StructArrayLayout8i15ui1ul2f2ui64",_a);class Sa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.float32[1*t+0]=e,t}}Sa.prototype.bytesPerElement=4,ps("StructArrayLayout1f4",Sa);class Aa extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=3*t;return this.uint16[6*t+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t}}Aa.prototype.bytesPerElement=12,ps("StructArrayLayout1ui2f12",Aa);class ka extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)}emplace(t,e,r,n){const i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t}}ka.prototype.bytesPerElement=8,ps("StructArrayLayout1ul2ui8",ka);class Ea extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t,e){const r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){const n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t}}Ea.prototype.bytesPerElement=4,ps("StructArrayLayout2ui4",Ea);class Ta extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer);}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint16[1*t+0]=e,t}}Ta.prototype.bytesPerElement=2,ps("StructArrayLayout1ui2",Ta);class Ia extends ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer);}emplaceBack(t,e,r,n){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)}emplace(t,e,r,n,i){const s=4*t;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=n,this.float32[s+3]=i,t}}Ia.prototype.bytesPerElement=16,ps("StructArrayLayout4f16",Ia);class Ma extends ea{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new r(this.anchorPointX,this.anchorPointY)}}Ma.prototype.size=20;class Fa extends ma{get(t){return new Ma(this,t)}}ps("CollisionBoxArray",Fa);class Da extends ea{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t;}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t;}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t;}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Da.prototype.size=48;class za extends wa{get(t){return new Da(this,t)}}ps("PlacedSymbolArray",za);class Pa extends ea{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t;}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Pa.prototype.size=64;class Ba extends _a{get(t){return new Pa(this,t)}}ps("SymbolInstanceArray",Ba);class Va extends Sa{getoffsetX(t){return this.float32[1*t+0]}}ps("GlyphOffsetArray",Va);class Ca extends aa{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}ps("SymbolLineVertexArray",Ca);class La extends ea{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}La.prototype.size=12;class Oa extends Aa{get(t){return new La(this,t)}}ps("TextAnchorOffsetArray",Oa);class Ra extends ea{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ra.prototype.size=8;class Na extends ka{get(t){return new Ra(this,t)}}ps("FeatureIndexArray",Na);class $a extends sa{}class Ua extends sa{}class qa extends sa{}class ja extends la{}class Ga extends ua{}class Xa extends ca{}class Ya extends ha{}class Za extends pa{}class Ha extends fa{}class Ka extends da{}class Wa extends ya{}class Ja extends ga{}class Qa extends va{}class to extends ba{}class eo extends Ea{}const ro=na([{name:"a_pos",components:2,type:"Int16"}],4),{members:no}=ro;class io{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t;}prepareSegment(t,e,r,n){const i=this.segments[this.segments.length-1];return t>io.MAX_VERTEX_ARRAY_LENGTH&&j(`Max vertices per segment is ${io.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${io.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!i||i.vertexLength+t>io.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n?this.createNewSegment(e,r,n):i}createNewSegment(t,e,r){const n={vertexOffset:t.length,primitiveOffset:e.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(n.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(t,e,r){return this.prepareSegment(0,t,e,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0;}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy();}static simpleSegment(t,e,r,n){return new io([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}function so(t,e){return 256*(t=C(Math.floor(t),0,255))+C(Math.floor(e),0,255)}io.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ps("SegmentVector",io);const ao=na([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),oo=na([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var lo,uo,co,ho={exports:{}},po={exports:{}},fo={exports:{}},yo=function(){if(co)return ho.exports;co=1;var t=(lo||(lo=1,po.exports=function(t,e){var r,n,i,s,a,o,l,u;for(n=t.length-(r=3&t.length),i=e,a=3432918353,o=461845907,u=0;u>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(s>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*o+(((l>>>16)*o&65535)<<16)&4294967295;}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}),po.exports),e=(uo||(uo=1,fo.exports=function(t,e){for(var r,n=t.length,i=e^n,s=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:i^=(255&t.charCodeAt(s+2))<<16;case 2:i^=(255&t.charCodeAt(s+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(s)))+((1540483477*(i>>>16)&65535)<<16);}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}),fo.exports);return ho.exports=t,ho.exports.murmur3=t,ho.exports.murmur2=e,ho.exports}(),mo=n(yo);class go{constructor(){this.ids=[],this.positions=[],this.indexed=!1;}add(t,e,r,n){this.ids.push(xo(t)),this.positions.push(e,r,n);}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const e=xo(t);let r=0,n=this.ids.length-1;for(;r>1;this.ids[t]>=e?n=t:r=t+1;}const i=[];for(;this.ids[r]===e;)i.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return i}static serialize(t,e){const r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return vo(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(t){const e=new go;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}function xo(t){const e=+t;return !isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:mo(String(t))}function vo(t,e,r,n){for(;r>1];let s=r-1,a=n+1;for(;;){do{s++;}while(t[s]i);if(s>=a)break;bo(t,s,a),bo(e,3*s,3*a),bo(e,3*s+1,3*a+1),bo(e,3*s+2,3*a+2);}a-r`u_${t}`)),this.type=r;}setUniform(t,e,r){t.set(r.constantOr(this.value));}getBinding(t,e,r){return "color"===this.type?new Ao(t,e):new _o(t,e)}}class Io{constructor(t,e){this.uniformNames=e.map((t=>`u_${t}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1;}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr;}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width];}setUniform(t,e,r,n){let i=null;"u_pattern_to"===n?i=this.patternTo:"u_pattern_from"===n?i=this.patternFrom:"u_dasharray_to"===n?i=this.dashTo:"u_dasharray_from"===n?i=this.dashFrom:"u_pixel_ratio_to"===n?i=this.pixelRatioTo:"u_pixel_ratio_from"===n&&(i=this.pixelRatioFrom),null!==i&&t.set(i);}getBinding(t,e,r){return "u_pattern"===r.substr(0,9)||"u_dasharray_"===r.substr(0,12)?new So(t,e):new _o(t,e)}}class Mo{constructor(t,e,r,n){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===r?2:1,offset:0}))),this.paintVertexArray=new n;}populatePaintArray(t,e,r){const n=this.paintVertexArray.length,i=this.expression.evaluate(new Ps(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(n,t,i);}updatePaintArray(t,e,r,n,i){const s=this.expression.evaluate(new Ps(0,i),r,n);this._setPaintValue(t,e,s);}_setPaintValue(t,e,r){if("color"===this.type){const n=Eo(r);for(let r=t;r`u_${t}_t`)),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===r?4:2,offset:0}))),this.paintVertexArray=new s;}populatePaintArray(t,e,r){const n=this.expression.evaluate(new Ps(this.zoom,r),e,{},r.canonical,[],r.formattedSection),i=this.expression.evaluate(new Ps(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,n,i);}updatePaintArray(t,e,r,n,i){const s=this.expression.evaluate(new Ps(this.zoom,i),r,n),a=this.expression.evaluate(new Ps(this.zoom+1,i),r,n);this._setPaintValue(t,e,s,a);}_setPaintValue(t,e,r,n){if("color"===this.type){const i=Eo(r),s=Eo(n);for(let r=t;r`#define HAS_UNIFORM_${t}`)));}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const r=this.binders[e];if(r instanceof Mo||r instanceof Fo)for(let e=0;e!0){this.programConfigurations={};for(const n of t)this.programConfigurations[n.id]=new Bo(n,e,r);this.needsUpload=!1,this._featureMap=new go,this._bufferOffset=0;}populatePaintArrays(t,e,r,n){for(const r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e,n);void 0!==e.id&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0;}updatePaintArrays(t,e,r,n){for(const i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(t,this._featureMap,e,i,n)||this.needsUpload;}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1;}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy();}}function Co(t,e){return {"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function Lo(t,e,r){const n={color:{source:ca,composite:Ia},number:{source:Sa,composite:ca}},i=function(t){return {"line-pattern":{source:Ya,composite:Ya},"fill-pattern":{source:Ya,composite:Ya},"fill-extrusion-pattern":{source:Ya,composite:Ya},"line-dasharray":{source:Za,composite:Za}}[t]}(t);return i&&i[r]||n[e][r]}ps("ConstantBinder",To),ps("CrossFadedConstantBinder",Io),ps("SourceExpressionBinder",Mo),ps("CrossFadedPatternBinder",zo),ps("CrossFadedDasharrayBinder",Po),ps("CompositeExpressionBinder",Fo),ps("ProgramConfiguration",Bo,{omit:["_buffers"]}),ps("ProgramConfigurationSet",Vo);const Oo=Math.pow(2,14)-1,Ro=-Oo-1;function No(t){const e=M/t.extent,r=t.loadGeometry();for(let t=0;tr.x+1||sr.y+1)&&j("Geometry exceeds allowed extent, reduce your vector tile buffer size");}}return r}function $o(t,e){return {type:t.type,id:t.id,properties:t.properties,geometry:e?No(t):[]}}const Uo=-32768;function qo(t,e,r,n,i){t.emplaceBack(Uo+8*e+n,Uo+8*r+i);}class jo{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Ua,this.indexArray=new to,this.segments=new io,this.programConfigurations=new Vo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id));}populate(t,e,r){const n=this.layers[0],i=[];let s=null,a=!1,o="heatmap"===n.type;if("circle"===n.type){const t=n;s=t.layout.get("circle-sort-key"),a=!s.isConstant(),o=o||"map"===t.paint.get("circle-pitch-alignment");}const l=o?e.subdivisionGranularity.circle:1;for(const{feature:e,id:n,index:o,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,u=$o(e,t);if(!this.layers[0]._featureFilter.filter(new Ps(this.zoom),u,r))continue;const c=a?s.evaluate(u,{},r):void 0,h={id:n,properties:e.properties,type:e.type,sourceLayerIndex:l,index:o,geometry:t?u.geometry:No(e),patterns:{},sortKey:c};i.push(h);}a&&i.sort(((t,e)=>t.sortKey-e.sortKey));for(const n of i){const{geometry:i,index:s,sourceLayerIndex:a}=n,o=t[s].feature;this.addFeature(n,i,s,r,l),e.featureIndex.insert(o,i,s,a,this.index);}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r});}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return !this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,no),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0;}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy());}addFeature(t,e,r,n,i=1){let s;switch(i){case 1:s=[0,7];break;case 3:s=[0,2,5,7];break;case 5:s=[0,1,3,4,6,7];break;case 7:s=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${i}; valid values are 1, 3, 5, 7.`)}const a=s.length;for(const r of e)for(const e of r){const r=e.x,n=e.y;if(r<0||r>=M||n<0||n>=M)continue;const i=this.segments.prepareSegment(a*a,this.layoutVertexArray,this.indexArray,t.sortKey),o=i.vertexLength;for(let t=0;t1){if(Ho(t,e))return !0;for(let n=0;n1?r:r.sub(e)._mult(i)._add(e))}function Qo(t,e){let r,n,i,s=!1;for(let a=0;ae.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(s=!s);}return s}function tl(t,e){let r=!1;for(let n=0,i=t.length-1;ne.y!=a.y>e.y&&e.x<(a.x-s.x)*(e.y-s.y)/(a.y-s.y)+s.x&&(r=!r);}return r}function el(t,e,r){const n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return !1;const s=G(t,e,r[0]);return s!==G(t,e,r[1])||s!==G(t,e,r[2])||s!==G(t,e,r[3])}function rl(t,e,r){const n=e.paint.get(t).value;return "constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function nl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function il(t,e,n,i,s){if(!e[0]&&!e[1])return t;const a=r.convert(e)._mult(s);"viewport"===n&&a._rotate(-i);const o=[];for(let e=0;ehl(t,e,r,n)))}(l,i,a,o),f=u),cl({queryGeometry:p,size:f,transform:i,unwrappedTileID:a,getElevation:o,pitchAlignment:h,pitchScale:c},n)}}class ml extends jo{}let gl;ps("HeatmapBucket",ml,{omit:["layers"]});var xl={get paint(){return gl=gl||new Hs({"heatmap-radius":new Gs(vt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Gs(vt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new js(vt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Zs(vt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new js(vt.paint_heatmap["heatmap-opacity"])})}};function vl(t,{width:e,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==e*r*n)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${e*r*n}`)}else i=new Uint8Array(e*r*n);return t.width=e,t.height=r,t.data=i,t}function bl(t,{width:e,height:r},n){if(e===t.width&&r===t.height)return;const i=vl({},{width:e,height:r},n);wl(t,i,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},n),t.width=e,t.height=r,t.data=i.data;}function wl(t,e,r,n,i,s){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");const a=t.data,o=e.data;if(a===o)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=a;const o=t.expression.evaluate(e);i.setPixel(n/4/r,s/4,o);};if(t.clips)for(let e=0,i=0;ethis.max&&(this.max=r),r=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${e}, dim: ${this.dim}`);return (e+1)*this.stride+(t+1)}unpack(t,e,r){return t*this.redFactor+e*this.greenFactor+r*this.blueFactor-this.baseShift}pack(t){return Bl(t,this.getUnpackVector())}getPixels(){return new Sl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let n=e*this.dim,i=e*this.dim+this.dim,s=r*this.dim,a=r*this.dim+this.dim;switch(e){case -1:n=i-1;break;case 1:i=n+1;}switch(r){case -1:s=a-1;break;case 1:a=s+1;}const o=-e*this.dim,l=-r*this.dim;for(let e=s;e0)for(let i=e;i=e;i-=n)s=lu(i/n|0,t[i],t[i+1],s);return s&&ru(s,s.next)&&(uu(s),s=s.next),s}function $l(t,e){if(!t)return t;e||(e=t);let r,n=t;do{if(r=!1,n.steiner||!ru(n,n.next)&&0!==eu(n.prev,n,n.next))n=n.next;else {if(uu(n),n=e=n.prev,n===n.next)break;r=!0;}}while(r||n!==e);return e}function Ul(t,e,r,n,i,s,a){if(!t)return;!a&&s&&function(t,e,r,n){let i=t;do{0===i.z&&(i.z=Kl(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,r=1;do{let n,i=t;t=null;let s=null;for(e=0;i;){e++;let a=i,o=0;for(let t=0;t0||l>0&&a;)0!==o&&(0===l||!a||i.z<=a.z)?(n=i,i=i.nextZ,o--):(n=a,a=a.nextZ,l--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;i=a;}s.nextZ=null,r*=2;}while(e>1)}(i);}(t,n,i,s);let o=t;for(;t.prev!==t.next;){const l=t.prev,u=t.next;if(s?jl(t,n,i,s):ql(t))e.push(l.i,t.i,u.i),uu(t),t=u.next,o=u.next;else if((t=u)===o){a?1===a?Ul(t=Gl($l(t),e),e,r,n,i,s,2):2===a&&Xl(t,e,r,n,i,s):Ul($l(t),e,r,n,i,s,1);break}}}function ql(t){const e=t.prev,r=t,n=t.next;if(eu(e,r,n)>=0)return !1;const i=e.x,s=r.x,a=n.x,o=e.y,l=r.y,u=n.y,c=Math.min(i,s,a),h=Math.min(o,l,u),p=Math.max(i,s,a),f=Math.max(o,l,u);let d=n.next;for(;d!==e;){if(d.x>=c&&d.x<=p&&d.y>=h&&d.y<=f&&Ql(i,o,s,l,a,u,d.x,d.y)&&eu(d.prev,d,d.next)>=0)return !1;d=d.next;}return !0}function jl(t,e,r,n){const i=t.prev,s=t,a=t.next;if(eu(i,s,a)>=0)return !1;const o=i.x,l=s.x,u=a.x,c=i.y,h=s.y,p=a.y,f=Math.min(o,l,u),d=Math.min(c,h,p),y=Math.max(o,l,u),m=Math.max(c,h,p),g=Kl(f,d,e,r,n),x=Kl(y,m,e,r,n);let v=t.prevZ,b=t.nextZ;for(;v&&v.z>=g&&b&&b.z<=x;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==i&&v!==a&&Ql(o,c,l,h,u,p,v.x,v.y)&&eu(v.prev,v,v.next)>=0)return !1;if(v=v.prevZ,b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==i&&b!==a&&Ql(o,c,l,h,u,p,b.x,b.y)&&eu(b.prev,b,b.next)>=0)return !1;b=b.nextZ;}for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==i&&v!==a&&Ql(o,c,l,h,u,p,v.x,v.y)&&eu(v.prev,v,v.next)>=0)return !1;v=v.prevZ;}for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==i&&b!==a&&Ql(o,c,l,h,u,p,b.x,b.y)&&eu(b.prev,b,b.next)>=0)return !1;b=b.nextZ;}return !0}function Gl(t,e){let r=t;do{const n=r.prev,i=r.next.next;!ru(n,i)&&nu(n,r,r.next,i)&&au(n,i)&&au(i,n)&&(e.push(n.i,r.i,i.i),uu(r),uu(r.next),r=t=i),r=r.next;}while(r!==t);return $l(r)}function Xl(t,e,r,n,i,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&tu(a,t)){let o=ou(a,t);return a=$l(a,a.next),o=$l(o,o.next),Ul(a,e,r,n,i,s,0),void Ul(o,e,r,n,i,s,0)}t=t.next;}a=a.next;}while(a!==t)}function Yl(t,e){let r=t.x-e.x;return 0===r&&(r=t.y-e.y,0===r)&&(r=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)),r}function Zl(t,e){const r=function(t,e){let r=e;const n=t.x,i=t.y;let s,a=-1/0;if(ru(t,r))return r;do{if(ru(t,r.next))return r.next;if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){const t=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(t<=n&&t>a&&(a=t,s=r.x=r.x&&r.x>=l&&n!==r.x&&Jl(is.x||r.x===s.x&&Hl(s,r)))&&(s=r,c=e);}r=r.next;}while(r!==o);return s}(t,e);if(!r)return e;const n=ou(r,t);return $l(n,n.next),$l(r,r.next)}function Hl(t,e){return eu(t.prev,t,e.prev)<0&&eu(e.next,t,t.next)<0}function Kl(t,e,r,n,i){return (t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Wl(t){let e=t,r=t;do{(e.x=(t-a)*(s-o)&&(t-a)*(n-o)>=(r-a)*(e-o)&&(r-a)*(s-o)>=(i-a)*(n-o)}function Ql(t,e,r,n,i,s,a,o){return !(t===a&&e===o)&&Jl(t,e,r,n,i,s,a,o)}function tu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&nu(r,r.next,t,e))return !0;r=r.next;}while(r!==t);return !1}(t,e)&&(au(t,e)&&au(e,t)&&function(t,e){let r=t,n=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;}while(r!==t);return n}(t,e)&&(eu(t.prev,t,e.prev)||eu(t,e.prev,e))||ru(t,e)&&eu(t.prev,t,t.next)>0&&eu(e.prev,e,e.next)>0)}function eu(t,e,r){return (e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ru(t,e){return t.x===e.x&&t.y===e.y}function nu(t,e,r,n){const i=su(eu(t,e,r)),s=su(eu(t,e,n)),a=su(eu(r,n,t)),o=su(eu(r,n,e));return i!==s&&a!==o||!(0!==i||!iu(t,r,e))||!(0!==s||!iu(t,n,e))||!(0!==a||!iu(r,t,n))||!(0!==o||!iu(r,e,n))}function iu(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function su(t){return t>0?1:t<0?-1:0}function au(t,e){return eu(t.prev,t,t.next)<0?eu(t,e,t.next)>=0&&eu(t,t.prev,e)>=0:eu(t,e,t.prev)<0||eu(t,t.next,e)<0}function ou(t,e){const r=cu(t.i,t.x,t.y),n=cu(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function lu(t,e,r,n){const i=cu(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function uu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ);}function cu(t,e,r){return {i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class hu{constructor(t,e){if(e>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e;}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||e>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const r=0|Math.round(t),n=0|Math.round(e),i=this._getKey(r,n);if(this._vertexDictionary.has(i))return this._vertexDictionary.get(i);const s=this._vertexBuffer.length/2;return this._vertexDictionary.set(i,s),this._vertexBuffer.push(r,n),s}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(t,e){const r=[];for(let n=0;n0?(r.push(i),r.push(a),r.push(s)):(r.push(i),r.push(s),r.push(a));}return r}(this._vertexBuffer,t);const e=[],r=t.length;for(let n=0;n=1||v<=0)||y&&(oi)){u>=n&&u<=i&&s.push(r[(t+1)%3]);continue}!y&&x>0&&s.push(this._vertexToIndex(a+p*x,o+f*x));const b=a+p*Math.max(x,0),w=a+p*Math.min(v,1);d||this._generateIntraEdgeVertices(s,a,o,l,u,b,w),!y&&v<1&&s.push(this._vertexToIndex(a+p*v,o+f*v)),(y||u>=n&&u<=i)&&s.push(r[(t+1)%3]),!y&&(u<=n||u>=i)&&this._generateInterEdgeVertices(s,a,o,l,u,c,h,w,n,i);}return s}_generateIntraEdgeVertices(t,e,r,n,i,s,a){const o=n-e,l=i-r,u=0===l,c=u?Math.min(e,n):Math.min(s,a),h=u?Math.max(e,n):Math.max(s,a),p=Math.floor(c/this._granularityCellSize)+1,f=Math.ceil(h/this._granularityCellSize)-1;if(u?e=p;n--){const i=n*this._granularityCellSize;t.push(this._vertexToIndex(i,r+l*(i-e)/o));}}_generateInterEdgeVertices(t,e,r,n,i,s,a,o,l,u){const c=i-r,h=s-n,p=a-i,f=(l-i)/p,d=(u-i)/p,y=Math.min(f,d),m=Math.max(f,d),g=n+h*y;let x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o=1||m<=0){const t=r-a,n=s+(e-s)*Math.min((l-a)/t,(u-a)/t);x=Math.floor(Math.min(n,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(n,o)/this._granularityCellSize)-1,b=o0?u:l;if(b)for(let e=x;e<=v;e++)t.push(this._vertexToIndex(e*this._granularityCellSize,_));else for(let e=v;e>=x;e--)t.push(this._vertexToIndex(e*this._granularityCellSize,_));}_generateOutline(t){const e=[];for(const r of t){const t=gu(r,this._granularity,!0),n=this._pointArrayToIndices(t),i=[];for(let t=1;ti!=(s===fu)?(t.push(e),t.push(r),t.push(this._vertexToIndex(n,s)),t.push(r),t.push(this._vertexToIndex(i,s)),t.push(this._vertexToIndex(n,s))):(t.push(r),t.push(e),t.push(this._vertexToIndex(n,s)),t.push(this._vertexToIndex(i,s)),t.push(r),t.push(this._vertexToIndex(n,s)));}_fillPoles(t,e,r){const n=this._vertexBuffer,i=M,s=t.length;for(let a=2;a80*r){o=t[0],l=t[1];let e=o,n=l;for(let s=r;se&&(e=r),i>n&&(n=i);}u=Math.max(e-o,n-l),u=0!==u?32767/u:0;}return Ul(s,a,r,o,l,u,0),a}(r,n),e=this._convertIndices(r,t);i=this._subdivideTrianglesScanline(e);}catch(t){console.error(t);}let s=[];return e&&(s=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(i),{verticesFlattened:this._vertexBuffer,indicesTriangles:i,indicesLineList:s}}_convertIndices(t,e){const r=[];for(let n=0;n0?(Math.floor(x/o)+1)*o:(Math.ceil(x/o)-1)*o,e=y>0?(Math.floor(v/o)+1)*o:(Math.ceil(v/o)-1)*o,n=Math.abs(x-t),i=Math.abs(v-e),s=Math.abs(x-c),a=Math.abs(v-h),u=p?n/m:Number.POSITIVE_INFINITY,b=f?i/g:Number.POSITIVE_INFINITY;if((s<=n||!p)&&(a<=i||!f))break;if(u=0?a-1:s-1,i=(o+1)%s,l=t[2*e[n]],u=t[2*e[i]],c=t[2*e[a]],h=t[2*e[a]+1],p=t[2*e[o]+1];let f=!1;if(lu)f=!1;else {const r=p-h,s=-(t[2*e[o]]-c),a=h((u-c)*r+(t[2*e[i]+1]-h)*s)*a&&(f=!0);}if(f){const t=e[n],i=e[a],l=e[o];t!==i&&t!==l&&i!==l&&r.push(l,i,t),a--,a<0&&(a=s-1);}else {const t=e[i],n=e[a],l=e[o];t!==n&&t!==l&&n!==l&&r.push(l,n,t),o++,o>=s&&(o=0);}if(n===i)break}}function vu(t,e,r,n,i,s,a,o,l){const u=i.length/2,c=a&&o&&l;if(uio.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,c=0);const x=bu(a,n,s,o,p,y,u),v=bu(a,n,s,o,f,m,u),b=bu(a,n,s,o,d,g,u);r.emplaceBack(c+x-l,c+v-l,c+b-l),u.primitiveLength++;}}(e,r,n,i,s,t),c&&function(t,e,r,n,i,s){const a=[];for(let t=0;tio.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,d=!0,y=!0,c=0);const m=bu(a,n,s,o,i,d,u),g=bu(a,n,s,o,h,y,u);r.emplaceBack(c+m-l,c+g-l),u.primitiveLength++;}}}(a,r,o,i,l,t),e.forceNewSegmentOnNextPrepare(),null==a||a.forceNewSegmentOnNextPrepare();}function bu(t,e,r,n,i,s,a){if(s){const s=n.count;return r(e[2*i],e[2*i+1]),t[i]=n.count,n.count++,a.vertexLength++,s}return t[i]}class wu{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new qa,this.indexArray=new to,this.indexArray2=new eo,this.programConfigurations=new Vo(t.layers,t.zoom),this.segments=new io,this.segments2=new io,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id));}populate(t,e,r){this.hasDependencies=Ol("fill",this.layers,e);const n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),s=[];for(const{feature:a,id:o,index:l,sourceLayerIndex:u}of t){const t=this.layers[0]._featureFilter.needGeometry,c=$o(a,t);if(!this.layers[0]._featureFilter.filter(new Ps(this.zoom),c,r))continue;const h=i?n.evaluate(c,{},r,e.availableImages):void 0,p={id:o,properties:a.properties,type:a.type,sourceLayerIndex:u,index:l,geometry:t?c.geometry:No(a),patterns:{},sortKey:h};s.push(p);}i&&s.sort(((t,e)=>t.sortKey-e.sortKey));for(const n of s){const{geometry:i,index:s,sourceLayerIndex:a}=n;if(this.hasDependencies){const t=Rl("fill",this.layers,n,{zoom:this.zoom},e);this.patternFeatures.push(t);}else this.addFeature(n,i,s,r,{},e.subdivisionGranularity);e.featureIndex.insert(t[s].feature,i,s,a,this.index);}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r});}addFeatures(t,e,r){for(const n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity);}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return !this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ll),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0;}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy());}addFeature(t,e,r,n,i,s){for(const t of tn(e,500)){const e=mu(t,n,s.fill.getGranularityForZoomLevel(n.z)),r=this.layoutVertexArray;vu(((t,e)=>{r.emplaceBack(t,e);}),this.segments,this.layoutVertexArray,this.indexArray,e.verticesFlattened,e.indicesTriangles,this.segments2,this.indexArray2,e.indicesLineList);}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:i,canonical:n});}}let _u,Su;ps("FillBucket",wu,{omit:["layers","patternFeatures"]});var Au={get paint(){return Su=Su||new Hs({"fill-antialias":new js(vt.paint_fill["fill-antialias"]),"fill-opacity":new Gs(vt.paint_fill["fill-opacity"]),"fill-color":new Gs(vt.paint_fill["fill-color"]),"fill-outline-color":new Gs(vt.paint_fill["fill-outline-color"]),"fill-translate":new js(vt.paint_fill["fill-translate"]),"fill-translate-anchor":new js(vt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Xs(vt.paint_fill["fill-pattern"])})},get layout(){return _u=_u||new Hs({"fill-sort-key":new Gs(vt.layout_fill["fill-sort-key"])})}};class ku extends Ks{constructor(t,e){super(t,Au,e);}recalculate(t,e){super.recalculate(t,e);const r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"]);}createBucket(t){return new wu(t)}queryRadius(){return nl(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:n}){return Yo(il(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,n),e)}isTileClipped(){return !0}}const Eu=na([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Tu=na([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Iu}=Eu;class Mu{constructor(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(Fu,this,e);}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos,n=[];let i,s=1,a=0,o=0,l=0;for(;t.pos>3;}if(a--,1===s||2===s)o+=t.readSVarint(),l+=t.readSVarint(),1===s&&(i&&n.push(i),i=[]),i&&i.push(new r(o,l));else {if(7!==s)throw new Error(`unknown command ${s}`);i&&i.push(i[0].clone());}}return i&&n.push(i),n}bbox(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let r=1,n=0,i=0,s=0,a=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos>3;}if(n--,1===r||2===r)i+=t.readSVarint(),s+=t.readSVarint(),io&&(o=i),su&&(u=s);else if(7!==r)throw new Error(`unknown command ${r}`)}return [a,l,o,u]}toGeoJSON(t,e,r){const n=this.extent*Math.pow(2,r),i=this.extent*t,s=this.extent*e,a=this.loadGeometry();function o(t){return [360*(t.x+i)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+s)/n)*Math.PI))-90]}function l(t){return t.map(o)}let u;if(1===this.type){const t=[];for(const e of a)t.push(e[0]);const e=l(t);u=1===t.length?{type:"Point",coordinates:e[0]}:{type:"MultiPoint",coordinates:e};}else if(2===this.type){const t=a.map(l);u=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t};}else {if(3!==this.type)throw new Error("unknown feature type");{const t=Du(a),e=[];for(const r of t)e.push(r.map(l));u=1===e.length?{type:"Polygon",coordinates:e[0]}:{type:"MultiPolygon",coordinates:e};}}const c={type:"Feature",geometry:u,properties:this.properties};return null!=this.id&&(c.id=this.id),c}}function Fu(t,e,r){1===t?e.id=r.readVarint():2===t?function(t,e){const r=t.readVarint()+t.pos;for(;t.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const e=this._pbf.readVarint()+this._pbf.pos;return new Mu(this._pbf,e,this.extent,this._keys,this._values)}}function Bu(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){let e=null;const r=t.readVarint()+t.pos;for(;t.pos>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null;}if(null==e)throw new Error("unknown feature value");return e}(r));}class Vu{constructor(t,e){this.layers=t.readFields(Cu,{},e);}}function Cu(t,e,r){if(3===t){const t=new Pu(r,r.readVarint()+r.pos);t.length&&(e[t.name]=t);}}const Lu=Math.pow(2,13);function Ou(t,e,r,n,i,s,a,o){t.emplaceBack(e,r,2*Math.floor(n*Lu)+a,i*Lu*2,s*Lu*2,Math.round(o));}class Ru{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new ja,this.centroidVertexArray=new $a,this.indexArray=new to,this.programConfigurations=new Vo(t.layers,t.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id));}populate(t,e,r){this.features=[],this.hasDependencies=Ol("fill-extrusion",this.layers,e);for(const{feature:n,id:i,index:s,sourceLayerIndex:a}of t){const t=this.layers[0]._featureFilter.needGeometry,o=$o(n,t);if(!this.layers[0]._featureFilter.filter(new Ps(this.zoom),o,r))continue;const l={id:i,sourceLayerIndex:a,index:s,geometry:t?o.geometry:No(n),properties:n.properties,type:n.type,patterns:{}};this.hasDependencies?this.features.push(Rl("fill-extrusion",this.layers,l,{zoom:this.zoom},e)):this.addFeature(l,l.geometry,s,r,{},e.subdivisionGranularity),e.featureIndex.insert(n,l.geometry,s,a,this.index,!0);}}addFeatures(t,e,r){for(const n of this.features){const{geometry:i}=n;this.addFeature(n,i,n.index,e,r,t.subdivisionGranularity);}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r});}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return !this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Iu),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Tu.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0;}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy());}addFeature(t,e,r,n,i,s){for(const r of tn(e,500)){const e={x:0,y:0,sampleCount:0},i=this.layoutVertexArray.length;this.processPolygon(e,n,t,r,s);const a=this.layoutVertexArray.length-i,o=Math.floor(e.x/e.sampleCount),l=Math.floor(e.y/e.sampleCount);for(let t=0;t{Ou(u,t,e,0,0,1,1,0);}),this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles);}_generateSideFaces(t,e){let r=0;for(let n=1;nio.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const a=i.sub(s)._perp()._unit(),o=s.dist(i);r+o>32768&&(r=0),Ou(this.layoutVertexArray,i.x,i.y,a.x,a.y,0,0,r),Ou(this.layoutVertexArray,i.x,i.y,a.x,a.y,0,1,r),r+=o,Ou(this.layoutVertexArray,s.x,s.y,a.x,a.y,0,0,r),Ou(this.layoutVertexArray,s.x,s.y,a.x,a.y,0,1,r);const l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2;}}}function Nu(t,e){for(let r=0;rM)||t.y===e.y&&(t.y<0||t.y>M)}function Uu(t){return t.every((t=>t.x<0))||t.every((t=>t.x>M))||t.every((t=>t.y<0))||t.every((t=>t.y>M))}let qu;ps("FillExtrusionBucket",Ru,{omit:["layers","features"]});var ju={get paint(){return qu=qu||new Hs({"fill-extrusion-opacity":new js(vt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Gs(vt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new js(vt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new js(vt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Xs(vt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Gs(vt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Gs(vt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new js(vt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Gu extends Ks{constructor(t,e){super(t,ju,e);}createBucket(t){return new Ru(t)}queryRadius(){return nl(this.paint.get("fill-extrusion-translate"))}is3D(){return !0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:n,geometry:i,transform:s,pixelsToTileUnits:a,pixelPosMatrix:o}){const l=il(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-s.bearingInRadians,a),u=this.paint.get("fill-extrusion-height").evaluate(e,n),c=this.paint.get("fill-extrusion-base").evaluate(e,n),h=function(t,e){const n=[];for(const i of t){const t=[i.x,i.y,0,1];A(t,t,e),n.push(new r(t[0]/t[3],t[1]/t[3]));}return n}(l,o),p=function(t,e,n,i){const s=[],a=[],o=i[8]*e,l=i[9]*e,u=i[10]*e,c=i[11]*e,h=i[8]*n,p=i[9]*n,f=i[10]*n,d=i[11]*n;for(const e of t){const t=[],n=[];for(const s of e){const e=s.x,a=s.y,y=i[0]*e+i[4]*a+i[12],m=i[1]*e+i[5]*a+i[13],g=i[2]*e+i[6]*a+i[14],x=i[3]*e+i[7]*a+i[15],v=g+u,b=x+c,w=y+h,_=m+p,S=g+f,A=x+d,k=new r((y+o)/b,(m+l)/b);k.z=v/b,t.push(k);const E=new r(w/A,_/A);E.z=S/A,n.push(E);}s.push(t),a.push(n);}return [s,a]}(i,c,u,o);return function(t,e,r){let n=1/0;Yo(r,e)&&(n=Yu(r,e[0]));for(let i=0;it.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={};})),this.layoutVertexArray=new Ga,this.layoutVertexArray2=new Xa,this.indexArray=new to,this.programConfigurations=new Vo(t.layers,t.zoom),this.segments=new io,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id));}populate(t,e,r){this.hasDependencies=Ol("line",this.layers,e)||this.hasLineDasharray(this.layers);const n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),s=[];for(const{feature:e,id:a,index:o,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,u=$o(e,t);if(!this.layers[0]._featureFilter.filter(new Ps(this.zoom),u,r))continue;const c=i?n.evaluate(u,{},r):void 0,h={id:a,properties:e.properties,type:e.type,sourceLayerIndex:l,index:o,geometry:t?u.geometry:No(e),patterns:{},dashes:{},sortKey:c};s.push(h);}i&&s.sort(((t,e)=>t.sortKey-e.sortKey));for(const n of s){const{geometry:i,index:s,sourceLayerIndex:a}=n;this.hasDependencies?(Ol("line",this.layers,e)?Rl("line",this.layers,n,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,n,this.zoom,e),this.patternFeatures.push(n)):this.addFeature(n,i,s,r,{},{},e.subdivisionGranularity),e.featureIndex.insert(t[s].feature,i,s,a,this.index);}}update(t,e,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:n});}addFeatures(t,e,r,n){for(const i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,e,r,n,t.subdivisionGranularity);}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return !this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Wu)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Hu),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0;}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy());}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return {start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,r,n,i,s,a){const o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap"),c=o.get("line-miter-limit"),h=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const r of e)this.addLine(r,t,l,u,c,h,n,a);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:i,dashPositions:s,canonical:n});}addLine(t,e,r,n,i,s,a,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=gu(t,a?o.line.getGranularityForZoomLevel(a.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e=2&&t[u-1].equals(t[u-2]);)u--;let c=0;for(;c0;if(w&&e>c){const t=f.dist(d);if(t>2*h){const e=f.sub(f.sub(d)._mult(h/t)._round());this.updateDistance(d,e),this.addCurrentVertex(e,m,0,0,p),d=e;}}const S=d&&y;let A=S?r:l?"butt":n;if(S&&"round"===A&&(vi&&(A="bevel"),"bevel"===A&&(v>2&&(A="flipbevel"),v100)a=g.mult(-1);else {const t=v*m.add(g).mag()/m.sub(g).mag();a._perp()._mult(t*(_?-1:1));}this.addCurrentVertex(f,a,0,0,p),this.addCurrentVertex(f,a.mult(-1),0,0,p);}else if("bevel"===A||"fakeround"===A){const t=-Math.sqrt(v*v-1),e=_?t:0,r=_?0:t;if(d&&this.addCurrentVertex(f,m,e,r,p),"fakeround"===A){const t=Math.round(180*b/Math.PI/20);for(let e=1;e2*h){const e=f.add(y.sub(f)._mult(h/t)._round());this.updateDistance(f,e),this.addCurrentVertex(e,g,0,0,p),f=e;}}}}addCurrentVertex(t,e,r,n,i,s=!1){const a=e.y*n-e.x,o=-e.y-e.x*n;this.addHalfVertex(t,e.x+e.y*r,e.y-e.x*r,s,!1,r,i),this.addHalfVertex(t,a,o,s,!0,-n,i),this.distance>Qu/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,n,i,s));}addHalfVertex({x:t,y:e},r,n,i,s,a,o){const l=.5*(this.lineClips?this.scaledDistance*(Qu-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(i?1:0),(e<<1)+(s?1:0),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),s?this.e2=u:this.e1=u;}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance;}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance();}hasLineDasharray(t){for(const e of t){const t=e.paint.get("line-dasharray");if(t&&!t.isConstant())return !0}return !1}addLineDashDependencies(t,e,r,n){for(const i of t){const t=i.paint.get("line-dasharray");if(!t||"constant"===t.value.kind)continue;const s="round"===i.layout.get("line-cap"),a={dasharray:t.value.evaluate({zoom:r-1},e,{}),round:s},o={dasharray:t.value.evaluate({zoom:r},e,{}),round:s},l={dasharray:t.value.evaluate({zoom:r+1},e,{}),round:s},u=`${a.dasharray.join(",")},${a.round}`,c=`${o.dasharray.join(",")},${o.round}`,h=`${l.dasharray.join(",")},${l.round}`;n.dashDependencies[u]=a,n.dashDependencies[c]=o,n.dashDependencies[h]=l,e.dashes[i.id]={min:u,mid:c,max:h};}}}let ec,rc;ps("LineBucket",tc,{omit:["layers","patternFeatures"]});var nc={get paint(){return rc=rc||new Hs({"line-opacity":new Gs(vt.paint_line["line-opacity"]),"line-color":new Gs(vt.paint_line["line-color"]),"line-translate":new js(vt.paint_line["line-translate"]),"line-translate-anchor":new js(vt.paint_line["line-translate-anchor"]),"line-width":new Gs(vt.paint_line["line-width"]),"line-gap-width":new Gs(vt.paint_line["line-gap-width"]),"line-offset":new Gs(vt.paint_line["line-offset"]),"line-blur":new Gs(vt.paint_line["line-blur"]),"line-dasharray":new Xs(vt.paint_line["line-dasharray"]),"line-pattern":new Xs(vt.paint_line["line-pattern"]),"line-gradient":new Zs(vt.paint_line["line-gradient"])})},get layout(){return ec=ec||new Hs({"line-cap":new js(vt.layout_line["line-cap"]),"line-join":new Gs(vt.layout_line["line-join"]),"line-miter-limit":new js(vt.layout_line["line-miter-limit"]),"line-round-limit":new js(vt.layout_line["line-round-limit"]),"line-sort-key":new Gs(vt.layout_line["line-sort-key"])})}};class ic extends Gs{possiblyEvaluate(t,e){return e=new Ps(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,n){return e=O({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,n)}}let sc;class ac extends Ks{constructor(t,e){super(t,nc,e),this.gradientVersion=0,sc||(sc=new ic(nc.paint.properties["line-width"].specification),sc.useIntegerZoom=!0);}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this.gradientExpression();this.stepInterpolant=!!function(t){return void 0!==t._styleExpression}(t)&&t._styleExpression.expression instanceof or,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER;}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=sc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t);}createBucket(t){return new tc(t)}queryRadius(t){const e=t,r=oc(rl("line-width",this,e),rl("line-gap-width",this,e)),n=rl("line-offset",this,e);return r/2+Math.abs(n)+nl(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:n,geometry:i,transform:s,pixelsToTileUnits:a}){const o=il(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-s.bearingInRadians,a),l=a/2*oc(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),u=this.paint.get("line-offset").evaluate(e,n);return u&&(i=function(t,e){const n=[];for(let i=0;i=3)for(let e=0;e0?e+2*t:t}const lc=na([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),uc=na([{name:"a_projected_pos",components:3,type:"Float32"}],4);na([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const cc=na([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);na([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const hc=na([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),pc=na([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function fc(t,e,r){return t.sections.forEach((t=>{t.text=function(t,e,r){const n=e.layout.get("text-transform").evaluate(r,{});return "uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),zs.applyArabicShaping&&(t=zs.applyArabicShaping(t)),t}(t.text,e,r);})),t}na([{name:"triangle",components:3,type:"Uint16"}]),na([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),na([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),na([{type:"Float32",name:"offsetX"}]),na([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),na([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var dc=24;const yc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},mc={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},gc={40:!0};function xc(t,e,r,n,i,s){if("fontStack"in e){const n=r[e.fontStack],s=n&&n[t];return s?s.metrics.advance*e.scale+i:0}{const t=n[e.imageName];return t?t.displaySize[0]*e.scale*dc/s+i:0}}function vc(t,e,r,n){const i=Math.pow(t-e,2);return n?tMath.max(t,this.sections[e].scale)),0)}getMaxImageSize(t){let e=0,r=0;for(let n=0;nr)));}addImageSection(t){const e=t.image?t.image.name:"";if(0===e.length)return void j("Can't add FormattedSection with an empty image.");const r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push({scale:1,verticalAlign:t.verticalAlign||"bottom",imageName:e}),this.sectionIndex.push(this.sections.length-1)):j("Reached maximum number of images 6401");}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,e,r,n,i){const s=[],a=this.determineAverageLineWidth(t,e,r,n,i),o=this.hasZeroWidthSpaces();let l=0,u=0;const c=this.text[Symbol.iterator]();let h=c.next();const p=this.text[Symbol.iterator]();p.next();let f=p.next();const d=this.text[Symbol.iterator]();d.next(),d.next();let y=d.next();for(;!h.done;){const e=this.getSection(u),m=h.value.codePointAt(0);if(ws(m)||(l+=xc(m,e,r,n,t,i)),!f.done){const t=vs(m),r=f.value.codePointAt(0);(mc[m]||t||"imageName"in e||!y.done&&gc[r])&&s.push(wc(u+1,l,a,s,bc(m,r,t&&o),!1));}u++,h=c.next(),f=p.next(),y=d.next();}return _c(wc(this.length(),l,a,s,0,!0))}determineAverageLineWidth(t,e,r,n,i){let s=0,a=0;for(const e of this.text){const o=this.getSection(a);s+=xc(e.codePointAt(0),o,r,n,t,i),a++;}return s/Math.max(1,Math.ceil(s/e))}}const Ac=4294967296,kc=1/Ac,Ec="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class Tc{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length;}readFields(t,e,r=this.length){for(;this.pos>3,i=this.pos;this.type=7&r,t(n,e,this),this.pos===i&&this.skip(r);}return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Ac;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Ac;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const e=this.buf;let r,n;return n=e[this.pos++],r=127&n,n<128?r:(n=e[this.pos++],r|=(127&n)<<7,n<128?r:(n=e[this.pos++],r|=(127&n)<<14,n<128?r:(n=e[this.pos++],r|=(127&n)<<21,n<128?r:(n=e[this.pos],r|=(15&n)<<28,function(t,e,r){const n=r.buf;let i,s;if(s=n[r.pos++],i=(112&s)>>4,s<128)return Ic(t,i,e);if(s=n[r.pos++],i|=(127&s)<<3,s<128)return Ic(t,i,e);if(s=n[r.pos++],i|=(127&s)<<10,s<128)return Ic(t,i,e);if(s=n[r.pos++],i|=(127&s)<<17,s<128)return Ic(t,i,e);if(s=n[r.pos++],i|=(127&s)<<24,s<128)return Ic(t,i,e);if(s=n[r.pos++],i|=(1&s)<<31,s<128)return Ic(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(r,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return Boolean(this.readVarint())}readString(){const t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Ec?Ec.decode(this.buf.subarray(e,t)):function(t,e,r){let n="",i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+u>r)break;1===u?e<128&&(l=e):2===u?(s=t[i+1],128==(192&s)&&(l=(31&e)<<6|63&s,l<=127&&(l=null))):3===u?(s=t[i+1],a=t[i+2],128==(192&s)&&128==(192&a)&&(l=(15&e)<<12|(63&s)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===u&&(s=t[i+1],a=t[i+2],o=t[i+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&e)<<18|(63&s)<<12|(63&a)<<6|63&o,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u;}return n}(this.buf,e,t)}readBytes(){const t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){const r=this.readPackedEnd();for(;this.pos127;);else if(2===e)this.pos=this.readVarint()+this.pos;else if(5===e)this.pos+=4;else {if(1!==e)throw new Error(`Unimplemented type: ${e}`);this.pos+=8;}}writeTag(t,e){this.writeVarint(t<<3|e);}realloc(t){let e=this.length||16;for(;e268435455||t<0?function(t,e){let r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),4294967295^r?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,r.buf[r.pos]=127&(t>>>=7);}(r,0,e),function(t,e){const r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))));}(n,e);}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))));}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t);}writeBoolean(t){this.writeVarint(+t);}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const e=this.pos;this.pos=function(t,e,r){for(let n,i,s=0;s55295&&n<57344){if(!i){n>56319||s+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null;}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128);}return r}(this.buf,t,this.pos);const r=this.pos-e;r>=128&&Mc(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r;}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4;}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8;}writeBytes(t){const e=t.length;this.writeVarint(e),this.realloc(e);for(let r=0;r=128&&Mc(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n;}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r);}writePackedVarint(t,e){e.length&&this.writeMessage(t,Fc,e);}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Dc,e);}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Bc,e);}writePackedFloat(t,e){e.length&&this.writeMessage(t,zc,e);}writePackedDouble(t,e){e.length&&this.writeMessage(t,Pc,e);}writePackedFixed32(t,e){e.length&&this.writeMessage(t,Vc,e);}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Cc,e);}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Lc,e);}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Oc,e);}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e);}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e);}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e);}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e);}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e);}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e);}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e);}writeStringField(t,e){this.writeTag(t,2),this.writeString(e);}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e);}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e);}writeBooleanField(t,e){this.writeVarintField(t,+e);}}function Ic(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Mc(t,e,r){const n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(let e=r.pos-1;e>=t;e--)r.buf[e+n]=r.buf[e];}function Fc(t,e){for(let r=0;re.h-t.h));const n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let i=0,s=0;for(const e of t)for(let t=n.length-1;t>=0;t--){const r=n[t];if(!(e.w>r.w||e.h>r.h)){if(e.x=r.x,e.y=r.y,s=Math.max(s,e.y+e.h),i=Math.max(i,e.x+e.w),e.w===r.w&&e.h===r.h){const e=n.pop();e&&tm.toCodeUnitIndex(t)));const t=v(m.toString(),x);for(const e of t){const t=[...e].map((()=>0));g.push(new Sc(e,m.sections,t));}}else if(b){g=[],x=x.map((t=>m.toCodeUnitIndex(t)));let t=0;const e=[];for(const r of m.text)e.push(...Array(r.length).fill(m.sectionIndex[t])),t++;const r=b(m.text,e,x);for(const t of r){const e=[];let r="";for(const n of t[0])e.push(t[1][r.length]),r+=n;g.push(new Sc(t[0],m.sections,e));}}else g=function(t,e){const r=[];let n=0;for(const i of e)r.push(t.substring(n,i)),n=i;return nu){const t=Math.ceil(s/u);i*=t/a,a=t;}return {x1:n,y1:i,x2:n+s,y2:i+a}}function rh(t,e,r,n,i,s){const a=t.image;let o;if(a.content){const t=a.content,e=a.pixelRatio||1;o=[t[0]/e,t[1]/e,a.displaySize[0]-t[2]/e,a.displaySize[1]-t[3]/e];}const l=e.left*s,u=e.right*s;let c,h,p,f;"width"===r||"both"===r?(f=i[0]+l-n[3],h=i[0]+u+n[1]):(f=i[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const d=e.top*s,y=e.bottom*s;return "height"===r||"both"===r?(c=i[1]+d-n[0],p=i[1]+y+n[2]):(c=i[1]+(d+y-a.displaySize[1])/2,p=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:p,left:f,collisionPadding:o}}ps("ImagePosition",qc),ps("ImageAtlas",jc),t.az=void 0,(Gc=t.az||(t.az={}))[Gc.none=0]="none",Gc[Gc.horizontal=1]="horizontal",Gc[Gc.vertical=2]="vertical",Gc[Gc.horizontalOnly=3]="horizontalOnly";const nh=128,ih=32640;function sh(t,e){const{expression:r}=e;if("constant"===r.kind)return {kind:"constant",layoutSize:r.evaluate(new Ps(t+1))};if("source"===r.kind)return {kind:"source"};{const{zoomStops:e,interpolationType:n}=r;let i=0;for(;it.id)),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=sh(this.zoom,r["text-size"]),this.iconSizeData=sh(this.zoom,r["icon-size"]);const n=this.layers[0].layout,i=n.get("symbol-sort-key"),s=n.get("symbol-z-order");this.canOverlap="never"!==ah(n,"text-overlap","text-allow-overlap")||"never"!==ah(n,"icon-overlap","icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==s&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===s||"auto"===s&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map((e=>t.az[e]))),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=e.sourceID;}createArrays(){this.text=new hh(new Vo(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new hh(new Vo(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new Va,this.lineVertexArray=new Ca,this.symbolInstances=new Ba,this.textAnchorOffsets=new Oa;}calculateGlyphDependencies(t,e,r,n,i){for(const s of t)if(e[s.codePointAt(0)]=!0,(r||n)&&i){const t=yc[s];t&&(e[t.codePointAt(0)]=!0);}}populate(e,r,n){const i=this.layers[0],s=i.layout,a=s.get("text-font"),o=s.get("text-field"),l=s.get("icon-image"),u=("constant"!==o.value.kind||o.value.value instanceof De&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,h=s.get("symbol-sort-key");if(this.features=[],!u&&!c)return;const p=r.iconDependencies,f=r.glyphDependencies,d=r.availableImages,y=new Ps(this.zoom);for(const{feature:r,id:o,index:l,sourceLayerIndex:m}of e){const e=i._featureFilter.needGeometry,g=$o(r,e);if(!i._featureFilter.filter(y,g,n))continue;let x,v;if(e||(g.geometry=No(r)),u){const t=i.getValueAndResolveTokens("text-field",g,n,d),e=De.factory(t),r=this.hasRTLText=this.hasRTLText||ch(e);(!r||"unavailable"===zs.getRTLTextPluginStatus()||r&&zs.isParsed())&&(x=fc(e,i,g));}if(c){const t=i.getValueAndResolveTokens("icon-image",g,n,d);v=t instanceof Oe?t:Oe.fromString(t);}if(!x&&!v)continue;const b=this.sortFeaturesByKey?h.evaluate(g,{},n):void 0;if(this.features.push({id:o,text:x,icon:v,index:l,sourceLayerIndex:m,geometry:g.geometry,properties:r.properties,type:Mu.types[r.type],sortKey:b}),v&&(p[v.name]=!0),x){const e=a.evaluate(g,{},n).join(","),r="viewport"!==s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.az.vertical)>=0;for(const t of x.sections)if(t.image)p[t.image.name]=!0;else {const n=_s(x.toString()),i=t.fontStack||e,s=f[i]=f[i]||{};this.calculateGlyphDependencies(t.text,s,r,this.allowVerticalPlacement,n);}}}"line"===s.get("symbol-placement")&&(this.features=function(t){const e={},r={},n=[];let i=0;function s(e){n.push(t[e]),i++;}function a(t,e,i){const s=r[t];return delete r[t],r[e]=s,n[s].geometry[0].pop(),n[s].geometry[0]=n[s].geometry[0].concat(i[0]),s}function o(t,r,i){const s=e[r];return delete e[r],e[t]=s,n[s].geometry[0].shift(),n[s].geometry[0]=i[0].concat(n[s].geometry[0]),s}function l(t,e,r){const n=r?e[0][e[0].length-1]:e[0][0];return `${t}:${n.x}:${n.y}`}for(let u=0;ut.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey));}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}));}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return !this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0;}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy();}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData();}addToLineVertexArray(t,e){const r=this.lineVertexArray.length;if(void 0!==t.segment){let r=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]);const i={};for(let n=t.segment+1;n=0;r--)i[r]={x:e[r].x,y:e[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=e[r-1].dist(e[r]));for(let t=0;t0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs;for(let e=r.vertexStartIndex;en[t]-n[e]||i[e]-i[t])),s}addToSortKeyRanges(t,e){const r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1});}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(((t,e,r)=>{t>=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t);})),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex);}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray);}}}let dh,yh;ps("SymbolBucket",fh,{omit:["layers","collisionBoxArray","features","compareText"]}),fh.MAX_GLYPHS=65535,fh.addDynamicAttributes=uh;var mh={get paint(){return yh=yh||new Hs({"icon-opacity":new Gs(vt.paint_symbol["icon-opacity"]),"icon-color":new Gs(vt.paint_symbol["icon-color"]),"icon-halo-color":new Gs(vt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Gs(vt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Gs(vt.paint_symbol["icon-halo-blur"]),"icon-translate":new js(vt.paint_symbol["icon-translate"]),"icon-translate-anchor":new js(vt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Gs(vt.paint_symbol["text-opacity"]),"text-color":new Gs(vt.paint_symbol["text-color"],{runtimeType:Rt,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new Gs(vt.paint_symbol["text-halo-color"]),"text-halo-width":new Gs(vt.paint_symbol["text-halo-width"]),"text-halo-blur":new Gs(vt.paint_symbol["text-halo-blur"]),"text-translate":new js(vt.paint_symbol["text-translate"]),"text-translate-anchor":new js(vt.paint_symbol["text-translate-anchor"])})},get layout(){return dh=dh||new Hs({"symbol-placement":new js(vt.layout_symbol["symbol-placement"]),"symbol-spacing":new js(vt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new js(vt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Gs(vt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new js(vt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new js(vt.layout_symbol["icon-allow-overlap"]),"icon-overlap":new js(vt.layout_symbol["icon-overlap"]),"icon-ignore-placement":new js(vt.layout_symbol["icon-ignore-placement"]),"icon-optional":new js(vt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new js(vt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Gs(vt.layout_symbol["icon-size"]),"icon-text-fit":new js(vt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new js(vt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Gs(vt.layout_symbol["icon-image"]),"icon-rotate":new Gs(vt.layout_symbol["icon-rotate"]),"icon-padding":new Gs(vt.layout_symbol["icon-padding"]),"icon-keep-upright":new js(vt.layout_symbol["icon-keep-upright"]),"icon-offset":new Gs(vt.layout_symbol["icon-offset"]),"icon-anchor":new Gs(vt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new js(vt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new js(vt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new js(vt.layout_symbol["text-rotation-alignment"]),"text-field":new Gs(vt.layout_symbol["text-field"]),"text-font":new Gs(vt.layout_symbol["text-font"]),"text-size":new Gs(vt.layout_symbol["text-size"]),"text-max-width":new Gs(vt.layout_symbol["text-max-width"]),"text-line-height":new js(vt.layout_symbol["text-line-height"]),"text-letter-spacing":new Gs(vt.layout_symbol["text-letter-spacing"]),"text-justify":new Gs(vt.layout_symbol["text-justify"]),"text-radial-offset":new Gs(vt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new js(vt.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Gs(vt.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Gs(vt.layout_symbol["text-anchor"]),"text-max-angle":new js(vt.layout_symbol["text-max-angle"]),"text-writing-mode":new js(vt.layout_symbol["text-writing-mode"]),"text-rotate":new Gs(vt.layout_symbol["text-rotate"]),"text-padding":new js(vt.layout_symbol["text-padding"]),"text-keep-upright":new js(vt.layout_symbol["text-keep-upright"]),"text-transform":new Gs(vt.layout_symbol["text-transform"]),"text-offset":new Gs(vt.layout_symbol["text-offset"]),"text-allow-overlap":new js(vt.layout_symbol["text-allow-overlap"]),"text-overlap":new js(vt.layout_symbol["text-overlap"]),"text-ignore-placement":new js(vt.layout_symbol["text-ignore-placement"]),"text-optional":new js(vt.layout_symbol["text-optional"])})}};class gh{constructor(t){if(void 0===t.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:Vt,this.defaultValue=t;}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression);}outputDefined(){return !1}serialize(){return null}}ps("FormatSectionOverride",gh,{omit:["defaultValue"]});class xh extends Ks{constructor(t,e){super(t,mh,e);}recalculate(t,e){if(super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const t=this.layout.get("text-writing-mode");if(t){const e=[];for(const r of t)e.indexOf(r)<0&&e.push(r);this.layout._values["text-writing-mode"]=e;}else this.layout._values["text-writing-mode"]=["horizontal"];}this._setPaintOverrides();}getValueAndResolveTokens(t,e,r,n){const i=this.layout.get(t).evaluate(e,{},r,n),s=this._unevaluatedLayout._values[t];return s.isDataDriven()||ri(s.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,((e,r)=>t&&r in t?String(t[r]):""))}(e.properties,i)}createBucket(t){return new fh(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of mh.paint.overridableProperties){if(!xh.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),r=new gh(e),n=new ei(r,e.property.specification);let i=null;i="constant"===e.value.kind||"source"===e.value.kind?new ii("source",n):new si("composite",n,e.value.zoomStops),this.paint._values[t]=new Us(e.property,i,e.parameters);}}_handleOverridablePaintPropertyUpdate(t,e,r){return !(!this.layout||e.isDataDriven()||r.isDataDriven())&&xh.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const r=t.get("text-field"),n=mh.paint.properties[e];let i=!1;const s=t=>{for(const e of t)if(n.overrides&&n.overrides.hasOverride(e))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof De)s(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){const t=e=>{i||(e instanceof je&&Ue(e.value)===jt?s(e.value.sections):e instanceof Ir?s(e.sections):e.eachChild(t));},e=r.value;e._styleExpression&&t(e._styleExpression.expression);}return i}}let vh;var bh={get paint(){return vh=vh||new Hs({"background-color":new js(vt.paint_background["background-color"]),"background-pattern":new Ys(vt.paint_background["background-pattern"]),"background-opacity":new js(vt.paint_background["background-opacity"])})}};class wh extends Ks{constructor(t,e){super(t,bh,e);}}class _h extends Ks{constructor(t,e){super(t,{},e),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl);},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl);},this.implementation=t;}is3D(){return "3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return !1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Sh{constructor(t){this._methodToThrottle=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle();});}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle();}),0));}remove(){delete this._channel,this._methodToThrottle=()=>{};}}const Ah={once:!0},kh=6371008.8;class Eh{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error(`Invalid LngLat object: (${t}, ${e})`);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Eh(L(this.lng,-180,180),this.lat)}toArray(){return [this.lng,this.lat]}toString(){return `LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return kh*Math.acos(Math.min(i,1))}static convert(t){if(t instanceof Eh)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Eh(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Eh(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const Th=2*Math.PI*kh;function Ih(t){return Th*Math.cos(t*Math.PI/180)}function Mh(t){return (180+t)/360}function Fh(t){return (180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Dh(t,e){return t/Ih(e)}function zh(t){return 360*t-180}function Ph(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function Bh(t,e){return t*Ih(Ph(e))}class Vh{constructor(t,e,r=0){this.x=+t,this.y=+e,this.z=+r;}static fromLngLat(t,e=0){const r=Eh.convert(t);return new Vh(Mh(r.lng),Fh(r.lat),Dh(e,r.lat))}toLngLat(){return new Eh(zh(this.x),Ph(this.y))}toAltitude(){return Bh(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Th*(t=Ph(this.y),1/Math.cos(t*Math.PI/180));var t;}}function Ch(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return [t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}class Lh{constructor(t,e,r){if(!function(t,e,r){return !(t<0||t>25||r<0||r>=Math.pow(2,t)||e<0||e>=Math.pow(2,t))}(t,e,r))throw new Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Nh(0,t,t,e,r);}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){const n=function(t,e,r){var n=Ch(256*t,256*(e=Math.pow(2,r)-e-1),r),i=Ch(256*(t+1),256*(e+1),r);return n[0]+","+n[1]+","+i[0]+","+i[1]}(this.x,this.y,this.z),i=function(t,e,r){let n,i="";for(let s=t;s>0;s--)n=1<1?"@2x":"").replace(/{quadkey}/g,i).replace(/{bbox-epsg-3857}/g,n)}isChildOf(t){const e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){const e=Math.pow(2,this.z);return new r((t.x*e-this.x)*M,(t.y*e-this.y)*M)}toString(){return `${this.z}/${this.x}/${this.y}`}}class Oh{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Nh(t,e.z,e.z,e.x,e.y);}}class Rh{constructor(t,e,r,n,i){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${r}`);this.overscaledZ=t,this.wrap=e,this.canonical=new Lh(r,+n,+i),this.key=Nh(e,t,r,n,i);}clone(){return new Rh(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const e=this.canonical.z-t;return t>this.canonical.z?new Rh(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Rh(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,e){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-t;return t>this.canonical.z?Nh(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Nh(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(t){if(t.wrap!==this.wrap)return !1;if(this.overscaledZ-t.overscaledZ<=0)return !1;if(0===t.overscaledZ)return this.overscaledZ>0;const e=this.canonical.z-t.canonical.z;return !(e<0)&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return [new Rh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return [new Rh(e,this.wrap,e,r,n),new Rh(e,this.wrap,e,r+1,n),new Rh(e,this.wrap,e,r,n+1),new Rh(e,this.wrap,e,r+1,n+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.yt.key===r));e>-1&&t.addOrUpdateProperties.splice(e,1);}return (t.removeAllProperties||e.removeAllProperties)&&(r.removeAllProperties=!0),(t.removeProperties||e.removeProperties)&&(r.removeProperties=[...t.removeProperties||[],...e.removeProperties||[]]),(t.addOrUpdateProperties||e.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...t.addOrUpdateProperties||[],...e.addOrUpdateProperties||[]]),(t.newGeometry||e.newGeometry)&&(r.newGeometry=e.newGeometry||t.newGeometry),r}function qh(t){var e,r;if(!t)return {};const n={};return n.removeAll=t.removeAll,n.remove=new Set(t.remove||[]),n.add=new Map(null===(e=t.add)||void 0===e?void 0:e.map((t=>[t.id,t]))),n.update=new Map(null===(r=t.update)||void 0===r?void 0:r.map((t=>[t.id,t]))),n}ps("CanonicalTileID",Lh),ps("OverscaledTileID",Rh,{omit:["terrainRttPosMatrix32f"]});class jh{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0;}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){const e=new jh;return e.extend(t(new r(this.minX,this.minY))),e.extend(t(new r(this.maxX,this.minY))),e.extend(t(new r(this.minX,this.maxY))),e.extend(t(new r(this.maxX,this.maxY))),e}static fromPoints(t){const e=new jh;for(const r of t)e.extend(r);return e}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return !this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return !this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class Gh{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Xh{constructor(t,e,r,n,i){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=n,this._z=e,this.properties=t.properties,this.id=i;}projectPoint(t,e,r,n){return [360*(t.x+e)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+r)/n)*Math.PI))-90]}projectLine(t,e,r,n){return t.map((t=>this.projectPoint(t,e,r,n)))}get geometry(){if(this._geometry)return this._geometry;const t=this._vectorTileFeature,e=t.extent*Math.pow(2,this._z),r=t.extent*this._x,n=t.extent*this._y,i=t.loadGeometry();switch(t.type){case 1:{const t=[];for(const e of i)t.push(e[0]);const s=this.projectLine(t,r,n,e);this._geometry=1===t.length?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{const t=i.map((t=>this.projectLine(t,r,n,e)));this._geometry=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t};break}case 3:{const t=Du(i),s=[];for(const i of t)s.push(i.map((t=>this.projectLine(t,r,n,e))));this._geometry=1===s.length?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw new Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t;}toJSON(){const t={geometry:this.geometry};for(const e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"_x"!==e&&"_y"!==e&&"_z"!==e&&(t[e]=this[e]);return t}}class Yh{_name;dataBuffer;nullabilityBuffer;_size;constructor(t,e,r){this._name=t,this.dataBuffer=e,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size());}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){return this.nullabilityBuffer&&this.nullabilityBuffer.get(t)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Zh extends Yh{}class Hh extends Zh{getValueFromBuffer(t){return this.dataBuffer[t]}}class Kh extends Zh{getValueFromBuffer(t){return this.dataBuffer[t]}}class Wh extends Yh{delta;constructor(t,e,r,n){super(t,e,n),this.delta=r;}}class Jh extends Wh{constructor(t,e,r,n){super(t,Int32Array.of(e),r,n);}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}}class Qh extends Yh{constructor(t,e,r){super(t,Int32Array.of(e),r);}getValueFromBuffer(t){return this.dataBuffer[0]}}class tp{_name;_geometryVector;_idVector;_propertyVectors;_extent;propertyVectorsMap;constructor(t,e,r,n,i=4096){this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=n,this._extent=i;}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((t=>[t.name,t])))),this.propertyVectorsMap.get(t)}*[Symbol.iterator](){const t=this.geometryVector[Symbol.iterator]();let e=0;for(;e>4,i<128)return 4294967296*n+(t>>>0);if(i=e[r.get()],r.increment(),n|=(127&i)<<3,i<128)return 4294967296*n+(t>>>0);if(i=e[r.get()],r.increment(),n|=(127&i)<<10,i<128)return 4294967296*n+(t>>>0);if(i=e[r.get()],r.increment(),n|=(127&i)<<17,i<128)return 4294967296*n+(t>>>0);if(i=e[r.get()],r.increment(),n|=(127&i)<<24,i<128)return 4294967296*n+(t>>>0);if(i=e[r.get()],r.increment(),n|=(1&i)<<31,i<128)return 4294967296*n+(t>>>0);throw new Error("Expected varint not more than 10 bytes")}(r,t,e)))))}function yp(t,e,r,n){throw new Error("FastPFor is not implemented yet.")}function mp(t){return t>>>1^-(1&t)}function gp(t){return t>>1n^-(1n&t)}function xp(t,e){let r=0n,n=0,i=e.get();for(;i=64)throw new Error("Varint too long")}return e.set(i),r}function vp(t,e,r){const n=new Int32Array(r);let i=0;for(let r=0;r=4)for(let n=t[0];r>>1^-(1&t[0]),t[1]=t[1]>>>1^-(1&t[1]);const e=t.length/4*4;let r=2;if(e>=4)for(;r>>1^-(1&e))+t[r-2],t[r+1]=(n>>>1^-(1&n))+t[r-1],t[r+2]=(i>>>1^-(1&i))+t[r],t[r+3]=(s>>>1^-(1&s))+t[r+1];}for(;r!=t.length;r+=2)t[r]=(t[r]>>>1^-(1&t[r]))+t[r-2],t[r+1]=(t[r+1]>>>1^-(1&t[r+1]))+t[r-1];}!function(t){t.NONE="NONE",t.DELTA="DELTA",t.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",t.RLE="RLE",t.MORTON="MORTON",t.PDE="PDE";}(rp||(rp={})),function(t){t.NONE="NONE",t.FAST_PFOR="FAST_PFOR",t.VARINT="VARINT",t.ALP="ALP";}(np||(np={})),function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH";}(ip||(ip={}));class Ap{_dictionaryType;_offsetType;_lengthType;constructor(t,e,r){this._dictionaryType=t,this._offsetType=e,this._lengthType=r;}get dictionaryType(){return this._dictionaryType}get offsetType(){return this._offsetType}get lengthType(){return this._lengthType}}function kp(t,e){const r=function(t,e){const r=t[e.get()],n=Object.values(ip)[r>>4];let i=null;switch(n){case ip.DATA:i=new Ap(Object.values(sp)[15&r]);break;case ip.OFFSET:i=new Ap(null,Object.values(ap)[15&r]);break;case ip.LENGTH:i=new Ap(null,null,Object.values(op)[15&r]);}e.increment();const s=t[e.get()],a=Object.values(rp)[s>>5],o=Object.values(rp)[s>>2&7],l=Object.values(np)[3&s];e.increment();const u=pp(t,e,2),c=u[0];return {physicalStreamType:n,logicalStreamType:i,logicalLevelTechnique1:a,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:c,byteLength:u[1],decompressedCount:c}}(t,e);return r.logicalLevelTechnique1===rp.MORTON?function(t,e,r){const n=pp(e,r,2);return {physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:n[0],coordinateShift:n[1]}}(r,t,e):rp.RLE!==r.logicalLevelTechnique1&&rp.RLE!==r.logicalLevelTechnique2||np.NONE===r.physicalLevelTechnique?r:function(t,e,r){const n=pp(e,r,2);return {physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:n[1],runs:n[0],numRleValues:n[1]}}(r,t,e)}!function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST";}(sp||(sp={})),function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY";}(ap||(ap={})),function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY";}(op||(op={})),function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY";}(lp||(lp={}));class Ep{values;_size;constructor(t,e){this.values=t,this._size=e;}get(t){const e=Math.floor(t/8);return 1==(this.values[e]>>t%8&1)}set(t,e){const r=Math.floor(t/8);this.values[r]=this.values[r]|(e?1:0)<>t%8&1}size(){return this._size}getBuffer(){return this.values}}function Tp(t,e,r,n,i){return function(t,e,r){switch(e.logicalLevelTechnique1){case rp.DELTA:return e.logicalLevelTechnique2===rp.RLE?function(t,e,r){const n=new Int32Array(r);let i=0,s=0;for(let r=0;r>>1^-(1&t[0]);const e=t.length/4*4;let r=1;if(e>=4)for(;r>>1^-(1&e))+t[r-1],t[r+1]=(n>>>1^-(1&n))+t[r],t[r+2]=(i>>>1^-(1&i))+t[r+1],t[r+3]=(s>>>1^-(1&s))+t[r+2];}for(;r!=t.length;++r)t[r]=(t[r]>>>1^-(1&t[r]))+t[r-1];}(t),t);case rp.RLE:return function(t,e,r){return r?function(t,e,r){const n=new Int32Array(r);let i=0;for(let r=0;r>>1^-(1&a),n.fill(a,i,i+s),i+=s;}return n}(t,e.runs,e.numRleValues):vp(t,e.runs,e.numRleValues)}(t,e,r);case rp.MORTON:return _p(t),t;case rp.COMPONENTWISE_DELTA:return Sp(t),t;case rp.NONE:return r&&function(t){for(let e=0;e>>1^-(1&r);}}(t),t;default:throw new Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}(Mp(t,e,r),r,n)}function Ip(t,e,r){return function(t,e){if(e.logicalLevelTechnique1===rp.DELTA&&e.logicalLevelTechnique2===rp.NONE){const e=function(t){const e=new Int32Array(t.length+1);e[0]=0,e[1]=mp(t[0]);let r=e[1],n=2;for(;n!=e.length;++n){const i=t[n-1];r+=i>>>1^-(1&i),e[n]=e[n-1]+r;}return e}(t);return e}if(e.logicalLevelTechnique1===rp.RLE&&e.logicalLevelTechnique2===rp.NONE){const r=function(t,e,r){const n=new Int32Array(r+1);n[0]=0;let i=1,s=n[0];for(let r=0;r>>1^-(1&o);for(let t=i;t>1n^-(1n&t[0]);const e=t.length/4*4;let r=1;if(e>=4)for(;r>1n^-(1n&e))+t[r-1],t[r+1]=(n>>1n^-(1n&n))+t[r],t[r+2]=(i>>1n^-(1n&i))+t[r+1],t[r+3]=(s>>1n^-(1n&s))+t[r+2];}for(;r!=t.length;++r)t[r]=(t[r]>>1n^-(1n&t[r]))+t[r-1];}(t),t);case rp.RLE:return function(t,e,r){return r?function(t,e,r){const n=new BigInt64Array(r);let i=0;for(let r=0;r>1n^-(1n&a),n.fill(a,i,i+s),i+=s;}return n}(t,e.runs,e.numRleValues):bp(t,e.runs,e.numRleValues)}(t,e,r);case rp.NONE:return r&&function(t){for(let e=0;e>1n^-(1n&r);}}(t),t;default:throw new Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}(fp(t,e,r.numValues),r,n)}function Bp(t,e,r,n){const i=fp(t,e,r.numValues);if(1===i.length){const t=i[0];return n?gp(t):t}return n?function(t){return gp(t[1])}(i):function(t){return t[1]}(i)}function Vp(t,e,r,n,i){return function(t,e,r,n){switch(e.logicalLevelTechnique1){case rp.DELTA:return e.logicalLevelTechnique2===rp.RLE&&(t=vp(t,e.runs,e.numRleValues)),function(t,e){const r=new Int32Array(t.size());let n=0;t.get(0)?(r[0]=t.get(0)?e[0]>>>1^-(1&e[0]):0,n=1):r[0]=0;let i=1;for(;i!=r.length;++i)r[i]=t.get(i)?r[i-1]+(e[n]>>>1^-(1&e[n++])):r[i-1];return r}(n,t);case rp.RLE:return function(t,e,r,n){const i=e;return r?function(t,e,r){const n=new Int32Array(t.size());let i=0;for(let s=0;s>>1^-(1&o);for(let e=i;e>>1^-(1&t);}else r[i]=0;return r}(n,t):function(t,e){const r=new Int32Array(t.size());let n=0,i=0;for(;i!=r.length;++i)r[i]=t.get(i)?e[n++]:0;return r}(n,t),t;default:throw new Error("The specified Logical level technique is not supported")}}(r.physicalLevelTechnique===np.FAST_PFOR?yp():pp(t,e,r.numValues),r,n,i)}function Cp(t,e,r,n){const i=t.logicalLevelTechnique1;if(i===rp.RLE)return 1===t.runs?lp.CONST:lp.FLAT;const s=e instanceof Ep?e.size():e;if(i===rp.DELTA&&t.logicalLevelTechnique2===rp.RLE){const e=t.runs,i=2;if(t.numRleValues!==s)return lp.FLAT;if(1===e)return lp.SEQUENCE;if(2===e){const e=n.get();let s;if(t.physicalLevelTechnique===np.VARINT)s=pp(r,n,4);else {const t=n.get();s=new Int32Array(r.buffer,r.byteOffset+t,4);}if(n.set(e),s[2]===i&&s[3]===i)return lp.SEQUENCE}}return 1===t.numValues?lp.CONST:lp.FLAT}class Lp extends Zh{getValueFromBuffer(t){return this.dataBuffer[t]}}class Op extends Wh{constructor(t,e,r,n){super(t,BigInt64Array.of(e),r,n);}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}}class Rp{_geometryOffsets;_partOffsets;_ringOffsets;constructor(t,e,r){this._geometryOffsets=t,this._partOffsets=e,this._ringOffsets=r;}get geometryOffsets(){return this._geometryOffsets}get partOffsets(){return this._partOffsets}get ringOffsets(){return this._ringOffsets}}function Np(t,e,r){return {x:$p(t,e)-r,y:$p(t>>1,e)-r}}function $p(t,e){let r=0;for(let n=0;n>n;return r}!function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON";}(up||(up={})),function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON";}(cp||(cp={})),function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3";}(hp||(hp={}));class Up{createPoint(t){return [[t]]}createMultiPoint(t){return t.map((t=>[t]))}createLineString(t){return [t]}createMultiLineString(t){return t}createPolygon(t,e){return [t].concat(e)}createMultiPolygon(t){return t.flat()}}function qp(t){const e=new Array(t.numGeometries);let n=1,i=1,s=1,a=0;const o=new Up;let l=0,u=0;const c=t.mortonSettings,h=t.topologyVector,p=h.geometryOffsets,f=h.partOffsets,d=h.ringOffsets,y=t.vertexOffsets,m=t.containsPolygonGeometry(),g=t.vertexBuffer;for(let h=0;h0&&e.push(e[0]),h.push(e);}t[e]=h,s&&u++;}break;case up.MULTIPOLYGON:{const c=s[u]-s[u-1];u++;const h=[];for(let t=0;t0&&e.push(e[0]),h.push(e);}}t[e]=h;}}return t}[Symbol.iterator](){return null}}function tf(t,e,r,n,i,s){return new ef(t,e,r,n,i,s)}class ef extends Qp{_numGeometries;_geometryType;constructor(t,e,r,n,i,s){super(r,n,i,s),this._numGeometries=t,this._geometryType=e;}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return !0}}function rf(t,e,r,n,i){return new nf(t,e,r,n,i)}class nf extends Qp{_geometryTypes;constructor(t,e,r,n,i){super(e,r,n,i),this._geometryTypes=t;}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return !1}}function sf(t,e,r,n,i){const s=kp(t,r);let a=null,o=null,l=null,u=null,c=null,h=null,p=null,f=null;if(Cp(s,n,t,r)===lp.CONST){const i=Fp(t,r,s,!1);for(let n=0;nr?e[s++]:1);return n}function of(t,e,r,n){const i=new Int32Array(e[e.length-1]+1);let s=0;i[0]=s;let a=1,o=0;for(let l=0;l=12?ff.decode(t.subarray(e,r)):function(t,e,r){let n="",i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+u>r)break;1===u?e<128&&(l=e):2===u?(s=t[i+1],128==(192&s)&&(l=(31&e)<<6|63&s,l<=127&&(l=null))):3===u?(s=t[i+1],a=t[i+2],128==(192&s)&&128==(192&a)&&(l=(15&e)<<12|(63&s)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===u&&(s=t[i+1],a=t[i+2],o=t[i+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&e)<<18|(63&s)<<12|(63&a)<<6|63&o,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u;}return n}(t,e,r)}class yf extends Yh{offsetBuffer;constructor(t,e,r,n){super(t,r,n),this.offsetBuffer=e;}}class mf extends yf{textEncoder;constructor(t,e,r,n){super(t,e,r,n??e.length-1),this.textEncoder=new TextEncoder;}getValueFromBuffer(t){return df(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class gf extends yf{indexBuffer;textEncoder;constructor(t,e,r,n,i){super(t,r,n,i??e.length),this.indexBuffer=e,this.indexBuffer=e,this.textEncoder=new TextEncoder;}getValueFromBuffer(t){const e=this.indexBuffer[t];return df(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class xf extends yf{indexBuffer;symbolOffsetBuffer;symbolTableBuffer;textEncoder;symbolLengthBuffer;lengthBuffer;decodedDictionary;constructor(t,e,r,n,i,s,a){super(t,r,n,a),this.indexBuffer=e,this.symbolOffsetBuffer=i,this.symbolTableBuffer=s,this.textEncoder=new TextEncoder;}getValueFromBuffer(t){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer),this.lengthBuffer=this.offsetToLengthBuffer(this.offsetBuffer)),this.decodedDictionary=function(t,e,r){const n=[],i=new Array(e.length).fill(0);for(let t=1;t>1n^-(1n&e[0]):0n,n=1):r[0]=0n;let i=1;for(;i!=r.length;++i)r[i]=t.get(i)?r[i-1]+(e[n]>>1n^-(1n&e[n++])):r[i-1];return r}(n,t);case rp.RLE:return function(t,e,r,n){const i=e;return r?function(t,e,r){const n=new BigInt64Array(t.size());let i=0;for(let s=0;s>1n^-(1n&o);for(let e=i;e>1n^-(1n&t);}else r[i]=0n;return r}(n,t):function(t,e){const r=new BigInt64Array(t.size());let n=0,i=0;for(;i!=r.length;++i)r[i]=t.get(i)?e[n++]:0n;return r}(n,t),t;default:throw new Error("The specified Logical level technique is not supported")}}(fp(t,e,r.numValues),r,n,i)}(t,e,s,o,n):Pp(t,e,s,o);return new Lp(r.name,i,n)}if(a===lp.SEQUENCE){const n=zp(t,e,s);return new Op(r.name,n[0],n[1],s.numRleValues)}{const i=Bp(t,e,s,o);return new cf(r.name,i,n)}}(e,r,s,l,i);case 7:return function(t,e,r,n){const i=kp(t,e),s=bf(n)?function(t,e,r,n){const i=e.get(),s=i+n*Float32Array.BYTES_PER_ELEMENT,a=new Uint8Array(t.subarray(i,s)).buffer,o=new Float32Array(a);e.set(s);const l=r.size(),u=new Float32Array(l);let c=0;for(let t=0;t>>0,n=!!(4&r),i=!!(2&r),s=pp(t,e,1)[0]>>>0,a={};if(1&r&&(a.nullable=!0),i){const i={};if(n?(i.type="logicalType",i.logicalType=s):(i.type="physicalType",i.physicalType=s),8&r){const r=pp(t,e,1)[0]>>>0;i.children=new Array(r);for(let n=0;n>>0,n=function(t){switch(t){case 0:case 1:case 2:case 3:{const e={};e.nullable=!!(1&t),e.columnScope=0;const r={};return r.physicalType=t>1?6:4,r.type="physicalType",e.scalarType=r,e.type="scalarType",e}case 4:{const t={nullable:!1,columnScope:0},e={type:"physicalType",physicalType:0};return t.type="complexType",t.complexType=e,t}case 30:{const t={nullable:!1,columnScope:0},e={type:"physicalType",physicalType:1};return t.type="complexType",t.complexType=e,t}default:return function(t){let e=null;switch(t){case 10:case 11:e=0;break;case 12:case 13:e=1;break;case 14:case 15:e=2;break;case 16:case 17:e=3;break;case 18:case 19:e=4;break;case 20:case 21:e=5;break;case 22:case 23:e=6;break;case 24:case 25:e=7;break;case 26:case 27:e=8;break;case 28:case 29:e=9;break;default:return null}const r={};r.nullable=!!(1&t),r.columnScope=0;const n={type:"physicalType"};return n.physicalType=e,r.type="scalarType",r.scalarType=n,r}(t)}}(r);if(!n)throw new Error(`Unsupported column type code: ${r}`);if(function(t){return t>=10}(r)?n.name=Sf(t,e):r>=0&&r<=3?n.name="id":4===r&&(n.name="geometry"),function(t){return 30===t}(r)){const r=pp(t,e,1)[0]>>>0,i=n.complexType;i.children=new Array(r);for(let n=0;n>>0,s=pp(t,e,1)[0]>>>0;n.columns=new Array(s);for(let r=0;r=4)for(;r>>0,s=n.get()+e;if(s>t.length)throw new Error(`Block overruns tile: ${s} > ${t.length}`);if(1!=pp(t,n,1)[0]>>>0){n.set(s);continue}const a=Ef(t,n),o=a[1],l=a[0].featureTables[0];let u=null,c=null;const h=[];let p=0;for(const e of l.columns){const i=e.name;if("id"===i){let s=null;if(e.nullable){const e=kp(t,n),r=n.get(),i=hf(t,e.numValues,n);n.set(r+e.byteLength),s=new Ep(i,e.numValues);}const a=kp(t,n);p=a.decompressedCount,u=Tf(t,e,n,i,a,s??p,r);}else if("geometry"===i){const e=pp(t,n,1)[0];if(0===p){const e=n.get();p=kp(t,n).decompressedCount,n.set(e);}c=sf(t,e,n,p);}else {const r=wf(e)?pp(t,n,1)[0]:1;if(0===r&&"scalarType"===e.type)continue;const i=vf(t,n,e,r,p);if(i)if(Array.isArray(i))for(const t of i)h.push(t);else h.push(i);}}const f=new tp(l.name,c,u,h,o);i.push(f),n.set(s);}return i}(new Uint8Array(t));this.layers=e.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e.name]:new Mf(e)})),{});}}class Df{constructor(t,e){this.feature=t,this.type=t.type,this.properties=t.tags?t.tags:{},this.extent=e,"id"in t&&("string"==typeof t.id?this.id=parseInt(t.id,10):"number"!=typeof t.id||isNaN(t.id)||(this.id=t.id));}loadGeometry(){const t=[],e=1===this.feature.type?[this.feature.geometry]:this.feature.geometry;for(const n of e){const e=[];for(const t of n)e.push(new r(t[0],t[1]));t.push(e);}return t}}const zf="_geojsonTileLayer";function Pf(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);const r={keys:[],values:[],keycache:{},valuecache:{}};for(let n=0;n>31}function Of(t,e){const r=t.loadGeometry(),n=t.type;let i=0,s=0;for(const a of r){let r=1;1===n&&(r=a.length),e.writeVarint(Cf(1,r));const o=3===n?a.length-1:a.length;for(let t=0;t=0&&n[3]>=0&&o.insert(a,n[0],n[1],n[2],n[3]);}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new Vu(new Tc(this.rawTileData)).layers:new Ff(this.rawTileData).layers,this.sourceLayerCoder=new Gh(this.vtLayers?Object.keys(this.vtLayers).sort():[zf])),this.vtLayers}query(t,e,n,i){this.loadVTLayers();const s=t.params,a=M/t.tileSize/t.scale,o=fi(s.filter,s.globalState),l=t.queryGeometry,u=t.queryPadding*a,c=jh.fromPoints(l),h=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),p=jh.fromPoints(t.cameraQueryGeometry).expandBy(u),f=this.grid3D.query(p.minX,p.minY,p.maxX,p.maxY,((e,n,i,s)=>function(t,e,n,i,s){for(const r of t)if(e<=r.x&&n<=r.y&&i>=r.x&&s>=r.y)return !0;const a=[new r(e,n),new r(e,s),new r(i,s),new r(i,n)];if(t.length>2)for(const e of a)if(tl(t,e))return !0;for(let e=0;e(p||(p=No(e)),r.queryIntersectsFeature({queryGeometry:l,feature:e,featureState:n,geometry:p,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))));}return d}loadMatchingFeature(t,e,r,n,i,s,a,o,l,u,c){const h=this.bucketLayerIDs[e];if(s&&!h.some((t=>s.has(t))))return;const p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(n);if(i.needGeometry){const t=$o(f,!0);if(!i.filter(new Ps(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!i.filter(new Ps(this.tileID.overscaledZ),f))return;const d=this.getId(f,p);for(let e=0;e{const a=e instanceof qs?e.get(s):null;return a&&a.evaluate?a.evaluate(r,n,i):a}))}function Uf(t,e){return e-t}function qf(t,e,n,i,s){const a=[];for(let o=0;o=i&&c.x>=i||(o.x>=i?o=new r(i,o.y+(i-o.x)/(c.x-o.x)*(c.y-o.y))._round():c.x>=i&&(c=new r(i,o.y+(i-o.x)/(c.x-o.x)*(c.y-o.y))._round()),o.y>=s&&c.y>=s||(o.y>=s?o=new r(o.x+(s-o.y)/(c.y-o.y)*(c.x-o.x),s)._round():c.y>=s&&(c=new r(o.x+(s-o.y)/(c.y-o.y)*(c.x-o.x),s)._round()),u&&o.equals(u[u.length-1])||(u=[o],a.push(u)),u.push(c)))));}}return a}function jf(t,e,r,n,i){switch(e){case 1:return function(t,e,r,n){const i=[];for(const s of t)for(const t of s){const s=0===n?t.x:t.y;s>=e&&s<=r&&i.push([t]);}return i}(t,r,n,i);case 2:return Xf(t,r,n,i,!1);case 3:return Xf(t,r,n,i,!0)}return []}function Gf(t,e,n,i,s){const a=0===i?Yf:Zf;let o=[];const l=[];for(let r=0;re&&o.push(a(u,c,e)):h>n?p=e&&(o.push(a(u,c,e)),f=!0),p>n&&h<=n&&(o.push(a(u,c,n)),f=!0),!s&&f&&(l.push(o),o=[]);}const u=t.length-1,c=0===i?t[u].x:t[u].y;return c>=e&&c<=n&&o.push(t[u]),s&&o.length>0&&!o[0].equals(o[o.length-1])&&o.push(new r(o[0].x,o[0].y)),o.length>0&&l.push(o),l}function Xf(t,e,r,n,i){const s=[];for(const a of t){const t=Gf(a,e,r,n,i);t.length>0&&s.push(...t);}return s}function Yf(t,e,n){return new r(n,t.y+(n-t.x)/(e.x-t.x)*(e.y-t.y))}function Zf(t,e,n){return new r(t.x+(n-t.y)/(e.y-t.y)*(e.x-t.x),n)}ps("FeatureIndex",Nf,{omit:["rawTileData","sourceLayerCoder"]});class Hf extends r{constructor(t,e,r,n){super(t,e),this.angle=r,void 0!==n&&(this.segment=n);}clone(){return new Hf(this.x,this.y,this.angle,this.segment)}}function Kf(t,e,r,n,i){if(void 0===e.segment||0===r)return !0;let s=e,a=e.segment+1,o=0;for(;o>-r/2;){if(a--,a<0)return !1;o-=t[a].dist(s),s=t[a];}o+=t[a].dist(t[a+1]),a++;const l=[];let u=0;for(;on;)u-=l.shift().angleDelta;if(u>i)return !1;a++,o+=e.dist(r);}return !0}function Wf(t){let e=0;for(let r=0;ru){const c=(u-l)/s,h=yr.number(n.x,i.x,c),p=yr.number(n.y,i.y,c),f=new Hf(h,p,i.angleTo(n),r);return f._round(),!a||Kf(t,f,o,a,e)?f:void 0}l+=s;}}function ed(t,e,r,n,i,s,a,o,l){const u=Jf(n,s,a),c=Qf(n,i),h=c*a,p=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&g=0&&x=0&&p+u<=c){const r=new Hf(g,x,y,e);r._round(),n&&!Kf(t,r,s,n,i)||f.push(r);}}h+=d;}return o||f.length||a||(f=rd(t,h/2,r,n,i,s,a,!0,l)),f}function nd(t,e,n,i){const s=[],a=t.image,o=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2;let c={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom};const h=a.stretchX||[[0,l]],p=a.stretchY||[[0,u]],f=(t,e)=>t+e[1]-e[0],d=h.reduce(f,0),y=p.reduce(f,0),m=l-d,g=u-y;let x=0,v=d,b=0,w=y,_=0,S=m,A=0,k=g;if(a.content&&i){const e=a.content,r=e[2]-e[0],n=e[3]-e[1];(a.textFitWidth||a.textFitHeight)&&(c=eh(t)),x=id(h,0,e[0]),b=id(p,0,e[1]),v=id(h,e[0],e[2]),w=id(p,e[1],e[3]),_=e[0]-x,A=e[1]-b,S=r-v,k=n-w;}const E=c.x1,T=c.y1,I=c.x2-E,M=c.y2-T,F=(t,i,s,l)=>{const u=ad(t.stretch-x,v,I,E),c=od(t.fixed-_,S,t.stretch,d),h=ad(i.stretch-b,w,M,T),p=od(i.fixed-A,k,i.stretch,y),f=ad(s.stretch-x,v,I,E),m=od(s.fixed-_,S,s.stretch,d),g=ad(l.stretch-b,w,M,T),F=od(l.fixed-A,k,l.stretch,y),D=new r(u,h),z=new r(f,h),P=new r(f,g),B=new r(u,g),V=new r(c/o,p/o),C=new r(m/o,F/o),L=e*Math.PI/180;if(L){const t=Math.sin(L),e=Math.cos(L),r=[e,-t,t,e];D._matMult(r),z._matMult(r),B._matMult(r),P._matMult(r);}const O=t.stretch+t.fixed,R=i.stretch+i.fixed;return {tl:D,tr:z,bl:B,br:P,tex:{x:a.paddedRect.x+1+O,y:a.paddedRect.y+1+R,w:s.stretch+s.fixed-O,h:l.stretch+l.fixed-R},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:V,pixelOffsetBR:C,minFontScaleX:S/o/I,minFontScaleY:k/o/M,isSDF:n}};if(i&&(a.stretchX||a.stretchY)){const t=sd(h,m,d),e=sd(p,g,y);for(let r=0;r0&&(n=Math.max(10,n),this.circleDiameter=n);}else {const u=(null===(h=a.image)||void 0===h?void 0:h.content)&&(a.image.textFitWidth||a.image.textFitHeight)?eh(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};u.y1=u.y1*o-l[0],u.y2=u.y2*o+l[2],u.x1=u.x1*o-l[3],u.x2=u.x2*o+l[1];const p=a.collisionPadding;if(p&&(u.x1-=p[0]*o,u.y1-=p[1]*o,u.x2+=p[2]*o,u.y2+=p[3]*o),c){const t=new r(u.x1,u.y1),e=new r(u.x2,u.y1),n=new r(u.x1,u.y2),i=new r(u.x2,u.y2),s=c*Math.PI/180;t._rotate(s),e._rotate(s),n._rotate(s),i._rotate(s),u.x1=Math.min(t.x,e.x,n.x,i.x),u.x2=Math.max(t.x,e.x,n.x,i.x),u.y1=Math.min(t.y,e.y,n.y,i.y),u.y2=Math.max(t.y,e.y,n.y,i.y);}t.emplaceBack(e.x,e.y,u.x1,u.y1,u.x2,u.y2,n,i,s);}this.boxEndIndex=t.length;}}class ud{constructor(t=[],e=(t,e)=>te?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t);}push(t){this.data.push(t),this._up(this.length++);}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return --this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,n=e[t];for(;t>0;){const i=t-1>>1,s=e[i];if(r(n,s)>=0)break;e[t]=s,t=i;}e[t]=n;}_down(t){const{data:e,compare:r}=this,n=this.length>>1,i=e[t];for(;t=0)break;e[t]=e[n],t=n;}e[t]=i;}}function cd(t,e=1,n=!1){const i=jh.fromPoints(t[0]),s=Math.min(i.width(),i.height());let a=s/2;const o=new ud([],hd),{minX:l,minY:u,maxX:c,maxY:h}=i;if(0===s)return new r(l,u);for(let e=l;ep.d||!p.d)&&(p=r,n&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,f)),r.max-p.d<=e||(a=r.h/2,o.push(new pd(r.p.x-a,r.p.y-a,a,t)),o.push(new pd(r.p.x+a,r.p.y-a,a,t)),o.push(new pd(r.p.x-a,r.p.y+a,a,t)),o.push(new pd(r.p.x+a,r.p.y+a,a,t)),f+=4);}return n&&(console.log(`num probes: ${f}`),console.log(`best distance: ${p.d}`)),p.p}function hd(t,e){return e.max-t.max}function pd(t,e,n,i){this.p=new r(t,e),this.h=n,this.d=function(t,e){let r=!1,n=1/0;for(let i=0;it.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(r=!r),n=Math.min(n,Jo(t,i,o));}}return (r?1:-1)*Math.sqrt(n)}(this.p,i),this.max=this.d+this.h*Math.SQRT2;}var fd;t.aP=void 0,(fd=t.aP||(t.aP={}))[fd.center=1]="center",fd[fd.left=2]="left",fd[fd.right=3]="right",fd[fd.top=4]="top",fd[fd.bottom=5]="bottom",fd[fd["top-left"]=6]="top-left",fd[fd["top-right"]=7]="top-right",fd[fd["bottom-left"]=8]="bottom-left",fd[fd["bottom-right"]=9]="bottom-right";const dd=Number.POSITIVE_INFINITY;function yd(t,e){return e[1]!==dd?function(t,e,r){let n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case "top-right":case "top-left":case "top":i=r-7;break;case "bottom-right":case "bottom-left":case "bottom":i=7-r;}switch(t){case "top-right":case "bottom-right":case "right":n=-e;break;case "top-left":case "bottom-left":case "left":n=e;}return [n,i]}(t,e[0],e[1]):function(t,e){let r=0,n=0;e<0&&(e=0);const i=e/Math.SQRT2;switch(t){case "top-right":case "top-left":n=i-7;break;case "bottom-right":case "bottom-left":n=7-i;break;case "bottom":n=7-e;break;case "top":n=e-7;}switch(t){case "top-right":case "bottom-right":r=-i;break;case "top-left":case "bottom-left":r=i;break;case "left":r=e;break;case "right":r=-e;}return [r,n]}(t,e[0])}function md(t,e,r){var n;const i=t.layout,s=null===(n=i.get("text-variable-anchor-offset"))||void 0===n?void 0:n.evaluate(e,{},r);if(s){const t=s.values,e=[];for(let r=0;rt*dc));n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),e[r+1]=i;}return new Le(e)}const a=i.get("text-variable-anchor");if(a){let n;n=void 0!==t._unevaluatedLayout.getValue("text-radial-offset")?[i.get("text-radial-offset").evaluate(e,{},r)*dc,dd]:i.get("text-offset").evaluate(e,{},r).map((t=>t*dc));const s=[];for(const t of a)s.push(t,yd(t,n));return new Le(s)}return null}function gd(t){switch(t){case "right":case "top-right":case "bottom-right":return "right";case "left":case "top-left":case "bottom-left":return "left"}return "center"}function xd(e,r,n,i,s,a,o,l,u,c,h,p){let f=a.textMaxSize.evaluate(r,{});void 0===f&&(f=o);const d=e.layers[0].layout,y=d.get("icon-offset").evaluate(r,{},h),m=bd(n.horizontal),g=o/24,x=e.tilePixelRatio*g,v=e.tilePixelRatio*f/24,b=e.tilePixelRatio*l,w=e.tilePixelRatio*d.get("symbol-spacing"),_=d.get("text-padding")*e.tilePixelRatio,S=function(t,e,r,n=1){const i=t.get("icon-padding").evaluate(e,{},r),s=i&&i.values;return [s[0]*n,s[1]*n,s[2]*n,s[3]*n]}(d,r,h,e.tilePixelRatio),A=d.get("text-max-angle")/180*Math.PI,k="viewport"!==d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),E="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),T=d.get("symbol-placement"),I=w/2,F=d.get("icon-text-fit");let D;i&&"none"!==F&&(e.allowVerticalPlacement&&n.vertical&&(D=rh(i,n.vertical,F,d.get("icon-text-fit-padding"),y,g)),m&&(i=rh(i,m,F,d.get("icon-text-fit-padding"),y,g)));const z=h?p.line.getGranularityForZoomLevel(h.z):1,P=(l,p)=>{p.x<0||p.x>=M||p.y<0||p.y>=M||function(e,r,n,i,s,a,o,l,u,c,h,p,f,d,y,m,g,x,v,b,w,_,S,A,k){const E=e.addToLineVertexArray(r,n);let T,I,M,F,D=0,z=0,P=0,B=0,V=-1,C=-1;const L={};let O=mo("");if(e.allowVerticalPlacement&&i.vertical){const t=l.layout.get("text-rotate").evaluate(w,{},A)+90;M=new ld(u,r,c,h,p,i.vertical,f,d,y,t),o&&(F=new ld(u,r,c,h,p,o,g,x,y,t));}if(s){const n=l.layout.get("icon-rotate").evaluate(w,{}),i="none"!==l.layout.get("icon-text-fit"),a=nd(s,n,S,i),f=o?nd(o,n,S,i):void 0;I=new ld(u,r,c,h,p,s,g,x,!1,n),D=4*a.length;const d=e.iconSizeData;let y=null;"source"===d.kind?(y=[nh*l.layout.get("icon-size").evaluate(w,{})],y[0]>ih&&j(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===d.kind&&(y=[nh*_.compositeIconSizes[0].evaluate(w,{},A),nh*_.compositeIconSizes[1].evaluate(w,{},A)],(y[0]>ih||y[1]>ih)&&j(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,y,b,v,w,t.az.none,r,E.lineStartIndex,E.lineLength,-1,A),V=e.icon.placedSymbolArray.length-1,f&&(z=4*f.length,e.addSymbols(e.icon,f,y,b,v,w,t.az.vertical,r,E.lineStartIndex,E.lineLength,-1,A),C=e.icon.placedSymbolArray.length-1);}const R=Object.keys(i.horizontal);for(const n of R){const s=i.horizontal[n];if(!T){O=mo(s.text);const t=l.layout.get("text-rotate").evaluate(w,{},A);T=new ld(u,r,c,h,p,s,f,d,y,t);}const o=1===s.positionedLines.length;if(P+=vd(e,r,s,a,l,y,w,m,E,i.vertical?t.az.horizontal:t.az.horizontalOnly,o?R:[n],L,V,_,A),o)break}i.vertical&&(B+=vd(e,r,i.vertical,a,l,y,w,m,E,t.az.vertical,["vertical"],L,C,_,A));const N=T?T.boxStartIndex:e.collisionBoxArray.length,$=T?T.boxEndIndex:e.collisionBoxArray.length,U=M?M.boxStartIndex:e.collisionBoxArray.length,q=M?M.boxEndIndex:e.collisionBoxArray.length,G=I?I.boxStartIndex:e.collisionBoxArray.length,X=I?I.boxEndIndex:e.collisionBoxArray.length,Y=F?F.boxStartIndex:e.collisionBoxArray.length,Z=F?F.boxEndIndex:e.collisionBoxArray.length;let H=-1;const K=(t,e)=>t&&t.circleDiameter?Math.max(t.circleDiameter,e):e;H=K(T,H),H=K(M,H),H=K(I,H),H=K(F,H);const W=H>-1?1:0;W&&(H*=k/dc),e.glyphOffsetArray.length>=fh.MAX_GLYPHS&&j("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==w.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,w.sortKey);const J=md(l,w,A),[Q,tt]=function(e,r){const n=e.length,i=null==r?void 0:r.values;if((null==i?void 0:i.length)>0)for(let r=0;r=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,V,C,O,N,$,U,q,G,X,Y,Z,c,P,B,D,z,W,0,f,H,Q,tt);}(e,p,l,n,i,s,D,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,x,[_,_,_,_],k,u,b,S,E,y,r,a,c,h,o);};if("line"===T)for(const t of qf(r.geometry,0,0,M,M)){const r=gu(t,z),s=ed(r,w,A,n.vertical||m,i,24,v,e.overscaling,M);for(const t of s)m&&wd(e,m.text,I,t)||P(r,t);}else if("line-center"===T){for(const t of r.geometry)if(t.length>1){const e=gu(t,z),r=td(e,A,n.vertical||m,i,24,v);r&&P(e,r);}}else if("Polygon"===r.type)for(const t of tn(r.geometry,0)){const e=cd(t,16);P(gu(t[0],z,!0),new Hf(e.x,e.y,0));}else if("LineString"===r.type)for(const t of r.geometry){const e=gu(t,z);P(e,new Hf(e[0].x,e[0].y,0));}else if("Point"===r.type)for(const t of r.geometry)for(const e of t)P([e],new Hf(e.x,e.y,0));}function vd(t,e,n,i,s,a,o,l,u,c,h,p,f,d,y){const m=function(t,e,n,i,s,a,o,l){const u=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[];for(const t of e.positionedLines)for(const i of t.positionedGlyphs){if(!i.rect)continue;const a=i.rect||{};let h=4,p=!0,f=1,d=0;const y=(s||l)&&i.vertical,m=i.metrics.advance*i.scale/2;if(l&&e.verticalizable&&(d=t.lineOffset/2-(i.imageName?-(dc-i.metrics.width*i.scale)/2:(i.scale-1)*dc)),i.imageName){const t=o[i.imageName];p=t.sdf,f=t.pixelRatio,h=1/f;}const g=s?[i.x+m,i.y]:[0,0];let x=s?[0,0]:[i.x+m+n[0],i.y+n[1]-d],v=[0,0];y&&(v=x,x=[0,0]);const b=i.metrics.isDoubleResolution?2:1,w=(i.metrics.left-h)*i.scale-m+x[0],_=(-i.metrics.top-h)*i.scale+x[1],S=w+a.w/b*i.scale/f,A=_+a.h/b*i.scale/f,k=new r(w,_),E=new r(S,_),T=new r(w,A),I=new r(S,A);if(y){const t=new r(-m,m- -17),e=-Math.PI/2,n=12-m,s=new r(22-n,-(i.imageName?n:0)),a=new r(...v);k._rotateAround(e,t)._add(s)._add(a),E._rotateAround(e,t)._add(s)._add(a),T._rotateAround(e,t)._add(s)._add(a),I._rotateAround(e,t)._add(s)._add(a);}if(u){const t=Math.sin(u),e=Math.cos(u),r=[e,-t,t,e];k._matMult(r),E._matMult(r),T._matMult(r),I._matMult(r);}const M=new r(0,0),F=new r(0,0);c.push({tl:k,tr:E,bl:T,br:I,tex:a,writingMode:e.writingMode,glyphOffset:g,sectionIndex:i.sectionIndex,isSDF:p,pixelOffsetTL:M,pixelOffsetBR:F,minFontScaleX:0,minFontScaleY:0});}return c}(0,n,l,s,a,o,i,t.allowVerticalPlacement),g=t.textSizeData;let x=null;"source"===g.kind?(x=[nh*s.layout.get("text-size").evaluate(o,{})],x[0]>ih&&j(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===g.kind&&(x=[nh*d.compositeTextSizes[0].evaluate(o,{},y),nh*d.compositeTextSizes[1].evaluate(o,{},y)],(x[0]>ih||x[1]>ih)&&j(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,l,a,o,c,e,u.lineStartIndex,u.lineLength,f,y);for(const e of h)p[e]=t.text.placedSymbolArray.length-1;return 4*m.length}function bd(t){for(const e in t)return t[e];return null}function wd(t,e,r,n){const i=t.compareText;if(e in i){const t=i[e];for(let e=t.length-1;e>=0;e--)if(n.dist(t[e])>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const i=_d[15&r];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new Sd(a,s,i,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=_d.indexOf(this.ArrayType),s=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,o=(8-a%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+o,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+s+a+o),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+o,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t);}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Ad(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:a}=this,o=[0,i.length-1,0],l=[];for(;o.length;){const u=o.pop()||0,c=o.pop()||0,h=o.pop()||0;if(c-h<=a){for(let a=h;a<=c;a++){const o=s[2*a],u=s[2*a+1];o>=t&&o<=r&&u>=e&&u<=n&&l.push(i[a]);}continue}const p=h+c>>1,f=s[2*p],d=s[2*p+1];f>=t&&f<=r&&d>=e&&d<=n&&l.push(i[p]),(0===u?t<=f:e<=d)&&(o.push(h),o.push(p-1),o.push(1-u)),(0===u?r>=f:n>=d)&&(o.push(p+1),o.push(c),o.push(1-u));}return l}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:i,nodeSize:s}=this,a=[0,n.length-1,0],o=[],l=r*r;for(;a.length;){const u=a.pop()||0,c=a.pop()||0,h=a.pop()||0;if(c-h<=s){for(let r=h;r<=c;r++)Id(i[2*r],i[2*r+1],t,e)<=l&&o.push(n[r]);continue}const p=h+c>>1,f=i[2*p],d=i[2*p+1];Id(f,d,t,e)<=l&&o.push(n[p]),(0===u?t-r<=f:e-r<=d)&&(a.push(h),a.push(p-1),a.push(1-u)),(0===u?t+r>=f:e+r>=d)&&(a.push(p+1),a.push(c),a.push(1-u));}return o}}function Ad(t,e,r,n,i,s){if(i-n<=r)return;const a=n+i>>1;kd(t,e,a,n,i,s),Ad(t,e,r,n,a-1,1-s),Ad(t,e,r,a+1,i,1-s);}function kd(t,e,r,n,i,s){for(;i>n;){if(i-n>600){const a=i-n+1,o=r-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(o-a/2<0?-1:1);kd(t,e,r,Math.max(n,Math.floor(r-o*u/a+c)),Math.min(i,Math.floor(r+(a-o)*u/a+c)),s);}const a=e[2*r+s];let o=n,l=i;for(Ed(t,e,n,r),e[2*i+s]>a&&Ed(t,e,n,i);oa;)l--;}e[2*n+s]===a?Ed(t,e,n,l):(l++,Ed(t,e,l,i)),l<=r&&(n=l+1),r<=l&&(i=l-1);}}function Ed(t,e,r,n){Td(t,r,n),Td(e,2*r,2*n),Td(e,2*r+1,2*n+1);}function Td(t,e,r){const n=t[e];t[e]=t[r],t[r]=n;}function Id(t,e,r,n){const i=t-r,s=e-n;return i*i+s*s}var Md;t.cH=void 0,(Md=t.cH||(t.cH={})).create="create",Md.load="load",Md.fullLoad="fullLoad";let Fd=null,Dd=[];const zd=1e3/60,Pd="loadTime",Bd="fullLoadTime",Vd={mark(t){performance.mark(t);},frame(t){const e=t;null!=Fd&&Dd.push(e-Fd),Fd=e;},clearMetrics(){Fd=null,Dd=[],performance.clearMeasures(Pd),performance.clearMeasures(Bd);for(const e in t.cH)performance.clearMarks(t.cH[e]);},getPerformanceMetrics(){performance.measure(Pd,t.cH.create,t.cH.load),performance.measure(Bd,t.cH.create,t.cH.fullLoad);const e=performance.getEntriesByName(Pd)[0].duration,r=performance.getEntriesByName(Bd)[0].duration,n=Dd.length,i=1/(Dd.reduce(((t,e)=>t+e),0)/n/1e3),s=Dd.filter((t=>t>zd)).reduce(((t,e)=>t+(e-zd)/zd),0);return {loadTime:e,fullLoadTime:r,fps:i,percentDroppedFrames:s/(n+s)*100,totalFrames:n}}};t.$=c,t.A=f,t.B=us,t.C=is,t.D=js,t.E=xt,t.F=function([t,e,r]){return e+=90,e*=Math.PI/180,r*=Math.PI/180,{x:t*Math.cos(e)*Math.sin(r),y:t*Math.sin(e)*Math.sin(r),z:t*Math.cos(r)}},t.G=yr,t.H=Ps,t.I=qc,t.J=as,t.K=function(t){if(null==Y){const e=t.navigator?t.navigator.userAgent:null;Y=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")));}return Y},t.L=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Sh((()=>this.process())),this.subscription=Q(this.target,"message",(t=>this.receive(t)),!1),this.globalScope=X(self)?t:window;}registerMessageHandler(t,e){this.messageHandlers[t]=e;}unregisterMessageHandler(t){delete this.messageHandlers[t];}sendAsync(t,e){return new Promise(((r,n)=>{const i=Math.round(1e18*Math.random()).toString(36).substring(0,10),s=e?Q(e.signal,"abort",(()=>{null==s||s.unsubscribe(),delete this.resolveRejects[i];const e={id:i,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(e);}),Ah):null;this.resolveRejects[i]={resolve:t=>{null==s||s.unsubscribe(),r(t);},reject:t=>{null==s||s.unsubscribe(),n(t);}};const a=[],o=Object.assign(Object.assign({},t),{id:i,sourceMapId:this.mapId,origin:location.origin,data:ms(t.data,a)});this.target.postMessage(o,{transfer:a});}))}receive(t){const e=t.data,r=e.id;if(!("file://"!==e.origin&&"file://"!==location.origin&&"resource://android"!==e.origin&&"resource://android"!==location.origin&&e.origin!==location.origin||e.targetMapId&&this.mapId!==e.targetMapId)){if(""===e.type){delete this.tasks[r];const t=this.abortControllers[r];return delete this.abortControllers[r],void(t&&t.abort())}if(X(self)||e.mustQueue)return this.tasks[r]=e,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,e);}}process(){if(0===this.taskQueue.length)return;const t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e);}processTask(t,r){return e(this,void 0,void 0,(function*(){if(""===r.type){const e=this.resolveRejects[t];if(delete this.resolveRejects[t],!e)return;return void(r.error?e.reject(gs(r.error)):e.resolve(gs(r.data)))}if(!this.messageHandlers[r.type])return void this.completeTask(t,new Error(`Could not find a registered handler for ${r.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const e=gs(r.data),n=new AbortController;this.abortControllers[t]=n;try{const i=yield this.messageHandlers[r.type](r.sourceMapId,e,n);this.completeTask(t,null,i);}catch(e){this.completeTask(t,e);}}))}completeTask(t,e,r){const n=[];delete this.abortControllers[t];const i={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?ms(e):null,data:ms(r,n)};this.target.postMessage(i,{transfer:n});}remove(){this.invoker.remove(),this.subscription.unsubscribe();}},t.M=ut,t.N=function(){var t=new f(16);return f!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.O=function(t,e,r){var n,i,s,a,o,l,u,c,h,p,f,d,y=r[0],m=r[1],g=r[2];return e===t?(t[12]=e[0]*y+e[4]*m+e[8]*g+e[12],t[13]=e[1]*y+e[5]*m+e[9]*g+e[13],t[14]=e[2]*y+e[6]*m+e[10]*g+e[14],t[15]=e[3]*y+e[7]*m+e[11]*g+e[15]):(i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=n=e[0],t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=n*y+o*m+h*g+e[12],t[13]=i*y+l*m+p*g+e[13],t[14]=s*y+u*m+f*g+e[14],t[15]=a*y+c*m+d*g+e[15]),t},t.P=r,t.Q=function(t,e,r){var n=r[0],i=r[1],s=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.R=Sl,t.S=function(t,e,r){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],y=e[12],m=e[13],g=e[14],x=e[15],v=r[0],b=r[1],w=r[2],_=r[3];return t[0]=v*n+b*o+w*h+_*y,t[1]=v*i+b*l+w*p+_*m,t[2]=v*s+b*u+w*f+_*g,t[3]=v*a+b*c+w*d+_*x,t[4]=(v=r[4])*n+(b=r[5])*o+(w=r[6])*h+(_=r[7])*y,t[5]=v*i+b*l+w*p+_*m,t[6]=v*s+b*u+w*f+_*g,t[7]=v*a+b*c+w*d+_*x,t[8]=(v=r[8])*n+(b=r[9])*o+(w=r[10])*h+(_=r[11])*y,t[9]=v*i+b*l+w*p+_*m,t[10]=v*s+b*u+w*f+_*g,t[11]=v*a+b*c+w*d+_*x,t[12]=(v=r[12])*n+(b=r[13])*o+(w=r[14])*h+(_=r[15])*y,t[13]=v*i+b*l+w*p+_*m,t[14]=v*s+b*u+w*f+_*g,t[15]=v*a+b*c+w*d+_*x,t},t.T=zl,t.U=function(t,e){const r={};for(let n=0;n0||(null===(i=r.addOrUpdateProperties)||void 0===i?void 0:i.length)>0;if(!a&&!o)continue;s.push(e.geometry);const l=Object.assign({},e);if(t.set(r.id,l),a&&(s.push(r.newGeometry),l.geometry=r.newGeometry),o){if(l.properties=r.removeAllProperties?{}:Object.assign({},l.properties||{}),r.removeProperties)for(const t of r.removeProperties)delete l.properties[t];if(r.addOrUpdateProperties)for(const{key:t,value:e}of r.addOrUpdateProperties)l.properties[t]=e;}}return s},t.a9=Vh,t.aA=function(t,{uSize:e,uSizeT:r},{lowerSize:n,upperSize:i}){return "source"===t.kind?n/nh:"composite"===t.kind?yr.number(n/nh,i/nh,r):e},t.aB=function(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],y=e[13],m=e[14],g=e[15],x=r*o-n*a,v=r*l-i*a,b=r*u-s*a,w=n*l-i*o,_=n*u-s*o,S=i*u-s*l,A=c*y-h*d,k=c*m-p*d,E=c*g-f*d,T=h*m-p*y,I=h*g-f*y,M=p*g-f*m,F=x*M-v*I+b*T+w*E-_*k+S*A;return F?(t[0]=(o*M-l*I+u*T)*(F=1/F),t[1]=(i*I-n*M-s*T)*F,t[2]=(y*S-m*_+g*w)*F,t[3]=(p*_-h*S-f*w)*F,t[4]=(l*E-a*M-u*k)*F,t[5]=(r*M-i*E+s*k)*F,t[6]=(m*b-d*S-g*v)*F,t[7]=(c*S-p*b+f*v)*F,t[8]=(a*I-o*E+u*A)*F,t[9]=(n*E-r*I-s*A)*F,t[10]=(d*_-y*b+g*x)*F,t[11]=(h*b-c*_-f*x)*F,t[12]=(o*k-a*T-l*A)*F,t[13]=(r*T-n*k+i*A)*F,t[14]=(y*v-d*w-m*x)*F,t[15]=(c*w-h*v+p*x)*F,t):null},t.aC=T,t.aD=function(t){var e=t[0],r=t[1];return Math.sqrt(e*e+r*r)},t.aE=function(t){return t[0]=0,t[1]=0,t},t.aF=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},t.aG=uh,t.aH=A,t.aI=function(t,e,n,i){const s=e.y-t.y,a=e.x-t.x,o=i.y-n.y,l=i.x-n.x,u=o*a-l*s;if(0===u)return null;const c=(l*(t.y-n.y)-o*(t.x-n.x))/u;return new r(t.x+c*a,t.y+c*s)},t.aJ=qf,t.aK=Go,t.aL=function(t){let e=1/0,r=1/0,n=-1/0,i=-1/0;for(const s of t)e=Math.min(e,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),i=Math.max(i,s.y);return [e,r,n,i]},t.aM=dc,t.aN=F,t.aO=function(t,e,r,n,i=!1){if(!r[0]&&!r[1])return [0,0];const s=i?"map"===n?-t.bearingInRadians:0:"viewport"===n?t.bearingInRadians:0;if(s){const t=Math.sin(s),e=Math.cos(s);r=[r[0]*e-r[1]*t,r[0]*t+r[1]*e];}return [i?r[0]:F(e,r[0],t.zoom),i?r[1]:F(e,r[1],t.zoom)]},t.aQ=ah,t.aR=gd,t.aS=Yc,t.aT=Sd,t.aU=na,t.aV=pu,t.aW=$a,t.aX=io,t.aY=to,t.aZ=et,t.a_=Bh,t.aa=jh,t.ab=25,t.ac=Lh,t.ad=t=>{const e=window.document.createElement("video");return e.muted=!0,new Promise((r=>{e.onloadstart=()=>{r(e);};for(const r of t){const t=window.document.createElement("source");ft(r)||(e.crossOrigin="Anonymous"),t.src=r,e.appendChild(t);}}))},t.ae=Dt,t.af=function(){return R++},t.ag=Fa,t.ah=fh,t.ai=zf,t.aj=fi,t.ak=$o,t.al=Xh,t.am=function(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((t,r,n,i)=>{const s=n||i;return e[r]=!s||s.toLowerCase(),""})),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t;}return e},t.an=C,t.ao=85.051129,t.ap=tt,t.aq=function(t){return Math.pow(2,t)},t.ar=y,t.as=Dh,t.at=function(t){return Math.log(t)/Math.LN2},t.au=function(t){var e=t[0],r=t[1];return e*e+r*r},t.av=function(t){if(!t.length)return new Set;const e=Math.max(...t.map((t=>t.canonical.z)));let r=1/0,n=-1/0,i=1/0,s=-1/0;const a=[];for(const o of t){const{x:t,y:l,z:u}=o.canonical,c=Math.pow(2,e-u),h=t*c,p=l*c;a.push({id:o,x:h,y:p}),hn&&(n=h),ps&&(s=p);}const o=new Set;for(const t of a)t.x!==r&&t.x!==n&&t.y!==i&&t.y!==s||o.add(t.id);return o},t.aw=function(t,e){const r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x},t.ax=class{constructor(t,e){this.max=t,this.onRemove=e,this.reset();}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,r){const n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);const i={value:e,timeout:void 0};if(void 0!==r&&(i.timeout=setTimeout((()=>{this.remove(t,i);}),r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t);}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t);}return this}filter(t){const e=[];for(const r in this.data)for(const n of this.data[r])t(n.value)||e.push(n);for(const t of e)this.remove(t.value.tileID,t);}},t.ay=function(t,e){let r=0,n=0;if("constant"===t.kind)n=t.layoutSize;else if("source"!==t.kind){const{interpolationType:i,minZoom:s,maxZoom:a}=t,o=i?C(fr.interpolationFactor(i,e,s,a),0,1):0;"camera"===t.kind?n=yr.number(t.minSize,t.maxSize,o):r=o;}return {uSizeT:r,uSize:n}},t.b=Z,t.b$=Ao,t.b0=v,t.b1=function(t){var e=new f(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.b2=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t},t.b3=function(t,e){var r=e[0],n=e[1],i=e[2],s=r*r+n*n+i*i;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t},t.b4=w,t.b5=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.b6=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t},t.b7=g,t.b8=function(t,e,r){const n=e[0]*r[0]+e[1]*r[1]+e[2]*r[2];return 0===n?null:(-(t[0]*r[0]+t[1]*r[1]+t[2]*r[2])-r[3])/n},t.b9=S,t.bA=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t},t.bB=E,t.bC=function(t,e,r){var n=r[0],i=r[1],s=r[2],a=r[3],o=e[0],l=e[1],u=e[2],c=i*u-s*l,h=s*o-n*u,p=n*l-i*o;return t[0]=o+a*(c+=c)+i*(p+=p)-s*(h+=h),t[1]=l+a*h+s*c-n*p,t[2]=u+a*p+n*h-i*c,t},t.bD=function(t,e,r){const n=function(t){var e=t[3],r=t[4],n=t[5],i=t[6],s=t[7],a=t[8];return t[0]*(a*r-n*s)+t[1]*(-a*e+n*i)+t[2]*(s*e-r*i)}([t[0],t[1],t[2],e[0],e[1],e[2],r[0],r[1],r[2]]);if(0===n)return null;const i=w([],[e[0],e[1],e[2]],[r[0],r[1],r[2]]),s=w([],[r[0],r[1],r[2]],[t[0],t[1],t[2]]),a=w([],[t[0],t[1],t[2]],[e[0],e[1],e[2]]),o=b([],i,-t[3]);return v(o,o,b([],s,-e[3])),v(o,o,b([],a,-r[3])),b(o,o,1/n),o},t.bE=kh,t.bF=function(){return new Float64Array(4)},t.bG=function(t,e,r,n){var i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),s[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),s[2]=i[2],t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t},t.bH=function(t,e,r,n){var i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[0],s[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),s[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t},t.bI=function(t,e,r,n){var i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),s[1]=i[1],s[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t},t.bJ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),s=e[0],a=e[1],o=e[2],l=e[3],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*i-u*n,t[1]=a*i-c*n,t[2]=o*i-h*n,t[3]=l*i-p*n,t[8]=s*n+u*i,t[9]=a*n+c*i,t[10]=o*n+h*i,t[11]=l*n+p*i,t},t.bK=function(t,e){const r=D(t,360),n=D(e,360),i=n-r,s=n>r?i-360:i+360;return Math.abs(i)0?a:-a},t.bN=function(t,e){const r=D(t,2*Math.PI),n=D(e,2*Math.PI);return Math.min(Math.abs(r-n),Math.abs(r-n+2*Math.PI),Math.abs(r-n-2*Math.PI))},t.bO=function(){const t={},e=vt.$version;for(const r in vt.$root){const n=vt.$root[r];if(n.required){let i=null;i="version"===r?e:"array"===n.type?[]:{},null!=i&&(t[r]=i);}}return t},t.bP=ht,t.bQ=xs,t.bR=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return !1;for(let n=0;n"raster"===t.type,t.bV=U,t.bW=function(t,e){if(!t)return [{command:"setStyle",args:[e]}];let r=[];try{if(!_t(t.version,e.version))return [{command:"setStyle",args:[e]}];_t(t.center,e.center)||r.push({command:"setCenter",args:[e.center]}),_t(t.state,e.state)||r.push({command:"setGlobalState",args:[e.state]}),_t(t.centerAltitude,e.centerAltitude)||r.push({command:"setCenterAltitude",args:[e.centerAltitude]}),_t(t.zoom,e.zoom)||r.push({command:"setZoom",args:[e.zoom]}),_t(t.bearing,e.bearing)||r.push({command:"setBearing",args:[e.bearing]}),_t(t.pitch,e.pitch)||r.push({command:"setPitch",args:[e.pitch]}),_t(t.roll,e.roll)||r.push({command:"setRoll",args:[e.roll]}),_t(t.sprite,e.sprite)||r.push({command:"setSprite",args:[e.sprite]}),_t(t.glyphs,e.glyphs)||r.push({command:"setGlyphs",args:[e.glyphs]}),_t(t.transition,e.transition)||r.push({command:"setTransition",args:[e.transition]}),_t(t.light,e.light)||r.push({command:"setLight",args:[e.light]}),_t(t.terrain,e.terrain)||r.push({command:"setTerrain",args:[e.terrain]}),_t(t.sky,e.sky)||r.push({command:"setSky",args:[e.sky]}),_t(t.projection,e.projection)||r.push({command:"setProjection",args:[e.projection]});const n={},i=[];!function(t,e,r,n){let i;for(i in e=e||{},t=t||{})Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e,i)||kt(i,r,n));for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(t,i)?_t(t[i],e[i])||("geojson"===t[i].type&&"geojson"===e[i].type&&Tt(t,e,i)?St(r,{command:"setGeoJSONSourceData",args:[i,e[i].data]}):Et(i,e,r,n)):At(i,e,r));}(t.sources,e.sources,i,n);const s=[];t.layers&&t.layers.forEach((t=>{"source"in t&&n[t.source]?r.push({command:"removeLayer",args:[t.id]}):s.push(t);})),r=r.concat(i),function(t,e,r){e=e||[];const n=(t=t||[]).map(Mt),i=e.map(Mt),s=t.reduce(Ft,{}),a=e.reduce(Ft,{}),o=n.slice(),l=Object.create(null);let u,c,h,p,f;for(let t=0,e=0;tp?(i=Math.acos(s),a=Math.sin(i),o=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(o=1-n,l=n),t[0]=o*u+l*d,t[1]=o*c+l*y,t[2]=o*h+l*m,t[3]=o*f+l*g,t},t.bn=function(t){const e=new Float64Array(9);!function(t,e){var r=e[0],n=e[1],i=e[2],s=e[3],a=r+r,o=n+n,l=i+i,u=r*a,c=n*a,h=n*o,p=i*a,f=i*o,d=i*l,y=s*a,m=s*o,g=s*l;t[0]=1-h-d,t[3]=c-g,t[6]=p+m,t[1]=c+g,t[4]=1-u-d,t[7]=f-y,t[2]=p-m,t[5]=f+y,t[8]=1-u-h;}(e,t);const r=et(-Math.asin(C(e[2],-1,1)));let n,i;return Math.hypot(e[5],e[8])<.001?(n=0,i=-et(Math.atan2(e[3],e[4]))):(n=et(0===e[5]&&0===e[8]?0:Math.atan2(e[5],e[8])),i=et(0===e[1]&&0===e[0]?0:Math.atan2(e[1],e[0]))),{roll:n,pitch:r+90,bearing:i}},t.bo=function(t,e){return t.roll==e.roll&&t.pitch==e.pitch&&t.bearing==e.bearing},t.bp=Te,t.bq=_o,t.br=fu,t.bs=du,t.bt=hu,t.bu=z,t.bv=P,t.bw=Re,t.bx=function(t,e,r,n,i){return z(n,i,C((t-e)/(r-e),0,1))},t.by=D,t.bz=function(){return new Float64Array(3)},t.c=ot,t.c$=function(t,r,n,i,s){return e(this,void 0,void 0,(function*(){if(h())try{return yield K(t,r,n,i,s)}catch(t){}return function(t,e,r,n,i){const s=t.width,a=t.height;W&&J||(W=new OffscreenCanvas(s,a),J=W.getContext("2d",{willReadFrequently:!0})),W.width=s,W.height=a,J.drawImage(t,0,0,s,a);const o=J.getImageData(e,r,n,i);return J.clearRect(0,0,s,a),o.data}(t,r,n,i,s)}))},t.c0=class extends wo{constructor(t,e){super(t,e),this.current=ko;}set(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(let e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}}},t.c1=So,t.c2=class extends wo{constructor(t,e){super(t,e),this.current=[0,0,0];}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]));}},t.c3=class extends wo{constructor(t,e){super(t,e),this.current=[0,0];}set(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]));}},t.c4=d,t.c5=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.c6=function(t,e,r){var n=e[0],i=e[1],s=e[2];return t[0]=n*r[0]+i*r[3]+s*r[6],t[1]=n*r[1]+i*r[4]+s*r[7],t[2]=n*r[2]+i*r[5]+s*r[8],t},t.c7=function(t,e,r,n,i,s,a){var o=1/(e-r),l=1/(n-i),u=1/(s-a);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*o,t[13]=(i+n)*l,t[14]=(a+s)*u,t[15]=1,t},t.c8=class extends wo{constructor(t,e){super(t,e),this.current=new Array;}set(t){if(t!=this.current){this.current=t;const e=new Float32Array(4*t.length);for(let r=0;r25||n<0||n>=1||r<0||r>=1)},t.cE=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.cF=class extends aa{},t.cG=Vd,t.cI=ct,t.cJ=function(t,e){ot.REGISTERED_PROTOCOLS[t]=e;},t.cK=function(t){delete ot.REGISTERED_PROTOCOLS[t];},t.cL=function(t,e){const r={};for(let n=0;nt*dc));}let v=o?"center":n.get("text-justify").evaluate(i,{},e.canonical);const b="point"===n.get("symbol-placement")?n.get("text-max-width").evaluate(i,{},e.canonical)*dc:1/0,w=()=>{e.bucket.allowVerticalPlacement&&_s(s)&&(d.vertical=Xc(y,e.glyphMap,e.glyphPositions,e.imagePositions,c,b,a,m,"left",f,g,t.az.vertical,!0,p,h));};if(!o&&x){const r=new Set;if("auto"===v)for(let t=0;t=this.maxEntries){const t=this.map.keys().next().value;this.map.delete(t);}this.map.set(t,e);}clear(){this.map.clear();}},t.cX=Vu,t.cY=Tc,t.cZ=Ff,t.c_=class{constructor(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},performance.mark(this._marks.start);}finish(){performance.mark(this._marks.end);let t=performance.getEntriesByName(this._marks.measure);return 0===t.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),t=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),t}},t.ca=class extends xa{},t.cb=pc,t.cc=class extends ba{},t.cd=kl,t.ce=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.cf=Al,t.cg=function(t,e,r){var n=e[0],i=e[1],s=e[2],a=r[3]*n+r[7]*i+r[11]*s+r[15];return t[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/a,t},t.ch=class extends oa{},t.ci=class extends Ta{},t.cj=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},t.ck=function(t,e){var r=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],l=t[6],u=t[7],c=t[8],h=t[9],f=t[10],d=t[11],y=t[12],m=t[13],g=t[14],x=t[15],v=e[0],b=e[1],w=e[2],_=e[3],S=e[4],A=e[5],k=e[6],E=e[7],T=e[8],I=e[9],M=e[10],F=e[11],D=e[12],z=e[13],P=e[14],B=e[15];return Math.abs(r-v)<=p*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(n-b)<=p*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(i-w)<=p*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(s-_)<=p*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(a-S)<=p*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(o-A)<=p*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(l-k)<=p*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(u-E)<=p*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-T)<=p*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(h-I)<=p*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(f-M)<=p*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-F)<=p*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(y-D)<=p*Math.max(1,Math.abs(y),Math.abs(D))&&Math.abs(m-z)<=p*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(g-P)<=p*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(x-B)<=p*Math.max(1,Math.abs(x),Math.abs(B))},t.cl=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.cm=t=>"symbol"===t.type,t.cn=t=>"circle"===t.type,t.co=t=>"heatmap"===t.type,t.cp=t=>"line"===t.type,t.cq=t=>"fill"===t.type,t.cr=t=>"fill-extrusion"===t.type,t.cs=t=>"hillshade"===t.type,t.ct=t=>"color-relief"===t.type,t.cu=t=>"background"===t.type,t.cv=t=>"custom"===t.type,t.cw=B,t.cx=function(t,e,r){const n=I(e.x-r.x,e.y-r.y),i=I(t.x-r.x,t.y-r.y),s=Math.atan2(n[0]*i[1]-n[1]*i[0],function(t,e){return t[0]*e[0]+t[1]*e[1]}(n,i));return et(s)},t.cy=V,t.cz=function(t,e){return nt[e]&&(t instanceof MouseEvent||t instanceof WheelEvent)},t.d=ft,t.d0=Pl,t.d1=n,t.d2=class{constructor(t,e){this.layers={[zf]:this},this.name=zf,this.version=e?e.version:1,this.extent=e?e.extent:4096,this.length=t.length,this.features=t;}feature(t){return new Df(this.features[t],this.extent)}},t.d3=ni,t.d4=zs,t.e=O,t.f=t=>e(void 0,void 0,void 0,(function*(){if(0===t.byteLength)return createImageBitmap(new ImageData(1,1));const e=new Blob([new Uint8Array(t)],{type:"image/png"});try{return createImageBitmap(e)}catch(t){throw new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),t.g=lt,t.h=t=>new Promise(((e,r)=>{const n=new Image;n.onload=()=>{e(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=H;}));},n.onerror=()=>r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const i=new Blob([new Uint8Array(t)],{type:"image/png"});n.src=t.byteLength?URL.createObjectURL(i):H;})),t.i=X,t.j=(t,e)=>pt(O(t,{type:"json"}),e),t.k=gt,t.l=mt,t.m=pt,t.n=(t,e)=>pt(O(t,{type:"arrayBuffer"}),e),t.o=function(t){return new Tc(t).readFields(Rc,[])},t.p=Uc,t.q=function(t){return /[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))},t.r=_l,t.s=Q,t.t=Hs,t.u=vt,t.v=ns,t.w=j,t.x=Os,t.y=ss,t.z=Vs;})); + +define("worker",["./shared"],(function(e){"use strict";class t{constructor(e,t){this.keyCache={},e&&this.replace(e,t);}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t);}update(t,o,i){for(const o of t){this._layerConfigs[o.id]=o;const t=this._layers[o.id]=e.bT(o,i);t._featureFilter=e.aj(t.filter,i),this.keyCache[o.id]&&delete this.keyCache[o.id];}for(const e of o)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const s=e.cL(Object.values(this._layerConfigs),this.keyCache);for(const t of s){const o=t.map((e=>this._layers[e.id])),i=o[0];if(i.isHidden())continue;const s=i.source||"";let n=this.familiesBySource[s];n||(n=this.familiesBySource[s]={});const r=i.sourceLayer||e.ai;let a=n[r];a||(a=n[r]=[]),a.push(o);}}}class o{constructor(t){const o={},i=[];for(const e in t){const s=t[e],n=o[e]={};for(const e in s){const t=s[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;const o={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};i.push(o),n[e]={rect:o,metrics:t.metrics};}}const{w:s,h:n}=e.p(i),r=new e.r({width:s||1,height:n||1});for(const i in t){const s=t[i];for(const t in s){const n=s[+t];if(!n||0===n.bitmap.width||0===n.bitmap.height)continue;const a=o[i][t].rect;e.r.copy(n.bitmap,r,{x:0,y:0},{x:a.x+1,y:a.y+1},n.bitmap);}}this.image=r,this.positions=o;}}e.cM("GlyphAtlas",o);class i{constructor(t){this.tileID=new e.a2(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[];}parse(t,i,n,r,a){return e._(this,void 0,void 0,(function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.ag;const l=new e.cN(Object.keys(t.layers).sort()),c=new e.cO(this.tileID,this.promoteId);c.bucketLayerIDs=[];const h={},u={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:n,subdivisionGranularity:a},d=i.familiesBySource[this.source];for(const o in d){const i=t.layers[o];if(!i)continue;1===i.version&&e.w(`Vector tile source "${this.source}" layer "${o}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const r=l.encode(o),a=[];for(let e=0;ee.id))));}}const g=e.bY(u.glyphDependencies,(e=>Object.keys(e).map(Number)));this.inFlightDependencies.forEach((e=>null==e?void 0:e.abort())),this.inFlightDependencies=[];let f=Promise.resolve({});if(Object.keys(g).length){const e=new AbortController;this.inFlightDependencies.push(e),f=r.sendAsync({type:"GG",data:{stacks:g,source:this.source,tileID:this.tileID,type:"glyphs"}},e);}const p=Object.keys(u.iconDependencies);let m=Promise.resolve({});if(p.length){const e=new AbortController;this.inFlightDependencies.push(e),m=r.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},e);}const y=Object.keys(u.patternDependencies);let v=Promise.resolve({});if(y.length){const e=new AbortController;this.inFlightDependencies.push(e),v=r.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e);}const x=u.dashDependencies;let _=Promise.resolve({});if(Object.keys(x).length){const e=new AbortController;this.inFlightDependencies.push(e),_=r.sendAsync({type:"GDA",data:{dashes:x}},e);}const[w,S,b,M]=yield Promise.all([f,m,v,_]),I=new o(w),P=new e.cP(S,b);for(const t in h){const o=h[t];o instanceof e.ah?(s(o.layers,this.zoom,n),e.cQ({bucket:o,glyphMap:w,glyphPositions:I.positions,imageMap:S,imagePositions:P.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:u.subdivisionGranularity})):o.hasDependencies&&(o instanceof e.cR||o instanceof e.cS||o instanceof e.cT)&&(s(o.layers,this.zoom,n),o.addFeatures(u,this.tileID.canonical,P.patternPositions,M));}return this.status="done",{buckets:Object.values(h).filter((e=>!e.isEmpty())),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:I.image,imageAtlas:P,dashPositions:M,glyphMap:this.returnDependencies?w:null,iconMap:this.returnDependencies?S:null,glyphPositions:this.returnDependencies?I.positions:null}}))}}function s(t,o,i){const s=new e.H(o);for(const e of t)e.recalculate(s,i);}class n{constructor(e,t,o,i,s){this.type=e,this.properties=o||{},this.extent=s,this.pointsArray=t,this.id=i;}loadGeometry(){return this.pointsArray.map((t=>t.map((t=>new e.P(t.x,t.y)))))}}class r{constructor(e,t,o){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=o;}feature(e){return this._myFeatures[e]}}class a{constructor(){this.layers={};}addLayer(e){this.layers[e.name]=e;}}function l(t){let o=e.cU(t);return 0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),{vectorTile:t,rawData:o.buffer}}function c(t,o,i){const{extent:s}=t,a=Math.pow(2,i.z-o.z),l=(i.x-o.x*a)*s,c=(i.y-o.y*a)*s,h=[];for(let o=0;o0&&u.addLayer(s);}const g=l(u);return this.overzoomedTileResultCache.set(r,g),g}reloadTile(t){return e._(this,void 0,void 0,(function*(){const o=t.uid;if(!this.loaded||!this.loaded[o])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const i=this.loaded[o];if(i.showCollisionBoxes=t.showCollisionBoxes,"parsing"===i.status){const s=yield i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity);let n;if(this.fetching[o]){const{rawTileData:i,cacheControl:r,resourceTiming:a}=this.fetching[o];delete this.fetching[o],n=e.e({rawTileData:i.slice(0),encoding:t.encoding},s,r,a);}else n=s;return n}if("done"===i.status&&i.vectorTile)return i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity)}))}abortTile(t){return e._(this,void 0,void 0,(function*(){const e=this.loading,o=t.uid;e&&e[o]&&e[o].abort&&(e[o].abort.abort(),delete e[o]);}))}removeTile(t){return e._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[t.uid]&&delete this.loaded[t.uid];}))}}class u{constructor(){this.loaded={};}loadTile(t){return e._(this,void 0,void 0,(function*(){const{uid:o,encoding:i,rawImageData:s,redFactor:n,greenFactor:r,blueFactor:a,baseShift:l}=t,c=s.width+2,h=s.height+2,u=e.b(s)?new e.R({width:c,height:h},yield e.c$(s,-1,-1,c,h)):s,d=new e.d0(o,u,i,n,r,a,l);return this.loaded=this.loaded||{},this.loaded[o]=d,d}))}removeTile(e){const t=this.loaded,o=e.uid;t&&t[o]&&delete t[o];}}var d,g,f=function(){if(g)return d;function e(e,o){if(0!==e.length){t(e[0],o);for(var i=1;i=Math.abs(a)?o-l+a:a-l+o,o=l;}o+i>=0!=!!t&&e.reverse();}return g=1,d=function t(o,i){var s,n=o&&o.type;if("FeatureCollection"===n)for(s=0;se},y=Math.fround||(v=new Float32Array(1),e=>(v[0]=+e,v[0]));var v;class x{constructor(e){this.options=Object.assign(Object.create(m),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[];}load(e){const{log:t,minZoom:o,maxZoom:i}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const n=[];for(let t=0;t=o;e--){const o=+Date.now();r=this.trees[e]=this._createTree(this._cluster(r,e)),t&&console.log("z%d: %d clusters in %dms",e,r.numItems,+Date.now()-o);}return t&&console.timeEnd("total time"),this}getClusters(e,t){let o=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=180===e[2]?180:((e[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,s=180;else if(o>s){const e=this.getClusters([o,i,180,n],t),r=this.getClusters([-180,i,s,n],t);return e.concat(r)}const r=this.trees[this._limitZoom(t)],a=r.range(S(o),b(n),S(s),b(i)),l=r.data,c=[];for(const e of a){const t=this.stride*e;c.push(l[t+5]>1?_(l,t,this.clusterProps):this.points[l[t+3]]);}return c}getChildren(e){const t=this._getOriginId(e),o=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[o];if(!s)throw new Error(i);const n=s.data;if(t*this.stride>=n.length)throw new Error(i);const r=this.options.radius/(this.options.extent*Math.pow(2,o-1)),a=s.within(n[t*this.stride],n[t*this.stride+1],r),l=[];for(const t of a){const o=t*this.stride;n[o+4]===e&&l.push(n[o+5]>1?_(n,o,this.clusterProps):this.points[n[o+3]]);}if(0===l.length)throw new Error(i);return l}getLeaves(e,t,o){const i=[];return this._appendLeaves(i,e,t=t||10,o=o||0,0),i}getTile(e,t,o){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:n,radius:r}=this.options,a=r/n,l=(o-a)/s,c=(o+1+a)/s,h={features:[]};return this._addTileFeatures(i.range((t-a)/s,l,(t+1+a)/s,c),i.data,t,o,s,h),0===t&&this._addTileFeatures(i.range(1-a/s,l,1,c),i.data,s,o,s,h),t===s-1&&this._addTileFeatures(i.range(0,l,a/s,c),i.data,-1,o,s,h),h.features.length?h:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const o=this.getChildren(e);if(t++,1!==o.length)break;e=o[0].properties.cluster_id;}return t}_appendLeaves(e,t,o,i,s){const n=this.getChildren(t);for(const t of n){const n=t.properties;if(n&&n.cluster?s+n.point_count<=i?s+=n.point_count:s=this._appendLeaves(e,n.cluster_id,o,i,s):s1;let l,c,h;if(a)l=w(t,e,this.clusterProps),c=t[e],h=t[e+1];else {const o=this.points[t[e+3]];l=o.properties;const[i,s]=o.geometry.coordinates;c=S(i),h=b(s);}const u={type:1,geometry:[[Math.round(this.options.extent*(c*s-o)),Math.round(this.options.extent*(h*s-i))]],tags:l};let d;d=a||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==d&&(u.id=d),n.features.push(u);}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:o,extent:i,reduce:s,minPoints:n}=this.options,r=o/(i*Math.pow(2,t)),a=e.data,l=[],c=this.stride;for(let o=0;ot&&(g+=a[o+5]);}if(g>d&&g>=n){let e,n=i*d,r=h*d,f=-1;const p=(o/c<<5)+(t+1)+this.points.length;for(const i of u){const l=i*c;if(a[l+2]<=t)continue;a[l+2]=t;const h=a[l+5];n+=a[l]*h,r+=a[l+1]*h,a[l+4]=p,s&&(e||(e=this._map(a,o,!0),f=this.clusterProps.length,this.clusterProps.push(e)),s(e,this._map(a,l)));}a[o+4]=p,l.push(n/g,r/g,1/0,p,-1,g),s&&l.push(f);}else {for(let e=0;e1)for(const e of u){const o=e*c;if(!(a[o+2]<=t)){a[o+2]=t;for(let e=0;e>5}_getOriginZoom(e){return (e-this.points.length)%32}_map(e,t,o){if(e[t+5]>1){const i=this.clusterProps[e[t+6]];return o?Object.assign({},i):i}const i=this.points[e[t+3]].properties,s=this.options.map(i);return o&&s===i?Object.assign({},s):s}}function _(e,t,o){return {type:"Feature",id:e[t+3],properties:w(e,t,o),geometry:{type:"Point",coordinates:[(i=e[t],360*(i-.5)),M(e[t+1])]}};var i;}function w(e,t,o){const i=e[t+5],s=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,n=e[t+6],r=-1===n?{}:Object.assign({},o[n]);return Object.assign(r,{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:s})}function S(e){return e/360+.5}function b(e){const t=Math.sin(e*Math.PI/180),o=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return o<0?0:o>1?1:o}function M(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function I(e,t,o,i){let s=i;const n=t+(o-t>>1);let r,a=o-t;const l=e[t],c=e[t+1],h=e[o],u=e[o+1];for(let i=t+3;is)r=i,s=t;else if(t===s){const e=Math.abs(i-n);ei&&(r-t>3&&I(e,t,r,i),e[r+2]=s,o-r>3&&I(e,r,o,i));}function P(e,t,o,i,s,n){let r=s-o,a=n-i;if(0!==r||0!==a){const l=((e-o)*r+(t-i)*a)/(r*r+a*a);l>1?(o=s,i=n):l>0&&(o+=r*l,i+=a*l);}return r=e-o,a=t-i,r*r+a*a}function D(e,t,o,i){const s={id:null==e?null:e,type:t,geometry:o,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===t||"MultiPoint"===t||"LineString"===t)T(s,o);else if("Polygon"===t)T(s,o[0]);else if("MultiLineString"===t)for(const e of o)T(s,e);else if("MultiPolygon"===t)for(const e of o)T(s,e[0]);return s}function T(e,t){for(let o=0;o0&&(r+=i?(s*l-a*n)/2:Math.sqrt(Math.pow(a-s,2)+Math.pow(l-n,2))),s=a,n=l;}const a=t.length-3;t[2]=1,I(t,0,a,o),t[a+2]=1,t.size=Math.abs(r),t.start=0,t.end=t.size;}function L(e,t,o,i){for(let s=0;s1?1:o}function G(e,t,o,i,s,n,r,a){if(i/=t,n>=(o/=t)&&r=i)return null;const l=[];for(const t of e){const e=t.geometry;let n=t.type;const r=0===s?t.minX:t.minY,c=0===s?t.maxX:t.maxY;if(r>=o&&c=i)continue;let h=[];if("Point"===n||"MultiPoint"===n)A(e,h,o,i,s);else if("LineString"===n)Z(e,h,o,i,s,!1,a.lineMetrics);else if("MultiLineString"===n)E(e,h,o,i,s,!1);else if("Polygon"===n)E(e,h,o,i,s,!0);else if("MultiPolygon"===n)for(const t of e){const e=[];E(t,e,o,i,s,!0),e.length&&h.push(e);}if(h.length){if(a.lineMetrics&&"LineString"===n){for(const e of h)l.push(D(t.id,n,e,t.tags));continue}"LineString"!==n&&"MultiLineString"!==n||(1===h.length?(n="LineString",h=h[0]):n="MultiLineString"),"Point"!==n&&"MultiPoint"!==n||(n=3===h.length?"Point":"MultiPoint"),l.push(D(t.id,n,h,t.tags));}}return l.length?l:null}function A(e,t,o,i,s){for(let n=0;n=o&&r<=i&&j(t,e[n],e[n+1],e[n+2]);}}function Z(e,t,o,i,s,n,r){let a=R(e);const l=0===s?N:W;let c,h,u=e.start;for(let d=0;do&&(h=l(a,g,f,m,y,o),r&&(a.start=u+c*h)):v>i?x=o&&(h=l(a,g,f,m,y,o),_=!0),x>i&&v<=i&&(h=l(a,g,f,m,y,i),_=!0),!n&&_&&(r&&(a.end=u+c*h),t.push(a),a=R(e)),r&&(u+=c);}let d=e.length-3;const g=e[d],f=e[d+1],p=0===s?g:f;p>=o&&p<=i&&j(a,g,f,e[d+2]),d=a.length-3,n&&d>=3&&(a[d]!==a[0]||a[d+1]!==a[1])&&j(a,a[0],a[1],a[2]),a.length&&t.push(a);}function R(e){const t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function E(e,t,o,i,s,n){for(const r of e)Z(r,t,o,i,s,n,!1);}function j(e,t,o,i){e.push(t,o,i);}function N(e,t,o,i,s,n){const r=(n-t)/(i-t);return j(e,n,o+(s-o)*r,1),r}function W(e,t,o,i,s,n){const r=(n-o)/(s-o);return j(e,t+(i-t)*r,n,1),r}function J(e,t){const o=[];for(let i=0;i0&&t.size<(s?r:i))return void(o.numPoints+=t.length/3);const a=[];for(let e=0;er)&&(o.numSimplified++,a.push(t[e],t[e+1])),o.numPoints++;s&&function(e,t){let o=0;for(let t=0,i=e.length,s=i-2;t0===t)for(let t=0,o=e.length;t24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");let i=function(e,t){const o=[];if("FeatureCollection"===e.type)for(let i=0;i1&&console.time("creation"),d=this.tiles[u]=X(e,t,o,i,l),this.tileCoords.push({z:t,x:o,y:i}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,o,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));const e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++;}if(d.source=e,null==s){if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else {if(t===l.maxZoom||t===s)continue;if(null!=s){const e=s-t;if(o!==n>>e||i!==r>>e)continue}}if(d.source=null,0===e.length)continue;c>1&&console.time("clipping");const g=.5*l.buffer/l.extent,f=.5-g,p=.5+g,m=1+g;let y=null,v=null,x=null,_=null,w=G(e,h,o-g,o+p,0,d.minX,d.maxX,l),S=G(e,h,o+f,o+m,0,d.minX,d.maxX,l);e=null,w&&(y=G(w,h,i-g,i+p,1,d.minY,d.maxY,l),v=G(w,h,i+f,i+m,1,d.minY,d.maxY,l),w=null),S&&(x=G(S,h,i-g,i+p,1,d.minY,d.maxY,l),_=G(S,h,i+f,i+m,1,d.minY,d.maxY,l),S=null),c>1&&console.timeEnd("clipping"),a.push(y||[],t+1,2*o,2*i),a.push(v||[],t+1,2*o,2*i+1),a.push(x||[],t+1,2*o+1,2*i),a.push(_||[],t+1,2*o+1,2*i+1);}}getTile(e,t,o){e=+e,t=+t,o=+o;const i=this.options,{extent:s,debug:n}=i;if(e<0||e>24)return null;const r=1<1&&console.log("drilling down to z%d-%d-%d",e,t,o);let l,c=e,h=t,u=o;for(;!l&&c>0;)c--,h>>=1,u>>=1,l=this.tiles[K(c,h,u)];return l&&l.source?(n>1&&(console.log("found parent tile z%d-%d-%d",c,h,u),console.time("drilling down")),this.splitTile(l.source,c,h,u,e,t,o),n>1&&console.timeEnd("drilling down"),this.tiles[a]?q(this.tiles[a],s):null):null}}function K(e,t,o){return 32*((1<`${e.key}: ${e.message}`)).join(", "));const s=t.features.filter((e=>i.value.evaluate({zoom:0},e)));return this._toFeatureCollection(s)}_toFeatureCollection(e){return {type:"FeatureCollection",features:e}}removeSource(t){return e._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort();}))}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset)}}function ee(t,o){return o.cluster?new x(function({superclusterOptions:t,clusterProperties:o}){if(!o||!t)return t;const i={},s={},n={accumulated:null,zoom:0},r={properties:null},a=Object.keys(o);for(const t of a){const[n,r]=o[t],a=e.d3(r),l=e.d3("string"==typeof n?[n,["accumulated"],["get",t]]:n);i[t]=a.value,s[t]=l.value;}return t.map=e=>{r.properties=e;const t={};for(const e of a)t[e]=i[e].evaluate(n,r);return t},t.reduce=(e,t)=>{r.properties=t;for(const t of a)n.accumulated=e[t],e[t]=s[t].evaluate(n,r);},t}(o)).load(t.features):function(e,t){return new V(e,t)}(t,o.geojsonVtOptions)}class te{constructor(t){this.self=t,this.actor=new e.L(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t;},this.self.addProtocol=e.cJ,this.self.removeProtocol=e.cK,this.self.registerRTLTextPlugin=t=>{e.d4.setMethods(t);},this.actor.registerMessageHandler("LDT",((e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t))),this.actor.registerMessageHandler("RDT",((t,o)=>e._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(t,o.source).removeTile(o);})))),this.actor.registerMessageHandler("GCEZ",((t,o)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,o.type,o.source).getClusterExpansionZoom(o)})))),this.actor.registerMessageHandler("GCC",((t,o)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,o.type,o.source).getClusterChildren(o)})))),this.actor.registerMessageHandler("GCL",((t,o)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,o.type,o.source).getClusterLeaves(o)})))),this.actor.registerMessageHandler("LD",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t))),this.actor.registerMessageHandler("GD",((e,t)=>this._getWorkerSource(e,t.type,t.source).getData())),this.actor.registerMessageHandler("LT",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t))),this.actor.registerMessageHandler("RT",((e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t))),this.actor.registerMessageHandler("AT",((e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t))),this.actor.registerMessageHandler("RMT",((e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t))),this.actor.registerMessageHandler("RS",((t,o)=>e._(this,void 0,void 0,(function*(){if(!this.workerSources[t]||!this.workerSources[t][o.type]||!this.workerSources[t][o.type][o.source])return;const e=this.workerSources[t][o.type][o.source];delete this.workerSources[t][o.type][o.source],void 0!==e.removeSource&&e.removeSource(o);})))),this.actor.registerMessageHandler("RM",(t=>e._(this,void 0,void 0,(function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],this.globalStates.delete(t);})))),this.actor.registerMessageHandler("SR",((t,o)=>e._(this,void 0,void 0,(function*(){this.referrer=o;})))),this.actor.registerMessageHandler("SRPS",((e,t)=>this._syncRTLPluginState(e,t))),this.actor.registerMessageHandler("IS",((t,o)=>e._(this,void 0,void 0,(function*(){this.self.importScripts(o);})))),this.actor.registerMessageHandler("SI",((e,t)=>this._setImages(e,t))),this.actor.registerMessageHandler("UL",((t,o)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).update(o.layers,o.removedIds,this._getGlobalState(t));})))),this.actor.registerMessageHandler("UGS",((t,o)=>e._(this,void 0,void 0,(function*(){const e=this._getGlobalState(t);for(const t in o)e[t]=o[t];})))),this.actor.registerMessageHandler("SL",((t,o)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).replace(o,this._getGlobalState(t));}))));}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}_setImages(t,o){return e._(this,void 0,void 0,(function*(){this.availableImages[t]=o;for(const e in this.workerSources[t]){const i=this.workerSources[t][e];for(const e in i)i[e].availableImages=o;}}))}_syncRTLPluginState(t,o){return e._(this,void 0,void 0,(function*(){return yield e.d4.syncState(o,this.self.importScripts)}))}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let o=this.layerIndexes[e];return o||(o=this.layerIndexes[e]=new t),o}_getWorkerSource(e,t,o){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][o]){const i={sendAsync:(t,o)=>(t.targetMapId=e,this.actor.sendAsync(t,o))};switch(t){case "vector":this.workerSources[e][t][o]=new h(i,this._getLayerIndex(e),this._getAvailableImages(e));break;case "geojson":this.workerSources[e][t][o]=new Q(i,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][o]=new this.externalWorkerSourceTypes[t](i,this._getLayerIndex(e),this._getAvailableImages(e));}}return this.workerSources[e][t][o]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new u),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new te(self)),te})); + +define("index",["exports","./shared"],(function(e,t){"use strict";var i="5.15.0";function a(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let r,o,s;const n={frame(e,i,a){const r=requestAnimationFrame((e=>{o(),i(e);})),{unsubscribe:o}=t.s(e.signal,"abort",(()=>{o(),cancelAnimationFrame(r),a(new t.a(e.signal.reason));}),!1);},frameAsync(e){return new Promise(((t,i)=>{this.frame(e,t,i);}))},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){const t=window.document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height),i},resolveURL:e=>(r||(r=document.createElement("a")),r.href=e,r.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==s?s:!!matchMedia&&(null==o&&(o=matchMedia("(prefers-reduced-motion: reduce)")),o.matches)},set prefersReducedMotion(e){s=e;}},l=new class{constructor(){this._realTime="undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),this._frozenAt=null;}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:this._realTime()}setNow(e){this._frozenAt=e;}restoreNow(){this._frozenAt=null;}isFrozen(){return null!==this._frozenAt}};function c(){return l.getCurrentTime()}class h{static testProp(e){if(!h.docStyle)return e[0];for(let t=0;t{window.removeEventListener("click",h.suppressClickInternal,!0);}),0);}static getScale(e){const t=e.getBoundingClientRect();return {x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,i,a){const r=i.boundingClientRect;return new t.P((a.clientX-r.left)/i.x-e.clientLeft,(a.clientY-r.top)/i.y-e.clientTop)}static mousePos(e,t){const i=h.getScale(e);return h.getPoint(e,i,t)}static touchPos(e,t){const i=[],a=h.getScale(e);for(let r=0;r{d&&f(d),d=null,m=!0;},_.onerror=()=>{p=!0,d=null;},_.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(e){let i,a,r,o;e.resetRequestQueue=()=>{i=[],a=0,r=0,o={};},e.addThrottleControl=e=>{const t=r++;return o[t]=e,t},e.removeThrottleControl=e=>{delete o[e],n();},e.getImage=(e,a,r=!0)=>new Promise(((o,s)=>{u.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),t.e(e,{type:"image"}),i.push({abortController:a,requestParameters:e,supportImageRefresh:r,state:"queued",onError:e=>{s(e);},onSuccess:e=>{o(e);}}),n();}));const s=e=>t._(this,void 0,void 0,(function*(){e.state="running";const{requestParameters:i,supportImageRefresh:r,onError:o,onSuccess:s,abortController:c}=e,h=!1===r&&!t.i(self)&&!t.g(i.url)&&(!i.headers||Object.keys(i.headers).reduce(((e,t)=>e&&"accept"===t),!0));a++;const u=h?l(i,c):t.m(i,c);try{const i=yield u;delete e.abortController,e.state="completed",i.data instanceof HTMLImageElement||t.b(i.data)?s(i):i.data&&s({data:yield(d=i.data,"function"==typeof createImageBitmap?t.f(d):t.h(d)),cacheControl:i.cacheControl,expires:i.expires});}catch(t){delete e.abortController,o(t);}finally{a--,n();}var d;})),n=()=>{const e=(()=>{for(const e of Object.keys(o))if(o[e]())return !0;return !1})()?t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=a;t0;t++){const e=i.shift();e.abortController.signal.aborted?t--:s(e);}},l=(e,i)=>new Promise(((a,r)=>{const o=new Image,s=e.url,n=e.credentials;n&&"include"===n?o.crossOrigin="use-credentials":(n&&"same-origin"===n||!t.d(s))&&(o.crossOrigin="anonymous"),i.signal.addEventListener("abort",(()=>{o.src="",r(new t.a(i.signal.reason));})),o.fetchPriority="high",o.onload=()=>{o.onerror=o.onload=null,a({data:o});},o.onerror=()=>{o.onerror=o.onload=null,i.signal.aborted||r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));},o.src=s;}));}(g||(g={})),g.resetRequestQueue();class v{constructor(e){this._transformRequestFn=null!=e?e:null;}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e;}}function x(e){const t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){const i=[];for(const{id:a,url:r}of e){const e=`${a}${r}`;-1===i.indexOf(e)&&(i.push(e),t.push({id:a,url:r}));}}return t}function b(e,t,i){try{const a=new URL(e);return a.pathname+=`${t}${i}`,a.toString()}catch(t){throw new Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function y(e){const{userImage:t}=e;return !!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class w extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0;}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(const e of Object.keys(this.images))this.removeImage(e);this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0;}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[];}}getImage(e){const i=this.images[e];if(i&&!i.data&&i.spriteData){const e=i.spriteData;i.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),i.spriteData=null;}return i}addImage(e,t){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t);}_validate(e,i){let a=!0;const r=i.data||i.spriteData;return this._validateStretch(i.stretchX,r&&r.width)||(this.fire(new t.k(new Error(`Image "${e}" has invalid "stretchX" value`))),a=!1),this._validateStretch(i.stretchY,r&&r.height)||(this.fire(new t.k(new Error(`Image "${e}" has invalid "stretchY" value`))),a=!1),this._validateContent(i.content,i)||(this.fire(new t.k(new Error(`Image "${e}" has invalid "content" value`))),a=!1),a}_validateStretch(e,t){if(!e)return !0;let i=0;for(const a of e){if(a[0]{let a=!0;if(!this.isLoaded())for(const t of e)this.images[t]||(a=!1);this.isLoaded()||a?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t});}))}_getImagesForIds(e){const i={};for(const a of e){let e=this.getImage(a);e||(this.fire(new t.l("styleimagemissing",{id:a})),e=this.getImage(a)),e?i[a]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:Boolean(e.userImage&&e.userImage.render)}:t.w(`Image "${a}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`);}return i}getPixelSize(){const{width:e,height:t}=this.atlasImage;return {width:e,height:t}}getPattern(e){const i=this.patterns[e],a=this.getImage(e);if(!a)return null;if(i&&i.position.version===a.version)return i.position;if(i)i.position.version=a.version;else {const i={w:a.data.width+2,h:a.data.height+2,x:0,y:0},r=new t.I(i,a);this.patterns[e]={bin:i,position:r};}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE);}_updatePatternAtlas(){const e=[];for(const t in this.patterns)e.push(this.patterns[t].bin);const{w:i,h:a}=t.p(e),r=this.atlasImage;r.resize({width:i||1,height:a||1});for(const e in this.patterns){const{bin:i}=this.patterns[e],a=i.x+1,o=i.y+1,s=this.getImage(e).data,n=s.width,l=s.height;t.R.copy(s,r,{x:0,y:0},{x:a,y:o},{width:n,height:l}),t.R.copy(s,r,{x:0,y:l-1},{x:a,y:o-1},{width:n,height:1}),t.R.copy(s,r,{x:0,y:0},{x:a,y:o+l},{width:n,height:1}),t.R.copy(s,r,{x:n-1,y:0},{x:a-1,y:o},{width:1,height:l}),t.R.copy(s,r,{x:0,y:0},{x:a+n,y:o},{width:1,height:l});}this.dirty=!0;}beginFrame(){this.callbackDispatchedThisFrame={};}dispatchRenderCallbacks(e){for(const i of e){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;const e=this.getImage(i);e||t.w(`Image with ID: "${i}" was not found`),y(e)&&this.updateImage(i,e);}}cloneImages(){const e={};for(const t in this.images){const i=this.images[t];e[t]=Object.assign(Object.assign({},i),{data:i.data?i.data.clone():null});}return e}}const T=1e20;function P(e,t,i,a,r,o,s,n,l){for(let c=t;c-1);l++,o[l]=n,s[l]=c,s[l+1]=T;}for(let n=0,l=0;n/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`)).join(",");return new M.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:this._fontWeight(t[0]),fontStyle:this._fontStyle(t[0]),lang:this.lang})}_fontStyle(e){return /italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){const t={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950};let i;for(const[a,r]of Object.entries(t))new RegExp(`\\b${a}\\b`,"i").test(e)&&(i=`${r}`);return i}destroy(){for(const e in this.entries){const t=this.entries[e];t.tinySDF&&(t.tinySDF=null),t.ideographTinySDF&&(t.ideographTinySDF=null),t.glyphs={},t.requests={},t.ranges={};}this.entries={};}}M.loadGlyphRange=function(e,i,a,r){return t._(this,void 0,void 0,(function*(){const o=256*i,s=o+255,n=r.transformRequest(a.replace("{fontstack}",e).replace("{range}",`${o}-${s}`),"Glyphs"),l=yield t.n(n,new AbortController);if(!l||!l.data)throw new Error(`Could not load glyph range. range: ${i}, ${o}-${s}`);const c={};for(const e of t.o(l.data))c[e.id]=e;return c}))},M.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:i=8,cutoff:a=.25,fontFamily:r="sans-serif",fontWeight:o="normal",fontStyle:s="normal",lang:n=null}={}){this.buffer=t,this.cutoff=a,this.radius=i,this.lang=n;const l=this.size=e+4*t,c=this._createCanvas(l),h=this.ctx=c.getContext("2d",{willReadFrequently:!0});h.font=`${s} ${o} ${e}px ${r}`,h.textBaseline="alphabetic",h.textAlign="left",h.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l);}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:i,actualBoundingBoxDescent:a,actualBoundingBoxLeft:r,actualBoundingBoxRight:o}=this.ctx.measureText(e),s=Math.ceil(i),n=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-r))),l=Math.min(this.size-this.buffer,s+Math.ceil(a)),c=n+2*this.buffer,h=l+2*this.buffer,u=Math.max(c*h,0),d=new Uint8ClampedArray(u),_={data:d,width:c,height:h,glyphWidth:n,glyphHeight:l,glyphTop:s,glyphLeft:0,glyphAdvance:t};if(0===n||0===l)return _;const{ctx:p,buffer:m,gridInner:f,gridOuter:g}=this;this.lang&&(p.lang=this.lang),p.clearRect(m,m,n,l),p.fillText(e,m,m+s);const v=p.getImageData(m,m,n,l);g.fill(T,0,u),f.fill(0,0,u);for(let e=0;e0?e*e:0,f[a]=e<0?e*e:0;}}P(g,0,0,c,h,c,this.f,this.v,this.z),P(f,m,m,n,l,c,this.f,this.v,this.z);for(let e=0;e1&&(s=e[++o]);const l=Math.abs(n-s.left),c=Math.abs(n-s.right),h=Math.min(l,c);let u;const d=t/i*(a+1);if(s.isDash){const e=a-Math.abs(d);u=Math.sqrt(h*h+e*e);}else u=a-Math.sqrt(h*h+d*d);this.data[r+n]=Math.max(0,Math.min(255,u+128));}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){const i=e[t],a=e[t+1];i.zeroLength?e.splice(t,1):a&&a.isDash===i.isDash&&(a.left=i.left,e.splice(t,1));}const t=e[0],i=e[e.length-1];t.isDash===i.isDash&&(t.left=i.left-this.width,i.right=t.right+this.width);const a=this.width*this.nextRow;let r=0,o=e[r];for(let t=0;t1&&(o=e[++r]);const i=Math.abs(t-o.left),s=Math.abs(t-o.right),n=Math.min(i,s);this.data[a+t]=Math.max(0,Math.min(255,(o.isDash?n:-n)+128));}}addDash(e,i){const a=i?7:0,r=2*a+1;if(this.nextRow+r>this.height)return t.w("LineAtlas out of space"),null;let o=0;for(let t=0;t{e.terminate();})),this.workers=null);}isPreloaded(){return !!this.active[L]}numActive(){return Object.keys(this.active).length}}const F=Math.floor(n.hardwareConcurrency/2);let B,O;function j(){return B||(B=new k),B}k.workerCount=t.K(globalThis)?Math.max(Math.min(F,3),1):1;class N{constructor(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i;const a=this.workerPool.acquire(i);for(let e=0;e{e.remove();})),this.actors=[],e&&this.workerPool.release(this.id);}registerMessageHandler(e,t){for(const i of this.actors)i.registerMessageHandler(e,t);}unregisterMessageHandler(e){for(const t of this.actors)t.unregisterMessageHandler(e);}}function Z(){return O||(O=new N(j(),t.M),O.registerMessageHandler("GR",((e,i,a)=>t.m(i,a)))),O}function G(e,i){const a=t.N();return t.O(a,a,[1,1,0]),t.Q(a,a,[.5*e.width,.5*e.height,1]),e.calculatePosMatrix?t.S(a,a,e.calculatePosMatrix(i.toUnwrapped())):a}function U(e,t,i,a,r,o,s){var n;const l=function(e,t,i){if(e)for(const a of e){const e=t[a];if(e&&e.source===i&&"fill-extrusion"===e.type)return !0}else for(const e in t){const a=t[e];if(a.source===i&&"fill-extrusion"===a.type)return !0}return !1}(null!==(n=null==r?void 0:r.layers)&&void 0!==n?n:null,t,e.id),c=o.maxPitchScaleFactor(),h=e.tilesIn(a,c,l);h.sort(V);const u=[];for(const a of h)u.push({wrappedTileID:a.tileID.wrapped().key,queryResults:a.tile.queryRenderedFeatures(t,i,e.getState(),a.queryGeometry,a.cameraQueryGeometry,a.scale,r,o,c,G(o,a.tileID),s?(e,t)=>s(a.tileID,e,t):void 0)});return function(e,t){for(const i in e)for(const a of e[i])q(a,t);return e}(function(e){const t={},i={};for(const a of e){const e=a.queryResults,r=a.wrappedTileID,o=i[r]=i[r]||{};for(const i in e){const a=e[i],r=o[i]=o[i]||{},s=t[i]=t[i]||[];for(const e of a)r[e.featureIndex]||(r[e.featureIndex]=!0,s.push(e));}}return t}(u),e)}function V(e,t){const i=e.tileID,a=t.tileID;return i.overscaledZ-a.overscaledZ||i.canonical.y-a.canonical.y||i.wrap-a.wrap||i.canonical.x-a.canonical.x}function q(e,t){const i=e.feature,a=t.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a;}function W(e,i,a){return t._(this,void 0,void 0,(function*(){let r=e;if(e.url?r=(yield t.j(i.transformRequest(e.url,"Source"),a)).data:yield n.frameAsync(a),!r)return null;const o=t.U(t.e(r,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return "vector_layers"in r&&r.vector_layers&&(o.vectorLayerIds=r.vector_layers.map((e=>e.id))),o}))}class ${constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])));}setNorthEast(e){return this._ne=e instanceof t.V?new t.V(e.lng,e.lat):t.V.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.V?new t.V(e.lng,e.lat):t.V.convert(e),this}extend(e){const i=this._sw,a=this._ne;let r,o;if(e instanceof t.V)r=e,o=e;else {if(!(e instanceof $))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend($.convert(e)):this.extend(t.V.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.V.convert(e)):this;if(r=e._sw,o=e._ne,!r||!o)return this}return i||a?(i.lng=Math.min(r.lng,i.lng),i.lat=Math.min(r.lat,i.lat),a.lng=Math.max(o.lng,a.lng),a.lat=Math.max(o.lat,a.lat)):(this._sw=new t.V(r.lng,r.lat),this._ne=new t.V(o.lng,o.lat)),this}getCenter(){return new t.V((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.V(this.getWest(),this.getNorth())}getSouthEast(){return new t.V(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return [this._sw.toArray(),this._ne.toArray()]}toString(){return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return !(this._sw&&this._ne)}contains(e){const{lng:i,lat:a}=t.V.convert(e);let r=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&r}intersects(e){if(!((e=$.convert(e)).getNorth()>=this.getSouth()&&e.getSouth()<=this.getNorth()))return !1;const i=Math.abs(this.getEast()-this.getWest()),a=Math.abs(e.getEast()-e.getWest());if(i>=360||a>=360)return !0;const r=t.W(this.getWest(),-180,180),o=t.W(this.getEast(),-180,180),s=t.W(e.getWest(),-180,180),n=t.W(e.getEast(),-180,180),l=r>=o,c=s>=n;return !(!l||!c)||(l?n>=r||s<=o:c?o>=s||r<=n:s<=o&&n>=r)}static convert(e){return e instanceof $?e:e?new $(e):e}static fromLngLat(e,i=0){const a=360*i/40075017,r=a/Math.cos(Math.PI/180*e.lat);return new $(new t.V(e.lng-r,e.lat-a),new t.V(e.lng+r,e.lat+a))}adjustAntiMeridian(){const e=new t.V(this._sw.lng,this._sw.lat),i=new t.V(this._ne.lng,this._ne.lat);return new $(e,e.lng>i.lng?new t.V(i.lng+360,i.lat):i)}}class H{constructor(e,t,i){this.bounds=$.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=i||24;}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const i=Math.pow(2,e.z),a=Math.floor(t.Y(this.bounds.getWest())*i),r=Math.floor(t.X(this.bounds.getNorth())*i),o=Math.ceil(t.Y(this.bounds.getEast())*i),s=Math.ceil(t.X(this.bounds.getSouth())*i);return e.x>=a&&e.x=r&&e.y{this._options.tiles=e;})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e;})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null);}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,(function*(){const t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:this._getOverzoomParameters(e)};i.request.collectResourceTiming=this._collectResourceTiming;let a="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise(((t,i)=>{e.reloadPromise={resolve:t,reject:i};}))}else e.actor=this.dispatcher.getActor(),a="LT";e.abortController=new AbortController;try{const t=yield e.actor.sendAsync({type:a,data:i},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null);}}))}_getOverzoomParameters(e){if(e.tileID.canonical.z<=this.maxzoom)return;if(void 0===this.map._zoomLevelsToOverscale)return;const t=e.tileID.scaledTo(this.maxzoom).canonical,i=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return {maxZoomTileID:t,overzoomRequest:this.map._requestManager.transformRequest(i,"Tile")}}_afterTileLoadWorkerResponse(e,t){if(t&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.loadVectorData(t,this.map.painter),e.reloadPromise){const t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject);}}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}));}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}));}))}hasTransition(){return !1}}class K extends t.E{constructor(e,i,a,r){super(),this.id=e,this.dispatcher=a,this.setEventedParent(r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},i),t.e(this,t.U(i,["url","scheme","tileSize"]));}load(){return t._(this,arguments,void 0,(function*(e=!1){this._loaded=!1,this.fire(new t.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield W(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(t.e(this,i),i.bounds&&(this.tileBounds=new H(i.bounds,this.minzoom,this.maxzoom)),this.fire(new t.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})));}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.Z(e)||this.fire(new t.k(e));}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load();}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null);}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0);}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e;})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e;})),this}serialize(){return t.e({},this._options)}hasTile(e){return !this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const a=yield g.getImage(this.map._requestManager.transformRequest(i,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a&&a.data){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});const i=this.map.painter.context,r=i.gl,o=a.data;e.texture=this.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.T(i,o,r.RGBA,{useMipmap:!0}),e.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_NEAREST)),e.state="loaded";}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController);}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture);}))}hasTransition(){return !1}}class Y extends K{constructor(e,i,a,r){super(e,i,a,r),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift;}loadTile(e){return t._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this.map._requestManager.transformRequest(i,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const i=yield g.getImage(a,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i&&i.data){const a=i.data;this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});const r=t.b(a)&&t.$()?a:yield this.readImageNow(a),o={type:this.type,uid:e.uid,source:this.id,rawImageData:r,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||"expired"===e.state){e.actor=this.dispatcher.getActor();const t=yield e.actor.sendAsync({type:"LDT",data:o});e.dem=t,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded";}}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}readImageNow(e){return t._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&t.a0()){const i=e.width+2,a=e.height+2;try{return new t.R({width:i,height:a},yield t.a1(e,-1,-1,i,a))}catch(e){}}return n.getImageData(e,1)}))}_getNeighboringTiles(e){const i=e.canonical,a=Math.pow(2,i.z),r=(i.x-1+a)%a,o=0===i.x?e.wrap-1:e.wrap,s=(i.x+1+a)%a,n=i.x+1===a?e.wrap+1:e.wrap,l={};return l[new t.a2(e.overscaledZ,o,i.z,r,i.y).key]={backfilled:!1},l[new t.a2(e.overscaledZ,n,i.z,s,i.y).key]={backfilled:!1},i.y>0&&(l[new t.a2(e.overscaledZ,o,i.z,r,i.y-1).key]={backfilled:!1},l[new t.a2(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},l[new t.a2(e.overscaledZ,n,i.z,s,i.y-1).key]={backfilled:!1}),i.y+1e.coordinates)).flat(1/0):e.coordinates.flat(1/0)}function J(e){const t=new $;let i;switch(e.type){case "FeatureCollection":i=e.features.map((e=>Q(e.geometry))).flat(1/0);break;case "Feature":i=Q(e.geometry);break;default:i=Q(e);}if(0==i.length)return t;for(let e=0;e0&&t.e(n,{resourceTiming:s}),this.fire(new t.l("data",Object.assign(Object.assign({},n),{sourceDataType:"metadata"}))),this.fire(new t.l("data",Object.assign(Object.assign({},n),{sourceDataType:"content",shouldReloadTileOptions:o})));}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new t.l("dataabort",{dataType:"source"}));this.fire(new t.k(e));}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData();}}))}_applyDiffToSource(e){if(!e)return;const i="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){const e=t.a7(this._data.geojson,i);if(!e)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e};}if(!this._data.updateable)return;const a=t.a8(this._data.updateable,e,i);return e.removeAll||this._options.cluster?void 0:a}_getShouldReloadTileOptions(e){if(e)return {affectedBounds:e.filter(Boolean).map((e=>J(e)))}}shouldReloadTile(e,{affectedBounds:i}){if("loading"===e.state)return !0;if("unloaded"===e.state)return !1;const{buffer:a,extent:r}=this.workerOptions.geojsonVtOptions,o=function({x:e,y:i,z:a},r=0){const o=t.a3((e-r)/Math.pow(2,a)),s=t.a4((i+1+r)/Math.pow(2,a)),n=t.a3((e+1+r)/Math.pow(2,a)),l=t.a4((i-r)/Math.pow(2,a));return new $([o,s],[n,l])}(e.tileID.canonical,a/r);for(const e of i)if(o.intersects(e))return !0;return !1}loaded(){return !this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return t._(this,void 0,void 0,(function*(){const t=e.actor?"RT":"LT";e.actor=this.actor;const i={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;const a=yield this.actor.sendAsync({type:t,data:i},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(a,this.map.painter,"RT"===t);}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0;}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}});}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}});}serialize(){return t.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return !1}}class te extends t.E{constructor(e,t,i,a){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=i,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=t;}load(e){return t._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new t.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const t=yield g.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,t&&t.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading());}catch(e){this._request=null,this._loaded=!0,t.Z(e)||this.fire(new t.k(e));}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null;})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.l("data",{dataType:"source",sourceDataType:"metadata"})));}onAdd(e){this.map=e,this.load();}onRemove(){this._request&&(this._request.abort(),this._request=null);}setCoordinates(e){this.coordinates=e;const i=e.map(t.a9.fromLngLat);var a;return this.tileID=function(e){const i=t.aa.fromPoints(e),a=i.width(),r=i.height(),o=Math.max(a,r),s=Math.max(0,Math.floor(-Math.log(o)/Math.LN2)),n=Math.pow(2,s);return new t.ac(s,Math.floor((i.minX+i.maxX)/2*n),Math.floor((i.minY+i.maxY)/2*n))}(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map((e=>this.tileID.getTilePoint(e)._round())),this.flippedWindingOrder=((a=this.tileCoords)[1].x-a[0].x)*(a[2].y-a[0].y)-(a[1].y-a[0].y)*(a[2].x-a[0].x)<0,this.fire(new t.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const e=this.map.painter.context,i=e.gl;this.texture||(this.texture=new t.T(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let a=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,a=!0);}a&&this.fire(new t.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}));}loadTile(e){return t._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored";}))}serialize(){return {type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return !1}_getOverlappingTileRanges(e){const{minX:i,minY:a,maxX:r,maxY:o}=t.aa.fromPoints(e),s={};for(let e=0;e<=t.ab;e++){const t=Math.pow(2,e),n=Math.floor(i*t),l=Math.floor(a*t),c=Math.floor(r*t),h=Math.floor(o*t);s[e]={minTileX:n,minTileY:l,maxTileX:c,maxTileY:h};}return s}}class ie extends te{constructor(e,t,i,a){super(e,t,i,a),this.roundZoom=!0,this.type="video",this.options=t;}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const t of e.urls)this.urls.push(this.map._requestManager.transformRequest(t,"Source").url);try{const e=yield t.ad(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint();})),this.map&&this.video.play(),this._finishLoading();}catch(e){this.fire(new t.k(e));}}))}pause(){this.video&&this.video.pause();}play(){this.video&&this.video.play();}seek(e){if(this.video){const i=this.video.seekable;ei.end(0)?this.fire(new t.k(new t.ae(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=e;}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)));}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const e=this.map.painter.context,i=e.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new t.T(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let a=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,a=!0);}a&&this.fire(new t.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}));}serialize(){return {type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ae extends te{constructor(e,i,a,r){super(e,i,a,r),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((e=>!Array.isArray(e)||2!==e.length||e.some((e=>"number"!=typeof e))))||this.fire(new t.k(new t.ae(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.k(new t.ae(`sources.${e}`,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.k(new t.ae(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof HTMLCanvasElement||this.fire(new t.k(new t.ae(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.k(new t.ae(`sources.${e}`,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate;}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint();},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1);},this._finishLoading());}))}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play();}onRemove(){this.pause();}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const i=this.map.painter.context,a=i.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new t.T(i,this.canvas,a.RGBA,{premultiply:!0}),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let r=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0);}r&&this.fire(new t.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}));}serialize(){return {type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of [this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return !0;return !1}}const re={},oe=e=>{switch(e){case "geojson":return ee;case "image":return te;case "raster":return K;case "raster-dem":return Y;case "vector":return X;case "video":return ie;case "canvas":return ae}return re[e]},se="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Z();}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((e=>{throw this.status="error",e}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null;}setRTLTextPlugin(e){return t._(this,arguments,void 0,(function*(e,t=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(e),!this.url)throw new Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status);}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return t._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.l(se));}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport();}}let le=null;function ce(){return le||(le=new ne),le}var he,ue;!function(e){e[e.Base=0]="Base",e[e.Parent=1]="Parent";}(he||(he={})),function(e){e[e.Departing=0]="Departing",e[e.Incoming=1]="Incoming";}(ue||(ue={}));class de{constructor(e,i){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=t.af(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading";}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:i,fadeEndTime:a}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=i,this.fadeEndTime=a;}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e;}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=c(),this.fadeEndTime=0,this.fadeOpacity=1;}wasRequested(){return "errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null;}loadVectorData(e,i,a){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){const i={};if(!t)return i;for(const a of e){const e=a.layerIds.map((e=>t.getLayer(e))).filter(Boolean);if(0!==e.length){a.layers=e,a.stateDependentLayerIds&&(a.stateDependentLayers=a.stateDependentLayerIds.map((t=>e.filter((e=>e.id===t))[0])));for(const t of e)i[t.id]=a;}}return i}(e.buckets,null==i?void 0:i.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const i=this.buckets[e];if(i instanceof t.ah){if(this.hasSymbolBuckets=!0,!a)break;i.justReloaded=!0;}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const i=this.buckets[e];if(i instanceof t.ah&&i.hasRTLText){this.hasRTLText=!0,ce().lazyLoad();break}}this.queryPadding=0;for(const e in this.buckets){const t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(e).queryRadius(t));}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions;}else this.collisionBoxArray=new t.ag;}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.dashPositions&&(this.dashPositions=null),this.latestFeatureIndex=null,this.state="unloaded";}getBucket(e){return this.buckets[e.id]}upload(e){for(const t in this.buckets){const i=this.buckets[t];i.uploadPending()&&i.upload(e);}const i=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null);}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture);}queryRenderedFeatures(e,t,i,a,r,o,s,n,l,c,h){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:r,scale:o,tileSize:this.tileSize,pixelPosMatrix:c,transform:n,params:s,queryPadding:this.queryPadding*l,getElevation:h},e,t,i):{}}querySourceFeatures(e,i){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const r=a.loadVTLayers(),o=i&&i.sourceLayer?i.sourceLayer:"",s=r[t.ai]||r[o];if(!s)return;const n=t.aj(null==i?void 0:i.filter,null==i?void 0:i.globalState),{z:l,x:c,y:h}=this.tileID.canonical,u={z:l,x:c,y:h};for(let i=0;ie)t=!1;else if(i)if(this.expirationTime({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),b=[],y=[];if(e.renderWorldCopies&&n.allowWorldCopies())for(let e=1;e<=3;e++)b.push(x(-e)),b.push(x(e));for(b.push(x(0));b.length>0;){const _=b.pop(),f=_.x,x=_.y;let w=_.fullyVisible;const T={x:f,y:x,z:_.zoom},P=n.getTileBoundingVolume(T,_.wrap,e.elevation,i);if(!w){const e=ye(a,P,r);if(0===e)continue;w=2===e;}const C=n.distanceToTile2d(o.x,o.y,T,P);let I=c;l&&(I=(i.calculateTileZoom||Pe)(e.zoom+t.at(e.tileSize/i.tileSize),C,g,v,e.fov)),I=(i.roundZoom?Math.round:Math.floor)(I),I=Math.max(0,I);const M=Math.min(I,u);if(_.wrap=n.getWrap(s,T,_.wrap),_.zoom>=M){if(_.zoom>1),wrap:_.wrap,fullyVisible:w});}return y.sort(((e,t)=>e.distanceSq-t.distanceSq)).map((e=>e.tileID))}const Me=t.aa.fromPoints([new t.P(0,0),new t.P(t.a5,t.a5)]);function Ee(e){return "raster"===e||"image"===e||"video"===e}function Se(e,t,i,a,r,o,s){if(!t.hasData())return !1;const{tileID:n,fadingRole:l,fadingDirection:c,fadingParentID:h}=t;if(l===he.Base&&c===ue.Incoming&&h)return i[h.key]=h,!0;const u=Math.max(n.overscaledZ-r,o);for(let r=n.overscaledZ-1;r>=u;r--){const o=n.scaledTo(r),l=e.getLoadedTile(o);if(l)return t.setCrossFadeLogic({fadingRole:he.Base,fadingDirection:ue.Incoming,fadingParentID:l.tileID,fadeEndTime:a+s}),l.setCrossFadeLogic({fadingRole:he.Parent,fadingDirection:ue.Departing,fadeEndTime:a+s}),i[o.key]=o,!0}return !1}function Re(e,t,i,a,r,o){if(!t.hasData())return !1;const s=t.tileID.children(r);let n=ze(e,t,s,i,a,r,o);if(n)return !0;for(const l of s)ze(e,t,l.children(r),i,a,r,o)&&(n=!0);return n}function ze(e,t,i,a,r,o,s){if(i[0].overscaledZ>=o)return !1;let n=!1;for(const o of i){const i=e.getLoadedTile(o);if(!i)continue;const{fadingRole:l,fadingDirection:c,fadingParentID:h}=i;l===he.Base&&c===ue.Departing&&h||(i.setCrossFadeLogic({fadingRole:he.Base,fadingDirection:ue.Departing,fadingParentID:t.tileID,fadeEndTime:r+s}),t.setCrossFadeLogic({fadingRole:he.Parent,fadingDirection:ue.Incoming,fadeEndTime:r+s})),a[o.key]=o,n=!0;}return n}function De(e,t,i,a){const r=e.tileID;return !!e.selfFading||!e.hasData()&&!!t.has(r)&&(e.setSelfFadeLogic(i+a),!0)}function Ae(e,t){var i;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let a=t.tileID.canonical.x-e.tileID.canonical.x;const r=t.tileID.canonical.y-e.tileID.canonical.y,o=Math.pow(2,e.tileID.canonical.z),s=t.tileID.key;0===a&&0===r||Math.abs(r)>1||(Math.abs(a)>1&&(1===Math.abs(a+o)?a+=o:1===Math.abs(a-o)&&(a-=o)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,a,r),(null===(i=e.neighboringTiles)||void 0===i?void 0:i[s])&&(e.neighboringTiles[s].backfilled=!0)));}class Le{constructor(){this._tiles={};}handleWrapJump(e){const t={};for(const i in this._tiles){const a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),t[a.tileID.key]=a;}this._tiles=t;}setFeatureState(e,t){for(const i in this._tiles)this._tiles[i].setFeatureState(e,t);}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map((e=>e.tileID)).sort(t.aw).map((e=>e.key)):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t;}deleteTileById(e){delete this._tiles[e];}getLoadedTile(e){const t=this.getTileById(e.key);return (null==t?void 0:t.hasData())?t:null}isIdRenderable(e,t=!1){var i;return null===(i=this.getTileById(e))||void 0===i?void 0:i.isRenderable(t)}getRenderableIds(e=0,i){const a=[];for(const e of this.getAllIds())this.isIdRenderable(e,i)&&a.push(this.getTileById(e));return i?a.sort(((i,a)=>{const r=i.tileID,o=a.tileID,s=new t.P(r.canonical.x,r.canonical.y)._rotate(-e),n=new t.P(o.canonical.x,o.canonical.y)._rotate(-e);return r.overscaledZ-o.overscaledZ||n.y-s.y||n.x-s.x})).map((e=>e.tileID.key)):a.map((e=>e.tileID)).sort(t.aw).map((e=>e.key))}}class ke extends t.E{constructor(e,i,a){super(),this.id=e,this.dispatcher=a,this.on("data",(e=>this._dataHandler(e))),this.on("dataloading",(()=>{this._sourceErrored=!1;})),this.on("error",(()=>{this._sourceErrored=this._source.loaded();})),this._source=((e,t,i,a)=>{const r=new(oe(t.type))(e,t,i,a);if(r.id!==e)throw new Error(`Expected Source id to be ${e} instead of ${r.id}`);return r})(e,i,a,this),this._inViewTiles=new Le,this._outOfViewCache=new t.ax(0,(e=>this._unloadTile(e))),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new _e,this._didEmitContent=!1,this._updated=!1;}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e);}onRemove(e){for(const e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e),this._inViewTiles=new Le;}loaded(){if(this._sourceErrored)return !0;if(!this._sourceLoaded)return !1;if(!this._source.loaded())return !1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return !0;if(!this._updated)return !1;for(const e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return !1;return !0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0;}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain);}_loadTile(e,i,a){return t._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,i,a);}catch(i){e.state="errored",404!==i.status?this._source.fire(new t.k(i,{tile:e})):this.update(this.transform,this.terrain);}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e);}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}));}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(const t of this._inViewTiles.getAllTiles())t.upload(e),t.prepare(this.map.style.imageManager);}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var t;return this._inViewTiles.getRenderableIds(null===(t=this.transform)||void 0===t?void 0:t.bearingInRadians,e)}hasRenderableParent(e){const t=e.overscaledZ-1;if(t>=this._source.minzoom){const i=this.getLoadedTile(e.scaledTo(t));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return !1}reload(e,t=void 0){if(this._paused)this._shouldReloadOnResume=!0;else {this._outOfViewCache.reset();for(const i of this._inViewTiles.getAllIds()){const a=this._inViewTiles.getTileById(i);t&&!this._source.shouldReloadTile(a,t)||(e?this._reloadTile(i,"expired"):"errored"!==a.state&&this._reloadTile(i,"reloading"));}}}_reloadTile(e,i){return t._(this,void 0,void 0,(function*(){const t=this._inViewTiles.getTileById(e);t&&("loading"!==t.state&&(t.state=i),yield this._loadTile(t,e,i));}))}_tileLoaded(e,i,a){e.timeAdded=c(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration),"expired"===a&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),"raster-dem"===this.getSource().type&&e.dem&&function(e,t){var i,a;const r=t.getRenderableIds();for(const o of r){if(!e.neighboringTiles||!e.neighboringTiles[o])continue;const r=t.getTileById(o);e.neighboringTiles[o].backfilled||Ae(e,r),(null===(a=null===(i=r.neighboringTiles)||void 0===i?void 0:i[e.tileID.key])||void 0===a?void 0:a.backfilled)||Ae(r,e);}}(e,this._inViewTiles),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.l("data",{dataType:"source",tile:e,coord:e.tileID}));}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,t){const i=this._getLoadedDescendents(t),a=new Set;for(const r of t){const t=i[r.key];if(!(null==t?void 0:t.length)){a.add(r);continue}const o=r.overscaledZ+ke.maxOverzooming,s=t.filter((e=>e.tileID.overscaledZ<=o));if(!s.length){a.add(r);continue}const n=Math.min(...s.map((e=>e.tileID.overscaledZ))),l=s.filter((e=>e.tileID.overscaledZ===n)).map((e=>e.tileID));for(const t of l)e[t.key]=t;this._areDescendentsComplete(l,n,r.overscaledZ)||a.add(r);}return a}_getLoadedDescendents(e){var t;const i={};for(const a of this._inViewTiles.getAllTiles().filter((e=>e.hasData())))for(const r of e)a.tileID.isChildOf(r)&&(i[t=r.key]||(i[t]=[])).push(a);return i}_areDescendentsComplete(e,t,i){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:Math.pow(4,t-i)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){const i=Math.ceil(e.width/this._source.tileSize)+1,a=Math.ceil(e.height/this._source.tileSize)+1,r=Math.floor(i*a*(null===this._maxTileCacheZoomLevels?t.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),o="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(o);}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers());}update(e,i){if(!this._sourceLoaded||this._paused)return;let a;this.transform=e,this.terrain=i,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((e=>new t.a2(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y))):(a=Ie(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?e.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(a=a.filter((e=>this._source.hasTile(e))))):a=[],this.usedForTerrain&&(a=this._addTerrainIdealTiles(a));const r=0===a.length&&!this._updated&&this._didEmitContent;this._updated=!0,r&&this.fire(new t.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const o=Ce(e,this._source),s=this._updateRetainedTiles(a,o),n=Ee(this._source.type);n&&this._rasterFadeDuration>0&&!i&&function(e,i,a,r,o,s,n){const l=c(),h=t.av(i);for(const t of i){const i=e.getTileById(t.key);i.fadingDirection!==ue.Departing&&0!==i.fadeOpacity||i.resetFadeLogic(),Se(e,i,a,l,r,o,n)||Re(e,i,a,l,s,n)||De(i,h,l,n)||i.resetFadeLogic();}}(this._inViewTiles,a,s,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),n?this._cleanUpRasterTiles(s):this._cleanUpVectorTiles(s);}_cleanUpRasterTiles(e){for(const t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t);}_cleanUpVectorTiles(e){for(const t of this._inViewTiles.getAllIds()){const i=this._inViewTiles.getTileById(t);e[t]?i.clearSymbolFadeHold():i.hasSymbolBuckets?i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(t):i.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t);}}_addTerrainIdealTiles(e){const t=[];for(const i of e)if(i.canonical.z>this._source.minzoom){const e=i.scaledTo(i.canonical.z-1);t.push(e);const a=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));t.push(a);}return e.concat(t)}releaseSymbolFadeTiles(){for(const e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e);}_updateRetainedTiles(e,t){var i;const a=new Set;for(const t of e)this._addTile(t).hasData()||a.add(t);const r=e.reduce(((e,t)=>(e[t.key]=t,e)),{}),o=this._retainLoadedChildren(r,a),s={},n=Math.max(t-ke.maxUnderzooming,this._source.minzoom);for(const e of o){let t=this._inViewTiles.getTileById(e.key),a=null==t?void 0:t.wasRequested();for(let o=e.overscaledZ-1;o>=n;--o){const n=e.scaledTo(o);if(s[n.key])break;if(s[n.key]=!0,t=this.getTile(n),!t&&a&&(t=this._addTile(n)),t){const e=t.hasData();if((e||!(null===(i=this.map)||void 0===i?void 0:i.cancelPendingTileRequestsWhileZooming)||a)&&(r[n.key]=n),a=t.wasRequested(),e)break}}}return r}_addTile(e){let i=this._inViewTiles.getTileById(e.key);if(i)return i;i=this._outOfViewCache.getAndRemove(e),i&&(i.resetFadeLogic(),this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null));const a=i;return i||(i=new de(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,e.key,i.state)),i.uses++,this._inViewTiles.setTile(e.key,i),a||this._source.fire(new t.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);const i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e];}),i));}_clearTileReloadTimer(e){const t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e]);}_resetTileReloadTimers(){for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e of this._inViewTiles.getAllIds()){const t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t);}}refreshTiles(e){for(const t of this._inViewTiles.getAllIds()){const i=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==i.state)&&e.some((e=>e.equals(i.tileID.canonical)))&&this._reloadTile(t,"expired");}}_removeTile(e){const t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))));}_dataHandler(e){"source"===e.dataType&&("metadata"!==e.sourceDataType?"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0);}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e of this._inViewTiles.getAllIds())this._removeTile(e);this._outOfViewCache.reset();}tilesIn(e,i,a){const r=[],o=this.transform;if(!o)return r;const s=o.getCoveringTilesDetailsProvider().allowWorldCopies(),n=a?o.getCameraQueryGeometry(e):e,l=e=>o.screenPointToMercatorCoordinate(e,this.terrain),c=this.transformBbox(e,l,!s),h=this.transformBbox(n,l,!s),u=this.getIds(),d=t.aa.fromPoints(h);for(let e=0;ee.getTilePoint(new t.a9(i.x,i.y))));if(i.expandBy(_),i.intersects(Me)){const t=c.map((t=>e.getTilePoint(t))),i=h.map((t=>e.getTilePoint(t)));r.push({tile:a,tileID:s?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:i,scale:l});}}}return r}transformBbox(e,i,a){let r=e.map(i);if(a){const a=t.aa.fromPoints(e);a.shrinkBy(.001*Math.min(a.width(),a.height()));const o=a.map(i);t.aa.fromPoints(r).covers(o)||(r=r.map((e=>e.x>.5?new t.a9(e.x-1,e.y,e.z):e)));}return r}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map((e=>this._inViewTiles.getTileById(e).tileID));return this.transform&&this.transform.populateCache(t),t}hasTransition(){return !!this._source.hasTransition()||!(!Ee(this._source.type)||!function(e,t){if(t<=0)return !1;const i=c();for(const t of e.getAllTiles())if(t.fadeEndTime>=i)return !0;return !1}(this._inViewTiles,this._rasterFadeDuration))}setRasterFadeDuration(e){this._rasterFadeDuration=e;}setFeatureState(e,i,a){this._state.updateState(e=e||t.ai,i,a);}removeFeatureState(e,i,a){this._state.removeFeatureState(e=e||t.ai,i,a);}getFeatureState(e,i){return this._state.getState(e=e||t.ai,i)}setDependencies(e,t,i){const a=this._inViewTiles.getTileById(e);a&&a.setDependencies(t,i);}reloadTilesForDependencies(e,t){for(const i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(e,t)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter((i=>!i.hasDependency(e,t)));}areTilesLoaded(){for(const e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return !1;return !0}}ke.maxUnderzooming=10,ke.maxOverzooming=3;class Fe{constructor(e,t){this.reset(e,t);}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(r-s)/n:0;return this.points[o].mult(1-l).add(this.points[i].mult(l))}}function Be(e,t){let i=!0;return "always"===e||"never"!==e&&"never"!==t||(i=!1),i}class Oe{constructor(e,t,i){const a=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;ethis.width||a<0||t>this.height)return [];const n=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=a){if(r)return [{key:null,x1:e,y1:t,x2:i,y2:a}];for(let e=0;e0}hitTestCircle(e,t,i,a,r){const o=e-i,s=e+i,n=t-i,l=t+i;if(s<0||o>this.width||l<0||n>this.height)return !1;const c=[];return this._forEachCell(o,n,s,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:a,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}},r),c.length>0}_queryCell(e,t,i,a,r,o,s,n){const{seenUids:l,hitTest:c,overlapMode:h}=s,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const s of u)if(!l.box[s]){l.box[s]=!0;const u=4*s,d=this.boxKeys[s];if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&a>=r[u+1]&&(!n||n(d))&&(!c||!Be(h,d.overlapMode))&&(o.push({key:d,x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]}),c))return !0}}const d=this.circleCells[r];if(null!==d){const r=this.circles;for(const s of d)if(!l.circle[s]){l.circle[s]=!0;const u=3*s,d=this.circleKeys[s];if(this._circleAndRectCollide(r[u],r[u+1],r[u+2],e,t,i,a)&&(!n||n(d))&&(!c||!Be(h,d.overlapMode))){const e=r[u],t=r[u+1],i=r[u+2];if(o.push({key:d,x1:e-i,y1:t-i,x2:e+i,y2:t+i}),c)return !0}}}return !1}_queryCellCircle(e,t,i,a,r,o,s,n){const{circle:l,seenUids:c,overlapMode:h}=s,u=this.boxCells[r];if(null!==u){const e=this.bboxes;for(const t of u)if(!c.box[t]){c.box[t]=!0;const i=4*t,a=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!n||n(a))&&!Be(h,a.overlapMode))return o.push(!0),!0}}const d=this.circleCells[r];if(null!==d){const e=this.circles;for(const t of d)if(!c.circle[t]){c.circle[t]=!0;const i=3*t,a=this.circleKeys[t];if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!n||n(a))&&!Be(h,a.overlapMode))return o.push(!0),!0}}}_forEachCell(e,t,i,a,r,o,s,n){const l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),h=this._convertToXCellCoord(i),u=this._convertToYCellCoord(a);for(let d=l;d<=h;d++)for(let l=c;l<=u;l++)if(r.call(this,e,t,i,a,this.xCellCount*l+d,o,s,n))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,a,r,o){const s=a-e,n=r-t,l=i+o;return l*l>s*s+n*n}_circleAndRectCollide(e,t,i,a,r,o,s){const n=(o-a)/2,l=Math.abs(e-(a+n));if(l>n+i)return !1;const c=(s-r)/2,h=Math.abs(t-(r+c));if(h>c+i)return !1;if(l<=n||h<=c)return !0;const u=l-n,d=h-c;return u*u+d*d<=i*i}}function je(e,i,r){const o=t.N();if(!e){const{vecSouth:e,vecEast:t}=Ze(i),r=a();r[0]=t[0],r[1]=t[1],r[2]=e[0],r[3]=e[1],s=r,(d=(l=(n=r)[0])*(u=n[3])-(h=n[2])*(c=n[1]))&&(s[0]=u*(d=1/d),s[1]=-c*d,s[2]=-h*d,s[3]=l*d),o[0]=r[0],o[1]=r[1],o[4]=r[2],o[5]=r[3];}var s,n,l,c,h,u,d;return t.Q(o,o,[1/r,1/r,1]),o}function Ne(e,i,a,r){if(e){const e=t.N();if(!i){const{vecSouth:t,vecEast:i}=Ze(a);e[0]=i[0],e[1]=i[1],e[4]=t[0],e[5]=t[1];}return t.Q(e,e,[r,r,1]),e}return a.pixelsToClipSpaceMatrix}function Ze(e){const i=Math.cos(e.rollInRadians),a=Math.sin(e.rollInRadians),r=Math.cos(e.pitchInRadians),o=Math.cos(e.bearingInRadians),s=Math.sin(e.bearingInRadians),n=t.aC();n[0]=-o*r*a-s*i,n[1]=-s*r*a+o*i;const l=t.aD(n);l<1e-9?t.aE(n):t.aF(n,n,1/l);const c=t.aC();c[0]=o*r*i-s*a,c[1]=s*r*i+o*a;const h=t.aD(c);return h<1e-9?t.aE(c):t.aF(c,c,1/h),{vecEast:c,vecSouth:n}}function Ge(e,i,a,r){let o;r?(o=[e,i,r(e,i),1],t.aH(o,o,a)):(o=[e,i,0,1],ot(o,o,a));const s=o[3];return {point:new t.P(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}function Ue(e,t){return .5+e/t*.5}function Ve(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function qe(e,i,a,r,o,s,n,l,c,h,u,d,_){const p=a?e.textSizeData:e.iconSizeData,m=t.ay(p,i.transform.zoom),f=[256/i.width*2+1,256/i.height*2+1],g=a?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;g.clear();const v=e.lineVertexArray,x=a?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=i.transform.width/i.transform.height;let y=!1;for(let a=0;aMath.abs(a.x-i.x)*r?{useVertical:!0}:(e===t.az.vertical?i.ya.x)?{needsFlipping:!0}:null}function He(e){const{projectionContext:i,pitchedLabelPlaneMatrixInverse:a,symbol:r,fontSize:o,flip:s,keepUpright:n,glyphOffsetArray:l,dynamicLayoutVertexArray:c,aspectRatio:h,rotateToLine:u}=e,d=o/24,_=r.lineOffsetX*d,p=r.lineOffsetY*d;let m;if(r.numGlyphs>1){const e=r.glyphStartIndex+r.numGlyphs,t=r.lineStartIndex,o=r.lineStartIndex+r.lineLength,c=We(d,l,_,p,s,r,u,i);if(!c)return {notEnoughRoom:!0};const f=Qe(c.first.point.x,c.first.point.y,i,a),g=Qe(c.last.point.x,c.last.point.y,i,a);if(n&&!s){const e=$e(r.writingMode,f,g,h);if(e)return e}m=[c.first];for(let a=r.glyphStartIndex+1;a0?n.point:Xe(i.tileAnchorPoint,s,e,1,i),c=Qe(e.x,e.y,i,a),u=Qe(l.x,l.y,i,a),d=$e(r.writingMode,c,u,h);if(d)return d}const e=it(d*l.getoffsetX(r.glyphStartIndex),_,p,s,r.segment,r.lineStartIndex,r.lineStartIndex+r.lineLength,i,u);if(!e||i.projectionCache.anyProjectionOccluded)return {notEnoughRoom:!0};m=[e];}for(const e of m)t.aG(c,e.point,e.angle);return {}}function Xe(e,t,i,a,r){const o=e.add(e.sub(t)._unit()),s=Ye(o.x,o.y,r).point,n=i.sub(s);return i.add(n._mult(a/n.mag()))}function Ke(e,i,a){const r=i.projectionCache;if(r.projections[e])return r.projections[e];const o=new t.P(i.lineVertexArray.getx(e),i.lineVertexArray.gety(e)),s=Ye(o.x,o.y,i);if(s.signedDistanceFromCamera>0)return r.projections[e]=s.point,r.anyProjectionOccluded=r.anyProjectionOccluded||s.isOccluded,s.point;const n=e-a.direction;return Xe(0===a.distanceFromAnchor?i.tileAnchorPoint:new t.P(i.lineVertexArray.getx(n),i.lineVertexArray.gety(n)),o,a.previousVertex,a.absOffsetX-a.distanceFromAnchor+1,i)}function Ye(e,t,i){const a=e+i.translation[0],r=t+i.translation[1];let o;return i.pitchWithMap?(o=Ge(a,r,i.pitchedLabelPlaneMatrix,i.getElevation),o.isOccluded=!1):(o=i.transform.projectTileCoordinates(a,r,i.unwrappedTileID,i.getElevation),o.point.x=(.5*o.point.x+.5)*i.width,o.point.y=(.5*-o.point.y+.5)*i.height),o}function Qe(e,i,a,r){if(a.pitchWithMap){const o=[e,i,0,1];return t.aH(o,o,r),a.transform.projectTileCoordinates(o[0]/o[3],o[1]/o[3],a.unwrappedTileID,a.getElevation).point}return {x:e/a.width*2-1,y:1-i/a.height*2}}function Je(e,t,i){return i.transform.projectTileCoordinates(e,t,i.unwrappedTileID,i.getElevation)}function et(e,t,i){return e._unit()._perp()._mult(t*i)}function tt(e,i,a,r,o,s,n,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];const h=a.add(i);if(e+c.direction=o)return l.projectionCache.offsets[e]=h,h;const u=Ke(e+c.direction,l,c),d=et(u.sub(a),n,c.direction),_=a.add(d),p=u.add(d);return l.projectionCache.offsets[e]=t.aI(s,h,_,p)||h,l.projectionCache.offsets[e]}function it(e,t,i,a,r,o,s,n,l){const c=a?e-t:e+t;let h=c>0?1:-1,u=0;a&&(h*=-1,u=Math.PI),h<0&&(u+=Math.PI);let d,_=h>0?o+r:o+r+1;n.projectionCache.cachedAnchorPoint?d=n.projectionCache.cachedAnchorPoint:(d=Ye(n.tileAnchorPoint.x,n.tileAnchorPoint.y,n).point,n.projectionCache.cachedAnchorPoint=d);let p,m,f=d,g=d,v=0,x=0;const b=Math.abs(c),y=[];let w;for(;v+x<=b;){if(_+=h,_=s)return null;v+=x,g=f,m=p;const e={absOffsetX:b,direction:h,distanceFromAnchor:v,previousVertex:g};if(f=Ke(_,n,e),0===i)y.push(g),w=f.sub(g);else {let t;const a=f.sub(g);t=0===a.mag()?et(Ke(_+h,n,e).sub(f),i,h):et(a,i,h),m||(m=g.add(t)),p=tt(_,t,f,o,s,m,i,n,e),y.push(m),w=p.sub(m);}x=w.mag();}const T=w._mult((b-v)/x)._add(m||g),P=u+Math.atan2(f.y-g.y,f.x-g.x);return y.push(T),{point:T,angle:l?P:0,path:y}}const at=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function rt(e,t){for(let i=0;i=1;e--)_.push(s.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0))?[]:e.map((e=>e.point));}let f=[];if(_.length>0){const e=_[0].clone(),i=_[0].clone();for(let t=1;t<_.length;t++)e.x=Math.min(e.x,_[t].x),e.y=Math.min(e.y,_[t].y),i.x=Math.max(i.x,_[t].x),i.y=Math.max(i.y,_[t].y);f=e.x>=a.x&&i.x<=r.x&&e.y>=a.y&&i.y<=r.y?[_]:i.xr.x||i.yr.y?[]:t.aJ([_],a.x,a.y,r.x,r.y);}for(const t of f){o.reset(t,.25*i);let a=0;a=o.length<=.5*i?1:Math.ceil(o.paddedLength/p)+1;for(let t=0;t{const t=Ge(e.x,e.y,a,i.getElevation),r=i.transform.projectTileCoordinates(t.point.x,t.point.y,i.unwrappedTileID,i.getElevation);return r.point.x=(.5*r.point.x+.5)*i.width,r.point.y=(.5*-r.point.y+.5)*i.height,r}))}(e,i);return function(e){let t=0,i=0,a=0,r=0;for(let o=0;oi&&(i=r,t=a));return e.slice(t,t+i)}(a)}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return {};const i=[],a=new t.aa;for(const r of e){const e=new t.P(r.x+st,r.y+st);a.extend(e),i.push(e);}const{minX:r,minY:o,maxX:s,maxY:n}=a,l=this.grid.query(r,o,s,n).concat(this.ignoredGrid.query(r,o,s,n)),c={},h={};for(const e of l){const a=e.key;if(void 0===c[a.bucketInstanceId]&&(c[a.bucketInstanceId]={}),c[a.bucketInstanceId][a.featureIndex])continue;const r=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.aK(i,r)&&(c[a.bucketInstanceId][a.featureIndex]=!0,void 0===h[a.bucketInstanceId]&&(h[a.bucketInstanceId]=[]),h[a.bucketInstanceId].push(a.featureIndex));}return h}insertCollisionBox(e,t,i,a,r,o){(i?this.ignoredGrid:this.grid).insert({bucketInstanceId:a,featureIndex:r,collisionGroupID:o,overlapMode:t},e[0],e[1],e[2],e[3]);}insertCollisionCircles(e,t,i,a,r,o){const s=i?this.ignoredGrid:this.grid,n={bucketInstanceId:a,featureIndex:r,collisionGroupID:o,overlapMode:t};for(let t=0;t=this.screenRightBoundary||athis.screenBottomBoundary}isInsideGrid(e,t,i,a){return i>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(e.x,e.y,r,c,u)));S=e.some((e=>!e.isOccluded)),E=e.map((e=>new t.P(e.x,e.y)));}else S=!0;return {box:t.aL(E),allPointsOccluded:!S}}}class lt{constructor(e,t,i,a){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):a&&i?1:0,this.placed=i;}isHidden(){return 0===this.opacity&&!this.placed}}class ct{constructor(e,t,i,a,r){this.text=new lt(e?e.text:null,t,i,r),this.icon=new lt(e?e.icon:null,t,a,r);}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ht{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i;}}class ut{constructor(e,t,i,a,r){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=i,this.bucketIndex=a,this.tileID=r;}}class dt{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={};}get(e){if(this.crossSourceCollisions)return {ID:0,predicate:null};if(!this.collisionGroups[e]){const t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t};}return this.collisionGroups[e]}}function _t(e,i,a,r,o){const{horizontalAlign:s,verticalAlign:n}=t.aS(e);return new t.P(-(s-.5)*i+r[0]*o,-(n-.5)*a+r[1]*o)}class pt{constructor(e,t,i,a,r){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new nt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.retainedQueryData={},this.collisionGroups=new dt(a),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=r,r&&(r.prevPlacement=void 0),this.placedOrientations={};}_getTerrainElevationFunc(e){const t=this.terrain;return t?(i,a)=>t.getElevation(e,i,a):null}getBucketParts(e,i,a,r){const o=a.getBucket(i),s=a.latestFeatureIndex;if(!o||!s||i.id!==o.layerIds[0])return;const n=a.collisionBoxArray,l=o.layers[0].layout,c=o.layers[0].paint,h=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),u=a.tileSize/t.a5,d=a.tileID.toUnwrapped(),_="map"===l.get("text-rotation-alignment"),p=t.aN(a,1,this.transform.zoom),m=t.aO(this.collisionIndex.transform,a,c.get("text-translate"),c.get("text-translate-anchor")),f=t.aO(this.collisionIndex.transform,a,c.get("icon-translate"),c.get("icon-translate-anchor")),g=je(_,this.transform,p);this.retainedQueryData[o.bucketInstanceId]=new ut(o.bucketInstanceId,s,o.sourceLayerIndex,o.index,a.tileID);const v={bucket:o,layout:l,translationText:m,translationIcon:f,unwrappedTileID:d,pitchedLabelPlaneMatrix:g,scale:h,textPixelRatio:u,holdingForFade:a.holdingForSymbolFade(),collisionBoxArray:n,partiallyEvaluatedTextSize:t.ay(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(r)for(const t of o.sortKeyRanges){const{sortKey:i,symbolInstanceStart:a,symbolInstanceEnd:r}=t;e.push({sortKey:i,symbolInstanceStart:a,symbolInstanceEnd:r,parameters:v});}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:v});}attemptAnchorPlacement(e,i,a,r,o,s,n,l,c,h,u,d,_,p,m,f,g,v,x,b){const y=t.aP[e.textAnchor],w=[e.textOffset0,e.textOffset1],T=_t(y,a,r,w,o),P=this.collisionIndex.placeCollisionBox(i,d,l,c,h,n,s,f,u.predicate,x,T,b);if((!v||this.collisionIndex.placeCollisionBox(v,d,l,c,h,n,s,g,u.predicate,x,T,b).placeable)&&P.placeable){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[_.crossTileID]&&this.prevPlacement.placements[_.crossTileID]&&this.prevPlacement.placements[_.crossTileID].text&&(e=this.prevPlacement.variableOffsets[_.crossTileID].anchor),0===_.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[_.crossTileID]={textOffset:w,width:a,height:r,anchor:y,textBoxScale:o,prevAnchor:e},this.markUsedJustification(p,y,_,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,_),this.placedOrientations[_.crossTileID]=m),{shift:T,placedGlyphBoxes:P}}}placeLayerBucketPart(e,i,a){const{bucket:r,layout:o,translationText:s,translationIcon:n,unwrappedTileID:l,pitchedLabelPlaneMatrix:c,textPixelRatio:h,holdingForFade:u,collisionBoxArray:d,partiallyEvaluatedTextSize:_,collisionGroup:p}=e.parameters,m=o.get("text-optional"),f=o.get("icon-optional"),g=t.aQ(o,"text-overlap","text-allow-overlap"),v="always"===g,x=t.aQ(o,"icon-overlap","icon-allow-overlap"),b="always"===x,y="map"===o.get("text-rotation-alignment"),w="map"===o.get("text-pitch-alignment"),T="none"!==o.get("icon-text-fit"),P="viewport-y"===o.get("symbol-z-order"),C=v&&(b||!r.hasIconData()||f),I=b&&(v||!r.hasTextData()||m);!r.collisionArrays&&d&&r.deserializeCollisionBoxes(d);const M=this.retainedQueryData[r.bucketInstanceId].tileID,E=this._getTerrainElevationFunc(M),S=this.transform.getFastPathSimpleProjectionMatrix(M),R=(e,d,b)=>{var P,R;if(i[e.crossTileID])return;if(u)return void(this.placements[e.crossTileID]=new ht(!1,!1,!1));let z=!1,D=!1,A=!0,L=null,k={box:null,placeable:!1,offscreen:null,occluded:!1},F={placeable:!1},B=null,O=null,j=null,N=0,Z=0,G=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(Z=d.verticalTextFeatureIndex);const U=d.textBox;if(U){const i=i=>{let a=t.az.horizontal;if(r.allowVerticalPlacement&&!i&&this.prevPlacement){const t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,a=t,this.markUsedOrientation(r,a,e));}return a},o=(i,a)=>{if(r.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(const e of r.writingModes)if(e===t.az.vertical?(k=a(),F=k):k=i(),k&&k.placeable)break}else k=i();},c=e.textAnchorOffsetStartIndex,u=e.textAnchorOffsetEndIndex;if(u===c){const a=(t,i)=>{const a=this.collisionIndex.placeCollisionBox(t,g,h,M,l,w,y,s,p.predicate,E,void 0,S);return a&&a.placeable&&(this.markUsedOrientation(r,i,e),this.placedOrientations[e.crossTileID]=i),a};o((()=>a(U,t.az.horizontal)),(()=>{const i=d.verticalTextBox;return r.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&i?a(i,t.az.vertical):{box:null,offscreen:null}})),i(k&&k.placeable);}else {let _=t.aP[null===(R=null===(P=this.prevPlacement)||void 0===P?void 0:P.variableOffsets[e.crossTileID])||void 0===R?void 0:R.anchor];const m=(t,i,o)=>{const d=t.x2-t.x1,m=t.y2-t.y1,f=e.textBoxScale,v=T&&"never"===x?i:null;let b=null,P="never"===g?1:2,C="never";_&&P++;for(let i=0;im(U,d.iconBox,t.az.horizontal)),(()=>{const i=d.verticalTextBox;return r.allowVerticalPlacement&&(!k||!k.placeable)&&e.numVerticalGlyphVertices>0&&i?m(i,d.verticalIconBox,t.az.vertical):{box:null,occluded:!0,offscreen:null}})),k&&(z=k.placeable,A=k.offscreen);const f=i(k&&k.placeable);if(!z&&this.prevPlacement){const t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(r,t.anchor,e,f));}}}if(B=k,z=B&&B.placeable,A=B&&B.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){const i=r.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),n=t.aA(r.textSizeData,_,i),h=o.get("text-padding");O=this.collisionIndex.placeCollisionCircles(g,i,r.lineVertexArray,r.glyphOffsetArray,n,l,c,a,w,p.predicate,e.collisionCircleDiameter,h,s,E),O.circles.length&&O.collisionDetected&&!a&&t.w("Collisions detected, but collision boxes are not shown"),z=v||O.circles.length>0&&!O.collisionDetected,A=A&&O.offscreen;}if(d.iconFeatureIndex&&(G=d.iconFeatureIndex),d.iconBox){const e=e=>this.collisionIndex.placeCollisionBox(e,x,h,M,l,w,y,n,p.predicate,E,T&&L?L:void 0,S);F&&F.placeable&&d.verticalIconBox?(j=e(d.verticalIconBox),D=j.placeable):(j=e(d.iconBox),D=j.placeable),A=A&&j.offscreen;}const V=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,q=f||0===e.numIconVertices;V||q?q?V||(D=D&&z):z=D&&z:D=z=D&&z;const W=D&&j.placeable;if(z&&B.placeable&&this.collisionIndex.insertCollisionBox(B.box,g,o.get("text-ignore-placement"),r.bucketInstanceId,F&&F.placeable&&Z?Z:N,p.ID),W&&this.collisionIndex.insertCollisionBox(j.box,x,o.get("icon-ignore-placement"),r.bucketInstanceId,G,p.ID),O&&z&&this.collisionIndex.insertCollisionCircles(O.circles,g,o.get("text-ignore-placement"),r.bucketInstanceId,N,p.ID),a&&this.storeCollisionData(r.bucketInstanceId,b,d,B,j,O),0===e.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===r.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new ht((z||C)&&!(null==B?void 0:B.occluded),(D||I)&&!(null==j?void 0:j.occluded),A||r.justReloaded),i[e.crossTileID]=!0;};if(P){if(0!==e.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const t=r.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){const i=t[e];R(r.symbolInstances.get(i),r.collisionArrays[i],i);}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(t).crossTileID=o>=0&&t!==o?0:a.crossTileID);}markUsedOrientation(e,i,a){const r=i===t.az.horizontal||i===t.az.horizontalOnly?i:0,o=i===t.az.vertical?i:0,s=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const t of s)e.text.placedSymbolArray.get(t).placedOrientation=r;a.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=o);}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const a=t?t.symbolFadeChange(e):1,r=t?t.opacities:{},o=t?t.variableOffsets:{},s=t?t.placedOrientations:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new ct(o,a,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new ct(null,a,t.text,t.icon,t.skipFade),i=i||t.text||t.icon);}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new ct(t,a,!1,!1);r.isHidden()||(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed);}}for(const e in o)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=o[e]);for(const e in s)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=s[e]);if(t&&void 0===t.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e);}updateLayerOpacities(e,t){const i={};for(const a of t){const t=a.getBucket(e);t&&a.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,a.tileID,i,a.collisionBoxArray);}}updateBucketOpacities(e,i,a,r){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const o=e.layers[0],s=o.layout,n=new ct(null,0,!1,!1,!0),l=s.get("text-allow-overlap"),c=s.get("icon-allow-overlap"),h=o._unevaluatedLayout.hasValue("text-variable-anchor")||o._unevaluatedLayout.hasValue("text-variable-anchor-offset"),u="map"===s.get("text-rotation-alignment"),d="map"===s.get("text-pitch-alignment"),_="none"!==s.get("icon-text-fit"),p=new ct(null,0,l&&(c||!e.hasIconData()||s.get("icon-optional")),c&&(l||!e.hasTextData()||s.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);const m=(e,t,i)=>{for(let a=0;a0,v=this.placedOrientations[r.crossTileID],x=v===t.az.vertical,b=v===t.az.horizontal||v===t.az.horizontalOnly;if(o>0||s>0){const t=Tt(c.text);m(e.text,o,x?Pt:t),m(e.text,s,b?Pt:t);const i=c.text.isHidden();[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex].forEach((t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=i||x?1:0);})),r.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).hidden=i||b?1:0);const a=this.variableOffsets[r.crossTileID];a&&this.markUsedJustification(e,a.anchor,r,v);const n=this.placedOrientations[r.crossTileID];n&&(this.markUsedJustification(e,"left",r,n),this.markUsedOrientation(e,n,r));}if(g){const t=Tt(c.icon),i=!(_&&r.verticalPlacedIconSymbolIndex&&x);r.placedIconSymbolIndex>=0&&(m(e.icon,r.numIconVertices,i?t:Pt),e.icon.placedSymbolArray.get(r.placedIconSymbolIndex).hidden=c.icon.isHidden()),r.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,r.numVerticalIconVertices,i?Pt:t),e.icon.placedSymbolArray.get(r.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden());}const y=f&&f.has(i)?f.get(i):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const a=e.collisionArrays[i];if(a){let i=new t.P(0,0);if(a.textBox||a.verticalTextBox){let t=!0;if(h){const e=this.variableOffsets[l];e?(i=_t(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),u&&i._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1;}if(a.textBox||a.verticalTextBox){let r;a.textBox&&(r=x),a.verticalTextBox&&(r=b),mt(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||r,y.text,i.x,i.y);}}if(a.iconBox||a.verticalIconBox){const t=Boolean(!b&&a.verticalIconBox);let r;a.iconBox&&(r=t),a.verticalIconBox&&(r=!t),mt(e.iconCollisionBox.collisionVertexArray,c.icon.placed,r,y.icon,_?i.x:0,_?i.y:0);}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId]);}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0;}}function mt(e,t,i,a,r,o){a&&0!==a.length||(a=[0,0,0,0]);const s=a[0]-st,n=a[1]-st,l=a[2]-st,c=a[3]-st;e.emplaceBack(t?1:0,i?1:0,r||0,o||0,s,n),e.emplaceBack(t?1:0,i?1:0,r||0,o||0,l,n),e.emplaceBack(t?1:0,i?1:0,r||0,o||0,l,c),e.emplaceBack(t?1:0,i?1:0,r||0,o||0,s,c);}const ft=Math.pow(2,25),gt=Math.pow(2,24),vt=Math.pow(2,17),xt=Math.pow(2,16),bt=Math.pow(2,9),yt=Math.pow(2,8),wt=Math.pow(2,1);function Tt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,i=Math.floor(127*e.opacity);return i*ft+t*gt+i*vt+t*xt+i*bt+t*yt+i*wt+t}const Pt=0;class Ct{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[];}continuePlacement(e,t,i,a,r){const o=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey)));this._currentPartIndex!this._forceFullPlacement&&c()-a>2;for(;this._currentPlacementIndex>=0;){const a=t[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if("symbol"===a.type&&(!a.minzoom||a.minzoom<=o)&&(!a.maxzoom||a.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new Ct(a)),this._inProgressLayer.continuePlacement(i[a.source],this.placement,this._showCollisionBoxes,a,r))return;delete this._inProgressLayer;}this._currentPlacementIndex--;}this._done=!0;}commit(e){return this.placement.commit(e),this.placement}}const Mt=512/t.a5/2;class Et{constructor(e,i,a){this.tileID=e,this.bucketInstanceId=a,this._symbolsByKey={};const r=new Map;for(let e=0;e({x:Math.floor(e.anchorX*Mt),y:Math.floor(e.anchorY*Mt)}))),crossTileIDs:i.map((e=>e.crossTileID))};if(a.positions.length>128){const e=new t.aT(a.positions.length,16,Uint16Array);for(const{x:t,y:i}of a.positions)e.add(t,i);e.finish(),delete a.positions,a.index=e;}this._symbolsByKey[e]=a;}}getScaledCoordinates(e,i){const{x:a,y:r,z:o}=this.tileID.canonical,{x:s,y:n,z:l}=i.canonical,c=Mt/Math.pow(2,l-o),h=(n*t.a5+e.anchorY)*c,u=r*t.a5*Mt;return {x:Math.floor((s*t.a5+e.anchorX)*c-a*t.a5*Mt),y:Math.floor(h-u)}}findMatches(e,t,i){const a=this.tileID.canonical.ze))}}class St{constructor(){this.maxCrossTileID=0;}generate(){return ++this.maxCrossTileID}}class Rt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0;}handleWrapJump(e){const t=Math.round((e-this.lng)/360);if(0!==t)for(const e in this.indexes){const i=this.indexes[e],a={};for(const e in i){const r=i[e];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+t),a[r.tileID.key]=r;}this.indexes[e]=a;}this.lng=e;}addBucket(e,t,i){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return !1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key]);}for(let e=0;ee.overscaledZ)for(const i in r){const o=r[i];o.tileID.isChildOf(e)&&o.findMatches(t.symbolInstances,e,a);}else {const o=r[e.scaledTo(Number(i)).key];o&&o.findMatches(t.symbolInstances,e,a);}}for(let e=0;e{t[e]=!0;}));for(const e in this.layerIndexes)t[e]||delete this.layerIndexes[e];}}var Dt="void main() {fragColor=vec4(1.0);}";const At={prelude:Lt("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nout highp vec4 fragColor;","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c\n);}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\n#ifdef GLOBE\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\n#endif\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;"),projectionMercator:Lt("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Lt("","#define GLOBE_RADIUS 6371008.8\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); \nif (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}"),background:Lt("uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Lt("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Lt("in vec3 v_data;in float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:Lt(Dt,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Lt("uniform highp float u_intensity;in vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);\n#ifdef GLOBE\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\n#else\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\n#endif\n}"),heatmapTexture:Lt("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Lt("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Lt("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:Lt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Lt("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Lt(Dt,"in vec2 a_pos;void main() {\n#ifdef GLOBE\ngl_Position=projectTileFor3D(a_pos,0.0);\n#else\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\n#endif\n}"),fill:Lt("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;in vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),fillOutline:Lt("in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillOutlinePattern:Lt("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillPattern:Lt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:Lt("in vec4 v_color;void main() {fragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\nout vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:Lt("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\n#ifdef GLOBE\nout vec3 v_sphere_pos;\n#endif\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:Lt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Lt("uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\n#define PI 3.141592653589793\n#define STANDARD 0\n#define COMBINED 1\n#define IGOR 2\n#define MULTIDIRECTIONAL 3\n#define BASIC 4\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Lt("uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:Lt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:Lt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:Lt("uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),lineGradientSDF:Lt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define mediump vec4 dasharray_from\n#pragma mapbox: define mediump vec4 dasharray_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 dasharray_from\n#pragma mapbox: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),raster:Lt("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;\n#ifdef GLOBE\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\n#endif\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Lt("uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:Lt("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:Lt("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:Lt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Lt("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Lt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Lt("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Lt("in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}","in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Lt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Lt(e,t){const i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=t.match(/in ([\w]+) ([\w]+)/g),r=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),s=o?o.concat(r):r,n={};return {fragmentSource:e=e.replace(i,((e,t,i,a,r)=>(n[r]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nin ${i} ${a} ${r};\n#else\nuniform ${i} ${a} u_${r};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${r}\n ${i} ${a} ${r} = u_${r};\n#endif\n`))),vertexSource:t=t.replace(i,((e,t,i,a,r)=>{const o="float"===a?"vec2":"vec4",s=r.match(/color/)?"color":o;return n[r]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nuniform lowp float u_${r}_t;\nin ${i} ${o} a_${r};\nout ${i} ${a} ${r};\n#else\nuniform ${i} ${a} u_${r};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${r}\n ${r} = a_${r};\n#else\n ${i} ${a} ${r} = u_${r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${r}\n ${r} = unpack_mix_${s}(a_${r}, u_${r}_t);\n#else\n ${i} ${a} ${r} = u_${r};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${r}\nuniform lowp float u_${r}_t;\nin ${i} ${o} a_${r};\n#else\nuniform ${i} ${a} u_${r};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${r}\n ${i} ${a} ${r} = a_${r};\n#else\n ${i} ${a} ${r} = u_${r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${r}\n ${i} ${a} ${r} = unpack_mix_${s}(a_${r}, u_${r}_t);\n#else\n ${i} ${a} ${r} = u_${r};\n#endif\n`})),staticAttributes:a,staticUniforms:s}}class kt{constructor(e,t,i){this.vertexBuffer=e,this.indexBuffer=t,this.segments=i;}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null;}}var Ft=t.aU([{name:"a_pos",type:"Int16",components:2}]);const Bt="#define PROJECTION_MERCATOR",Ot="mercator";class jt{constructor(){this._cachedMesh=null;}get name(){return "mercator"}get useSubdivision(){return !1}get shaderVariantName(){return Ot}get shaderDefine(){return Bt}get shaderPreludeCode(){return At.projectionMercator}get vertexShaderPreludeCode(){return At.projectionMercator.vertexSource}get subdivisionGranularity(){return t.aV.noSubdivision}get useGlobeControls(){return !1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,i,a,r,o){if(this._cachedMesh)return this._cachedMesh;const s=new t.aW;s.emplaceBack(0,0),s.emplaceBack(t.a5,0),s.emplaceBack(0,t.a5),s.emplaceBack(t.a5,t.a5);const n=e.createVertexBuffer(s,Ft.members),l=t.aX.simpleSegment(0,0,4,2),c=new t.aY;c.emplaceBack(1,0,2),c.emplaceBack(1,2,3);const h=e.createIndexBuffer(c);return this._cachedMesh=new kt(n,h,l),this._cachedMesh}recalculate(){}hasTransition(){return !1}setErrorQueryLatitudeDegrees(e){}}class Nt{constructor(e=0,t=0,i=0,a=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(i)||i<0||isNaN(a)||a<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=i,this.right=a;}interpolate(e,i,a){return null!=i.top&&null!=e.top&&(this.top=t.G.number(e.top,i.top,a)),null!=i.bottom&&null!=e.bottom&&(this.bottom=t.G.number(e.bottom,i.bottom,a)),null!=i.left&&null!=e.left&&(this.left=t.G.number(e.left,i.left,a)),null!=i.right&&null!=e.right&&(this.right=t.G.number(e.right,i.right,a)),this}getCenter(e,i){const a=t.an((this.left+e-this.right)/2,0,e),r=t.an((this.top+i-this.bottom)/2,0,i);return new t.P(a,r)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Nt(this.top,this.bottom,this.left,this.right)}toJSON(){return {top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Zt(e,t){if(!e.renderWorldCopies||e.lngRange)return;const i=t.lng-e.center.lng;t.lng+=i>180?-360:i<-180?360:0;}function Gt(e){return Math.max(0,Math.floor(e))}class Ut{constructor(e,i){var a;this.applyConstrain=(e,t)=>null!==this._constrainOverride?this._constrainOverride(e,t):this._callbacks.defaultConstrain(e,t),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=void 0===(null==i?void 0:i.renderWorldCopies)||!!(null==i?void 0:i.renderWorldCopies),this._minZoom=(null==i?void 0:i.minZoom)||0,this._maxZoom=(null==i?void 0:i.maxZoom)||22,this._minPitch=null==(null==i?void 0:i.minPitch)?0:null==i?void 0:i.minPitch,this._maxPitch=null==(null==i?void 0:i.maxPitch)?60:null==i?void 0:i.maxPitch,this._constrainOverride=null!==(a=null==i?void 0:i.constrainOverride)&&void 0!==a?a:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.V(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Gt(this._zoom),this._scale=t.aq(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Nt,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0;}apply(e,i,a){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=Gt(this._zoom),this._scale=t.aq(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Nt(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!a&&e.autoCalculateNearFarZ,i&&this.constrainInternal(),this._calcMatrices();}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e;}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom));}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom));}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)));}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)));}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e;}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices());}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const i=t.W(e,-180,180)*Math.PI/180;var r,o,s,n,l,c,h,u,d;this._bearingInRadians!==i&&(this._unmodified=!1,this._bearingInRadians=i,this._calcMatrices(),this._rotationMatrix=a(),r=this._rotationMatrix,s=-this._bearingInRadians,n=(o=this._rotationMatrix)[0],l=o[1],c=o[2],h=o[3],u=Math.sin(s),d=Math.cos(s),r[0]=n*d+c*u,r[1]=l*d+h*u,r[2]=n*-u+c*d,r[3]=l*-u+h*d);}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const i=t.an(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices());}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices());}get fovInRadians(){return this._fovInRadians}get fov(){return t.aZ(this._fovInRadians)}setFov(e){e=t.an(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.ap(e),this._calcMatrices());}get zoom(){return this._zoom}setZoom(e){const i=this.applyConstrain(this._center,e).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=t.aq(i),this.constrainInternal(),this._calcMatrices());}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices());}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices());}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices());}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices();}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices();}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,i){this._unmodified=!1,this._edgeInsets.interpolate(e,t,i),this.constrainInternal(),this._calcMatrices();}resize(e,t,i=!0){this._width=e,this._height=t,i&&this.constrainInternal(),this._calcMatrices();}getMaxBounds(){return this._latRange&&2===this._latRange.length&&this._lngRange&&2===this._lngRange.length?new $([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-t.ao,t.ao]);}getCameraQueryGeometry(e,i){if(1===i.length)return [i[0],e];{const{minX:a,minY:r,maxX:o,maxY:s}=t.aa.fromPoints(i).extend(e);return [new t.P(a,r),new t.P(o,r),new t.P(o,s),new t.P(a,s),new t.P(a,r)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:t,zoom:i}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(i),this._unmodified=e,this._constraining=!1;}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.ar(new Float64Array(16));t.Q(e,e,[this._width/2,-this._height/2,1]),t.O(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.ar(new Float64Array(16)),t.Q(e,e,[1,-1,1]),t.O(e,e,[-1,-1,0]),t.Q(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height;}this._callbacks.calcMatrices();}calculateCenterFromCameraLngLatAlt(e,i,a,r){const o=void 0!==a?a:this.bearing,s=r=void 0!==r?r:this.pitch,{distanceToCenter:n,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(i,this.elevation,s),{x:c,y:h}=be(s,o),u=t.a9.fromLngLat(e,i);let d,_,p=t.a_(1,u.y),m=0;do{if(m+=1,m>10)break;_=n/p,d=new t.a9(u.x+c*_,u.y+h*_),p=1/d.meterInMercatorCoordinateUnits();}while(Math.abs(n-_*p)>1e-12);return {center:d.toLngLat(),elevation:l,zoom:t.at(this.height/2/Math.tan(this.fovInRadians/2)/_/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const i=1/this.worldSize,a=t.as(1,this.center.lat)*this.worldSize,r=t.a9.fromLngLat(this.center,this.elevation),o=r.x/i,s=r.y/i,n=r.z/i,l=this.pitch,c=this.bearing,{x:h,y:u,z:d}=be(l,c),_=this.cameraToCenterDistance,p=o+_*-h,m=s+_*-u,f=n+_*d,{distanceToCenter:g,clampedElevation:v}=this._distanceToCenterFromAltElevationPitch(f/a,e,l),x=g*a,b=new t.a9((p+h*x)*i,(m+u*x)*i,0).toLngLat(),y=t.as(1,b.lat),w=t.at(this.height/2/Math.tan(this.fovInRadians/2)/g/y/this.tileSize);this._elevation=v,this._center=b,this.setZoom(w);}_distanceToCenterFromAltElevationPitch(e,i,a){const r=-Math.cos(t.ap(a)),o=e-i;let s,n=i;return r*o>=0||Math.abs(r)<.1?(s=1e4,n=e+s*r):s=-o/r,{distanceToCenter:s,clampedElevation:n}}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=t.as(1,this.center.lat)*this.worldSize;return xe(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return [0,0,1,1];const i=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(t+=e[a]*this.min[a],i+=e[a]*this.max[a]):(i+=e[a]*this.min[a],t+=e[a]*this.max[a]);return t>=0?2:i<0?0:1}}class qt{distanceToTile2d(e,t,i,a){const r=a.distanceX([e,t]),o=a.distanceY([e,t]);return Math.hypot(r,o)}getWrap(e,t,i){return i}getTileBoundingVolume(e,i,a,r){var o,s;let n=0,l=0;if(null==r?void 0:r.terrain){const c=new t.a2(e.z,i,e.z,e.x,e.y),h=r.terrain.getMinMaxElevation(c);n=null!==(o=h.minElevation)&&void 0!==o?o:Math.min(0,a),l=null!==(s=h.maxElevation)&&void 0!==s?s:Math.max(0,a);}const c=1<r}allowWorldCopies(){return !0}prepareNextFrame(){}}class Wt{constructor(e,t,i){this.points=e,this.planes=t,this.aabb=i;}static fromInvProjectionMatrix(e,i=1,a=0,r,o){const s=o?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],n=Math.pow(2,a),l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((a=>function(e,i,a,r){const o=t.aH([],e,i),s=1/o[3]/a*r;return t.b6(o,o,[s,s,1/o[3],s])}(a,e,i,n)));r&&function(e,i,a,r){const o=r?4:0,s=r?0:4;let n=0;const l=[],c=[];for(let i=0;i<4;i++){const a=t.b2([],e[i+s],e[i+o]),r=t.b7(a);t.a$(a,a,1/r),l.push(r),c.push(a);}for(let i=0;i<4;i++){const r=t.b8(e[i+o],c[i],a);n=null!==r&&r>=0?Math.max(n,r):Math.max(n,l[i]);}const h=function(e,i){const a=t.b2([],e[i[0]],e[i[1]]),r=t.b2([],e[i[2]],e[i[1]]),o=[0,0,0,0];return t.b3(o,t.b4([],a,r)),o[3]=-t.b5(o,e[i[0]]),o}(e,i),u=function(e,i){const a=t.b9(e),r=t.ba([],e,1/a),o=t.b2([],i,t.a$([],r,t.b5(i,r))),s=t.b9(o);if(s>0){const e=Math.sqrt(1-r[3]*r[3]),a=t.a$([],r,-r[3]),n=t.b0([],a,t.a$([],o,e/s));return t.bb(i,n)}return null}(a,h);if(null!==u){const e=u/t.b5(c[0],h);n=Math.min(n,e);}for(let t=0;t<4;t++){const i=Math.min(n,l[t]);e[t+s]=[e[t+o][0]+c[t][0]*i,e[t+o][1]+c[t][1]*i,e[t+o][2]+c[t][2]*i,1];}}(l,s[0],r,o);const c=s.map((e=>{const i=t.b2([],l[e[0]],l[e[1]]),a=t.b2([],l[e[2]],l[e[1]]),r=t.b3([],t.b4([],i,a)),o=-t.b5(r,l[e[1]]);return r.concat(o)})),h=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],u=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const e of l)for(let t=0;t<3;t++)h[t]=Math.min(h[t],e[t]),u[t]=Math.max(u[t],e[t]);return new Wt(l,c,new Vt(h,u))}}class $t{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e);}setMaxZoom(e){this._helper.setMaxZoom(e);}setMinPitch(e){this._helper.setMinPitch(e);}setMaxPitch(e){this._helper.setMaxPitch(e);}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e);}setBearing(e){this._helper.setBearing(e);}setPitch(e){this._helper.setPitch(e);}setRoll(e){this._helper.setRoll(e);}setFov(e){this._helper.setFov(e);}setZoom(e){this._helper.setZoom(e);}setCenter(e){this._helper.setCenter(e);}setElevation(e){this._helper.setElevation(e);}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e);}setPadding(e){this._helper.setPadding(e);}interpolatePadding(e,t,i){return this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i);}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e);}setConstrainOverride(e){this._helper.setConstrainOverride(e);}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t);}clearNearFarZOverride(){this._helper.clearNearFarZOverride();}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,i)=>{i=t.an(+i,this.minZoom,this.maxZoom);const a={center:new t.V(e.lng,e.lat),zoom:i};let r=this._helper._lngRange;if(!this._helper._renderWorldCopies&&null===r){const e=180-1e-10;r=[-e,e];}const o=this.tileSize*t.aq(a.zoom);let s=0,n=o,l=0,c=o,h=0,u=0;const{x:d,y:_}=this.size;if(this._helper._latRange){const e=this._helper._latRange;s=t.X(e[1])*o,n=t.X(e[0])*o,n-s<_&&(h=_/(n-s));}r&&(l=t.W(t.Y(r[0])*o,0,o),c=t.W(t.Y(r[1])*o,0,o),cn&&(g=n-e);}if(r){const e=(l+c)/2;let i=p;this._helper._renderWorldCopies&&(i=t.W(p,e-o/2,e+o/2));const a=d/2;i-ac&&(f=c-a);}if(void 0!==f||void 0!==g){const e=new t.P(null!=f?f:p,null!=g?g:m);a.center=fe(o,e).wrap();}return a},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Ut({calcMatrices:()=>{this._calcMatrices();},defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new qt;}clone(){const e=new $t;return e.apply(this),e}apply(e,t,i){this._helper.apply(e,t,i);}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){const i=[new t.bc(0,e)];if(this._helper._renderWorldCopies){const a=this.screenPointToMercatorCoordinate(new t.P(0,0)),r=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),o=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),s=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),n=Math.floor(Math.min(a.x,r.x,o.x,s.x)),l=Math.floor(Math.max(a.x,r.x,o.x,s.x)),c=1;for(let a=n-c;a<=l+c;a++)0!==a&&i.push(new t.bc(a,e));}return i}getCameraFrustum(){return Wt.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const t=this.screenPointToLocation(this.centerPoint,e),i=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(i);}setLocationAtPoint(e,i){const a=t.as(this.elevation,this.center.lat),r=this.screenPointToMercatorCoordinateAtZ(i,a),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,a),s=t.a9.fromLngLat(e),n=new t.a9(s.x-(r.x-o.x),s.y-(r.y-o.y));this.setCenter(null==n?void 0:n.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap());}locationToScreenPoint(e,i){return i?this.coordinatePoint(t.a9.fromLngLat(e),i.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(t.a9.fromLngLat(e))}screenPointToLocation(e,t){var i;return null===(i=this.screenPointToMercatorCoordinate(e,t))||void 0===i?void 0:i.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){const i=t.pointCoordinate(e);if(null!=i)return i}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,i){const a=i||0,r=[e.x,e.y,0,1],o=[e.x,e.y,1,1];t.aH(r,r,this._pixelMatrixInverse),t.aH(o,o,this._pixelMatrixInverse);const s=r[3],n=o[3],l=r[1]/s,c=o[1]/n,h=r[2]/s,u=o[2]/n,d=h===u?0:(a-h)/(u-h);return new t.a9(t.G.number(r[0]/s,o[0]/n,d)/this.worldSize,t.G.number(l,c,d)/this.worldSize,a)}coordinatePoint(e,i=0,a=this._pixelMatrix){const r=[e.x*this.worldSize,e.y*this.worldSize,i,1];return t.aH(r,r,a),new t.P(r[0]/r[3],r[1]/r[3])}getBounds(){const e=Math.max(0,this._helper._height/2-ge(this));return (new $).extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-ge(this)}calculatePosMatrix(e,i=!1,a){var r;const o=null!==(r=e.key)&&void 0!==r?r:t.bd(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),s=i?this._alignedPosMatrixCache:this._posMatrixCache;if(s.has(o)){const e=s.get(o);return a?e.f32:e.f64}const n=ve(e,this.worldSize);t.S(n,i?this._alignedProjMatrix:this._viewProjMatrix,n);const l={f64:n,f32:new Float32Array(n)};return s.set(o,l),a?l.f32:l.f64}calculateFogMatrix(e){const i=e.key,a=this._fogMatrixCacheF32;if(a.has(i))return a.get(i);const r=ve(e,this.worldSize);return t.S(r,this._fogMatrix,r),a.set(i,new Float32Array(r)),a.get(i)}calculateCenterFromCameraLngLatAlt(e,t,i,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,a)}_calculateNearFarZIfNeeded(e,i,a){if(!this._helper.autoCalculateNearFarZ)return;const r=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),o=e-r*this._helper._pixelPerMeter/Math.cos(i),s=r<0?o:e,n=Math.PI/2+this.pitchInRadians,l=t.ap(this.fov)*(Math.abs(Math.cos(t.ap(this.roll)))*this.height+Math.abs(Math.sin(t.ap(this.roll)))*this.width)/this.height*(.5+a.y/this.height),c=Math.sin(l)*s/Math.sin(t.an(Math.PI-n-l,.01,Math.PI-.01)),h=ge(this),u=Math.atan(h/this._helper.cameraToCenterDistance),d=t.ap(.75),_=u>d?2*u*(.5+a.y/(2*h)):d,p=Math.sin(_)*s/Math.sin(t.an(Math.PI-n-_,.01,Math.PI-.01)),m=Math.min(c,p);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*m+s),this._helper._nearZ=this._helper._height/50;}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,i=me(this.worldSize,this.center),a=i.x,r=i.y;this._helper._pixelPerMeter=t.as(1,this.center.lat)*this.worldSize;const o=t.ap(Math.min(this.pitch,pe)),s=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));let n;this._calculateNearFarZIfNeeded(s,o,e),n=new Float64Array(16),t.be(n,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),t.aB(this._invProjMatrix,n),n[8]=2*-e.x/this._helper._width,n[9]=2*e.y/this._helper._height,this._projectionMatrix=t.bf(n),t.Q(n,n,[1,-1,1]),t.O(n,n,[0,0,-this._helper.cameraToCenterDistance]),t.bg(n,n,-this.rollInRadians),t.bh(n,n,this.pitchInRadians),t.bg(n,n,-this.bearingInRadians),t.O(n,n,[-a,-r,0]),this._mercatorMatrix=t.Q([],n,[this.worldSize,this.worldSize,this.worldSize]),t.Q(n,n,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.S(new Float64Array(16),this.clipSpaceToPixelsMatrix,n),t.O(n,n,[0,0,-this.elevation]),this._viewProjMatrix=n,this._invViewProjMatrix=t.aB([],n);const l=[0,0,-1,1];t.aH(l,l,this._invViewProjMatrix),this._cameraPosition=[l[0]/l[3],l[1]/l[3],l[2]/l[3]],this._fogMatrix=new Float64Array(16),t.be(this._fogMatrix,this.fovInRadians,this.width/this.height,s,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,t.Q(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.O(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.bg(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.bh(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.bg(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.O(this._fogMatrix,this._fogMatrix,[-a,-r,0]),t.Q(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.O(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.S(new Float64Array(16),this.clipSpaceToPixelsMatrix,n);const c=this._helper._width%2/2,h=this._helper._height%2/2,u=Math.cos(this.bearingInRadians),d=Math.sin(-this.bearingInRadians),_=a-Math.round(a)+u*c+d*h,p=r-Math.round(r)+u*h+d*c,m=new Float64Array(n);if(t.O(m,m,[_>.5?_-1:_,p>.5?p-1:p,0]),this._alignedProjMatrix=m,n=t.aB(new Float64Array(16),this._pixelMatrix),!n)throw new Error("failed to invert matrix");this._pixelMatrixInverse=n,this._clearMatrixCaches();}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear();}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new t.P(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.aH(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=t.as(1,this.center.lat)*this.worldSize;return xe(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,i){const a=t.a9.fromLngLat(e),r=[a.x*this.worldSize,a.y*this.worldSize,i,1];return t.aH(r,r,this._viewProjMatrix),r[2]/r[3]}getProjectionData(e){const{overscaledTileID:i,aligned:a,applyTerrainMatrix:r}=e,o=this._helper.getMercatorTileCoordinates(i),s=i?this.calculatePosMatrix(i,a,!0):null;let n;return n=i&&i.terrainRttPosMatrix32f&&r?i.terrainRttPosMatrix32f:s||t.bi(),{mainMatrix:n,tileMercatorCoords:o,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:n}}isLocationOccluded(e){return !1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,i){return 1}transformLightDirection(e){return t.b1(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,i,a,r){const o=this.calculatePosMatrix(a);let s;r?(s=[e,i,r(e,i),1],t.aH(s,s,o)):(s=[e,i,0,1],ot(s,s,o));const n=s[3];return {point:new t.P(s[0]/n,s[1]/n),signedDistanceFromCamera:n,isOccluded:!1}}populateCache(e){for(const t of e)this.calculatePosMatrix(t);}getMatrixForModel(e,i){const a=t.a9.fromLngLat(e,i),r=a.meterInMercatorCoordinateUnits(),o=t.bj();return t.O(o,o,[a.x,a.y,a.z]),t.bg(o,o,Math.PI),t.bh(o,o,Math.PI/2),t.Q(o,o,[-r,r,r]),o}getProjectionDataForCustomLayer(e=!0){const i=new t.a2(0,0,0,0,0),a=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:e}),r=ve(i,this.worldSize);t.S(r,this._viewProjMatrix,r),a.tileMercatorCoords=[0,0,1,1];const o=[t.a5,t.a5,this.worldSize/this._helper.pixelsPerMeter],s=t.bk();return t.Q(s,r,o),a.fallbackMatrix=s,a.mainMatrix=s,a}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Ht(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");}function Xt(e){if(e.useSlerp)if(e.k<1){const i=t.bl(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),a=t.bl(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),r=new Float64Array(4);t.bm(r,i,a,e.k);const o=t.bn(r);e.tr.setRoll(o.roll),e.tr.setPitch(o.pitch),e.tr.setBearing(o.bearing);}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.G.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.G.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.G.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k));}function Kt(e,i,a,r,o){const s=o.padding,n=me(o.worldSize,a.getNorthWest()),l=me(o.worldSize,a.getNorthEast()),c=me(o.worldSize,a.getSouthEast()),h=me(o.worldSize,a.getSouthWest()),u=t.ap(-r),d=n.rotate(u),_=l.rotate(u),p=c.rotate(u),m=h.rotate(u),f=new t.P(Math.max(d.x,_.x,m.x,p.x),Math.max(d.y,_.y,m.y,p.y)),g=new t.P(Math.min(d.x,_.x,m.x,p.x),Math.min(d.y,_.y,m.y,p.y)),v=f.sub(g),x=(o.width-(s.left+s.right+i.left+i.right))/v.x,b=(o.height-(s.top+s.bottom+i.top+i.bottom))/v.y;if(b<0||x<0)return void Ht();const y=Math.min(t.at(o.scale*Math.min(x,b)),e.maxZoom),w=t.P.convert(e.offset),T=new t.P((i.left-i.right)/2,(i.top-i.bottom)/2).rotate(t.ap(r)),P=w.add(T).mult(o.scale/t.aq(y));return {center:fe(o.worldSize,n.add(c).div(2).sub(P)),zoom:y,bearing:r}}class Yt{get useGlobeControls(){return !1}handlePanInertia(e,t){const i=e.mag(),a=Math.abs(ge(t));return {easingOffset:e.mult(Math.min(.75*a/i,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta);}handleMapControlsPan(e,t,i){e.around.distSqr(t.centerPoint)<.01||t.setLocationAtPoint(i,e.around);}cameraForBoxAndBearing(e,t,i,a,r){return Kt(e,t,i,a,r)}handleJumpToCenterZoom(e,i){e.zoom!==(void 0!==i.zoom?+i.zoom:e.zoom)&&e.setZoom(+i.zoom),void 0!==i.center&&e.setCenter(t.V.convert(i.center));}handleEaseTo(e,i){const a=e.zoom,r=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},s={roll:void 0===i.roll?e.roll:i.roll,pitch:void 0===i.pitch?e.pitch:i.pitch,bearing:void 0===i.bearing?e.bearing:i.bearing},n=void 0!==i.zoom,l=!e.isPaddingEqual(i.padding);let c=!1;const h=n?+i.zoom:e.zoom;let u=e.centerPoint.add(i.offsetAsPoint);const d=e.screenPointToLocation(u),{center:_,zoom:p}=e.applyConstrain(t.V.convert(i.center||d),null!=h?h:a);Zt(e,_);const m=me(e.worldSize,d),f=me(e.worldSize,_).sub(m),g=t.aq(p-a);return c=p!==a,{easeFunc:n=>{if(c&&e.setZoom(t.G.number(a,p,n)),t.bo(o,s)||Xt({startEulerAngles:o,endEulerAngles:s,tr:e,k:n,useSlerp:o.roll!=s.roll}),l&&(e.interpolatePadding(r,i.padding,n),u=e.centerPoint.add(i.offsetAsPoint)),i.around)e.setLocationAtPoint(i.around,i.aroundPoint);else {const i=t.aq(e.zoom-a),r=p>a?Math.min(2,g):Math.max(.5,g),o=Math.pow(r,1-n),s=fe(e.worldSize,m.add(f.mult(n*o)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?s.wrap():s,u);}},isZooming:c,elevationCenter:_}}handleFlyTo(e,i){const a=void 0!==i.zoom,r=e.zoom,o=e.applyConstrain(t.V.convert(i.center||i.locationAtOffset),a?+i.zoom:r),s=o.center,n=o.zoom;Zt(e,s);const l=me(e.worldSize,i.locationAtOffset),c=me(e.worldSize,s).sub(l),h=c.mag(),u=t.aq(n-r);let d;if(void 0!==i.minZoom){const a=Math.min(+i.minZoom,r,n),o=e.applyConstrain(s,a).zoom;d=t.aq(o-r);}return {easeFunc:(i,a,o,h)=>{e.setZoom(1===i?n:r+t.at(a));const u=1===i?s:fe(e.worldSize,l.add(c.mult(o)).mult(a));e.setLocationAtPoint(e.renderWorldCopies?u.wrap():u,h);},scaleOfZoom:u,targetCenter:s,scaleOfMinZoom:d,pixelPathLength:h}}}class Qt{constructor(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i;}}Qt.Replace=[1,0],Qt.disabled=new Qt(Qt.Replace,t.bp.transparent,[!1,!1,!1,!1]),Qt.unblended=new Qt(Qt.Replace,t.bp.transparent,[!0,!0,!0,!0]),Qt.alphaBlended=new Qt([1,771],t.bp.transparent,[!0,!0,!0,!0]);const Jt=2305;class ei{constructor(e,t,i){this.enable=e,this.mode=t,this.frontFace=i;}}ei.disabled=new ei(!1,1029,Jt),ei.backCCW=new ei(!0,1029,Jt),ei.frontCCW=new ei(!0,1028,Jt);class ti{constructor(e,t,i){this.func=e,this.mask=t,this.range=i;}}ti.ReadOnly=!1,ti.ReadWrite=!0,ti.disabled=new ti(519,ti.ReadOnly,[0,1]);const ii=7680;class ai{constructor(e,t,i,a,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=a,this.depthFail=r,this.pass=o;}}ai.disabled=new ai({func:519,mask:0},0,0,ii,ii,ii);const ri=new WeakMap;function oi(e){var t;if(ri.has(e))return ri.get(e);{const i=null===(t=e.getParameter(e.VERSION))||void 0===t?void 0:t.startsWith("WebGL 2.0");return ri.set(e,i),i}}class si{get awaitingQuery(){return !!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;const i=e.context,a=i.gl;this._texFormat=a.RGBA,this._texType=a.UNSIGNED_BYTE;const r=new t.aW;r.emplaceBack(-1,-1),r.emplaceBack(2,-1),r.emplaceBack(-1,2);const o=new t.aY;o.emplaceBack(0,1,2),this._fullscreenTriangle=new kt(i.createVertexBuffer(r,Ft.members),i.createIndexBuffer(o),t.aX.simpleSegment(0,0,r.length,o.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(a.TEXTURE1);const s=a.createTexture();a.bindTexture(a.TEXTURE_2D,s),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(s),oi(a)&&(this._pbo=a.createBuffer(),a.bindBuffer(a.PIXEL_PACK_BUFFER,this._pbo),a.bufferData(a.PIXEL_PACK_BUFFER,4,a.STREAM_READ),a.bindBuffer(a.PIXEL_PACK_BUFFER,null));}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null;}updateErrorLoop(e,t){const i=this._updateCount;return this._readbackQueue?i>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():i>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer);}_renderErrorTexture(e,i){const a=this._cachedRenderContext.context,r=a.gl;if(this._bindFramebuffer(),a.viewport.set([0,0,this._texWidth,this._texHeight]),a.clear({color:t.bp.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(a,r.TRIANGLES,ti.disabled,ai.disabled,Qt.unblended,ei.disabled,((e,t)=>({u_input:e,u_output_expected:t}))(e,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&oi(r)){r.bindBuffer(r.PIXEL_PACK_BUFFER,this._pbo),r.readBuffer(r.COLOR_ATTACHMENT0),r.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),r.bindBuffer(r.PIXEL_PACK_BUFFER,null);const e=r.fenceSync(r.SYNC_GPU_COMMANDS_COMPLETE,0);r.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e};}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null};}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&oi(e)){const i=e.clientWaitSync(this._readbackQueue.sync,0,0);if(i===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null);}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=si._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount;}static _parseRGBA8float(e){let t=0;return t+=e[0]/256,t+=e[1]/65536,t+=e[2]/16777216,e[3]<127&&(t=-t),t/128}}const ni=t.a5/128;function li(e,i){const a=void 0!==e.granularity?Math.max(e.granularity,1):1,r=a+(e.generateBorders?2:0),o=a+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),s=r+1,n=o+1,l=e.generateBorders?-1:0,c=e.generateBorders||e.extendToNorthPole?-1:0,h=a+(e.generateBorders?1:0),u=a+(e.generateBorders||e.extendToSouthPole?1:0),d=s*n,_=r*o*6,p=s*n>65536;if(p&&"16bit"===i)throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const m=p||"32bit"===i,f=new Int16Array(2*d);let g=0;for(let i=c;i<=u;i++)for(let r=l;r<=h;r++){let o=r/a*t.a5;-1===r&&(o=-ni),r===a+1&&(o=t.a5+ni);let s=i/a*t.a5;-1===i&&(s=e.extendToNorthPole?t.br:-ni),i===a+1&&(s=e.extendToSouthPole?t.bs:t.a5+ni),f[g++]=o,f[g++]=s;}const v=m?new Uint32Array(_):new Uint16Array(_);let x=0;for(let e=0;e0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return "globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy();}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e);}getMeshFromTileID(e,t,i,a,r){return this.currentProjection.getMeshFromTileID(e,t,i,a,r)}setProjection(e){this._transitionable.setValue("type",(null==e?void 0:e.type)||"mercator");}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning);}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e);}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e);}}function _i(e){const t=fi(e.worldSize,e.center.lat);return 2*Math.PI*t}function pi(e,i,a,r,o){const s=1/(1<1e-6){const r=e[0]/a,o=Math.acos(e[2]/a),s=(r>0?o:-o)/Math.PI*180;return new t.V(t.W(s,-180,180),i)}return new t.V(0,i)}function vi(e){return Math.cos(e*Math.PI/180)}function xi(e,i){const a=vi(e),r=vi(i);return t.at(r/a)}function bi(e,i){const a=e.rotate(i.bearingInRadians),r=i.zoom+xi(i.center.lat,0),o=t.bu(1/vi(i.center.lat),1/vi(Math.min(Math.abs(i.center.lat),60)),t.bx(r,7,3,0,1)),s=360/_i({worldSize:i.worldSize,center:{lat:i.center.lat}});return new t.V(i.center.lng-a.x*s*o,t.an(i.center.lat+a.y*s,-t.ao,t.ao))}function yi(e){const t=.5*e,i=Math.sin(t),a=Math.cos(t);return Math.log(i+a)-Math.log(a-i)}function wi(e,i,a,r){const o=e.lat+a*r;if(Math.abs(a)>1){const s=(Math.sign(e.lat+a)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,n=Math.abs(e.lat+a)*Math.PI/180,l=yi(s+r*(n-s)),c=yi(s),h=yi(n);return new t.V(e.lng+i*((l-c)/(h-c)),o)}return new t.V(e.lng+i*r,o)}class Ti{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e;}swapBuffers(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1;}getTileBoundingVolume(e,t,i,a){const r=`${e.z}_${e.x}_${e.y}_${(null==a?void 0:a.terrain)?"t":""}`,o=this._cache.get(r);if(o)return o;const s=this._cachePrevious.get(r);if(s)return this._cache.set(r,s),s;const n=this._boundingVolumeFactory(e,t,i,a);return this._cache.set(r,n),this._hadAnyChanges=!0,n}}class Pi{constructor(e,t,i,a){this.min=i,this.max=a,this.points=e,this.planes=t;}static fromAabb(e,t){const i=[];for(let a=0;a<8;a++)i.push([1&~a?e[0]:t[0],1==(a>>1&1)?t[1]:e[1],1==(a>>2&1)?t[2]:e[2]]);return new Pi(i,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,i,a){const r=t.bB([],a[0],a[1],a[2]),o=t.bC([],[i[0],0,0],r),s=t.bC([],[0,i[1],0],r),n=t.bC([],[0,0,i[2]],r),l=[...e],c=[...e];for(let t=0;t<8;t++)for(let i=0;i<3;i++){const a=e[i]+o[i]*(1&~t?-1:1)+s[i]*(1==(t>>1&1)?1:-1)+n[i]*(1==(t>>2&1)?1:-1);l[i]=Math.min(l[i],a),c[i]=Math.max(c[i],a);}const h=[];for(let i=0;i<8;i++){const a=[...e];t.b0(a,a,t.a$([],o,1&~i?-1:1)),t.b0(a,a,t.a$([],s,1==(i>>1&1)?1:-1)),t.b0(a,a,t.a$([],n,1==(i>>2&1)?1:-1)),h.push(a);}return new Pi(h,[[...o,-t.b5(o,h[0])],[...s,-t.b5(s,h[0])],[...n,-t.b5(n,h[0])],[-o[0],-o[1],-o[2],-t.b5(o,h[7])],[-s[0],-s[1],-s[2],-t.b5(s,h[7])],[-n[0],-n[1],-n[2],-t.b5(n,h[7])]],l,c)}intersectsFrustum(e){let t=!0;const i=this.points.length,a=this.planes.length,r=e.planes.length,o=e.points.length;for(let a=0;a=0&&o++;}if(0===o)return 0;o=0&&a++;}if(0===a)return 0}return 1}intersectsPlane(e){const t=this.points.length;let i=0;for(let a=0;a=0&&i++;}return i===t?2:0===i?0:1}}function Ci(e,t,i){const a=e-t;return a<0?-a:Math.max(0,a-i)}function Ii(e,t,i,a,r){const o=e-i;let s;return s=o<0?Math.min(-o,1+o-r):o>1?Math.min(Math.max(o-r,0),1-o):0,Math.max(s,Ci(t,a,r))}class Mi{constructor(){this._boundingVolumeCache=new Ti(this._computeTileBoundingVolume);}prepareNextFrame(){this._boundingVolumeCache.swapBuffers();}distanceToTile2d(e,t,i,a){const r=1<4}allowWorldCopies(){return !1}getTileBoundingVolume(e,t,i,a){return this._boundingVolumeCache.getTileBoundingVolume(e,t,i,a)}_computeTileBoundingVolume(e,i,a,r){var o,s;let n=0,l=0;if(null==r?void 0:r.terrain){const c=new t.a2(e.z,i,e.z,e.x,e.y),h=r.terrain.getMinMaxElevation(c);n=null!==(o=h.minElevation)&&void 0!==o?o:Math.min(0,a),l=null!==(s=h.maxElevation)&&void 0!==s?s:Math.max(0,a);}if(n/=t.bE,l/=t.bE,n+=1,l+=1,e.z<=0)return Pi.fromAabb([-l,-l,-l],[l,l,l]);if(1===e.z)return Pi.fromAabb([0===e.x?-l:0,0===e.y?0:-l,-l],[0===e.x?0:l,0===e.y?l:0,l]);{const i=[pi(0,0,e.x,e.y,e.z),pi(t.a5,0,e.x,e.y,e.z),pi(t.a5,t.a5,e.x,e.y,e.z),pi(0,t.a5,e.x,e.y,e.z)],a=[];for(const e of i)a.push(t.a$([],e,l));if(l!==n)for(const e of i)a.push(t.a$([],e,n));0===e.y&&a.push([0,1,0]),e.y===(1<=(1<{const a=t.an(e.lat,-t.ao,t.ao),r=t.an(+i,this.minZoom+xi(0,a),this.maxZoom);return {center:new t.V(e.lng,a),zoom:r}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Ut({calcMatrices:()=>{this._calcMatrices();},defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new Mi;}clone(){const e=new Si;return e.apply(this),e}apply(e,t){this._globeLatitudeErrorCorrectionRadians=t||0,this._helper.apply(e);}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=t.bz();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:t,applyGlobeMatrix:i}=e,a=this._helper.getMercatorTileCoordinates(t);return {mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:a,clippingPlane:this._cachedClippingPlane,projectionTransition:i?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const i=this.pitchInRadians,a=this.cameraToCenterDistance/e,r=Math.sin(i)*a,o=Math.cos(i)*a+1,s=1/Math.sqrt(r*r+o*o)*1;let n=-r,l=o;const c=Math.sqrt(n*n+l*l);n/=c,l/=c;const h=[0,n,l];t.bG(h,h,[0,0,0],-this.bearingInRadians),t.bH(h,h,[0,0,0],-1*this.center.lat*Math.PI/180),t.bI(h,h,[0,0,0],this.center.lng*Math.PI/180);const u=1/t.b7(h);return t.a$(h,h,u),[...h,-s*u]}isLocationOccluded(e){return !this.isSurfacePointVisible(mi(e))}transformLightDirection(e){const i=this._helper._center.lng*Math.PI/180,a=this._helper._center.lat*Math.PI/180,r=Math.cos(a),o=[Math.sin(i)*r,Math.sin(a),Math.cos(i)*r],s=[o[2],0,-o[0]],n=[0,0,0];t.b4(n,s,o),t.b3(s,s),t.b3(n,n);const l=[0,0,0];return t.b3(l,[s[0]*e[0]+n[0]*e[1]+o[0]*e[2],s[1]*e[0]+n[1]*e[1]+o[1]*e[2],s[2]*e[0]+n[2]*e[1]+o[2]*e[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,i,a){const r=function(e,i,a){const r=1/(1<o&&(o=i),an&&(n=a);}const h=[c.lng+s,c.lat+l,c.lng+o,c.lat+n];return this.isSurfacePointOnScreen([0,1,0])&&(h[3]=90,h[0]=-180,h[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(h[1]=-90,h[0]=-180,h[2]=180),new $(h)}calculateCenterFromCameraLngLatAlt(e,t,i,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,a)}setLocationAtPoint(e,i){const a=mi(this.unprojectScreenPoint(i)),r=mi(e),o=t.bz();t.bL(o);const s=t.bz();t.bI(s,a,o,-this.center.lng*Math.PI/180),t.bH(s,s,o,this.center.lat*Math.PI/180);const n=r[0]*r[0]+r[2]*r[2],l=s[0]*s[0];if(n=-g&&p<=g,x=f>=-g&&f<=g;let b,y;if(v&&x){const e=this.center.lng*Math.PI/180,i=this.center.lat*Math.PI/180;t.bN(u,e)+t.bN(p,i)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return !1;const i=t.bF();return t.aH(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(e,i){const a=t.b5(e,i),r=t.bz(),o=t.bz();t.a$(o,i,a),t.b2(r,e,o);const s=1-t.b5(r,r);if(s<0)return null;const n=t.b5(e,e)-1,l=-a+(a<0?1:-1)*Math.sqrt(s),c=n/l,h=l;return {tMin:Math.min(c,h),tMax:Math.max(c,h)}}unprojectScreenPoint(e){const i=this._cameraPosition,a=this.getRayDirectionFromPixel(e),r=this.rayPlanetIntersection(i,a);if(r){const e=t.bz();t.b0(e,i,[a[0]*r.tMin,a[1]*r.tMin,a[2]*r.tMin]);const o=t.bz();return t.b3(o,e),gi(o)}const o=this._cachedClippingPlane,s=o[0]*a[0]+o[1]*a[1]+o[2]*a[2],n=-t.bb(o,i)/s,l=t.bz();if(n>0)t.b0(l,i,[a[0]*n,a[1]*n,a[2]*n]);else {const e=t.bz();t.b0(e,i,[2*a[0],2*a[1],2*a[2]]);const r=t.bb(this._cachedClippingPlane,e);t.b2(l,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r]);}const c=function(e){const i=t.bz();return i[0]=e[0]*-e[3],i[1]=e[1]*-e[3],i[2]=e[2]*-e[3],{center:i,radius:Math.sqrt(1-e[3]*e[3])}}(o);return gi(function(e,i,a){const r=t.bz();t.b2(r,a,e);const o=t.bz();return t.bA(o,e,r,i/t.b9(r)),o}(c.center,c.radius,l))}getMatrixForModel(e,i){const a=t.V.convert(e),r=1/t.bE,o=t.bj();return t.bJ(o,o,a.lng/180*Math.PI),t.bh(o,o,-a.lat/180*Math.PI),t.O(o,o,[0,0,1+i/t.bE]),t.bh(o,o,.5*Math.PI),t.Q(o,o,[r,r,r]),o}getProjectionDataForCustomLayer(e=!0){const i=this.getProjectionData({overscaledTileID:new t.a2(0,0,0,0,0),applyGlobeMatrix:e});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(e){}}class Ri{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e);}setMaxZoom(e){this._helper.setMaxZoom(e);}setMinPitch(e){this._helper.setMinPitch(e);}setMaxPitch(e){this._helper.setMaxPitch(e);}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e);}setBearing(e){this._helper.setBearing(e);}setPitch(e){this._helper.setPitch(e);}setRoll(e){this._helper.setRoll(e);}setFov(e){this._helper.setFov(e);}setZoom(e){this._helper.setZoom(e);}setCenter(e){this._helper.setCenter(e);}setElevation(e){this._helper.setElevation(e);}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e);}setPadding(e){this._helper.setPadding(e);}interpolatePadding(e,t,i){return this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i);}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e);}setConstrainOverride(e){this._helper.setConstrainOverride(e);}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t);}clearNearFarZOverride(){this._helper.clearNearFarZOverride();}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame();}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Ut({calcMatrices:()=>{this._calcMatrices();},defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new $t,this._verticalPerspectiveTransform=new Si;}clone(){const e=new Ri;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians);}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){const t=this._mercatorTransform.getProjectionData(e),i=this._verticalPerspectiveTransform.getProjectionData(e);return {mainMatrix:this.isGlobeRendering?i.mainMatrix:t.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bu(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bu(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,i,a){const r=this._mercatorTransform.getPitchedTextCorrection(e,i,a),o=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,i,a);return t.bu(r,o,this._globeness)}projectTileCoordinates(e,t,i,a){return this.currentTransform.projectTileCoordinates(e,t,i,a)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ);}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e);}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e);}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(e,t,i,a){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,a)}setLocationAtPoint(e,t){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,t),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform);}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){const t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;const i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return i.fallbackMatrix=t.mainMatrix,i}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class zi{get useGlobeControls(){return !0}handlePanInertia(e,i){const a=bi(e,i);return Math.abs(a.lng-i.center.lng)>180&&(a.lng=i.center.lng+179.5*Math.sign(a.lng-i.center.lng)),{easingCenter:a,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,i){const a=e.around,r=i.screenPointToLocation(a);e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta);const o=i.zoom;e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta);const s=i.zoom-o;if(0===s)return;const n=t.bK(i.center.lng,r.lng),l=n/(Math.abs(n/180)+1),c=t.bK(i.center.lat,r.lat),h=i.getRayDirectionFromPixel(a),u=i.cameraPosition,d=-1*t.b5(u,h),_=t.bz();t.b0(_,u,[h[0]*d,h[1]*d,h[2]*d]);const p=t.b7(_)-1,m=Math.exp(.5*-Math.max(p-.3,0)),f=fi(i.worldSize,i.center.lat)/Math.min(i.width,i.height),g=t.bx(f,.9,.5,1,.25),v=(1-t.aq(-s))*Math.min(m,g),x=i.center.lat,b=i.zoom,y=new t.V(i.center.lng+l*v,t.an(i.center.lat+c*v,-t.ao,t.ao));i.setLocationAtPoint(r,a);const w=i.center,T=t.bx(Math.abs(n),45,85,0,1),P=t.bx(f,.75,.35,0,1),C=Math.pow(Math.max(T,P),.25),I=t.bK(w.lng,y.lng),M=t.bK(w.lat,y.lat);i.setCenter(new t.V(w.lng+I*C,w.lat+M*C).wrap()),i.setZoom(b+xi(x,i.center.lat));}handleMapControlsPan(e,t,i){if(!e.panDelta)return;const a=t.center.lat,r=t.zoom;t.setCenter(bi(e.panDelta,t).wrap()),t.setZoom(r+xi(a,t.center.lat));}cameraForBoxAndBearing(e,i,a,r,o){const s=Kt(e,i,a,r,o),n=i.left/o.width*2-1,l=(o.width-i.right)/o.width*2-1,c=i.top/o.height*-2+1,h=(o.height-i.bottom)/o.height*-2+1,u=t.bK(a.getWest(),a.getEast())<0,d=u?a.getEast():a.getWest(),_=u?a.getWest():a.getEast(),p=Math.max(a.getNorth(),a.getSouth()),m=Math.min(a.getNorth(),a.getSouth()),f=d+.5*t.bK(d,_),g=p+.5*t.bK(p,m),v=o.clone();v.setCenter(s.center),v.setBearing(s.bearing),v.setPitch(0),v.setRoll(0),v.setZoom(s.zoom);const x=v.modelViewProjectionMatrix,b=[mi(a.getNorthWest()),mi(a.getNorthEast()),mi(a.getSouthWest()),mi(a.getSouthEast()),mi(new t.V(_,g)),mi(new t.V(d,g)),mi(new t.V(f,p)),mi(new t.V(f,m))],y=mi(s.center);let w=Number.POSITIVE_INFINITY;for(const e of b)n<0&&(w=zi.getLesserNonNegativeNonNull(w,zi.solveVectorScale(e,y,x,"x",n))),l>0&&(w=zi.getLesserNonNegativeNonNull(w,zi.solveVectorScale(e,y,x,"x",l))),c>0&&(w=zi.getLesserNonNegativeNonNull(w,zi.solveVectorScale(e,y,x,"y",c))),h<0&&(w=zi.getLesserNonNegativeNonNull(w,zi.solveVectorScale(e,y,x,"y",h)));if(Number.isFinite(w)&&0!==w)return s.zoom=v.zoom+t.at(w),s;Ht();}handleJumpToCenterZoom(e,i){const a=e.center.lat,r=e.applyConstrain(i.center?t.V.convert(i.center):e.center,e.zoom).center;e.setCenter(r.wrap());const o=void 0!==i.zoom?+i.zoom:e.zoom+xi(a,r.lat);e.zoom!==o&&e.setZoom(o);}handleEaseTo(e,i){const a=e.zoom,r=e.center,o=e.padding,s={roll:e.roll,pitch:e.pitch,bearing:e.bearing},n={roll:void 0===i.roll?e.roll:i.roll,pitch:void 0===i.pitch?e.pitch:i.pitch,bearing:void 0===i.bearing?e.bearing:i.bearing},l=void 0!==i.zoom,c=!e.isPaddingEqual(i.padding);let h=!1;const u=i.center?t.V.convert(i.center):r,d=e.applyConstrain(u,a).center;Zt(e,d);const _=e.clone();_.setCenter(d),_.setZoom(l?+i.zoom:a+xi(r.lat,u.lat)),_.setBearing(i.bearing);const p=new t.P(t.an(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),t.an(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));_.setLocationAtPoint(d,p);const m=(i.offset&&i.offsetAsPoint.mag())>0?_.center:d,f=l?+i.zoom:a+xi(r.lat,m.lat),g=a+xi(r.lat,0),v=f+xi(m.lat,0),x=t.bK(r.lng,m.lng),b=t.bK(r.lat,m.lat),y=t.aq(v-g);return h=f!==a,{easeFunc:a=>{if(t.bo(s,n)||Xt({startEulerAngles:s,endEulerAngles:n,tr:e,k:a,useSlerp:s.roll!=n.roll}),c&&e.interpolatePadding(o,i.padding,a),i.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(i.around,i.aroundPoint);else {const t=v>g?Math.min(2,y):Math.max(.5,y),i=Math.pow(t,1-a),o=wi(r,x,b,a*i);e.setCenter(o.wrap());}if(h){const i=t.G.number(g,v,a)+xi(0,e.center.lat);e.setZoom(i);}},isZooming:h,elevationCenter:m}}handleFlyTo(e,i){const a=void 0!==i.zoom,r=e.center,o=e.zoom,s=e.padding,n=!e.isPaddingEqual(i.padding),l=e.applyConstrain(t.V.convert(i.center||i.locationAtOffset),o).center,c=a?+i.zoom:e.zoom+xi(e.center.lat,l.lat),h=e.clone();h.setCenter(l),h.setZoom(c),h.setBearing(i.bearing);const u=new t.P(t.an(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),t.an(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));h.setLocationAtPoint(l,u);const d=h.center;Zt(e,d);const _=function(e,i,a){const r=mi(i),o=mi(a),s=t.b5(r,o),n=Math.acos(s),l=_i(e);return n/(2*Math.PI)*l}(e,r,d),p=o+xi(r.lat,0),m=c+xi(d.lat,0),f=t.aq(m-p);let g;if("number"==typeof i.minZoom){const a=+i.minZoom+xi(d.lat,0),r=Math.min(a,p,m)+xi(0,d.lat),o=e.applyConstrain(d,r).zoom+xi(d.lat,0);g=t.aq(o-p);}const v=t.bK(r.lng,d.lng),x=t.bK(r.lat,d.lat);return {easeFunc:(a,o,l,h)=>{const u=wi(r,v,x,l);n&&e.interpolatePadding(s,i.padding,a);const _=1===a?d:u;e.setCenter(_.wrap());const m=p+t.at(o);e.setZoom(1===a?c:m+xi(0,_.lat));},scaleOfZoom:f,targetCenter:d,scaleOfMinZoom:g,pixelPathLength:_}}static solveVectorScale(e,t,i,a,r){const o="x"===a?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],s=[i[3],i[7],i[11],i[15]],n=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],l=e[0]*s[0]+e[1]*s[1]+e[2]*s[2],c=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],h=t[0]*s[0]+t[1]*s[1]+t[2]*s[2];return c+r*l===n+r*h||s[3]*(n-c)+o[3]*(h-l)+n*h==c*l?null:(c+o[3]-r*h-r*s[3])/(c-n-r*h+r*l)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&tt.B(e,i&&i.filter((e=>"source.canvas"!==e.identifier))),Li=t.bO();class ki extends t.E{constructor(e,i={}){var a,r;super(),this._rtlPluginLoaded=()=>{for(const e in this.tileManagers){const t=this.tileManagers[e].getSource().type;"vector"!==t&&"geojson"!==t||this.tileManagers[e].reload();}},this.map=e,this.dispatcher=new N(j(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((e,t)=>this.getGlyphs(e,t))),this.dispatcher.registerMessageHandler("GI",((e,t)=>this.getImages(e,t))),this.dispatcher.registerMessageHandler("GDA",((e,t)=>this.getDashes(e,t))),this.imageManager=new w,this.imageManager.setEventedParent(this);const o=(null===(a=e._container)||void 0===a?void 0:a.lang)||"undefined"!=typeof document&&(null===(r=document.documentElement)||void 0===r?void 0:r.lang)||void 0;this.glyphManager=new M(e._requestManager,i.localIdeographFontFamily,o),this.lineAtlas=new A(256,512),this.crossTileSymbolIndex=new zt,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",t.bP()),ce().on(se,this._rtlPluginLoaded),this.on("data",(e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.tileManagers[e.sourceId];if(!t)return;const i=t.getSource();if(i&&i.vectorLayerIds)for(const e in this._layers){const t=this._layers[e];t.source===i.id&&this._validateLayer(t);}}));}_setInitialValues(){var e;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new t.bQ,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null===(e=this.crossTileSymbolIndex)||void 0===e?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0;}setGlobalStateProperty(e,i){var a,r,o;this._checkLoaded();const s=null===i?null!==(o=null===(r=null===(a=this.stylesheet.state)||void 0===a?void 0:a[e])||void 0===r?void 0:r.default)&&void 0!==o?o:null:i;if(t.bR(s,this._globalState[e]))return this;this._globalState[e]=s,this._applyGlobalStateChanges([e]);}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();const i=[];for(const a in e)!t.bR(this._globalState[a],e[a].default)&&(i.push(a),this._globalState[a]=e[a].default);this._applyGlobalStateChanges(i);}_applyGlobalStateChanges(e){if(0===e.length)return;const t=new Set,i={};for(const a of e){i[a]=this._globalState[a];for(const e in this._layers){const i=this._layers[e],r=i.getLayoutAffectingGlobalStateRefs(),o=i.getPaintAffectingGlobalStateRefs(),s=i.getVisibilityAffectingGlobalStateRefs();if(r.has(a)&&t.add(i.source),o.has(a))for(const{name:e,value:t}of o.get(a))this._updatePaintProperty(i,e,t);(null==s?void 0:s.has(a))&&(i.recalculateVisibility(),this._updateLayer(i));}}this.dispatcher.broadcast("UGS",i);for(const e in this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0);}loadURL(e,i={},a){this.fire(new t.l("dataloading",{dataType:"style"})),i.validate="boolean"!=typeof i.validate||i.validate;const r=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const o=this._loadStyleRequest;t.j(r,this._loadStyleRequest).then((e=>{this._loadStyleRequest=null,this._load(e.data,i,a);})).catch((e=>{this._loadStyleRequest=null,e&&!o.signal.aborted&&this.fire(new t.k(e));}));}loadJSON(e,i={},a){this.fire(new t.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,i.validate=!1!==i.validate,this._load(e,i,a);})).catch((()=>{}));}loadEmpty(){this.fire(new t.l("dataloading",{dataType:"style"})),this._load(Li,{validate:!1});}_load(e,i,a){var r,o;let s=i.transformStyle?i.transformStyle(a,e):e;if(!i.validate||!Ai(this,t.C(s))){s=Object.assign({},s),this._loaded=!0,this.stylesheet=s;for(const e in s.sources)this.addSource(e,s.sources[e],{validate:!1});s.sprite?this._loadSprite(s.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(s.glyphs),this._createLayers(),this.light=new R(this.stylesheet.light),this._setProjectionInternal((null===(r=this.stylesheet.projection)||void 0===r?void 0:r.type)||"mercator"),this.sky=new D(this.stylesheet.sky),this.map.setTerrain(null!==(o=this.stylesheet.terrain)&&void 0!==o?o:null),this.fire(new t.l("data",{dataType:"style"})),this.fire(new t.l("style.load"));}}_createLayers(){var e,i,a;const r=t.bS(this.stylesheet.layers);this.setGlobalState(null!==(e=this.stylesheet.state)&&void 0!==e?e:null),this.dispatcher.broadcast("SL",r),this._order=r.map((e=>e.id)),this._layers={},this._serializedLayers=null;for(const e of r){const r=t.bT(e,this._globalState);if(r.setEventedParent(this,{layer:{id:e.id}}),this._layers[e.id]=r,t.bU(r)&&this.tileManagers[r.source]){const t=null!==(a=null===(i=e.paint)||void 0===i?void 0:i["raster-fade-duration"])&&void 0!==a?a:r.paint.get("raster-fade-duration");this.tileManagers[r.source].setRasterFadeDuration(t);}}}_loadSprite(e,i=!1,a=void 0){this.imageManager.setLoaded(!1);const r=new AbortController;let o;this._spriteRequest=r,function(e,i,a,r){return t._(this,void 0,void 0,(function*(){const o=x(e),s=a>1?"@2x":"",l={},c={};for(const{id:e,url:a}of o){const o=i.transformRequest(b(a,s,".json"),"SpriteJSON");l[e]=t.j(o,r);const n=i.transformRequest(b(a,s,".png"),"SpriteImage");c[e]=g.getImage(n,r);}return yield Promise.all([...Object.values(l),...Object.values(c)]),function(e,i){return t._(this,void 0,void 0,(function*(){const t={};for(const a in e){t[a]={};const r=n.getImageCanvasContext((yield i[a]).data),o=(yield e[a]).data;for(const e in o){const{width:i,height:s,x:n,y:l,sdf:c,pixelRatio:h,stretchX:u,stretchY:d,content:_,textFitWidth:p,textFitHeight:m}=o[e];t[a][e]={data:null,pixelRatio:h,sdf:c,stretchX:u,stretchY:d,content:_,textFitWidth:p,textFitHeight:m,spriteData:{width:i,height:s,x:n,y:l,context:r}};}}return t}))}(l,c)}))}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((e=>{if(this._spriteRequest=null,e)for(const t in e){this._spritesImagesIds[t]=[];const a=this._spritesImagesIds[t]?this._spritesImagesIds[t].filter((t=>!(t in e))):[];for(const e of a)this.imageManager.removeImage(e),this._changedImages[e]=!0;for(const a in e[t]){const r="default"===t?a:`${t}:${a}`;this._spritesImagesIds[t].push(r),r in this.imageManager.images?this.imageManager.updateImage(r,e[t][a],!1):this.imageManager.addImage(r,e[t][a]),i&&(this._changedImages[r]=!0);}}})).catch((e=>{this._spriteRequest=null,o=e,r.signal.aborted||this.fire(new t.k(o));})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"})),a&&a(o);}));}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}));}_validateLayer(e){const i=this.tileManagers[e.source];if(!i)return;const a=e.sourceLayer;if(!a)return;const r=i.getSource();("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(a))&&this.fire(new t.k(new Error(`Source layer "${a}" does not exist on source "${r.id}" as specified by style layer "${e.id}".`)));}loaded(){if(!this._loaded)return !1;if(Object.keys(this._updatedSources).length)return !1;for(const e in this.tileManagers)if(!this.tileManagers[e].loaded())return !1;return !!this.imageManager.isLoaded()}_serializeByIds(e,i=!1){const a=this._serializedAllLayers();if(!e||0===e.length)return Object.values(i?t.bV(a):a);const r=[];for(const o of e)if(a[o]){const e=i?t.bV(a[o]):a[o];r.push(e);}return r}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const t=Object.keys(this._layers);for(const i of t){const t=this._layers[i];"custom"!==t.type&&(e[i]=t.serialize());}return e}hasTransitions(){var e,t,i;if(null===(e=this.light)||void 0===e?void 0:e.hasTransition())return !0;if(null===(t=this.sky)||void 0===t?void 0:t.hasTransition())return !0;if(null===(i=this.projection)||void 0===i?void 0:i.hasTransition())return !0;for(const e in this.tileManagers)if(this.tileManagers[e].hasTransition())return !0;for(const e in this._layers)if(this._layers[e].hasTransition())return !0;return !1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const i=this._changed;if(i){const t=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);(t.length||i.length)&&this._updateWorkerLayers(t,i);for(const e in this._updatedSources){const t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else {if("clear"!==t)throw new Error(`Invalid action ${t}`);this._clearSource(e);}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const t in this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates();}const a={};for(const e in this.tileManagers){const t=this.tileManagers[e];a[e]=t.used,t.used=!1;}for(const t of this._order){const i=this._layers[t];i.recalculate(e,this._availableImages),!i.isHidden(e.zoom)&&i.source&&(this.tileManagers[i.source].used=!0);}for(const e in a){const i=this.tileManagers[e];!!a[e]!=!!i.used&&i.fire(new t.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}));}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,i&&this.fire(new t.l("data",{dataType:"style"}));}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={};}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1;}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t});}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1;}setState(e,i={}){var a;this._checkLoaded();const r=this.serialize();if(e=i.transformStyle?i.transformStyle(r,e):e,(null===(a=i.validate)||void 0===a||a)&&Ai(this,t.C(e)))return !1;(e=t.bV(e)).layers=t.bS(e.layers);const o=t.bW(r,e),s=this._getOperationsToPerform(o);if(s.unimplemented.length>0)throw new Error(`Unimplemented: ${s.unimplemented.join(", ")}.`);if(0===s.operations.length)return !1;for(const e of s.operations)e();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const t=[],i=[];for(const a of e)switch(a.command){case "setCenter":case "setZoom":case "setBearing":case "setPitch":case "setRoll":continue;case "addLayer":t.push((()=>this.addLayer.apply(this,a.args)));break;case "removeLayer":t.push((()=>this.removeLayer.apply(this,a.args)));break;case "setPaintProperty":t.push((()=>this.setPaintProperty.apply(this,a.args)));break;case "setLayoutProperty":t.push((()=>this.setLayoutProperty.apply(this,a.args)));break;case "setFilter":t.push((()=>this.setFilter.apply(this,a.args)));break;case "addSource":t.push((()=>this.addSource.apply(this,a.args)));break;case "removeSource":t.push((()=>this.removeSource.apply(this,a.args)));break;case "setLayerZoomRange":t.push((()=>this.setLayerZoomRange.apply(this,a.args)));break;case "setLight":t.push((()=>this.setLight.apply(this,a.args)));break;case "setGeoJSONSourceData":t.push((()=>this.setGeoJSONSourceData.apply(this,a.args)));break;case "setGlyphs":t.push((()=>this.setGlyphs.apply(this,a.args)));break;case "setSprite":t.push((()=>this.setSprite.apply(this,a.args)));break;case "setTerrain":t.push((()=>this.map.setTerrain.apply(this,a.args)));break;case "setSky":t.push((()=>this.setSky.apply(this,a.args)));break;case "setProjection":this.setProjection.apply(this,a.args);break;case "setGlobalState":t.push((()=>this.setGlobalState.apply(this,a.args)));break;case "setTransition":t.push((()=>{}));break;default:i.push(a.command);}return {operations:t,unimplemented:i}}addImage(e,i){if(this.getImage(e))return this.fire(new t.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,i),this._afterImageUpdated(e);}updateImage(e,t){this.imageManager.updateImage(e,t);}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e);}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}));}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,i,a={}){if(this._checkLoaded(),void 0!==this.tileManagers[e])throw new Error(`Source "${e}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(t.C.source,`sources.${e}`,i,null,a))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);const r=this.tileManagers[e]=new ke(e,i,this.dispatcher);r.style=this,r.setEventedParent(this,(()=>({isSourceLoaded:r.loaded(),source:r.serialize(),sourceId:e}))),r.onAdd(this.map),this._changed=!0;}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw new Error("There is no source with this ID");for(const i in this._layers)if(this._layers[i].source===e)return this.fire(new t.k(new Error(`Source "${e}" cannot be removed while layer "${i}" is using it.`)));const i=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],i.fire(new t.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0;}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw new Error(`There is no source with this ID=${e}`);const i=this.tileManagers[e].getSource();if("geojson"!==i.type)throw new Error(`geojsonSource.type is ${i.type}, which is !== 'geojson`);i.setData(t),this._changed=!0;}getSource(e){return this.tileManagers[e]&&this.tileManagers[e].getSource()}addLayer(e,i,a={}){this._checkLoaded();const r=e.id;if(this.getLayer(r))return void this.fire(new t.k(new Error(`Layer "${r}" already exists on this map.`)));let o;if("custom"===e.type){if(Ai(this,t.bX(e)))return;o=t.bT(e,this._globalState);}else {if("source"in e&&"object"==typeof e.source&&(this.addSource(r,e.source),e=t.bV(e),e=t.e(e,{source:r})),this._validate(t.C.layer,`layers.${r}`,e,{arrayIndex:-1},a))return;o=t.bT(e,this._globalState),this._validateLayer(o),o.setEventedParent(this,{layer:{id:r}});}const s=i?this._order.indexOf(i):this._order.length;if(i&&-1===s)this.fire(new t.k(new Error(`Cannot add layer "${r}" before non-existing layer "${i}".`)));else {if(this._order.splice(s,0,r),this._layerOrderChanged=!0,this._layers[r]=o,this._removedLayers[r]&&o.source&&"custom"!==o.type){const e=this._removedLayers[r];delete this._removedLayers[r],e.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.tileManagers[o.source].pause());}this._updateLayer(o),o.onAdd&&o.onAdd(this.map);}}moveLayer(e,i){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===i)return;const a=this._order.indexOf(e);this._order.splice(a,1);const r=i?this._order.indexOf(i):this._order.length;i&&-1===r?this.fire(new t.k(new Error(`Cannot move layer "${e}" before non-existing layer "${i}".`))):(this._order.splice(r,0,e),this._layerOrderChanged=!0);}removeLayer(e){this._checkLoaded();const i=this._layers[e];if(!i)return void this.fire(new t.k(new Error(`Cannot remove non-existing layer "${e}".`)));i.setEventedParent(null);const a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map);}getLayer(e){return this._layers[e]}getLayersOrder(){return [...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,i,a){this._checkLoaded();const r=this.getLayer(e);r?r.minzoom===i&&r.maxzoom===a||(null!=i&&(r.minzoom=i),null!=a&&(r.maxzoom=a),this._updateLayer(r)):this.fire(new t.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)));}setFilter(e,i,a={}){this._checkLoaded();const r=this.getLayer(e);if(r){if(!t.bR(r.filter,i))return null==i?(r.setFilter(void 0),void this._updateLayer(r)):void(this._validate(t.C.filter,`layers.${r.id}.filter`,i,null,a)||(r.setFilter(t.bV(i)),this._updateLayer(r)))}else this.fire(new t.k(new Error(`Cannot filter non-existing layer "${e}".`)));}getFilter(e){return t.bV(this.getLayer(e).filter)}setLayoutProperty(e,i,a,r={}){this._checkLoaded();const o=this.getLayer(e);o?t.bR(o.getLayoutProperty(i),a)||(o.setLayoutProperty(i,a,r),this._updateLayer(o)):this.fire(new t.k(new Error(`Cannot style non-existing layer "${e}".`)));}getLayoutProperty(e,i){const a=this.getLayer(e);if(a)return a.getLayoutProperty(i);this.fire(new t.k(new Error(`Cannot get style of non-existing layer "${e}".`)));}setPaintProperty(e,i,a,r={}){this._checkLoaded();const o=this.getLayer(e);o?t.bR(o.getPaintProperty(i),a)||this._updatePaintProperty(o,i,a,r):this.fire(new t.k(new Error(`Cannot style non-existing layer "${e}".`)));}_updatePaintProperty(e,i,a,r={}){e.setPaintProperty(i,a,r)&&this._updateLayer(e),t.bU(e)&&"raster-fade-duration"===i&&this.tileManagers[e.source].setRasterFadeDuration(a),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null;}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,i){this._checkLoaded();const a=e.source,r=e.sourceLayer,o=this.tileManagers[a];if(void 0===o)return void this.fire(new t.k(new Error(`The source '${a}' does not exist in the map's style.`)));const s=o.getSource().type;"geojson"===s&&r?this.fire(new t.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||r?(void 0===e.id&&this.fire(new t.k(new Error("The feature id parameter must be provided."))),o.setFeatureState(r,e.id,i)):this.fire(new t.k(new Error("The sourceLayer parameter must be provided for vector source types.")));}removeFeatureState(e,i){this._checkLoaded();const a=e.source,r=this.tileManagers[a];if(void 0===r)return void this.fire(new t.k(new Error(`The source '${a}' does not exist in the map's style.`)));const o=r.getSource().type,s="vector"===o?e.sourceLayer:void 0;"vector"!==o||s?i&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.k(new Error("A feature id is required to remove its specific state property."))):r.removeFeatureState(s,e.id,i):this.fire(new t.k(new Error("The sourceLayer parameter must be provided for vector source types.")));}getFeatureState(e){this._checkLoaded();const i=e.source,a=e.sourceLayer,r=this.tileManagers[i];if(void 0!==r)return "vector"!==r.getSource().type||a?(void 0===e.id&&this.fire(new t.k(new Error("The feature id parameter must be provided."))),r.getFeatureState(a,e.id)):void this.fire(new t.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.k(new Error(`The source '${i}' does not exist in the map's style.`)));}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=t.bY(this.tileManagers,(e=>e.serialize())),i=this._serializeByIds(this._order,!0),a=this.map.getTerrain()||void 0,r=this.stylesheet;return t.bZ({version:r.version,name:r.name,metadata:r.metadata,light:r.light,sky:r.sky,center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch,sprite:r.sprite,glyphs:r.glyphs,transition:r.transition,projection:r.projection,sources:e,layers:i,terrain:a},(e=>void 0!==e))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0;}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,i={},a=[];for(let r=this._order.length-1;r>=0;r--){const o=this._order[r];if(t(o)){i[o]=r;for(const t of e){const e=t[o];if(e)for(const t of e)a.push(t);}}}a.sort(((e,t)=>t.intersectionZ-e.intersectionZ));const r=[];for(let o=this._order.length-1;o>=0;o--){const s=this._order[o];if(t(s))for(let e=a.length-1;e>=0;e--){const t=a[e].feature;if(i[t.layer.id]this.map.terrain.getElevation(e,t,i):void 0));return this.placement&&o.push(function(e,t,i,a,r,o,s){const n={},l=o.queryRenderedSymbols(a),c=[];for(const e of Object.keys(l).map(Number))c.push(s[e]);c.sort(V);for(const i of c){const a=i.featureIndex.lookupSymbolFeatures(l[i.bucketInstanceId],t,i.bucketIndex,i.sourceLayerIndex,{filterSpec:r.filter,globalState:r.globalState},r.layers,r.availableImages,e);for(const e in a){const t=n[e]=n[e]||[],r=a[e];r.sort(((e,t)=>{const a=i.featureSortOrder;if(a){const i=a.indexOf(e.featureIndex);return a.indexOf(t.featureIndex)-i}return t.featureIndex-e.featureIndex}));for(const e of r)t.push(e);}}return function(e,t,i){for(const a in e)for(const r of e[a])q(r,i[t[a].source]);return e}(n,e,i)}(this._layers,s,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(e,i){(null==i?void 0:i.filter)&&this._validate(t.C.filter,"querySourceFeatures.filter",i.filter,null,i);const a=this.tileManagers[e];return a?function(e,t){const i=e.getRenderableIds().map((t=>e.getTileByID(t))),a=[],r={};for(let e=0;ee.getTileByID(t))).sort(((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)));}const a=this.crossTileSymbolIndex.addLayer(i,n[i.source],e.center.lng);o=o||a;}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((r=r||this._layerOrderChanged||0===i)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(c(),e.zoom))&&(this.pauseablePlacement=new It(e,this.map.terrain,this._order,r,t,i,a,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,n),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(c()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,n[t.source]);}return !this.pauseablePlacement.isDone()||this.placement.hasTransitions(c())}_releaseSymbolFadeTiles(){for(const e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles();}getImages(e,i){return t._(this,void 0,void 0,(function*(){const e=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();const t=this.tileManagers[i.source];return t&&t.setDependencies(i.tileID.key,i.type,i.icons),e}))}getGlyphs(e,i){return t._(this,void 0,void 0,(function*(){const e=yield this.glyphManager.getGlyphs(i.stacks),t=this.tileManagers[i.source];return t&&t.setDependencies(i.tileID.key,i.type,[""]),e}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,i={}){this._checkLoaded(),e&&this._validate(t.C.glyphs,"glyphs",e,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e));}getDashes(e,i){return t._(this,void 0,void 0,(function*(){const e={};for(const[t,a]of Object.entries(i.dashes))e[t]=this.lineAtlas.getDash(a.dasharray,a.round);return e}))}addSprite(e,i,a={},r){this._checkLoaded();const o=[{id:e,url:i}],s=[...x(this.stylesheet.sprite),...o];this._validate(t.C.sprite,"sprite",s,null,a)||(this.stylesheet.sprite=s,this._loadSprite(o,!0,r));}removeSprite(e){this._checkLoaded();const i=x(this.stylesheet.sprite);if(i.find((t=>t.id===e))){if(this._spritesImagesIds[e])for(const t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;i.splice(i.findIndex((t=>t.id===e)),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}));}else this.fire(new t.k(new Error(`Sprite "${e}" doesn't exists on this map.`)));}getSprite(){return x(this.stylesheet.sprite)}setSprite(e,i={},a){this._checkLoaded(),e&&this._validate(t.C.sprite,"sprite",e,null,i)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,a):(this._unloadSprite(),a&&a(null)));}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(const e in this.tileManagers){const t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map);}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(const e in this._layers){const t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map);}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={};}}var Fi=t.aU([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Bi{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null;}bind(e,t,i,a,r,o,s,n,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==a.length;for(let e=0;!c&&e({u_texture:0,u_ele_delta:e,u_fog_matrix:i,u_fog_color:a?a.properties.get("fog-color"):t.bp.white,u_fog_ground_blend:a?a.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:o?0:a?a.calculateFogBlendOpacity(r):0,u_horizon_color:a?a.properties.get("horizon-color"):t.bp.white,u_horizon_fog_blend:a?a.properties.get("horizon-fog-blend"):1,u_is_globe_mode:o?1:0}),ji={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Ni(e){const t=[];for(let i=0;i({u_depth:new t.b_(e,i.u_depth),u_terrain:new t.b_(e,i.u_terrain),u_terrain_dim:new t.bq(e,i.u_terrain_dim),u_terrain_matrix:new t.c0(e,i.u_terrain_matrix),u_terrain_unpack:new t.c1(e,i.u_terrain_unpack),u_terrain_exaggeration:new t.bq(e,i.u_terrain_exaggeration)}))(e,C),this.projectionUniforms=((e,i)=>({u_projection_matrix:new t.c0(e,i.u_projection_matrix),u_projection_tile_mercator_coords:new t.c1(e,i.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.c1(e,i.u_projection_clipping_plane),u_projection_transition:new t.bq(e,i.u_projection_transition),u_projection_fallback_matrix:new t.c0(e,i.u_projection_fallback_matrix)}))(e,C),this.binderUniforms=a?a.getUniforms(e,C):[];}draw(e,t,i,a,r,o,s,n,l,c,h,u,d,_,p,m,f,g,v){const x=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(i),e.setStencilMode(a),e.setColorMode(r),e.setCullFace(o),n){e.activeTexture.set(x.TEXTURE2),x.bindTexture(x.TEXTURE_2D,n.depthTexture),e.activeTexture.set(x.TEXTURE3),x.bindTexture(x.TEXTURE_2D,n.texture);for(const e in this.terrainUniforms)this.terrainUniforms[e].set(n[e]);}if(l)for(const e in l)this.projectionUniforms[ji[e]].set(l[e]);if(s)for(const e in this.fixedUniforms)this.fixedUniforms[e].set(s[e]);m&&m.setUniforms(e,this.binderUniforms,_,{zoom:p});let b=0;switch(t){case x.LINES:b=2;break;case x.TRIANGLES:b=3;break;case x.LINE_STRIP:b=1;}for(const i of d.get()){const a=i.vaos||(i.vaos={});(a[c]||(a[c]=new Bi)).bind(e,this,h,m?m.getPaintVertexBuffers():[],u,i.vertexOffset,f,g,v),x.drawElements(t,i.primitiveLength*b,x.UNSIGNED_SHORT,i.primitiveOffset*b*2);}}}function Gi(e,i,a){const r=1/t.aN(a,1,i.transform.tileZoom),o=Math.pow(2,a.tileID.overscaledZ),s=a.tileSize*Math.pow(2,i.transform.tileZoom)/o,n=s*(a.tileID.canonical.x+a.tileID.wrap*o),l=s*a.tileID.canonical.y;return {u_image:0,u_texsize:a.imageAtlasTexture.size,u_scale:[r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[n>>16,l>>16],u_pixel_coord_lower:[65535&n,65535&l]}}const Ui=(e,i,a,r)=>{const o=e.style.light,s=o.properties.get("position"),n=[s.x,s.y,s.z],l=t.c4();"viewport"===o.properties.get("anchor")&&t.c5(l,e.transform.bearingInRadians),t.c6(n,n,l);const c=e.transform.transformLightDirection(n),h=o.properties.get("color");return {u_lightpos:n,u_lightpos_globe:c,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[h.r,h.g,h.b],u_vertical_gradient:+i,u_opacity:a,u_fill_translate:r}},Vi=(e,i,a,r,o,s,n)=>t.e(Ui(e,i,a,r),Gi(s,e,n),{u_height_factor:-Math.pow(2,o.overscaledZ)/n.tileSize/8}),qi=(e,i,a,r)=>t.e(Gi(i,e,a),{u_fill_translate:r}),Wi=(e,t)=>({u_world:e,u_fill_translate:t}),$i=(e,i,a,r,o)=>t.e(qi(e,i,a,o),{u_world:r}),Hi=(e,i,a,r,o)=>{const s=e.transform;let n,l,c=0;if("map"===a.paint.get("circle-pitch-alignment")){const e=t.aN(i,1,s.zoom);n=!0,l=[e,e],c=e/(t.a5*Math.pow(2,i.tileID.overscaledZ))*2*Math.PI*o;}else n=!1,l=s.pixelsToGLUnits;return {u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===a.paint.get("circle-pitch-scale")),u_pitch_with_map:+n,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:c,u_translate:r}},Xi=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),Ki=e=>({u_viewport_size:[e.width,e.height]}),Yi=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),Qi=(e,i,a,r)=>{const o=t.aN(e,1,i)/(t.a5*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*r;return {u_extrude_scale:t.aN(e,1,i),u_intensity:a,u_globe_extrude_scale:o}},Ji=(e,i,a,r)=>{const o=t.N();t.c7(o,0,e.width,e.height,0,0,1);const s=e.context.gl;return {u_matrix:o,u_world:[s.drawingBufferWidth,s.drawingBufferHeight],u_image:a,u_color_ramp:r,u_opacity:i.paint.get("heatmap-opacity")}},ea=(e,t,i)=>{const a=i.paint.get("hillshade-accent-color");let r;switch(i.paint.get("hillshade-method")){case "basic":r=4;break;case "combined":r=1;break;case "igor":r=2;break;case "multidirectional":r=3;break;default:r=0;}const o=i.getIlluminationProperties();for(let t=0;t{const a=i.stride,r=t.N();return t.c7(r,0,t.a5,-t.a5,0,0,1),t.O(r,r,[0,-t.a5,0]),{u_matrix:r,u_image:1,u_dimension:[a,a],u_zoom:e.overscaledZ,u_unpack:i.getUnpackVector()}};function ia(e,i){const a=Math.pow(2,i.canonical.z),r=i.canonical.y;return [new t.a9(0,r/a).toLngLat().lat,new t.a9(0,(r+1)/a).toLngLat().lat]}const aa=(e,t,i=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:e.paint.get("color-relief-opacity")}),ra=(e,i,a,r)=>{const o=e.transform;return {u_translation:ha(e,i,a),u_ratio:r/t.aN(i,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},oa=(e,i,a,r,o)=>t.e(ra(e,i,a,r),{u_image:0,u_image_height:o}),sa=(e,i,a,r,o)=>{const s=e.transform,n=ca(i,s);return {u_translation:ha(e,i,a),u_texsize:i.imageAtlasTexture.size,u_ratio:r/t.aN(i,1,s.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[n,o.fromScale,o.toScale],u_fade:o.t,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]]}},na=(e,i,a,r,o)=>{const s=ca(i,e.transform);return t.e(ra(e,i,a,r),{u_tileratio:s,u_crossfade_from:o.fromScale,u_crossfade_to:o.toScale,u_image:0,u_mix:o.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},la=(e,i,a,r,o,s)=>{const n=ca(i,e.transform);return t.e(ra(e,i,a,r),{u_image:0,u_image_height:s,u_tileratio:n,u_crossfade_from:o.fromScale,u_crossfade_to:o.toScale,u_image_dash:1,u_mix:o.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function ca(e,i){return 1/t.aN(e,1,i.tileZoom)}function ha(e,i,a){return t.aO(e.transform,i,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"))}const ua=(e,t,i,a,r)=>{return {u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(s=a.paint.get("raster-saturation"),s>0?1-1/(1.001-s):-s),u_contrast_factor:(o=a.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:da(a.paint.get("raster-hue-rotate")),u_coords_top:[r[0].x,r[0].y,r[1].x,r[1].y],u_coords_bottom:[r[3].x,r[3].y,r[2].x,r[2].y]};var o,s;};function da(e){e*=Math.PI/180;const t=Math.sin(e),i=Math.cos(e);return [(2*i+1)/3,(-Math.sqrt(3)*t-i+1)/3,(Math.sqrt(3)*t-i+1)/3]}const _a=(e,t,i,a,r,o,s,n,l,c,h,u,d)=>{const _=s.transform;return {u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:_.cameraToCenterDistance,u_pitch:_.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:_.width/_.height,u_fade_change:s.options.fadeDuration?s.symbolFadeChange:1,u_label_plane_matrix:n,u_coord_matrix:l,u_is_text:+h,u_pitch_with_map:+a,u_is_along_line:r,u_is_variable_anchor:o,u_texsize:u,u_texture:0,u_translation:c,u_pitched_scale:d}},pa=(e,i,a,r,o,s,n,l,c,h,u,d,_,p)=>{const m=n.transform;return t.e(_a(e,i,a,r,o,s,n,l,c,h,u,d,p),{u_gamma_scale:r?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:n.pixelRatio,u_is_halo:1})},ma=(e,i,a,r,o,s,n,l,c,h,u,d,_)=>t.e(pa(e,i,a,r,o,s,n,l,c,h,!0,u,0,_),{u_texsize_icon:d,u_texture_icon:1}),fa=(e,t)=>({u_opacity:e,u_color:t}),ga=(e,i,a,r,o)=>t.e(function(e,i,a,r){const o=a.imageManager.getPattern(e.from.toString()),s=a.imageManager.getPattern(e.to.toString()),{width:n,height:l}=a.imageManager.getPixelSize(),c=Math.pow(2,r.tileID.overscaledZ),h=r.tileSize*Math.pow(2,a.transform.tileZoom)/c,u=h*(r.tileID.canonical.x+r.tileID.wrap*c),d=h*r.tileID.canonical.y;return {u_image:0,u_pattern_tl_a:o.tl,u_pattern_br_a:o.br,u_pattern_tl_b:s.tl,u_pattern_br_b:s.br,u_texsize:[n,l],u_mix:i.t,u_pattern_size_a:o.displaySize,u_pattern_size_b:s.displaySize,u_scale_a:i.fromScale,u_scale_b:i.toScale,u_tile_units_to_pixels:1/t.aN(r,1,a.transform.tileZoom),u_pixel_coord_upper:[u>>16,d>>16],u_pixel_coord_lower:[65535&u,65535&d]}}(a,o,i,r),{u_opacity:e}),va=(e,t)=>{},xa={fillExtrusion:(e,i)=>({u_lightpos:new t.c2(e,i.u_lightpos),u_lightpos_globe:new t.c2(e,i.u_lightpos_globe),u_lightintensity:new t.bq(e,i.u_lightintensity),u_lightcolor:new t.c2(e,i.u_lightcolor),u_vertical_gradient:new t.bq(e,i.u_vertical_gradient),u_opacity:new t.bq(e,i.u_opacity),u_fill_translate:new t.c3(e,i.u_fill_translate)}),fillExtrusionPattern:(e,i)=>({u_lightpos:new t.c2(e,i.u_lightpos),u_lightpos_globe:new t.c2(e,i.u_lightpos_globe),u_lightintensity:new t.bq(e,i.u_lightintensity),u_lightcolor:new t.c2(e,i.u_lightcolor),u_vertical_gradient:new t.bq(e,i.u_vertical_gradient),u_height_factor:new t.bq(e,i.u_height_factor),u_opacity:new t.bq(e,i.u_opacity),u_fill_translate:new t.c3(e,i.u_fill_translate),u_image:new t.b_(e,i.u_image),u_texsize:new t.c3(e,i.u_texsize),u_pixel_coord_upper:new t.c3(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,i.u_pixel_coord_lower),u_scale:new t.c2(e,i.u_scale),u_fade:new t.bq(e,i.u_fade)}),fill:(e,i)=>({u_fill_translate:new t.c3(e,i.u_fill_translate)}),fillPattern:(e,i)=>({u_image:new t.b_(e,i.u_image),u_texsize:new t.c3(e,i.u_texsize),u_pixel_coord_upper:new t.c3(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,i.u_pixel_coord_lower),u_scale:new t.c2(e,i.u_scale),u_fade:new t.bq(e,i.u_fade),u_fill_translate:new t.c3(e,i.u_fill_translate)}),fillOutline:(e,i)=>({u_world:new t.c3(e,i.u_world),u_fill_translate:new t.c3(e,i.u_fill_translate)}),fillOutlinePattern:(e,i)=>({u_world:new t.c3(e,i.u_world),u_image:new t.b_(e,i.u_image),u_texsize:new t.c3(e,i.u_texsize),u_pixel_coord_upper:new t.c3(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,i.u_pixel_coord_lower),u_scale:new t.c2(e,i.u_scale),u_fade:new t.bq(e,i.u_fade),u_fill_translate:new t.c3(e,i.u_fill_translate)}),circle:(e,i)=>({u_camera_to_center_distance:new t.bq(e,i.u_camera_to_center_distance),u_scale_with_map:new t.b_(e,i.u_scale_with_map),u_pitch_with_map:new t.b_(e,i.u_pitch_with_map),u_extrude_scale:new t.c3(e,i.u_extrude_scale),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_globe_extrude_scale:new t.bq(e,i.u_globe_extrude_scale),u_translate:new t.c3(e,i.u_translate)}),collisionBox:(e,i)=>({u_pixel_extrude_scale:new t.c3(e,i.u_pixel_extrude_scale)}),collisionCircle:(e,i)=>({u_viewport_size:new t.c3(e,i.u_viewport_size)}),debug:(e,i)=>({u_color:new t.b$(e,i.u_color),u_overlay:new t.b_(e,i.u_overlay),u_overlay_scale:new t.bq(e,i.u_overlay_scale)}),depth:va,clippingMask:va,heatmap:(e,i)=>({u_extrude_scale:new t.bq(e,i.u_extrude_scale),u_intensity:new t.bq(e,i.u_intensity),u_globe_extrude_scale:new t.bq(e,i.u_globe_extrude_scale)}),heatmapTexture:(e,i)=>({u_matrix:new t.c0(e,i.u_matrix),u_world:new t.c3(e,i.u_world),u_image:new t.b_(e,i.u_image),u_color_ramp:new t.b_(e,i.u_color_ramp),u_opacity:new t.bq(e,i.u_opacity)}),hillshade:(e,i)=>({u_image:new t.b_(e,i.u_image),u_latrange:new t.c3(e,i.u_latrange),u_exaggeration:new t.bq(e,i.u_exaggeration),u_altitudes:new t.c9(e,i.u_altitudes),u_azimuths:new t.c9(e,i.u_azimuths),u_accent:new t.b$(e,i.u_accent),u_method:new t.b_(e,i.u_method),u_shadows:new t.c8(e,i.u_shadows),u_highlights:new t.c8(e,i.u_highlights)}),hillshadePrepare:(e,i)=>({u_matrix:new t.c0(e,i.u_matrix),u_image:new t.b_(e,i.u_image),u_dimension:new t.c3(e,i.u_dimension),u_zoom:new t.bq(e,i.u_zoom),u_unpack:new t.c1(e,i.u_unpack)}),colorRelief:(e,i)=>({u_image:new t.b_(e,i.u_image),u_unpack:new t.c1(e,i.u_unpack),u_dimension:new t.c3(e,i.u_dimension),u_elevation_stops:new t.b_(e,i.u_elevation_stops),u_color_stops:new t.b_(e,i.u_color_stops),u_color_ramp_size:new t.b_(e,i.u_color_ramp_size),u_opacity:new t.bq(e,i.u_opacity)}),line:(e,i)=>({u_translation:new t.c3(e,i.u_translation),u_ratio:new t.bq(e,i.u_ratio),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,i.u_units_to_pixels)}),lineGradient:(e,i)=>({u_translation:new t.c3(e,i.u_translation),u_ratio:new t.bq(e,i.u_ratio),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,i.u_units_to_pixels),u_image:new t.b_(e,i.u_image),u_image_height:new t.bq(e,i.u_image_height)}),linePattern:(e,i)=>({u_translation:new t.c3(e,i.u_translation),u_texsize:new t.c3(e,i.u_texsize),u_ratio:new t.bq(e,i.u_ratio),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_image:new t.b_(e,i.u_image),u_units_to_pixels:new t.c3(e,i.u_units_to_pixels),u_scale:new t.c2(e,i.u_scale),u_fade:new t.bq(e,i.u_fade)}),lineSDF:(e,i)=>({u_translation:new t.c3(e,i.u_translation),u_ratio:new t.bq(e,i.u_ratio),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,i.u_units_to_pixels),u_image:new t.b_(e,i.u_image),u_mix:new t.bq(e,i.u_mix),u_tileratio:new t.bq(e,i.u_tileratio),u_crossfade_from:new t.bq(e,i.u_crossfade_from),u_crossfade_to:new t.bq(e,i.u_crossfade_to),u_lineatlas_width:new t.bq(e,i.u_lineatlas_width),u_lineatlas_height:new t.bq(e,i.u_lineatlas_height)}),lineGradientSDF:(e,i)=>({u_translation:new t.c3(e,i.u_translation),u_ratio:new t.bq(e,i.u_ratio),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,i.u_units_to_pixels),u_image:new t.b_(e,i.u_image),u_image_height:new t.bq(e,i.u_image_height),u_tileratio:new t.bq(e,i.u_tileratio),u_crossfade_from:new t.bq(e,i.u_crossfade_from),u_crossfade_to:new t.bq(e,i.u_crossfade_to),u_image_dash:new t.b_(e,i.u_image_dash),u_mix:new t.bq(e,i.u_mix),u_lineatlas_width:new t.bq(e,i.u_lineatlas_width),u_lineatlas_height:new t.bq(e,i.u_lineatlas_height)}),raster:(e,i)=>({u_tl_parent:new t.c3(e,i.u_tl_parent),u_scale_parent:new t.bq(e,i.u_scale_parent),u_buffer_scale:new t.bq(e,i.u_buffer_scale),u_fade_t:new t.bq(e,i.u_fade_t),u_opacity:new t.bq(e,i.u_opacity),u_image0:new t.b_(e,i.u_image0),u_image1:new t.b_(e,i.u_image1),u_brightness_low:new t.bq(e,i.u_brightness_low),u_brightness_high:new t.bq(e,i.u_brightness_high),u_saturation_factor:new t.bq(e,i.u_saturation_factor),u_contrast_factor:new t.bq(e,i.u_contrast_factor),u_spin_weights:new t.c2(e,i.u_spin_weights),u_coords_top:new t.c1(e,i.u_coords_top),u_coords_bottom:new t.c1(e,i.u_coords_bottom)}),symbolIcon:(e,i)=>({u_is_size_zoom_constant:new t.b_(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,i.u_is_size_feature_constant),u_size_t:new t.bq(e,i.u_size_t),u_size:new t.bq(e,i.u_size),u_camera_to_center_distance:new t.bq(e,i.u_camera_to_center_distance),u_pitch:new t.bq(e,i.u_pitch),u_rotate_symbol:new t.b_(e,i.u_rotate_symbol),u_aspect_ratio:new t.bq(e,i.u_aspect_ratio),u_fade_change:new t.bq(e,i.u_fade_change),u_label_plane_matrix:new t.c0(e,i.u_label_plane_matrix),u_coord_matrix:new t.c0(e,i.u_coord_matrix),u_is_text:new t.b_(e,i.u_is_text),u_pitch_with_map:new t.b_(e,i.u_pitch_with_map),u_is_along_line:new t.b_(e,i.u_is_along_line),u_is_variable_anchor:new t.b_(e,i.u_is_variable_anchor),u_texsize:new t.c3(e,i.u_texsize),u_texture:new t.b_(e,i.u_texture),u_translation:new t.c3(e,i.u_translation),u_pitched_scale:new t.bq(e,i.u_pitched_scale)}),symbolSDF:(e,i)=>({u_is_size_zoom_constant:new t.b_(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,i.u_is_size_feature_constant),u_size_t:new t.bq(e,i.u_size_t),u_size:new t.bq(e,i.u_size),u_camera_to_center_distance:new t.bq(e,i.u_camera_to_center_distance),u_pitch:new t.bq(e,i.u_pitch),u_rotate_symbol:new t.b_(e,i.u_rotate_symbol),u_aspect_ratio:new t.bq(e,i.u_aspect_ratio),u_fade_change:new t.bq(e,i.u_fade_change),u_label_plane_matrix:new t.c0(e,i.u_label_plane_matrix),u_coord_matrix:new t.c0(e,i.u_coord_matrix),u_is_text:new t.b_(e,i.u_is_text),u_pitch_with_map:new t.b_(e,i.u_pitch_with_map),u_is_along_line:new t.b_(e,i.u_is_along_line),u_is_variable_anchor:new t.b_(e,i.u_is_variable_anchor),u_texsize:new t.c3(e,i.u_texsize),u_texture:new t.b_(e,i.u_texture),u_gamma_scale:new t.bq(e,i.u_gamma_scale),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_is_halo:new t.b_(e,i.u_is_halo),u_translation:new t.c3(e,i.u_translation),u_pitched_scale:new t.bq(e,i.u_pitched_scale)}),symbolTextAndIcon:(e,i)=>({u_is_size_zoom_constant:new t.b_(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,i.u_is_size_feature_constant),u_size_t:new t.bq(e,i.u_size_t),u_size:new t.bq(e,i.u_size),u_camera_to_center_distance:new t.bq(e,i.u_camera_to_center_distance),u_pitch:new t.bq(e,i.u_pitch),u_rotate_symbol:new t.b_(e,i.u_rotate_symbol),u_aspect_ratio:new t.bq(e,i.u_aspect_ratio),u_fade_change:new t.bq(e,i.u_fade_change),u_label_plane_matrix:new t.c0(e,i.u_label_plane_matrix),u_coord_matrix:new t.c0(e,i.u_coord_matrix),u_is_text:new t.b_(e,i.u_is_text),u_pitch_with_map:new t.b_(e,i.u_pitch_with_map),u_is_along_line:new t.b_(e,i.u_is_along_line),u_is_variable_anchor:new t.b_(e,i.u_is_variable_anchor),u_texsize:new t.c3(e,i.u_texsize),u_texsize_icon:new t.c3(e,i.u_texsize_icon),u_texture:new t.b_(e,i.u_texture),u_texture_icon:new t.b_(e,i.u_texture_icon),u_gamma_scale:new t.bq(e,i.u_gamma_scale),u_device_pixel_ratio:new t.bq(e,i.u_device_pixel_ratio),u_is_halo:new t.b_(e,i.u_is_halo),u_translation:new t.c3(e,i.u_translation),u_pitched_scale:new t.bq(e,i.u_pitched_scale)}),background:(e,i)=>({u_opacity:new t.bq(e,i.u_opacity),u_color:new t.b$(e,i.u_color)}),backgroundPattern:(e,i)=>({u_opacity:new t.bq(e,i.u_opacity),u_image:new t.b_(e,i.u_image),u_pattern_tl_a:new t.c3(e,i.u_pattern_tl_a),u_pattern_br_a:new t.c3(e,i.u_pattern_br_a),u_pattern_tl_b:new t.c3(e,i.u_pattern_tl_b),u_pattern_br_b:new t.c3(e,i.u_pattern_br_b),u_texsize:new t.c3(e,i.u_texsize),u_mix:new t.bq(e,i.u_mix),u_pattern_size_a:new t.c3(e,i.u_pattern_size_a),u_pattern_size_b:new t.c3(e,i.u_pattern_size_b),u_scale_a:new t.bq(e,i.u_scale_a),u_scale_b:new t.bq(e,i.u_scale_b),u_pixel_coord_upper:new t.c3(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,i.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bq(e,i.u_tile_units_to_pixels)}),terrain:(e,i)=>({u_texture:new t.b_(e,i.u_texture),u_ele_delta:new t.bq(e,i.u_ele_delta),u_fog_matrix:new t.c0(e,i.u_fog_matrix),u_fog_color:new t.b$(e,i.u_fog_color),u_fog_ground_blend:new t.bq(e,i.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bq(e,i.u_fog_ground_blend_opacity),u_horizon_color:new t.b$(e,i.u_horizon_color),u_horizon_fog_blend:new t.bq(e,i.u_horizon_fog_blend),u_is_globe_mode:new t.bq(e,i.u_is_globe_mode)}),terrainDepth:(e,i)=>({u_ele_delta:new t.bq(e,i.u_ele_delta)}),terrainCoords:(e,i)=>({u_texture:new t.b_(e,i.u_texture),u_terrain_coords_id:new t.bq(e,i.u_terrain_coords_id),u_ele_delta:new t.bq(e,i.u_ele_delta)}),projectionErrorMeasurement:(e,i)=>({u_input:new t.bq(e,i.u_input),u_output_expected:new t.bq(e,i.u_output_expected)}),atmosphere:(e,i)=>({u_sun_pos:new t.c2(e,i.u_sun_pos),u_atmosphere_blend:new t.bq(e,i.u_atmosphere_blend),u_globe_position:new t.c2(e,i.u_globe_position),u_globe_radius:new t.bq(e,i.u_globe_radius),u_inv_proj_matrix:new t.c0(e,i.u_inv_proj_matrix)}),sky:(e,i)=>({u_sky_color:new t.b$(e,i.u_sky_color),u_horizon_color:new t.b$(e,i.u_horizon_color),u_horizon:new t.c3(e,i.u_horizon),u_horizon_normal:new t.c3(e,i.u_horizon_normal),u_sky_horizon_blend:new t.bq(e,i.u_sky_horizon_blend),u_sky_blend:new t.bq(e,i.u_sky_blend)})};class ba{constructor(e,t,i){this.context=e;const a=e.gl;this.buffer=a.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer;}bind(){this.context.bindElementBuffer.set(this.buffer);}updateData(e){const t=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer);}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer);}}const ya={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class wa{constructor(e,t,i,a){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=a,this.context=e;const r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer;}bind(){this.context.bindVertexBuffer.set(this.buffer);}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer);}enableAttributes(e,t){for(let i=0;i0&&(h.push({circleArray:f,circleOffset:d,coord:_}),u+=f.length/4,d=u),m&&c.draw(s,l.LINES,ti.disabled,ai.disabled,e.colorModeForRenderPass(),ei.disabled,Xi(e.transform),e.style.map.terrain&&e.style.map.terrain.getTerrainData(_),n.getProjectionData({overscaledTileID:_,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),a.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,null,e.transform.zoom,null,null,m.collisionVertexBuffer);}if(!o||!h.length)return;const _=e.useProgram("collisionCircle"),p=new t.ca;p.resize(4*u),p._trim();let m=0;for(const e of h)for(let t=0;t=0&&(f[g.associatedIconIndex]={shiftedAnchor:E,angle:S});}else rt(g.numGlyphs,p);}if(c){m.clear();const i=e.icon.placedSymbolArray;for(let e=0;ee.style.map.terrain.getElevation(l,t,i):null,i="map"===a.layout.get("text-rotation-alignment");qe(c,e,o,O,j,v,h,i,l.toUnwrapped(),f.width,f.height,Z,t);}const q=o&&P||V,W=x||q?hr:v?O:e.transform.clipSpaceToPixelsMatrix,$=p&&0!==a.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let H;H=p?c.iconsInText?ma(T.kind,S,b,v,x,q,e,W,N,Z,z,k,I):pa(T.kind,S,b,v,x,q,e,W,N,Z,o,z,0,I):_a(T.kind,S,b,v,x,q,e,W,N,Z,o,z,I);const X={program:E,buffers:u,uniformValues:H,projectionData:G,atlasTexture:D,atlasTextureIcon:F,atlasInterpolation:A,atlasInterpolationIcon:L,isSDF:p,hasHalo:$};if(y&&c.canOverlap){w=!0;const e=u.segments.get();for(const i of e)C.push({segments:new t.aX([i]),sortKey:i.sortKey,state:X,terrainData:R});}else C.push({segments:u.segments,sortKey:0,state:X,terrainData:R});}w&&C.sort(((e,t)=>e.sortKey-t.sortKey));for(const t of C){const i=t.state;if(p.activeTexture.set(m.TEXTURE0),i.atlasTexture.bind(i.atlasInterpolation,m.CLAMP_TO_EDGE),i.atlasTextureIcon&&(p.activeTexture.set(m.TEXTURE1),i.atlasTextureIcon&&i.atlasTextureIcon.bind(i.atlasInterpolationIcon,m.CLAMP_TO_EDGE)),i.isSDF){const r=i.uniformValues;i.hasHalo&&(r.u_is_halo=1,fr(i.buffers,t.segments,a,e,i.program,T,u,d,r,i.projectionData,t.terrainData)),r.u_is_halo=0;}fr(i.buffers,t.segments,a,e,i.program,T,u,d,i.uniformValues,i.projectionData,t.terrainData);}}function fr(e,t,i,a,r,o,s,n,l,c,h){const u=a.context;r.draw(u,u.gl.TRIANGLES,o,s,n,ei.backCCW,l,h,c,i.id,e.layoutVertexBuffer,e.indexBuffer,t,i.paint,a.transform.zoom,e.programConfigurations.get(i.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer);}function gr(e,i,a,r,o){const s=e.context,n=s.gl,l=ai.disabled,c=new Qt([n.ONE,n.ONE],t.bp.transparent,[!0,!0,!0,!0]),h=i.getBucket(a);if(!h)return;const u=r.key;let d=a.heatmapFbos.get(u);d||(d=xr(s,i.tileSize,i.tileSize),a.heatmapFbos.set(u,d)),s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,i.tileSize,i.tileSize]),s.clear({color:t.bp.transparent});const _=h.programConfigurations.get(a.id),p=e.useProgram("heatmap",_,!o),m=e.transform.getProjectionData({overscaledTileID:i.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),f=e.style.map.terrain.getTerrainData(r);p.draw(s,n.TRIANGLES,ti.disabled,l,c,ei.disabled,Qi(i,e.transform.zoom,a.paint.get("heatmap-intensity"),1),f,m,a.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,a.paint,e.transform.zoom,_);}function vr(e,t,i,a,r){const o=e.context,s=o.gl,n=e.transform;o.setColorMode(e.colorModeForRenderPass());const l=br(o,t),c=i.key,h=t.heatmapFbos.get(c);if(!h)return;o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,h.colorAttachment.get()),o.activeTexture.set(s.TEXTURE1),l.bind(s.LINEAR,s.CLAMP_TO_EDGE);const u=n.getProjectionData({overscaledTileID:i,applyTerrainMatrix:r,applyGlobeMatrix:!a});e.useProgram("heatmapTexture").draw(o,s.TRIANGLES,ti.disabled,ai.disabled,e.colorModeForRenderPass(),ei.disabled,Ji(e,t,0,1),null,u,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,n.zoom),h.destroy(),t.heatmapFbos.delete(c);}function xr(e,t,i){var a,r;const o=e.gl,s=o.createTexture();o.bindTexture(o.TEXTURE_2D,s),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR);const n=null!==(a=e.HALF_FLOAT)&&void 0!==a?a:o.UNSIGNED_BYTE,l=null!==(r=e.RGBA16F)&&void 0!==r?r:o.RGBA;o.texImage2D(o.TEXTURE_2D,0,l,t,i,0,o.RGBA,n,null);const c=e.createFramebuffer(t,i,!1,!1);return c.colorAttachment.set(s),c}function br(e,i){return i.colorRampTexture||(i.colorRampTexture=new t.T(e,i.colorRamp,e.gl.RGBA)),i.colorRampTexture}function yr(e,i,a,r,o,s,n,l){let c=256;if(o.stepInterpolant){const r=i.getSource().maxzoom,o=n.canonical.z===r?Math.ceil(1<20&&d.texParameterf(d.TEXTURE_2D,u.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,u.extTextureFilterAnisotropicMax);const S=e.style.map.terrain&&e.style.map.terrain.getTerrainData(w),R=p.getProjectionData({overscaledTileID:w,aligned:g,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),z=ua(M,I,E.fadeMix,i,n),D=m.getMeshFromTileID(u,w.canonical,o,s,"raster");_.draw(u,d.TRIANGLES,a,r?r[w.overscaledZ]:ai.disabled,f,l?ei.frontCCW:ei.backCCW,z,S,R,i.id,D.vertexBuffer,D.indexBuffer,D.segments);}}function Ar(e,i,a,r){const o={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(0===a||r)return o;if(e.fadingParentID){const r=i.getLoadedTile(e.fadingParentID);if(!r)return o;const s=Math.pow(2,r.tileID.overscaledZ-e.tileID.overscaledZ),n=[e.tileID.canonical.x*s%1,e.tileID.canonical.y*s%1],l=function(e,i,a){const r=c(),o=(r-i.timeAdded)/a,s=e.fadingDirection===ue.Incoming,n=t.an((r-e.timeAdded)/a,0,1),l=t.an(1-o,0,1),h=s?n:l;return {tileOpacity:h,parentTileOpacity:s?l:n,fadeMix:{opacity:1,mix:1-h}}}(e,r,a);return {parentTile:r,parentScaleBy:s,parentTopLeft:n,fadeValues:l}}if(e.selfFading){const i=function(e,i){const a=(c()-e.timeAdded)/i,r=t.an(a,0,1);return {tileOpacity:r,fadeMix:{opacity:r,mix:0}}}(e,a);return {parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:i}}return o}const Lr=new t.bp(1,0,0,1),kr=new t.bp(0,1,0,1),Fr=new t.bp(0,0,1,1),Br=new t.bp(1,0,1,1),Or=new t.bp(0,1,1,1);function jr(e,t,i,a){Zr(e,0,t+i/2,e.transform.width,i,a);}function Nr(e,t,i,a){Zr(e,t-i/2,0,i,e.transform.height,a);}function Zr(e,t,i,a,r,o){const s=e.context,n=s.gl;n.enable(n.SCISSOR_TEST),n.scissor(t*e.pixelRatio,i*e.pixelRatio,a*e.pixelRatio,r*e.pixelRatio),s.clear({color:o}),n.disable(n.SCISSOR_TEST);}function Gr(e,i,a){const r=e.context,o=r.gl,s=e.useProgram("debug"),n=ti.disabled,l=ai.disabled,c=e.colorModeForRenderPass(),h="$debug",u=e.style.map.terrain&&e.style.map.terrain.getTerrainData(a);r.activeTexture.set(o.TEXTURE0);const d=i.getTileByID(a.key).latestRawTileData,_=Math.floor((d&&d.byteLength||0)/1024),p=i.getTile(a).tileSize,m=512/Math.min(p,512)*(a.overscaledZ/e.transform.zoom)*.5;let f=a.canonical.toString();a.overscaledZ!==a.canonical.z&&(f+=` => ${a.overscaledZ}`),function(e,t){e.initDebugOverlayCanvas();const i=e.debugOverlayCanvas,a=e.context.gl,r=e.debugOverlayCanvas.getContext("2d");r.clearRect(0,0,i.width,i.height),r.shadowColor="white",r.shadowBlur=2,r.lineWidth=1.5,r.strokeStyle="white",r.textBaseline="top",r.font="bold 36px Open Sans, sans-serif",r.fillText(t,5,5),r.strokeText(t,5,5),e.debugOverlayTexture.update(i),e.debugOverlayTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE);}(e,`${f} ${_}kB`);const g=e.transform.getProjectionData({overscaledTileID:a,applyGlobeMatrix:!0,applyTerrainMatrix:!0});s.draw(r,o.TRIANGLES,n,l,Qt.alphaBlended,ei.disabled,Yi(t.bp.transparent,m),null,g,h,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),s.draw(r,o.LINE_STRIP,n,l,c,ei.disabled,Yi(t.bp.red),u,g,h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);}function Ur(e,t,i,a){const{isRenderingGlobe:r}=a,o=e.context,s=o.gl,n=e.transform,l=e.colorModeForRenderPass(),c=e.getDepthModeFor3D(),h=e.useProgram("terrain");o.bindFramebuffer.set(null),o.viewport.set([0,0,e.width,e.height]);for(const a of i){const i=t.getTerrainMesh(a.tileID),u=e.renderToTexture.getTexture(a),d=t.getTerrainData(a.tileID);o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,u.texture);const _=t.getMeshFrameDelta(n.zoom),p=n.calculateFogMatrix(a.tileID.toUnwrapped()),m=Oi(_,p,e.style.sky,n.pitch,r),f=n.getProjectionData({overscaledTileID:a.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});h.draw(o,s.TRIANGLES,c,ai.disabled,l,ei.backCCW,m,d,f,"terrain",i.vertexBuffer,i.indexBuffer,i.segments);}}function Vr(e,i){if(!i.mesh){const a=new t.aW;a.emplaceBack(-1,-1),a.emplaceBack(1,-1),a.emplaceBack(1,1),a.emplaceBack(-1,1);const r=new t.aY;r.emplaceBack(0,1,2),r.emplaceBack(0,2,3),i.mesh=new kt(e.createVertexBuffer(a,Ft.members),e.createIndexBuffer(r),t.aX.simpleSegment(0,0,a.length,r.length));}return i.mesh}class qr{constructor(e,i){this.context=new nr(e),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.ar(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ke.maxOverzooming+ke.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new zt;}resize(e,t,i){if(this.width=Math.floor(e*i),this.height=Math.floor(t*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style._order)this.style._layers[e].resize();}setup(){const e=this.context,i=new t.aW;i.emplaceBack(0,0),i.emplaceBack(t.a5,0),i.emplaceBack(0,t.a5),i.emplaceBack(t.a5,t.a5),this.tileExtentBuffer=e.createVertexBuffer(i,Ft.members),this.tileExtentSegments=t.aX.simpleSegment(0,0,4,2);const a=new t.aW;a.emplaceBack(0,0),a.emplaceBack(t.a5,0),a.emplaceBack(0,t.a5),a.emplaceBack(t.a5,t.a5),this.debugBuffer=e.createVertexBuffer(a,Ft.members),this.debugSegments=t.aX.simpleSegment(0,0,4,5);const r=new t.ch;r.emplaceBack(0,0,0,0),r.emplaceBack(t.a5,0,t.a5,0),r.emplaceBack(0,t.a5,0,t.a5),r.emplaceBack(t.a5,t.a5,t.a5,t.a5),this.rasterBoundsBuffer=e.createVertexBuffer(r,Fi.members),this.rasterBoundsSegments=t.aX.simpleSegment(0,0,4,2);const o=new t.aW;o.emplaceBack(0,0),o.emplaceBack(t.a5,0),o.emplaceBack(0,t.a5),o.emplaceBack(t.a5,t.a5),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(o,Ft.members),this.rasterBoundsSegmentsPosOnly=t.aX.simpleSegment(0,0,4,5);const s=new t.aW;s.emplaceBack(0,0),s.emplaceBack(1,0),s.emplaceBack(0,1),s.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(s,Ft.members),this.viewportSegments=t.aX.simpleSegment(0,0,4,2);const n=new t.ci;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(n);const l=new t.aY;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);const c=this.context.gl;this.stencilClearMode=new ai({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new kt(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments);}clearStencil(){const e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=t.N();t.c7(a,0,this.width,this.height,0,0,1),t.Q(a,a,[i.drawingBufferWidth,i.drawingBufferHeight,0]);const r={mainMatrix:a,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:a};this.useProgram("clippingMask",null,!0).draw(e,i.TRIANGLES,ti.disabled,this.stencilClearMode,Qt.disabled,ei.disabled,null,null,r,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments);}_renderTileClippingMasks(e,t,i){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();const a=this.context;a.setColorMode(Qt.disabled),a.setDepthMode(ti.disabled);const r={};for(const e of t)r[e.key]=this.nextStencilID++;this._renderTileMasks(r,t,i,!0),this._renderTileMasks(r,t,i,!1),this._tileClippingMaskIDs=r;}_renderTileMasks(e,t,i,a){const r=this.context,o=r.gl,s=this.style.projection,n=this.transform,l=this.useProgram("clippingMask");for(const c of t){const t=e[c.key],h=this.style.map.terrain&&this.style.map.terrain.getTerrainData(c),u=s.getMeshFromTileID(this.context,c.canonical,a,!0,"stencil"),d=n.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!i,applyTerrainMatrix:!0});l.draw(r,o.TRIANGLES,ti.disabled,new ai({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),Qt.disabled,i?ei.disabled:ei.backCCW,null,h,d,"$clipping",u.vertexBuffer,u.indexBuffer,u.segments);}}_renderTilesDepthBuffer(){const e=this.context,t=e.gl,i=this.style.projection,a=this.transform,r=this.useProgram("depth"),o=this.getDepthModeFor3D(),s=Ie(a,{tileSize:a.tileSize});for(const n of s){const s=this.style.map.terrain&&this.style.map.terrain.getTerrainData(n),l=i.getMeshFromTileID(this.context,n.canonical,!0,!0,"raster"),c=a.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!0,applyTerrainMatrix:!0});r.draw(e,t.TRIANGLES,o,ai.disabled,Qt.disabled,ei.backCCW,null,s,c,"$clipping",l.vertexBuffer,l.indexBuffer,l.segments);}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,t=this.context.gl;return new ai({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){const t=this.context.gl;return new ai({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const t=this.context.gl,i=e.sort(((e,t)=>t.overscaledZ-e.overscaledZ)),a=i[i.length-1].overscaledZ,r=i[0].overscaledZ-a+1;if(r>1){this.currentStencilSource=void 0,this.nextStencilID+r>256&&this.clearStencil();const e={};for(let i=0;it.overscaledZ-e.overscaledZ)),a=i[i.length-1].overscaledZ,r=i[0].overscaledZ-a+1;if(this.clearStencil(),r>1){const e={},o={};for(let i=0;i0};for(const e in s){const t=s[e];t.used&&t.prepare(this.context),n[e]=t.getVisibleCoordinates(!1),l[e]=n[e].slice().reverse(),h[e]=t.getVisibleCoordinates(!0).reverse();}this.opaquePassCutoff=1/0;for(let e=0;ethis.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?t.bp.black:t.bp.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(e,t){const i=e.context,a=i.gl,r=((e,t,i)=>{const a=Math.cos(t.rollInRadians),r=Math.sin(t.rollInRadians),o=ge(t),s=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return {u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-o*r)*i,(t.height/2+o*a)*i],u_horizon_normal:[-r,a],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*i,u_sky_blend:s}})(t,e.style.map.transform,e.pixelRatio),o=new ti(a.LEQUAL,ti.ReadWrite,[0,1]),s=ai.disabled,n=e.colorModeForRenderPass(),l=e.useProgram("sky"),c=Vr(i,t);l.draw(i,a.TRIANGLES,o,s,n,ei.disabled,r,null,void 0,"sky",c.vertexBuffer,c.indexBuffer,c.segments);}(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=o.length-1;this.currentLayer>=0;this.currentLayer--){const e=this.style._layers[o[this.currentLayer]],t=s[e.source],i=n[e.source];this._renderTileClippingMasks(e,i,!1),this.renderLayer(this,t,e,i,u);}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayer({u_sun_pos:e,u_atmosphere_blend:t,u_globe_position:i,u_globe_radius:a,u_inv_proj_matrix:r}))(c,u,[p[0],p[1],p[2]],d,_),f=Vr(r,i);s.draw(r,o.TRIANGLES,n,ai.disabled,Qt.alphaBlended,ei.disabled,m,null,null,"atmosphere",f.vertexBuffer,f.indexBuffer,f.segments);}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const e=function(e,t){let i=null;const a=Object.values(e._layers).flatMap((i=>i.source&&!i.isHidden(t)?[e.tileManagers[i.source]]:[])),r=a.filter((e=>"vector"===e.getSource().type)),o=a.filter((e=>"vector"!==e.getSource().type)),s=e=>{(!i||i.getSource().maxzooms(e))),i||o.forEach((e=>s(e))),i}(this.style,this.transform.zoom);e&&function(e,t,i){for(let a=0;au.getElevation(o,e,t):null;_r(s,d,_,c,h,f,i,p,g,t.aO(h,e,n,l),o.toUnwrapped(),a);}}}(r,e,a,i,a.layout.get("text-rotation-alignment"),a.layout.get("text-pitch-alignment"),a.paint.get("text-translate"),a.paint.get("text-translate-anchor"),o),0!==a.paint.get("icon-opacity").constantOr(1)&&mr(e,i,a,r,!1,a.paint.get("icon-translate"),a.paint.get("icon-translate-anchor"),a.layout.get("icon-rotation-alignment"),a.layout.get("icon-pitch-alignment"),a.layout.get("icon-keep-upright"),l,c,n),0!==a.paint.get("text-opacity").constantOr(1)&&mr(e,i,a,r,!0,a.paint.get("text-translate"),a.paint.get("text-translate-anchor"),a.layout.get("text-rotation-alignment"),a.layout.get("text-pitch-alignment"),a.layout.get("text-keep-upright"),l,c,n),i.map.showCollisionBoxes&&(cr(e,i,a,r,!0),cr(e,i,a,r,!1));}(e,i,a,r,this.style.placement.variableOffsets,o):t.cn(a)?function(e,i,a,r,o){if("translucent"!==e.renderPass)return;const{isRenderingToTexture:s}=o,n=a.paint.get("circle-opacity"),l=a.paint.get("circle-stroke-width"),c=a.paint.get("circle-stroke-opacity"),h=!a.layout.get("circle-sort-key").isConstant();if(0===n.constantOr(1)&&(0===l.constantOr(1)||0===c.constantOr(1)))return;const u=e.context,d=u.gl,_=e.transform,p=e.getDepthModeForSublayer(0,ti.ReadOnly),m=ai.disabled,f=e.colorModeForRenderPass(),g=[],v=_.getCircleRadiusCorrection();for(let o=0;oe.sortKey-t.sortKey));for(const t of g){const{programConfiguration:i,program:r,layoutVertexBuffer:o,indexBuffer:s,uniformValues:n,terrainData:l,projectionData:c}=t.state;r.draw(u,d.TRIANGLES,p,m,f,ei.backCCW,n,l,c,a.id,o,s,t.segments,a.paint,e.transform.zoom,i);}}(e,i,a,r,o):t.co(a)?function(e,i,a,r,o){if(0===a.paint.get("heatmap-opacity"))return;const s=e.context,{isRenderingToTexture:n,isRenderingGlobe:l}=o;if(e.style.map.terrain){for(const t of r){const r=i.getTile(t);i.hasRenderableParent(t)||("offscreen"===e.renderPass?gr(e,r,a,t,l):"translucent"===e.renderPass&&vr(e,a,t,n,l));}s.viewport.set([0,0,e.width,e.height]);}else "offscreen"===e.renderPass?function(e,i,a,r){const o=e.context,s=o.gl,n=e.transform,l=ai.disabled,c=new Qt([s.ONE,s.ONE],t.bp.transparent,[!0,!0,!0,!0]);((function(e,i,a){const r=e.gl;e.activeTexture.set(r.TEXTURE1),e.viewport.set([0,0,i.width/4,i.height/4]);let o=a.heatmapFbos.get(t.cd);o?(r.bindTexture(r.TEXTURE_2D,o.colorAttachment.get()),e.bindFramebuffer.set(o.framebuffer)):(o=xr(e,i.width/4,i.height/4),a.heatmapFbos.set(t.cd,o));}))(o,e,a),o.clear({color:t.bp.transparent});for(let t=0;t0?t.pop():null}isPatternMissing(e){if(!e)return !1;if(!e.from||!e.to)return !0;const t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return !t||!i}useProgram(e,t,i=!1,a=[]){this.cache=this.cache||{};const r=!!this.style.map.terrain,o=this.style.projection,s=i?At.projectionMercator:o.shaderPreludeCode,n=i?Bt:o.shaderDefine,l=e+(t?t.cacheKey:"")+`/${i?Ot:o.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(r?"/terrain":"")+(a?`/${a.join("/")}`:"");return this.cache[l]||(this.cache[l]=new Zi(this.context,At[e],t,xa[e],this._showOverdrawInspector,r,s,n,a)),this.cache[l]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault();}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD);}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA));}destroy(){var e,t;if(this._tileTextures){for(const e in this._tileTextures){const t=this._tileTextures[e];if(t)for(const e of t)e.destroy();}this._tileTextures={};}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null===(e=this.tileExtentMesh.vertexBuffer)||void 0===e||e.destroy()),this.tileExtentMesh&&(null===(t=this.tileExtentMesh.indexBuffer)||void 0===t||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(const e in this.cache){const t=this.cache[e];t&&t.program&&this.context.gl.deleteProgram(t.program);}this.cache={};}this.context&&this.context.setDefault();}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function Wr(e,t){let i,a=!1,r=null,o=null;const s=()=>{r=null,a&&(e.apply(o,i),r=setTimeout(s,t),a=!1);};return (...e)=>(a=!0,o=this,i=e,r||s(),r)}class $r{constructor(e){this._getCurrentHash=()=>{const e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map((e=>e.split("="))).forEach((e=>{e[0]===this._hashName&&(t=e);})),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{const e=this._getCurrentHash();if(!this._isValidHash(e))return !1;const t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{const e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e);},this._removeHash=()=>{const e=this._getCurrentHash();if(0===e.length)return;const t=e.join("/");let i=t;i.split("&").length>0&&(i=i.split("&")[0]),this._hashName&&(i=`${this._hashName}=${t}`);let a=window.location.hash.replace(i,"");a.startsWith("#&")?a=a.slice(0,1)+a.slice(2):"#"===a&&(a="");let r=window.location.href.replace(/(#.+)?$/,a);r=r.replace("&&","&"),window.history.replaceState(window.history.state,null,r);},this._updateHash=Wr(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e);}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){const t=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,a=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),r=Math.pow(10,a),o=Math.round(t.lng*r)/r,s=Math.round(t.lat*r)/r,n=this._map.getBearing(),l=this._map.getPitch();let c="";if(c+=e?`/${o}/${s}/${i}`:`${i}/${s}/${o}`,(n||l)&&(c+="/"+Math.round(10*n)/10),l&&(c+=`/${Math.round(l)}`),this._hashName){const e=this._hashName;let t=!1;const i=window.location.hash.slice(1).split("&").map((i=>{const a=i.split("=")[0];return a===e?(t=!0,`${a}=${c}`):i})).filter((e=>e));return t||i.push(`${e}=${c}`),`#${i.join("&")}`}return `#${c}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return !1;try{new t.V(+e[2],+e[1]);}catch(e){return !1}const i=+e[0],a=+(e[3]||0),r=+(e[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&a>=-180&&a<=180&&r>=this._map.getMinPitch()&&r<=this._map.getMaxPitch()}}const Hr={linearity:.3,easing:t.cw(0,0,.3,1)},Xr=t.e({deceleration:2500,maxSpeed:1400},Hr),Kr=t.e({deceleration:20,maxSpeed:1400},Hr),Yr=t.e({deceleration:1e3,maxSpeed:360},Hr),Qr=t.e({deceleration:1e3,maxSpeed:90},Hr),Jr=t.e({deceleration:1e3,maxSpeed:360},Hr);class eo{constructor(e){this._map=e,this.clear();}clear(){this._inertiaBuffer=[];}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:c(),settings:e});}_drainInertiaBuffer(){const e=this._inertiaBuffer,t=c();for(;e.length>0&&t-e[0].time>160;)e.shift();}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const i={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)i.zoom+=e.zoomDelta||0,i.bearing+=e.bearingDelta||0,i.pitch+=e.pitchDelta||0,i.roll+=e.rollDelta||0,e.panDelta&&i.pan._add(e.panDelta),e.around&&(i.around=e.around),e.pinchAround&&(i.pinchAround=e.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,r={};if(i.pan.mag()){const o=io(i.pan.mag(),a,t.e({},Xr,e||{})),s=i.pan.mult(o.amount/i.pan.mag()),n=this._map.cameraHelper.handlePanInertia(s,this._map.transform);r.center=n.easingCenter,r.offset=n.easingOffset,to(r,o);}if(i.zoom){const e=io(i.zoom,a,Kr);r.zoom=this._map.transform.zoom+e.amount,to(r,e);}if(i.bearing){const e=io(i.bearing,a,Yr);r.bearing=this._map.transform.bearing+t.an(e.amount,-179,179),to(r,e);}if(i.pitch){const e=io(i.pitch,a,Qr);r.pitch=this._map.transform.pitch+e.amount,to(r,e);}if(i.roll){const e=io(i.roll,a,Jr);r.roll=this._map.transform.roll+t.an(e.amount,-179,179),to(r,e);}if(r.zoom||r.bearing){const e=void 0===i.pinchAround?i.around:i.pinchAround;r.around=e?this._map.unproject(e):this._map.getCenter();}return this.clear(),t.e(r,{noMoveStart:!0})}}function to(e,t){(!e.duration||e.durationi.unproject(e))),n=o.reduce(((e,t,i,a)=>e.add(t.div(a.length))),new t.P(0,0));super(e,{points:o,point:n,lngLats:s,lngLat:i.unproject(n),originalEvent:a}),this._defaultPrevented=!1;}}class oo extends t.l{preventDefault(){this._defaultPrevented=!0;}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,i){super(e,{originalEvent:i}),this._defaultPrevented=!1;}}class so{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance;}reset(){delete this._mousedownPos;}wheel(e){return this._firePreventable(new oo(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new ao(e.type,this._map,e))}mouseup(e){this._map.fire(new ao(e.type,this._map,e));}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new ao(e.type,this._map,e));}dblclick(e){return this._firePreventable(new ao(e.type,this._map,e))}mouseover(e){this._map.fire(new ao(e.type,this._map,e));}mouseout(e){this._map.fire(new ao(e.type,this._map,e));}touchstart(e){return this._firePreventable(new ro(e.type,this._map,e))}touchmove(e){this._map.fire(new ro(e.type,this._map,e));}touchend(e){this._map.fire(new ro(e.type,this._map,e));}touchcancel(e){this._map.fire(new ro(e.type,this._map,e));}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return {}}isEnabled(){return !0}isActive(){return !1}enable(){}disable(){}}class no{constructor(e){this._map=e;}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent;}mousemove(e){this._map.fire(new ao(e.type,this._map,e));}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1;}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ao("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent);}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new ao(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault();}isEnabled(){return !0}isActive(){return !1}enable(){}disable(){}}class lo{constructor(e){this._map=e;}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return {lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class co{constructor(e,t){this._map=e,this._tr=new lo(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1;}isEnabled(){return !!this._enabled}isActive(){return !!this._active}enable(){this.isEnabled()||(this._enabled=!0);}disable(){this.isEnabled()&&(this._enabled=!1);}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(h.disableDrag(),this._startPos=this._lastPos=t,this._active=!0);}mousemoveWindow(e,t){if(!this._active)return;const i=t;if(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)e.fitScreenCoordinates(a,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e);}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e));}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(h.remove(this._box),this._box=null),h.enableDrag(),delete this._startPos,delete this._lastPos;}_fireEvent(e,i){return this._map.fire(new t.l(e,{originalEvent:i}))}}function ho(e,t){if(e.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);const i={};for(let a=0;athis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),a.length===this.numTouches&&(this.centroid=function(e){const i=new t.P(0,0);for(const t of e)i._add(t);return i.div(e.length)}(i),this.touches=ho(a,i)));}touchmove(e,t,i){if(this.aborted||!this.centroid)return;const a=ho(i,t);for(const e in this.touches){const t=a[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0);}}touchend(e,t,i){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===i.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class _o{constructor(e){this.singleTap=new uo(e),this.numTaps=e.numTaps,this.reset();}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset();}touchstart(e,t,i){this.singleTap.touchstart(e,t,i);}touchmove(e,t,i){this.singleTap.touchmove(e,t,i);}touchend(e,t,i){const a=this.singleTap.touchend(e,t,i);if(a){const t=e.timeStamp-this.lastTime<500,i=!this.lastTap||this.lastTap.dist(a)<30;if(t&&i||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=a,this.count===this.numTaps)return this.reset(),a}}}class po{constructor(e){this._tr=new lo(e),this._zoomIn=new _o({numTouches:1,numTaps:2}),this._zoomOut=new _o({numTouches:2,numTaps:1}),this.reset();}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset();}touchstart(e,t,i){this._zoomIn.touchstart(e,t,i),this._zoomOut.touchstart(e,t,i);}touchmove(e,t,i){this._zoomIn.touchmove(e,t,i),this._zoomOut.touchmove(e,t,i);}touchend(e,t,i){const a=this._zoomIn.touchend(e,t,i),r=this._zoomOut.touchend(e,t,i),o=this._tr;return a?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:o.zoom+1,around:o.unproject(a)},{originalEvent:e})}):r?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:o.zoom-1,around:o.unproject(r)},{originalEvent:e})}):void 0}touchcancel(){this.reset();}enable(){this._enabled=!0;}disable(){this._enabled=!1,this.reset();}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset();}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e);}_move(...e){const t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0));}dragMove(e,t){if(!this.isEnabled())return;const i=this._lastPoint;if(!i)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const a=Array.isArray(t)?t[0]:t;return !this._moved&&a.dist(i)!0}),t=new bo){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t;}_executeRelevantHandler(e,t,i){return e instanceof MouseEvent?t(e):"undefined"!=typeof TouchEvent&&e instanceof TouchEvent?i(e):void 0}startMove(e){this._executeRelevantHandler(e,(e=>this.mouseMoveStateManager.startMove(e)),(e=>this.oneFingerTouchMoveStateManager.startMove(e)));}endMove(e){this._executeRelevantHandler(e,(e=>this.mouseMoveStateManager.endMove(e)),(e=>this.oneFingerTouchMoveStateManager.endMove(e)));}isValidStartEvent(e){return this._executeRelevantHandler(e,(e=>this.mouseMoveStateManager.isValidStartEvent(e)),(e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e)))}isValidMoveEvent(e){return this._executeRelevantHandler(e,(e=>this.mouseMoveStateManager.isValidMoveEvent(e)),(e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e)))}isValidEndEvent(e){return this._executeRelevantHandler(e,(e=>this.mouseMoveStateManager.isValidEndEvent(e)),(e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e)))}}const wo=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault();};};class To{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset();}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0);}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,i){return this._calculateTransform(e,t,i)}touchmove(e,t,i){if(this._active){if(!this._shouldBePrevented(i.length))return e.preventDefault(),this._calculateTransform(e,t,i);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);}}touchend(e,t,i){this._calculateTransform(e,t,i),this._active&&this._shouldBePrevented(i.length)&&this.reset();}touchcancel(){this.reset();}_calculateTransform(e,i,a){a.length>0&&(this._active=!0);const r=ho(a,i),o=new t.P(0,0),s=new t.P(0,0);let n=0;for(const e in r){const t=r[e],i=this._touches[e];i&&(o._add(t),s._add(t.sub(i)),n++,r[e]=t);}if(this._touches=r,this._shouldBePrevented(n)||!s.mag())return;const l=s.div(n);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class zo extends Po{constructor(e){super(),this._currentTouchCount=0,this._map=e;}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints;}touchstart(e,t,i){super.touchstart(e,t,i),this._currentTouchCount=i.length;}_start(e){this._lastPoints=e,Ro(e[0].sub(e[1]))&&(this._valid=!1);}_move(e,t,i){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const a=e[0].sub(this._lastPoints[0]),r=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(a,r,i.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(a.y+r.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,i){if(void 0!==this._valid)return this._valid;const a=e.mag()>=2,r=t.mag()>=2;if(!a&&!r)return;if(!a||!r)return void 0===this._firstMove&&(this._firstMove=i),i-this._firstMove<100&&void 0;const o=e.y>0==t.y>0;return Ro(e)&&Ro(t)&&o}}const Do={panStep:100,bearingStep:15,pitchStep:10};class Ao{constructor(e){this._tr=new lo(e);const t=Do;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1;}reset(){this._active=!1;}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,i=0,a=0,r=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?i=-1:(e.preventDefault(),r=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),r=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?a=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,a=0),{cameraAnimation:s=>{const n=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:Lo,zoom:t?Math.round(n.zoom)+t*(e.shiftKey?2:1):n.zoom,bearing:n.bearing+i*this._bearingStep,pitch:n.pitch+a*this._pitchStep,offset:[-r*this._panStep,-o*this._panStep],center:n.center},{originalEvent:e});}}}enable(){this._enabled=!0;}disable(){this._enabled=!1,this.reset();}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0;}enableRotation(){this._rotationDisabled=!1;}}function Lo(e){return e*(2-e)}const ko=4.000244140625,Fo=1/450;class Bo{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e);},this._map=e,this._tr=new lo(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Fo;}setZoomRate(e){this._defaultZoomRate=e;}setWheelZoomRate(e){this._wheelZoomRate=e;}isEnabled(){return !!this._enabled}isActive(){return !!this._active||void 0!==this._finishTimeout}isZooming(){return !!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around);}disable(){this.isEnabled()&&(this._enabled=!1);}_shouldBePrevented(e){return !!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const i=c(),a=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==t&&t%ko==0?this._type="wheel":0!==t&&Math.abs(t)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault();}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const i=h.mousePos(this._map.getCanvas(),e),a=this._tr;this._aroundPoint=this._aroundCenter?a.transform.locationToScreenPoint(t.V.convert(a.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame());}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const e=this._tr.transform;if("number"==typeof this._lastExpectedZoom){const t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t);}if(0!==this._delta){const i="wheel"===this._type&&Math.abs(this._delta)>ko?this._wheelZoomRate:this._defaultZoomRate;let a=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==a&&(a=1/a);const r="number"!=typeof this._targetZoom?e.scale:t.aq(this._targetZoom);this._targetZoom=e.applyConstrain(e.getCameraLngLat(),t.at(r*a)).zoom,"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0;}const i="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,a=this._startZoom,r=this._easing;let o,s=!1;if("wheel"===this._type&&a&&r){const e=c()-this._lastWheelEventTime,n=Math.min((e+5)/200,1),l=r(n);o=t.G.number(a,i,l),n<1?this._frameId||(this._frameId=!0):s=!0;}else o=i,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout;}),200)),this._lastExpectedZoom=o,{noInertia:!0,needsRenderFrame:!s,zoomDelta:o-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let i=t.cy;if(this._prevEase){const e=this._prevEase,a=(c()-e.start)/e.duration,r=e.easing(a+.01)-e.easing(a),o=.27/Math.sqrt(r*r+1e-4)*.01,s=Math.sqrt(.0729-o*o);i=t.cw(o,s,.25,1);}return this._prevEase={start:c(),duration:e,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);}}class Oo{constructor(e,t){this._clickZoom=e,this._tapZoom=t;}enable(){this._clickZoom.enable(),this._tapZoom.enable();}disable(){this._clickZoom.disable(),this._tapZoom.disable();}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class jo{constructor(e){this._tr=new lo(e),this.reset();}reset(){this._active=!1;}dblclick(e,t){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e});}}}enable(){this._enabled=!0;}disable(){this._enabled=!1,this.reset();}isEnabled(){return this._enabled}isActive(){return this._active}}class No{constructor(){this._tap=new _o({numTouches:1,numTaps:1}),this.reset();}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset();}touchstart(e,t,i){if(!this._swipePoint)if(this._tapTime){const a=t[0],r=e.timeStamp-this._tapTime<500,o=this._tapPoint.dist(a)<30;r&&o?i.length>0&&(this._swipePoint=a,this._swipeTouch=i[0].identifier):this.reset();}else this._tap.touchstart(e,t,i);}touchmove(e,t,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;const a=t[0],r=a.y-this._swipePoint.y;return this._swipePoint=a,e.preventDefault(),this._active=!0,{zoomDelta:r/128}}}else this._tap.touchmove(e,t,i);}touchend(e,t,i){if(this._tapTime)this._swipePoint&&0===i.length&&this.reset();else {const a=this._tap.touchend(e,t,i);a&&(this._tapTime=e.timeStamp,this._tapPoint=a);}}touchcancel(){this.reset();}enable(){this._enabled=!0;}disable(){this._enabled=!1,this.reset();}isEnabled(){return this._enabled}isActive(){return this._active}}class Zo{constructor(e,t,i){this._el=e,this._mousePan=t,this._touchPan=i;}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan");}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan");}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Go{constructor(e,t,i,a){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=i,this._mouseRoll=a;}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable();}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable();}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Uo{constructor(e,t,i,a){this._el=e,this._touchZoom=t,this._touchRotate=i,this._tapDragZoom=a,this._rotationDisabled=!1,this._enabled=!0;}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate");}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate");}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable();}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable();}}class Vo{constructor(e,t){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1;}isActive(){return !1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=h.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const i=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),a=document.createElement("div");a.className="maplibregl-desktop-message",a.textContent=t,this._container.appendChild(a);const r=document.createElement("div");r.className="maplibregl-mobile-message",r.textContent=i,this._container.appendChild(r),this._container.setAttribute("aria-hidden","true");}_destroyUI(){this._container&&(h.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container;}enable(){this._setupUI(),this._enabled=!0;}disable(){this._enabled=!1,this._destroyUI();}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,i){this._enabled&&(this._map.fire(new t.l("cooperativegestureprevented",{gestureType:e,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show");}),100));}}const qo=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class Wo extends t.l{}function $o(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class Ho{constructor(e,i){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`);},this.handleEvent=(e,i)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;const a="renderFrame"===e.type?void 0:e,r={needsRenderFrame:!1},o={},s={};for(const{handlerName:n,handler:l,allowed:c}of this._handlers){if(!l.isEnabled())continue;let u;if(this._blockedByActive(s,c,n))l.reset();else if(l[i||e.type]){if(t.cz(e,i||e.type)){const t=h.mousePos(this._map.getCanvas(),e);u=l[i||e.type](e,t);}else if(t.cA(e,i||e.type)){const t=this._getMapTouches(e.touches),a=h.touchPos(this._map.getCanvas(),t);u=l[i||e.type](e,a,t);}else t.cB(i||e.type)||(u=l[i||e.type](e));this.mergeHandlerResult(r,o,u,n,a),u&&u.needsRenderFrame&&this._triggerRenderFrame();}(u||l.isActive())&&(s[n]=l);}const n={};for(const e in this._previousActiveHandlers)s[e]||(n[e]=a);this._previousActiveHandlers=s,(Object.keys(n).length||$o(r))&&(this._changes.push([r,o,n]),this._triggerRenderFrame()),(Object.keys(s).length||$o(r))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:l}=r;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map));},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new eo(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[e,t,i]of this._listeners)h.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,i);}destroy(){for(const[e,t,i]of this._listeners)h.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,i);}_addDefaultHandlers(e){const i=this._map,a=i.getCanvasContainer();this._add("mapEvent",new so(i,e));const r=i.boxZoom=new co(i,e);this._add("boxZoom",r),e.interactive&&e.boxZoom&&r.enable();const o=i.cooperativeGestures=new Vo(i,e.cooperativeGestures);this._add("cooperativeGestures",o),e.cooperativeGestures&&o.enable();const s=new po(i),n=new jo(i);i.doubleClickZoom=new Oo(n,s),this._add("tapZoom",s),this._add("clickZoom",n),e.interactive&&e.doubleClickZoom&&i.doubleClickZoom.enable();const l=new No;this._add("tapDragZoom",l);const c=i.touchPitch=new zo(i);this._add("touchPitch",c),e.interactive&&e.touchPitch&&i.touchPitch.enable(e.touchPitch);const u=()=>i.project(i.getCenter()),d=function({enable:e,clickTolerance:i,aroundCenter:a=!0,minPixelCenterThreshold:r=100,rotateDegreesPerPixelMoved:o=.8},s){const n=new xo({checkCorrectEvent:e=>0===h.mouseButton(e)&&e.ctrlKey||2===h.mouseButton(e)&&!e.ctrlKey});return new mo({clickTolerance:i,move:(e,i)=>{const n=s();if(a&&Math.abs(n.y-e.y)>r)return {bearingDelta:t.cx(new t.P(e.x,i.y),i,n)};let l=(i.x-e.x)*o;return a&&i.y0===h.mouseButton(e)&&e.ctrlKey||2===h.mouseButton(e)});return new mo({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*i}),moveStateManager:a,enable:e,assignEvents:wo})}(e),p=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:i=.3},a){const r=new xo({checkCorrectEvent:e=>2===h.mouseButton(e)&&e.ctrlKey});return new mo({clickTolerance:t,move:(e,t)=>{const r=a();let o=(t.x-e.x)*i;return t.y0===h.mouseButton(e)&&!e.ctrlKey});return new mo({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:i,enable:e,assignEvents:wo})}(e),f=new To(e,i);i.dragPan=new Zo(a,m,f),this._add("mousePan",m),this._add("touchPan",f,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&i.dragPan.enable(e.dragPan);const g=new So,v=new Mo;i.touchZoomRotate=new Uo(a,v,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",v,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&i.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new no(i));const x=i.scrollZoom=new Bo(i,(()=>this._triggerRenderFrame()));this._add("scrollZoom",x,["mousePan"]),e.interactive&&e.scrollZoom&&i.scrollZoom.enable(e.scrollZoom);const b=i.keyboard=new Ao(i);this._add("keyboard",b),e.interactive&&e.keyboard&&i.keyboard.enable();}_add(e,t,i){this._handlers.push({handlerName:e,handler:t,allowed:i}),this._handlersById[e]=t;}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[];}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return !0;return !1}isZooming(){return !!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return !!this._eventsInProgress.rotate}isMoving(){return Boolean(qo(this._eventsInProgress))||this.isZooming()}_blockedByActive(e,t,i){for(const a in e)if(a!==i&&(!t||t.indexOf(a)<0))return !0;return !1}_getMapTouches(e){const t=[];for(const i of e)this._el.contains(i.target)&&t.push(i);return t}mergeHandlerResult(e,i,a,r,o){if(!a)return;t.e(e,a);const s={handlerName:r,originalEvent:a.originalEvent||o};void 0!==a.zoomDelta&&(i.zoom=s),void 0!==a.panDelta&&(i.drag=s),void 0!==a.rollDelta&&(i.roll=s),void 0!==a.pitchDelta&&(i.pitch=s),void 0!==a.bearingDelta&&(i.rotate=s);}_applyChanges(){const e={},i={},a={};for(const[r,o,s]of this._changes)r.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(r.panDelta)),r.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+r.zoomDelta),r.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+r.bearingDelta),r.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+r.pitchDelta),r.rollDelta&&(e.rollDelta=(e.rollDelta||0)+r.rollDelta),void 0!==r.around&&(e.around=r.around),void 0!==r.pinchAround&&(e.pinchAround=r.pinchAround),r.noInertia&&(e.noInertia=r.noInertia),t.e(i,o),t.e(a,s);this._updateMapTransform(e,i,a),this._changes=[];}_updateMapTransform(e,t,i){const a=this._map,r=a._getTransformForUpdate(),o=a.terrain;if(!($o(e)||o&&this._terrainMovement))return this._fireEvents(t,i,!0);a._stop(!0);let{panDelta:s,zoomDelta:n,bearingDelta:l,pitchDelta:c,rollDelta:h,around:u,pinchAround:d}=e;void 0!==d&&(u=d),u=u||a.transform.centerPoint,o&&!r.isPointOnMapSurface(u)&&(u=r.centerPoint);const _={panDelta:s,zoomDelta:n,rollDelta:h,pitchDelta:c,bearingDelta:l,around:u};this._map.cameraHelper.useGlobeControls&&!r.isPointOnMapSurface(u)&&(u=r.centerPoint);const p=u.distSqr(r.centerPoint)<.01?r.center:r.screenPointToLocation(s?u.sub(s):u);this._handleMapControls({terrain:o,tr:r,deltasForHelper:_,preZoomAroundLoc:p,combinedEventsInProgress:t,panDelta:s}),a._applyUpdatedTransform(r),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,i,!0);}_handleMapControls({terrain:e,tr:t,deltasForHelper:i,preZoomAroundLoc:a,combinedEventsInProgress:r,panDelta:o}){const s=this._map.cameraHelper;if(s.handleMapControlsRollPitchBearingZoom(i,t),e)return s.useGlobeControls?(this._terrainMovement||!r.drag&&!r.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void s.handleMapControlsPan(i,t,a)):this._terrainMovement||!r.drag&&!r.zoom?void(r.drag&&this._terrainMovement&&o?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(o))):s.handleMapControlsPan(i,t,a)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void s.handleMapControlsPan(i,t,a));s.handleMapControlsPan(i,t,a);}_fireEvents(e,i,a){const r=qo(this._eventsInProgress),o=qo(e),s={};for(const t in e){const{originalEvent:i}=e[t];this._eventsInProgress[t]||(s[`${t}start`]=i),this._eventsInProgress[t]=e[t];}!r&&o&&this._fireEvent("movestart",o.originalEvent);for(const e in s)this._fireEvent(e,s[e]);o&&this._fireEvent("move",o.originalEvent);for(const t in e){const{originalEvent:i}=e[t];this._fireEvent(t,i);}const l={};let c;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:a}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],c=i[t]||a,l[`${e}end`]=c);}for(const e in l)this._fireEvent(e,l[e]);const h=qo(this._eventsInProgress),u=(r||o)&&!h;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e);}if(a&&u){this._updatingCamera=!0;const e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Wo("renderFrame",{timeStamp:e})),this._applyChanges();}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame());}}class Xo extends t.E{constructor(e,t,i){super(),this._renderFrameCallback=()=>{const e=Math.min((c()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop();},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=i.bearingSnap,this.cameraHelper=t,this.on("moveend",(()=>{delete this._requestedCameraState;}));}migrateProjection(e,t){e.apply(this.transform),this.transform=e,this.cameraHelper=t;}getCenter(){return new t.V(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e;}panBy(e,i,a){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},i),a)}panTo(e,i,a){return this.easeTo(t.e({center:e},i),a)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,i,a){return this.easeTo(t.e({zoom:e},i),a)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,i){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new t.l("movestart",i)).fire(new t.l("move",i)).fire(new t.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,i,a){return this.easeTo(t.e({bearing:e},i),a)}resetNorth(e,i){return this.rotateTo(0,t.e({duration:1e3},e),i),this}resetNorthPitch(e,i){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),i),this}snapToNorth(e,t){return Math.abs(this.getBearing()){f.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(a),this._fireMoveEvents(i);}),(t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i,t);}),e),this}_prepareEase(e,i,a={}){this._moving=!0,i||a.moving||this.fire(new t.l("movestart",e)),this._zooming&&!a.zooming&&this.fire(new t.l("zoomstart",e)),this._rotating&&!a.rotating&&this.fire(new t.l("rotatestart",e)),this._pitching&&!a.pitching&&this.fire(new t.l("pitchstart",e)),this._rolling&&!a.rolling&&this.fire(new t.l("rollstart",e));}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0;}_updateElevation(e){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&i!==this._elevationTarget){const t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(i-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=i;}this.transform.setElevation(t.G.number(this._elevationStart,this._elevationTarget,e));}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain);}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return {};const t=e.getCameraLngLat(),i=e.getCameraAltitude(),a=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(ithis._elevateCameraIfInsideTerrain(e))),this.transformCameraUpdate&&t.push((e=>this.transformCameraUpdate(e))),!t.length)return;const i=e.clone();for(const e of t){const t=i.clone(),{center:a,zoom:r,roll:o,pitch:s,bearing:n,elevation:l}=e(t);a&&t.setCenter(a),void 0!==l&&t.setElevation(l),void 0!==r&&t.setZoom(r),void 0!==o&&t.setRoll(o),void 0!==s&&t.setPitch(s),void 0!==n&&t.setBearing(n),i.apply(t);}this.transform.apply(i);}_fireMoveEvents(e){this.fire(new t.l("move",e)),this._zooming&&this.fire(new t.l("zoom",e)),this._rotating&&this.fire(new t.l("rotate",e)),this._pitching&&this.fire(new t.l("pitch",e)),this._rolling&&this.fire(new t.l("roll",e));}_afterEase(e,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;const a=this._zooming,r=this._rotating,o=this._pitching,s=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,a&&this.fire(new t.l("zoomend",e)),r&&this.fire(new t.l("rotateend",e)),o&&this.fire(new t.l("pitchend",e)),s&&this.fire(new t.l("rollend",e)),this.fire(new t.l("moveend",e));}flyTo(e,i){if(!e.essential&&n.prefersReducedMotion){const a=t.U(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(a,i)}this.stop(),e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cy},e);const a=this._getTransformForUpdate(),r=a.bearing,o=a.pitch,s=a.roll,l=a.padding,c="bearing"in e?this._normalizeBearing(e.bearing,r):r,h="pitch"in e?+e.pitch:o,u="roll"in e?this._normalizeBearing(e.roll,s):s,d="padding"in e?e.padding:a.padding,_=t.P.convert(e.offset);let p=a.centerPoint.add(_);const m=a.screenPointToLocation(p),f=this.cameraHelper.handleFlyTo(a,{bearing:c,pitch:h,roll:u,padding:d,locationAtOffset:m,offsetAsPoint:_,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let g=e.curve;const v=Math.max(a.width,a.height),x=v/f.scaleOfZoom,b=f.pixelPathLength;"number"==typeof f.scaleOfMinZoom&&(g=Math.sqrt(v/f.scaleOfMinZoom/b*2));const y=g*g;function w(e){const t=(x*x-v*v+(e?-1:1)*y*y*b*b)/(2*(e?x:v)*y*b);return Math.log(Math.sqrt(t*t+1)-t)}function T(e){return (Math.exp(e)-Math.exp(-e))/2}function P(e){return (Math.exp(e)+Math.exp(-e))/2}const C=w(!1);let I=function(e){return P(C)/P(C+g*e)},M=function(e){return v*((P(C)*(T(t=C+g*e)/P(t))-T(C))/y)/b;var t;},E=(w(!0)-C)/g;if(Math.abs(b)<2e-6||!isFinite(E)){if(Math.abs(v-x)<1e-6)return this.easeTo(e,i);const t=x0,I=e=>Math.exp(t*g*e);}return e.duration="duration"in e?+e.duration:1e3*E/("screenSpeed"in e?+e.screenSpeed/g:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=r!==c,this._pitching=h!==o,this._rolling=u!==s,this._padding=!a.isPaddingEqual(d),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(f.targetCenter),this._ease((n=>{const m=n*E,g=1/I(m),v=M(m);this._rotating&&a.setBearing(t.G.number(r,c,n)),this._pitching&&a.setPitch(t.G.number(o,h,n)),this._rolling&&a.setRoll(t.G.number(s,u,n)),this._padding&&(a.interpolatePadding(l,d,n),p=a.centerPoint.add(_)),f.easeFunc(n,g,v,p),this.terrain&&!e.freezeElevation&&this._updateElevation(n),this._applyUpdatedTransform(a),this._fireMoveEvents(i);}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i);}),e),this}isEasing(){return !!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var i;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t);}return e||null===(i=this.handlers)||void 0===i||i.stop(!1),this}_ease(e,t,i){!1===i.animate||0===i.duration?(e(1),t()):(this._easeStart=c(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback));}_normalizeBearing(e,i){e=t.W(e,-180,180);const a=Math.abs(e-i);return Math.abs(e-360-i)MapLibre'};class Yo{constructor(e=Ko){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")));},this._updateData=e=>{!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType&&"terrain"!==e.type||this._updateAttributions();},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"));},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show");},this.options=e;}getDefaultPosition(){return "bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=h.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=h.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=h.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){h.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0;}_setElementTitle(e,t){const i=this._map._getUIString(`AttributionControl.${t}`);e.title=i,e.setAttribute("aria-label",i);}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((e=>"string"!=typeof e?"":e))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id;}const t=this._map.style.tileManagers;for(const i in t){const a=t[i];if(a.used||a.usedForTerrain){const t=a.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution);}}e=e.filter((e=>String(e).trim())),e.sort(((e,t)=>e.length-t.length)),e=e.filter(((t,i)=>{for(let a=i+1;a=0)return !1;return !0}));const i=e.join(" | ");i!==this._attribHTML&&(this._attribHTML=i,e.length?(this._innerContainer.innerHTML=h.sanitize(i),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null);}}class Qo{constructor(e={}){this._updateCompact=()=>{const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact");}},this.options=e;}getDefaultPosition(){return "bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=h.create("div","maplibregl-ctrl");const t=h.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){h.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0;}}class Jo{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1;}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,i=t?this._queue.concat(t):this._queue;for(const t of i)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const t=this._currentlyRunning=this._queue;this._queue=[];for(const i of t)if(!i.cancelled&&(i.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1;}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[];}}var es=t.aU([{name:"a_pos3d",type:"Int16",components:3}]);class ts extends t.E{constructor(e){super(),this._lastTilesetChange=c(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize;}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null;}getSource(){return this.tileManager._source}update(e,i){this.tileManager.update(e,i),this._renderableTilesKeys=[];const a={};for(const r of Ie(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.tileManager._source.calculateTileZoom}))a[r.key]=!0,this._renderableTilesKeys.push(r.key),this._tiles[r.key]||(r.terrainRttPosMatrix32f=new Float64Array(16),t.c7(r.terrainRttPosMatrix32f,0,t.a5,t.a5,0,0,1),this._tiles[r.key]=new de(r,this.tileSize),this._lastTilesetChange=c());for(const e in this._tiles)a[e]||delete this._tiles[e];}freeRtt(e){for(const t in this._tiles){const i=this._tiles[t];(!e||i.tileID.equals(e)||i.tileID.isChildOf(e)||e.isChildOf(i.tileID))&&(i.rtt=[]);}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const i={};for(const a of this._renderableTilesKeys){const r=this._tiles[a].tileID,o=e.clone(),s=t.bk();if(r.canonical.equals(e.canonical))t.c7(s,0,t.a5,t.a5,0,0,1);else if(r.canonical.isChildOf(e.canonical)){const i=r.canonical.z-e.canonical.z,a=r.canonical.x-(r.canonical.x>>i<>i<>i;t.c7(s,0,n,n,0,0,1),t.O(s,s,[-a*n,-o*n,0]);}else {if(!e.canonical.isChildOf(r.canonical))continue;{const i=e.canonical.z-r.canonical.z,a=e.canonical.x-(e.canonical.x>>i<>i<>i;t.c7(s,0,t.a5,t.a5,0,0,1),t.O(s,s,[a*n,o*n,0]),t.Q(s,s,[1/2**i,1/2**i,0]);}}o.terrainRttPosMatrix32f=new Float32Array(s),i[a]=o;}return i}_getTerrainCoordsForTileRanges(e,i){const a={};for(const r of this._renderableTilesKeys){const o=this._tiles[r].tileID;if(!this._isWithinTileRanges(o,i))continue;const s=e.clone(),n=t.bk();if(o.canonical.z===e.canonical.z){const i=e.canonical.x-o.canonical.x,a=e.canonical.y-o.canonical.y;t.c7(n,0,t.a5,t.a5,0,0,1),t.O(n,n,[i*t.a5,a*t.a5,0]);}else if(o.canonical.z>e.canonical.z){const i=o.canonical.z-e.canonical.z,a=o.canonical.x-(o.canonical.x>>i<>i<>i),l=e.canonical.y-(o.canonical.y>>i),c=t.a5>>i;t.c7(n,0,c,c,0,0,1),t.O(n,n,[-a*c+s*t.a5,-r*c+l*t.a5,0]);}else {const i=e.canonical.z-o.canonical.z,a=e.canonical.x-(e.canonical.x>>i<>i<>i)-o.canonical.x,l=(e.canonical.y>>i)-o.canonical.y,c=t.a5<i.maxzoom&&(a=i.maxzoom),a=i.minzoom&&!(null==r?void 0:r.dem);)r=this.findTileInCaches(e.scaledTo(a--).key);return r}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e),t)}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){return t[e.canonical.z]&&e.canonical.x>=t[e.canonical.z].minTileX&&e.canonical.x<=t[e.canonical.z].maxTileX&&e.canonical.y>=t[e.canonical.z].minTileY&&e.canonical.y<=t[e.canonical.z].maxTileY}}class is{constructor(e,t,i){this._meshCache={},this.painter=e,this.tileManager=new ts(t),this.options=i,this.exaggeration="number"==typeof i.exaggeration?i.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024;}getDEMElevation(e,i,a,r=t.a5){var o;if(!(i>=0&&i=0&&aa&&(a=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,a)}getElevation(e,i,a,r=t.a5){return this.getDEMElevation(e,i,a,r)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const e=this.painter.context,i=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,i,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ar([]);}const i=this.tileManager.getSourceTile(e,!0);if(i&&i.dem&&(!i.demTexture||i.needsTerrainPrepare)){const e=this.painter.context;i.demTexture=this.painter.getTileTexture(i.dem.stride),i.demTexture?i.demTexture.update(i.dem.getPixels(),{premultiply:!1}):i.demTexture=new t.T(e,i.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),i.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),i.needsTerrainPrepare=!1;}const a=i&&i.toString()+i.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){const a=this.tileManager.getSource().maxzoom;let r=e.canonical.z-i.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=a?r=e.canonical.z-a:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const o=e.canonical.x-(e.canonical.x>>r<>r<>8<<4|e>>8,i[t+3]=0;const a=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),r=new t.T(e,a,e.gl.RGBA,{premultiply:!1});return r.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=r,r}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const i=new Uint8Array(4),a=this.painter.context,r=a.gl,o=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),s=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),n=Math.round(this.painter.height/devicePixelRatio);a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),r.readPixels(o,n-s-1,1,1,r.RGBA,r.UNSIGNED_BYTE,i),a.bindFramebuffer.set(null);const l=i[0]+(i[2]>>4<<8),c=i[1]+((15&i[2])<<8),h=this.coordsIndex[255-i[3]],u=h&&this.tileManager.getTileByID(h);if(!u)return null;const d=this._coordsTextureSize,_=(1<0,r=a&&0===e.canonical.y,o=a&&e.canonical.y===(1<e.id!==t)),this._recentlyUsed.push(e.id);}stampObject(e){e.stamp=++this._stamp;}getOrCreateFreeObject(){for(const e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1;}freeAllObjects(){for(const e of this._objects)this.freeObject(e);}isFull(){return !(this._objects.length!e.inUse))}}const rs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class os{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new as(e.context,30,t.tileManager.tileSize*t.qualityFactor);}destruct(){this.pool.destruct();}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter((i=>!e._layers[i].isHidden(t))),this._coordsAscending={};for(const t in e.tileManagers){this._coordsAscending[t]={};const i=e.tileManagers[t].getVisibleCoordinates(),a=e.tileManagers[t].getSource(),r=a instanceof te?a.terrainTileRanges:null;for(const e of i){const i=this.terrain.tileManager.getTerrainCoords(e,r);for(const e in i)this._coordsAscending[t][e]||(this._coordsAscending[t][e]=[]),this._coordsAscending[t][e].push(i[e]);}}this._coordsAscendingStr={};for(const t of e._order){const i=e._layers[t],a=i.source;if(rs[i.type]&&!this._coordsAscendingStr[a]){this._coordsAscendingStr[a]={};for(const e in this._coordsAscending[a])this._coordsAscendingStr[a][e]=this._coordsAscending[a][e].map((e=>e.key)).sort().join();}}for(const e of this._renderableTiles)for(const t in this._coordsAscendingStr){const i=this._coordsAscendingStr[t][e.tileID.key];i&&i!==e.rttCoords[t]&&(e.rtt=[]);}}renderLayer(e,i){if(e.isHidden(this.painter.transform.zoom))return !1;const a=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),r=e.type,o=this.painter,s=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(rs[r]&&(this._prevType&&rs[this._prevType]||this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!s))return !0;if(rs[this._prevType]||rs[r]&&s){this._prevType=r;const e=this._stacks.length-1,i=this._stacks[e]||[];for(const r of this._renderableTiles){if(this.pool.isFull()&&(Ur(this.painter,this.terrain,this._rttTiles,a),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(r),r.rtt[e]){const t=this.pool.getObjectForId(r.rtt[e].id);if(t.stamp===r.rtt[e].stamp){this.pool.useObject(t);continue}}const s=this.pool.getOrCreateFreeObject();this.pool.useObject(s),this.pool.stampObject(s),r.rtt[e]={id:s.id,stamp:s.stamp},o.context.bindFramebuffer.set(s.fbo.framebuffer),o.context.clear({color:t.bp.transparent,stencil:0}),o.currentStencilSource=void 0;for(let e=0;e{this.startMove(e,h.mousePos(this.element,e)),h.addEventListener(window,"mousemove",this.mousemove),h.addEventListener(window,"mouseup",this.mouseup);},this.mousemove=e=>{this.move(e,h.mousePos(this.element,e));},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp();},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=h.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),h.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.addEventListener(window,"touchend",this.touchend));},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=h.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos));},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp();},this._clickTolerance=10,this.element=i;const r=new yo;this._rotatePitchHandler=new mo({clickTolerance:3,move:(e,r)=>{const o=i.getBoundingClientRect(),s=new t.P((o.bottom-o.top)/2,(o.right-o.left)/2);return {bearingDelta:t.cx(new t.P(e.x,r.y),r,s),pitchDelta:a?-.5*(r.y-e.y):void 0}},moveStateManager:r,enable:!0,assignEvents:()=>{}}),this.map=e,h.addEventListener(i,"mousedown",this.mousedown),h.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),h.addEventListener(i,"touchcancel",this.reset);}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),h.disableDrag();}move(e,t){const i=this.map,{bearingDelta:a,pitchDelta:r}=this._rotatePitchHandler.dragMove(e,t)||{};a&&i.setBearing(i.getBearing()+a),r&&i.setPitch(i.getPitch()+r);}off(){const e=this.element;h.removeEventListener(e,"mousedown",this.mousedown),h.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),h.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.removeEventListener(window,"touchend",this.touchend),h.removeEventListener(e,"touchcancel",this.reset),this.offTemp();}offTemp(){h.enableDrag(),h.removeEventListener(window,"mousemove",this.mousemove),h.removeEventListener(window,"mouseup",this.mouseup),h.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.removeEventListener(window,"touchend",this.touchend);}}let us;function ds(e,i,a,r=!1){if(r||!a.getCoveringTilesDetailsProvider().allowWorldCopies())return null==e?void 0:e.wrap();const o=new t.V(e.lng,e.lat);if(e=new t.V(e.lng,e.lat),i){const r=new t.V(e.lng-360,e.lat),o=new t.V(e.lng+360,e.lat),s=a.locationToScreenPoint(e).distSqr(i);a.locationToScreenPoint(r).distSqr(i)180;){const t=a.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=a.width&&t.y<=a.height)break;e.lng>a.center.lng?e.lng-=360:e.lng+=360;}return e.lng!==o.lng&&a.isPointOnMapSurface(a.locationToScreenPoint(e))?e:o}const _s={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ps(e,t,i){const a=e.classList;for(const e in _s)a.remove(`maplibregl-${i}-anchor-${e}`);a.add(`maplibregl-${i}-anchor-${t}`);}class ms extends t.E{constructor(e){if(super(),this._onKeyPress=e=>{const t=e.code,i=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==i&&13!==i||this.togglePopup();},this._onMapClick=e=>{const t=e.originalEvent.target,i=this._element;this._popup&&(t===i||i.contains(t))&&this.togglePopup();},this._update=e=>{if(!this._map)return;const t=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==e?void 0:e.type)||"render"===(null==e?void 0:e.type)&&!t)&&this._map.once("render",this._update),this._lngLat=ds(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let i="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?i=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let a="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?a="rotateX(0deg)":"map"===this._pitchAlignment&&(a=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),h.setTransform(this._element,`${_s[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${a} ${i}`),n.frameAsync(new AbortController).then((()=>{this._updateOpacity(e&&"moveend"===e.type);})).catch((()=>{}));},this._onMove=e=>{if(!this._isDragging){const t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t;}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.l("dragstart"))),this.fire(new t.l("drag")));},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.l("dragend")),this._state="inactive";},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp));},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(null==e?void 0:e.opacity,null==e?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=t.P.convert(e&&e.offset||[0,0]);else {this._defaultMarker=!0,this._element=h.create("div");const i=h.createNS("http://www.w3.org/2000/svg","svg"),a=41,r=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${a}px`),i.setAttributeNS(null,"width",`${r}px`),i.setAttributeNS(null,"viewBox",`0 0 ${r} ${a}`);const o=h.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");const s=h.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");const n=h.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"transform","translate(3.0, 29.0)"),n.setAttributeNS(null,"fill","#000000");const l=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const e of l){const t=h.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),n.appendChild(t);}const c=h.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);const u=h.createNS("http://www.w3.org/2000/svg","path");u.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),c.appendChild(u);const d=h.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"fill","#000000");const _=h.createNS("http://www.w3.org/2000/svg","path");_.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),d.appendChild(_);const p=h.createNS("http://www.w3.org/2000/svg","g");p.setAttributeNS(null,"transform","translate(6.0, 7.0)"),p.setAttributeNS(null,"fill","#FFFFFF");const m=h.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");const f=h.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#000000"),f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962");const g=h.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#FFFFFF"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962"),m.appendChild(f),m.appendChild(g),s.appendChild(n),s.appendChild(c),s.appendChild(d),s.appendChild(p),s.appendChild(m),i.appendChild(s),i.setAttributeNS(null,"height",a*this._scale+"px"),i.setAttributeNS(null,"width",r*this._scale+"px"),this._element.appendChild(i),this._offset=t.P.convert(e&&e.offset||[0,-14]);}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(e=>{e.preventDefault();})),this._element.addEventListener("mousedown",(e=>{e.preventDefault();})),ps(this._element,this._anchor,"marker"),e&&e.className)for(const t of e.className.split(" "))this._element.classList.add(t);this._popup=null;}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),h.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.V.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,i=13.5,a=Math.abs(i)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[a,-1*(t-i+a)],"bottom-right":[-a,-1*(t-i+a)],left:[i,-1*(t-i)],right:[-i,-1*(t-i)]}:this._offset;}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress);}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var i,a;const r=null===(i=this._map)||void 0===i?void 0:i.terrain,o=this._map.transform.isLocationOccluded(this._lngLat);if(!r||o){const e=o?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e))}if(e)this._opacityTimeout=null;else {if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null;}),100);}const s=this._map,n=s.terrain.depthAtPoint(this._pos),l=s.terrain.getElevationForLngLat(this._lngLat,s.transform);if(s.transform.lngLatToCameraDepth(this._lngLat,l)-n<.006)return void(this._element.style.opacity=this._opacity);const c=-this._offset.y/s.transform.pixelsPerMeter,h=Math.sin(s.getPitch()*Math.PI/180)*c,u=s.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),d=s.transform.lngLatToCameraDepth(this._lngLat,l+h)-u>.006;(null===(a=this._popup)||void 0===a?void 0:a.isOpen())&&d&&this._popup.remove(),this._element.style.opacity=d?this._opacityWhenCovered:this._opacity;}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e);}removeClassName(e){this._element.classList.remove(e);}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return (void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=e),void 0!==t&&(this._opacityWhenCovered=t),this._map&&this._updateOpacity(!0),this}}const fs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let gs=0,vs=!1;const xs={maxWidth:100,unit:"metric"};function bs(e,t,i){const a=i&&i.maxWidth||100,r=e._container.clientHeight/2,o=e._container.clientWidth/2,s=e.unproject([o-a/2,r]),n=e.unproject([o+a/2,r]),l=Math.round(e.project(n).x-e.project(s).x),c=Math.min(a,l,e._container.clientWidth),h=s.distanceTo(n);if(i&&"imperial"===i.unit){const i=3.2808*h;i>5280?ys(t,c,i/5280,e._getUIString("ScaleControl.Miles")):ys(t,c,i,e._getUIString("ScaleControl.Feet"));}else i&&"nautical"===i.unit?ys(t,c,h/1852,e._getUIString("ScaleControl.NauticalMiles")):h>=1e3?ys(t,c,h/1e3,e._getUIString("ScaleControl.Kilometers")):ys(t,c,h,e._getUIString("ScaleControl.Meters"));}function ys(e,t,i,a){const r=function(e){const t=Math.pow(10,`${Math.floor(e)}`.length-1);let i=e/t;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:i>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(i),t*i}(i);e.style.width=t*(r/i)+"px",e.innerHTML=`${r} ${a}`;}const ws={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Ts=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ps(e){if(e){if("number"==typeof e){const i=Math.round(Math.abs(e)/Math.SQRT2);return {center:new t.P(0,0),top:new t.P(0,e),"top-left":new t.P(i,i),"top-right":new t.P(-i,i),bottom:new t.P(0,-e),"bottom-left":new t.P(i,-i),"bottom-right":new t.P(-i,-i),left:new t.P(e,0),right:new t.P(-e,0)}}if(e instanceof t.P||Array.isArray(e)){const i=t.P.convert(e);return {center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return {center:t.P.convert(e.center||[0,0]),top:t.P.convert(e.top||[0,0]),"top-left":t.P.convert(e["top-left"]||[0,0]),"top-right":t.P.convert(e["top-right"]||[0,0]),bottom:t.P.convert(e.bottom||[0,0]),"bottom-left":t.P.convert(e["bottom-left"]||[0,0]),"bottom-right":t.P.convert(e["bottom-right"]||[0,0]),left:t.P.convert(e.left||[0,0]),right:t.P.convert(e.right||[0,0])}}return Ps(new t.P(0,0))}const Cs=i;e.AJAXError=t.cI,e.Event=t.l,e.Evented=t.E,e.LngLat=t.V,e.MercatorCoordinate=t.a9,e.Point=t.P,e.addProtocol=t.cJ,e.config=t.c,e.removeProtocol=t.cK,e.AttributionControl=Yo,e.BoxZoomHandler=co,e.CanvasSource=ae,e.CooperativeGesturesHandler=Vo,e.DoubleClickZoomHandler=Oo,e.DragPanHandler=Zo,e.DragRotateHandler=Go,e.EdgeInsets=Nt,e.FullscreenControl=class extends t.E{constructor(e={}){super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange();},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen();},this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange");}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){h.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange);}_setupUI(){const e=this._fullscreenButton=h.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);h.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange);}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e;}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable());}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen();}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen();}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize();}},e.GeoJSONSource=ee,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case "WAITING_ACTIVE":case "ACTIVE_LOCK":case "ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case "BACKGROUND":case "BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.l("geolocate",e)),this._finish();}},this._updateCamera=e=>{const i=new t.V(e.coords.longitude,e.coords.latitude),a=e.coords.accuracy,r=this._map.getBearing(),o=t.e({bearing:r},this.options.fitBoundsOptions),s=$.fromLngLat(i,a);this._map.fitBounds(s,o,{geolocateSource:!0});},this._updateMarker=e=>{if(e){const i=new t.V(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded();}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove();},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded();},this._onError=e=>{if(this._map){if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch();}else {if(3===e.code&&vs)return;this._setErrorState();}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.l("error",e)),this._finish();}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0;},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=h.create("button","maplibregl-ctrl-geolocate",this._container),h.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0);},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e);}else {const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e);}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=h.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ms({element:this._dotElement}),this._circleElement=h.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ms({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(e=>{const i=(null==e?void 0:e[0])instanceof ResizeObserverEntry;e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||i||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.l("trackuserlocationend")),this.fire(new t.l("userlocationlostfocus")));}));}},this.options=t.e({},fs,e);}onAdd(e){return this._map=e,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,(function*(e=!1){if(void 0!==us&&!e)return us;if(void 0===window.navigator.permissions)return us=!!window.navigator.geolocation,us;try{const e=yield window.navigator.permissions.query({name:"geolocation"});us="denied"!==e.state;}catch(e){us=!!window.navigator.geolocation;}return us}))}().then((e=>this._finishSetupUI(e))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),h.remove(this._container),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,gs=0,vs=!1;}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),i=e.coords;return t&&(i.longitudet.getEast()||i.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case "WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case "ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case "BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case "ACTIVE_ERROR":case "BACKGROUND_ERROR":case "OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){const e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;const t=this._map.project(e),i=this._map.unproject([t.x+100,t.y]),a=e.distanceTo(i)/100,r=2*this._accuracy/a;this._circleElement.style.width=`${r.toFixed(2)}px`,this._circleElement.style.height=`${r.toFixed(2)}px`;}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case "OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.l("trackuserlocationstart"));break;case "WAITING_ACTIVE":case "ACTIVE_LOCK":case "ACTIVE_ERROR":case "BACKGROUND_ERROR":gs--,vs=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.l("trackuserlocationend"));break;case "BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.l("trackuserlocationstart")),this.fire(new t.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case "WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case "ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case "OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),gs++,gs>1?(e={maximumAge:6e5,timeout:0},vs=!0):(e=this.options.positionOptions,vs=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e);}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return !0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null);}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;const t=null===(e=this._map.getProjection())||void 0===e?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon();},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),"globe"===(null===(e=this._map.getProjection())||void 0===e?void 0:e.type)?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"));};}onAdd(e){return this._map=e,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=h.create("button","maplibregl-ctrl-globe",this._container),h.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){h.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0;}},e.Hash=$r,e.ImageSource=te,e.KeyboardHandler=Ao,e.LngLatBounds=$,e.LogoControl=Qo,e.Map=class extends Xo{constructor(e){var i,a;t.cG.mark(t.cH.create);const r=Object.assign(Object.assign(Object.assign({},ls),e),{canvasContextAttributes:Object.assign(Object.assign({},ls.canvasContextAttributes),e.canvasContextAttributes)});if(null!=r.minZoom&&null!=r.maxZoom&&r.minZoom>r.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=r.minPitch&&null!=r.maxPitch&&r.minPitch>r.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=r.minPitch&&r.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=r.maxPitch&&r.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const o=new $t,s=new Yt;if(void 0!==r.minZoom&&o.setMinZoom(r.minZoom),void 0!==r.maxZoom&&o.setMaxZoom(r.maxZoom),void 0!==r.minPitch&&o.setMinPitch(r.minPitch),void 0!==r.maxPitch&&o.setMaxPitch(r.maxPitch),void 0!==r.renderWorldCopies&&o.setRenderWorldCopies(r.renderWorldCopies),null!==r.transformConstrain&&o.setConstrainOverride(r.transformConstrain),super(o,s,{bearingSnap:r.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Jo,this._controls=[],this._mapId=t.af(),this._lostContextStyle={style:null,images:null},this._contextLost=e=>{e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy();for(const e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(const[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this._lostContextStyle=this._getStyleAndImages(),this.style.destroy(),this.style=null,this.fire(new t.l("webglcontextlost",{originalEvent:e}));},this._contextRestored=e=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&(this.style.imageManager.images=this._lostContextStyle.images),this._setupPainter(),this.resize(),this._update(),this.fire(new t.l("webglcontextrestored",{originalEvent:e}));},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update();},this._interactive=r.interactive,this._maxTileCacheSize=r.maxTileCacheSize,this._maxTileCacheZoomLevels=r.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},r.canvasContextAttributes),this._trackResize=!0===r.trackResize,this._bearingSnap=r.bearingSnap,this._centerClampedToGround=r.centerClampedToGround,this._refreshExpiredTiles=!0===r.refreshExpiredTiles,this._fadeDuration=r.fadeDuration,this._crossSourceCollisions=!0===r.crossSourceCollisions,this._collectResourceTiming=!0===r.collectResourceTiming,this._locale=Object.assign(Object.assign({},ss),r.locale),this._clickTolerance=r.clickTolerance,this._overridePixelRatio=r.pixelRatio,this._maxCanvasSize=r.maxCanvasSize,this._zoomLevelsToOverscale=r.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=r.transformCameraUpdate,this.transformConstrain=r.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===r.cancelPendingTileRequestsWhileZooming,void 0!==r.reduceMotion&&(n.prefersReducedMotion=r.reduceMotion),this._imageQueueHandle=g.addThrottleControl((()=>this.isMoving())),this._requestManager=new v(r.transformRequest),"string"==typeof r.container){if(this._container=document.getElementById(r.container),!this._container)throw new Error(`Container '${r.container}' not found.`)}else {if(!(r.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=r.container;}if(r.maxBounds&&this.setMaxBounds(r.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0);})),this.once("idle",(()=>{this._idleTriggered=!0;})),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let e=!1;const t=Wr((e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw());}),50);this._resizeObserver=new ResizeObserver((i=>{e?t(i):e=!0;})),this._resizeObserver.observe(this._container);}this.handlers=new Ho(this,r),this._hash=r.hash&&new $r("string"==typeof r.hash&&r.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:r.center,elevation:r.elevation,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch,roll:r.roll}),r.bounds&&(this.resize(),this.fitBounds(r.bounds,t.e({},r.fitBoundsOptions,{duration:0}))));const l="string"==typeof r.style||!("globe"===(null===(a=null===(i=r.style)||void 0===i?void 0:i.projection)||void 0===a?void 0:a.type));this.resize(null,l),this._localIdeographFontFamily=r.localIdeographFontFamily,this._validateStyle=r.validateStyle,r.style&&this.setStyle(r.style,{localIdeographFontFamily:r.localIdeographFontFamily}),r.attributionControl&&this.addControl(new Yo("boolean"==typeof r.attributionControl?void 0:r.attributionControl)),r.maplibreLogo&&this.addControl(new Qo,r.logoPosition),this.on("style.load",(()=>{if(l||this._resizeTransform(),this.transform.unmodified){const e=t.U(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e);}})),this.on("data",(e=>{this._update("style"===e.dataType),this.fire(new t.l(`${e.dataType}data`,e));})),this.on("dataloading",(e=>{this.fire(new t.l(`${e.dataType}dataloading`,e));})),this.on("dataabort",(e=>{this.fire(new t.l("sourcedataabort",e));}));}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,i){if(void 0===i&&(i=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const a=e.onAdd(this);this._controls.push(e);const r=this._controlPositions[i];return -1!==i.indexOf("bottom")?r.insertBefore(a,r.firstChild):r.appendChild(a),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(e);return i>-1&&this._controls.splice(i,1),e.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}coveringTiles(e){return Ie(this.transform,e)}calculateCameraOptionsFromTo(e,t,i,a){return null==a&&this.terrain&&(a=this.terrain.getElevationForLngLat(i,this.transform)),super.calculateCameraOptionsFromTo(e,t,i,a)}resize(e,i=!0){const[a,r]=this._containerDimensions(),o=this._getClampedPixelRatio(a,r);if(this._resizeCanvas(a,r,o),this.painter.resize(a,r,o),this.painter.overLimit()){const e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];const t=this._getClampedPixelRatio(a,r);this._resizeCanvas(a,r,t),this.painter.resize(a,r,t);}this._resizeTransform(i);const s=!this._moving;return s&&(this.stop(),this.fire(new t.l("movestart",e)).fire(new t.l("move",e))),this.fire(new t.l("resize",e)),s&&this.fire(new t.l("moveend",e)),this}_resizeTransform(e=!0){var t;const[i,a]=this._containerDimensions();this.transform.resize(i,a,e),null===(t=this._requestedCameraState)||void 0===t||t.resize(i,a,e);}_getClampedPixelRatio(e,t){const{0:i,1:a}=this._maxCanvasSize,r=this.getPixelRatio(),o=e*r,s=t*r;return Math.min(o>i?i/o:1,s>a?a/s:1)*r}getPixelRatio(){var e;return null!==(e=this._overridePixelRatio)&&void 0!==e?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize();}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds($.convert(e)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom){const t=this._getTransformForUpdate();return t.setMinZoom(e),this._applyUpdatedTransform(t),this._update(),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom){const t=this._getTransformForUpdate();return t.setMaxZoom(e),this._applyUpdatedTransform(t),this._update(),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.setMinPitch(e),this._update(),this.getPitch()180)throw new Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch)return this.transform.setMaxPitch(e),this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this.transform.setConstrainOverride(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.V.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null===(e=this.handlers)||void 0===e?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null===(e=this.handlers)||void 0===e?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null===(e=this.handlers)||void 0===e?void 0:e.isRotating())}_createDelegatedListener(e,t,i){if("mouseenter"===e||"mouseover"===e){let a=!1;const r=r=>{const o=t.filter((e=>this.getLayer(e))),s=0!==o.length?this.queryRenderedFeatures(r.point,{layers:o}):[];s.length?a||(a=!0,i.call(this,new ao(e,this,r.originalEvent,{features:s}))):a=!1;};return {layers:t,listener:i,delegates:{mousemove:r,mouseout:()=>{a=!1;}}}}if("mouseleave"===e||"mouseout"===e){let a=!1;const r=r=>{const o=t.filter((e=>this.getLayer(e)));(0!==o.length?this.queryRenderedFeatures(r.point,{layers:o}):[]).length?a=!0:a&&(a=!1,i.call(this,new ao(e,this,r.originalEvent)));},o=t=>{a&&(a=!1,i.call(this,new ao(e,this,t.originalEvent)));};return {layers:t,listener:i,delegates:{mousemove:r,mouseout:o}}}{const a=e=>{const a=t.filter((e=>this.getLayer(e))),r=0!==a.length?this.queryRenderedFeatures(e.point,{layers:a}):[];r.length&&(e.features=r,i.call(this,e),delete e.features);};return {layers:t,listener:i,delegates:{[e]:a}}}}_saveDelegatedListener(e,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(t);}_removeDelegatedListener(e,t,i){if(!this._delegatedListeners||!this._delegatedListeners[e])return;const a=this._delegatedListeners[e];for(let e=0;et.includes(e)))){for(const e in r.delegates)this.off(e,r.delegates[e]);return void a.splice(e,1)}}}on(e,t,i){if(void 0===i)return super.on(e,t);const a="string"==typeof t?[t]:t,r=this._createDelegatedListener(e,a,i);this._saveDelegatedListener(e,r);for(const e in r.delegates)this.on(e,r.delegates[e]);return {unsubscribe:()=>{this._removeDelegatedListener(e,a,i);}}}once(e,t,i){if(void 0===i)return super.once(e,t);const a="string"==typeof t?[t]:t,r=this._createDelegatedListener(e,a,i);for(const t in r.delegates){const o=r.delegates[t];r.delegates[t]=(...t)=>{this._removeDelegatedListener(e,a,i),o(...t);};}this._saveDelegatedListener(e,r);for(const e in r.delegates)this.once(e,r.delegates[e]);return this}off(e,t,i){return void 0===i?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,i),this)}queryRenderedFeatures(e,i){if(!this.style)return [];let a;const r=e instanceof t.P||Array.isArray(e),o=r?e:[[0,0],[this.transform.width,this.transform.height]];if(i=i||(r?{}:e)||{},o instanceof t.P||"number"==typeof o[0])a=[t.P.convert(o)];else {const e=t.P.convert(o[0]),i=t.P.convert(o[1]);a=[e,new t.P(i.x,e.y),i,new t.P(e.x,i.y),e];}return this.style.queryRenderedFeatures(a,i,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,i){return !1!==(i=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(e,i))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){const t=this._locale[e];if(null==t)throw new Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var i,a;if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(e,t)));const r=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new ki(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this):(null===(a=null===(i=this.style)||void 0===i?void 0:i.projection)||void 0===a||a.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ki(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty());}_diffStyle(e,i){if("string"==typeof e){const a=this._requestManager.transformRequest(e,"Style");t.j(a,new AbortController).then((e=>{this._updateDiff(e.data,i);})).catch((e=>{e&&this.fire(new t.k(e));}));}else "object"==typeof e&&this._updateDiff(e,i);}_updateDiff(e,i){try{this.style.setState(e,i)&&this._update(!0);}catch(a){t.w(`Unable to perform style diff: ${a.message||a.error||a}. Rebuilding the style from scratch.`),this._updateStyle(e,i);}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){const i=this.style&&this.style.tileManagers[e];if(void 0!==i)return i.loaded();this.fire(new t.k(new Error(`There is no tile manager with ID '${e}'`)));}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){const i=this.style.tileManagers[e.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);null===this.terrain&&i.reload();for(const i in this.style._layers){const a=this.style._layers[i];"hillshade"===a.type&&a.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===a.type&&a.source===e.source&&t.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.");}this.terrain=new is(this.painter,i,e),this.painter.renderToTexture=new os(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=t=>{var i;"style"===t.dataType?this.terrain.tileManager.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),"image"===(null===(i=t.source)||void 0===i?void 0:i.type)?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(t.tile.tileID));},this.style.on("data",this._terrainDataCallback);}else this.terrain&&this.terrain.tileManager.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new t.l("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!==(t=null===(e=this.terrain)||void 0===e?void 0:e.options)&&void 0!==t?t:null}areTilesLoaded(){const e=this.style&&this.style.tileManagers;for(const t of Object.values(e))if(!t.areTilesLoaded())return !1;return !0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,i){if(i){const a=this.getSource(i);if(!a)throw new Error(`There is no source with ID "${i}", cannot set LOD parameters`);a.calculateTileZoom=Te(Math.max(1,e),Math.max(1,t));}else for(const i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=Te(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,i){const a=this.style.tileManagers[e];if(!a)throw new Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===i?a.reload(!0):a.refreshTiles(i.map((e=>new t.ac(e.z,e.x,e.y))));}addImage(e,i,a={}){const{pixelRatio:r=1,sdf:o=!1,stretchX:s,stretchY:l,content:c,textFitWidth:h,textFitHeight:u}=a;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||t.b(i))){if(void 0===i.width||void 0===i.height)return this.fire(new t.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:a,height:n,data:d}=i,_=i;return this.style.addImage(e,{data:new t.R({width:a,height:n},new Uint8Array(d)),pixelRatio:r,stretchX:s,stretchY:l,content:c,textFitWidth:h,textFitHeight:u,sdf:o,version:0,userImage:_}),_.onAdd&&_.onAdd(this,e),this}}{const{width:a,height:d,data:_}=n.getImageData(i);this.style.addImage(e,{data:new t.R({width:a,height:d},_),pixelRatio:r,stretchX:s,stretchY:l,content:c,textFitWidth:h,textFitHeight:u,sdf:o,version:0});}}updateImage(e,i){const a=this.style.getImage(e);if(!a)return this.fire(new t.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const r=i instanceof HTMLImageElement||t.b(i)?n.getImageData(i):i,{width:o,height:s,data:l}=r;if(void 0===o||void 0===s)return this.fire(new t.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==a.data.width||s!==a.data.height)return this.fire(new t.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const c=!(i instanceof HTMLImageElement||t.b(i));return a.data.replace(l,c),this.style.updateImage(e,a),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.k(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e);}loadImage(e){return g.getImage(this._requestManager.transformRequest(e,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,i){return this.style.setLayerZoomRange(e,t,i),this._update(!0)}setFilter(e,t,i={}){return this.style.setFilter(e,t,i),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,i,a={}){return this.style.setPaintProperty(e,t,i,a),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,i,a={}){return this.style.setLayoutProperty(e,t,i,a),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,i,(e=>{e||this._update(!0);})),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,(e=>{e||this._update(!0);})),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){const e=this._container;e.classList.add("maplibregl-map");const t=this._canvasContainer=h.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=h.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const i=this._containerDimensions(),a=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],a);const r=this._controlContainer=h.create("div","maplibregl-control-container",e),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((e=>{o[e]=h.create("div",`maplibregl-ctrl-${e} `,r);})),this._container.addEventListener("scroll",this._onMapScroll,!1);}_resizeCanvas(e,t,i){this._canvas.width=Math.floor(i*e),this._canvas.height=Math.floor(i*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`;}_setupPainter(){const e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let t=null;this._canvas.addEventListener("webglcontextcreationerror",(i=>{t={requestedAttributes:e},i&&(t.statusMessage=i.statusMessage,t.type=i.type);}),{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e),!i){const e="Failed to initialize WebGL";throw t?(t.message=e,new Error(JSON.stringify(t))):new Error(e)}this.painter=new qr(i,this.transform),u.testSupport(i);}migrateProjection(e,i){super.migrateProjection(e,i),this.painter.transform=e,this.fire(new t.l("projectiontransition",{newProjection:this.style.projection.name}));}loaded(){return !this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e);}_render(e){var i,a,r,o,s;const n=this._idleTriggered?this._fadeDuration:0,l=(null===(i=this.style.projection)||void 0===i?void 0:i.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let h=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const e=this.transform.zoom,i=c();this.style.zoomHistory.update(e,i);const a=new t.H(e,{now:i,fadeDuration:n,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),r=a.crossFadingFactor();1===r&&r===this._crossFadingFactor||(h=!0,this._crossFadingFactor=r),this.style.update(a);}const u=(null===(a=this.style.projection)||void 0===a?void 0:a.transitionState)>0!==l;null===(r=this.style.projection)||void 0===r||r.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null===(o=this.style.projection)||void 0===o?void 0:o.transitionState,null===(s=this.style.projection)||void 0===s?void 0:s.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||u)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,n,this._crossSourceCollisions,u),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:n,showPadding:this.showPadding}),this.fire(new t.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.cG.mark(t.cH.load),this.fire(new t.l("load"))),this.style&&(this.style.hasTransitions()||h)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.l("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0,t.cG.mark(t.cH.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e;this._hash&&this._hash.remove();for(const e of this._controls)e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),g.removeThrottleControl(this._imageQueueHandle),null===(e=this._resizeObserver)||void 0===e||e.disconnect();const i=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==i?void 0:i.loseContext)&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),h.remove(this._canvasContainer),h.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),t.cG.clearMetrics(),this._removed=!0,this.fire(new t.l("remove"));}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frame(this._frameRequest,(e=>{t.cG.frame(e),this._frameRequest=null;try{this._render(e);}catch(e){if(!t.Z(e)&&!function(e){return e.message===or}(e))throw e}}),(()=>{})));}get showTileBoundaries(){return !!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update());}get showPadding(){return !!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update());}get showCollisionBoxes(){return !!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update());}get showOverdrawInspector(){return !!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update());}get repaint(){return !!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint());}get vertices(){return !!this._vertices}set vertices(e){this._vertices=e,this._update();}get version(){return ns}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},e.MapMouseEvent=ao,e.MapTouchEvent=ro,e.MapWheelEvent=oo,e.Marker=ms,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{const e=this._map.getZoom(),t=e===this._map.getMaxZoom(),i=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString());},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`;},this._setButtonTitle=(e,t)=>{const i=this._map._getUIString(`NavigationControl.${t}`);e.title=i,e.setAttribute("aria-label",i);},this.options=t.e({},cs,e),this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),h.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),h.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e});})),this._compassIcon=h.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"));}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new hs(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){h.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map;}_createButton(e,t){const i=h.create("button",e,this._container);return i.type="button",i.addEventListener("click",t),i}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"");},this.remove=()=>(this._content&&h.remove(this._content),this._container&&(h.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.l("close"))),this),this._onMouseUp=e=>{this._update(e.point);},this._onMouseMove=e=>{this._update(e.point);},this._onDrag=e=>{this._update(e.point);},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=h.create("div","maplibregl-popup",this._map.getContainer()),this._tip=h.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer");}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=ds(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const t=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let i=this.options.anchor;const a=Ps(this.options.offset);if(!i){const e=this._container.offsetWidth,r=this._container.offsetHeight;let o;o=t.y+a.bottom.ythis._map.transform.height-r?["bottom"]:[],t.xthis._map.transform.width-e/2&&o.push("right"),i=0===o.length?"bottom":o.join("-");}let r=t.add(a[i]);this.options.subpixelPositioning||(r=r.round()),h.setTransform(this._container,`${_s[i]} translate(${r.x}px,${r.y}px)`),ps(this._container,i,"popup"),this._updateOpacity();},this._onClose=()=>{this.remove();},this.options=t.e(Object.create(ws),e);}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.l("open")),this}isOpen(){return !!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.V.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){const t=document.createDocumentFragment(),i=document.createElement("body");let a;for(i.innerHTML=e;a=i.firstChild,a;)t.appendChild(a);return this.setDOMContent(t)}getMaxWidth(){var e;return null===(e=this._container)||void 0===e?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=h.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e;}_createCloseButton(){this.options.closeButton&&(this._closeButton=h.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose));}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(Ts);e&&e.focus();}},e.RasterDEMTileSource=Y,e.RasterTileSource=K,e.ScaleControl=class{constructor(e){this._onMove=()=>{bs(this._map,this._container,this.options);},this.setUnit=e=>{this.options.unit=e,bs(this._map,this._container,this.options);},this.options=Object.assign(Object.assign({},xs),e);}getDefaultPosition(){return "bottom-left"}onAdd(e){return this._map=e,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){h.remove(this._container),this._map.off("move",this._onMove),this._map=void 0;}},e.ScrollZoomHandler=Bo,e.Style=ki,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon();},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"));},this.options=e;}onAdd(e){return this._map=e,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=h.create("button","maplibregl-ctrl-terrain",this._container),h.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){h.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0;}},e.TwoFingersTouchPitchHandler=zo,e.TwoFingersTouchRotateHandler=So,e.TwoFingersTouchZoomHandler=Mo,e.TwoFingersTouchZoomRotateHandler=Uo,e.VectorTileSource=X,e.VideoSource=ie,e.addSourceType=(e,i)=>t._(void 0,void 0,void 0,(function*(){if(oe(e))throw new Error(`A source type called "${e}" already exists.`);((e,t)=>{re[e]=t;})(e,i);})),e.clearPrewarmedResources=function(){const e=B;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(L),B=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"));},e.createTileMesh=li,e.getMaxParallelImageRequests=function(){return t.c.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return ce().getRTLTextPluginStatus()},e.getVersion=function(){return Cs},e.getWorkerCount=function(){return k.workerCount},e.getWorkerUrl=function(){return t.c.WORKER_URL},e.importScriptInWorkers=function(e){return Z().broadcast("IS",e)},e.isTimeFrozen=function(){return l.isFrozen()},e.now=c,e.prewarm=function(){j().acquire(L);},e.restoreNow=function(){l.restoreNow();},e.setMaxParallelImageRequests=function(e){t.c.MAX_PARALLEL_IMAGE_REQUESTS=e;},e.setNow=function(e){l.setNow(e);},e.setRTLTextPlugin=function(e,t){return ce().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){k.workerCount=e;},e.setWorkerUrl=function(e){t.c.WORKER_URL=e;};})); + +// +// Our custom intro provides a specialized "define()" function, called by the +// AMD modules below, that sets up the worker blob URL and then executes the +// main module, storing its exported value as 'maplibregl' + + +var maplibregl$1 = maplibregl; + +return maplibregl$1; + +})); +//# sourceMappingURL=maplibre-gl.js.map diff --git a/proxy/js/maplibre-gl-5.15/maplibre-gl.js.map b/proxy/js/maplibre-gl-5.15/maplibre-gl.js.map new file mode 100644 index 000000000..6751f22c7 --- /dev/null +++ b/proxy/js/maplibre-gl-5.15/maplibre-gl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"maplibre-gl.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@mapbox/point-geometry/index.js","../node_modules/@mapbox/unitbezier/index.js","../src/util/offscreen_canvas_supported.ts","../src/util/offscreen_canvas_distorted.ts","../node_modules/gl-matrix/esm/common.js","../node_modules/gl-matrix/esm/mat3.js","../node_modules/gl-matrix/esm/mat4.js","../node_modules/gl-matrix/esm/vec3.js","../node_modules/gl-matrix/esm/vec4.js","../node_modules/gl-matrix/esm/quat.js","../node_modules/gl-matrix/esm/vec2.js","../src/data/extent.ts","../src/source/pixels_to_tile_units.ts","../src/util/util.ts","../src/util/abort_error.ts","../src/util/config.ts","../src/source/protocol_crud.ts","../src/util/ajax.ts","../src/util/evented.ts","../node_modules/@maplibre/maplibre-gl-style-spec/dist/index.mjs","../src/style/validate_style.ts","../src/util/transferable_grid_index.ts","../src/util/web_worker_transfer.ts","../src/style/zoom_history.ts","../src/util/unicode_properties.g.ts","../src/util/script_detection.ts","../src/source/rtl_text_plugin_worker.ts","../src/style/evaluation_parameters.ts","../src/style/properties.ts","../src/style/style_layer.ts","../src/style/style_layer/raster_style_layer_properties.g.ts","../src/style/style_layer/raster_style_layer.ts","../src/util/struct_array.ts","../src/data/array_types.g.ts","../src/data/bucket/circle_attributes.ts","../src/data/segment.ts","../src/shaders/encode_attribute.ts","../src/data/bucket/pattern_attributes.ts","../src/data/bucket/dash_attributes.ts","../node_modules/murmurhash-js/index.js","../node_modules/murmurhash-js/murmurhash3_gc.js","../node_modules/murmurhash-js/murmurhash2_gc.js","../src/data/feature_position_map.ts","../src/render/uniform_binding.ts","../src/data/program_configuration.ts","../src/data/load_geometry.ts","../src/data/evaluation_feature.ts","../src/data/bucket/circle_bucket.ts","../src/util/intersection_tests.ts","../src/style/query_utils.ts","../src/style/style_layer/circle_style_layer_properties.g.ts","../src/style/style_layer/circle_style_layer.ts","../src/data/bucket/heatmap_bucket.ts","../src/style/style_layer/heatmap_style_layer_properties.g.ts","../src/util/image.ts","../src/util/color_ramp.ts","../src/style/style_layer/heatmap_style_layer.ts","../src/style/style_layer/hillshade_style_layer_properties.g.ts","../src/style/style_layer/hillshade_style_layer.ts","../src/style/style_layer/color_relief_style_layer_properties.g.ts","../src/render/texture.ts","../src/data/dem_data.ts","../src/style/style_layer/color_relief_style_layer.ts","../src/data/bucket/fill_attributes.ts","../src/data/bucket/pattern_bucket_features.ts","../node_modules/earcut/src/earcut.js","../src/render/subdivision_granularity_settings.ts","../src/render/subdivision.ts","../src/render/fill_large_mesh_arrays.ts","../src/data/bucket/fill_bucket.ts","../src/style/style_layer/fill_style_layer_properties.g.ts","../src/style/style_layer/fill_style_layer.ts","../src/data/bucket/fill_extrusion_attributes.ts","../node_modules/@mapbox/vector-tile/index.js","../src/data/bucket/fill_extrusion_bucket.ts","../src/style/style_layer/fill_extrusion_style_layer_properties.g.ts","../src/style/style_layer/fill_extrusion_style_layer.ts","../src/data/bucket/line_attributes.ts","../src/data/bucket/line_attributes_ext.ts","../src/data/bucket/line_bucket.ts","../src/style/style_layer/line_style_layer_properties.g.ts","../src/style/style_layer/line_style_layer.ts","../src/data/bucket/symbol_attributes.ts","../src/symbol/transform_text.ts","../src/symbol/one_em.ts","../src/util/verticalize_punctuation.ts","../src/symbol/tagged_string.ts","../node_modules/pbf/index.js","../src/style/parse_glyph_pbf.ts","../node_modules/potpack/index.js","../src/render/image_atlas.ts","../src/symbol/shaping.ts","../src/symbol/symbol_size.ts","../src/style/style_layer/overlap_mode.ts","../src/data/bucket/symbol_bucket.ts","../src/symbol/merge_lines.ts","../src/style/style_layer/symbol_style_layer_properties.g.ts","../src/style/format_section_override.ts","../src/style/style_layer/symbol_style_layer.ts","../src/util/resolve_tokens.ts","../src/style/style_layer/background_style_layer_properties.g.ts","../src/style/style_layer/background_style_layer.ts","../src/style/style_layer/custom_style_layer.ts","../src/util/throttled_invoker.ts","../src/util/actor.ts","../src/geo/lng_lat.ts","../src/geo/mercator_coordinate.ts","../node_modules/@mapbox/whoots-js/index.mjs","../src/tile/tile_id.ts","../src/util/world_bounds.ts","../src/source/geojson_source_diff.ts","../src/geo/bounds.ts","../src/util/dictionary_coder.ts","../src/util/vectortile_to_geojson.ts","../node_modules/@maplibre/mlt/dist/vector/vector.js","../node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.js","../node_modules/@maplibre/mlt/dist/vector/flat/intFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.js","../node_modules/@maplibre/mlt/dist/vector/sequence/intSequenceVector.js","../node_modules/@maplibre/mlt/dist/vector/constant/intConstVector.js","../node_modules/@maplibre/mlt/dist/vector/featureTable.js","../node_modules/@maplibre/mlt/dist/decoding/intWrapper.js","../node_modules/@maplibre/mlt/dist/metadata/tile/logicalLevelTechnique.js","../node_modules/@maplibre/mlt/dist/metadata/tile/physicalLevelTechnique.js","../node_modules/@maplibre/mlt/dist/metadata/tile/physicalStreamType.js","../node_modules/@maplibre/mlt/dist/metadata/tile/dictionaryType.js","../node_modules/@maplibre/mlt/dist/metadata/tile/offsetType.js","../node_modules/@maplibre/mlt/dist/metadata/tile/lengthType.js","../node_modules/@maplibre/mlt/dist/vector/vectorType.js","../node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.js","../node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.js","../node_modules/@maplibre/mlt/dist/decoding/integerDecodingUtils.js","../node_modules/@maplibre/mlt/dist/metadata/tile/logicalStreamType.js","../node_modules/@maplibre/mlt/dist/metadata/tile/streamMetadataDecoder.js","../node_modules/@maplibre/mlt/dist/vector/flat/bitVector.js","../node_modules/@maplibre/mlt/dist/decoding/integerStreamDecoder.js","../node_modules/@maplibre/mlt/dist/vector/flat/longFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/sequence/longSequenceVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.js","../node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.js","../node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.js","../node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.js","../node_modules/@maplibre/mlt/dist/decoding/geometryDecoder.js","../node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/constant/longConstVector.js","../node_modules/@maplibre/mlt/dist/decoding/decodingUtils.js","../node_modules/@maplibre/mlt/dist/vector/variableSizeVector.js","../node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.js","../node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.js","../node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.js","../node_modules/@maplibre/mlt/dist/decoding/fsstDecoder.js","../node_modules/@maplibre/mlt/dist/decoding/propertyDecoder.js","../node_modules/@maplibre/mlt/dist/metadata/tileset/tilesetMetadata.js","../node_modules/@maplibre/mlt/dist/decoding/stringDecoder.js","../node_modules/@maplibre/mlt/dist/metadata/tileset/typeMap.js","../node_modules/@maplibre/mlt/dist/metadata/tileset/embeddedTilesetMetadataDecoder.js","../node_modules/@maplibre/mlt/dist/mltDecoder.js","../src/source/vector_tile_mlt.ts","../node_modules/@maplibre/vt-pbf/dist/index.es.js","../src/data/feature_index.ts","../src/symbol/clip_line.ts","../src/symbol/anchor.ts","../src/symbol/check_max_angle.ts","../src/symbol/get_anchors.ts","../src/symbol/quads.ts","../src/symbol/collision_feature.ts","../node_modules/tinyqueue/index.js","../src/util/find_pole_of_inaccessibility.ts","../src/style/style_layer/variable_text_anchor.ts","../src/symbol/symbol_layout.ts","../node_modules/kdbush/index.js","../src/util/performance.ts","../src/tile/tile_cache.ts","../src/style/create_style_layer.ts","../src/style/style_layer_index.ts","../src/render/glyph_atlas.ts","../src/source/worker_tile.ts","../src/source/vector_tile_overzoomed.ts","../src/source/vector_tile_worker_source.ts","../src/source/raster_dem_tile_worker_source.ts","../node_modules/@mapbox/geojson-rewind/index.js","../node_modules/supercluster/index.js","../node_modules/geojson-vt/src/simplify.js","../node_modules/geojson-vt/src/feature.js","../node_modules/geojson-vt/src/convert.js","../node_modules/geojson-vt/src/clip.js","../node_modules/geojson-vt/src/wrap.js","../node_modules/geojson-vt/src/transform.js","../node_modules/geojson-vt/src/tile.js","../node_modules/geojson-vt/src/index.js","../src/source/geojson_worker_source.ts","../src/source/worker.ts","../node_modules/gl-matrix/esm/mat2.js","../src/util/browser.ts","../src/util/time_control.ts","../src/util/dom.ts","../src/util/webp_supported.ts","../src/util/image_request.ts","../src/util/request_manager.ts","../src/util/style.ts","../src/style/load_sprite.ts","../src/style/style_image.ts","../src/render/image_manager.ts","../node_modules/@mapbox/tiny-sdf/index.js","../src/render/glyph_manager.ts","../src/style/load_glyph_range.ts","../src/style/light.ts","../src/style/sky.ts","../src/render/line_atlas.ts","../src/util/worker_pool.ts","../src/util/web_worker.ts","../src/util/global_worker_pool.ts","../src/util/dispatcher.ts","../src/source/query_features.ts","../src/source/load_tilejson.ts","../src/geo/lng_lat_bounds.ts","../src/tile/tile_bounds.ts","../src/source/vector_tile_source.ts","../src/source/raster_tile_source.ts","../src/source/raster_dem_tile_source.ts","../src/util/geojson_bounds.ts","../src/source/geojson_source.ts","../src/tile/tile_id_to_lng_lat_bounds.ts","../src/source/image_source.ts","../src/source/video_source.ts","../src/source/canvas_source.ts","../src/source/source.ts","../src/source/rtl_text_plugin_status.ts","../src/source/rtl_text_plugin_main_thread.ts","../src/tile/tile.ts","../src/data/bucket.ts","../src/source/source_state.ts","../src/geo/projection/mercator_utils.ts","../src/geo/projection/covering_tiles.ts","../src/data/extent_bounds.ts","../src/tile/tile_manager_raster.ts","../src/tile/tile_manager_raster_dem.ts","../src/tile/tile_manager_in_view_tiles.ts","../src/tile/tile_manager.ts","../src/symbol/path_interpolator.ts","../src/symbol/grid_index.ts","../src/symbol/projection.ts","../src/symbol/collision_index.ts","../src/symbol/placement.ts","../src/style/pauseable_placement.ts","../src/symbol/cross_tile_symbol_index.ts","../src/shaders/_prelude.fragment.glsl.g.ts","../src/shaders/clipping_mask.fragment.glsl.g.ts","../src/shaders/shaders.ts","../src/shaders/_prelude.vertex.glsl.g.ts","../src/shaders/_projection_mercator.vertex.glsl.g.ts","../src/shaders/_projection_globe.vertex.glsl.g.ts","../src/shaders/background.fragment.glsl.g.ts","../src/shaders/background.vertex.glsl.g.ts","../src/shaders/background_pattern.fragment.glsl.g.ts","../src/shaders/background_pattern.vertex.glsl.g.ts","../src/shaders/circle.fragment.glsl.g.ts","../src/shaders/circle.vertex.glsl.g.ts","../src/shaders/clipping_mask.vertex.glsl.g.ts","../src/shaders/heatmap.fragment.glsl.g.ts","../src/shaders/heatmap.vertex.glsl.g.ts","../src/shaders/heatmap_texture.fragment.glsl.g.ts","../src/shaders/heatmap_texture.vertex.glsl.g.ts","../src/shaders/collision_box.fragment.glsl.g.ts","../src/shaders/collision_box.vertex.glsl.g.ts","../src/shaders/collision_circle.fragment.glsl.g.ts","../src/shaders/collision_circle.vertex.glsl.g.ts","../src/shaders/color_relief.fragment.glsl.g.ts","../src/shaders/color_relief.vertex.glsl.g.ts","../src/shaders/debug.fragment.glsl.g.ts","../src/shaders/debug.vertex.glsl.g.ts","../src/shaders/depth.vertex.glsl.g.ts","../src/shaders/fill.fragment.glsl.g.ts","../src/shaders/fill.vertex.glsl.g.ts","../src/shaders/fill_outline.fragment.glsl.g.ts","../src/shaders/fill_outline.vertex.glsl.g.ts","../src/shaders/fill_outline_pattern.fragment.glsl.g.ts","../src/shaders/fill_outline_pattern.vertex.glsl.g.ts","../src/shaders/fill_pattern.fragment.glsl.g.ts","../src/shaders/fill_pattern.vertex.glsl.g.ts","../src/shaders/fill_extrusion.fragment.glsl.g.ts","../src/shaders/fill_extrusion.vertex.glsl.g.ts","../src/shaders/fill_extrusion_pattern.fragment.glsl.g.ts","../src/shaders/fill_extrusion_pattern.vertex.glsl.g.ts","../src/shaders/hillshade_prepare.fragment.glsl.g.ts","../src/shaders/hillshade_prepare.vertex.glsl.g.ts","../src/shaders/hillshade.fragment.glsl.g.ts","../src/shaders/hillshade.vertex.glsl.g.ts","../src/shaders/line.fragment.glsl.g.ts","../src/shaders/line.vertex.glsl.g.ts","../src/shaders/line_gradient.fragment.glsl.g.ts","../src/shaders/line_gradient.vertex.glsl.g.ts","../src/shaders/line_pattern.fragment.glsl.g.ts","../src/shaders/line_pattern.vertex.glsl.g.ts","../src/shaders/line_sdf.fragment.glsl.g.ts","../src/shaders/line_sdf.vertex.glsl.g.ts","../src/shaders/line_gradient_sdf.fragment.glsl.g.ts","../src/shaders/line_gradient_sdf.vertex.glsl.g.ts","../src/shaders/raster.fragment.glsl.g.ts","../src/shaders/raster.vertex.glsl.g.ts","../src/shaders/symbol_icon.fragment.glsl.g.ts","../src/shaders/symbol_icon.vertex.glsl.g.ts","../src/shaders/symbol_sdf.fragment.glsl.g.ts","../src/shaders/symbol_sdf.vertex.glsl.g.ts","../src/shaders/symbol_text_and_icon.fragment.glsl.g.ts","../src/shaders/symbol_text_and_icon.vertex.glsl.g.ts","../src/shaders/terrain.fragment.glsl.g.ts","../src/shaders/terrain.vertex.glsl.g.ts","../src/shaders/terrain_depth.fragment.glsl.g.ts","../src/shaders/terrain_depth.vertex.glsl.g.ts","../src/shaders/terrain_coords.fragment.glsl.g.ts","../src/shaders/terrain_coords.vertex.glsl.g.ts","../src/shaders/projection_error_measurement.fragment.glsl.g.ts","../src/shaders/projection_error_measurement.vertex.glsl.g.ts","../src/shaders/atmosphere.fragment.glsl.g.ts","../src/shaders/atmosphere.vertex.glsl.g.ts","../src/shaders/sky.fragment.glsl.g.ts","../src/shaders/sky.vertex.glsl.g.ts","../src/render/mesh.ts","../src/data/pos_attributes.ts","../src/geo/projection/mercator_projection.ts","../src/geo/edge_insets.ts","../src/geo/transform_helper.ts","../src/util/primitives/aabb.ts","../src/geo/projection/mercator_covering_tiles_details_provider.ts","../src/util/primitives/frustum.ts","../src/geo/projection/mercator_transform.ts","../src/geo/projection/camera_helper.ts","../src/geo/projection/mercator_camera_helper.ts","../src/gl/color_mode.ts","../src/gl/cull_face_mode.ts","../src/gl/depth_mode.ts","../src/gl/stencil_mode.ts","../src/render/program/projection_error_measurement_program.ts","../src/gl/webgl2.ts","../src/geo/projection/globe_projection_error_measurement.ts","../src/util/create_tile_mesh.ts","../src/geo/projection/vertical_perspective_projection.ts","../src/geo/projection/globe_projection.ts","../src/geo/projection/globe_utils.ts","../src/util/primitives/bounding_volume_cache.ts","../src/util/primitives/convex_volume.ts","../src/geo/projection/globe_covering_tiles_details_provider.ts","../src/geo/projection/vertical_perspective_transform.ts","../src/geo/projection/globe_transform.ts","../src/geo/projection/vertical_perspective_camera_helper.ts","../src/geo/projection/globe_camera_helper.ts","../src/style/style.ts","../src/geo/projection/projection_factory.ts","../src/data/raster_bounds_attributes.ts","../src/render/vertex_array_object.ts","../src/render/program/terrain_program.ts","../src/render/program/projection_program.ts","../src/render/program.ts","../src/render/program/pattern.ts","../src/render/program/fill_extrusion_program.ts","../src/render/program/fill_program.ts","../src/render/program/circle_program.ts","../src/render/program/collision_program.ts","../src/render/program/debug_program.ts","../src/render/program/heatmap_program.ts","../src/render/program/hillshade_program.ts","../src/render/program/color_relief_program.ts","../src/render/program/line_program.ts","../src/render/program/raster_program.ts","../src/render/program/symbol_program.ts","../src/render/program/background_program.ts","../src/render/program/program_uniforms.ts","../src/render/program/atmosphere_program.ts","../src/render/program/sky_program.ts","../src/gl/index_buffer.ts","../src/gl/vertex_buffer.ts","../src/gl/value.ts","../src/util/framebuffer_error.ts","../src/gl/framebuffer.ts","../src/gl/context.ts","../src/render/draw_collision_debug.ts","../src/render/draw_symbol.ts","../src/render/draw_heatmap.ts","../src/render/draw_line.ts","../src/render/update_pattern_positions_in_program.ts","../src/render/draw_fill.ts","../src/render/draw_fill_extrusion.ts","../src/render/draw_hillshade.ts","../src/render/draw_color_relief.ts","../src/render/draw_raster.ts","../src/render/draw_debug.ts","../src/render/draw_terrain.ts","../src/render/draw_sky.ts","../src/render/painter.ts","../src/render/draw_circle.ts","../src/render/draw_background.ts","../src/render/draw_custom.ts","../src/util/throttle.ts","../src/ui/hash.ts","../src/ui/handler_inertia.ts","../src/ui/events.ts","../src/ui/handler/map_event.ts","../src/ui/handler/transform-provider.ts","../src/ui/handler/box_zoom.ts","../src/ui/handler/handler_util.ts","../src/ui/handler/tap_recognizer.ts","../src/ui/handler/tap_zoom.ts","../src/ui/handler/drag_handler.ts","../src/ui/handler/drag_move_state_manager.ts","../src/ui/handler/mouse.ts","../src/ui/handler/touch_pan.ts","../src/ui/handler/two_fingers_touch.ts","../src/ui/handler/keyboard.ts","../src/ui/handler/scroll_zoom.ts","../src/ui/handler/shim/dblclick_zoom.ts","../src/ui/handler/click_zoom.ts","../src/ui/handler/tap_drag_zoom.ts","../src/ui/handler/shim/drag_pan.ts","../src/ui/handler/shim/drag_rotate.ts","../src/ui/handler/shim/two_fingers_touch.ts","../src/ui/handler/cooperative_gestures.ts","../src/ui/handler_manager.ts","../src/ui/camera.ts","../src/ui/control/attribution_control.ts","../src/ui/control/logo_control.ts","../src/util/task_queue.ts","../src/data/pos3d_attributes.ts","../src/tile/terrain_tile_manager.ts","../src/render/terrain.ts","../src/gl/render_pool.ts","../src/render/render_to_texture.ts","../src/ui/default_locale.ts","../src/ui/map.ts","../src/ui/control/navigation_control.ts","../src/util/geolocation_support.ts","../src/util/smart_wrap.ts","../src/ui/anchor.ts","../src/ui/marker.ts","../src/ui/control/geolocate_control.ts","../src/ui/control/scale_control.ts","../src/ui/popup.ts","../src/index.ts","../src/ui/control/fullscreen_control.ts","../src/ui/control/globe_control.ts","../src/ui/control/terrain_control.ts","../build/rollup/maplibregl.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class\n * @param {number} x the x-coordinate. This could be longitude or screen pixels, or any other sort of unit.\n * @param {number} y the y-coordinate. This could be latitude or screen pixels, or any other sort of unit.\n *\n * @example\n * const point = new Point(-77, 38);\n */\nexport default function Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {number} k factor\n * @return {Point} output point\n */\n mult(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {number} k factor\n * @return {Point} output point\n */\n div(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround(a, p) { return this.clone()._rotateAround(a, p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {[number, number, number, number]} m transformation matrix\n * @return {Point} output point\n */\n matMult(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round() { return this.clone()._round(); },\n\n /**\n * Return the magnitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {number} magnitude\n */\n mag() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {number} distance\n */\n dist(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {number} distance\n */\n distSqr(p) {\n const dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {number} angle\n */\n angle() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {number} angle\n */\n angleTo(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {number} angle\n */\n angleWith(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /**\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {number} x the x-coordinate\n * @param {number} y the y-coordinate\n * @return {number} the angle in radians\n */\n angleWithSep(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n /** @param {[number, number, number, number]} m */\n _matMult(m) {\n const x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n /** @param {Point} p */\n _add(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n /** @param {Point} p */\n _sub(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n /** @param {number} k */\n _mult(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n /** @param {number} k */\n _div(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n /** @param {Point} p */\n _multByPoint(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n /** @param {Point} p */\n _divByPoint(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit() {\n this._div(this.mag());\n return this;\n },\n\n _perp() {\n const y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n /** @param {number} angle */\n _rotate(angle) {\n const cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n /**\n * @param {number} angle\n * @param {Point} p\n */\n _rotateAround(angle, p) {\n const cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n },\n\n constructor: Point\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, return it unchanged.\n * @param {Point | [number, number] | {x: number, y: number}} p input value\n * @return {Point} constructed point.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (p) {\n if (p instanceof Point) {\n return /** @type {Point} */ (p);\n }\n if (Array.isArray(p)) {\n return new Point(+p[0], +p[1]);\n }\n if (p.x !== undefined && p.y !== undefined) {\n return new Point(+p.x, +p.y);\n }\n throw new Error('Expected [x, y] or {x, y} point format');\n};\n","'use strict';\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p1y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype = {\n sampleCurveX: function (t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n },\n\n sampleCurveY: function (t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n },\n\n sampleCurveDerivativeX: function (t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n },\n\n solveCurveX: function (x, epsilon) {\n if (epsilon === undefined) epsilon = 1e-6;\n\n if (x < 0.0) return 0.0;\n if (x > 1.0) return 1.0;\n\n var t = x;\n\n // First try a few iterations of Newton's method - normally very fast.\n for (var i = 0; i < 8; i++) {\n var x2 = this.sampleCurveX(t) - x;\n if (Math.abs(x2) < epsilon) return t;\n\n var d2 = this.sampleCurveDerivativeX(t);\n if (Math.abs(d2) < 1e-6) break;\n\n t = t - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n var t0 = 0.0;\n var t1 = 1.0;\n t = x;\n\n for (i = 0; i < 20; i++) {\n x2 = this.sampleCurveX(t);\n if (Math.abs(x2 - x) < epsilon) break;\n\n if (x > x2) {\n t0 = t;\n } else {\n t1 = t;\n }\n\n t = (t1 - t0) * 0.5 + t0;\n }\n\n return t;\n },\n\n solve: function (x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n }\n};\n","let supportsOffscreenCanvas: boolean;\n\nexport function offscreenCanvasSupported(): boolean {\n if (supportsOffscreenCanvas == null) {\n supportsOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' &&\n new OffscreenCanvas(1, 1).getContext('2d') &&\n typeof createImageBitmap === 'function';\n }\n\n return supportsOffscreenCanvas;\n}\n","import {offscreenCanvasSupported} from './offscreen_canvas_supported';\n\nlet offscreenCanvasDistorted: boolean;\n\n/**\n * Some browsers don't return the exact pixels from a canvas to prevent user fingerprinting (see #3185).\n * This function writes pixels to an OffscreenCanvas and reads them back using getImageData, returning false\n * if they don't match.\n *\n * @returns true if the browser supports OffscreenCanvas but it distorts getImageData results, false otherwise.\n */\nexport function isOffscreenCanvasDistorted(): boolean {\n if (offscreenCanvasDistorted == null) {\n offscreenCanvasDistorted = false;\n if (offscreenCanvasSupported()) {\n const size = 5;\n const canvas = new OffscreenCanvas(size, size);\n const context = canvas.getContext('2d', {willReadFrequently: true});\n if (context) {\n // fill each pixel with an RGB value that should make the byte at index i equal to i (except alpha channel):\n // [0, 1, 2, 255, 4, 5, 6, 255, 8, 9, 10, 255, ...]\n for (let i = 0; i < size * size; i++) {\n const base = i * 4;\n context.fillStyle = `rgb(${base},${base + 1},${base + 2})`;\n context.fillRect(i % size, Math.floor(i / size), 1, 1);\n }\n const data = context.getImageData(0, 0, size, size).data;\n for (let i = 0; i < size * size * 4; i++) {\n if (i % 4 !== 3 && data[i] !== i) {\n offscreenCanvasDistorted = true;\n break;\n }\n }\n }\n }\n }\n\n return offscreenCanvasDistorted || false;\n}\n","/**\n * Common utilities\n * @module glMatrix\n */\n\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== \"undefined\" ? Float32Array : Array;\nexport var RANDOM = Math.random;\nexport var ANGLE_ORDER = \"zyx\";\n\n/**\n * Symmetric round\n * see https://www.npmjs.com/package/round-half-up-symmetric#user-content-detailed-background\n *\n * @param {Number} a value to round\n */\nexport function round(a) {\n if (a >= 0) return Math.round(a);\n return a % 0.5 === 0 ? Math.floor(a) : Math.round(a);\n}\n\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\n */\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\nvar radian = 180 / Math.PI;\n\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\nexport function toRadian(a) {\n return a * degree;\n}\n\n/**\n * Convert Radian To Degree\n *\n * @param {Number} a Angle in Radians\n */\nexport function toDegree(a) {\n return a * radian;\n}\n\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @param {Number} tolerance Absolute or relative tolerance (default glMatrix.EPSILON)\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\nexport function equals(a, b) {\n var tolerance = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EPSILON;\n return Math.abs(a - b) <= tolerance * Math.max(1, Math.abs(a), Math.abs(b));\n}","import * as glMatrix from \"./common.js\";\n\n/**\n * 3x3 Matrix\n * @module mat3\n */\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {ReadonlyMat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n\n/**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n return out;\n}\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3 | null} out, or null if source matrix is not invertible\n */\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {ReadonlyMat3} a the source matrix\n * @returns {Number} determinant of a\n */\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to translate\n * @param {ReadonlyVec2} v vector to translate by\n * @returns {mat3} out\n */\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat3} out\n */\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat3} out\n */\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n\n/**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n\n/**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n\n/**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {ReadonlyMat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nexport function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nexport function frob(a) {\n return Math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3] + a[4] * a[4] + a[5] * a[5] + a[6] * a[6] + a[7] * a[7] + a[8] * a[8]);\n}\n\n/**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n\n/**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link mat3.subtract}\n * @function\n */\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n\n/**\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\n * @module mat4\n */\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n\n/**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n return out;\n}\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4 | null} out, or null if source matrix is not invertible\n */\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n out[0] = a11 * b11 - a12 * b10 + a13 * b09;\n out[1] = a02 * b10 - a01 * b11 - a03 * b09;\n out[2] = a31 * b05 - a32 * b04 + a33 * b03;\n out[3] = a22 * b04 - a21 * b05 - a23 * b03;\n out[4] = a12 * b08 - a10 * b11 - a13 * b07;\n out[5] = a00 * b11 - a02 * b08 + a03 * b07;\n out[6] = a32 * b02 - a30 * b05 - a33 * b01;\n out[7] = a20 * b05 - a22 * b02 + a23 * b01;\n out[8] = a10 * b10 - a11 * b08 + a13 * b06;\n out[9] = a01 * b08 - a00 * b10 - a03 * b06;\n out[10] = a30 * b04 - a31 * b02 + a33 * b00;\n out[11] = a21 * b02 - a20 * b04 - a23 * b00;\n out[12] = a11 * b07 - a10 * b09 - a12 * b06;\n out[13] = a00 * b09 - a01 * b07 + a02 * b06;\n out[14] = a31 * b01 - a30 * b03 - a32 * b00;\n out[15] = a20 * b03 - a21 * b01 + a22 * b00;\n return out;\n}\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {ReadonlyMat4} a the source matrix\n * @returns {Number} determinant of a\n */\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b0 = a00 * a11 - a01 * a10;\n var b1 = a00 * a12 - a02 * a10;\n var b2 = a01 * a12 - a02 * a11;\n var b3 = a20 * a31 - a21 * a30;\n var b4 = a20 * a32 - a22 * a30;\n var b5 = a21 * a32 - a22 * a31;\n var b6 = a00 * b5 - a01 * b4 + a02 * b3;\n var b7 = a10 * b5 - a11 * b4 + a12 * b3;\n var b8 = a20 * b2 - a21 * b1 + a22 * b0;\n var b9 = a30 * b2 - a31 * b1 + a32 * b0;\n\n // Calculate the determinant\n return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9;\n}\n\n/**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n\n // Cache only the current line of the second matrix\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {mat4} out\n */\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n}\n\n/**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.sqrt(x * x + y * y + z * z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n\n // Construct the elements of the rotation matrix\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Scaling vector\n * @returns {mat4} out\n */\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.sqrt(x * x + y * y + z * z);\n var s, c, t;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n * let quatMat = mat4.create();\n * mat4.fromQuat(quatMat, quat);\n * mat4.multiply(dest, dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw;\n //Only scale if it makes sense\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n fromRotationTranslation(out, a, translation);\n return out;\n}\n\n/**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n\n/**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion parameter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);\n out[1] = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);\n out[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);\n return out;\n}\n\n/**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n return out;\n}\n\n/**\n * Decomposes a transformation matrix into its rotation, translation\n * and scale components. Returns only the rotation component\n * @param {quat} out_r Quaternion to receive the rotation component\n * @param {vec3} out_t Vector to receive the translation vector\n * @param {vec3} out_s Vector to receive the scaling factor\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @returns {quat} out_r\n */\nexport function decompose(out_r, out_t, out_s, mat) {\n out_t[0] = mat[12];\n out_t[1] = mat[13];\n out_t[2] = mat[14];\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out_s[0] = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);\n out_s[1] = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);\n out_s[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);\n var is1 = 1 / out_s[0];\n var is2 = 1 / out_s[1];\n var is3 = 1 / out_s[2];\n var sm11 = m11 * is1;\n var sm12 = m12 * is2;\n var sm13 = m13 * is3;\n var sm21 = m21 * is1;\n var sm22 = m22 * is2;\n var sm23 = m23 * is3;\n var sm31 = m31 * is1;\n var sm32 = m32 * is2;\n var sm33 = m33 * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out_r[3] = 0.25 * S;\n out_r[0] = (sm23 - sm32) / S;\n out_r[1] = (sm31 - sm13) / S;\n out_r[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out_r[3] = (sm23 - sm32) / S;\n out_r[0] = 0.25 * S;\n out_r[1] = (sm12 + sm21) / S;\n out_r[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out_r[3] = (sm31 - sm13) / S;\n out_r[0] = (sm12 + sm21) / S;\n out_r[1] = 0.25 * S;\n out_r[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out_r[3] = (sm12 - sm21) / S;\n out_r[0] = (sm31 + sm13) / S;\n out_r[1] = (sm23 + sm32) / S;\n out_r[2] = 0.25 * S;\n }\n return out_r;\n}\n\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n * let quatMat = mat4.create();\n * mat4.fromQuat(quatMat, quat);\n * mat4.multiply(dest, dest, quatMat);\n * mat4.scale(dest, dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @returns {mat4} out\n */\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n * mat4.translate(dest, dest, origin);\n * let quatMat = mat4.create();\n * mat4.fromQuat(quatMat, quat);\n * mat4.multiply(dest, dest, quatMat);\n * mat4.scale(dest, dest, scale)\n * mat4.translate(dest, dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n\n/**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n\n/**\n * Generates a perspective projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\nexport function perspectiveNO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n var nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n return out;\n}\n\n/**\n * Alias for {@link mat4.perspectiveNO}\n * @function\n */\nexport var perspective = perspectiveNO;\n\n/**\n * Generates a perspective projection matrix suitable for WebGPU with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\nexport function perspectiveZO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n var nf = 1 / (near - far);\n out[10] = far * nf;\n out[14] = far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -near;\n }\n return out;\n}\n\n/**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function orthoNO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Alias for {@link mat4.orthoNO}\n * @function\n */\nexport var ortho = orthoNO;\n\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function orthoZO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = near * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n\n/**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} target Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {ReadonlyMat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nexport function frob(a) {\n return Math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3] + a[4] * a[4] + a[5] * a[5] + a[6] * a[6] + a[7] * a[7] + a[8] * a[8] + a[9] * a[9] + a[10] * a[10] + a[11] * a[11] + a[12] * a[12] + a[13] * a[13] + a[14] * a[14] + a[15] * a[15]);\n}\n\n/**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n\n/**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link mat4.subtract}\n * @function\n */\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n\n/**\n * 3 Dimensional Vector\n * @module vec3\n */\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {ReadonlyVec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n\n/**\n * Calculates the length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.sqrt(x * x + y * y + z * z);\n}\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the source vector\n * @returns {vec3} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to ceil\n * @returns {vec3} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to floor\n * @returns {vec3} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to round\n * @returns {vec3} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n out[2] = glMatrix.round(a[2]);\n return out;\n}\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.sqrt(x * x + y * y + z * z);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to negate\n * @returns {vec3} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to invert\n * @returns {vec3} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to normalize\n * @returns {vec3} out\n */\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n\n/**\n * Performs a spherical linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function slerp(out, a, b, t) {\n var angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1));\n var sinTotal = Math.sin(angle);\n var ratioA = Math.sin((1 - t) * angle) / sinTotal;\n var ratioB = Math.sin(t * angle) / sinTotal;\n out[0] = ratioA * a[0] + ratioB * b[0];\n out[1] = ratioA * a[1] + ratioB * b[1];\n out[2] = ratioA * a[2] + ratioB * b[2];\n return out;\n}\n\n/**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n\n/**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {vec3} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec3} out\n */\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n\n/**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyQuat} q normalized quaternion to transform with\n * @returns {vec3} out\n */\nexport function transformQuat(out, a, q) {\n // Fast Vector Rotation using Quaternions by Robert Eisele\n // https://raw.org/proof/vector-rotation-using-quaternions/\n\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var vx = a[0],\n vy = a[1],\n vz = a[2];\n\n // t = q x v\n var tx = qy * vz - qz * vy;\n var ty = qz * vx - qx * vz;\n var tz = qx * vy - qy * vx;\n\n // t = 2t\n tx = tx + tx;\n ty = ty + ty;\n tz = tz + tz;\n\n // v + w t + q x t\n out[0] = vx + qw * tx + qy * tz - qz * ty;\n out[1] = vy + qw * ty + qz * tx - qx * tz;\n out[2] = vz + qw * tz + qx * ty - qy * tx;\n return out;\n}\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = [];\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);\n\n //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = [];\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);\n\n //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = [];\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2];\n\n //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n\n/**\n * Get the angle between two 3D vectors\n * @param {ReadonlyVec3} a The first operand\n * @param {ReadonlyVec3} b The second operand\n * @returns {Number} The angle in radians\n */\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag = Math.sqrt((ax * ax + ay * ay + az * az) * (bx * bx + by * by + bz * bz)),\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n\n/**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nexport var sub = subtract;\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nexport var div = divide;\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nexport var dist = distance;\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nexport var sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nexport var len = length;\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nexport var sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 3;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n\n/**\n * 4 Dimensional Vector\n * @module vec4\n */\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {ReadonlyVec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the source vector\n * @returns {vec4} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to ceil\n * @returns {vec4} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to floor\n * @returns {vec4} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to round\n * @returns {vec4} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n out[2] = glMatrix.round(a[2]);\n out[3] = glMatrix.round(a[3]);\n return out;\n}\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.sqrt(x * x + y * y + z * z + w * w);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n\n/**\n * Calculates the length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.sqrt(x * x + y * y + z * z + w * w);\n}\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to negate\n * @returns {vec4} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to invert\n * @returns {vec4} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to normalize\n * @returns {vec4} out\n */\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n\n/**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {ReadonlyVec4} out the receiving vector\n * @param {ReadonlyVec4} u the first vector\n * @param {ReadonlyVec4} v the second vector\n * @param {ReadonlyVec4} w the third vector\n * @returns {vec4} result\n */\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {vec4} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n\n // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n var v1, v2, v3, v4;\n var s1, s2;\n var rand;\n rand = glMatrix.RANDOM();\n v1 = rand * 2 - 1;\n v2 = (4 * glMatrix.RANDOM() - 2) * Math.sqrt(rand * -rand + rand);\n s1 = v1 * v1 + v2 * v2;\n rand = glMatrix.RANDOM();\n v3 = rand * 2 - 1;\n v4 = (4 * glMatrix.RANDOM() - 2) * Math.sqrt(rand * -rand + rand);\n s2 = v3 * v3 + v4 * v4;\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec4} out\n */\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyQuat} q normalized quaternion to transform with\n * @returns {vec4} out\n */\nexport function transformQuat(out, a, q) {\n // Fast Vector Rotation using Quaternions by Robert Eisele\n // https://raw.org/proof/vector-rotation-using-quaternions/\n\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var vx = a[0],\n vy = a[1],\n vz = a[2];\n\n // t = q x v\n var tx = qy * vz - qz * vy;\n var ty = qz * vx - qx * vz;\n var tz = qx * vy - qy * vx;\n\n // t = 2t\n tx = tx + tx;\n ty = ty + ty;\n tz = tz + tz;\n\n // v + w t + q x t\n out[0] = vx + qw * tx + qy * tz - qz * ty;\n out[1] = vy + qw * ty + qz * tx - qx * tz;\n out[2] = vz + qw * tz + qx * ty - qy * tx;\n out[3] = a[3];\n return out;\n}\n\n/**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nexport var sub = subtract;\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nexport var div = divide;\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nexport var dist = distance;\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nexport var sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nexport var len = length;\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nexport var sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 4;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n\n/**\n * Quaternion in the format XYZW\n * @module quat\n */\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n out[3] = 1;\n return out;\n}\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyVec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n\n/**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {ReadonlyQuat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n return rad;\n}\n\n/**\n * Gets the angular distance between two unit quaternions\n *\n * @param {ReadonlyQuat} a Origin unit quaternion\n * @param {ReadonlyQuat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n */\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate W component of\n * @returns {quat} out\n */\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n\n/**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n\n/**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n\n/**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1;\n\n // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n // calculate coefficients\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n\n/**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate inverse of\n * @returns {quat} out\n */\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyMat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n return out;\n}\n\n/**\n * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x Angle to rotate around X axis in degrees.\n * @param {Number} y Angle to rotate around Y axis in degrees.\n * @param {Number} z Angle to rotate around Z axis in degrees.\n * @param {'xyz'|'xzy'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx.\n * @returns {quat} out\n * @function\n */\nexport function fromEuler(out, x, y, z) {\n var order = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : glMatrix.ANGLE_ORDER;\n var halfToRad = Math.PI / 360;\n x *= halfToRad;\n z *= halfToRad;\n y *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n switch (order) {\n case \"xyz\":\n out[0] = sx * cy * cz + cx * sy * sz;\n out[1] = cx * sy * cz - sx * cy * sz;\n out[2] = cx * cy * sz + sx * sy * cz;\n out[3] = cx * cy * cz - sx * sy * sz;\n break;\n case \"xzy\":\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz - sx * cy * sz;\n out[2] = cx * cy * sz + sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n break;\n case \"yxz\":\n out[0] = sx * cy * cz + cx * sy * sz;\n out[1] = cx * sy * cz - sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n break;\n case \"yzx\":\n out[0] = sx * cy * cz + cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz - sx * sy * sz;\n break;\n case \"zxy\":\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz + sx * sy * cz;\n out[3] = cx * cy * cz - sx * sy * sz;\n break;\n case \"zyx\":\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n break;\n default:\n throw new Error('Unknown angle order ' + order);\n }\n return out;\n}\n\n/**\n * Returns a string representation of a quaternion\n *\n * @param {ReadonlyQuat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nexport var clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nexport var fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nexport var copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nexport var set = vec4.set;\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n * @function\n */\nexport var add = vec4.add;\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {ReadonlyQuat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nexport var scale = vec4.scale;\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nexport var dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\nexport var lerp = vec4.lerp;\n\n/**\n * Calculates the length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport var length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nexport var len = length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nexport var squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nexport var sqrLen = squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nexport var normalize = vec4.normalize;\n\n/**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat} a The first quaternion.\n * @param {ReadonlyQuat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport var exactEquals = vec4.exactEquals;\n\n/**\n * Returns whether or not the quaternions point approximately to the same direction.\n *\n * Both quaternions are assumed to be unit length.\n *\n * @param {ReadonlyQuat} a The first unit quaternion.\n * @param {ReadonlyQuat} b The second unit quaternion.\n * @returns {Boolean} True if the quaternions are equal, false otherwise.\n */\nexport function equals(a, b) {\n return Math.abs(vec4.dot(a, b)) >= 1 - glMatrix.EPSILON;\n}\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {ReadonlyVec3} a the initial vector\n * @param {ReadonlyVec3} b the destination vector\n * @returns {quat} out\n */\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {ReadonlyQuat} c the third operand\n * @param {ReadonlyQuat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {ReadonlyVec3} view the vector representing the viewing direction\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","import * as glMatrix from \"./common.js\";\n\n/**\n * 2 Dimensional Vector\n * @module vec2\n */\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {ReadonlyVec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the source vector\n * @returns {vec2} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to ceil\n * @returns {vec2} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to floor\n * @returns {vec2} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to round\n * @returns {vec2} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n return out;\n}\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n\n/**\n * Calculates the length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to negate\n * @returns {vec2} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to invert\n * @returns {vec2} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to normalize\n * @returns {vec2} out\n */\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec3} out\n */\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {vec2} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2} m matrix to transform with\n * @returns {vec2} out\n */\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2d} m matrix to transform with\n * @returns {vec2} out\n */\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat3} m matrix to transform with\n * @returns {vec2} out\n */\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec2} out\n */\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n\n/**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {ReadonlyVec2} a The vec2 point to rotate\n * @param {ReadonlyVec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad);\n\n //perform rotation and translate to correct position\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n\n/**\n * Get the smallest angle between two 2D vectors\n * @param {ReadonlyVec2} a The first operand\n * @param {ReadonlyVec2} b The second operand\n * @returns {Number} The angle in radians\n */\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1];\n return Math.abs(Math.atan2(ay * bx - ax * by, ax * bx + ay * by));\n}\n\n/**\n * Get the signed angle in the interval [-pi,pi] between two 2D vectors (positive if `a` is to the right of `b`)\n * \n * @param {ReadonlyVec2} a The first vector\n * @param {ReadonlyVec2} b The second vector\n * @returns {number} The signed angle in radians\n */\nexport function signedAngle(a, b) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1];\n return Math.atan2(ax * by - ay * bx, ax * bx + ay * by);\n}\n\n/**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nexport var len = length;\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nexport var sub = subtract;\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nexport var div = divide;\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nexport var dist = distance;\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nexport var sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nexport var sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 2;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n return a;\n };\n}();","/**\n * The maximum value of a coordinate in the internal tile coordinate system. Coordinates of\n * all source features normalized to this extent upon load.\n *\n * The value is a consequence of the following:\n *\n * * Vertex buffer store positions as signed 16 bit integers.\n * * One bit is lost for signedness to support tile buffers.\n * * One bit is lost because the line vertex buffer used to pack 1 bit of other data into the int.\n * * One bit is lost to support features extending past the extent on the right edge of the tile.\n * * This leaves us with 2^13 = 8192\n */\nexport const EXTENT = 8192;","import {EXTENT} from '../data/extent';\n\nimport type {OverscaledTileID} from '../tile/tile_id';\n\n/**\n * Converts a pixel value at a the given zoom level to tile units.\n *\n * The shaders mostly calculate everything in tile units so style\n * properties need to be converted from pixels to tile units using this.\n *\n * For example, a translation by 30 pixels at zoom 6.5 will be a\n * translation by pixelsToTileUnits(30, 6.5) tile units.\n *\n * @returns value in tile units\n */\nexport function pixelsToTileUnits(\n tile: {\n tileID: OverscaledTileID;\n tileSize: number;\n },\n pixelValue: number,\n z: number\n): number {\n return pixelValue * (EXTENT / (tile.tileSize * Math.pow(2, z - tile.tileID.overscaledZ)));\n}\n","import Point from '@mapbox/point-geometry';\nimport UnitBezier from '@mapbox/unitbezier';\nimport {isOffscreenCanvasDistorted} from './offscreen_canvas_distorted';\nimport type {Size} from './image';\nimport type {WorkerGlobalScopeInterface} from './web_worker';\nimport {mat3, mat4, quat, vec2, vec3, type vec4} from 'gl-matrix';\nimport {pixelsToTileUnits} from '../source/pixels_to_tile_units';\nimport {type OverscaledTileID} from '../tile/tile_id';\nimport type {Event} from './evented';\n\n/**\n * Returns a new 64 bit float vec4 of zeroes.\n */\nexport function createVec4f64(): vec4 { return new Float64Array(4) as any; }\n/**\n * Returns a new 64 bit float vec3 of zeroes.\n */\nexport function createVec3f64(): vec3 { return new Float64Array(3) as any; }\n/**\n * Returns a new 64 bit float mat4 of zeroes.\n */\nexport function createMat4f64(): mat4 { return new Float64Array(16) as any; }\n/**\n * Returns a new 32 bit float mat4 of zeroes.\n */\nexport function createMat4f32(): mat4 { return new Float32Array(16) as any; }\n/**\n * Returns a new 64 bit float mat4 set to identity.\n */\nexport function createIdentityMat4f64(): mat4 {\n const m = new Float64Array(16) as any;\n mat4.identity(m);\n return m;\n}\n/**\n * Returns a new 32 bit float mat4 set to identity.\n */\nexport function createIdentityMat4f32(): mat4 {\n const m = new Float32Array(16) as any;\n mat4.identity(m);\n return m;\n}\n\n/**\n * Returns a translation in tile units that correctly incorporates the view angle and the *-translate and *-translate-anchor properties.\n * @param inViewportPixelUnitsUnits - True when the units accepted by the matrix are in viewport pixels instead of tile units.\n */\nexport function translatePosition(\n transform: { bearingInRadians: number; zoom: number },\n tile: { tileID: OverscaledTileID; tileSize: number },\n translate: [number, number],\n translateAnchor: 'map' | 'viewport',\n inViewportPixelUnitsUnits: boolean = false\n): [number, number] {\n if (!translate[0] && !translate[1]) return [0, 0];\n\n const angle = inViewportPixelUnitsUnits ?\n (translateAnchor === 'map' ? -transform.bearingInRadians : 0) :\n (translateAnchor === 'viewport' ? transform.bearingInRadians : 0);\n\n if (angle) {\n const sinA = Math.sin(angle);\n const cosA = Math.cos(angle);\n translate = [\n translate[0] * cosA - translate[1] * sinA,\n translate[0] * sinA + translate[1] * cosA\n ];\n }\n\n return [\n inViewportPixelUnitsUnits ? translate[0] : pixelsToTileUnits(tile, translate[0], transform.zoom),\n inViewportPixelUnitsUnits ? translate[1] : pixelsToTileUnits(tile, translate[1], transform.zoom)];\n}\n\n/**\n * Returns the signed distance between a point and a plane.\n * @param plane - The plane equation, in the form where the first three components are the normal and the fourth component is the plane's distance from origin along normal.\n * @param point - The point whose distance from plane is returned.\n * @returns Signed distance of the point from the plane. Positive distances are in the half space where the plane normal points to, negative otherwise.\n */\nexport function pointPlaneSignedDistance(\n plane: vec4 | [number, number, number, number],\n point: vec3 | [number, number, number]\n): number {\n return plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3];\n}\n\n/**\n * Finds an intersection points of three planes. Returns `null` if no such (single) point exists.\n * The planes *must* be in Hessian normal form - their xyz components must form a unit vector.\n */\nexport function threePlaneIntersection(plane0: vec4, plane1: vec4, plane2: vec4): vec3 | null {\n // https://mathworld.wolfram.com/Plane-PlaneIntersection.html\n const det = mat3.determinant([\n plane0[0], plane0[1], plane0[2],\n plane1[0], plane1[1], plane1[2],\n plane2[0], plane2[1], plane2[2]\n ] as mat3);\n if (det === 0) {\n return null;\n }\n const cross12 = vec3.cross([] as any, [plane1[0], plane1[1], plane1[2]], [plane2[0], plane2[1], plane2[2]]);\n const cross20 = vec3.cross([] as any, [plane2[0], plane2[1], plane2[2]], [plane0[0], plane0[1], plane0[2]]);\n const cross01 = vec3.cross([] as any, [plane0[0], plane0[1], plane0[2]], [plane1[0], plane1[1], plane1[2]]);\n const sum = vec3.scale([] as any, cross12, -plane0[3]);\n vec3.add(sum, sum, vec3.scale([] as any, cross20, -plane1[3]));\n vec3.add(sum, sum, vec3.scale([] as any, cross01, -plane2[3]));\n vec3.scale(sum, sum, 1.0 / det);\n return sum;\n}\n\n/**\n * Returns a parameter `t` such that the point obtained by\n * `origin + direction * t` lies on the given plane.\n * If the ray is parallel to the plane, returns null.\n * Returns a negative value if the ray is pointing away from the plane.\n * Direction does not need to be normalized.\n */\nexport function rayPlaneIntersection(origin: vec3, direction: vec3, plane: vec4): number | null {\n const dotOriginPlane = origin[0] * plane[0] + origin[1] * plane[1] + origin[2] * plane[2];\n const dotDirectionPlane = direction[0] * plane[0] + direction[1] * plane[1] + direction[2] * plane[2];\n if (dotDirectionPlane === 0) {\n return null;\n }\n return (-dotOriginPlane -plane[3]) / dotDirectionPlane;\n}\n\n/**\n * Solves a quadratic equation in the form ax^2 + bx + c = 0 and returns its roots in no particular order.\n * Returns null if the equation has no roots or if it has infinitely many roots.\n */\nexport function solveQuadratic(a: number, b: number, c: number): {\n t0: number;\n t1: number;\n} {\n const d = b * b - 4 * a * c;\n if (d < 0 || (a === 0 && b === 0)) {\n return null;\n }\n\n // Uses a more precise solution from the book Ray Tracing Gems, chapter 7.\n // https://www.realtimerendering.com/raytracinggems/rtg/index.html\n const q = -0.5 * (b + Math.sign(b) * Math.sqrt(d));\n if (Math.abs(q) > 1e-12) {\n return {\n t0: c / q,\n t1: q / a\n };\n } else {\n // Use the schoolbook way if q is too small\n return {\n t0: (-b + Math.sqrt(d)) * 0.5 / a,\n t1: (-b + Math.sqrt(d)) * 0.5 / a\n };\n }\n}\n\n/**\n * Returns the angle in radians between two 2D vectors.\n * The angle is signed and describes how much the first vector would need to be be rotated clockwise\n * (assuming X is right and Y is down) so that it points in the same direction as the second vector.\n * @param vec1x - The X component of the first vector.\n * @param vec1y - The Y component of the first vector.\n * @param vec2x - The X component of the second vector.\n * @param vec2y - The Y component of the second vector.\n * @returns The signed angle between the two vectors, in range -PI..PI.\n */\nexport function angleToRotateBetweenVectors2D(vec1x: number, vec1y: number, vec2x: number, vec2y: number): number {\n // Normalize both vectors\n const length1 = Math.sqrt(vec1x * vec1x + vec1y * vec1y);\n const length2 = Math.sqrt(vec2x * vec2x + vec2y * vec2y);\n vec1x /= length1;\n vec1y /= length1;\n vec2x /= length2;\n vec2y /= length2;\n const dot = vec1x * vec2x + vec1y * vec2y;\n const angle = Math.acos(dot);\n // dot second vector with vector to the right of first (-vec1y, vec1x)\n const isVec2RightOfVec1 = (-vec1y * vec2x + vec1x * vec2y) > 0;\n if (isVec2RightOfVec1) {\n return angle;\n } else {\n return -angle;\n }\n}\n\n/**\n * For two angles in degrees, returns how many degrees to add to the first angle in order to obtain the second angle.\n * The returned difference value is always the shorted of the two - its absolute value is never greater than 180°.\n */\nexport function differenceOfAnglesDegrees(degreesA: number, degreesB: number): number {\n const a = mod(degreesA, 360);\n const b = mod(degreesB, 360);\n const diff1 = b - a;\n const diff2 = (b > a) ? (diff1 - 360) : (diff1 + 360);\n if (Math.abs(diff1) < Math.abs(diff2)) {\n return diff1;\n } else {\n return diff2;\n }\n}\n\n/**\n * For two angles in radians, returns how many radians to add to the first angle in order to obtain the second angle.\n * The returned difference value is always the shorted of the two - its absolute value is never greater than PI.\n */\nexport function differenceOfAnglesRadians(degreesA: number, degreesB: number): number {\n const a = mod(degreesA, Math.PI * 2);\n const b = mod(degreesB, Math.PI * 2);\n const diff1 = b - a;\n const diff2 = (b > a) ? (diff1 - Math.PI * 2) : (diff1 + Math.PI * 2);\n if (Math.abs(diff1) < Math.abs(diff2)) {\n return diff1;\n } else {\n return diff2;\n }\n}\n\n/**\n * When given two angles in degrees, returns the angular distance between them - the shorter one of the two possible arcs.\n */\nexport function distanceOfAnglesDegrees(degreesA: number, degreesB: number): number {\n const a = mod(degreesA, 360);\n const b = mod(degreesB, 360);\n return Math.min(\n Math.abs(a - b),\n Math.abs(a - b + 360),\n Math.abs(a - b - 360)\n );\n}\n\n/**\n * When given two angles in radians, returns the angular distance between them - the shorter one of the two possible arcs.\n */\nexport function distanceOfAnglesRadians(radiansA: number, radiansB: number): number {\n const a = mod(radiansA, Math.PI * 2);\n const b = mod(radiansB, Math.PI * 2);\n return Math.min(\n Math.abs(a - b),\n Math.abs(a - b + Math.PI * 2),\n Math.abs(a - b - Math.PI * 2)\n );\n}\n\n/**\n * Modulo function, as opposed to javascript's `%`, which is a remainder.\n * This functions will return positive values, even if the first operand is negative.\n */\nexport function mod(n, m) {\n return ((n % m) + m) % m;\n}\n\n/**\n * Takes a value in *old range*, linearly maps that range to *new range*, and returns the value in that new range.\n * Additionally, if the value is outside *old range*, it is clamped inside it.\n * Also works if one of the ranges is flipped (its `min` being larger than `max`).\n */\nexport function remapSaturate(value: number, oldRangeMin: number, oldRangeMax: number, newRangeMin: number, newRangeMax: number): number {\n const inOldRange = clamp((value - oldRangeMin) / (oldRangeMax - oldRangeMin), 0.0, 1.0);\n return lerp(newRangeMin, newRangeMax, inOldRange);\n}\n\n/**\n * Linearly interpolate between two values, similar to `mix` function from GLSL. No clamping is done.\n * @param a - The first value to interpolate. This value is returned when mix=0.\n * @param b - The second value to interpolate. This value is returned when mix=1.\n * @param mix - The interpolation factor. Range 0..1 interpolates between `a` and `b`, but values outside this range are also accepted.\n */\nexport function lerp(a: number, b: number, mix: number): number {\n return a * (1.0 - mix) + b * mix;\n}\n\n/**\n * For a given collection of 2D points, returns their axis-aligned bounding box,\n * in the format [minX, minY, maxX, maxY].\n */\nexport function getAABB(points: Array): [number, number, number, number] {\n let tlX = Infinity;\n let tlY = Infinity;\n let brX = -Infinity;\n let brY = -Infinity;\n\n for (const p of points) {\n tlX = Math.min(tlX, p.x);\n tlY = Math.min(tlY, p.y);\n brX = Math.max(brX, p.x);\n brY = Math.max(brY, p.y);\n }\n\n return [tlX, tlY, brX, brY];\n}\n\n/**\n * For a given set of tile ids, returns the edge tile ids for the bounding box.\n */\nexport function getEdgeTiles(tileIDs: OverscaledTileID[]): Set {\n if (!tileIDs.length) return new Set();\n\n // set a common zoom for calculation (highest zoom) to reproject all tiles to this same zoom\n const targetZ = Math.max(...tileIDs.map(id => id.canonical.z));\n\n // vars to store the min and max tile x/y coordinates for edge finding\n let minX = Infinity, maxX = -Infinity;\n let minY = Infinity, maxY = -Infinity;\n\n // project all tiles to targetZ while maintaining the reference to the original tile\n const projected: {id: OverscaledTileID; x: number; y: number}[] = [];\n for (const id of tileIDs) {\n const {x, y, z} = id.canonical;\n const scale = Math.pow(2, targetZ - z);\n const px = x * scale;\n const py = y * scale;\n\n projected.push({id, x: px, y: py});\n\n if (px < minX) minX = px;\n if (px > maxX) maxX = px;\n if (py < minY) minY = py;\n if (py > maxY) maxY = py;\n }\n\n // find edge tiles using the reprojected tile ids\n const edgeTiles: Set = new Set();\n for (const p of projected) {\n if (p.x === minX || p.x === maxX || p.y === minY || p.y === maxY) {\n edgeTiles.add(p.id);\n }\n }\n\n return edgeTiles;\n}\n\n/**\n * Given a value `t` that varies between 0 and 1, return\n * an interpolation function that eases between 0 and 1 in a pleasing\n * cubic in-out fashion.\n */\nexport function easeCubicInOut(t: number): number {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n const t2 = t * t,\n t3 = t2 * t;\n return 4 * (t < 0.5 ? t3 : 3 * (t - t2) + t3 - 0.75);\n}\n\n/**\n * Given given (x, y), (x1, y1) control points for a bezier curve,\n * return a function that interpolates along that curve.\n *\n * @param p1x - control point 1 x coordinate\n * @param p1y - control point 1 y coordinate\n * @param p2x - control point 2 x coordinate\n * @param p2y - control point 2 y coordinate\n */\nexport function bezier(p1x: number, p1y: number, p2x: number, p2y: number): (t: number) => number {\n const bezier = new UnitBezier(p1x, p1y, p2x, p2y);\n return (t: number) => {\n return bezier.solve(t);\n };\n}\n\n/**\n * A default bezier-curve powered easing function with\n * control points (0.25, 0.1) and (0.25, 1)\n */\nexport const defaultEasing = bezier(0.25, 0.1, 0.25, 1);\n\n/**\n * constrain n to the given range via min + max\n *\n * @param n - value\n * @param min - the minimum value to be returned\n * @param max - the maximum value to be returned\n * @returns the clamped value\n */\nexport function clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/**\n * constrain n to the given range, excluding the minimum, via modular arithmetic\n *\n * @param n - value\n * @param min - the minimum value to be returned, exclusive\n * @param max - the maximum value to be returned, inclusive\n * @returns constrained number\n */\nexport function wrap(n: number, min: number, max: number): number {\n const d = max - min;\n const w = ((n - min) % d + d) % d + min;\n return (w === min) ? max : w;\n}\n\n/**\n * Compute the difference between the keys in one object and the keys\n * in another object.\n *\n * @returns keys difference\n */\nexport function keysDifference(\n obj: {[key: string]: S},\n other: {[key: string]: T}\n): Array {\n const difference = [];\n for (const i in obj) {\n if (!(i in other)) {\n difference.push(i);\n }\n }\n return difference;\n}\n\n/**\n * Given a destination object and optionally many source objects,\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param dest - destination object\n * @param sources - sources from which properties are pulled\n */\nexport function extend(dest: T, source: U): T & U;\nexport function extend(dest: T, source1: U, source2: V): T & U & V;\nexport function extend(dest: T, source1: U, source2: V, source3: W): T & U & V & W;\nexport function extend(dest: object, ...sources: Array): any;\nexport function extend(dest: object, ...sources: Array): any {\n for (const src of sources) {\n for (const k in src) {\n dest[k] = src[k];\n }\n }\n return dest;\n}\n\n// See https://stackoverflow.com/questions/49401866/all-possible-keys-of-an-union-type\ntype KeysOfUnion = T extends T ? keyof T: never;\n\n/**\n * Given an object and a number of properties as strings, return version\n * of that object with only those properties.\n *\n * @param src - the object\n * @param properties - an array of property names chosen\n * to appear on the resulting object.\n * @returns object with limited properties.\n * @example\n * ```ts\n * let foo = { name: 'Charlie', age: 10 };\n * let justName = pick(foo, ['name']); // justName = { name: 'Charlie' }\n * ```\n */\nexport function pick(src: T, properties: Array>): Partial {\n const result: Partial = {};\n for (let i = 0; i < properties.length; i++) {\n const k = properties[i];\n if (k in src) {\n result[k] = src[k];\n }\n }\n return result;\n}\n\nlet id = 1;\n\n/**\n * Return a unique numeric id, starting at 1 and incrementing with\n * each call.\n *\n * @returns unique numeric id.\n */\nexport function uniqueId(): number {\n return id++;\n}\n\n/**\n * Return whether a given value is a power of two\n */\nexport function isPowerOfTwo(value: number): boolean {\n return (Math.log(value) / Math.LN2) % 1 === 0;\n}\n\n/**\n * Return the next power of two, or the input value if already a power of two\n */\nexport function nextPowerOfTwo(value: number): number {\n if (value <= 1) return 1;\n return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n}\n\n/**\n * Computes scaling from zoom level.\n */\nexport function zoomScale(zoom: number) { return Math.pow(2, zoom); }\n\n/**\n * Computes zoom level from scaling.\n */\nexport function scaleZoom(scale: number) { return Math.log(scale) / Math.LN2; }\n\n/**\n * Create an object by mapping all the values of an existing object while\n * preserving their keys.\n */\nexport function mapObject(input: any, iterator: Function, context?: any): any {\n const output = {};\n for (const key in input) {\n output[key] = iterator.call(context || this, input[key], key, input);\n }\n return output;\n}\n\n/**\n * Create an object by filtering out values of an existing object.\n */\nexport function filterObject(input: any, iterator: Function, context?: any): any {\n const output = {};\n for (const key in input) {\n if (iterator.call(context || this, input[key], key, input)) {\n output[key] = input[key];\n }\n }\n return output;\n}\n\n/**\n * Deeply compares two object literals.\n * @param a - first object literal to be compared\n * @param b - second object literal to be compared\n * @returns true if the two object literals are deeply equal, false otherwise\n */\nexport function deepEqual(a?: unknown | null, b?: unknown | null): boolean {\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n if (typeof a === 'object' && a !== null && b !== null) {\n if (!(typeof b === 'object')) return false;\n const keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) return false;\n for (const key in a) {\n if (!deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n return a === b;\n}\n\n/**\n * Deeply clones two objects.\n */\nexport function clone(input: T): T {\n if (Array.isArray(input)) {\n return input.map(clone) as any as T;\n } else if (typeof input === 'object' && input) {\n return mapObject(input, clone) as any as T;\n } else {\n return input;\n }\n}\n\n/**\n * Check if two arrays have at least one common element.\n */\nexport function arraysIntersect(a: Array, b: Array): boolean {\n for (let l = 0; l < a.length; l++) {\n if (b.indexOf(a[l]) >= 0) return true;\n }\n return false;\n}\n\n/**\n * Print a warning message to the console and ensure duplicate warning messages\n * are not printed.\n */\nconst warnOnceHistory: {[key: string]: boolean} = {};\n\nexport function warnOnce(message: string): void {\n if (!warnOnceHistory[message]) {\n // console isn't defined in some WebWorkers, see #2558\n if (typeof console !== 'undefined') console.warn(message);\n warnOnceHistory[message] = true;\n }\n}\n\n/**\n * Indicates if the provided Points are in a counter clockwise (true) or clockwise (false) order\n *\n * @returns true for a counter clockwise set of points\n */\n// https://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/\nexport function isCounterClockwise(a: Point, b: Point, c: Point): boolean {\n return (c.y - a.y) * (b.x - a.x) > (b.y - a.y) * (c.x - a.x);\n}\n\n/**\n * For two lines a and b in 2d space, defined by any two points along the lines,\n * find the intersection point, or return null if the lines are parallel\n *\n * @param a1 - First point on line a\n * @param a2 - Second point on line a\n * @param b1 - First point on line b\n * @param b2 - Second point on line b\n *\n * @returns the intersection point of the two lines or null if they are parallel\n */\nexport function findLineIntersection(a1: Point, a2: Point, b1: Point, b2: Point): Point | null {\n const aDeltaY = a2.y - a1.y;\n const aDeltaX = a2.x - a1.x;\n const bDeltaY = b2.y - b1.y;\n const bDeltaX = b2.x - b1.x;\n\n const denominator = (bDeltaY * aDeltaX) - (bDeltaX * aDeltaY);\n\n if (denominator === 0) {\n // Lines are parallel\n return null;\n }\n\n const originDeltaY = a1.y - b1.y;\n const originDeltaX = a1.x - b1.x;\n const aInterpolation = (bDeltaX * originDeltaY - bDeltaY * originDeltaX) / denominator;\n\n // Find intersection by projecting out from origin of first segment\n return new Point(a1.x + (aInterpolation * aDeltaX), a1.y + (aInterpolation * aDeltaY));\n}\n\n/**\n * Converts spherical coordinates to cartesian coordinates.\n *\n * @param spherical - Spherical coordinates, in [radial, azimuthal, polar]\n * @returns cartesian coordinates in [x, y, z]\n */\n\nexport function sphericalToCartesian([r, azimuthal, polar]: [number, number, number]): {\n x: number;\n y: number;\n z: number;\n} {\n // We abstract \"north\"/\"up\" (compass-wise) to be 0° when really this is 90° (π/2):\n // correct for that here\n azimuthal += 90;\n\n // Convert azimuthal and polar angles to radians\n azimuthal *= Math.PI / 180;\n polar *= Math.PI / 180;\n\n return {\n x: r * Math.cos(azimuthal) * Math.sin(polar),\n y: r * Math.sin(azimuthal) * Math.sin(polar),\n z: r * Math.cos(polar)\n };\n}\n\n/**\n * Returns true if the when run in the web-worker context.\n *\n * @returns `true` if the when run in the web-worker context.\n */\nexport function isWorker(self: any): self is WorkerGlobalScopeInterface {\n // @ts-ignore\n return typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;\n}\n\n/**\n * Parses data from 'Cache-Control' headers.\n *\n * @param cacheControl - Value of 'Cache-Control' header\n * @returns object containing parsed header info.\n */\n\nexport function parseCacheControl(cacheControl: string): any {\n // Taken from [Wreck](https://github.com/hapijs/wreck)\n const re = /(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g;\n\n const header = {};\n cacheControl.replace(re, ($0, $1, $2, $3) => {\n const value = $2 || $3;\n header[$1] = value ? value.toLowerCase() : true;\n return '';\n });\n\n if (header['max-age']) {\n const maxAge = parseInt(header['max-age'], 10);\n if (isNaN(maxAge)) delete header['max-age'];\n else header['max-age'] = maxAge;\n }\n\n return header;\n}\n\nlet _isSafari = null;\n\n/**\n * Returns true when run in WebKit derived browsers.\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\n * transfer data between WebWorkers and the main thread.\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\n *\n * This should be removed once the underlying Safari issue is fixed.\n *\n * @param scope - Since this function is used both on the main thread and WebWorker context,\n * let the calling scope pass in the global scope object.\n * @returns `true` when run in WebKit derived browsers.\n */\nexport function isSafari(scope: any): boolean {\n if (_isSafari == null) {\n const userAgent = scope.navigator ? scope.navigator.userAgent : null;\n _isSafari = !!scope.safari ||\n !!(userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(userAgent) || (!!userAgent.match('Safari') && !userAgent.match('Chrome'))));\n }\n return _isSafari;\n}\n\nexport function storageAvailable(type: string): boolean {\n try {\n const storage = window[type];\n storage.setItem('_mapbox_test_', 1);\n storage.removeItem('_mapbox_test_');\n return true;\n } catch {\n return false;\n }\n}\n\n// The following methods are from https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\n//Unicode compliant base64 encoder for strings\nexport function b64EncodeUnicode(str: string) {\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n (match, p1) => {\n return String.fromCharCode(Number('0x' + p1)); //eslint-disable-line\n }\n )\n );\n}\n\n// Unicode compliant decoder for base64-encoded strings\nexport function b64DecodeUnicode(str: string) {\n return decodeURIComponent(atob(str).split('').map((c) => {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); //eslint-disable-line\n }).join(''));\n}\n\nexport function isImageBitmap(image: any): image is ImageBitmap {\n return typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap;\n}\n\n/**\n * Converts an ArrayBuffer to an ImageBitmap.\n *\n * Used mostly for testing purposes only, because mocking libs don't know how to work with ArrayBuffers, but work\n * perfectly fine with ImageBitmaps. Might also be used for environments (other than testing) not supporting\n * ArrayBuffers.\n *\n * @param data - Data to convert\n * @returns - A promise resolved when the conversion is finished\n */\nexport const arrayBufferToImageBitmap = async (data: ArrayBuffer): Promise => {\n if (data.byteLength === 0) {\n return createImageBitmap(new ImageData(1, 1));\n }\n const blob: Blob = new Blob([new Uint8Array(data)], {type: 'image/png'});\n try {\n return createImageBitmap(blob);\n } catch (e) {\n throw new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`);\n }\n};\n\nconst transparentPngUrl = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=';\n\n/**\n * Converts an ArrayBuffer to an HTMLImageElement.\n *\n * Used mostly for testing purposes only, because mocking libs don't know how to work with ArrayBuffers, but work\n * perfectly fine with ImageBitmaps. Might also be used for environments (other than testing) not supporting\n * ArrayBuffers.\n *\n * @param data - Data to convert\n * @returns - A promise resolved when the conversion is finished\n */\nexport const arrayBufferToImage = (data: ArrayBuffer): Promise => {\n return new Promise((resolve, reject) => {\n const img: HTMLImageElement = new Image();\n img.onload = () => {\n resolve(img);\n URL.revokeObjectURL(img.src);\n // prevent image dataURI memory leak in Safari;\n // but don't free the image immediately because it might be uploaded in the next frame\n // https://github.com/mapbox/mapbox-gl-js/issues/10226\n img.onload = null;\n window.requestAnimationFrame(() => { img.src = transparentPngUrl; });\n };\n img.onerror = () => reject(new Error('Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.'));\n const blob: Blob = new Blob([new Uint8Array(data)], {type: 'image/png'});\n img.src = data.byteLength ? URL.createObjectURL(blob) : transparentPngUrl;\n });\n};\n\n/**\n * Computes the webcodecs VideoFrame API options to select a rectangle out of\n * an image and write it into the destination rectangle.\n *\n * Rect (x/y/width/height) select the overlapping rectangle from the source image\n * and layout (offset/stride) write that overlapping rectangle to the correct place\n * in the destination image.\n *\n * Offset is the byte offset in the dest image that the first pixel appears at\n * and stride is the number of bytes to the start of the next row:\n * ┌───────────┐\n * │ dest │\n * │ ┌───┼───────┐\n * │offset→│▓▓▓│ source│\n * │ │▓▓▓│ │\n * │ └───┼───────┘\n * │stride ⇠╌╌╌│\n * │╌╌╌╌╌╌→ │\n * └───────────┘\n *\n * @param image - source image containing a width and height attribute\n * @param x - top-left x coordinate to read from the image\n * @param y - top-left y coordinate to read from the image\n * @param width - width of the rectangle to read from the image\n * @param height - height of the rectangle to read from the image\n * @returns the layout and rect options to pass into VideoFrame API\n */\nfunction computeVideoFrameParameters(image: Size, x: number, y: number, width: number, height: number): VideoFrameCopyToOptions {\n const destRowOffset = Math.max(-x, 0) * 4;\n const firstSourceRow = Math.max(0, y);\n const firstDestRow = firstSourceRow - y;\n const offset = firstDestRow * width * 4 + destRowOffset;\n const stride = width * 4;\n\n const sourceLeft = Math.max(0, x);\n const sourceTop = Math.max(0, y);\n const sourceRight = Math.min(image.width, x + width);\n const sourceBottom = Math.min(image.height, y + height);\n return {\n rect: {\n x: sourceLeft,\n y: sourceTop,\n width: sourceRight - sourceLeft,\n height: sourceBottom - sourceTop\n },\n layout: [{offset, stride}]\n };\n}\n\n/**\n * Reads pixels from an ImageBitmap/Image/canvas using webcodec VideoFrame API.\n *\n * @param data - image, imagebitmap, or canvas to parse\n * @param x - top-left x coordinate to read from the image\n * @param y - top-left y coordinate to read from the image\n * @param width - width of the rectangle to read from the image\n * @param height - height of the rectangle to read from the image\n * @returns a promise containing the parsed RGBA pixel values of the image, or the error if an error occurred\n */\nexport async function readImageUsingVideoFrame(\n image: HTMLImageElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas,\n x: number, y: number, width: number, height: number\n): Promise {\n if (typeof VideoFrame === 'undefined') {\n throw new Error('VideoFrame not supported');\n }\n const frame = new VideoFrame(image, {timestamp: 0});\n try {\n const format = frame?.format;\n if (!format || !(format.startsWith('BGR') || format.startsWith('RGB'))) {\n throw new Error(`Unrecognized format ${format}`);\n }\n const swapBR = format.startsWith('BGR');\n const result = new Uint8ClampedArray(width * height * 4);\n await frame.copyTo(result, computeVideoFrameParameters(image, x, y, width, height));\n if (swapBR) {\n for (let i = 0; i < result.length; i += 4) {\n const tmp = result[i];\n result[i] = result[i + 2];\n result[i + 2] = tmp;\n }\n }\n return result;\n } finally {\n frame.close();\n }\n}\n\nlet offscreenCanvas: OffscreenCanvas;\nlet offscreenCanvasContext: OffscreenCanvasRenderingContext2D;\n\n/**\n * Reads pixels from an ImageBitmap/Image/canvas using OffscreenCanvas\n *\n * @param data - image, imagebitmap, or canvas to parse\n * @param x - top-left x coordinate to read from the image\n * @param y - top-left y coordinate to read from the image\n * @param width - width of the rectangle to read from the image\n * @param height - height of the rectangle to read from the image\n * @returns a promise containing the parsed RGBA pixel values of the image, or the error if an error occurred\n */\nexport function readImageDataUsingOffscreenCanvas(\n imgBitmap: HTMLImageElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas,\n x: number, y: number, width: number, height: number\n): Uint8ClampedArray {\n const origWidth = imgBitmap.width;\n const origHeight = imgBitmap.height;\n // Lazily initialize OffscreenCanvas\n if (!offscreenCanvas || !offscreenCanvasContext) {\n // Dem tiles are typically 256x256\n offscreenCanvas = new OffscreenCanvas(origWidth, origHeight);\n offscreenCanvasContext = offscreenCanvas.getContext('2d', {willReadFrequently: true});\n }\n\n offscreenCanvas.width = origWidth;\n offscreenCanvas.height = origHeight;\n\n offscreenCanvasContext.drawImage(imgBitmap, 0, 0, origWidth, origHeight);\n const imgData = offscreenCanvasContext.getImageData(x, y, width, height);\n offscreenCanvasContext.clearRect(0, 0, origWidth, origHeight);\n return imgData.data;\n}\n\n/**\n * Reads RGBA pixels from an preferring OffscreenCanvas, but falling back to VideoFrame if supported and\n * the browser is mangling OffscreenCanvas getImageData results.\n *\n * @param data - image, imagebitmap, or canvas to parse\n * @param x - top-left x coordinate to read from the image\n * @param y - top-left y coordinate to read from the image\n * @param width - width of the rectangle to read from the image\n * @param height - height of the rectangle to read from the image\n * @returns a promise containing the parsed RGBA pixel values of the image\n */\nexport async function getImageData(\n image: HTMLImageElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas,\n x: number, y: number, width: number, height: number\n): Promise {\n if (isOffscreenCanvasDistorted()) {\n try {\n return await readImageUsingVideoFrame(image, x, y, width, height);\n } catch {\n // fall back to OffscreenCanvas\n }\n }\n return readImageDataUsingOffscreenCanvas(image, x, y, width, height);\n}\n\n/**\n * Allows to unsubscribe from events without the need to store the method reference.\n */\nexport interface Subscription {\n /**\n * Unsubscribes from the event.\n */\n unsubscribe(): void;\n}\n\nexport interface Subscriber {\n addEventListener: typeof window.addEventListener;\n removeEventListener: typeof window.removeEventListener;\n}\n\n/**\n * This method is used in order to register an event listener using a lambda function.\n * The return value will allow unsubscribing from the event, without the need to store the method reference.\n * @param target - The target\n * @param message - The message\n * @param listener - The listener\n * @param options - The options\n * @returns a subscription object that can be used to unsubscribe from the event\n */\nexport function subscribe(target: Subscriber, message: keyof WindowEventMap, listener: (...args: any) => void, options: boolean | AddEventListenerOptions): Subscription {\n target.addEventListener(message, listener, options);\n return {\n unsubscribe: () => {\n target.removeEventListener(message, listener, options);\n }\n };\n}\n\n/**\n * This method converts degrees to radians.\n * The return value is the radian value.\n * @param degrees - The number of degrees\n * @returns radians\n */\nexport function degreesToRadians(degrees: number): number {\n return degrees * Math.PI / 180;\n}\n\n/**\n * This method converts radians to degrees.\n * The return value is the degrees value.\n * @param degrees - The number of radians\n * @returns degrees\n */\nexport function radiansToDegrees(degrees: number): number {\n return degrees / Math.PI * 180;\n}\n\nexport type RollPitchBearing = {\n roll: number;\n pitch: number;\n bearing: number;\n};\n\nexport function rollPitchBearingEqual(a: RollPitchBearing, b: RollPitchBearing): boolean {\n return a.roll == b.roll && a.pitch == b.pitch && a.bearing == b.bearing;\n}\n\n/**\n * This method converts a rotation quaternion to roll, pitch, and bearing angles in degrees.\n * @param rotation - The rotation quaternion\n * @returns roll, pitch, and bearing angles in degrees\n */\nexport function getRollPitchBearing(rotation: quat): RollPitchBearing {\n const m: mat3 = new Float64Array(9) as any;\n mat3.fromQuat(m, rotation);\n\n const xAngle = radiansToDegrees(-Math.asin(clamp(m[2], -1, 1)));\n let roll: number;\n let bearing: number;\n if (Math.hypot(m[5], m[8]) < 1.0e-3) {\n roll = 0.0;\n bearing = -radiansToDegrees(Math.atan2(m[3], m[4]));\n } else {\n roll = radiansToDegrees((m[5] === 0.0 && m[8] === 0.0) ? 0.0 : Math.atan2(m[5], m[8]));\n bearing = radiansToDegrees((m[1] === 0.0 && m[0] === 0.0) ? 0.0 : Math.atan2(m[1], m[0]));\n }\n\n return {roll, pitch: xAngle + 90.0, bearing};\n}\n\nexport function getAngleDelta(lastPoint: Point, currentPoint: Point, center: Point): number {\n const pointVect = vec2.fromValues(currentPoint.x - center.x, currentPoint.y - center.y);\n const lastPointVec = vec2.fromValues(lastPoint.x - center.x, lastPoint.y - center.y);\n\n const crossProduct = pointVect[0] * lastPointVec[1] - pointVect[1] * lastPointVec[0];\n const angleRadians = Math.atan2(crossProduct, vec2.dot(pointVect, lastPointVec));\n return radiansToDegrees(angleRadians);\n}\n\n/**\n * This method converts roll, pitch, and bearing angles in degrees to a rotation quaternion.\n * @param roll - Roll angle in degrees\n * @param pitch - Pitch angle in degrees\n * @param bearing - Bearing angle in degrees\n * @returns The rotation quaternion\n */\nexport function rollPitchBearingToQuat(roll: number, pitch: number, bearing: number): quat {\n const rotation: quat = new Float64Array(4) as any;\n quat.fromEuler(rotation, roll, pitch - 90.0, bearing);\n return rotation;\n}\n\n/**\n * Makes optional keys required and add the the undefined type.\n *\n * ```\n * interface Test {\n * foo: number;\n * bar?: number;\n * baz: number | undefined;\n * }\n *\n * Complete {\n * foo: number;\n * bar: number | undefined;\n * baz: number | undefined;\n * }\n *\n * ```\n *\n * See https://medium.com/terria/typescript-transforming-optional-properties-to-required-properties-that-may-be-undefined-7482cb4e1585\n */\n\nexport type Complete = {\n [P in keyof Required]: Pick extends Required> ? T[P] : (T[P] | undefined);\n};\n\n/**\n * A helper to allow require of at least one property\n */\nexport type RequireAtLeastOne = { [K in keyof T]-?: Required> & Partial>>; }[keyof T];\n\n/**\n* A helper to allow require exactly one one property\n */\nexport type ExactlyOne = {\n [K in Keys]: Required> & { [P in Exclude]?: never }\n}[Keys];\n\nexport type TileJSON = {\n tilejson: '2.2.0' | '2.1.0' | '2.0.1' | '2.0.0' | '1.0.0';\n name?: string;\n description?: string;\n version?: string;\n attribution?: string;\n template?: string;\n tiles: Array;\n grids?: Array;\n data?: Array;\n minzoom?: number;\n maxzoom?: number;\n bounds?: [number, number, number, number];\n center?: [number, number, number];\n vector_layers: [{id: string}]; // this is partial but enough for what we need\n};\n\n/**\n * The maximum world tile zoom (Z).\n * In other words, the upper bound supported for tile zoom.\n */\nexport const MAX_TILE_ZOOM = 25;\n\n/**\n * The minimum world tile zoom (Z).\n * In other words, the lower bound supported for tile zoom.\n */\nexport const MIN_TILE_ZOOM = 0;\n\nexport const MAX_VALID_LATITUDE = 85.051129;\n\nconst touchableEvents = {\n touchstart: true,\n touchmove: true,\n touchmoveWindow: true,\n touchend: true,\n touchcancel: true\n};\n\nconst pointableEvents = {\n dblclick: true,\n click: true,\n mouseover: true,\n mouseout: true,\n mousedown: true,\n mousemove: true,\n mousemoveWindow: true,\n mouseup: true,\n mouseupWindow: true,\n contextmenu: true,\n wheel: true\n};\n\nexport function isTouchableEvent(event: Event, eventType: string): event is TouchEvent {\n return touchableEvents[eventType] && 'touches' in event;\n}\n\nexport function isPointableEvent(event: Event, eventType: string): event is MouseEvent {\n return pointableEvents[eventType] && (event instanceof MouseEvent || event instanceof WheelEvent);\n}\n\nexport function isTouchableOrPointableType(eventType: string): boolean {\n return touchableEvents[eventType] || pointableEvents[eventType];\n}\n","/**\n * An error message to use when an operation is aborted\n */\nexport const ABORT_ERROR = 'AbortError';\n\nexport class AbortError extends Error {\n name = ABORT_ERROR;\n\n constructor(messageOrError: string | Error = ABORT_ERROR) {\n super(messageOrError instanceof Error ? messageOrError.message : messageOrError);\n if (messageOrError instanceof Error && messageOrError.stack) {\n this.stack = messageOrError.stack;\n }\n }\n}\n\n/**\n * Check if an error is an abort error\n * @param error - An error object\n * @returns - true if the error is an abort error\n */\nexport function isAbortError(error: Error): boolean {\n return error.name === ABORT_ERROR;\n}\n","import type {RequestParameters, GetResourceResponse} from './ajax';\n\n/**\n * This method type is used to register a protocol handler.\n * Use the abort controller for aborting requests.\n * Return a promise with the relevant resource response.\n */\nexport type AddProtocolAction = (requestParameters: RequestParameters, abortController: AbortController) => Promise>;\n\n/**\n * This is a global config object used to store the configuration\n * It is available in the workers as well.\n * Only serializable data should be stored in it.\n */\ntype Config = {\n MAX_PARALLEL_IMAGE_REQUESTS: number;\n MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: number;\n MAX_TILE_CACHE_ZOOM_LEVELS: number;\n REGISTERED_PROTOCOLS: {[x: string]: AddProtocolAction };\n WORKER_URL: string;\n};\n\nexport const config: Config = {\n MAX_PARALLEL_IMAGE_REQUESTS: 16,\n MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8,\n MAX_TILE_CACHE_ZOOM_LEVELS: 5,\n REGISTERED_PROTOCOLS: {},\n WORKER_URL: ''\n};\n","import {type AddProtocolAction, config} from '../util/config';\n\nexport function getProtocol(url: string) {\n return config.REGISTERED_PROTOCOLS[url.substring(0, url.indexOf('://'))];\n}\n/**\n * Adds a custom load resource function that will be called when using a URL that starts with a custom url schema.\n * This will happen in the main thread, and workers might call it if they don't know how to handle the protocol.\n * The example below will be triggered for custom:// urls defined in the sources list in the style definitions.\n * The function passed will receive the request parameters and should return with the resulting resource,\n * for example a pbf vector tile, non-compressed, represented as ArrayBuffer.\n *\n * @param customProtocol - the protocol to hook, for example 'custom'\n * @param loadFn - the function to use when trying to fetch a tile specified by the customProtocol\n * @example\n * ```ts\n * // This will fetch a file using the fetch API (this is obviously a non interesting example...)\n * addProtocol('custom', async (params, abortController) => {\n * const t = await fetch(`https://${params.url.split(\"://\")[1]}`);\n * if (t.status == 200) {\n * const buffer = await t.arrayBuffer();\n * return {data: buffer}\n * } else {\n * throw new Error(`Tile fetch error: ${t.statusText}`);\n * }\n * });\n * // the following is an example of a way to return an error when trying to load a tile\n * addProtocol('custom2', async (params, abortController) => {\n * throw new Error('someErrorMessage');\n * });\n * ```\n */\nexport function addProtocol(customProtocol: string, loadFn: AddProtocolAction) {\n config.REGISTERED_PROTOCOLS[customProtocol] = loadFn;\n}\n\n/**\n * Removes a previously added protocol in the main thread.\n *\n * @param customProtocol - the custom protocol to remove registration for\n * @example\n * ```ts\n * removeProtocol('custom');\n * ```\n */\nexport function removeProtocol(customProtocol: string) {\n delete config.REGISTERED_PROTOCOLS[customProtocol];\n}\n","import {extend, isWorker} from './util';\nimport {AbortError, isAbortError} from './abort_error';\nimport {getProtocol} from '../source/protocol_crud';\nimport {MessageType} from './actor_messages';\n\n/**\n * This is used to identify the global dispatcher id when sending a message from the worker without a target map id.\n */\nexport const GLOBAL_DISPATCHER_ID = 'global-dispatcher';\n\n/**\n * A type used to store the tile's expiration date and cache control definition\n */\nexport type ExpiryData = {cacheControl?: string | null; expires?: Date | string | null};\n\n/**\n * A `RequestParameters` object to be returned from Map.options.transformRequest callbacks.\n * @example\n * ```ts\n * // use transformRequest to modify requests that begin with `http://myHost`\n * transformRequest: function(url, resourceType) {\n * if (resourceType === 'Source' && url.indexOf('http://myHost') > -1) {\n * return {\n * url: url.replace('http', 'https'),\n * headers: { 'my-custom-header': true },\n * credentials: 'include' // Include cookies for cross-origin requests\n * }\n * }\n * }\n * ```\n */\nexport type RequestParameters = {\n /**\n * The URL to be requested.\n */\n url: string;\n /**\n * The headers to be sent with the request.\n */\n headers?: any;\n /**\n * Request method `'GET' | 'POST' | 'PUT'`.\n */\n method?: 'GET' | 'POST' | 'PUT';\n /**\n * Request body.\n */\n body?: string;\n /**\n * Response body type to be returned.\n */\n type?: 'string' | 'json' | 'arrayBuffer' | 'image';\n /**\n * `'same-origin'|'include'` Use 'include' to send cookies with cross-origin requests.\n */\n credentials?: 'same-origin' | 'include';\n /**\n * If `true`, Resource Timing API information will be collected for these transformed requests and returned in a resourceTiming property of relevant data events.\n */\n collectResourceTiming?: boolean;\n /**\n * Parameters supported only by browser fetch API. Property of the Request interface contains the cache mode of the request. It controls how the request will interact with the browser's HTTP cache. (https://developer.mozilla.org/en-US/docs/Web/API/Request/cache)\n */\n cache?: RequestCache;\n};\n\n/**\n * The response object returned from a successful AJAx request\n */\nexport type GetResourceResponse = ExpiryData & {\n data: T;\n};\n\n/**\n * The response callback used in various places\n */\nexport type ResponseCallback = (\n error?: Error | null,\n data?: T | null,\n cacheControl?: string | null,\n expires?: string | Date | null\n) => void;\n\n/**\n * An error thrown when a HTTP request results in an error response.\n */\nexport class AJAXError extends Error {\n /**\n * The response's HTTP status code.\n */\n status: number;\n\n /**\n * The response's HTTP status text.\n */\n statusText: string;\n\n /**\n * The request's URL.\n */\n url: string;\n\n /**\n * The response's body.\n */\n body: Blob;\n\n /**\n * @param status - The response's HTTP status code.\n * @param statusText - The response's HTTP status text.\n * @param url - The request's URL.\n * @param body - The response's body.\n */\n constructor(status: number, statusText: string, url: string, body: Blob) {\n super(`AJAXError: ${statusText} (${status}): ${url}`);\n this.status = status;\n this.statusText = statusText;\n this.url = url;\n this.body = body;\n }\n}\n\n/**\n * Ensure that we're sending the correct referrer from blob URL worker bundles.\n * For files loaded from the local file system, `location.origin` will be set\n * to the string(!) \"null\" (Firefox), or \"file://\" (Chrome, Safari, Edge),\n * and we will set an empty referrer. Otherwise, we're using the document's URL.\n */\nexport const getReferrer = () => isWorker(self) ?\n self.worker && self.worker.referrer :\n (window.location.protocol === 'blob:' ? window.parent : window).location.href;\n\n/**\n * Determines whether a URL is a file:// URL. This is obviously the case if it begins\n * with file://. Relative URLs are also file:// URLs iff the original document was loaded\n * via a file:// URL.\n * @param url - The URL to check\n * @returns `true` if the URL is a file:// URL, `false` otherwise\n */\nconst isFileURL = url => /^file:/.test(url) || (/^file:/.test(getReferrer()) && !/^\\w+:/.test(url));\n\nasync function makeFetchRequest(requestParameters: RequestParameters, abortController: AbortController): Promise> {\n const request = new Request(requestParameters.url, {\n method: requestParameters.method || 'GET',\n body: requestParameters.body,\n credentials: requestParameters.credentials,\n headers: requestParameters.headers,\n cache: requestParameters.cache,\n referrer: getReferrer(),\n signal: abortController.signal\n });\n\n // If the user has already set an Accept header, do not overwrite it here\n if (requestParameters.type === 'json' && !request.headers.has('Accept')) {\n request.headers.set('Accept', 'application/json');\n }\n\n let response: Response;\n try {\n response = await fetch(request);\n } catch (e) {\n // Pass through AbortErrors for upstream handling\n if (isAbortError(e)) {\n throw e;\n }\n\n // When the error is due to CORS policy, DNS issue or malformed URL, the fetch call does not resolve but throws a generic TypeError instead.\n // It is preferable to throw an AJAXError so that the Map event \"error\" can catch it and still have\n // access to the faulty url. In such case, we provide the arbitrary HTTP error code of `0`.\n throw new AJAXError(0, e.message, requestParameters.url, new Blob());\n }\n\n if (!response.ok) {\n const body = await response.blob();\n throw new AJAXError(response.status, response.statusText, requestParameters.url, body);\n }\n let parsePromise: Promise;\n if ((requestParameters.type === 'arrayBuffer' || requestParameters.type === 'image')) {\n parsePromise = response.arrayBuffer();\n } else if (requestParameters.type === 'json') {\n parsePromise = response.json();\n } else {\n parsePromise = response.text();\n }\n const result = await parsePromise;\n abortController.signal.throwIfAborted();\n return {data: result, cacheControl: response.headers.get('Cache-Control'), expires: response.headers.get('Expires')};\n}\n\nfunction makeXMLHttpRequest(requestParameters: RequestParameters, abortController: AbortController): Promise> {\n return new Promise((resolve, reject) => {\n const xhr: XMLHttpRequest = new XMLHttpRequest();\n\n xhr.open(requestParameters.method || 'GET', requestParameters.url, true);\n if (requestParameters.type === 'arrayBuffer' || requestParameters.type === 'image') {\n xhr.responseType = 'arraybuffer';\n }\n for (const k in requestParameters.headers) {\n xhr.setRequestHeader(k, requestParameters.headers[k]);\n }\n if (requestParameters.type === 'json') {\n xhr.responseType = 'text';\n // Do not overwrite the user-provided Accept header\n if (!requestParameters.headers?.Accept) {\n xhr.setRequestHeader('Accept', 'application/json');\n }\n }\n xhr.withCredentials = requestParameters.credentials === 'include';\n xhr.onerror = () => {\n reject(new Error(xhr.statusText));\n };\n xhr.onload = () => {\n if (abortController.signal.aborted) {\n return;\n }\n if (((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) && xhr.response !== null) {\n let data: unknown = xhr.response;\n if (requestParameters.type === 'json') {\n // We're manually parsing JSON here to get better error messages.\n try {\n data = JSON.parse(xhr.response);\n } catch (err) {\n reject(err);\n return;\n }\n }\n resolve({data, cacheControl: xhr.getResponseHeader('Cache-Control'), expires: xhr.getResponseHeader('Expires')});\n } else {\n const body = new Blob([xhr.response], {type: xhr.getResponseHeader('Content-Type')});\n reject(new AJAXError(xhr.status, xhr.statusText, requestParameters.url, body));\n }\n };\n abortController.signal.addEventListener('abort', () => {\n xhr.abort();\n reject(new AbortError(abortController.signal.reason));\n });\n xhr.send(requestParameters.body);\n });\n}\n\n/**\n * We're trying to use the Fetch API if possible. However, requests for resources with the file:// URI scheme don't work with the Fetch API.\n * In this case we unconditionally use XHR on the current thread since referrers don't matter.\n * This method can also use the registered method if `addProtocol` was called.\n * @param requestParameters - The request parameters\n * @param abortController - The abort controller allowing to cancel the request\n * @returns a promise resolving to the response, including cache control and expiry data\n */\nexport const makeRequest = function(requestParameters: RequestParameters, abortController: AbortController): Promise> {\n if (/:\\/\\//.test(requestParameters.url) && !(/^https?:|^file:/.test(requestParameters.url))) {\n const protocolLoadFn = getProtocol(requestParameters.url);\n if (protocolLoadFn) {\n return protocolLoadFn(requestParameters, abortController);\n }\n if (isWorker(self) && self.worker && self.worker.actor) {\n return self.worker.actor.sendAsync({type: MessageType.getResource, data: requestParameters, targetMapId: GLOBAL_DISPATCHER_ID}, abortController);\n }\n }\n if (!isFileURL(requestParameters.url)) {\n if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, 'signal')) {\n return makeFetchRequest(requestParameters, abortController);\n }\n if (isWorker(self) && self.worker && self.worker.actor) {\n return self.worker.actor.sendAsync({type: MessageType.getResource, data: requestParameters, mustQueue: true, targetMapId: GLOBAL_DISPATCHER_ID}, abortController);\n }\n }\n return makeXMLHttpRequest(requestParameters, abortController);\n};\n\nexport const getJSON = (requestParameters: RequestParameters, abortController: AbortController): Promise<{data: T} & ExpiryData> => {\n return makeRequest(extend(requestParameters, {type: 'json'}), abortController);\n};\n\nexport const getArrayBuffer = (requestParameters: RequestParameters, abortController: AbortController): Promise<{data: ArrayBuffer} & ExpiryData> => {\n return makeRequest(extend(requestParameters, {type: 'arrayBuffer'}), abortController);\n};\n\nexport function sameOrigin(inComingUrl: string) {\n // A relative URL \"/foo\" or \"./foo\" will throw exception in URL's ctor,\n // try-catch is expansive so just use a heuristic check to avoid it\n // also check data URL\n if (!inComingUrl ||\n inComingUrl.indexOf('://') <= 0 || // relative URL\n inComingUrl.indexOf('data:image/') === 0 || // data image URL\n inComingUrl.indexOf('blob:') === 0) { // blob\n return true;\n }\n const urlObj = new URL(inComingUrl);\n const locationObj = window.location;\n return urlObj.protocol === locationObj.protocol && urlObj.host === locationObj.host;\n}\n\nexport const getVideo = (urls: Array): Promise => {\n const video: HTMLVideoElement = window.document.createElement('video');\n video.muted = true;\n return new Promise((resolve) => {\n video.onloadstart = () => {\n resolve(video);\n };\n for (const url of urls) {\n const s: HTMLSourceElement = window.document.createElement('source');\n if (!sameOrigin(url)) {\n video.crossOrigin = 'Anonymous';\n }\n s.src = url;\n video.appendChild(s);\n }\n });\n};\n","import {extend, type Subscription} from './util';\n\n/**\n * A listener method used as a callback to events\n */\nexport type Listener = (a: any) => any;\n\ntype Listeners = {[_: string]: Array};\n\nfunction _addEventListener(type: string, listener: Listener, listenerList: Listeners) {\n const listenerExists = listenerList[type] && listenerList[type].indexOf(listener) !== -1;\n if (!listenerExists) {\n listenerList[type] = listenerList[type] || [];\n listenerList[type].push(listener);\n }\n}\n\nfunction _removeEventListener(type: string, listener: Listener, listenerList: Listeners) {\n if (listenerList && listenerList[type]) {\n const index = listenerList[type].indexOf(listener);\n if (index !== -1) {\n listenerList[type].splice(index, 1);\n }\n }\n}\n\n/**\n * The event class\n */\nexport class Event {\n readonly type: string;\n\n constructor(type: string, data: any = {}) {\n extend(this, data);\n this.type = type;\n }\n}\n\ninterface ErrorLike {\n message: string;\n}\n\n/**\n * An error event\n */\nexport class ErrorEvent extends Event {\n error: ErrorLike;\n\n constructor(error: ErrorLike, data: any = {}) {\n super('error', extend({error}, data));\n }\n}\n\n/**\n * Methods mixed in to other classes for event capabilities.\n *\n * @group Event Related\n */\nexport class Evented {\n _listeners: Listeners;\n _oneTimeListeners: Listeners;\n _eventedParent: Evented;\n _eventedParentData: any | (() => any);\n\n /**\n * Adds a listener to a specified event type.\n *\n * @param type - The event type to add a listen for.\n * @param listener - The function to be called when the event is fired.\n * The listener function is called with the data object passed to `fire`,\n * extended with `target` and `type` properties.\n */\n on(type: string, listener: Listener): Subscription {\n this._listeners = this._listeners || {};\n _addEventListener(type, listener, this._listeners);\n\n return {\n unsubscribe: () => {\n this.off(type, listener);\n }\n };\n }\n\n /**\n * Removes a previously registered event listener.\n *\n * @param type - The event type to remove listeners for.\n * @param listener - The listener function to remove.\n */\n off(type: string, listener: Listener) {\n _removeEventListener(type, listener, this._listeners);\n _removeEventListener(type, listener, this._oneTimeListeners);\n\n return this;\n }\n\n /**\n * Adds a listener that will be called only once to a specified event type.\n *\n * The listener will be called first time the event fires after the listener is registered.\n *\n * @param type - The event type to listen for.\n * @param listener - The function to be called when the event is fired the first time.\n * @returns `this` or a promise if a listener is not provided\n */\n once(type: string, listener?: Listener): this | Promise {\n if (!listener) {\n return new Promise((resolve) => this.once(type, resolve));\n }\n this._oneTimeListeners = this._oneTimeListeners || {};\n _addEventListener(type, listener, this._oneTimeListeners);\n\n return this;\n }\n\n fire(event: Event | string, properties?: any) {\n // Compatibility with (type: string, properties: Object) signature from previous versions.\n // See https://github.com/mapbox/mapbox-gl-js/issues/6522,\n // https://github.com/mapbox/mapbox-gl-draw/issues/766\n if (typeof event === 'string') {\n event = new Event(event, properties || {});\n }\n\n const type = event.type;\n\n if (this.listens(type)) {\n (event as any).target = this;\n\n // make sure adding or removing listeners inside other listeners won't cause an infinite loop\n const listeners = this._listeners && this._listeners[type] ? this._listeners[type].slice() : [];\n for (const listener of listeners) {\n listener.call(this, event);\n }\n\n const oneTimeListeners = this._oneTimeListeners && this._oneTimeListeners[type] ? this._oneTimeListeners[type].slice() : [];\n for (const listener of oneTimeListeners) {\n _removeEventListener(type, listener, this._oneTimeListeners);\n listener.call(this, event);\n }\n\n const parent = this._eventedParent;\n if (parent) {\n extend(\n event,\n typeof this._eventedParentData === 'function' ? this._eventedParentData() : this._eventedParentData\n );\n parent.fire(event);\n }\n\n // To ensure that no error events are dropped, print them to the\n // console if they have no listeners.\n } else if (event instanceof ErrorEvent) {\n console.error(event.error);\n }\n\n return this;\n }\n\n /**\n * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.\n *\n * @param type - The event type\n * @returns `true` if there is at least one registered listener for specified event type, `false` otherwise\n */\n listens(type: string): boolean {\n return (\n (this._listeners && this._listeners[type] && this._listeners[type].length > 0) ||\n (this._oneTimeListeners && this._oneTimeListeners[type] && this._oneTimeListeners[type].length > 0) ||\n (this._eventedParent && this._eventedParent.listens(type))\n );\n }\n\n /**\n * Bubble all events fired by this instance of Evented to this parent instance of Evented.\n */\n setEventedParent(parent?: Evented | null, data?: any | (() => any)) {\n this._eventedParent = parent;\n this._eventedParentData = data;\n\n return this;\n }\n}\n","var $version = 8;\nvar $root = {\n\tversion: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: [\n\t\t\t8\n\t\t]\n\t},\n\tname: {\n\t\ttype: \"string\"\n\t},\n\tmetadata: {\n\t\ttype: \"*\"\n\t},\n\tcenter: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2\n\t},\n\tcenterAltitude: {\n\t\ttype: \"number\"\n\t},\n\tzoom: {\n\t\ttype: \"number\"\n\t},\n\tbearing: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\"\n\t},\n\tpitch: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"degrees\"\n\t},\n\troll: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"degrees\"\n\t},\n\tstate: {\n\t\ttype: \"state\",\n\t\t\"default\": {\n\t\t}\n\t},\n\tlight: {\n\t\ttype: \"light\"\n\t},\n\tsky: {\n\t\ttype: \"sky\"\n\t},\n\tprojection: {\n\t\ttype: \"projection\"\n\t},\n\tterrain: {\n\t\ttype: \"terrain\"\n\t},\n\tsources: {\n\t\trequired: true,\n\t\ttype: \"sources\"\n\t},\n\tsprite: {\n\t\ttype: \"sprite\"\n\t},\n\tglyphs: {\n\t\ttype: \"string\"\n\t},\n\t\"font-faces\": {\n\t\ttype: \"fontFaces\"\n\t},\n\ttransition: {\n\t\ttype: \"transition\"\n\t},\n\tlayers: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"layer\"\n\t}\n};\nvar sources = {\n\t\"*\": {\n\t\ttype: \"source\"\n\t}\n};\nvar source = [\n\t\"source_vector\",\n\t\"source_raster\",\n\t\"source_raster_dem\",\n\t\"source_geojson\",\n\t\"source_video\",\n\t\"source_image\"\n];\nvar source_vector = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvector: {\n\t\t\t}\n\t\t}\n\t},\n\turl: {\n\t\ttype: \"string\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t]\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t},\n\t\t\ttms: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22\n\t},\n\tattribution: {\n\t\ttype: \"string\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\"\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\tencoding: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmvt: {\n\t\t\t},\n\t\t\tmlt: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"mvt\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\"\n\t}\n};\nvar source_raster = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\traster: {\n\t\t\t}\n\t\t}\n\t},\n\turl: {\n\t\ttype: \"string\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t]\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t},\n\t\t\ttms: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\"\n\t},\n\tattribution: {\n\t\ttype: \"string\"\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\t\"*\": {\n\t\ttype: \"*\"\n\t}\n};\nvar source_raster_dem = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\t\"raster-dem\": {\n\t\t\t}\n\t\t}\n\t},\n\turl: {\n\t\ttype: \"string\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t]\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\"\n\t},\n\tattribution: {\n\t\ttype: \"string\"\n\t},\n\tencoding: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tterrarium: {\n\t\t\t},\n\t\t\tmapbox: {\n\t\t\t},\n\t\t\tcustom: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"mapbox\"\n\t},\n\tredFactor: {\n\t\ttype: \"number\",\n\t\t\"default\": 1\n\t},\n\tblueFactor: {\n\t\ttype: \"number\",\n\t\t\"default\": 1\n\t},\n\tgreenFactor: {\n\t\ttype: \"number\",\n\t\t\"default\": 1\n\t},\n\tbaseShift: {\n\t\ttype: \"number\",\n\t\t\"default\": 0\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\t\"*\": {\n\t\ttype: \"*\"\n\t}\n};\nvar source_geojson = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tgeojson: {\n\t\t\t}\n\t\t}\n\t},\n\tdata: {\n\t\trequired: true,\n\t\ttype: \"*\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 18\n\t},\n\tattribution: {\n\t\ttype: \"string\"\n\t},\n\tbuffer: {\n\t\ttype: \"number\",\n\t\t\"default\": 128,\n\t\tmaximum: 512,\n\t\tminimum: 0\n\t},\n\tfilter: {\n\t\ttype: \"filter\"\n\t},\n\ttolerance: {\n\t\ttype: \"number\",\n\t\t\"default\": 0.375\n\t},\n\tcluster: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\tclusterRadius: {\n\t\ttype: \"number\",\n\t\t\"default\": 50,\n\t\tminimum: 0\n\t},\n\tclusterMaxZoom: {\n\t\ttype: \"number\"\n\t},\n\tclusterMinPoints: {\n\t\ttype: \"number\"\n\t},\n\tclusterProperties: {\n\t\ttype: \"*\"\n\t},\n\tlineMetrics: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\tgenerateId: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\"\n\t}\n};\nvar source_video = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvideo: {\n\t\t\t}\n\t\t}\n\t},\n\turls: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"string\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\"\n\t\t}\n\t}\n};\nvar source_image = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\timage: {\n\t\t\t}\n\t\t}\n\t},\n\turl: {\n\t\trequired: true,\n\t\ttype: \"string\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\"\n\t\t}\n\t}\n};\nvar layer = {\n\tid: {\n\t\ttype: \"string\",\n\t\trequired: true\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tfill: {\n\t\t\t},\n\t\t\tline: {\n\t\t\t},\n\t\t\tsymbol: {\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t},\n\t\t\theatmap: {\n\t\t\t},\n\t\t\t\"fill-extrusion\": {\n\t\t\t},\n\t\t\traster: {\n\t\t\t},\n\t\t\thillshade: {\n\t\t\t},\n\t\t\t\"color-relief\": {\n\t\t\t},\n\t\t\tbackground: {\n\t\t\t}\n\t\t},\n\t\trequired: true\n\t},\n\tmetadata: {\n\t\ttype: \"*\"\n\t},\n\tsource: {\n\t\ttype: \"string\"\n\t},\n\t\"source-layer\": {\n\t\ttype: \"string\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24\n\t},\n\tfilter: {\n\t\ttype: \"filter\"\n\t},\n\tlayout: {\n\t\ttype: \"layout\"\n\t},\n\tpaint: {\n\t\ttype: \"paint\"\n\t}\n};\nvar layout = [\n\t\"layout_fill\",\n\t\"layout_line\",\n\t\"layout_circle\",\n\t\"layout_heatmap\",\n\t\"layout_fill-extrusion\",\n\t\"layout_symbol\",\n\t\"layout_raster\",\n\t\"layout_hillshade\",\n\t\"layout_color-relief\",\n\t\"layout_background\"\n];\nvar layout_background = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_fill = {\n\t\"fill-sort-key\": {\n\t\ttype: \"number\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_circle = {\n\t\"circle-sort-key\": {\n\t\ttype: \"number\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_heatmap = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_line = {\n\t\"line-cap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbutt: {\n\t\t\t},\n\t\t\tround: {\n\t\t\t},\n\t\t\tsquare: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"butt\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-join\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbevel: {\n\t\t\t},\n\t\t\tround: {\n\t\t\t},\n\t\t\tmiter: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"miter\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-miter-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"miter\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-round-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.05,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"round\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-sort-key\": {\n\t\ttype: \"number\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_symbol = {\n\t\"symbol-placement\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tpoint: {\n\t\t\t},\n\t\t\tline: {\n\t\t\t},\n\t\t\t\"line-center\": {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"point\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 250,\n\t\tminimum: 1,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"symbol-placement\": \"line\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-avoid-edges\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-sort-key\": {\n\t\ttype: \"number\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"symbol-z-order\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t},\n\t\t\t\"viewport-y\": {\n\t\t\t},\n\t\t\tsource: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t{\n\t\t\t\t\"!\": \"icon-overlap\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-overlap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnever: {\n\t\t\t},\n\t\t\talways: {\n\t\t\t},\n\t\t\tcooperative: {\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t},\n\t\t\tauto: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tunits: \"factor of the original icon size\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-text-fit\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t},\n\t\t\twidth: {\n\t\t\t},\n\t\t\theight: {\n\t\t\t},\n\t\t\tboth: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-text-fit-padding\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"icon-text-fit\": [\n\t\t\t\t\t\"both\",\n\t\t\t\t\t\"width\",\n\t\t\t\t\t\"height\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-image\": {\n\t\ttype: \"resolvedImage\",\n\t\ttokens: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-padding\": {\n\t\ttype: \"padding\",\n\t\t\"default\": [\n\t\t\t2\n\t\t],\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t{\n\t\t\t\t\"icon-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-offset\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t},\n\t\t\tleft: {\n\t\t\t},\n\t\t\tright: {\n\t\t\t},\n\t\t\ttop: {\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t},\n\t\t\tauto: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t},\n\t\t\tauto: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t},\n\t\t\t\"viewport-glyph\": {\n\t\t\t},\n\t\t\tauto: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-field\": {\n\t\ttype: \"formatted\",\n\t\t\"default\": \"\",\n\t\ttokens: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-font\": {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\t\"default\": [\n\t\t\t\"Open Sans Regular\",\n\t\t\t\"Arial Unicode MS Regular\"\n\t\t],\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 16,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 10,\n\t\tminimum: 0,\n\t\tunits: \"ems\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-line-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.2,\n\t\tunits: \"ems\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-letter-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"ems\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-justify\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t},\n\t\t\tleft: {\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t},\n\t\t\tright: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-radial-offset\": {\n\t\ttype: \"number\",\n\t\tunits: \"ems\",\n\t\t\"default\": 0,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"property-type\": \"data-driven\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t}\n\t},\n\t\"text-variable-anchor\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t},\n\t\t\tleft: {\n\t\t\t},\n\t\t\tright: {\n\t\t\t},\n\t\t\ttop: {\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-variable-anchor-offset\": {\n\t\ttype: \"variableAnchorOffsetCollection\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t},\n\t\t\tleft: {\n\t\t\t},\n\t\t\tright: {\n\t\t\t},\n\t\t\ttop: {\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-variable-anchor\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-angle\": {\n\t\ttype: \"number\",\n\t\t\"default\": 45,\n\t\tunits: \"degrees\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-writing-mode\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\thorizontal: {\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"text-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-transform\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t},\n\t\t\tuppercase: {\n\t\t\t},\n\t\t\tlowercase: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-offset\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tunits: \"ems\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-radial-offset\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-overlap\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-overlap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnever: {\n\t\t\t},\n\t\t\talways: {\n\t\t\t},\n\t\t\tcooperative: {\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_raster = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar layout_hillshade = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar filter = {\n\ttype: \"boolean\",\n\texpression: {\n\t\tinterpolated: false,\n\t\tparameters: [\n\t\t\t\"zoom\",\n\t\t\t\"feature\"\n\t\t]\n\t},\n\t\"property-type\": \"data-driven\"\n};\nvar filter_operator = {\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"==\": {\n\t\t},\n\t\t\"!=\": {\n\t\t},\n\t\t\">\": {\n\t\t},\n\t\t\">=\": {\n\t\t},\n\t\t\"<\": {\n\t\t},\n\t\t\"<=\": {\n\t\t},\n\t\t\"in\": {\n\t\t},\n\t\t\"!in\": {\n\t\t},\n\t\tall: {\n\t\t},\n\t\tany: {\n\t\t},\n\t\tnone: {\n\t\t},\n\t\thas: {\n\t\t},\n\t\t\"!has\": {\n\t\t}\n\t}\n};\nvar geometry_type = {\n\ttype: \"enum\",\n\tvalues: {\n\t\tPoint: {\n\t\t},\n\t\tLineString: {\n\t\t},\n\t\tPolygon: {\n\t\t}\n\t}\n};\nvar function_stop = {\n\ttype: \"array\",\n\tminimum: 0,\n\tmaximum: 24,\n\tvalue: [\n\t\t\"number\",\n\t\t\"color\"\n\t],\n\tlength: 2\n};\nvar expression$1 = {\n\ttype: \"array\",\n\tvalue: \"expression_name\",\n\tminimum: 1\n};\nvar light = {\n\tanchor: {\n\t\ttype: \"enum\",\n\t\t\"default\": \"viewport\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t}\n\t},\n\tposition: {\n\t\ttype: \"array\",\n\t\t\"default\": [\n\t\t\t1.15,\n\t\t\t210,\n\t\t\t30\n\t\t],\n\t\tlength: 3,\n\t\tvalue: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t}\n\t},\n\tcolor: {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\tintensity: {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t}\n};\nvar sky = {\n\t\"sky-color\": {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#88C6FC\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"horizon-color\": {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"fog-color\": {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"fog-ground-blend\": {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"horizon-fog-blend\": {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.8,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"sky-horizon-blend\": {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.8,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t},\n\t\"atmosphere-blend\": {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.8,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true\n\t}\n};\nvar terrain = {\n\tsource: {\n\t\ttype: \"string\",\n\t\trequired: true\n\t},\n\texaggeration: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\t\"default\": 1\n\t}\n};\nvar projection = {\n\ttype: {\n\t\ttype: \"projectionDefinition\",\n\t\t\"default\": \"mercator\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t}\n\t}\n};\nvar paint = [\n\t\"paint_fill\",\n\t\"paint_line\",\n\t\"paint_circle\",\n\t\"paint_heatmap\",\n\t\"paint_fill-extrusion\",\n\t\"paint_symbol\",\n\t\"paint_raster\",\n\t\"paint_hillshade\",\n\t\"paint_color-relief\",\n\t\"paint_background\"\n];\nvar paint_fill = {\n\t\"fill-antialias\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-outline-color\": {\n\t\ttype: \"color\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"fill-antialias\": true\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t}\n};\nvar paint_line = {\n\t\"line-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"line-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-gap-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-offset\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-dasharray\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"line widths\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-gradient\": {\n\t\ttype: \"color\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-dasharray\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"geojson\",\n\t\t\t\thas: {\n\t\t\t\t\tlineMetrics: true\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"line-progress\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t}\n};\nvar paint_circle = {\n\t\"circle-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 5,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"circle-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-scale\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-stroke-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t}\n};\nvar paint_heatmap = {\n\t\"heatmap-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 30,\n\t\tminimum: 1,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-weight\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-intensity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"heatmap-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": [\n\t\t\t\"interpolate\",\n\t\t\t[\n\t\t\t\t\"linear\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"heatmap-density\"\n\t\t\t],\n\t\t\t0,\n\t\t\t\"rgba(0, 0, 255, 0)\",\n\t\t\t0.1,\n\t\t\t\"royalblue\",\n\t\t\t0.3,\n\t\t\t\"cyan\",\n\t\t\t0.5,\n\t\t\t\"lime\",\n\t\t\t0.7,\n\t\t\t\"yellow\",\n\t\t\t1,\n\t\t\t\"red\"\n\t\t],\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"heatmap-density\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t},\n\t\"heatmap-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_symbol = {\n\t\"icon-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"icon-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\toverridable: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"text-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_raster = {\n\t\"raster-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-hue-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\ttransition: true,\n\t\tunits: \"degrees\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-min\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-max\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-saturation\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-contrast\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-resampling\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tlinear: {\n\t\t\t},\n\t\t\tnearest: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"linear\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-fade-duration\": {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tunits: \"milliseconds\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_hillshade = {\n\t\"hillshade-illumination-direction\": {\n\t\ttype: \"numberArray\",\n\t\t\"default\": 335,\n\t\tminimum: 0,\n\t\tmaximum: 359,\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-illumination-altitude\": {\n\t\ttype: \"numberArray\",\n\t\t\"default\": 45,\n\t\tminimum: 0,\n\t\tmaximum: 90,\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-illumination-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-exaggeration\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-shadow-color\": {\n\t\ttype: \"colorArray\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-highlight-color\": {\n\t\ttype: \"colorArray\",\n\t\t\"default\": \"#FFFFFF\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-accent-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-method\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tstandard: {\n\t\t\t},\n\t\t\tbasic: {\n\t\t\t},\n\t\t\tcombined: {\n\t\t\t},\n\t\t\tigor: {\n\t\t\t},\n\t\t\tmultidirectional: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"standard\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_background = {\n\t\"background-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"background-pattern\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"background-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"background-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar transition = {\n\tduration: {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\"\n\t},\n\tdelay: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\"\n\t}\n};\nvar promoteId = {\n\t\"*\": {\n\t\ttype: \"string\"\n\t}\n};\nvar interpolation = {\n\ttype: \"array\",\n\tvalue: \"interpolation_name\",\n\tminimum: 1\n};\nvar interpolation_name = {\n\ttype: \"enum\",\n\tvalues: {\n\t\tlinear: {\n\t\t\tsyntax: {\n\t\t\t\toverloads: [\n\t\t\t\t\t{\n\t\t\t\t\t\tparameters: [\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"output-type\": \"interpolation\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tparameters: [\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\texponential: {\n\t\t\tsyntax: {\n\t\t\t\toverloads: [\n\t\t\t\t\t{\n\t\t\t\t\t\tparameters: [\n\t\t\t\t\t\t\t\"base\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"output-type\": \"interpolation\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tparameters: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"base\",\n\t\t\t\t\t\ttype: \"number literal\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"cubic-bezier\": {\n\t\t\tsyntax: {\n\t\t\t\toverloads: [\n\t\t\t\t\t{\n\t\t\t\t\t\tparameters: [\n\t\t\t\t\t\t\t\"x1\",\n\t\t\t\t\t\t\t\"y1\",\n\t\t\t\t\t\t\t\"x2\",\n\t\t\t\t\t\t\t\"y2\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"output-type\": \"interpolation\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tparameters: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"x1\",\n\t\t\t\t\t\ttype: \"number literal\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"y1\",\n\t\t\t\t\t\ttype: \"number literal\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"x2\",\n\t\t\t\t\t\ttype: \"number literal\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"y2\",\n\t\t\t\t\t\ttype: \"number literal\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t}\n};\nvar v8Spec = {\n\t$version: $version,\n\t$root: $root,\n\tsources: sources,\n\tsource: source,\n\tsource_vector: source_vector,\n\tsource_raster: source_raster,\n\tsource_raster_dem: source_raster_dem,\n\tsource_geojson: source_geojson,\n\tsource_video: source_video,\n\tsource_image: source_image,\n\tlayer: layer,\n\tlayout: layout,\n\tlayout_background: layout_background,\n\tlayout_fill: layout_fill,\n\tlayout_circle: layout_circle,\n\tlayout_heatmap: layout_heatmap,\n\t\"layout_fill-extrusion\": {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tlayout_line: layout_line,\n\tlayout_symbol: layout_symbol,\n\tlayout_raster: layout_raster,\n\tlayout_hillshade: layout_hillshade,\n\t\"layout_color-relief\": {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t},\n\t\t\tnone: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"global-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tfilter: filter,\n\tfilter_operator: filter_operator,\n\tgeometry_type: geometry_type,\n\t\"function\": {\n\texpression: {\n\t\ttype: \"expression\"\n\t},\n\tstops: {\n\t\ttype: \"array\",\n\t\tvalue: \"function_stop\"\n\t},\n\tbase: {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0\n\t},\n\tproperty: {\n\t\ttype: \"string\",\n\t\t\"default\": \"$zoom\"\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tidentity: {\n\t\t\t},\n\t\t\texponential: {\n\t\t\t},\n\t\t\tinterval: {\n\t\t\t},\n\t\t\tcategorical: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"exponential\"\n\t},\n\tcolorSpace: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\trgb: {\n\t\t\t},\n\t\t\tlab: {\n\t\t\t},\n\t\t\thcl: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"rgb\"\n\t},\n\t\"default\": {\n\t\ttype: \"*\",\n\t\trequired: false\n\t}\n},\n\tfunction_stop: function_stop,\n\texpression: expression$1,\n\tlight: light,\n\tsky: sky,\n\tterrain: terrain,\n\tprojection: projection,\n\tpaint: paint,\n\tpaint_fill: paint_fill,\n\t\"paint_fill-extrusion\": {\n\t\"fill-extrusion-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-extrusion-pattern\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-extrusion-translate\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"fill-extrusion-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-base\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"fill-extrusion-height\"\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-vertical-gradient\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tpaint_line: paint_line,\n\tpaint_circle: paint_circle,\n\tpaint_heatmap: paint_heatmap,\n\tpaint_symbol: paint_symbol,\n\tpaint_raster: paint_raster,\n\tpaint_hillshade: paint_hillshade,\n\t\"paint_color-relief\": {\n\t\"color-relief-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"color-relief-color\": {\n\t\ttype: \"color\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"elevation\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t}\n},\n\tpaint_background: paint_background,\n\ttransition: transition,\n\t\"property-type\": {\n\t\"data-driven\": {\n\t\ttype: \"property-type\"\n\t},\n\t\"cross-faded\": {\n\t\ttype: \"property-type\"\n\t},\n\t\"cross-faded-data-driven\": {\n\t\ttype: \"property-type\"\n\t},\n\t\"color-ramp\": {\n\t\ttype: \"property-type\"\n\t},\n\t\"data-constant\": {\n\t\ttype: \"property-type\"\n\t},\n\tconstant: {\n\t\ttype: \"property-type\"\n\t}\n},\n\tpromoteId: promoteId,\n\tinterpolation: interpolation,\n\tinterpolation_name: interpolation_name\n};\n\nconst refProperties = [\n 'type',\n 'source',\n 'source-layer',\n 'minzoom',\n 'maxzoom',\n 'filter',\n 'layout'\n];\n\nfunction deref(layer, parent) {\n const result = {};\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n return result;\n}\n/**\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @param layers - array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property\n * @returns a new array where such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n */\nfunction derefLayers(layers) {\n layers = layers.slice();\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[layers[i].ref]);\n }\n }\n return layers;\n}\n\n/**\n * Deeply compares two object literals.\n *\n * @private\n */\nfunction deepEqual(a, b) {\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i]))\n return false;\n }\n return true;\n }\n if (typeof a === 'object' && a !== null && b !== null) {\n if (!(typeof b === 'object'))\n return false;\n const keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!deepEqual(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a === b;\n}\n\n/**\n * The main reason for this method is to allow type check when adding a command to the array.\n * @param commands - The commands array to add to\n * @param command - The command to add\n */\nfunction addCommand(commands, command) {\n commands.push(command);\n}\nfunction addSource(sourceId, after, commands) {\n addCommand(commands, { command: 'addSource', args: [sourceId, after[sourceId]] });\n}\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n addCommand(commands, { command: 'removeSource', args: [sourceId] });\n sourcesRemoved[sourceId] = true;\n}\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n removeSource(sourceId, commands, sourcesRemoved);\n addSource(sourceId, after, commands);\n}\nfunction canUpdateGeoJSON(before, after, sourceId) {\n let prop;\n for (prop in before[sourceId]) {\n if (!Object.prototype.hasOwnProperty.call(before[sourceId], prop))\n continue;\n if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n for (prop in after[sourceId]) {\n if (!Object.prototype.hasOwnProperty.call(after[sourceId], prop))\n continue;\n if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n return true;\n}\nfunction diffSources(before, after, commands, sourcesRemoved) {\n before = before || {};\n after = after || {};\n let sourceId;\n // look for sources to remove\n for (sourceId in before) {\n if (!Object.prototype.hasOwnProperty.call(before, sourceId))\n continue;\n if (!Object.prototype.hasOwnProperty.call(after, sourceId)) {\n removeSource(sourceId, commands, sourcesRemoved);\n }\n }\n // look for sources to add/update\n for (sourceId in after) {\n if (!Object.prototype.hasOwnProperty.call(after, sourceId))\n continue;\n if (!Object.prototype.hasOwnProperty.call(before, sourceId)) {\n addSource(sourceId, after, commands);\n }\n else if (!deepEqual(before[sourceId], after[sourceId])) {\n if (before[sourceId].type === 'geojson' &&\n after[sourceId].type === 'geojson' &&\n canUpdateGeoJSON(before, after, sourceId)) {\n addCommand(commands, {\n command: 'setGeoJSONSourceData',\n args: [sourceId, after[sourceId].data]\n });\n }\n else {\n // no update command, must remove then add\n updateSource(sourceId, after, commands, sourcesRemoved);\n }\n }\n }\n}\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n before = before || {};\n after = after || {};\n for (const prop in before) {\n if (!Object.prototype.hasOwnProperty.call(before, prop))\n continue;\n if (!deepEqual(before[prop], after[prop])) {\n commands.push({ command, args: [layerId, prop, after[prop], klass] });\n }\n }\n for (const prop in after) {\n if (!Object.prototype.hasOwnProperty.call(after, prop) ||\n Object.prototype.hasOwnProperty.call(before, prop))\n continue;\n if (!deepEqual(before[prop], after[prop])) {\n commands.push({ command, args: [layerId, prop, after[prop], klass] });\n }\n }\n}\nfunction pluckId(layer) {\n return layer.id;\n}\nfunction indexById(group, layer) {\n group[layer.id] = layer;\n return group;\n}\nfunction diffLayers(before, after, commands) {\n before = before || [];\n after = after || [];\n // order of layers by id\n const beforeOrder = before.map(pluckId);\n const afterOrder = after.map(pluckId);\n // index of layer by id\n const beforeIndex = before.reduce(indexById, {});\n const afterIndex = after.reduce(indexById, {});\n // track order of layers as if they have been mutated\n const tracker = beforeOrder.slice();\n // layers that have been added do not need to be diffed\n const clean = Object.create(null);\n let layerId;\n let beforeLayer;\n let afterLayer;\n let insertBeforeLayerId;\n let prop;\n // remove layers\n for (let i = 0, d = 0; i < beforeOrder.length; i++) {\n layerId = beforeOrder[i];\n if (!Object.prototype.hasOwnProperty.call(afterIndex, layerId)) {\n addCommand(commands, { command: 'removeLayer', args: [layerId] });\n tracker.splice(tracker.indexOf(layerId, d), 1);\n }\n else {\n // limit where in tracker we need to look for a match\n d++;\n }\n }\n // add/reorder layers\n for (let i = 0, d = 0; i < afterOrder.length; i++) {\n // work backwards as insert is before an existing layer\n layerId = afterOrder[afterOrder.length - 1 - i];\n if (tracker[tracker.length - 1 - i] === layerId)\n continue;\n if (Object.prototype.hasOwnProperty.call(beforeIndex, layerId)) {\n // remove the layer before we insert at the correct position\n addCommand(commands, { command: 'removeLayer', args: [layerId] });\n tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n }\n else {\n // limit where in tracker we need to look for a match\n d++;\n }\n // add layer at correct position\n insertBeforeLayerId = tracker[tracker.length - i];\n addCommand(commands, {\n command: 'addLayer',\n args: [afterIndex[layerId], insertBeforeLayerId]\n });\n tracker.splice(tracker.length - i, 0, layerId);\n clean[layerId] = true;\n }\n // update layers\n for (let i = 0; i < afterOrder.length; i++) {\n layerId = afterOrder[i];\n beforeLayer = beforeIndex[layerId];\n afterLayer = afterIndex[layerId];\n // no need to update if previously added (new or moved)\n if (clean[layerId] || deepEqual(beforeLayer, afterLayer))\n continue;\n // If source, source-layer, or type have changes, then remove the layer\n // and add it back 'from scratch'.\n if (!deepEqual(beforeLayer.source, afterLayer.source) ||\n !deepEqual(beforeLayer['source-layer'], afterLayer['source-layer']) ||\n !deepEqual(beforeLayer.type, afterLayer.type)) {\n addCommand(commands, { command: 'removeLayer', args: [layerId] });\n // we add the layer back at the same position it was already in, so\n // there's no need to update the `tracker`\n insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n addCommand(commands, { command: 'addLayer', args: [afterLayer, insertBeforeLayerId] });\n continue;\n }\n // layout, paint, filter, minzoom, maxzoom\n diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, 'setLayoutProperty');\n diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, 'setPaintProperty');\n if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {\n addCommand(commands, { command: 'setFilter', args: [layerId, afterLayer.filter] });\n }\n if (!deepEqual(beforeLayer.minzoom, afterLayer.minzoom) ||\n !deepEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n addCommand(commands, {\n command: 'setLayerZoomRange',\n args: [layerId, afterLayer.minzoom, afterLayer.maxzoom]\n });\n }\n // handle all other layer props, including paint.*\n for (prop in beforeLayer) {\n if (!Object.prototype.hasOwnProperty.call(beforeLayer, prop))\n continue;\n if (prop === 'layout' ||\n prop === 'paint' ||\n prop === 'filter' ||\n prop === 'metadata' ||\n prop === 'minzoom' ||\n prop === 'maxzoom')\n continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), 'setPaintProperty');\n }\n else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n addCommand(commands, {\n command: 'setLayerProperty',\n args: [layerId, prop, afterLayer[prop]]\n });\n }\n }\n for (prop in afterLayer) {\n if (!Object.prototype.hasOwnProperty.call(afterLayer, prop) ||\n Object.prototype.hasOwnProperty.call(beforeLayer, prop))\n continue;\n if (prop === 'layout' ||\n prop === 'paint' ||\n prop === 'filter' ||\n prop === 'metadata' ||\n prop === 'minzoom' ||\n prop === 'maxzoom')\n continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), 'setPaintProperty');\n }\n else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n addCommand(commands, {\n command: 'setLayerProperty',\n args: [layerId, prop, afterLayer[prop]]\n });\n }\n }\n }\n}\n/**\n * Diff two stylesheet\n *\n * Creates semanticly aware diffs that can easily be applied at runtime.\n * Operations produced by the diff closely resemble the maplibre-gl-js API. Any\n * error creating the diff will fall back to the 'setStyle' operation.\n *\n * Example diff:\n * [\n * { command: 'setConstant', args: ['@water', '#0000FF'] },\n * { command: 'setPaintProperty', args: ['background', 'background-color', 'black'] }\n * ]\n *\n * @private\n * @param {*} [before] stylesheet to compare from\n * @param {*} after stylesheet to compare to\n * @returns Array list of changes\n */\nfunction diff(before, after) {\n if (!before)\n return [{ command: 'setStyle', args: [after] }];\n let commands = [];\n try {\n // Handle changes to top-level properties\n if (!deepEqual(before.version, after.version)) {\n return [{ command: 'setStyle', args: [after] }];\n }\n if (!deepEqual(before.center, after.center)) {\n commands.push({ command: 'setCenter', args: [after.center] });\n }\n if (!deepEqual(before.state, after.state)) {\n commands.push({ command: 'setGlobalState', args: [after.state] });\n }\n if (!deepEqual(before.centerAltitude, after.centerAltitude)) {\n commands.push({ command: 'setCenterAltitude', args: [after.centerAltitude] });\n }\n if (!deepEqual(before.zoom, after.zoom)) {\n commands.push({ command: 'setZoom', args: [after.zoom] });\n }\n if (!deepEqual(before.bearing, after.bearing)) {\n commands.push({ command: 'setBearing', args: [after.bearing] });\n }\n if (!deepEqual(before.pitch, after.pitch)) {\n commands.push({ command: 'setPitch', args: [after.pitch] });\n }\n if (!deepEqual(before.roll, after.roll)) {\n commands.push({ command: 'setRoll', args: [after.roll] });\n }\n if (!deepEqual(before.sprite, after.sprite)) {\n commands.push({ command: 'setSprite', args: [after.sprite] });\n }\n if (!deepEqual(before.glyphs, after.glyphs)) {\n commands.push({ command: 'setGlyphs', args: [after.glyphs] });\n }\n if (!deepEqual(before.transition, after.transition)) {\n commands.push({ command: 'setTransition', args: [after.transition] });\n }\n if (!deepEqual(before.light, after.light)) {\n commands.push({ command: 'setLight', args: [after.light] });\n }\n if (!deepEqual(before.terrain, after.terrain)) {\n commands.push({ command: 'setTerrain', args: [after.terrain] });\n }\n if (!deepEqual(before.sky, after.sky)) {\n commands.push({ command: 'setSky', args: [after.sky] });\n }\n if (!deepEqual(before.projection, after.projection)) {\n commands.push({ command: 'setProjection', args: [after.projection] });\n }\n // Handle changes to `sources`\n // If a source is to be removed, we also--before the removeSource\n // command--need to remove all the style layers that depend on it.\n const sourcesRemoved = {};\n // First collect the {add,remove}Source commands\n const removeOrAddSourceCommands = [];\n diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n // Push a removeLayer command for each style layer that depends on a\n // source that's being removed.\n // Also, exclude any such layers them from the input to `diffLayers`\n // below, so that diffLayers produces the appropriate `addLayers`\n // command\n const beforeLayers = [];\n if (before.layers) {\n before.layers.forEach((layer) => {\n if ('source' in layer && sourcesRemoved[layer.source]) {\n commands.push({ command: 'removeLayer', args: [layer.id] });\n }\n else {\n beforeLayers.push(layer);\n }\n });\n }\n commands = commands.concat(removeOrAddSourceCommands);\n // Handle changes to `layers`\n diffLayers(beforeLayers, after.layers, commands);\n }\n catch (e) {\n // fall back to setStyle\n console.warn('Unable to compute style diff:', e);\n commands = [{ command: 'setStyle', args: [after] }];\n }\n return commands;\n}\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\nclass ValidationError {\n constructor(key, value, message, identifier) {\n this.message = (key ? `${key}: ` : '') + message;\n if (identifier)\n this.identifier = identifier;\n if (value !== null && value !== undefined && value.__line__) {\n this.line = value.__line__;\n }\n }\n}\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\nclass ParsingError {\n constructor(error) {\n this.error = error;\n this.message = error.message;\n const match = error.message.match(/line (\\d+)/);\n this.line = match ? parseInt(match[1], 10) : 0;\n }\n}\n\nfunction extendBy(output, ...inputs) {\n for (const input of inputs) {\n for (const k in input) {\n output[k] = input[k];\n }\n }\n return output;\n}\n\nclass ExpressionParsingError extends Error {\n constructor(key, message) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n constructor(parent, bindings = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n concat(bindings) {\n return new Scope(this, bindings);\n }\n get(name) {\n if (this.bindings[name]) {\n return this.bindings[name];\n }\n if (this.parent) {\n return this.parent.get(name);\n }\n throw new Error(`${name} not found in scope.`);\n }\n has(name) {\n if (this.bindings[name])\n return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nconst NullType = { kind: 'null' };\nconst NumberType = { kind: 'number' };\nconst StringType = { kind: 'string' };\nconst BooleanType = { kind: 'boolean' };\nconst ColorType = { kind: 'color' };\nconst ProjectionDefinitionType = {\n kind: 'projectionDefinition'\n};\nconst ObjectType = { kind: 'object' };\nconst ValueType = { kind: 'value' };\nconst ErrorType = { kind: 'error' };\nconst CollatorType = { kind: 'collator' };\nconst FormattedType = { kind: 'formatted' };\nconst PaddingType = { kind: 'padding' };\nconst ColorArrayType = { kind: 'colorArray' };\nconst NumberArrayType = { kind: 'numberArray' };\nconst ResolvedImageType = { kind: 'resolvedImage' };\nconst VariableAnchorOffsetCollectionType = {\n kind: 'variableAnchorOffsetCollection'\n};\nfunction array(itemType, N) {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\nfunction typeToString(type) {\n if (type.kind === 'array') {\n const itemType = typeToString(type.itemType);\n return typeof type.N === 'number'\n ? `array<${itemType}, ${type.N}>`\n : type.itemType.kind === 'value'\n ? 'array'\n : `array<${itemType}>`;\n }\n else {\n return type.kind;\n }\n}\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ProjectionDefinitionType,\n FormattedType,\n ObjectType,\n array(ValueType),\n PaddingType,\n NumberArrayType,\n ColorArrayType,\n ResolvedImageType,\n VariableAnchorOffsetCollectionType\n];\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nfunction checkSubtype(expected, t) {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n }\n else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') ||\n !checkSubtype(expected.itemType, t.itemType)) &&\n (typeof expected.N !== 'number' || expected.N === t.N)) {\n return null;\n }\n }\n else if (expected.kind === t.kind) {\n return null;\n }\n else if (expected.kind === 'value') {\n for (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n return `Expected ${typeToString(expected)} but found ${typeToString(t)} instead.`;\n}\nfunction isValidType(provided, allowedTypes) {\n return allowedTypes.some((t) => t.kind === provided.kind);\n}\nfunction isValidNativeType(provided, allowedTypes) {\n return allowedTypes.some((t) => {\n if (t === 'null') {\n return provided === null;\n }\n else if (t === 'array') {\n return Array.isArray(provided);\n }\n else if (t === 'object') {\n return provided && !Array.isArray(provided) && typeof provided === 'object';\n }\n else {\n return t === typeof provided;\n }\n });\n}\n/**\n * Verify whether the specified type is of the same type as the specified sample.\n *\n * @param provided Type to verify\n * @param sample Sample type to reference\n * @returns `true` if both objects are of the same type, `false` otherwise\n * @example basic types\n * if (verifyType(outputType, ValueType)) {\n * // type narrowed to:\n * outputType.kind; // 'value'\n * }\n * @example array types\n * if (verifyType(outputType, array(NumberType))) {\n * // type narrowed to:\n * outputType.kind; // 'array'\n * outputType.itemType; // NumberTypeT\n * outputType.itemType.kind; // 'number'\n * }\n */\nfunction verifyType(provided, sample) {\n if (provided.kind === 'array' && sample.kind === 'array') {\n return provided.itemType.kind === sample.itemType.kind && typeof provided.N === 'number';\n }\n return provided.kind === sample.kind;\n}\n\n// See https://observablehq.com/@mbostock/lab-and-rgb\nconst Xn = 0.96422, Yn = 1, Zn = 0.82521, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;\nfunction constrainAngle(angle) {\n angle = angle % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\nfunction rgbToLab([r, g, b, alpha]) {\n r = rgb2xyz(r);\n g = rgb2xyz(g);\n b = rgb2xyz(b);\n let x, z;\n const y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn);\n if (r === g && g === b) {\n x = z = y;\n }\n else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n const l = 116 * y - 16;\n return [l < 0 ? 0 : l, 500 * (x - y), 200 * (y - z), alpha];\n}\nfunction rgb2xyz(x) {\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\nfunction labToRgb([l, a, b, alpha]) {\n let y = (l + 16) / 116, x = isNaN(a) ? y : y + a / 500, z = isNaN(b) ? y : y - b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return [\n xyz2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), // D50 -> sRGB\n xyz2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z),\n xyz2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n alpha\n ];\n}\nfunction xyz2rgb(x) {\n x = x <= 0.00304 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;\n return x < 0 ? 0 : x > 1 ? 1 : x; // clip to 0..1 range\n}\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\nfunction rgbToHcl(rgbColor) {\n const [l, a, b, alpha] = rgbToLab(rgbColor);\n const c = Math.sqrt(a * a + b * b);\n const h = Math.round(c * 10000) ? constrainAngle(Math.atan2(b, a) * rad2deg) : NaN;\n return [h, c, l, alpha];\n}\nfunction hclToRgb([h, c, l, alpha]) {\n h = isNaN(h) ? 0 : h * deg2rad;\n return labToRgb([l, Math.cos(h) * c, Math.sin(h) * c, alpha]);\n}\n// https://drafts.csswg.org/css-color-4/#hsl-to-rgb\nfunction hslToRgb([h, s, l, alpha]) {\n h = constrainAngle(h);\n s /= 100;\n l /= 100;\n function f(n) {\n const k = (n + h / 30) % 12;\n const a = s * Math.min(l, 1 - l);\n return l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));\n }\n return [f(0), f(8), f(4), alpha];\n}\n\n// polyfill for Object.hasOwn\nconst hasOwnProperty = Object.hasOwn ||\n function hasOwnProperty(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n };\nfunction getOwn(object, key) {\n return hasOwnProperty(object, key) ? object[key] : undefined;\n}\n\n/**\n * CSS color parser compliant with CSS Color 4 Specification.\n * Supports: named colors, `transparent` keyword, all rgb hex notations,\n * rgb(), rgba(), hsl() and hsla() functions.\n * Does not round the parsed values to integers from the range 0..255.\n *\n * Syntax:\n *\n * = | \n * = | \n *\n * rgb() = rgb( {3} [ / ]? ) | rgb( {3} [ / ]? )\n * rgb() = rgb( #{3} , ? ) | rgb( #{3} , ? )\n *\n * hsl() = hsl( [ / ]? )\n * hsl() = hsl( , , , ? )\n *\n * Caveats:\n * - - with optional `deg` suffix; `grad`, `rad`, `turn` are not supported\n * - `none` keyword is not supported\n * - comments inside rgb()/hsl() are not supported\n * - legacy color syntax rgba() is supported with an identical grammar and behavior to rgb()\n * - legacy color syntax hsla() is supported with an identical grammar and behavior to hsl()\n *\n * @param input CSS color string to parse.\n * @returns Color in sRGB color space, with `red`, `green`, `blue`\n * and `alpha` channels normalized to the range 0..1,\n * or `undefined` if the input is not a valid color string.\n */\nfunction parseCssColor(input) {\n input = input.toLowerCase().trim();\n if (input === 'transparent') {\n return [0, 0, 0, 0];\n }\n // 'white', 'black', 'blue'\n const namedColorsMatch = getOwn(namedColors, input);\n if (namedColorsMatch) {\n const [r, g, b] = namedColorsMatch;\n return [r / 255, g / 255, b / 255, 1];\n }\n // #f0c, #f0cf, #ff00cc, #ff00ccff\n if (input.startsWith('#')) {\n const hexRegexp = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/;\n if (hexRegexp.test(input)) {\n const step = input.length < 6 ? 1 : 2;\n let i = 1;\n return [\n parseHex(input.slice(i, (i += step))),\n parseHex(input.slice(i, (i += step))),\n parseHex(input.slice(i, (i += step))),\n parseHex(input.slice(i, i + step) || 'ff')\n ];\n }\n }\n // rgb(128 0 0), rgb(50% 0% 0%), rgba(255,0,255,0.6), rgb(255 0 255 / 60%), rgb(100% 0% 100% /.6)\n if (input.startsWith('rgb')) {\n const rgbRegExp = /^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/;\n const rgbMatch = input.match(rgbRegExp);\n if (rgbMatch) {\n const [_, // eslint-disable-line @typescript-eslint/no-unused-vars\n r, // \n rp, // % (optional)\n f1, // , (optional)\n g, // \n gp, // % (optional)\n f2, // , (optional)\n b, // \n bp, // % (optional)\n f3, // ,|/ (optional)\n a, // (optional)\n ap // % (optional)\n ] = rgbMatch;\n const argFormat = [f1 || ' ', f2 || ' ', f3].join('');\n if (argFormat === ' ' ||\n argFormat === ' /' ||\n argFormat === ',,' ||\n argFormat === ',,,') {\n const valFormat = [rp, gp, bp].join('');\n const maxValue = valFormat === '%%%' ? 100 : valFormat === '' ? 255 : 0;\n if (maxValue) {\n const rgba = [\n clamp(+r / maxValue, 0, 1),\n clamp(+g / maxValue, 0, 1),\n clamp(+b / maxValue, 0, 1),\n a ? parseAlpha(+a, ap) : 1\n ];\n if (validateNumbers(rgba)) {\n return rgba;\n }\n // invalid numbers\n }\n // values must be all numbers or all percentages\n }\n return; // comma optional syntax requires no commas at all\n }\n }\n // hsl(120 50% 80%), hsla(120deg,50%,80%,.9), hsl(12e1 50% 80% / 90%)\n const hslRegExp = /^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/;\n const hslMatch = input.match(hslRegExp);\n if (hslMatch) {\n const [_, // eslint-disable-line @typescript-eslint/no-unused-vars\n h, // \n f1, // , (optional)\n s, // \n f2, // , (optional)\n l, // \n f3, // ,|/ (optional)\n a, // (optional)\n ap // % (optional)\n ] = hslMatch;\n const argFormat = [f1 || ' ', f2 || ' ', f3].join('');\n if (argFormat === ' ' ||\n argFormat === ' /' ||\n argFormat === ',,' ||\n argFormat === ',,,') {\n const hsla = [\n +h,\n clamp(+s, 0, 100),\n clamp(+l, 0, 100),\n a ? parseAlpha(+a, ap) : 1\n ];\n if (validateNumbers(hsla)) {\n return hslToRgb(hsla);\n }\n // invalid numbers\n }\n // comma optional syntax requires no commas at all\n }\n}\nfunction parseHex(hex) {\n return parseInt(hex.padEnd(2, hex), 16) / 255;\n}\nfunction parseAlpha(a, asPercentage) {\n return clamp(asPercentage ? a / 100 : a, 0, 1);\n}\nfunction clamp(n, min, max) {\n return Math.min(Math.max(min, n), max);\n}\n/**\n * The regular expression for numeric values is not super specific, and it may\n * happen that it will accept a value that is not a valid number. In order to\n * detect and eliminate such values this function exists.\n *\n * @param array Array of uncertain numbers.\n * @returns `true` if the specified array contains only valid numbers, `false` otherwise.\n */\nfunction validateNumbers(array) {\n return !array.some(Number.isNaN);\n}\n/**\n * To generate:\n * - visit {@link https://www.w3.org/TR/css-color-4/#named-colors}\n * - run in the console:\n * @example\n * copy(`{\\n${[...document.querySelector('.named-color-table tbody').children].map((tr) => `${tr.cells[2].textContent.trim()}: [${tr.cells[4].textContent.trim().split(/\\s+/).join(', ')}],`).join('\\n')}\\n}`);\n */\nconst namedColors = {\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 134, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 250, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n grey: [128, 128, 128],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 221],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n rebeccapurple: [102, 51, 153],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [112, 128, 144],\n slategrey: [112, 128, 144],\n snow: [255, 250, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 50]\n};\n\nfunction interpolateNumber(from, to, t) {\n return from + t * (to - from);\n}\nfunction interpolateArray(from, to, t) {\n return from.map((d, i) => {\n return interpolateNumber(d, to[i], t);\n });\n}\n\n/**\n * Checks whether the specified color space is one of the supported interpolation color spaces.\n *\n * @param colorSpace Color space key to verify.\n * @returns `true` if the specified color space is one of the supported\n * interpolation color spaces, `false` otherwise\n */\nfunction isSupportedInterpolationColorSpace(colorSpace) {\n return colorSpace === 'rgb' || colorSpace === 'hcl' || colorSpace === 'lab';\n}\n/**\n * Color representation used by WebGL.\n * Defined in sRGB color space and pre-blended with alpha.\n * @private\n */\nclass Color {\n /**\n * @param r Red component premultiplied by `alpha` 0..1\n * @param g Green component premultiplied by `alpha` 0..1\n * @param b Blue component premultiplied by `alpha` 0..1\n * @param [alpha=1] Alpha component 0..1\n * @param [premultiplied=true] Whether the `r`, `g` and `b` values have already\n * been multiplied by alpha. If `true` nothing happens if `false` then they will\n * be multiplied automatically.\n */\n constructor(r, g, b, alpha = 1, premultiplied = true) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = alpha;\n if (!premultiplied) {\n this.r *= alpha;\n this.g *= alpha;\n this.b *= alpha;\n if (!alpha) {\n // alpha = 0 erases completely rgb channels. This behavior is not desirable\n // if this particular color is later used in color interpolation.\n // Because of that, a reference to original color is saved.\n this.overwriteGetter('rgb', [r, g, b, alpha]);\n }\n }\n }\n /**\n * Parses CSS color strings and converts colors to sRGB color space if needed.\n * Officially supported color formats:\n * - keyword, e.g. 'aquamarine' or 'steelblue'\n * - hex (with 3, 4, 6 or 8 digits), e.g. '#f0f' or '#e9bebea9'\n * - rgb and rgba, e.g. 'rgb(0,240,120)' or 'rgba(0%,94%,47%,0.1)' or 'rgb(0 240 120 / .3)'\n * - hsl and hsla, e.g. 'hsl(0,0%,83%)' or 'hsla(0,0%,83%,.5)' or 'hsl(0 0% 83% / 20%)'\n *\n * @param input CSS color string to parse.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input) {\n // in zoom-and-property function input could be an instance of Color class\n if (input instanceof Color) {\n return input;\n }\n if (typeof input !== 'string') {\n return;\n }\n const rgba = parseCssColor(input);\n if (rgba) {\n return new Color(...rgba, false);\n }\n }\n /**\n * Used in color interpolation and by 'to-rgba' expression.\n *\n * @returns Gien color, with reversed alpha blending, in sRGB color space.\n */\n get rgb() {\n const { r, g, b, a } = this;\n const f = a || Infinity; // reverse alpha blending factor\n return this.overwriteGetter('rgb', [r / f, g / f, b / f, a]);\n }\n /**\n * Used in color interpolation.\n *\n * @returns Gien color, with reversed alpha blending, in HCL color space.\n */\n get hcl() {\n return this.overwriteGetter('hcl', rgbToHcl(this.rgb));\n }\n /**\n * Used in color interpolation.\n *\n * @returns Gien color, with reversed alpha blending, in LAB color space.\n */\n get lab() {\n return this.overwriteGetter('lab', rgbToLab(this.rgb));\n }\n /**\n * Lazy getter pattern. When getter is called for the first time lazy value\n * is calculated and then overwrites getter function in given object instance.\n *\n * @example:\n * const redColor = Color.parse('red');\n * let x = redColor.hcl; // this will invoke `get hcl()`, which will calculate\n * // the value of red in HCL space and invoke this `overwriteGetter` function\n * // which in turn will set a field with a key 'hcl' in the `redColor` object.\n * // In other words it will override `get hcl()` from its `Color` prototype\n * // with its own property: hcl = [calculated red value in hcl].\n * let y = redColor.hcl; // next call will no longer invoke getter but simply\n * // return the previously calculated value\n * x === y; // true - `x` is exactly the same object as `y`\n *\n * @param getterKey Getter key\n * @param lazyValue Lazily calculated value to be memoized by current instance\n * @private\n */\n overwriteGetter(getterKey, lazyValue) {\n Object.defineProperty(this, getterKey, { value: lazyValue });\n return lazyValue;\n }\n /**\n * Used by 'to-string' expression.\n *\n * @returns Serialized color in format `rgba(r,g,b,a)`\n * where r,g,b are numbers within 0..255 and alpha is number within 1..0\n *\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString() {\n const [r, g, b, a] = this.rgb;\n return `rgba(${[r, g, b].map((n) => Math.round(n * 255)).join(',')},${a})`;\n }\n static interpolate(from, to, t, spaceKey = 'rgb') {\n switch (spaceKey) {\n case 'rgb': {\n const [r, g, b, alpha] = interpolateArray(from.rgb, to.rgb, t);\n return new Color(r, g, b, alpha, false);\n }\n case 'hcl': {\n const [hue0, chroma0, light0, alphaF] = from.hcl;\n const [hue1, chroma1, light1, alphaT] = to.hcl;\n // https://github.com/gka/chroma.js/blob/cd1b3c0926c7a85cbdc3b1453b3a94006de91a92/src/interpolator/_hsx.js\n let hue, chroma;\n if (!isNaN(hue0) && !isNaN(hue1)) {\n let dh = hue1 - hue0;\n if (hue1 > hue0 && dh > 180) {\n dh -= 360;\n }\n else if (hue1 < hue0 && hue0 - hue1 > 180) {\n dh += 360;\n }\n hue = hue0 + t * dh;\n }\n else if (!isNaN(hue0)) {\n hue = hue0;\n if (light1 === 1 || light1 === 0)\n chroma = chroma0;\n }\n else if (!isNaN(hue1)) {\n hue = hue1;\n if (light0 === 1 || light0 === 0)\n chroma = chroma1;\n }\n else {\n hue = NaN;\n }\n const [r, g, b, alpha] = hclToRgb([\n hue,\n chroma !== null && chroma !== void 0 ? chroma : interpolateNumber(chroma0, chroma1, t),\n interpolateNumber(light0, light1, t),\n interpolateNumber(alphaF, alphaT, t)\n ]);\n return new Color(r, g, b, alpha, false);\n }\n case 'lab': {\n const [r, g, b, alpha] = labToRgb(interpolateArray(from.lab, to.lab, t));\n return new Color(r, g, b, alpha, false);\n }\n }\n }\n}\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\n\nclass Collator {\n constructor(caseSensitive, diacriticSensitive, locale) {\n if (caseSensitive)\n this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n else\n this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n this.locale = locale;\n this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n sensitivity: this.sensitivity,\n usage: 'search'\n });\n }\n compare(lhs, rhs) {\n return this.collator.compare(lhs, rhs);\n }\n resolvedLocale() {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n }\n}\n\nconst VERTICAL_ALIGN_OPTIONS = ['bottom', 'center', 'top'];\nclass FormattedSection {\n constructor(text, image, scale, fontStack, textColor, verticalAlign) {\n this.text = text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n this.verticalAlign = verticalAlign;\n }\n}\nclass Formatted {\n constructor(sections) {\n this.sections = sections;\n }\n static fromString(unformatted) {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null, null)]);\n }\n isEmpty() {\n if (this.sections.length === 0)\n return true;\n return !this.sections.some((section) => section.text.length !== 0 || (section.image && section.image.name.length !== 0));\n }\n static factory(text) {\n if (text instanceof Formatted) {\n return text;\n }\n else {\n return Formatted.fromString(text);\n }\n }\n toString() {\n if (this.sections.length === 0)\n return '';\n return this.sections.map((section) => section.text).join('');\n }\n}\n\n/**\n * A set of four numbers representing padding around a box. Create instances from\n * bare arrays or numeric values using the static method `Padding.parse`.\n * @private\n */\nclass Padding {\n constructor(values) {\n this.values = values.slice();\n }\n /**\n * Numeric padding values\n * @param input A padding value\n * @returns A `Padding` instance, or `undefined` if the input is not a valid padding value.\n */\n static parse(input) {\n if (input instanceof Padding) {\n return input;\n }\n // Backwards compatibility: bare number is treated the same as array with single value.\n // Padding applies to all four sides.\n if (typeof input === 'number') {\n return new Padding([input, input, input, input]);\n }\n if (!Array.isArray(input)) {\n return undefined;\n }\n if (input.length < 1 || input.length > 4) {\n return undefined;\n }\n for (const val of input) {\n if (typeof val !== 'number') {\n return undefined;\n }\n }\n // Expand shortcut properties into explicit 4-sided values\n switch (input.length) {\n case 1:\n input = [input[0], input[0], input[0], input[0]];\n break;\n case 2:\n input = [input[0], input[1], input[0], input[1]];\n break;\n case 3:\n input = [input[0], input[1], input[2], input[1]];\n break;\n }\n return new Padding(input);\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(from, to, t) {\n return new Padding(interpolateArray(from.values, to.values, t));\n }\n}\n\n/**\n * An array of numbers. Create instances from\n * bare arrays or numeric values using the static method `NumberArray.parse`.\n * @private\n */\nclass NumberArray {\n constructor(values) {\n this.values = values.slice();\n }\n /**\n * Numeric NumberArray values\n * @param input A NumberArray value\n * @returns A `NumberArray` instance, or `undefined` if the input is not a valid NumberArray value.\n */\n static parse(input) {\n if (input instanceof NumberArray) {\n return input;\n }\n // Backwards compatibility (e.g. hillshade-illumination-direction): bare number is treated the same as array with single value.\n if (typeof input === 'number') {\n return new NumberArray([input]);\n }\n if (!Array.isArray(input)) {\n return undefined;\n }\n for (const val of input) {\n if (typeof val !== 'number') {\n return undefined;\n }\n }\n return new NumberArray(input);\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(from, to, t) {\n return new NumberArray(interpolateArray(from.values, to.values, t));\n }\n}\n\n/**\n * An array of colors. Create instances from\n * bare arrays or strings using the static method `ColorArray.parse`.\n * @private\n */\nclass ColorArray {\n constructor(values) {\n this.values = values.slice();\n }\n /**\n * ColorArray values\n * @param input A ColorArray value\n * @returns A `ColorArray` instance, or `undefined` if the input is not a valid ColorArray value.\n */\n static parse(input) {\n if (input instanceof ColorArray) {\n return input;\n }\n // Backwards compatibility (e.g. hillshade-shadow-color): bare Color is treated the same as array with single value.\n if (typeof input === 'string') {\n const parsed_val = Color.parse(input);\n if (!parsed_val) {\n return undefined;\n }\n return new ColorArray([parsed_val]);\n }\n if (!Array.isArray(input)) {\n return undefined;\n }\n const colors = [];\n for (const val of input) {\n if (typeof val !== 'string') {\n return undefined;\n }\n const parsed_val = Color.parse(val);\n if (!parsed_val) {\n return undefined;\n }\n colors.push(parsed_val);\n }\n return new ColorArray(colors);\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(from, to, t, spaceKey = 'rgb') {\n const colors = [];\n if (from.values.length != to.values.length) {\n throw new Error(`colorArray: Arrays have mismatched length (${from.values.length} vs. ${to.values.length}), cannot interpolate.`);\n }\n for (let i = 0; i < from.values.length; i++) {\n colors.push(Color.interpolate(from.values[i], to.values[i], t, spaceKey));\n }\n return new ColorArray(colors);\n }\n}\n\nclass RuntimeError extends Error {\n constructor(message) {\n super(message);\n this.name = 'RuntimeError';\n }\n toJSON() {\n return this.message;\n }\n}\n\n/** Set of valid anchor positions, as a set for validation */\nconst anchors = new Set([\n 'center',\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'top-left',\n 'top-right',\n 'bottom-left',\n 'bottom-right'\n]);\n/**\n * Utility class to assist managing values for text-variable-anchor-offset property. Create instances from\n * bare arrays using the static method `VariableAnchorOffsetCollection.parse`.\n * @private\n */\nclass VariableAnchorOffsetCollection {\n constructor(values) {\n this.values = values.slice();\n }\n static parse(input) {\n if (input instanceof VariableAnchorOffsetCollection) {\n return input;\n }\n if (!Array.isArray(input) || input.length < 1 || input.length % 2 !== 0) {\n return undefined;\n }\n for (let i = 0; i < input.length; i += 2) {\n // Elements in even positions should be anchor positions; Elements in odd positions should be offset values\n const anchorValue = input[i];\n const offsetValue = input[i + 1];\n if (typeof anchorValue !== 'string' || !anchors.has(anchorValue)) {\n return undefined;\n }\n if (!Array.isArray(offsetValue) ||\n offsetValue.length !== 2 ||\n typeof offsetValue[0] !== 'number' ||\n typeof offsetValue[1] !== 'number') {\n return undefined;\n }\n }\n return new VariableAnchorOffsetCollection(input);\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(from, to, t) {\n const fromValues = from.values;\n const toValues = to.values;\n if (fromValues.length !== toValues.length) {\n throw new RuntimeError(`Cannot interpolate values of different length. from: ${from.toString()}, to: ${to.toString()}`);\n }\n const output = [];\n for (let i = 0; i < fromValues.length; i += 2) {\n // Anchor entries must match\n if (fromValues[i] !== toValues[i]) {\n throw new RuntimeError(`Cannot interpolate values containing mismatched anchors. from[${i}]: ${fromValues[i]}, to[${i}]: ${toValues[i]}`);\n }\n output.push(fromValues[i]);\n // Interpolate the offset values for each anchor\n const [fx, fy] = fromValues[i + 1];\n const [tx, ty] = toValues[i + 1];\n output.push([interpolateNumber(fx, tx, t), interpolateNumber(fy, ty, t)]);\n }\n return new VariableAnchorOffsetCollection(output);\n }\n}\n\nclass ResolvedImage {\n constructor(options) {\n this.name = options.name;\n this.available = options.available;\n }\n toString() {\n return this.name;\n }\n static fromString(name) {\n if (!name)\n return null; // treat empty values as no image\n return new ResolvedImage({ name, available: false });\n }\n}\n\nclass ProjectionDefinition {\n constructor(from, to, transition) {\n this.from = from;\n this.to = to;\n this.transition = transition;\n }\n static interpolate(from, to, t) {\n return new ProjectionDefinition(from, to, t);\n }\n static parse(input) {\n if (input instanceof ProjectionDefinition) {\n return input;\n }\n if (Array.isArray(input) &&\n input.length === 3 &&\n typeof input[0] === 'string' &&\n typeof input[1] === 'string' &&\n typeof input[2] === 'number') {\n return new ProjectionDefinition(input[0], input[1], input[2]);\n }\n if (typeof input === 'object' &&\n typeof input.from === 'string' &&\n typeof input.to === 'string' &&\n typeof input.transition === 'number') {\n return new ProjectionDefinition(input.from, input.to, input.transition);\n }\n if (typeof input === 'string') {\n return new ProjectionDefinition(input, input, 1);\n }\n return undefined;\n }\n}\n\nfunction validateRGBA(r, g, b, a) {\n if (!(typeof r === 'number' &&\n r >= 0 &&\n r <= 255 &&\n typeof g === 'number' &&\n g >= 0 &&\n g <= 255 &&\n typeof b === 'number' &&\n b >= 0 &&\n b <= 255)) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n if (!(typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1))) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n return null;\n}\nfunction isValue(mixed) {\n if (mixed === null ||\n typeof mixed === 'string' ||\n typeof mixed === 'boolean' ||\n typeof mixed === 'number' ||\n mixed instanceof ProjectionDefinition ||\n mixed instanceof Color ||\n mixed instanceof Collator ||\n mixed instanceof Formatted ||\n mixed instanceof Padding ||\n mixed instanceof NumberArray ||\n mixed instanceof ColorArray ||\n mixed instanceof VariableAnchorOffsetCollection ||\n mixed instanceof ResolvedImage) {\n return true;\n }\n else if (Array.isArray(mixed)) {\n for (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n }\n else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n }\n else {\n return false;\n }\n}\nfunction typeOf(value) {\n if (value === null) {\n return NullType;\n }\n else if (typeof value === 'string') {\n return StringType;\n }\n else if (typeof value === 'boolean') {\n return BooleanType;\n }\n else if (typeof value === 'number') {\n return NumberType;\n }\n else if (value instanceof Color) {\n return ColorType;\n }\n else if (value instanceof ProjectionDefinition) {\n return ProjectionDefinitionType;\n }\n else if (value instanceof Collator) {\n return CollatorType;\n }\n else if (value instanceof Formatted) {\n return FormattedType;\n }\n else if (value instanceof Padding) {\n return PaddingType;\n }\n else if (value instanceof NumberArray) {\n return NumberArrayType;\n }\n else if (value instanceof ColorArray) {\n return ColorArrayType;\n }\n else if (value instanceof VariableAnchorOffsetCollection) {\n return VariableAnchorOffsetCollectionType;\n }\n else if (value instanceof ResolvedImage) {\n return ResolvedImageType;\n }\n else if (Array.isArray(value)) {\n const length = value.length;\n let itemType;\n for (const item of value) {\n const t = typeOf(item);\n if (!itemType) {\n itemType = t;\n }\n else if (itemType === t) {\n continue;\n }\n else {\n itemType = ValueType;\n break;\n }\n }\n return array(itemType || ValueType, length);\n }\n else {\n return ObjectType;\n }\n}\nfunction valueToString(value) {\n const type = typeof value;\n if (value === null) {\n return '';\n }\n else if (type === 'string' || type === 'number' || type === 'boolean') {\n return String(value);\n }\n else if (value instanceof Color ||\n value instanceof ProjectionDefinition ||\n value instanceof Formatted ||\n value instanceof Padding ||\n value instanceof NumberArray ||\n value instanceof ColorArray ||\n value instanceof VariableAnchorOffsetCollection ||\n value instanceof ResolvedImage) {\n return value.toString();\n }\n else {\n return JSON.stringify(value);\n }\n}\n\nclass Literal {\n constructor(type, value) {\n this.type = type;\n this.value = value;\n }\n static parse(args, context) {\n if (args.length !== 2)\n return context.error(`'literal' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (!isValue(args[1]))\n return context.error('invalid value');\n const value = args[1];\n let type = typeOf(value);\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)) {\n type = expected;\n }\n return new Literal(type, value);\n }\n evaluate() {\n return this.value;\n }\n eachChild() { }\n outputDefined() {\n return true;\n }\n}\n\nconst types$1 = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\nclass Assertion {\n constructor(type, args) {\n this.type = type;\n this.args = args;\n }\n static parse(args, context) {\n if (args.length < 2)\n return context.error('Expected at least one argument.');\n let i = 1;\n let type;\n const name = args[0];\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types$1) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types$1[type];\n i++;\n }\n else {\n itemType = ValueType;\n }\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) {\n return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n }\n N = args[2];\n i++;\n }\n type = array(itemType, N);\n }\n else {\n if (!types$1[name])\n throw new Error(`Types doesn't contain name = ${name}`);\n type = types$1[name];\n }\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input)\n return null;\n parsed.push(input);\n }\n return new Assertion(type, parsed);\n }\n evaluate(ctx) {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const error = checkSubtype(this.type, typeOf(value));\n if (!error) {\n return value;\n }\n else if (i === this.args.length - 1) {\n throw new RuntimeError(`Expected value to be of type ${typeToString(this.type)}, but found ${typeToString(typeOf(value))} instead.`);\n }\n }\n throw new Error();\n }\n eachChild(fn) {\n this.args.forEach(fn);\n }\n outputDefined() {\n return this.args.every((arg) => arg.outputDefined());\n }\n}\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion {\n constructor(type, args) {\n this.type = type;\n this.args = args;\n }\n static parse(args, context) {\n if (args.length < 2)\n return context.error('Expected at least one argument.');\n const name = args[0];\n if (!types[name])\n throw new Error(`Can't parse ${name} as it is not part of the known types`);\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error('Expected one argument.');\n const type = types[name];\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input)\n return null;\n parsed.push(input);\n }\n return new Coercion(type, parsed);\n }\n evaluate(ctx) {\n switch (this.type.kind) {\n case 'boolean':\n return Boolean(this.args[0].evaluate(ctx));\n case 'color': {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n }\n else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c)\n return c;\n }\n else if (Array.isArray(input)) {\n if (input.length < 3 || input.length > 4) {\n error = `Invalid rgba value ${JSON.stringify(input)}: expected an array containing either three or four numeric values.`;\n }\n else {\n error = validateRGBA(input[0], input[1], input[2], input[3]);\n }\n if (!error) {\n return new Color(input[0] / 255, input[1] / 255, input[2] / 255, input[3]);\n }\n }\n }\n throw new RuntimeError(error ||\n `Could not parse color from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n }\n case 'padding': {\n let input;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n const pad = Padding.parse(input);\n if (pad) {\n return pad;\n }\n }\n throw new RuntimeError(`Could not parse padding from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n }\n case 'numberArray': {\n let input;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n const val = NumberArray.parse(input);\n if (val) {\n return val;\n }\n }\n throw new RuntimeError(`Could not parse numberArray from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n }\n case 'colorArray': {\n let input;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n const val = ColorArray.parse(input);\n if (val) {\n return val;\n }\n }\n throw new RuntimeError(`Could not parse colorArray from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n }\n case 'variableAnchorOffsetCollection': {\n let input;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n const coll = VariableAnchorOffsetCollection.parse(input);\n if (coll) {\n return coll;\n }\n }\n throw new RuntimeError(`Could not parse variableAnchorOffsetCollection from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n }\n case 'number': {\n let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null)\n return 0;\n const num = Number(value);\n if (isNaN(num))\n continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n }\n case 'formatted':\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n case 'resolvedImage':\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n case 'projectionDefinition':\n return this.args[0].evaluate(ctx);\n default:\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n eachChild(fn) {\n this.args.forEach(fn);\n }\n outputDefined() {\n return this.args.every((arg) => arg.outputDefined());\n }\n}\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\nclass EvaluationContext {\n constructor() {\n this.globals = null;\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = new Map();\n this.availableImages = null;\n this.canonical = null;\n }\n id() {\n return this.feature && 'id' in this.feature ? this.feature.id : null;\n }\n geometryType() {\n return this.feature\n ? typeof this.feature.type === 'number'\n ? geometryTypes[this.feature.type]\n : this.feature.type\n : null;\n }\n geometry() {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n canonicalID() {\n return this.canonical;\n }\n properties() {\n return (this.feature && this.feature.properties) || {};\n }\n parseColor(input) {\n let cached = this._parseColorCache.get(input);\n if (!cached) {\n cached = Color.parse(input);\n this._parseColorCache.set(input, cached);\n }\n return cached;\n }\n}\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n constructor(registry, isConstantFunc, path = [], expectedType, scope = new Scope(), errors = []) {\n this.registry = registry;\n this.path = path;\n this.key = path.map((part) => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n this._isConstant = isConstantFunc;\n }\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(expr, index, expectedType, bindings, options = {}) {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n _parse(expr, options) {\n if (expr === null ||\n typeof expr === 'string' ||\n typeof expr === 'boolean' ||\n typeof expr === 'number') {\n expr = ['literal', expr];\n }\n function annotate(parsed, type, typeAnnotation) {\n if (typeAnnotation === 'assert') {\n return new Assertion(type, [parsed]);\n }\n else if (typeAnnotation === 'coerce') {\n return new Coercion(type, [parsed]);\n }\n else {\n return parsed;\n }\n }\n if (Array.isArray(expr)) {\n if (expr.length === 0) {\n return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');\n }\n const op = expr[0];\n if (typeof op !== 'string') {\n this.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed)\n return null;\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\n if ((expected.kind === 'string' ||\n expected.kind === 'number' ||\n expected.kind === 'boolean' ||\n expected.kind === 'object' ||\n expected.kind === 'array') &&\n actual.kind === 'value') {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n }\n else if (('projectionDefinition' === expected.kind &&\n ['string', 'array'].includes(actual.kind)) ||\n (['color', 'formatted', 'resolvedImage'].includes(expected.kind) &&\n ['value', 'string'].includes(actual.kind)) ||\n (['padding', 'numberArray'].includes(expected.kind) &&\n ['value', 'number', 'array'].includes(actual.kind)) ||\n ('colorArray' === expected.kind &&\n ['value', 'string', 'array'].includes(actual.kind)) ||\n ('variableAnchorOffsetCollection' === expected.kind &&\n ['value', 'array'].includes(actual.kind))) {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n }\n else if (this.checkSubtype(expected, actual)) {\n return null;\n }\n }\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) &&\n parsed.type.kind !== 'resolvedImage' &&\n this._isConstant(parsed)) {\n const ec = new EvaluationContext();\n try {\n parsed = new Literal(parsed.type, parsed.evaluate(ec));\n }\n catch (e) {\n this.error(e.message);\n return null;\n }\n }\n return parsed;\n }\n return this.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n else if (typeof expr === 'undefined') {\n return this.error(\"'undefined' value invalid. Use null instead.\");\n }\n else if (typeof expr === 'object') {\n return this.error('Bare objects invalid. Use [\"literal\", {...}] instead.');\n }\n else {\n return this.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index, expectedType, bindings) {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(this.registry, this._isConstant, path, expectedType || null, scope, this.errors);\n }\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error, ...keys) {\n const key = `${this.key}${keys.map((k) => `[${k}]`).join('')}`;\n this.errors.push(new ExpressionParsingError(key, error));\n }\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n * @param expected The expected type\n * @param t The actual type\n * @returns null if `t` is a subtype of `expected`; otherwise returns an error message\n */\n checkSubtype(expected, t) {\n const error = checkSubtype(expected, t);\n if (error)\n this.error(error);\n return error;\n }\n}\n\nclass Let {\n constructor(bindings, result) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n evaluate(ctx) {\n return this.result.evaluate(ctx);\n }\n eachChild(fn) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n static parse(args, context) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n const bindings = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(\"Variable names must contain only alphanumeric characters or '_'.\", i);\n }\n const value = context.parse(args[i + 1], i + 1);\n if (!value)\n return null;\n bindings.push([name, value]);\n }\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result)\n return null;\n return new Let(bindings, result);\n }\n outputDefined() {\n return this.result.outputDefined();\n }\n}\n\nclass Var {\n constructor(name, boundExpression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n static parse(args, context) {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(\"'var' expression requires exactly one string literal argument.\");\n const name = args[1];\n if (!context.scope.has(name)) {\n return context.error(`Unknown variable \"${name}\". Make sure \"${name}\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n }\n return new Var(name, context.scope.get(name));\n }\n evaluate(ctx) {\n return this.boundExpression.evaluate(ctx);\n }\n eachChild() { }\n outputDefined() {\n return false;\n }\n}\n\nclass At {\n constructor(type, index, input) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n static parse(args, context) {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n if (!index || !input)\n return null;\n const t = input.type;\n return new At(t.itemType, index, input);\n }\n evaluate(ctx) {\n const index = this.index.evaluate(ctx);\n const array = this.input.evaluate(ctx);\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n return array[index];\n }\n eachChild(fn) {\n fn(this.index);\n fn(this.input);\n }\n outputDefined() {\n return false;\n }\n}\n\nclass In {\n constructor(needle, haystack) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n static parse(args, context) {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n const needle = context.parse(args[1], 1, ValueType);\n const haystack = context.parse(args[2], 2, ValueType);\n if (!needle || !haystack)\n return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(needle.type)} instead`);\n }\n return new In(needle, haystack);\n }\n evaluate(ctx) {\n const needle = this.needle.evaluate(ctx);\n const haystack = this.haystack.evaluate(ctx);\n if (!haystack)\n return false;\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(needle))} instead.`);\n }\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${typeToString(typeOf(haystack))} instead.`);\n }\n return haystack.indexOf(needle) >= 0;\n }\n eachChild(fn) {\n fn(this.needle);\n fn(this.haystack);\n }\n outputDefined() {\n return true;\n }\n}\n\nclass IndexOf {\n constructor(needle, haystack, fromIndex) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n static parse(args, context) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 2 or 3 arguments, but found ${args.length - 1} instead.`);\n }\n const needle = context.parse(args[1], 1, ValueType);\n const haystack = context.parse(args[2], 2, ValueType);\n if (!needle || !haystack)\n return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(needle.type)} instead`);\n }\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex)\n return null;\n return new IndexOf(needle, haystack, fromIndex);\n }\n else {\n return new IndexOf(needle, haystack);\n }\n }\n evaluate(ctx) {\n const needle = this.needle.evaluate(ctx);\n const haystack = this.haystack.evaluate(ctx);\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(needle))} instead.`);\n }\n let fromIndex;\n if (this.fromIndex) {\n fromIndex = this.fromIndex.evaluate(ctx);\n }\n if (isValidNativeType(haystack, ['string'])) {\n const rawIndex = haystack.indexOf(needle, fromIndex);\n if (rawIndex === -1) {\n return -1;\n }\n else {\n // The index may be affected by surrogate pairs, so get the length of the preceding substring.\n return [...haystack.slice(0, rawIndex)].length;\n }\n }\n else if (isValidNativeType(haystack, ['array'])) {\n return haystack.indexOf(needle, fromIndex);\n }\n else {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${typeToString(typeOf(haystack))} instead.`);\n }\n }\n eachChild(fn) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n outputDefined() {\n return false;\n }\n}\n\nclass Match {\n constructor(inputType, outputType, input, cases, outputs, otherwise) {\n this.inputType = inputType;\n this.type = outputType;\n this.input = input;\n this.cases = cases;\n this.outputs = outputs;\n this.otherwise = otherwise;\n }\n static parse(args, context) {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error('Expected an even number of arguments.');\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\n return labelContext.error('Branch labels must be numbers or strings.');\n }\n else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n return labelContext.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);\n }\n else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error('Numeric branch labels must be integer values.');\n }\n else if (!inputType) {\n inputType = typeOf(label);\n }\n else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n cases[String(label)] = outputs.length;\n }\n const result = context.parse(value, i, outputType);\n if (!result)\n return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n const input = context.parse(args[1], 1, ValueType);\n if (!input)\n return null;\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise)\n return null;\n if (input.type.kind !== 'value' &&\n context.concat(1).checkSubtype(inputType, input.type)) {\n return null;\n }\n return new Match(inputType, outputType, input, cases, outputs, otherwise);\n }\n evaluate(ctx) {\n const input = this.input.evaluate(ctx);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n eachChild(fn) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n outputDefined() {\n return this.outputs.every((out) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n}\n\nclass Case {\n constructor(type, branches, otherwise) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n static parse(args, context) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error('Expected an odd number of arguments.');\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test)\n return null;\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result)\n return null;\n branches.push([test, result]);\n outputType = outputType || result.type;\n }\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise)\n return null;\n if (!outputType)\n throw new Error(\"Can't infer output type\");\n return new Case(outputType, branches, otherwise);\n }\n evaluate(ctx) {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n eachChild(fn) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n outputDefined() {\n return (this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined());\n }\n}\n\nclass Slice {\n constructor(type, input, beginIndex, endIndex) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n }\n static parse(args, context) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 2 or 3 arguments, but found ${args.length - 1} instead.`);\n }\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n if (!input || !beginIndex)\n return null;\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error(`Expected first argument to be of type array or string, but found ${typeToString(input.type)} instead`);\n }\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex)\n return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n }\n else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n evaluate(ctx) {\n const input = this.input.evaluate(ctx);\n const beginIndex = this.beginIndex.evaluate(ctx);\n let endIndex;\n if (this.endIndex) {\n endIndex = this.endIndex.evaluate(ctx);\n }\n if (isValidNativeType(input, ['string'])) {\n // Indices may be affected by surrogate pairs.\n return [...input].slice(beginIndex, endIndex).join('');\n }\n else if (isValidNativeType(input, ['array'])) {\n return input.slice(beginIndex, endIndex);\n }\n else {\n throw new RuntimeError(`Expected first argument to be of type array or string, but found ${typeToString(typeOf(input))} instead.`);\n }\n }\n eachChild(fn) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n outputDefined() {\n return false;\n }\n}\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nfunction findStopLessThanOrEqualTo(stops, input) {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) {\n // Search complete\n return currentIndex;\n }\n lowerIndex = currentIndex + 1;\n }\n else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n }\n else {\n throw new RuntimeError('Input is not a number.');\n }\n }\n return 0;\n}\n\nclass Step {\n constructor(type, input, stops) {\n this.type = type;\n this.input = input;\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n static parse(args, context) {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n if ((args.length - 1) % 2 !== 0) {\n return context.error('Expected an even number of arguments.');\n }\n const input = context.parse(args[1], 1, NumberType);\n if (!input)\n return null;\n const stops = [];\n let outputType = null;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n const labelKey = i;\n const valueKey = i + 1;\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed)\n return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n return new Step(outputType, input, stops);\n }\n evaluate(ctx) {\n const labels = this.labels;\n const outputs = this.outputs;\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n const value = this.input.evaluate(ctx);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n eachChild(fn) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n outputDefined() {\n return this.outputs.every((out) => out.outputDefined());\n }\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar unitbezier;\nvar hasRequiredUnitbezier;\n\nfunction requireUnitbezier () {\n\tif (hasRequiredUnitbezier) return unitbezier;\n\thasRequiredUnitbezier = 1;\n\n\tunitbezier = UnitBezier;\n\n\tfunction UnitBezier(p1x, p1y, p2x, p2y) {\n\t // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n\t this.cx = 3.0 * p1x;\n\t this.bx = 3.0 * (p2x - p1x) - this.cx;\n\t this.ax = 1.0 - this.cx - this.bx;\n\n\t this.cy = 3.0 * p1y;\n\t this.by = 3.0 * (p2y - p1y) - this.cy;\n\t this.ay = 1.0 - this.cy - this.by;\n\n\t this.p1x = p1x;\n\t this.p1y = p1y;\n\t this.p2x = p2x;\n\t this.p2y = p2y;\n\t}\n\n\tUnitBezier.prototype = {\n\t sampleCurveX: function (t) {\n\t // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n\t return ((this.ax * t + this.bx) * t + this.cx) * t;\n\t },\n\n\t sampleCurveY: function (t) {\n\t return ((this.ay * t + this.by) * t + this.cy) * t;\n\t },\n\n\t sampleCurveDerivativeX: function (t) {\n\t return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n\t },\n\n\t solveCurveX: function (x, epsilon) {\n\t if (epsilon === undefined) epsilon = 1e-6;\n\n\t if (x < 0.0) return 0.0;\n\t if (x > 1.0) return 1.0;\n\n\t var t = x;\n\n\t // First try a few iterations of Newton's method - normally very fast.\n\t for (var i = 0; i < 8; i++) {\n\t var x2 = this.sampleCurveX(t) - x;\n\t if (Math.abs(x2) < epsilon) return t;\n\n\t var d2 = this.sampleCurveDerivativeX(t);\n\t if (Math.abs(d2) < 1e-6) break;\n\n\t t = t - x2 / d2;\n\t }\n\n\t // Fall back to the bisection method for reliability.\n\t var t0 = 0.0;\n\t var t1 = 1.0;\n\t t = x;\n\n\t for (i = 0; i < 20; i++) {\n\t x2 = this.sampleCurveX(t);\n\t if (Math.abs(x2 - x) < epsilon) break;\n\n\t if (x > x2) {\n\t t0 = t;\n\t } else {\n\t t1 = t;\n\t }\n\n\t t = (t1 - t0) * 0.5 + t0;\n\t }\n\n\t return t;\n\t },\n\n\t solve: function (x, epsilon) {\n\t return this.sampleCurveY(this.solveCurveX(x, epsilon));\n\t }\n\t};\n\treturn unitbezier;\n}\n\nvar unitbezierExports = requireUnitbezier();\nvar UnitBezier = /*@__PURE__*/getDefaultExportFromCjs(unitbezierExports);\n\nclass Interpolate {\n constructor(type, operator, interpolation, input, stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n static interpolationFactor(interpolation, input, lower, upper) {\n let t = 0;\n if (interpolation.name === 'exponential') {\n t = exponentialInterpolation(input, interpolation.base, lower, upper);\n }\n else if (interpolation.name === 'linear') {\n t = exponentialInterpolation(input, 1, lower, upper);\n }\n else if (interpolation.name === 'cubic-bezier') {\n const c = interpolation.controlPoints;\n const ub = new UnitBezier(c[0], c[1], c[2], c[3]);\n t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n }\n return t;\n }\n static parse(args, context) {\n let [operator, interpolation, input, ...rest] = args;\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error('Expected an interpolation type expression.', 1);\n }\n if (interpolation[0] === 'linear') {\n interpolation = { name: 'linear' };\n }\n else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error('Exponential interpolation requires a numeric base.', 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n }\n else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (controlPoints.length !== 4 ||\n controlPoints.some((t) => typeof t !== 'number' || t < 0 || t > 1)) {\n return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n }\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: controlPoints\n };\n }\n else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n if ((args.length - 1) % 2 !== 0) {\n return context.error('Expected an even number of arguments.');\n }\n input = context.parse(input, 2, NumberType);\n if (!input)\n return null;\n const stops = [];\n let outputType = null;\n if ((operator === 'interpolate-hcl' || operator === 'interpolate-lab') &&\n context.expectedType != ColorArrayType) {\n outputType = ColorType;\n }\n else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n const labelKey = i + 3;\n const valueKey = i + 4;\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed)\n return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n if (!verifyType(outputType, NumberType) &&\n !verifyType(outputType, ProjectionDefinitionType) &&\n !verifyType(outputType, ColorType) &&\n !verifyType(outputType, PaddingType) &&\n !verifyType(outputType, NumberArrayType) &&\n !verifyType(outputType, ColorArrayType) &&\n !verifyType(outputType, VariableAnchorOffsetCollectionType) &&\n !verifyType(outputType, array(NumberType))) {\n return context.error(`Type ${typeToString(outputType)} is not interpolatable.`);\n }\n return new Interpolate(outputType, operator, interpolation, input, stops);\n }\n evaluate(ctx) {\n const labels = this.labels;\n const outputs = this.outputs;\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n const value = this.input.evaluate(ctx);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n switch (this.operator) {\n case 'interpolate':\n switch (this.type.kind) {\n case 'number':\n return interpolateNumber(outputLower, outputUpper, t);\n case 'color':\n return Color.interpolate(outputLower, outputUpper, t);\n case 'padding':\n return Padding.interpolate(outputLower, outputUpper, t);\n case 'colorArray':\n return ColorArray.interpolate(outputLower, outputUpper, t);\n case 'numberArray':\n return NumberArray.interpolate(outputLower, outputUpper, t);\n case 'variableAnchorOffsetCollection':\n return VariableAnchorOffsetCollection.interpolate(outputLower, outputUpper, t);\n case 'array':\n return interpolateArray(outputLower, outputUpper, t);\n case 'projectionDefinition':\n return ProjectionDefinition.interpolate(outputLower, outputUpper, t);\n }\n case 'interpolate-hcl':\n switch (this.type.kind) {\n case 'color':\n return Color.interpolate(outputLower, outputUpper, t, 'hcl');\n case 'colorArray':\n return ColorArray.interpolate(outputLower, outputUpper, t, 'hcl');\n }\n case 'interpolate-lab':\n switch (this.type.kind) {\n case 'color':\n return Color.interpolate(outputLower, outputUpper, t, 'lab');\n case 'colorArray':\n return ColorArray.interpolate(outputLower, outputUpper, t, 'lab');\n }\n }\n }\n eachChild(fn) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n outputDefined() {\n return this.outputs.every((out) => out.outputDefined());\n }\n}\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n if (difference === 0) {\n return 0;\n }\n else if (base === 1) {\n return progress / difference;\n }\n else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\nconst interpolateFactory = {\n color: Color.interpolate,\n number: interpolateNumber,\n padding: Padding.interpolate,\n numberArray: NumberArray.interpolate,\n colorArray: ColorArray.interpolate,\n variableAnchorOffsetCollection: VariableAnchorOffsetCollection.interpolate,\n array: interpolateArray\n};\n\nclass Coalesce {\n constructor(type, args) {\n this.type = type;\n this.args = args;\n }\n static parse(args, context) {\n if (args.length < 2) {\n return context.error('Expected at least one argument.');\n }\n let outputType = null;\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {\n typeAnnotation: 'omit'\n });\n if (!parsed)\n return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n if (!outputType)\n throw new Error('No output type');\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType && parsedArgs.some((arg) => checkSubtype(expectedType, arg.type));\n return needsAnnotation\n ? new Coalesce(ValueType, parsedArgs)\n : new Coalesce(outputType, parsedArgs);\n }\n evaluate(ctx) {\n let result = null;\n let argCount = 0;\n let requestedImageName;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image name so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n if (!requestedImageName) {\n requestedImageName = result.name;\n }\n result = null;\n if (argCount === this.args.length) {\n result = requestedImageName;\n }\n }\n if (result !== null)\n break;\n }\n return result;\n }\n eachChild(fn) {\n this.args.forEach(fn);\n }\n outputDefined() {\n return this.args.every((arg) => arg.outputDefined());\n }\n}\n\nfunction isComparableType(op, type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return (type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value');\n }\n else {\n // ordering operator\n return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n }\n}\nfunction eq(ctx, a, b) {\n return a === b;\n}\nfunction neq(ctx, a, b) {\n return a !== b;\n}\nfunction lt(ctx, a, b) {\n return a < b;\n}\nfunction gt(ctx, a, b) {\n return a > b;\n}\nfunction lteq(ctx, a, b) {\n return a <= b;\n}\nfunction gteq(ctx, a, b) {\n return a >= b;\n}\nfunction eqCollate(ctx, a, b, c) {\n return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n return c.compare(a, b) >= 0;\n}\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op, compareBasic, compareWithCollator) {\n const isOrderComparison = op !== '==' && op !== '!=';\n return class Comparison {\n constructor(lhs, rhs, collator) {\n this.type = BooleanType;\n this.lhs = lhs;\n this.rhs = rhs;\n this.collator = collator;\n this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n }\n static parse(args, context) {\n if (args.length !== 3 && args.length !== 4)\n return context.error('Expected two or three arguments.');\n const op = args[0];\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs)\n return null;\n if (!isComparableType(op, lhs.type)) {\n return context\n .concat(1)\n .error(`\"${op}\" comparisons are not supported for type '${typeToString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs)\n return null;\n if (!isComparableType(op, rhs.type)) {\n return context\n .concat(2)\n .error(`\"${op}\" comparisons are not supported for type '${typeToString(rhs.type)}'.`);\n }\n if (lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value') {\n return context.error(`Cannot compare types '${typeToString(lhs.type)}' and '${typeToString(rhs.type)}'.`);\n }\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n }\n else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n let collator = null;\n if (args.length === 4) {\n if (lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value') {\n return context.error('Cannot use collator to compare non-string types.');\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator)\n return null;\n }\n return new Comparison(lhs, rhs, collator);\n }\n evaluate(ctx) {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\n if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n throw new RuntimeError(`Expected arguments for \"${op}\" to be (string, string) or (number, number), but found (${lt.kind}, ${rt.kind}) instead.`);\n }\n }\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n return this.collator\n ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx))\n : compareBasic(ctx, lhs, rhs);\n }\n eachChild(fn) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n outputDefined() {\n return true;\n }\n };\n}\nconst Equals = makeComparison('==', eq, eqCollate);\nconst NotEquals = makeComparison('!=', neq, neqCollate);\nconst LessThan = makeComparison('<', lt, ltCollate);\nconst GreaterThan = makeComparison('>', gt, gtCollate);\nconst LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nconst GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n\nclass CollatorExpression {\n constructor(caseSensitive, diacriticSensitive, locale) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n static parse(args, context) {\n if (args.length !== 2)\n return context.error('Expected one argument.');\n const options = args[1];\n if (typeof options !== 'object' || Array.isArray(options))\n return context.error('Collator options argument must be an object.');\n const caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive)\n return null;\n const diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive)\n return null;\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale)\n return null;\n }\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n evaluate(ctx) {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n eachChild(fn) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n outputDefined() {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n}\n\nclass NumberFormat {\n constructor(number, locale, currency, minFractionDigits, maxFractionDigits) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n static parse(args, context) {\n if (args.length !== 3)\n return context.error('Expected two arguments.');\n const number = context.parse(args[1], 1, NumberType);\n if (!number)\n return null;\n const options = args[2];\n if (typeof options !== 'object' || Array.isArray(options))\n return context.error('NumberFormat options argument must be an object.');\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale)\n return null;\n }\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency)\n return null;\n }\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits)\n return null;\n }\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits)\n return null;\n }\n return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n }\n evaluate(ctx) {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n style: this.currency ? 'currency' : 'decimal',\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n minimumFractionDigits: this.minFractionDigits\n ? this.minFractionDigits.evaluate(ctx)\n : undefined,\n maximumFractionDigits: this.maxFractionDigits\n ? this.maxFractionDigits.evaluate(ctx)\n : undefined\n }).format(this.number.evaluate(ctx));\n }\n eachChild(fn) {\n fn(this.number);\n if (this.locale) {\n fn(this.locale);\n }\n if (this.currency) {\n fn(this.currency);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n outputDefined() {\n return false;\n }\n}\n\nclass FormatExpression {\n constructor(sections) {\n this.type = FormattedType;\n this.sections = sections;\n }\n static parse(args, context) {\n if (args.length < 2) {\n return context.error('Expected at least one argument.');\n }\n const firstArg = args[1];\n if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n return context.error('First argument must be an image or text section.');\n }\n const sections = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = args[i];\n if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale)\n return null;\n }\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font)\n return null;\n }\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor)\n return null;\n }\n let verticalAlign = null;\n if (arg['vertical-align']) {\n if (typeof arg['vertical-align'] === 'string' &&\n !VERTICAL_ALIGN_OPTIONS.includes(arg['vertical-align'])) {\n return context.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${arg['vertical-align']}' instead.`);\n }\n verticalAlign = context.parse(arg['vertical-align'], 1, StringType);\n if (!verticalAlign)\n return null;\n }\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n lastExpression.verticalAlign = verticalAlign;\n }\n else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content)\n return null;\n const kind = content.type.kind;\n if (kind !== 'string' &&\n kind !== 'value' &&\n kind !== 'null' &&\n kind !== 'resolvedImage')\n return context.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");\n nextTokenMayBeObject = true;\n sections.push({\n content,\n scale: null,\n font: null,\n textColor: null,\n verticalAlign: null\n });\n }\n }\n return new FormatExpression(sections);\n }\n evaluate(ctx) {\n const evaluateSection = (section) => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null, section.verticalAlign ? section.verticalAlign.evaluate(ctx) : null);\n }\n return new FormattedSection(valueToString(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null, section.verticalAlign ? section.verticalAlign.evaluate(ctx) : null);\n };\n return new Formatted(this.sections.map(evaluateSection));\n }\n eachChild(fn) {\n for (const section of this.sections) {\n fn(section.content);\n if (section.scale) {\n fn(section.scale);\n }\n if (section.font) {\n fn(section.font);\n }\n if (section.textColor) {\n fn(section.textColor);\n }\n if (section.verticalAlign) {\n fn(section.verticalAlign);\n }\n }\n }\n outputDefined() {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n}\n\nclass ImageExpression {\n constructor(input) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n static parse(args, context) {\n if (args.length !== 2) {\n return context.error('Expected two arguments.');\n }\n const name = context.parse(args[1], 1, StringType);\n if (!name)\n return context.error('No image name provided.');\n return new ImageExpression(name);\n }\n evaluate(ctx) {\n const evaluatedImageName = this.input.evaluate(ctx);\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages)\n value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n return value;\n }\n eachChild(fn) {\n fn(this.input);\n }\n outputDefined() {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n}\n\nclass Length {\n constructor(input) {\n this.type = NumberType;\n this.input = input;\n }\n static parse(args, context) {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n const input = context.parse(args[1], 1);\n if (!input)\n return null;\n if (input.type.kind !== 'array' &&\n input.type.kind !== 'string' &&\n input.type.kind !== 'value')\n return context.error(`Expected argument of type string or array, but found ${typeToString(input.type)} instead.`);\n return new Length(input);\n }\n evaluate(ctx) {\n const input = this.input.evaluate(ctx);\n if (typeof input === 'string') {\n // The length may be affected by surrogate pairs.\n return [...input].length;\n }\n else if (Array.isArray(input)) {\n return input.length;\n }\n else {\n throw new RuntimeError(`Expected value to be of type string or array, but found ${typeToString(typeOf(input))} instead.`);\n }\n }\n eachChild(fn) {\n fn(this.input);\n }\n outputDefined() {\n return false;\n }\n}\n\nconst EXTENT = 8192;\nfunction getTileCoordinates(p, canonical) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\nfunction getLngLatFromTileCoord(coord, canonical) {\n const tilesAtZoom = Math.pow(2, canonical.z);\n const x = (coord[0] / EXTENT + canonical.x) / tilesAtZoom;\n const y = (coord[1] / EXTENT + canonical.y) / tilesAtZoom;\n return [lngFromMercatorXfromLng(x), latFromMercatorY(y)];\n}\nfunction mercatorXfromLng(lng) {\n return (180 + lng) / 360;\n}\nfunction lngFromMercatorXfromLng(mercatorX) {\n return mercatorX * 360 - 180;\n}\nfunction mercatorYfromLat(lat) {\n return (180 - (180 / Math.PI) * Math.log(Math.tan(Math.PI / 4 + (lat * Math.PI) / 360))) / 360;\n}\nfunction latFromMercatorY(mercatorY) {\n return (360 / Math.PI) * Math.atan(Math.exp(((180 - mercatorY * 360) * Math.PI) / 180)) - 90;\n}\nfunction updateBBox(bbox, coord) {\n bbox[0] = Math.min(bbox[0], coord[0]);\n bbox[1] = Math.min(bbox[1], coord[1]);\n bbox[2] = Math.max(bbox[2], coord[0]);\n bbox[3] = Math.max(bbox[3], coord[1]);\n}\nfunction boxWithinBox(bbox1, bbox2) {\n if (bbox1[0] <= bbox2[0])\n return false;\n if (bbox1[2] >= bbox2[2])\n return false;\n if (bbox1[1] <= bbox2[1])\n return false;\n if (bbox1[3] >= bbox2[3])\n return false;\n return true;\n}\nfunction rayIntersect(p, p1, p2) {\n return (p1[1] > p[1] !== p2[1] > p[1] &&\n p[0] < ((p2[0] - p1[0]) * (p[1] - p1[1])) / (p2[1] - p1[1]) + p1[0]);\n}\nfunction pointOnBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction segmentIntersectSegment(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0)\n return false;\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b))\n return true;\n return false;\n}\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let j = 0; j < ring.length - 1; ++j) {\n if (segmentIntersectSegment(p1, p2, ring[j], ring[j + 1])) {\n return true;\n }\n }\n }\n return false;\n}\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings, trueIfOnBoundary = false) {\n let inside = false;\n for (const ring of rings) {\n for (let j = 0; j < ring.length - 1; j++) {\n if (pointOnBoundary(point, ring[j], ring[j + 1]))\n return trueIfOnBoundary;\n if (rayIntersect(point, ring[j], ring[j + 1]))\n inside = !inside;\n }\n }\n return inside;\n}\nfunction pointWithinPolygons(point, polygons) {\n for (const polygon of polygons) {\n if (pointWithinPolygon(point, polygon))\n return true;\n }\n return false;\n}\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (const point of line) {\n if (!pointWithinPolygon(point, polygon)) {\n return false;\n }\n }\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\nfunction lineStringWithinPolygons(line, polygons) {\n for (const polygon of polygons) {\n if (lineStringWithinPolygon(line, polygon))\n return true;\n }\n return false;\n}\nfunction perp(v1, v2) {\n return v1[0] * v2[1] - v1[1] * v2[0];\n}\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = x1 * y3 - x3 * y1;\n const det2 = x2 * y3 - x3 * y2;\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0))\n return true;\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox, canonical) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\nfunction getTilePolygons(coordinates, bbox, canonical) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let shift = p[0] - polyBBox[0] > halfWorldSize\n ? -worldSize\n : polyBBox[0] - p[0] > halfWorldSize\n ? worldSize\n : 0;\n if (shift === 0) {\n shift =\n p[0] - polyBBox[2] > halfWorldSize\n ? -worldSize\n : polyBBox[2] - p[0] > halfWorldSize\n ? worldSize\n : 0;\n }\n p[0] += shift;\n }\n updateBBox(bbox, p);\n}\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n for (const points of geometry) {\n for (const point of points) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updateBBox(lineBBox, p);\n tileLine.push(p);\n }\n tileLines.push(tileLine);\n }\n if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n resetBBox(lineBBox);\n for (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\nfunction pointsWithinPolygons(ctx, polygonGeometry) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const canonical = ctx.canonicalID();\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox))\n return false;\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon))\n return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox))\n return false;\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons))\n return false;\n }\n }\n return true;\n}\nfunction linesWithinPolygons(ctx, polygonGeometry) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const canonical = ctx.canonicalID();\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox))\n return false;\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon))\n return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox))\n return false;\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons))\n return false;\n }\n }\n return true;\n}\nclass Within {\n constructor(geojson, geometries) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n static parse(args, context) {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = args[1];\n if (geojson.type === 'FeatureCollection') {\n const polygonsCoords = [];\n for (const polygon of geojson.features) {\n const { type, coordinates } = polygon.geometry;\n if (type === 'Polygon') {\n polygonsCoords.push(coordinates);\n }\n if (type === 'MultiPolygon') {\n polygonsCoords.push(...coordinates);\n }\n }\n if (polygonsCoords.length) {\n const multipolygonWrapper = {\n type: 'MultiPolygon',\n coordinates: polygonsCoords\n };\n return new Within(geojson, multipolygonWrapper);\n }\n }\n else if (geojson.type === 'Feature') {\n const type = geojson.geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.geometry);\n }\n }\n else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n return new Within(geojson, geojson);\n }\n }\n return context.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\");\n }\n evaluate(ctx) {\n if (ctx.geometry() != null && ctx.canonicalID() != null) {\n if (ctx.geometryType() === 'Point') {\n return pointsWithinPolygons(ctx, this.geometries);\n }\n else if (ctx.geometryType() === 'LineString') {\n return linesWithinPolygons(ctx, this.geometries);\n }\n }\n return false;\n }\n eachChild() { }\n outputDefined() {\n return true;\n }\n}\n\nclass TinyQueue {\n constructor(data = [], compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0)) {\n this.data = data;\n this.length = this.data.length;\n this.compare = compare;\n\n if (this.length > 0) {\n for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);\n }\n }\n\n push(item) {\n this.data.push(item);\n this._up(this.length++);\n }\n\n pop() {\n if (this.length === 0) return undefined;\n\n const top = this.data[0];\n const bottom = this.data.pop();\n\n if (--this.length > 0) {\n this.data[0] = bottom;\n this._down(0);\n }\n\n return top;\n }\n\n peek() {\n return this.data[0];\n }\n\n _up(pos) {\n const {data, compare} = this;\n const item = data[pos];\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const current = data[parent];\n if (compare(item, current) >= 0) break;\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n }\n\n _down(pos) {\n const {data, compare} = this;\n const halfLength = this.length >> 1;\n const item = data[pos];\n\n while (pos < halfLength) {\n let bestChild = (pos << 1) + 1; // initially it is the left child\n const right = bestChild + 1;\n\n if (right < this.length && compare(data[right], data[bestChild]) < 0) {\n bestChild = right;\n }\n if (compare(data[bestChild], item) >= 0) break;\n\n data[pos] = data[bestChild];\n pos = bestChild;\n }\n\n data[pos] = item;\n }\n}\n\n/**\n * Rearranges items so that all items in the [left, k] are the smallest.\n * The k-th element will have the (k - left + 1)-th smallest value in [left, right].\n *\n * @template T\n * @param {T[]} arr the array to partially sort (in place)\n * @param {number} k middle index for partial sorting (as defined above)\n * @param {number} [left=0] left index of the range to sort\n * @param {number} [right=arr.length-1] right index\n * @param {(a: T, b: T) => number} [compare = (a, b) => a - b] compare function\n */\nfunction quickselect(arr, k, left = 0, right = arr.length - 1, compare = defaultCompare) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(arr, k, newLeft, newRight, compare);\n }\n\n const t = arr[k];\n let i = left;\n /** @type {number} */\n let j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @template T\n * @param {T[]} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {number}\n */\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n * @param rings - the rings to classify\n * @param maxRings - the maximum number of rings to include in a polygon, use 0 to include all rings\n * @returns an array of polygons with internal rings as holes\n */\nfunction classifyRings(rings, maxRings) {\n const len = rings.length;\n if (len <= 1)\n return [rings];\n const polygons = [];\n let polygon;\n let ccw;\n for (const ring of rings) {\n const area = calculateSignedArea(ring);\n if (area === 0)\n continue;\n ring.area = Math.abs(area);\n if (ccw === undefined)\n ccw = area < 0;\n if (ccw === area < 0) {\n if (polygon)\n polygons.push(polygon);\n polygon = [ring];\n }\n else {\n polygon.push(ring);\n }\n }\n if (polygon)\n polygons.push(polygon);\n // Earcut performance degrades with the # of rings in a polygon. For this\n // reason, we limit strip out all but the `maxRings` largest rings.\n if (maxRings > 1) {\n for (let j = 0; j < polygons.length; j++) {\n if (polygons[j].length <= maxRings)\n continue;\n quickselect(polygons[j], maxRings, 1, polygons[j].length - 1, compareAreas);\n polygons[j] = polygons[j].slice(0, maxRings);\n }\n }\n return polygons;\n}\nfunction compareAreas(a, b) {\n return b.area - a.area;\n}\n/**\n * Returns the signed area for the polygon ring. Positive areas are exterior rings and\n * have a clockwise winding. Negative areas are interior rings and have a counter clockwise\n * ordering.\n *\n * @param ring - Exterior or interior ring\n * @returns Signed area\n */\nfunction calculateSignedArea(ring) {\n let sum = 0;\n for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n}\n\n// This is taken from https://github.com/mapbox/cheap-ruler/ in order to take only the relevant parts\n// Values that define WGS84 ellipsoid model of the Earth\nconst RE = 6378.137; // equatorial radius\nconst FE = 1 / 298.257223563; // flattening\nconst E2 = FE * (2 - FE);\nconst RAD = Math.PI / 180;\nclass CheapRuler {\n constructor(lat) {\n // Curvature formulas from https://en.wikipedia.org/wiki/Earth_radius#Meridional\n const m = RAD * RE * 1000;\n const coslat = Math.cos(lat * RAD);\n const w2 = 1 / (1 - E2 * (1 - coslat * coslat));\n const w = Math.sqrt(w2);\n // multipliers for converting longitude and latitude degrees into distance\n this.kx = m * w * coslat; // based on normal radius of curvature\n this.ky = m * w * w2 * (1 - E2); // based on meridional radius of curvature\n }\n /**\n * Given two points of the form [longitude, latitude], returns the distance.\n *\n * @param a - point [longitude, latitude]\n * @param b - point [longitude, latitude]\n * @returns distance\n * @example\n * const distance = ruler.distance([30.5, 50.5], [30.51, 50.49]);\n * //=distance\n */\n distance(a, b) {\n const dx = this.wrap(a[0] - b[0]) * this.kx;\n const dy = (a[1] - b[1]) * this.ky;\n return Math.sqrt(dx * dx + dy * dy);\n }\n /**\n * Returns an object of the form {point, index, t}, where point is closest point on the line\n * from the given point, index is the start index of the segment with the closest point,\n * and t is a parameter from 0 to 1 that indicates where the closest point is on that segment.\n *\n * @param line - an array of points that form the line\n * @param p - point [longitude, latitude]\n * @returns the nearest point, its index in the array and the proportion along the line\n * @example\n * const point = ruler.pointOnLine(line, [-67.04, 50.5]).point;\n * //=point\n */\n pointOnLine(line, p) {\n let minDist = Infinity;\n let minX, minY, minI, minT;\n for (let i = 0; i < line.length - 1; i++) {\n let x = line[i][0];\n let y = line[i][1];\n let dx = this.wrap(line[i + 1][0] - x) * this.kx;\n let dy = (line[i + 1][1] - y) * this.ky;\n let t = 0;\n if (dx !== 0 || dy !== 0) {\n t =\n (this.wrap(p[0] - x) * this.kx * dx + (p[1] - y) * this.ky * dy) /\n (dx * dx + dy * dy);\n if (t > 1) {\n x = line[i + 1][0];\n y = line[i + 1][1];\n }\n else if (t > 0) {\n x += (dx / this.kx) * t;\n y += (dy / this.ky) * t;\n }\n }\n dx = this.wrap(p[0] - x) * this.kx;\n dy = (p[1] - y) * this.ky;\n const sqDist = dx * dx + dy * dy;\n if (sqDist < minDist) {\n minDist = sqDist;\n minX = x;\n minY = y;\n minI = i;\n minT = t;\n }\n }\n return {\n point: [minX, minY],\n index: minI,\n t: Math.max(0, Math.min(1, minT))\n };\n }\n wrap(deg) {\n while (deg < -180)\n deg += 360;\n while (deg > 180)\n deg -= 360;\n return deg;\n }\n}\n\nconst MinPointsSize = 100;\nconst MinLinePointsSize = 50;\nfunction compareDistPair(a, b) {\n return b[0] - a[0];\n}\nfunction getRangeSize(range) {\n return range[1] - range[0] + 1;\n}\nfunction isRangeSafe(range, threshold) {\n return range[1] >= range[0] && range[1] < threshold;\n}\nfunction splitRange(range, isLine) {\n if (range[0] > range[1]) {\n return [null, null];\n }\n const size = getRangeSize(range);\n if (isLine) {\n if (size === 2) {\n return [range, null];\n }\n const size1 = Math.floor(size / 2);\n return [\n [range[0], range[0] + size1],\n [range[0] + size1, range[1]]\n ];\n }\n if (size === 1) {\n return [range, null];\n }\n const size1 = Math.floor(size / 2) - 1;\n return [\n [range[0], range[0] + size1],\n [range[0] + size1 + 1, range[1]]\n ];\n}\nfunction getBBox(coords, range) {\n if (!isRangeSafe(range, coords.length)) {\n return [Infinity, Infinity, -Infinity, -Infinity];\n }\n const bbox = [Infinity, Infinity, -Infinity, -Infinity];\n for (let i = range[0]; i <= range[1]; ++i) {\n updateBBox(bbox, coords[i]);\n }\n return bbox;\n}\nfunction getPolygonBBox(polygon) {\n const bbox = [Infinity, Infinity, -Infinity, -Infinity];\n for (const ring of polygon) {\n for (const coord of ring) {\n updateBBox(bbox, coord);\n }\n }\n return bbox;\n}\nfunction isValidBBox(bbox) {\n return (bbox[0] !== -Infinity &&\n bbox[1] !== -Infinity &&\n bbox[2] !== Infinity &&\n bbox[3] !== Infinity);\n}\n// Calculate the distance between two bounding boxes.\n// Calculate the delta in x and y direction, and use two fake points {0.0, 0.0}\n// and {dx, dy} to calculate the distance. Distance will be 0.0 if bounding box are overlapping.\nfunction bboxToBBoxDistance(bbox1, bbox2, ruler) {\n if (!isValidBBox(bbox1) || !isValidBBox(bbox2)) {\n return NaN;\n }\n let dx = 0.0;\n let dy = 0.0;\n // bbox1 in left side\n if (bbox1[2] < bbox2[0]) {\n dx = bbox2[0] - bbox1[2];\n }\n // bbox1 in right side\n if (bbox1[0] > bbox2[2]) {\n dx = bbox1[0] - bbox2[2];\n }\n // bbox1 in above side\n if (bbox1[1] > bbox2[3]) {\n dy = bbox1[1] - bbox2[3];\n }\n // bbox1 in down side\n if (bbox1[3] < bbox2[1]) {\n dy = bbox2[1] - bbox1[3];\n }\n return ruler.distance([0.0, 0.0], [dx, dy]);\n}\nfunction pointToLineDistance(point, line, ruler) {\n const nearestPoint = ruler.pointOnLine(line, point);\n return ruler.distance(point, nearestPoint.point);\n}\nfunction segmentToSegmentDistance(p1, p2, q1, q2, ruler) {\n const dist1 = Math.min(pointToLineDistance(p1, [q1, q2], ruler), pointToLineDistance(p2, [q1, q2], ruler));\n const dist2 = Math.min(pointToLineDistance(q1, [p1, p2], ruler), pointToLineDistance(q2, [p1, p2], ruler));\n return Math.min(dist1, dist2);\n}\nfunction lineToLineDistance(line1, range1, line2, range2, ruler) {\n const rangeSafe = isRangeSafe(range1, line1.length) && isRangeSafe(range2, line2.length);\n if (!rangeSafe) {\n return Infinity;\n }\n let dist = Infinity;\n for (let i = range1[0]; i < range1[1]; ++i) {\n const p1 = line1[i];\n const p2 = line1[i + 1];\n for (let j = range2[0]; j < range2[1]; ++j) {\n const q1 = line2[j];\n const q2 = line2[j + 1];\n if (segmentIntersectSegment(p1, p2, q1, q2)) {\n return 0.0;\n }\n dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n }\n }\n return dist;\n}\nfunction pointsToPointsDistance(points1, range1, points2, range2, ruler) {\n const rangeSafe = isRangeSafe(range1, points1.length) && isRangeSafe(range2, points2.length);\n if (!rangeSafe) {\n return NaN;\n }\n let dist = Infinity;\n for (let i = range1[0]; i <= range1[1]; ++i) {\n for (let j = range2[0]; j <= range2[1]; ++j) {\n dist = Math.min(dist, ruler.distance(points1[i], points2[j]));\n if (dist === 0.0) {\n return dist;\n }\n }\n }\n return dist;\n}\nfunction pointToPolygonDistance(point, polygon, ruler) {\n if (pointWithinPolygon(point, polygon, true)) {\n return 0.0;\n }\n let dist = Infinity;\n for (const ring of polygon) {\n const front = ring[0];\n const back = ring[ring.length - 1];\n if (front !== back) {\n dist = Math.min(dist, pointToLineDistance(point, [back, front], ruler));\n if (dist === 0.0) {\n return dist;\n }\n }\n const nearestPoint = ruler.pointOnLine(ring, point);\n dist = Math.min(dist, ruler.distance(point, nearestPoint.point));\n if (dist === 0.0) {\n return dist;\n }\n }\n return dist;\n}\nfunction lineToPolygonDistance(line, range, polygon, ruler) {\n if (!isRangeSafe(range, line.length)) {\n return NaN;\n }\n for (let i = range[0]; i <= range[1]; ++i) {\n if (pointWithinPolygon(line[i], polygon, true)) {\n return 0.0;\n }\n }\n let dist = Infinity;\n for (let i = range[0]; i < range[1]; ++i) {\n const p1 = line[i];\n const p2 = line[i + 1];\n for (const ring of polygon) {\n for (let j = 0, len = ring.length, k = len - 1; j < len; k = j++) {\n const q1 = ring[k];\n const q2 = ring[j];\n if (segmentIntersectSegment(p1, p2, q1, q2)) {\n return 0.0;\n }\n dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n }\n }\n }\n return dist;\n}\nfunction polygonIntersect(poly1, poly2) {\n for (const ring of poly1) {\n for (const point of ring) {\n if (pointWithinPolygon(point, poly2, true)) {\n return true;\n }\n }\n }\n return false;\n}\nfunction polygonToPolygonDistance(polygon1, polygon2, ruler, currentMiniDist = Infinity) {\n const bbox1 = getPolygonBBox(polygon1);\n const bbox2 = getPolygonBBox(polygon2);\n if (currentMiniDist !== Infinity &&\n bboxToBBoxDistance(bbox1, bbox2, ruler) >= currentMiniDist) {\n return currentMiniDist;\n }\n if (boxWithinBox(bbox1, bbox2)) {\n if (polygonIntersect(polygon1, polygon2)) {\n return 0.0;\n }\n }\n else if (polygonIntersect(polygon2, polygon1)) {\n return 0.0;\n }\n let dist = Infinity;\n for (const ring1 of polygon1) {\n for (let i = 0, len1 = ring1.length, l = len1 - 1; i < len1; l = i++) {\n const p1 = ring1[l];\n const p2 = ring1[i];\n for (const ring2 of polygon2) {\n for (let j = 0, len2 = ring2.length, k = len2 - 1; j < len2; k = j++) {\n const q1 = ring2[k];\n const q2 = ring2[j];\n if (segmentIntersectSegment(p1, p2, q1, q2)) {\n return 0.0;\n }\n dist = Math.min(dist, segmentToSegmentDistance(p1, p2, q1, q2, ruler));\n }\n }\n }\n }\n return dist;\n}\nfunction updateQueue(distQueue, miniDist, ruler, points, polyBBox, rangeA) {\n if (!rangeA) {\n return;\n }\n const tempDist = bboxToBBoxDistance(getBBox(points, rangeA), polyBBox, ruler);\n // Insert new pair to the queue if the bbox distance is less than\n // miniDist, The pair with biggest distance will be at the top\n if (tempDist < miniDist) {\n distQueue.push([tempDist, rangeA, [0, 0]]);\n }\n}\nfunction updateQueueTwoSets(distQueue, miniDist, ruler, pointSet1, pointSet2, range1, range2) {\n if (!range1 || !range2) {\n return;\n }\n const tempDist = bboxToBBoxDistance(getBBox(pointSet1, range1), getBBox(pointSet2, range2), ruler);\n // Insert new pair to the queue if the bbox distance is less than\n // miniDist, The pair with biggest distance will be at the top\n if (tempDist < miniDist) {\n distQueue.push([tempDist, range1, range2]);\n }\n}\n// Divide and conquer, the time complexity is O(n*lgn), faster than Brute force\n// O(n*n) Most of the time, use index for in-place processing.\nfunction pointsToPolygonDistance(points, isLine, polygon, ruler, currentMiniDist = Infinity) {\n let miniDist = Math.min(ruler.distance(points[0], polygon[0][0]), currentMiniDist);\n if (miniDist === 0.0) {\n return miniDist;\n }\n const distQueue = new TinyQueue([[0, [0, points.length - 1], [0, 0]]], compareDistPair);\n const polyBBox = getPolygonBBox(polygon);\n while (distQueue.length > 0) {\n const distPair = distQueue.pop();\n if (distPair[0] >= miniDist) {\n continue;\n }\n const range = distPair[1];\n // In case the set size are relatively small, we could use brute-force directly\n const threshold = isLine ? MinLinePointsSize : MinPointsSize;\n if (getRangeSize(range) <= threshold) {\n if (!isRangeSafe(range, points.length)) {\n return NaN;\n }\n if (isLine) {\n const tempDist = lineToPolygonDistance(points, range, polygon, ruler);\n if (isNaN(tempDist) || tempDist === 0.0) {\n return tempDist;\n }\n miniDist = Math.min(miniDist, tempDist);\n }\n else {\n for (let i = range[0]; i <= range[1]; ++i) {\n const tempDist = pointToPolygonDistance(points[i], polygon, ruler);\n miniDist = Math.min(miniDist, tempDist);\n if (miniDist === 0.0) {\n return 0.0;\n }\n }\n }\n }\n else {\n const newRangesA = splitRange(range, isLine);\n updateQueue(distQueue, miniDist, ruler, points, polyBBox, newRangesA[0]);\n updateQueue(distQueue, miniDist, ruler, points, polyBBox, newRangesA[1]);\n }\n }\n return miniDist;\n}\nfunction pointSetToPointSetDistance(pointSet1, isLine1, pointSet2, isLine2, ruler, currentMiniDist = Infinity) {\n let miniDist = Math.min(currentMiniDist, ruler.distance(pointSet1[0], pointSet2[0]));\n if (miniDist === 0.0) {\n return miniDist;\n }\n const distQueue = new TinyQueue([[0, [0, pointSet1.length - 1], [0, pointSet2.length - 1]]], compareDistPair);\n while (distQueue.length > 0) {\n const distPair = distQueue.pop();\n if (distPair[0] >= miniDist) {\n continue;\n }\n const rangeA = distPair[1];\n const rangeB = distPair[2];\n const threshold1 = isLine1 ? MinLinePointsSize : MinPointsSize;\n const threshold2 = isLine2 ? MinLinePointsSize : MinPointsSize;\n // In case the set size are relatively small, we could use brute-force directly\n if (getRangeSize(rangeA) <= threshold1 && getRangeSize(rangeB) <= threshold2) {\n if (!isRangeSafe(rangeA, pointSet1.length) && isRangeSafe(rangeB, pointSet2.length)) {\n return NaN;\n }\n let tempDist;\n if (isLine1 && isLine2) {\n tempDist = lineToLineDistance(pointSet1, rangeA, pointSet2, rangeB, ruler);\n miniDist = Math.min(miniDist, tempDist);\n }\n else if (isLine1 && !isLine2) {\n const sublibe = pointSet1.slice(rangeA[0], rangeA[1] + 1);\n for (let i = rangeB[0]; i <= rangeB[1]; ++i) {\n tempDist = pointToLineDistance(pointSet2[i], sublibe, ruler);\n miniDist = Math.min(miniDist, tempDist);\n if (miniDist === 0.0) {\n return miniDist;\n }\n }\n }\n else if (!isLine1 && isLine2) {\n const sublibe = pointSet2.slice(rangeB[0], rangeB[1] + 1);\n for (let i = rangeA[0]; i <= rangeA[1]; ++i) {\n tempDist = pointToLineDistance(pointSet1[i], sublibe, ruler);\n miniDist = Math.min(miniDist, tempDist);\n if (miniDist === 0.0) {\n return miniDist;\n }\n }\n }\n else {\n tempDist = pointsToPointsDistance(pointSet1, rangeA, pointSet2, rangeB, ruler);\n miniDist = Math.min(miniDist, tempDist);\n }\n }\n else {\n const newRangesA = splitRange(rangeA, isLine1);\n const newRangesB = splitRange(rangeB, isLine2);\n updateQueueTwoSets(distQueue, miniDist, ruler, pointSet1, pointSet2, newRangesA[0], newRangesB[0]);\n updateQueueTwoSets(distQueue, miniDist, ruler, pointSet1, pointSet2, newRangesA[0], newRangesB[1]);\n updateQueueTwoSets(distQueue, miniDist, ruler, pointSet1, pointSet2, newRangesA[1], newRangesB[0]);\n updateQueueTwoSets(distQueue, miniDist, ruler, pointSet1, pointSet2, newRangesA[1], newRangesB[1]);\n }\n }\n return miniDist;\n}\nfunction pointToGeometryDistance(ctx, geometries) {\n const tilePoints = ctx.geometry();\n const pointPosition = tilePoints\n .flat()\n .map((p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical));\n if (tilePoints.length === 0) {\n return NaN;\n }\n const ruler = new CheapRuler(pointPosition[0][1]);\n let dist = Infinity;\n for (const geometry of geometries) {\n switch (geometry.type) {\n case 'Point':\n dist = Math.min(dist, pointSetToPointSetDistance(pointPosition, false, [geometry.coordinates], false, ruler, dist));\n break;\n case 'LineString':\n dist = Math.min(dist, pointSetToPointSetDistance(pointPosition, false, geometry.coordinates, true, ruler, dist));\n break;\n case 'Polygon':\n dist = Math.min(dist, pointsToPolygonDistance(pointPosition, false, geometry.coordinates, ruler, dist));\n break;\n }\n if (dist === 0.0) {\n return dist;\n }\n }\n return dist;\n}\nfunction lineStringToGeometryDistance(ctx, geometries) {\n const tileLine = ctx.geometry();\n const linePositions = tileLine\n .flat()\n .map((p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical));\n if (tileLine.length === 0) {\n return NaN;\n }\n const ruler = new CheapRuler(linePositions[0][1]);\n let dist = Infinity;\n for (const geometry of geometries) {\n switch (geometry.type) {\n case 'Point':\n dist = Math.min(dist, pointSetToPointSetDistance(linePositions, true, [geometry.coordinates], false, ruler, dist));\n break;\n case 'LineString':\n dist = Math.min(dist, pointSetToPointSetDistance(linePositions, true, geometry.coordinates, true, ruler, dist));\n break;\n case 'Polygon':\n dist = Math.min(dist, pointsToPolygonDistance(linePositions, true, geometry.coordinates, ruler, dist));\n break;\n }\n if (dist === 0.0) {\n return dist;\n }\n }\n return dist;\n}\nfunction polygonToGeometryDistance(ctx, geometries) {\n const tilePolygon = ctx.geometry();\n if (tilePolygon.length === 0 || tilePolygon[0].length === 0) {\n return NaN;\n }\n const polygons = classifyRings(tilePolygon, 0).map((polygon) => {\n return polygon.map((ring) => {\n return ring.map((p) => getLngLatFromTileCoord([p.x, p.y], ctx.canonical));\n });\n });\n const ruler = new CheapRuler(polygons[0][0][0][1]);\n let dist = Infinity;\n for (const geometry of geometries) {\n for (const polygon of polygons) {\n switch (geometry.type) {\n case 'Point':\n dist = Math.min(dist, pointsToPolygonDistance([geometry.coordinates], false, polygon, ruler, dist));\n break;\n case 'LineString':\n dist = Math.min(dist, pointsToPolygonDistance(geometry.coordinates, true, polygon, ruler, dist));\n break;\n case 'Polygon':\n dist = Math.min(dist, polygonToPolygonDistance(polygon, geometry.coordinates, ruler, dist));\n break;\n }\n if (dist === 0.0) {\n return dist;\n }\n }\n }\n return dist;\n}\nfunction toSimpleGeometry(geometry) {\n if (geometry.type === 'MultiPolygon') {\n return geometry.coordinates.map((polygon) => {\n return {\n type: 'Polygon',\n coordinates: polygon\n };\n });\n }\n if (geometry.type === 'MultiLineString') {\n return geometry.coordinates.map((lineString) => {\n return {\n type: 'LineString',\n coordinates: lineString\n };\n });\n }\n if (geometry.type === 'MultiPoint') {\n return geometry.coordinates.map((point) => {\n return {\n type: 'Point',\n coordinates: point\n };\n });\n }\n return [geometry];\n}\nclass Distance {\n constructor(geojson, geometries) {\n this.type = NumberType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n static parse(args, context) {\n if (args.length !== 2)\n return context.error(`'distance' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = args[1];\n if (geojson.type === 'FeatureCollection') {\n return new Distance(geojson, geojson.features.map((feature) => toSimpleGeometry(feature.geometry)).flat());\n }\n else if (geojson.type === 'Feature') {\n return new Distance(geojson, toSimpleGeometry(geojson.geometry));\n }\n else if ('type' in geojson && 'coordinates' in geojson) {\n return new Distance(geojson, toSimpleGeometry(geojson));\n }\n }\n return context.error(\"'distance' expression requires valid geojson object that contains polygon geometry type.\");\n }\n evaluate(ctx) {\n if (ctx.geometry() != null && ctx.canonicalID() != null) {\n if (ctx.geometryType() === 'Point') {\n return pointToGeometryDistance(ctx, this.geometries);\n }\n else if (ctx.geometryType() === 'LineString') {\n return lineStringToGeometryDistance(ctx, this.geometries);\n }\n else if (ctx.geometryType() === 'Polygon') {\n return polygonToGeometryDistance(ctx, this.geometries);\n }\n }\n return NaN;\n }\n eachChild() { }\n outputDefined() {\n return true;\n }\n}\n\nclass GlobalState {\n constructor(key) {\n this.type = ValueType;\n this.key = key;\n }\n static parse(args, context) {\n if (args.length !== 2) {\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n }\n const key = args[1];\n if (key === undefined || key === null) {\n return context.error('Global state property must be defined.');\n }\n if (typeof key !== 'string') {\n return context.error(`Global state property must be string, but found ${typeof args[1]} instead.`);\n }\n return new GlobalState(key);\n }\n evaluate(ctx) {\n var _a;\n const globalState = (_a = ctx.globals) === null || _a === void 0 ? void 0 : _a.globalState;\n if (!globalState || Object.keys(globalState).length === 0)\n return null;\n return getOwn(globalState, this.key);\n }\n eachChild() { }\n outputDefined() {\n return false;\n }\n}\n\nconst expressions$1 = {\n // special forms\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n array: Assertion,\n at: At,\n boolean: Assertion,\n case: Case,\n coalesce: Coalesce,\n collator: CollatorExpression,\n format: FormatExpression,\n image: ImageExpression,\n in: In,\n 'index-of': IndexOf,\n interpolate: Interpolate,\n 'interpolate-hcl': Interpolate,\n 'interpolate-lab': Interpolate,\n length: Length,\n let: Let,\n literal: Literal,\n match: Match,\n number: Assertion,\n 'number-format': NumberFormat,\n object: Assertion,\n slice: Slice,\n step: Step,\n string: Assertion,\n 'to-boolean': Coercion,\n 'to-color': Coercion,\n 'to-number': Coercion,\n 'to-string': Coercion,\n var: Var,\n within: Within,\n distance: Distance,\n 'global-state': GlobalState\n};\n\nclass CompoundExpression {\n constructor(name, type, evaluate, args) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n evaluate(ctx) {\n return this._evaluate(ctx, this.args);\n }\n eachChild(fn) {\n this.args.forEach(fn);\n }\n outputDefined() {\n return false;\n }\n static parse(args, context) {\n const op = args[0];\n const definition = CompoundExpression.definitions[op];\n if (!definition) {\n return context.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n // Now check argument types against each signature\n const type = Array.isArray(definition) ? definition[0] : definition.type;\n const availableOverloads = Array.isArray(definition)\n ? [[definition[1], definition[2]]]\n : definition.overloads;\n const overloads = availableOverloads.filter(([signature]) => !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n );\n let signatureContext = null;\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, isExpressionConstant, context.path, null, context.scope);\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params)\n ? params[i - 1]\n : params.type;\n const parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n if (!parsed) {\n argParseFailed = true;\n break;\n }\n parsedArgs.push(parsed);\n }\n if (argParseFailed) {\n // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\n if (Array.isArray(params)) {\n if (params.length !== parsedArgs.length) {\n signatureContext.error(`Expected ${params.length} arguments, but found ${parsedArgs.length} instead.`);\n continue;\n }\n }\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n }\n else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed)\n return null;\n actualTypes.push(typeToString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n return null;\n }\n static register(registry, definitions) {\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error)\n throw new RuntimeError(error);\n return new Color(r / 255, g / 255, b / 255, alpha, false);\n}\nfunction has(key, obj) {\n return key in obj;\n}\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\nfunction varargs(type) {\n return { type };\n}\nCompoundExpression.register(expressions$1, {\n error: [\n ErrorType,\n [StringType],\n (ctx, [v]) => {\n throw new RuntimeError(v.evaluate(ctx));\n }\n ],\n typeof: [StringType, [ValueType], (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n const [r, g, b, a] = v.evaluate(ctx).rgb;\n return [r * 255, g * 255, b * 255, a];\n }\n ],\n rgb: [ColorType, [NumberType, NumberType, NumberType], rgba],\n rgba: [ColorType, [NumberType, NumberType, NumberType, NumberType], rgba],\n has: {\n type: BooleanType,\n overloads: [\n [[StringType], (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())],\n [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n get: {\n type: ValueType,\n overloads: [\n [[StringType], (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())],\n [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n properties: [ObjectType, [], (ctx) => ctx.properties()],\n 'geometry-type': [StringType, [], (ctx) => ctx.geometryType()],\n id: [ValueType, [], (ctx) => ctx.id()],\n zoom: [NumberType, [], (ctx) => ctx.globals.zoom],\n 'heatmap-density': [NumberType, [], (ctx) => ctx.globals.heatmapDensity || 0],\n elevation: [NumberType, [], (ctx) => ctx.globals.elevation || 0],\n 'line-progress': [NumberType, [], (ctx) => ctx.globals.lineProgress || 0],\n accumulated: [\n ValueType,\n [],\n (ctx) => (ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated)\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [[NumberType, NumberType], (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)],\n [[NumberType], (ctx, [a]) => -a.evaluate(ctx)]\n ]\n },\n '/': [NumberType, [NumberType, NumberType], (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)],\n '%': [NumberType, [NumberType, NumberType], (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)],\n ln2: [NumberType, [], () => Math.LN2],\n pi: [NumberType, [], () => Math.PI],\n e: [NumberType, [], () => Math.E],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n sqrt: [NumberType, [NumberType], (ctx, [x]) => Math.sqrt(x.evaluate(ctx))],\n log10: [NumberType, [NumberType], (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10],\n ln: [NumberType, [NumberType], (ctx, [n]) => Math.log(n.evaluate(ctx))],\n log2: [NumberType, [NumberType], (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2],\n sin: [NumberType, [NumberType], (ctx, [n]) => Math.sin(n.evaluate(ctx))],\n cos: [NumberType, [NumberType], (ctx, [n]) => Math.cos(n.evaluate(ctx))],\n tan: [NumberType, [NumberType], (ctx, [n]) => Math.tan(n.evaluate(ctx))],\n asin: [NumberType, [NumberType], (ctx, [n]) => Math.asin(n.evaluate(ctx))],\n acos: [NumberType, [NumberType], (ctx, [n]) => Math.acos(n.evaluate(ctx))],\n atan: [NumberType, [NumberType], (ctx, [n]) => Math.atan(n.evaluate(ctx))],\n min: [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map((arg) => arg.evaluate(ctx)))\n ],\n max: [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map((arg) => arg.evaluate(ctx)))\n ],\n abs: [NumberType, [NumberType], (ctx, [n]) => Math.abs(n.evaluate(ctx))],\n round: [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n floor: [NumberType, [NumberType], (ctx, [n]) => Math.floor(n.evaluate(ctx))],\n ceil: [NumberType, [NumberType], (ctx, [n]) => Math.ceil(n.evaluate(ctx))],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[k.value] === v.value\n ],\n 'filter-id-==': [BooleanType, [ValueType], (ctx, [v]) => ctx.id() === v.value],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === v.value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[k.value];\n const b = v.value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = v.value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[k.value];\n const b = v.value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = v.value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[k.value];\n const b = v.value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = v.value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[k.value];\n const b = v.value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = v.value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [BooleanType, [ValueType], (ctx, [k]) => k.value in ctx.properties()],\n 'filter-has-id': [BooleanType, [], (ctx) => ctx.id() !== null && ctx.id() !== undefined],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => v.value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => v.value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => v.value.indexOf(ctx.properties()[k.value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1)\n ],\n all: {\n type: BooleanType,\n overloads: [\n [[BooleanType, BooleanType], (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n any: {\n type: BooleanType,\n overloads: [\n [[BooleanType, BooleanType], (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [BooleanType, [BooleanType], (ctx, [b]) => !b.evaluate(ctx)],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }\n ],\n upcase: [StringType, [StringType], (ctx, [s]) => s.evaluate(ctx).toUpperCase()],\n downcase: [StringType, [StringType], (ctx, [s]) => s.evaluate(ctx).toLowerCase()],\n concat: [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map((arg) => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\nfunction stringifySignature(signature) {\n if (Array.isArray(signature)) {\n return `(${signature.map(typeToString).join(', ')})`;\n }\n else {\n return `(${typeToString(signature.type)}...)`;\n }\n}\nfunction isExpressionConstant(expression) {\n if (expression instanceof Var) {\n return isExpressionConstant(expression.boundExpression);\n }\n else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n }\n else if (expression instanceof CollatorExpression) {\n // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n }\n else if (expression instanceof Within) {\n return false;\n }\n else if (expression instanceof Distance) {\n return false;\n }\n else if (expression instanceof GlobalState) {\n return false;\n }\n const isTypeAnnotation = expression instanceof Coercion || expression instanceof Assertion;\n let childrenConstant = true;\n expression.eachChild((child) => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\n if (isTypeAnnotation) {\n childrenConstant = childrenConstant && isExpressionConstant(child);\n }\n else {\n childrenConstant = childrenConstant && child instanceof Literal;\n }\n });\n if (!childrenConstant) {\n return false;\n }\n return (isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, [\n 'zoom',\n 'heatmap-density',\n 'elevation',\n 'line-progress',\n 'accumulated',\n 'is-supported-script'\n ]));\n}\nfunction isFeatureConstant(e) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'get' && e.args.length === 1) {\n return false;\n }\n else if (e.name === 'feature-state') {\n return false;\n }\n else if (e.name === 'has' && e.args.length === 1) {\n return false;\n }\n else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') {\n return false;\n }\n else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n if (e instanceof Within) {\n return false;\n }\n if (e instanceof Distance) {\n return false;\n }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isFeatureConstant(arg)) {\n result = false;\n }\n });\n return result;\n}\nfunction isStateConstant(e) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isStateConstant(arg)) {\n result = false;\n }\n });\n return result;\n}\nfunction isGlobalPropertyConstant(e, properties) {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {\n return false;\n }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) {\n result = false;\n }\n });\n return result;\n}\n\nfunction success(value) {\n return { result: 'success', value };\n}\nfunction error(value) {\n return { result: 'error', value };\n}\n\nfunction supportsPropertyExpression(spec) {\n return (spec['property-type'] === 'data-driven' ||\n spec['property-type'] === 'cross-faded-data-driven');\n}\nfunction supportsZoomExpression(spec) {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\nfunction supportsInterpolation(spec) {\n return !!spec.expression && spec.expression.interpolated;\n}\n\nfunction getType(val) {\n if (val instanceof Number) {\n return 'number';\n }\n else if (val instanceof String) {\n return 'string';\n }\n else if (val instanceof Boolean) {\n return 'boolean';\n }\n else if (Array.isArray(val)) {\n return 'array';\n }\n else if (val === null) {\n return 'null';\n }\n else {\n return typeof val;\n }\n}\n\nfunction isFunction$1(value) {\n return (typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n typeOf(value) === ObjectType);\n}\nfunction identityFunction(x) {\n return x;\n}\nfunction getParseFunction(propertySpec) {\n switch (propertySpec.type) {\n case 'color':\n return Color.parse;\n case 'padding':\n return Padding.parse;\n case 'numberArray':\n return NumberArray.parse;\n case 'colorArray':\n return ColorArray.parse;\n default:\n return null;\n }\n}\nfunction getInnerFunction(type) {\n switch (type) {\n case 'exponential':\n return evaluateExponentialFunction;\n case 'interval':\n return evaluateIntervalFunction;\n case 'categorical':\n return evaluateCategoricalFunction;\n case 'identity':\n return evaluateIdentityFunction;\n default:\n throw new Error(`Unknown function type \"${type}\"`);\n }\n}\nfunction createFunction(parameters, propertySpec) {\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n const parseFn = getParseFunction(propertySpec);\n if (parseFn) {\n parameters = extendBy({}, parameters);\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], parseFn(stop[1])];\n });\n }\n if (parameters.default) {\n parameters.default = parseFn(parameters.default);\n }\n else {\n parameters.default = parseFn(propertySpec.default);\n }\n }\n if (parameters.colorSpace && !isSupportedInterpolationColorSpace(parameters.colorSpace)) {\n throw new Error(`Unknown color space: \"${parameters.colorSpace}\"`);\n }\n const innerFun = getInnerFunction(type);\n let hashedStops;\n let categoricalKeyType;\n if (type === 'categorical') {\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n }\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop[0].value, stop[1]]);\n }\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([\n featureFunctions[z].zoom,\n createFunction(featureFunctions[z], propertySpec)\n ]);\n }\n const interpolationType = { name: 'linear' };\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map((s) => s[0]),\n evaluate({ zoom }, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n }\n else if (zoomDependent) {\n const interpolationType = type === 'exponential'\n ? { name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1 }\n : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map((s) => s[0]),\n evaluate: ({ zoom }) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n }\n else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const value = feature && feature.properties\n ? feature.properties[parameters.property]\n : undefined;\n if (value === undefined) {\n return coalesce$1(parameters.default, propertySpec.default);\n }\n return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n }\n };\n }\n}\nfunction coalesce$1(a, b, c) {\n if (a !== undefined)\n return a;\n if (b !== undefined)\n return b;\n if (c !== undefined)\n return c;\n}\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce$1(evaluated, parameters.default, propertySpec.default);\n}\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number')\n return coalesce$1(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1)\n return parameters.stops[0][1];\n if (input <= parameters.stops[0][0])\n return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0])\n return parameters.stops[n - 1][1];\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n return parameters.stops[index][1];\n}\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n // Edge cases\n if (getType(input) !== 'number')\n return coalesce$1(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1)\n return parameters.stops[0][1];\n if (input <= parameters.stops[0][0])\n return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0])\n return parameters.stops[n - 1][1];\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n const interp = interpolateFactory[propertySpec.type] || identityFunction;\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t, parameters.colorSpace);\n }\n };\n }\n return interp(outputLower, outputUpper, t, parameters.colorSpace);\n}\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n switch (propertySpec.type) {\n case 'color':\n input = Color.parse(input);\n break;\n case 'formatted':\n input = Formatted.fromString(input.toString());\n break;\n case 'resolvedImage':\n input = ResolvedImage.fromString(input.toString());\n break;\n case 'padding':\n input = Padding.parse(input);\n break;\n case 'colorArray':\n input = ColorArray.parse(input);\n break;\n case 'numberArray':\n input = NumberArray.parse(input);\n break;\n default:\n if (getType(input) !== propertySpec.type &&\n (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n }\n return coalesce$1(input, parameters.default, propertySpec.default);\n}\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n if (difference === 0) {\n return 0;\n }\n else if (base === 1) {\n return progress / difference;\n }\n else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nclass StyleExpression {\n constructor(expression, propertySpec, globalState) {\n this.expression = expression;\n this._warningHistory = {};\n this._evaluator = new EvaluationContext();\n this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n this._enumValues =\n propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n this._globalState = globalState;\n }\n evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n return this.expression.evaluate(this._evaluator);\n }\n evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n try {\n const val = this.expression.evaluate(this._evaluator);\n if (val === null || val === undefined || (typeof val === 'number' && val !== val)) {\n return this._defaultValue;\n }\n if (this._enumValues && !(val in this._enumValues)) {\n throw new RuntimeError(`Expected value to be one of ${Object.keys(this._enumValues)\n .map((v) => JSON.stringify(v))\n .join(', ')}, but found ${JSON.stringify(val)} instead.`);\n }\n return val;\n }\n catch (e) {\n if (!this._warningHistory[e.message]) {\n this._warningHistory[e.message] = true;\n if (typeof console !== 'undefined') {\n console.warn(e.message);\n }\n }\n return this._defaultValue;\n }\n }\n}\nfunction isExpression(expression) {\n return (Array.isArray(expression) &&\n expression.length > 0 &&\n typeof expression[0] === 'string' &&\n expression[0] in expressions$1);\n}\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nfunction createExpression(expression, propertySpec, globalState) {\n const parser = new ParsingContext(expressions$1, isExpressionConstant, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined);\n if (!parsed) {\n return error(parser.errors);\n }\n return success(new StyleExpression(parsed, propertySpec, globalState));\n}\nclass ZoomConstantExpression {\n constructor(kind, expression, globalState) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent =\n kind !== 'constant' && !isStateConstant(expression.expression);\n this.globalStateRefs = findGlobalStateRefs(expression.expression);\n this._globalState = globalState;\n }\n evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\nclass ZoomDependentExpression {\n constructor(kind, expression, zoomStops, interpolationType, globalState) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent =\n kind !== 'camera' && !isStateConstant(expression.expression);\n this.globalStateRefs = findGlobalStateRefs(expression.expression);\n this.interpolationType = interpolationType;\n this._globalState = globalState;\n }\n evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n if (this._globalState) {\n globals = addGlobalState(globals, this._globalState);\n }\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n interpolationFactor(input, lower, upper) {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n }\n else {\n return 0;\n }\n }\n}\nfunction isZoomExpression(expression) {\n return expression._styleExpression !== undefined;\n}\nfunction createPropertyExpression(expressionInput, propertySpec, globalState) {\n const expression = createExpression(expressionInput, propertySpec, globalState);\n if (expression.result === 'error') {\n return expression;\n }\n const parsed = expression.value.expression;\n const isFeatureConstantResult = isFeatureConstant(parsed);\n if (!isFeatureConstantResult && !supportsPropertyExpression(propertySpec)) {\n return error([new ExpressionParsingError('', 'data expressions not supported')]);\n }\n const isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ExpressionParsingError('', 'zoom expressions not supported')]);\n }\n const zoomCurve = findZoomCurve(parsed);\n if (!zoomCurve && !isZoomConstant) {\n return error([\n new ExpressionParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')\n ]);\n }\n else if (zoomCurve instanceof ExpressionParsingError) {\n return error([zoomCurve]);\n }\n else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n return error([\n new ExpressionParsingError('', '\"interpolate\" expressions cannot be used with this property')\n ]);\n }\n if (!zoomCurve) {\n return success(isFeatureConstantResult\n ? new ZoomConstantExpression('constant', expression.value, globalState)\n : new ZoomConstantExpression('source', expression.value, globalState));\n }\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n return success(isFeatureConstantResult\n ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType, globalState)\n : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType, globalState));\n}\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nclass StylePropertyFunction {\n constructor(parameters, specification) {\n this._parameters = parameters;\n this._specification = specification;\n extendBy(this, createFunction(this._parameters, this._specification));\n }\n static deserialize(serialized) {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n }\n static serialize(input) {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\nfunction normalizePropertyExpression(value, specification, globalState) {\n if (isFunction$1(value)) {\n return new StylePropertyFunction(value, specification);\n }\n else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification, globalState);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map((err) => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n }\n else {\n let constant = value;\n if (specification.type === 'color' && typeof value === 'string') {\n constant = Color.parse(value);\n }\n else if (specification.type === 'padding' &&\n (typeof value === 'number' || Array.isArray(value))) {\n constant = Padding.parse(value);\n }\n else if (specification.type === 'numberArray' &&\n (typeof value === 'number' || Array.isArray(value))) {\n constant = NumberArray.parse(value);\n }\n else if (specification.type === 'colorArray' &&\n (typeof value === 'string' || Array.isArray(value))) {\n constant = ColorArray.parse(value);\n }\n else if (specification.type === 'variableAnchorOffsetCollection' &&\n Array.isArray(value)) {\n constant = VariableAnchorOffsetCollection.parse(value);\n }\n else if (specification.type === 'projectionDefinition' && typeof value === 'string') {\n constant = ProjectionDefinition.parse(value);\n }\n return {\n globalStateRefs: new Set(),\n _globalState: null,\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression) {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n }\n else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n }\n else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n result = expression;\n }\n if (result instanceof ExpressionParsingError) {\n return result;\n }\n expression.eachChild((child) => {\n const childResult = findZoomCurve(child);\n if (childResult instanceof ExpressionParsingError) {\n result = childResult;\n }\n else if (!result && childResult) {\n result = new ExpressionParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n }\n else if (result && childResult && result !== childResult) {\n result = new ExpressionParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n return result;\n}\nfunction findGlobalStateRefs(expression, results = new Set()) {\n if (expression instanceof GlobalState) {\n results.add(expression.key);\n }\n expression.eachChild((childExpression) => {\n findGlobalStateRefs(childExpression, results);\n });\n return results;\n}\nfunction getExpectedType(spec) {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n padding: PaddingType,\n numberArray: NumberArrayType,\n colorArray: ColorArrayType,\n projectionDefinition: ProjectionDefinitionType,\n resolvedImage: ResolvedImageType,\n variableAnchorOffsetCollection: VariableAnchorOffsetCollectionType\n };\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n return types[spec.type];\n}\nfunction getDefaultValue(spec) {\n if (spec.type === 'color' && isFunction$1(spec.default)) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\n return new Color(0, 0, 0, 0);\n }\n switch (spec.type) {\n case 'color':\n return Color.parse(spec.default) || null;\n case 'padding':\n return Padding.parse(spec.default) || null;\n case 'numberArray':\n return NumberArray.parse(spec.default) || null;\n case 'colorArray':\n return ColorArray.parse(spec.default) || null;\n case 'variableAnchorOffsetCollection':\n return VariableAnchorOffsetCollection.parse(spec.default) || null;\n case 'projectionDefinition':\n return ProjectionDefinition.parse(spec.default) || null;\n default:\n return spec.default === undefined ? null : spec.default;\n }\n}\nfunction addGlobalState(globals, globalState) {\n const { zoom, heatmapDensity, elevation, lineProgress, isSupportedScript, accumulated } = globals !== null && globals !== void 0 ? globals : {};\n return {\n zoom,\n heatmapDensity,\n elevation,\n lineProgress,\n isSupportedScript,\n accumulated,\n globalState\n };\n}\n\nfunction isExpressionFilter(filter) {\n if (filter === true || filter === false) {\n return true;\n }\n if (!Array.isArray(filter) || filter.length === 0) {\n return false;\n }\n switch (filter[0]) {\n case 'has':\n return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n case 'in':\n return (filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2])));\n case '!in':\n case '!has':\n case 'none':\n return false;\n case '==':\n case '!=':\n case '>':\n case '>=':\n case '<':\n case '<=':\n return filter.length !== 3 || Array.isArray(filter[1]) || Array.isArray(filter[2]);\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n default:\n return true;\n }\n}\nconst filterSpec = {\n type: 'boolean',\n default: false,\n transition: false,\n 'property-type': 'data-driven',\n expression: {\n interpolated: false,\n parameters: ['zoom', 'feature']\n }\n};\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param filter MapLibre filter\n * @param [globalState] Global state object to be used for evaluating 'global-state' expressions\n * @returns filter-evaluating function\n */\nfunction featureFilter(filter, globalState) {\n if (filter === null || filter === undefined) {\n return { filter: () => true, needGeometry: false, getGlobalStateRefs: () => new Set() };\n }\n if (!isExpressionFilter(filter)) {\n filter = convertFilter$1(filter);\n }\n const compiled = createExpression(filter, filterSpec, globalState);\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map((err) => `${err.key}: ${err.message}`).join(', '));\n }\n else {\n const needGeometry = geometryNeeded(filter);\n return {\n filter: (globalProperties, feature, canonical) => compiled.value.evaluate(globalProperties, feature, {}, canonical),\n needGeometry,\n getGlobalStateRefs: () => findGlobalStateRefs(compiled.value.expression)\n };\n }\n}\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter))\n return false;\n if (filter[0] === 'within' || filter[0] === 'distance')\n return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index]))\n return true;\n }\n return false;\n}\nfunction convertFilter$1(filter) {\n if (!filter)\n return true;\n const op = filter[0];\n if (filter.length <= 1)\n return op !== 'any';\n const converted = op === '=='\n ? convertComparisonOp$1(filter[1], filter[2], '==')\n : op === '!='\n ? convertNegation(convertComparisonOp$1(filter[1], filter[2], '=='))\n : op === '<' || op === '>' || op === '<=' || op === '>='\n ? convertComparisonOp$1(filter[1], filter[2], op)\n : op === 'any'\n ? convertDisjunctionOp(filter.slice(1))\n : op === 'all'\n ? ['all'].concat(filter.slice(1).map(convertFilter$1))\n : op === 'none'\n ? ['all'].concat(filter.slice(1).map(convertFilter$1).map(convertNegation))\n : op === 'in'\n ? convertInOp$1(filter[1], filter.slice(2))\n : op === '!in'\n ? convertNegation(convertInOp$1(filter[1], filter.slice(2)))\n : op === 'has'\n ? convertHasOp$1(filter[1])\n : op === '!has'\n ? convertNegation(convertHasOp$1(filter[1]))\n : true;\n return converted;\n}\nfunction convertComparisonOp$1(property, value, op) {\n switch (property) {\n case '$type':\n return [`filter-type-${op}`, value];\n case '$id':\n return [`filter-id-${op}`, value];\n default:\n return [`filter-${op}`, property, value];\n }\n}\nfunction convertDisjunctionOp(filters) {\n return ['any'].concat(filters.map(convertFilter$1));\n}\nfunction convertInOp$1(property, values) {\n if (values.length === 0) {\n return false;\n }\n switch (property) {\n case '$type':\n return ['filter-type-in', ['literal', values]];\n case '$id':\n return ['filter-id-in', ['literal', values]];\n default:\n if (values.length > 200 && !values.some((v) => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n }\n else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\nfunction convertHasOp$1(property) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return ['filter-has-id'];\n default:\n return ['filter-has', property];\n }\n}\nfunction convertNegation(filter) {\n return ['!', filter];\n}\n\n/*\n * Convert the given filter to an expression, storing the expected types for\n * any feature properties referenced in expectedTypes.\n *\n * These expected types are needed in order to construct preflight type checks\n * needed for handling 'any' filters. A preflight type check is necessary in\n * order to mimic legacy filters' semantics around expected type mismatches.\n * For example, consider the legacy filter:\n *\n * [\"any\", [\"all\", [\">\", \"y\", 0], [\">\", \"y\", 0]], [\">\", \"x\", 0]]\n *\n * Naively, we might convert this to the expression:\n *\n * [\"any\", [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]], [\">\", [\"get\", \"x\"], 0]]\n *\n * But if we tried to evaluate this against, say `{x: 1, y: null, z: 0}`, the\n * [\">\", [\"get\", \"y\"], 0] would cause an evaluation error, leading to the\n * entire filter returning false. Legacy filter semantics, though, ask for\n * [\">\", \"y\", 0] to simply return `false` when `y` is of the wrong type,\n * allowing the subsequent terms of the outer \"any\" expression to be evaluated\n * (resulting, in this case, in a `true` value, because x > 0).\n *\n * We account for this by inserting a preflight type-checking expression before\n * each \"any\" term, allowing us to avoid evaluating the actual converted filter\n * if any type mismatches would cause it to produce an evaluation error:\n *\n * [\"any\",\n * [\"case\",\n * [\"all\", [\"==\", [\"typeof\", [\"get\", \"y\"]], \"number\"], [\"==\", [\"typeof\", [\"get\", \"z\"], \"number]],\n * [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]],\n * false\n * ],\n * [\"case\",\n * [\"==\", [\"typeof\", [\"get\", \"x\"], \"number\"]],\n * [\">\", [\"get\", \"x\"], 0],\n * false\n * ]\n * ]\n *\n * An alternative, possibly more direct approach would be to use type checks\n * in the conversion of each comparison operator, so that the converted version\n * of each individual ==, >=, etc. would mimic the legacy filter semantics. The\n * downside of this approach is that it can lead to many more type checks than\n * would otherwise be necessary: outside the context of an \"any\" expression,\n * bailing out due to a runtime type error (expression semantics) and returning\n * false (legacy filter semantics) are equivalent: they cause the filter to\n * produce a `false` result.\n */\nfunction convertFilter(filter, expectedTypes = {}) {\n if (isExpressionFilter(filter))\n return filter;\n if (!filter)\n return true;\n const legacyFilter = filter;\n const legacyOp = legacyFilter[0];\n if (filter.length <= 1)\n return legacyOp !== 'any';\n switch (legacyOp) {\n case '==':\n case '!=':\n case '<':\n case '>':\n case '<=':\n case '>=': {\n const [, property, value] = filter;\n return convertComparisonOp(property, value, legacyOp, expectedTypes);\n }\n case 'any': {\n const [, ...conditions] = legacyFilter;\n const children = conditions.map((f) => {\n const types = {};\n const child = convertFilter(f, types);\n const typechecks = runtimeTypeChecks(types);\n return typechecks === true\n ? child\n : ['case', typechecks, child, false];\n });\n return ['any', ...children];\n }\n case 'all': {\n const [, ...conditions] = legacyFilter;\n const children = conditions.map((f) => convertFilter(f, expectedTypes));\n return children.length > 1 ? ['all', ...children] : children[0];\n }\n case 'none': {\n const [, ...conditions] = legacyFilter;\n return ['!', convertFilter(['any', ...conditions], {})];\n }\n case 'in': {\n const [, property, ...values] = legacyFilter;\n return convertInOp(property, values);\n }\n case '!in': {\n const [, property, ...values] = legacyFilter;\n return convertInOp(property, values, true);\n }\n case 'has':\n return convertHasOp(legacyFilter[1]);\n case '!has':\n return ['!', convertHasOp(legacyFilter[1])];\n default:\n return true;\n }\n}\n// Given a set of feature properties and an expected type for each one,\n// construct an boolean expression that tests whether each property has the\n// right type.\n// E.g.: for {name: 'string', population: 'number'}, return\n// [ 'all',\n// ['==', ['typeof', ['get', 'name'], 'string']],\n// ['==', ['typeof', ['get', 'population'], 'number]]\n// ]\nfunction runtimeTypeChecks(expectedTypes) {\n const conditions = [];\n for (const property in expectedTypes) {\n const get = property === '$id' ? ['id'] : ['get', property];\n conditions.push(['==', ['typeof', get], expectedTypes[property]]);\n }\n if (conditions.length === 0)\n return true;\n if (conditions.length === 1)\n return conditions[0];\n return ['all', ...conditions];\n}\nfunction convertComparisonOp(property, value, op, expectedTypes) {\n let get;\n if (property === '$type') {\n return [op, ['geometry-type'], value];\n }\n else if (property === '$id') {\n get = ['id'];\n }\n else {\n get = ['get', property];\n }\n if (expectedTypes && value !== null) {\n const type = typeof value;\n expectedTypes[property] = type;\n }\n if (op === '==' && property !== '$id' && value === null) {\n return [\n 'all',\n ['has', property], // missing property != null for legacy filters\n ['==', get, null]\n ];\n }\n else if (op === '!=' && property !== '$id' && value === null) {\n return [\n 'any',\n ['!', ['has', property]], // missing property != null for legacy filters\n ['!=', get, null]\n ];\n }\n return [op, get, value];\n}\nfunction convertInOp(property, values, negate = false) {\n if (values.length === 0)\n return negate;\n let get;\n if (property === '$type') {\n get = ['geometry-type'];\n }\n else if (property === '$id') {\n get = ['id'];\n }\n else {\n get = ['get', property];\n }\n // Determine if the list of values to be searched is homogenously typed.\n // If so (and if the type is string or number), then we can use a\n // [match, input, [...values], true, false] construction rather than a\n // bunch of `==` tests.\n let uniformTypes = true;\n const type = typeof values[0];\n for (const value of values) {\n if (typeof value !== type) {\n uniformTypes = false;\n break;\n }\n }\n if (uniformTypes && (type === 'string' || type === 'number')) {\n // Match expressions must have unique values.\n const uniqueValues = values.sort().filter((v, i) => i === 0 || values[i - 1] !== v);\n return ['match', get, uniqueValues, !negate, negate];\n }\n if (negate) {\n return ['all', ...values.map((v) => ['!=', get, v])];\n }\n else {\n return ['any', ...values.map((v) => ['==', get, v])];\n }\n}\nfunction convertHasOp(property) {\n if (property === '$type') {\n return true;\n }\n else if (property === '$id') {\n return ['!=', ['id'], null];\n }\n else {\n return ['has', property];\n }\n}\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\nfunction convertFunction(parameters, propertySpec) {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n stops = stops.map((stop) => {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], convertLiteral(stop[1])];\n });\n if (zoomAndFeatureDependent) {\n return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n }\n else if (zoomDependent) {\n return convertZoomFunction(parameters, propertySpec, stops);\n }\n else {\n return convertPropertyFunction(parameters, propertySpec, stops);\n }\n}\nfunction convertIdentityFunction(parameters, propertySpec) {\n const get = ['get', parameters.property];\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : get;\n }\n else if (propertySpec.type === 'enum') {\n return ['match', get, Object.keys(propertySpec.values), get, parameters.default];\n }\n else {\n const expression = [\n propertySpec.type === 'color' ? 'to-color' : propertySpec.type,\n get,\n convertLiteral(parameters.default)\n ];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl':\n return 'interpolate-hcl';\n case 'lab':\n return 'interpolate-lab';\n default:\n return 'interpolate';\n }\n}\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default\n };\n featureFunctionStops[zoom] = [];\n zoomStops.push(zoom);\n }\n featureFunctionStops[zoom].push([stop[0].value, stop[1]]);\n }\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n return expression;\n }\n else {\n const expression = ['step', ['zoom']];\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n fixupDegenerateStepCurve(expression);\n return expression;\n }\n}\nfunction coalesce(a, b) {\n if (a !== undefined)\n return a;\n if (b !== undefined)\n return b;\n}\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n }\n else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n }\n else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined\n ? expression\n : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n }\n else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? ['linear'] : ['exponential', base],\n ['number', get]\n ];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined\n ? expression\n : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n }\n else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n }\n else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [\n getInterpolateOperator(parameters),\n base === 1 ? ['linear'] : ['exponential', base],\n input\n ];\n }\n else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n fixupDegenerateStepCurve(expression);\n return expression;\n}\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n }\n else {\n return propertySpec.expression.interpolated ? 'exponential' : 'interval';\n }\n}\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nfunction convertTokenString(s) {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0)\n result.push(literal);\n result.push(['get', match[1]]);\n }\n if (result.length === 1) {\n return s;\n }\n if (pos < s.length) {\n result.push(s.slice(pos));\n }\n else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n return result;\n}\n\nfunction getPropertyReference(propertyName) {\n for (let i = 0; i < v8Spec.layout.length; i++) {\n for (const key in v8Spec[v8Spec.layout[i]]) {\n if (key === propertyName)\n return v8Spec[v8Spec.layout[i]][key];\n }\n }\n for (let i = 0; i < v8Spec.paint.length; i++) {\n for (const key in v8Spec[v8Spec.paint[i]]) {\n if (key === propertyName)\n return v8Spec[v8Spec.paint[i]][key];\n }\n }\n return null;\n}\nfunction eachSource(style, callback) {\n for (const k in style.sources) {\n callback(style.sources[k]);\n }\n}\nfunction eachLayer(style, callback) {\n for (const layer of style.layers) {\n callback(layer);\n }\n}\nfunction eachProperty(style, options, callback) {\n function inner(layer, propertyType) {\n const properties = layer[propertyType];\n if (!properties)\n return;\n Object.keys(properties).forEach((key) => {\n callback({\n path: [layer.id, propertyType, key],\n key,\n value: properties[key],\n reference: getPropertyReference(key),\n set(x) {\n properties[key] = x;\n }\n });\n });\n }\n eachLayer(style, (layer) => {\n if (options.paint) {\n inner(layer, 'paint');\n }\n if (options.layout) {\n inner(layer, 'layout');\n }\n });\n}\n\nfunction stringify$1(obj) {\n const type = typeof obj;\n if (type === 'number' ||\n type === 'boolean' ||\n type === 'string' ||\n obj === undefined ||\n obj === null)\n return JSON.stringify(obj);\n if (Array.isArray(obj)) {\n let str = '[';\n for (const val of obj) {\n str += `${stringify$1(val)},`;\n }\n return `${str}]`;\n }\n const keys = Object.keys(obj).sort();\n let str = '{';\n for (let i = 0; i < keys.length; i++) {\n str += `${JSON.stringify(keys[i])}:${stringify$1(obj[keys[i]])},`;\n }\n return `${str}}`;\n}\nfunction getKey(layer) {\n let key = '';\n for (const k of refProperties) {\n key += `/${stringify$1(layer[k])}`;\n }\n return key;\n}\n/**\n * Groups layers by their layout-affecting properties.\n * These are the properties that were formerly used by explicit `ref` mechanism\n * for layers: 'type', 'source', 'source-layer', 'minzoom', 'maxzoom',\n * 'filter', and 'layout'.\n *\n * The input is not modified. The output layers are references to the\n * input layers.\n *\n * @param layers - an array of {@link LayerSpecification}.\n * @param cachedKeys - an object to keep already calculated keys.\n * @returns an array of arrays of {@link LayerSpecification} objects, where each inner array\n * contains layers that share the same layout-affecting properties.\n */\nfunction groupByLayout(layers, cachedKeys) {\n const groups = {};\n for (let i = 0; i < layers.length; i++) {\n const k = (cachedKeys && cachedKeys[layers[i].id]) || getKey(layers[i]);\n // update the cache if there is one\n if (cachedKeys)\n cachedKeys[layers[i].id] = k;\n let group = groups[k];\n if (!group) {\n group = groups[k] = [];\n }\n group.push(layers[i]);\n }\n const result = [];\n for (const k in groups) {\n result.push(groups[k]);\n }\n return result;\n}\n\nfunction emptyStyle() {\n const style = {};\n const version = v8Spec['$version'];\n for (const styleKey in v8Spec['$root']) {\n const specification = v8Spec['$root'][styleKey];\n if (specification.required) {\n let value = null;\n if (styleKey === 'version') {\n value = version;\n }\n else {\n if (specification.type === 'array') {\n value = [];\n }\n else {\n value = {};\n }\n }\n if (value != null) {\n style[styleKey] = value;\n }\n }\n }\n return style;\n}\n\nfunction validateConstants(options) {\n const key = options.key;\n const constants = options.value;\n if (constants) {\n return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n }\n else {\n return [];\n }\n}\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nfunction unbundle(value) {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n }\n else {\n return value;\n }\n}\nfunction deepUnbundle(value) {\n if (Array.isArray(value)) {\n return value.map(deepUnbundle);\n }\n else if (value instanceof Object &&\n !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n const unbundledValue = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n return unbundle(value);\n}\n\nfunction validateObject(options) {\n const key = options.key;\n const object = options.value;\n const elementSpecs = options.valueSpec || {};\n const elementValidators = options.objectElementValidators || {};\n const style = options.style;\n const styleSpec = options.styleSpec;\n const validateSpec = options.validateSpec;\n let errors = [];\n const type = getType(object);\n if (type !== 'object') {\n return [new ValidationError(key, object, `object expected, ${type} found`)];\n }\n for (const objectKey in object) {\n const elementSpecKey = objectKey.split('.')[0]; // treat 'paint.*' as 'paint'\n // objectKey comes from the user controlled style input, so elementSpecKey may be e.g. \"__proto__\"\n const elementSpec = getOwn(elementSpecs, elementSpecKey) || elementSpecs['*'];\n let validateElement;\n if (getOwn(elementValidators, elementSpecKey)) {\n validateElement = elementValidators[elementSpecKey];\n }\n else if (getOwn(elementSpecs, elementSpecKey)) {\n if (object[objectKey] === undefined) {\n // property is possible, set but set to undefined\n // we only check it if it is required and not defaulted in the next loop\n // without skipping here, we would alert to properties being set to undefined\n continue;\n }\n validateElement = validateSpec;\n }\n else if (elementValidators['*']) {\n validateElement = elementValidators['*'];\n }\n else if (elementSpecs['*']) {\n validateElement = validateSpec;\n }\n else {\n errors.push(new ValidationError(key, object[objectKey], `unknown property \"${objectKey}\"`));\n continue;\n }\n errors = errors.concat(validateElement({\n key: (key ? `${key}.` : key) + objectKey,\n value: object[objectKey],\n valueSpec: elementSpec,\n style,\n styleSpec,\n object,\n objectKey,\n validateSpec\n }, object));\n }\n for (const elementSpecKey in elementSpecs) {\n // Don't check `required` when there's a custom validator for that property.\n if (elementValidators[elementSpecKey]) {\n continue;\n }\n if (elementSpecs[elementSpecKey].required &&\n elementSpecs[elementSpecKey]['default'] === undefined &&\n object[elementSpecKey] === undefined) {\n errors.push(new ValidationError(key, object, `missing required property \"${elementSpecKey}\"`));\n }\n }\n return errors;\n}\n\nfunction validateArray(options) {\n const array = options.value;\n const arraySpec = options.valueSpec;\n const validateSpec = options.validateSpec;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const key = options.key;\n const validateArrayElement = options.arrayElementValidator || validateSpec;\n if (getType(array) !== 'array') {\n return [new ValidationError(key, array, `array expected, ${getType(array)} found`)];\n }\n if (arraySpec.length && array.length !== arraySpec.length) {\n return [\n new ValidationError(key, array, `array length ${arraySpec.length} expected, length ${array.length} found`)\n ];\n }\n let arrayElementSpec = {\n type: arraySpec.value,\n values: arraySpec.values\n };\n if (styleSpec.$version < 7) {\n arrayElementSpec['function'] = arraySpec.function;\n }\n if (getType(arraySpec.value) === 'object') {\n arrayElementSpec = arraySpec.value;\n }\n let errors = [];\n for (let i = 0; i < array.length; i++) {\n errors = errors.concat(validateArrayElement({\n array,\n arrayIndex: i,\n value: array[i],\n valueSpec: arrayElementSpec,\n validateSpec: options.validateSpec,\n style,\n styleSpec,\n key: `${key}[${i}]`\n }));\n }\n return errors;\n}\n\nfunction validateNumber(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n let type = getType(value);\n if (type === 'number' && value !== value) {\n type = 'NaN';\n }\n if (type !== 'number') {\n return [new ValidationError(key, value, `number expected, ${type} found`)];\n }\n if ('minimum' in valueSpec && value < valueSpec.minimum) {\n return [\n new ValidationError(key, value, `${value} is less than the minimum value ${valueSpec.minimum}`)\n ];\n }\n if ('maximum' in valueSpec && value > valueSpec.maximum) {\n return [\n new ValidationError(key, value, `${value} is greater than the maximum value ${valueSpec.maximum}`)\n ];\n }\n return [];\n}\n\nfunction validateFunction(options) {\n const functionValueSpec = options.valueSpec;\n const functionType = unbundle(options.value.type);\n let stopKeyType;\n let stopDomainValues = {};\n let previousStopDomainValue;\n let previousStopDomainZoom;\n const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n const isPropertyFunction = !isZoomFunction;\n const isZoomAndPropertyFunction = getType(options.value.stops) === 'array' &&\n getType(options.value.stops[0]) === 'array' &&\n getType(options.value.stops[0][0]) === 'object';\n const errors = validateObject({\n key: options.key,\n value: options.value,\n valueSpec: options.styleSpec.function,\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n stops: validateFunctionStops,\n default: validateFunctionDefault\n }\n });\n if (functionType === 'identity' && isZoomFunction) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n }\n if (functionType !== 'identity' && !options.value.stops) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n }\n if (functionType === 'exponential' &&\n options.valueSpec.expression &&\n !supportsInterpolation(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n }\n if (options.styleSpec.$version >= 8) {\n if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n }\n else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n }\n }\n if ((functionType === 'categorical' || isZoomAndPropertyFunction) &&\n options.value.property === undefined) {\n errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n }\n return errors;\n function validateFunctionStops(options) {\n if (functionType === 'identity') {\n return [\n new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')\n ];\n }\n let errors = [];\n const value = options.value;\n errors = errors.concat(validateArray({\n key: options.key,\n value,\n valueSpec: options.valueSpec,\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n arrayElementValidator: validateFunctionStop\n }));\n if (getType(value) === 'array' && value.length === 0) {\n errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n }\n return errors;\n }\n function validateFunctionStop(options) {\n let errors = [];\n const value = options.value;\n const key = options.key;\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n if (value.length !== 2) {\n return [\n new ValidationError(key, value, `array length 2 expected, length ${value.length} found`)\n ];\n }\n if (isZoomAndPropertyFunction) {\n if (getType(value[0]) !== 'object') {\n return [\n new ValidationError(key, value, `object expected, ${getType(value[0])} found`)\n ];\n }\n if (value[0].zoom === undefined) {\n return [new ValidationError(key, value, 'object stop key must have zoom')];\n }\n if (value[0].value === undefined) {\n return [new ValidationError(key, value, 'object stop key must have value')];\n }\n if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n return [\n new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')\n ];\n }\n if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n previousStopDomainZoom = unbundle(value[0].zoom);\n previousStopDomainValue = undefined;\n stopDomainValues = {};\n }\n errors = errors.concat(validateObject({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: { zoom: {} },\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n zoom: validateNumber,\n value: validateStopDomainValue\n }\n }));\n }\n else {\n errors = errors.concat(validateStopDomainValue({\n key: `${key}[0]`,\n value: value[0],\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }, value));\n }\n if (isExpression(deepUnbundle(value[1]))) {\n return errors.concat([\n new ValidationError(`${key}[1]`, value[1], 'expressions are not allowed in function stops.')\n ]);\n }\n return errors.concat(options.validateSpec({\n key: `${key}[1]`,\n value: value[1],\n valueSpec: functionValueSpec,\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n function validateStopDomainValue(options, stop) {\n const type = getType(options.value);\n const value = unbundle(options.value);\n const reportValue = options.value !== null ? options.value : stop;\n if (!stopKeyType) {\n stopKeyType = type;\n }\n else if (type !== stopKeyType) {\n return [\n new ValidationError(options.key, reportValue, `${type} stop domain type must match previous stop domain type ${stopKeyType}`)\n ];\n }\n if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n return [\n new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')\n ];\n }\n if (type !== 'number' && functionType !== 'categorical') {\n let message = `number expected, ${type} found`;\n if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n message +=\n '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n }\n return [new ValidationError(options.key, reportValue, message)];\n }\n if (functionType === 'categorical' &&\n type === 'number' &&\n (!isFinite(value) || Math.floor(value) !== value)) {\n return [\n new ValidationError(options.key, reportValue, `integer expected, found ${value}`)\n ];\n }\n if (functionType !== 'categorical' &&\n type === 'number' &&\n previousStopDomainValue !== undefined &&\n value < previousStopDomainValue) {\n return [\n new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')\n ];\n }\n else {\n previousStopDomainValue = value;\n }\n if (functionType === 'categorical' && value in stopDomainValues) {\n return [\n new ValidationError(options.key, reportValue, 'stop domain values must be unique')\n ];\n }\n else {\n stopDomainValues[value] = true;\n }\n return [];\n }\n function validateFunctionDefault(options) {\n return options.validateSpec({\n key: options.key,\n value: options.value,\n valueSpec: functionValueSpec,\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec: options.styleSpec\n });\n }\n}\n\nfunction validateExpression(options) {\n const expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n if (expression.result === 'error') {\n return expression.value.map((error) => {\n return new ValidationError(`${options.key}${error.key}`, options.value, error.message);\n });\n }\n const expressionObj = expression.value.expression ||\n expression.value._styleExpression.expression;\n if (options.expressionContext === 'property' &&\n options.propertyKey === 'text-font' &&\n !expressionObj.outputDefined()) {\n return [\n new ValidationError(options.key, options.value, `Invalid data expression for \"${options.propertyKey}\". Output values must be contained as literals within the expression.`)\n ];\n }\n if (options.expressionContext === 'property' &&\n options.propertyType === 'layout' &&\n !isStateConstant(expressionObj)) {\n return [\n new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')\n ];\n }\n if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n return [\n new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')\n ];\n }\n if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n if (!isGlobalPropertyConstant(expressionObj, ['zoom', 'feature-state'])) {\n return [\n new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')\n ];\n }\n if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n return [\n new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')\n ];\n }\n }\n return [];\n}\n\nfunction validateBoolean(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n if (type !== 'boolean') {\n return [new ValidationError(key, value, `boolean expected, ${type} found`)];\n }\n return [];\n}\n\nfunction validateColor(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n if (type !== 'string') {\n return [new ValidationError(key, value, `color expected, ${type} found`)];\n }\n if (!Color.parse(String(value))) {\n // cast String object to string primitive\n return [new ValidationError(key, value, `color expected, \"${value}\" found`)];\n }\n return [];\n}\n\nfunction validateEnum(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n const errors = [];\n if (Array.isArray(valueSpec.values)) {\n // <=v7\n if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${valueSpec.values.join(', ')}], ${JSON.stringify(value)} found`));\n }\n }\n else {\n // >=v8\n if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${Object.keys(valueSpec.values).join(', ')}], ${JSON.stringify(value)} found`));\n }\n }\n return errors;\n}\n\nfunction validateFilter(options) {\n if (isExpressionFilter(deepUnbundle(options.value))) {\n return validateExpression(extendBy({}, options, {\n expressionContext: 'filter',\n valueSpec: { value: 'boolean' }\n }));\n }\n else {\n return validateNonExpressionFilter(options);\n }\n}\nfunction validateNonExpressionFilter(options) {\n const value = options.value;\n const key = options.key;\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n const styleSpec = options.styleSpec;\n let type;\n let errors = [];\n if (value.length < 1) {\n return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n }\n errors = errors.concat(validateEnum({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: styleSpec.filter_operator,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n switch (unbundle(value[0])) {\n case '<':\n case '<=':\n case '>':\n case '>=':\n if (value.length >= 2 && unbundle(value[1]) === '$type') {\n errors.push(new ValidationError(key, value, `\"$type\" cannot be use with operator \"${value[0]}\"`));\n }\n /* falls through */\n case '==':\n case '!=':\n if (value.length !== 3) {\n errors.push(new ValidationError(key, value, `filter array for operator \"${value[0]}\" must have 3 elements`));\n }\n /* falls through */\n case 'in':\n case '!in':\n if (value.length >= 2) {\n type = getType(value[1]);\n if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n }\n for (let i = 2; i < value.length; i++) {\n type = getType(value[i]);\n if (unbundle(value[1]) === '$type') {\n errors = errors.concat(validateEnum({\n key: `${key}[${i}]`,\n value: value[i],\n valueSpec: styleSpec.geometry_type,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n errors.push(new ValidationError(`${key}[${i}]`, value[i], `string, number, or boolean expected, ${type} found`));\n }\n }\n break;\n case 'any':\n case 'all':\n case 'none':\n for (let i = 1; i < value.length; i++) {\n errors = errors.concat(validateNonExpressionFilter({\n key: `${key}[${i}]`,\n value: value[i],\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n break;\n case 'has':\n case '!has':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, `filter array for \"${value[0]}\" operator must have 2 elements`));\n }\n else if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n break;\n }\n return errors;\n}\n\nfunction validateProperty(options, propertyType) {\n const key = options.key;\n const validateSpec = options.validateSpec;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const value = options.value;\n const propertyKey = options.objectKey;\n const layerSpec = styleSpec[`${propertyType}_${options.layerType}`];\n if (!layerSpec)\n return [];\n const transitionMatch = propertyKey.match(/^(.*)-transition$/);\n if (propertyType === 'paint' &&\n transitionMatch &&\n layerSpec[transitionMatch[1]] &&\n layerSpec[transitionMatch[1]].transition) {\n return validateSpec({\n key,\n value,\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n });\n }\n const valueSpec = options.valueSpec || layerSpec[propertyKey];\n if (!valueSpec) {\n return [new ValidationError(key, value, `unknown property \"${propertyKey}\"`)];\n }\n let tokenMatch;\n if (getType(value) === 'string' &&\n supportsPropertyExpression(valueSpec) &&\n !valueSpec.tokens &&\n (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n return [\n new ValidationError(key, value, `\"${propertyKey}\" does not support interpolation syntax\\n` +\n `Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(tokenMatch[1])} }\\`.`)\n ];\n }\n const errors = [];\n if (options.layerType === 'symbol') {\n if (propertyKey === 'text-font' &&\n isFunction$1(deepUnbundle(value)) &&\n unbundle(value.type) === 'identity') {\n errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n }\n }\n return errors.concat(validateSpec({\n key: options.key,\n value,\n valueSpec,\n style,\n styleSpec,\n expressionContext: 'property',\n propertyType,\n propertyKey\n }));\n}\n\nfunction validatePaintProperty(options) {\n return validateProperty(options, 'paint');\n}\n\nfunction validateLayoutProperty(options) {\n return validateProperty(options, 'layout');\n}\n\nfunction validateLayer(options) {\n let errors = [];\n const layer = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n if (getType(layer) !== 'object') {\n return [new ValidationError(key, layer, `object expected, ${getType(layer)} found`)];\n }\n if (!layer.type && !layer.ref) {\n errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n }\n let type = unbundle(layer.type);\n const ref = unbundle(layer.ref);\n if (layer.id) {\n const layerId = unbundle(layer.id);\n for (let i = 0; i < options.arrayIndex; i++) {\n const otherLayer = style.layers[i];\n if (unbundle(otherLayer.id) === layerId) {\n errors.push(new ValidationError(key, layer.id, `duplicate layer id \"${layer.id}\", previously used at line ${otherLayer.id.__line__}`));\n }\n }\n }\n if ('ref' in layer) {\n ['type', 'source', 'source-layer', 'filter', 'layout'].forEach((p) => {\n if (p in layer) {\n errors.push(new ValidationError(key, layer[p], `\"${p}\" is prohibited for ref layers`));\n }\n });\n let parent;\n style.layers.forEach((layer) => {\n if (unbundle(layer.id) === ref)\n parent = layer;\n });\n if (!parent) {\n errors.push(new ValidationError(key, layer.ref, `ref layer \"${ref}\" not found`));\n }\n else if (parent.ref) {\n errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n }\n else {\n type = unbundle(parent.type);\n }\n }\n else if (type !== 'background') {\n if (!layer.source) {\n errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n }\n else {\n const source = style.sources && style.sources[layer.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, layer.source, `source \"${layer.source}\" not found`));\n }\n else if (sourceType === 'vector' && type === 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a raster source`));\n }\n else if (sourceType !== 'raster-dem' && type === 'hillshade') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a raster-dem source`));\n }\n else if (sourceType !== 'raster-dem' && type === 'color-relief') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a raster-dem source`));\n }\n else if (sourceType === 'raster' && type !== 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a vector source`));\n }\n else if (sourceType === 'vector' && !layer['source-layer']) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" must specify a \"source-layer\"`));\n }\n else if (sourceType === 'raster-dem' &&\n type !== 'hillshade' &&\n type !== 'color-relief') {\n errors.push(new ValidationError(key, layer.source, \"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.\"));\n }\n else if (type === 'line' &&\n layer.paint &&\n layer.paint['line-gradient'] &&\n (sourceType !== 'geojson' || !source.lineMetrics)) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`));\n }\n }\n }\n errors = errors.concat(validateObject({\n key,\n value: layer,\n valueSpec: styleSpec.layer,\n style: options.style,\n styleSpec: options.styleSpec,\n validateSpec: options.validateSpec,\n objectElementValidators: {\n '*'() {\n return [];\n },\n // We don't want to enforce the spec's `\"requires\": true` for backward compatibility with refs;\n // the actual requirement is validated above. See https://github.com/mapbox/mapbox-gl-js/issues/5772.\n type() {\n return options.validateSpec({\n key: `${key}.type`,\n value: layer.type,\n valueSpec: styleSpec.layer.type,\n style: options.style,\n styleSpec: options.styleSpec,\n validateSpec: options.validateSpec,\n object: layer,\n objectKey: 'type'\n });\n },\n filter: validateFilter,\n layout(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n validateSpec: options.validateSpec,\n objectElementValidators: {\n '*'(options) {\n return validateLayoutProperty(extendBy({ layerType: type }, options));\n }\n }\n });\n },\n paint(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n validateSpec: options.validateSpec,\n objectElementValidators: {\n '*'(options) {\n return validatePaintProperty(extendBy({ layerType: type }, options));\n }\n }\n });\n }\n }\n }));\n return errors;\n}\n\nfunction validateString(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n if (type !== 'string') {\n return [new ValidationError(key, value, `string expected, ${type} found`)];\n }\n return [];\n}\n\nfunction validateRasterDEMSource(options) {\n var _a;\n const sourceName = (_a = options.sourceName) !== null && _a !== void 0 ? _a : '';\n const rasterDEM = options.value;\n const styleSpec = options.styleSpec;\n const rasterDEMSpec = styleSpec.source_raster_dem;\n const style = options.style;\n let errors = [];\n const rootType = getType(rasterDEM);\n if (rasterDEM === undefined) {\n return errors;\n }\n else if (rootType !== 'object') {\n errors.push(new ValidationError('source_raster_dem', rasterDEM, `object expected, ${rootType} found`));\n return errors;\n }\n const encoding = unbundle(rasterDEM.encoding);\n const isCustomEncoding = encoding === 'custom';\n const customEncodingKeys = ['redFactor', 'greenFactor', 'blueFactor', 'baseShift'];\n const encodingName = options.value.encoding ? `\"${options.value.encoding}\"` : 'Default';\n for (const key in rasterDEM) {\n if (!isCustomEncoding && customEncodingKeys.includes(key)) {\n errors.push(new ValidationError(key, rasterDEM[key], `In \"${sourceName}\": \"${key}\" is only valid when \"encoding\" is set to \"custom\". ${encodingName} encoding found`));\n }\n else if (rasterDEMSpec[key]) {\n errors = errors.concat(options.validateSpec({\n key,\n value: rasterDEM[key],\n valueSpec: rasterDEMSpec[key],\n validateSpec: options.validateSpec,\n style,\n styleSpec\n }));\n }\n else {\n errors.push(new ValidationError(key, rasterDEM[key], `unknown property \"${key}\"`));\n }\n }\n return errors;\n}\n\nconst objectElementValidators = {\n promoteId: validatePromoteId\n};\nfunction validateSource(options) {\n const value = options.value;\n const key = options.key;\n const styleSpec = options.styleSpec;\n const style = options.style;\n const validateSpec = options.validateSpec;\n if (!value.type) {\n return [new ValidationError(key, value, '\"type\" is required')];\n }\n const type = unbundle(value.type);\n let errors;\n switch (type) {\n case 'vector':\n case 'raster':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec[`source_${type.replace('-', '_')}`],\n style: options.style,\n styleSpec,\n objectElementValidators,\n validateSpec\n });\n return errors;\n case 'raster-dem':\n errors = validateRasterDEMSource({\n sourceName: key,\n value,\n style: options.style,\n styleSpec,\n validateSpec\n });\n return errors;\n case 'geojson':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec.source_geojson,\n style,\n styleSpec,\n validateSpec,\n objectElementValidators\n });\n if (value.cluster) {\n for (const prop in value.clusterProperties) {\n const [operator, mapExpr] = value.clusterProperties[prop];\n const reduceExpr = typeof operator === 'string'\n ? [operator, ['accumulated'], ['get', prop]]\n : operator;\n errors.push(...validateExpression({\n key: `${key}.${prop}.map`,\n value: mapExpr,\n expressionContext: 'cluster-map'\n }));\n errors.push(...validateExpression({\n key: `${key}.${prop}.reduce`,\n value: reduceExpr,\n expressionContext: 'cluster-reduce'\n }));\n }\n }\n return errors;\n case 'video':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_video,\n style,\n validateSpec,\n styleSpec\n });\n case 'image':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_image,\n style,\n validateSpec,\n styleSpec\n });\n case 'canvas':\n return [\n new ValidationError(key, null, 'Please use runtime APIs to add canvas sources, rather than including them in stylesheets.', 'source.canvas')\n ];\n default:\n return validateEnum({\n key: `${key}.type`,\n value: value.type,\n valueSpec: {\n values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image']\n }});\n }\n}\nfunction validatePromoteId({ key, value }) {\n if (getType(value) === 'string') {\n return validateString({ key, value });\n }\n else {\n const errors = [];\n for (const prop in value) {\n errors.push(...validateString({ key: `${key}.${prop}`, value: value[prop] }));\n }\n return errors;\n }\n}\n\nfunction validateLight(options) {\n const light = options.value;\n const styleSpec = options.styleSpec;\n const lightSpec = styleSpec.light;\n const style = options.style;\n let errors = [];\n const rootType = getType(light);\n if (light === undefined) {\n return errors;\n }\n else if (rootType !== 'object') {\n errors = errors.concat([\n new ValidationError('light', light, `object expected, ${rootType} found`)\n ]);\n return errors;\n }\n for (const key in light) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n if (transitionMatch &&\n lightSpec[transitionMatch[1]] &&\n lightSpec[transitionMatch[1]].transition) {\n errors = errors.concat(options.validateSpec({\n key,\n value: light[key],\n valueSpec: styleSpec.transition,\n validateSpec: options.validateSpec,\n style,\n styleSpec\n }));\n }\n else if (lightSpec[key]) {\n errors = errors.concat(options.validateSpec({\n key,\n value: light[key],\n valueSpec: lightSpec[key],\n validateSpec: options.validateSpec,\n style,\n styleSpec\n }));\n }\n else {\n errors = errors.concat([\n new ValidationError(key, light[key], `unknown property \"${key}\"`)\n ]);\n }\n }\n return errors;\n}\n\nfunction validateSky(options) {\n const sky = options.value;\n const styleSpec = options.styleSpec;\n const skySpec = styleSpec.sky;\n const style = options.style;\n const rootType = getType(sky);\n if (sky === undefined) {\n return [];\n }\n else if (rootType !== 'object') {\n return [new ValidationError('sky', sky, `object expected, ${rootType} found`)];\n }\n let errors = [];\n for (const key in sky) {\n if (skySpec[key]) {\n errors = errors.concat(options.validateSpec({\n key,\n value: sky[key],\n valueSpec: skySpec[key],\n style,\n styleSpec\n }));\n }\n else {\n errors = errors.concat([\n new ValidationError(key, sky[key], `unknown property \"${key}\"`)\n ]);\n }\n }\n return errors;\n}\n\nfunction validateTerrain(options) {\n const terrain = options.value;\n const styleSpec = options.styleSpec;\n const terrainSpec = styleSpec.terrain;\n const style = options.style;\n let errors = [];\n const rootType = getType(terrain);\n if (terrain === undefined) {\n return errors;\n }\n else if (rootType !== 'object') {\n errors = errors.concat([\n new ValidationError('terrain', terrain, `object expected, ${rootType} found`)\n ]);\n return errors;\n }\n for (const key in terrain) {\n if (terrainSpec[key]) {\n errors = errors.concat(options.validateSpec({\n key,\n value: terrain[key],\n valueSpec: terrainSpec[key],\n validateSpec: options.validateSpec,\n style,\n styleSpec\n }));\n }\n else {\n errors = errors.concat([\n new ValidationError(key, terrain[key], `unknown property \"${key}\"`)\n ]);\n }\n }\n return errors;\n}\n\nfunction validateFormatted(options) {\n if (validateString(options).length === 0) {\n return [];\n }\n return validateExpression(options);\n}\n\nfunction validateImage(options) {\n if (validateString(options).length === 0) {\n return [];\n }\n return validateExpression(options);\n}\n\nfunction validatePadding(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n if (type === 'array') {\n if (value.length < 1 || value.length > 4) {\n return [\n new ValidationError(key, value, `padding requires 1 to 4 values; ${value.length} values found`)\n ];\n }\n const arrayElementSpec = {\n type: 'number'\n };\n let errors = [];\n for (let i = 0; i < value.length; i++) {\n errors = errors.concat(options.validateSpec({\n key: `${key}[${i}]`,\n value: value[i],\n validateSpec: options.validateSpec,\n valueSpec: arrayElementSpec\n }));\n }\n return errors;\n }\n else {\n return validateNumber({\n key,\n value,\n valueSpec: {}\n });\n }\n}\n\nfunction validateNumberArray(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n if (type === 'array') {\n const arrayElementSpec = {\n type: 'number'\n };\n if (value.length < 1) {\n return [\n new ValidationError(key, value, 'array length at least 1 expected, length 0 found')\n ];\n }\n let errors = [];\n for (let i = 0; i < value.length; i++) {\n errors = errors.concat(options.validateSpec({\n key: `${key}[${i}]`,\n value: value[i],\n validateSpec: options.validateSpec,\n valueSpec: arrayElementSpec\n }));\n }\n return errors;\n }\n else {\n return validateNumber({\n key,\n value,\n valueSpec: {}\n });\n }\n}\n\nfunction validateColorArray(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n if (type === 'array') {\n if (value.length < 1) {\n return [\n new ValidationError(key, value, 'array length at least 1 expected, length 0 found')\n ];\n }\n let errors = [];\n for (let i = 0; i < value.length; i++) {\n errors = errors.concat(validateColor({\n key: `${key}[${i}]`,\n value: value[i]}));\n }\n return errors;\n }\n else {\n return validateColor({\n key,\n value});\n }\n}\n\nfunction validateVariableAnchorOffsetCollection(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n const styleSpec = options.styleSpec;\n if (type !== 'array' || value.length < 1 || value.length % 2 !== 0) {\n return [\n new ValidationError(key, value, 'variableAnchorOffsetCollection requires a non-empty array of even length')\n ];\n }\n let errors = [];\n for (let i = 0; i < value.length; i += 2) {\n // Elements in even positions should be values from text-anchor enum\n errors = errors.concat(validateEnum({\n key: `${key}[${i}]`,\n value: value[i],\n valueSpec: styleSpec['layout_symbol']['text-anchor']\n }));\n // Elements in odd positions should be points (2-element numeric arrays)\n errors = errors.concat(validateArray({\n key: `${key}[${i + 1}]`,\n value: value[i + 1],\n valueSpec: {\n length: 2,\n value: 'number'\n },\n validateSpec: options.validateSpec,\n style: options.style,\n styleSpec\n }));\n }\n return errors;\n}\n\nfunction validateSprite(options) {\n let errors = [];\n const sprite = options.value;\n const key = options.key;\n if (!Array.isArray(sprite)) {\n return validateString({\n key,\n value: sprite\n });\n }\n else {\n const allSpriteIds = [];\n const allSpriteURLs = [];\n for (const i in sprite) {\n if (sprite[i].id && allSpriteIds.includes(sprite[i].id))\n errors.push(new ValidationError(key, sprite, `all the sprites' ids must be unique, but ${sprite[i].id} is duplicated`));\n allSpriteIds.push(sprite[i].id);\n if (sprite[i].url && allSpriteURLs.includes(sprite[i].url))\n errors.push(new ValidationError(key, sprite, `all the sprites' URLs must be unique, but ${sprite[i].url} is duplicated`));\n allSpriteURLs.push(sprite[i].url);\n const pairSpec = {\n id: {\n type: 'string',\n required: true\n },\n url: {\n type: 'string',\n required: true\n }\n };\n errors = errors.concat(validateObject({\n key: `${key}[${i}]`,\n value: sprite[i],\n valueSpec: pairSpec,\n validateSpec: options.validateSpec\n }));\n }\n return errors;\n }\n}\n\nfunction validateProjection(options) {\n const projection = options.value;\n const styleSpec = options.styleSpec;\n const projectionSpec = styleSpec.projection;\n const style = options.style;\n const rootType = getType(projection);\n if (projection === undefined) {\n return [];\n }\n else if (rootType !== 'object') {\n return [\n new ValidationError('projection', projection, `object expected, ${rootType} found`)\n ];\n }\n let errors = [];\n for (const key in projection) {\n if (projectionSpec[key]) {\n errors = errors.concat(options.validateSpec({\n key,\n value: projection[key],\n valueSpec: projectionSpec[key],\n style,\n styleSpec\n }));\n }\n else {\n errors = errors.concat([\n new ValidationError(key, projection[key], `unknown property \"${key}\"`)\n ]);\n }\n }\n return errors;\n}\n\nfunction validateProjectionDefinition(options) {\n const key = options.key;\n let value = options.value;\n value = value instanceof String ? value.valueOf() : value;\n const type = getType(value);\n if (type === 'array' &&\n !isProjectionDefinitionValue(value) &&\n !isPropertyValueSpecification(value)) {\n return [\n new ValidationError(key, value, `projection expected, invalid array ${JSON.stringify(value)} found`)\n ];\n }\n else if (!['array', 'string'].includes(type)) {\n return [\n new ValidationError(key, value, `projection expected, invalid type \"${type}\" found`)\n ];\n }\n return [];\n}\nfunction isPropertyValueSpecification(value) {\n if (['interpolate', 'step', 'literal'].includes(value[0])) {\n return true;\n }\n return false;\n}\nfunction isProjectionDefinitionValue(value) {\n return (Array.isArray(value) &&\n value.length === 3 &&\n typeof value[0] === 'string' &&\n typeof value[1] === 'string' &&\n typeof value[2] === 'number');\n}\n\nfunction isObjectLiteral(anything) {\n return Boolean(anything) && anything.constructor === Object;\n}\n\nfunction validateState(options) {\n if (!isObjectLiteral(options.value)) {\n return [\n new ValidationError(options.key, options.value, `object expected, ${getType(options.value)} found`)\n ];\n }\n return [];\n}\n\nfunction validateFontFaces(options) {\n const key = options.key;\n const value = options.value;\n const validateSpec = options.validateSpec;\n const styleSpec = options.styleSpec;\n const style = options.style;\n if (!isObjectLiteral(value)) {\n return [new ValidationError(key, value, `object expected, ${getType(value)} found`)];\n }\n const errors = [];\n for (const fontName in value) {\n const fontValue = value[fontName];\n const fontValueType = getType(fontValue);\n if (fontValueType === 'string') {\n // Validate as a string URL\n errors.push(...validateString({\n key: `${key}.${fontName}`,\n value: fontValue\n }));\n }\n else if (fontValueType === 'array') {\n // Validate as an array of font face objects\n const fontFaceSpec = {\n url: {\n type: 'string',\n required: true\n },\n 'unicode-range': {\n type: 'array',\n value: 'string'\n }\n };\n for (const [i, fontFace] of fontValue.entries()) {\n errors.push(...validateObject({\n key: `${key}.${fontName}[${i}]`,\n value: fontFace,\n valueSpec: fontFaceSpec,\n styleSpec,\n style,\n validateSpec\n }));\n }\n }\n else {\n errors.push(new ValidationError(`${key}.${fontName}`, fontValue, `string or array expected, ${fontValueType} found`));\n }\n }\n return errors;\n}\n\nconst VALIDATORS = {\n '*'() {\n return [];\n },\n array: validateArray,\n boolean: validateBoolean,\n number: validateNumber,\n color: validateColor,\n constants: validateConstants,\n enum: validateEnum,\n filter: validateFilter,\n function: validateFunction,\n layer: validateLayer,\n object: validateObject,\n source: validateSource,\n light: validateLight,\n sky: validateSky,\n terrain: validateTerrain,\n projection: validateProjection,\n projectionDefinition: validateProjectionDefinition,\n string: validateString,\n formatted: validateFormatted,\n resolvedImage: validateImage,\n padding: validatePadding,\n numberArray: validateNumberArray,\n colorArray: validateColorArray,\n variableAnchorOffsetCollection: validateVariableAnchorOffsetCollection,\n sprite: validateSprite,\n state: validateState,\n fontFaces: validateFontFaces\n};\n/**\n * Main recursive validation function used internally.\n * You should use `validateStyleMin` in the browser or `validateStyle` in node env.\n * @param options - the options object\n * @param options.key - string representing location of validation in style tree. Used only\n * for more informative error reporting.\n * @param options.value - current value from style being evaluated. May be anything from a\n * high level object that needs to be descended into deeper or a simple\n * scalar value.\n * @param options.valueSpec - current spec being evaluated. Tracks value.\n * @param options.styleSpec - current full spec being evaluated.\n * @param options.validateSpec - the validate function itself\n * @param options.style - the style object\n * @param options.objectElementValidators - optional object of functions that will be called\n * @returns an array of errors, or an empty array if no errors are found.\n */\nfunction validate(options) {\n const value = options.value;\n const valueSpec = options.valueSpec;\n const styleSpec = options.styleSpec;\n options.validateSpec = validate;\n if (valueSpec.expression && isFunction$1(unbundle(value))) {\n return validateFunction(options);\n }\n else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n return validateExpression(options);\n }\n else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n return VALIDATORS[valueSpec.type](options);\n }\n else {\n const valid = validateObject(extendBy({}, options, {\n valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec\n }));\n return valid;\n }\n}\n\nfunction validateGlyphsUrl(options) {\n const value = options.value;\n const key = options.key;\n const errors = validateString(options);\n if (errors.length)\n return errors;\n if (value.indexOf('{fontstack}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n }\n if (value.indexOf('{range}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n }\n return errors;\n}\n\n/**\n * Validate a MapLibre style against the style specification.\n * Use this when running in the browser.\n *\n * @param style - The style to be validated.\n * @param styleSpec - The style specification to validate against.\n * If omitted, the latest style spec is used.\n * @returns an array of errors, or an empty array if no errors are found.\n * @example\n * const validate = require('@maplibre/maplibre-gl-style-spec/').validateStyleMin;\n * const errors = validate(style);\n */\nfunction validateStyleMin(style, styleSpec = v8Spec) {\n let errors = [];\n errors = errors.concat(validate({\n key: '',\n value: style,\n valueSpec: styleSpec.$root,\n styleSpec,\n style,\n validateSpec: validate,\n objectElementValidators: {\n glyphs: validateGlyphsUrl,\n '*'() {\n return [];\n }\n }\n }));\n if (style['constants']) {\n errors = errors.concat(validateConstants({\n key: 'constants',\n value: style['constants']}));\n }\n return sortErrors(errors);\n}\nvalidateStyleMin.source = wrapCleanErrors(injectValidateSpec(validateSource));\nvalidateStyleMin.sprite = wrapCleanErrors(injectValidateSpec(validateSprite));\nvalidateStyleMin.glyphs = wrapCleanErrors(injectValidateSpec(validateGlyphsUrl));\nvalidateStyleMin.light = wrapCleanErrors(injectValidateSpec(validateLight));\nvalidateStyleMin.sky = wrapCleanErrors(injectValidateSpec(validateSky));\nvalidateStyleMin.terrain = wrapCleanErrors(injectValidateSpec(validateTerrain));\nvalidateStyleMin.state = wrapCleanErrors(injectValidateSpec(validateState));\nvalidateStyleMin.layer = wrapCleanErrors(injectValidateSpec(validateLayer));\nvalidateStyleMin.filter = wrapCleanErrors(injectValidateSpec(validateFilter));\nvalidateStyleMin.paintProperty = wrapCleanErrors(injectValidateSpec(validatePaintProperty));\nvalidateStyleMin.layoutProperty = wrapCleanErrors(injectValidateSpec(validateLayoutProperty));\nfunction injectValidateSpec(validator) {\n return function (options) {\n return validator(Object.assign({}, options, { validateSpec: validate }));\n };\n}\nfunction sortErrors(errors) {\n return [].concat(errors).sort((a, b) => {\n return a.line - b.line;\n });\n}\nfunction wrapCleanErrors(inner) {\n return function (...args) {\n return sortErrors(inner.apply(this, args));\n };\n}\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nconst stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nfunction stringify(passedObj, options = {}) {\n const indent = JSON.stringify(\n [1],\n undefined,\n options.indent === undefined ? 2 : options.indent\n ).slice(2, -3);\n\n const maxLength =\n indent === \"\"\n ? Infinity\n : options.maxLength === undefined\n ? 80\n : options.maxLength;\n\n let { replacer } = options;\n\n return (function _stringify(obj, currentIndent, reserved) {\n if (obj && typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n\n const string = JSON.stringify(obj, replacer);\n\n if (string === undefined) {\n return string;\n }\n\n const length = maxLength - currentIndent.length - reserved;\n\n if (string.length <= length) {\n const prettified = string.replace(\n stringOrChar,\n (match, stringLiteral) => {\n return stringLiteral || `${match} `;\n }\n );\n if (prettified.length <= length) {\n return prettified;\n }\n }\n\n if (replacer != null) {\n obj = JSON.parse(string);\n replacer = undefined;\n }\n\n if (typeof obj === \"object\" && obj !== null) {\n const nextIndent = currentIndent + indent;\n const items = [];\n let index = 0;\n let start;\n let end;\n\n if (Array.isArray(obj)) {\n start = \"[\";\n end = \"]\";\n const { length } = obj;\n for (; index < length; index++) {\n items.push(\n _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n \"null\"\n );\n }\n } else {\n start = \"{\";\n end = \"}\";\n const keys = Object.keys(obj);\n const { length } = keys;\n for (; index < length; index++) {\n const key = keys[index];\n const keyPart = `${JSON.stringify(key)}: `;\n const value = _stringify(\n obj[key],\n nextIndent,\n keyPart.length + (index === length - 1 ? 0 : 1)\n );\n if (value !== undefined) {\n items.push(keyPart + value);\n }\n }\n }\n\n if (items.length > 0) {\n return [start, indent + items.join(`,\\n${nextIndent}`), end].join(\n `\\n${currentIndent}`\n );\n }\n }\n\n return string;\n })(passedObj, \"\", 0);\n}\n\nfunction sortKeysBy(obj, reference) {\n const result = {};\n for (const key in reference) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n }\n for (const key in obj) {\n if (result[key] === undefined) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n/**\n * Format a MapLibre Style. Returns a stringified style with its keys\n * sorted in the same order as the reference style.\n *\n * The optional `space` argument is passed to\n * [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * to generate formatted output.\n *\n * If `space` is unspecified, a default of `2` spaces will be used.\n *\n * @private\n * @param {Object} style a MapLibre Style\n * @param {number} [space] space argument to pass to `JSON.stringify`\n * @returns {string} stringified formatted JSON\n * @example\n * var fs = require('fs');\n * var format = require('maplibre-gl-style-spec').format;\n * var style = fs.readFileSync('./source.json', 'utf8');\n * fs.writeFileSync('./dest.json', format(style));\n * fs.writeFileSync('./dest.min.json', format(style, 0));\n */\nfunction format(style, space = 2) {\n style = sortKeysBy(style, v8Spec.$root);\n if (style.layers) {\n style.layers = style.layers.map((layer) => sortKeysBy(layer, v8Spec.layer));\n }\n return stringify(style, { indent: space });\n}\n\nfunction eachLayout(layer, callback) {\n for (const k in layer) {\n if (k.indexOf('layout') === 0) {\n callback(layer[k], k);\n }\n }\n}\nfunction eachPaint(layer, callback) {\n for (const k in layer) {\n if (k.indexOf('paint') === 0) {\n callback(layer[k], k);\n }\n }\n}\nfunction resolveConstant(style, value) {\n if (typeof value === 'string' && value[0] === '@') {\n return resolveConstant(style, style.constants[value]);\n }\n else {\n return value;\n }\n}\nfunction isFunction(value) {\n return Array.isArray(value.stops);\n}\nfunction renameProperty(obj, from, to) {\n obj[to] = obj[from];\n delete obj[from];\n}\nfunction migrateV8(style) {\n style.version = 8;\n // Rename properties, reverse coordinates in source and layers\n eachSource(style, (source) => {\n if (source.type === 'video' && source['url'] !== undefined) {\n renameProperty(source, 'url', 'urls');\n }\n if (source.type === 'video') {\n source.coordinates.forEach((coord) => {\n return coord.reverse();\n });\n }\n });\n eachLayer(style, (layer) => {\n eachLayout(layer, (layout) => {\n if (layout['symbol-min-distance'] !== undefined) {\n renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n }\n });\n eachPaint(layer, (paint) => {\n if (paint['background-image'] !== undefined) {\n renameProperty(paint, 'background-image', 'background-pattern');\n }\n if (paint['line-image'] !== undefined) {\n renameProperty(paint, 'line-image', 'line-pattern');\n }\n if (paint['fill-image'] !== undefined) {\n renameProperty(paint, 'fill-image', 'fill-pattern');\n }\n });\n });\n // Inline Constants\n eachProperty(style, { paint: true, layout: true }, (property) => {\n const value = resolveConstant(style, property.value);\n if (isFunction(value)) {\n value.stops.forEach((stop) => {\n stop[1] = resolveConstant(style, stop[1]);\n });\n }\n property.set(value);\n });\n delete style['constants'];\n eachLayer(style, (layer) => {\n // get rid of text-max-size, icon-max-size\n // turn text-size, icon-size into layout properties\n // https://github.com/mapbox/mapbox-gl-style-spec/issues/255\n eachLayout(layer, (layout) => {\n delete layout['text-max-size'];\n delete layout['icon-max-size'];\n });\n eachPaint(layer, (paint) => {\n if (paint['text-size']) {\n if (!layer.layout)\n layer.layout = {};\n layer.layout['text-size'] = paint['text-size'];\n delete paint['text-size'];\n }\n if (paint['icon-size']) {\n if (!layer.layout)\n layer.layout = {};\n layer.layout['icon-size'] = paint['icon-size'];\n delete paint['icon-size'];\n }\n });\n });\n function migrateFontStack(font) {\n function splitAndTrim(string) {\n return string.split(',').map((s) => {\n return s.trim();\n });\n }\n if (Array.isArray(font)) {\n // Assume it's a previously migrated font-array.\n return font;\n }\n else if (typeof font === 'string') {\n return splitAndTrim(font);\n }\n else if (typeof font === 'object') {\n font.stops.forEach((stop) => {\n stop[1] = splitAndTrim(stop[1]);\n });\n return font;\n }\n else {\n throw new Error('unexpected font value');\n }\n }\n eachLayer(style, (layer) => {\n eachLayout(layer, (layout) => {\n if (layout['text-font']) {\n layout['text-font'] = migrateFontStack(layout['text-font']);\n }\n });\n });\n // Reverse order of symbol layers. This is an imperfect migration.\n //\n // The order of a symbol layer in the layers list affects two things:\n // - how it is drawn relative to other layers (like oneway arrows below bridges)\n // - the placement priority compared to other layers\n //\n // It's impossible to reverse the placement priority without breaking the draw order\n // in some cases. This migration only reverses the order of symbol layers that\n // are above all other types of layers.\n //\n // Symbol layers that are at the top of the map preserve their priority.\n // Symbol layers that are below another type (line, fill) of layer preserve their draw order.\n let firstSymbolLayer = 0;\n for (let i = style.layers.length - 1; i >= 0; i--) {\n const layer = style.layers[i];\n if (layer.type !== 'symbol') {\n firstSymbolLayer = i + 1;\n break;\n }\n }\n const symbolLayers = style.layers.splice(firstSymbolLayer);\n symbolLayers.reverse();\n style.layers = style.layers.concat(symbolLayers);\n return style;\n}\n\n/**\n * Migrate the given style object in place to use expressions. Specifically,\n * this will convert (a) \"stop\" functions, and (b) legacy filters to their\n * expression equivalents.\n * @param style The style object to migrate.\n * @returns The migrated style object.\n */\nfunction expressions(style) {\n const converted = [];\n eachLayer(style, (layer) => {\n if (layer.filter) {\n layer.filter = convertFilter(layer.filter);\n }\n });\n eachProperty(style, { paint: true, layout: true }, ({ path, key, value, reference, set }) => {\n if (isExpression(value) || key.endsWith('-transition') || reference === null)\n return;\n if (typeof value === 'object' && !Array.isArray(value)) {\n set(convertFunction(value, reference));\n converted.push(path.join('.'));\n }\n else if (reference.tokens && typeof value === 'string') {\n set(convertTokenString(value));\n }\n });\n return style;\n}\n\n/**\n * Migrate color style values to supported format.\n *\n * @param colorToMigrate Color value to migrate, could be a string or an expression.\n * @returns Color style value in supported format.\n */\nfunction migrateColors(colorToMigrate) {\n return JSON.parse(migrateHslColors(JSON.stringify(colorToMigrate)));\n}\n/**\n * Created to migrate from colors supported by the former CSS color parsing\n * library `csscolorparser` but not compliant with the CSS Color specification,\n * like `hsl(900, 0.15, 90%)`.\n *\n * @param colorToMigrate Serialized color style value.\n * @returns A serialized color style value in which all non-standard hsl color values\n * have been converted to a format that complies with the CSS Color specification.\n *\n * @example\n * migrateHslColors('\"hsl(900, 0.15, 90%)\"'); // returns '\"hsl(900, 15%, 90%)\"'\n * migrateHslColors('\"hsla(900, .15, .9)\"'); // returns '\"hsl(900, 15%, 90%)\"'\n * migrateHslColors('\"hsl(900, 15%, 90%)\"'); // returns '\"hsl(900, 15%, 90%)\"' - no changes\n */\nfunction migrateHslColors(colorToMigrate) {\n return colorToMigrate.replace(/\"hsla?\\((.+?)\\)\"/gi, (match, hslArgs) => {\n const argsMatch = hslArgs.match(/^(.+?)\\s*,\\s*(.+?)\\s*,\\s*(.+?)(?:\\s*,\\s*(.+))?$/i);\n if (argsMatch) {\n let [h, s, l, a] = argsMatch.slice(1);\n [s, l] = [s, l].map((v) => (v.endsWith('%') ? v : `${parseFloat(v) * 100}%`));\n return `\"hsl${typeof a === 'string' ? 'a' : ''}(${[h, s, l, a].filter(Boolean).join(',')})\"`;\n }\n return match;\n });\n}\n\n/**\n * Migrate a Mapbox/MapLibre GL Style to the latest version.\n *\n * @param style - a MapLibre Style\n * @returns a migrated style\n * @example\n * const fs = require('fs');\n * const migrate = require('@maplibre/maplibre-gl-style-spec').migrate;\n * const style = fs.readFileSync('./style.json', 'utf8');\n * fs.writeFileSync('./style.json', JSON.stringify(migrate(style)));\n */\nfunction migrate(style) {\n let migrated = false;\n if (style.version === 7) {\n style = migrateV8(style);\n migrated = true;\n }\n if (style.version === 8) {\n migrated = !!expressions(style);\n migrated = true;\n }\n eachProperty(style, { paint: true, layout: true }, ({ value, reference, set }) => {\n if ((reference === null || reference === void 0 ? void 0 : reference.type) === 'color') {\n set(migrateColors(value));\n }\n });\n if (!migrated) {\n throw new Error(`Cannot migrate from ${style.version}`);\n }\n return style;\n}\n\nconst visibilitySpec = {\n type: 'enum',\n 'property-type': 'data-constant',\n expression: {\n interpolated: false,\n parameters: ['global-state']\n },\n values: { visible: {}, none: {} },\n transition: false,\n default: 'visible'\n};\nclass VisibilityExpressionClass {\n constructor(visibility, globalState) {\n this._globalState = globalState;\n this.setValue(visibility);\n }\n evaluate() {\n var _a;\n return (_a = this._literalValue) !== null && _a !== void 0 ? _a : this._compiledValue.evaluate({});\n }\n setValue(visibility) {\n if (visibility === null ||\n visibility === undefined ||\n visibility === 'visible' ||\n visibility === 'none') {\n this._literalValue = visibility === 'none' ? 'none' : 'visible';\n this._compiledValue = undefined;\n this._globalStateRefs = new Set();\n return;\n }\n const compiled = createExpression(visibility, visibilitySpec, this._globalState);\n if (compiled.result === 'error') {\n this._literalValue = 'visible';\n this._compiledValue = undefined;\n throw new Error(compiled.value.map((err) => `${err.key}: ${err.message}`).join(', '));\n }\n this._literalValue = undefined;\n this._compiledValue = compiled.value;\n this._globalStateRefs = findGlobalStateRefs(compiled.value.expression);\n }\n getGlobalStateRefs() {\n return this._globalStateRefs;\n }\n}\n/**\n * Creates a visibility expression from a visibility specification.\n * @param visibility - the visibility specification, literal or expression\n * @param globalState - the global state object\n * @returns visibility expression object\n */\nfunction createVisibility(visibility, globalState) {\n return new VisibilityExpressionClass(visibility, globalState);\n}\n\nconst v8 = v8Spec;\nconst expression = {\n StyleExpression,\n StylePropertyFunction,\n ZoomConstantExpression,\n ZoomDependentExpression,\n createExpression,\n createPropertyExpression,\n isExpression,\n isExpressionFilter,\n isZoomExpression,\n normalizePropertyExpression\n};\nconst styleFunction = {\n convertFunction,\n createFunction,\n isFunction: isFunction$1\n};\nconst visit = { eachLayer, eachProperty, eachSource };\n\nexport { Color, ColorArray, ColorType, CompoundExpression, EvaluationContext, FormatExpression, Formatted, FormattedSection, FormattedType, Interpolate, Literal, NullType, NumberArray, Padding, ParsingError, ProjectionDefinition, ProjectionDefinitionType, ResolvedImage, Step, StyleExpression, StylePropertyFunction, ValidationError, VariableAnchorOffsetCollection, ZoomConstantExpression, ZoomDependentExpression, classifyRings, convertFilter, convertFunction, createExpression, createFunction, createPropertyExpression, createVisibility as createVisibilityExpression, derefLayers, diff, emptyStyle, expression, expressions$1 as expressions, featureFilter, format, styleFunction as function, groupByLayout, interpolateFactory as interpolates, isExpression, isFunction$1 as isFunction, isZoomExpression, v8Spec as latest, migrate, normalizePropertyExpression, supportsPropertyExpression, typeToString as toString, typeOf, v8, validate, validateStyleMin, visit };\n//# sourceMappingURL=index.mjs.map\n","import {validateStyleMin} from '@maplibre/maplibre-gl-style-spec';\nimport {ErrorEvent} from '../util/evented';\n\nimport type {Evented} from '../util/evented';\n\ntype ValidationError = {\n message: string;\n line: number;\n identifier?: string;\n};\n\nexport type Validator = (a: any) => ReadonlyArray;\n\ntype ValidateStyle = {\n source: Validator;\n sprite: Validator;\n glyphs: Validator;\n layer: Validator;\n light: Validator;\n sky: Validator;\n terrain: Validator;\n filter: Validator;\n paintProperty: Validator;\n layoutProperty: Validator;\n (b: any, a?: any | null): ReadonlyArray;\n};\n\nexport const validateStyle = (validateStyleMin as unknown as ValidateStyle);\n\nexport const validateSource = validateStyle.source;\nexport const validateLight = validateStyle.light;\nexport const validateSky = validateStyle.sky;\nexport const validateTerrain = validateStyle.terrain;\nexport const validateFilter = validateStyle.filter;\nexport const validatePaintProperty = validateStyle.paintProperty;\nexport const validateLayoutProperty = validateStyle.layoutProperty;\n\nexport function emitValidationErrors(\n emitter: Evented,\n errors?: ReadonlyArray<{\n message: string;\n identifier?: string;\n }> | null\n): boolean {\n let hasErrors = false;\n if (errors && errors.length) {\n for (const error of errors) {\n emitter.fire(new ErrorEvent(new Error(error.message)));\n hasErrors = true;\n }\n }\n return hasErrors;\n}\n","/*\nThis file was copied from https://github.com/mapbox/grid-index and was\nmigrated from JavaScript to TypeScript.\n\nCopyright (c) 2016, Mapbox\n\nPermission to use, copy, modify, and/or distribute this software for any purpose\nwith or without fee is hereby granted, provided that the above copyright notice\nand this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\nOF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\nTHIS SOFTWARE.\n*/\n\nconst NUM_PARAMS = 3;\n\nexport type SerializedGrid = {\n buffer: ArrayBuffer;\n};\n\nexport class TransferableGridIndex {\n cells: number[][];\n arrayBuffer: ArrayBuffer;\n d: number;\n keys: number[];\n bboxes: number[];\n n: number;\n extent: number;\n padding: number;\n scale: any;\n uid: number;\n min: number;\n max: number;\n\n constructor(extent: number | ArrayBuffer, n?: number, padding?: number) {\n const cells = this.cells = [];\n\n if (extent instanceof ArrayBuffer) {\n this.arrayBuffer = extent;\n const array = new Int32Array(this.arrayBuffer);\n extent = array[0];\n n = array[1];\n padding = array[2];\n\n this.d = n + 2 * padding;\n for (let k = 0; k < this.d * this.d; k++) {\n const start = array[NUM_PARAMS + k];\n const end = array[NUM_PARAMS + k + 1];\n cells.push(start === end ? null : array.subarray(start, end));\n }\n const keysOffset = array[NUM_PARAMS + cells.length];\n const bboxesOffset = array[NUM_PARAMS + cells.length + 1];\n this.keys = array.subarray(keysOffset, bboxesOffset) as any as number[];\n this.bboxes = array.subarray(bboxesOffset) as any as number[];\n\n this.insert = this._insertReadonly;\n\n } else {\n this.d = n + 2 * padding;\n for (let i = 0; i < this.d * this.d; i++) {\n cells.push([]);\n }\n this.keys = [];\n this.bboxes = [];\n }\n\n this.n = n;\n this.extent = extent;\n this.padding = padding;\n this.scale = n / extent;\n this.uid = 0;\n\n const p = (padding / n) * extent;\n this.min = -p;\n this.max = extent + p;\n }\n\n insert(key: number, x1: number, y1: number, x2: number, y2: number) {\n this._forEachCell(x1, y1, x2, y2, this._insertCell, this.uid++, undefined, undefined);\n this.keys.push(key);\n this.bboxes.push(x1);\n this.bboxes.push(y1);\n this.bboxes.push(x2);\n this.bboxes.push(y2);\n }\n\n _insertReadonly() {\n throw new Error('Cannot insert into a GridIndex created from an ArrayBuffer.');\n }\n\n _insertCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, uid: number) {\n this.cells[cellIndex].push(uid);\n }\n\n query(x1: number, y1: number, x2: number, y2: number, intersectionTest?: Function): number[] {\n const min = this.min;\n const max = this.max;\n if (x1 <= min && y1 <= min && max <= x2 && max <= y2 && !intersectionTest) {\n // We use `Array.slice` because `this.keys` may be a `Int32Array` and\n // some browsers (Safari and IE) do not support `TypedArray.slice`\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice#Browser_compatibility\n return Array.prototype.slice.call(this.keys);\n\n } else {\n const result = [];\n const seenUids = {};\n this._forEachCell(x1, y1, x2, y2, this._queryCell, result, seenUids, intersectionTest);\n return result;\n }\n }\n\n _queryCell(x1: number, y1: number, x2: number, y2:number, cellIndex:number, result, seenUids, intersectionTest: Function) {\n const cell = this.cells[cellIndex];\n if (cell !== null) {\n const keys = this.keys;\n const bboxes = this.bboxes;\n for (let u = 0; u < cell.length; u++) {\n const uid = cell[u];\n if (seenUids[uid] === undefined) {\n const offset = uid * 4;\n if (intersectionTest ?\n intersectionTest(bboxes[offset + 0], bboxes[offset + 1], bboxes[offset + 2], bboxes[offset + 3]) :\n ((x1 <= bboxes[offset + 2]) &&\n (y1 <= bboxes[offset + 3]) &&\n (x2 >= bboxes[offset + 0]) &&\n (y2 >= bboxes[offset + 1]))) {\n seenUids[uid] = true;\n result.push(keys[uid]);\n } else {\n seenUids[uid] = false;\n }\n }\n }\n }\n }\n\n _forEachCell(x1: number, y1: number, x2:number, y2:number, fn: Function, arg1, arg2, intersectionTest) {\n const cx1 = this._convertToCellCoord(x1);\n const cy1 = this._convertToCellCoord(y1);\n const cx2 = this._convertToCellCoord(x2);\n const cy2 = this._convertToCellCoord(y2);\n for (let x = cx1; x <= cx2; x++) {\n for (let y = cy1; y <= cy2; y++) {\n const cellIndex = this.d * y + x;\n if (intersectionTest && !intersectionTest(\n this._convertFromCellCoord(x),\n this._convertFromCellCoord(y),\n this._convertFromCellCoord(x + 1),\n this._convertFromCellCoord(y + 1))) continue;\n if (fn.call(this, x1, y1, x2, y2, cellIndex, arg1, arg2, intersectionTest)) return;\n }\n }\n }\n\n _convertFromCellCoord (x) {\n return (x - this.padding) / this.scale;\n }\n\n _convertToCellCoord(x) {\n return Math.max(0, Math.min(this.d - 1, Math.floor(x * this.scale) + this.padding));\n }\n\n toArrayBuffer(): ArrayBuffer {\n if (this.arrayBuffer) return this.arrayBuffer;\n\n const cells = this.cells;\n\n const metadataLength = NUM_PARAMS + this.cells.length + 1 + 1;\n let totalCellLength = 0;\n for (let i = 0; i < this.cells.length; i++) {\n totalCellLength += this.cells[i].length;\n }\n\n const array = new Int32Array(metadataLength + totalCellLength + this.keys.length + this.bboxes.length);\n array[0] = this.extent;\n array[1] = this.n;\n array[2] = this.padding;\n\n let offset = metadataLength;\n for (let k = 0; k < cells.length; k++) {\n const cell = cells[k];\n array[NUM_PARAMS + k] = offset;\n array.set(cell, offset);\n offset += cell.length;\n }\n\n array[NUM_PARAMS + cells.length] = offset;\n array.set(this.keys, offset);\n offset += this.keys.length;\n\n array[NUM_PARAMS + cells.length + 1] = offset;\n array.set(this.bboxes, offset);\n offset += this.bboxes.length;\n\n return array.buffer;\n }\n\n public static serialize(grid: TransferableGridIndex, transferables?: Array): SerializedGrid {\n const buffer = grid.toArrayBuffer();\n if (transferables) {\n transferables.push(buffer);\n }\n return {buffer};\n }\n\n public static deserialize(serialized: SerializedGrid): TransferableGridIndex {\n return new TransferableGridIndex(serialized.buffer);\n }\n}\n","import {TransferableGridIndex} from './transferable_grid_index';\nimport {Color, CompoundExpression, expressions, ResolvedImage, StylePropertyFunction,\n StyleExpression, ZoomDependentExpression, ZoomConstantExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {AJAXError} from './ajax';\nimport {isImageBitmap} from './util';\n\n/**\n * A class that is serialized to and json, that can be constructed back to the original class in the worker or in the main thread\n */\ntype SerializedObject = {\n [_: string]: S;\n};\n\n/**\n * All the possible values that can be serialized and sent to and from the worker\n */\nexport type Serialized = null | void | boolean | number | string | Boolean | Number | String | Date | RegExp | ArrayBuffer | ArrayBufferView | ImageData | ImageBitmap | Blob | Array | SerializedObject;\n\ntype Registry = {\n [_: string]: {\n klass: {\n new (...args: any): any;\n deserialize?: (input: Serialized) => unknown;\n serialize?: (input: any, transferables: Transferable[]) => SerializedObject;\n };\n omit: ReadonlyArray;\n shallow: ReadonlyArray;\n };\n};\n\n/**\n * Register options\n */\ntype RegisterOptions = {\n /**\n * List of properties to omit from serialization (e.g., cached/computed properties)\n */\n omit?: ReadonlyArray;\n /**\n * List of properties that should be serialized by a simple shallow copy, rather than by a recursive call to serialize().\n */\n shallow?: ReadonlyArray;\n};\n\nconst registry: Registry = {};\n\n/**\n * Register the given class as serializable.\n *\n * @param options - the registration options\n */\nexport function register(\n name: string,\n klass: {\n new (...args: any): T;\n },\n options: RegisterOptions = {}\n) {\n if (registry[name]) throw new Error(`${name} is already registered.`);\n ((Object.defineProperty as any))(klass, '_classRegistryKey', {\n value: name,\n writeable: false\n });\n registry[name] = {\n klass,\n omit: options.omit as ReadonlyArray || [],\n shallow: options.shallow as ReadonlyArray || []\n };\n}\n\nregister('Object', Object);\nregister('Set', Set);\nregister('TransferableGridIndex', TransferableGridIndex);\n\nregister('Color', Color);\nregister('Error', Error);\nregister('AJAXError', AJAXError);\nregister('ResolvedImage', ResolvedImage);\n\nregister('StylePropertyFunction', StylePropertyFunction);\nregister('StyleExpression', StyleExpression, {omit: ['_evaluator']});\n\nregister('ZoomDependentExpression', ZoomDependentExpression);\nregister('ZoomConstantExpression', ZoomConstantExpression);\nregister('CompoundExpression', CompoundExpression, {omit: ['_evaluate']});\nfor (const name in expressions) {\n if ((expressions[name] as any)._classRegistryKey) continue;\n register(`Expression_${name}`, expressions[name]);\n}\n\nfunction isArrayBuffer(value: any): value is ArrayBuffer {\n return value && typeof ArrayBuffer !== 'undefined' &&\n (value instanceof ArrayBuffer || (value.constructor && value.constructor.name === 'ArrayBuffer'));\n}\n\nfunction getClassRegistryKey(input: Object|SerializedObject): string {\n const klass = (input.constructor as any);\n return (input as SerializedObject).$name || klass._classRegistryKey;\n}\n\nfunction isRegistered(input: unknown): boolean {\n if (input === null || typeof input !== 'object') {\n return false;\n }\n const classRegistryKey = getClassRegistryKey(input);\n if (classRegistryKey && classRegistryKey !== 'Object') {\n return true;\n }\n return false;\n}\n\nfunction isSerializeHandledByBuiltin(input: unknown) {\n return (!isRegistered(input) && (\n input === null ||\n input === undefined ||\n typeof input === 'boolean' ||\n typeof input === 'number' ||\n typeof input === 'string' ||\n input instanceof Boolean ||\n input instanceof Number ||\n input instanceof String ||\n input instanceof Date ||\n input instanceof RegExp ||\n input instanceof Blob ||\n input instanceof Error ||\n isArrayBuffer(input) ||\n isImageBitmap(input) ||\n ArrayBuffer.isView(input) ||\n input instanceof ImageData)\n );\n}\n\n/**\n * Serialize the given object for transfer to or from a web worker.\n *\n * For non-builtin types, recursively serialize each property (possibly\n * omitting certain properties - see register()), and package the result along\n * with the constructor's `name` so that the appropriate constructor can be\n * looked up in `deserialize()`.\n *\n * If a `transferables` array is provided, add any transferable objects (i.e.,\n * any ArrayBuffers or ArrayBuffer views) to the list. (If a copy is needed,\n * this should happen in the client code, before using serialize().)\n */\nexport function serialize(input: unknown, transferables?: Array | null): Serialized {\n if (isSerializeHandledByBuiltin(input)) {\n if (isArrayBuffer(input) || isImageBitmap(input)) {\n if (transferables) {\n transferables.push(input);\n }\n }\n if (ArrayBuffer.isView(input)) {\n const view = input;\n if (transferables) {\n transferables.push(view.buffer);\n }\n }\n if (input instanceof ImageData) {\n if (transferables) {\n transferables.push(input.data.buffer);\n }\n }\n return input;\n }\n\n if (Array.isArray(input)) {\n const serialized: Array = [];\n for (const item of input) {\n serialized.push(serialize(item, transferables));\n }\n return serialized;\n }\n\n if (typeof input !== 'object') {\n throw new Error(`can't serialize object of type ${typeof input}`);\n }\n const classRegistryKey = getClassRegistryKey(input);\n if (!classRegistryKey) {\n throw new Error(`can't serialize object of unregistered class ${input.constructor.name}`);\n }\n if (!registry[classRegistryKey]) throw new Error(`${classRegistryKey} is not registered.`);\n const {klass} = registry[classRegistryKey];\n const properties: SerializedObject = klass.serialize ?\n // (Temporary workaround) allow a class to provide static\n // `serialize()` and `deserialize()` methods to bypass the generic\n // approach.\n // This temporary workaround lets us use the generic serialization\n // approach for objects whose members include instances of dynamic\n // StructArray types. Once we refactor StructArray to be static,\n // we can remove this complexity.\n (klass.serialize(input, transferables) as SerializedObject) : {};\n\n if (!klass.serialize) {\n for (const key in input) {\n if (!input.hasOwnProperty(key)) continue;\n if (registry[classRegistryKey].omit.indexOf(key) >= 0) continue;\n const property = input[key];\n properties[key] = registry[classRegistryKey].shallow.indexOf(key) >= 0 ?\n property :\n serialize(property, transferables);\n }\n if (input instanceof Error) {\n properties.message = input.message;\n }\n } else {\n if (transferables && properties === transferables[transferables.length - 1]) {\n throw new Error('statically serialized object won\\'t survive transfer of $name property');\n }\n }\n\n if (properties.$name) {\n throw new Error('$name property is reserved for worker serialization logic.');\n }\n if (classRegistryKey !== 'Object') {\n properties.$name = classRegistryKey;\n }\n\n return properties;\n}\n\nexport function deserialize(input: Serialized): unknown {\n if (isSerializeHandledByBuiltin(input)) {\n return input;\n }\n\n if (Array.isArray(input)) {\n return input.map(deserialize);\n }\n\n if (typeof input !== 'object') {\n throw new Error(`can't deserialize object of type ${typeof input}`);\n }\n const classRegistryKey = getClassRegistryKey(input) || 'Object';\n if (!registry[classRegistryKey]) {\n throw new Error(`can't deserialize unregistered class ${classRegistryKey}`);\n }\n const {klass} = registry[classRegistryKey];\n if (!klass) {\n throw new Error(`can't deserialize unregistered class ${classRegistryKey}`);\n }\n\n if (klass.deserialize) {\n return klass.deserialize(input);\n }\n\n const result = Object.create(klass.prototype);\n\n for (const key of Object.keys(input)) {\n if (key === '$name') continue;\n const value = (input as SerializedObject)[key];\n result[key] = registry[classRegistryKey].shallow.indexOf(key) >= 0 ? value : deserialize(value);\n }\n\n return result;\n}\n","export class ZoomHistory {\n lastZoom: number;\n lastFloorZoom: number;\n lastIntegerZoom: number;\n lastIntegerZoomTime: number;\n first: boolean;\n\n constructor() {\n this.first = true;\n }\n\n update(z: number, now: number) {\n const floorZ = Math.floor(z);\n\n if (this.first) {\n this.first = false;\n this.lastIntegerZoom = floorZ;\n this.lastIntegerZoomTime = 0;\n this.lastZoom = z;\n this.lastFloorZoom = floorZ;\n return true;\n }\n\n if (this.lastFloorZoom > floorZ) {\n this.lastIntegerZoom = floorZ + 1;\n this.lastIntegerZoomTime = now;\n } else if (this.lastFloorZoom < floorZ) {\n this.lastIntegerZoom = floorZ;\n this.lastIntegerZoomTime = now;\n }\n\n if (z !== this.lastZoom) {\n this.lastZoom = z;\n this.lastFloorZoom = floorZ;\n return true;\n }\n\n return false;\n }\n}\n","// This file is generated. Edit build/generate-unicode-data.ts, then run `npm run generate-unicode-data`.\n\n/**\n * Returns whether the fallback fonts specified by the\n * `localIdeographFontFamily` map option apply to the given codepoint. \n */\nexport function codePointUsesLocalIdeographFontFamily(codePoint: number): boolean {\n return /[\\u02EA\\u02EB\\u1100-\\u11FF\\u2E80-\\u2FDF\\u3000-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(codePoint));\n}\n\n/**\n * Returns whether the given codepoint participates in ideographic line\n * breaking.\n */\nexport function codePointAllowsIdeographicBreaking(codePoint: number): boolean {\n return /[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(codePoint));\n}\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * upright orientation.\n *\n * A character has upright orientation if it is drawn upright (unrotated)\n * whether the line is oriented horizontally or vertically, even if both\n * adjacent characters can be rotated. For example, a Chinese character is\n * always drawn upright. An uprightly oriented character causes an adjacent\n * “neutral” character to be drawn upright as well.\n */\nexport function codePointHasUprightVerticalOrientation(codePoint: number): boolean {\n return /[\\u02EA\\u02EB\\u1100-\\u11FF\\u1400-\\u167F\\u18B0-\\u18F5\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u303F\\u3041-\\u3096\\u309D-\\u30FB\\u30FD-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFE4\\uDFF0-\\uDFF6]|[\\uD81C-\\uD822\\uD83D\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD30-\\uDEFB]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83C[\\uDC00-\\uDE00\\uDF00-\\uDFFF]|\\uD83E[\\uDD00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(codePoint));\n}\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * neutral orientation.\n *\n * A character has neutral orientation if it may be drawn rotated or unrotated\n * when the line is oriented vertically, depending on the orientation of the\n * adjacent characters. For example, along a vertically oriented line, the\n * vulgar fraction ½ is drawn upright among Chinese characters but rotated among\n * Latin letters. A neutrally oriented character does not influence whether an\n * adjacent character is drawn upright or rotated.\n */\nexport function codePointHasNeutralVerticalOrientation(codePoint: number): boolean {\n return /[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(codePoint));\n}\n\n/**\n * Returns whether the give codepoint is likely to require complex text shaping.\n */\nexport function codePointRequiresComplexTextShaping(codePoint: number): boolean {\n return /[\\u0900-\\u0DFF\\u0F00-\\u109F\\u1780-\\u17FF]/gim.test(String.fromCodePoint(codePoint));\n}\n","import {\n codePointAllowsIdeographicBreaking,\n codePointHasUprightVerticalOrientation,\n codePointHasNeutralVerticalOrientation,\n codePointRequiresComplexTextShaping\n} from '../util/unicode_properties.g';\n\nexport function charIsWhitespace(char: number) {\n return /\\s/u.test(String.fromCodePoint(char));\n}\n\nexport function allowsIdeographicBreaking(chars: string) {\n for (const char of chars) {\n if (!codePointAllowsIdeographicBreaking(char.codePointAt(0))) return false;\n }\n return true;\n}\n\nexport function allowsVerticalWritingMode(chars: string) {\n for (const char of chars) {\n if (codePointHasUprightVerticalOrientation(char.codePointAt(0))) return true;\n }\n return false;\n}\n\nexport function allowsLetterSpacing(chars: string) {\n for (const char of chars) {\n if (!charAllowsLetterSpacing(char.codePointAt(0))) return false;\n }\n return true;\n}\n\n/**\n * Returns a regular expression matching the given script codes, excluding any\n * code that the execution environment lacks support for in regular expressions.\n */\nfunction sanitizedRegExpFromScriptCodes(scriptCodes: Array): RegExp {\n const supportedPropertyEscapes = scriptCodes.map(code => {\n try {\n return new RegExp(`\\\\p{sc=${code}}`, 'u').source;\n } catch {\n return null;\n }\n }).filter(pe => pe);\n return new RegExp(supportedPropertyEscapes.join('|'), 'u');\n}\n\n/**\n * ISO 15924 script codes of scripts that disallow letter spacing as of Unicode\n * 16.0.0.\n *\n * In general, cursive scripts are incompatible with letter spacing.\n */\nconst cursiveScriptCodes = [\n 'Arab', // Arabic\n 'Dupl', // Duployan\n 'Mong', // Mongolian\n 'Ougr', // Old Uyghur\n 'Syrc', // Syriac\n];\n\nconst cursiveScriptRegExp = sanitizedRegExpFromScriptCodes(cursiveScriptCodes);\n\nexport function charAllowsLetterSpacing(char: number) {\n return !cursiveScriptRegExp.test(String.fromCodePoint(char));\n}\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * rotated orientation.\n *\n * A character has rotated orientation if it is drawn rotated when the line is\n * oriented vertically, even if both adjacent characters are upright. For\n * example, a Latin letter is drawn rotated along a vertical line. A rotated\n * character causes an adjacent “neutral” character to be drawn rotated as well.\n */\nexport function charHasRotatedVerticalOrientation(char: number) {\n return !(codePointHasUprightVerticalOrientation(char) ||\n codePointHasNeutralVerticalOrientation(char));\n}\n\nexport function charInComplexShapingScript(char: number) {\n return /\\p{sc=Arab}/u.test(String.fromCodePoint(char));\n}\n\n/**\n * ISO 15924 script codes of scripts that are primarily written horizontally\n * right-to-left according to Unicode 16.0.0.\n */\nconst rtlScriptCodes = [\n 'Adlm', // Adlam\n 'Arab', // Arabic\n 'Armi', // Imperial Aramaic\n 'Avst', // Avestan\n 'Chrs', // Chorasmian\n 'Cprt', // Cypriot\n 'Egyp', // Egyptian Hieroglyphs\n 'Elym', // Elymaic\n 'Gara', // Garay\n 'Hatr', // Hatran\n 'Hebr', // Hebrew\n 'Hung', // Old Hungarian\n 'Khar', // Kharoshthi\n 'Lydi', // Lydian\n 'Mand', // Mandaic\n 'Mani', // Manichaean\n 'Mend', // Mende Kikakui\n 'Merc', // Meroitic Cursive\n 'Mero', // Meroitic Hieroglyphs\n 'Narb', // Old North Arabian\n 'Nbat', // Nabataean\n 'Nkoo', // NKo\n 'Orkh', // Old Turkic\n 'Palm', // Palmyrene\n 'Phli', // Inscriptional Pahlavi\n 'Phlp', // Psalter Pahlavi\n 'Phnx', // Phoenician\n 'Prti', // Inscriptional Parthian\n 'Rohg', // Hanifi Rohingya\n 'Samr', // Samaritan\n 'Sarb', // Old South Arabian\n 'Sogo', // Old Sogdian\n 'Syrc', // Syriac\n 'Thaa', // Thaana\n 'Todr', // Todhri\n 'Yezi', // Yezidi\n];\n\nconst rtlScriptRegExp = sanitizedRegExpFromScriptCodes(rtlScriptCodes);\n\nexport function charInRTLScript(char: number) {\n return rtlScriptRegExp.test(String.fromCodePoint(char));\n}\n\nexport function charInSupportedScript(char: number, canRenderRTL: boolean) {\n // This is a rough heuristic: whether we \"can render\" a script\n // actually depends on the properties of the font being used\n // and whether differences from the ideal rendering are considered\n // semantically significant.\n\n // Even in Latin script, we \"can't render\" combinations such as the fi\n // ligature, but we don't consider that semantically significant.\n if (!canRenderRTL && charInRTLScript(char)) {\n return false;\n }\n if (codePointRequiresComplexTextShaping(char)) {\n return false;\n }\n return true;\n}\n\nexport function stringContainsRTLText(chars: string): boolean {\n for (const char of chars) {\n if (charInRTLScript(char.codePointAt(0))) {\n return true;\n }\n }\n return false;\n}\n\nexport function isStringInSupportedScript(chars: string, canRenderRTL: boolean) {\n for (const char of chars) {\n if (!charInSupportedScript(char.codePointAt(0), canRenderRTL)) {\n return false;\n }\n }\n return true;\n}\n","import {type PluginState, type RTLPluginStatus} from './rtl_text_plugin_status';\n\nexport interface RTLTextPlugin {\n applyArabicShaping: (a: string) => string;\n processBidirectionalText: ((b: string, a: Array) => Array);\n processStyledBidirectionalText: ((c: string, b: Array, a: Array) => Array<[string, Array]>);\n}\n\nclass RTLWorkerPlugin implements RTLTextPlugin {\n readonly TIMEOUT = 5000;\n\n applyArabicShaping: (a: string) => string = null;\n processBidirectionalText: ((b: string, a: Array) => Array) = null;\n processStyledBidirectionalText: ((c: string, b: Array, a: Array) => Array<[string, Array]>) = null;\n pluginStatus: RTLPluginStatus = 'unavailable';\n pluginURL: string = null;\n loadScriptResolve: () => void = () => {};\n\n private setState(state: PluginState) {\n this.pluginStatus = state.pluginStatus;\n this.pluginURL = state.pluginURL;\n }\n\n private getState(): PluginState {\n return {\n pluginStatus: this.pluginStatus,\n pluginURL: this.pluginURL\n };\n }\n\n public setMethods(rtlTextPlugin: RTLTextPlugin) {\n if (rtlWorkerPlugin.isParsed()) {\n throw new Error('RTL text plugin already registered.');\n }\n this.applyArabicShaping = rtlTextPlugin.applyArabicShaping;\n this.processBidirectionalText = rtlTextPlugin.processBidirectionalText;\n this.processStyledBidirectionalText = rtlTextPlugin.processStyledBidirectionalText;\n this.loadScriptResolve();\n }\n\n public isParsed(): boolean {\n return this.applyArabicShaping != null &&\n this.processBidirectionalText != null &&\n this.processStyledBidirectionalText != null;\n }\n\n public getRTLTextPluginStatus() {\n return this.pluginStatus;\n }\n\n public async syncState(incomingState: PluginState, importScripts: (url: string) => void): Promise {\n // Parsed plugin cannot be changed, so just return its current state.\n if (this.isParsed()) {\n return this.getState();\n }\n\n if (incomingState.pluginStatus !== 'loading') {\n // simply sync and done\n this.setState(incomingState);\n return incomingState;\n }\n const urlToLoad = incomingState.pluginURL;\n const loadScriptPromise = new Promise((resolve) => {\n this.loadScriptResolve = resolve;\n });\n importScripts(urlToLoad);\n const dontWaitForeverTimeoutPromise = new Promise((resolve) => setTimeout(() => resolve(), this.TIMEOUT));\n await Promise.race([loadScriptPromise, dontWaitForeverTimeoutPromise]);\n const complete = this.isParsed();\n if (complete) {\n const loadedState: PluginState = {\n pluginStatus: 'loaded',\n pluginURL: urlToLoad\n };\n this.setState(loadedState);\n return loadedState;\n }\n\n // error case\n this.setState({\n pluginStatus: 'error',\n pluginURL: ''\n });\n throw new Error(`RTL Text Plugin failed to import scripts from ${urlToLoad}`);\n }\n}\n\nexport const rtlWorkerPlugin = new RTLWorkerPlugin();\n","import {ZoomHistory} from './zoom_history';\nimport {isStringInSupportedScript} from '../util/script_detection';\nimport {rtlWorkerPlugin} from '../source/rtl_text_plugin_worker';\n\nimport type {GlobalProperties, TransitionSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type CrossfadeParameters = {\n fromScale: number;\n toScale: number;\n t: number;\n};\n\n/**\n * @internal\n * A parameter that can be evaluated to a value.\n * It's main purpose is a parameter to expression `evaluate` methods.\n */\nexport class EvaluationParameters implements GlobalProperties {\n zoom: number;\n now: number;\n fadeDuration: number;\n zoomHistory: ZoomHistory;\n transition: TransitionSpecification;\n // has to be an own property of an object to be used in expressions\n // if defined as class method, it'll hidden from operations\n // that iterate over own enumerable properties\n // (i..e spread operator (...), Object.keys(), for...in statement, etc.)\n isSupportedScript: (_: string) => boolean = isSupportedScript;\n\n // \"options\" may also be another EvaluationParameters to copy, see CrossFadedProperty.possiblyEvaluate\n constructor(zoom: number, options?: any) {\n this.zoom = zoom;\n\n if (options) {\n this.now = options.now || 0;\n this.fadeDuration = options.fadeDuration || 0;\n this.zoomHistory = options.zoomHistory || new ZoomHistory();\n this.transition = options.transition || {};\n } else {\n this.now = 0;\n this.fadeDuration = 0;\n this.zoomHistory = new ZoomHistory();\n this.transition = {};\n }\n }\n\n crossFadingFactor() {\n if (this.fadeDuration === 0) {\n return 1;\n } else {\n return Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);\n }\n }\n\n getCrossfadeParameters(): CrossfadeParameters {\n const z = this.zoom;\n const fraction = z - Math.floor(z);\n const t = this.crossFadingFactor();\n\n return z > this.zoomHistory.lastIntegerZoom ?\n {fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t} :\n {fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction};\n }\n}\n\nfunction isSupportedScript(str: string): boolean {\n return isStringInSupportedScript(str, rtlWorkerPlugin.getRTLTextPluginStatus() === 'loaded');\n}\n","import {clone, extend, easeCubicInOut} from '../util/util';\nimport {interpolates, type Color, type StylePropertySpecification, normalizePropertyExpression,\n type Feature,\n type FeatureState,\n type StylePropertyExpression,\n type SourceExpression,\n type CompositeExpression, type TransitionSpecification,\n type PropertyValueSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {register} from '../util/web_worker_transfer';\nimport {EvaluationParameters} from './evaluation_parameters';\n\nimport {type CanonicalTileID} from '../tile/tile_id';\n\ntype TimePoint = number;\n\nexport const TRANSITION_SUFFIX = '-transition';\n\n/**\n * A from-to type\n */\nexport type CrossFaded = {\n to: T;\n from: T;\n};\n\n/**\n * @internal\n * Implementations of the `Property` interface:\n *\n * * Hold metadata about a property that's independent of any specific value: stuff like the type of the value,\n * the default value, etc. This comes from the style specification JSON.\n * * Define behavior that needs to be polymorphic across different properties: \"possibly evaluating\"\n * an input value (see below), and interpolating between two possibly-evaluted values.\n *\n * The type `T` is the fully-evaluated value type (e.g. `number`, `string`, `Color`).\n * The type `R` is the intermediate \"possibly evaluated\" value type. See below.\n *\n * There are two main implementations of the interface -- one for properties that allow data-driven values,\n * and one for properties that don't. There are a few \"special case\" implementations as well: one for properties\n * which cross-fade between two values rather than interpolating, one for `heatmap-color` and `line-gradient`,\n * and one for `light-position`.\n */\nexport interface Property {\n specification: StylePropertySpecification;\n possiblyEvaluate(\n value: PropertyValue,\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): R;\n interpolate(a: R, b: R, t: number): R;\n}\n\n/**\n * @internal\n * `PropertyValue` represents the value part of a property key-value unit. It's used to represent both\n * paint and layout property values, and regardless of whether or not their property supports data-driven\n * expressions.\n *\n * `PropertyValue` stores the raw input value as seen in a style or a runtime styling API call, i.e. one of the\n * following:\n *\n * * A constant value of the type appropriate for the property\n * * A function which produces a value of that type (but functions are quasi-deprecated in favor of expressions)\n * * An expression which produces a value of that type\n * * \"undefined\"/\"not present\", in which case the property is assumed to take on its default value.\n *\n * In addition to storing the original input value, `PropertyValue` also stores a normalized representation,\n * effectively treating functions as if they are expressions, and constant or default values as if they are\n * (constant) expressions.\n */\nexport class PropertyValue {\n property: Property;\n value: PropertyValueSpecification | void;\n expression: StylePropertyExpression;\n\n constructor(property: Property, value: PropertyValueSpecification | void, globalState: Record) {\n this.property = property;\n this.value = value;\n this.expression = normalizePropertyExpression(value === undefined ? property.specification.default : value, property.specification, globalState);\n }\n\n isDataDriven(): boolean {\n return this.expression.kind === 'source' || this.expression.kind === 'composite';\n }\n\n getGlobalStateRefs(): Set {\n return this.expression.globalStateRefs || new Set();\n }\n\n possiblyEvaluate(\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): R {\n return this.property.possiblyEvaluate(this, parameters, canonical, availableImages);\n }\n}\n\nexport type TransitionParameters = {\n now: TimePoint;\n transition: TransitionSpecification;\n};\n\n/**\n * @internal\n * Paint properties are _transitionable_: they can change in a fluid manner, interpolating or cross-fading between\n * old and new value. The duration of the transition, and the delay before it begins, is configurable.\n *\n * `TransitionablePropertyValue` is a compositional class that stores both the property value and that transition\n * configuration.\n *\n * A `TransitionablePropertyValue` can calculate the next step in the evaluation chain for paint property values:\n * `TransitioningPropertyValue`.\n */\nclass TransitionablePropertyValue {\n property: Property;\n value: PropertyValue;\n transition: TransitionSpecification | void;\n\n constructor(property: Property, globalState: Record) {\n this.property = property;\n this.value = new PropertyValue(property, undefined, globalState);\n }\n\n transitioned(parameters: TransitionParameters, prior: TransitioningPropertyValue): TransitioningPropertyValue {\n return new TransitioningPropertyValue(this.property, this.value, prior,\n extend({}, parameters.transition, this.transition), parameters.now);\n }\n\n untransitioned(): TransitioningPropertyValue {\n return new TransitioningPropertyValue(this.property, this.value, null, {}, 0);\n }\n}\n\n/**\n * @internal\n * `Transitionable` stores a map of all (property name, `TransitionablePropertyValue`) pairs for paint properties of a\n * given layer type. It can calculate the `TransitioningPropertyValue`s for all of them at once, producing a\n * `Transitioning` instance for the same set of properties.\n */\nexport class Transitionable {\n _properties: Properties;\n _values: {[K in keyof Props]: TransitionablePropertyValue};\n private _globalState: Record;\n\n constructor(properties: Properties, globalState: Record) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultTransitionablePropertyValues) as any);\n this._globalState = globalState;\n }\n\n getValue(name: S): PropertyValueSpecification | void {\n return clone(this._values[name].value.value);\n }\n\n setValue(name: S, value: PropertyValueSpecification | void) {\n if (!Object.prototype.hasOwnProperty.call(this._values, name)) {\n this._values[name] = new TransitionablePropertyValue(this._values[name].property, this._globalState);\n }\n // Note that we do not _remove_ an own property in the case where a value is being reset\n // to the default: the transition might still be non-default.\n this._values[name].value = new PropertyValue(this._values[name].property, value === null ? undefined : clone(value), this._globalState);\n }\n\n getTransition(name: S): TransitionSpecification | void {\n return clone(this._values[name].transition);\n }\n\n setTransition(name: S, value: TransitionSpecification | void) {\n if (!Object.prototype.hasOwnProperty.call(this._values, name)) {\n this._values[name] = new TransitionablePropertyValue(this._values[name].property, this._globalState);\n }\n this._values[name].transition = clone(value) || undefined;\n }\n\n serialize() {\n const result: any = {};\n for (const property of Object.keys(this._values)) {\n const value = this.getValue(property as keyof Props);\n if (value !== undefined) {\n result[property] = value;\n }\n\n const transition = this.getTransition(property as keyof Props);\n if (transition !== undefined) {\n result[`${property}${TRANSITION_SUFFIX}`] = transition;\n }\n }\n return result;\n }\n\n transitioned(parameters: TransitionParameters, prior: Transitioning): Transitioning {\n const result = new Transitioning(this._properties);\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].transitioned(parameters, prior._values[property]);\n }\n return result;\n }\n\n untransitioned(): Transitioning {\n const result = new Transitioning(this._properties);\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].untransitioned();\n }\n return result;\n }\n}\n\n/**\n * @internal\n * `TransitioningPropertyValue` implements the first of two intermediate steps in the evaluation chain of a paint\n * property value. In this step, transitions between old and new values are handled: as long as the transition is in\n * progress, `TransitioningPropertyValue` maintains a reference to the prior value, and interpolates between it and\n * the new value based on the current time and the configured transition duration and delay. The product is the next\n * step in the evaluation chain: the \"possibly evaluated\" result type `R`. See below for more on this concept.\n */\nclass TransitioningPropertyValue {\n property: Property;\n value: PropertyValue;\n prior: TransitioningPropertyValue;\n begin: TimePoint;\n end: TimePoint;\n\n constructor(property: Property,\n value: PropertyValue,\n prior: TransitioningPropertyValue,\n transition: TransitionSpecification,\n now: TimePoint) {\n this.property = property;\n this.value = value;\n this.begin = now + transition.delay || 0;\n this.end = this.begin + transition.duration || 0;\n if (property.specification.transition && (transition.delay || transition.duration)) {\n this.prior = prior;\n }\n }\n\n possiblyEvaluate(\n parameters: EvaluationParameters,\n canonical: CanonicalTileID,\n availableImages: Array\n ): R {\n const now = parameters.now || 0;\n const finalValue = this.value.possiblyEvaluate(parameters, canonical, availableImages);\n const prior = this.prior;\n if (!prior) {\n // No prior value.\n return finalValue;\n } else if (now > this.end) {\n // Transition from prior value is now complete.\n this.prior = null;\n return finalValue;\n } else if (this.value.isDataDriven()) {\n // Transitions to data-driven properties are not supported.\n // We snap immediately to the data-driven value so that, when we perform layout,\n // we see the data-driven function and can use it to populate vertex buffers.\n this.prior = null;\n return finalValue;\n } else if (now < this.begin) {\n // Transition hasn't started yet.\n return prior.possiblyEvaluate(parameters, canonical, availableImages);\n } else {\n // Interpolate between recursively-calculated prior value and final.\n const t = (now - this.begin) / (this.end - this.begin);\n return this.property.interpolate(prior.possiblyEvaluate(parameters, canonical, availableImages), finalValue, easeCubicInOut(t));\n }\n }\n}\n\n/**\n * @internal\n * `Transitioning` stores a map of all (property name, `TransitioningPropertyValue`) pairs for paint properties of a\n * given layer type. It can calculate the possibly-evaluated values for all of them at once, producing a\n * `PossiblyEvaluated` instance for the same set of properties.\n */\nexport class Transitioning {\n _properties: Properties;\n _values: {[K in keyof Props]: PossiblyEvaluatedPropertyValue};\n\n constructor(properties: Properties) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultTransitioningPropertyValues) as any);\n }\n\n possiblyEvaluate(\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): PossiblyEvaluated {\n const result = new PossiblyEvaluated(this._properties);\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].possiblyEvaluate(parameters, canonical, availableImages);\n }\n return result;\n }\n\n hasTransition() {\n for (const property of Object.keys(this._values)) {\n if (this._values[property].prior) {\n return true;\n }\n }\n return false;\n }\n}\n\n// ------- Layout -------\n\n/**\n * Because layout properties are not transitionable, they have a simpler representation and evaluation chain than\n * paint properties: `PropertyValue`s are possibly evaluated, producing possibly evaluated values, which are then\n * fully evaluated.\n *\n * `Layout` stores a map of all (property name, `PropertyValue`) pairs for layout properties of a\n * given layer type. It can calculate the possibly-evaluated values for all of them at once, producing a\n * `PossiblyEvaluated` instance for the same set of properties.\n */\nexport class Layout {\n _properties: Properties;\n _values: {[K in keyof Props]: PropertyValue>};\n private _globalState: Record; // reference to global state\n\n constructor(properties: Properties, globalState: Record) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultPropertyValues) as any);\n this._globalState = globalState;\n }\n\n hasValue(name: S) {\n return this._values[name].value !== undefined;\n }\n\n getValue(name: S) {\n return clone(this._values[name].value);\n }\n\n setValue(name: S, value: any) {\n this._values[name] = new PropertyValue(this._values[name].property, value === null ? undefined : clone(value), this._globalState) as any;\n }\n\n serialize() {\n const result: any = {};\n for (const property of Object.keys(this._values)) {\n const value = this.getValue(property as keyof Props);\n if (value !== undefined) {\n result[property] = value;\n }\n }\n return result;\n }\n\n possiblyEvaluate(\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): PossiblyEvaluated {\n const result = new PossiblyEvaluated(this._properties);\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].possiblyEvaluate(parameters, canonical, availableImages);\n }\n return result;\n }\n}\n\n// ------- PossiblyEvaluated -------\n\n/**\n * \"Possibly evaluated value\" is an intermediate stage in the evaluation chain for both paint and layout property\n * values. The purpose of this stage is to optimize away unnecessary recalculations for data-driven properties. Code\n * which uses data-driven property values must assume that the value is dependent on feature data, and request that it\n * be evaluated for each feature. But when that property value is in fact a constant or camera function, the calculation\n * will not actually depend on the feature, and we can benefit from returning the prior result of having done the\n * evaluation once, ahead of time, in an intermediate step whose inputs are just the value and \"global\" parameters\n * such as current zoom level.\n *\n * `PossiblyEvaluatedValue` represents the three possible outcomes of this step: if the input value was a constant or\n * camera expression, then the \"possibly evaluated\" result is a constant value. Otherwise, the input value was either\n * a source or composite expression, and we must defer final evaluation until supplied a feature. We separate\n * the source and composite cases because they are handled differently when generating GL attributes, buffers, and\n * uniforms.\n *\n * Note that `PossiblyEvaluatedValue` (and `PossiblyEvaluatedPropertyValue`, below) are _not_ used for properties that\n * do not allow data-driven values. For such properties, we know that the \"possibly evaluated\" result is always a constant\n * scalar value. See below.\n */\ntype PossiblyEvaluatedValue = {\n kind: 'constant';\n value: T;\n} | SourceExpression | CompositeExpression;\n\n/**\n * @internal\n * `PossiblyEvaluatedPropertyValue` is used for data-driven paint and layout property values. It holds a\n * `PossiblyEvaluatedValue` and the `GlobalProperties` that were used to generate it. You're not allowed to supply\n * a different set of `GlobalProperties` when performing the final evaluation because they would be ignored in the\n * case where the input value was a constant or camera function.\n */\nexport class PossiblyEvaluatedPropertyValue {\n property: DataDrivenProperty;\n value: PossiblyEvaluatedValue;\n parameters: EvaluationParameters;\n\n constructor(property: DataDrivenProperty, value: PossiblyEvaluatedValue, parameters: EvaluationParameters) {\n this.property = property;\n this.value = value;\n this.parameters = parameters;\n }\n\n isConstant(): boolean {\n return this.value.kind === 'constant';\n }\n\n constantOr(value: T): T {\n if (this.value.kind === 'constant') {\n return this.value.value;\n } else {\n return value;\n }\n }\n\n evaluate(\n feature: Feature,\n featureState: FeatureState,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): T {\n return this.property.evaluate(this.value, this.parameters, feature, featureState, canonical, availableImages);\n }\n}\n\n/**\n * @internal\n * `PossiblyEvaluated` stores a map of all (property name, `R`) pairs for paint or layout properties of a\n * given layer type.\n */\nexport class PossiblyEvaluated {\n _properties: Properties;\n _values: PossibleEvaluatedProps;\n\n constructor(properties: Properties) {\n this._properties = properties;\n this._values = Object.create(properties.defaultPossiblyEvaluatedValues);\n }\n\n get(name: S): PossibleEvaluatedProps[S] {\n return this._values[name];\n }\n}\n\n/**\n * @internal\n * An implementation of `Property` for properties that do not permit data-driven (source or composite) expressions.\n * This restriction allows us to declare statically that the result of possibly evaluating this kind of property\n * is in fact always the scalar type `T`, and can be used without further evaluating the value on a per-feature basis.\n */\nexport class DataConstantProperty implements Property {\n specification: StylePropertySpecification;\n\n constructor(specification: StylePropertySpecification) {\n this.specification = specification;\n }\n\n possiblyEvaluate(value: PropertyValue, parameters: EvaluationParameters): T {\n if (value.isDataDriven()) throw new Error('Value should not be data driven');\n return value.expression.evaluate(parameters);\n }\n\n interpolate(a: T, b: T, t: number): T {\n const interpolationType = this.specification.type as keyof typeof interpolates;\n const interpolationFn = interpolates[interpolationType] as ((from: T, to: T, t: number) => T) | undefined;\n if (interpolationFn) {\n return interpolationFn(a, b, t);\n } else {\n return a;\n }\n }\n}\n\n/**\n * @internal\n * An implementation of `Property` for properties that permit data-driven (source or composite) expressions.\n * The result of possibly evaluating this kind of property is `PossiblyEvaluatedPropertyValue`; obtaining\n * a scalar value `T` requires further evaluation on a per-feature basis.\n */\nexport class DataDrivenProperty implements Property> {\n specification: StylePropertySpecification;\n overrides: any;\n\n constructor(specification: StylePropertySpecification, overrides?: any) {\n this.specification = specification;\n this.overrides = overrides;\n }\n\n possiblyEvaluate(\n value: PropertyValue>,\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): PossiblyEvaluatedPropertyValue {\n if (value.expression.kind === 'constant' || value.expression.kind === 'camera') {\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: value.expression.evaluate(parameters, null, {}, canonical, availableImages)}, parameters);\n } else {\n return new PossiblyEvaluatedPropertyValue(this, value.expression, parameters);\n }\n }\n\n interpolate(\n a: PossiblyEvaluatedPropertyValue,\n b: PossiblyEvaluatedPropertyValue,\n t: number\n ): PossiblyEvaluatedPropertyValue {\n // If either possibly-evaluated value is non-constant, give up: we aren't able to interpolate data-driven values.\n if (a.value.kind !== 'constant' || b.value.kind !== 'constant') {\n return a;\n }\n\n // Special case hack solely for fill-outline-color. The undefined value is subsequently handled in\n // FillStyleLayer.recalculate, which sets fill-outline-color to the fill-color value if the former\n // is a PossiblyEvaluatedPropertyValue containing a constant undefined value. In addition to the\n // return value here, the other source of a PossiblyEvaluatedPropertyValue containing a constant\n // undefined value is the \"default value\" for fill-outline-color held in\n // `Properties.defaultPossiblyEvaluatedValues`, which serves as the prototype of\n // `PossiblyEvaluated._values`.\n if (a.value.value === undefined || b.value.value === undefined) {\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: undefined}, a.parameters);\n }\n\n const interpolationType = this.specification.type as keyof typeof interpolates;\n const interpolationFn = interpolates[interpolationType] as ((from: T, to: T, t: number) => T) | undefined;\n if (interpolationFn) {\n const interpolatedValue = interpolationFn(a.value.value, b.value.value, t);\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: interpolatedValue}, a.parameters);\n } else {\n return a;\n }\n }\n\n evaluate(\n value: PossiblyEvaluatedValue,\n parameters: EvaluationParameters,\n feature: Feature,\n featureState: FeatureState,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): T {\n if (value.kind === 'constant') {\n return value.value;\n } else {\n return value.evaluate(parameters, feature, featureState, canonical, availableImages);\n }\n }\n}\n\n/**\n * @internal\n * An implementation of `Property` for data driven `line-pattern` which are transitioned by cross-fading\n * rather than interpolation.\n */\n\nexport class CrossFadedDataDrivenProperty extends DataDrivenProperty> {\n\n possiblyEvaluate(\n value: PropertyValue, PossiblyEvaluatedPropertyValue>>,\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): PossiblyEvaluatedPropertyValue> {\n if (value.value === undefined) {\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: undefined}, parameters);\n } else if (value.expression.kind === 'constant') {\n const evaluatedValue = value.expression.evaluate(parameters, null, {}, canonical, availableImages);\n const isImageExpression = value.property.specification.type as any === 'resolvedImage';\n const constantValue = isImageExpression && typeof evaluatedValue !== 'string' ? evaluatedValue.name : evaluatedValue;\n const constant = this._calculate(constantValue, constantValue, constantValue, parameters);\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: constant}, parameters);\n } else if (value.expression.kind === 'camera') {\n const cameraVal = this._calculate(\n value.expression.evaluate({zoom: parameters.zoom - 1.0}),\n value.expression.evaluate({zoom: parameters.zoom}),\n value.expression.evaluate({zoom: parameters.zoom + 1.0}),\n parameters);\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: cameraVal}, parameters);\n } else {\n // source or composite expression\n return new PossiblyEvaluatedPropertyValue(this, value.expression, parameters);\n }\n }\n\n evaluate(\n value: PossiblyEvaluatedValue>,\n globals: EvaluationParameters,\n feature: Feature,\n featureState: FeatureState,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): CrossFaded {\n if (value.kind === 'source') {\n const constant = value.evaluate(globals, feature, featureState, canonical, availableImages);\n return this._calculate(constant, constant, constant, globals);\n } else if (value.kind === 'composite') {\n return this._calculate(\n value.evaluate({zoom: Math.floor(globals.zoom) - 1.0}, feature, featureState),\n value.evaluate({zoom: Math.floor(globals.zoom)}, feature, featureState),\n value.evaluate({zoom: Math.floor(globals.zoom) + 1.0}, feature, featureState),\n globals);\n } else {\n return value.value;\n }\n }\n\n _calculate(min: T, mid: T, max: T, parameters: EvaluationParameters): CrossFaded {\n const z = parameters.zoom;\n return z > parameters.zoomHistory.lastIntegerZoom ? {from: min, to: mid} : {from: max, to: mid};\n }\n\n interpolate(a: PossiblyEvaluatedPropertyValue>): PossiblyEvaluatedPropertyValue> {\n return a;\n }\n}\n/**\n * @internal\n * An implementation of `Property` for `*-pattern` and `line-dasharray`, which are transitioned by cross-fading\n * rather than interpolation.\n */\nexport class CrossFadedProperty implements Property> {\n specification: StylePropertySpecification;\n\n constructor(specification: StylePropertySpecification) {\n this.specification = specification;\n }\n\n possiblyEvaluate(\n value: PropertyValue>,\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): CrossFaded {\n if (value.value === undefined) {\n return undefined;\n } else if (value.expression.kind === 'constant') {\n const constant = value.expression.evaluate(parameters, null, {}, canonical, availableImages);\n return this._calculate(constant, constant, constant, parameters);\n } else {\n return this._calculate(\n value.expression.evaluate(new EvaluationParameters(Math.floor(parameters.zoom - 1.0), parameters)),\n value.expression.evaluate(new EvaluationParameters(Math.floor(parameters.zoom), parameters)),\n value.expression.evaluate(new EvaluationParameters(Math.floor(parameters.zoom + 1.0), parameters)),\n parameters);\n }\n }\n\n _calculate(min: T, mid: T, max: T, parameters: EvaluationParameters): CrossFaded {\n const z = parameters.zoom;\n return z > parameters.zoomHistory.lastIntegerZoom ? {from: min, to: mid} : {from: max, to: mid};\n }\n\n interpolate(a?: CrossFaded | null): CrossFaded {\n return a;\n }\n}\n\n/**\n * @internal\n * An implementation of `Property` for `heatmap-color` and `line-gradient`. Interpolation is a no-op, and\n * evaluation returns a boolean value in order to indicate its presence, but the real\n * evaluation happens in StyleLayer classes.\n */\n\nexport class ColorRampProperty implements Property {\n specification: StylePropertySpecification;\n\n constructor(specification: StylePropertySpecification) {\n this.specification = specification;\n }\n\n possiblyEvaluate(\n value: PropertyValue,\n parameters: EvaluationParameters,\n canonical?: CanonicalTileID,\n availableImages?: Array\n ): boolean {\n return !!value.expression.evaluate(parameters, null, {}, canonical, availableImages);\n }\n\n interpolate(): boolean { return false; }\n}\n\n/**\n * @internal\n * `Properties` holds objects containing default values for the layout or paint property set of a given\n * layer type. These objects are immutable, and they are used as the prototypes for the `_values` members of\n * `Transitionable`, `Transitioning`, `Layout`, and `PossiblyEvaluated`. This allows these classes to avoid\n * doing work in the common case where a property has no explicit value set and should be considered to take\n * on the default value: using `for (const property of Object.keys(this._values))`, they can iterate over\n * only the _own_ properties of `_values`, skipping repeated calculation of transitions and possible/final\n * evaluations for defaults, the result of which will always be the same.\n */\nexport class Properties {\n properties: Props;\n defaultPropertyValues: {[K in keyof Props]: PropertyValue};\n defaultTransitionablePropertyValues: {[K in keyof Props]: TransitionablePropertyValue};\n defaultTransitioningPropertyValues: {[K in keyof Props]: TransitioningPropertyValue};\n defaultPossiblyEvaluatedValues: {[K in keyof Props]: PossiblyEvaluatedPropertyValue};\n overridableProperties: Array;\n\n constructor(properties: Props) {\n this.properties = properties;\n this.defaultPropertyValues = ({} as any);\n this.defaultTransitionablePropertyValues = ({} as any);\n this.defaultTransitioningPropertyValues = ({} as any);\n this.defaultPossiblyEvaluatedValues = ({} as any);\n this.overridableProperties = ([] as any);\n\n for (const property in properties) {\n const prop = properties[property] as any;\n if (prop.specification.overridable) {\n this.overridableProperties.push(property);\n }\n const defaultPropertyValue = this.defaultPropertyValues[property] =\n new PropertyValue(prop, undefined, undefined);\n const defaultTransitionablePropertyValue = this.defaultTransitionablePropertyValues[property] =\n new TransitionablePropertyValue(prop, undefined);\n this.defaultTransitioningPropertyValues[property] =\n defaultTransitionablePropertyValue.untransitioned();\n this.defaultPossiblyEvaluatedValues[property] =\n defaultPropertyValue.possiblyEvaluate({} as any);\n }\n }\n}\n\nregister('DataDrivenProperty', DataDrivenProperty);\nregister('DataConstantProperty', DataConstantProperty);\nregister('CrossFadedDataDrivenProperty', CrossFadedDataDrivenProperty);\nregister('CrossFadedProperty', CrossFadedProperty);\nregister('ColorRampProperty', ColorRampProperty);\n","import {filterObject} from '../util/util';\n\nimport {createVisibilityExpression, featureFilter, latest as styleSpec, supportsPropertyExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {\n validateStyle,\n validateLayoutProperty,\n validatePaintProperty,\n emitValidationErrors\n} from './validate_style';\nimport {Evented} from '../util/evented';\nimport {Layout, Transitionable, type Transitioning, type Properties, PossiblyEvaluated, PossiblyEvaluatedPropertyValue, TRANSITION_SUFFIX} from './properties';\n\nimport type {Bucket, BucketParameters} from '../data/bucket';\nimport type Point from '@mapbox/point-geometry';\nimport type {\n FeatureFilter,\n FeatureState,\n LayerSpecification,\n FilterSpecification,\n VisibilitySpecification,\n VisibilityExpression\n} from '@maplibre/maplibre-gl-style-spec';\nimport type {TransitionParameters, PropertyValue} from './properties';\nimport {type EvaluationParameters} from './evaluation_parameters';\nimport type {CrossfadeParameters} from './evaluation_parameters';\n\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {CustomLayerInterface} from './style_layer/custom_style_layer';\nimport type {Map} from '../ui/map';\nimport type {StyleSetterOptions} from './style';\nimport {type mat4} from 'gl-matrix';\nimport type {UnwrappedTileID} from '../tile/tile_id';\nimport type {VectorTileFeatureLike} from '@maplibre/vt-pbf';\n\nexport type QueryIntersectsFeatureParams = {\n /**\n * The geometry to check intersection with.\n * This geometry is in tile coordinates.\n */\n queryGeometry: Array;\n /**\n * The feature to allow expression evaluation.\n */\n feature: VectorTileFeatureLike;\n /**\n * The feature state to allow expression evaluation.\n */\n featureState: FeatureState;\n /**\n * The geometry of the feature.\n * This geometry is in tile coordinates.\n */\n geometry: Array>;\n /**\n * The current zoom level.\n */\n zoom: number;\n /**\n * The transform to convert from tile coordinates to pixels.\n */\n transform: IReadonlyTransform;\n /**\n * The number of pixels per tile unit.\n */\n pixelsToTileUnits: number;\n /**\n * The matrix to convert from tile coordinates to pixel coordinates.\n * The pixel coordinates are relative to the center of the screen.\n */\n pixelPosMatrix: mat4;\n /**\n * The unwrapped tile ID for the tile being queried.\n */\n unwrappedTileID: UnwrappedTileID;\n /**\n * A function to get the elevation of a point in tile coordinates.\n */\n getElevation: undefined | ((x: number, y: number) => number);\n};\n\n/**\n * A base class for style layers\n */\nexport abstract class StyleLayer extends Evented {\n id: string;\n metadata: unknown;\n type: LayerSpecification['type'] | CustomLayerInterface['type'];\n source: string;\n sourceLayer: string;\n minzoom: number;\n maxzoom: number;\n filter: FilterSpecification | void;\n visibility: VisibilitySpecification;\n private _evaluatedVisibility: 'visible' | 'none' | void;\n\n _crossfadeParameters: CrossfadeParameters;\n\n _unevaluatedLayout: Layout;\n readonly layout: unknown;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n readonly paint: unknown;\n\n _featureFilter: FeatureFilter;\n\n _visibilityExpression: VisibilityExpression;\n\n readonly onAdd: ((map: Map) => void);\n readonly onRemove: ((map: Map) => void);\n\n queryRadius?(bucket: Bucket): number;\n queryIntersectsFeature?(params: QueryIntersectsFeatureParams): boolean | number;\n createBucket?(parameters: BucketParameters): Bucket;\n\n private _globalState: Record; // reference to global state\n\n constructor(layer: LayerSpecification | CustomLayerInterface, properties: Readonly<{\n layout?: Properties;\n paint?: Properties;\n }>, globalState: Record) {\n super();\n\n this.id = layer.id;\n this.type = layer.type;\n this._globalState = globalState;\n this._featureFilter = {filter: () => true, needGeometry: false, getGlobalStateRefs: () => new Set()};\n\n if (layer.type === 'custom') return;\n\n layer = (layer as any as LayerSpecification);\n\n this.metadata = layer.metadata;\n this.minzoom = layer.minzoom;\n this.maxzoom = layer.maxzoom;\n\n this._visibilityExpression = createVisibilityExpression(this.visibility, globalState);\n\n if (layer.type !== 'background') {\n this.source = layer.source;\n this.sourceLayer = layer['source-layer'];\n this.filter = layer.filter;\n this._featureFilter = featureFilter(layer.filter, globalState);\n }\n\n if (properties.layout) {\n this._unevaluatedLayout = new Layout(properties.layout, globalState);\n }\n\n if (properties.paint) {\n this._transitionablePaint = new Transitionable(properties.paint, globalState);\n\n for (const property in layer.paint) {\n this.setPaintProperty(property, layer.paint[property], {validate: false});\n }\n for (const property in layer.layout) {\n this.setLayoutProperty(property, layer.layout[property], {validate: false});\n }\n\n this._transitioningPaint = this._transitionablePaint.untransitioned();\n //$FlowFixMe\n this.paint = new PossiblyEvaluated(properties.paint);\n }\n }\n\n setFilter(filter: FilterSpecification | void) {\n this.filter = filter;\n this._featureFilter = featureFilter(filter, this._globalState);\n }\n\n getCrossfadeParameters() {\n return this._crossfadeParameters;\n }\n\n getLayoutProperty(name: string) {\n if (name === 'visibility') {\n return this.visibility;\n }\n\n return this._unevaluatedLayout.getValue(name);\n }\n\n /**\n * Get list of global state references that are used within layout or filter properties.\n * This is used to determine if layer source need to be reloaded when global state property changes.\n *\n */\n getLayoutAffectingGlobalStateRefs(): Set {\n const globalStateRefs = new Set();\n\n for (const globalStateRef of this._visibilityExpression.getGlobalStateRefs()) {\n globalStateRefs.add(globalStateRef);\n }\n\n if (this._unevaluatedLayout) {\n for (const propertyName in this._unevaluatedLayout._values) {\n const value = this._unevaluatedLayout._values[propertyName];\n\n for (const globalStateRef of value.getGlobalStateRefs()) {\n globalStateRefs.add(globalStateRef);\n }\n }\n }\n\n for (const globalStateRef of this._featureFilter.getGlobalStateRefs()) {\n globalStateRefs.add(globalStateRef);\n }\n\n return globalStateRefs;\n }\n\n /**\n * Get list of global state references that are used within paint properties.\n * This is used to determine if layer needs to be repainted when global state property changes.\n *\n */\n getPaintAffectingGlobalStateRefs(): globalThis.Map> {\n const globalStateRefs = new globalThis.Map>();\n\n if (this._transitionablePaint) {\n for (const propertyName in this._transitionablePaint._values) {\n const value = this._transitionablePaint._values[propertyName].value;\n\n for (const globalStateRef of value.getGlobalStateRefs()) {\n const properties = globalStateRefs.get(globalStateRef) ?? [];\n properties.push({name: propertyName, value: value.value});\n globalStateRefs.set(globalStateRef, properties);\n }\n }\n }\n\n return globalStateRefs;\n }\n\n /**\n * Get list of global state references that are used within visibility expression.\n * This is used to determine if layer visibility needs to be updated when global state property changes.\n */\n getVisibilityAffectingGlobalStateRefs() {\n return this._visibilityExpression.getGlobalStateRefs();\n }\n\n setLayoutProperty(name: string, value: any, options: StyleSetterOptions = {}) {\n if (value !== null && value !== undefined) {\n const key = `layers.${this.id}.layout.${name}`;\n if (this._validate(validateLayoutProperty, key, name, value, options)) {\n return;\n }\n }\n\n if (name === 'visibility') {\n this.visibility = value;\n this._visibilityExpression.setValue(value);\n this.recalculateVisibility();\n return;\n }\n\n this._unevaluatedLayout.setValue(name, value);\n }\n\n getPaintProperty(name: string) {\n if (name.endsWith(TRANSITION_SUFFIX)) {\n return this._transitionablePaint.getTransition(name.slice(0, -TRANSITION_SUFFIX.length));\n } else {\n return this._transitionablePaint.getValue(name);\n }\n }\n\n setPaintProperty(name: string, value: unknown, options: StyleSetterOptions = {}) {\n if (value !== null && value !== undefined) {\n const key = `layers.${this.id}.paint.${name}`;\n if (this._validate(validatePaintProperty, key, name, value, options)) {\n return false;\n }\n }\n\n if (name.endsWith(TRANSITION_SUFFIX)) {\n this._transitionablePaint.setTransition(name.slice(0, -TRANSITION_SUFFIX.length), (value as any) || undefined);\n return false;\n } else {\n const transitionable = this._transitionablePaint._values[name];\n const isCrossFadedProperty = transitionable.property.specification['property-type'] === 'cross-faded-data-driven';\n const wasDataDriven = transitionable.value.isDataDriven();\n const oldValue = transitionable.value;\n\n this._transitionablePaint.setValue(name, value);\n this._handleSpecialPaintPropertyUpdate(name);\n\n const newValue = this._transitionablePaint._values[name].value;\n const isDataDriven = newValue.isDataDriven();\n\n // if a cross-faded value is changed, we need to make sure the new icons get added to each tile's iconAtlas\n // so a call to _updateLayer is necessary, and we return true from this function so it gets called in\n // Style.setPaintProperty\n return isDataDriven || wasDataDriven || isCrossFadedProperty || this._handleOverridablePaintPropertyUpdate(name, oldValue, newValue);\n }\n }\n\n _handleSpecialPaintPropertyUpdate(_: string) {\n // No-op; can be overridden by derived classes.\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _handleOverridablePaintPropertyUpdate(name: string, oldValue: PropertyValue, newValue: PropertyValue): boolean {\n // No-op; can be overridden by derived classes.\n return false;\n }\n\n isHidden(zoom: number = this.minzoom, roundMinZoom: boolean = false) {\n if (this.minzoom && zoom < (roundMinZoom ? Math.floor(this.minzoom) : this.minzoom)) return true;\n if (this.maxzoom && zoom >= this.maxzoom) return true;\n return this._evaluatedVisibility === 'none';\n }\n\n updateTransitions(parameters: TransitionParameters) {\n this._transitioningPaint = this._transitionablePaint.transitioned(parameters, this._transitioningPaint);\n }\n\n hasTransition() {\n return this._transitioningPaint.hasTransition();\n }\n\n recalculateVisibility() {\n this._evaluatedVisibility = this._visibilityExpression.evaluate();\n }\n\n recalculate(parameters: EvaluationParameters, availableImages: Array) {\n if (parameters.getCrossfadeParameters) {\n this._crossfadeParameters = parameters.getCrossfadeParameters();\n }\n\n if (this._unevaluatedLayout) {\n (this as any).layout = this._unevaluatedLayout.possiblyEvaluate(parameters, undefined, availableImages);\n }\n\n (this as any).paint = this._transitioningPaint.possiblyEvaluate(parameters, undefined, availableImages);\n }\n\n serialize(): LayerSpecification {\n const output: LayerSpecification = {\n 'id': this.id,\n 'type': this.type as LayerSpecification['type'],\n 'source': this.source,\n 'source-layer': this.sourceLayer,\n 'metadata': this.metadata,\n 'minzoom': this.minzoom,\n 'maxzoom': this.maxzoom,\n 'filter': this.filter as FilterSpecification,\n 'layout': this._unevaluatedLayout && this._unevaluatedLayout.serialize(),\n 'paint': this._transitionablePaint && this._transitionablePaint.serialize()\n };\n\n if (this.visibility) {\n output.layout = output.layout || {};\n output.layout.visibility = this.visibility;\n }\n\n return filterObject(output, (value, key) => {\n return value !== undefined &&\n !(key === 'layout' && !Object.keys(value).length) &&\n !(key === 'paint' && !Object.keys(value).length);\n });\n }\n\n _validate(validate: Function, key: string, name: string, value: unknown, options: StyleSetterOptions = {}) {\n if (options && options.validate === false) {\n return false;\n }\n return emitValidationErrors(this, validate.call(validateStyle, {\n key,\n layerType: this.type,\n objectKey: name,\n value,\n styleSpec,\n // Workaround for https://github.com/mapbox/mapbox-gl-js/issues/2407\n style: {glyphs: true, sprite: true}\n }));\n }\n\n is3D() {\n return false;\n }\n\n isTileClipped() {\n return false;\n }\n\n hasOffscreenPass() {\n return false;\n }\n\n resize() {\n // noop\n }\n\n isStateDependent() {\n for (const property in (this as any).paint._values) {\n const value = (this as any).paint.get(property);\n if (!(value instanceof PossiblyEvaluatedPropertyValue) || !supportsPropertyExpression(value.property.specification)) {\n continue;\n }\n\n if ((value.value.kind === 'source' || value.value.kind === 'composite') &&\n value.value.isStateDependent) {\n return true;\n }\n }\n return false;\n }\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type RasterPaintProps = {\n \"raster-opacity\": DataConstantProperty,\n \"raster-hue-rotate\": DataConstantProperty,\n \"raster-brightness-min\": DataConstantProperty,\n \"raster-brightness-max\": DataConstantProperty,\n \"raster-saturation\": DataConstantProperty,\n \"raster-contrast\": DataConstantProperty,\n \"raster-resampling\": DataConstantProperty<\"linear\" | \"nearest\">,\n \"raster-fade-duration\": DataConstantProperty,\n};\n\nexport type RasterPaintPropsPossiblyEvaluated = {\n \"raster-opacity\": number,\n \"raster-hue-rotate\": number,\n \"raster-brightness-min\": number,\n \"raster-brightness-max\": number,\n \"raster-saturation\": number,\n \"raster-contrast\": number,\n \"raster-resampling\": \"linear\" | \"nearest\",\n \"raster-fade-duration\": number,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"raster-opacity\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-opacity\"] as any as StylePropertySpecification),\n \"raster-hue-rotate\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-hue-rotate\"] as any as StylePropertySpecification),\n \"raster-brightness-min\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-brightness-min\"] as any as StylePropertySpecification),\n \"raster-brightness-max\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-brightness-max\"] as any as StylePropertySpecification),\n \"raster-saturation\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-saturation\"] as any as StylePropertySpecification),\n \"raster-contrast\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-contrast\"] as any as StylePropertySpecification),\n \"raster-resampling\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-resampling\"] as any as StylePropertySpecification),\n \"raster-fade-duration\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-fade-duration\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import {StyleLayer} from '../style_layer';\n\nimport properties, {type RasterPaintPropsPossiblyEvaluated} from './raster_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\n\nimport type {RasterPaintProps} from './raster_style_layer_properties.g';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport const isRasterStyleLayer = (layer: StyleLayer): layer is RasterStyleLayer => layer.type === 'raster';\n\nexport class RasterStyleLayer extends StyleLayer {\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n}\n","// Note: all \"sizes\" are measured in bytes\n\n/**\n * @internal\n * A view type size\n */\nconst viewTypes = {\n 'Int8': Int8Array,\n 'Uint8': Uint8Array,\n 'Int16': Int16Array,\n 'Uint16': Uint16Array,\n 'Int32': Int32Array,\n 'Uint32': Uint32Array,\n 'Float32': Float32Array\n};\n\n/**\n * @internal\n * A view type size\n */\nexport type ViewType = keyof typeof viewTypes;\n\n/** @internal */\nclass Struct {\n _pos1: number;\n _pos2: number;\n _pos4: number;\n _pos8: number;\n readonly _structArray: StructArray;\n\n // The following properties are defined on the prototype of sub classes.\n size: number;\n\n /**\n * @param structArray - The StructArray the struct is stored in\n * @param index - The index of the struct in the StructArray.\n */\n constructor(structArray: StructArray, index: number) {\n (this as any)._structArray = structArray;\n this._pos1 = index * this.size;\n this._pos2 = this._pos1 / 2;\n this._pos4 = this._pos1 / 4;\n this._pos8 = this._pos1 / 8;\n }\n}\n\nconst DEFAULT_CAPACITY = 128;\nconst RESIZE_MULTIPLIER = 5;\n\n/**\n * @internal\n * A struct array member\n */\nexport type StructArrayMember = {\n name: string;\n type: ViewType;\n components: number;\n offset: number;\n};\n\nexport type StructArrayLayout = {\n members: Array;\n size: number;\n alignment: number;\n};\n\n/**\n * An array that can be deserialized\n */\nexport type SerializedStructArray = {\n length: number;\n arrayBuffer: ArrayBuffer;\n};\n\n/**\n * @internal\n * `StructArray` provides an abstraction over `ArrayBuffer` and `TypedArray`\n * making it behave like an array of typed structs.\n *\n * Conceptually, a StructArray is comprised of elements, i.e., instances of its\n * associated struct type. Each particular struct type, together with an\n * alignment size, determines the memory layout of a StructArray whose elements\n * are of that type. Thus, for each such layout that we need, we have\n * a corresponding StructArrayLayout class, inheriting from StructArray and\n * implementing `emplaceBack()` and `_refreshViews()`.\n *\n * In some cases, where we need to access particular elements of a StructArray,\n * we implement a more specific subclass that inherits from one of the\n * StructArrayLayouts and adds a `get(i): T` accessor that returns a structured\n * object whose properties are proxies into the underlying memory space for the\n * i-th element. This affords the convenience of working with (seemingly) plain\n * Javascript objects without the overhead of serializing/deserializing them\n * into ArrayBuffers for efficient web worker transfer.\n */\nabstract class StructArray {\n capacity: number;\n length: number;\n isTransferred: boolean;\n arrayBuffer: ArrayBuffer;\n uint8: Uint8Array;\n\n // The following properties are defined on the prototype.\n members: Array;\n bytesPerElement: number;\n abstract emplaceBack(...v: number[]);\n abstract emplace(i: number, ...v: number[]);\n\n constructor() {\n this.isTransferred = false;\n this.capacity = -1;\n this.resize(0);\n }\n\n /**\n * Serialize a StructArray instance. Serializes both the raw data and the\n * metadata needed to reconstruct the StructArray base class during\n * deserialization.\n */\n static serialize(array: StructArray, transferables?: Array): SerializedStructArray {\n\n array._trim();\n\n if (transferables) {\n array.isTransferred = true;\n transferables.push(array.arrayBuffer);\n }\n\n return {\n length: array.length,\n arrayBuffer: array.arrayBuffer,\n };\n }\n\n static deserialize(input: SerializedStructArray) {\n const structArray = Object.create(this.prototype);\n structArray.arrayBuffer = input.arrayBuffer;\n structArray.length = input.length;\n structArray.capacity = input.arrayBuffer.byteLength / structArray.bytesPerElement;\n structArray._refreshViews();\n return structArray;\n }\n\n /**\n * Resize the array to discard unused capacity.\n */\n _trim() {\n if (this.length !== this.capacity) {\n this.capacity = this.length;\n this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement);\n this._refreshViews();\n }\n }\n\n /**\n * Resets the length of the array to 0 without de-allocating capacity.\n */\n clear() {\n this.length = 0;\n }\n\n /**\n * Resize the array.\n * If `n` is greater than the current length then additional elements with undefined values are added.\n * If `n` is less than the current length then the array will be reduced to the first `n` elements.\n * @param n - The new size of the array.\n */\n resize(n: number) {\n this.reserve(n);\n this.length = n;\n }\n\n /**\n * Indicate a planned increase in size, so that any necessary allocation may\n * be done once, ahead of time.\n * @param n - The expected size of the array.\n */\n reserve(n: number) {\n if (n > this.capacity) {\n this.capacity = Math.max(n, Math.floor(this.capacity * RESIZE_MULTIPLIER), DEFAULT_CAPACITY);\n this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);\n\n const oldUint8Array = this.uint8;\n this._refreshViews();\n if (oldUint8Array) this.uint8.set(oldUint8Array);\n }\n }\n\n /**\n * Create TypedArray views for the current ArrayBuffer.\n */\n _refreshViews() {\n throw new Error('_refreshViews() must be implemented by each concrete StructArray layout');\n }\n}\n\n/**\n * Given a list of member fields, create a full StructArrayLayout, in\n * particular calculating the correct byte offset for each field. This data\n * is used at build time to generate StructArrayLayout_*.emplaceBack() and\n * other accessors, and at runtime for binding vertex buffer attributes.\n */\nfunction createLayout(\n members: Array<{\n name: string;\n type: ViewType;\n readonly components?: number;\n }>,\n alignment: number = 1\n): StructArrayLayout {\n\n let offset = 0;\n let maxSize = 0;\n const layoutMembers = members.map((member) => {\n const typeSize = sizeOf(member.type);\n const memberOffset = offset = align(offset, Math.max(alignment, typeSize));\n const components = member.components || 1;\n\n maxSize = Math.max(maxSize, typeSize);\n offset += typeSize * components;\n\n return {\n name: member.name,\n type: member.type,\n components,\n offset: memberOffset,\n };\n });\n\n const size = align(offset, Math.max(maxSize, alignment));\n\n return {\n members: layoutMembers,\n size,\n alignment\n };\n}\n\nfunction sizeOf(type: ViewType): number {\n return viewTypes[type].BYTES_PER_ELEMENT;\n}\n\nfunction align(offset: number, size: number): number {\n return Math.ceil(offset / size) * size;\n}\n\nexport {StructArray, Struct, viewTypes, createLayout};\n","// This file is generated. Edit build/generate-struct-arrays.ts, then run `npm run codegen`.\n\nimport {Struct, StructArray} from '../util/struct_array';\nimport {register} from '../util/web_worker_transfer';\nimport Point from '@mapbox/point-geometry';\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[2]\n *\n */\nclass StructArrayLayout2i4 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1);\n }\n\n public emplace(i: number, v0: number, v1: number) {\n const o2 = i * 2;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n return i;\n }\n}\n\nStructArrayLayout2i4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout2i4', StructArrayLayout2i4);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[3]\n *\n */\nclass StructArrayLayout3i6 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number) {\n const o2 = i * 3;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n return i;\n }\n}\n\nStructArrayLayout3i6.prototype.bytesPerElement = 6;\nregister('StructArrayLayout3i6', StructArrayLayout3i6);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[4]\n *\n */\nclass StructArrayLayout4i8 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number) {\n const o2 = i * 4;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n return i;\n }\n}\n\nStructArrayLayout4i8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout4i8', StructArrayLayout4i8);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[2]\n * [4] - Int16[4]\n *\n */\nclass StructArrayLayout2i4i12 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const o2 = i * 6;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n return i;\n }\n}\n\nStructArrayLayout2i4i12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout2i4i12', StructArrayLayout2i4i12);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[2]\n * [4] - Uint8[4]\n *\n */\nclass StructArrayLayout2i4ub8 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const o2 = i * 4;\n const o1 = i * 8;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.uint8[o1 + 4] = v2;\n this.uint8[o1 + 5] = v3;\n this.uint8[o1 + 6] = v4;\n this.uint8[o1 + 7] = v5;\n return i;\n }\n}\n\nStructArrayLayout2i4ub8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout2i4ub8', StructArrayLayout2i4ub8);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Float32[2]\n *\n */\nclass StructArrayLayout2f8 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1);\n }\n\n public emplace(i: number, v0: number, v1: number) {\n const o4 = i * 2;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n return i;\n }\n}\n\nStructArrayLayout2f8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout2f8', StructArrayLayout2f8);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[10]\n *\n */\nclass StructArrayLayout10ui20 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number) {\n const o2 = i * 10;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n this.uint16[o2 + 3] = v3;\n this.uint16[o2 + 4] = v4;\n this.uint16[o2 + 5] = v5;\n this.uint16[o2 + 6] = v6;\n this.uint16[o2 + 7] = v7;\n this.uint16[o2 + 8] = v8;\n this.uint16[o2 + 9] = v9;\n return i;\n }\n}\n\nStructArrayLayout10ui20.prototype.bytesPerElement = 20;\nregister('StructArrayLayout10ui20', StructArrayLayout10ui20);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[8]\n *\n */\nclass StructArrayLayout8ui16 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number) {\n const o2 = i * 8;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n this.uint16[o2 + 3] = v3;\n this.uint16[o2 + 4] = v4;\n this.uint16[o2 + 5] = v5;\n this.uint16[o2 + 6] = v6;\n this.uint16[o2 + 7] = v7;\n return i;\n }\n}\n\nStructArrayLayout8ui16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout8ui16', StructArrayLayout8ui16);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[4]\n * [8] - Uint16[4]\n * [16] - Int16[4]\n *\n */\nclass StructArrayLayout4i4ui4i24 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number) {\n const o2 = i * 12;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.uint16[o2 + 4] = v4;\n this.uint16[o2 + 5] = v5;\n this.uint16[o2 + 6] = v6;\n this.uint16[o2 + 7] = v7;\n this.int16[o2 + 8] = v8;\n this.int16[o2 + 9] = v9;\n this.int16[o2 + 10] = v10;\n this.int16[o2 + 11] = v11;\n return i;\n }\n}\n\nStructArrayLayout4i4ui4i24.prototype.bytesPerElement = 24;\nregister('StructArrayLayout4i4ui4i24', StructArrayLayout4i4ui4i24);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Float32[3]\n *\n */\nclass StructArrayLayout3f12 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number) {\n const o4 = i * 3;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n return i;\n }\n}\n\nStructArrayLayout3f12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout3f12', StructArrayLayout3f12);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint32[1]\n *\n */\nclass StructArrayLayout1ul4 extends StructArray {\n uint8: Uint8Array;\n uint32: Uint32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0);\n }\n\n public emplace(i: number, v0: number) {\n const o4 = i * 1;\n this.uint32[o4 + 0] = v0;\n return i;\n }\n}\n\nStructArrayLayout1ul4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout1ul4', StructArrayLayout1ul4);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[6]\n * [12] - Uint32[1]\n * [16] - Uint16[2]\n *\n */\nclass StructArrayLayout6i1ul2ui20 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n uint32: Uint32Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number) {\n const o2 = i * 10;\n const o4 = i * 5;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n this.uint32[o4 + 3] = v6;\n this.uint16[o2 + 8] = v7;\n this.uint16[o2 + 9] = v8;\n return i;\n }\n}\n\nStructArrayLayout6i1ul2ui20.prototype.bytesPerElement = 20;\nregister('StructArrayLayout6i1ul2ui20', StructArrayLayout6i1ul2ui20);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[2]\n * [4] - Int16[2]\n * [8] - Int16[2]\n *\n */\nclass StructArrayLayout2i2i2i12 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const o2 = i * 6;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n return i;\n }\n}\n\nStructArrayLayout2i2i2i12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout2i2i2i12', StructArrayLayout2i2i2i12);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Float32[2]\n * [8] - Float32[1]\n * [12] - Int16[2]\n *\n */\nclass StructArrayLayout2f1f2i16 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number) {\n const o4 = i * 4;\n const o2 = i * 8;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n this.int16[o2 + 6] = v3;\n this.int16[o2 + 7] = v4;\n return i;\n }\n}\n\nStructArrayLayout2f1f2i16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout2f1f2i16', StructArrayLayout2f1f2i16);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint8[2]\n * [4] - Float32[2]\n * [12] - Int16[2]\n *\n */\nclass StructArrayLayout2ub2f2i16 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n int16: Int16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number) {\n const o1 = i * 16;\n const o4 = i * 4;\n const o2 = i * 8;\n this.uint8[o1 + 0] = v0;\n this.uint8[o1 + 1] = v1;\n this.float32[o4 + 1] = v2;\n this.float32[o4 + 2] = v3;\n this.int16[o2 + 6] = v4;\n this.int16[o2 + 7] = v5;\n return i;\n }\n}\n\nStructArrayLayout2ub2f2i16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout2ub2f2i16', StructArrayLayout2ub2f2i16);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[3]\n *\n */\nclass StructArrayLayout3ui6 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number) {\n const o2 = i * 3;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n return i;\n }\n}\n\nStructArrayLayout3ui6.prototype.bytesPerElement = 6;\nregister('StructArrayLayout3ui6', StructArrayLayout3ui6);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[2]\n * [4] - Uint16[2]\n * [8] - Uint32[3]\n * [20] - Uint16[3]\n * [28] - Float32[2]\n * [36] - Uint8[3]\n * [40] - Uint32[1]\n * [44] - Int16[1]\n *\n */\nclass StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n uint16: Uint16Array;\n uint32: Uint32Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number) {\n const o2 = i * 24;\n const o4 = i * 12;\n const o1 = i * 48;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n this.uint16[o2 + 3] = v3;\n this.uint32[o4 + 2] = v4;\n this.uint32[o4 + 3] = v5;\n this.uint32[o4 + 4] = v6;\n this.uint16[o2 + 10] = v7;\n this.uint16[o2 + 11] = v8;\n this.uint16[o2 + 12] = v9;\n this.float32[o4 + 7] = v10;\n this.float32[o4 + 8] = v11;\n this.uint8[o1 + 36] = v12;\n this.uint8[o1 + 37] = v13;\n this.uint8[o1 + 38] = v14;\n this.uint32[o4 + 10] = v15;\n this.int16[o2 + 22] = v16;\n return i;\n }\n}\n\nStructArrayLayout2i2ui3ul3ui2f3ub1ul1i48.prototype.bytesPerElement = 48;\nregister('StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48', StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Int16[8]\n * [16] - Uint16[15]\n * [48] - Uint32[1]\n * [52] - Float32[2]\n * [60] - Uint16[2]\n *\n */\nclass StructArrayLayout8i15ui1ul2f2ui64 extends StructArray {\n uint8: Uint8Array;\n int16: Int16Array;\n uint16: Uint16Array;\n uint32: Uint32Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number, v17: number, v18: number, v19: number, v20: number, v21: number, v22: number, v23: number, v24: number, v25: number, v26: number, v27: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, v16: number, v17: number, v18: number, v19: number, v20: number, v21: number, v22: number, v23: number, v24: number, v25: number, v26: number, v27: number) {\n const o2 = i * 32;\n const o4 = i * 16;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n this.int16[o2 + 6] = v6;\n this.int16[o2 + 7] = v7;\n this.uint16[o2 + 8] = v8;\n this.uint16[o2 + 9] = v9;\n this.uint16[o2 + 10] = v10;\n this.uint16[o2 + 11] = v11;\n this.uint16[o2 + 12] = v12;\n this.uint16[o2 + 13] = v13;\n this.uint16[o2 + 14] = v14;\n this.uint16[o2 + 15] = v15;\n this.uint16[o2 + 16] = v16;\n this.uint16[o2 + 17] = v17;\n this.uint16[o2 + 18] = v18;\n this.uint16[o2 + 19] = v19;\n this.uint16[o2 + 20] = v20;\n this.uint16[o2 + 21] = v21;\n this.uint16[o2 + 22] = v22;\n this.uint32[o4 + 12] = v23;\n this.float32[o4 + 13] = v24;\n this.float32[o4 + 14] = v25;\n this.uint16[o2 + 30] = v26;\n this.uint16[o2 + 31] = v27;\n return i;\n }\n}\n\nStructArrayLayout8i15ui1ul2f2ui64.prototype.bytesPerElement = 64;\nregister('StructArrayLayout8i15ui1ul2f2ui64', StructArrayLayout8i15ui1ul2f2ui64);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Float32[1]\n *\n */\nclass StructArrayLayout1f4 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0);\n }\n\n public emplace(i: number, v0: number) {\n const o4 = i * 1;\n this.float32[o4 + 0] = v0;\n return i;\n }\n}\n\nStructArrayLayout1f4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout1f4', StructArrayLayout1f4);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[1]\n * [4] - Float32[2]\n *\n */\nclass StructArrayLayout1ui2f12 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number) {\n const o2 = i * 6;\n const o4 = i * 3;\n this.uint16[o2 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n return i;\n }\n}\n\nStructArrayLayout1ui2f12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout1ui2f12', StructArrayLayout1ui2f12);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint32[1]\n * [4] - Uint16[2]\n *\n */\nclass StructArrayLayout1ul2ui8 extends StructArray {\n uint8: Uint8Array;\n uint32: Uint32Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number) {\n const o4 = i * 2;\n const o2 = i * 4;\n this.uint32[o4 + 0] = v0;\n this.uint16[o2 + 2] = v1;\n this.uint16[o2 + 3] = v2;\n return i;\n }\n}\n\nStructArrayLayout1ul2ui8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout1ul2ui8', StructArrayLayout1ul2ui8);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[2]\n *\n */\nclass StructArrayLayout2ui4 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1);\n }\n\n public emplace(i: number, v0: number, v1: number) {\n const o2 = i * 2;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n return i;\n }\n}\n\nStructArrayLayout2ui4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout2ui4', StructArrayLayout2ui4);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Uint16[1]\n *\n */\nclass StructArrayLayout1ui2 extends StructArray {\n uint8: Uint8Array;\n uint16: Uint16Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0);\n }\n\n public emplace(i: number, v0: number) {\n const o2 = i * 1;\n this.uint16[o2 + 0] = v0;\n return i;\n }\n}\n\nStructArrayLayout1ui2.prototype.bytesPerElement = 2;\nregister('StructArrayLayout1ui2', StructArrayLayout1ui2);\n\n/**\n * @internal\n * Implementation of the StructArray layout:\n * [0] - Float32[4]\n *\n */\nclass StructArrayLayout4f16 extends StructArray {\n uint8: Uint8Array;\n float32: Float32Array;\n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n public emplaceBack(v0: number, v1: number, v2: number, v3: number) {\n const i = this.length;\n this.resize(i + 1);\n return this.emplace(i, v0, v1, v2, v3);\n }\n\n public emplace(i: number, v0: number, v1: number, v2: number, v3: number) {\n const o4 = i * 4;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n this.float32[o4 + 3] = v3;\n return i;\n }\n}\n\nStructArrayLayout4f16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout4f16', StructArrayLayout4f16);\n\n/** @internal */\nclass CollisionBoxStruct extends Struct {\n _structArray: CollisionBoxArray;\n get anchorPointX() { return this._structArray.int16[this._pos2 + 0]; }\n get anchorPointY() { return this._structArray.int16[this._pos2 + 1]; }\n get x1() { return this._structArray.int16[this._pos2 + 2]; }\n get y1() { return this._structArray.int16[this._pos2 + 3]; }\n get x2() { return this._structArray.int16[this._pos2 + 4]; }\n get y2() { return this._structArray.int16[this._pos2 + 5]; }\n get featureIndex() { return this._structArray.uint32[this._pos4 + 3]; }\n get sourceLayerIndex() { return this._structArray.uint16[this._pos2 + 8]; }\n get bucketIndex() { return this._structArray.uint16[this._pos2 + 9]; }\n get anchorPoint() { return new Point(this.anchorPointX, this.anchorPointY); }\n}\n\nCollisionBoxStruct.prototype.size = 20;\n\nexport type CollisionBox = CollisionBoxStruct;\n\n/** @internal */\nexport class CollisionBoxArray extends StructArrayLayout6i1ul2ui20 {\n /**\n * Return the CollisionBoxStruct at the given location in the array.\n * @param index - The index of the element.\n */\n get(index: number): CollisionBoxStruct {\n return new CollisionBoxStruct(this, index);\n }\n}\n\nregister('CollisionBoxArray', CollisionBoxArray);\n\n/** @internal */\nclass PlacedSymbolStruct extends Struct {\n _structArray: PlacedSymbolArray;\n get anchorX() { return this._structArray.int16[this._pos2 + 0]; }\n get anchorY() { return this._structArray.int16[this._pos2 + 1]; }\n get glyphStartIndex() { return this._structArray.uint16[this._pos2 + 2]; }\n get numGlyphs() { return this._structArray.uint16[this._pos2 + 3]; }\n get vertexStartIndex() { return this._structArray.uint32[this._pos4 + 2]; }\n get lineStartIndex() { return this._structArray.uint32[this._pos4 + 3]; }\n get lineLength() { return this._structArray.uint32[this._pos4 + 4]; }\n get segment() { return this._structArray.uint16[this._pos2 + 10]; }\n get lowerSize() { return this._structArray.uint16[this._pos2 + 11]; }\n get upperSize() { return this._structArray.uint16[this._pos2 + 12]; }\n get lineOffsetX() { return this._structArray.float32[this._pos4 + 7]; }\n get lineOffsetY() { return this._structArray.float32[this._pos4 + 8]; }\n get writingMode() { return this._structArray.uint8[this._pos1 + 36]; }\n get placedOrientation() { return this._structArray.uint8[this._pos1 + 37]; }\n set placedOrientation(x: number) { this._structArray.uint8[this._pos1 + 37] = x; }\n get hidden() { return this._structArray.uint8[this._pos1 + 38]; }\n set hidden(x: number) { this._structArray.uint8[this._pos1 + 38] = x; }\n get crossTileID() { return this._structArray.uint32[this._pos4 + 10]; }\n set crossTileID(x: number) { this._structArray.uint32[this._pos4 + 10] = x; }\n get associatedIconIndex() { return this._structArray.int16[this._pos2 + 22]; }\n}\n\nPlacedSymbolStruct.prototype.size = 48;\n\nexport type PlacedSymbol = PlacedSymbolStruct;\n\n/** @internal */\nexport class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48 {\n /**\n * Return the PlacedSymbolStruct at the given location in the array.\n * @param index - The index of the element.\n */\n get(index: number): PlacedSymbolStruct {\n return new PlacedSymbolStruct(this, index);\n }\n}\n\nregister('PlacedSymbolArray', PlacedSymbolArray);\n\n/** @internal */\nclass SymbolInstanceStruct extends Struct {\n _structArray: SymbolInstanceArray;\n get anchorX() { return this._structArray.int16[this._pos2 + 0]; }\n get anchorY() { return this._structArray.int16[this._pos2 + 1]; }\n get rightJustifiedTextSymbolIndex() { return this._structArray.int16[this._pos2 + 2]; }\n get centerJustifiedTextSymbolIndex() { return this._structArray.int16[this._pos2 + 3]; }\n get leftJustifiedTextSymbolIndex() { return this._structArray.int16[this._pos2 + 4]; }\n get verticalPlacedTextSymbolIndex() { return this._structArray.int16[this._pos2 + 5]; }\n get placedIconSymbolIndex() { return this._structArray.int16[this._pos2 + 6]; }\n get verticalPlacedIconSymbolIndex() { return this._structArray.int16[this._pos2 + 7]; }\n get key() { return this._structArray.uint16[this._pos2 + 8]; }\n get textBoxStartIndex() { return this._structArray.uint16[this._pos2 + 9]; }\n get textBoxEndIndex() { return this._structArray.uint16[this._pos2 + 10]; }\n get verticalTextBoxStartIndex() { return this._structArray.uint16[this._pos2 + 11]; }\n get verticalTextBoxEndIndex() { return this._structArray.uint16[this._pos2 + 12]; }\n get iconBoxStartIndex() { return this._structArray.uint16[this._pos2 + 13]; }\n get iconBoxEndIndex() { return this._structArray.uint16[this._pos2 + 14]; }\n get verticalIconBoxStartIndex() { return this._structArray.uint16[this._pos2 + 15]; }\n get verticalIconBoxEndIndex() { return this._structArray.uint16[this._pos2 + 16]; }\n get featureIndex() { return this._structArray.uint16[this._pos2 + 17]; }\n get numHorizontalGlyphVertices() { return this._structArray.uint16[this._pos2 + 18]; }\n get numVerticalGlyphVertices() { return this._structArray.uint16[this._pos2 + 19]; }\n get numIconVertices() { return this._structArray.uint16[this._pos2 + 20]; }\n get numVerticalIconVertices() { return this._structArray.uint16[this._pos2 + 21]; }\n get useRuntimeCollisionCircles() { return this._structArray.uint16[this._pos2 + 22]; }\n get crossTileID() { return this._structArray.uint32[this._pos4 + 12]; }\n set crossTileID(x: number) { this._structArray.uint32[this._pos4 + 12] = x; }\n get textBoxScale() { return this._structArray.float32[this._pos4 + 13]; }\n get collisionCircleDiameter() { return this._structArray.float32[this._pos4 + 14]; }\n get textAnchorOffsetStartIndex() { return this._structArray.uint16[this._pos2 + 30]; }\n get textAnchorOffsetEndIndex() { return this._structArray.uint16[this._pos2 + 31]; }\n}\n\nSymbolInstanceStruct.prototype.size = 64;\n\nexport type SymbolInstance = SymbolInstanceStruct;\n\n/** @internal */\nexport class SymbolInstanceArray extends StructArrayLayout8i15ui1ul2f2ui64 {\n /**\n * Return the SymbolInstanceStruct at the given location in the array.\n * @param index - The index of the element.\n */\n get(index: number): SymbolInstanceStruct {\n return new SymbolInstanceStruct(this, index);\n }\n}\n\nregister('SymbolInstanceArray', SymbolInstanceArray);\n\n/** @internal */\nexport class GlyphOffsetArray extends StructArrayLayout1f4 {\n getoffsetX(index: number) { return this.float32[index * 1 + 0]; }\n}\n\nregister('GlyphOffsetArray', GlyphOffsetArray);\n\n/** @internal */\nexport class SymbolLineVertexArray extends StructArrayLayout3i6 {\n getx(index: number) { return this.int16[index * 3 + 0]; }\n gety(index: number) { return this.int16[index * 3 + 1]; }\n gettileUnitDistanceFromAnchor(index: number) { return this.int16[index * 3 + 2]; }\n}\n\nregister('SymbolLineVertexArray', SymbolLineVertexArray);\n\n/** @internal */\nclass TextAnchorOffsetStruct extends Struct {\n _structArray: TextAnchorOffsetArray;\n get textAnchor() { return this._structArray.uint16[this._pos2 + 0]; }\n get textOffset0() { return this._structArray.float32[this._pos4 + 1]; }\n get textOffset1() { return this._structArray.float32[this._pos4 + 2]; }\n}\n\nTextAnchorOffsetStruct.prototype.size = 12;\n\nexport type TextAnchorOffset = TextAnchorOffsetStruct;\n\n/** @internal */\nexport class TextAnchorOffsetArray extends StructArrayLayout1ui2f12 {\n /**\n * Return the TextAnchorOffsetStruct at the given location in the array.\n * @param index - The index of the element.\n */\n get(index: number): TextAnchorOffsetStruct {\n return new TextAnchorOffsetStruct(this, index);\n }\n}\n\nregister('TextAnchorOffsetArray', TextAnchorOffsetArray);\n\n/** @internal */\nclass FeatureIndexStruct extends Struct {\n _structArray: FeatureIndexArray;\n get featureIndex() { return this._structArray.uint32[this._pos4 + 0]; }\n get sourceLayerIndex() { return this._structArray.uint16[this._pos2 + 2]; }\n get bucketIndex() { return this._structArray.uint16[this._pos2 + 3]; }\n}\n\nFeatureIndexStruct.prototype.size = 8;\n\nexport type FeatureIndex = FeatureIndexStruct;\n\n/** @internal */\nexport class FeatureIndexArray extends StructArrayLayout1ul2ui8 {\n /**\n * Return the FeatureIndexStruct at the given location in the array.\n * @param index - The index of the element.\n */\n get(index: number): FeatureIndexStruct {\n return new FeatureIndexStruct(this, index);\n }\n}\n\nregister('FeatureIndexArray', FeatureIndexArray);\n\nexport class PosArray extends StructArrayLayout2i4 {}\nexport class Pos3dArray extends StructArrayLayout3i6 {}\nexport class RasterBoundsArray extends StructArrayLayout4i8 {}\nexport class CircleLayoutArray extends StructArrayLayout2i4 {}\nexport class FillLayoutArray extends StructArrayLayout2i4 {}\nexport class FillExtrusionLayoutArray extends StructArrayLayout2i4i12 {}\nexport class HeatmapLayoutArray extends StructArrayLayout2i4 {}\nexport class LineLayoutArray extends StructArrayLayout2i4ub8 {}\nexport class LineExtLayoutArray extends StructArrayLayout2f8 {}\nexport class PatternLayoutArray extends StructArrayLayout10ui20 {}\nexport class DashLayoutArray extends StructArrayLayout8ui16 {}\nexport class SymbolLayoutArray extends StructArrayLayout4i4ui4i24 {}\nexport class SymbolDynamicLayoutArray extends StructArrayLayout3f12 {}\nexport class SymbolOpacityArray extends StructArrayLayout1ul4 {}\nexport class CollisionBoxLayoutArray extends StructArrayLayout2i2i2i12 {}\nexport class CollisionCircleLayoutArray extends StructArrayLayout2f1f2i16 {}\nexport class CollisionVertexArray extends StructArrayLayout2ub2f2i16 {}\nexport class QuadTriangleArray extends StructArrayLayout3ui6 {}\nexport class TriangleIndexArray extends StructArrayLayout3ui6 {}\nexport class LineIndexArray extends StructArrayLayout2ui4 {}\nexport class LineStripIndexArray extends StructArrayLayout1ui2 {}\nexport {\n StructArrayLayout2i4,\n StructArrayLayout3i6,\n StructArrayLayout4i8,\n StructArrayLayout2i4i12,\n StructArrayLayout2i4ub8,\n StructArrayLayout2f8,\n StructArrayLayout10ui20,\n StructArrayLayout8ui16,\n StructArrayLayout4i4ui4i24,\n StructArrayLayout3f12,\n StructArrayLayout1ul4,\n StructArrayLayout6i1ul2ui20,\n StructArrayLayout2i2i2i12,\n StructArrayLayout2f1f2i16,\n StructArrayLayout2ub2f2i16,\n StructArrayLayout3ui6,\n StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48,\n StructArrayLayout8i15ui1ul2f2ui64,\n StructArrayLayout1f4,\n StructArrayLayout1ui2f12,\n StructArrayLayout1ul2ui8,\n StructArrayLayout2ui4,\n StructArrayLayout1ui2,\n StructArrayLayout4f16\n};\n","import {createLayout} from '../../util/struct_array';\n\nconst layout = createLayout([\n {name: 'a_pos', components: 2, type: 'Int16'}\n], 4);\n\nexport default layout;\nexport const {members, size, alignment} = layout;\n","import {warnOnce} from '../util/util';\n\nimport {register} from '../util/web_worker_transfer';\n\nimport type {VertexArrayObject} from '../render/vertex_array_object';\nimport type {StructArray} from '../util/struct_array';\n\n/**\n * @internal\n * A single segment of a vector\n */\nexport type Segment = {\n sortKey?: number;\n vertexOffset: number;\n primitiveOffset: number;\n vertexLength: number;\n primitiveLength: number;\n vaos: {[_: string]: VertexArrayObject};\n};\n\n/**\n * @internal\n * Used for calculations on vector segments\n */\nexport class SegmentVector {\n static MAX_VERTEX_ARRAY_LENGTH: number;\n segments: Array;\n private _forceNewSegmentOnNextPrepare: boolean = false;\n\n constructor(segments: Array = []) {\n this.segments = segments;\n }\n\n /**\n * Returns the last segment if `numVertices` fits into it.\n * If there are no segments yet or `numVertices` doesn't fit into the last one, creates a new empty segment and returns it.\n */\n prepareSegment(\n numVertices: number,\n layoutVertexArray: StructArray,\n indexArray: StructArray,\n sortKey?: number\n ): Segment {\n const lastSegment: Segment = this.segments[this.segments.length - 1];\n\n if (numVertices > SegmentVector.MAX_VERTEX_ARRAY_LENGTH) {\n warnOnce(`Max vertices per segment is ${SegmentVector.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${numVertices}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${SegmentVector.MAX_VERTEX_ARRAY_LENGTH} vertices.`);\n }\n\n if (this._forceNewSegmentOnNextPrepare || !lastSegment || lastSegment.vertexLength + numVertices > SegmentVector.MAX_VERTEX_ARRAY_LENGTH || lastSegment.sortKey !== sortKey) {\n return this.createNewSegment(layoutVertexArray, indexArray, sortKey);\n } else {\n return lastSegment;\n }\n }\n\n /**\n * Creates a new empty segment and returns it.\n */\n createNewSegment(\n layoutVertexArray: StructArray,\n indexArray: StructArray,\n sortKey?: number\n ): Segment {\n const segment: Segment = {\n vertexOffset: layoutVertexArray.length,\n primitiveOffset: indexArray.length,\n vertexLength: 0,\n primitiveLength: 0,\n vaos: {}\n };\n\n if (sortKey !== undefined) {\n segment.sortKey = sortKey;\n }\n\n // If this was set, we have no need to create a new segment on next prepareSegment call,\n // since this function already created a new, empty segment.\n this._forceNewSegmentOnNextPrepare = false;\n this.segments.push(segment);\n return segment;\n }\n\n /**\n * Returns the last segment, or creates a new segments if there are no segments yet.\n */\n getOrCreateLatestSegment(\n layoutVertexArray: StructArray,\n indexArray: StructArray,\n sortKey?: number\n ): Segment {\n return this.prepareSegment(0, layoutVertexArray, indexArray, sortKey);\n }\n\n /**\n * Causes the next call to {@link prepareSegment} to always return a new segment,\n * not reusing the current segment even if the new geometry would fit it.\n */\n forceNewSegmentOnNextPrepare() {\n this._forceNewSegmentOnNextPrepare = true;\n }\n\n get() {\n return this.segments;\n }\n\n destroy() {\n for (const segment of this.segments) {\n for (const k in segment.vaos) {\n segment.vaos[k].destroy();\n }\n }\n }\n\n static simpleSegment(\n vertexOffset: number,\n primitiveOffset: number,\n vertexLength: number,\n primitiveLength: number\n ): SegmentVector {\n return new SegmentVector([{\n vertexOffset,\n primitiveOffset,\n vertexLength,\n primitiveLength,\n vaos: {},\n sortKey: 0\n }]);\n }\n}\n\n/**\n * The maximum size of a vertex array. This limit is imposed by WebGL's 16 bit\n * addressing of vertex buffers.\n */\nSegmentVector.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1;\n\nregister('SegmentVector', SegmentVector);\n","import {clamp} from '../util/util';\n\n/**\n * Packs two numbers, interpreted as 8-bit unsigned integers, into a single\n * float. Unpack them in the shader using the `unpack_float()` function,\n * defined in _prelude.vertex.glsl\n */\nexport function packUint8ToFloat(a: number, b: number) {\n // coerce a and b to 8-bit ints\n a = clamp(Math.floor(a), 0, 255);\n b = clamp(Math.floor(b), 0, 255);\n return 256 * a + b;\n}\n","import {createLayout} from '../../util/struct_array';\n\nexport const patternAttributes = createLayout([\n // [tl.x, tl.y, br.x, br.y]\n {name: 'a_pattern_from', components: 4, type: 'Uint16'},\n {name: 'a_pattern_to', components: 4, type: 'Uint16'},\n {name: 'a_pixel_ratio_from', components: 1, type: 'Uint16'},\n {name: 'a_pixel_ratio_to', components: 1, type: 'Uint16'},\n]);\n","import {createLayout} from '../../util/struct_array';\n\nexport const dashAttributes = createLayout([\n // [0, y, height, width]\n {name: 'a_dasharray_from', components: 4, type: 'Uint16'},\n {name: 'a_dasharray_to', components: 4, type: 'Uint16'},\n]);\n","var murmur3 = require(\"./murmurhash3_gc.js\")\nvar murmur2 = require(\"./murmurhash2_gc.js\")\n\nmodule.exports = murmur3\nmodule.exports.murmur3 = murmur3\nmodule.exports.murmur2 = murmur2\n","/**\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n * \n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n * \n * @param {string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash \n */\n\nfunction murmurhash3_32_gc(key, seed) {\n\tvar remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\t\n\tremainder = key.length & 3; // key.length % 4\n\tbytes = key.length - remainder;\n\th1 = seed;\n\tc1 = 0xcc9e2d51;\n\tc2 = 0x1b873593;\n\ti = 0;\n\t\n\twhile (i < bytes) {\n\t \tk1 = \n\t \t ((key.charCodeAt(i) & 0xff)) |\n\t \t ((key.charCodeAt(++i) & 0xff) << 8) |\n\t \t ((key.charCodeAt(++i) & 0xff) << 16) |\n\t \t ((key.charCodeAt(++i) & 0xff) << 24);\n\t\t++i;\n\t\t\n\t\tk1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n\t\tk1 = (k1 << 15) | (k1 >>> 17);\n\t\tk1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n\t\th1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n\t\th1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n\t\th1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n\t}\n\t\n\tk1 = 0;\n\t\n\tswitch (remainder) {\n\t\tcase 3: k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;\n\t\tcase 2: k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;\n\t\tcase 1: k1 ^= (key.charCodeAt(i) & 0xff);\n\t\t\n\t\tk1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n\t\tk1 = (k1 << 15) | (k1 >>> 17);\n\t\tk1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n\t\th1 ^= k1;\n\t}\n\t\n\th1 ^= key.length;\n\n\th1 ^= h1 >>> 16;\n\th1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n\th1 ^= h1 >>> 13;\n\th1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n\th1 ^= h1 >>> 16;\n\n\treturn h1 >>> 0;\n}\n\nif(typeof module !== \"undefined\") {\n module.exports = murmurhash3_32_gc\n}","/**\n * JS Implementation of MurmurHash2\n * \n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n * \n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n\nfunction murmurhash2_32_gc(str, seed) {\n var\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n \n while (l >= 4) {\n \tk = \n \t ((str.charCodeAt(i) & 0xff)) |\n \t ((str.charCodeAt(++i) & 0xff) << 8) |\n \t ((str.charCodeAt(++i) & 0xff) << 16) |\n \t ((str.charCodeAt(++i) & 0xff) << 24);\n \n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n\th = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n \n switch (l) {\n case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1: h ^= (str.charCodeAt(i) & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\nif(typeof module !== undefined) {\n module.exports = murmurhash2_32_gc\n}\n","import murmur3 from 'murmurhash-js';\nimport {register} from '../util/web_worker_transfer';\n\ntype SerializedFeaturePositionMap = {\n ids: Float64Array;\n positions: Uint32Array;\n};\n\ntype FeaturePosition = {\n index: number;\n start: number;\n end: number;\n};\n\n// A transferable data structure that maps feature ids to their indices and buffer offsets\nexport class FeaturePositionMap {\n ids: Array;\n positions: Array;\n indexed: boolean;\n\n constructor() {\n this.ids = [];\n this.positions = [];\n this.indexed = false;\n }\n\n add(id: unknown, index: number, start: number, end: number) {\n this.ids.push(getNumericId(id));\n this.positions.push(index, start, end);\n }\n\n getPositions(id: unknown): Array {\n if (!this.indexed) throw new Error('Trying to get index, but feature positions are not indexed');\n\n const intId = getNumericId(id);\n\n // binary search for the first occurrence of id in this.ids;\n // relies on ids/positions being sorted by id, which happens in serialization\n let i = 0;\n let j = this.ids.length - 1;\n while (i < j) {\n const m = (i + j) >> 1;\n if (this.ids[m] >= intId) {\n j = m;\n } else {\n i = m + 1;\n }\n }\n const positions = [];\n while (this.ids[i] === intId) {\n const index = this.positions[3 * i];\n const start = this.positions[3 * i + 1];\n const end = this.positions[3 * i + 2];\n positions.push({index, start, end});\n i++;\n }\n return positions;\n }\n\n static serialize(map: FeaturePositionMap, transferables: Array): SerializedFeaturePositionMap {\n const ids = new Float64Array(map.ids);\n const positions = new Uint32Array(map.positions);\n\n sort(ids, positions, 0, ids.length - 1);\n\n if (transferables) {\n transferables.push(ids.buffer, positions.buffer);\n }\n\n return {ids, positions};\n }\n\n static deserialize(obj: SerializedFeaturePositionMap): FeaturePositionMap {\n const map = new FeaturePositionMap();\n // after transferring, we only use these arrays statically (no pushes),\n // so TypedArray vs Array distinction that flow points out doesn't matter\n map.ids = (obj.ids as any);\n map.positions = (obj.positions as any);\n map.indexed = true;\n return map;\n }\n}\n\nfunction getNumericId(value: unknown) {\n const numValue = +value;\n if (!isNaN(numValue) && numValue <= Number.MAX_SAFE_INTEGER) {\n return numValue;\n }\n return murmur3(String(value));\n}\n\n// custom quicksort that sorts ids, indices and offsets together (by ids)\n// uses Hoare partitioning & manual tail call optimization to avoid worst case scenarios\nfunction sort(ids, positions, left, right) {\n while (left < right) {\n const pivot = ids[(left + right) >> 1];\n let i = left - 1;\n let j = right + 1;\n\n while (true) {\n do i++; while (ids[i] < pivot);\n do j--; while (ids[j] > pivot);\n if (i >= j) break;\n swap(ids, i, j);\n swap(positions, 3 * i, 3 * j);\n swap(positions, 3 * i + 1, 3 * j + 1);\n swap(positions, 3 * i + 2, 3 * j + 2);\n }\n\n if (j - left < right - j) {\n sort(ids, positions, left, j);\n left = j + 1;\n } else {\n sort(ids, positions, j + 1, right);\n right = j;\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nregister('FeaturePositionMap', FeaturePositionMap);\n","import {Color} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {Context} from '../gl/context';\nimport {type mat4, type vec2, type vec3, type vec4} from 'gl-matrix';\n\ntype $ObjMap any> = {\n [K in keyof T]: F extends (v: T[K]) => infer R ? R : never;\n};\n\nexport type UniformValues = $ObjMap(u: Uniform) => V>;\nexport type UniformLocations = {[_: string]: WebGLUniformLocation};\n\n/**\n * @internal\n * A base uniform abstract class\n */\nabstract class Uniform {\n gl: WebGLRenderingContext|WebGL2RenderingContext;\n location: WebGLUniformLocation;\n current: T;\n\n constructor(context: Context, location: WebGLUniformLocation) {\n this.gl = context.gl;\n this.location = location;\n }\n\n abstract set(v: T): void;\n}\n\nclass Uniform1i extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = 0;\n }\n\n set(v: number): void {\n if (this.current !== v) {\n this.current = v;\n this.gl.uniform1i(this.location, v);\n }\n }\n}\n\nclass Uniform1f extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = 0;\n }\n\n set(v: number): void {\n if (this.current !== v) {\n this.current = v;\n this.gl.uniform1f(this.location, v);\n }\n }\n}\n\nclass Uniform2f extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = [0, 0];\n }\n\n set(v: vec2): void {\n if (v[0] !== this.current[0] || v[1] !== this.current[1]) {\n this.current = v;\n this.gl.uniform2f(this.location, v[0], v[1]);\n }\n }\n}\n\nclass Uniform3f extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = [0, 0, 0];\n }\n\n set(v: vec3): void {\n if (v[0] !== this.current[0] || v[1] !== this.current[1] || v[2] !== this.current[2]) {\n this.current = v;\n this.gl.uniform3f(this.location, v[0], v[1], v[2]);\n }\n }\n}\n\nclass Uniform4f extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = [0, 0, 0, 0];\n }\n\n set(v: vec4): void {\n if (v[0] !== this.current[0] || v[1] !== this.current[1] ||\n v[2] !== this.current[2] || v[3] !== this.current[3]) {\n this.current = v;\n this.gl.uniform4f(this.location, v[0], v[1], v[2], v[3]);\n }\n }\n}\n\nclass UniformColor extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = Color.transparent;\n }\n\n set(v: Color): void {\n if (v.r !== this.current.r || v.g !== this.current.g ||\n v.b !== this.current.b || v.a !== this.current.a) {\n this.current = v;\n this.gl.uniform4f(this.location, v.r, v.g, v.b, v.a);\n }\n }\n}\n\nclass UniformColorArray extends Uniform> {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = new Array();\n }\n\n set(v: Array): void {\n if (v != this.current) {\n this.current = v;\n const values = new Float32Array(v.length*4);\n for( let i = 0; i < v.length; i++) {\n values[4*i] = v[i].r;\n values[4*i+1] = v[i].g;\n values[4*i+2] = v[i].b;\n values[4*i+3] = v[i].a;\n }\n this.gl.uniform4fv(this.location, values);\n }\n }\n}\n\nclass UniformFloatArray extends Uniform> {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = new Array();\n }\n\n set(v: Array): void {\n if (v != this.current) {\n this.current = v;\n const values = new Float32Array(v);\n this.gl.uniform1fv(this.location, values);\n }\n }\n}\n\nconst emptyMat4 = new Float32Array(16) as mat4;\nclass UniformMatrix4f extends Uniform {\n constructor(context: Context, location: WebGLUniformLocation) {\n super(context, location);\n this.current = emptyMat4;\n }\n\n set(v: mat4): void {\n // The vast majority of matrix comparisons that will trip this set\n // happen at i=12 or i=0, so we check those first to avoid lots of\n // unnecessary iteration:\n if (v[12] !== this.current[12] || v[0] !== this.current[0]) {\n this.current = v;\n this.gl.uniformMatrix4fv(this.location, false, v);\n return;\n }\n for (let i = 1; i < 16; i++) {\n if (v[i] !== this.current[i]) {\n this.current = v;\n this.gl.uniformMatrix4fv(this.location, false, v);\n break;\n }\n }\n }\n}\n\nexport {\n Uniform,\n Uniform1i,\n Uniform1f,\n Uniform2f,\n Uniform3f,\n Uniform4f,\n UniformColor,\n UniformColorArray,\n UniformFloatArray,\n UniformMatrix4f\n};\n\n/**\n * @internal\n * A uniform bindings\n */\nexport type UniformBindings = {[_: string]: Uniform};\n","import {packUint8ToFloat} from '../shaders/encode_attribute';\nimport {type Color, supportsPropertyExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {register} from '../util/web_worker_transfer';\nimport {PossiblyEvaluatedPropertyValue} from '../style/properties';\nimport {StructArrayLayout1f4, StructArrayLayout2f8, StructArrayLayout4f16, PatternLayoutArray, DashLayoutArray} from './array_types.g';\nimport {clamp} from '../util/util';\nimport {patternAttributes} from './bucket/pattern_attributes';\nimport {dashAttributes} from './bucket/dash_attributes';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\nimport {FeaturePositionMap} from './feature_position_map';\nimport {type Uniform, Uniform1f, UniformColor, Uniform4f} from '../render/uniform_binding';\n\nimport type {UniformLocations} from '../render/uniform_binding';\n\nimport type {CanonicalTileID} from '../tile/tile_id';\nimport type {Context} from '../gl/context';\nimport type {TypedStyleLayer} from '../style/style_layer/typed_style_layer';\nimport type {CrossfadeParameters} from '../style/evaluation_parameters';\nimport type {StructArray, StructArrayMember} from '../util/struct_array';\nimport type {VertexBuffer} from '../gl/vertex_buffer';\nimport type {ImagePosition} from '../render/image_atlas';\nimport type {\n Feature,\n FeatureState,\n GlobalProperties,\n SourceExpression,\n CompositeExpression,\n FormattedSection\n} from '@maplibre/maplibre-gl-style-spec';\nimport type {FeatureStates} from '../source/source_state';\nimport type {DashEntry} from '../render/line_atlas';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nexport type BinderUniform = {\n name: string;\n property: string;\n binding: Uniform;\n};\n\nfunction packColor(color: Color): [number, number] {\n return [\n packUint8ToFloat(255 * color.r, 255 * color.g),\n packUint8ToFloat(255 * color.b, 255 * color.a)\n ];\n}\n\ntype PaintOptions = {\n imagePositions: {\n [_: string]: ImagePosition;\n };\n dashPositions?: {\n [_: string]: DashEntry;\n };\n canonical?: CanonicalTileID;\n formattedSection?: FormattedSection;\n globalState?: Record;\n};\n\n/**\n * `Binder` is the interface definition for the strategies for constructing,\n * uploading, and binding paint property data as GLSL attributes. Most style-\n * spec properties have a 1:1 relationship to shader attribute/uniforms, but\n * some require multiple values per feature to be passed to the GPU, and in\n * those cases we bind multiple attributes/uniforms.\n *\n * It has three implementations, one for each of the three strategies we use:\n *\n * * For _constant_ properties -- those whose value is a constant, or the constant\n * result of evaluating a camera expression at a particular camera position -- we\n * don't need a vertex attribute buffer, and instead use a uniform.\n * * For data expressions, we use a vertex buffer with a single attribute value,\n * the evaluated result of the source function for the given feature.\n * * For composite expressions, we use a vertex buffer with two attributes: min and\n * max values covering the range of zooms at which we expect the tile to be\n * displayed. These values are calculated by evaluating the composite expression for\n * the given feature at strategically chosen zoom levels. In addition to this\n * attribute data, we also use a uniform value which the shader uses to interpolate\n * between the min and max value at the final displayed zoom level. The use of a\n * uniform allows us to cheaply update the value on every frame.\n *\n * Note that the shader source varies depending on whether we're using a uniform or\n * attribute. We dynamically compile shaders at runtime to accommodate this.\n */\ninterface AttributeBinder {\n populatePaintArray(\n length: number,\n feature: Feature,\n options: PaintOptions\n ): void;\n updatePaintArray(\n start: number,\n length: number,\n feature: Feature,\n featureState: FeatureState,\n options: PaintOptions\n ): void;\n upload(a: Context): void;\n destroy(): void;\n}\n\ninterface UniformBinder {\n uniformNames: Array;\n setUniform(\n uniform: Uniform,\n globals: GlobalProperties,\n currentValue: PossiblyEvaluatedPropertyValue,\n uniformName: string\n ): void;\n getBinding(context: Context, location: WebGLUniformLocation, name: string): Partial>;\n}\n\nclass ConstantBinder implements UniformBinder {\n value: unknown;\n type: string;\n uniformNames: Array;\n\n constructor(value: unknown, names: Array, type: string) {\n this.value = value;\n this.uniformNames = names.map(name => `u_${name}`);\n this.type = type;\n }\n\n setUniform(\n uniform: Uniform,\n globals: GlobalProperties,\n currentValue: PossiblyEvaluatedPropertyValue\n ): void {\n uniform.set(currentValue.constantOr(this.value));\n }\n\n getBinding(context: Context, location: WebGLUniformLocation, _: string): Partial> {\n return (this.type === 'color') ?\n new UniformColor(context, location) :\n new Uniform1f(context, location);\n }\n}\n\nclass CrossFadedConstantBinder implements UniformBinder {\n uniformNames: Array;\n patternFrom: Array;\n patternTo: Array;\n dashFrom: Array;\n dashTo: Array;\n pixelRatioFrom: number;\n pixelRatioTo: number;\n\n constructor(value: unknown, names: Array) {\n this.uniformNames = names.map(name => `u_${name}`);\n this.patternFrom = null;\n this.patternTo = null;\n this.pixelRatioFrom = 1.0;\n this.pixelRatioTo = 1.0;\n }\n\n setConstantPatternPositions(posTo: ImagePosition, posFrom: ImagePosition) {\n this.pixelRatioFrom = posFrom.pixelRatio;\n this.pixelRatioTo = posTo.pixelRatio;\n this.patternFrom = posFrom.tlbr;\n this.patternTo = posTo.tlbr;\n }\n\n setConstantDashPositions(dashTo: DashEntry, dashFrom: DashEntry) {\n this.dashTo = [0, dashTo.y, dashTo.height, dashTo.width];\n this.dashFrom = [0, dashFrom.y, dashFrom.height, dashFrom.width];\n }\n\n setUniform(uniform: Uniform, globals: GlobalProperties, currentValue: PossiblyEvaluatedPropertyValue, uniformName: string) {\n let value = null;\n\n if (uniformName === 'u_pattern_to') {\n value = this.patternTo;\n } else if (uniformName === 'u_pattern_from') {\n value = this.patternFrom;\n } else if (uniformName === 'u_dasharray_to') {\n value = this.dashTo;\n } else if (uniformName === 'u_dasharray_from') {\n value = this.dashFrom;\n } else if (uniformName === 'u_pixel_ratio_to') {\n value = this.pixelRatioTo;\n } else if (uniformName === 'u_pixel_ratio_from') {\n value = this.pixelRatioFrom;\n }\n\n if (value !== null) {\n uniform.set(value);\n }\n }\n\n getBinding(context: Context, location: WebGLUniformLocation, name: string): Partial> {\n return (name.substr(0, 9) === 'u_pattern' || name.substr(0, 12) === 'u_dasharray_') ?\n new Uniform4f(context, location) :\n new Uniform1f(context, location);\n }\n}\n\nclass SourceExpressionBinder implements AttributeBinder {\n expression: SourceExpression;\n type: string;\n maxValue: number;\n\n paintVertexArray: StructArray;\n paintVertexAttributes: Array;\n paintVertexBuffer: VertexBuffer;\n\n constructor(expression: SourceExpression, names: Array, type: string, PaintVertexArray: {\n new (...args: any): StructArray;\n }) {\n this.expression = expression;\n this.type = type;\n this.maxValue = 0;\n this.paintVertexAttributes = names.map((name) => ({\n name: `a_${name}`,\n type: 'Float32',\n components: type === 'color' ? 2 : 1,\n offset: 0\n }));\n this.paintVertexArray = new PaintVertexArray();\n }\n\n populatePaintArray(newLength: number, feature: Feature, options: PaintOptions) {\n const start = this.paintVertexArray.length;\n const value = this.expression.evaluate(new EvaluationParameters(0, options), feature, {}, options.canonical, [], options.formattedSection);\n this.paintVertexArray.resize(newLength);\n this._setPaintValue(start, newLength, value);\n }\n\n updatePaintArray(start: number, end: number, feature: Feature, featureState: FeatureState, options: PaintOptions) {\n const value = this.expression.evaluate(new EvaluationParameters(0, options), feature, featureState);\n this._setPaintValue(start, end, value);\n }\n\n _setPaintValue(start, end, value) {\n if (this.type === 'color') {\n const color = packColor(value);\n for (let i = start; i < end; i++) {\n this.paintVertexArray.emplace(i, color[0], color[1]);\n }\n } else {\n for (let i = start; i < end; i++) {\n this.paintVertexArray.emplace(i, value);\n }\n this.maxValue = Math.max(this.maxValue, Math.abs(value));\n }\n }\n\n upload(context: Context) {\n if (this.paintVertexArray && this.paintVertexArray.arrayBuffer) {\n if (this.paintVertexBuffer && this.paintVertexBuffer.buffer) {\n this.paintVertexBuffer.updateData(this.paintVertexArray);\n } else {\n this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);\n }\n }\n }\n\n destroy() {\n if (this.paintVertexBuffer) {\n this.paintVertexBuffer.destroy();\n }\n }\n}\n\nclass CompositeExpressionBinder implements AttributeBinder, UniformBinder {\n expression: CompositeExpression;\n uniformNames: Array;\n type: string;\n useIntegerZoom: boolean;\n zoom: number;\n maxValue: number;\n\n paintVertexArray: StructArray;\n paintVertexAttributes: Array;\n paintVertexBuffer: VertexBuffer;\n\n constructor(expression: CompositeExpression, names: Array, type: string, useIntegerZoom: boolean, zoom: number, PaintVertexArray: {\n new (...args: any): StructArray;\n }) {\n this.expression = expression;\n this.uniformNames = names.map(name => `u_${name}_t`);\n this.type = type;\n this.useIntegerZoom = useIntegerZoom;\n this.zoom = zoom;\n this.maxValue = 0;\n this.paintVertexAttributes = names.map((name) => ({\n name: `a_${name}`,\n type: 'Float32',\n components: type === 'color' ? 4 : 2,\n offset: 0\n }));\n this.paintVertexArray = new PaintVertexArray();\n }\n\n populatePaintArray(newLength: number, feature: Feature, options: PaintOptions) {\n const min = this.expression.evaluate(new EvaluationParameters(this.zoom, options), feature, {}, options.canonical, [], options.formattedSection);\n const max = this.expression.evaluate(new EvaluationParameters(this.zoom + 1, options), feature, {}, options.canonical, [], options.formattedSection);\n const start = this.paintVertexArray.length;\n this.paintVertexArray.resize(newLength);\n this._setPaintValue(start, newLength, min, max);\n }\n\n updatePaintArray(start: number, end: number, feature: Feature, featureState: FeatureState, options: PaintOptions) {\n const min = this.expression.evaluate(new EvaluationParameters(this.zoom, options), feature, featureState);\n const max = this.expression.evaluate(new EvaluationParameters(this.zoom + 1, options), feature, featureState);\n this._setPaintValue(start, end, min, max);\n }\n\n _setPaintValue(start, end, min, max) {\n if (this.type === 'color') {\n const minColor = packColor(min);\n const maxColor = packColor(max);\n for (let i = start; i < end; i++) {\n this.paintVertexArray.emplace(i, minColor[0], minColor[1], maxColor[0], maxColor[1]);\n }\n } else {\n for (let i = start; i < end; i++) {\n this.paintVertexArray.emplace(i, min, max);\n }\n this.maxValue = Math.max(this.maxValue, Math.abs(min), Math.abs(max));\n }\n }\n\n upload(context: Context) {\n if (this.paintVertexArray && this.paintVertexArray.arrayBuffer) {\n if (this.paintVertexBuffer && this.paintVertexBuffer.buffer) {\n this.paintVertexBuffer.updateData(this.paintVertexArray);\n } else {\n this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);\n }\n }\n }\n\n destroy() {\n if (this.paintVertexBuffer) {\n this.paintVertexBuffer.destroy();\n }\n }\n\n setUniform(uniform: Uniform, globals: GlobalProperties): void {\n const currentZoom = this.useIntegerZoom ? Math.floor(globals.zoom) : globals.zoom;\n const factor = clamp(this.expression.interpolationFactor(currentZoom, this.zoom, this.zoom + 1), 0, 1);\n uniform.set(factor);\n }\n\n getBinding(context: Context, location: WebGLUniformLocation, _: string): Uniform1f {\n return new Uniform1f(context, location);\n }\n}\n\nabstract class CrossFadedBinder implements AttributeBinder {\n expression: CompositeExpression;\n type: string;\n useIntegerZoom: boolean;\n zoom: number;\n layerId: string;\n\n zoomInPaintVertexArray: StructArray;\n zoomOutPaintVertexArray: StructArray;\n zoomInPaintVertexBuffer: VertexBuffer;\n zoomOutPaintVertexBuffer: VertexBuffer;\n paintVertexAttributes: Array;\n\n constructor(expression: CompositeExpression, type: string, useIntegerZoom: boolean, zoom: number, PaintVertexArray: {\n new (...args: any): StructArray;\n }, layerId: string) {\n this.expression = expression;\n this.type = type;\n this.useIntegerZoom = useIntegerZoom;\n this.zoom = zoom;\n this.layerId = layerId;\n\n this.zoomInPaintVertexArray = new PaintVertexArray();\n this.zoomOutPaintVertexArray = new PaintVertexArray();\n }\n\n populatePaintArray(length: number, feature: Feature, options: PaintOptions) {\n const start = this.zoomInPaintVertexArray.length;\n this.zoomInPaintVertexArray.resize(length);\n this.zoomOutPaintVertexArray.resize(length);\n this._setPaintValues(start, length, this.getPositionIds(feature), options);\n }\n\n updatePaintArray(start: number, end: number, feature: Feature, featureState: FeatureState, options: PaintOptions) {\n this._setPaintValues(start, end, this.getPositionIds(feature), options);\n }\n\n abstract getVertexAttributes(): Array;\n\n protected abstract getPositionIds(feature: Feature): {min: string; mid: string; max: string};\n protected abstract getPositions(options: PaintOptions): {[_: string]: T};\n protected abstract emplace(array: StructArray, index: number, midPos: T, minMaxPos: T): void;\n\n protected _setPaintValues(start: number, end: number, positionIds: {min: string; mid: string; max: string}, options: PaintOptions) {\n const positions = this.getPositions(options);\n if (!positions || !positionIds) return;\n const min = positions[positionIds.min];\n const mid = positions[positionIds.mid];\n const max = positions[positionIds.max];\n if (!min || !mid || !max) return;\n\n // We populate two paint arrays because, for cross-faded properties, we don't know which direction\n // we're cross-fading to at layout time. In order to keep vertex attributes to a minimum and not pass\n // unnecessary vertex data to the shaders, we determine which to upload at draw time.\n for (let i = start; i < end; i++) {\n this.emplace(this.zoomInPaintVertexArray, i, mid, min);\n this.emplace(this.zoomOutPaintVertexArray, i, mid, max);\n }\n }\n\n upload(context: Context) {\n if (this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer) {\n const attributes = this.getVertexAttributes();\n this.zoomInPaintVertexBuffer = context.createVertexBuffer(this.zoomInPaintVertexArray, attributes, this.expression.isStateDependent);\n this.zoomOutPaintVertexBuffer = context.createVertexBuffer(this.zoomOutPaintVertexArray, attributes, this.expression.isStateDependent);\n }\n }\n\n destroy() {\n if (this.zoomOutPaintVertexBuffer) this.zoomOutPaintVertexBuffer.destroy();\n if (this.zoomInPaintVertexBuffer) this.zoomInPaintVertexBuffer.destroy();\n }\n}\n\nclass CrossFadedPatternBinder extends CrossFadedBinder {\n protected getPositions(options: PaintOptions): {[_: string]: ImagePosition} {\n return options.imagePositions;\n }\n\n protected getPositionIds(feature: Feature) {\n return feature.patterns && feature.patterns[this.layerId];\n }\n\n getVertexAttributes(): Array {\n return patternAttributes.members;\n }\n\n protected emplace(array: StructArray, index: number, midPos: ImagePosition, minMaxPos: ImagePosition): void {\n array.emplace(index,\n midPos.tlbr[0], midPos.tlbr[1], midPos.tlbr[2], midPos.tlbr[3],\n minMaxPos.tlbr[0], minMaxPos.tlbr[1], minMaxPos.tlbr[2], minMaxPos.tlbr[3],\n midPos.pixelRatio,\n minMaxPos.pixelRatio,\n );\n }\n}\n\nclass CrossFadedDasharrayBinder extends CrossFadedBinder {\n protected getPositions(options: PaintOptions): {[_: string]: DashEntry} {\n return options.dashPositions;\n }\n\n protected getPositionIds(feature: Feature) {\n return feature.dashes && feature.dashes[this.layerId];\n }\n\n getVertexAttributes(): Array {\n return dashAttributes.members;\n }\n\n protected emplace(array: StructArray, index: number, midPos: DashEntry, minMaxPos: DashEntry): void {\n array.emplace(index,\n 0, midPos.y, midPos.height, midPos.width,\n 0, minMaxPos.y, minMaxPos.height, minMaxPos.width,\n );\n }\n}\n\n/**\n * @internal\n * ProgramConfiguration contains the logic for binding style layer properties and tile\n * layer feature data into GL program uniforms and vertex attributes.\n *\n * Non-data-driven property values are bound to shader uniforms. Data-driven property\n * values are bound to vertex attributes. In order to support a uniform GLSL syntax over\n * both, [Mapbox GL Shaders](https://github.com/mapbox/mapbox-gl-shaders) defines a `#pragma`\n * abstraction, which ProgramConfiguration is responsible for implementing. At runtime,\n * it examines the attributes of a particular layer, combines this with fixed knowledge\n * about how layers of the particular type are implemented, and determines which uniforms\n * and vertex attributes will be required. It can then substitute the appropriate text\n * into the shader source code, create and link a program, and bind the uniforms and\n * vertex attributes in preparation for drawing.\n *\n * When a vector tile is parsed, this same configuration information is used to\n * populate the attribute buffers needed for data-driven styling using the zoom\n * level and feature property data.\n */\nexport class ProgramConfiguration {\n binders: {[_: string]: AttributeBinder | UniformBinder};\n cacheKey: string;\n\n _buffers: Array;\n\n constructor(layer: TypedStyleLayer, zoom: number, filterProperties: (_: string) => boolean) {\n this.binders = {};\n this._buffers = [];\n\n const keys = [];\n\n for (const property in layer.paint._values) {\n if (!filterProperties(property)) continue;\n const value = (layer.paint as any).get(property);\n if (!(value instanceof PossiblyEvaluatedPropertyValue) || !supportsPropertyExpression(value.property.specification)) {\n continue;\n }\n const names = paintAttributeNames(property, layer.type);\n const expression = value.value;\n const type = value.property.specification.type;\n const useIntegerZoom = (value.property as any).useIntegerZoom;\n const propType = value.property.specification['property-type'];\n const isCrossFaded = propType === 'cross-faded' || propType === 'cross-faded-data-driven';\n\n if (expression.kind === 'constant') {\n this.binders[property] = isCrossFaded ?\n new CrossFadedConstantBinder(expression.value, names) :\n new ConstantBinder(expression.value, names, type);\n keys.push(`/u_${property}`);\n\n } else if (expression.kind === 'source' || isCrossFaded) {\n const StructArrayLayout = layoutType(property, type, 'source');\n this.binders[property] = isCrossFaded ?\n property === 'line-dasharray' ?\n new CrossFadedDasharrayBinder(expression as CompositeExpression, type, useIntegerZoom, zoom, StructArrayLayout, layer.id) :\n new CrossFadedPatternBinder(expression as CompositeExpression, type, useIntegerZoom, zoom, StructArrayLayout, layer.id) :\n new SourceExpressionBinder(expression as SourceExpression, names, type, StructArrayLayout);\n keys.push(`/a_${property}`);\n\n } else {\n const StructArrayLayout = layoutType(property, type, 'composite');\n this.binders[property] = new CompositeExpressionBinder(expression, names, type, useIntegerZoom, zoom, StructArrayLayout);\n keys.push(`/z_${property}`);\n }\n }\n\n this.cacheKey = keys.sort().join('');\n }\n\n getMaxValue(property: string): number {\n const binder = this.binders[property];\n return binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder ? binder.maxValue : 0;\n }\n\n populatePaintArrays(newLength: number, feature: Feature, options: PaintOptions) {\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder || binder instanceof CrossFadedBinder)\n binder.populatePaintArray(newLength, feature, options);\n }\n }\n setConstantPatternPositions(posTo: ImagePosition, posFrom: ImagePosition) {\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof CrossFadedConstantBinder)\n binder.setConstantPatternPositions(posTo, posFrom);\n }\n }\n\n setConstantDashPositions(dashTo: DashEntry, dashFrom: DashEntry) {\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof CrossFadedConstantBinder)\n binder.setConstantDashPositions(dashTo, dashFrom);\n }\n }\n\n updatePaintArrays(\n featureStates: FeatureStates,\n featureMap: FeaturePositionMap,\n vtLayer: VectorTileLayerLike,\n layer: TypedStyleLayer,\n options: PaintOptions\n ): boolean {\n let dirty: boolean = false;\n for (const id in featureStates) {\n const positions = featureMap.getPositions(id);\n\n for (const pos of positions) {\n const feature = vtLayer.feature(pos.index);\n\n for (const property in this.binders) {\n const binder = this.binders[property];\n if ((binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder ||\n binder instanceof CrossFadedBinder) && binder.expression.isStateDependent === true) {\n //AHM: Remove after https://github.com/mapbox/mapbox-gl-js/issues/6255\n const value = (layer.paint as any).get(property);\n binder.expression = value.value;\n binder.updatePaintArray(pos.start, pos.end, feature, featureStates[id], options);\n dirty = true;\n }\n }\n }\n }\n return dirty;\n }\n\n defines(): Array {\n const result = [];\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof ConstantBinder || binder instanceof CrossFadedConstantBinder) {\n result.push(...binder.uniformNames.map(name => `#define HAS_UNIFORM_${name}`));\n }\n }\n return result;\n }\n\n getBinderAttributes(): Array {\n const result = [];\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder) {\n for (let i = 0; i < binder.paintVertexAttributes.length; i++) {\n result.push(binder.paintVertexAttributes[i].name);\n }\n } else if (binder instanceof CrossFadedBinder) {\n const attributes = binder.getVertexAttributes();\n for (const attribute of attributes) {\n result.push(attribute.name);\n }\n }\n }\n return result;\n }\n\n getBinderUniforms(): Array {\n const uniforms = [];\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof ConstantBinder || binder instanceof CrossFadedConstantBinder || binder instanceof CompositeExpressionBinder) {\n for (const uniformName of binder.uniformNames) {\n uniforms.push(uniformName);\n }\n }\n }\n return uniforms;\n }\n\n getPaintVertexBuffers(): Array {\n return this._buffers;\n }\n\n getUniforms(context: Context, locations: UniformLocations): Array {\n const uniforms = [];\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof ConstantBinder || binder instanceof CrossFadedConstantBinder || binder instanceof CompositeExpressionBinder) {\n for (const name of binder.uniformNames) {\n if (locations[name]) {\n const binding = binder.getBinding(context, locations[name], name);\n uniforms.push({name, property, binding});\n }\n }\n }\n }\n return uniforms;\n }\n\n setUniforms(\n context: Context,\n binderUniforms: Array,\n properties: any,\n globals: GlobalProperties\n ) {\n // Uniform state bindings are owned by the Program, but we set them\n // from within the ProgramConfiguration's binder members.\n for (const {name, property, binding} of binderUniforms) {\n (this.binders[property] as any).setUniform(binding, globals, properties.get(property), name);\n }\n }\n\n updatePaintBuffers(crossfade?: CrossfadeParameters) {\n this._buffers = [];\n\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (crossfade && binder instanceof CrossFadedBinder) {\n const patternVertexBuffer = crossfade.fromScale === 2 ? binder.zoomInPaintVertexBuffer : binder.zoomOutPaintVertexBuffer;\n if (patternVertexBuffer) this._buffers.push(patternVertexBuffer);\n\n } else if ((binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder) && binder.paintVertexBuffer) {\n this._buffers.push(binder.paintVertexBuffer);\n }\n }\n }\n\n upload(context: Context) {\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder || binder instanceof CrossFadedBinder)\n binder.upload(context);\n }\n this.updatePaintBuffers();\n }\n\n destroy() {\n for (const property in this.binders) {\n const binder = this.binders[property];\n if (binder instanceof SourceExpressionBinder || binder instanceof CompositeExpressionBinder || binder instanceof CrossFadedBinder)\n binder.destroy();\n }\n }\n}\n\nexport class ProgramConfigurationSet {\n programConfigurations: {[_: string]: ProgramConfiguration};\n needsUpload: boolean;\n _featureMap: FeaturePositionMap;\n _bufferOffset: number;\n\n constructor(layers: ReadonlyArray, zoom: number, filterProperties: (_: string) => boolean = () => true) {\n this.programConfigurations = {};\n for (const layer of layers) {\n this.programConfigurations[layer.id] = new ProgramConfiguration(layer, zoom, filterProperties);\n }\n this.needsUpload = false;\n this._featureMap = new FeaturePositionMap();\n this._bufferOffset = 0;\n }\n\n populatePaintArrays(length: number, feature: Feature, index: number, options: PaintOptions) {\n for (const key in this.programConfigurations) {\n this.programConfigurations[key].populatePaintArrays(length, feature, options);\n }\n\n if (feature.id !== undefined) {\n this._featureMap.add(feature.id, index, this._bufferOffset, length);\n }\n this._bufferOffset = length;\n\n this.needsUpload = true;\n }\n\n updatePaintArrays(featureStates: FeatureStates, vtLayer: VectorTileLayerLike, layers: ReadonlyArray, options: PaintOptions) {\n for (const layer of layers) {\n this.needsUpload = this.programConfigurations[layer.id].updatePaintArrays(featureStates, this._featureMap, vtLayer, layer, options) || this.needsUpload;\n }\n }\n\n get(layerId: string) {\n return this.programConfigurations[layerId];\n }\n\n upload(context: Context) {\n if (!this.needsUpload) return;\n for (const layerId in this.programConfigurations) {\n this.programConfigurations[layerId].upload(context);\n }\n this.needsUpload = false;\n }\n\n destroy() {\n for (const layerId in this.programConfigurations) {\n this.programConfigurations[layerId].destroy();\n }\n }\n}\n\nfunction paintAttributeNames(property: string, type: string) {\n const attributeNameExceptions = {\n 'text-opacity': ['opacity'],\n 'icon-opacity': ['opacity'],\n 'text-color': ['fill_color'],\n 'icon-color': ['fill_color'],\n 'text-halo-color': ['halo_color'],\n 'icon-halo-color': ['halo_color'],\n 'text-halo-blur': ['halo_blur'],\n 'icon-halo-blur': ['halo_blur'],\n 'text-halo-width': ['halo_width'],\n 'icon-halo-width': ['halo_width'],\n 'line-gap-width': ['gapwidth'],\n 'line-dasharray': ['dasharray_to', 'dasharray_from'],\n 'line-pattern': ['pattern_to', 'pattern_from', 'pixel_ratio_to', 'pixel_ratio_from'],\n 'fill-pattern': ['pattern_to', 'pattern_from', 'pixel_ratio_to', 'pixel_ratio_from'],\n 'fill-extrusion-pattern': ['pattern_to', 'pattern_from', 'pixel_ratio_to', 'pixel_ratio_from'],\n };\n\n return attributeNameExceptions[property] || [property.replace(`${type}-`, '').replace(/-/g, '_')];\n}\n\nfunction getLayoutException(property: string) {\n const propertyExceptions = {\n 'line-pattern': {\n 'source': PatternLayoutArray,\n 'composite': PatternLayoutArray\n },\n 'fill-pattern': {\n 'source': PatternLayoutArray,\n 'composite': PatternLayoutArray\n },\n 'fill-extrusion-pattern': {\n 'source': PatternLayoutArray,\n 'composite': PatternLayoutArray\n },\n 'line-dasharray': {\n 'source': DashLayoutArray,\n 'composite': DashLayoutArray\n },\n };\n\n return propertyExceptions[property];\n}\n\nfunction layoutType(property: string, type: string, binderType: string) {\n const defaultLayouts = {\n 'color': {\n 'source': StructArrayLayout2f8,\n 'composite': StructArrayLayout4f16\n },\n 'number': {\n 'source': StructArrayLayout1f4,\n 'composite': StructArrayLayout2f8\n }\n };\n\n const layoutException = getLayoutException(property);\n return layoutException && layoutException[binderType] || defaultLayouts[type][binderType];\n}\n\nregister('ConstantBinder', ConstantBinder);\nregister('CrossFadedConstantBinder', CrossFadedConstantBinder);\nregister('SourceExpressionBinder', SourceExpressionBinder);\nregister('CrossFadedPatternBinder', CrossFadedPatternBinder);\nregister('CrossFadedDasharrayBinder', CrossFadedDasharrayBinder);\nregister('CompositeExpressionBinder', CompositeExpressionBinder);\nregister('ProgramConfiguration', ProgramConfiguration, {omit: ['_buffers']});\nregister('ProgramConfigurationSet', ProgramConfigurationSet);\n","import {warnOnce, clamp} from '../util/util';\n\nimport {EXTENT} from './extent';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {VectorTileFeatureLike} from '@maplibre/vt-pbf';\n\n// These bounds define the minimum and maximum supported coordinate values.\n// While visible coordinates are within [0, EXTENT], tiles may theoretically\n// contain coordinates within [-Infinity, Infinity]. Our range is limited by the\n// number of bits used to represent the coordinate.\nconst BITS = 15;\nconst MAX = Math.pow(2, BITS - 1) - 1;\nconst MIN = -MAX - 1;\n\n/**\n * Loads a geometry from a VectorTileFeatureLike and scales it to the common extent\n * used internally.\n * @param feature - the vector tile feature to load\n */\nexport function loadGeometry(feature: VectorTileFeatureLike): Array> {\n const scale = EXTENT / feature.extent;\n const geometry = feature.loadGeometry();\n for (let r = 0; r < geometry.length; r++) {\n const ring = geometry[r];\n for (let p = 0; p < ring.length; p++) {\n const point = ring[p];\n // round here because mapbox-gl-native uses integers to represent\n // points and we need to do the same to avoid rendering differences.\n const x = Math.round(point.x * scale);\n const y = Math.round(point.y * scale);\n\n point.x = clamp(x, MIN, MAX);\n point.y = clamp(y, MIN, MAX);\n\n if (x < point.x || x > point.x + 1 || y < point.y || y > point.y + 1) {\n // warn when exceeding allowed extent except for the 1-px-off case\n // https://github.com/mapbox/mapbox-gl-js/issues/8992\n warnOnce('Geometry exceeds allowed extent, reduce your vector tile buffer size');\n }\n }\n }\n return geometry;\n}\n","import {loadGeometry} from './load_geometry';\nimport type Point from '@mapbox/point-geometry';\nimport type {Feature} from '@maplibre/maplibre-gl-style-spec';\nimport type {VectorTileFeatureLike} from '@maplibre/vt-pbf';\n\ntype EvaluationFeature = Feature & { geometry: Array> };\n/**\n * Construct a new feature based on a VectorTileFeatureLike for expression evaluation, the geometry of which\n * will be loaded based on necessity.\n * @param feature - the feature to evaluate\n * @param needGeometry - if set to true this will load the geometry\n */\nexport function toEvaluationFeature(feature: VectorTileFeatureLike, needGeometry: boolean): EvaluationFeature {\n return {type: feature.type,\n id: feature.id,\n properties: feature.properties,\n geometry: needGeometry ? loadGeometry(feature) : []};\n}\n","import {CircleLayoutArray} from '../array_types.g';\n\nimport {members as layoutAttributes} from './circle_attributes';\nimport {SegmentVector} from '../segment';\nimport {ProgramConfigurationSet} from '../program_configuration';\nimport {TriangleIndexArray} from '../index_array_type';\nimport {loadGeometry} from '../load_geometry';\nimport {toEvaluationFeature} from '../evaluation_feature';\nimport {EXTENT} from '../extent';\nimport {register} from '../../util/web_worker_transfer';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\n\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport type {\n Bucket,\n BucketParameters,\n BucketFeature,\n IndexedFeature,\n PopulateParameters\n} from '../bucket';\nimport type {CircleStyleLayer} from '../../style/style_layer/circle_style_layer';\nimport type {HeatmapStyleLayer} from '../../style/style_layer/heatmap_style_layer';\nimport type {Context} from '../../gl/context';\nimport type {IndexBuffer} from '../../gl/index_buffer';\nimport type {VertexBuffer} from '../../gl/vertex_buffer';\nimport type Point from '@mapbox/point-geometry';\nimport type {FeatureStates} from '../../source/source_state';\nimport type {ImagePosition} from '../../render/image_atlas';\nimport {type CircleGranularity} from '../../render/subdivision_granularity_settings';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nconst VERTEX_MIN_VALUE = -32768; // -(2^15)\n\n// Extrude is in range 0..7, which will be mapped to -1..1 in the shader.\nfunction addCircleVertex(layoutVertexArray, x, y, extrudeX, extrudeY) {\n // We pack circle position and extrude into range 0..65535, but vertices are stored as *signed* 16-bit integers, so we need to offset the number by 2^15.\n layoutVertexArray.emplaceBack(\n VERTEX_MIN_VALUE + (x * 8) + extrudeX,\n VERTEX_MIN_VALUE + (y * 8) + extrudeY);\n}\n\n/**\n * @internal\n * Circles are represented by two triangles.\n *\n * Each corner has a pos that is the center of the circle and an extrusion\n * vector that is where it points.\n */\nexport class CircleBucket implements Bucket {\n index: number;\n zoom: number;\n overscaling: number;\n layerIds: Array;\n layers: Array;\n stateDependentLayers: Array;\n stateDependentLayerIds: Array;\n\n layoutVertexArray: CircleLayoutArray;\n layoutVertexBuffer: VertexBuffer;\n\n indexArray: TriangleIndexArray;\n indexBuffer: IndexBuffer;\n\n hasDependencies: boolean;\n programConfigurations: ProgramConfigurationSet;\n segments: SegmentVector;\n uploaded: boolean;\n\n constructor(options: BucketParameters) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.hasDependencies = false;\n\n this.layoutVertexArray = new CircleLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.segments = new SegmentVector();\n this.programConfigurations = new ProgramConfigurationSet(options.layers, options.zoom);\n this.stateDependentLayerIds = this.layers.filter((l) => l.isStateDependent()).map((l) => l.id);\n }\n\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID) {\n const styleLayer = this.layers[0];\n const bucketFeatures: BucketFeature[] = [];\n let circleSortKey = null;\n let sortFeaturesByKey = false;\n\n // Heatmap circles are usually large (and map-pitch-aligned), tessellate them to allow curvature along the globe.\n let subdivide = styleLayer.type === 'heatmap';\n\n // Heatmap layers are handled in this bucket and have no evaluated properties, so we check our access\n if (styleLayer.type === 'circle') {\n const circleStyle = (styleLayer as CircleStyleLayer);\n circleSortKey = circleStyle.layout.get('circle-sort-key');\n sortFeaturesByKey = !circleSortKey.isConstant();\n\n // Circles that are \"printed\" onto the map surface should be tessellated to follow the globe's curvature.\n subdivide = subdivide || circleStyle.paint.get('circle-pitch-alignment') === 'map';\n }\n\n const granularity = subdivide ? options.subdivisionGranularity.circle : 1;\n\n for (const {feature, id, index, sourceLayerIndex} of features) {\n const needGeometry = this.layers[0]._featureFilter.needGeometry;\n const evaluationFeature = toEvaluationFeature(feature, needGeometry);\n\n if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;\n\n const sortKey = sortFeaturesByKey ?\n circleSortKey.evaluate(evaluationFeature, {}, canonical) :\n undefined;\n\n const bucketFeature: BucketFeature = {\n id,\n properties: feature.properties,\n type: feature.type,\n sourceLayerIndex,\n index,\n geometry: needGeometry ? evaluationFeature.geometry : loadGeometry(feature),\n patterns: {},\n sortKey\n };\n\n bucketFeatures.push(bucketFeature);\n\n }\n\n if (sortFeaturesByKey) {\n bucketFeatures.sort((a, b) => a.sortKey - b.sortKey);\n }\n\n for (const bucketFeature of bucketFeatures) {\n const {geometry, index, sourceLayerIndex} = bucketFeature;\n const feature = features[index].feature;\n\n this.addFeature(bucketFeature, geometry, index, canonical, granularity);\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {[_: string]: ImagePosition}) {\n if (!this.stateDependentLayers.length) return;\n this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers, {\n imagePositions\n });\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n\n upload(context: Context) {\n if (!this.uploaded) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n }\n this.programConfigurations.upload(context);\n this.uploaded = true;\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n }\n\n addFeature(feature: BucketFeature, geometry: Array>, index: number, canonical: CanonicalTileID, granularity: CircleGranularity = 1) {\n // Since we store the circle's center in each vertex, we only have 3 bits for actual vertex position in each axis.\n // Thus the valid range of positions is 0..7.\n // This gives us 4 possible granularity settings that are symmetrical.\n\n // This array stores vertex positions that should by used by the tessellated quad.\n let extrudes: Array;\n\n switch (granularity) {\n case 1:\n extrudes = [0, 7];\n break;\n case 3:\n extrudes = [0, 2, 5, 7];\n break;\n case 5:\n extrudes = [0, 1, 3, 4, 6, 7];\n break;\n case 7:\n extrudes = [0, 1, 2, 3, 4, 5, 6, 7];\n break;\n default:\n throw new Error(`Invalid circle bucket granularity: ${granularity}; valid values are 1, 3, 5, 7.`);\n }\n\n const verticesPerAxis = extrudes.length;\n\n for (const ring of geometry) {\n for (const point of ring) {\n const vx = point.x;\n const vy = point.y;\n\n // Do not include points that are outside the tile boundaries.\n if (vx < 0 || vx >= EXTENT || vy < 0 || vy >= EXTENT) {\n continue;\n }\n\n const segment = this.segments.prepareSegment(verticesPerAxis * verticesPerAxis, this.layoutVertexArray, this.indexArray, feature.sortKey);\n const index = segment.vertexLength;\n\n for (let y = 0; y < verticesPerAxis; y++) {\n for (let x = 0; x < verticesPerAxis; x++) {\n addCircleVertex(this.layoutVertexArray, vx, vy, extrudes[x], extrudes[y]);\n }\n }\n\n for (let y = 0; y < verticesPerAxis - 1; y++) {\n for (let x = 0; x < verticesPerAxis - 1; x++) {\n const lowerIndex = index + y * verticesPerAxis + x;\n const upperIndex = index + (y + 1) * verticesPerAxis + x;\n this.indexArray.emplaceBack(lowerIndex, upperIndex + 1, lowerIndex + 1);\n this.indexArray.emplaceBack(lowerIndex, upperIndex, upperIndex + 1);\n }\n }\n\n segment.vertexLength += verticesPerAxis * verticesPerAxis;\n segment.primitiveLength += (verticesPerAxis - 1) * (verticesPerAxis - 1) * 2;\n }\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, {imagePositions: {}, canonical});\n }\n}\n\nregister('CircleBucket', CircleBucket, {omit: ['layers']});\n","import {isCounterClockwise} from './util';\n\nimport Point from '@mapbox/point-geometry';\n\nexport {polygonIntersectsBufferedPoint, polygonIntersectsMultiPolygon, polygonIntersectsBufferedMultiLine, polygonIntersectsPolygon, distToSegmentSquared, polygonIntersectsBox};\n\ntype Line = Array;\ntype MultiLine = Array;\ntype Ring = Array;\ntype Polygon = Array;\ntype MultiPolygon = Array;\n\nfunction polygonIntersectsPolygon(polygonA: Polygon, polygonB: Polygon) {\n for (let i = 0; i < polygonA.length; i++) {\n if (polygonContainsPoint(polygonB, polygonA[i])) return true;\n }\n\n for (let i = 0; i < polygonB.length; i++) {\n if (polygonContainsPoint(polygonA, polygonB[i])) return true;\n }\n\n if (lineIntersectsLine(polygonA, polygonB)) return true;\n\n return false;\n}\n\nfunction polygonIntersectsBufferedPoint(polygon: Polygon, point: Point, radius: number) {\n if (polygonContainsPoint(polygon, point)) return true;\n if (pointIntersectsBufferedLine(point, polygon, radius)) return true;\n return false;\n}\n\nfunction polygonIntersectsMultiPolygon(polygon: Polygon, multiPolygon: MultiPolygon) {\n\n if (polygon.length === 1) {\n return multiPolygonContainsPoint(multiPolygon, polygon[0]);\n }\n\n for (let m = 0; m < multiPolygon.length; m++) {\n const ring = multiPolygon[m];\n for (let n = 0; n < ring.length; n++) {\n if (polygonContainsPoint(polygon, ring[n])) return true;\n }\n }\n\n for (let i = 0; i < polygon.length; i++) {\n if (multiPolygonContainsPoint(multiPolygon, polygon[i])) return true;\n }\n\n for (let k = 0; k < multiPolygon.length; k++) {\n if (lineIntersectsLine(polygon, multiPolygon[k])) return true;\n }\n\n return false;\n}\n\nfunction polygonIntersectsBufferedMultiLine(polygon: Polygon, multiLine: MultiLine, radius: number) {\n for (let i = 0; i < multiLine.length; i++) {\n const line = multiLine[i];\n\n if (polygon.length >= 3) {\n for (let k = 0; k < line.length; k++) {\n if (polygonContainsPoint(polygon, line[k])) return true;\n }\n }\n\n if (lineIntersectsBufferedLine(polygon, line, radius)) return true;\n }\n return false;\n}\n\nfunction lineIntersectsBufferedLine(lineA: Line, lineB: Line, radius: number) {\n\n if (lineA.length > 1) {\n if (lineIntersectsLine(lineA, lineB)) return true;\n\n // Check whether any point in either line is within radius of the other line\n for (let j = 0; j < lineB.length; j++) {\n if (pointIntersectsBufferedLine(lineB[j], lineA, radius)) return true;\n }\n }\n\n for (let k = 0; k < lineA.length; k++) {\n if (pointIntersectsBufferedLine(lineA[k], lineB, radius)) return true;\n }\n\n return false;\n}\n\nfunction lineIntersectsLine(lineA: Line, lineB: Line) {\n if (lineA.length === 0 || lineB.length === 0) return false;\n for (let i = 0; i < lineA.length - 1; i++) {\n const a0 = lineA[i];\n const a1 = lineA[i + 1];\n for (let j = 0; j < lineB.length - 1; j++) {\n const b0 = lineB[j];\n const b1 = lineB[j + 1];\n if (lineSegmentIntersectsLineSegment(a0, a1, b0, b1)) return true;\n }\n }\n return false;\n}\n\nfunction lineSegmentIntersectsLineSegment(a0: Point, a1: Point, b0: Point, b1: Point) {\n return isCounterClockwise(a0, b0, b1) !== isCounterClockwise(a1, b0, b1) &&\n isCounterClockwise(a0, a1, b0) !== isCounterClockwise(a0, a1, b1);\n}\n\nfunction pointIntersectsBufferedLine(p: Point, line: Line, radius: number) {\n const radiusSquared = radius * radius;\n\n if (line.length === 1) return p.distSqr(line[0]) < radiusSquared;\n\n for (let i = 1; i < line.length; i++) {\n // Find line segments that have a distance <= radius^2 to p\n // In that case, we treat the line as \"containing point p\".\n const v = line[i - 1], w = line[i];\n if (distToSegmentSquared(p, v, w) < radiusSquared) return true;\n }\n return false;\n}\n\n// Code from https://stackoverflow.com/a/1501725/331379.\nfunction distToSegmentSquared(p: Point, v: Point, w: Point) {\n const l2 = v.distSqr(w);\n if (l2 === 0) return p.distSqr(v);\n const t = ((p.x - v.x) * (w.x - v.x) + (p.y - v.y) * (w.y - v.y)) / l2;\n if (t < 0) return p.distSqr(v);\n if (t > 1) return p.distSqr(w);\n return p.distSqr(w.sub(v)._mult(t)._add(v));\n}\n\n// point in polygon ray casting algorithm\nfunction multiPolygonContainsPoint(rings: Array, p: Point) {\n let c = false,\n ring, p1, p2;\n\n for (let k = 0; k < rings.length; k++) {\n ring = rings[k];\n for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n c = !c;\n }\n }\n }\n return c;\n}\n\nfunction polygonContainsPoint(ring: Ring, p: Point) {\n let c = false;\n for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n const p1 = ring[i];\n const p2 = ring[j];\n if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n c = !c;\n }\n }\n return c;\n}\n\nfunction polygonIntersectsBox(ring: Ring, boxX1: number, boxY1: number, boxX2: number, boxY2: number) {\n for (const p of ring) {\n if (boxX1 <= p.x &&\n boxY1 <= p.y &&\n boxX2 >= p.x &&\n boxY2 >= p.y) return true;\n }\n\n const corners = [\n new Point(boxX1, boxY1),\n new Point(boxX1, boxY2),\n new Point(boxX2, boxY2),\n new Point(boxX2, boxY1)];\n\n if (ring.length > 2) {\n for (const corner of corners) {\n if (polygonContainsPoint(ring, corner)) return true;\n }\n }\n\n for (let i = 0; i < ring.length - 1; i++) {\n const p1 = ring[i];\n const p2 = ring[i + 1];\n if (edgeIntersectsBox(p1, p2, corners)) return true;\n }\n\n return false;\n}\n\nfunction edgeIntersectsBox(e1: Point, e2: Point, corners: Array) {\n const tl = corners[0];\n const br = corners[2];\n // the edge and box do not intersect in either the x or y dimensions\n if (((e1.x < tl.x) && (e2.x < tl.x)) ||\n ((e1.x > br.x) && (e2.x > br.x)) ||\n ((e1.y < tl.y) && (e2.y < tl.y)) ||\n ((e1.y > br.y) && (e2.y > br.y))) return false;\n\n // check if all corners of the box are on the same side of the edge\n const dir = isCounterClockwise(e1, e2, corners[0]);\n return dir !== isCounterClockwise(e1, e2, corners[1]) ||\n dir !== isCounterClockwise(e1, e2, corners[2]) ||\n dir !== isCounterClockwise(e1, e2, corners[3]);\n}\n","import Point from '@mapbox/point-geometry';\n\nimport type {PossiblyEvaluatedPropertyValue} from './properties';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {CircleBucket} from '../data/bucket/circle_bucket';\nimport type {LineBucket} from '../data/bucket/line_bucket';\nimport {polygonIntersectsBufferedPoint} from '../util/intersection_tests';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {UnwrappedTileID} from '../tile/tile_id';\n\nexport function getMaximumPaintValue(\n property: string,\n layer: StyleLayer,\n bucket: CircleBucket | LineBucket\n): number {\n const value = ((layer.paint as any).get(property) as PossiblyEvaluatedPropertyValue).value;\n if (value.kind === 'constant') {\n return value.value;\n } else {\n return bucket.programConfigurations.get(layer.id).getMaxValue(property);\n }\n}\n\nexport function translateDistance(translate: [number, number]) {\n return Math.sqrt(translate[0] * translate[0] + translate[1] * translate[1]);\n}\n\n/**\n * @internal\n * Translates a geometry by a certain pixels in tile coordinates\n * @param queryGeometry - The geometry to translate in tile coordinates\n * @param translate - The translation in pixels\n * @param translateAnchor - The anchor of the translation\n * @param bearing - The bearing of the map\n * @param pixelsToTileUnits - The scale factor from pixels to tile units\n * @returns the translated geometry in tile coordinates\n */\nexport function translate(queryGeometry: Array,\n translate: [number, number],\n translateAnchor: 'viewport' | 'map',\n bearing: number,\n pixelsToTileUnits: number): Point[] {\n if (!translate[0] && !translate[1]) {\n return queryGeometry;\n }\n const pt = Point.convert(translate)._mult(pixelsToTileUnits);\n\n if (translateAnchor === 'viewport') {\n pt._rotate(-bearing);\n }\n\n const translated: Point[] = [];\n for (let i = 0; i < queryGeometry.length; i++) {\n const point = queryGeometry[i];\n translated.push(point.sub(pt));\n }\n return translated;\n}\n\n/**\n * Filter out consecutive duplicate points from a line\n */\nfunction _stripDuplicates(ring: Array): Array {\n const filteredRing: Array = [];\n for (let index = 0; index < ring.length; index++) {\n const point = ring[index];\n const prevPoint = filteredRing.at(-1);\n if (index === 0 || (prevPoint && !(point.equals(prevPoint)))) {\n filteredRing.push(point);\n }\n }\n return filteredRing;\n}\n\nexport function offsetLine(rings: Array>, offset: number) {\n const newRings: Array> = [];\n for (let ringIndex = 0; ringIndex < rings.length; ringIndex++) {\n const ring = _stripDuplicates(rings[ringIndex]);\n const newRing: Array = [];\n for (let index = 0; index < ring.length; index++) {\n const point = ring[index];\n const prevPoint = ring[index - 1];\n const nextPoint = ring[index + 1];\n // perpendicular unit vectors (outward unit normal vector):\n // these indicate which direction the segments should be offset in\n const unitNormalAB: Point = index === 0 ? new Point(0, 0) : point.sub(prevPoint)._unit()._perp();\n const unitNormalBC: Point = index === ring.length - 1 ? new Point(0, 0) : nextPoint.sub(point)._unit()._perp();\n // unit bisector direction\n const bisectorDir = unitNormalAB._add(unitNormalBC)._unit();\n const cosHalfAngle = bisectorDir.x * unitNormalBC.x + bisectorDir.y * unitNormalBC.y;\n if (cosHalfAngle !== 0) {\n bisectorDir._mult(1 / cosHalfAngle);\n }\n newRing.push(bisectorDir._mult(offset)._add(point));\n }\n newRings.push(newRing);\n }\n return newRings;\n}\n\ntype CircleIntersectionTestParams = {\n queryGeometry: Array;\n size: number;\n transform: IReadonlyTransform;\n unwrappedTileID: UnwrappedTileID;\n getElevation: undefined | ((x: number, y: number) => number);\n pitchAlignment?: 'map' | 'viewport';\n pitchScale?: 'map' | 'viewport';\n};\n\nfunction intersectionTestMapMap({queryGeometry, size}: CircleIntersectionTestParams, point: Point): boolean {\n return polygonIntersectsBufferedPoint(queryGeometry, point, size);\n}\n\nfunction intersectionTestMapViewport({queryGeometry, size, transform, unwrappedTileID, getElevation}: CircleIntersectionTestParams, point: Point): boolean {\n const w = transform.projectTileCoordinates(point.x, point.y, unwrappedTileID, getElevation).signedDistanceFromCamera;\n const adjustedSize = size * (w / transform.cameraToCenterDistance);\n return polygonIntersectsBufferedPoint(queryGeometry, point, adjustedSize);\n}\n\nfunction intersectionTestViewportMap({queryGeometry, size, transform, unwrappedTileID, getElevation}: CircleIntersectionTestParams, point: Point): boolean {\n const w = transform.projectTileCoordinates(point.x, point.y, unwrappedTileID, getElevation).signedDistanceFromCamera;\n const adjustedSize = size * (transform.cameraToCenterDistance / w);\n return polygonIntersectsBufferedPoint(queryGeometry, projectPoint(point, transform, unwrappedTileID, getElevation), adjustedSize);\n}\n\nfunction intersectionTestViewportViewport({queryGeometry, size, transform, unwrappedTileID, getElevation}: CircleIntersectionTestParams, point: Point): boolean {\n return polygonIntersectsBufferedPoint(queryGeometry, projectPoint(point, transform, unwrappedTileID, getElevation), size);\n}\n\nexport function circleIntersection({\n queryGeometry,\n size,\n transform,\n unwrappedTileID,\n getElevation,\n pitchAlignment = 'map',\n pitchScale = 'map'\n}: CircleIntersectionTestParams, geometry): boolean {\n const intersectionTest = pitchAlignment === 'map'\n ? (pitchScale === 'map' ? intersectionTestMapMap : intersectionTestMapViewport)\n : (pitchScale === 'map' ? intersectionTestViewportMap : intersectionTestViewportViewport);\n\n const param = {queryGeometry, size, transform, unwrappedTileID, getElevation} as CircleIntersectionTestParams;\n for (const ring of geometry) {\n for (const point of ring) {\n if (intersectionTest(param, point)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction projectPoint(tilePoint: Point, transform: IReadonlyTransform, unwrappedTileID: UnwrappedTileID, getElevation: undefined | ((x: number, y: number) => number)): Point {\n // Convert `tilePoint` from tile coordinates to clip coordinates.\n const clipPoint = transform.projectTileCoordinates(tilePoint.x, tilePoint.y, unwrappedTileID, getElevation).point;\n // Convert `clipPoint` from clip coordinates into pixel/screen coordinates.\n const pixelPoint = new Point(\n (clipPoint.x * 0.5 + 0.5) * transform.width,\n (-clipPoint.y * 0.5 + 0.5) * transform.height\n );\n return pixelPoint;\n}\n\nexport function projectQueryGeometry(queryGeometry: Array, transform: IReadonlyTransform, unwrappedTileID: UnwrappedTileID, getElevation: undefined | ((x: number, y: number) => number)) {\n return queryGeometry.map((p) => {\n return projectPoint(p, transform, unwrappedTileID, getElevation);\n });\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type CircleLayoutProps = {\n \"circle-sort-key\": DataDrivenProperty,\n};\n\nexport type CircleLayoutPropsPossiblyEvaluated = {\n \"circle-sort-key\": PossiblyEvaluatedPropertyValue,\n};\n\nlet layout: Properties;\nconst getLayout = () => layout = layout || new Properties({\n \"circle-sort-key\": new DataDrivenProperty(styleSpec[\"layout_circle\"][\"circle-sort-key\"] as any as StylePropertySpecification),\n});\n\nexport type CirclePaintProps = {\n \"circle-radius\": DataDrivenProperty,\n \"circle-color\": DataDrivenProperty,\n \"circle-blur\": DataDrivenProperty,\n \"circle-opacity\": DataDrivenProperty,\n \"circle-translate\": DataConstantProperty<[number, number]>,\n \"circle-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"circle-pitch-scale\": DataConstantProperty<\"map\" | \"viewport\">,\n \"circle-pitch-alignment\": DataConstantProperty<\"map\" | \"viewport\">,\n \"circle-stroke-width\": DataDrivenProperty,\n \"circle-stroke-color\": DataDrivenProperty,\n \"circle-stroke-opacity\": DataDrivenProperty,\n};\n\nexport type CirclePaintPropsPossiblyEvaluated = {\n \"circle-radius\": PossiblyEvaluatedPropertyValue,\n \"circle-color\": PossiblyEvaluatedPropertyValue,\n \"circle-blur\": PossiblyEvaluatedPropertyValue,\n \"circle-opacity\": PossiblyEvaluatedPropertyValue,\n \"circle-translate\": [number, number],\n \"circle-translate-anchor\": \"map\" | \"viewport\",\n \"circle-pitch-scale\": \"map\" | \"viewport\",\n \"circle-pitch-alignment\": \"map\" | \"viewport\",\n \"circle-stroke-width\": PossiblyEvaluatedPropertyValue,\n \"circle-stroke-color\": PossiblyEvaluatedPropertyValue,\n \"circle-stroke-opacity\": PossiblyEvaluatedPropertyValue,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"circle-radius\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-radius\"] as any as StylePropertySpecification),\n \"circle-color\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-color\"] as any as StylePropertySpecification),\n \"circle-blur\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-blur\"] as any as StylePropertySpecification),\n \"circle-opacity\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-opacity\"] as any as StylePropertySpecification),\n \"circle-translate\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-translate\"] as any as StylePropertySpecification),\n \"circle-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-translate-anchor\"] as any as StylePropertySpecification),\n \"circle-pitch-scale\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-pitch-scale\"] as any as StylePropertySpecification),\n \"circle-pitch-alignment\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-pitch-alignment\"] as any as StylePropertySpecification),\n \"circle-stroke-width\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-width\"] as any as StylePropertySpecification),\n \"circle-stroke-color\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-color\"] as any as StylePropertySpecification),\n \"circle-stroke-opacity\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-opacity\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() }, get layout() { return getLayout() } });","import type Point from '@mapbox/point-geometry';\nimport {StyleLayer, type QueryIntersectsFeatureParams} from '../style_layer';\n\nimport {CircleBucket} from '../../data/bucket/circle_bucket';\nimport {circleIntersection, getMaximumPaintValue, projectQueryGeometry, translateDistance, translate} from '../query_utils';\nimport properties, {type CircleLayoutPropsPossiblyEvaluated, type CirclePaintPropsPossiblyEvaluated} from './circle_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type Layout, type PossiblyEvaluated} from '../properties';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {Bucket, BucketParameters} from '../../data/bucket';\nimport type {CircleLayoutProps, CirclePaintProps} from './circle_style_layer_properties.g';\n\nexport const isCircleStyleLayer = (layer: StyleLayer): layer is CircleStyleLayer => layer.type === 'circle';\n\n/**\n * A style layer that defines a circle\n */\nexport class CircleStyleLayer extends StyleLayer {\n _unevaluatedLayout: Layout;\n layout: PossiblyEvaluated;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n\n createBucket(parameters: BucketParameters) {\n return new CircleBucket(parameters);\n }\n\n queryRadius(bucket: Bucket): number {\n const circleBucket: CircleBucket = (bucket as any);\n return getMaximumPaintValue('circle-radius', this, circleBucket) +\n getMaximumPaintValue('circle-stroke-width', this, circleBucket) +\n translateDistance(this.paint.get('circle-translate'));\n }\n\n queryIntersectsFeature({\n queryGeometry,\n feature,\n featureState,\n geometry,\n transform,\n pixelsToTileUnits,\n unwrappedTileID,\n getElevation}: QueryIntersectsFeatureParams\n ): boolean {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('circle-translate'),\n this.paint.get('circle-translate-anchor'),\n -transform.bearingInRadians, pixelsToTileUnits);\n const radius = this.paint.get('circle-radius').evaluate(feature, featureState);\n const stroke = this.paint.get('circle-stroke-width').evaluate(feature, featureState);\n const size = radius + stroke;\n\n // For pitch-alignment: map, compare feature geometry to query geometry in the plane of the tile\n // Otherwise, compare geometry in the plane of the viewport\n // A circle with fixed scaling relative to the viewport gets larger in tile space as it moves into the distance\n // A circle with fixed scaling relative to the map gets smaller in viewport space as it moves into the distance\n\n const pitchScale = this.paint.get('circle-pitch-scale');\n const pitchAlignment = this.paint.get('circle-pitch-alignment');\n\n let transformedPolygon: Array;\n let transformedSize: number;\n if (pitchAlignment === 'map') {\n transformedPolygon = translatedPolygon;\n transformedSize = size * pixelsToTileUnits;\n } else {\n transformedPolygon = projectQueryGeometry(translatedPolygon, transform, unwrappedTileID, getElevation);\n transformedSize = size;\n }\n\n return circleIntersection({\n queryGeometry: transformedPolygon,\n size: transformedSize,\n transform,\n unwrappedTileID,\n getElevation,\n pitchAlignment,\n pitchScale\n }, geometry);\n }\n}\n\n","import {CircleBucket} from './circle_bucket';\nimport {register} from '../../util/web_worker_transfer';\n\nimport type {HeatmapStyleLayer} from '../../style/style_layer/heatmap_style_layer';\n\nexport class HeatmapBucket extends CircleBucket {\n // Needed for flow to accept omit: ['layers'] below, due to\n // https://github.com/facebook/flow/issues/4262\n layers: Array;\n}\n\nregister('HeatmapBucket', HeatmapBucket, {omit: ['layers']});\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type HeatmapPaintProps = {\n \"heatmap-radius\": DataDrivenProperty,\n \"heatmap-weight\": DataDrivenProperty,\n \"heatmap-intensity\": DataConstantProperty,\n \"heatmap-color\": ColorRampProperty,\n \"heatmap-opacity\": DataConstantProperty,\n};\n\nexport type HeatmapPaintPropsPossiblyEvaluated = {\n \"heatmap-radius\": PossiblyEvaluatedPropertyValue,\n \"heatmap-weight\": PossiblyEvaluatedPropertyValue,\n \"heatmap-intensity\": number,\n \"heatmap-color\": ColorRampProperty,\n \"heatmap-opacity\": number,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"heatmap-radius\": new DataDrivenProperty(styleSpec[\"paint_heatmap\"][\"heatmap-radius\"] as any as StylePropertySpecification),\n \"heatmap-weight\": new DataDrivenProperty(styleSpec[\"paint_heatmap\"][\"heatmap-weight\"] as any as StylePropertySpecification),\n \"heatmap-intensity\": new DataConstantProperty(styleSpec[\"paint_heatmap\"][\"heatmap-intensity\"] as any as StylePropertySpecification),\n \"heatmap-color\": new ColorRampProperty(styleSpec[\"paint_heatmap\"][\"heatmap-color\"] as any as StylePropertySpecification),\n \"heatmap-opacity\": new DataConstantProperty(styleSpec[\"paint_heatmap\"][\"heatmap-opacity\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import {type Color} from '@maplibre/maplibre-gl-style-spec';\nimport {register} from './web_worker_transfer';\n\nexport type Size = {\n width: number;\n height: number;\n};\n\ntype Point2D = {\n x: number;\n y: number;\n};\n\nfunction createImage(image: any, {\n width,\n height\n}: Size, channels: number, data?: Uint8Array | Uint8ClampedArray) {\n if (!data) {\n data = new Uint8Array(width * height * channels);\n } else if (data instanceof Uint8ClampedArray) {\n data = new Uint8Array(data.buffer);\n } else if (data.length !== width * height * channels) {\n throw new RangeError(`mismatched image size. expected: ${data.length} but got: ${width * height * channels}`);\n }\n image.width = width;\n image.height = height;\n image.data = data;\n return image;\n}\n\nfunction resizeImage(image: any, {\n width,\n height\n}: Size, channels: number) {\n if (width === image.width && height === image.height) {\n return;\n }\n\n const newImage = createImage({}, {width, height}, channels);\n\n copyImage(image, newImage, {x: 0, y: 0}, {x: 0, y: 0}, {\n width: Math.min(image.width, width),\n height: Math.min(image.height, height)\n }, channels);\n\n image.width = width;\n image.height = height;\n image.data = newImage.data;\n}\n\nfunction copyImage(srcImg: any, dstImg: any, srcPt: Point2D, dstPt: Point2D, size: Size, channels: number) {\n if (size.width === 0 || size.height === 0) {\n return dstImg;\n }\n\n if (size.width > srcImg.width ||\n size.height > srcImg.height ||\n srcPt.x > srcImg.width - size.width ||\n srcPt.y > srcImg.height - size.height) {\n throw new RangeError('out of range source coordinates for image copy');\n }\n\n if (size.width > dstImg.width ||\n size.height > dstImg.height ||\n dstPt.x > dstImg.width - size.width ||\n dstPt.y > dstImg.height - size.height) {\n throw new RangeError('out of range destination coordinates for image copy');\n }\n\n const srcData = srcImg.data;\n const dstData = dstImg.data;\n\n if (srcData === dstData) throw new Error('srcData equals dstData, so image is already copied');\n\n for (let y = 0; y < size.height; y++) {\n const srcOffset = ((srcPt.y + y) * srcImg.width + srcPt.x) * channels;\n const dstOffset = ((dstPt.y + y) * dstImg.width + dstPt.x) * channels;\n for (let i = 0; i < size.width * channels; i++) {\n dstData[dstOffset + i] = srcData[srcOffset + i];\n }\n }\n return dstImg;\n}\n\n/**\n * An image with alpha color value\n */\nexport class AlphaImage {\n width: number;\n height: number;\n data: Uint8Array;\n\n constructor(size: Size, data?: Uint8Array | Uint8ClampedArray) {\n createImage(this, size, 1, data);\n }\n\n resize(size: Size) {\n resizeImage(this, size, 1);\n }\n\n clone() {\n return new AlphaImage({width: this.width, height: this.height}, new Uint8Array(this.data));\n }\n\n static copy(srcImg: AlphaImage, dstImg: AlphaImage, srcPt: Point2D, dstPt: Point2D, size: Size) {\n copyImage(srcImg, dstImg, srcPt, dstPt, size, 1);\n }\n}\n\n/**\n * An object to store image data not premultiplied, because ImageData is not premultiplied.\n * UNPACK_PREMULTIPLY_ALPHA_WEBGL must be used when uploading to a texture.\n */\nexport class RGBAImage {\n width: number;\n height: number;\n\n /**\n * data must be a Uint8Array instead of Uint8ClampedArray because texImage2D does not support Uint8ClampedArray in all browsers.\n */\n data: Uint8Array;\n\n constructor(size: Size, data?: Uint8Array | Uint8ClampedArray) {\n createImage(this, size, 4, data);\n }\n\n resize(size: Size) {\n resizeImage(this, size, 4);\n }\n\n replace(data: Uint8Array | Uint8ClampedArray, copy?: boolean) {\n if (copy) {\n this.data.set(data);\n } else if (data instanceof Uint8ClampedArray) {\n this.data = new Uint8Array(data.buffer);\n } else {\n this.data = data;\n }\n }\n\n clone() {\n return new RGBAImage({width: this.width, height: this.height}, new Uint8Array(this.data));\n }\n\n static copy(srcImg: RGBAImage | ImageData, dstImg: RGBAImage, srcPt: Point2D, dstPt: Point2D, size: Size) {\n copyImage(srcImg, dstImg, srcPt, dstPt, size, 4);\n }\n\n setPixel(row: number, col: number, value: Color) {\n const rLocation = (row * this.width + col) * 4;\n this.data[rLocation + 0] = Math.round(value.r * 255 / value.a);\n this.data[rLocation + 1] = Math.round(value.g * 255 / value.a);\n this.data[rLocation + 2] = Math.round(value.b * 255 / value.a);\n this.data[rLocation + 3] = Math.round(value.a * 255);\n }\n}\n\nregister('AlphaImage', AlphaImage);\nregister('RGBAImage', RGBAImage);\n","import {RGBAImage} from './image';\nimport {isPowerOfTwo} from './util';\n\nimport type {StylePropertyExpression} from '@maplibre/maplibre-gl-style-spec';\n\nexport type ColorRampParams = {\n expression: StylePropertyExpression;\n evaluationKey: string;\n resolution?: number;\n image?: RGBAImage;\n clips?: Array;\n};\n\n/**\n * Given an expression that should evaluate to a color ramp,\n * return a RGBA image representing that ramp expression.\n */\nexport function renderColorRamp(params: ColorRampParams): RGBAImage {\n const evaluationGlobals = {};\n const width = params.resolution || 256;\n const height = params.clips ? params.clips.length : 1;\n const image = params.image || new RGBAImage({width, height});\n\n if (!isPowerOfTwo(width)) throw new Error(`width is not a power of 2 - ${width}`);\n\n const renderPixel = (stride, index, progress) => {\n evaluationGlobals[params.evaluationKey] = progress;\n const pxColor = params.expression.evaluate(evaluationGlobals as any);\n image.setPixel(stride / 4 / width, index / 4, pxColor);\n };\n\n if (!params.clips) {\n for (let i = 0, j = 0; i < width; i++, j += 4) {\n const progress = i / (width - 1);\n\n renderPixel(0, j, progress);\n }\n } else {\n for (let clip = 0, stride = 0; clip < height; ++clip, stride += width * 4) {\n for (let i = 0, j = 0; i < width; i++, j += 4) {\n // Remap progress between clips\n const progress = i / (width - 1);\n const {start, end} = params.clips[clip];\n const evaluationProgress = start * (1 - progress) + end * progress;\n renderPixel(stride, j, evaluationProgress);\n }\n }\n }\n\n return image;\n}\n","import {type QueryIntersectsFeatureParams, StyleLayer} from '../style_layer';\n\nimport {HeatmapBucket} from '../../data/bucket/heatmap_bucket';\nimport {type RGBAImage} from '../../util/image';\nimport properties, {type HeatmapPaintPropsPossiblyEvaluated} from './heatmap_style_layer_properties.g';\nimport {renderColorRamp} from '../../util/color_ramp';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\n\nimport type {Texture} from '../../render/texture';\nimport type {Framebuffer} from '../../gl/framebuffer';\nimport type {HeatmapPaintProps} from './heatmap_style_layer_properties.g';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nimport {circleIntersection, getMaximumPaintValue} from '../query_utils';\nimport type {Bucket} from '../../data/bucket';\n\nexport const HEATMAP_FULL_RENDER_FBO_KEY = 'big-fb';\n\nexport const isHeatmapStyleLayer = (layer: StyleLayer): layer is HeatmapStyleLayer => layer.type === 'heatmap';\n\n/**\n * A style layer that defines a heatmap\n */\nexport class HeatmapStyleLayer extends StyleLayer {\n\n heatmapFbos: Map;\n colorRamp: RGBAImage;\n colorRampTexture: Texture;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n createBucket(options: any) {\n return new HeatmapBucket(options);\n }\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n\n this.heatmapFbos = new Map();\n // make sure color ramp texture is generated for default heatmap color too\n this._updateColorRamp();\n }\n\n _handleSpecialPaintPropertyUpdate(name: string) {\n if (name === 'heatmap-color') {\n this._updateColorRamp();\n }\n }\n\n _updateColorRamp() {\n const expression = this._transitionablePaint._values['heatmap-color'].value.expression;\n this.colorRamp = renderColorRamp({\n expression,\n evaluationKey: 'heatmapDensity',\n image: this.colorRamp\n });\n this.colorRampTexture = null;\n }\n\n resize() {\n if (this.heatmapFbos.has(HEATMAP_FULL_RENDER_FBO_KEY)) {\n this.heatmapFbos.delete(HEATMAP_FULL_RENDER_FBO_KEY);\n }\n }\n\n queryRadius(bucket: Bucket): number {\n return getMaximumPaintValue('heatmap-radius', this, bucket as HeatmapBucket);\n }\n\n queryIntersectsFeature({\n queryGeometry,\n feature,\n featureState,\n geometry,\n transform,\n pixelsToTileUnits,\n unwrappedTileID,\n getElevation}: QueryIntersectsFeatureParams\n ): boolean {\n return circleIntersection({\n queryGeometry,\n size: this.paint.get('heatmap-radius').evaluate(feature, featureState) * pixelsToTileUnits,\n transform,\n unwrappedTileID,\n getElevation\n }, geometry);\n }\n\n hasOffscreenPass() {\n return this.paint.get('heatmap-opacity') !== 0 && !this.isHidden();\n }\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type HillshadePaintProps = {\n \"hillshade-illumination-direction\": DataConstantProperty,\n \"hillshade-illumination-altitude\": DataConstantProperty,\n \"hillshade-illumination-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"hillshade-exaggeration\": DataConstantProperty,\n \"hillshade-shadow-color\": DataConstantProperty,\n \"hillshade-highlight-color\": DataConstantProperty,\n \"hillshade-accent-color\": DataConstantProperty,\n \"hillshade-method\": DataConstantProperty<\"standard\" | \"basic\" | \"combined\" | \"igor\" | \"multidirectional\">,\n};\n\nexport type HillshadePaintPropsPossiblyEvaluated = {\n \"hillshade-illumination-direction\": NumberArray,\n \"hillshade-illumination-altitude\": NumberArray,\n \"hillshade-illumination-anchor\": \"map\" | \"viewport\",\n \"hillshade-exaggeration\": number,\n \"hillshade-shadow-color\": ColorArray,\n \"hillshade-highlight-color\": ColorArray,\n \"hillshade-accent-color\": Color,\n \"hillshade-method\": \"standard\" | \"basic\" | \"combined\" | \"igor\" | \"multidirectional\",\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"hillshade-illumination-direction\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-illumination-direction\"] as any as StylePropertySpecification),\n \"hillshade-illumination-altitude\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-illumination-altitude\"] as any as StylePropertySpecification),\n \"hillshade-illumination-anchor\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-illumination-anchor\"] as any as StylePropertySpecification),\n \"hillshade-exaggeration\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-exaggeration\"] as any as StylePropertySpecification),\n \"hillshade-shadow-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-shadow-color\"] as any as StylePropertySpecification),\n \"hillshade-highlight-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-highlight-color\"] as any as StylePropertySpecification),\n \"hillshade-accent-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-accent-color\"] as any as StylePropertySpecification),\n \"hillshade-method\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-method\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import {StyleLayer} from '../style_layer';\n\nimport properties, {type HillshadePaintPropsPossiblyEvaluated} from './hillshade_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\n\nimport type {HillshadePaintProps} from './hillshade_style_layer_properties.g';\nimport type {Color, LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {degreesToRadians} from '../../util/util';\nimport type {EvaluationParameters} from '../evaluation_parameters';\n\nexport const isHillshadeStyleLayer = (layer: StyleLayer): layer is HillshadeStyleLayer => layer.type === 'hillshade';\n\nexport class HillshadeStyleLayer extends StyleLayer {\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n this.recalculate({zoom: 0, zoomHistory: {}} as EvaluationParameters, undefined);\n }\n\n getIlluminationProperties(): {directionRadians: number[]; altitudeRadians: number[]; shadowColor: Color[]; highlightColor: Color[]} {\n let direction = this.paint.get('hillshade-illumination-direction').values;\n let altitude = this.paint.get('hillshade-illumination-altitude').values;\n let highlightColor = this.paint.get('hillshade-highlight-color').values;\n let shadowColor = this.paint.get('hillshade-shadow-color').values;\n\n // ensure all illumination properties have the same length\n const numIlluminationSources = Math.max(direction.length, altitude.length, highlightColor.length, shadowColor.length);\n direction = direction.concat(Array(numIlluminationSources - direction.length).fill(direction.at(-1)));\n altitude = altitude.concat(Array(numIlluminationSources - altitude.length).fill(altitude.at(-1)));\n highlightColor = highlightColor.concat(Array(numIlluminationSources - highlightColor.length).fill(highlightColor.at(-1)));\n shadowColor = shadowColor.concat(Array(numIlluminationSources - shadowColor.length).fill(shadowColor.at(-1)));\n\n const altitudeRadians = altitude.map(degreesToRadians);\n const directionRadians = direction.map(degreesToRadians);\n\n return {directionRadians, altitudeRadians, shadowColor, highlightColor};\n }\n\n hasOffscreenPass() {\n return this.paint.get('hillshade-exaggeration') !== 0 && !this.isHidden();\n }\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type ColorReliefPaintProps = {\n \"color-relief-opacity\": DataConstantProperty,\n \"color-relief-color\": ColorRampProperty,\n};\n\nexport type ColorReliefPaintPropsPossiblyEvaluated = {\n \"color-relief-opacity\": number,\n \"color-relief-color\": ColorRampProperty,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"color-relief-opacity\": new DataConstantProperty(styleSpec[\"paint_color-relief\"][\"color-relief-opacity\"] as any as StylePropertySpecification),\n \"color-relief-color\": new ColorRampProperty(styleSpec[\"paint_color-relief\"][\"color-relief-color\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import type {Context} from '../gl/context';\nimport type {RGBAImage, AlphaImage} from '../util/image';\nimport {isImageBitmap} from '../util/util';\n\nexport type TextureFormat = WebGLRenderingContextBase['RGBA'] | WebGLRenderingContextBase['ALPHA'];\nexport type TextureFilter = WebGLRenderingContextBase['LINEAR'] | WebGLRenderingContextBase['LINEAR_MIPMAP_NEAREST'] | WebGLRenderingContextBase['NEAREST'];\nexport type TextureWrap = WebGLRenderingContextBase['REPEAT'] | WebGLRenderingContextBase['CLAMP_TO_EDGE'] | WebGLRenderingContextBase['MIRRORED_REPEAT'];\n\ntype EmptyImage = {\n width: number;\n height: number;\n data: null;\n};\n\ntype DataTextureImage = RGBAImage | AlphaImage | EmptyImage;\nexport type TextureImage = TexImageSource | DataTextureImage;\n\n/**\n * @internal\n * A `Texture` GL related object\n */\nexport class Texture {\n context: Context;\n size: [number, number];\n texture: WebGLTexture;\n format: TextureFormat;\n filter: TextureFilter;\n wrap: TextureWrap;\n useMipmap: boolean;\n\n constructor(context: Context, image: TextureImage, format: TextureFormat, options?: {\n premultiply?: boolean;\n useMipmap?: boolean;\n } | null) {\n this.context = context;\n this.format = format;\n this.texture = context.gl.createTexture();\n this.update(image, options);\n }\n\n update(image: TextureImage, options?: {\n premultiply?: boolean;\n useMipmap?: boolean;\n } | null, position?: {\n x: number;\n y: number;\n }) {\n const {width, height} = image as {width: number; height: number};\n const resize = (!this.size || this.size[0] !== width || this.size[1] !== height) && !position;\n const {context} = this;\n const {gl} = context;\n\n this.useMipmap = Boolean(options && options.useMipmap);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n\n context.pixelStoreUnpackFlipY.set(false);\n context.pixelStoreUnpack.set(1);\n context.pixelStoreUnpackPremultiplyAlpha.set(this.format === gl.RGBA && (!options || options.premultiply !== false));\n\n if (resize) {\n this.size = [width, height];\n\n if (image instanceof HTMLImageElement || image instanceof HTMLCanvasElement || image instanceof HTMLVideoElement || image instanceof ImageData || isImageBitmap(image)) {\n gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, gl.UNSIGNED_BYTE, image);\n } else {\n gl.texImage2D(gl.TEXTURE_2D, 0, this.format, width, height, 0, this.format, gl.UNSIGNED_BYTE, (image as DataTextureImage).data);\n }\n\n } else {\n const {x, y} = position || {x: 0, y: 0};\n if (image instanceof HTMLImageElement || image instanceof HTMLCanvasElement || image instanceof HTMLVideoElement || image instanceof ImageData || isImageBitmap(image)) {\n gl.texSubImage2D(gl.TEXTURE_2D, 0, x, y, gl.RGBA, gl.UNSIGNED_BYTE, image);\n } else {\n gl.texSubImage2D(gl.TEXTURE_2D, 0, x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, (image as DataTextureImage).data);\n }\n }\n\n if (this.useMipmap && this.isSizePowerOfTwo()) {\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n\n context.pixelStoreUnpackFlipY.setDefault();\n context.pixelStoreUnpack.setDefault();\n context.pixelStoreUnpackPremultiplyAlpha.setDefault();\n }\n\n bind(filter: TextureFilter, wrap: TextureWrap, minFilter?: TextureFilter | null) {\n const {context} = this;\n const {gl} = context;\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n\n if (minFilter === gl.LINEAR_MIPMAP_NEAREST && !this.isSizePowerOfTwo()) {\n minFilter = gl.LINEAR;\n }\n\n if (filter !== this.filter) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter || filter);\n this.filter = filter;\n }\n\n if (wrap !== this.wrap) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrap);\n this.wrap = wrap;\n }\n }\n\n isSizePowerOfTwo() {\n return this.size[0] === this.size[1] && (Math.log(this.size[0]) / Math.LN2) % 1 === 0;\n }\n\n destroy() {\n const {gl} = this.context;\n gl.deleteTexture(this.texture);\n this.texture = null;\n }\n}\n","import {RGBAImage} from '../util/image';\n\nimport {warnOnce} from '../util/util';\nimport {register} from '../util/web_worker_transfer';\n\n/**\n * The possible DEM encoding types\n */\nexport type DEMEncoding = 'mapbox' | 'terrarium' | 'custom';\n\n/**\n * DEMData is a data structure for decoding, backfilling, and storing elevation data for processing in the hillshade shaders\n * data can be populated either from a png raw image tile or from serialized data sent back from a worker. When data is initially\n * loaded from a image tile, we decode the pixel values using the appropriate decoding formula, but we store the\n * elevation data as an Int32 value. we add 65536 (2^16) to eliminate negative values and enable the use of\n * integer overflow when creating the texture used in the hillshadePrepare step.\n *\n * DEMData also handles the backfilling of data from a tile's neighboring tiles. This is necessary because we use a pixel's 8\n * surrounding pixel values to compute the slope at that pixel, and we cannot accurately calculate the slope at pixels on a\n * tile's edge without backfilling from neighboring tiles.\n */\nexport class DEMData {\n uid: string | number;\n data: Uint32Array;\n stride: number;\n dim: number;\n min: number;\n max: number;\n redFactor: number;\n greenFactor: number;\n blueFactor: number;\n baseShift: number;\n\n /**\n * Constructs a `DEMData` object\n * @param uid - the tile's unique id\n * @param data - RGBAImage data has uniform 1px padding on all sides: square tile edge size defines stride\n // and dim is calculated as stride - 2.\n * @param encoding - the encoding type of the data\n * @param redFactor - the red channel factor used to unpack the data, used for `custom` encoding only\n * @param greenFactor - the green channel factor used to unpack the data, used for `custom` encoding only\n * @param blueFactor - the blue channel factor used to unpack the data, used for `custom` encoding only\n * @param baseShift - the base shift used to unpack the data, used for `custom` encoding only\n */\n constructor(uid: string | number, data: RGBAImage | ImageData, encoding: DEMEncoding, redFactor = 1.0, greenFactor = 1.0, blueFactor = 1.0, baseShift = 0.0) {\n this.uid = uid;\n if (data.height !== data.width) throw new RangeError('DEM tiles must be square');\n if (encoding && !['mapbox', 'terrarium', 'custom'].includes(encoding)) {\n warnOnce(`\"${encoding}\" is not a valid encoding type. Valid types include \"mapbox\", \"terrarium\" and \"custom\".`);\n return;\n }\n this.stride = data.height;\n const dim = this.dim = data.height - 2;\n this.data = new Uint32Array(data.data.buffer);\n switch (encoding) {\n case 'terrarium':\n // unpacking formula for mapzen terrarium:\n // https://aws.amazon.com/public-datasets/terrain/\n this.redFactor = 256.0;\n this.greenFactor = 1.0;\n this.blueFactor = 1.0 / 256.0;\n this.baseShift = 32768.0;\n break;\n case 'custom':\n this.redFactor = redFactor;\n this.greenFactor = greenFactor;\n this.blueFactor = blueFactor;\n this.baseShift = baseShift;\n break;\n case 'mapbox':\n default:\n // unpacking formula for mapbox.terrain-rgb:\n // https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb\n this.redFactor = 6553.6;\n this.greenFactor = 25.6;\n this.blueFactor = 0.1;\n this.baseShift = 10000.0;\n break;\n }\n\n // in order to avoid flashing seams between tiles, here we are initially populating a 1px border of pixels around the image\n // with the data of the nearest pixel from the image. this data is eventually replaced when the tile's neighboring\n // tiles are loaded and the accurate data can be backfilled using DEMData#backfillBorder\n for (let x = 0; x < dim; x++) {\n // left vertical border\n this.data[this._idx(-1, x)] = this.data[this._idx(0, x)];\n // right vertical border\n this.data[this._idx(dim, x)] = this.data[this._idx(dim - 1, x)];\n // left horizontal border\n this.data[this._idx(x, -1)] = this.data[this._idx(x, 0)];\n // right horizontal border\n this.data[this._idx(x, dim)] = this.data[this._idx(x, dim - 1)];\n }\n // corners\n this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)];\n this.data[this._idx(dim, -1)] = this.data[this._idx(dim - 1, 0)];\n this.data[this._idx(-1, dim)] = this.data[this._idx(0, dim - 1)];\n this.data[this._idx(dim, dim)] = this.data[this._idx(dim - 1, dim - 1)];\n\n // calculate min/max values\n this.min = Number.MAX_SAFE_INTEGER;\n this.max = Number.MIN_SAFE_INTEGER;\n for (let x = 0; x < dim; x++) {\n for (let y = 0; y < dim; y++) {\n const ele = this.get(x, y);\n if (ele > this.max) this.max = ele;\n if (ele < this.min) this.min = ele;\n }\n }\n }\n\n get(x: number, y: number) {\n const pixels = new Uint8Array(this.data.buffer);\n const index = this._idx(x, y) * 4;\n return this.unpack(pixels[index], pixels[index + 1], pixels[index + 2]);\n }\n\n getUnpackVector() {\n return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift];\n }\n\n _idx(x: number, y: number) {\n if (x < -1 || x >= this.dim + 1 || y < -1 || y >= this.dim + 1) throw new RangeError(`Out of range source coordinates for DEM data. x: ${x}, y: ${y}, dim: ${this.dim}`);\n return (y + 1) * this.stride + (x + 1);\n }\n\n unpack(r: number, g: number, b: number) {\n return (r * this.redFactor + g * this.greenFactor + b * this.blueFactor - this.baseShift);\n }\n\n pack(v: number): {r: number; g: number; b: number} {\n return packDEMData(v, this.getUnpackVector());\n }\n\n getPixels() {\n return new RGBAImage({width: this.stride, height: this.stride}, new Uint8Array(this.data.buffer));\n }\n\n backfillBorder(borderTile: DEMData, dx: number, dy: number) {\n if (this.dim !== borderTile.dim) throw new Error('dem dimension mismatch');\n\n let xMin = dx * this.dim,\n xMax = dx * this.dim + this.dim,\n yMin = dy * this.dim,\n yMax = dy * this.dim + this.dim;\n\n switch (dx) {\n case -1:\n xMin = xMax - 1;\n break;\n case 1:\n xMax = xMin + 1;\n break;\n }\n\n switch (dy) {\n case -1:\n yMin = yMax - 1;\n break;\n case 1:\n yMax = yMin + 1;\n break;\n }\n\n const ox = -dx * this.dim;\n const oy = -dy * this.dim;\n for (let y = yMin; y < yMax; y++) {\n for (let x = xMin; x < xMax; x++) {\n this.data[this._idx(x, y)] = borderTile.data[this._idx(x + ox, y + oy)];\n }\n }\n }\n}\n\nexport function packDEMData(v: number, unpackVector: number[]): {r: number; g: number; b: number} {\n const redFactor = unpackVector[0];\n const greenFactor = unpackVector[1];\n const blueFactor = unpackVector[2];\n const baseShift = unpackVector[3];\n const minScale = Math.min(redFactor, greenFactor, blueFactor);\n const vScaled = Math.round((v + baseShift)/minScale);\n return {\n r: Math.floor(vScaled*minScale/redFactor) % 256,\n g: Math.floor(vScaled*minScale/greenFactor) % 256,\n b: Math.floor(vScaled*minScale/blueFactor) % 256\n };\n}\n\nregister('DEMData', DEMData);\n","import {StyleLayer} from '../style_layer';\n\nimport properties, {type ColorReliefPaintPropsPossiblyEvaluated} from './color_relief_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\n\nimport type {ColorReliefPaintProps} from './color_relief_style_layer_properties.g';\nimport {Color, Interpolate, ZoomConstantExpression, type LayerSpecification, type EvaluationContext, type StylePropertyExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {warnOnce} from '../../util/util';\nimport {Texture} from '../../render/texture';\nimport {RGBAImage} from '../../util/image';\nimport {type Context} from '../../gl/context';\nimport {packDEMData} from '../../data/dem_data';\n\nexport const isColorReliefStyleLayer = (layer: StyleLayer): layer is ColorReliefStyleLayer => layer.type === 'color-relief';\n\nexport type ColorRamp = {elevationStops: Array; colorStops: Array};\nexport type ColorRampTextures = {elevationTexture: Texture; colorTexture: Texture};\n\nexport class ColorReliefStyleLayer extends StyleLayer {\n colorRampExpression: StylePropertyExpression;\n colorRampTextures: ColorRampTextures;\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n\n /**\n * Create the color ramp, enforcing a maximum length for the vectors. This modifies the internal color ramp,\n * so that the remapping is only performed once.\n *\n * @param maxLength - the maximum number of stops in the color ramp\n *\n * @return a `ColorRamp` object with no more than `maxLength` stops.\n *\n */\n\n _createColorRamp(maxLength: number) : ColorRamp {\n const colorRamp: ColorRamp = {elevationStops: [], colorStops: []};\n const expression = this._transitionablePaint._values['color-relief-color'].value.expression;\n if (expression instanceof ZoomConstantExpression && expression._styleExpression.expression instanceof Interpolate) {\n this.colorRampExpression = expression;\n const interpolater = expression._styleExpression.expression;\n colorRamp.elevationStops = interpolater.labels;\n colorRamp.colorStops = [];\n for (const label of colorRamp.elevationStops) {\n colorRamp.colorStops.push(interpolater.evaluate({globals: {elevation: label}} as EvaluationContext));\n }\n }\n if (colorRamp.elevationStops.length < 1)\n {\n colorRamp.elevationStops = [0];\n colorRamp.colorStops = [Color.transparent];\n }\n if (colorRamp.elevationStops.length < 2)\n {\n colorRamp.elevationStops.push(colorRamp.elevationStops[0] + 1);\n colorRamp.colorStops.push(colorRamp.colorStops[0]);\n }\n if (colorRamp.elevationStops.length <= maxLength) {\n return colorRamp;\n }\n\n const remappedColorRamp: ColorRamp = {elevationStops: [], colorStops: []};\n const remapStepSize = (colorRamp.elevationStops.length - 1)/(maxLength - 1);\n\n for (let i = 0; i < colorRamp.elevationStops.length - 0.5; i += remapStepSize) {\n remappedColorRamp.elevationStops.push(colorRamp.elevationStops[Math.round(i)]);\n remappedColorRamp.colorStops.push(colorRamp.colorStops[Math.round(i)]);\n }\n warnOnce(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${maxLength}, provided: ${colorRamp.elevationStops.length}`);\n return remappedColorRamp;\n }\n\n _colorRampChanged() : boolean {\n return this.colorRampExpression != this._transitionablePaint._values['color-relief-color'].value.expression;\n }\n\n getColorRampTextures(context: Context, maxLength: number, unpackVector: number[]): ColorRampTextures {\n if (this.colorRampTextures && !this._colorRampChanged()) {\n return this.colorRampTextures;\n }\n const colorRamp = this._createColorRamp(maxLength);\n const colorImage = new RGBAImage({width: colorRamp.colorStops.length, height: 1});\n const elevationImage = new RGBAImage({width: colorRamp.colorStops.length, height: 1});\n for (let i = 0; i < colorRamp.elevationStops.length; i++) {\n const elevationPacked = packDEMData(colorRamp.elevationStops[i], unpackVector);\n elevationImage.setPixel(0, i, new Color(elevationPacked.r/255, elevationPacked.g/255, elevationPacked.b/255, 1));\n colorImage.setPixel(0, i, colorRamp.colorStops[i]);\n }\n this.colorRampTextures = {\n elevationTexture: new Texture(context, elevationImage, context.gl.RGBA),\n colorTexture: new Texture(context, colorImage, context.gl.RGBA)\n };\n return this.colorRampTextures;\n }\n\n hasOffscreenPass() {\n return !this.isHidden() && !!this.colorRampTextures;\n }\n}\n","import {createLayout} from '../../util/struct_array';\n\nconst layout = createLayout([\n {name: 'a_pos', components: 2, type: 'Int16'}\n], 4);\n\nexport default layout;\nexport const {members, size, alignment} = layout;\n","import type {FillStyleLayer} from '../../style/style_layer/fill_style_layer';\nimport type {FillExtrusionStyleLayer} from '../../style/style_layer/fill_extrusion_style_layer';\nimport type {LineStyleLayer} from '../../style/style_layer/line_style_layer';\n\nimport type {\n BucketFeature,\n PopulateParameters\n} from '../bucket';\nimport {type PossiblyEvaluated} from '../../style/properties';\n\ntype PatternStyleLayers = Array | Array | Array;\n\nexport function hasPattern(type: string, layers: PatternStyleLayers, options: PopulateParameters) {\n const patterns = options.patternDependencies;\n let hasPattern = false;\n\n for (const layer of layers) {\n const patternProperty = (layer.paint as PossiblyEvaluated).get(`${type}-pattern`);\n if (!patternProperty.isConstant()) {\n hasPattern = true;\n }\n\n const constantPattern = patternProperty.constantOr(null);\n if (constantPattern) {\n hasPattern = true;\n patterns[constantPattern.to] = true;\n patterns[constantPattern.from] = true;\n }\n }\n\n return hasPattern;\n}\n\nexport function addPatternDependencies(type: string, layers: PatternStyleLayers, patternFeature: BucketFeature, parameters: { zoom: number }, options: PopulateParameters) {\n const {zoom} = parameters;\n const patterns = options.patternDependencies;\n for (const layer of layers) {\n const patternProperty = (layer.paint as PossiblyEvaluated).get(`${type}-pattern`);\n\n const patternPropertyValue = patternProperty.value;\n if (patternPropertyValue.kind !== 'constant') {\n let min = patternPropertyValue.evaluate({zoom: zoom - 1}, patternFeature, {}, options.availableImages);\n let mid = patternPropertyValue.evaluate({zoom}, patternFeature, {}, options.availableImages);\n let max = patternPropertyValue.evaluate({zoom: zoom + 1}, patternFeature, {}, options.availableImages);\n min = min && min.name ? min.name : min;\n mid = mid && mid.name ? mid.name : mid;\n max = max && max.name ? max.name : max;\n // add to patternDependencies\n patterns[min] = true;\n patterns[mid] = true;\n patterns[max] = true;\n\n // save for layout\n patternFeature.patterns[layer.id] = {min, mid, max};\n }\n }\n return patternFeature;\n}\n","\nexport default function earcut(data, holeIndices, dim = 2) {\n\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = linkedList(data, 0, outerLen, dim, true);\n const triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n let minX, minY, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = data[0];\n minY = data[1];\n let maxX = minX;\n let maxY = minY;\n\n for (let i = dim; i < outerLen; i += dim) {\n const x = data[i];\n const y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n let last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (let i = start; i < end; i += dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n } else {\n for (let i = end - dim; i >= start; i -= dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n let p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n let stop = ear;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n const prev = ear.prev;\n const next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n triangles.push(prev.i, ear.i, next.i); // cut off the triangle\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n const a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox\n const x0 = Math.min(ax, bx, cx),\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy);\n\n let p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox\n const x0 = Math.min(ax, bx, cx),\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy);\n\n // z-order range for the current triangle bbox;\n const minZ = zOrder(x0, y0, minX, minY, invSize),\n maxZ = zOrder(x1, y1, minX, minY, invSize);\n\n let p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles) {\n let p = start;\n do {\n const a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i, p.i, b.i);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n const queue = [];\n\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n const list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareXYSlope);\n\n // process holes from left to right\n for (let i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n }\n\n return outerNode;\n}\n\nfunction compareXYSlope(a, b) {\n let result = a.x - b.x;\n // when the left-most point of 2 holes meet at a vertex, sort the holes counterclockwise so that when we find\n // the bridge to the outer shell is always the point that they meet at.\n if (result === 0) {\n result = a.y - b.y;\n if (result === 0) {\n const aSlope = (a.next.y - a.y) / (a.next.x - a.x);\n const bSlope = (b.next.y - b.y) / (b.next.x - b.x);\n result = aSlope - bSlope;\n }\n }\n return result;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and link it\nfunction eliminateHole(hole, outerNode) {\n const bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n const bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n let p = outerNode;\n const hx = hole.x;\n const hy = hole.y;\n let qx = -Infinity;\n let m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n // unless they intersect at a vertex, then choose the vertex\n if (equals(hole, p)) return p;\n do {\n if (equals(hole, p.next)) return p.next;\n else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n const stop = m;\n const mx = m.x;\n const my = m.y;\n let tanMin = Infinity;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n const tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n let p = start;\n do {\n if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n let numMerges;\n let inSize = 1;\n\n do {\n let p = list;\n let e;\n list = null;\n let tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n let q = p;\n let pSize = 0;\n for (let i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n let qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n let p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n\n// check if a point lies within a convex triangle but false if its equal to the first point of the triangle\nfunction pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {\n return !(ax === px && ay === py) && pointInTriangle(ax, ay, bx, by, cx, cy, px, py);\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // doesn't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n const o1 = sign(area(p1, q1, p2));\n const o2 = sign(area(p1, q1, q2));\n const o3 = sign(area(p2, q2, p1));\n const o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n let p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n let p = a;\n let inside = false;\n const px = (a.x + b.x) / 2;\n const py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n const a2 = createNode(a.i, a.x, a.y),\n b2 = createNode(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n const p = createNode(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction createNode(i, x, y) {\n return {\n i, // vertex index in coordinates array\n x, y, // vertex coordinates\n prev: null, // previous and next vertex nodes in a polygon ring\n next: null,\n z: 0, // z-order curve value\n prevZ: null, // previous and next nodes in z-order\n nextZ: null,\n steiner: false // indicates whether this is a steiner point\n };\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nexport function deviation(data, holeIndices, dim, triangles) {\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n let polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n let trianglesArea = 0;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = triangles[i] * dim;\n const b = triangles[i + 1] * dim;\n const c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n}\n\nfunction signedArea(data, start, end, dim) {\n let sum = 0;\n for (let i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nexport function flatten(data) {\n const vertices = [];\n const holes = [];\n const dimensions = data[0][0].length;\n let holeIndex = 0;\n let prevLen = 0;\n\n for (const ring of data) {\n for (const p of ring) {\n for (let d = 0; d < dimensions; d++) vertices.push(p[d]);\n }\n if (prevLen) {\n holeIndex += prevLen;\n holes.push(holeIndex);\n }\n prevLen = ring.length;\n }\n return {vertices, holes, dimensions};\n}\n","// Should match actual possible granularity settings from circle_bucket.ts\n\n/**\n * Defines the granularity of subdivision for circles with `circle-pitch-alignment: 'map'` and for heatmap kernels.\n * More subdivision will cause circles to more closely follow the planet's surface.\n *\n * Possible values: 1, 3, 5, 7.\n * Subdivision of 1 results in a simple quad.\n */\nexport type CircleGranularity = 1 | 3 | 5 | 7;\n\n/**\n * Controls how much subdivision happens for a given type of geometry at different zoom levels.\n */\nexport class SubdivisionGranularityExpression {\n /**\n * A tile of zoom level 0 will be subdivided to this granularity level.\n * Each subsequent zoom level will have its granularity halved.\n */\n private readonly _baseZoomGranularity: number;\n\n /**\n * No tile will have granularity level smaller than this.\n */\n private readonly _minGranularity: number;\n\n constructor(baseZoomGranularity: number, minGranularity: number) {\n if (minGranularity > baseZoomGranularity) {\n throw new Error('Min granularity must not be greater than base granularity.');\n }\n\n this._baseZoomGranularity = baseZoomGranularity;\n this._minGranularity = minGranularity;\n }\n\n public getGranularityForZoomLevel(zoomLevel: number): number {\n const divisor = 1 << zoomLevel;\n return Math.max(Math.floor(this._baseZoomGranularity / divisor), this._minGranularity, 1);\n }\n}\n\n/**\n * An object describing how much subdivision should be applied to different types of geometry at different zoom levels.\n */\nexport class SubdivisionGranularitySetting {\n /**\n * Granularity settings used for fill and fill-extrusion layers (for fill, both polygons and their anti-aliasing outlines).\n */\n public readonly fill: SubdivisionGranularityExpression;\n\n /**\n * Granularity used for the line layer.\n */\n public readonly line: SubdivisionGranularityExpression;\n\n /**\n * Granularity used for geometry covering the entire tile: raster tiles, etc.\n */\n public readonly tile: SubdivisionGranularityExpression;\n\n /**\n * Granularity used for stencil masks for tiles.\n */\n public readonly stencil: SubdivisionGranularityExpression;\n\n /**\n * Controls the granularity of `pitch-alignment: map` circles and heatmap kernels.\n * More granular circles will more closely follow the map's surface.\n */\n public readonly circle: CircleGranularity;\n\n constructor(options: {\n /**\n * Granularity settings used for fill and fill-extrusion layers (for fill, both polygons and their anti-aliasing outlines).\n */\n fill: SubdivisionGranularityExpression;\n /**\n * Granularity used for the line layer.\n */\n line: SubdivisionGranularityExpression;\n /**\n * Granularity used for geometry covering the entire tile: stencil masks, raster tiles, etc.\n */\n tile: SubdivisionGranularityExpression;\n /**\n * Granularity used for stencil masks for tiles.\n */\n stencil: SubdivisionGranularityExpression;\n /**\n * Controls the granularity of `pitch-alignment: map` circles and heatmap kernels.\n * More granular circles will more closely follow the map's surface.\n */\n circle: CircleGranularity;\n }) {\n this.fill = options.fill;\n this.line = options.line;\n this.tile = options.tile;\n this.stencil = options.stencil;\n this.circle = options.circle;\n }\n\n /**\n * Granularity settings that disable subdivision altogether.\n */\n public static readonly noSubdivision = new SubdivisionGranularitySetting({\n fill: new SubdivisionGranularityExpression(0, 0),\n line: new SubdivisionGranularityExpression(0, 0),\n tile: new SubdivisionGranularityExpression(0, 0),\n stencil: new SubdivisionGranularityExpression(0, 0),\n circle: 1\n });\n}\n","import Point from '@mapbox/point-geometry';\nimport {EXTENT} from '../data/extent';\nimport {type CanonicalTileID} from '../tile/tile_id';\nimport earcut from 'earcut';\nimport {SubdivisionGranularityExpression, SubdivisionGranularitySetting} from './subdivision_granularity_settings';\nimport {register} from '../util/web_worker_transfer';\n\nregister('SubdivisionGranularityExpression', SubdivisionGranularityExpression);\nregister('SubdivisionGranularitySetting', SubdivisionGranularitySetting);\n\ntype SubdivisionResult = {\n verticesFlattened: Array;\n indicesTriangles: Array;\n\n /**\n * An array of arrays of indices of subdivided lines for polygon outlines.\n * Each array of lines corresponds to one ring of the original polygon.\n */\n indicesLineList: Array>;\n};\n\n// Special pole vertices have coordinates -32768,-32768 for the north pole and 32767,32767 for the south pole.\n// First, find any *non-pole* vertices at those coordinates and move them slightly elsewhere.\nexport const NORTH_POLE_Y = -32768;\nexport const SOUTH_POLE_Y = 32767;\n\nclass Subdivider {\n /**\n * Flattened vertex positions (xyxyxy).\n */\n private _vertexBuffer: Array = [];\n\n /**\n * Map of \"vertex x and y coordinate\" to \"index of such vertex\".\n */\n private _vertexDictionary: Map = new Map();\n private _used: boolean = false;\n\n private readonly _canonical: CanonicalTileID;\n\n private readonly _granularity;\n private readonly _granularityCellSize;\n\n constructor(granularity: number, canonical: CanonicalTileID) {\n this._granularity = granularity;\n this._granularityCellSize = EXTENT / granularity;\n this._canonical = canonical;\n }\n\n private _getKey(x: number, y: number) {\n // Assumes signed 16 bit positions.\n x = x + 32768;\n y = y + 32768;\n return (x << 16) | (y << 0);\n }\n\n /**\n * Returns an index into the internal vertex buffer for a vertex at the given coordinates.\n * If the internal vertex buffer contains no such vertex, then it is added.\n */\n private _vertexToIndex(x: number, y: number): number {\n if (x < -32768 || y < -32768 || x > 32767 || y > 32767) {\n throw new Error('Vertex coordinates are out of signed 16 bit integer range.');\n }\n const xInt = Math.round(x) | 0;\n const yInt = Math.round(y) | 0;\n const key = this._getKey(xInt, yInt);\n if (this._vertexDictionary.has(key)) {\n return this._vertexDictionary.get(key);\n }\n const index = this._vertexBuffer.length / 2;\n this._vertexDictionary.set(key, index);\n this._vertexBuffer.push(xInt, yInt);\n return index;\n }\n\n /**\n * Subdivides a polygon by iterating over rows of granularity subdivision cells and splitting each row along vertical subdivision axes.\n * @param inputIndices - Indices into the internal vertex buffer of the triangulated polygon (after running `earcut`).\n * @returns Indices into the internal vertex buffer for triangles that are a subdivision of the input geometry.\n */\n private _subdivideTrianglesScanline(inputIndices: Array): Array {\n // A granularity cell is the square space between axes that subdivide geometry.\n // For granularity 8, cells would be 1024 by 1024 units.\n // For each triangle, we iterate over all cell rows it intersects, and generate subdivided geometry\n // only within one cell row at a time. This way, we implicitly subdivide along the X-parallel axes (cell row boundaries).\n // For each cell row, we generate an ordered point ring that describes the subdivided geometry inside this row (an intersection of the triangle and a given cell row).\n // Such ordered ring can be trivially triangulated.\n // Each ring may consist of sections of triangle edges that lie inside the cell row, and cell boundaries that lie inside the triangle. Both must be further subdivided along Y-parallel axes.\n // Most complexity of this function comes from generating correct vertex rings, and from placing the vertices into the ring in the correct order.\n\n if (this._granularity < 2) {\n // The actual subdivision code always produces triangles with the correct winding order.\n // Also apply winding order correction when skipping subdivision altogether to maintain consistency.\n return fixWindingOrder(this._vertexBuffer, inputIndices);\n }\n\n const finalIndices = [];\n\n // Iterate over all input triangles\n const numIndices = inputIndices.length;\n for (let primitiveIndex = 0; primitiveIndex < numIndices; primitiveIndex += 3) {\n const triangleIndices: [number, number, number] = [\n inputIndices[primitiveIndex + 0], // v0\n inputIndices[primitiveIndex + 1], // v1\n inputIndices[primitiveIndex + 2], // v2\n ];\n\n const triangleVertices: [number, number, number, number, number, number] = [\n this._vertexBuffer[inputIndices[primitiveIndex + 0] * 2 + 0], // v0.x\n this._vertexBuffer[inputIndices[primitiveIndex + 0] * 2 + 1], // v0.y\n this._vertexBuffer[inputIndices[primitiveIndex + 1] * 2 + 0], // v1.x\n this._vertexBuffer[inputIndices[primitiveIndex + 1] * 2 + 1], // v1.y\n this._vertexBuffer[inputIndices[primitiveIndex + 2] * 2 + 0], // v2.x\n this._vertexBuffer[inputIndices[primitiveIndex + 2] * 2 + 1], // v2.y\n ];\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n // Compute AABB\n for (let i = 0; i < 3; i++) {\n const vx = triangleVertices[i * 2];\n const vy = triangleVertices[i * 2 + 1];\n minX = Math.min(minX, vx);\n maxX = Math.max(maxX, vx);\n minY = Math.min(minY, vy);\n maxY = Math.max(maxY, vy);\n }\n\n if (minX === maxX || minY === maxY) {\n continue; // Skip degenerate linear axis-aligned triangles\n }\n\n const cellXmin = Math.floor(minX / this._granularityCellSize);\n const cellXmax = Math.ceil(maxX / this._granularityCellSize);\n const cellYmin = Math.floor(minY / this._granularityCellSize);\n const cellYmax = Math.ceil(maxY / this._granularityCellSize);\n\n // Skip subdividing triangles that do not span multiple cells - just add them \"as is\".\n if (cellXmin === cellXmax && cellYmin === cellYmax) {\n finalIndices.push(...triangleIndices);\n continue;\n }\n\n // Iterate over cell rows that intersect this triangle\n for (let cellRow = cellYmin; cellRow < cellYmax; cellRow++) {\n const ring = this._scanlineGenerateVertexRingForCellRow(cellRow, triangleVertices, triangleIndices);\n scanlineTriangulateVertexRing(this._vertexBuffer, ring, finalIndices);\n }\n }\n\n return finalIndices;\n }\n\n /**\n * Takes a triangle and a cell row index, returns a subdivided vertex ring of the intersection of the triangle and the cell row.\n * @param cellRow - Index of the cell row. A cell row of index `i` covert range from `i * granularityCellSize` to `(i + 1) * granularityCellSize`.\n * @param triangleVertices - An array of 6 elements, contains flattened positions of the triangle's vertices: `[v0x, v0y, v1x, v1y, v2x, v2y]`.\n * @param triangleIndices - An array of 3 elements, contains the original indices of the triangle's vertices: `[index0, index1, index2]`.\n * @returns The resulting ring of vertex indices and the index (to the returned ring array) of the leftmost vertex in the ring.\n */\n private _scanlineGenerateVertexRingForCellRow(\n cellRow: number,\n triangleVertices: [number, number, number, number, number, number],\n triangleIndices: [number, number, number]\n ) {\n const cellRowYTop = cellRow * this._granularityCellSize;\n const cellRowYBottom = cellRowYTop + this._granularityCellSize;\n const ring = [];\n\n // Generate the vertex ring\n for (let edgeIndex = 0; edgeIndex < 3; edgeIndex++) {\n // Current edge that will be subdivided: a --> b\n // The remaining vertex of the triangle: c\n const aX = triangleVertices[edgeIndex * 2];\n const aY = triangleVertices[edgeIndex * 2 + 1];\n const bX = triangleVertices[((edgeIndex + 1) * 2) % 6];\n const bY = triangleVertices[((edgeIndex + 1) * 2 + 1) % 6];\n const cX = triangleVertices[((edgeIndex + 2) * 2) % 6];\n const cY = triangleVertices[((edgeIndex + 2) * 2 + 1) % 6];\n // Edge direction\n const dirX = bX - aX;\n const dirY = bY - aY;\n\n // Edges parallel with either axis will need special handling later.\n const isParallelY = dirX === 0;\n const isParallelX = dirY === 0;\n\n // Distance along edge where it enters/exits current cell row,\n // where distance 0 is the edge start point, 1 the endpoint, 0.5 the mid point, etc.\n const tTop = (cellRowYTop - aY) / dirY;\n const tBottom = (cellRowYBottom - aY) / dirY;\n const tEnter = Math.min(tTop, tBottom);\n const tExit = Math.max(tTop, tBottom);\n\n // Determine if edge lies entirely outside this cell row.\n // Check entry and exit points, or if edge is parallel with X, check its Y coordinate.\n if ((!isParallelX && (tEnter >= 1 || tExit <= 0)) ||\n (isParallelX && (aY < cellRowYTop || aY > cellRowYBottom))) {\n // Skip this edge\n // But make sure to add its endpoint vertex if needed.\n if (bY >= cellRowYTop && bY <= cellRowYBottom) {\n // The edge endpoint is withing this row, add it to the ring\n ring.push(triangleIndices[(edgeIndex + 1) % 3]);\n }\n continue;\n }\n\n // Do not add original triangle vertices now, those are handled separately later\n\n // Special case: edge vertex for entry into cell row\n // If edge is parallel with X axis, there is no entry vertex\n if (!isParallelX && tEnter > 0) {\n const x = aX + dirX * tEnter;\n const y = aY + dirY * tEnter;\n ring.push(this._vertexToIndex(x, y));\n }\n\n // The X coordinates of the points where the edge enters/exits the current cell row,\n // or the edge start/endpoint, if the entry/exit happens beyond the edge bounds.\n const enterX = aX + dirX * Math.max(tEnter, 0);\n const exitX = aX + dirX * Math.min(tExit, 1);\n\n // Generate edge interior vertices\n // No need to subdivide (along X) edges that are parallel with Y\n if (!isParallelY) {\n this._generateIntraEdgeVertices(ring, aX, aY, bX, bY, enterX, exitX);\n }\n\n // Special case: edge vertex for exit from cell row\n if (!isParallelX && tExit < 1) {\n const x = aX + dirX * tExit;\n const y = aY + dirY * tExit;\n ring.push(this._vertexToIndex(x, y));\n }\n\n // When to split inter-edge boundary segments?\n // When the boundary doesn't intersect a vertex, its easy. But what if it does?\n\n // a\n // /|\n // / |\n // --c--|--boundary\n // \\ |\n // \\|\n // b\n //\n // Inter-edge region should be generated when processing the a-b edge.\n // This happens fine for the top row, for the bottom row,\n //\n\n // x\n // /|\n // / |\n // --x--x--boundary\n //\n // Edge that lies on boundary should be subdivided in its edge phase.\n // The inter-edge phase will correctly skip it.\n\n // Add endpoint vertex\n if (isParallelX || (bY >= cellRowYTop && bY <= cellRowYBottom)) {\n ring.push(triangleIndices[(edgeIndex + 1) % 3]);\n }\n // Any edge that has endpoint outside this row or on its boundary gets\n // inter-edge vertices.\n // No row boundary to split for edges parallel with X\n if (!isParallelX && (bY <= cellRowYTop || bY >= cellRowYBottom)) {\n this._generateInterEdgeVertices(ring, aX, aY, bX, bY, cX, cY,\n exitX, cellRowYTop, cellRowYBottom);\n }\n }\n\n return ring;\n }\n\n /**\n * Generates ring vertices along an edge A-\\>B, but only in the part that intersects a given cell row.\n * Does not handle adding edge endpoint vertices or edge cell row enter/exit vertices.\n * @param ring - Ordered array of vertex indices for the constructed ring. New indices are placed here.\n * @param enterX - The X coordinate of the point where edge A-\\>B enters the current cell row.\n * @param exitX - The X coordinate of the point where edge A-\\>B exits the current cell row.\n */\n private _generateIntraEdgeVertices(\n ring: Array,\n aX: number,\n aY: number,\n bX: number,\n bY: number,\n enterX: number,\n exitX: number\n ): void {\n const dirX = bX - aX;\n const dirY = bY - aY;\n const isParallelX = dirY === 0;\n\n const leftX = isParallelX ? Math.min(aX, bX) : Math.min(enterX, exitX);\n const rightX = isParallelX ? Math.max(aX, bX) : Math.max(enterX, exitX);\n\n const edgeSubdivisionLeftCellX = Math.floor(leftX / this._granularityCellSize) + 1;\n const edgeSubdivisionRightCellX = Math.ceil(rightX / this._granularityCellSize) - 1;\n\n const isEdgeLeftToRight = isParallelX ? (aX < bX) : (enterX < exitX);\n if (isEdgeLeftToRight) {\n // Left to right\n for (let cellX = edgeSubdivisionLeftCellX; cellX <= edgeSubdivisionRightCellX; cellX++) {\n const x = cellX * this._granularityCellSize;\n const y = aY + dirY * (x - aX) / dirX;\n ring.push(this._vertexToIndex(x, y));\n }\n } else {\n // Right to left\n for (let cellX = edgeSubdivisionRightCellX; cellX >= edgeSubdivisionLeftCellX; cellX--) {\n const x = cellX * this._granularityCellSize;\n const y = aY + dirY * (x - aX) / dirX;\n ring.push(this._vertexToIndex(x, y));\n }\n }\n }\n\n /**\n * Generates ring vertices along cell border.\n * Call when processing an edge A-\\>B that exits the current row (B lies outside the current row).\n * Generates vertices along the cell edge between the exit point from cell row\n * of edge A-\\>B and entry of edge B-\\>C, or entry of C-\\>A if both A and C lie outside the cell row.\n * Does not handle adding edge endpoint vertices or edge cell row enter/exit vertices.\n * @param ring - Ordered array of vertex indices for the constructed ring. New indices are placed here.\n * @param exitX - The X coordinate of the point where edge A-\\>B exits the current cell row.\n * @param cellRowYTop - The current cell row top Y coordinate.\n * @param cellRowYBottom - The current cell row bottom Y coordinate.\n */\n private _generateInterEdgeVertices(\n ring: Array,\n aX: number,\n aY: number,\n bX: number,\n bY: number,\n cX: number,\n cY: number,\n exitX: number,\n cellRowYTop: number,\n cellRowYBottom: number\n ): void {\n const dirY = bY - aY;\n\n const dir2X = cX - bX;\n const dir2Y = cY - bY;\n const t2Top = (cellRowYTop - bY) / dir2Y;\n const t2Bottom = (cellRowYBottom - bY) / dir2Y;\n // The distance along edge B->C where it enters/exits the current cell row,\n // where distance 0 is B, 1 is C, 0.5 is the edge midpoint, etc.\n const t2Enter = Math.min(t2Top, t2Bottom);\n const t2Exit = Math.max(t2Top, t2Bottom);\n const enter2X = bX + dir2X * t2Enter;\n let boundarySubdivisionLeftCellX = Math.floor(Math.min(enter2X, exitX) / this._granularityCellSize) + 1;\n let boundarySubdivisionRightCellX = Math.ceil(Math.max(enter2X, exitX) / this._granularityCellSize) - 1;\n let isBoundaryLeftToRight = exitX < enter2X;\n\n const isParallelX2 = dir2Y === 0;\n\n if (isParallelX2 && (cY === cellRowYTop || cY === cellRowYBottom)) {\n // Special case when edge b->c that lies on the cell boundary.\n // Do not generate any inter-edge vertices in this case,\n // this b->c edge gets subdivided when it is itself processed.\n return;\n }\n\n if (isParallelX2 || t2Enter >= 1 || t2Exit <= 0) {\n // The next edge (b->c) lies entirely outside this cell row\n // Find entry point for the edge after that instead (c->a)\n\n // There may be at most 1 edge that is parallel to X in a triangle.\n // The main \"a->b\" edge must not be parallel at this point in the code.\n // We know that \"a->b\" crosses the current cell row boundary, such that point \"b\" is beyond the boundary.\n // If \"b->c\" is parallel to X, then \"c->a\" must not be parallel and must cross the cell row boundary back:\n // a\n // |\\\n // -----|-\\--cell row boundary----\n // | \\\n // c---b\n // If \"b->c\" is not parallel to X and doesn't cross the cell row boundary,\n // then c->a must also not be parallel to X and must cross the cell boundary back,\n // since points \"a\" and \"c\" lie on different sides of the boundary and on different Y coordinates.\n //\n // Thus there is no need for \"parallel with X\" checks inside this condition branch.\n\n // Compute the X coordinate where edge C->A enters the current cell row\n const dir3X = aX - cX;\n const dir3Y = aY - cY;\n const t3Top = (cellRowYTop - cY) / dir3Y;\n const t3Bottom = (cellRowYBottom - cY) / dir3Y;\n const t3Enter = Math.min(t3Top, t3Bottom);\n const enter3X = cX + dir3X * t3Enter;\n\n boundarySubdivisionLeftCellX = Math.floor(Math.min(enter3X, exitX) / this._granularityCellSize) + 1;\n boundarySubdivisionRightCellX = Math.ceil(Math.max(enter3X, exitX) / this._granularityCellSize) - 1;\n isBoundaryLeftToRight = exitX < enter3X;\n }\n\n const boundaryY = dirY > 0 ? cellRowYBottom : cellRowYTop;\n if (isBoundaryLeftToRight) {\n // Left to right\n for (let cellX = boundarySubdivisionLeftCellX; cellX <= boundarySubdivisionRightCellX; cellX++) {\n const x = cellX * this._granularityCellSize;\n ring.push(this._vertexToIndex(x, boundaryY));\n }\n } else {\n // Right to left\n for (let cellX = boundarySubdivisionRightCellX; cellX >= boundarySubdivisionLeftCellX; cellX--) {\n const x = cellX * this._granularityCellSize;\n ring.push(this._vertexToIndex(x, boundaryY));\n }\n }\n }\n\n /**\n * Generates an outline for a given polygon, returns a list of arrays of line indices.\n */\n private _generateOutline(polygon: Array>): Array> {\n const subdividedLines: Array> = [];\n for (const ring of polygon) {\n const line = subdivideVertexLine(ring, this._granularity, true);\n const pathIndices = this._pointArrayToIndices(line);\n // Points returned by subdivideVertexLine are \"path\" waypoints,\n // for example with indices 0 1 2 3 0.\n // We need list of individual line segments for rendering,\n // for example 0, 1, 1, 2, 2, 3, 3, 0.\n const lineIndices: Array = [];\n for (let i = 1; i < pathIndices.length; i++) {\n lineIndices.push(pathIndices[i - 1]);\n lineIndices.push(pathIndices[i]);\n }\n subdividedLines.push(lineIndices);\n }\n return subdividedLines;\n }\n\n /**\n * Adds pole geometry if needed.\n * @param subdividedTriangles - Array of generated triangle indices, new pole geometry is appended here.\n */\n private _handlePoles(subdividedTriangles: Array) {\n // Add pole vertices if the tile is at north/south mercator edge\n let north = false;\n let south = false;\n if (this._canonical) {\n if (this._canonical.y === 0) {\n north = true;\n }\n if (this._canonical.y === (1 << this._canonical.z) - 1) {\n south = true;\n }\n }\n if (north || south) {\n this._fillPoles(subdividedTriangles, north, south);\n }\n }\n\n /**\n * Checks the internal vertex buffer for all vertices that might lie on the special pole coordinates and shifts them by one unit.\n * Use for removing unintended pole vertices that might have been created during subdivision. After calling this function, actual pole vertices can be safely generated.\n */\n private _ensureNoPoleVertices() {\n const flattened = this._vertexBuffer;\n\n for (let i = 0; i < flattened.length; i += 2) {\n const vy = flattened[i + 1];\n if (vy === NORTH_POLE_Y) {\n // Move slightly down\n flattened[i + 1] = NORTH_POLE_Y + 1;\n }\n if (vy === SOUTH_POLE_Y) {\n // Move slightly down\n flattened[i + 1] = SOUTH_POLE_Y - 1;\n }\n }\n }\n\n /**\n * Generates a quad from an edge to a pole with the correct winding order.\n * Helper function used inside {@link _fillPoles}.\n * @param indices - Index array into which the geometry is generated.\n * @param i0 - Index of the first edge vertex.\n * @param i1 - Index of the second edge vertex.\n * @param v0x - X coordinate of the first edge vertex.\n * @param v1x - X coordinate of the second edge vertex.\n * @param poleY - The Y coordinate of the desired pole (NORTH_POLE_Y or SOUTH_POLE_Y).\n */\n private _generatePoleQuad(indices, i0, i1, v0x, v1x, poleY): void {\n const flip = (v0x > v1x) !== (poleY === NORTH_POLE_Y);\n\n if (flip) {\n indices.push(i0);\n indices.push(i1);\n indices.push(this._vertexToIndex(v0x, poleY));\n\n indices.push(i1);\n indices.push(this._vertexToIndex(v1x, poleY));\n indices.push(this._vertexToIndex(v0x, poleY));\n } else {\n indices.push(i1);\n indices.push(i0);\n indices.push(this._vertexToIndex(v0x, poleY));\n\n indices.push(this._vertexToIndex(v1x, poleY));\n indices.push(i1);\n indices.push(this._vertexToIndex(v0x, poleY));\n }\n }\n\n /**\n * Detects edges that border the north or south tile edge\n * and adds triangles that extend those edges to the poles.\n * Only run this function on tiles that border the poles.\n * Assumes that supplied geometry is clipped to the inclusive range of 0..EXTENT.\n * Mutates the supplies vertex and index arrays.\n * @param indices - Triangle indices. This array is appended with new primitives.\n * @param north - Whether to generate geometry for the north pole.\n * @param south - Whether to generate geometry for the south pole.\n */\n private _fillPoles(indices: Array, north: boolean, south: boolean): void {\n const flattened = this._vertexBuffer;\n\n const northEdge = 0;\n const southEdge = EXTENT;\n\n const numIndices = indices.length;\n for (let primitiveIndex = 2; primitiveIndex < numIndices; primitiveIndex += 3) {\n const i0 = indices[primitiveIndex - 2];\n const i1 = indices[primitiveIndex - 1];\n const i2 = indices[primitiveIndex];\n const v0x = flattened[i0 * 2];\n const v0y = flattened[i0 * 2 + 1];\n const v1x = flattened[i1 * 2];\n const v1y = flattened[i1 * 2 + 1];\n const v2x = flattened[i2 * 2];\n const v2y = flattened[i2 * 2 + 1];\n\n if (north) {\n if (v0y === northEdge && v1y === northEdge) {\n this._generatePoleQuad(indices, i0, i1, v0x, v1x, NORTH_POLE_Y);\n }\n if (v1y === northEdge && v2y === northEdge) {\n this._generatePoleQuad(indices, i1, i2, v1x, v2x, NORTH_POLE_Y);\n }\n if (v2y === northEdge && v0y === northEdge) {\n this._generatePoleQuad(indices, i2, i0, v2x, v0x, NORTH_POLE_Y);\n }\n }\n if (south) {\n if (v0y === southEdge && v1y === southEdge) {\n this._generatePoleQuad(indices, i0, i1, v0x, v1x, SOUTH_POLE_Y);\n }\n if (v1y === southEdge && v2y === southEdge) {\n this._generatePoleQuad(indices, i1, i2, v1x, v2x, SOUTH_POLE_Y);\n }\n if (v2y === southEdge && v0y === southEdge) {\n this._generatePoleQuad(indices, i2, i0, v2x, v0x, SOUTH_POLE_Y);\n }\n }\n }\n }\n\n /**\n * Adds all vertices in the supplied flattened vertex buffer into the internal vertex buffer.\n */\n private _initializeVertices(flattened: Array) {\n for (let i = 0; i < flattened.length; i += 2) {\n this._vertexToIndex(flattened[i], flattened[i + 1]);\n }\n }\n\n /**\n * Subdivides an input mesh. Imagine a regular square grid with the target granularity overlaid over the mesh - this is the subdivision's result.\n * Assumes a mesh of tile features - vertex coordinates are integers, visible range where subdivision happens is 0..8192.\n * @param polygon - The input polygon, specified as a list of vertex rings.\n * @param generateOutlineLines - When true, also generates line indices for outline of the supplied polygon.\n * @returns Vertex and index buffers with subdivision applied.\n */\n public subdividePolygonInternal(polygon: Array>, generateOutlineLines: boolean): SubdivisionResult {\n if (this._used) {\n throw new Error('Subdivision: multiple use not allowed.');\n }\n this._used = true;\n\n // Initialize the vertex dictionary with input vertices since we will use all of them anyway\n const {flattened, holeIndices} = flatten(polygon);\n this._initializeVertices(flattened);\n\n // Subdivide triangles\n let subdividedTriangles: Array;\n try {\n // At this point this._finalVertices is just flattened polygon points\n const earcutResult = earcut(flattened, holeIndices);\n const cut = this._convertIndices(flattened, earcutResult);\n subdividedTriangles = this._subdivideTrianglesScanline(cut);\n } catch (e) {\n console.error(e);\n }\n\n // Subdivide lines\n let subdividedLines: Array> = [];\n if (generateOutlineLines) {\n subdividedLines = this._generateOutline(polygon);\n }\n\n // Ensure no vertex has the special value used for pole vertices\n this._ensureNoPoleVertices();\n\n // Add pole geometry if needed\n this._handlePoles(subdividedTriangles);\n\n return {\n verticesFlattened: this._vertexBuffer,\n indicesTriangles: subdividedTriangles,\n indicesLineList: subdividedLines,\n };\n }\n\n /**\n * Sometimes the supplies vertex and index array has duplicate vertices - same coordinates that are referenced by multiple different indices.\n * That is not allowed for purposes of subdivision, duplicates are removed in `this.initializeVertices`.\n * This function converts the original index array that indexes into the original vertex array with duplicates\n * into an index array that indexes into `this._finalVertices`.\n * @param vertices - Flattened vertex array used by the old indices. This may contain duplicate vertices.\n * @param oldIndices - Indices into the old vertex array.\n * @returns Indices transformed so that they are valid indices into `this._finalVertices` (with duplicates removed).\n */\n private _convertIndices(vertices: Array, oldIndices: Array): Array {\n const newIndices = [];\n for (let i = 0; i < oldIndices.length; i++) {\n const x = vertices[oldIndices[i] * 2];\n const y = vertices[oldIndices[i] * 2 + 1];\n newIndices.push(this._vertexToIndex(x, y));\n }\n return newIndices;\n }\n\n /**\n * Converts an array of points into an array of indices into the internal vertex buffer (`_finalVertices`).\n */\n private _pointArrayToIndices(array: Array): Array {\n const indices = [];\n for (let i = 0; i < array.length; i++) {\n const p = array[i];\n indices.push(this._vertexToIndex(p.x, p.y));\n }\n return indices;\n }\n}\n\n/**\n * Subdivides a polygon to a given granularity. Intended for preprocessing geometry for the 'fill' and 'fill-extrusion' layer types.\n * All returned triangles have the counter-clockwise winding order.\n * @param polygon - An array of point rings that specify the polygon. The first ring is the polygon exterior, all subsequent rings form holes inside the first ring.\n * @param canonical - The canonical tile ID of the tile this polygon belongs to. Needed for generating special geometry for tiles that border the poles.\n * @param granularity - The subdivision granularity. If we assume tile EXTENT=8192, then a granularity of 2 will result in geometry being \"cut\" on each axis\n * divisible by 4096 (including outside the tile range, so -8192, -4096, or 12288...), granularity of 8 on axes divisible by 1024 and so on.\n * Granularity of 1 or lower results in *no* subdivision.\n * @param generateOutlineLines - When true, also generates index arrays for subdivided lines that form the outline of the supplied polygon. True by default.\n * @returns An object that contains the generated vertex array, triangle index array and, if specified, line index arrays.\n */\nexport function subdividePolygon(polygon: Array>, canonical: CanonicalTileID, granularity: number, generateOutlineLines: boolean = true): SubdivisionResult {\n const subdivider = new Subdivider(granularity, canonical);\n return subdivider.subdividePolygonInternal(polygon, generateOutlineLines);\n}\n\n/**\n * Subdivides a line represented by an array of points. Mainly intended for preprocessing geometry for the 'line' layer type.\n * Assumes a line segment between each two consecutive points in the array.\n * Does not assume a line segment from last point to first point, unless `isRing` is set to `true`.\n * For example, an array of 4 points describes exactly 3 line segments.\n * @param linePoints - An array of points describing the line segments.\n * @param granularity - Subdivision granularity.\n * @param isRing - When true, an additional line segment is assumed to exist between the input array's last and first point.\n * @returns A new array of points of the subdivided line segments. The array may contain some of the original Point objects. If `isRing` is set to `true`, then this also includes the (subdivided) segment from the last point of the input array to the first point.\n *\n * @example\n * ```ts\n * const result = subdivideVertexLine([\n * new Point(0, 0),\n * new Point(8, 0),\n * new Point(0, 8),\n * ], EXTENT / 4, false);\n * // Results in an array of points with these (x, y) coordinates:\n * // 0, 0\n * // 4, 0\n * // 8, 0\n * // 4, 4\n * // 0, 8\n * ```\n *\n * @example\n * ```ts\n * const result = subdivideVertexLine([\n * new Point(0, 0),\n * new Point(8, 0),\n * new Point(0, 8),\n * ], EXTENT / 4, true);\n * // Results in an array of points with these (x, y) coordinates:\n * // 0, 0\n * // 4, 0\n * // 8, 0\n * // 4, 4\n * // 0, 8\n * // 0, 4\n * // 0, 0\n * ```\n */\nexport function subdivideVertexLine(linePoints: Array, granularity: number, isRing: boolean = false): Array {\n if (!linePoints || linePoints.length < 1) {\n return [];\n }\n\n if (linePoints.length < 2) {\n return [];\n }\n\n // Generate an extra line segment between the input array's first and last points,\n // but only if isRing=true AND the first and last points actually differ.\n const first = linePoints[0];\n const last = linePoints[linePoints.length - 1];\n const addLastToFirstSegment = isRing && (first.x !== last.x || first.y !== last.y);\n\n if (granularity < 2) {\n if (addLastToFirstSegment) {\n return [...linePoints, linePoints[0]];\n } else {\n return [...linePoints];\n }\n }\n\n const cellSize = Math.floor(EXTENT / granularity);\n const finalLineVertices: Array = [];\n\n finalLineVertices.push(new Point(linePoints[0].x, linePoints[0].y));\n\n // Iterate over all input lines\n const totalPoints = linePoints.length;\n const lastIndex = addLastToFirstSegment ? totalPoints : (totalPoints - 1);\n for (let pointIndex = 0; pointIndex < lastIndex; pointIndex++) {\n const linePoint0 = linePoints[pointIndex];\n const linePoint1 = pointIndex < (totalPoints - 1) ? linePoints[pointIndex + 1] : linePoints[0];\n const lineVertex0x = linePoint0.x;\n const lineVertex0y = linePoint0.y;\n const lineVertex1x = linePoint1.x;\n const lineVertex1y = linePoint1.y;\n\n const dirXnonZero = lineVertex0x !== lineVertex1x;\n const dirYnonZero = lineVertex0y !== lineVertex1y;\n\n if (!dirXnonZero && !dirYnonZero) {\n continue;\n }\n\n const dirX = lineVertex1x - lineVertex0x;\n const dirY = lineVertex1y - lineVertex0y;\n const absDirX = Math.abs(dirX);\n const absDirY = Math.abs(dirY);\n\n let lastPointX = lineVertex0x;\n let lastPointY = lineVertex0y;\n\n // Walk along the line segment from start to end. In every step,\n // find out the distance from start until the line intersects either the X-parallel or Y-parallel subdivision axis.\n // Pick the closer intersection, add it to the final line points and consider that point the new start of the line.\n // But also make sure the intersection point does not lie beyond the end of the line.\n // If none of the intersection points is closer than line end, add the endpoint to the final line and break the loop.\n\n while (true) {\n const nextBoundaryX = dirX > 0 ?\n ((Math.floor(lastPointX / cellSize) + 1) * cellSize) :\n ((Math.ceil(lastPointX / cellSize) - 1) * cellSize);\n const nextBoundaryY = dirY > 0 ?\n ((Math.floor(lastPointY / cellSize) + 1) * cellSize) :\n ((Math.ceil(lastPointY / cellSize) - 1) * cellSize);\n const axisDistanceToBoundaryX = Math.abs(lastPointX - nextBoundaryX);\n const axisDistanceToBoundaryY = Math.abs(lastPointY - nextBoundaryY);\n\n const axisDistanceToEndX = Math.abs(lastPointX - lineVertex1x);\n const axisDistanceToEndY = Math.abs(lastPointY - lineVertex1y);\n\n const realDistanceToBoundaryX = dirXnonZero ? axisDistanceToBoundaryX / absDirX : Number.POSITIVE_INFINITY;\n const realDistanceToBoundaryY = dirYnonZero ? axisDistanceToBoundaryY / absDirY : Number.POSITIVE_INFINITY;\n\n if ((axisDistanceToEndX <= axisDistanceToBoundaryX || !dirXnonZero) &&\n (axisDistanceToEndY <= axisDistanceToBoundaryY || !dirYnonZero)) {\n break;\n }\n\n if ((realDistanceToBoundaryX < realDistanceToBoundaryY && dirXnonZero) || !dirYnonZero) {\n // We hit the X cell boundary first\n // Always consider the X cell hit if Y dir is zero\n lastPointX = nextBoundaryX;\n lastPointY = lastPointY + dirY * realDistanceToBoundaryX;\n const next = new Point(lastPointX, Math.round(lastPointY));\n\n // Do not add the next vertex if it is equal to the last added vertex\n if (finalLineVertices[finalLineVertices.length - 1].x !== next.x ||\n finalLineVertices[finalLineVertices.length - 1].y !== next.y) {\n finalLineVertices.push(next);\n }\n } else {\n lastPointX = lastPointX + dirX * realDistanceToBoundaryY;\n lastPointY = nextBoundaryY;\n const next = new Point(Math.round(lastPointX), lastPointY);\n\n if (finalLineVertices[finalLineVertices.length - 1].x !== next.x ||\n finalLineVertices[finalLineVertices.length - 1].y !== next.y) {\n finalLineVertices.push(next);\n }\n }\n }\n\n const last = new Point(lineVertex1x, lineVertex1y);\n if (finalLineVertices[finalLineVertices.length - 1].x !== last.x ||\n finalLineVertices[finalLineVertices.length - 1].y !== last.y) {\n finalLineVertices.push(last);\n }\n }\n\n return finalLineVertices;\n}\n\n/**\n * Takes a polygon as an array of point rings, returns a flattened array of the X,Y coordinates of these points.\n * Also creates an array of hole indices. Both returned arrays are required for `earcut`.\n */\nfunction flatten(polygon: Array>): {\n flattened: Array;\n holeIndices: Array;\n} {\n const holeIndices = [];\n const flattened = [];\n\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n if (ring !== polygon[0]) {\n holeIndices.push(flattened.length / 2);\n }\n\n for (let i = 0; i < ring.length; i++) {\n flattened.push(ring[i].x);\n flattened.push(ring[i].y);\n }\n }\n\n return {\n flattened,\n holeIndices\n };\n}\n\n/**\n * Returns a new array of indices where all triangles have the counter-clockwise winding order.\n * @param flattened - Flattened vertex buffer.\n * @param indices - Triangle indices.\n */\nexport function fixWindingOrder(flattened: Array, indices: Array): Array {\n const corrected = [];\n\n for (let i = 0; i < indices.length; i += 3) {\n const i0 = indices[i];\n const i1 = indices[i + 1];\n const i2 = indices[i + 2];\n\n const v0x = flattened[i0 * 2];\n const v0y = flattened[i0 * 2 + 1];\n const v1x = flattened[i1 * 2];\n const v1y = flattened[i1 * 2 + 1];\n const v2x = flattened[i2 * 2];\n const v2y = flattened[i2 * 2 + 1];\n\n const e0x = v1x - v0x;\n const e0y = v1y - v0y;\n const e1x = v2x - v0x;\n const e1y = v2y - v0y;\n\n const crossProduct = e0x * e1y - e0y * e1x;\n\n if (crossProduct > 0) {\n // Flip\n corrected.push(i0);\n corrected.push(i2);\n corrected.push(i1);\n } else {\n // Don't flip\n corrected.push(i0);\n corrected.push(i1);\n corrected.push(i2);\n }\n }\n\n return corrected;\n}\n\n/**\n * Triangulates a ring of vertex indices. Appends to the supplied array of final triangle indices.\n * @param vertexBuffer - Flattened vertex coordinate array.\n * @param ring - Ordered ring of vertex indices to triangulate.\n * @param leftmostIndex - The index of the leftmost vertex in the supplied ring.\n * @param finalIndices - Array of final triangle indices, into where the resulting triangles are appended.\n */\nexport function scanlineTriangulateVertexRing(vertexBuffer: Array, ring: Array, finalIndices: Array): void {\n // Triangulate the ring\n // It is guaranteed to be convex and ordered\n if (ring.length === 0) {\n throw new Error('Subdivision vertex ring is empty.');\n }\n\n // Find the leftmost vertex in the ring\n let leftmostIndex = 0;\n let leftmostX = vertexBuffer[ring[0] * 2];\n for (let i = 1; i < ring.length; i++) {\n const x = vertexBuffer[ring[i] * 2];\n if (x < leftmostX) {\n leftmostX = x;\n leftmostIndex = i;\n }\n }\n\n // Traverse the ring in both directions from the leftmost vertex\n // Assume ring is in CCW order (to produce CCW triangles)\n const ringVertexLength = ring.length;\n let lastEdgeA = leftmostIndex;\n let lastEdgeB = (lastEdgeA + 1) % ringVertexLength;\n\n while (true) {\n const candidateIndexA = (lastEdgeA - 1) >= 0 ? (lastEdgeA - 1) : (ringVertexLength - 1);\n const candidateIndexB = (lastEdgeB + 1) % ringVertexLength;\n\n // Pick candidate, move edge\n const candidateAx = vertexBuffer[ring[candidateIndexA] * 2];\n const candidateAy = vertexBuffer[ring[candidateIndexA] * 2 + 1];\n const candidateBx = vertexBuffer[ring[candidateIndexB] * 2];\n const candidateBy = vertexBuffer[ring[candidateIndexB] * 2 + 1];\n const lastEdgeAx = vertexBuffer[ring[lastEdgeA] * 2];\n const lastEdgeAy = vertexBuffer[ring[lastEdgeA] * 2 + 1];\n const lastEdgeBx = vertexBuffer[ring[lastEdgeB] * 2];\n const lastEdgeBy = vertexBuffer[ring[lastEdgeB] * 2 + 1];\n\n let pickA = false;\n\n if (candidateAx < candidateBx) {\n pickA = true;\n } else if (candidateAx > candidateBx) {\n pickA = false;\n } else {\n // Pick the candidate that is more \"right\" of the last edge's line\n const ex = lastEdgeBx - lastEdgeAx;\n const ey = lastEdgeBy - lastEdgeAy;\n const nx = ey;\n const ny = -ex;\n const sign = (lastEdgeAy < lastEdgeBy) ? 1 : -1;\n // dot( (candidateA <-- lastEdgeA), normal )\n const aRight = ((candidateAx - lastEdgeAx) * nx + (candidateAy - lastEdgeAy) * ny) * sign;\n // dot( (candidateB <-- lastEdgeA), normal )\n const bRight = ((candidateBx - lastEdgeAx) * nx + (candidateBy - lastEdgeAy) * ny) * sign;\n if (aRight > bRight) {\n pickA = true;\n }\n }\n\n if (pickA) {\n // Pick candidate A\n const c = ring[candidateIndexA];\n const a = ring[lastEdgeA];\n const b = ring[lastEdgeB];\n if (c !== a && c !== b && a !== b) {\n finalIndices.push(b, a, c);\n }\n lastEdgeA--;\n if (lastEdgeA < 0) {\n lastEdgeA = ringVertexLength - 1;\n }\n } else {\n // Pick candidate B\n const c = ring[candidateIndexB];\n const a = ring[lastEdgeA];\n const b = ring[lastEdgeB];\n if (c !== a && c !== b && a !== b) {\n finalIndices.push(b, a, c);\n }\n lastEdgeB++;\n if (lastEdgeB >= ringVertexLength) {\n lastEdgeB = 0;\n }\n }\n\n if (candidateIndexA === candidateIndexB) {\n break; // We ran out of ring vertices\n }\n }\n}\n","import {type LineIndexArray, type TriangleIndexArray} from '../data/array_types.g';\nimport {type Segment, SegmentVector} from '../data/segment';\nimport {type StructArray} from '../util/struct_array';\n\n/**\n * This function will take any \"mesh\" and fill in into vertex buffers, breaking it up into multiple drawcalls as needed\n * if too many (\\>65535) vertices are used.\n * This function is mainly intended for use with subdivided geometry, since sometimes subdivision might generate\n * more vertices than what fits into 16 bit indices.\n *\n * Accepts a triangle mesh, optionally with a line list (for fill outlines) as well. The triangle and line segments are expected to share a single vertex buffer.\n *\n * Mutates the provided `segmentsTriangles` and `segmentsLines` SegmentVectors,\n * `vertexArray`, `triangleIndexArray` and optionally `lineIndexArray`.\n * Does not mutate the input `flattened` vertices, `triangleIndices` and `lineList`.\n * @param addVertex - A function for adding a new vertex into `vertexArray`. We might sometimes want to add more values per vertex than just X and Y coordinates, which can be handled in this function.\n * @param segmentsTriangles - The segment array for triangle draw calls. New segments will be placed here.\n * @param vertexArray - The vertex array into which new vertices are placed by the provided `addVertex` function.\n * @param triangleIndexArray - Index array for drawing triangles. New triangle indices are placed here.\n * @param flattened - The input flattened array or vertex coordinates.\n * @param triangleIndices - Triangle indices into `flattened`.\n * @param segmentsLines - Segment array for line draw calls. New segments will be placed here. Only needed if the mesh also contains lines.\n * @param lineIndexArray - Index array for drawing lines. New triangle indices are placed here. Only needed if the mesh also contains lines.\n * @param lineList - Line indices into `flattened`. Only needed if the mesh also contains lines.\n */\nexport function fillLargeMeshArrays(\n addVertex: (x: number, y: number) => void,\n segmentsTriangles: SegmentVector,\n vertexArray: StructArray,\n triangleIndexArray: TriangleIndexArray,\n flattened: Array,\n triangleIndices: Array,\n segmentsLines?: SegmentVector,\n lineIndexArray?: LineIndexArray,\n lineList?: Array>) {\n\n const numVertices = flattened.length / 2;\n const hasLines = segmentsLines && lineIndexArray && lineList;\n\n if (numVertices < SegmentVector.MAX_VERTEX_ARRAY_LENGTH) {\n // The fast path - no segmentation needed\n const triangleSegment = segmentsTriangles.prepareSegment(numVertices, vertexArray, triangleIndexArray);\n const triangleIndex = triangleSegment.vertexLength;\n\n for (let i = 0; i < triangleIndices.length; i += 3) {\n triangleIndexArray.emplaceBack(\n triangleIndex + triangleIndices[i],\n triangleIndex + triangleIndices[i + 1],\n triangleIndex + triangleIndices[i + 2]);\n }\n\n triangleSegment.vertexLength += numVertices;\n triangleSegment.primitiveLength += triangleIndices.length / 3;\n\n let lineIndicesStart: number;\n let lineSegment: Segment;\n\n if (hasLines) {\n // Note that segment creation must happen *before* we add vertices into the vertex buffer\n lineSegment = segmentsLines.prepareSegment(numVertices, vertexArray, lineIndexArray);\n lineIndicesStart = lineSegment.vertexLength;\n lineSegment.vertexLength += numVertices;\n }\n\n // Add vertices into vertex buffer\n for (let i = 0; i < flattened.length; i += 2) {\n addVertex(flattened[i], flattened[i + 1]);\n }\n\n if (hasLines) {\n for (let listIndex = 0; listIndex < lineList.length; listIndex++) {\n const lineIndices = lineList[listIndex];\n\n for (let i = 1; i < lineIndices.length; i += 2) {\n lineIndexArray.emplaceBack(\n lineIndicesStart + lineIndices[i - 1],\n lineIndicesStart + lineIndices[i]);\n }\n\n lineSegment.primitiveLength += lineIndices.length / 2;\n }\n }\n } else {\n // Assumption: the incoming triangle indices use vertices in roughly linear order,\n // for example a grid of quads where both vertices and quads are created row by row would satisfy this.\n // Some completely random arbitrary vertex/triangle order would not.\n // Thus, if we encounter a vertex that doesn't fit into MAX_VERTEX_ARRAY_LENGTH,\n // we can just stop appending into the old segment and start a new segment and only append to the new segment,\n // copying vertices that are already present in the old segment into the new segment if needed,\n // because there will not be too many of such vertices.\n\n // Normally, (out)lines share the same vertex buffer as triangles, but since we need to somehow split it into several drawcalls,\n // it is easier to just consider (out)lines separately and duplicate their vertices.\n\n fillSegmentsTriangles(segmentsTriangles, vertexArray, triangleIndexArray, flattened, triangleIndices, addVertex);\n if (hasLines) {\n fillSegmentsLines(segmentsLines, vertexArray, lineIndexArray, flattened, lineList, addVertex);\n }\n\n // Triangles and lines share the same vertex buffer, and they usually also share the same vertices.\n // But this method might create the vertices for triangles and for lines separately, and thus increasing the vertex count\n // of the triangle and line segments by different amounts.\n\n // The non-splitting fillLargeMeshArrays logic (and old fill-bucket logic) assumes the vertex counts to be the same,\n // and forcing both SegmentVectors to return a new segment upon next prepare call satisfies this.\n segmentsTriangles.forceNewSegmentOnNextPrepare();\n segmentsLines?.forceNewSegmentOnNextPrepare();\n }\n}\n\n/**\n * Determines the new index of a vertex given by its old index.\n * @param actualVertexIndices - Array that maps the old index of a given vertex to a new index in the final vertex buffer.\n * @param flattened - Old vertex buffer.\n * @param addVertex - Function for creating a new vertex in the final vertex buffer.\n * @param totalVerticesCreated - Reference to an int holding how many vertices were added to the final vertex buffer.\n * @param oldIndex - The old index of the desired vertex.\n * @param needsCopy - Whether to duplicate the desired vertex in the final vertex buffer.\n * @param segment - The current segment.\n * @returns Index of the vertex in the final vertex array.\n */\nfunction copyOrReuseVertex(\n actualVertexIndices: Array,\n flattened: Array,\n addVertex: (x: number, y: number) => void,\n totalVerticesCreated: {count: number},\n oldIndex: number,\n needsCopy: boolean,\n segment: Segment\n): number {\n if (needsCopy) {\n const newIndex = totalVerticesCreated.count;\n addVertex(flattened[oldIndex * 2], flattened[oldIndex * 2 + 1]);\n actualVertexIndices[oldIndex] = totalVerticesCreated.count;\n totalVerticesCreated.count++;\n segment.vertexLength++;\n return newIndex;\n } else {\n return actualVertexIndices[oldIndex];\n }\n}\n\nfunction fillSegmentsTriangles(\n segmentsTriangles: SegmentVector,\n vertexArray: StructArray,\n triangleIndexArray: TriangleIndexArray,\n flattened: Array,\n triangleIndices: Array,\n addVertex: (x: number, y: number) => void\n) {\n // Array, or rather a map of [vertex index in the original data] -> index of the latest copy of this vertex in the final vertex buffer.\n const actualVertexIndices: Array = [];\n for (let i = 0; i < flattened.length / 2; i++) {\n actualVertexIndices.push(-1);\n }\n\n const totalVerticesCreated = {count: 0};\n\n let currentSegmentCutoff = 0;\n let segment = segmentsTriangles.getOrCreateLatestSegment(vertexArray, triangleIndexArray);\n let baseVertex = segment.vertexLength;\n\n for (let primitiveEndIndex = 2; primitiveEndIndex < triangleIndices.length; primitiveEndIndex += 3) {\n const i0 = triangleIndices[primitiveEndIndex - 2];\n const i1 = triangleIndices[primitiveEndIndex - 1];\n const i2 = triangleIndices[primitiveEndIndex];\n\n let i0needsVertexCopy = actualVertexIndices[i0] < currentSegmentCutoff;\n let i1needsVertexCopy = actualVertexIndices[i1] < currentSegmentCutoff;\n let i2needsVertexCopy = actualVertexIndices[i2] < currentSegmentCutoff;\n\n const vertexCopyCount = (i0needsVertexCopy ? 1 : 0) + (i1needsVertexCopy ? 1 : 0) + (i2needsVertexCopy ? 1 : 0);\n\n // Will needed vertex copies fit into this segment?\n if (segment.vertexLength + vertexCopyCount > SegmentVector.MAX_VERTEX_ARRAY_LENGTH) {\n // Break up into a new segment if not.\n segment = segmentsTriangles.createNewSegment(vertexArray, triangleIndexArray);\n currentSegmentCutoff = totalVerticesCreated.count;\n i0needsVertexCopy = true;\n i1needsVertexCopy = true;\n i2needsVertexCopy = true;\n baseVertex = 0;\n }\n\n const actualIndex0 = copyOrReuseVertex(\n actualVertexIndices, flattened, addVertex, totalVerticesCreated,\n i0, i0needsVertexCopy, segment);\n const actualIndex1 = copyOrReuseVertex(\n actualVertexIndices, flattened, addVertex, totalVerticesCreated,\n i1, i1needsVertexCopy, segment);\n const actualIndex2 = copyOrReuseVertex(\n actualVertexIndices, flattened, addVertex, totalVerticesCreated,\n i2, i2needsVertexCopy, segment);\n\n triangleIndexArray.emplaceBack(\n baseVertex + actualIndex0 - currentSegmentCutoff,\n baseVertex + actualIndex1 - currentSegmentCutoff,\n baseVertex + actualIndex2 - currentSegmentCutoff\n );\n\n segment.primitiveLength++;\n }\n}\n\nfunction fillSegmentsLines(\n segmentsLines: SegmentVector,\n vertexArray: StructArray,\n lineIndexArray: LineIndexArray,\n flattened: Array,\n lineList: Array>,\n addVertex: (x: number, y: number) => void\n) {\n // Array, or rather a map of [vertex index in the original data] -> index of the latest copy of this vertex in the final vertex buffer.\n const actualVertexIndices: Array = [];\n for (let i = 0; i < flattened.length / 2; i++) {\n actualVertexIndices.push(-1);\n }\n\n const totalVerticesCreated = {count: 0};\n\n let currentSegmentCutoff = 0;\n let segment = segmentsLines.getOrCreateLatestSegment(vertexArray, lineIndexArray);\n let baseVertex = segment.vertexLength;\n\n for (let lineListIndex = 0; lineListIndex < lineList.length; lineListIndex++) {\n const currentLine = lineList[lineListIndex];\n for (let lineVertex = 1; lineVertex < lineList[lineListIndex].length; lineVertex += 2) {\n const i0 = currentLine[lineVertex - 1];\n const i1 = currentLine[lineVertex];\n\n let i0needsVertexCopy = actualVertexIndices[i0] < currentSegmentCutoff;\n let i1needsVertexCopy = actualVertexIndices[i1] < currentSegmentCutoff;\n\n const vertexCopyCount = (i0needsVertexCopy ? 1 : 0) + (i1needsVertexCopy ? 1 : 0);\n\n // Will needed vertex copies fit into this segment?\n if (segment.vertexLength + vertexCopyCount > SegmentVector.MAX_VERTEX_ARRAY_LENGTH) {\n // Break up into a new segment if not.\n segment = segmentsLines.createNewSegment(vertexArray, lineIndexArray);\n currentSegmentCutoff = totalVerticesCreated.count;\n i0needsVertexCopy = true;\n i1needsVertexCopy = true;\n baseVertex = 0;\n }\n\n const actualIndex0 = copyOrReuseVertex(\n actualVertexIndices, flattened, addVertex, totalVerticesCreated,\n i0, i0needsVertexCopy, segment);\n const actualIndex1 = copyOrReuseVertex(\n actualVertexIndices, flattened, addVertex, totalVerticesCreated,\n i1, i1needsVertexCopy, segment);\n\n lineIndexArray.emplaceBack(\n baseVertex + actualIndex0 - currentSegmentCutoff,\n baseVertex + actualIndex1 - currentSegmentCutoff\n );\n\n segment.primitiveLength++;\n }\n }\n}\n","import {FillLayoutArray} from '../array_types.g';\n\nimport {members as layoutAttributes} from './fill_attributes';\nimport {SegmentVector} from '../segment';\nimport {ProgramConfigurationSet} from '../program_configuration';\nimport {LineIndexArray, TriangleIndexArray} from '../index_array_type';\nimport {classifyRings} from '@maplibre/maplibre-gl-style-spec';\nconst EARCUT_MAX_RINGS = 500;\nimport {register} from '../../util/web_worker_transfer';\nimport {hasPattern, addPatternDependencies} from './pattern_bucket_features';\nimport {loadGeometry} from '../load_geometry';\nimport {toEvaluationFeature} from '../evaluation_feature';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\n\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport type {\n Bucket,\n BucketParameters,\n BucketFeature,\n IndexedFeature,\n PopulateParameters\n} from '../bucket';\nimport type {FillStyleLayer} from '../../style/style_layer/fill_style_layer';\nimport type {Context} from '../../gl/context';\nimport type {IndexBuffer} from '../../gl/index_buffer';\nimport type {VertexBuffer} from '../../gl/vertex_buffer';\nimport type Point from '@mapbox/point-geometry';\nimport type {FeatureStates} from '../../source/source_state';\nimport type {ImagePosition} from '../../render/image_atlas';\nimport {subdividePolygon} from '../../render/subdivision';\nimport type {SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\nimport {fillLargeMeshArrays} from '../../render/fill_large_mesh_arrays';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nexport class FillBucket implements Bucket {\n index: number;\n zoom: number;\n overscaling: number;\n layers: Array;\n layerIds: Array;\n stateDependentLayers: Array;\n stateDependentLayerIds: Array;\n patternFeatures: Array;\n\n layoutVertexArray: FillLayoutArray;\n layoutVertexBuffer: VertexBuffer;\n\n indexArray: TriangleIndexArray;\n indexBuffer: IndexBuffer;\n\n indexArray2: LineIndexArray;\n indexBuffer2: IndexBuffer;\n\n hasDependencies: boolean;\n programConfigurations: ProgramConfigurationSet;\n segments: SegmentVector;\n segments2: SegmentVector;\n uploaded: boolean;\n\n constructor(options: BucketParameters) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.hasDependencies = false;\n this.patternFeatures = [];\n\n this.layoutVertexArray = new FillLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.indexArray2 = new LineIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(options.layers, options.zoom);\n this.segments = new SegmentVector();\n this.segments2 = new SegmentVector();\n this.stateDependentLayerIds = this.layers.filter((l) => l.isStateDependent()).map((l) => l.id);\n }\n\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID) {\n this.hasDependencies = hasPattern('fill', this.layers, options);\n const fillSortKey = this.layers[0].layout.get('fill-sort-key');\n const sortFeaturesByKey = !fillSortKey.isConstant();\n const bucketFeatures: BucketFeature[] = [];\n\n for (const {feature, id, index, sourceLayerIndex} of features) {\n const needGeometry = this.layers[0]._featureFilter.needGeometry;\n const evaluationFeature = toEvaluationFeature(feature, needGeometry);\n\n if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;\n\n const sortKey = sortFeaturesByKey ?\n fillSortKey.evaluate(evaluationFeature, {}, canonical, options.availableImages) :\n undefined;\n\n const bucketFeature: BucketFeature = {\n id,\n properties: feature.properties,\n type: feature.type,\n sourceLayerIndex,\n index,\n geometry: needGeometry ? evaluationFeature.geometry : loadGeometry(feature),\n patterns: {},\n sortKey\n };\n\n bucketFeatures.push(bucketFeature);\n }\n\n if (sortFeaturesByKey) {\n bucketFeatures.sort((a, b) => a.sortKey - b.sortKey);\n }\n\n for (const bucketFeature of bucketFeatures) {\n const {geometry, index, sourceLayerIndex} = bucketFeature;\n\n if (this.hasDependencies) {\n const patternFeature = addPatternDependencies('fill', this.layers, bucketFeature, {zoom: this.zoom}, options);\n // pattern features are added only once the pattern is loaded into the image atlas\n // so are stored during populate until later updated with positions by tile worker in addFeatures\n this.patternFeatures.push(patternFeature);\n } else {\n this.addFeature(bucketFeature, geometry, index, canonical, {}, options.subdivisionGranularity);\n }\n\n const feature = features[index].feature;\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {\n [_: string]: ImagePosition;\n }) {\n if (!this.stateDependentLayers.length) return;\n this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers, {\n imagePositions\n });\n }\n\n addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {\n [_: string]: ImagePosition;\n }) {\n for (const feature of this.patternFeatures) {\n this.addFeature(feature, feature.geometry, feature.index, canonical, imagePositions, options.subdivisionGranularity);\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n uploadPending(): boolean {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n upload(context: Context) {\n if (!this.uploaded) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.indexBuffer2 = context.createIndexBuffer(this.indexArray2);\n }\n this.programConfigurations.upload(context);\n this.uploaded = true;\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.indexBuffer2.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n this.segments2.destroy();\n }\n\n addFeature(feature: BucketFeature, geometry: Array>, index: number, canonical: CanonicalTileID, imagePositions: {\n [_: string]: ImagePosition;\n }, subdivisionGranularity: SubdivisionGranularitySetting) {\n for (const polygon of classifyRings(geometry, EARCUT_MAX_RINGS)) {\n const subdivided = subdividePolygon(polygon, canonical, subdivisionGranularity.fill.getGranularityForZoomLevel(canonical.z));\n\n const vertexArray = this.layoutVertexArray;\n\n fillLargeMeshArrays(\n (x, y) => {\n vertexArray.emplaceBack(x, y);\n },\n this.segments,\n this.layoutVertexArray,\n this.indexArray,\n subdivided.verticesFlattened,\n subdivided.indicesTriangles,\n this.segments2,\n this.indexArray2,\n subdivided.indicesLineList,\n );\n }\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, {imagePositions, canonical});\n }\n}\n\nregister('FillBucket', FillBucket, {omit: ['layers', 'patternFeatures']});\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type FillLayoutProps = {\n \"fill-sort-key\": DataDrivenProperty,\n};\n\nexport type FillLayoutPropsPossiblyEvaluated = {\n \"fill-sort-key\": PossiblyEvaluatedPropertyValue,\n};\n\nlet layout: Properties;\nconst getLayout = () => layout = layout || new Properties({\n \"fill-sort-key\": new DataDrivenProperty(styleSpec[\"layout_fill\"][\"fill-sort-key\"] as any as StylePropertySpecification),\n});\n\nexport type FillPaintProps = {\n \"fill-antialias\": DataConstantProperty,\n \"fill-opacity\": DataDrivenProperty,\n \"fill-color\": DataDrivenProperty,\n \"fill-outline-color\": DataDrivenProperty,\n \"fill-translate\": DataConstantProperty<[number, number]>,\n \"fill-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"fill-pattern\": CrossFadedDataDrivenProperty,\n};\n\nexport type FillPaintPropsPossiblyEvaluated = {\n \"fill-antialias\": boolean,\n \"fill-opacity\": PossiblyEvaluatedPropertyValue,\n \"fill-color\": PossiblyEvaluatedPropertyValue,\n \"fill-outline-color\": PossiblyEvaluatedPropertyValue,\n \"fill-translate\": [number, number],\n \"fill-translate-anchor\": \"map\" | \"viewport\",\n \"fill-pattern\": PossiblyEvaluatedPropertyValue>,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"fill-antialias\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-antialias\"] as any as StylePropertySpecification),\n \"fill-opacity\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-opacity\"] as any as StylePropertySpecification),\n \"fill-color\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-color\"] as any as StylePropertySpecification),\n \"fill-outline-color\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-outline-color\"] as any as StylePropertySpecification),\n \"fill-translate\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-translate\"] as any as StylePropertySpecification),\n \"fill-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-translate-anchor\"] as any as StylePropertySpecification),\n \"fill-pattern\": new CrossFadedDataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-pattern\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() }, get layout() { return getLayout() } });","import {type QueryIntersectsFeatureParams, StyleLayer} from '../style_layer';\nimport {FillBucket} from '../../data/bucket/fill_bucket';\nimport {polygonIntersectsMultiPolygon} from '../../util/intersection_tests';\nimport {translateDistance, translate} from '../query_utils';\nimport properties, {type FillLayoutPropsPossiblyEvaluated, type FillPaintPropsPossiblyEvaluated} from './fill_style_layer_properties.g';\n\nimport type {Transitionable, Transitioning, Layout, PossiblyEvaluated} from '../properties';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {BucketParameters} from '../../data/bucket';\nimport type {FillLayoutProps, FillPaintProps} from './fill_style_layer_properties.g';\nimport type {EvaluationParameters} from '../evaluation_parameters';\n\nexport const isFillStyleLayer = (layer: StyleLayer): layer is FillStyleLayer => layer.type === 'fill';\n\nexport class FillStyleLayer extends StyleLayer {\n _unevaluatedLayout: Layout;\n layout: PossiblyEvaluated;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n\n recalculate(parameters: EvaluationParameters, availableImages: Array) {\n super.recalculate(parameters, availableImages);\n\n const outlineColor = this.paint._values['fill-outline-color'];\n if (outlineColor.value.kind === 'constant' && outlineColor.value.value === undefined) {\n this.paint._values['fill-outline-color'] = this.paint._values['fill-color'];\n }\n }\n\n createBucket(parameters: BucketParameters) {\n return new FillBucket(parameters);\n }\n\n queryRadius(): number {\n return translateDistance(this.paint.get('fill-translate'));\n }\n\n queryIntersectsFeature({\n queryGeometry,\n geometry,\n transform,\n pixelsToTileUnits}: QueryIntersectsFeatureParams\n ): boolean {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('fill-translate'),\n this.paint.get('fill-translate-anchor'),\n -transform.bearingInRadians, pixelsToTileUnits);\n return polygonIntersectsMultiPolygon(translatedPolygon, geometry);\n }\n\n isTileClipped() {\n return true;\n }\n}\n","import {createLayout} from '../../util/struct_array';\n\nconst layout = createLayout([\n {name: 'a_pos', components: 2, type: 'Int16'},\n {name: 'a_normal_ed', components: 4, type: 'Int16'},\n], 4);\n\nexport const centroidAttributes = createLayout([\n {name: 'a_centroid', components: 2, type: 'Int16'}\n], 4);\n\nexport default layout;\nexport const {members, size, alignment} = layout;\n","\nimport Point from '@mapbox/point-geometry';\n\n/** @import Pbf from 'pbf' */\n/** @import {Feature} from 'geojson' */\n\nexport class VectorTileFeature {\n /**\n * @param {Pbf} pbf\n * @param {number} end\n * @param {number} extent\n * @param {string[]} keys\n * @param {(number | string | boolean)[]} values\n */\n constructor(pbf, end, extent, keys, values) {\n // Public\n\n /** @type {Record} */\n this.properties = {};\n\n this.extent = extent;\n /** @type {0 | 1 | 2 | 3} */\n this.type = 0;\n\n /** @type {number | undefined} */\n this.id = undefined;\n\n /** @private */\n this._pbf = pbf;\n /** @private */\n this._geometry = -1;\n /** @private */\n this._keys = keys;\n /** @private */\n this._values = values;\n\n pbf.readFields(readFeature, this, end);\n }\n\n loadGeometry() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n\n /** @type Point[][] */\n const lines = [];\n\n /** @type Point[] | undefined */\n let line;\n\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) { // moveTo\n if (line) lines.push(line);\n line = [];\n }\n\n if (line) line.push(new Point(x, y));\n\n } else if (cmd === 7) {\n\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (line) {\n line.push(line[0].clone()); // closePolygon\n }\n\n } else {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n if (line) lines.push(line);\n\n return lines;\n }\n\n bbox() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1,\n length = 0,\n x = 0,\n y = 0,\n x1 = Infinity,\n x2 = -Infinity,\n y1 = Infinity,\n y2 = -Infinity;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n if (x < x1) x1 = x;\n if (x > x2) x2 = x;\n if (y < y1) y1 = y;\n if (y > y2) y2 = y;\n\n } else if (cmd !== 7) {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n return [x1, y1, x2, y2];\n }\n\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @return {Feature}\n */\n toGeoJSON(x, y, z) {\n const size = this.extent * Math.pow(2, z),\n x0 = this.extent * x,\n y0 = this.extent * y,\n vtCoords = this.loadGeometry();\n\n /** @param {Point} p */\n function projectPoint(p) {\n return [\n (p.x + x0) * 360 / size - 180,\n 360 / Math.PI * Math.atan(Math.exp((1 - (p.y + y0) * 2 / size) * Math.PI)) - 90\n ];\n }\n\n /** @param {Point[]} line */\n function projectLine(line) {\n return line.map(projectPoint);\n }\n\n /** @type {Feature[\"geometry\"]} */\n let geometry;\n\n if (this.type === 1) {\n const points = [];\n for (const line of vtCoords) {\n points.push(line[0]);\n }\n const coordinates = projectLine(points);\n geometry = points.length === 1 ?\n {type: 'Point', coordinates: coordinates[0]} :\n {type: 'MultiPoint', coordinates};\n\n } else if (this.type === 2) {\n\n const coordinates = vtCoords.map(projectLine);\n geometry = coordinates.length === 1 ?\n {type: 'LineString', coordinates: coordinates[0]} :\n {type: 'MultiLineString', coordinates};\n\n } else if (this.type === 3) {\n const polygons = classifyRings(vtCoords);\n const coordinates = [];\n for (const polygon of polygons) {\n coordinates.push(polygon.map(projectLine));\n }\n geometry = coordinates.length === 1 ?\n {type: 'Polygon', coordinates: coordinates[0]} :\n {type: 'MultiPolygon', coordinates};\n } else {\n\n throw new Error('unknown feature type');\n }\n\n /** @type {Feature} */\n const result = {\n type: 'Feature',\n geometry,\n properties: this.properties\n };\n\n if (this.id != null) {\n result.id = this.id;\n }\n\n return result;\n }\n}\n\n/** @type {['Unknown', 'Point', 'LineString', 'Polygon']} */\nVectorTileFeature.types = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\n/**\n * @param {number} tag\n * @param {VectorTileFeature} feature\n * @param {Pbf} pbf\n */\nfunction readFeature(tag, feature, pbf) {\n if (tag === 1) feature.id = pbf.readVarint();\n else if (tag === 2) readTag(pbf, feature);\n else if (tag === 3) feature.type = /** @type {0 | 1 | 2 | 3} */ (pbf.readVarint());\n // @ts-expect-error TS2341 deliberately accessing a private property\n else if (tag === 4) feature._geometry = pbf.pos;\n}\n\n/**\n * @param {Pbf} pbf\n * @param {VectorTileFeature} feature\n */\nfunction readTag(pbf, feature) {\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n // @ts-expect-error TS2341 deliberately accessing a private property\n const key = feature._keys[pbf.readVarint()];\n // @ts-expect-error TS2341 deliberately accessing a private property\n const value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n\n/** classifies an array of rings into polygons with outer rings and holes\n * @param {Point[][]} rings\n */\nexport function classifyRings(rings) {\n const len = rings.length;\n\n if (len <= 1) return [rings];\n\n const polygons = [];\n let polygon, ccw;\n\n for (let i = 0; i < len; i++) {\n const area = signedArea(rings[i]);\n if (area === 0) continue;\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon) polygons.push(polygon);\n polygon = [rings[i]];\n\n } else if (polygon) {\n polygon.push(rings[i]);\n }\n }\n if (polygon) polygons.push(polygon);\n\n return polygons;\n}\n\n/** @param {Point[]} ring */\nfunction signedArea(ring) {\n let sum = 0;\n for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n}\n\nexport class VectorTileLayer {\n /**\n * @param {Pbf} pbf\n * @param {number} [end]\n */\n constructor(pbf, end) {\n // Public\n this.version = 1;\n this.name = '';\n this.extent = 4096;\n this.length = 0;\n\n /** @private */\n this._pbf = pbf;\n\n /** @private\n * @type {string[]} */\n this._keys = [];\n\n /** @private\n * @type {(number | string | boolean)[]} */\n this._values = [];\n\n /** @private\n * @type {number[]} */\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n }\n\n /** return feature `i` from this layer as a `VectorTileFeature`\n * @param {number} i\n */\n feature(i) {\n if (i < 0 || i >= this._features.length) throw new Error('feature index out of bounds');\n\n this._pbf.pos = this._features[i];\n\n const end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);\n }\n}\n\n/**\n * @param {number} tag\n * @param {VectorTileLayer} layer\n * @param {Pbf} pbf\n */\nfunction readLayer(tag, layer, pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n // @ts-expect-error TS2341 deliberately accessing a private property\n else if (tag === 2) layer._features.push(pbf.pos);\n // @ts-expect-error TS2341 deliberately accessing a private property\n else if (tag === 3) layer._keys.push(pbf.readString());\n // @ts-expect-error TS2341 deliberately accessing a private property\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n}\n\n/**\n * @param {Pbf} pbf\n */\nfunction readValueMessage(pbf) {\n let value = null;\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const tag = pbf.readVarint() >> 3;\n\n value = tag === 1 ? pbf.readString() :\n tag === 2 ? pbf.readFloat() :\n tag === 3 ? pbf.readDouble() :\n tag === 4 ? pbf.readVarint64() :\n tag === 5 ? pbf.readVarint() :\n tag === 6 ? pbf.readSVarint() :\n tag === 7 ? pbf.readBoolean() : null;\n }\n if (value == null) {\n throw new Error('unknown feature value');\n }\n\n return value;\n}\n\nexport class VectorTile {\n /**\n * @param {Pbf} pbf\n * @param {number} [end]\n */\n constructor(pbf, end) {\n /** @type {Record} */\n this.layers = pbf.readFields(readTile, {}, end);\n }\n}\n\n/**\n * @param {number} tag\n * @param {Record} layers\n * @param {Pbf} pbf\n */\nfunction readTile(tag, layers, pbf) {\n if (tag === 3) {\n const layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length) layers[layer.name] = layer;\n }\n}\n","import {FillExtrusionLayoutArray, PosArray} from '../array_types.g';\n\nimport {members as layoutAttributes, centroidAttributes} from './fill_extrusion_attributes';\nimport {type Segment, SegmentVector} from '../segment';\nimport {ProgramConfigurationSet} from '../program_configuration';\nimport {TriangleIndexArray} from '../index_array_type';\nimport {EXTENT} from '../extent';\nimport {VectorTileFeature} from '@mapbox/vector-tile';\nimport {classifyRings} from '@maplibre/maplibre-gl-style-spec';\nconst EARCUT_MAX_RINGS = 500;\nimport {register} from '../../util/web_worker_transfer';\nimport {hasPattern, addPatternDependencies} from './pattern_bucket_features';\nimport {loadGeometry} from '../load_geometry';\nimport {toEvaluationFeature} from '../evaluation_feature';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\n\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport type {\n Bucket,\n BucketParameters,\n BucketFeature,\n IndexedFeature,\n PopulateParameters\n} from '../bucket';\n\nimport type {FillExtrusionStyleLayer} from '../../style/style_layer/fill_extrusion_style_layer';\nimport type {Context} from '../../gl/context';\nimport type {IndexBuffer} from '../../gl/index_buffer';\nimport type {VertexBuffer} from '../../gl/vertex_buffer';\nimport type Point from '@mapbox/point-geometry';\nimport type {FeatureStates} from '../../source/source_state';\nimport type {ImagePosition} from '../../render/image_atlas';\nimport {subdividePolygon, subdivideVertexLine} from '../../render/subdivision';\nimport type {SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\nimport {fillLargeMeshArrays} from '../../render/fill_large_mesh_arrays';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nconst FACTOR = Math.pow(2, 13);\n\nfunction addVertex(vertexArray, x, y, nx, ny, nz, t, e) {\n vertexArray.emplaceBack(\n // a_pos\n x,\n y,\n // a_normal_ed: 3-component normal and 1-component edgedistance\n Math.floor(nx * FACTOR) * 2 + t,\n ny * FACTOR * 2,\n nz * FACTOR * 2,\n // edgedistance (used for wrapping patterns around extrusion sides)\n Math.round(e)\n );\n}\n\ntype CentroidAccumulator = {\n x: number;\n y: number;\n sampleCount: number;\n};\n\nexport class FillExtrusionBucket implements Bucket {\n index: number;\n zoom: number;\n overscaling: number;\n layers: Array;\n layerIds: Array;\n stateDependentLayers: Array;\n stateDependentLayerIds: Array;\n\n layoutVertexArray: FillExtrusionLayoutArray;\n layoutVertexBuffer: VertexBuffer;\n\n centroidVertexArray: PosArray;\n centroidVertexBuffer: VertexBuffer;\n\n indexArray: TriangleIndexArray;\n indexBuffer: IndexBuffer;\n\n hasDependencies: boolean;\n programConfigurations: ProgramConfigurationSet;\n segments: SegmentVector;\n uploaded: boolean;\n features: Array;\n\n constructor(options: BucketParameters) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.hasDependencies = false;\n\n this.layoutVertexArray = new FillExtrusionLayoutArray();\n this.centroidVertexArray = new PosArray();\n this.indexArray = new TriangleIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(options.layers, options.zoom);\n this.segments = new SegmentVector();\n this.stateDependentLayerIds = this.layers.filter((l) => l.isStateDependent()).map((l) => l.id);\n }\n\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID) {\n this.features = [];\n this.hasDependencies = hasPattern('fill-extrusion', this.layers, options);\n\n for (const {feature, id, index, sourceLayerIndex} of features) {\n const needGeometry = this.layers[0]._featureFilter.needGeometry;\n const evaluationFeature = toEvaluationFeature(feature, needGeometry);\n\n if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;\n\n const bucketFeature: BucketFeature = {\n id,\n sourceLayerIndex,\n index,\n geometry: needGeometry ? evaluationFeature.geometry : loadGeometry(feature),\n properties: feature.properties,\n type: feature.type,\n patterns: {}\n };\n\n if (this.hasDependencies) {\n this.features.push(addPatternDependencies('fill-extrusion', this.layers, bucketFeature, {zoom: this.zoom}, options));\n } else {\n this.addFeature(bucketFeature, bucketFeature.geometry, index, canonical, {}, options.subdivisionGranularity);\n }\n\n options.featureIndex.insert(feature, bucketFeature.geometry, index, sourceLayerIndex, this.index, true);\n }\n }\n\n addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}) {\n for (const feature of this.features) {\n const {geometry} = feature;\n this.addFeature(feature, geometry, feature.index, canonical, imagePositions, options.subdivisionGranularity);\n }\n }\n\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {[_: string]: ImagePosition}) {\n if (!this.stateDependentLayers.length) return;\n this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers, {\n imagePositions\n });\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0 && this.centroidVertexArray.length === 0;\n }\n\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n\n upload(context: Context) {\n if (!this.uploaded) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.centroidVertexBuffer = context.createVertexBuffer(this.centroidVertexArray, centroidAttributes.members, true);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n }\n this.programConfigurations.upload(context);\n this.uploaded = true;\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n this.centroidVertexBuffer.destroy();\n }\n\n addFeature(feature: BucketFeature, geometry: Array>, index: number, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}, subdivisionGranularity: SubdivisionGranularitySetting) {\n for (const polygon of classifyRings(geometry, EARCUT_MAX_RINGS)) {\n // Compute polygon centroid to calculate elevation in GPU\n const centroid: CentroidAccumulator = {x: 0, y: 0, sampleCount: 0};\n const oldVertexCount = this.layoutVertexArray.length;\n this.processPolygon(centroid, canonical, feature, polygon, subdivisionGranularity);\n\n const addedVertices = this.layoutVertexArray.length - oldVertexCount;\n\n const centroidX = Math.floor(centroid.x / centroid.sampleCount);\n const centroidY = Math.floor(centroid.y / centroid.sampleCount);\n\n for (let i = 0; i < addedVertices; i++) {\n this.centroidVertexArray.emplaceBack(\n centroidX,\n centroidY\n );\n }\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, {imagePositions, canonical});\n }\n\n private processPolygon(\n centroid: CentroidAccumulator,\n canonical: CanonicalTileID,\n feature: BucketFeature,\n polygon: Array>,\n subdivisionGranularity: SubdivisionGranularitySetting\n ): void {\n if (polygon.length < 1) {\n return;\n }\n\n if (isEntirelyOutside(polygon[0])) {\n return;\n }\n\n // Only consider the un-subdivided polygon outer ring for centroid calculation\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n // Here we don't mind if a hole ring is entirely outside, unlike when generating geometry later.\n accumulatePointsToCentroid(centroid, ring);\n }\n\n const segmentReference = {\n segment: this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray)\n };\n const granularity = subdivisionGranularity.fill.getGranularityForZoomLevel(canonical.z);\n const isPolygon = VectorTileFeature.types[feature.type] === 'Polygon';\n\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n if (isEntirelyOutside(ring)) {\n continue;\n }\n\n const subdividedRing = subdivideVertexLine(ring, granularity, isPolygon);\n this._generateSideFaces(subdividedRing, segmentReference);\n }\n\n // Only triangulate and draw the area of the feature if it is a polygon\n // Other feature types (e.g. LineString) do not have area, so triangulation is pointless / undefined\n if (!isPolygon)\n return;\n\n // Do not generate outlines, since outlines already got subdivided earlier.\n const subdividedPolygon = subdividePolygon(polygon, canonical, granularity, false);\n const vertexArray = this.layoutVertexArray;\n\n fillLargeMeshArrays(\n (x, y) => {\n addVertex(vertexArray, x, y, 0, 0, 1, 1, 0);\n },\n this.segments,\n this.layoutVertexArray,\n this.indexArray,\n subdividedPolygon.verticesFlattened,\n subdividedPolygon.indicesTriangles\n );\n }\n\n /**\n * Generates side faces for the supplied geometry. Assumes `geometry` to be a line string, like the output of {@link subdivideVertexLine}.\n * For rings, it is assumed that the first and last vertex of `geometry` are equal.\n */\n private _generateSideFaces(geometry: Array, segmentReference: {segment: Segment}) {\n let edgeDistance = 0;\n\n for (let p = 1; p < geometry.length; p++) {\n const p1 = geometry[p];\n const p2 = geometry[p - 1];\n\n if (isBoundaryEdge(p1, p2)) {\n continue;\n }\n\n if (segmentReference.segment.vertexLength + 4 > SegmentVector.MAX_VERTEX_ARRAY_LENGTH) {\n segmentReference.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);\n }\n\n const perp = p1.sub(p2)._perp()._unit();\n const dist = p2.dist(p1);\n if (edgeDistance + dist > 32768) edgeDistance = 0;\n\n addVertex(this.layoutVertexArray, p1.x, p1.y, perp.x, perp.y, 0, 0, edgeDistance);\n addVertex(this.layoutVertexArray, p1.x, p1.y, perp.x, perp.y, 0, 1, edgeDistance);\n\n edgeDistance += dist;\n\n addVertex(this.layoutVertexArray, p2.x, p2.y, perp.x, perp.y, 0, 0, edgeDistance);\n addVertex(this.layoutVertexArray, p2.x, p2.y, perp.x, perp.y, 0, 1, edgeDistance);\n\n const bottomRight = segmentReference.segment.vertexLength;\n\n // ┌──────┐\n // │ 0 1 │ Counter-clockwise winding order.\n // │ │ Triangle 1: 0 => 2 => 1\n // │ 2 3 │ Triangle 2: 1 => 2 => 3\n // └──────┘\n this.indexArray.emplaceBack(bottomRight, bottomRight + 2, bottomRight + 1);\n this.indexArray.emplaceBack(bottomRight + 1, bottomRight + 2, bottomRight + 3);\n\n segmentReference.segment.vertexLength += 4;\n segmentReference.segment.primitiveLength += 2;\n }\n }\n}\n\n/**\n * Accumulates geometry to centroid. Geometry can be either a polygon ring, a line string or a closed line string.\n * In case of a polygon ring or line ring, the last vertex is ignored if it is the same as the first vertex.\n */\nfunction accumulatePointsToCentroid(centroid: CentroidAccumulator, geometry: Array): void {\n for (let i = 0; i < geometry.length; i++) {\n const p = geometry[i];\n\n if (i === geometry.length - 1 && geometry[0].x === p.x && geometry[0].y === p.y) {\n continue;\n }\n\n centroid.x += p.x;\n centroid.y += p.y;\n centroid.sampleCount++;\n }\n}\n\nregister('FillExtrusionBucket', FillExtrusionBucket, {omit: ['layers', 'features']});\n\nfunction isBoundaryEdge(p1, p2) {\n return (p1.x === p2.x && (p1.x < 0 || p1.x > EXTENT)) ||\n (p1.y === p2.y && (p1.y < 0 || p1.y > EXTENT));\n}\n\nfunction isEntirelyOutside(ring) {\n return ring.every(p => p.x < 0) ||\n ring.every(p => p.x > EXTENT) ||\n ring.every(p => p.y < 0) ||\n ring.every(p => p.y > EXTENT);\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type FillExtrusionPaintProps = {\n \"fill-extrusion-opacity\": DataConstantProperty,\n \"fill-extrusion-color\": DataDrivenProperty,\n \"fill-extrusion-translate\": DataConstantProperty<[number, number]>,\n \"fill-extrusion-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"fill-extrusion-pattern\": CrossFadedDataDrivenProperty,\n \"fill-extrusion-height\": DataDrivenProperty,\n \"fill-extrusion-base\": DataDrivenProperty,\n \"fill-extrusion-vertical-gradient\": DataConstantProperty,\n};\n\nexport type FillExtrusionPaintPropsPossiblyEvaluated = {\n \"fill-extrusion-opacity\": number,\n \"fill-extrusion-color\": PossiblyEvaluatedPropertyValue,\n \"fill-extrusion-translate\": [number, number],\n \"fill-extrusion-translate-anchor\": \"map\" | \"viewport\",\n \"fill-extrusion-pattern\": PossiblyEvaluatedPropertyValue>,\n \"fill-extrusion-height\": PossiblyEvaluatedPropertyValue,\n \"fill-extrusion-base\": PossiblyEvaluatedPropertyValue,\n \"fill-extrusion-vertical-gradient\": boolean,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"fill-extrusion-opacity\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"] as any as StylePropertySpecification),\n \"fill-extrusion-color\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-color\"] as any as StylePropertySpecification),\n \"fill-extrusion-translate\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"] as any as StylePropertySpecification),\n \"fill-extrusion-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"] as any as StylePropertySpecification),\n \"fill-extrusion-pattern\": new CrossFadedDataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"] as any as StylePropertySpecification),\n \"fill-extrusion-height\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-height\"] as any as StylePropertySpecification),\n \"fill-extrusion-base\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-base\"] as any as StylePropertySpecification),\n \"fill-extrusion-vertical-gradient\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import {type QueryIntersectsFeatureParams, StyleLayer} from '../style_layer';\n\nimport {FillExtrusionBucket} from '../../data/bucket/fill_extrusion_bucket';\nimport {polygonIntersectsPolygon, polygonIntersectsMultiPolygon} from '../../util/intersection_tests';\nimport {translateDistance, translate} from '../query_utils';\nimport properties, {type FillExtrusionPaintPropsPossiblyEvaluated} from './fill_extrusion_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\nimport {type mat4, vec4} from 'gl-matrix';\nimport Point from '@mapbox/point-geometry';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {BucketParameters} from '../../data/bucket';\nimport type {FillExtrusionPaintProps} from './fill_extrusion_style_layer_properties.g';\n\nexport class Point3D extends Point {\n z: number;\n}\n\nexport const isFillExtrusionStyleLayer = (layer: StyleLayer): layer is FillExtrusionStyleLayer => layer.type === 'fill-extrusion';\n\nexport class FillExtrusionStyleLayer extends StyleLayer {\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n\n createBucket(parameters: BucketParameters) {\n return new FillExtrusionBucket(parameters);\n }\n\n queryRadius(): number {\n return translateDistance(this.paint.get('fill-extrusion-translate'));\n }\n\n is3D(): boolean {\n return true;\n }\n\n queryIntersectsFeature({\n queryGeometry,\n feature,\n featureState,\n geometry,\n transform,\n pixelsToTileUnits,\n pixelPosMatrix}: QueryIntersectsFeatureParams\n ): boolean | number {\n\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('fill-extrusion-translate'),\n this.paint.get('fill-extrusion-translate-anchor'),\n -transform.bearingInRadians, pixelsToTileUnits);\n\n const height = this.paint.get('fill-extrusion-height').evaluate(feature, featureState);\n const base = this.paint.get('fill-extrusion-base').evaluate(feature, featureState);\n\n const projectedQueryGeometry = projectQueryGeometry(translatedPolygon, pixelPosMatrix, 0);\n\n const projected = projectExtrusion(geometry, base, height, pixelPosMatrix);\n const projectedBase = projected[0];\n const projectedTop = projected[1];\n return checkIntersection(projectedBase, projectedTop, projectedQueryGeometry);\n }\n}\n\nfunction dot(a, b) {\n return a.x * b.x + a.y * b.y;\n}\n\nexport function getIntersectionDistance(projectedQueryGeometry: Array, projectedFace: Array) {\n\n if (projectedQueryGeometry.length === 1) {\n // For point queries calculate the z at which the point intersects the face\n // using barycentric coordinates.\n\n // Find the barycentric coordinates of the projected point within the first\n // triangle of the face, using only the xy plane. It doesn't matter if the\n // point is outside the first triangle because all the triangles in the face\n // are in the same plane.\n //\n // Check whether points are coincident and use other points if they are.\n let i = 0;\n const a = projectedFace[i++];\n let b;\n while (!b || a.equals(b)) {\n b = projectedFace[i++];\n if (!b) return Infinity;\n }\n\n // Loop until point `c` is not colinear with points `a` and `b`.\n for (; i < projectedFace.length; i++) {\n const c = projectedFace[i];\n\n const p = projectedQueryGeometry[0];\n\n const ab = b.sub(a);\n const ac = c.sub(a);\n const ap = p.sub(a);\n\n const dotABAB = dot(ab, ab);\n const dotABAC = dot(ab, ac);\n const dotACAC = dot(ac, ac);\n const dotAPAB = dot(ap, ab);\n const dotAPAC = dot(ap, ac);\n const denom = dotABAB * dotACAC - dotABAC * dotABAC;\n\n const v = (dotACAC * dotAPAB - dotABAC * dotAPAC) / denom;\n const w = (dotABAB * dotAPAC - dotABAC * dotAPAB) / denom;\n const u = 1 - v - w;\n\n // Use the barycentric weighting along with the original triangle z coordinates to get the point of intersection.\n const distance = a.z * u + b.z * v + c.z * w;\n\n if (isFinite(distance)) return distance;\n }\n\n return Infinity;\n\n } else {\n // The counts as closest is less clear when the query is a box. This\n // returns the distance to the nearest point on the face, whether it is\n // within the query or not. It could be more correct to return the\n // distance to the closest point within the query box but this would be\n // more complicated and expensive to calculate with little benefit.\n let closestDistance = Infinity;\n for (const p of projectedFace) {\n closestDistance = Math.min(closestDistance, p.z);\n }\n return closestDistance;\n }\n}\n\nfunction checkIntersection(projectedBase: Array>, projectedTop: Array>, projectedQueryGeometry: Array) {\n let closestDistance = Infinity;\n\n if (polygonIntersectsMultiPolygon(projectedQueryGeometry, projectedTop)) {\n closestDistance = getIntersectionDistance(projectedQueryGeometry, projectedTop[0]);\n }\n\n for (let r = 0; r < projectedTop.length; r++) {\n const ringTop = projectedTop[r];\n const ringBase = projectedBase[r];\n for (let p = 0; p < ringTop.length - 1; p++) {\n const topA = ringTop[p];\n const topB = ringTop[p + 1];\n const baseA = ringBase[p];\n const baseB = ringBase[p + 1];\n const face = [topA, topB, baseB, baseA, topA];\n if (polygonIntersectsPolygon(projectedQueryGeometry, face)) {\n closestDistance = Math.min(closestDistance, getIntersectionDistance(projectedQueryGeometry, face));\n }\n }\n }\n\n return closestDistance === Infinity ? false : closestDistance;\n}\n\n/*\n * Project the geometry using matrix `m`. This is essentially doing\n * `vec4.transformMat4([], [p.x, p.y, z, 1], m)` but the multiplication\n * is inlined so that parts of the projection that are the same across\n * different points can only be done once. This produced a measurable\n * performance improvement.\n */\nfunction projectExtrusion(geometry: Array>, zBase: number, zTop: number, m: mat4): [Array>, Array>] {\n const projectedBase = [] as Array>;\n const projectedTop = [] as Array>;\n const baseXZ = m[8] * zBase;\n const baseYZ = m[9] * zBase;\n const baseZZ = m[10] * zBase;\n const baseWZ = m[11] * zBase;\n const topXZ = m[8] * zTop;\n const topYZ = m[9] * zTop;\n const topZZ = m[10] * zTop;\n const topWZ = m[11] * zTop;\n\n for (const r of geometry) {\n const ringBase = [] as Array;\n const ringTop = [] as Array;\n for (const p of r) {\n const x = p.x;\n const y = p.y;\n\n const sX = m[0] * x + m[4] * y + m[12];\n const sY = m[1] * x + m[5] * y + m[13];\n const sZ = m[2] * x + m[6] * y + m[14];\n const sW = m[3] * x + m[7] * y + m[15];\n\n const baseX = sX + baseXZ;\n const baseY = sY + baseYZ;\n const baseZ = sZ + baseZZ;\n const baseW = sW + baseWZ;\n\n const topX = sX + topXZ;\n const topY = sY + topYZ;\n const topZ = sZ + topZZ;\n const topW = sW + topWZ;\n\n const b = new Point(baseX / baseW, baseY / baseW) as Point3D;\n b.z = baseZ / baseW;\n ringBase.push(b);\n\n const t = new Point(topX / topW, topY / topW) as Point3D;\n t.z = topZ / topW;\n ringTop.push(t);\n }\n projectedBase.push(ringBase);\n projectedTop.push(ringTop);\n }\n return [projectedBase, projectedTop];\n}\n\nfunction projectQueryGeometry(queryGeometry: Array, pixelPosMatrix: mat4, z: number) {\n const projectedQueryGeometry = [];\n for (const p of queryGeometry) {\n const v = [p.x, p.y, z, 1] as vec4;\n vec4.transformMat4(v, v, pixelPosMatrix);\n projectedQueryGeometry.push(new Point(v[0] / v[3], v[1] / v[3]));\n }\n return projectedQueryGeometry;\n}\n","import {createLayout} from '../../util/struct_array';\n\nexport const lineLayoutAttributes = createLayout([\n {name: 'a_pos_normal', components: 2, type: 'Int16'},\n {name: 'a_data', components: 4, type: 'Uint8'}\n], 4);\n\nexport const {members, size, alignment} = lineLayoutAttributes;\n","import {createLayout} from '../../util/struct_array';\n\nexport const lineLayoutAttributesExt = createLayout([\n {name: 'a_uv_x', components: 1, type: 'Float32'},\n {name: 'a_split_index', components: 1, type: 'Float32'},\n]);\n\nexport const {members, size, alignment} = lineLayoutAttributesExt;\n","import {LineLayoutArray, LineExtLayoutArray} from '../array_types.g';\n\nimport {members as layoutAttributes} from './line_attributes';\nimport {members as layoutAttributesExt} from './line_attributes_ext';\nimport {SegmentVector} from '../segment';\nimport {ProgramConfigurationSet} from '../program_configuration';\nimport {TriangleIndexArray} from '../index_array_type';\nimport {EXTENT} from '../extent';\nimport {VectorTileFeature} from '@mapbox/vector-tile';\nimport {register} from '../../util/web_worker_transfer';\nimport {hasPattern, addPatternDependencies} from './pattern_bucket_features';\nimport {loadGeometry} from '../load_geometry';\nimport {toEvaluationFeature} from '../evaluation_feature';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\n\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport type {\n Bucket,\n BucketParameters,\n BucketFeature,\n IndexedFeature,\n PopulateParameters\n} from '../bucket';\nimport type {LineStyleLayer} from '../../style/style_layer/line_style_layer';\nimport type Point from '@mapbox/point-geometry';\nimport type {Segment} from '../segment';\nimport {type RGBAImage} from '../../util/image';\nimport type {Context} from '../../gl/context';\nimport type {Texture} from '../../render/texture';\nimport type {IndexBuffer} from '../../gl/index_buffer';\nimport type {VertexBuffer} from '../../gl/vertex_buffer';\nimport type {FeatureStates} from '../../source/source_state';\nimport type {ImagePosition} from '../../render/image_atlas';\nimport {subdivideVertexLine} from '../../render/subdivision';\nimport type {SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\nimport {type DashEntry} from '../../render/line_atlas';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\n// NOTE ON EXTRUDE SCALE:\n// scale the extrusion vector so that the normal length is this value.\n// contains the \"texture\" normals (-1..1). this is distinct from the extrude\n// normals for line joins, because the x-value remains 0 for the texture\n// normal array, while the extrude normal actually moves the vertex to create\n// the acute/bevelled line join.\nconst EXTRUDE_SCALE = 63;\n\n/*\n * Sharp corners cause dashed lines to tilt because the distance along the line\n * is the same at both the inner and outer corners. To improve the appearance of\n * dashed lines we add extra points near sharp corners so that a smaller part\n * of the line is tilted.\n *\n * COS_HALF_SHARP_CORNER controls how sharp a corner has to be for us to add an\n * extra vertex. The default is 75 degrees.\n *\n * The newly created vertices are placed SHARP_CORNER_OFFSET pixels from the corner.\n */\nconst COS_HALF_SHARP_CORNER = Math.cos(75 / 2 * (Math.PI / 180));\nconst SHARP_CORNER_OFFSET = 15;\n\n// Angle per triangle for approximating round line joins.\nconst DEG_PER_TRIANGLE = 20;\n\n// The number of bits that is used to store the line distance in the buffer.\nconst LINE_DISTANCE_BUFFER_BITS = 15;\n\n// We don't have enough bits for the line distance as we'd like to have, so\n// use this value to scale the line distance (in tile units) down to a smaller\n// value. This lets us store longer distances while sacrificing precision.\nconst LINE_DISTANCE_SCALE = 1 / 2;\n\n// The maximum line distance, in tile units, that fits in the buffer.\nconst MAX_LINE_DISTANCE = Math.pow(2, LINE_DISTANCE_BUFFER_BITS - 1) / LINE_DISTANCE_SCALE;\n\ntype LineClips = {\n start: number;\n end: number;\n};\n\ntype GradientTexture = {\n texture?: Texture;\n gradient?: RGBAImage;\n version?: number;\n};\n\n/**\n * @internal\n * Line bucket class\n */\nexport class LineBucket implements Bucket {\n distance: number;\n totalDistance: number;\n maxLineLength: number;\n scaledDistance: number;\n lineClips?: LineClips;\n\n e1: number;\n e2: number;\n\n index: number;\n zoom: number;\n overscaling: number;\n layers: Array;\n layerIds: Array;\n gradients: {[x: string]: GradientTexture};\n stateDependentLayers: Array;\n stateDependentLayerIds: Array;\n patternFeatures: Array;\n lineClipsArray: Array;\n\n layoutVertexArray: LineLayoutArray;\n layoutVertexBuffer: VertexBuffer;\n layoutVertexArray2: LineExtLayoutArray;\n layoutVertexBuffer2: VertexBuffer;\n\n indexArray: TriangleIndexArray;\n indexBuffer: IndexBuffer;\n\n hasDependencies: boolean;\n programConfigurations: ProgramConfigurationSet;\n segments: SegmentVector;\n uploaded: boolean;\n\n constructor(options: BucketParameters) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.hasDependencies = false;\n this.patternFeatures = [];\n this.lineClipsArray = [];\n this.gradients = {};\n this.layers.forEach(layer => {\n this.gradients[layer.id] = {};\n });\n\n this.layoutVertexArray = new LineLayoutArray();\n this.layoutVertexArray2 = new LineExtLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(options.layers, options.zoom);\n this.segments = new SegmentVector();\n this.maxLineLength = 0;\n\n this.stateDependentLayerIds = this.layers.filter((l) => l.isStateDependent()).map((l) => l.id);\n }\n\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID) {\n this.hasDependencies = hasPattern('line', this.layers, options) || this.hasLineDasharray(this.layers);\n const lineSortKey = this.layers[0].layout.get('line-sort-key');\n const sortFeaturesByKey = !lineSortKey.isConstant();\n const bucketFeatures: BucketFeature[] = [];\n\n for (const {feature, id, index, sourceLayerIndex} of features) {\n const needGeometry = this.layers[0]._featureFilter.needGeometry;\n const evaluationFeature = toEvaluationFeature(feature, needGeometry);\n\n if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;\n\n const sortKey = sortFeaturesByKey ?\n lineSortKey.evaluate(evaluationFeature, {}, canonical) :\n undefined;\n\n const bucketFeature: BucketFeature = {\n id,\n properties: feature.properties,\n type: feature.type,\n sourceLayerIndex,\n index,\n geometry: needGeometry ? evaluationFeature.geometry : loadGeometry(feature),\n patterns: {},\n dashes: {},\n sortKey\n };\n\n bucketFeatures.push(bucketFeature);\n }\n\n if (sortFeaturesByKey) {\n bucketFeatures.sort((a, b) => {\n return (a.sortKey) - (b.sortKey);\n });\n }\n\n for (const bucketFeature of bucketFeatures) {\n const {geometry, index, sourceLayerIndex} = bucketFeature;\n\n if (this.hasDependencies) {\n if (hasPattern('line', this.layers, options)) {\n addPatternDependencies('line', this.layers, bucketFeature, {zoom: this.zoom}, options);\n } else if (this.hasLineDasharray(this.layers)) {\n this.addLineDashDependencies(this.layers, bucketFeature, this.zoom, options);\n }\n\n // pattern features are added only once the pattern is loaded into the image atlas\n // so are stored during populate until later updated with positions by tile worker in addFeatures\n this.patternFeatures.push(bucketFeature);\n } else {\n this.addFeature(bucketFeature, geometry, index, canonical, {}, {}, options.subdivisionGranularity);\n }\n\n const feature = features[index].feature;\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {[_: string]: ImagePosition}, dashPositions: {[_: string]: DashEntry}) {\n if (!this.stateDependentLayers.length) return;\n this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers, {\n imagePositions,\n dashPositions\n });\n }\n\n addFeatures(options: PopulateParameters, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}, dashPositions?: {[_: string]: DashEntry}) {\n for (const feature of this.patternFeatures) {\n this.addFeature(feature, feature.geometry, feature.index, canonical, imagePositions, dashPositions, options.subdivisionGranularity);\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n\n upload(context: Context) {\n if (!this.uploaded) {\n if (this.layoutVertexArray2.length !== 0) {\n this.layoutVertexBuffer2 = context.createVertexBuffer(this.layoutVertexArray2, layoutAttributesExt);\n }\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n }\n this.programConfigurations.upload(context);\n this.uploaded = true;\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n }\n\n lineFeatureClips(feature: BucketFeature): LineClips | undefined {\n if (!!feature.properties && Object.prototype.hasOwnProperty.call(feature.properties, 'mapbox_clip_start') && Object.prototype.hasOwnProperty.call(feature.properties, 'mapbox_clip_end')) {\n const start = +feature.properties['mapbox_clip_start'];\n const end = +feature.properties['mapbox_clip_end'];\n return {start, end};\n }\n }\n\n addFeature(feature: BucketFeature, geometry: Array>, index: number, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}, dashPositions: Record, subdivisionGranularity: SubdivisionGranularitySetting) {\n const layout = this.layers[0].layout;\n const join = layout.get('line-join').evaluate(feature, {});\n const cap = layout.get('line-cap');\n const miterLimit = layout.get('line-miter-limit');\n const roundLimit = layout.get('line-round-limit');\n this.lineClips = this.lineFeatureClips(feature);\n\n for (const line of geometry) {\n this.addLine(line, feature, join, cap, miterLimit, roundLimit, canonical, subdivisionGranularity);\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, {imagePositions, dashPositions, canonical});\n }\n\n addLine(vertices: Array, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number, canonical: CanonicalTileID | undefined, subdivisionGranularity: SubdivisionGranularitySetting) {\n this.distance = 0;\n this.scaledDistance = 0;\n this.totalDistance = 0;\n\n // First, subdivide the line if needed (mostly for globe rendering)\n const granularity = canonical ? subdivisionGranularity.line.getGranularityForZoomLevel(canonical.z) : 1;\n vertices = subdivideVertexLine(vertices, granularity);\n\n if (this.lineClips) {\n this.lineClipsArray.push(this.lineClips);\n // Calculate the total distance, in tile units, of this tiled line feature\n for (let i = 0; i < vertices.length - 1; i++) {\n this.totalDistance += vertices[i].dist(vertices[i + 1]);\n }\n this.updateScaledDistance();\n this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);\n }\n\n const isPolygon = VectorTileFeature.types[feature.type] === 'Polygon';\n\n // If the line has duplicate vertices at the ends, adjust start/length to remove them.\n let len = vertices.length;\n while (len >= 2 && vertices[len - 1].equals(vertices[len - 2])) {\n len--;\n }\n let first = 0;\n while (first < len - 1 && vertices[first].equals(vertices[first + 1])) {\n first++;\n }\n\n // Ignore invalid geometry.\n if (len < (isPolygon ? 3 : 2)) return;\n\n if (join === 'bevel') miterLimit = 1.05;\n\n const sharpCornerOffset = this.overscaling <= 16 ?\n SHARP_CORNER_OFFSET * EXTENT / (512 * this.overscaling) :\n 0;\n\n // we could be more precise, but it would only save a negligible amount of space\n const segment = this.segments.prepareSegment(len * 10, this.layoutVertexArray, this.indexArray);\n\n let currentVertex: Point;\n let prevVertex: Point;\n let nextVertex: Point;\n let prevNormal: Point;\n let nextNormal: Point;\n\n // the last two vertices added\n this.e1 = this.e2 = -1;\n\n if (isPolygon) {\n currentVertex = vertices[len - 2];\n nextNormal = vertices[first].sub(currentVertex)._unit()._perp();\n }\n\n for (let i = first; i < len; i++) {\n\n nextVertex = i === len - 1 ?\n (isPolygon ? vertices[first + 1] : undefined) : // if it's a polygon, treat the last vertex like the first\n vertices[i + 1]; // just the next vertex\n\n // if two consecutive vertices exist, skip the current one\n if (nextVertex && vertices[i].equals(nextVertex)) continue;\n\n if (nextNormal) prevNormal = nextNormal;\n if (currentVertex) prevVertex = currentVertex;\n\n currentVertex = vertices[i];\n\n // Calculate the normal towards the next vertex in this line. In case\n // there is no next vertex, pretend that the line is continuing straight,\n // meaning that we are just using the previous normal.\n nextNormal = nextVertex ? nextVertex.sub(currentVertex)._unit()._perp() : prevNormal;\n\n // If we still don't have a previous normal, this is the beginning of a\n // non-closed line, so we're doing a straight \"join\".\n prevNormal = prevNormal || nextNormal;\n\n // Determine the normal of the join extrusion. It is the angle bisector\n // of the segments between the previous line and the next line.\n // In the case of 180° angles, the prev and next normals cancel each other out:\n // prevNormal + nextNormal = (0, 0), its magnitude is 0, so the unit vector would be\n // undefined. In that case, we're keeping the joinNormal at (0, 0), so that the cosHalfAngle\n // below will also become 0 and miterLength will become Infinity.\n let joinNormal = prevNormal.add(nextNormal);\n if (joinNormal.x !== 0 || joinNormal.y !== 0) {\n joinNormal._unit();\n }\n /* joinNormal prevNormal\n * ↖ ↑\n * .________. prevVertex\n * |\n * nextNormal ← | currentVertex\n * |\n * nextVertex !\n *\n */\n\n // calculate cosines of the angle (and its half) using dot product\n const cosAngle = prevNormal.x * nextNormal.x + prevNormal.y * nextNormal.y;\n const cosHalfAngle = joinNormal.x * nextNormal.x + joinNormal.y * nextNormal.y;\n\n // Calculate the length of the miter (the ratio of the miter to the width)\n // as the inverse of cosine of the angle between next and join normals\n const miterLength = cosHalfAngle !== 0 ? 1 / cosHalfAngle : Infinity;\n\n // approximate angle from cosine\n const approxAngle = 2 * Math.sqrt(2 - 2 * cosHalfAngle);\n\n const isSharpCorner = cosHalfAngle < COS_HALF_SHARP_CORNER && prevVertex && nextVertex;\n const lineTurnsLeft = prevNormal.x * nextNormal.y - prevNormal.y * nextNormal.x > 0;\n\n if (isSharpCorner && i > first) {\n const prevSegmentLength = currentVertex.dist(prevVertex);\n if (prevSegmentLength > 2 * sharpCornerOffset) {\n const newPrevVertex = currentVertex.sub(currentVertex.sub(prevVertex)._mult(sharpCornerOffset / prevSegmentLength)._round());\n this.updateDistance(prevVertex, newPrevVertex);\n this.addCurrentVertex(newPrevVertex, prevNormal, 0, 0, segment);\n prevVertex = newPrevVertex;\n }\n }\n\n // The join if a middle vertex, otherwise the cap.\n const middleVertex = prevVertex && nextVertex;\n let currentJoin = middleVertex ? join : isPolygon ? 'butt' : cap;\n\n if (middleVertex && currentJoin === 'round') {\n if (miterLength < roundLimit) {\n currentJoin = 'miter';\n } else if (miterLength <= 2) {\n currentJoin = 'fakeround';\n }\n }\n\n if (currentJoin === 'miter' && miterLength > miterLimit) {\n currentJoin = 'bevel';\n }\n\n if (currentJoin === 'bevel') {\n // The maximum extrude length is 128 / 63 = 2 times the width of the line\n // so if miterLength >= 2 we need to draw a different type of bevel here.\n if (miterLength > 2) currentJoin = 'flipbevel';\n\n // If the miterLength is really small and the line bevel wouldn't be visible,\n // just draw a miter join to save a triangle.\n if (miterLength < miterLimit) currentJoin = 'miter';\n }\n\n // Calculate how far along the line the currentVertex is\n if (prevVertex) this.updateDistance(prevVertex, currentVertex);\n\n if (currentJoin === 'miter') {\n\n joinNormal._mult(miterLength);\n this.addCurrentVertex(currentVertex, joinNormal, 0, 0, segment);\n\n } else if (currentJoin === 'flipbevel') {\n // miter is too big, flip the direction to make a beveled join\n\n if (miterLength > 100) {\n // Almost parallel lines\n joinNormal = nextNormal.mult(-1);\n\n } else {\n const bevelLength = miterLength * prevNormal.add(nextNormal).mag() / prevNormal.sub(nextNormal).mag();\n joinNormal._perp()._mult(bevelLength * (lineTurnsLeft ? -1 : 1));\n }\n this.addCurrentVertex(currentVertex, joinNormal, 0, 0, segment);\n this.addCurrentVertex(currentVertex, joinNormal.mult(-1), 0, 0, segment);\n\n } else if (currentJoin === 'bevel' || currentJoin === 'fakeround') {\n const offset = -Math.sqrt(miterLength * miterLength - 1);\n const offsetA = lineTurnsLeft ? offset : 0;\n const offsetB = lineTurnsLeft ? 0 : offset;\n\n // Close previous segment with a bevel\n if (prevVertex) {\n this.addCurrentVertex(currentVertex, prevNormal, offsetA, offsetB, segment);\n }\n\n if (currentJoin === 'fakeround') {\n // The join angle is sharp enough that a round join would be visible.\n // Bevel joins fill the gap between segments with a single pie slice triangle.\n // Create a round join by adding multiple pie slices. The join isn't actually round, but\n // it looks like it is at the sizes we render lines at.\n\n // pick the number of triangles for approximating round join by based on the angle between normals\n const n = Math.round((approxAngle * 180 / Math.PI) / DEG_PER_TRIANGLE);\n\n for (let m = 1; m < n; m++) {\n let t = m / n;\n if (t !== 0.5) {\n // approximate spherical interpolation https://observablehq.com/@mourner/approximating-geometric-slerp\n const t2 = t - 0.5;\n const A = 1.0904 + cosAngle * (-3.2452 + cosAngle * (3.55645 - cosAngle * 1.43519));\n const B = 0.848013 + cosAngle * (-1.06021 + cosAngle * 0.215638);\n t = t + t * t2 * (t - 1) * (A * t2 * t2 + B);\n }\n const extrude = nextNormal.sub(prevNormal)._mult(t)._add(prevNormal)._unit()._mult(lineTurnsLeft ? -1 : 1);\n this.addHalfVertex(currentVertex, extrude.x, extrude.y, false, lineTurnsLeft, 0, segment);\n }\n }\n\n if (nextVertex) {\n // Start next segment\n this.addCurrentVertex(currentVertex, nextNormal, -offsetA, -offsetB, segment);\n }\n\n } else if (currentJoin === 'butt') {\n this.addCurrentVertex(currentVertex, joinNormal, 0, 0, segment); // butt cap\n\n } else if (currentJoin === 'square') {\n const offset = prevVertex ? 1 : -1; // closing or starting square cap\n this.addCurrentVertex(currentVertex, joinNormal, offset, offset, segment);\n\n } else if (currentJoin === 'round') {\n\n if (prevVertex) {\n // Close previous segment with butt\n this.addCurrentVertex(currentVertex, prevNormal, 0, 0, segment);\n\n // Add round cap or linejoin at end of segment\n this.addCurrentVertex(currentVertex, prevNormal, 1, 1, segment, true);\n }\n if (nextVertex) {\n // Add round cap before first segment\n this.addCurrentVertex(currentVertex, nextNormal, -1, -1, segment, true);\n\n // Start next segment with a butt\n this.addCurrentVertex(currentVertex, nextNormal, 0, 0, segment);\n }\n }\n\n if (isSharpCorner && i < len - 1) {\n const nextSegmentLength = currentVertex.dist(nextVertex);\n if (nextSegmentLength > 2 * sharpCornerOffset) {\n const newCurrentVertex = currentVertex.add(nextVertex.sub(currentVertex)._mult(sharpCornerOffset / nextSegmentLength)._round());\n this.updateDistance(currentVertex, newCurrentVertex);\n this.addCurrentVertex(newCurrentVertex, nextNormal, 0, 0, segment);\n currentVertex = newCurrentVertex;\n }\n }\n }\n }\n\n /**\n * Add two vertices to the buffers.\n *\n * @param p - the line vertex to add buffer vertices for\n * @param normal - vertex normal\n * @param endLeft - extrude to shift the left vertex along the line\n * @param endRight - extrude to shift the left vertex along the line\n * @param segment - the segment object to add the vertex to\n * @param round - whether this is a round cap\n */\n addCurrentVertex(p: Point, normal: Point, endLeft: number, endRight: number, segment: Segment, round: boolean = false) {\n // left and right extrude vectors, perpendicularly shifted by endLeft/endRight\n const leftX = normal.x + normal.y * endLeft;\n const leftY = normal.y - normal.x * endLeft;\n const rightX = -normal.x + normal.y * endRight;\n const rightY = -normal.y - normal.x * endRight;\n\n this.addHalfVertex(p, leftX, leftY, round, false, endLeft, segment);\n this.addHalfVertex(p, rightX, rightY, round, true, -endRight, segment);\n\n // There is a maximum \"distance along the line\" that we can store in the buffers.\n // When we get close to the distance, reset it to zero and add the vertex again with\n // a distance of zero. The max distance is determined by the number of bits we allocate\n // to `linesofar`.\n if (this.distance > MAX_LINE_DISTANCE / 2 && this.totalDistance === 0) {\n this.distance = 0;\n this.updateScaledDistance();\n this.addCurrentVertex(p, normal, endLeft, endRight, segment, round);\n }\n }\n\n addHalfVertex({x, y}: Point, extrudeX: number, extrudeY: number, round: boolean, up: boolean, dir: number, segment: Segment) {\n const totalDistance = this.lineClips ? this.scaledDistance * (MAX_LINE_DISTANCE - 1) : this.scaledDistance;\n // scale down so that we can store longer distances while sacrificing precision.\n const linesofarScaled = totalDistance * LINE_DISTANCE_SCALE;\n\n this.layoutVertexArray.emplaceBack(\n // a_pos_normal\n // Encode round/up the least significant bits\n (x << 1) + (round ? 1 : 0),\n (y << 1) + (up ? 1 : 0),\n // a_data\n // add 128 to store a byte in an unsigned byte\n Math.round(EXTRUDE_SCALE * extrudeX) + 128,\n Math.round(EXTRUDE_SCALE * extrudeY) + 128,\n // Encode the -1/0/1 direction value into the first two bits of .z of a_data.\n // Combine it with the lower 6 bits of `linesofarScaled` (shifted by 2 bits to make\n // room for the direction value). The upper 8 bits of `linesofarScaled` are placed in\n // the `w` component.\n ((dir === 0 ? 0 : (dir < 0 ? -1 : 1)) + 1) | ((linesofarScaled & 0x3F) << 2),\n linesofarScaled >> 6);\n\n // Constructs a second vertex buffer with higher precision line progress\n if (this.lineClips) {\n const progressRealigned = this.scaledDistance - this.lineClips.start;\n const endClipRealigned = this.lineClips.end - this.lineClips.start;\n const uvX = progressRealigned / endClipRealigned;\n this.layoutVertexArray2.emplaceBack(uvX, this.lineClipsArray.length);\n }\n\n const e = segment.vertexLength++;\n if (this.e1 >= 0 && this.e2 >= 0) {\n this.indexArray.emplaceBack(this.e1, e, this.e2);\n segment.primitiveLength++;\n }\n if (up) {\n this.e2 = e;\n } else {\n this.e1 = e;\n }\n }\n\n updateScaledDistance() {\n // Knowing the ratio of the full linestring covered by this tiled feature, as well\n // as the total distance (in tile units) of this tiled feature, and the distance\n // (in tile units) of the current vertex, we can determine the relative distance\n // of this vertex along the full linestring feature and scale it to [0, 2^15)\n this.scaledDistance = this.lineClips ?\n this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance :\n this.distance;\n }\n\n updateDistance(prev: Point, next: Point) {\n this.distance += prev.dist(next);\n this.updateScaledDistance();\n }\n\n private hasLineDasharray(layers: Array): boolean {\n for (const layer of layers) {\n const dasharrayProperty = layer.paint.get('line-dasharray');\n if (dasharrayProperty && !dasharrayProperty.isConstant()) {\n return true;\n }\n }\n return false;\n }\n\n private addLineDashDependencies(layers: Array, bucketFeature: BucketFeature, zoom: number, options: PopulateParameters) {\n for (const layer of layers) {\n const dasharrayProperty = layer.paint.get('line-dasharray');\n\n if (!dasharrayProperty || dasharrayProperty.value.kind === 'constant') {\n continue;\n }\n\n const round = layer.layout.get('line-cap') === 'round';\n\n const min = {\n dasharray: dasharrayProperty.value.evaluate({zoom: zoom - 1}, bucketFeature, {}),\n round\n };\n const mid = {\n dasharray: dasharrayProperty.value.evaluate({zoom}, bucketFeature, {}),\n round\n };\n const max = {\n dasharray: dasharrayProperty.value.evaluate({zoom: zoom + 1}, bucketFeature, {}),\n round\n };\n\n const minKey = `${min.dasharray.join(',')},${min.round}`;\n const midKey = `${mid.dasharray.join(',')},${mid.round}`;\n const maxKey = `${max.dasharray.join(',')},${max.round}`;\n\n options.dashDependencies[minKey] = min;\n options.dashDependencies[midKey] = mid;\n options.dashDependencies[maxKey] = max;\n\n bucketFeature.dashes[layer.id] = {min: minKey, mid: midKey, max: maxKey};\n }\n }\n}\n\nregister('LineBucket', LineBucket, {omit: ['layers', 'patternFeatures']});\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type LineLayoutProps = {\n \"line-cap\": DataConstantProperty<\"butt\" | \"round\" | \"square\">,\n \"line-join\": DataDrivenProperty<\"bevel\" | \"round\" | \"miter\">,\n \"line-miter-limit\": DataConstantProperty,\n \"line-round-limit\": DataConstantProperty,\n \"line-sort-key\": DataDrivenProperty,\n};\n\nexport type LineLayoutPropsPossiblyEvaluated = {\n \"line-cap\": \"butt\" | \"round\" | \"square\",\n \"line-join\": PossiblyEvaluatedPropertyValue<\"bevel\" | \"round\" | \"miter\">,\n \"line-miter-limit\": number,\n \"line-round-limit\": number,\n \"line-sort-key\": PossiblyEvaluatedPropertyValue,\n};\n\nlet layout: Properties;\nconst getLayout = () => layout = layout || new Properties({\n \"line-cap\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-cap\"] as any as StylePropertySpecification),\n \"line-join\": new DataDrivenProperty(styleSpec[\"layout_line\"][\"line-join\"] as any as StylePropertySpecification),\n \"line-miter-limit\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-miter-limit\"] as any as StylePropertySpecification),\n \"line-round-limit\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-round-limit\"] as any as StylePropertySpecification),\n \"line-sort-key\": new DataDrivenProperty(styleSpec[\"layout_line\"][\"line-sort-key\"] as any as StylePropertySpecification),\n});\n\nexport type LinePaintProps = {\n \"line-opacity\": DataDrivenProperty,\n \"line-color\": DataDrivenProperty,\n \"line-translate\": DataConstantProperty<[number, number]>,\n \"line-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"line-width\": DataDrivenProperty,\n \"line-gap-width\": DataDrivenProperty,\n \"line-offset\": DataDrivenProperty,\n \"line-blur\": DataDrivenProperty,\n \"line-dasharray\": CrossFadedDataDrivenProperty>,\n \"line-pattern\": CrossFadedDataDrivenProperty,\n \"line-gradient\": ColorRampProperty,\n};\n\nexport type LinePaintPropsPossiblyEvaluated = {\n \"line-opacity\": PossiblyEvaluatedPropertyValue,\n \"line-color\": PossiblyEvaluatedPropertyValue,\n \"line-translate\": [number, number],\n \"line-translate-anchor\": \"map\" | \"viewport\",\n \"line-width\": PossiblyEvaluatedPropertyValue,\n \"line-gap-width\": PossiblyEvaluatedPropertyValue,\n \"line-offset\": PossiblyEvaluatedPropertyValue,\n \"line-blur\": PossiblyEvaluatedPropertyValue,\n \"line-dasharray\": PossiblyEvaluatedPropertyValue>>,\n \"line-pattern\": PossiblyEvaluatedPropertyValue>,\n \"line-gradient\": ColorRampProperty,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"line-opacity\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-opacity\"] as any as StylePropertySpecification),\n \"line-color\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-color\"] as any as StylePropertySpecification),\n \"line-translate\": new DataConstantProperty(styleSpec[\"paint_line\"][\"line-translate\"] as any as StylePropertySpecification),\n \"line-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_line\"][\"line-translate-anchor\"] as any as StylePropertySpecification),\n \"line-width\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-width\"] as any as StylePropertySpecification),\n \"line-gap-width\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-gap-width\"] as any as StylePropertySpecification),\n \"line-offset\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-offset\"] as any as StylePropertySpecification),\n \"line-blur\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-blur\"] as any as StylePropertySpecification),\n \"line-dasharray\": new CrossFadedDataDrivenProperty(styleSpec[\"paint_line\"][\"line-dasharray\"] as any as StylePropertySpecification),\n \"line-pattern\": new CrossFadedDataDrivenProperty(styleSpec[\"paint_line\"][\"line-pattern\"] as any as StylePropertySpecification),\n \"line-gradient\": new ColorRampProperty(styleSpec[\"paint_line\"][\"line-gradient\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() }, get layout() { return getLayout() } });","import {type QueryIntersectsFeatureParams, StyleLayer} from '../style_layer';\nimport {LineBucket} from '../../data/bucket/line_bucket';\nimport {polygonIntersectsBufferedMultiLine} from '../../util/intersection_tests';\nimport {getMaximumPaintValue, translateDistance, translate, offsetLine} from '../query_utils';\nimport properties, {type LineLayoutPropsPossiblyEvaluated, type LinePaintPropsPossiblyEvaluated} from './line_style_layer_properties.g';\nimport {extend} from '../../util/util';\nimport {EvaluationParameters} from '../evaluation_parameters';\nimport {type Transitionable, type Transitioning, type Layout, type PossiblyEvaluated, DataDrivenProperty} from '../properties';\n\nimport {isZoomExpression, Step} from '@maplibre/maplibre-gl-style-spec';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {Bucket, BucketParameters} from '../../data/bucket';\nimport type {LineLayoutProps, LinePaintProps} from './line_style_layer_properties.g';\n\nexport class LineFloorwidthProperty extends DataDrivenProperty {\n useIntegerZoom: true;\n\n possiblyEvaluate(value, parameters) {\n parameters = new EvaluationParameters(Math.floor(parameters.zoom), {\n now: parameters.now,\n fadeDuration: parameters.fadeDuration,\n zoomHistory: parameters.zoomHistory,\n transition: parameters.transition\n });\n return super.possiblyEvaluate(value, parameters);\n }\n\n evaluate(value, globals, feature, featureState) {\n globals = extend({}, globals, {zoom: Math.floor(globals.zoom)});\n return super.evaluate(value, globals, feature, featureState);\n }\n}\n\nlet lineFloorwidthProperty: LineFloorwidthProperty;\n\nexport const isLineStyleLayer = (layer: StyleLayer): layer is LineStyleLayer => layer.type === 'line';\n\nexport class LineStyleLayer extends StyleLayer {\n _unevaluatedLayout: Layout;\n layout: PossiblyEvaluated;\n\n gradientVersion: number;\n stepInterpolant: boolean;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n this.gradientVersion = 0;\n if (!lineFloorwidthProperty) {\n lineFloorwidthProperty =\n new LineFloorwidthProperty(properties.paint.properties['line-width'].specification);\n lineFloorwidthProperty.useIntegerZoom = true;\n }\n }\n\n _handleSpecialPaintPropertyUpdate(name: string) {\n if (name === 'line-gradient') {\n const expression = this.gradientExpression();\n if (isZoomExpression(expression)) {\n this.stepInterpolant = expression._styleExpression.expression instanceof Step;\n } else {\n this.stepInterpolant = false;\n }\n this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER;\n }\n }\n\n gradientExpression() {\n return this._transitionablePaint._values['line-gradient'].value.expression;\n }\n\n recalculate(parameters: EvaluationParameters, availableImages: Array) {\n super.recalculate(parameters, availableImages);\n (this.paint._values as any)['line-floorwidth'] =\n lineFloorwidthProperty.possiblyEvaluate(this._transitioningPaint._values['line-width'].value, parameters);\n }\n\n createBucket(parameters: BucketParameters) {\n return new LineBucket(parameters);\n }\n\n queryRadius(bucket: Bucket): number {\n const lineBucket: LineBucket = (bucket as any);\n const width = getLineWidth(\n getMaximumPaintValue('line-width', this, lineBucket),\n getMaximumPaintValue('line-gap-width', this, lineBucket));\n const offset = getMaximumPaintValue('line-offset', this, lineBucket);\n return width / 2 + Math.abs(offset) + translateDistance(this.paint.get('line-translate'));\n }\n\n queryIntersectsFeature({\n queryGeometry,\n feature,\n featureState,\n geometry,\n transform,\n pixelsToTileUnits}: QueryIntersectsFeatureParams\n ): boolean {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('line-translate'),\n this.paint.get('line-translate-anchor'),\n -transform.bearingInRadians, pixelsToTileUnits);\n const halfWidth = pixelsToTileUnits / 2 * getLineWidth(\n this.paint.get('line-width').evaluate(feature, featureState),\n this.paint.get('line-gap-width').evaluate(feature, featureState));\n const lineOffset = this.paint.get('line-offset').evaluate(feature, featureState);\n if (lineOffset) {\n geometry = offsetLine(geometry, lineOffset * pixelsToTileUnits);\n }\n\n return polygonIntersectsBufferedMultiLine(translatedPolygon, geometry, halfWidth);\n }\n\n isTileClipped() {\n return true;\n }\n}\n\nfunction getLineWidth(lineWidth, lineGapWidth) {\n if (lineGapWidth > 0) {\n return lineGapWidth + 2 * lineWidth;\n } else {\n return lineWidth;\n }\n}\n","import {createLayout} from '../../util/struct_array';\n\nexport const symbolLayoutAttributes = createLayout([\n {name: 'a_pos_offset', components: 4, type: 'Int16'},\n {name: 'a_data', components: 4, type: 'Uint16'},\n {name: 'a_pixeloffset', components: 4, type: 'Int16'}\n], 4);\n\nexport const dynamicLayoutAttributes = createLayout([\n {name: 'a_projected_pos', components: 3, type: 'Float32'}\n], 4);\n\nexport const placementOpacityAttributes = createLayout([\n {name: 'a_fade_opacity', components: 1, type: 'Uint32'}\n], 4);\n\nexport const collisionVertexAttributes = createLayout([\n {name: 'a_placed', components: 2, type: 'Uint8'},\n {name: 'a_shift', components: 2, type: 'Float32'},\n {name: 'a_box_real', components: 2, type: 'Int16'},\n]);\n\nexport const collisionBox = createLayout([\n // the box is centered around the anchor point\n {type: 'Int16', name: 'anchorPointX'},\n {type: 'Int16', name: 'anchorPointY'},\n\n // distances to the edges from the anchor\n {type: 'Int16', name: 'x1'},\n {type: 'Int16', name: 'y1'},\n {type: 'Int16', name: 'x2'},\n {type: 'Int16', name: 'y2'},\n\n // the index of the feature in the original vectortile\n {type: 'Uint32', name: 'featureIndex'},\n // the source layer the feature appears in\n {type: 'Uint16', name: 'sourceLayerIndex'},\n // the bucket the feature appears in\n {type: 'Uint16', name: 'bucketIndex'},\n]);\n\nexport const collisionBoxLayout = createLayout([ // used to render collision boxes for debugging purposes\n {name: 'a_pos', components: 2, type: 'Int16'},\n {name: 'a_anchor_pos', components: 2, type: 'Int16'},\n {name: 'a_extrude', components: 2, type: 'Int16'}\n], 4);\n\nexport const collisionCircleLayout = createLayout([ // used to render collision circles for debugging purposes\n {name: 'a_pos', components: 2, type: 'Float32'},\n {name: 'a_radius', components: 1, type: 'Float32'},\n {name: 'a_flags', components: 2, type: 'Int16'}\n], 4);\n\nexport const quadTriangle = createLayout([\n {name: 'triangle', components: 3, type: 'Uint16'},\n]);\n\nexport const placement = createLayout([\n {type: 'Int16', name: 'anchorX'},\n {type: 'Int16', name: 'anchorY'},\n {type: 'Uint16', name: 'glyphStartIndex'},\n {type: 'Uint16', name: 'numGlyphs'},\n {type: 'Uint32', name: 'vertexStartIndex'},\n {type: 'Uint32', name: 'lineStartIndex'},\n {type: 'Uint32', name: 'lineLength'},\n {type: 'Uint16', name: 'segment'},\n {type: 'Uint16', name: 'lowerSize'},\n {type: 'Uint16', name: 'upperSize'},\n {type: 'Float32', name: 'lineOffsetX'},\n {type: 'Float32', name: 'lineOffsetY'},\n {type: 'Uint8', name: 'writingMode'},\n {type: 'Uint8', name: 'placedOrientation'},\n {type: 'Uint8', name: 'hidden'},\n {type: 'Uint32', name: 'crossTileID'},\n {type: 'Int16', name: 'associatedIconIndex'}\n]);\n\nexport const symbolInstance = createLayout([\n {type: 'Int16', name: 'anchorX'},\n {type: 'Int16', name: 'anchorY'},\n {type: 'Int16', name: 'rightJustifiedTextSymbolIndex'},\n {type: 'Int16', name: 'centerJustifiedTextSymbolIndex'},\n {type: 'Int16', name: 'leftJustifiedTextSymbolIndex'},\n {type: 'Int16', name: 'verticalPlacedTextSymbolIndex'},\n {type: 'Int16', name: 'placedIconSymbolIndex'},\n {type: 'Int16', name: 'verticalPlacedIconSymbolIndex'},\n {type: 'Uint16', name: 'key'},\n {type: 'Uint16', name: 'textBoxStartIndex'},\n {type: 'Uint16', name: 'textBoxEndIndex'},\n {type: 'Uint16', name: 'verticalTextBoxStartIndex'},\n {type: 'Uint16', name: 'verticalTextBoxEndIndex'},\n {type: 'Uint16', name: 'iconBoxStartIndex'},\n {type: 'Uint16', name: 'iconBoxEndIndex'},\n {type: 'Uint16', name: 'verticalIconBoxStartIndex'},\n {type: 'Uint16', name: 'verticalIconBoxEndIndex'},\n {type: 'Uint16', name: 'featureIndex'},\n {type: 'Uint16', name: 'numHorizontalGlyphVertices'},\n {type: 'Uint16', name: 'numVerticalGlyphVertices'},\n {type: 'Uint16', name: 'numIconVertices'},\n {type: 'Uint16', name: 'numVerticalIconVertices'},\n {type: 'Uint16', name: 'useRuntimeCollisionCircles'},\n {type: 'Uint32', name: 'crossTileID'},\n {type: 'Float32', name: 'textBoxScale'},\n {type: 'Float32', name: 'collisionCircleDiameter'},\n {type: 'Uint16', name: 'textAnchorOffsetStartIndex'},\n {type: 'Uint16', name: 'textAnchorOffsetEndIndex'}\n]);\n\nexport const glyphOffset = createLayout([\n {type: 'Float32', name: 'offsetX'}\n]);\n\nexport const lineVertex = createLayout([\n {type: 'Int16', name: 'x'},\n {type: 'Int16', name: 'y'},\n {type: 'Int16', name: 'tileUnitDistanceFromAnchor'}\n]);\n\nexport const textAnchorOffset = createLayout([\n {type: 'Uint16', name: 'textAnchor'},\n {type: 'Float32', components: 2, name: 'textOffset'}\n]);\n","import {rtlWorkerPlugin} from '../source/rtl_text_plugin_worker';\n\nimport type {SymbolStyleLayer} from '../style/style_layer/symbol_style_layer';\nimport type {Feature} from '@maplibre/maplibre-gl-style-spec';\nimport {type Formatted} from '@maplibre/maplibre-gl-style-spec';\n\nfunction transformTextInternal(text: string, layer: SymbolStyleLayer, feature: Feature) {\n const transform = layer.layout.get('text-transform').evaluate(feature, {});\n if (transform === 'uppercase') {\n text = text.toLocaleUpperCase();\n } else if (transform === 'lowercase') {\n text = text.toLocaleLowerCase();\n }\n\n if (rtlWorkerPlugin.applyArabicShaping) {\n text = rtlWorkerPlugin.applyArabicShaping(text);\n }\n\n return text;\n}\n\nexport function transformText(text: Formatted, layer: SymbolStyleLayer, feature: Feature): Formatted {\n text.sections.forEach(section => {\n section.text = transformTextInternal(section.text, layer, feature);\n });\n return text;\n}\n","// ONE_EM constant used to go between \"em\" units used in style spec and \"points\" used internally for layout\n\nexport default 24;\n","import {charHasRotatedVerticalOrientation} from './script_detection';\n\nexport const verticalizedCharacterMap = {\n '!': '︕',\n '#': '#',\n '$': '$',\n '%': '%',\n '&': '&',\n '(': '︵',\n ')': '︶',\n '*': '*',\n '+': '+',\n ',': '︐',\n '-': '︲',\n '.': '・',\n '/': '/',\n ':': '︓',\n ';': '︔',\n '<': '︿',\n '=': '=',\n '>': '﹀',\n '?': '︖',\n '@': '@',\n '[': '﹇',\n '\\\\': '\',\n ']': '﹈',\n '^': '^',\n '_': '︳',\n '`': '`',\n '{': '︷',\n '|': '―',\n '}': '︸',\n '~': '~',\n '¢': '¢',\n '£': '£',\n '¥': '¥',\n '¦': '¦',\n '¬': '¬',\n '¯': ' ̄',\n '–': '︲',\n '—': '︱',\n '‘': '﹃',\n '’': '﹄',\n '“': '﹁',\n '”': '﹂',\n '…': '︙',\n '⋯': '︙',\n '‧': '・',\n '₩': '₩',\n '、': '︑',\n '。': '︒',\n '〈': '︿',\n '〉': '﹀',\n '《': '︽',\n '》': '︾',\n '「': '﹁',\n '」': '﹂',\n '『': '﹃',\n '』': '﹄',\n '【': '︻',\n '】': '︼',\n '〔': '︹',\n '〕': '︺',\n '〖': '︗',\n '〗': '︘',\n '!': '︕',\n '(': '︵',\n ')': '︶',\n ',': '︐',\n '-': '︲',\n '.': '・',\n ':': '︓',\n ';': '︔',\n '<': '︿',\n '>': '﹀',\n '?': '︖',\n '[': '﹇',\n ']': '﹈',\n '_': '︳',\n '{': '︷',\n '|': '―',\n '}': '︸',\n '⦅': '︵',\n '⦆': '︶',\n '。': '︒',\n '「': '﹁',\n '」': '﹂'\n};\n\nexport function verticalizePunctuation(input: string) {\n let output = '';\n\n let prevChar = {premature: true, value: undefined};\n const chars = input[Symbol.iterator]();\n let char = chars.next();\n const nextChars = input[Symbol.iterator]();\n nextChars.next();\n let nextChar = nextChars.next();\n\n while (!char.done) {\n const canReplacePunctuation = (\n (nextChar.done || !charHasRotatedVerticalOrientation(nextChar.value.codePointAt(0)) || verticalizedCharacterMap[nextChar.value]) &&\n (prevChar.premature || !charHasRotatedVerticalOrientation(prevChar.value.codePointAt(0)) || verticalizedCharacterMap[prevChar.value])\n );\n\n if (canReplacePunctuation && verticalizedCharacterMap[char.value]) {\n output += verticalizedCharacterMap[char.value];\n } else {\n output += char.value;\n }\n\n prevChar = {value: char.value, premature: false};\n char = chars.next();\n nextChar = nextChars.next();\n }\n\n return output;\n}\n\n","import type {Formatted, FormattedSection, VerticalAlign} from '@maplibre/maplibre-gl-style-spec';\n\nimport ONE_EM from './one_em';\nimport type {ImagePosition} from '../render/image_atlas';\nimport type {StyleGlyph} from '../style/style_glyph';\nimport {verticalizePunctuation} from '../util/verticalize_punctuation';\nimport {charIsWhitespace} from '../util/script_detection';\nimport {codePointAllowsIdeographicBreaking} from '../util/unicode_properties.g';\nimport {warnOnce} from '../util/util';\n\nexport type TextSectionOptions = {\n scale: number;\n verticalAlign: VerticalAlign;\n fontStack: string;\n};\n\nexport type ImageSectionOptions = {\n scale: number;\n verticalAlign: VerticalAlign;\n imageName: string;\n};\n\nexport type SectionOptions = TextSectionOptions | ImageSectionOptions;\n\n// Max number of images in label is 6401 U+E000–U+F8FF that covers\n// Basic Multilingual Plane Unicode Private Use Area (PUA).\nconst PUAbegin = 0xE000;\nconst PUAend = 0xF8FF;\n\ntype Break = {\n index: number;\n x: number;\n priorBreak: Break;\n badness: number;\n};\n\n// using computed properties due to https://github.com/facebook/flow/issues/380\n/* eslint no-useless-computed-key: 0 */\n\nconst breakable: {\n [_: number]: boolean;\n} = {\n [0x0a]: true, // newline\n [0x20]: true, // space\n [0x26]: true, // ampersand\n [0x29]: true, // right parenthesis\n [0x2b]: true, // plus sign\n [0x2d]: true, // hyphen-minus\n [0x2f]: true, // solidus\n [0xad]: true, // soft hyphen\n [0xb7]: true, // middle dot\n [0x200b]: true, // zero-width space\n [0x2010]: true, // hyphen\n [0x2013]: true, // en dash\n [0x2027]: true // interpunct\n // Many other characters may be reasonable breakpoints\n // Consider \"neutral orientation\" characters in codePointHasNeutralVerticalOrientation in unicode_properties\n // See https://github.com/mapbox/mapbox-gl-js/issues/3658\n};\n\n// Allow breaks depending on the following character\nconst breakableBefore: {\n [_: number]: boolean;\n} = {\n [0x28]: true, // left parenthesis\n};\n\nfunction getGlyphAdvance(\n codePoint: number,\n section: SectionOptions,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n imagePositions: {[_: string]: ImagePosition},\n spacing: number,\n layoutTextSize: number\n): number {\n if ('fontStack' in section) {\n const positions = glyphMap[section.fontStack];\n const glyph = positions && positions[codePoint];\n if (!glyph) return 0;\n return glyph.metrics.advance * section.scale + spacing;\n } else {\n const imagePosition = imagePositions[section.imageName];\n if (!imagePosition) return 0;\n return imagePosition.displaySize[0] * section.scale * ONE_EM / layoutTextSize + spacing;\n }\n}\n\nfunction calculateBadness(lineWidth: number,\n targetWidth: number,\n penalty: number,\n isLastBreak: boolean) {\n const raggedness = Math.pow(lineWidth - targetWidth, 2);\n if (isLastBreak) {\n // Favor finals lines shorter than average over longer than average\n if (lineWidth < targetWidth) {\n return raggedness / 2;\n } else {\n return raggedness * 2;\n }\n }\n\n return raggedness + Math.abs(penalty) * penalty;\n}\n\nfunction calculatePenalty(codePoint: number, nextCodePoint: number, penalizableIdeographicBreak: boolean) {\n let penalty = 0;\n // Force break on newline\n if (codePoint === 0x0a) {\n penalty -= 10000;\n }\n // Penalize breaks between characters that allow ideographic breaking because\n // they are less preferable than breaks at spaces (or zero width spaces).\n if (penalizableIdeographicBreak) {\n penalty += 150;\n }\n\n // Penalize open parenthesis at end of line\n if (codePoint === 0x28 || codePoint === 0xff08) {\n penalty += 50;\n }\n\n // Penalize close parenthesis at beginning of line\n if (nextCodePoint === 0x29 || nextCodePoint === 0xff09) {\n penalty += 50;\n }\n return penalty;\n}\n\nfunction evaluateBreak(\n breakIndex: number,\n breakX: number,\n targetWidth: number,\n potentialBreaks: Array,\n penalty: number,\n isLastBreak: boolean\n): Break {\n // We could skip evaluating breaks where the line length (breakX - priorBreak.x) > maxWidth\n // ...but in fact we allow lines longer than maxWidth (if there's no break points)\n // ...and when targetWidth and maxWidth are close, strictly enforcing maxWidth can give\n // more lopsided results.\n\n let bestPriorBreak: Break = null;\n let bestBreakBadness = calculateBadness(breakX, targetWidth, penalty, isLastBreak);\n\n for (const potentialBreak of potentialBreaks) {\n const lineWidth = breakX - potentialBreak.x;\n const breakBadness =\n calculateBadness(lineWidth, targetWidth, penalty, isLastBreak) + potentialBreak.badness;\n if (breakBadness <= bestBreakBadness) {\n bestPriorBreak = potentialBreak;\n bestBreakBadness = breakBadness;\n }\n }\n\n return {\n index: breakIndex,\n x: breakX,\n priorBreak: bestPriorBreak,\n badness: bestBreakBadness\n };\n}\n\nfunction leastBadBreaks(lastLineBreak?: Break | null): Array {\n if (!lastLineBreak) {\n return [];\n }\n return leastBadBreaks(lastLineBreak.priorBreak).concat(lastLineBreak.index);\n}\n\nexport class TaggedString {\n text: string;\n sections: Array;\n /** Maps each character in `text` to its corresponding entry in `sections`. */\n sectionIndex: Array;\n imageSectionID: number | null;\n\n constructor(text: string = '', sections: Array = [], sectionIndex: Array = []) {\n this.text = text;\n this.sections = sections;\n this.sectionIndex = sectionIndex;\n this.imageSectionID = null;\n }\n\n static fromFeature(text: Formatted, defaultFontStack: string) {\n const result = new TaggedString();\n for (let i = 0; i < text.sections.length; i++) {\n const section = text.sections[i];\n if (!section.image) {\n result.addTextSection(section, defaultFontStack);\n } else {\n result.addImageSection(section);\n }\n }\n return result;\n }\n\n length(): number {\n return [...this.text].length;\n }\n\n getSection(index: number): SectionOptions {\n return this.sections[this.sectionIndex[index]];\n }\n\n getSectionIndex(index: number): number {\n return this.sectionIndex[index];\n }\n\n verticalizePunctuation() {\n this.text = verticalizePunctuation(this.text);\n }\n\n /**\n * Returns whether the text contains zero-width spaces.\n *\n * Some tilesets such as Mapbox Streets insert ZWSPs as hints for line\n * breaking in CJK text.\n */\n hasZeroWidthSpaces(): boolean {\n return this.text.includes('\\u200b');\n }\n\n trim() {\n const leadingWhitespace = this.text.match(/^\\s*/);\n const leadingLength = leadingWhitespace ? leadingWhitespace[0].length : 0;\n // Require a preceding non-space character to avoid overlapping leading and trailing matches.\n const trailingWhitespace = this.text.match(/\\S\\s*$/);\n const trailingLength = trailingWhitespace ? trailingWhitespace[0].length - 1 : 0;\n this.text = this.text.substring(leadingLength, this.text.length - trailingLength);\n this.sectionIndex = this.sectionIndex.slice(leadingLength, this.sectionIndex.length - trailingLength);\n }\n\n substring(start: number, end: number): TaggedString {\n const text = [...this.text].slice(start, end).join('');\n const sectionIndex = this.sectionIndex.slice(start, end);\n return new TaggedString(text, this.sections, sectionIndex);\n }\n\n /**\n * Converts a UTF-16 character index to a UTF-16 code unit (JavaScript character index).\n */\n toCodeUnitIndex(unicodeIndex: number): number {\n return [...this.text].slice(0, unicodeIndex).join('').length;\n }\n\n toString(): string {\n return this.text;\n }\n\n getMaxScale() {\n return this.sectionIndex.reduce((max, index) => Math.max(max, this.sections[index].scale), 0);\n }\n\n getMaxImageSize(imagePositions: {[_: string]: ImagePosition}): {\n maxImageWidth: number;\n maxImageHeight: number;\n } {\n let maxImageWidth = 0;\n let maxImageHeight = 0;\n for (let i = 0; i < this.length(); i++) {\n const section = this.getSection(i);\n if ('imageName' in section) {\n const imagePosition = imagePositions[section.imageName];\n if (!imagePosition) continue;\n const size = imagePosition.displaySize;\n maxImageWidth = Math.max(maxImageWidth, size[0]);\n maxImageHeight = Math.max(maxImageHeight, size[1]);\n }\n }\n return {maxImageWidth, maxImageHeight};\n }\n\n addTextSection(section: FormattedSection, defaultFontStack: string) {\n this.text += section.text;\n this.sections.push({\n scale: section.scale || 1,\n verticalAlign: section.verticalAlign || 'bottom',\n fontStack: section.fontStack || defaultFontStack,\n } as TextSectionOptions);\n const index = this.sections.length - 1;\n this.sectionIndex.push(...[...section.text].map(() => index));\n }\n\n addImageSection(section: FormattedSection) {\n const imageName = section.image ? section.image.name : '';\n if (imageName.length === 0) {\n warnOnce('Can\\'t add FormattedSection with an empty image.');\n return;\n }\n\n const nextImageSectionCharCode = this.getNextImageSectionCharCode();\n if (!nextImageSectionCharCode) {\n warnOnce(`Reached maximum number of images ${PUAend - PUAbegin + 2}`);\n return;\n }\n\n this.text += String.fromCharCode(nextImageSectionCharCode);\n this.sections.push({\n scale: 1,\n verticalAlign: section.verticalAlign || 'bottom',\n imageName,\n } as ImageSectionOptions);\n this.sectionIndex.push(this.sections.length - 1);\n }\n\n getNextImageSectionCharCode(): number | null {\n if (!this.imageSectionID) {\n this.imageSectionID = PUAbegin;\n return this.imageSectionID;\n }\n\n if (this.imageSectionID >= PUAend) return null;\n return ++this.imageSectionID;\n }\n\n determineLineBreaks(\n spacing: number,\n maxWidth: number,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n imagePositions: {[_: string]: ImagePosition},\n layoutTextSize: number\n ): Array {\n const potentialLineBreaks = [];\n const targetWidth = this.determineAverageLineWidth(spacing, maxWidth, glyphMap, imagePositions, layoutTextSize);\n\n const hasZeroWidthSpaces = this.hasZeroWidthSpaces();\n\n let currentX = 0;\n\n let i = 0;\n const chars = this.text[Symbol.iterator]();\n let char = chars.next();\n const nextChars = this.text[Symbol.iterator]();\n nextChars.next();\n let nextChar = nextChars.next();\n const nextNextChars = this.text[Symbol.iterator]();\n nextNextChars.next();\n nextNextChars.next();\n let nextNextChar = nextNextChars.next();\n\n while (!char.done) {\n const section = this.getSection(i);\n const codePoint = char.value.codePointAt(0);\n if (!charIsWhitespace(codePoint)) currentX += getGlyphAdvance(codePoint, section, glyphMap, imagePositions, spacing, layoutTextSize);\n\n // Ideographic characters, spaces, and word-breaking punctuation that often appear without\n // surrounding spaces.\n if (!nextChar.done) {\n const ideographicBreak = codePointAllowsIdeographicBreaking(codePoint);\n const nextCodePoint = nextChar.value.codePointAt(0);\n if (breakable[codePoint] || ideographicBreak || 'imageName' in section || (!nextNextChar.done && breakableBefore[nextCodePoint])) {\n\n potentialLineBreaks.push(\n evaluateBreak(\n i + 1,\n currentX,\n targetWidth,\n potentialLineBreaks,\n calculatePenalty(codePoint, nextCodePoint, ideographicBreak && hasZeroWidthSpaces),\n false));\n }\n }\n i++;\n char = chars.next();\n nextChar = nextChars.next();\n nextNextChar = nextNextChars.next();\n }\n\n return leastBadBreaks(\n evaluateBreak(\n this.length(),\n currentX,\n targetWidth,\n potentialLineBreaks,\n 0,\n true));\n }\n\n determineAverageLineWidth(\n spacing: number,\n maxWidth: number,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n imagePositions: {[_: string]: ImagePosition},\n layoutTextSize: number) {\n let totalWidth = 0;\n\n let index = 0;\n for (const char of this.text) {\n const section = this.getSection(index);\n totalWidth += getGlyphAdvance(char.codePointAt(0), section, glyphMap, imagePositions, spacing, layoutTextSize);\n index++;\n }\n\n const lineCount = Math.max(1, Math.ceil(totalWidth / maxWidth));\n return totalWidth / lineCount;\n }\n}\n","\nconst SHIFT_LEFT_32 = (1 << 16) * (1 << 16);\nconst SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nconst TEXT_DECODER_MIN_LENGTH = 12;\nconst utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8');\n\nconst PBF_VARINT = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nconst PBF_FIXED64 = 1; // 64-bit: double, fixed64, sfixed64\nconst PBF_BYTES = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nconst PBF_FIXED32 = 5; // 32-bit: float, fixed32, sfixed32\n\nexport default class Pbf {\n /**\n * @param {Uint8Array | ArrayBuffer} [buf]\n */\n constructor(buf = new Uint8Array(16)) {\n this.buf = ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf);\n this.dataView = new DataView(this.buf.buffer);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n }\n\n // === READING =================================================================\n\n /**\n * @template T\n * @param {(tag: number, result: T, pbf: Pbf) => void} readField\n * @param {T} result\n * @param {number} [end]\n */\n readFields(readField, result, end = this.length) {\n while (this.pos < end) {\n const val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n }\n\n /**\n * @template T\n * @param {(tag: number, result: T, pbf: Pbf) => void} readField\n * @param {T} result\n */\n readMessage(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n }\n\n readFixed32() {\n const val = this.dataView.getUint32(this.pos, true);\n this.pos += 4;\n return val;\n }\n\n readSFixed32() {\n const val = this.dataView.getInt32(this.pos, true);\n this.pos += 4;\n return val;\n }\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64() {\n const val = this.dataView.getUint32(this.pos, true) + this.dataView.getUint32(this.pos + 4, true) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n }\n\n readSFixed64() {\n const val = this.dataView.getUint32(this.pos, true) + this.dataView.getInt32(this.pos + 4, true) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n }\n\n readFloat() {\n const val = this.dataView.getFloat32(this.pos, true);\n this.pos += 4;\n return val;\n }\n\n readDouble() {\n const val = this.dataView.getFloat64(this.pos, true);\n this.pos += 8;\n return val;\n }\n\n /**\n * @param {boolean} [isSigned]\n */\n readVarint(isSigned) {\n const buf = this.buf;\n let val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n }\n\n readVarint64() { // for compatibility with v2.0.1\n return this.readVarint(true);\n }\n\n readSVarint() {\n const num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n }\n\n readBoolean() {\n return Boolean(this.readVarint());\n }\n\n readString() {\n const end = this.readVarint() + this.pos;\n const pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return utf8TextDecoder.decode(this.buf.subarray(pos, end));\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n }\n\n readBytes() {\n const end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n }\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n /**\n * @param {number[]} [arr]\n * @param {boolean} [isSigned]\n */\n readPackedVarint(arr = [], isSigned) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedSVarint(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n }\n /** @param {boolean[]} [arr] */\n readPackedBoolean(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedFloat(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedDouble(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedFixed32(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedSFixed32(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedFixed64(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n }\n /** @param {number[]} [arr] */\n readPackedSFixed64(arr = []) {\n const end = this.readPackedEnd();\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n }\n readPackedEnd() {\n return this.type === PBF_BYTES ? this.readVarint() + this.pos : this.pos + 1;\n }\n\n /** @param {number} val */\n skip(val) {\n const type = val & 0x7;\n if (type === PBF_VARINT) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === PBF_BYTES) this.pos = this.readVarint() + this.pos;\n else if (type === PBF_FIXED32) this.pos += 4;\n else if (type === PBF_FIXED64) this.pos += 8;\n else throw new Error(`Unimplemented type: ${type}`);\n }\n\n // === WRITING =================================================================\n\n /**\n * @param {number} tag\n * @param {number} type\n */\n writeTag(tag, type) {\n this.writeVarint((tag << 3) | type);\n }\n\n /** @param {number} min */\n realloc(min) {\n let length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n const buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.dataView = new DataView(buf.buffer);\n this.length = length;\n }\n }\n\n finish() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n }\n\n /** @param {number} val */\n writeFixed32(val) {\n this.realloc(4);\n this.dataView.setInt32(this.pos, val, true);\n this.pos += 4;\n }\n\n /** @param {number} val */\n writeSFixed32(val) {\n this.realloc(4);\n this.dataView.setInt32(this.pos, val, true);\n this.pos += 4;\n }\n\n /** @param {number} val */\n writeFixed64(val) {\n this.realloc(8);\n this.dataView.setInt32(this.pos, val & -1, true);\n this.dataView.setInt32(this.pos + 4, Math.floor(val * SHIFT_RIGHT_32), true);\n this.pos += 8;\n }\n\n /** @param {number} val */\n writeSFixed64(val) {\n this.realloc(8);\n this.dataView.setInt32(this.pos, val & -1, true);\n this.dataView.setInt32(this.pos + 4, Math.floor(val * SHIFT_RIGHT_32), true);\n this.pos += 8;\n }\n\n /** @param {number} val */\n writeVarint(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n }\n\n /** @param {number} val */\n writeSVarint(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n }\n\n /** @param {boolean} val */\n writeBoolean(val) {\n this.writeVarint(+val);\n }\n\n /** @param {string} str */\n writeString(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n const startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n const len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n }\n\n /** @param {number} val */\n writeFloat(val) {\n this.realloc(4);\n this.dataView.setFloat32(this.pos, val, true);\n this.pos += 4;\n }\n\n /** @param {number} val */\n writeDouble(val) {\n this.realloc(8);\n this.dataView.setFloat64(this.pos, val, true);\n this.pos += 8;\n }\n\n /** @param {Uint8Array} buffer */\n writeBytes(buffer) {\n const len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (let i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n }\n\n /**\n * @template T\n * @param {(obj: T, pbf: Pbf) => void} fn\n * @param {T} obj\n */\n writeRawMessage(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n const startPos = this.pos;\n fn(obj, this);\n const len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n }\n\n /**\n * @template T\n * @param {number} tag\n * @param {(obj: T, pbf: Pbf) => void} fn\n * @param {T} obj\n */\n writeMessage(tag, fn, obj) {\n this.writeTag(tag, PBF_BYTES);\n this.writeRawMessage(fn, obj);\n }\n\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedVarint(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedVarint, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedSVarint(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);\n }\n /**\n * @param {number} tag\n * @param {boolean[]} arr\n */\n writePackedBoolean(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedFloat(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedFloat, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedDouble(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedDouble, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedFixed32(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedSFixed32(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedFixed64(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);\n }\n /**\n * @param {number} tag\n * @param {number[]} arr\n */\n writePackedSFixed64(tag, arr) {\n if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr);\n }\n\n /**\n * @param {number} tag\n * @param {Uint8Array} buffer\n */\n writeBytesField(tag, buffer) {\n this.writeTag(tag, PBF_BYTES);\n this.writeBytes(buffer);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeFixed32Field(tag, val) {\n this.writeTag(tag, PBF_FIXED32);\n this.writeFixed32(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeSFixed32Field(tag, val) {\n this.writeTag(tag, PBF_FIXED32);\n this.writeSFixed32(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeFixed64Field(tag, val) {\n this.writeTag(tag, PBF_FIXED64);\n this.writeFixed64(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeSFixed64Field(tag, val) {\n this.writeTag(tag, PBF_FIXED64);\n this.writeSFixed64(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeVarintField(tag, val) {\n this.writeTag(tag, PBF_VARINT);\n this.writeVarint(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeSVarintField(tag, val) {\n this.writeTag(tag, PBF_VARINT);\n this.writeSVarint(val);\n }\n /**\n * @param {number} tag\n * @param {string} str\n */\n writeStringField(tag, str) {\n this.writeTag(tag, PBF_BYTES);\n this.writeString(str);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeFloatField(tag, val) {\n this.writeTag(tag, PBF_FIXED32);\n this.writeFloat(val);\n }\n /**\n * @param {number} tag\n * @param {number} val\n */\n writeDoubleField(tag, val) {\n this.writeTag(tag, PBF_FIXED64);\n this.writeDouble(val);\n }\n /**\n * @param {number} tag\n * @param {boolean} val\n */\n writeBooleanField(tag, val) {\n this.writeVarintField(tag, +val);\n }\n};\n\n/**\n * @param {number} l\n * @param {boolean | undefined} s\n * @param {Pbf} p\n */\nfunction readVarintRemainder(l, s, p) {\n const buf = p.buf;\n let h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {boolean} [isSigned]\n */\nfunction toNum(low, high, isSigned) {\n return isSigned ? high * 0x100000000 + (low >>> 0) : ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\n/**\n * @param {number} val\n * @param {Pbf} pbf\n */\nfunction writeBigVarint(val, pbf) {\n let low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\n/**\n * @param {number} high\n * @param {number} low\n * @param {Pbf} pbf\n */\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\n/**\n * @param {number} high\n * @param {Pbf} pbf\n */\nfunction writeBigVarintHigh(high, pbf) {\n const lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\n/**\n * @param {number} startPos\n * @param {number} len\n * @param {Pbf} pbf\n */\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n const extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (let i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedVarint(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedSVarint(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedFloat(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedDouble(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);\n}\n/**\n * @param {boolean[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedBoolean(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedFixed32(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedSFixed32(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedFixed64(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);\n}\n/**\n * @param {number[]} arr\n * @param {Pbf} pbf\n */\nfunction writePackedSFixed64(arr, pbf) {\n for (let i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]);\n}\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\n/**\n * @param {Uint8Array} buf\n * @param {number} pos\n * @param {number} end\n */\nfunction readUtf8(buf, pos, end) {\n let str = '';\n let i = pos;\n\n while (i < end) {\n const b0 = buf[i];\n let c = null; // codepoint\n let bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n let b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\n/**\n * @param {Uint8Array} buf\n * @param {string} str\n * @param {number} pos\n */\nfunction writeUtf8(buf, str, pos) {\n for (let i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","import {AlphaImage} from '../util/image';\n\nimport Protobuf from 'pbf';\nconst border = 3;\n\nimport type {StyleGlyph} from './style_glyph';\n\nfunction readFontstacks(tag: number, glyphs: Array, pbf: Protobuf) {\n if (tag === 1) {\n pbf.readMessage(readFontstack, glyphs);\n }\n}\n\nfunction readFontstack(tag: number, glyphs: Array, pbf: Protobuf) {\n if (tag === 3) {\n const {id, bitmap, width, height, left, top, advance} = pbf.readMessage(readGlyph, {});\n glyphs.push({\n id,\n bitmap: new AlphaImage({\n width: width + 2 * border,\n height: height + 2 * border\n }, bitmap),\n metrics: {width, height, left, top, advance}\n });\n }\n}\n\nfunction readGlyph(tag: number, glyph: any, pbf: Protobuf) {\n if (tag === 1) glyph.id = pbf.readVarint();\n else if (tag === 2) glyph.bitmap = pbf.readBytes();\n else if (tag === 3) glyph.width = pbf.readVarint();\n else if (tag === 4) glyph.height = pbf.readVarint();\n else if (tag === 5) glyph.left = pbf.readSVarint();\n else if (tag === 6) glyph.top = pbf.readSVarint();\n else if (tag === 7) glyph.advance = pbf.readVarint();\n}\n\nexport function parseGlyphPbf(data: ArrayBuffer | Uint8Array): Array {\n return new Protobuf(data).readFields(readFontstacks, []);\n}\n\nexport const GLYPH_PBF_BORDER = border;\n","/**\n * @typedef {Object} PotpackBox\n * @property {number} w Box width.\n * @property {number} h Box height.\n * @property {number} [x] X coordinate in the resulting container.\n * @property {number} [y] Y coordinate in the resulting container.\n */\n\n/**\n * @typedef {Object} PotpackStats\n * @property {number} w Width of the resulting container.\n * @property {number} h Height of the resulting container.\n * @property {number} fill The space utilization value (0 to 1). Higher is better.\n */\n\n/**\n * Packs 2D rectangles into a near-square container.\n *\n * Mutates the {@link boxes} array: it's sorted (by height/width),\n * and box objects are augmented with `x`, `y` coordinates.\n *\n * @param {PotpackBox[]} boxes\n * @return {PotpackStats}\n */\nexport default function potpack(boxes) {\n\n // calculate total box area and maximum box width\n let area = 0;\n let maxWidth = 0;\n\n for (const box of boxes) {\n area += box.w * box.h;\n maxWidth = Math.max(maxWidth, box.w);\n }\n\n // sort the boxes for insertion by height, descending\n boxes.sort((a, b) => b.h - a.h);\n\n // aim for a squarish resulting container,\n // slightly adjusted for sub-100% space utilization\n const startWidth = Math.max(Math.ceil(Math.sqrt(area / 0.95)), maxWidth);\n\n // start with a single empty space, unbounded at the bottom\n const spaces = [{x: 0, y: 0, w: startWidth, h: Infinity}];\n\n let width = 0;\n let height = 0;\n\n for (const box of boxes) {\n // look through spaces backwards so that we check smaller spaces first\n for (let i = spaces.length - 1; i >= 0; i--) {\n const space = spaces[i];\n\n // look for empty spaces that can accommodate the current box\n if (box.w > space.w || box.h > space.h) continue;\n\n // found the space; add the box to its top-left corner\n // |-------|-------|\n // | box | |\n // |_______| |\n // | space |\n // |_______________|\n box.x = space.x;\n box.y = space.y;\n\n height = Math.max(height, box.y + box.h);\n width = Math.max(width, box.x + box.w);\n\n if (box.w === space.w && box.h === space.h) {\n // space matches the box exactly; remove it\n const last = spaces.pop();\n if (last && i < spaces.length) spaces[i] = last;\n\n } else if (box.h === space.h) {\n // space matches the box height; update it accordingly\n // |-------|---------------|\n // | box | updated space |\n // |_______|_______________|\n space.x += box.w;\n space.w -= box.w;\n\n } else if (box.w === space.w) {\n // space matches the box width; update it accordingly\n // |---------------|\n // | box |\n // |_______________|\n // | updated space |\n // |_______________|\n space.y += box.h;\n space.h -= box.h;\n\n } else {\n // otherwise the box splits the space into two spaces\n // |-------|-----------|\n // | box | new space |\n // |_______|___________|\n // | updated space |\n // |___________________|\n spaces.push({\n x: space.x + box.w,\n y: space.y,\n w: space.w - box.w,\n h: box.h\n });\n space.y += box.h;\n space.h -= box.h;\n }\n break;\n }\n }\n\n return {\n w: width, // container width\n h: height, // container height\n fill: (area / (width * height)) || 0 // space utilization\n };\n}\n","/* eslint-disable key-spacing */\nimport {RGBAImage} from '../util/image';\nimport {register} from '../util/web_worker_transfer';\nimport potpack from 'potpack';\n\nimport type {StyleImage} from '../style/style_image';\nimport {type TextFit} from '../style/style_image';\nimport type {ImageManager} from './image_manager';\nimport type {Texture} from './texture';\nimport type {Rect} from './glyph_atlas';\nimport type {GetImagesResponse} from '../util/actor_messages';\n\nconst IMAGE_PADDING: number = 1;\nexport {IMAGE_PADDING};\n\nexport class ImagePosition {\n paddedRect: Rect;\n pixelRatio: number;\n version: number;\n stretchY: Array<[number, number]>;\n stretchX: Array<[number, number]>;\n content: [number, number, number, number];\n textFitWidth: TextFit;\n textFitHeight: TextFit;\n\n constructor(paddedRect: Rect, {\n pixelRatio,\n version,\n stretchX,\n stretchY,\n content,\n textFitWidth,\n textFitHeight\n }: StyleImage) {\n this.paddedRect = paddedRect;\n this.pixelRatio = pixelRatio;\n this.stretchX = stretchX;\n this.stretchY = stretchY;\n this.content = content;\n this.version = version;\n this.textFitWidth = textFitWidth;\n this.textFitHeight = textFitHeight;\n }\n\n get tl(): [number, number] {\n return [\n this.paddedRect.x + IMAGE_PADDING,\n this.paddedRect.y + IMAGE_PADDING\n ];\n }\n\n get br(): [number, number] {\n return [\n this.paddedRect.x + this.paddedRect.w - IMAGE_PADDING,\n this.paddedRect.y + this.paddedRect.h - IMAGE_PADDING\n ];\n }\n\n get tlbr(): Array {\n return this.tl.concat(this.br);\n }\n\n get displaySize(): [number, number] {\n return [\n (this.paddedRect.w - IMAGE_PADDING * 2) / this.pixelRatio,\n (this.paddedRect.h - IMAGE_PADDING * 2) / this.pixelRatio\n ];\n }\n}\n\n/**\n * A class holding all the images\n */\nexport class ImageAtlas {\n image: RGBAImage;\n iconPositions: {[_: string]: ImagePosition};\n patternPositions: {[_: string]: ImagePosition};\n haveRenderCallbacks: Array;\n uploaded: boolean;\n\n constructor(icons: GetImagesResponse, patterns: GetImagesResponse) {\n const iconPositions = {}, patternPositions = {};\n this.haveRenderCallbacks = [];\n\n const bins = [];\n\n this.addImages(icons, iconPositions, bins);\n this.addImages(patterns, patternPositions, bins);\n\n const {w, h} = potpack(bins);\n const image = new RGBAImage({width: w || 1, height: h || 1});\n\n for (const id in icons) {\n const src = icons[id];\n const bin = iconPositions[id].paddedRect;\n RGBAImage.copy(src.data, image, {x: 0, y: 0}, {x: bin.x + IMAGE_PADDING, y: bin.y + IMAGE_PADDING}, src.data);\n }\n\n for (const id in patterns) {\n const src = patterns[id];\n const bin = patternPositions[id].paddedRect;\n const x = bin.x + IMAGE_PADDING,\n y = bin.y + IMAGE_PADDING,\n w = src.data.width,\n h = src.data.height;\n\n RGBAImage.copy(src.data, image, {x: 0, y: 0}, {x, y}, src.data);\n // Add 1 pixel wrapped padding on each side of the image.\n RGBAImage.copy(src.data, image, {x: 0, y: h - 1}, {x, y: y - 1}, {width: w, height: 1}); // T\n RGBAImage.copy(src.data, image, {x: 0, y: 0}, {x, y: y + h}, {width: w, height: 1}); // B\n RGBAImage.copy(src.data, image, {x: w - 1, y: 0}, {x: x - 1, y}, {width: 1, height: h}); // L\n RGBAImage.copy(src.data, image, {x: 0, y: 0}, {x: x + w, y}, {width: 1, height: h}); // R\n }\n\n this.image = image;\n this.iconPositions = iconPositions;\n this.patternPositions = patternPositions;\n }\n\n addImages(images: {[_: string]: StyleImage}, positions: {[_: string]: ImagePosition}, bins: Array) {\n for (const id in images) {\n const src = images[id];\n const bin = {\n x: 0,\n y: 0,\n w: src.data.width + 2 * IMAGE_PADDING,\n h: src.data.height + 2 * IMAGE_PADDING,\n };\n bins.push(bin);\n positions[id] = new ImagePosition(bin, src);\n\n if (src.hasRenderCallback) {\n this.haveRenderCallbacks.push(id);\n }\n }\n }\n\n patchUpdatedImages(imageManager: ImageManager, texture: Texture) {\n imageManager.dispatchRenderCallbacks(this.haveRenderCallbacks);\n for (const name in imageManager.updatedImages) {\n this.patchUpdatedImage(this.iconPositions[name], imageManager.getImage(name), texture);\n this.patchUpdatedImage(this.patternPositions[name], imageManager.getImage(name), texture);\n }\n }\n\n patchUpdatedImage(position: ImagePosition, image: StyleImage, texture: Texture) {\n if (!position || !image) return;\n\n if (position.version === image.version) return;\n\n position.version = image.version;\n const [x, y] = position.tl;\n texture.update(image.data, undefined, {x, y});\n }\n\n}\n\nregister('ImagePosition', ImagePosition);\nregister('ImageAtlas', ImageAtlas);\n","import {\n codePointHasUprightVerticalOrientation\n} from '../util/unicode_properties.g';\nimport {\n charIsWhitespace,\n charInComplexShapingScript\n} from '../util/script_detection';\nimport {rtlWorkerPlugin} from '../source/rtl_text_plugin_worker';\nimport ONE_EM from './one_em';\n\nimport {TaggedString, type TextSectionOptions, type ImageSectionOptions} from './tagged_string';\nimport type {StyleGlyph, GlyphMetrics} from '../style/style_glyph';\nimport {GLYPH_PBF_BORDER} from '../style/parse_glyph_pbf';\nimport {TextFit} from '../style/style_image';\nimport type {ImagePosition} from '../render/image_atlas';\nimport {IMAGE_PADDING} from '../render/image_atlas';\nimport type {Rect, GlyphPosition} from '../render/glyph_atlas';\nimport type {Formatted, VerticalAlign} from '@maplibre/maplibre-gl-style-spec';\n\nenum WritingMode {\n none = 0,\n horizontal = 1,\n vertical = 2,\n horizontalOnly = 3\n}\n\nconst SHAPING_DEFAULT_OFFSET = -17;\nexport {shapeText, shapeIcon, applyTextFit, fitIconToText, getAnchorAlignment, WritingMode, SHAPING_DEFAULT_OFFSET};\n\n// The position of a glyph relative to the text's anchor point.\nexport type PositionedGlyph = {\n glyph: number;\n imageName: string | null;\n x: number;\n y: number;\n vertical: boolean;\n scale: number;\n fontStack: string;\n sectionIndex: number;\n metrics: GlyphMetrics;\n rect: Rect | null;\n};\n\nexport type PositionedLine = {\n positionedGlyphs: Array;\n lineOffset: number;\n};\n\n// A collection of positioned glyphs and some metadata\nexport type Shaping = {\n positionedLines: Array;\n top: number;\n bottom: number;\n left: number;\n right: number;\n writingMode: WritingMode.horizontal | WritingMode.vertical;\n text: string;\n iconsInText: boolean;\n verticalizable: boolean;\n};\n\ntype ShapingSectionAttributes = {\n rect: Rect | null;\n metrics: GlyphMetrics;\n baselineOffset: number;\n imageOffset?: number;\n};\n\ntype LineShapingSize = {\n verticalLineContentWidth: number;\n horizontalLineContentHeight: number;\n};\n\nfunction isEmpty(positionedLines: Array) {\n for (const line of positionedLines) {\n if (line.positionedGlyphs.length !== 0) {\n return false;\n }\n }\n return true;\n}\n\nexport type SymbolAnchor = 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\nexport type TextJustify = 'left' | 'center' | 'right';\n\nfunction breakLines(input: TaggedString, lineBreakPoints: Array): Array {\n const lines = [];\n let start = 0;\n for (const lineBreak of lineBreakPoints) {\n lines.push(input.substring(start, lineBreak));\n start = lineBreak;\n }\n\n if (start < input.length()) {\n lines.push(input.substring(start, input.length()));\n }\n return lines;\n}\n\nfunction shapeText(\n text: Formatted,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n glyphPositions: {\n [_: string]: {\n [_: number]: GlyphPosition;\n };\n },\n imagePositions: {[_: string]: ImagePosition},\n defaultFontStack: string,\n maxWidth: number,\n lineHeight: number,\n textAnchor: SymbolAnchor,\n textJustify: TextJustify,\n spacing: number,\n translate: [number, number],\n writingMode: WritingMode.horizontal | WritingMode.vertical,\n allowVerticalPlacement: boolean,\n layoutTextSize: number,\n layoutTextSizeThisZoom: number\n): Shaping | false {\n const logicalInput = TaggedString.fromFeature(text, defaultFontStack);\n\n if (writingMode === WritingMode.vertical) {\n logicalInput.verticalizePunctuation();\n }\n\n let lines: Array;\n\n let lineBreaks = logicalInput.determineLineBreaks(spacing, maxWidth, glyphMap, imagePositions, layoutTextSize);\n const {processBidirectionalText, processStyledBidirectionalText} = rtlWorkerPlugin;\n if (processBidirectionalText && logicalInput.sections.length === 1) {\n // Bidi doesn't have to be style-aware\n lines = [];\n // ICU operates on code units.\n lineBreaks = lineBreaks.map(index => logicalInput.toCodeUnitIndex(index));\n const untaggedLines =\n processBidirectionalText(logicalInput.toString(), lineBreaks);\n for (const line of untaggedLines) {\n const sectionIndex = [...line].map(() => 0);\n lines.push(new TaggedString(line, logicalInput.sections, sectionIndex));\n }\n } else if (processStyledBidirectionalText) {\n // Need version of mapbox-gl-rtl-text with style support for combining RTL text\n // with formatting\n lines = [];\n // ICU operates on code units.\n lineBreaks = lineBreaks.map(index => logicalInput.toCodeUnitIndex(index));\n\n // Convert character-based section index to be based on code units.\n let i = 0;\n const sectionIndex = [];\n for (const char of logicalInput.text) {\n sectionIndex.push(...Array(char.length).fill(logicalInput.sectionIndex[i]));\n i++;\n }\n\n const processedLines =\n processStyledBidirectionalText(logicalInput.text, sectionIndex, lineBreaks);\n for (const line of processedLines) {\n const sectionIndex = [];\n let elapsedChars = '';\n for (const char of line[0]) {\n sectionIndex.push(line[1][elapsedChars.length]);\n elapsedChars += char;\n }\n lines.push(new TaggedString(line[0], logicalInput.sections, sectionIndex));\n }\n } else {\n lines = breakLines(logicalInput, lineBreaks);\n }\n\n const positionedLines = [];\n const shaping = {\n positionedLines,\n text: logicalInput.toString(),\n top: translate[1],\n bottom: translate[1],\n left: translate[0],\n right: translate[0],\n writingMode,\n iconsInText: false,\n verticalizable: false\n };\n\n shapeLines(shaping, glyphMap, glyphPositions, imagePositions, lines, lineHeight, textAnchor, textJustify, writingMode, spacing, allowVerticalPlacement, layoutTextSizeThisZoom);\n if (isEmpty(positionedLines)) return false;\n\n return shaping;\n}\n\nfunction getAnchorAlignment(anchor: SymbolAnchor) {\n let horizontalAlign = 0.5, verticalAlign = 0.5;\n\n switch (anchor) {\n case 'right':\n case 'top-right':\n case 'bottom-right':\n horizontalAlign = 1;\n break;\n case 'left':\n case 'top-left':\n case 'bottom-left':\n horizontalAlign = 0;\n break;\n }\n\n switch (anchor) {\n case 'bottom':\n case 'bottom-right':\n case 'bottom-left':\n verticalAlign = 1;\n break;\n case 'top':\n case 'top-right':\n case 'top-left':\n verticalAlign = 0;\n break;\n }\n\n return {horizontalAlign, verticalAlign};\n}\n\nfunction calculateLineContentSize(\n imagePositions: {[_: string]: ImagePosition},\n line: TaggedString,\n layoutTextSizeFactor: number\n): LineShapingSize {\n const maxGlyphSize = line.getMaxScale() * ONE_EM;\n const {maxImageWidth, maxImageHeight} = line.getMaxImageSize(imagePositions);\n\n const horizontalLineContentHeight = Math.max(maxGlyphSize, maxImageHeight * layoutTextSizeFactor);\n const verticalLineContentWidth = Math.max(maxGlyphSize, maxImageWidth * layoutTextSizeFactor);\n\n return {verticalLineContentWidth, horizontalLineContentHeight};\n}\n\nfunction getVerticalAlignFactor(\n verticalAlign: VerticalAlign\n) {\n switch (verticalAlign) {\n case 'top':\n return 0;\n case 'center':\n return 0.5;\n default:\n return 1;\n }\n}\n\nfunction getRectAndMetrics(\n glyphPosition: GlyphPosition,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n section: TextSectionOptions,\n codePoint: number\n): GlyphPosition | null {\n if (glyphPosition && glyphPosition.rect) {\n return glyphPosition;\n }\n\n const glyphs = glyphMap[section.fontStack];\n const glyph = glyphs && glyphs[codePoint];\n if (!glyph) return null;\n\n const metrics = glyph.metrics;\n return {rect: null, metrics};\n}\n\nfunction isLineVertical(\n writingMode: WritingMode.horizontal | WritingMode.vertical,\n allowVerticalPlacement: boolean,\n codePoint: number\n): boolean {\n return !(writingMode === WritingMode.horizontal ||\n // Don't verticalize glyphs that have no upright orientation if vertical placement is disabled.\n (!allowVerticalPlacement && !codePointHasUprightVerticalOrientation(codePoint)) ||\n // If vertical placement is enabled, don't verticalize glyphs that\n // are from complex text layout script, or whitespaces.\n (allowVerticalPlacement && (charIsWhitespace(codePoint) || charInComplexShapingScript(codePoint))));\n}\n\nfunction shapeLines(shaping: Shaping,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n glyphPositions: {\n [_: string]: {\n [_: number]: GlyphPosition;\n };\n },\n imagePositions: {[_: string]: ImagePosition},\n lines: Array,\n lineHeight: number,\n textAnchor: SymbolAnchor,\n textJustify: TextJustify,\n writingMode: WritingMode.horizontal | WritingMode.vertical,\n spacing: number,\n allowVerticalPlacement: boolean,\n layoutTextSizeThisZoom: number) {\n\n let x = 0;\n let y = 0;\n\n let maxLineLength = 0;\n let maxLineHeight = 0;\n\n const justify =\n textJustify === 'right' ? 1 :\n textJustify === 'left' ? 0 : 0.5;\n const layoutTextSizeFactor = ONE_EM / layoutTextSizeThisZoom;\n\n let lineIndex = 0;\n for (const line of lines) {\n line.trim();\n\n const lineMaxScale = line.getMaxScale();\n const positionedLine = {positionedGlyphs: [], lineOffset: 0};\n shaping.positionedLines[lineIndex] = positionedLine;\n const positionedGlyphs = positionedLine.positionedGlyphs;\n let imageOffset = 0.0;\n\n if (!line.length()) {\n y += lineHeight; // Still need a line feed after empty line\n ++lineIndex;\n continue;\n }\n\n const lineShapingSize = calculateLineContentSize(imagePositions, line, layoutTextSizeFactor);\n\n let i = 0;\n for (const char of line.text) {\n const section = line.getSection(i);\n const codePoint = char.codePointAt(0);\n const vertical = isLineVertical(writingMode, allowVerticalPlacement, codePoint);\n const positionedGlyph: PositionedGlyph = {\n glyph: codePoint,\n imageName: null,\n x,\n y: y + SHAPING_DEFAULT_OFFSET,\n vertical,\n scale: 1,\n fontStack: '',\n sectionIndex: line.getSectionIndex(i),\n metrics: null,\n rect: null\n };\n\n let sectionAttributes: ShapingSectionAttributes;\n if ('fontStack' in section) {\n sectionAttributes = shapeTextSection(section, codePoint, vertical, lineShapingSize, glyphMap, glyphPositions);\n if (!sectionAttributes) continue;\n positionedGlyph.fontStack = section.fontStack;\n } else {\n shaping.iconsInText = true;\n // If needed, allow to set scale factor for an image using\n // alias \"image-scale\" that could be alias for \"font-scale\"\n // when FormattedSection is an image section.\n section.scale *= layoutTextSizeFactor;\n\n sectionAttributes = shapeImageSection(section, vertical, lineMaxScale, lineShapingSize, imagePositions);\n if (!sectionAttributes) continue;\n imageOffset = Math.max(imageOffset, sectionAttributes.imageOffset);\n positionedGlyph.imageName = section.imageName;\n }\n\n const {rect, metrics, baselineOffset} = sectionAttributes;\n positionedGlyph.y += baselineOffset;\n positionedGlyph.scale = section.scale;\n positionedGlyph.metrics = metrics;\n positionedGlyph.rect = rect;\n positionedGlyphs.push(positionedGlyph);\n\n if (!vertical) {\n x += metrics.advance * section.scale + spacing;\n } else {\n shaping.verticalizable = true;\n const verticalAdvance = 'imageName' in section ? metrics.advance : ONE_EM;\n x += verticalAdvance * section.scale + spacing;\n }\n\n i++;\n }\n\n // Only justify if we placed at least one glyph\n if (positionedGlyphs.length !== 0) {\n const lineLength = x - spacing;\n maxLineLength = Math.max(lineLength, maxLineLength);\n justifyLine(positionedGlyphs, 0, positionedGlyphs.length - 1, justify);\n }\n\n x = 0;\n const maxLineOffset = (lineMaxScale - 1) * ONE_EM;\n positionedLine.lineOffset = Math.max(imageOffset, maxLineOffset);\n const currentLineHeight = lineHeight * lineMaxScale + imageOffset;\n y += currentLineHeight;\n maxLineHeight = Math.max(currentLineHeight, maxLineHeight);\n ++lineIndex;\n }\n\n // Calculate the bounding box and justify / align text block.\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(textAnchor);\n align(shaping.positionedLines, justify, horizontalAlign, verticalAlign, maxLineLength, maxLineHeight, lineHeight, y, lines.length);\n\n // Calculate the bounding box\n // shaping.top & shaping.left already include text offset (text-radial-offset or text-offset)\n shaping.top += -verticalAlign * y;\n shaping.bottom = shaping.top + y;\n shaping.left += -horizontalAlign * maxLineLength;\n shaping.right = shaping.left + maxLineLength;\n}\n\nfunction shapeTextSection(\n section: TextSectionOptions,\n codePoint: number,\n vertical: boolean,\n lineShapingSize: LineShapingSize,\n glyphMap: {\n [_: string]: {\n [_: number]: StyleGlyph;\n };\n },\n glyphPositions: {\n [_: string]: {\n [_: number]: GlyphPosition;\n };\n },\n): ShapingSectionAttributes | null {\n const positions = glyphPositions[section.fontStack];\n const glyphPosition = positions && positions[codePoint];\n\n const rectAndMetrics = getRectAndMetrics(glyphPosition, glyphMap, section, codePoint);\n\n if (rectAndMetrics === null) return null;\n\n let baselineOffset: number;\n if (vertical) {\n baselineOffset = lineShapingSize.verticalLineContentWidth - section.scale * ONE_EM;\n } else {\n const verticalAlignFactor = getVerticalAlignFactor(section.verticalAlign);\n baselineOffset = (lineShapingSize.horizontalLineContentHeight - section.scale * ONE_EM) * verticalAlignFactor;\n }\n\n return {\n rect: rectAndMetrics.rect,\n metrics: rectAndMetrics.metrics,\n baselineOffset\n };\n}\n\nfunction shapeImageSection(\n section: ImageSectionOptions,\n vertical: boolean,\n lineMaxScale: number,\n lineShapingSize: LineShapingSize,\n imagePositions: {[_: string]: ImagePosition},\n): ShapingSectionAttributes | null {\n const imagePosition = imagePositions[section.imageName];\n if (!imagePosition) return null;\n const rect = imagePosition.paddedRect;\n const size = imagePosition.displaySize;\n\n const metrics = {width: size[0],\n height: size[1],\n left: IMAGE_PADDING,\n top: -GLYPH_PBF_BORDER,\n advance: vertical ? size[1] : size[0]};\n\n let baselineOffset: number;\n if (vertical) {\n baselineOffset = lineShapingSize.verticalLineContentWidth - size[1] * section.scale;\n } else {\n const verticalAlignFactor = getVerticalAlignFactor(section.verticalAlign);\n baselineOffset = (lineShapingSize.horizontalLineContentHeight - size[1] * section.scale) * verticalAlignFactor;\n }\n\n // Difference between height of an image and one EM at max line scale.\n // Pushes current line down if an image size is over 1 EM at max line scale.\n const imageOffset = (vertical ? size[0] : size[1]) * section.scale - ONE_EM * lineMaxScale;\n \n return {rect, metrics, baselineOffset, imageOffset};\n}\n\n// justify right = 1, left = 0, center = 0.5\nfunction justifyLine(positionedGlyphs: Array,\n start: number,\n end: number,\n justify: 1 | 0 | 0.5) {\n if (justify === 0)\n return;\n\n const lastPositionedGlyph = positionedGlyphs[end];\n const lastAdvance = lastPositionedGlyph.metrics.advance * lastPositionedGlyph.scale;\n const lineIndent = (positionedGlyphs[end].x + lastAdvance) * justify;\n\n for (let j = start; j <= end; j++) {\n positionedGlyphs[j].x -= lineIndent;\n }\n}\n\n/**\n * Aligns the lines based on horizontal and vertical alignment.\n */\nfunction align(positionedLines: Array,\n justify: number,\n horizontalAlign: number,\n verticalAlign: number,\n maxLineLength: number,\n maxLineHeight: number,\n lineHeight: number,\n blockHeight: number,\n lineCount: number) {\n const shiftX = (justify - horizontalAlign) * maxLineLength;\n let shiftY = 0;\n\n if (maxLineHeight !== lineHeight) {\n shiftY = -blockHeight * verticalAlign - SHAPING_DEFAULT_OFFSET;\n } else {\n shiftY = -verticalAlign * lineCount * lineHeight + 0.5 * lineHeight;\n }\n\n for (const line of positionedLines) {\n for (const positionedGlyph of line.positionedGlyphs) {\n positionedGlyph.x += shiftX;\n positionedGlyph.y += shiftY;\n }\n }\n}\n\nexport type PositionedIcon = {\n image: ImagePosition;\n top: number;\n bottom: number;\n left: number;\n right: number;\n collisionPadding?: [number, number, number, number];\n};\n\nfunction shapeIcon(\n image: ImagePosition,\n iconOffset: [number, number],\n iconAnchor: SymbolAnchor\n): PositionedIcon {\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(iconAnchor);\n const dx = iconOffset[0];\n const dy = iconOffset[1];\n const x1 = dx - image.displaySize[0] * horizontalAlign;\n const x2 = x1 + image.displaySize[0];\n const y1 = dy - image.displaySize[1] * verticalAlign;\n const y2 = y1 + image.displaySize[1];\n return {image, top: y1, bottom: y2, left: x1, right: x2};\n}\n\nexport interface Box {\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n}\n\n/**\n * Called after a PositionedIcon has already been run through fitIconToText,\n * but needs further adjustment to apply textFitWidth and textFitHeight.\n * @param shapedIcon - The icon that will be adjusted.\n * @returns Extents of the shapedIcon with text fit adjustments if necessary.\n */\nfunction applyTextFit(shapedIcon: PositionedIcon): Box {\n // Assume shapedIcon.image is set or this wouldn't be called.\n // Size of the icon after it was adjusted using stretchX and Y\n let iconLeft = shapedIcon.left;\n let iconTop = shapedIcon.top;\n let iconWidth = shapedIcon.right - iconLeft;\n let iconHeight = shapedIcon.bottom - iconTop;\n // Size of the original content area\n const contentWidth = shapedIcon.image.content[2] - shapedIcon.image.content[0];\n const contentHeight = shapedIcon.image.content[3] - shapedIcon.image.content[1];\n const textFitWidth = shapedIcon.image.textFitWidth ?? TextFit.stretchOrShrink;\n const textFitHeight = shapedIcon.image.textFitHeight ?? TextFit.stretchOrShrink;\n const contentAspectRatio = contentWidth / contentHeight;\n // Scale to the proportional axis first note that height takes precedence if\n // both axes are set to proportional.\n if (textFitHeight === TextFit.proportional) {\n if ((textFitWidth === TextFit.stretchOnly && iconWidth / iconHeight < contentAspectRatio) || textFitWidth === TextFit.proportional) {\n // Push the width of the icon back out to match the content aspect ratio\n const newIconWidth = Math.ceil(iconHeight * contentAspectRatio);\n iconLeft *= newIconWidth / iconWidth;\n iconWidth = newIconWidth;\n }\n } else if (textFitWidth === TextFit.proportional) {\n if (textFitHeight === TextFit.stretchOnly && contentAspectRatio !== 0 && iconWidth / iconHeight > contentAspectRatio) {\n // Push the height of the icon back out to match the content aspect ratio\n const newIconHeight = Math.ceil(iconWidth / contentAspectRatio);\n iconTop *= newIconHeight / iconHeight;\n iconHeight = newIconHeight;\n }\n } else {\n // If neither textFitHeight nor textFitWidth are proportional then\n // there is no effect since the content rectangle should be precisely\n // matched to the content\n }\n return {x1: iconLeft, y1: iconTop, x2: iconLeft + iconWidth, y2: iconTop + iconHeight};\n}\n\nfunction fitIconToText(\n shapedIcon: PositionedIcon,\n shapedText: Shaping,\n textFit: string,\n padding: [number, number, number, number],\n iconOffset: [number, number],\n fontScale: number\n): PositionedIcon {\n\n const image = shapedIcon.image;\n\n let collisionPadding;\n if (image.content) {\n const content = image.content;\n const pixelRatio = image.pixelRatio || 1;\n collisionPadding = [\n content[0] / pixelRatio,\n content[1] / pixelRatio,\n image.displaySize[0] - content[2] / pixelRatio,\n image.displaySize[1] - content[3] / pixelRatio\n ];\n }\n\n // We don't respect the icon-anchor, because icon-text-fit is set. Instead,\n // the icon will be centered on the text, then stretched in the given\n // dimensions.\n\n const textLeft = shapedText.left * fontScale;\n const textRight = shapedText.right * fontScale;\n\n let top, right, bottom, left;\n if (textFit === 'width' || textFit === 'both') {\n // Stretched horizontally to the text width\n left = iconOffset[0] + textLeft - padding[3];\n right = iconOffset[0] + textRight + padding[1];\n } else {\n // Centered on the text\n left = iconOffset[0] + (textLeft + textRight - image.displaySize[0]) / 2;\n right = left + image.displaySize[0];\n }\n\n const textTop = shapedText.top * fontScale;\n const textBottom = shapedText.bottom * fontScale;\n if (textFit === 'height' || textFit === 'both') {\n // Stretched vertically to the text height\n top = iconOffset[1] + textTop - padding[0];\n bottom = iconOffset[1] + textBottom + padding[2];\n } else {\n // Centered on the text\n top = iconOffset[1] + (textTop + textBottom - image.displaySize[1]) / 2;\n bottom = top + image.displaySize[1];\n }\n\n return {image, top, right, bottom, left, collisionPadding};\n}\n","import {Interpolate, interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport {clamp} from '../util/util';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\n\nimport type {PropertyValue, PossiblyEvaluatedPropertyValue} from '../style/properties';\nimport type {InterpolationType} from '@maplibre/maplibre-gl-style-spec';\n\nconst MAX_GLYPH_ICON_SIZE = 255;\nconst SIZE_PACK_FACTOR = 128;\nconst MAX_PACKED_SIZE = MAX_GLYPH_ICON_SIZE * SIZE_PACK_FACTOR;\n\nexport {getSizeData, evaluateSizeForFeature, evaluateSizeForZoom, SIZE_PACK_FACTOR, MAX_GLYPH_ICON_SIZE, MAX_PACKED_SIZE};\n\nexport type SizeData = {\n kind: 'constant';\n layoutSize: number;\n} | {\n kind: 'source';\n} | {\n kind: 'camera';\n minZoom: number;\n maxZoom: number;\n minSize: number;\n maxSize: number;\n interpolationType: InterpolationType;\n} | {\n kind: 'composite';\n minZoom: number;\n maxZoom: number;\n interpolationType: InterpolationType;\n};\n\nexport type EvaluatedZoomSize = {uSizeT: number; uSize: number};\n\n// For {text,icon}-size, get the bucket-level data that will be needed by\n// the painter to set symbol-size-related uniforms\nfunction getSizeData(\n tileZoom: number,\n value: PropertyValue>\n): SizeData {\n const {expression} = value;\n\n if (expression.kind === 'constant') {\n const layoutSize = expression.evaluate(new EvaluationParameters(tileZoom + 1));\n return {kind: 'constant', layoutSize};\n\n } else if (expression.kind === 'source') {\n return {kind: 'source'};\n\n } else {\n const {zoomStops, interpolationType} = expression;\n\n // calculate covering zoom stops for zoom-dependent values\n let lower = 0;\n while (lower < zoomStops.length && zoomStops[lower] <= tileZoom) lower++;\n lower = Math.max(0, lower - 1);\n let upper = lower;\n while (upper < zoomStops.length && zoomStops[upper] < tileZoom + 1) upper++;\n upper = Math.min(zoomStops.length - 1, upper);\n\n const minZoom = zoomStops[lower];\n const maxZoom = zoomStops[upper];\n\n // We'd like to be able to use CameraExpression or CompositeExpression in these\n // return types rather than ExpressionSpecification, but the former are not\n // transferrable across Web Worker boundaries.\n if (expression.kind === 'composite') {\n return {kind: 'composite', minZoom, maxZoom, interpolationType};\n }\n\n // for camera functions, also save off the function values\n // evaluated at the covering zoom levels\n const minSize = expression.evaluate(new EvaluationParameters(minZoom));\n const maxSize = expression.evaluate(new EvaluationParameters(maxZoom));\n\n return {kind: 'camera', minZoom, maxZoom, minSize, maxSize, interpolationType};\n }\n}\n\nfunction evaluateSizeForFeature(sizeData: SizeData,\n {\n uSize,\n uSizeT\n }: {\n uSize: number;\n uSizeT: number;\n },\n {\n lowerSize,\n upperSize\n }: {\n lowerSize: number;\n upperSize: number;\n }): number {\n if (sizeData.kind === 'source') {\n return lowerSize / SIZE_PACK_FACTOR;\n } else if (sizeData.kind === 'composite') {\n return interpolates.number(lowerSize / SIZE_PACK_FACTOR, upperSize / SIZE_PACK_FACTOR, uSizeT);\n }\n return uSize;\n}\n\nfunction evaluateSizeForZoom(sizeData: SizeData, zoom: number): EvaluatedZoomSize {\n let uSizeT = 0;\n let uSize = 0;\n\n if (sizeData.kind === 'constant') {\n uSize = sizeData.layoutSize;\n\n } else if (sizeData.kind !== 'source') {\n const {interpolationType, minZoom, maxZoom} = sizeData;\n\n // Even though we could get the exact value of the camera function\n // at z = tr.zoom, we intentionally do not: instead, we interpolate\n // between the camera function values at a pair of zoom stops covering\n // [tileZoom, tileZoom + 1] in order to be consistent with this\n // restriction on composite functions\n const t = !interpolationType ? 0 : clamp(\n Interpolate.interpolationFactor(interpolationType, zoom, minZoom, maxZoom), 0, 1);\n\n if (sizeData.kind === 'camera') {\n uSize = interpolates.number(sizeData.minSize, sizeData.maxSize, t);\n } else {\n uSizeT = t;\n }\n }\n\n return {uSizeT, uSize};\n}\n","import {type SymbolLayoutPropsPossiblyEvaluated} from './symbol_style_layer_properties.g';\nimport type {SymbolLayoutProps} from './symbol_style_layer_properties.g';\nimport {type PossiblyEvaluated} from '../properties';\n\n/**\n * The overlap mode for properties like `icon-overlap`and `text-overlap`\n */\nexport type OverlapMode = 'never' | 'always' | 'cooperative';\n\nexport function getOverlapMode(layout: PossiblyEvaluated, overlapProp: 'icon-overlap', allowOverlapProp: 'icon-allow-overlap'): OverlapMode;\nexport function getOverlapMode(layout: PossiblyEvaluated, overlapProp: 'text-overlap', allowOverlapProp: 'text-allow-overlap'): OverlapMode;\nexport function getOverlapMode(layout: PossiblyEvaluated, overlapProp: 'icon-overlap' | 'text-overlap', allowOverlapProp: 'icon-allow-overlap' | 'text-allow-overlap'): OverlapMode {\n let result: OverlapMode = 'never';\n const overlap = layout.get(overlapProp);\n\n if (overlap) {\n // if -overlap is set, use it\n result = overlap;\n } else if (layout.get(allowOverlapProp)) {\n // fall back to -allow-overlap, with false='never', true='always'\n result = 'always';\n }\n\n return result;\n}\n","import {\n symbolLayoutAttributes,\n collisionVertexAttributes,\n collisionBoxLayout,\n dynamicLayoutAttributes,\n} from './symbol_attributes';\n\nimport {SymbolLayoutArray,\n SymbolDynamicLayoutArray,\n SymbolOpacityArray,\n CollisionBoxLayoutArray,\n CollisionVertexArray,\n PlacedSymbolArray,\n SymbolInstanceArray,\n GlyphOffsetArray,\n SymbolLineVertexArray,\n TextAnchorOffsetArray\n} from '../array_types.g';\n\nimport Point from '@mapbox/point-geometry';\nimport {SegmentVector} from '../segment';\nimport {ProgramConfigurationSet} from '../program_configuration';\nimport {TriangleIndexArray, LineIndexArray} from '../index_array_type';\nimport {transformText} from '../../symbol/transform_text';\nimport {mergeLines} from '../../symbol/merge_lines';\nimport {allowsVerticalWritingMode, stringContainsRTLText} from '../../util/script_detection';\nimport {WritingMode} from '../../symbol/shaping';\nimport {loadGeometry} from '../load_geometry';\nimport {toEvaluationFeature} from '../evaluation_feature';\nimport {VectorTileFeature} from '@mapbox/vector-tile';\nimport {verticalizedCharacterMap} from '../../util/verticalize_punctuation';\nimport {type Anchor} from '../../symbol/anchor';\nimport {getSizeData, MAX_PACKED_SIZE} from '../../symbol/symbol_size';\n\nimport {register} from '../../util/web_worker_transfer';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\nimport {Formatted, ResolvedImage} from '@maplibre/maplibre-gl-style-spec';\nimport {rtlWorkerPlugin} from '../../source/rtl_text_plugin_worker';\nimport {getOverlapMode} from '../../style/style_layer/overlap_mode';\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport type {\n Bucket,\n BucketParameters,\n IndexedFeature,\n PopulateParameters\n} from '../bucket';\nimport type {CollisionBoxArray, CollisionBox, SymbolInstance} from '../array_types.g';\nimport type {StructArray, StructArrayMember, ViewType} from '../../util/struct_array';\nimport type {SymbolStyleLayer} from '../../style/style_layer/symbol_style_layer';\nimport type {Context} from '../../gl/context';\nimport type {IndexBuffer} from '../../gl/index_buffer';\nimport type {VertexBuffer} from '../../gl/vertex_buffer';\nimport type {SymbolQuad} from '../../symbol/quads';\nimport type {SizeData} from '../../symbol/symbol_size';\nimport type {FeatureStates} from '../../source/source_state';\nimport type {ImagePosition} from '../../render/image_atlas';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nexport type SingleCollisionBox = {\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n anchorPointX: number;\n anchorPointY: number;\n};\n\nexport type CollisionArrays = {\n textBox?: SingleCollisionBox;\n verticalTextBox?: SingleCollisionBox;\n iconBox?: SingleCollisionBox;\n verticalIconBox?: SingleCollisionBox;\n textFeatureIndex?: number;\n verticalTextFeatureIndex?: number;\n iconFeatureIndex?: number;\n verticalIconFeatureIndex?: number;\n};\n\nexport type SymbolFeature = {\n sortKey: number | void;\n text: Formatted | void;\n icon: ResolvedImage;\n index: number;\n sourceLayerIndex: number;\n geometry: Array>;\n properties: any;\n type: 'Unknown' | 'Point' | 'LineString' | 'Polygon';\n id?: any;\n};\n\nexport type SortKeyRange = {\n sortKey: number;\n symbolInstanceStart: number;\n symbolInstanceEnd: number;\n};\n\n// Opacity arrays are frequently updated but don't contain a lot of information, so we pack them\n// tight. Each Uint32 is actually four duplicate Uint8s for the four corners of a glyph\n// 7 bits are for the current opacity, and the lowest bit is the target opacity\n\n// actually defined in symbol_attributes.js\n// const placementOpacityAttributes = [\n// { name: 'a_fade_opacity', components: 1, type: 'Uint32' }\n// ];\nconst shaderOpacityAttributes = [\n {name: 'a_fade_opacity', components: 1, type: 'Uint8' as ViewType, offset: 0}\n];\n\nfunction addVertex(\n array: StructArray,\n anchorX: number,\n anchorY: number,\n ox: number,\n oy: number,\n tx: number,\n ty: number,\n sizeVertex: number,\n isSDF: boolean,\n pixelOffsetX: number,\n pixelOffsetY: number,\n minFontScaleX: number,\n minFontScaleY: number\n) {\n const aSizeX = sizeVertex ? Math.min(MAX_PACKED_SIZE, Math.round(sizeVertex[0])) : 0;\n const aSizeY = sizeVertex ? Math.min(MAX_PACKED_SIZE, Math.round(sizeVertex[1])) : 0;\n array.emplaceBack(\n // a_pos_offset\n anchorX,\n anchorY,\n Math.round(ox * 32),\n Math.round(oy * 32),\n\n // a_data\n tx, // x coordinate of symbol on glyph atlas texture\n ty, // y coordinate of symbol on glyph atlas texture\n (aSizeX << 1) + (isSDF ? 1 : 0),\n aSizeY,\n pixelOffsetX * 16,\n pixelOffsetY * 16,\n minFontScaleX * 256,\n minFontScaleY * 256\n );\n}\n\nfunction addDynamicAttributes(dynamicLayoutVertexArray: StructArray, p: Point, angle: number) {\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n}\n\nfunction containsRTLText(formattedText: Formatted): boolean {\n for (const section of formattedText.sections) {\n if (stringContainsRTLText(section.text)) {\n return true;\n }\n }\n return false;\n}\n\nexport class SymbolBuffers {\n layoutVertexArray: SymbolLayoutArray;\n layoutVertexBuffer: VertexBuffer;\n\n indexArray: TriangleIndexArray;\n indexBuffer: IndexBuffer;\n\n programConfigurations: ProgramConfigurationSet;\n segments: SegmentVector;\n\n dynamicLayoutVertexArray: SymbolDynamicLayoutArray;\n dynamicLayoutVertexBuffer: VertexBuffer;\n\n opacityVertexArray: SymbolOpacityArray;\n opacityVertexBuffer: VertexBuffer;\n hasVisibleVertices: boolean;\n\n collisionVertexArray: CollisionVertexArray;\n collisionVertexBuffer: VertexBuffer;\n\n placedSymbolArray: PlacedSymbolArray;\n\n constructor(programConfigurations: ProgramConfigurationSet) {\n this.layoutVertexArray = new SymbolLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.programConfigurations = programConfigurations;\n this.segments = new SegmentVector();\n this.dynamicLayoutVertexArray = new SymbolDynamicLayoutArray();\n this.opacityVertexArray = new SymbolOpacityArray();\n this.hasVisibleVertices = false;\n this.placedSymbolArray = new PlacedSymbolArray();\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0 &&\n this.indexArray.length === 0 &&\n this.dynamicLayoutVertexArray.length === 0 &&\n this.opacityVertexArray.length === 0;\n }\n\n upload(context: Context, dynamicIndexBuffer: boolean, upload?: boolean, update?: boolean) {\n if (this.isEmpty()) {\n return;\n }\n\n if (upload) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, symbolLayoutAttributes.members);\n this.indexBuffer = context.createIndexBuffer(this.indexArray, dynamicIndexBuffer);\n this.dynamicLayoutVertexBuffer = context.createVertexBuffer(this.dynamicLayoutVertexArray, dynamicLayoutAttributes.members, true);\n this.opacityVertexBuffer = context.createVertexBuffer(this.opacityVertexArray, shaderOpacityAttributes, true);\n // This is a performance hack so that we can write to opacityVertexArray with uint32s\n // even though the shaders read uint8s\n this.opacityVertexBuffer.itemSize = 1;\n }\n if (upload || update) {\n this.programConfigurations.upload(context);\n }\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n this.dynamicLayoutVertexBuffer.destroy();\n this.opacityVertexBuffer.destroy();\n }\n}\n\nregister('SymbolBuffers', SymbolBuffers);\n\nclass CollisionBuffers {\n layoutVertexArray: StructArray;\n layoutAttributes: Array;\n layoutVertexBuffer: VertexBuffer;\n\n indexArray: TriangleIndexArray | LineIndexArray;\n indexBuffer: IndexBuffer;\n\n segments: SegmentVector;\n\n collisionVertexArray: CollisionVertexArray;\n collisionVertexBuffer: VertexBuffer;\n\n constructor(LayoutArray: {\n new (...args: any): StructArray;\n },\n layoutAttributes: Array,\n IndexArray: {\n new (...args: any): TriangleIndexArray | LineIndexArray;\n }) {\n this.layoutVertexArray = new LayoutArray();\n this.layoutAttributes = layoutAttributes;\n this.indexArray = new IndexArray();\n this.segments = new SegmentVector();\n this.collisionVertexArray = new CollisionVertexArray();\n }\n\n upload(context: Context) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.collisionVertexBuffer = context.createVertexBuffer(this.collisionVertexArray, collisionVertexAttributes.members, true);\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.segments.destroy();\n this.collisionVertexBuffer.destroy();\n }\n}\n\nregister('CollisionBuffers', CollisionBuffers);\n\n/**\n * @internal\n * Unlike other buckets, which simply implement `addFeature` with type-specific\n * logic for (essentially) triangulating feature geometries, SymbolBucket\n * requires specialized behavior:\n *\n * 1. WorkerTile.parse(), the logical owner of the bucket creation process,\n * calls SymbolBucket.populate(), which resolves text and icon tokens on\n * each feature, adds each glyphs and symbols needed to the passed-in\n * collections options.glyphDependencies and options.iconDependencies, and\n * stores the feature data for use in subsequent step (this.features).\n *\n * 2. WorkerTile asynchronously requests from the main thread all of the glyphs\n * and icons needed (by this bucket and any others). When glyphs and icons\n * have been received, the WorkerTile creates a CollisionIndex and invokes:\n *\n * 3. performSymbolLayout(bucket, stacks, icons) perform texts shaping and\n * layout on a Symbol Bucket. This step populates:\n * `this.symbolInstances`: metadata on generated symbols\n * `this.collisionBoxArray`: collision data for use by foreground\n * `this.text`: SymbolBuffers for text symbols\n * `this.icons`: SymbolBuffers for icons\n * `this.iconCollisionBox`: Debug SymbolBuffers for icon collision boxes\n * `this.textCollisionBox`: Debug SymbolBuffers for text collision boxes\n * The results are sent to the foreground for rendering\n *\n * 4. placement.ts is run on the foreground,\n * and uses the CollisionIndex along with current camera settings to determine\n * which symbols can actually show on the map. Collided symbols are hidden\n * using a dynamic \"OpacityVertexArray\".\n */\nexport class SymbolBucket implements Bucket {\n static MAX_GLYPHS: number;\n static addDynamicAttributes: typeof addDynamicAttributes;\n\n collisionBoxArray: CollisionBoxArray;\n zoom: number;\n overscaling: number;\n layers: Array;\n layerIds: Array;\n stateDependentLayers: Array;\n stateDependentLayerIds: Array;\n\n index: number;\n sdfIcons: boolean;\n iconsInText: boolean;\n iconsNeedLinear: boolean;\n bucketInstanceId: number;\n justReloaded: boolean;\n hasDependencies: boolean;\n\n textSizeData: SizeData;\n iconSizeData: SizeData;\n\n glyphOffsetArray: GlyphOffsetArray;\n lineVertexArray: SymbolLineVertexArray;\n features: Array;\n symbolInstances: SymbolInstanceArray;\n textAnchorOffsets: TextAnchorOffsetArray;\n collisionArrays: Array;\n sortKeyRanges: Array;\n pixelRatio: number;\n tilePixelRatio: number;\n compareText: {[_: string]: Array};\n fadeStartTime: number;\n sortFeaturesByKey: boolean;\n sortFeaturesByY: boolean;\n canOverlap: boolean;\n sortedAngle: number;\n featureSortOrder: Array;\n\n collisionCircleArray: Array;\n\n text: SymbolBuffers;\n icon: SymbolBuffers;\n textCollisionBox: CollisionBuffers;\n iconCollisionBox: CollisionBuffers;\n uploaded: boolean;\n sourceLayerIndex: number;\n sourceID: string;\n symbolInstanceIndexes: Array;\n writingModes: WritingMode[];\n allowVerticalPlacement: boolean;\n hasRTLText: boolean;\n\n constructor(options: BucketParameters) {\n this.collisionBoxArray = options.collisionBoxArray;\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.pixelRatio = options.pixelRatio;\n this.sourceLayerIndex = options.sourceLayerIndex;\n this.hasDependencies = false;\n this.hasRTLText = false;\n this.sortKeyRanges = [];\n\n this.collisionCircleArray = [];\n\n const layer = this.layers[0];\n const unevaluatedLayoutValues = layer._unevaluatedLayout._values;\n\n this.textSizeData = getSizeData(this.zoom, unevaluatedLayoutValues['text-size']);\n this.iconSizeData = getSizeData(this.zoom, unevaluatedLayoutValues['icon-size']);\n\n const layout = this.layers[0].layout;\n const sortKey = layout.get('symbol-sort-key');\n const zOrder = layout.get('symbol-z-order');\n this.canOverlap =\n getOverlapMode(layout, 'text-overlap', 'text-allow-overlap') !== 'never' ||\n getOverlapMode(layout, 'icon-overlap', 'icon-allow-overlap') !== 'never' ||\n layout.get('text-ignore-placement') ||\n layout.get('icon-ignore-placement');\n this.sortFeaturesByKey = zOrder !== 'viewport-y' && !sortKey.isConstant();\n const zOrderByViewportY = zOrder === 'viewport-y' || (zOrder === 'auto' && !this.sortFeaturesByKey);\n this.sortFeaturesByY = zOrderByViewportY && this.canOverlap;\n\n if (layout.get('symbol-placement') === 'point') {\n this.writingModes = layout.get('text-writing-mode').map(wm => WritingMode[wm]);\n }\n\n this.stateDependentLayerIds = this.layers.filter((l) => l.isStateDependent()).map((l) => l.id);\n\n this.sourceID = options.sourceID;\n }\n\n createArrays() {\n this.text = new SymbolBuffers(new ProgramConfigurationSet(this.layers, this.zoom, property => /^text/.test(property)));\n this.icon = new SymbolBuffers(new ProgramConfigurationSet(this.layers, this.zoom, property => /^icon/.test(property)));\n\n this.glyphOffsetArray = new GlyphOffsetArray();\n this.lineVertexArray = new SymbolLineVertexArray();\n this.symbolInstances = new SymbolInstanceArray();\n this.textAnchorOffsets = new TextAnchorOffsetArray();\n }\n\n private calculateGlyphDependencies(\n text: string,\n stack: {[_: number]: boolean},\n textAlongLine: boolean,\n allowVerticalPlacement: boolean,\n doesAllowVerticalWritingMode: boolean) {\n\n for (const char of text) {\n stack[char.codePointAt(0)] = true;\n if ((textAlongLine || allowVerticalPlacement) && doesAllowVerticalWritingMode) {\n const verticalChar = verticalizedCharacterMap[char];\n if (verticalChar) {\n stack[verticalChar.codePointAt(0)] = true;\n }\n }\n }\n }\n\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID) {\n const layer = this.layers[0];\n const layout = layer.layout;\n\n const textFont = layout.get('text-font');\n const textField = layout.get('text-field');\n const iconImage = layout.get('icon-image');\n const hasText =\n (textField.value.kind !== 'constant' ||\n (textField.value.value instanceof Formatted && !textField.value.value.isEmpty()) ||\n textField.value.value.toString().length > 0) &&\n (textFont.value.kind !== 'constant' || textFont.value.value.length > 0);\n // we should always resolve the icon-image value if the property was defined in the style\n // this allows us to fire the styleimagemissing event if image evaluation returns null\n // the only way to distinguish between null returned from a coalesce statement with no valid images\n // and null returned because icon-image wasn't defined is to check whether or not iconImage.parameters is an empty object\n const hasIcon = iconImage.value.kind !== 'constant' || !!iconImage.value.value || Object.keys(iconImage.parameters).length > 0;\n const symbolSortKey = layout.get('symbol-sort-key');\n\n this.features = [];\n\n if (!hasText && !hasIcon) {\n return;\n }\n\n const icons = options.iconDependencies;\n const stacks = options.glyphDependencies;\n const availableImages = options.availableImages;\n const globalProperties = new EvaluationParameters(this.zoom);\n\n for (const {feature, id, index, sourceLayerIndex} of features) {\n\n const needGeometry = layer._featureFilter.needGeometry;\n const evaluationFeature = toEvaluationFeature(feature, needGeometry);\n if (!layer._featureFilter.filter(globalProperties, evaluationFeature, canonical)) {\n continue;\n }\n\n if (!needGeometry) evaluationFeature.geometry = loadGeometry(feature);\n\n let text: Formatted | void;\n if (hasText) {\n // Expression evaluation will automatically coerce to Formatted\n // but plain string token evaluation skips that pathway so do the\n // conversion here.\n const resolvedTokens = layer.getValueAndResolveTokens('text-field', evaluationFeature, canonical, availableImages);\n const formattedText = Formatted.factory(resolvedTokens);\n\n // on this instance: if hasRTLText is already true, all future calls to containsRTLText can be skipped.\n const bucketHasRTLText = this.hasRTLText = (this.hasRTLText || containsRTLText(formattedText));\n if (\n !bucketHasRTLText || // non-rtl text so can proceed safely\n rtlWorkerPlugin.getRTLTextPluginStatus() === 'unavailable' || // We don't intend to lazy-load the rtl text plugin, so proceed with incorrect shaping\n bucketHasRTLText && rtlWorkerPlugin.isParsed() // Use the rtlText plugin to shape text\n ) {\n text = transformText(formattedText, layer, evaluationFeature);\n }\n }\n\n let icon: ResolvedImage;\n if (hasIcon) {\n // Expression evaluation will automatically coerce to Image\n // but plain string token evaluation skips that pathway so do the\n // conversion here.\n const resolvedTokens = layer.getValueAndResolveTokens('icon-image', evaluationFeature, canonical, availableImages);\n if (resolvedTokens instanceof ResolvedImage) {\n icon = resolvedTokens;\n } else {\n icon = ResolvedImage.fromString(resolvedTokens);\n }\n }\n\n if (!text && !icon) {\n continue;\n }\n const sortKey = this.sortFeaturesByKey ?\n symbolSortKey.evaluate(evaluationFeature, {}, canonical) :\n undefined;\n\n const symbolFeature: SymbolFeature = {\n id,\n text,\n icon,\n index,\n sourceLayerIndex,\n geometry: evaluationFeature.geometry,\n properties: feature.properties,\n type: VectorTileFeature.types[feature.type],\n sortKey\n };\n this.features.push(symbolFeature);\n\n if (icon) {\n icons[icon.name] = true;\n }\n\n if (text) {\n const fontStack = textFont.evaluate(evaluationFeature, {}, canonical).join(',');\n const textAlongLine = layout.get('text-rotation-alignment') !== 'viewport' && layout.get('symbol-placement') !== 'point';\n this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(WritingMode.vertical) >= 0;\n for (const section of text.sections) {\n if (!section.image) {\n const doesAllowVerticalWritingMode = allowsVerticalWritingMode(text.toString());\n const sectionFont = section.fontStack || fontStack;\n const sectionStack = stacks[sectionFont] = stacks[sectionFont] || {};\n this.calculateGlyphDependencies(section.text, sectionStack, textAlongLine, this.allowVerticalPlacement, doesAllowVerticalWritingMode);\n } else {\n // Add section image to the list of dependencies.\n icons[section.image.name] = true;\n }\n }\n }\n }\n\n if (layout.get('symbol-placement') === 'line') {\n // Merge adjacent lines with the same text to improve labelling.\n // It's better to place labels on one long line than on many short segments.\n this.features = mergeLines(this.features);\n }\n\n if (this.sortFeaturesByKey) {\n this.features.sort((a, b) => {\n // a.sortKey is always a number when sortFeaturesByKey is true\n return (a.sortKey as number) - (b.sortKey as number);\n });\n }\n }\n\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {[_: string]: ImagePosition}) {\n if (!this.stateDependentLayers.length) return;\n this.text.programConfigurations.updatePaintArrays(states, vtLayer, this.layers, {\n imagePositions\n });\n this.icon.programConfigurations.updatePaintArrays(states, vtLayer, this.layers, {\n imagePositions\n });\n }\n\n isEmpty() {\n // When the bucket encounters only rtl-text but the plugin isn't loaded, no symbol instances will be created.\n // In order for the bucket to be serialized, and not discarded as an empty bucket both checks are necessary.\n return this.symbolInstances.length === 0 && !this.hasRTLText;\n }\n\n uploadPending() {\n return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;\n }\n\n upload(context: Context) {\n if (!this.uploaded && this.hasDebugData()) {\n this.textCollisionBox.upload(context);\n this.iconCollisionBox.upload(context);\n }\n this.text.upload(context, this.sortFeaturesByY, !this.uploaded, this.text.programConfigurations.needsUpload);\n this.icon.upload(context, this.sortFeaturesByY, !this.uploaded, this.icon.programConfigurations.needsUpload);\n this.uploaded = true;\n }\n\n destroyDebugData() {\n this.textCollisionBox.destroy();\n this.iconCollisionBox.destroy();\n }\n\n destroy() {\n this.text.destroy();\n this.icon.destroy();\n\n if (this.hasDebugData()) {\n this.destroyDebugData();\n }\n }\n\n addToLineVertexArray(anchor: Anchor, line: Array) {\n const lineStartIndex = this.lineVertexArray.length;\n if (anchor.segment !== undefined) {\n let sumForwardLength = anchor.dist(line[anchor.segment + 1]);\n let sumBackwardLength = anchor.dist(line[anchor.segment]);\n const vertices = {};\n for (let i = anchor.segment + 1; i < line.length; i++) {\n vertices[i] = {x: line[i].x, y: line[i].y, tileUnitDistanceFromAnchor: sumForwardLength};\n if (i < line.length - 1) {\n sumForwardLength += line[i + 1].dist(line[i]);\n }\n }\n for (let i = anchor.segment || 0; i >= 0; i--) {\n vertices[i] = {x: line[i].x, y: line[i].y, tileUnitDistanceFromAnchor: sumBackwardLength};\n if (i > 0) {\n sumBackwardLength += line[i - 1].dist(line[i]);\n }\n }\n for (let i = 0; i < line.length; i++) {\n const vertex = vertices[i];\n this.lineVertexArray.emplaceBack(vertex.x, vertex.y, vertex.tileUnitDistanceFromAnchor);\n }\n }\n return {\n lineStartIndex,\n lineLength: this.lineVertexArray.length - lineStartIndex\n };\n }\n\n addSymbols(arrays: SymbolBuffers,\n quads: Array,\n sizeVertex: any,\n lineOffset: [number, number],\n alongLine: boolean,\n feature: SymbolFeature,\n writingMode: WritingMode,\n labelAnchor: Anchor,\n lineStartIndex: number,\n lineLength: number,\n associatedIconIndex: number,\n canonical: CanonicalTileID) {\n const indexArray = arrays.indexArray;\n const layoutVertexArray = arrays.layoutVertexArray;\n\n const segment = arrays.segments.prepareSegment(4 * quads.length, layoutVertexArray, indexArray, this.canOverlap ? feature.sortKey as number : undefined);\n const glyphOffsetArrayStart = this.glyphOffsetArray.length;\n const vertexStartIndex = segment.vertexLength;\n\n const angle = (this.allowVerticalPlacement && writingMode === WritingMode.vertical) ? Math.PI / 2 : 0;\n\n const sections = feature.text && feature.text.sections;\n\n for (let i = 0; i < quads.length; i++) {\n const {tl, tr, bl, br, tex, pixelOffsetTL, pixelOffsetBR, minFontScaleX, minFontScaleY, glyphOffset, isSDF, sectionIndex} = quads[i];\n const index = segment.vertexLength;\n\n const y = glyphOffset[1];\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, tl.x, y + tl.y, tex.x, tex.y, sizeVertex, isSDF, pixelOffsetTL.x, pixelOffsetTL.y, minFontScaleX, minFontScaleY);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, tr.x, y + tr.y, tex.x + tex.w, tex.y, sizeVertex, isSDF, pixelOffsetBR.x, pixelOffsetTL.y, minFontScaleX, minFontScaleY);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, bl.x, y + bl.y, tex.x, tex.y + tex.h, sizeVertex, isSDF, pixelOffsetTL.x, pixelOffsetBR.y, minFontScaleX, minFontScaleY);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, br.x, y + br.y, tex.x + tex.w, tex.y + tex.h, sizeVertex, isSDF, pixelOffsetBR.x, pixelOffsetBR.y, minFontScaleX, minFontScaleY);\n\n addDynamicAttributes(arrays.dynamicLayoutVertexArray, labelAnchor, angle);\n\n indexArray.emplaceBack(index, index + 2, index + 1);\n indexArray.emplaceBack(index + 1, index + 2, index + 3);\n\n segment.vertexLength += 4;\n segment.primitiveLength += 2;\n\n this.glyphOffsetArray.emplaceBack(glyphOffset[0]);\n\n if (i === quads.length - 1 || sectionIndex !== quads[i + 1].sectionIndex) {\n arrays.programConfigurations.populatePaintArrays(layoutVertexArray.length, feature, feature.index, {imagePositions: {}, canonical, formattedSection: sections && sections[sectionIndex]});\n }\n }\n\n arrays.placedSymbolArray.emplaceBack(\n labelAnchor.x, labelAnchor.y,\n glyphOffsetArrayStart,\n this.glyphOffsetArray.length - glyphOffsetArrayStart,\n vertexStartIndex,\n lineStartIndex,\n lineLength,\n labelAnchor.segment,\n sizeVertex ? sizeVertex[0] : 0,\n sizeVertex ? sizeVertex[1] : 0,\n lineOffset[0], lineOffset[1],\n writingMode,\n // placedOrientation is null initially; will be updated to horizontal(1)/vertical(2) if placed\n 0,\n false as unknown as number,\n // The crossTileID is only filled/used on the foreground for dynamic text anchors\n 0,\n associatedIconIndex\n );\n }\n\n _addCollisionDebugVertex(layoutVertexArray: StructArray, collisionVertexArray: StructArray, point: Point, anchorX: number, anchorY: number, extrude: Point) {\n collisionVertexArray.emplaceBack(0, 0);\n return layoutVertexArray.emplaceBack(\n // pos\n point.x,\n point.y,\n // a_anchor_pos\n anchorX,\n anchorY,\n // extrude\n Math.round(extrude.x),\n Math.round(extrude.y));\n }\n\n addCollisionDebugVertices(x1: number, y1: number, x2: number, y2: number, arrays: CollisionBuffers, boxAnchorPoint: Point, symbolInstance: SymbolInstance) {\n const segment = arrays.segments.prepareSegment(4, arrays.layoutVertexArray, arrays.indexArray);\n const index = segment.vertexLength;\n\n const layoutVertexArray = arrays.layoutVertexArray;\n const collisionVertexArray = arrays.collisionVertexArray;\n\n const anchorX = symbolInstance.anchorX;\n const anchorY = symbolInstance.anchorY;\n\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, anchorX, anchorY, new Point(x1, y1));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, anchorX, anchorY, new Point(x2, y1));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, anchorX, anchorY, new Point(x2, y2));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, anchorX, anchorY, new Point(x1, y2));\n\n segment.vertexLength += 4;\n\n const indexArray = arrays.indexArray as LineIndexArray;\n indexArray.emplaceBack(index, index + 1);\n indexArray.emplaceBack(index + 1, index + 2);\n indexArray.emplaceBack(index + 2, index + 3);\n indexArray.emplaceBack(index + 3, index);\n\n segment.primitiveLength += 4;\n }\n\n addDebugCollisionBoxes(startIndex: number, endIndex: number, symbolInstance: SymbolInstance, isText: boolean) {\n for (let b = startIndex; b < endIndex; b++) {\n const box: CollisionBox = this.collisionBoxArray.get(b);\n const x1 = box.x1;\n const y1 = box.y1;\n const x2 = box.x2;\n const y2 = box.y2;\n\n this.addCollisionDebugVertices(x1, y1, x2, y2,\n isText ? this.textCollisionBox : this.iconCollisionBox,\n box.anchorPoint, symbolInstance);\n }\n }\n\n generateCollisionDebugBuffers() {\n if (this.hasDebugData()) {\n this.destroyDebugData();\n }\n\n this.textCollisionBox = new CollisionBuffers(CollisionBoxLayoutArray, collisionBoxLayout.members, LineIndexArray);\n this.iconCollisionBox = new CollisionBuffers(CollisionBoxLayoutArray, collisionBoxLayout.members, LineIndexArray);\n\n for (let i = 0; i < this.symbolInstances.length; i++) {\n const symbolInstance = this.symbolInstances.get(i);\n this.addDebugCollisionBoxes(symbolInstance.textBoxStartIndex, symbolInstance.textBoxEndIndex, symbolInstance, true);\n this.addDebugCollisionBoxes(symbolInstance.verticalTextBoxStartIndex, symbolInstance.verticalTextBoxEndIndex, symbolInstance, true);\n this.addDebugCollisionBoxes(symbolInstance.iconBoxStartIndex, symbolInstance.iconBoxEndIndex, symbolInstance, false);\n this.addDebugCollisionBoxes(symbolInstance.verticalIconBoxStartIndex, symbolInstance.verticalIconBoxEndIndex, symbolInstance, false);\n }\n }\n\n // These flat arrays are meant to be quicker to iterate over than the source\n // CollisionBoxArray\n _deserializeCollisionBoxesForSymbol(\n collisionBoxArray: CollisionBoxArray,\n textStartIndex: number,\n textEndIndex: number,\n verticalTextStartIndex: number,\n verticalTextEndIndex: number,\n iconStartIndex: number,\n iconEndIndex: number,\n verticalIconStartIndex: number,\n verticalIconEndIndex: number\n ): CollisionArrays {\n\n const collisionArrays = {} as CollisionArrays;\n for (let k = textStartIndex; k < textEndIndex; k++) {\n const box: CollisionBox = collisionBoxArray.get(k);\n collisionArrays.textBox = {x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY};\n collisionArrays.textFeatureIndex = box.featureIndex;\n break; // Only one box allowed per instance\n }\n for (let k = verticalTextStartIndex; k < verticalTextEndIndex; k++) {\n const box: CollisionBox = collisionBoxArray.get(k);\n collisionArrays.verticalTextBox = {x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY};\n collisionArrays.verticalTextFeatureIndex = box.featureIndex;\n break; // Only one box allowed per instance\n }\n for (let k = iconStartIndex; k < iconEndIndex; k++) {\n // An icon can only have one box now, so this indexing is a bit vestigial...\n const box: CollisionBox = collisionBoxArray.get(k);\n collisionArrays.iconBox = {x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY};\n collisionArrays.iconFeatureIndex = box.featureIndex;\n break; // Only one box allowed per instance\n }\n for (let k = verticalIconStartIndex; k < verticalIconEndIndex; k++) {\n // An icon can only have one box now, so this indexing is a bit vestigial...\n const box: CollisionBox = collisionBoxArray.get(k);\n collisionArrays.verticalIconBox = {x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY};\n collisionArrays.verticalIconFeatureIndex = box.featureIndex;\n break; // Only one box allowed per instance\n }\n return collisionArrays;\n }\n\n deserializeCollisionBoxes(collisionBoxArray: CollisionBoxArray) {\n this.collisionArrays = [];\n for (let i = 0; i < this.symbolInstances.length; i++) {\n const symbolInstance = this.symbolInstances.get(i);\n this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(\n collisionBoxArray,\n symbolInstance.textBoxStartIndex,\n symbolInstance.textBoxEndIndex,\n symbolInstance.verticalTextBoxStartIndex,\n symbolInstance.verticalTextBoxEndIndex,\n symbolInstance.iconBoxStartIndex,\n symbolInstance.iconBoxEndIndex,\n symbolInstance.verticalIconBoxStartIndex,\n symbolInstance.verticalIconBoxEndIndex\n ));\n }\n }\n\n hasTextData() {\n return this.text.segments.get().length > 0;\n }\n\n hasIconData() {\n return this.icon.segments.get().length > 0;\n }\n\n hasDebugData() {\n return this.textCollisionBox && this.iconCollisionBox;\n }\n\n hasTextCollisionBoxData() {\n return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;\n }\n\n hasIconCollisionBoxData() {\n return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;\n }\n\n addIndicesForPlacedSymbol(iconOrText: SymbolBuffers, placedSymbolIndex: number) {\n const placedSymbol = iconOrText.placedSymbolArray.get(placedSymbolIndex);\n\n const endIndex = placedSymbol.vertexStartIndex + placedSymbol.numGlyphs * 4;\n for (let vertexIndex = placedSymbol.vertexStartIndex; vertexIndex < endIndex; vertexIndex += 4) {\n iconOrText.indexArray.emplaceBack(vertexIndex, vertexIndex + 2, vertexIndex + 1);\n iconOrText.indexArray.emplaceBack(vertexIndex + 1, vertexIndex + 2, vertexIndex + 3);\n }\n }\n\n getSortedSymbolIndexes(angle: number) {\n if (this.sortedAngle === angle && this.symbolInstanceIndexes !== undefined) {\n return this.symbolInstanceIndexes;\n }\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n const rotatedYs = [];\n const featureIndexes = [];\n const result = [];\n\n for (let i = 0; i < this.symbolInstances.length; ++i) {\n result.push(i);\n const symbolInstance = this.symbolInstances.get(i);\n rotatedYs.push(Math.round(sin * symbolInstance.anchorX + cos * symbolInstance.anchorY) | 0);\n featureIndexes.push(symbolInstance.featureIndex);\n }\n\n result.sort((aIndex, bIndex) => {\n return (rotatedYs[aIndex] - rotatedYs[bIndex]) ||\n (featureIndexes[bIndex] - featureIndexes[aIndex]);\n });\n\n return result;\n }\n\n addToSortKeyRanges(symbolInstanceIndex: number, sortKey: number) {\n const last = this.sortKeyRanges[this.sortKeyRanges.length - 1];\n if (last && last.sortKey === sortKey) {\n last.symbolInstanceEnd = symbolInstanceIndex + 1;\n } else {\n this.sortKeyRanges.push({\n sortKey,\n symbolInstanceStart: symbolInstanceIndex,\n symbolInstanceEnd: symbolInstanceIndex + 1\n });\n }\n }\n\n sortFeatures(angle: number) {\n if (!this.sortFeaturesByY) return;\n if (this.sortedAngle === angle) return;\n\n // The current approach to sorting doesn't sort across segments so don't try.\n // Sorting within segments separately seemed not to be worth the complexity.\n if (this.text.segments.get().length > 1 || this.icon.segments.get().length > 1) return;\n\n // If the symbols are allowed to overlap sort them by their vertical screen position.\n // The index array buffer is rewritten to reference the (unchanged) vertices in the\n // sorted order.\n\n // To avoid sorting the actual symbolInstance array we sort an array of indexes.\n this.symbolInstanceIndexes = this.getSortedSymbolIndexes(angle);\n this.sortedAngle = angle;\n\n this.text.indexArray.clear();\n this.icon.indexArray.clear();\n\n this.featureSortOrder = [];\n\n for (const i of this.symbolInstanceIndexes) {\n const symbolInstance = this.symbolInstances.get(i);\n this.featureSortOrder.push(symbolInstance.featureIndex);\n\n [\n symbolInstance.rightJustifiedTextSymbolIndex,\n symbolInstance.centerJustifiedTextSymbolIndex,\n symbolInstance.leftJustifiedTextSymbolIndex\n ].forEach((index, i, array) => {\n // Only add a given index the first time it shows up,\n // to avoid duplicate opacity entries when multiple justifications\n // share the same glyphs.\n if (index >= 0 && array.indexOf(index) === i) {\n this.addIndicesForPlacedSymbol(this.text, index);\n }\n });\n\n if (symbolInstance.verticalPlacedTextSymbolIndex >= 0) {\n this.addIndicesForPlacedSymbol(this.text, symbolInstance.verticalPlacedTextSymbolIndex);\n }\n\n if (symbolInstance.placedIconSymbolIndex >= 0) {\n this.addIndicesForPlacedSymbol(this.icon, symbolInstance.placedIconSymbolIndex);\n }\n\n if (symbolInstance.verticalPlacedIconSymbolIndex >= 0) {\n this.addIndicesForPlacedSymbol(this.icon, symbolInstance.verticalPlacedIconSymbolIndex);\n }\n }\n\n if (this.text.indexBuffer) this.text.indexBuffer.updateData(this.text.indexArray);\n if (this.icon.indexBuffer) this.icon.indexBuffer.updateData(this.icon.indexArray);\n }\n}\n\nregister('SymbolBucket', SymbolBucket, {\n omit: ['layers', 'collisionBoxArray', 'features', 'compareText']\n});\n\n// this constant is based on the size of StructArray indexes used in a symbol\n// bucket--namely, glyphOffsetArrayStart\n// eg the max valid UInt16 is 65,535\n// See https://github.com/mapbox/mapbox-gl-js/issues/2907 for motivation\n// lineStartIndex and textBoxStartIndex could potentially be concerns\n// but we expect there to be many fewer boxes/lines than glyphs\nSymbolBucket.MAX_GLYPHS = 65535;\n\nSymbolBucket.addDynamicAttributes = addDynamicAttributes;\n\nexport {addDynamicAttributes};\n","import type {SymbolFeature} from '../data/bucket/symbol_bucket';\n\nexport function mergeLines(features: Array): Array {\n const leftIndex: {[_: string]: number} = {};\n const rightIndex: {[_: string]: number} = {};\n const mergedFeatures = [];\n let mergedIndex = 0;\n\n function add(k) {\n mergedFeatures.push(features[k]);\n mergedIndex++;\n }\n\n function mergeFromRight(leftKey: string, rightKey: string, geom) {\n const i = rightIndex[leftKey];\n delete rightIndex[leftKey];\n rightIndex[rightKey] = i;\n\n mergedFeatures[i].geometry[0].pop();\n mergedFeatures[i].geometry[0] = mergedFeatures[i].geometry[0].concat(geom[0]);\n return i;\n }\n\n function mergeFromLeft(leftKey: string, rightKey: string, geom) {\n const i = leftIndex[rightKey];\n delete leftIndex[rightKey];\n leftIndex[leftKey] = i;\n\n mergedFeatures[i].geometry[0].shift();\n mergedFeatures[i].geometry[0] = geom[0].concat(mergedFeatures[i].geometry[0]);\n return i;\n }\n\n function getKey(text, geom, onRight?) {\n const point = onRight ? geom[0][geom[0].length - 1] : geom[0][0];\n return `${text}:${point.x}:${point.y}`;\n }\n\n for (let k = 0; k < features.length; k++) {\n const feature = features[k];\n const geom = feature.geometry;\n const text = feature.text ? feature.text.toString() : null;\n\n if (!text) {\n add(k);\n continue;\n }\n\n const leftKey = getKey(text, geom),\n rightKey = getKey(text, geom, true);\n\n if ((leftKey in rightIndex) && (rightKey in leftIndex) && (rightIndex[leftKey] !== leftIndex[rightKey])) {\n // found lines with the same text adjacent to both ends of the current line, merge all three\n const j = mergeFromLeft(leftKey, rightKey, geom);\n const i = mergeFromRight(leftKey, rightKey, mergedFeatures[j].geometry);\n\n delete leftIndex[leftKey];\n delete rightIndex[rightKey];\n\n rightIndex[getKey(text, mergedFeatures[i].geometry, true)] = i;\n mergedFeatures[j].geometry = null;\n\n } else if (leftKey in rightIndex) {\n // found mergeable line adjacent to the start of the current line, merge\n mergeFromRight(leftKey, rightKey, geom);\n\n } else if (rightKey in leftIndex) {\n // found mergeable line adjacent to the end of the current line, merge\n mergeFromLeft(leftKey, rightKey, geom);\n\n } else {\n // no adjacent lines, add as a new item\n add(k);\n leftIndex[leftKey] = mergedIndex - 1;\n rightIndex[rightKey] = mergedIndex - 1;\n }\n }\n\n return mergedFeatures.filter((f) => f.geometry);\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n ColorType\n } from '@maplibre/maplibre-gl-style-spec';\n \nexport type SymbolLayoutProps = {\n \"symbol-placement\": DataConstantProperty<\"point\" | \"line\" | \"line-center\">,\n \"symbol-spacing\": DataConstantProperty,\n \"symbol-avoid-edges\": DataConstantProperty,\n \"symbol-sort-key\": DataDrivenProperty,\n \"symbol-z-order\": DataConstantProperty<\"auto\" | \"viewport-y\" | \"source\">,\n \"icon-allow-overlap\": DataConstantProperty,\n \"icon-overlap\": DataConstantProperty<\"never\" | \"always\" | \"cooperative\">,\n \"icon-ignore-placement\": DataConstantProperty,\n \"icon-optional\": DataConstantProperty,\n \"icon-rotation-alignment\": DataConstantProperty<\"map\" | \"viewport\" | \"auto\">,\n \"icon-size\": DataDrivenProperty,\n \"icon-text-fit\": DataConstantProperty<\"none\" | \"width\" | \"height\" | \"both\">,\n \"icon-text-fit-padding\": DataConstantProperty<[number, number, number, number]>,\n \"icon-image\": DataDrivenProperty,\n \"icon-rotate\": DataDrivenProperty,\n \"icon-padding\": DataDrivenProperty,\n \"icon-keep-upright\": DataConstantProperty,\n \"icon-offset\": DataDrivenProperty<[number, number]>,\n \"icon-anchor\": DataDrivenProperty<\"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\">,\n \"icon-pitch-alignment\": DataConstantProperty<\"map\" | \"viewport\" | \"auto\">,\n \"text-pitch-alignment\": DataConstantProperty<\"map\" | \"viewport\" | \"auto\">,\n \"text-rotation-alignment\": DataConstantProperty<\"map\" | \"viewport\" | \"viewport-glyph\" | \"auto\">,\n \"text-field\": DataDrivenProperty,\n \"text-font\": DataDrivenProperty>,\n \"text-size\": DataDrivenProperty,\n \"text-max-width\": DataDrivenProperty,\n \"text-line-height\": DataConstantProperty,\n \"text-letter-spacing\": DataDrivenProperty,\n \"text-justify\": DataDrivenProperty<\"auto\" | \"left\" | \"center\" | \"right\">,\n \"text-radial-offset\": DataDrivenProperty,\n \"text-variable-anchor\": DataConstantProperty>,\n \"text-variable-anchor-offset\": DataDrivenProperty,\n \"text-anchor\": DataDrivenProperty<\"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\">,\n \"text-max-angle\": DataConstantProperty,\n \"text-writing-mode\": DataConstantProperty>,\n \"text-rotate\": DataDrivenProperty,\n \"text-padding\": DataConstantProperty,\n \"text-keep-upright\": DataConstantProperty,\n \"text-transform\": DataDrivenProperty<\"none\" | \"uppercase\" | \"lowercase\">,\n \"text-offset\": DataDrivenProperty<[number, number]>,\n \"text-allow-overlap\": DataConstantProperty,\n \"text-overlap\": DataConstantProperty<\"never\" | \"always\" | \"cooperative\">,\n \"text-ignore-placement\": DataConstantProperty,\n \"text-optional\": DataConstantProperty,\n};\n\nexport type SymbolLayoutPropsPossiblyEvaluated = {\n \"symbol-placement\": \"point\" | \"line\" | \"line-center\",\n \"symbol-spacing\": number,\n \"symbol-avoid-edges\": boolean,\n \"symbol-sort-key\": PossiblyEvaluatedPropertyValue,\n \"symbol-z-order\": \"auto\" | \"viewport-y\" | \"source\",\n \"icon-allow-overlap\": boolean,\n \"icon-overlap\": \"never\" | \"always\" | \"cooperative\",\n \"icon-ignore-placement\": boolean,\n \"icon-optional\": boolean,\n \"icon-rotation-alignment\": \"map\" | \"viewport\" | \"auto\",\n \"icon-size\": PossiblyEvaluatedPropertyValue,\n \"icon-text-fit\": \"none\" | \"width\" | \"height\" | \"both\",\n \"icon-text-fit-padding\": [number, number, number, number],\n \"icon-image\": PossiblyEvaluatedPropertyValue,\n \"icon-rotate\": PossiblyEvaluatedPropertyValue,\n \"icon-padding\": PossiblyEvaluatedPropertyValue,\n \"icon-keep-upright\": boolean,\n \"icon-offset\": PossiblyEvaluatedPropertyValue<[number, number]>,\n \"icon-anchor\": PossiblyEvaluatedPropertyValue<\"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\">,\n \"icon-pitch-alignment\": \"map\" | \"viewport\" | \"auto\",\n \"text-pitch-alignment\": \"map\" | \"viewport\" | \"auto\",\n \"text-rotation-alignment\": \"map\" | \"viewport\" | \"viewport-glyph\" | \"auto\",\n \"text-field\": PossiblyEvaluatedPropertyValue,\n \"text-font\": PossiblyEvaluatedPropertyValue>,\n \"text-size\": PossiblyEvaluatedPropertyValue,\n \"text-max-width\": PossiblyEvaluatedPropertyValue,\n \"text-line-height\": number,\n \"text-letter-spacing\": PossiblyEvaluatedPropertyValue,\n \"text-justify\": PossiblyEvaluatedPropertyValue<\"auto\" | \"left\" | \"center\" | \"right\">,\n \"text-radial-offset\": PossiblyEvaluatedPropertyValue,\n \"text-variable-anchor\": Array<\"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\">,\n \"text-variable-anchor-offset\": PossiblyEvaluatedPropertyValue,\n \"text-anchor\": PossiblyEvaluatedPropertyValue<\"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\">,\n \"text-max-angle\": number,\n \"text-writing-mode\": Array<\"horizontal\" | \"vertical\">,\n \"text-rotate\": PossiblyEvaluatedPropertyValue,\n \"text-padding\": number,\n \"text-keep-upright\": boolean,\n \"text-transform\": PossiblyEvaluatedPropertyValue<\"none\" | \"uppercase\" | \"lowercase\">,\n \"text-offset\": PossiblyEvaluatedPropertyValue<[number, number]>,\n \"text-allow-overlap\": boolean,\n \"text-overlap\": \"never\" | \"always\" | \"cooperative\",\n \"text-ignore-placement\": boolean,\n \"text-optional\": boolean,\n};\n\nlet layout: Properties;\nconst getLayout = () => layout = layout || new Properties({\n \"symbol-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-placement\"] as any as StylePropertySpecification),\n \"symbol-spacing\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-spacing\"] as any as StylePropertySpecification),\n \"symbol-avoid-edges\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-avoid-edges\"] as any as StylePropertySpecification),\n \"symbol-sort-key\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"symbol-sort-key\"] as any as StylePropertySpecification),\n \"symbol-z-order\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-z-order\"] as any as StylePropertySpecification),\n \"icon-allow-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-allow-overlap\"] as any as StylePropertySpecification),\n \"icon-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-overlap\"] as any as StylePropertySpecification),\n \"icon-ignore-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-ignore-placement\"] as any as StylePropertySpecification),\n \"icon-optional\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-optional\"] as any as StylePropertySpecification),\n \"icon-rotation-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-rotation-alignment\"] as any as StylePropertySpecification),\n \"icon-size\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-size\"] as any as StylePropertySpecification),\n \"icon-text-fit\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-text-fit\"] as any as StylePropertySpecification),\n \"icon-text-fit-padding\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-text-fit-padding\"] as any as StylePropertySpecification),\n \"icon-image\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-image\"] as any as StylePropertySpecification),\n \"icon-rotate\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-rotate\"] as any as StylePropertySpecification),\n \"icon-padding\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-padding\"] as any as StylePropertySpecification),\n \"icon-keep-upright\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-keep-upright\"] as any as StylePropertySpecification),\n \"icon-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-offset\"] as any as StylePropertySpecification),\n \"icon-anchor\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-anchor\"] as any as StylePropertySpecification),\n \"icon-pitch-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-pitch-alignment\"] as any as StylePropertySpecification),\n \"text-pitch-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-pitch-alignment\"] as any as StylePropertySpecification),\n \"text-rotation-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-rotation-alignment\"] as any as StylePropertySpecification),\n \"text-field\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-field\"] as any as StylePropertySpecification),\n \"text-font\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-font\"] as any as StylePropertySpecification),\n \"text-size\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-size\"] as any as StylePropertySpecification),\n \"text-max-width\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-max-width\"] as any as StylePropertySpecification),\n \"text-line-height\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-line-height\"] as any as StylePropertySpecification),\n \"text-letter-spacing\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-letter-spacing\"] as any as StylePropertySpecification),\n \"text-justify\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-justify\"] as any as StylePropertySpecification),\n \"text-radial-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-radial-offset\"] as any as StylePropertySpecification),\n \"text-variable-anchor\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-variable-anchor\"] as any as StylePropertySpecification),\n \"text-variable-anchor-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-variable-anchor-offset\"] as any as StylePropertySpecification),\n \"text-anchor\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-anchor\"] as any as StylePropertySpecification),\n \"text-max-angle\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-max-angle\"] as any as StylePropertySpecification),\n \"text-writing-mode\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-writing-mode\"] as any as StylePropertySpecification),\n \"text-rotate\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-rotate\"] as any as StylePropertySpecification),\n \"text-padding\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-padding\"] as any as StylePropertySpecification),\n \"text-keep-upright\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-keep-upright\"] as any as StylePropertySpecification),\n \"text-transform\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-transform\"] as any as StylePropertySpecification),\n \"text-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-offset\"] as any as StylePropertySpecification),\n \"text-allow-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-allow-overlap\"] as any as StylePropertySpecification),\n \"text-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-overlap\"] as any as StylePropertySpecification),\n \"text-ignore-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-ignore-placement\"] as any as StylePropertySpecification),\n \"text-optional\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-optional\"] as any as StylePropertySpecification),\n});\n\nexport type SymbolPaintProps = {\n \"icon-opacity\": DataDrivenProperty,\n \"icon-color\": DataDrivenProperty,\n \"icon-halo-color\": DataDrivenProperty,\n \"icon-halo-width\": DataDrivenProperty,\n \"icon-halo-blur\": DataDrivenProperty,\n \"icon-translate\": DataConstantProperty<[number, number]>,\n \"icon-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n \"text-opacity\": DataDrivenProperty,\n \"text-color\": DataDrivenProperty,\n \"text-halo-color\": DataDrivenProperty,\n \"text-halo-width\": DataDrivenProperty,\n \"text-halo-blur\": DataDrivenProperty,\n \"text-translate\": DataConstantProperty<[number, number]>,\n \"text-translate-anchor\": DataConstantProperty<\"map\" | \"viewport\">,\n};\n\nexport type SymbolPaintPropsPossiblyEvaluated = {\n \"icon-opacity\": PossiblyEvaluatedPropertyValue,\n \"icon-color\": PossiblyEvaluatedPropertyValue,\n \"icon-halo-color\": PossiblyEvaluatedPropertyValue,\n \"icon-halo-width\": PossiblyEvaluatedPropertyValue,\n \"icon-halo-blur\": PossiblyEvaluatedPropertyValue,\n \"icon-translate\": [number, number],\n \"icon-translate-anchor\": \"map\" | \"viewport\",\n \"text-opacity\": PossiblyEvaluatedPropertyValue,\n \"text-color\": PossiblyEvaluatedPropertyValue,\n \"text-halo-color\": PossiblyEvaluatedPropertyValue,\n \"text-halo-width\": PossiblyEvaluatedPropertyValue,\n \"text-halo-blur\": PossiblyEvaluatedPropertyValue,\n \"text-translate\": [number, number],\n \"text-translate-anchor\": \"map\" | \"viewport\",\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"icon-opacity\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-opacity\"] as any as StylePropertySpecification),\n \"icon-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-color\"] as any as StylePropertySpecification),\n \"icon-halo-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-color\"] as any as StylePropertySpecification),\n \"icon-halo-width\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-width\"] as any as StylePropertySpecification),\n \"icon-halo-blur\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-blur\"] as any as StylePropertySpecification),\n \"icon-translate\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"icon-translate\"] as any as StylePropertySpecification),\n \"icon-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"icon-translate-anchor\"] as any as StylePropertySpecification),\n \"text-opacity\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-opacity\"] as any as StylePropertySpecification),\n \"text-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-color\"] as any as StylePropertySpecification, { runtimeType: ColorType, getOverride: (o) => o.textColor, hasOverride: (o) => !!o.textColor }),\n \"text-halo-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-color\"] as any as StylePropertySpecification),\n \"text-halo-width\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-width\"] as any as StylePropertySpecification),\n \"text-halo-blur\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-blur\"] as any as StylePropertySpecification),\n \"text-translate\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"text-translate\"] as any as StylePropertySpecification),\n \"text-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"text-translate-anchor\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() }, get layout() { return getLayout() } });","import type {Expression, EvaluationContext, Type, ZoomConstantExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {NullType} from '@maplibre/maplibre-gl-style-spec';\nimport {type PossiblyEvaluatedPropertyValue} from './properties';\nimport {register} from '../util/web_worker_transfer';\n\n// This is an internal expression class. It is only used in GL JS and\n// has GL JS dependencies which can break the standalone style-spec module\nexport class FormatSectionOverride implements Expression {\n type: Type;\n defaultValue: PossiblyEvaluatedPropertyValue;\n\n constructor(defaultValue: PossiblyEvaluatedPropertyValue) {\n if (defaultValue.property.overrides === undefined) throw new Error('overrides must be provided to instantiate FormatSectionOverride class');\n this.type = defaultValue.property.overrides ? defaultValue.property.overrides.runtimeType : NullType;\n this.defaultValue = defaultValue;\n }\n\n evaluate(ctx: EvaluationContext) {\n if (ctx.formattedSection) {\n const overrides = this.defaultValue.property.overrides;\n if (overrides && overrides.hasOverride(ctx.formattedSection)) {\n return overrides.getOverride(ctx.formattedSection);\n }\n }\n\n if (ctx.feature && ctx.featureState) {\n return this.defaultValue.evaluate(ctx.feature, ctx.featureState);\n }\n\n return this.defaultValue.property.specification.default;\n }\n\n eachChild(fn: (_: Expression) => void) {\n if (!this.defaultValue.isConstant()) {\n const expr: ZoomConstantExpression<'source'> = (this.defaultValue.value as any);\n fn(expr._styleExpression.expression);\n }\n }\n\n // Cannot be statically evaluated, as the output depends on the evaluation context.\n outputDefined() {\n return false;\n }\n\n serialize() {\n return null;\n }\n}\n\nregister('FormatSectionOverride', FormatSectionOverride, {omit: ['defaultValue']});\n","import {StyleLayer} from '../style_layer';\n\nimport {SymbolBucket, type SymbolFeature} from '../../data/bucket/symbol_bucket';\nimport {resolveTokens} from '../../util/resolve_tokens';\nimport properties, {type SymbolLayoutPropsPossiblyEvaluated, type SymbolPaintPropsPossiblyEvaluated} from './symbol_style_layer_properties.g';\n\nimport {\n type Transitionable,\n type Transitioning,\n type Layout,\n type PossiblyEvaluated,\n PossiblyEvaluatedPropertyValue,\n type PropertyValue\n} from '../properties';\n\nimport {\n isExpression,\n StyleExpression,\n ZoomConstantExpression,\n ZoomDependentExpression,\n FormattedType,\n typeOf,\n Formatted,\n FormatExpression,\n Literal} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {BucketParameters} from '../../data/bucket';\nimport type {SymbolLayoutProps, SymbolPaintProps} from './symbol_style_layer_properties.g';\nimport type {EvaluationParameters} from '../evaluation_parameters';\nimport type {Expression, Feature, SourceExpression, LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport {FormatSectionOverride} from '../format_section_override';\n\nexport const isSymbolStyleLayer = (layer: StyleLayer): layer is SymbolStyleLayer => layer.type === 'symbol';\n\nexport class SymbolStyleLayer extends StyleLayer {\n _unevaluatedLayout: Layout;\n layout: PossiblyEvaluated;\n\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n\n recalculate(parameters: EvaluationParameters, availableImages: Array) {\n super.recalculate(parameters, availableImages);\n\n if (this.layout.get('icon-rotation-alignment') === 'auto') {\n if (this.layout.get('symbol-placement') !== 'point') {\n this.layout._values['icon-rotation-alignment'] = 'map';\n } else {\n this.layout._values['icon-rotation-alignment'] = 'viewport';\n }\n }\n\n if (this.layout.get('text-rotation-alignment') === 'auto') {\n if (this.layout.get('symbol-placement') !== 'point') {\n this.layout._values['text-rotation-alignment'] = 'map';\n } else {\n this.layout._values['text-rotation-alignment'] = 'viewport';\n }\n }\n\n // If unspecified, `*-pitch-alignment` inherits `*-rotation-alignment`\n if (this.layout.get('text-pitch-alignment') === 'auto') {\n this.layout._values['text-pitch-alignment'] = this.layout.get('text-rotation-alignment') === 'map' ? 'map' : 'viewport';\n }\n if (this.layout.get('icon-pitch-alignment') === 'auto') {\n this.layout._values['icon-pitch-alignment'] = this.layout.get('icon-rotation-alignment');\n }\n\n if (this.layout.get('symbol-placement') === 'point') {\n const writingModes = this.layout.get('text-writing-mode');\n if (writingModes) {\n // remove duplicates, preserving order\n const deduped = [];\n for (const m of writingModes) {\n if (deduped.indexOf(m) < 0) deduped.push(m);\n }\n this.layout._values['text-writing-mode'] = deduped;\n } else {\n this.layout._values['text-writing-mode'] = ['horizontal'];\n }\n }\n\n this._setPaintOverrides();\n }\n\n getValueAndResolveTokens(name: any, feature: Feature, canonical: CanonicalTileID, availableImages: Array) {\n const value = this.layout.get(name).evaluate(feature, {}, canonical, availableImages);\n const unevaluated = this._unevaluatedLayout._values[name];\n if (!unevaluated.isDataDriven() && !isExpression(unevaluated.value) && value) {\n return resolveTokens(feature.properties, value);\n }\n\n return value;\n }\n\n createBucket(parameters: BucketParameters) {\n return new SymbolBucket(parameters);\n }\n\n queryRadius(): number {\n return 0;\n }\n\n queryIntersectsFeature(): boolean {\n throw new Error('Should take a different path in FeatureIndex');\n }\n\n _setPaintOverrides() {\n for (const overridable of properties.paint.overridableProperties) {\n if (!SymbolStyleLayer.hasPaintOverride(this.layout, overridable)) {\n continue;\n }\n const overridden = this.paint.get(overridable as keyof SymbolPaintPropsPossiblyEvaluated) as PossiblyEvaluatedPropertyValue;\n const override = new FormatSectionOverride(overridden);\n const styleExpression = new StyleExpression(override, overridden.property.specification);\n let expression = null;\n if (overridden.value.kind === 'constant' || overridden.value.kind === 'source') {\n expression = new ZoomConstantExpression('source', styleExpression) as SourceExpression;\n } else {\n expression = new ZoomDependentExpression('composite',\n styleExpression,\n overridden.value.zoomStops);\n }\n this.paint._values[overridable] = new PossiblyEvaluatedPropertyValue(overridden.property,\n expression,\n overridden.parameters);\n }\n }\n\n _handleOverridablePaintPropertyUpdate(name: string, oldValue: PropertyValue, newValue: PropertyValue): boolean {\n if (!this.layout || oldValue.isDataDriven() || newValue.isDataDriven()) {\n return false;\n }\n return SymbolStyleLayer.hasPaintOverride(this.layout, name);\n }\n\n static hasPaintOverride(layout: PossiblyEvaluated, propertyName: string): boolean {\n const textField = layout.get('text-field');\n const property = properties.paint.properties[propertyName];\n let hasOverrides = false;\n\n const checkSections = (sections) => {\n for (const section of sections) {\n if (property.overrides && property.overrides.hasOverride(section)) {\n hasOverrides = true;\n return;\n }\n }\n };\n\n if (textField.value.kind === 'constant' && textField.value.value instanceof Formatted) {\n checkSections(textField.value.value.sections);\n } else if (textField.value.kind === 'source' || textField.value.kind === 'composite') {\n\n const checkExpression = (expression: Expression) => {\n if (hasOverrides) return;\n\n if (expression instanceof Literal && typeOf(expression.value) === FormattedType) {\n const formatted: Formatted = (expression.value as any);\n checkSections(formatted.sections);\n } else if (expression instanceof FormatExpression) {\n checkSections(expression.sections);\n } else {\n expression.eachChild(checkExpression);\n }\n };\n\n const expr: ZoomConstantExpression<'source'> = (textField.value as any);\n if (expr._styleExpression) {\n checkExpression(expr._styleExpression.expression);\n }\n }\n\n return hasOverrides;\n }\n}\n\nexport type SymbolPadding = [number, number, number, number];\n\nexport function getIconPadding(layout: PossiblyEvaluated, feature: SymbolFeature, canonical: CanonicalTileID, pixelRatio = 1): SymbolPadding {\n // Support text-padding in addition to icon-padding? Unclear how to apply asymmetric text-padding to the radius for collision circles.\n const result = layout.get('icon-padding').evaluate(feature, {}, canonical);\n const values = result && result.values;\n\n return [\n values[0] * pixelRatio,\n values[1] * pixelRatio,\n values[2] * pixelRatio,\n values[3] * pixelRatio,\n ];\n}\n","/**\n * Replace tokens in a string template with values in an object\n *\n * @param properties - a key/value relationship between tokens and replacements\n * @param text - the template string\n * @returns the template with tokens replaced\n */\nexport function resolveTokens(\n properties: {\n readonly [x: string]: unknown;\n } | null,\n text: string\n): string {\n return text.replace(/{([^{}]+)}/g, (match, key: string) => {\n return properties && key in properties ? String(properties[key]) : '';\n });\n}\n","// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.\n/* eslint-disable */\n\nimport {latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedDataDrivenProperty,\n CrossFadedProperty,\n ColorRampProperty,\n PossiblyEvaluatedPropertyValue,\n CrossFaded\n} from '../properties';\n\nimport type {Color, Formatted, Padding, NumberArray, ColorArray, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';\nimport {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';\n\n\nexport type BackgroundPaintProps = {\n \"background-color\": DataConstantProperty,\n \"background-pattern\": CrossFadedProperty,\n \"background-opacity\": DataConstantProperty,\n};\n\nexport type BackgroundPaintPropsPossiblyEvaluated = {\n \"background-color\": Color,\n \"background-pattern\": CrossFaded,\n \"background-opacity\": number,\n};\n\nlet paint: Properties;\nconst getPaint = () => paint = paint || new Properties({\n \"background-color\": new DataConstantProperty(styleSpec[\"paint_background\"][\"background-color\"] as any as StylePropertySpecification),\n \"background-pattern\": new CrossFadedProperty(styleSpec[\"paint_background\"][\"background-pattern\"] as any as StylePropertySpecification),\n \"background-opacity\": new DataConstantProperty(styleSpec[\"paint_background\"][\"background-opacity\"] as any as StylePropertySpecification),\n});\n\nexport default ({ get paint() { return getPaint() } });","import {StyleLayer} from '../style_layer';\n\nimport properties, {type BackgroundPaintPropsPossiblyEvaluated} from './background_style_layer_properties.g';\nimport {type Transitionable, type Transitioning, type PossiblyEvaluated} from '../properties';\n\nimport type {BackgroundPaintProps} from './background_style_layer_properties.g';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport const isBackgroundStyleLayer = (layer: StyleLayer): layer is BackgroundStyleLayer => layer.type === 'background';\n\nexport class BackgroundStyleLayer extends StyleLayer {\n _transitionablePaint: Transitionable;\n _transitioningPaint: Transitioning;\n paint: PossiblyEvaluated;\n\n constructor(layer: LayerSpecification, globalState: Record) {\n super(layer, properties, globalState);\n }\n}\n","import {StyleLayer} from '../style_layer';\nimport type {Map} from '../../ui/map';\nimport {type mat4} from 'gl-matrix';\nimport {type LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {ProjectionData} from '../../geo/projection/projection_data';\n\n/**\n* Input arguments exposed by custom render function.\n*/\nexport type CustomRenderMethodInput = {\n /**\n * This value represents the distance from the camera to the far clipping plane.\n * It is used in the calculation of the projection matrix to determine which objects are visible.\n * farZ should be larger than nearZ.\n */\n farZ: number;\n /**\n * This value represents the distance from the camera to the near clipping plane.\n * It is used in the calculation of the projection matrix to determine which objects are visible.\n * nearZ should be smaller than farZ.\n */\n nearZ: number;\n /**\n * Vertical field of view in radians.\n */\n fov: number;\n /**\n * model view projection matrix\n * represents the matrix converting from world space to clip space\n * https://learnopengl.com/Getting-started/Coordinate-Systems\n * **/\n modelViewProjectionMatrix: mat4;\n /**\n * projection matrix\n * represents the matrix converting from view space to clip space\n * https://learnopengl.com/Getting-started/Coordinate-Systems\n */\n projectionMatrix: mat4;\n /**\n * Data required for picking and compiling a custom shader for the current projection.\n */\n shaderData: {\n /**\n * Name of the shader variant that should be used.\n * Depends on current projection.\n * Whenever the other shader properties change, this string changes as well,\n * and can be used as a key with which to cache compiled shaders.\n */\n variantName: string;\n /**\n * The prelude code to add to the vertex shader to access MapLibre's `projectTile` projection function.\n * Depends on current projection.\n * @example\n * ```\n * const vertexSource = `#version 300 es\n * ${shaderData.vertexShaderPrelude}\n * ${shaderData.define}\n * in vec2 a_pos;\n * void main() {\n * gl_Position = projectTile(a_pos);\n * }`;\n * ```\n */\n vertexShaderPrelude: string;\n /**\n * Defines to add to the shader code.\n * Depends on current projection.\n * @example\n * ```\n * const vertexSource = `#version 300 es\n * ${shaderData.vertexShaderPrelude}\n * ${shaderData.define}\n * in vec2 a_pos;\n * void main() {\n * gl_Position = projectTile(a_pos);\n * #ifdef GLOBE\n * // Do globe-specific things\n * #endif\n * }`;\n * ```\n */\n define: string;\n };\n /**\n * Uniforms that should be passed to the vertex shader, if MapLibre's projection code is used.\n * For more details of this object's internals, see its doc comments in `src/geo/projection/projection_data.ts`.\n *\n * These uniforms are set so that `projectTile` in shader accepts a vec2 in range 0..1 in web mercator coordinates.\n * Use `map.transform.getProjectionData({overscaledTileID: tileID})` to get uniforms for a given tile and pass vec2 in tile-local range 0..EXTENT instead.\n *\n * For projection 3D features, use `projectTileFor3D` in the shader.\n *\n * If you just need a projection matrix, use `defaultProjectionData.projectionMatrix`.\n * A projection matrix is sufficient for simple custom layers that also only support mercator projection.\n *\n * Under mercator projection, when these uniforms are used, the shader's `projectTile` function projects spherical mercator\n * coordinates to gl clip space coordinates. The spherical mercator coordinate `[0, 0]` represents the\n * top left corner of the mercator world and `[1, 1]` represents the bottom right corner. When\n * the `renderingMode` is `\"3d\"`, the z coordinate is conformal. A box with identical x, y, and z\n * lengths in mercator units would be rendered as a cube. {@link MercatorCoordinate.fromLngLat}\n * can be used to project a `LngLat` to a mercator coordinate.\n *\n * Under globe projection, when these uniforms are used, the `elevation` parameter\n * passed to `projectTileFor3D` in the shader is elevation in meters above \"sea level\",\n * or more accurately for globe, elevation above the surface of the perfect sphere used to render the planet.\n */\n defaultProjectionData: ProjectionData;\n};\n\n/**\n * @param gl - The map's gl context.\n * @param options - Argument object with render inputs like camera properties.\n */\nexport type CustomRenderMethod = (gl: WebGLRenderingContext|WebGL2RenderingContext, options: CustomRenderMethodInput) => void;\n\n/**\n * Interface for custom style layers. This is a specification for\n * implementers to model: it is not an exported method or class.\n *\n * Custom layers allow a user to render directly into the map's GL context using the map's camera.\n * These layers can be added between any regular layers using {@link Map.addLayer}.\n *\n * Custom layers must have a unique `id` and must have the `type` of `\"custom\"`.\n * They must implement `render` and may implement `prerender`, `onAdd` and `onRemove`.\n * They can trigger rendering using {@link Map.triggerRepaint}\n * and they should appropriately handle {@link MapContextEvent} with `webglcontextlost` and `webglcontextrestored`.\n *\n * The `renderingMode` property controls whether the layer is treated as a `\"2d\"` or `\"3d\"` map layer. Use:\n *\n * - `\"renderingMode\": \"3d\"` to use the depth buffer and share it with other layers\n * - `\"renderingMode\": \"2d\"` to add a layer with no depth. If you need to use the depth buffer for a `\"2d\"` layer you must use an offscreen\n * framebuffer and {@link CustomLayerInterface.prerender}\n *\n * @example\n * Custom layer implemented as ES6 class\n * ```ts\n * class NullIslandLayer {\n * constructor() {\n * this.id = 'null-island';\n * this.type = 'custom';\n * this.renderingMode = '2d';\n * }\n *\n * onAdd(map: maplibregl.Map, gl: WebGLRenderingContext | WebGL2RenderingContext) {\n * const vertexSource = `\n * uniform mat4 u_matrix;\n * void main() {\n * gl_Position = u_matrix * vec4(0.5, 0.5, 0.0, 1.0);\n * gl_PointSize = 20.0;\n * }`;\n *\n * const fragmentSource = `\n * void main() {\n * fragColor = vec4(1.0, 0.0, 0.0, 1.0);\n * }`;\n *\n * const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n * gl.shaderSource(vertexShader, vertexSource);\n * gl.compileShader(vertexShader);\n * const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n * gl.shaderSource(fragmentShader, fragmentSource);\n * gl.compileShader(fragmentShader);\n *\n * this.program = gl.createProgram();\n * gl.attachShader(this.program, vertexShader);\n * gl.attachShader(this.program, fragmentShader);\n * gl.linkProgram(this.program);\n * }\n *\n * render({\n * gl,\n * modelViewProjectionMatrix: matrix\n * }: {\n * gl: WebGLRenderingContext | WebGL2RenderingContext;\n * modelViewProjectionMatrix: Float32Array;\n * }) {\n * gl.useProgram(this.program);\n * gl.uniformMatrix4fv(gl.getUniformLocation(this.program, \"u_matrix\"), false, matrix);\n * gl.drawArrays(gl.POINTS, 0, 1);\n * }\n * }\n *\n * map.on('load', () => {\n * map.addLayer(new NullIslandLayer());\n * });\n * ```\n */\nexport interface CustomLayerInterface {\n /**\n * A unique layer id.\n */\n id: string;\n /**\n * The layer's type. Must be `\"custom\"`.\n */\n type: 'custom';\n /**\n * Either `\"2d\"` or `\"3d\"`. Defaults to `\"2d\"`.\n */\n renderingMode?: '2d' | '3d';\n /**\n * Called during a render frame allowing the layer to draw into the GL context.\n *\n * The layer can assume blending and depth state is set to allow the layer to properly\n * blend and clip other layers. The layer cannot make any other assumptions about the\n * current GL state.\n *\n * If the layer needs to render to a texture, it should implement the `prerender` method\n * to do this and only use the `render` method for drawing directly into the main framebuffer.\n *\n * The blend function is set to `gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)`. This expects\n * colors to be provided in premultiplied alpha form where the `r`, `g` and `b` values are already\n * multiplied by the `a` value. If you are unable to provide colors in premultiplied form you\n * may want to change the blend function to\n * `gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA)`.\n */\n render: CustomRenderMethod;\n /**\n * Optional method called during a render frame to allow a layer to prepare resources or render into a texture.\n *\n * The layer cannot make any assumptions about the current GL state and must bind a framebuffer before rendering.\n */\n prerender?: CustomRenderMethod;\n /**\n * Optional method called when the layer has been added to the Map with {@link Map.addLayer}. This\n * gives the layer a chance to initialize gl resources and register event listeners.\n *\n * @param map - The Map this custom layer was just added to.\n * @param gl - The gl context for the map.\n */\n onAdd?(map: Map, gl: WebGLRenderingContext | WebGL2RenderingContext): void;\n /**\n * Optional method called when the layer has been removed from the Map with {@link Map.removeLayer}. This\n * gives the layer a chance to clean up gl resources and event listeners.\n *\n * @param map - The Map this custom layer was just added to.\n * @param gl - The gl context for the map.\n */\n onRemove?(map: Map, gl: WebGLRenderingContext | WebGL2RenderingContext): void;\n}\n\nexport function validateCustomStyleLayer(layerObject: CustomLayerInterface) {\n const errors = [];\n const id = layerObject.id;\n\n if (id === undefined) {\n errors.push({\n message: `layers.${id}: missing required property \"id\"`\n });\n }\n\n if (layerObject.render === undefined) {\n errors.push({\n message: `layers.${id}: missing required method \"render\"`\n });\n }\n\n if (layerObject.renderingMode &&\n layerObject.renderingMode !== '2d' &&\n layerObject.renderingMode !== '3d') {\n errors.push({\n message: `layers.${id}: property \"renderingMode\" must be either \"2d\" or \"3d\"`\n });\n }\n\n return errors;\n}\n\nexport const isCustomStyleLayer = (layer: StyleLayer): layer is CustomStyleLayer => layer.type === 'custom';\n\nexport class CustomStyleLayer extends StyleLayer {\n\n implementation: CustomLayerInterface;\n\n constructor(implementation: CustomLayerInterface, globalState: Record) {\n super(implementation, {}, globalState);\n this.implementation = implementation;\n }\n\n is3D() {\n return this.implementation.renderingMode === '3d';\n }\n\n hasOffscreenPass() {\n return this.implementation.prerender !== undefined;\n }\n\n recalculate() {}\n updateTransitions() {}\n hasTransition() { return false; }\n\n serialize(): LayerSpecification {\n throw new Error('Custom layers cannot be serialized');\n }\n\n onAdd = (map: Map) => {\n if (this.implementation.onAdd) {\n this.implementation.onAdd(map, map.painter.context.gl);\n }\n };\n\n onRemove = (map: Map) => {\n if (this.implementation.onRemove) {\n this.implementation.onRemove(map, map.painter.context.gl);\n }\n };\n}\n","/**\n * Invokes the wrapped function in a non-blocking way when trigger() is called.\n * Invocation requests are ignored until the function was actually invoked.\n */\nexport class ThrottledInvoker {\n _channel: MessageChannel;\n _triggered: boolean;\n _methodToThrottle: Function;\n\n constructor(methodToThrottle: Function) {\n this._methodToThrottle = methodToThrottle;\n this._triggered = false;\n if (typeof MessageChannel !== 'undefined') {\n this._channel = new MessageChannel();\n this._channel.port2.onmessage = () => {\n this._triggered = false;\n this._methodToThrottle();\n };\n }\n }\n\n trigger() {\n if (this._triggered) {\n return;\n }\n this._triggered = true;\n if (this._channel) {\n this._channel.port1.postMessage(true);\n } else {\n setTimeout(() => {\n this._triggered = false;\n this._methodToThrottle();\n }, 0);\n }\n }\n\n remove() {\n delete this._channel;\n this._methodToThrottle = () => {};\n }\n}\n","import {type Subscription, isWorker, subscribe} from './util';\nimport {serialize, deserialize, type Serialized} from './web_worker_transfer';\nimport {ThrottledInvoker} from './throttled_invoker';\n\nimport {\n type MessageType,\n type ActorMessage,\n type RequestResponseMessageMap,\n} from './actor_messages';\n\n/**\n * An interface to be sent to the actor in order for it to allow communication between the worker and the main thread\n */\nexport interface ActorTarget {\n addEventListener: typeof window.addEventListener;\n removeEventListener: typeof window.removeEventListener;\n postMessage: typeof window.postMessage;\n terminate?: () => void;\n}\n\n/**\n * This is used to define the parameters of the message that is sent to the worker and back\n */\ntype MessageData = {\n id: string;\n type: MessageType | '' | '';\n origin: string;\n data?: Serialized;\n targetMapId?: string | number | null;\n mustQueue?: boolean;\n error?: Serialized | null;\n sourceMapId: string | number | null;\n};\n\ntype ResolveReject = {\n resolve: (value?: RequestResponseMessageMap[MessageType][1]) => void;\n reject: (reason?: Error) => void;\n};\n\n/**\n * This interface allowing to substitute only the sendAsync method of the Actor class.\n */\nexport interface IActor {\n sendAsync(message: ActorMessage, abortController?: AbortController): Promise;\n}\n\nexport type MessageHandler = (mapId: string | number, params: RequestResponseMessageMap[T][0], abortController?: AbortController) => Promise;\n\nconst addEventDefaultOptions: AddEventListenerOptions = {once: true};\n\n/**\n * An implementation of the [Actor design pattern](https://en.wikipedia.org/wiki/Actor_model)\n * that maintains the relationship between asynchronous tasks and the objects\n * that spin them off - in this case, tasks like parsing parts of styles,\n * owned by the styles\n */\nexport class Actor implements IActor {\n target: ActorTarget;\n mapId: string | number | null;\n resolveRejects: { [x: string]: ResolveReject};\n name: string;\n tasks: { [x: string]: MessageData };\n taskQueue: Array;\n abortControllers: { [x: number | string]: AbortController };\n invoker: ThrottledInvoker;\n globalScope: ActorTarget;\n messageHandlers: { [x in MessageType]?: MessageHandler};\n subscription: Subscription;\n\n /**\n * @param target - The target\n * @param mapId - A unique identifier for the Map instance using this Actor.\n */\n constructor(target: ActorTarget, mapId?: string | number) {\n this.target = target;\n this.mapId = mapId;\n this.resolveRejects = {};\n this.tasks = {};\n this.taskQueue = [];\n this.abortControllers = {};\n this.messageHandlers = {};\n this.invoker = new ThrottledInvoker(() => this.process());\n this.subscription = subscribe(this.target, 'message', (message) => this.receive(message), false);\n this.globalScope = isWorker(self) ? target : window;\n }\n\n registerMessageHandler(type: T, handler: MessageHandler) {\n this.messageHandlers[type] = handler;\n }\n\n unregisterMessageHandler(type: T) {\n delete this.messageHandlers[type];\n }\n\n /**\n * Sends a message from a main-thread map to a Worker or from a Worker back to\n * a main-thread map instance.\n * @param message - the message to send\n * @param abortController - an optional AbortController to abort the request\n * @returns a promise that will be resolved with the response data\n */\n sendAsync(message: ActorMessage, abortController?: AbortController): Promise {\n return new Promise((resolve, reject) => {\n // We're using a string ID instead of numbers because they are being used as object keys\n // anyway, and thus stringified implicitly. We use random IDs because an actor may receive\n // message from multiple other actors which could run in different execution context. A\n // linearly increasing ID could produce collisions.\n const id = Math.round((Math.random() * 1e18)).toString(36).substring(0, 10);\n\n const subscription = abortController ? subscribe(abortController.signal, 'abort', () => {\n subscription?.unsubscribe();\n delete this.resolveRejects[id];\n const cancelMessage: MessageData = {\n id,\n type: '',\n origin: location.origin,\n targetMapId: message.targetMapId,\n sourceMapId: this.mapId\n };\n this.target.postMessage(cancelMessage);\n // In case of abort the current behavior is to keep the promise pending.\n }, addEventDefaultOptions) : null;\n\n this.resolveRejects[id] = {\n resolve: (value) => {\n subscription?.unsubscribe();\n resolve(value);\n },\n reject: (reason) => {\n subscription?.unsubscribe();\n reject(reason);\n }\n };\n\n const buffers: Array = [];\n const messageToPost: MessageData = {\n ...message,\n id,\n sourceMapId: this.mapId,\n origin: location.origin,\n data: serialize(message.data, buffers)\n };\n this.target.postMessage(messageToPost, {transfer: buffers});\n });\n }\n\n receive(message: {data: MessageData}) {\n const data = message.data;\n const id = data.id;\n if (data.origin !== 'file://' && location.origin !== 'file://' && data.origin !== 'resource://android' && location.origin !== 'resource://android' && data.origin !== location.origin) {\n return;\n }\n if (data.targetMapId && this.mapId !== data.targetMapId) {\n return;\n }\n if (data.type === '') {\n // Remove the original request from the queue. This is only possible if it\n // hasn't been kicked off yet. The id will remain in the queue, but because\n // there is no associated task, it will be dropped once it's time to execute it.\n delete this.tasks[id];\n const abortController = this.abortControllers[id];\n delete this.abortControllers[id];\n if (abortController) {\n abortController.abort();\n }\n return;\n }\n if (isWorker(self) || data.mustQueue) {\n // In workers, store the tasks that we need to process before actually processing them. This\n // is necessary because we want to keep receiving messages, and in particular,\n // messages. Some tasks may take a while in the worker thread, so before\n // executing the next task in our queue, postMessage preempts this and \n // messages can be processed. We're using a MessageChannel object to get throttle the\n // process() flow to one at a time.\n this.tasks[id] = data;\n this.taskQueue.push(id);\n this.invoker.trigger();\n return;\n }\n // In the main thread, process messages immediately so that other work does not slip in\n // between getting partial data back from workers.\n this.processTask(id, data);\n }\n\n process() {\n if (this.taskQueue.length === 0) {\n return;\n }\n const id = this.taskQueue.shift();\n const task = this.tasks[id];\n delete this.tasks[id];\n // Schedule another process call if we know there's more to process _before_ invoking the\n // current task. This is necessary so that processing continues even if the current task\n // doesn't execute successfully.\n if (this.taskQueue.length > 0) {\n this.invoker.trigger();\n }\n if (!task) {\n // If the task ID doesn't have associated task data anymore, it was canceled.\n return;\n }\n\n this.processTask(id, task);\n }\n\n async processTask(id: string, task: MessageData) {\n if (task.type === '') {\n // The `completeTask` function in the counterpart actor has been called, and we are now\n // resolving or rejecting the promise in the originating actor, if there is one.\n const resolveReject = this.resolveRejects[id];\n delete this.resolveRejects[id];\n if (!resolveReject) {\n // If we get a response, but don't have a resolve or reject, the request was canceled.\n return;\n }\n if (task.error) {\n resolveReject.reject(deserialize(task.error) as Error);\n } else {\n resolveReject.resolve(deserialize(task.data));\n }\n return;\n }\n if (!this.messageHandlers[task.type]) {\n this.completeTask(id, new Error(`Could not find a registered handler for ${task.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(', ')}`));\n return;\n }\n const params = deserialize(task.data) as RequestResponseMessageMap[MessageType][0];\n const abortController = new AbortController();\n this.abortControllers[id] = abortController;\n try {\n const data = await this.messageHandlers[task.type](task.sourceMapId, params, abortController);\n this.completeTask(id, null, data);\n } catch (err) {\n this.completeTask(id, err);\n }\n }\n\n completeTask(id: string, err: Error, data?: RequestResponseMessageMap[MessageType][1]) {\n const buffers: Array = [];\n delete this.abortControllers[id];\n const responseMessage: MessageData = {\n id,\n type: '',\n sourceMapId: this.mapId,\n origin: location.origin,\n error: err ? serialize(err) : null,\n data: serialize(data, buffers)\n };\n this.target.postMessage(responseMessage, {transfer: buffers});\n }\n\n remove() {\n this.invoker.remove();\n this.subscription.unsubscribe();\n }\n}\n","import {wrap} from '../util/util';\n\n/*\n* Approximate radius of the earth in meters.\n* Uses the WGS-84 approximation. The radius at the equator is ~6378137 and at the poles is ~6356752. https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84\n* 6371008.8 is one published \"average radius\" see https://en.wikipedia.org/wiki/Earth_radius#Mean_radius, or ftp://athena.fsv.cvut.cz/ZFG/grs80-Moritz.pdf p.4\n*/\nexport const earthRadius = 6371008.8;\n\n/**\n * A {@link LngLat} object, an array of two numbers representing longitude and latitude,\n * or an object with `lng` and `lat` or `lon` and `lat` properties.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let v1 = new LngLat(-122.420679, 37.772537);\n * let v2 = [-122.420679, 37.772537];\n * let v3 = {lon: -122.420679, lat: 37.772537};\n * ```\n */\nexport type LngLatLike = LngLat | {\n lng: number;\n lat: number;\n} | {\n lon: number;\n lat: number;\n} | [number, number];\n\n/**\n * A `LngLat` object represents a given longitude and latitude coordinate, measured in degrees.\n * These coordinates are based on the [WGS84 (EPSG:4326) standard](https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84).\n *\n * MapLibre GL JS uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match the\n * [GeoJSON specification](https://tools.ietf.org/html/rfc7946).\n *\n * Note that any MapLibre GL JS method that accepts a `LngLat` object as an argument or option\n * can also accept an `Array` of two numbers and will perform an implicit conversion.\n * This flexible type is documented as {@link LngLatLike}.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let ll = new LngLat(-123.9749, 40.7736);\n * ll.lng; // = -123.9749\n * ```\n * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/mouse-position/)\n * @see [Display a popup](https://maplibre.org/maplibre-gl-js/docs/examples/popup/)\n * @see [Create a timeline animation](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\n */\nexport class LngLat {\n /**\n * Longitude, measured in degrees.\n */\n lng: number;\n\n /**\n * Latitude, measured in degrees.\n */\n lat: number;\n\n /**\n * @param lng - Longitude, measured in degrees.\n * @param lat - Latitude, measured in degrees.\n */\n constructor(lng: number, lat: number) {\n if (isNaN(lng) || isNaN(lat)) {\n throw new Error(`Invalid LngLat object: (${lng}, ${lat})`);\n }\n this.lng = +lng;\n this.lat = +lat;\n if (this.lat > 90 || this.lat < -90) {\n throw new Error('Invalid LngLat latitude value: must be between -90 and 90');\n }\n }\n\n /**\n * Returns a new `LngLat` object whose longitude is wrapped to the range (-180, 180).\n *\n * @returns The wrapped `LngLat` object.\n * @example\n * ```ts\n * let ll = new LngLat(286.0251, 40.7736);\n * let wrapped = ll.wrap();\n * wrapped.lng; // = -73.9749\n * ```\n */\n wrap() {\n return new LngLat(wrap(this.lng, -180, 180), this.lat);\n }\n\n /**\n * Returns the coordinates represented as an array of two numbers.\n *\n * @returns The coordinates represented as an array of longitude and latitude.\n * @example\n * ```ts\n * let ll = new LngLat(-73.9749, 40.7736);\n * ll.toArray(); // = [-73.9749, 40.7736]\n * ```\n */\n toArray(): [number, number] {\n return [this.lng, this.lat];\n }\n\n /**\n * Returns the coordinates represent as a string.\n *\n * @returns The coordinates represented as a string of the format `'LngLat(lng, lat)'`.\n * @example\n * ```ts\n * let ll = new LngLat(-73.9749, 40.7736);\n * ll.toString(); // = \"LngLat(-73.9749, 40.7736)\"\n * ```\n */\n toString(): string {\n return `LngLat(${this.lng}, ${this.lat})`;\n }\n\n /**\n * Returns the approximate distance between a pair of coordinates in meters\n * Uses the Haversine Formula (from R.W. Sinnott, \"Virtues of the Haversine\", Sky and Telescope, vol. 68, no. 2, 1984, p. 159)\n *\n * @param lngLat - coordinates to compute the distance to\n * @returns Distance in meters between the two coordinates.\n * @example\n * ```ts\n * let new_york = new LngLat(-74.0060, 40.7128);\n * let los_angeles = new LngLat(-118.2437, 34.0522);\n * new_york.distanceTo(los_angeles); // = 3935751.690893987, \"true distance\" using a non-spherical approximation is ~3966km\n * ```\n */\n distanceTo(lngLat: LngLat): number {\n const rad = Math.PI / 180;\n const lat1 = this.lat * rad;\n const lat2 = lngLat.lat * rad;\n const a = Math.sin(lat1) * Math.sin(lat2) + Math.cos(lat1) * Math.cos(lat2) * Math.cos((lngLat.lng - this.lng) * rad);\n\n const maxMeters = earthRadius * Math.acos(Math.min(a, 1));\n return maxMeters;\n }\n\n /**\n * Converts an array of two numbers or an object with `lng` and `lat` or `lon` and `lat` properties\n * to a `LngLat` object.\n *\n * If a `LngLat` object is passed in, the function returns it unchanged.\n *\n * @param input - An array of two numbers or object to convert, or a `LngLat` object to return.\n * @returns A new `LngLat` object, if a conversion occurred, or the original `LngLat` object.\n * @example\n * ```ts\n * let arr = [-73.9749, 40.7736];\n * let ll = LngLat.convert(arr);\n * ll; // = LngLat {lng: -73.9749, lat: 40.7736}\n * ```\n */\n static convert(input: LngLatLike): LngLat {\n if (input instanceof LngLat) {\n return input;\n }\n if (Array.isArray(input) && (input.length === 2 || input.length === 3)) {\n return new LngLat(Number(input[0]), Number(input[1]));\n }\n if (!Array.isArray(input) && typeof input === 'object' && input !== null) {\n return new LngLat(\n // flow can't refine this to have one of lng or lat, so we have to cast to any\n Number('lng' in input ? (input as any).lng : (input as any).lon),\n Number(input.lat)\n );\n }\n throw new Error('`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]');\n }\n}\n","import {LngLat, earthRadius} from '../geo/lng_lat';\nimport type {LngLatLike} from '../geo/lng_lat';\nimport {type IMercatorCoordinate} from '@maplibre/maplibre-gl-style-spec';\n\n/*\n * The average circumference of the world in meters.\n */\nconst earthCircumference = 2 * Math.PI * earthRadius; // meters\n\n/*\n * The circumference at a line of latitude in meters.\n */\nfunction circumferenceAtLatitude(latitude: number) {\n return earthCircumference * Math.cos(latitude * Math.PI / 180);\n}\n\nexport function mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nexport function mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nexport function mercatorZfromAltitude(altitude: number, lat: number) {\n return altitude / circumferenceAtLatitude(lat);\n}\n\nexport function lngFromMercatorX(x: number) {\n return x * 360 - 180;\n}\n\nexport function latFromMercatorY(y: number) {\n const y2 = 180 - y * 360;\n return 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90;\n}\n\nexport function altitudeFromMercatorZ(z: number, y: number) {\n return z * circumferenceAtLatitude(latFromMercatorY(y));\n}\n\n/**\n * Determine the Mercator scale factor for a given latitude, see\n * https://en.wikipedia.org/wiki/Mercator_projection#Scale_factor\n *\n * At the equator the scale factor will be 1, which increases at higher latitudes.\n *\n * @param lat - Latitude\n * @returns scale factor\n */\nexport function mercatorScale(lat: number) {\n return 1 / Math.cos(lat * Math.PI / 180);\n}\n\n/**\n * A `MercatorCoordinate` object represents a projected three dimensional position.\n *\n * `MercatorCoordinate` uses the web mercator projection ([EPSG:3857](https://epsg.io/3857)) with slightly different units:\n *\n * - the size of 1 unit is the width of the projected world instead of the \"mercator meter\"\n * - the origin of the coordinate space is at the north-west corner instead of the middle\n *\n * For example, `MercatorCoordinate(0, 0, 0)` is the north-west corner of the mercator world and\n * `MercatorCoordinate(1, 1, 0)` is the south-east corner. If you are familiar with\n * [vector tiles](https://github.com/mapbox/vector-tile-spec) it may be helpful to think\n * of the coordinate space as the `0/0/0` tile with an extent of `1`.\n *\n * The `z` dimension of `MercatorCoordinate` is conformal. A cube in the mercator coordinate space would be rendered as a cube.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let nullIsland = new MercatorCoordinate(0.5, 0.5, 0);\n * ```\n * @see [Add a custom style layer](https://maplibre.org/maplibre-gl-js/docs/examples/custom-style-layer/)\n */\nexport class MercatorCoordinate implements IMercatorCoordinate {\n x: number;\n y: number;\n z: number;\n\n /**\n * @param x - The x component of the position.\n * @param y - The y component of the position.\n * @param z - The z component of the position.\n */\n constructor(x: number, y: number, z: number = 0) {\n this.x = +x;\n this.y = +y;\n this.z = +z;\n }\n\n /**\n * Project a `LngLat` to a `MercatorCoordinate`.\n *\n * @param lngLatLike - The location to project.\n * @param altitude - The altitude in meters of the position.\n * @returns The projected mercator coordinate.\n * @example\n * ```ts\n * let coord = MercatorCoordinate.fromLngLat({ lng: 0, lat: 0}, 0);\n * coord; // MercatorCoordinate(0.5, 0.5, 0)\n * ```\n */\n static fromLngLat(lngLatLike: LngLatLike, altitude: number = 0): MercatorCoordinate {\n const lngLat = LngLat.convert(lngLatLike);\n\n return new MercatorCoordinate(\n mercatorXfromLng(lngLat.lng),\n mercatorYfromLat(lngLat.lat),\n mercatorZfromAltitude(altitude, lngLat.lat));\n }\n\n /**\n * Returns the `LngLat` for the coordinate.\n *\n * @returns The `LngLat` object.\n * @example\n * ```ts\n * let coord = new MercatorCoordinate(0.5, 0.5, 0);\n * let lngLat = coord.toLngLat(); // LngLat(0, 0)\n * ```\n */\n toLngLat() {\n return new LngLat(\n lngFromMercatorX(this.x),\n latFromMercatorY(this.y));\n }\n\n /**\n * Returns the altitude in meters of the coordinate.\n *\n * @returns The altitude in meters.\n * @example\n * ```ts\n * let coord = new MercatorCoordinate(0, 0, 0.02);\n * coord.toAltitude(); // 6914.281956295339\n * ```\n */\n toAltitude(): number {\n return altitudeFromMercatorZ(this.z, this.y);\n }\n\n /**\n * Returns the distance of 1 meter in `MercatorCoordinate` units at this latitude.\n *\n * For coordinates in real world units using meters, this naturally provides the scale\n * to transform into `MercatorCoordinate`s.\n *\n * @returns Distance of 1 meter in `MercatorCoordinate` units.\n */\n meterInMercatorCoordinateUnits(): number {\n // 1 meter / circumference at equator in meters * Mercator projection scale factor at this latitude\n return 1 / earthCircumference * mercatorScale(latFromMercatorY(this.y));\n }\n}\n","export { getURL, getTileBBox, getMercCoords };\n\n\n/**\n * getURL\n *\n * @param {String} baseUrl Base url of the WMS server\n * @param {String} layer Layer name\n * @param {Number} x Tile coordinate x\n * @param {Number} y Tile coordinate y\n * @param {Number} z Tile zoom\n * @param {Object} [options]\n * @param {String} [options.format='image/png']\n * @param {String} [options.service='WMS']\n * @param {String} [options.version='1.1.1']\n * @param {String} [options.request='GetMap']\n * @param {String} [options.srs='EPSG:3857']\n * @param {Number} [options.width='256']\n * @param {Number} [options.height='256']\n * @returns {String} url\n * @example\n * var baseUrl = 'http://geodata.state.nj.us/imagerywms/Natural2015';\n * var layer = 'Natural2015';\n * var url = whoots.getURL(baseUrl, layer, 154308, 197167, 19);\n */\nfunction getURL(baseUrl, layer, x, y, z, options) {\n options = options || {};\n\n var url = baseUrl + '?' + [\n 'bbox=' + getTileBBox(x, y, z),\n 'format=' + (options.format || 'image/png'),\n 'service=' + (options.service || 'WMS'),\n 'version=' + (options.version || '1.1.1'),\n 'request=' + (options.request || 'GetMap'),\n 'srs=' + (options.srs || 'EPSG:3857'),\n 'width=' + (options.width || 256),\n 'height=' + (options.height || 256),\n 'layers=' + layer\n ].join('&');\n\n return url;\n}\n\n\n/**\n * getTileBBox\n *\n * @param {Number} x Tile coordinate x\n * @param {Number} y Tile coordinate y\n * @param {Number} z Tile zoom\n * @returns {String} String of the bounding box\n */\nfunction getTileBBox(x, y, z) {\n // for Google/OSM tile scheme we need to alter the y\n y = (Math.pow(2, z) - y - 1);\n\n var min = getMercCoords(x * 256, y * 256, z),\n max = getMercCoords((x + 1) * 256, (y + 1) * 256, z);\n\n return min[0] + ',' + min[1] + ',' + max[0] + ',' + max[1];\n}\n\n\n/**\n * getMercCoords\n *\n * @param {Number} x Pixel coordinate x\n * @param {Number} y Pixel coordinate y\n * @param {Number} z Tile zoom\n * @returns {Array} [x, y]\n */\nfunction getMercCoords(x, y, z) {\n var resolution = (2 * Math.PI * 6378137 / 256) / Math.pow(2, z),\n merc_x = (x * resolution - 2 * Math.PI * 6378137 / 2.0),\n merc_y = (y * resolution - 2 * Math.PI * 6378137 / 2.0);\n\n return [merc_x, merc_y];\n}\n","import {getTileBBox} from '@mapbox/whoots-js';\nimport {EXTENT} from '../data/extent';\nimport Point from '@mapbox/point-geometry';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\nimport {register} from '../util/web_worker_transfer';\nimport {type mat4} from 'gl-matrix';\nimport {type ICanonicalTileID, type IMercatorCoordinate} from '@maplibre/maplibre-gl-style-spec';\nimport {MAX_TILE_ZOOM, MIN_TILE_ZOOM} from '../util/util';\nimport {isInBoundsForTileZoomXY} from '../util/world_bounds';\n\n/**\n * A canonical way to define a tile ID\n */\nexport class CanonicalTileID implements ICanonicalTileID {\n z: number;\n x: number;\n y: number;\n key: string;\n\n constructor(z: number, x: number, y: number) {\n\n if (!isInBoundsForTileZoomXY(z, x, y)) {\n throw new Error(`x=${x}, y=${y}, z=${z} outside of bounds. 0<=x<${Math.pow(2, z)}, 0<=y<${Math.pow(2, z)} ${MIN_TILE_ZOOM}<=z<=${MAX_TILE_ZOOM} `);\n }\n\n this.z = z;\n this.x = x;\n this.y = y;\n this.key = calculateTileKey(0, z, z, x, y);\n }\n\n equals(id: ICanonicalTileID) {\n return this.z === id.z && this.x === id.x && this.y === id.y;\n }\n\n /**\n * given a list of urls, choose a url template and return a tile URL\n */\n url(urls: Array, pixelRatio: number, scheme?: string | null) {\n const bbox = getTileBBox(this.x, this.y, this.z);\n const quadkey = getQuadkey(this.z, this.x, this.y);\n\n return urls[(this.x + this.y) % urls.length]\n .replace(/{prefix}/g, (this.x % 16).toString(16) + (this.y % 16).toString(16))\n .replace(/{z}/g, String(this.z))\n .replace(/{x}/g, String(this.x))\n .replace(/{y}/g, String(scheme === 'tms' ? (Math.pow(2, this.z) - this.y - 1) : this.y))\n .replace(/{ratio}/g, pixelRatio > 1 ? '@2x' : '')\n .replace(/{quadkey}/g, quadkey)\n .replace(/{bbox-epsg-3857}/g, bbox);\n }\n\n isChildOf(parent: ICanonicalTileID) {\n const dz = this.z - parent.z;\n return dz > 0 && parent.x === (this.x >> dz) && parent.y === (this.y >> dz);\n }\n\n getTilePoint(coord: IMercatorCoordinate) {\n const tilesAtZoom = Math.pow(2, this.z);\n return new Point(\n (coord.x * tilesAtZoom - this.x) * EXTENT,\n (coord.y * tilesAtZoom - this.y) * EXTENT);\n }\n\n toString() {\n return `${this.z}/${this.x}/${this.y}`;\n }\n}\n\n/**\n * @internal\n * An unwrapped tile identifier\n */\nexport class UnwrappedTileID {\n wrap: number;\n canonical: CanonicalTileID;\n key: string;\n\n constructor(wrap: number, canonical: CanonicalTileID) {\n this.wrap = wrap;\n this.canonical = canonical;\n this.key = calculateTileKey(wrap, canonical.z, canonical.z, canonical.x, canonical.y);\n }\n}\n\n/**\n * An overscaled tile identifier\n */\nexport class OverscaledTileID {\n overscaledZ: number;\n wrap: number;\n canonical: CanonicalTileID;\n key: string;\n /**\n * This matrix is used during terrain's render-to-texture stage only.\n * If the render-to-texture stage is active, this matrix will be present\n * and should be used, otherwise this matrix will be null.\n * The matrix should be float32 in order to avoid slow WebGL calls in Chrome.\n */\n terrainRttPosMatrix32f: mat4 | null = null;\n\n constructor(overscaledZ: number, wrap: number, z: number, x: number, y: number) {\n if (overscaledZ < z) throw new Error(`overscaledZ should be >= z; overscaledZ = ${overscaledZ}; z = ${z}`);\n this.overscaledZ = overscaledZ;\n this.wrap = wrap;\n this.canonical = new CanonicalTileID(z, +x, +y);\n this.key = calculateTileKey(wrap, overscaledZ, z, x, y);\n }\n\n clone() {\n return new OverscaledTileID(this.overscaledZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n\n equals(id: OverscaledTileID) {\n return this.overscaledZ === id.overscaledZ && this.wrap === id.wrap && this.canonical.equals(id.canonical);\n }\n\n /**\n * Returns a new `OverscaledTileID` representing the tile at the target zoom level.\n * When targetZ is greater than the current canonical z, the canonical coordinates are unchanged.\n * When targetZ is less than the current canonical z, the canonical coordinates are updated.\n * @param targetZ - the zoom level to scale to. Must be less than or equal to this.overscaledZ\n * @returns a new OverscaledTileID representing the tile at the target zoom level\n * @throws if targetZ is greater than this.overscaledZ\n */\n scaledTo(targetZ: number) {\n if (targetZ > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${targetZ}; overscaledZ = ${this.overscaledZ}`);\n const zDifference = this.canonical.z - targetZ;\n if (targetZ > this.canonical.z) {\n return new OverscaledTileID(targetZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);\n } else {\n return new OverscaledTileID(targetZ, this.wrap, targetZ, this.canonical.x >> zDifference, this.canonical.y >> zDifference);\n }\n }\n\n isOverscaled() {\n return (this.overscaledZ > this.canonical.z);\n }\n\n /*\n * calculateScaledKey is an optimization:\n * when withWrap == true, implements the same as this.scaledTo(z).key,\n * when withWrap == false, implements the same as this.scaledTo(z).wrapped().key.\n */\n calculateScaledKey(targetZ: number, withWrap: boolean): string {\n if (targetZ > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${targetZ}; overscaledZ = ${this.overscaledZ}`);\n const zDifference = this.canonical.z - targetZ;\n if (targetZ > this.canonical.z) {\n return calculateTileKey(this.wrap * +withWrap, targetZ, this.canonical.z, this.canonical.x, this.canonical.y);\n } else {\n return calculateTileKey(this.wrap * +withWrap, targetZ, targetZ, this.canonical.x >> zDifference, this.canonical.y >> zDifference);\n }\n }\n\n isChildOf(parent: OverscaledTileID): boolean {\n if (parent.wrap !== this.wrap) return false; // different world copy\n\n const zDifference = this.overscaledZ - parent.overscaledZ;\n if (zDifference <= 0) return false; // must be deeper zoom\n\n //special case for root tile (bitwise math doesn't work for root)\n if (parent.overscaledZ === 0) return this.overscaledZ > 0;\n\n const dz = this.canonical.z - parent.canonical.z;\n if (dz < 0) return false; // parent can't be deeper canonically\n\n return (\n parent.canonical.x === (this.canonical.x >> dz) &&\n parent.canonical.y === (this.canonical.y >> dz)\n );\n }\n\n children(sourceMaxZoom: number) {\n if (this.overscaledZ >= sourceMaxZoom) {\n // return a single tile coord representing a an overscaled tile\n return [new OverscaledTileID(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];\n }\n\n const z = this.canonical.z + 1;\n const x = this.canonical.x * 2;\n const y = this.canonical.y * 2;\n return [\n new OverscaledTileID(z, this.wrap, z, x, y),\n new OverscaledTileID(z, this.wrap, z, x + 1, y),\n new OverscaledTileID(z, this.wrap, z, x, y + 1),\n new OverscaledTileID(z, this.wrap, z, x + 1, y + 1)\n ];\n }\n\n isLessThan(rhs: OverscaledTileID) {\n if (this.wrap < rhs.wrap) return true;\n if (this.wrap > rhs.wrap) return false;\n\n if (this.overscaledZ < rhs.overscaledZ) return true;\n if (this.overscaledZ > rhs.overscaledZ) return false;\n\n if (this.canonical.x < rhs.canonical.x) return true;\n if (this.canonical.x > rhs.canonical.x) return false;\n\n if (this.canonical.y < rhs.canonical.y) return true;\n return false;\n }\n\n wrapped() {\n return new OverscaledTileID(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n\n unwrapTo(wrap: number) {\n return new OverscaledTileID(this.overscaledZ, wrap, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n\n overscaleFactor() {\n return Math.pow(2, this.overscaledZ - this.canonical.z);\n }\n\n toUnwrapped() {\n return new UnwrappedTileID(this.wrap, this.canonical);\n }\n\n toString() {\n return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;\n }\n\n getTilePoint(coord: MercatorCoordinate) {\n return this.canonical.getTilePoint(new MercatorCoordinate(coord.x - this.wrap, coord.y));\n }\n}\n\nexport function calculateTileKey(wrap: number, overscaledZ: number, z: number, x: number, y: number): string {\n wrap *= 2;\n if (wrap < 0) wrap = wrap * -1 - 1;\n const dim = 1 << z;\n return (dim * dim * wrap + dim * y + x).toString(36) + z.toString(36) + overscaledZ.toString(36);\n}\n\nfunction getQuadkey(z, x, y) {\n let quadkey = '', mask;\n for (let i = z; i > 0; i--) {\n mask = 1 << (i - 1);\n quadkey += ((x & mask ? 1 : 0) + (y & mask ? 2 : 0));\n }\n return quadkey;\n}\n\nexport function compareTileId(a: OverscaledTileID, b: OverscaledTileID): number {\n // Different copies of the world are sorted based on their distance to the center.\n // Wrap values are converted to unsigned distances by reserving odd number for copies\n // with negative wrap and even numbers for copies with positive wrap.\n const aWrap = Math.abs(a.wrap * 2) - +(a.wrap < 0);\n const bWrap = Math.abs(b.wrap * 2) - +(b.wrap < 0);\n return a.overscaledZ - b.overscaledZ || bWrap - aWrap || b.canonical.y - a.canonical.y || b.canonical.x - a.canonical.x;\n}\n\nregister('CanonicalTileID', CanonicalTileID);\nregister('OverscaledTileID', OverscaledTileID, {omit: ['terrainRttPosMatrix32f']});\n","import {MAX_TILE_ZOOM, MIN_TILE_ZOOM} from './util';\nimport {type LngLat} from '../geo/lng_lat';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\n\n/**\n * Returns true if a given tile zoom (Z), X, and Y are in the bounds of the world.\n * Zoom bounds are the minimum zoom (inclusive) through the maximum zoom (inclusive).\n * X and Y bounds are 0 (inclusive) to their respective zoom-dependent maxima (exclusive).\n *\n * @param zoom - the tile zoom (Z)\n * @param x - the tile X\n * @param y - the tile Y\n * @returns `true` if a given tile zoom, X, and Y are in the bounds of the world.\n */\nexport function isInBoundsForTileZoomXY(zoom: number, x: number, y: number): boolean {\n return !(\n zoom < MIN_TILE_ZOOM ||\n zoom > MAX_TILE_ZOOM ||\n y < 0 ||\n y >= Math.pow(2, zoom) ||\n x < 0 ||\n x >= Math.pow(2, zoom)\n );\n}\n\n/**\n * Returns true if a given zoom and `LngLat` are in the bounds of the world.\n * Does not wrap `LngLat` when checking if in bounds.\n * Zoom bounds are the minimum zoom (inclusive) through the maximum zoom (inclusive).\n * `LngLat` bounds are the mercator world's north-west corner (inclusive) to its south-east corner (exclusive).\n *\n * @param zoom - the tile zoom (Z)\n * @param LngLat - the `LngLat` object containing the longitude and latitude\n * @returns `true` if a given zoom and `LngLat` are in the bounds of the world.\n */\nexport function isInBoundsForZoomLngLat(zoom: number, lnglat: LngLat): boolean {\n const {x, y} = MercatorCoordinate.fromLngLat(lnglat);\n return !(\n zoom < MIN_TILE_ZOOM ||\n zoom > MAX_TILE_ZOOM ||\n y < 0 ||\n y >= 1 ||\n x < 0 ||\n x >= 1\n );\n}\n","/**\n * A way to identify a feature, either by string or by number\n */\nexport type GeoJSONFeatureId = number | string;\n\n/**\n * The geojson source diff object - processed in the following order: remove, add, update. Provides an efficient\n * way to update GeoJSON data in a map source without having to replace the entire dataset.\n */\nexport type GeoJSONSourceDiff = {\n /**\n * When set to `true` it will remove all features\n */\n removeAll?: boolean;\n /**\n * An array of features IDs to remove\n */\n remove?: Array;\n /**\n * An array of features to add\n */\n add?: Array;\n /**\n * An array of update objects\n */\n update?: Array;\n};\n\n/**\n * A geojson feature diff object - processed in the following order: new geometry, remove properties, add/update properties.\n * Provides an efficient way to update GeoJSON features in a map source without replacing the entire feature.\n */\nexport type GeoJSONFeatureDiff = {\n /**\n * The feature ID\n */\n id: GeoJSONFeatureId;\n /**\n * If it's a new geometry, place it here\n */\n newGeometry?: GeoJSON.Geometry;\n /**\n * Setting to `true` will remove all preperties\n */\n removeAllProperties?: boolean;\n /**\n * The properties keys to remove\n */\n removeProperties?: Array;\n /**\n * The properties to add or update along side their values\n */\n addOrUpdateProperties?: Array<{key: string; value: any}>;\n};\n\nexport type UpdateableGeoJSON = GeoJSON.Feature | GeoJSON.FeatureCollection | undefined;\n\nfunction getFeatureId(feature: GeoJSON.Feature, promoteId?: string): GeoJSONFeatureId | undefined {\n return promoteId ? feature.properties[promoteId] : feature.id;\n}\n\n/**\n * Converts a GeoJSON object into a map of feature IDs to GeoJSON features.\n * @param data - The GeoJSON object to convert.\n * @param promoteId - If set, the feature id will be set to the promoteId property value.\n * @returns A map of feature IDs to GeoJSON features, or `undefined` if the GeoJSON object is not a valid updateable object.\n *\n * Features must have unique identifiers to be updateable. IDs can come from:\n * - The feature's `id` property (standard GeoJSON)\n * - A promoted property specified by `promoteId` (e.g., a \"name\" property)\n */\nexport function toUpdateable(data: GeoJSON.GeoJSON | undefined, promoteId?: string): Map | undefined {\n const updateable = new Map();\n\n // null can be updated - empty updateable\n if (data == null) {\n return updateable;\n }\n\n // {} can be updated - empty updateable\n if (data.type == null) {\n return updateable;\n }\n\n // a single feature with an id can be updated, need to explicitly check against null because 0 is a valid feature id that is falsy\n if (data.type === 'Feature') {\n const id = getFeatureId(data, promoteId);\n if (id == null) return undefined;\n\n updateable.set(id, data);\n return updateable;\n }\n\n // a feature collection can be updated if every feature has a unique id, which prevents the silent dropping of features\n if (data.type === 'FeatureCollection') {\n const seenIds = new Set();\n\n for (const feature of data.features) {\n const id = getFeatureId(feature, promoteId);\n if (id == null) return undefined;\n\n if (seenIds.has(id)) return undefined;\n seenIds.add(id);\n\n updateable.set(id, feature);\n }\n\n return updateable;\n }\n\n return undefined;\n}\n\n/**\n * Mutates updateable and applies a {@link GeoJSONSourceDiff}. Operations are processed in a specific order to ensure predictable behavior:\n * 1. Remove operations (removeAll, remove)\n * 2. Add operations (add)\n * 3. Update operations (update)\n * @returns an array of geometries that were affected by the diff - with the exception of removeAll which does not track any affected geometries.\n */\nexport function applySourceDiff(updateable: Map, diff: GeoJSONSourceDiff, promoteId?: string): GeoJSON.Geometry[] {\n const affectedGeometries: GeoJSON.Geometry[] = [];\n\n if (diff.removeAll) {\n updateable.clear();\n }\n else if (diff.remove) {\n for (const id of diff.remove) {\n const existing = updateable.get(id);\n if (!existing) continue;\n\n affectedGeometries.push(existing.geometry);\n updateable.delete(id);\n }\n }\n\n if (diff.add) {\n for (const feature of diff.add) {\n const id = getFeatureId(feature, promoteId);\n if (id == null) continue;\n\n const existing = updateable.get(id);\n if (existing) affectedGeometries.push(existing.geometry);\n\n affectedGeometries.push(feature.geometry);\n updateable.set(id, feature);\n }\n }\n\n if (diff.update) {\n for (const update of diff.update) {\n const existing = updateable.get(update.id);\n if (!existing) continue;\n\n const changeGeometry = !!update.newGeometry;\n\n const changeProps =\n update.removeAllProperties ||\n update.removeProperties?.length > 0 ||\n update.addOrUpdateProperties?.length > 0;\n\n // nothing to do\n if (!changeGeometry && !changeProps) continue;\n\n // clone once since we'll mutate\n affectedGeometries.push(existing.geometry);\n const feature = {...existing};\n updateable.set(update.id, feature);\n\n if (changeGeometry) {\n affectedGeometries.push(update.newGeometry);\n feature.geometry = update.newGeometry;\n }\n\n if (changeProps) {\n if (update.removeAllProperties) {\n feature.properties = {};\n } else {\n feature.properties = {...feature.properties || {}};\n }\n\n if (update.removeProperties) {\n for (const key of update.removeProperties) {\n delete feature.properties[key];\n }\n }\n\n if (update.addOrUpdateProperties) {\n for (const {key, value} of update.addOrUpdateProperties) {\n feature.properties[key] = value;\n }\n }\n }\n }\n }\n\n return affectedGeometries;\n}\n\n/**\n * Merge two GeoJSONSourceDiffs, considering the order of operations as specified above (remove, add, update).\n *\n * For `add` features that use promoteId, the feature id will be set to the promoteId value temporarily so that\n * the merge can be completed, then reverted to the original promoteId state after the merge.\n */\nexport function mergeSourceDiffs(\n prevDiff: GeoJSONSourceDiff | undefined,\n nextDiff: GeoJSONSourceDiff | undefined,\n promoteId?: string\n): GeoJSONSourceDiff {\n if (!prevDiff) return nextDiff || {};\n if (!nextDiff) return prevDiff || {};\n\n if (promoteId) {\n // Temporarily normalize diff.add for features using promoteId\n promoteFeatureIds(prevDiff.add, promoteId);\n promoteFeatureIds(nextDiff.add, promoteId);\n }\n\n // Hash for o(1) lookups while creating a mutatable copy of the collections\n const prev = diffToHashed(prevDiff);\n const next = diffToHashed(nextDiff);\n\n // Resolve merge conflicts\n resolveMergeConflicts(prev, next);\n\n // Simply merge the two diffs now that conflicts have been resolved\n const merged: GeoJSONSourceDiffHashed = {};\n if (prev.removeAll || next.removeAll) merged.removeAll = true;\n merged.remove = new Set([...prev.remove , ...next.remove]);\n merged.add = new Map([...prev.add , ...next.add]);\n merged.update = new Map([...prev.update , ...next.update]);\n\n // Squash the merge - removing then adding the same feature\n if (merged.remove.size && merged.add.size) {\n for (const id of merged.add.keys()) {\n merged.remove.delete(id);\n }\n }\n\n // Convert back to array-based representation\n const mergedDiff = hashedToDiff(merged);\n\n if (promoteId) {\n // Revert diff.add for features using promoteId\n demoteFeatureIds(mergedDiff.add, promoteId);\n }\n\n return mergedDiff;\n}\n\n/**\n * Resolve merge conflicts between two GeoJSONSourceDiffs considering the ordering above (remove/add/update).\n *\n * - If you `removeAll` and then `add` features in the same diff, the added features will be kept.\n * - Updates only apply to features that exist after removes and adds have been processed.\n */\nfunction resolveMergeConflicts(prev: GeoJSONSourceDiffHashed, next: GeoJSONSourceDiffHashed) {\n // Removing all features with added or updated features in previous - and clear no-op removes\n if (next.removeAll) {\n prev.add.clear();\n prev.update.clear();\n prev.remove.clear();\n next.remove.clear();\n }\n\n // Removing features that were added or updated in previous\n for (const id of next.remove) {\n prev.add.delete(id);\n prev.update.delete(id);\n }\n\n // Updating features that were updated in previous\n for (const [id, nextUpdate] of next.update) {\n const prevUpdate = prev.update.get(id);\n if (!prevUpdate) continue;\n\n next.update.set(id, mergeFeatureDiffs(prevUpdate, nextUpdate));\n prev.update.delete(id);\n }\n}\n\n/**\n * Merge two feature diffs for the same feature id, considering the order of operations as specified above (remove, add/update).\n */\nfunction mergeFeatureDiffs(prev: GeoJSONFeatureDiff, next: GeoJSONFeatureDiff): GeoJSONFeatureDiff {\n const merged: GeoJSONFeatureDiff = {id: prev.id};\n\n // Removing all properties with added or updated properties in previous - and clear no-op removes\n if (next.removeAllProperties) {\n delete prev.removeProperties;\n delete prev.addOrUpdateProperties;\n delete next.removeProperties;\n }\n // Removing properties that were added or updated in previous\n if (next.removeProperties) {\n for (const key of next.removeProperties) {\n const index = prev.addOrUpdateProperties.findIndex(prop => prop.key === key);\n if (index > -1) prev.addOrUpdateProperties.splice(index, 1);\n }\n }\n\n // Merge the two diffs\n if (prev.removeAllProperties || next.removeAllProperties) {\n merged.removeAllProperties = true;\n }\n if (prev.removeProperties || next.removeProperties) {\n merged.removeProperties = [...prev.removeProperties || [], ...next.removeProperties || []];\n }\n if (prev.addOrUpdateProperties || next.addOrUpdateProperties) {\n merged.addOrUpdateProperties = [...prev.addOrUpdateProperties || [], ...next.addOrUpdateProperties || []];\n }\n if (prev.newGeometry || next.newGeometry) {\n merged.newGeometry = next.newGeometry || prev.newGeometry;\n }\n\n return merged;\n}\n\n/**\n * Mutates diff.add and applies a feature id using the promoteId property\n */\nfunction promoteFeatureIds(add: Array, promoteId: string) {\n if (!add) return;\n\n for (const feature of add) {\n const id = getFeatureId(feature, promoteId);\n if (id != null) feature.id = id;\n }\n}\n\n/**\n * Mutates diff.add and removes the feature id if using the promoteId property\n */\nfunction demoteFeatureIds(add: Array, promoteId: string) {\n if (!add) return;\n\n for (const feature of add) {\n const id = getFeatureId(feature, promoteId);\n if (id != null) delete feature.id;\n }\n}\n\n/**\n * @internal\n * Internal representation of GeoJSONSourceDiff using Sets and Maps for efficient operations\n */\ntype GeoJSONSourceDiffHashed = {\n removeAll?: boolean;\n remove?: Set;\n add?: Map;\n update?: Map;\n};\n\n/**\n * @internal\n * Convert a GeoJSONSourceDiff to an idempotent hashed representation using Sets and Maps\n */\nfunction diffToHashed(diff: GeoJSONSourceDiff | undefined): GeoJSONSourceDiffHashed {\n if (!diff) return {};\n\n const hashed: GeoJSONSourceDiffHashed = {};\n\n hashed.removeAll = diff.removeAll;\n hashed.remove = new Set(diff.remove || []);\n hashed.add = new Map(diff.add?.map(feature => [feature.id, feature]));\n hashed.update = new Map(diff.update?.map(update => [update.id, update]));\n\n return hashed;\n}\n\n/**\n * @internal\n * Convert a hashed GeoJSONSourceDiff back to the array-based representation\n */\nfunction hashedToDiff(hashed: GeoJSONSourceDiffHashed): GeoJSONSourceDiff {\n const diff: GeoJSONSourceDiff = {};\n\n if (hashed.removeAll) {\n diff.removeAll = hashed.removeAll;\n }\n if (hashed.remove) {\n diff.remove = Array.from(hashed.remove);\n }\n if (hashed.add) {\n diff.add = Array.from(hashed.add.values());\n }\n if (hashed.update) {\n diff.update = Array.from(hashed.update.values());\n }\n\n return diff;\n}\n","import Point from '@mapbox/point-geometry';\nimport {type Point2D} from '@maplibre/maplibre-gl-style-spec';\n\nexport interface ReadOnlyBounds {\n readonly minX: number;\n readonly maxX: number;\n readonly minY: number;\n readonly maxY: number;\n\n /**\n * Returns whether this bounding box contains a point\n * \n * @param point - The point to check\n * @returns True if this bounding box contains point, false otherwise.\n */\n contains(point: Point2D): boolean;\n\n /**\n * Returns true if this bounding box contains no points\n * \n * @returns True if this bounding box contains no points.\n */\n empty(): boolean;\n\n /**\n * Returns the width of this bounding box.\n * \n * @returns `maxX - minX`.\n */\n width(): number;\n\n /**\n * Returns the height of this bounding box.\n * \n * @returns `maxY - minY`.\n */\n height(): number;\n\n /**\n * Returns true if this bounding box completely covers `other`.\n * \n * @param other - The other bounding box\n * @returns True if this bounding box completely encloses `other`\n */\n covers(other: ReadOnlyBounds): boolean;\n\n /**\n * Returns true if this bounding box touches any part of `other`.\n * \n * @param other - The other bounding box\n * @returns True if this bounding box touches any part of `other`.\n */\n intersects(other: ReadOnlyBounds): boolean;\n}\n\n/** A 2-d bounding box covering an X and Y range. */\nexport class Bounds implements ReadOnlyBounds {\n minX: number = Infinity;\n maxX: number = -Infinity;\n minY: number = Infinity;\n maxY: number = -Infinity;\n\n /**\n * Expands this bounding box to include point.\n * \n * @param point - The point to include in this bounding box\n * @returns This mutated bounding box\n */\n extend(point: Point2D): this {\n this.minX = Math.min(this.minX, point.x);\n this.minY = Math.min(this.minY, point.y);\n this.maxX = Math.max(this.maxX, point.x);\n this.maxY = Math.max(this.maxY, point.y);\n return this;\n }\n\n /**\n * Expands this bounding box by a fixed amount in each direction.\n * \n * @param amount - The amount to expand the box by, or contract if negative\n * @returns This mutated bounding box\n */\n expandBy(amount: number): this {\n this.minX -= amount;\n this.minY -= amount;\n this.maxX += amount;\n this.maxY += amount;\n // check if bounds collapsed in either dimension\n if (this.minX > this.maxX || this.minY > this.maxY) {\n this.minX = Infinity;\n this.maxX = -Infinity;\n this.minY = Infinity;\n this.maxY = -Infinity;\n }\n return this;\n }\n\n /**\n * Shrinks this bounding box by a fixed amount in each direction.\n * \n * @param amount - The amount to shrink the box by\n * @returns This mutated bounding box\n */\n shrinkBy(amount: number): this {\n return this.expandBy(-amount);\n }\n\n /**\n * Returns a new bounding box that contains all of the corners of this bounding\n * box with a transform applied. Does not modify this bounding box.\n * \n * @param fn - The function to apply to each corner\n * @returns A new bounding box containing all of the mapped points.\n */\n map(fn: (point: Point2D) => Point2D) {\n const result = new Bounds();\n result.extend(fn(new Point(this.minX, this.minY)));\n result.extend(fn(new Point(this.maxX, this.minY)));\n result.extend(fn(new Point(this.minX, this.maxY)));\n result.extend(fn(new Point(this.maxX, this.maxY)));\n return result;\n }\n\n /**\n * Creates a new bounding box that includes all points provided.\n * \n * @param points - The points to include inside the bounding box\n * @returns The new bounding box\n */\n static fromPoints(points: Point2D[]): Bounds {\n const result = new Bounds();\n for (const p of points) {\n result.extend(p);\n }\n return result;\n }\n\n contains(point: Point2D): boolean {\n return point.x >= this.minX && point.x <= this.maxX && point.y >= this.minY && point.y <= this.maxY;\n }\n\n empty(): boolean {\n return this.minX > this.maxX;\n }\n\n width(): number {\n return this.maxX - this.minX;\n }\n\n height(): number {\n return this.maxY - this.minY;\n }\n\n covers(other: ReadOnlyBounds) {\n return !this.empty() && !other.empty() &&\n other.minX >= this.minX &&\n other.maxX <= this.maxX &&\n other.minY >= this.minY &&\n other.maxY <= this.maxY;\n }\n\n intersects(other: ReadOnlyBounds) {\n return !this.empty() && !other.empty() &&\n other.minX <= this.maxX &&\n other.maxX >= this.minX &&\n other.minY <= this.maxY &&\n other.maxY >= this.minY;\n }\n}\n","export class DictionaryCoder {\n _stringToNumber: {[_: string]: number};\n _numberToString: Array;\n\n constructor(strings: Array) {\n this._stringToNumber = {};\n this._numberToString = [];\n for (let i = 0; i < strings.length; i++) {\n const string = strings[i];\n this._stringToNumber[string] = i;\n this._numberToString[i] = string;\n }\n }\n\n encode(string: string) {\n return this._stringToNumber[string];\n }\n\n decode(n: number) {\n if (n >= this._numberToString.length) throw new Error(`Out of bounds. Index requested n=${n} can't be >= this._numberToString.length ${this._numberToString.length}`);\n return this._numberToString[n];\n }\n}\n","import type Point from '@mapbox/point-geometry';\nimport {classifyRings} from '@mapbox/vector-tile';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {VectorTileFeatureLike} from '@maplibre/vt-pbf';\n\n/**\n * A helper for type to omit a property from a type\n */\nexport type DistributiveKeys = T extends T ? keyof T : never;\n/**\n * A helper for type to omit a property from a type\n */\nexport type DistributiveOmit> = T extends unknown\n ? Omit\n : never;\n\n/**\n * An extended geojson feature used by the events to return data to the listener\n */\nexport type MapGeoJSONFeature = GeoJSONFeature & {\n layer: DistributiveOmit & {source: string};\n source: string;\n sourceLayer?: string;\n state: { [key: string]: any };\n};\n\n/**\n * A geojson feature\n */\nexport class GeoJSONFeature {\n type: 'Feature';\n _geometry: GeoJSON.Geometry;\n properties: { [name: string]: any };\n id: number | string | undefined;\n _x: number;\n _y: number;\n _z: number;\n\n _vectorTileFeature: VectorTileFeatureLike;\n\n constructor(vectorTileFeature: VectorTileFeatureLike, z: number, x: number, y: number, id: string | number | undefined) {\n this.type = 'Feature';\n this._vectorTileFeature = vectorTileFeature;\n this._x = x;\n this._y = y;\n this._z = z;\n\n this.properties = vectorTileFeature.properties;\n this.id = id;\n }\n\n private projectPoint(p: Point, x0: number, y0: number, size: number): [number, number] {\n return [\n (p.x + x0) * 360 / size - 180,\n 360 / Math.PI * Math.atan(Math.exp((1 - (p.y + y0) * 2 / size) * Math.PI)) - 90\n ];\n }\n\n private projectLine(line: Point[], x0: number, y0: number, size: number) {\n return line.map(p => this.projectPoint(p, x0, y0, size));\n }\n\n get geometry(): GeoJSON.Geometry {\n if (this._geometry) return this._geometry;\n\n const feature = this._vectorTileFeature;\n\n // Copied from https://github.com/mapbox/vector-tile-js/blob/f1457ee47d0a261e6246d68c959fbd12bf56aeeb/index.js\n const size = feature.extent * Math.pow(2, this._z);\n const x0 = feature.extent * this._x;\n const y0 = feature.extent * this._y;\n const vtCoords = feature.loadGeometry();\n\n switch (feature.type) {\n case 1: {\n const points = [];\n for (const line of vtCoords) {\n points.push(line[0]);\n }\n const coordinates = this.projectLine(points, x0, y0, size);\n this._geometry = points.length === 1 ?\n {type: 'Point', coordinates: coordinates[0]} :\n {type: 'MultiPoint', coordinates};\n break;\n }\n case 2: {\n const coordinates = vtCoords.map(coord => this.projectLine(coord, x0, y0, size));\n this._geometry = coordinates.length === 1 ?\n {type: 'LineString', coordinates: coordinates[0]} :\n {type: 'MultiLineString', coordinates};\n break;\n }\n case 3: {\n const polygons = classifyRings(vtCoords);\n const coordinates = [];\n for (const polygon of polygons) {\n coordinates.push(polygon.map(coord => this.projectLine(coord, x0, y0, size)));\n }\n this._geometry = coordinates.length === 1 ?\n {type: 'Polygon', coordinates: coordinates[0]} :\n {type: 'MultiPolygon', coordinates};\n break;\n }\n default:\n throw new Error(`unknown feature type: ${feature.type}`);\n }\n\n return this._geometry;\n }\n\n set geometry(g: GeoJSON.Geometry) {\n this._geometry = g;\n }\n\n toJSON() {\n const json: any = {\n geometry: this.geometry\n };\n for (const i in this) {\n if (i === '_geometry' || i === '_vectorTileFeature' || i === '_x' || i === '_y' || i === '_z') continue;\n json[i] = (this)[i];\n }\n return json;\n }\n}\n","export default class Vector {\n _name;\n dataBuffer;\n nullabilityBuffer;\n _size;\n constructor(_name, dataBuffer, sizeOrNullabilityBuffer) {\n this._name = _name;\n this.dataBuffer = dataBuffer;\n if (typeof sizeOrNullabilityBuffer === \"number\") {\n this._size = sizeOrNullabilityBuffer;\n }\n else {\n this.nullabilityBuffer = sizeOrNullabilityBuffer;\n this._size = sizeOrNullabilityBuffer.size();\n }\n }\n getValue(index) {\n return this.nullabilityBuffer && !this.nullabilityBuffer.get(index) ? null : this.getValueFromBuffer(index);\n }\n has(index) {\n return (this.nullabilityBuffer && this.nullabilityBuffer.get(index)) || !this.nullabilityBuffer;\n }\n get name() {\n return this._name;\n }\n get size() {\n return this._size;\n }\n}\n//# sourceMappingURL=vector.js.map","import Vector from \"./vector\";\nexport class FixedSizeVector extends Vector {\n}\n//# sourceMappingURL=fixedSizeVector.js.map","import { FixedSizeVector } from \"../fixedSizeVector\";\nexport class IntFlatVector extends FixedSizeVector {\n getValueFromBuffer(index) {\n return this.dataBuffer[index];\n }\n}\n//# sourceMappingURL=intFlatVector.js.map","import { FixedSizeVector } from \"../fixedSizeVector\";\nexport class DoubleFlatVector extends FixedSizeVector {\n getValueFromBuffer(index) {\n return this.dataBuffer[index];\n }\n}\n//# sourceMappingURL=doubleFlatVector.js.map","import Vector from \"../vector\";\nexport class SequenceVector extends Vector {\n delta;\n constructor(name, baseValueBuffer, delta, size) {\n super(name, baseValueBuffer, size);\n this.delta = delta;\n }\n}\n//# sourceMappingURL=sequenceVector.js.map","import { SequenceVector } from \"./sequenceVector\";\nexport class IntSequenceVector extends SequenceVector {\n constructor(name, baseValue, delta, size) {\n super(name, Int32Array.of(baseValue), delta, size);\n }\n getValueFromBuffer(index) {\n return this.dataBuffer[0] + index * this.delta;\n }\n}\n//# sourceMappingURL=intSequenceVector.js.map","import Vector from \"../vector\";\nexport class IntConstVector extends Vector {\n constructor(name, value, sizeOrNullabilityBuffer) {\n super(name, Int32Array.of(value), sizeOrNullabilityBuffer);\n }\n getValueFromBuffer(index) {\n return this.dataBuffer[0];\n }\n}\n//# sourceMappingURL=intConstVector.js.map","import { IntFlatVector } from \"./flat/intFlatVector\";\nimport { DoubleFlatVector } from \"./flat/doubleFlatVector\";\nimport { IntSequenceVector } from \"./sequence/intSequenceVector\";\nimport { IntConstVector } from \"./constant/intConstVector\";\nexport default class FeatureTable {\n _name;\n _geometryVector;\n _idVector;\n _propertyVectors;\n _extent;\n propertyVectorsMap;\n constructor(_name, _geometryVector, _idVector, _propertyVectors, _extent = 4096) {\n this._name = _name;\n this._geometryVector = _geometryVector;\n this._idVector = _idVector;\n this._propertyVectors = _propertyVectors;\n this._extent = _extent;\n }\n get name() {\n return this._name;\n }\n get idVector() {\n return this._idVector;\n }\n get geometryVector() {\n return this._geometryVector;\n }\n get propertyVectors() {\n return this._propertyVectors;\n }\n getPropertyVector(name) {\n if (!this.propertyVectorsMap) {\n this.propertyVectorsMap = new Map(this._propertyVectors.map((vector) => [vector.name, vector]));\n }\n return this.propertyVectorsMap.get(name);\n }\n *[Symbol.iterator]() {\n const geometryIterator = this.geometryVector[Symbol.iterator]();\n let index = 0;\n while (index < this.numFeatures) {\n let id;\n if (this.idVector) {\n id = this.containsMaxSaveIntegerValues(this.idVector)\n ? Number(this.idVector.getValue(index))\n : this.idVector.getValue(index);\n }\n const geometry = geometryIterator?.next().value;\n const properties = {};\n for (const propertyColumn of this.propertyVectors) {\n if (!propertyColumn) {\n continue;\n }\n const columnName = propertyColumn.name;\n const propertyValue = propertyColumn.getValue(index);\n if (propertyValue !== null) {\n properties[columnName] = propertyValue;\n }\n }\n index++;\n yield { id, geometry, properties };\n }\n }\n get numFeatures() {\n return this.geometryVector.numGeometries;\n }\n get extent() {\n return this._extent;\n }\n /**\n * Returns all features as an array\n */\n getFeatures() {\n const features = [];\n const geometries = this.geometryVector.getGeometries();\n for (let i = 0; i < this.numFeatures; i++) {\n let id;\n if (this.idVector) {\n id = this.containsMaxSaveIntegerValues(this.idVector)\n ? Number(this.idVector.getValue(i))\n : this.idVector.getValue(i);\n }\n const geometry = {\n coordinates: geometries[i],\n type: this.geometryVector.geometryType(i),\n };\n const properties = {};\n for (const propertyColumn of this.propertyVectors) {\n if (!propertyColumn)\n continue;\n const columnName = propertyColumn.name;\n const propertyValue = propertyColumn.getValue(i);\n if (propertyValue !== null) {\n properties[columnName] = propertyValue;\n }\n }\n features.push({ id, geometry, properties });\n }\n return features;\n }\n containsMaxSaveIntegerValues(intVector) {\n return (intVector instanceof IntFlatVector ||\n (intVector instanceof IntConstVector && intVector instanceof IntSequenceVector) ||\n intVector instanceof DoubleFlatVector);\n }\n}\n//# sourceMappingURL=featureTable.js.map","// Ported from https://github.com/lemire/JavaFastPFOR/blob/master/src/main/java/me/lemire/integercompression/IntWrapper.java\nexport default class IntWrapper {\n value;\n constructor(value) {\n this.value = value;\n }\n get() {\n return this.value;\n }\n set(v) {\n this.value = v;\n }\n increment() {\n return this.value++;\n }\n add(v) {\n this.value += v;\n }\n}\n//# sourceMappingURL=intWrapper.js.map","export var LogicalLevelTechnique;\n(function (LogicalLevelTechnique) {\n LogicalLevelTechnique[\"NONE\"] = \"NONE\";\n LogicalLevelTechnique[\"DELTA\"] = \"DELTA\";\n LogicalLevelTechnique[\"COMPONENTWISE_DELTA\"] = \"COMPONENTWISE_DELTA\";\n LogicalLevelTechnique[\"RLE\"] = \"RLE\";\n LogicalLevelTechnique[\"MORTON\"] = \"MORTON\";\n // Pseudodecimal Encoding of floats -> only for the exponent integer part an additional logical level technique is used.\n // Both exponent and significant parts are encoded with the same physical level technique\n LogicalLevelTechnique[\"PDE\"] = \"PDE\";\n})(LogicalLevelTechnique || (LogicalLevelTechnique = {}));\n//# sourceMappingURL=logicalLevelTechnique.js.map","export var PhysicalLevelTechnique;\n(function (PhysicalLevelTechnique) {\n PhysicalLevelTechnique[\"NONE\"] = \"NONE\";\n /**\n * Preferred option, tends to produce the best compression ratio and decoding performance.\n * But currently only limited to 32 bit integer.\n */\n PhysicalLevelTechnique[\"FAST_PFOR\"] = \"FAST_PFOR\";\n /**\n * Can produce better results in combination with a heavyweight compression scheme like Gzip.\n * Simple compression scheme where the decoder are easier to implement compared to FastPfor.\n */\n PhysicalLevelTechnique[\"VARINT\"] = \"VARINT\";\n /**\n * Adaptive Lossless floating-Point Compression\n */\n PhysicalLevelTechnique[\"ALP\"] = \"ALP\";\n})(PhysicalLevelTechnique || (PhysicalLevelTechnique = {}));\n//# sourceMappingURL=physicalLevelTechnique.js.map","export var PhysicalStreamType;\n(function (PhysicalStreamType) {\n PhysicalStreamType[\"PRESENT\"] = \"PRESENT\";\n PhysicalStreamType[\"DATA\"] = \"DATA\";\n PhysicalStreamType[\"OFFSET\"] = \"OFFSET\";\n PhysicalStreamType[\"LENGTH\"] = \"LENGTH\";\n})(PhysicalStreamType || (PhysicalStreamType = {}));\n//# sourceMappingURL=physicalStreamType.js.map","export var DictionaryType;\n(function (DictionaryType) {\n DictionaryType[\"NONE\"] = \"NONE\";\n DictionaryType[\"SINGLE\"] = \"SINGLE\";\n DictionaryType[\"SHARED\"] = \"SHARED\";\n DictionaryType[\"VERTEX\"] = \"VERTEX\";\n DictionaryType[\"MORTON\"] = \"MORTON\";\n DictionaryType[\"FSST\"] = \"FSST\";\n})(DictionaryType || (DictionaryType = {}));\n//# sourceMappingURL=dictionaryType.js.map","export var OffsetType;\n(function (OffsetType) {\n OffsetType[\"VERTEX\"] = \"VERTEX\";\n OffsetType[\"INDEX\"] = \"INDEX\";\n OffsetType[\"STRING\"] = \"STRING\";\n OffsetType[\"KEY\"] = \"KEY\";\n})(OffsetType || (OffsetType = {}));\n//# sourceMappingURL=offsetType.js.map","export var LengthType;\n(function (LengthType) {\n LengthType[\"VAR_BINARY\"] = \"VAR_BINARY\";\n LengthType[\"GEOMETRIES\"] = \"GEOMETRIES\";\n LengthType[\"PARTS\"] = \"PARTS\";\n LengthType[\"RINGS\"] = \"RINGS\";\n LengthType[\"TRIANGLES\"] = \"TRIANGLES\";\n LengthType[\"SYMBOL\"] = \"SYMBOL\";\n LengthType[\"DICTIONARY\"] = \"DICTIONARY\";\n})(LengthType || (LengthType = {}));\n//# sourceMappingURL=lengthType.js.map","export var VectorType;\n(function (VectorType) {\n VectorType[VectorType[\"FLAT\"] = 0] = \"FLAT\";\n VectorType[VectorType[\"CONST\"] = 1] = \"CONST\";\n VectorType[VectorType[\"SEQUENCE\"] = 2] = \"SEQUENCE\";\n VectorType[VectorType[\"DICTIONARY\"] = 3] = \"DICTIONARY\";\n VectorType[VectorType[\"FSST_DICTIONARY\"] = 4] = \"FSST_DICTIONARY\";\n})(VectorType || (VectorType = {}));\n//# sourceMappingURL=vectorType.js.map","export var GEOMETRY_TYPE;\n(function (GEOMETRY_TYPE) {\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"POINT\"] = 0] = \"POINT\";\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"LINESTRING\"] = 1] = \"LINESTRING\";\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"POLYGON\"] = 2] = \"POLYGON\";\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"MULTIPOINT\"] = 3] = \"MULTIPOINT\";\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"MULTILINESTRING\"] = 4] = \"MULTILINESTRING\";\n GEOMETRY_TYPE[GEOMETRY_TYPE[\"MULTIPOLYGON\"] = 5] = \"MULTIPOLYGON\";\n})(GEOMETRY_TYPE || (GEOMETRY_TYPE = {}));\nexport var SINGLE_PART_GEOMETRY_TYPE;\n(function (SINGLE_PART_GEOMETRY_TYPE) {\n SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE[\"POINT\"] = 0] = \"POINT\";\n SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE[\"LINESTRING\"] = 1] = \"LINESTRING\";\n SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE[\"POLYGON\"] = 2] = \"POLYGON\";\n})(SINGLE_PART_GEOMETRY_TYPE || (SINGLE_PART_GEOMETRY_TYPE = {}));\n//# sourceMappingURL=geometryType.js.map","export var VertexBufferType;\n(function (VertexBufferType) {\n VertexBufferType[VertexBufferType[\"MORTON\"] = 0] = \"MORTON\";\n VertexBufferType[VertexBufferType[\"VEC_2\"] = 1] = \"VEC_2\";\n VertexBufferType[VertexBufferType[\"VEC_3\"] = 2] = \"VEC_3\";\n})(VertexBufferType || (VertexBufferType = {}));\n//# sourceMappingURL=vertexBufferType.js.map","/* Null suppression (physical level) techniques ------------------------------------------------------------------*/\n//based on https://github.com/mapbox/pbf/blob/main/index.js\nexport function decodeVarintInt32(buf, bufferOffset, numValues) {\n const dst = new Int32Array(numValues);\n let dstOffset = 0;\n let offset = bufferOffset.get();\n for (let i = 0; i < dst.length; i++) {\n let b = buf[offset++];\n let val = b & 0x7f;\n if (b < 0x80) {\n dst[dstOffset++] = val;\n continue;\n }\n b = buf[offset++];\n val |= (b & 0x7f) << 7;\n if (b < 0x80) {\n dst[dstOffset++] = val;\n continue;\n }\n b = buf[offset++];\n val |= (b & 0x7f) << 14;\n if (b < 0x80) {\n dst[dstOffset++] = val;\n continue;\n }\n b = buf[offset++];\n val |= (b & 0x7f) << 21;\n if (b < 0x80) {\n dst[dstOffset++] = val;\n continue;\n }\n b = buf[offset++];\n val |= (b & 0x0f) << 28;\n dst[dstOffset++] = val;\n }\n bufferOffset.set(offset);\n return dst;\n}\nexport function decodeVarintInt64(src, offset, numValues) {\n const dst = new BigInt64Array(numValues);\n for (let i = 0; i < dst.length; i++) {\n dst[i] = decodeSingleVarintInt64(src, offset);\n }\n return dst;\n}\n/* Since decoding Int64 values to BigInt is more than an order of magnitude slower in the tests\n * then using a Float64, this decoding method limits the max size of a Long value to 53 bits */\nexport function decodeVarintFloat64(src, numValues, offset) {\n const dst = new Float64Array(numValues);\n for (let i = 0; i < numValues; i++) {\n dst[i] = decodeSingleVarintFloat64(src, offset);\n }\n return dst;\n}\n//based on https://github.com/mapbox/pbf/blob/main/index.js\nfunction decodeSingleVarintFloat64(buf, offset) {\n let val, b;\n b = buf[offset.get()];\n offset.increment();\n val = b & 0x7f;\n if (b < 0x80)\n return val;\n b = buf[offset.get()];\n offset.increment();\n val |= (b & 0x7f) << 7;\n if (b < 0x80)\n return val;\n b = buf[offset.get()];\n offset.increment();\n val |= (b & 0x7f) << 14;\n if (b < 0x80)\n return val;\n b = buf[offset.get()];\n offset.increment();\n val |= (b & 0x7f) << 21;\n if (b < 0x80)\n return val;\n b = buf[offset.get()];\n val |= (b & 0x0f) << 28;\n return decodeVarintRemainder(val, buf, offset);\n}\nfunction decodeVarintRemainder(l, buf, offset) {\n let h, b;\n b = buf[offset.get()];\n offset.increment();\n h = (b & 0x70) >> 4;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n b = buf[offset.get()];\n offset.increment();\n h |= (b & 0x7f) << 3;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n b = buf[offset.get()];\n offset.increment();\n h |= (b & 0x7f) << 10;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n b = buf[offset.get()];\n offset.increment();\n h |= (b & 0x7f) << 17;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n b = buf[offset.get()];\n offset.increment();\n h |= (b & 0x7f) << 24;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n b = buf[offset.get()];\n offset.increment();\n h |= (b & 0x01) << 31;\n if (b < 0x80)\n return h * 0x100000000 + (l >>> 0);\n throw new Error(\"Expected varint not more than 10 bytes\");\n}\nexport function decodeFastPfor(data, numValues, byteLength, offset) {\n throw new Error(\"FastPFor is not implemented yet.\");\n}\nexport function decodeZigZag(encodedData) {\n for (let i = 0; i < encodedData.length; i++) {\n const encoded = encodedData[i];\n encodedData[i] = (encoded >>> 1) ^ -(encoded & 1);\n }\n}\nexport function decodeZigZagInt64(encodedData) {\n for (let i = 0; i < encodedData.length; i++) {\n const encoded = encodedData[i];\n encodedData[i] = (encoded >> 1n) ^ -(encoded & 1n);\n }\n}\nexport function decodeZigZagFloat64(encodedData) {\n for (let i = 0; i < encodedData.length; i++) {\n const encoded = encodedData[i];\n //Get rid of branch? -> var v = encoded % 2 && 1; encodedData[i] = (encoded + v) / (v * 2 - 1) * 2;\n encodedData[i] = encoded % 2 === 1 ? (encoded + 1) / -2 : encoded / 2;\n }\n}\nexport function decodeZigZagValue(encoded) {\n return (encoded >>> 1) ^ -(encoded & 1);\n}\nexport function decodeZigZagValueInt64(encoded) {\n return (encoded >> 1n) ^ -(encoded & 1n);\n}\n// Source: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/util/VarInt.java\nfunction decodeSingleVarintInt64(bytes, pos) {\n let value = 0n;\n let shift = 0;\n let index = pos.get();\n while (index < bytes.length) {\n const b = bytes[index++];\n value |= BigInt(b & 0x7f) << BigInt(shift);\n if ((b & 0x80) === 0) {\n break;\n }\n shift += 7;\n if (shift >= 64) {\n throw new Error(\"Varint too long\");\n }\n }\n pos.set(index);\n return value;\n}\n/* Logical Level Techniques Flat Vectors ------------------------------------------------------------------ */\nexport function decodeRle(data, streamMetadata, isSigned) {\n return isSigned\n ? decodeZigZagRle(data, streamMetadata.runs, streamMetadata.numRleValues)\n : decodeUnsignedRle(data, streamMetadata.runs, streamMetadata.numRleValues);\n}\nexport function decodeRleInt64(data, streamMetadata, isSigned) {\n return isSigned\n ? decodeZigZagRleInt64(data, streamMetadata.runs, streamMetadata.numRleValues)\n : decodeUnsignedRleInt64(data, streamMetadata.runs, streamMetadata.numRleValues);\n}\nexport function decodeRleFloat64(data, streamMetadata, isSigned) {\n return isSigned\n ? decodeZigZagRleFloat64(data, streamMetadata.runs, streamMetadata.numRleValues)\n : decodeUnsignedRleFloat64(data, streamMetadata.runs, streamMetadata.numRleValues);\n}\nexport function decodeUnsignedRle(encodedData, numRuns, numTotalValues) {\n const decodedValues = new Int32Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = encodedData[i];\n const value = encodedData[i + numRuns];\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\nexport function decodeUnsignedRleInt64(encodedData, numRuns, numTotalValues) {\n const decodedValues = new BigInt64Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = Number(encodedData[i]);\n const value = encodedData[i + numRuns];\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\nexport function decodeUnsignedRleFloat64(encodedData, numRuns, numTotalValues) {\n const decodedValues = new Float64Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = encodedData[i];\n const value = encodedData[i + numRuns];\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\n/*\n * In place decoding of the zigzag encoded delta values.\n * Inspired by https://github.com/lemire/JavaFastPFOR/blob/master/src/main/java/me/lemire/integercompression/differential/Delta.java\n */\nexport function decodeZigZagDelta(data) {\n data[0] = (data[0] >>> 1) ^ -(data[0] & 1);\n const sz0 = (data.length / 4) * 4;\n let i = 1;\n if (sz0 >= 4) {\n for (; i < sz0 - 4; i += 4) {\n const data1 = data[i];\n const data2 = data[i + 1];\n const data3 = data[i + 2];\n const data4 = data[i + 3];\n data[i] = ((data1 >>> 1) ^ -(data1 & 1)) + data[i - 1];\n data[i + 1] = ((data2 >>> 1) ^ -(data2 & 1)) + data[i];\n data[i + 2] = ((data3 >>> 1) ^ -(data3 & 1)) + data[i + 1];\n data[i + 3] = ((data4 >>> 1) ^ -(data4 & 1)) + data[i + 2];\n }\n }\n for (; i != data.length; ++i) {\n data[i] = ((data[i] >>> 1) ^ -(data[i] & 1)) + data[i - 1];\n }\n}\nexport function decodeZigZagDeltaInt64(data) {\n data[0] = (data[0] >> 1n) ^ -(data[0] & 1n);\n const sz0 = (data.length / 4) * 4;\n let i = 1;\n if (sz0 >= 4) {\n for (; i < sz0 - 4; i += 4) {\n const data1 = data[i];\n const data2 = data[i + 1];\n const data3 = data[i + 2];\n const data4 = data[i + 3];\n data[i] = ((data1 >> 1n) ^ -(data1 & 1n)) + data[i - 1];\n data[i + 1] = ((data2 >> 1n) ^ -(data2 & 1n)) + data[i];\n data[i + 2] = ((data3 >> 1n) ^ -(data3 & 1n)) + data[i + 1];\n data[i + 3] = ((data4 >> 1n) ^ -(data4 & 1n)) + data[i + 2];\n }\n }\n for (; i != data.length; ++i) {\n data[i] = ((data[i] >> 1n) ^ -(data[i] & 1n)) + data[i - 1];\n }\n}\nexport function decodeZigZagDeltaFloat64(data) {\n data[0] = data[0] % 2 === 1 ? (data[0] + 1) / -2 : data[0] / 2;\n const sz0 = (data.length / 4) * 4;\n let i = 1;\n if (sz0 >= 4) {\n for (; i < sz0 - 4; i += 4) {\n const data1 = data[i];\n const data2 = data[i + 1];\n const data3 = data[i + 2];\n const data4 = data[i + 3];\n data[i] = (data1 % 2 === 1 ? (data1 + 1) / -2 : data1 / 2) + data[i - 1];\n data[i + 1] = (data2 % 2 === 1 ? (data2 + 1) / -2 : data2 / 2) + data[i];\n data[i + 2] = (data3 % 2 === 1 ? (data3 + 1) / -2 : data3 / 2) + data[i + 1];\n data[i + 3] = (data4 % 2 === 1 ? (data4 + 1) / -2 : data4 / 2) + data[i + 2];\n }\n }\n for (; i != data.length; ++i) {\n data[i] = (data[i] % 2 === 1 ? (data[i] + 1) / -2 : data[i] / 2) + data[i - 1];\n }\n}\nexport function decodeZigZagRle(data, numRuns, numTotalValues) {\n const decodedValues = new Int32Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n let value = data[i + numRuns];\n value = (value >>> 1) ^ -(value & 1);\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\nexport function decodeZigZagRleInt64(data, numRuns, numTotalValues) {\n const decodedValues = new BigInt64Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = Number(data[i]);\n let value = data[i + numRuns];\n value = (value >> 1n) ^ -(value & 1n);\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\nexport function decodeZigZagRleFloat64(data, numRuns, numTotalValues) {\n const decodedValues = new Float64Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n let value = data[i + numRuns];\n //TODO: get rid of branch? -> var v = value % 2 && 1; a = (value + v) / (v * 2 - 1) * 2;\n value = value % 2 === 1 ? (value + 1) / -2 : value / 2;\n decodedValues.fill(value, offset, offset + runLength);\n offset += runLength;\n }\n return decodedValues;\n}\n/*\n * Inspired by https://github.com/lemire/JavaFastPFOR/blob/master/src/main/java/me/lemire/integercompression/differential/Delta.java\n */\nexport function fastInverseDelta(data) {\n const sz0 = (data.length / 4) * 4;\n let i = 1;\n if (sz0 >= 4) {\n for (let a = data[0]; i < sz0 - 4; i += 4) {\n a = data[i] += a;\n a = data[i + 1] += a;\n a = data[i + 2] += a;\n a = data[i + 3] += a;\n }\n }\n while (i != data.length) {\n data[i] += data[i - 1];\n ++i;\n }\n}\nexport function inverseDelta(data) {\n let prevValue = 0;\n for (let i = 0; i < data.length; i++) {\n data[i] += prevValue;\n prevValue = data[i];\n }\n}\n/*\n * In place decoding of the zigzag delta encoded Vec2.\n * Inspired by https://github.com/lemire/JavaFastPFOR/blob/master/src/main/java/me/lemire/integercompression/differential/Delta.java\n */\nexport function decodeComponentwiseDeltaVec2(data) {\n data[0] = (data[0] >>> 1) ^ -(data[0] & 1);\n data[1] = (data[1] >>> 1) ^ -(data[1] & 1);\n const sz0 = (data.length / 4) * 4;\n let i = 2;\n if (sz0 >= 4) {\n for (; i < sz0 - 4; i += 4) {\n const x1 = data[i];\n const y1 = data[i + 1];\n const x2 = data[i + 2];\n const y2 = data[i + 3];\n data[i] = ((x1 >>> 1) ^ -(x1 & 1)) + data[i - 2];\n data[i + 1] = ((y1 >>> 1) ^ -(y1 & 1)) + data[i - 1];\n data[i + 2] = ((x2 >>> 1) ^ -(x2 & 1)) + data[i];\n data[i + 3] = ((y2 >>> 1) ^ -(y2 & 1)) + data[i + 1];\n }\n }\n for (; i != data.length; i += 2) {\n data[i] = ((data[i] >>> 1) ^ -(data[i] & 1)) + data[i - 2];\n data[i + 1] = ((data[i + 1] >>> 1) ^ -(data[i + 1] & 1)) + data[i - 1];\n }\n}\nexport function decodeComponentwiseDeltaVec2Scaled(data, scale, min, max) {\n let previousVertexX = (data[0] >>> 1) ^ -(data[0] & 1);\n let previousVertexY = (data[1] >>> 1) ^ -(data[1] & 1);\n data[0] = clamp(Math.round(previousVertexX * scale), min, max);\n data[1] = clamp(Math.round(previousVertexY * scale), min, max);\n const sz0 = data.length / 16;\n let i = 2;\n if (sz0 >= 4) {\n for (; i < sz0 - 4; i += 4) {\n const x1 = data[i];\n const y1 = data[i + 1];\n const currentVertexX = ((x1 >>> 1) ^ -(x1 & 1)) + previousVertexX;\n const currentVertexY = ((y1 >>> 1) ^ -(y1 & 1)) + previousVertexY;\n data[i] = clamp(Math.round(currentVertexX * scale), min, max);\n data[i + 1] = clamp(Math.round(currentVertexY * scale), min, max);\n const x2 = data[i + 2];\n const y2 = data[i + 3];\n previousVertexX = ((x2 >>> 1) ^ -(x2 & 1)) + currentVertexX;\n previousVertexY = ((y2 >>> 1) ^ -(y2 & 1)) + currentVertexY;\n data[i + 2] = clamp(Math.round(previousVertexX * scale), min, max);\n data[i + 3] = clamp(Math.round(previousVertexY * scale), min, max);\n }\n }\n for (; i != data.length; i += 2) {\n previousVertexX += (data[i] >>> 1) ^ -(data[i] & 1);\n previousVertexY += (data[i + 1] >>> 1) ^ -(data[i + 1] & 1);\n data[i] = clamp(Math.round(previousVertexX * scale), min, max);\n data[i + 1] = clamp(Math.round(previousVertexY * scale), min, max);\n }\n}\nfunction clamp(n, min, max) {\n return Math.min(max, Math.max(min, n));\n}\nexport function decodeNullableZigZagDelta(bitVector, data) {\n const decodedData = new Int32Array(bitVector.size());\n let dataCounter = 0;\n if (bitVector.get(0)) {\n decodedData[0] = bitVector.get(0) ? (data[0] >>> 1) ^ -(data[0] & 1) : 0;\n dataCounter = 1;\n }\n else {\n decodedData[0] = 0;\n }\n let i = 1;\n for (; i != decodedData.length; ++i) {\n decodedData[i] = bitVector.get(i)\n ? decodedData[i - 1] + ((data[dataCounter] >>> 1) ^ -(data[dataCounter++] & 1))\n : decodedData[i - 1];\n }\n return decodedData;\n}\nexport function decodeNullableZigZagDeltaInt64(bitVector, data) {\n const decodedData = new BigInt64Array(bitVector.size());\n let dataCounter = 0;\n if (bitVector.get(0)) {\n decodedData[0] = bitVector.get(0) ? (data[0] >> 1n) ^ -(data[0] & 1n) : 0n;\n dataCounter = 1;\n }\n else {\n decodedData[0] = 0n;\n }\n let i = 1;\n for (; i != decodedData.length; ++i) {\n decodedData[i] = bitVector.get(i)\n ? decodedData[i - 1] + ((data[dataCounter] >> 1n) ^ -(data[dataCounter++] & 1n))\n : decodedData[i - 1];\n }\n return decodedData;\n}\n/* Transform data to allow util access ------------------------------------------------------------------------ */\nexport function zigZagDeltaOfDeltaDecoding(data) {\n const decodedData = new Int32Array(data.length + 1);\n decodedData[0] = 0;\n decodedData[1] = decodeZigZagValue(data[0]);\n let deltaSum = decodedData[1];\n let i = 2;\n for (; i != decodedData.length; ++i) {\n const zigZagValue = data[i - 1];\n const delta = (zigZagValue >>> 1) ^ -(zigZagValue & 1);\n deltaSum += delta;\n decodedData[i] = decodedData[i - 1] + deltaSum;\n }\n return decodedData;\n}\nexport function zigZagRleDeltaDecoding(data, numRuns, numTotalValues) {\n const decodedValues = new Int32Array(numTotalValues + 1);\n decodedValues[0] = 0;\n let offset = 1;\n let previousValue = decodedValues[0];\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n let value = data[i + numRuns];\n value = (value >>> 1) ^ -(value & 1);\n for (let j = offset; j < offset + runLength; j++) {\n decodedValues[j] = value + previousValue;\n previousValue = decodedValues[j];\n }\n offset += runLength;\n }\n return decodedValues;\n}\nexport function rleDeltaDecoding(data, numRuns, numTotalValues) {\n const decodedValues = new Int32Array(numTotalValues + 1);\n decodedValues[0] = 0;\n let offset = 1;\n let previousValue = decodedValues[0];\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n const value = data[i + numRuns];\n for (let j = offset; j < offset + runLength; j++) {\n decodedValues[j] = value + previousValue;\n previousValue = decodedValues[j];\n }\n offset += runLength;\n }\n return decodedValues;\n}\nexport function padWithZeros(bitVector, data) {\n const decodedData = new Int32Array(bitVector.size());\n let dataCounter = 0;\n let i = 0;\n for (; i != decodedData.length; ++i) {\n decodedData[i] = bitVector.get(i) ? data[dataCounter++] : 0;\n }\n return decodedData;\n}\nexport function padZigZagWithZeros(bitVector, data) {\n const decodedData = new Int32Array(bitVector.size());\n let dataCounter = 0;\n let i = 0;\n for (; i != decodedData.length; ++i) {\n if (bitVector.get(i)) {\n const value = data[dataCounter++];\n decodedData[i] = (value >>> 1) ^ -(value & 1);\n }\n else {\n decodedData[i] = 0;\n }\n }\n return decodedData;\n}\nexport function padWithZerosInt64(bitVector, data) {\n const decodedData = new BigInt64Array(bitVector.size());\n let dataCounter = 0;\n let i = 0;\n for (; i != decodedData.length; ++i) {\n decodedData[i] = bitVector.get(i) ? data[dataCounter++] : 0n;\n }\n return decodedData;\n}\nexport function padZigZagWithZerosInt64(bitVector, data) {\n const decodedData = new BigInt64Array(bitVector.size());\n let dataCounter = 0;\n let i = 0;\n for (; i != decodedData.length; ++i) {\n if (bitVector.get(i)) {\n const value = data[dataCounter++];\n decodedData[i] = (value >> 1n) ^ -(value & 1n);\n }\n else {\n decodedData[i] = 0n;\n }\n }\n return decodedData;\n}\nexport function decodeNullableRle(data, streamMetadata, isSigned, bitVector) {\n const rleMetadata = streamMetadata;\n return isSigned\n ? decodeNullableZigZagRle(bitVector, data, rleMetadata.runs)\n : decodeNullableUnsignedRle(bitVector, data, rleMetadata.runs);\n}\nfunction decodeNullableUnsignedRle(bitVector, data, numRuns) {\n const values = new Int32Array(bitVector.size());\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n const value = data[i + numRuns];\n for (let j = offset; j < offset + runLength; j++) {\n /* There can be null values in a run */\n if (bitVector.get(j)) {\n values[j] = value;\n }\n else {\n values[j] = 0;\n offset++;\n }\n }\n offset += runLength;\n }\n return values;\n}\nfunction decodeNullableZigZagRle(bitVector, data, numRuns) {\n const values = new Int32Array(bitVector.size());\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n let value = data[i + numRuns];\n value = (value >>> 1) ^ -(value & 1);\n for (let j = offset; j < offset + runLength; j++) {\n /* There can be null values in a run */\n if (bitVector.get(j)) {\n values[j] = value;\n }\n else {\n values[j] = 0;\n offset++;\n }\n }\n offset += runLength;\n }\n return values;\n}\nexport function decodeNullableRleInt64(data, streamMetadata, isSigned, bitVector) {\n const rleMetadata = streamMetadata;\n return isSigned\n ? decodeNullableZigZagRleInt64(bitVector, data, rleMetadata.runs)\n : decodeNullableUnsignedRleInt64(bitVector, data, rleMetadata.runs);\n}\nfunction decodeNullableUnsignedRleInt64(bitVector, data, numRuns) {\n const values = new BigInt64Array(bitVector.size());\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = Number(data[i]);\n const value = data[i + numRuns];\n for (let j = offset; j < offset + runLength; j++) {\n /* There can be null values in a run */\n if (bitVector.get(j)) {\n values[j] = value;\n }\n else {\n values[j] = 0n;\n offset++;\n }\n }\n offset += runLength;\n }\n return values;\n}\nfunction decodeNullableZigZagRleInt64(bitVector, data, numRuns) {\n const values = new BigInt64Array(bitVector.size());\n let offset = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = Number(data[i]);\n let value = data[i + numRuns];\n value = (value >> 1n) ^ -(value & 1n);\n for (let j = offset; j < offset + runLength; j++) {\n /* There can be null values in a run */\n if (bitVector.get(j)) {\n values[j] = value;\n }\n else {\n values[j] = 0n;\n offset++;\n }\n }\n offset += runLength;\n }\n return values;\n}\n/* Logical Level Techniques Const and Sequence Vectors ------------------------------------------------------------- */\n/**\n * Decode Delta-RLE with multiple runs by fully reconstructing values.\n *\n * @param data RLE encoded data: [run1, run2, ..., value1, value2, ...]\n * @param numRuns Number of runs in the RLE encoding\n * @param numValues Total number of values to reconstruct\n * @returns Reconstructed values with deltas applied\n */\nexport function decodeDeltaRle(data, numRuns, numValues) {\n const result = new Int32Array(numValues);\n let outPos = 0;\n let previousValue = 0;\n for (let i = 0; i < numRuns; i++) {\n const runLength = data[i];\n const zigZagDelta = data[i + numRuns];\n const delta = decodeZigZagValue(zigZagDelta);\n for (let j = 0; j < runLength; j++) {\n previousValue += delta;\n result[outPos++] = previousValue;\n }\n }\n return result;\n}\n/**\n * Decode Delta-RLE with multiple runs for 64-bit integers.\n */\nexport function decodeDeltaRleInt64(data, numRuns, numValues) {\n const result = new BigInt64Array(numValues);\n let outPos = 0;\n let previousValue = 0n;\n for (let i = 0; i < numRuns; i++) {\n const runLength = Number(data[i]);\n const zigZagDelta = data[i + numRuns];\n const delta = decodeZigZagValueInt64(zigZagDelta);\n for (let j = 0; j < runLength; j++) {\n previousValue += delta;\n result[outPos++] = previousValue;\n }\n }\n return result;\n}\nexport function decodeUnsignedConstRle(data) {\n return data[1];\n}\nexport function decodeZigZagConstRle(data) {\n return decodeZigZagValue(data[1]);\n}\nexport function decodeZigZagSequenceRle(data) {\n /* base value and delta value are equal */\n if (data.length == 2) {\n const value = decodeZigZagValue(data[1]);\n return [value, value];\n }\n /* base value and delta value are not equal -> 2 runs and 2 values*/\n const base = decodeZigZagValue(data[2]);\n const delta = decodeZigZagValue(data[3]);\n return [base, delta];\n}\nexport function decodeUnsignedConstRleInt64(data) {\n return data[1];\n}\nexport function decodeZigZagConstRleInt64(data) {\n return decodeZigZagValueInt64(data[1]);\n}\nexport function decodeZigZagSequenceRleInt64(data) {\n /* base value and delta value are equal */\n if (data.length == 2) {\n const value = decodeZigZagValueInt64(data[1]);\n return [value, value];\n }\n /* base value and delta value are not equal -> 2 runs and 2 values*/\n const base = decodeZigZagValueInt64(data[2]);\n const delta = decodeZigZagValueInt64(data[3]);\n return [base, delta];\n}\n//# sourceMappingURL=integerDecodingUtils.js.map","export class LogicalStreamType {\n _dictionaryType;\n _offsetType;\n _lengthType;\n constructor(_dictionaryType, _offsetType, _lengthType) {\n this._dictionaryType = _dictionaryType;\n this._offsetType = _offsetType;\n this._lengthType = _lengthType;\n }\n get dictionaryType() {\n return this._dictionaryType;\n }\n get offsetType() {\n return this._offsetType;\n }\n get lengthType() {\n return this._lengthType;\n }\n}\n//# sourceMappingURL=logicalStreamType.js.map","import { LogicalLevelTechnique } from \"./logicalLevelTechnique\";\nimport { PhysicalLevelTechnique } from \"./physicalLevelTechnique\";\nimport { decodeVarintInt32 } from \"../../decoding/integerDecodingUtils\";\nimport { PhysicalStreamType } from \"./physicalStreamType\";\nimport { LogicalStreamType } from \"./logicalStreamType\";\nimport { DictionaryType } from \"./dictionaryType\";\nimport { OffsetType } from \"./offsetType\";\nimport { LengthType } from \"./lengthType\";\nexport function decodeStreamMetadata(tile, offset) {\n const streamMetadata = decodeStreamMetadataInternal(tile, offset);\n if (streamMetadata.logicalLevelTechnique1 === LogicalLevelTechnique.MORTON) {\n return decodePartialMortonEncodedStreamMetadata(streamMetadata, tile, offset);\n }\n if ((LogicalLevelTechnique.RLE === streamMetadata.logicalLevelTechnique1 ||\n LogicalLevelTechnique.RLE === streamMetadata.logicalLevelTechnique2) &&\n PhysicalLevelTechnique.NONE !== streamMetadata.physicalLevelTechnique) {\n return decodePartialRleEncodedStreamMetadata(streamMetadata, tile, offset);\n }\n return streamMetadata;\n}\nfunction decodePartialMortonEncodedStreamMetadata(streamMetadata, tile, offset) {\n const mortonInfo = decodeVarintInt32(tile, offset, 2);\n return {\n physicalStreamType: streamMetadata.physicalStreamType,\n logicalStreamType: streamMetadata.logicalStreamType,\n logicalLevelTechnique1: streamMetadata.logicalLevelTechnique1,\n logicalLevelTechnique2: streamMetadata.logicalLevelTechnique2,\n physicalLevelTechnique: streamMetadata.physicalLevelTechnique,\n numValues: streamMetadata.numValues,\n byteLength: streamMetadata.byteLength,\n decompressedCount: streamMetadata.decompressedCount,\n numBits: mortonInfo[0],\n coordinateShift: mortonInfo[1],\n };\n}\nfunction decodePartialRleEncodedStreamMetadata(streamMetadata, tile, offset) {\n const rleInfo = decodeVarintInt32(tile, offset, 2);\n return {\n physicalStreamType: streamMetadata.physicalStreamType,\n logicalStreamType: streamMetadata.logicalStreamType,\n logicalLevelTechnique1: streamMetadata.logicalLevelTechnique1,\n logicalLevelTechnique2: streamMetadata.logicalLevelTechnique2,\n physicalLevelTechnique: streamMetadata.physicalLevelTechnique,\n numValues: streamMetadata.numValues,\n byteLength: streamMetadata.byteLength,\n decompressedCount: rleInfo[1],\n runs: rleInfo[0],\n numRleValues: rleInfo[1],\n };\n}\nfunction decodeStreamMetadataInternal(tile, offset) {\n const stream_type = tile[offset.get()];\n const physicalStreamType = Object.values(PhysicalStreamType)[stream_type >> 4];\n let logicalStreamType = null;\n switch (physicalStreamType) {\n case PhysicalStreamType.DATA:\n logicalStreamType = new LogicalStreamType(Object.values(DictionaryType)[stream_type & 0xf]);\n break;\n case PhysicalStreamType.OFFSET:\n logicalStreamType = new LogicalStreamType(null, Object.values(OffsetType)[stream_type & 0xf]);\n break;\n case PhysicalStreamType.LENGTH:\n logicalStreamType = new LogicalStreamType(null, null, Object.values(LengthType)[stream_type & 0xf]);\n break;\n }\n offset.increment();\n const encodings_header = tile[offset.get()];\n const llt1 = Object.values(LogicalLevelTechnique)[encodings_header >> 5];\n const llt2 = Object.values(LogicalLevelTechnique)[(encodings_header >> 2) & 0x7];\n const plt = Object.values(PhysicalLevelTechnique)[encodings_header & 0x3];\n offset.increment();\n const sizeInfo = decodeVarintInt32(tile, offset, 2);\n const numValues = sizeInfo[0];\n const byteLength = sizeInfo[1];\n return {\n physicalStreamType,\n logicalStreamType,\n logicalLevelTechnique1: llt1,\n logicalLevelTechnique2: llt2,\n physicalLevelTechnique: plt,\n numValues,\n byteLength,\n decompressedCount: numValues,\n };\n}\n//# sourceMappingURL=streamMetadataDecoder.js.map","export default class BitVector {\n values;\n _size;\n /**\n * @param values The byte buffer containing the bit values in least-significant bit (LSB)\n * numbering\n */\n constructor(values, size) {\n this.values = values;\n this._size = size;\n }\n get(index) {\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n const b = this.values[byteIndex];\n return ((b >> bitIndex) & 1) === 1;\n }\n set(index, value) {\n //TODO: refactor -> improve quick and dirty solution\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n this.values[byteIndex] = this.values[byteIndex] | ((value ? 1 : 0) << bitIndex);\n }\n getInt(index) {\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n const b = this.values[byteIndex];\n return (b >> bitIndex) & 1;\n }\n size() {\n return this._size;\n }\n getBuffer() {\n return this.values;\n }\n}\n//# sourceMappingURL=bitVector.js.map","import { PhysicalLevelTechnique } from \"../metadata/tile/physicalLevelTechnique\";\nimport { decodeComponentwiseDeltaVec2, decodeComponentwiseDeltaVec2Scaled, decodeDeltaRle, decodeDeltaRleInt64, decodeFastPfor, decodeNullableRle, decodeNullableRleInt64, decodeNullableZigZagDelta, decodeNullableZigZagDeltaInt64, decodeRle, decodeRleFloat64, decodeRleInt64, decodeUnsignedConstRle, decodeUnsignedConstRleInt64, decodeUnsignedRle, decodeUnsignedRleFloat64, decodeUnsignedRleInt64, decodeVarintInt32, decodeVarintInt64, decodeVarintFloat64, decodeZigZag, decodeZigZagConstRle, decodeZigZagConstRleInt64, decodeZigZagDelta, decodeZigZagDeltaFloat64, decodeZigZagDeltaInt64, decodeZigZagFloat64, decodeZigZagInt64, decodeZigZagSequenceRle, decodeZigZagSequenceRleInt64, decodeZigZagValue, decodeZigZagValueInt64, fastInverseDelta, inverseDelta, padWithZeros, padWithZerosInt64, padZigZagWithZeros, padZigZagWithZerosInt64, rleDeltaDecoding, zigZagDeltaOfDeltaDecoding, zigZagRleDeltaDecoding, } from \"./integerDecodingUtils\";\nimport { LogicalLevelTechnique } from \"../metadata/tile/logicalLevelTechnique\";\nimport BitVector from \"../vector/flat/bitVector\";\nimport { VectorType } from \"../vector/vectorType\";\nexport function decodeIntStream(data, offset, streamMetadata, isSigned, scalingData) {\n const values = decodePhysicalLevelTechnique(data, offset, streamMetadata);\n return decodeIntBuffer(values, streamMetadata, isSigned, scalingData);\n}\nexport function decodeLengthStreamToOffsetBuffer(data, offset, streamMetadata) {\n const values = decodePhysicalLevelTechnique(data, offset, streamMetadata);\n return decodeLengthToOffsetBuffer(values, streamMetadata);\n}\nfunction decodePhysicalLevelTechnique(data, offset, streamMetadata) {\n const physicalLevelTechnique = streamMetadata.physicalLevelTechnique;\n if (physicalLevelTechnique === PhysicalLevelTechnique.FAST_PFOR) {\n return decodeFastPfor(data, streamMetadata.numValues, streamMetadata.byteLength, offset);\n }\n if (physicalLevelTechnique === PhysicalLevelTechnique.VARINT) {\n return decodeVarintInt32(data, offset, streamMetadata.numValues);\n }\n if (physicalLevelTechnique === PhysicalLevelTechnique.NONE) {\n const dataOffset = offset.get();\n const byteLength = streamMetadata.byteLength;\n offset.add(byteLength);\n //TODO: use Byte Rle for geometry type encoding\n const slice = data.subarray(dataOffset, offset.get());\n return new Int32Array(slice);\n }\n throw new Error(\"Specified physicalLevelTechnique is not supported (yet).\");\n}\nexport function decodeConstIntStream(data, offset, streamMetadata, isSigned) {\n const values = decodePhysicalLevelTechnique(data, offset, streamMetadata);\n if (values.length === 1) {\n const value = values[0];\n return isSigned ? decodeZigZagValue(value) : value;\n }\n return isSigned ? decodeZigZagConstRle(values) : decodeUnsignedConstRle(values);\n}\nexport function decodeSequenceIntStream(data, offset, streamMetadata) {\n const values = decodePhysicalLevelTechnique(data, offset, streamMetadata);\n return decodeZigZagSequenceRle(values);\n}\nexport function decodeSequenceLongStream(data, offset, streamMetadata) {\n const values = decodeVarintInt64(data, offset, streamMetadata.numValues);\n return decodeZigZagSequenceRleInt64(values);\n}\nexport function decodeLongStream(data, offset, streamMetadata, isSigned) {\n const values = decodeVarintInt64(data, offset, streamMetadata.numValues);\n return decodeLongBuffer(values, streamMetadata, isSigned);\n}\nexport function decodeLongFloat64Stream(data, offset, streamMetadata, isSigned) {\n const values = decodeVarintFloat64(data, streamMetadata.numValues, offset);\n return decodeFloat64Buffer(values, streamMetadata, isSigned);\n}\nexport function decodeConstLongStream(data, offset, streamMetadata, isSigned) {\n const values = decodeVarintInt64(data, offset, streamMetadata.numValues);\n if (values.length === 1) {\n const value = values[0];\n return isSigned ? decodeZigZagValueInt64(value) : value;\n }\n return isSigned ? decodeZigZagConstRleInt64(values) : decodeUnsignedConstRleInt64(values);\n}\nfunction decodeIntBuffer(values, streamMetadata, isSigned, scalingData) {\n /*\n * Currently the encoder uses only fixed combinations of encodings.\n * For performance reasons it is also used a fixed combination of the encodings on the decoding side.\n * The following encodings and combinations are used:\n * - Morton Delta -> always sorted so not ZigZag encoding needed\n * - Delta -> currently always in combination with ZigZag encoding\n * - Rle -> in combination with ZigZag encoding if data type is signed\n * - Delta Rle\n * - Componentwise Delta -> always ZigZag encoding is used\n * */\n switch (streamMetadata.logicalLevelTechnique1) {\n case LogicalLevelTechnique.DELTA:\n if (streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n return decodeDeltaRle(values, rleMetadata.runs, rleMetadata.numRleValues);\n }\n decodeZigZagDelta(values);\n return values;\n case LogicalLevelTechnique.RLE:\n return decodeRle(values, streamMetadata, isSigned);\n case LogicalLevelTechnique.MORTON:\n fastInverseDelta(values);\n return values;\n case LogicalLevelTechnique.COMPONENTWISE_DELTA:\n if (scalingData) {\n decodeComponentwiseDeltaVec2Scaled(values, scalingData.scale, scalingData.min, scalingData.max);\n return values;\n }\n decodeComponentwiseDeltaVec2(values);\n return values;\n case LogicalLevelTechnique.NONE:\n if (isSigned) {\n decodeZigZag(values);\n }\n return values;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${streamMetadata.logicalLevelTechnique1}`);\n }\n}\nfunction decodeLongBuffer(values, streamMetadata, isSigned) {\n switch (streamMetadata.logicalLevelTechnique1) {\n case LogicalLevelTechnique.DELTA:\n if (streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n return decodeDeltaRleInt64(values, rleMetadata.runs, rleMetadata.numRleValues);\n }\n decodeZigZagDeltaInt64(values);\n return values;\n case LogicalLevelTechnique.RLE:\n return decodeRleInt64(values, streamMetadata, isSigned);\n case LogicalLevelTechnique.NONE:\n if (isSigned) {\n decodeZigZagInt64(values);\n }\n return values;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${streamMetadata.logicalLevelTechnique1}`);\n }\n}\nexport function decodeFloat64Buffer(values, streamMetadata, isSigned) {\n switch (streamMetadata.logicalLevelTechnique1) {\n case LogicalLevelTechnique.DELTA:\n if (streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n values = decodeUnsignedRleFloat64(values, rleMetadata.runs, rleMetadata.numRleValues);\n }\n decodeZigZagDeltaFloat64(values);\n return values;\n case LogicalLevelTechnique.RLE:\n return decodeRleFloat64(values, streamMetadata, isSigned);\n case LogicalLevelTechnique.NONE:\n if (isSigned) {\n decodeZigZagFloat64(values);\n }\n return values;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${streamMetadata.logicalLevelTechnique1}`);\n }\n}\nfunction decodeLengthToOffsetBuffer(values, streamMetadata) {\n if (streamMetadata.logicalLevelTechnique1 === LogicalLevelTechnique.DELTA &&\n streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.NONE) {\n const decodedValues = zigZagDeltaOfDeltaDecoding(values);\n return decodedValues;\n }\n if (streamMetadata.logicalLevelTechnique1 === LogicalLevelTechnique.RLE &&\n streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.NONE) {\n const rleMetadata = streamMetadata;\n const decodedValues = rleDeltaDecoding(values, rleMetadata.runs, rleMetadata.numRleValues);\n return decodedValues;\n }\n if (streamMetadata.logicalLevelTechnique1 === LogicalLevelTechnique.NONE &&\n streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.NONE) {\n //TODO: use fastInverseDelta again and check what are the performance problems in zoom 14\n //fastInverseDelta(values);\n inverseDelta(values);\n const offsets = new Int32Array(streamMetadata.numValues + 1);\n offsets[0] = 0;\n offsets.set(values, 1);\n return offsets;\n }\n if (streamMetadata.logicalLevelTechnique1 === LogicalLevelTechnique.DELTA &&\n streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n const decodedValues = zigZagRleDeltaDecoding(values, rleMetadata.runs, rleMetadata.numRleValues);\n fastInverseDelta(decodedValues);\n return decodedValues;\n }\n throw new Error(\"Only delta encoding is supported for transforming length to offset streams yet.\");\n}\nexport function decodeNullableIntStream(data, offset, streamMetadata, isSigned, bitVector) {\n const values = streamMetadata.physicalLevelTechnique === PhysicalLevelTechnique.FAST_PFOR\n ? decodeFastPfor(data, streamMetadata.numValues, streamMetadata.byteLength, offset)\n : decodeVarintInt32(data, offset, streamMetadata.numValues);\n return decodeNullableIntBuffer(values, streamMetadata, isSigned, bitVector);\n}\nexport function decodeNullableLongStream(data, offset, streamMetadata, isSigned, bitVector) {\n const values = decodeVarintInt64(data, offset, streamMetadata.numValues);\n return decodeNullableLongBuffer(values, streamMetadata, isSigned, bitVector);\n}\nfunction decodeNullableIntBuffer(values, streamMetadata, isSigned, bitVector) {\n switch (streamMetadata.logicalLevelTechnique1) {\n case LogicalLevelTechnique.DELTA:\n if (streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n values = decodeUnsignedRle(values, rleMetadata.runs, rleMetadata.numRleValues);\n }\n return decodeNullableZigZagDelta(bitVector, values);\n case LogicalLevelTechnique.RLE:\n return decodeNullableRle(values, streamMetadata, isSigned, bitVector);\n case LogicalLevelTechnique.MORTON:\n fastInverseDelta(values);\n return values;\n case LogicalLevelTechnique.COMPONENTWISE_DELTA:\n decodeComponentwiseDeltaVec2(values);\n return values;\n case LogicalLevelTechnique.NONE:\n values = isSigned ? padZigZagWithZeros(bitVector, values) : padWithZeros(bitVector, values);\n return values;\n default:\n throw new Error(\"The specified Logical level technique is not supported\");\n }\n}\nfunction decodeNullableLongBuffer(values, streamMetadata, isSigned, bitVector) {\n switch (streamMetadata.logicalLevelTechnique1) {\n case LogicalLevelTechnique.DELTA:\n if (streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n values = decodeUnsignedRleInt64(values, rleMetadata.runs, rleMetadata.numRleValues);\n }\n return decodeNullableZigZagDeltaInt64(bitVector, values);\n case LogicalLevelTechnique.RLE:\n return decodeNullableRleInt64(values, streamMetadata, isSigned, bitVector);\n case LogicalLevelTechnique.NONE:\n values = isSigned ? padZigZagWithZerosInt64(bitVector, values) : padWithZerosInt64(bitVector, values);\n return values;\n default:\n throw new Error(\"The specified Logical level technique is not supported\");\n }\n}\nexport function getVectorType(streamMetadata, sizeOrNullabilityBuffer, data, offset) {\n const logicalLevelTechnique1 = streamMetadata.logicalLevelTechnique1;\n if (logicalLevelTechnique1 === LogicalLevelTechnique.RLE) {\n return streamMetadata.runs === 1 ? VectorType.CONST : VectorType.FLAT;\n }\n const numFeatures = sizeOrNullabilityBuffer instanceof BitVector ? sizeOrNullabilityBuffer.size() : sizeOrNullabilityBuffer;\n if (logicalLevelTechnique1 === LogicalLevelTechnique.DELTA &&\n streamMetadata.logicalLevelTechnique2 === LogicalLevelTechnique.RLE) {\n const rleMetadata = streamMetadata;\n const runs = rleMetadata.runs;\n const zigZagOne = 2;\n if (rleMetadata.numRleValues !== numFeatures) {\n return VectorType.FLAT;\n }\n // Single run is always a sequence\n if (runs === 1) {\n return VectorType.SEQUENCE;\n }\n // Two runs can be a sequence if both deltas are equal to 1\n if (runs === 2) {\n const savedOffset = offset.get();\n let values;\n if (streamMetadata.physicalLevelTechnique === PhysicalLevelTechnique.VARINT) {\n values = decodeVarintInt32(data, offset, 4);\n }\n else {\n const byteOffset = offset.get();\n values = new Int32Array(data.buffer, data.byteOffset + byteOffset, 4);\n }\n offset.set(savedOffset);\n // Check if both deltas are encoded 1\n if (values[2] === zigZagOne && values[3] === zigZagOne) {\n return VectorType.SEQUENCE;\n }\n }\n }\n return streamMetadata.numValues === 1 ? VectorType.CONST : VectorType.FLAT;\n}\n//# sourceMappingURL=integerStreamDecoder.js.map","import { FixedSizeVector } from \"../fixedSizeVector\";\nexport class LongFlatVector extends FixedSizeVector {\n getValueFromBuffer(index) {\n return this.dataBuffer[index];\n }\n}\n//# sourceMappingURL=longFlatVector.js.map","import { SequenceVector } from \"./sequenceVector\";\nexport class LongSequenceVector extends SequenceVector {\n constructor(name, baseValue, delta, size) {\n super(name, BigInt64Array.of(baseValue), delta, size);\n }\n getValueFromBuffer(index) {\n return this.dataBuffer[0] + BigInt(index) * this.delta;\n }\n}\n//# sourceMappingURL=longSequenceVector.js.map","export default class TopologyVector {\n _geometryOffsets;\n _partOffsets;\n _ringOffsets;\n //TODO: refactor to use unsigned integers\n constructor(_geometryOffsets, _partOffsets, _ringOffsets) {\n this._geometryOffsets = _geometryOffsets;\n this._partOffsets = _partOffsets;\n this._ringOffsets = _ringOffsets;\n }\n get geometryOffsets() {\n return this._geometryOffsets;\n }\n get partOffsets() {\n return this._partOffsets;\n }\n get ringOffsets() {\n return this._ringOffsets;\n }\n}\n//# sourceMappingURL=topologyVector.js.map","export function decodeZOrderCurve(mortonCode, numBits, coordinateShift) {\n const x = decodeMorton(mortonCode, numBits) - coordinateShift;\n const y = decodeMorton(mortonCode >> 1, numBits) - coordinateShift;\n return { x, y };\n}\nfunction decodeMorton(code, numBits) {\n let coordinate = 0;\n for (let i = 0; i < numBits; i++) {\n coordinate |= (code & (1 << (2 * i))) >> i;\n }\n return coordinate;\n}\n//# sourceMappingURL=zOrderCurve.js.map","import { decodeZOrderCurve } from \"./zOrderCurve\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nimport { VertexBufferType } from \"./vertexBufferType\";\nimport Point from \"@mapbox/point-geometry\";\nclass MvtGeometryFactory {\n createPoint(coordinate) {\n return [[coordinate]];\n }\n createMultiPoint(points) {\n return points.map((point) => [point]);\n }\n createLineString(vertices) {\n return [vertices];\n }\n createMultiLineString(lineStrings) {\n return lineStrings;\n }\n createPolygon(shell, rings) {\n return [shell].concat(rings);\n }\n createMultiPolygon(polygons) {\n //TODO: check winding order of shell and holes\n return polygons.flat();\n }\n}\nexport function convertGeometryVector(geometryVector) {\n const geometries = new Array(geometryVector.numGeometries);\n let partOffsetCounter = 1;\n let ringOffsetsCounter = 1;\n let geometryOffsetsCounter = 1;\n let geometryCounter = 0;\n const geometryFactory = new MvtGeometryFactory();\n let vertexBufferOffset = 0;\n let vertexOffsetsOffset = 0;\n const mortonSettings = geometryVector.mortonSettings;\n const topologyVector = geometryVector.topologyVector;\n const geometryOffsets = topologyVector.geometryOffsets;\n const partOffsets = topologyVector.partOffsets;\n const ringOffsets = topologyVector.ringOffsets;\n const vertexOffsets = geometryVector.vertexOffsets;\n const containsPolygon = geometryVector.containsPolygonGeometry();\n const vertexBuffer = geometryVector.vertexBuffer;\n for (let i = 0; i < geometryVector.numGeometries; i++) {\n const geometryType = geometryVector.geometryType(i);\n if (geometryType === GEOMETRY_TYPE.POINT) {\n if (!vertexOffsets || vertexOffsets.length === 0) {\n const x = vertexBuffer[vertexBufferOffset++];\n const y = vertexBuffer[vertexBufferOffset++];\n const coordinate = new Point(x, y);\n geometries[geometryCounter++] = geometryFactory.createPoint(coordinate);\n }\n else if (geometryVector.vertexBufferType === VertexBufferType.VEC_2) {\n const offset = vertexOffsets[vertexOffsetsOffset++] * 2;\n const x = vertexBuffer[offset];\n const y = vertexBuffer[offset + 1];\n const coordinate = new Point(x, y);\n geometries[geometryCounter++] = geometryFactory.createPoint(coordinate);\n }\n else {\n const offset = vertexOffsets[vertexOffsetsOffset++];\n const mortonCode = vertexBuffer[offset];\n const vertex = decodeZOrderCurve(mortonCode, mortonSettings.numBits, mortonSettings.coordinateShift);\n const coordinate = new Point(vertex.x, vertex.y);\n geometries[geometryCounter++] = geometryFactory.createPoint(coordinate);\n }\n if (geometryOffsets)\n geometryOffsetsCounter++;\n if (partOffsets)\n partOffsetCounter++;\n if (ringOffsets)\n ringOffsetsCounter++;\n }\n else if (geometryType === GEOMETRY_TYPE.MULTIPOINT) {\n const numPoints = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];\n geometryOffsetsCounter++;\n const points = new Array(numPoints);\n if (!vertexOffsets || vertexOffsets.length === 0) {\n for (let j = 0; j < numPoints; j++) {\n const x = vertexBuffer[vertexBufferOffset++];\n const y = vertexBuffer[vertexBufferOffset++];\n points[j] = new Point(x, y);\n }\n geometries[geometryCounter++] = geometryFactory.createMultiPoint(points);\n }\n else {\n for (let j = 0; j < numPoints; j++) {\n const offset = vertexOffsets[vertexOffsetsOffset++] * 2;\n const x = vertexBuffer[offset];\n const y = vertexBuffer[offset + 1];\n points[j] = new Point(x, y);\n }\n geometries[geometryCounter++] = geometryFactory.createMultiPoint(points);\n }\n }\n else if (geometryType === GEOMETRY_TYPE.LINESTRING) {\n let numVertices = 0;\n if (containsPolygon) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n }\n else {\n numVertices = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n }\n partOffsetCounter++;\n let vertices;\n if (!vertexOffsets || vertexOffsets.length === 0) {\n vertices = getLineString(vertexBuffer, vertexBufferOffset, numVertices, false);\n vertexBufferOffset += numVertices * 2;\n }\n else {\n vertices =\n geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false)\n : decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false, mortonSettings);\n vertexOffsetsOffset += numVertices;\n }\n geometries[geometryCounter++] = geometryFactory.createLineString(vertices);\n if (geometryOffsets)\n geometryOffsetsCounter++;\n }\n else if (geometryType === GEOMETRY_TYPE.POLYGON) {\n const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n partOffsetCounter++;\n const rings = new Array(numRings - 1);\n let numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n if (!vertexOffsets || vertexOffsets.length === 0) {\n const shell = getLinearRing(vertexBuffer, vertexBufferOffset, numVertices);\n vertexBufferOffset += numVertices * 2;\n for (let j = 0; j < rings.length; j++) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n rings[j] = getLinearRing(vertexBuffer, vertexBufferOffset, numVertices);\n vertexBufferOffset += numVertices * 2;\n }\n geometries[geometryCounter++] = geometryFactory.createPolygon(shell, rings);\n }\n else {\n const shell = geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices)\n : decodeMortonDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, geometryFactory, mortonSettings);\n vertexOffsetsOffset += numVertices;\n for (let j = 0; j < rings.length; j++) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n rings[j] =\n geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices)\n : decodeMortonDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, geometryFactory, mortonSettings);\n vertexOffsetsOffset += numVertices;\n }\n geometries[geometryCounter++] = geometryFactory.createPolygon(shell, rings);\n }\n if (geometryOffsets)\n geometryOffsetsCounter++;\n }\n else if (geometryType === GEOMETRY_TYPE.MULTILINESTRING) {\n const numLineStrings = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];\n geometryOffsetsCounter++;\n const lineStrings = new Array(numLineStrings);\n if (!vertexOffsets || vertexOffsets.length === 0) {\n for (let j = 0; j < numLineStrings; j++) {\n let numVertices = 0;\n if (containsPolygon) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n }\n else {\n numVertices = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n }\n partOffsetCounter++;\n lineStrings[j] = getLineString(vertexBuffer, vertexBufferOffset, numVertices, false);\n vertexBufferOffset += numVertices * 2;\n }\n geometries[geometryCounter++] = geometryFactory.createMultiLineString(lineStrings);\n }\n else {\n for (let j = 0; j < numLineStrings; j++) {\n let numVertices = 0;\n if (containsPolygon) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n }\n else {\n numVertices = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n }\n partOffsetCounter++;\n const vertices = geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false)\n : decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false, mortonSettings);\n lineStrings[j] = vertices;\n vertexOffsetsOffset += numVertices;\n }\n geometries[geometryCounter++] = geometryFactory.createMultiLineString(lineStrings);\n }\n }\n else if (geometryType === GEOMETRY_TYPE.MULTIPOLYGON) {\n const numPolygons = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];\n geometryOffsetsCounter++;\n const polygons = new Array(numPolygons);\n let numVertices = 0;\n if (!vertexOffsets || vertexOffsets.length === 0) {\n for (let j = 0; j < numPolygons; j++) {\n const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n partOffsetCounter++;\n const rings = new Array(numRings - 1);\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n const shell = getLinearRing(vertexBuffer, vertexBufferOffset, numVertices);\n vertexBufferOffset += numVertices * 2;\n for (let k = 0; k < rings.length; k++) {\n const numRingVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n rings[k] = getLinearRing(vertexBuffer, vertexBufferOffset, numRingVertices);\n vertexBufferOffset += numRingVertices * 2;\n }\n polygons[j] = geometryFactory.createPolygon(shell, rings);\n }\n geometries[geometryCounter++] = geometryFactory.createMultiPolygon(polygons);\n }\n else {\n for (let j = 0; j < numPolygons; j++) {\n const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n partOffsetCounter++;\n const rings = new Array(numRings - 1);\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n const shell = geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices)\n : decodeMortonDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, geometryFactory, mortonSettings);\n vertexOffsetsOffset += numVertices;\n for (let k = 0; k < rings.length; k++) {\n numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n rings[k] =\n geometryVector.vertexBufferType === VertexBufferType.VEC_2\n ? decodeDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices)\n : decodeMortonDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, geometryFactory, mortonSettings);\n vertexOffsetsOffset += numVertices;\n }\n polygons[j] = geometryFactory.createPolygon(shell, rings);\n }\n geometries[geometryCounter++] = geometryFactory.createMultiPolygon(polygons);\n }\n }\n else {\n throw new Error(\"The specified geometry type is currently not supported.\");\n }\n }\n return geometries;\n}\nfunction getLinearRing(vertexBuffer, startIndex, numVertices) {\n return getLineString(vertexBuffer, startIndex, numVertices, true);\n}\nfunction decodeDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffset, numVertices) {\n return decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, true);\n}\nfunction decodeMortonDictionaryEncodedLinearRing(vertexBuffer, vertexOffsets, vertexOffset, numVertices, geometryFactory, mortonSettings) {\n return decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, true, mortonSettings);\n}\nfunction getLineString(vertexBuffer, startIndex, numVertices, closeLineString) {\n const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);\n for (let i = 0; i < numVertices * 2; i += 2) {\n const x = vertexBuffer[startIndex + i];\n const y = vertexBuffer[startIndex + i + 1];\n vertices[i / 2] = new Point(x, y);\n }\n if (closeLineString) {\n vertices[vertices.length - 1] = vertices[0];\n }\n return vertices;\n}\nfunction decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString) {\n const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);\n for (let i = 0; i < numVertices * 2; i += 2) {\n const offset = vertexOffsets[vertexOffset + i / 2] * 2;\n const x = vertexBuffer[offset];\n const y = vertexBuffer[offset + 1];\n vertices[i / 2] = new Point(x, y);\n }\n if (closeLineString) {\n vertices[vertices.length - 1] = vertices[0];\n }\n return vertices;\n}\nfunction decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString, mortonSettings) {\n const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);\n for (let i = 0; i < numVertices; i++) {\n const offset = vertexOffsets[vertexOffset + i];\n const mortonEncodedVertex = vertexBuffer[offset];\n const vertex = decodeZOrderCurve(mortonEncodedVertex, mortonSettings.numBits, mortonSettings.coordinateShift);\n vertices[i] = new Point(vertex.x, vertex.y);\n }\n if (closeLineString) {\n vertices[vertices.length - 1] = vertices[0];\n }\n return vertices;\n}\n//# sourceMappingURL=geometryVectorConverter.js.map","import { convertGeometryVector } from \"./geometryVectorConverter\";\nimport { decodeZOrderCurve } from \"./zOrderCurve\";\nexport class GeometryVector {\n _vertexBufferType;\n _topologyVector;\n _vertexOffsets;\n _vertexBuffer;\n _mortonSettings;\n constructor(_vertexBufferType, _topologyVector, _vertexOffsets, _vertexBuffer, _mortonSettings) {\n this._vertexBufferType = _vertexBufferType;\n this._topologyVector = _topologyVector;\n this._vertexOffsets = _vertexOffsets;\n this._vertexBuffer = _vertexBuffer;\n this._mortonSettings = _mortonSettings;\n }\n get vertexBufferType() {\n return this._vertexBufferType;\n }\n get topologyVector() {\n return this._topologyVector;\n }\n get vertexOffsets() {\n return this._vertexOffsets;\n }\n get vertexBuffer() {\n return this._vertexBuffer;\n }\n *[Symbol.iterator]() {\n const geometries = convertGeometryVector(this);\n let index = 0;\n while (index < this.numGeometries) {\n yield { coordinates: geometries[index], type: this.geometryType(index) };\n index++;\n }\n }\n /* Allows faster access to the vertices since morton encoding is currently not used in the POC. Morton encoding\n will be used after adapting the shader to decode the morton codes on the GPU. */\n getSimpleEncodedVertex(index) {\n const offset = this.vertexOffsets ? this.vertexOffsets[index] * 2 : index * 2;\n const x = this.vertexBuffer[offset];\n const y = this.vertexBuffer[offset + 1];\n return [x, y];\n }\n //TODO: add scaling information to the constructor\n getVertex(index) {\n if (this.vertexOffsets && this.mortonSettings) {\n //TODO: move decoding of the morton codes on the GPU in the vertex shader\n const vertexOffset = this.vertexOffsets[index];\n const mortonEncodedVertex = this.vertexBuffer[vertexOffset];\n //TODO: improve performance -> inline calculation and move to decoding of VertexBuffer\n const vertex = decodeZOrderCurve(mortonEncodedVertex, this.mortonSettings.numBits, this.mortonSettings.coordinateShift);\n return [vertex.x, vertex.y];\n }\n const offset = this.vertexOffsets ? this.vertexOffsets[index] * 2 : index * 2;\n const x = this.vertexBuffer[offset];\n const y = this.vertexBuffer[offset + 1];\n return [x, y];\n }\n getGeometries() {\n return convertGeometryVector(this);\n }\n get mortonSettings() {\n return this._mortonSettings;\n }\n}\n//# sourceMappingURL=geometryVector.js.map","import { GeometryVector } from \"./geometryVector\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nimport { VertexBufferType } from \"./vertexBufferType\";\nexport function createConstGeometryVector(numGeometries, geometryType, topologyVector, vertexOffsets, vertexBuffer) {\n return new ConstGeometryVector(numGeometries, geometryType, VertexBufferType.VEC_2, topologyVector, vertexOffsets, vertexBuffer);\n}\nexport function createMortonEncodedConstGeometryVector(numGeometries, geometryType, topologyVector, vertexOffsets, vertexBuffer, mortonInfo) {\n return new ConstGeometryVector(numGeometries, geometryType, VertexBufferType.MORTON, topologyVector, vertexOffsets, vertexBuffer, mortonInfo);\n}\nexport class ConstGeometryVector extends GeometryVector {\n _numGeometries;\n _geometryType;\n constructor(_numGeometries, _geometryType, vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings) {\n super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);\n this._numGeometries = _numGeometries;\n this._geometryType = _geometryType;\n }\n geometryType(index) {\n return this._geometryType;\n }\n get numGeometries() {\n return this._numGeometries;\n }\n containsPolygonGeometry() {\n return this._geometryType === GEOMETRY_TYPE.POLYGON || this._geometryType === GEOMETRY_TYPE.MULTIPOLYGON;\n }\n containsSingleGeometryType() {\n return true;\n }\n}\n//# sourceMappingURL=constGeometryVector.js.map","import { GeometryVector } from \"./geometryVector\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nimport { VertexBufferType } from \"./vertexBufferType\";\nexport function createFlatGeometryVector(geometryTypes, topologyVector, vertexOffsets, vertexBuffer) {\n return new FlatGeometryVector(VertexBufferType.VEC_2, geometryTypes, topologyVector, vertexOffsets, vertexBuffer);\n}\nexport function createFlatGeometryVectorMortonEncoded(geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonInfo) {\n //TODO: refactor to use unsigned integers\n return new FlatGeometryVector(VertexBufferType.MORTON, geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonInfo);\n}\nexport class FlatGeometryVector extends GeometryVector {\n _geometryTypes;\n constructor(vertexBufferType, \n //TODO: refactor -> use UInt8Array\n _geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonSettings) {\n super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);\n this._geometryTypes = _geometryTypes;\n }\n geometryType(index) {\n return this._geometryTypes[index];\n }\n get numGeometries() {\n return this._geometryTypes.length;\n }\n containsPolygonGeometry() {\n for (let i = 0; i < this.numGeometries; i++) {\n if (this.geometryType(i) === GEOMETRY_TYPE.POLYGON || this.geometryType(i) === GEOMETRY_TYPE.MULTIPOLYGON) {\n return true;\n }\n }\n return false;\n }\n containsSingleGeometryType() {\n return false;\n }\n}\n//# sourceMappingURL=flatGeometryVector.js.map","import Point from \"@mapbox/point-geometry\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nexport class GpuVector {\n _triangleOffsets;\n _indexBuffer;\n _vertexBuffer;\n _topologyVector;\n constructor(_triangleOffsets, _indexBuffer, _vertexBuffer, _topologyVector) {\n this._triangleOffsets = _triangleOffsets;\n this._indexBuffer = _indexBuffer;\n this._vertexBuffer = _vertexBuffer;\n this._topologyVector = _topologyVector;\n }\n get triangleOffsets() {\n return this._triangleOffsets;\n }\n get indexBuffer() {\n return this._indexBuffer;\n }\n get vertexBuffer() {\n return this._vertexBuffer;\n }\n get topologyVector() {\n return this._topologyVector;\n }\n /**\n * Returns geometries as coordinate arrays by extracting polygon outlines from topology.\n * The vertexBuffer contains the outline vertices, separate from the tessellated triangles.\n */\n getGeometries() {\n if (!this._topologyVector) {\n throw new Error(\"Cannot convert GpuVector to coordinates without topology information\");\n }\n const geometries = new Array(this.numGeometries);\n const topology = this._topologyVector;\n const partOffsets = topology.partOffsets;\n const ringOffsets = topology.ringOffsets;\n const geometryOffsets = topology.geometryOffsets;\n // Use counters to track position in offset arrays (like Java implementation)\n let vertexBufferOffset = 0;\n let partOffsetCounter = 1;\n let ringOffsetsCounter = 1;\n let geometryOffsetsCounter = 1;\n for (let i = 0; i < this.numGeometries; i++) {\n const geometryType = this.geometryType(i);\n switch (geometryType) {\n case GEOMETRY_TYPE.POLYGON:\n {\n // Get number of rings for this polygon\n const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n partOffsetCounter++;\n const rings = [];\n for (let j = 0; j < numRings; j++) {\n // Get number of vertices in this ring\n const numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n const ring = [];\n for (let k = 0; k < numVertices; k++) {\n const x = this._vertexBuffer[vertexBufferOffset++];\n const y = this._vertexBuffer[vertexBufferOffset++];\n ring.push(new Point(x, y));\n }\n // Close the ring by duplicating the first vertex (MVT format requirement)\n if (ring.length > 0) {\n ring.push(ring[0]);\n }\n rings.push(ring);\n }\n geometries[i] = rings;\n if (geometryOffsets)\n geometryOffsetsCounter++;\n }\n break;\n case GEOMETRY_TYPE.MULTIPOLYGON:\n {\n // Get number of polygons in this multipolygon\n const numPolygons = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];\n geometryOffsetsCounter++;\n const allRings = [];\n for (let p = 0; p < numPolygons; p++) {\n // Get number of rings in this polygon\n const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];\n partOffsetCounter++;\n for (let j = 0; j < numRings; j++) {\n // Get number of vertices in this ring\n const numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];\n ringOffsetsCounter++;\n const ring = [];\n for (let k = 0; k < numVertices; k++) {\n const x = this._vertexBuffer[vertexBufferOffset++];\n const y = this._vertexBuffer[vertexBufferOffset++];\n ring.push(new Point(x, y));\n }\n // Close the ring by duplicating the first vertex (MVT format requirement)\n if (ring.length > 0) {\n ring.push(ring[0]);\n }\n allRings.push(ring);\n }\n }\n geometries[i] = allRings;\n }\n break;\n }\n }\n return geometries;\n }\n [Symbol.iterator]() {\n /*for(let i = 1; i < this.triangleOffsets.length; i++) {\n const numTriangles = this.triangleOffsets[i] - this.triangleOffsets[i-1];\n const startIndex = this.triangleOffsets[i-1] * 3;\n const endIndex = this.triangleOffsets[i] * 3;\n }\n\n while (index < this.numGeometries) {\n yield geometries[index++];\n }*/\n //throw new Error(\"Iterator on a GpuVector is not implemented yet.\");\n return null;\n }\n}\n//# sourceMappingURL=gpuVector.js.map","import { GpuVector } from \"./gpuVector\";\nexport function createConstGpuVector(numGeometries, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {\n return new ConstGpuVector(numGeometries, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n}\n//TODO: extend from GeometryVector -> make topology vector optional\nexport class ConstGpuVector extends GpuVector {\n _numGeometries;\n _geometryType;\n constructor(_numGeometries, _geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {\n super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n this._numGeometries = _numGeometries;\n this._geometryType = _geometryType;\n }\n geometryType(index) {\n return this._geometryType;\n }\n get numGeometries() {\n return this._numGeometries;\n }\n containsSingleGeometryType() {\n return true;\n }\n}\n//# sourceMappingURL=constGpuVector.js.map","import { GpuVector } from \"./gpuVector\";\nexport function createFlatGpuVector(geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {\n return new FlatGpuVector(geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n}\n//TODO: extend from GeometryVector -> make topology vector optional\nexport class FlatGpuVector extends GpuVector {\n _geometryTypes;\n constructor(_geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {\n super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n this._geometryTypes = _geometryTypes;\n }\n geometryType(index) {\n return this._geometryTypes[index];\n }\n get numGeometries() {\n return this._geometryTypes.length;\n }\n containsSingleGeometryType() {\n return false;\n }\n}\n//# sourceMappingURL=flatGpuVector.js.map","import { decodeStreamMetadata } from \"../metadata/tile/streamMetadataDecoder\";\nimport { decodeConstIntStream, decodeIntStream, decodeLengthStreamToOffsetBuffer, getVectorType, } from \"./integerStreamDecoder\";\nimport { VectorType } from \"../vector/vectorType\";\nimport { PhysicalStreamType } from \"../metadata/tile/physicalStreamType\";\nimport { LengthType } from \"../metadata/tile/lengthType\";\nimport { DictionaryType } from \"../metadata/tile/dictionaryType\";\nimport TopologyVector from \"../vector/geometry/topologyVector\";\nimport { createConstGeometryVector, createMortonEncodedConstGeometryVector, } from \"../vector/geometry/constGeometryVector\";\nimport { createFlatGeometryVector, createFlatGeometryVectorMortonEncoded, } from \"../vector/geometry/flatGeometryVector\";\nimport { OffsetType } from \"../metadata/tile/offsetType\";\nimport { createConstGpuVector } from \"../vector/geometry/constGpuVector\";\nimport { createFlatGpuVector } from \"../vector/geometry/flatGpuVector\";\n// TODO: get rid of numFeatures parameter\nexport function decodeGeometryColumn(tile, numStreams, offset, numFeatures, scalingData) {\n const geometryTypeMetadata = decodeStreamMetadata(tile, offset);\n const geometryTypesVectorType = getVectorType(geometryTypeMetadata, numFeatures, tile, offset);\n let geometryOffsets = null;\n let partOffsets = null;\n let ringOffsets = null;\n let vertexOffsets = null;\n let vertexBuffer = null;\n let mortonSettings = null;\n //TODO: use geometryOffsets for that? -> but then tessellated polygons can't be used with normal polygons\n // in one FeatureTable?\n let triangleOffsets = null;\n let indexBuffer = null;\n if (geometryTypesVectorType === VectorType.CONST) {\n /* All geometries in the colum have the same geometry type */\n const geometryType = decodeConstIntStream(tile, offset, geometryTypeMetadata, false);\n for (let i = 0; i < numStreams - 1; i++) {\n const geometryStreamMetadata = decodeStreamMetadata(tile, offset);\n switch (geometryStreamMetadata.physicalStreamType) {\n case PhysicalStreamType.LENGTH:\n switch (geometryStreamMetadata.logicalStreamType.lengthType) {\n case LengthType.GEOMETRIES:\n geometryOffsets = decodeLengthStreamToOffsetBuffer(tile, offset, geometryStreamMetadata);\n break;\n case LengthType.PARTS:\n partOffsets = decodeLengthStreamToOffsetBuffer(tile, offset, geometryStreamMetadata);\n break;\n case LengthType.RINGS:\n ringOffsets = decodeLengthStreamToOffsetBuffer(tile, offset, geometryStreamMetadata);\n break;\n case LengthType.TRIANGLES:\n triangleOffsets = decodeLengthStreamToOffsetBuffer(tile, offset, geometryStreamMetadata);\n }\n break;\n case PhysicalStreamType.OFFSET: {\n switch (geometryStreamMetadata.logicalStreamType.offsetType) {\n case OffsetType.VERTEX:\n vertexOffsets = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n case OffsetType.INDEX:\n indexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n }\n break;\n }\n case PhysicalStreamType.DATA: {\n if (DictionaryType.VERTEX === geometryStreamMetadata.logicalStreamType.dictionaryType) {\n vertexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, true, scalingData);\n }\n else {\n const mortonMetadata = geometryStreamMetadata;\n mortonSettings = {\n numBits: mortonMetadata.numBits,\n coordinateShift: mortonMetadata.coordinateShift,\n };\n vertexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, false, scalingData);\n }\n break;\n }\n }\n }\n if (indexBuffer !== null) {\n if (geometryOffsets != null || partOffsets != null) {\n /* Case when the indices of a Polygon outline are encoded in the tile */\n const topologyVector = new TopologyVector(geometryOffsets, partOffsets, ringOffsets);\n return createConstGpuVector(numFeatures, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n }\n /* Case when the no Polygon outlines are encoded in the tile */\n return createConstGpuVector(numFeatures, geometryType, triangleOffsets, indexBuffer, vertexBuffer);\n }\n return mortonSettings === null\n ? /* Currently only 2D coordinates (Vec2) are implemented in the encoder */\n createConstGeometryVector(numFeatures, geometryType, new TopologyVector(geometryOffsets, partOffsets, ringOffsets), vertexOffsets, vertexBuffer)\n : createMortonEncodedConstGeometryVector(numFeatures, geometryType, new TopologyVector(geometryOffsets, partOffsets, ringOffsets), vertexOffsets, vertexBuffer, mortonSettings);\n }\n /* Different geometry types are mixed in the geometry column */\n const geometryTypeVector = decodeIntStream(tile, offset, geometryTypeMetadata, false);\n for (let i = 0; i < numStreams - 1; i++) {\n const geometryStreamMetadata = decodeStreamMetadata(tile, offset);\n switch (geometryStreamMetadata.physicalStreamType) {\n case PhysicalStreamType.LENGTH:\n switch (geometryStreamMetadata.logicalStreamType.lengthType) {\n case LengthType.GEOMETRIES:\n geometryOffsets = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n case LengthType.PARTS:\n partOffsets = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n case LengthType.RINGS:\n ringOffsets = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n case LengthType.TRIANGLES:\n triangleOffsets = decodeLengthStreamToOffsetBuffer(tile, offset, geometryStreamMetadata);\n }\n break;\n case PhysicalStreamType.OFFSET:\n switch (geometryStreamMetadata.logicalStreamType.offsetType) {\n case OffsetType.VERTEX:\n vertexOffsets = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n case OffsetType.INDEX:\n indexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, false);\n break;\n }\n break;\n case PhysicalStreamType.DATA:\n if (DictionaryType.VERTEX === geometryStreamMetadata.logicalStreamType.dictionaryType) {\n vertexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, true, scalingData);\n }\n else {\n const mortonMetadata = geometryStreamMetadata;\n mortonSettings = {\n numBits: mortonMetadata.numBits,\n coordinateShift: mortonMetadata.coordinateShift,\n };\n vertexBuffer = decodeIntStream(tile, offset, geometryStreamMetadata, false, scalingData);\n }\n break;\n }\n }\n if (indexBuffer !== null && partOffsets === null) {\n /* Case when the indices of a Polygon outline are not encoded in the data so no\n * topology data are present in the tile */\n return createFlatGpuVector(geometryTypeVector, triangleOffsets, indexBuffer, vertexBuffer);\n }\n // TODO: refactor the following instructions -> decode in one pass for performance reasons\n /* Calculate the offsets from the length buffer for util access */\n if (geometryOffsets !== null) {\n geometryOffsets = decodeRootLengthStream(geometryTypeVector, geometryOffsets, 2);\n if (partOffsets !== null && ringOffsets !== null) {\n partOffsets = decodeLevel1LengthStream(geometryTypeVector, geometryOffsets, partOffsets, false);\n ringOffsets = decodeLevel2LengthStream(geometryTypeVector, geometryOffsets, partOffsets, ringOffsets);\n }\n else if (partOffsets !== null) {\n partOffsets = decodeLevel1WithoutRingBufferLengthStream(geometryTypeVector, geometryOffsets, partOffsets);\n }\n }\n else if (partOffsets !== null && ringOffsets !== null) {\n partOffsets = decodeRootLengthStream(geometryTypeVector, partOffsets, 1);\n ringOffsets = decodeLevel1LengthStream(geometryTypeVector, partOffsets, ringOffsets, true);\n }\n else if (partOffsets !== null) {\n partOffsets = decodeRootLengthStream(geometryTypeVector, partOffsets, 0);\n }\n if (indexBuffer !== null) {\n /* Case when the indices of a Polygon outline are encoded in the tile */\n return createFlatGpuVector(geometryTypeVector, triangleOffsets, indexBuffer, vertexBuffer, new TopologyVector(geometryOffsets, partOffsets, ringOffsets));\n }\n return mortonSettings === null /* Currently only 2D coordinates (Vec2) are implemented in the encoder */\n ? createFlatGeometryVector(geometryTypeVector, new TopologyVector(geometryOffsets, partOffsets, ringOffsets), vertexOffsets, vertexBuffer)\n : createFlatGeometryVectorMortonEncoded(geometryTypeVector, new TopologyVector(geometryOffsets, partOffsets, ringOffsets), vertexOffsets, vertexBuffer, mortonSettings);\n}\n/*\n * Handle the parsing of the different topology length buffers separate not generic to reduce the\n * branching and improve the performance\n */\nfunction decodeRootLengthStream(geometryTypes, rootLengthStream, bufferId) {\n const rootBufferOffsets = new Int32Array(geometryTypes.length + 1);\n let previousOffset = 0;\n rootBufferOffsets[0] = previousOffset;\n let rootLengthCounter = 0;\n for (let i = 0; i < geometryTypes.length; i++) {\n /* Test if the geometry has and entry in the root buffer\n * BufferId: 2 GeometryOffsets -> MultiPolygon, MultiLineString, MultiPoint\n * BufferId: 1 PartOffsets -> Polygon\n * BufferId: 0 PartOffsets, RingOffsets -> LineString\n * */\n previousOffset = rootBufferOffsets[i + 1] =\n previousOffset + (geometryTypes[i] > bufferId ? rootLengthStream[rootLengthCounter++] : 1);\n }\n return rootBufferOffsets;\n}\nfunction decodeLevel1LengthStream(geometryTypes, rootOffsetBuffer, level1LengthBuffer, isLineStringPresent) {\n const level1BufferOffsets = new Int32Array(rootOffsetBuffer[rootOffsetBuffer.length - 1] + 1);\n let previousOffset = 0;\n level1BufferOffsets[0] = previousOffset;\n let level1BufferCounter = 1;\n let level1LengthBufferCounter = 0;\n for (let i = 0; i < geometryTypes.length; i++) {\n const geometryType = geometryTypes[i];\n const numGeometries = rootOffsetBuffer[i + 1] - rootOffsetBuffer[i];\n if (geometryType === 5 ||\n geometryType === 2 ||\n (isLineStringPresent && (geometryType === 4 || geometryType === 1))) {\n /* For MultiPolygon, Polygon and in some cases for MultiLineString and LineString\n * a value in the level1LengthBuffer exists */\n for (let j = 0; j < numGeometries; j++) {\n previousOffset = level1BufferOffsets[level1BufferCounter++] =\n previousOffset + level1LengthBuffer[level1LengthBufferCounter++];\n }\n }\n else {\n /* For MultiPoint and Point and in some cases for MultiLineString and LineString no value in the\n * level1LengthBuffer exists */\n for (let j = 0; j < numGeometries; j++) {\n level1BufferOffsets[level1BufferCounter++] = ++previousOffset;\n }\n }\n }\n return level1BufferOffsets;\n}\n/*\n * Case where no ring buffer exists so no MultiPolygon or Polygon geometry is part of the buffer\n */\nfunction decodeLevel1WithoutRingBufferLengthStream(geometryTypes, rootOffsetBuffer, level1LengthBuffer) {\n const level1BufferOffsets = new Int32Array(rootOffsetBuffer[rootOffsetBuffer.length - 1] + 1);\n let previousOffset = 0;\n level1BufferOffsets[0] = previousOffset;\n let level1OffsetBufferCounter = 1;\n let level1LengthCounter = 0;\n for (let i = 0; i < geometryTypes.length; i++) {\n const geometryType = geometryTypes[i];\n const numGeometries = rootOffsetBuffer[i + 1] - rootOffsetBuffer[i];\n if (geometryType === 4 || geometryType === 1) {\n /* For MultiLineString and LineString a value in the level1LengthBuffer exists */\n for (let j = 0; j < numGeometries; j++) {\n previousOffset = level1BufferOffsets[level1OffsetBufferCounter++] =\n previousOffset + level1LengthBuffer[level1LengthCounter++];\n }\n }\n else {\n /* For MultiPoint and Point no value in level1LengthBuffer exists */\n for (let j = 0; j < numGeometries; j++) {\n level1BufferOffsets[level1OffsetBufferCounter++] = ++previousOffset;\n }\n }\n }\n return level1BufferOffsets;\n}\nfunction decodeLevel2LengthStream(geometryTypes, rootOffsetBuffer, level1OffsetBuffer, level2LengthBuffer) {\n const level2BufferOffsets = new Int32Array(level1OffsetBuffer[level1OffsetBuffer.length - 1] + 1);\n let previousOffset = 0;\n level2BufferOffsets[0] = previousOffset;\n let level1OffsetBufferCounter = 1;\n let level2OffsetBufferCounter = 1;\n let level2LengthBufferCounter = 0;\n for (let i = 0; i < geometryTypes.length; i++) {\n const geometryType = geometryTypes[i];\n const numGeometries = rootOffsetBuffer[i + 1] - rootOffsetBuffer[i];\n if (geometryType !== 0 && geometryType !== 3) {\n /* For MultiPolygon, MultiLineString, Polygon and LineString a value in level2LengthBuffer\n * exists */\n for (let j = 0; j < numGeometries; j++) {\n const numParts = level1OffsetBuffer[level1OffsetBufferCounter] - level1OffsetBuffer[level1OffsetBufferCounter - 1];\n level1OffsetBufferCounter++;\n for (let k = 0; k < numParts; k++) {\n previousOffset = level2BufferOffsets[level2OffsetBufferCounter++] =\n previousOffset + level2LengthBuffer[level2LengthBufferCounter++];\n }\n }\n }\n else {\n /* For MultiPoint and Point no value in level2LengthBuffer exists */\n for (let j = 0; j < numGeometries; j++) {\n level2BufferOffsets[level2OffsetBufferCounter++] = ++previousOffset;\n level1OffsetBufferCounter++;\n }\n }\n }\n return level2BufferOffsets;\n}\n//# sourceMappingURL=geometryDecoder.js.map","import Vector from \"../vector\";\nexport class BooleanFlatVector extends Vector {\n dataVector;\n constructor(name, dataVector, sizeOrNullabilityBuffer) {\n super(name, dataVector.getBuffer(), sizeOrNullabilityBuffer);\n this.dataVector = dataVector;\n }\n getValueFromBuffer(index) {\n return this.dataVector.get(index);\n }\n}\n//# sourceMappingURL=booleanFlatVector.js.map","import { FixedSizeVector } from \"../fixedSizeVector\";\nexport class FloatFlatVector extends FixedSizeVector {\n getValueFromBuffer(index) {\n return this.dataBuffer[index];\n }\n}\n//# sourceMappingURL=floatFlatVector.js.map","import Vector from \"../vector\";\nexport class LongConstVector extends Vector {\n constructor(name, value, sizeOrNullabilityBuffer) {\n super(name, BigInt64Array.of(value), sizeOrNullabilityBuffer);\n }\n getValueFromBuffer(index) {\n return this.dataBuffer[0];\n }\n}\n//# sourceMappingURL=longConstVector.js.map","import { VectorType } from \"../vector/vectorType\";\nimport BitVector from \"../vector/flat/bitVector\";\nimport { decodeStreamMetadata } from \"../metadata/tile/streamMetadataDecoder\";\nexport function skipColumn(numStreams, tile, offset) {\n //TODO: add size of column in Mlt for fast skipping\n for (let i = 0; i < numStreams; i++) {\n const streamMetadata = decodeStreamMetadata(tile, offset);\n offset.add(streamMetadata.byteLength);\n }\n}\nexport function decodeBooleanRle(buffer, numBooleans, pos) {\n const numBytes = Math.ceil(numBooleans / 8.0);\n return decodeByteRle(buffer, numBytes, pos);\n}\nexport function decodeNullableBooleanRle(buffer, numBooleans, pos, nullabilityBuffer) {\n // TODO: refactor quick and dirty solution -> use solution in one pass\n const numBytes = Math.ceil(numBooleans / 8);\n const values = decodeByteRle(buffer, numBytes, pos);\n const bitVector = new BitVector(values, numBooleans);\n const size = nullabilityBuffer.size();\n const nullableBitvector = new BitVector(new Uint8Array(size), size);\n let valueCounter = 0;\n for (let i = 0; i < nullabilityBuffer.size(); i++) {\n const value = nullabilityBuffer.get(i) ? bitVector.get(valueCounter++) : false;\n nullableBitvector.set(i, value);\n }\n return nullableBitvector.getBuffer();\n}\nexport function decodeByteRle(buffer, numBytes, pos) {\n const values = new Uint8Array(numBytes);\n let valueOffset = 0;\n while (valueOffset < numBytes) {\n const header = buffer[pos.increment()];\n /* Runs */\n if (header <= 0x7f) {\n const numRuns = header + 3;\n const value = buffer[pos.increment()];\n const endValueOffset = valueOffset + numRuns;\n values.fill(value, valueOffset, endValueOffset);\n valueOffset = endValueOffset;\n }\n else {\n /* Literals */\n const numLiterals = 256 - header;\n for (let i = 0; i < numLiterals; i++) {\n values[valueOffset++] = buffer[pos.increment()];\n }\n }\n }\n return values;\n}\nexport function decodeFloatsLE(encodedValues, pos, numValues) {\n const currentPos = pos.get();\n const newOffset = currentPos + numValues * Float32Array.BYTES_PER_ELEMENT;\n const newBuf = new Uint8Array(encodedValues.subarray(currentPos, newOffset)).buffer;\n const fb = new Float32Array(newBuf);\n pos.set(newOffset);\n return fb;\n}\nexport function decodeDoublesLE(encodedValues, pos, numValues) {\n const currentPos = pos.get();\n const newOffset = currentPos + numValues * Float64Array.BYTES_PER_ELEMENT;\n const newBuf = new Uint8Array(encodedValues.subarray(currentPos, newOffset)).buffer;\n const fb = new Float64Array(newBuf);\n pos.set(newOffset);\n return fb;\n}\nexport function decodeNullableFloatsLE(encodedValues, pos, nullabilityBuffer, numValues) {\n const currentPos = pos.get();\n const newOffset = currentPos + numValues * Float32Array.BYTES_PER_ELEMENT;\n const newBuf = new Uint8Array(encodedValues.subarray(currentPos, newOffset)).buffer;\n const fb = new Float32Array(newBuf);\n pos.set(newOffset);\n const numTotalValues = nullabilityBuffer.size();\n const nullableFloatsBuffer = new Float32Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numTotalValues; i++) {\n nullableFloatsBuffer[i] = nullabilityBuffer.get(i) ? fb[offset++] : 0;\n }\n return nullableFloatsBuffer;\n}\nexport function decodeNullableDoublesLE(encodedValues, pos, nullabilityBuffer, numValues) {\n const currentPos = pos.get();\n const newOffset = currentPos + numValues * Float64Array.BYTES_PER_ELEMENT;\n const newBuf = new Uint8Array(encodedValues.subarray(currentPos, newOffset)).buffer;\n const fb = new Float64Array(newBuf);\n pos.set(newOffset);\n const numTotalValues = nullabilityBuffer.size();\n const nullableDoubleBuffer = new Float64Array(numTotalValues);\n let offset = 0;\n for (let i = 0; i < numTotalValues; i++) {\n nullableDoubleBuffer[i] = nullabilityBuffer.get(i) ? fb[offset++] : 0;\n }\n return nullableDoubleBuffer;\n}\nconst TEXT_DECODER_MIN_LENGTH = 12;\nconst utf8TextDecoder = new TextDecoder();\n// Source: https://github.com/mapbox/pbf/issues/106\nexport function decodeString(buf, pos, end) {\n if (end - pos >= TEXT_DECODER_MIN_LENGTH) {\n // longer strings are fast with the built-in browser TextDecoder API\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n }\n // short strings are fast with custom implementation\n return readUtf8(buf, pos, end);\n}\nfunction readUtf8(buf, pos, end) {\n let str = \"\";\n let i = pos;\n while (i < end) {\n const b0 = buf[i];\n let c = null; // codepoint\n let bytesPerSequence = b0 > 0xef ? 4 : b0 > 0xdf ? 3 : b0 > 0xbf ? 2 : 1;\n if (i + bytesPerSequence > end)\n break;\n let b1, b2, b3;\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n }\n else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xc0) === 0x80) {\n c = ((b0 & 0x1f) << 0x6) | (b1 & 0x3f);\n if (c <= 0x7f) {\n c = null;\n }\n }\n }\n else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xc0) === 0x80 && (b2 & 0xc0) === 0x80) {\n c = ((b0 & 0xf) << 0xc) | ((b1 & 0x3f) << 0x6) | (b2 & 0x3f);\n if (c <= 0x7ff || (c >= 0xd800 && c <= 0xdfff)) {\n c = null;\n }\n }\n }\n else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xc0) === 0x80 && (b2 & 0xc0) === 0x80 && (b3 & 0xc0) === 0x80) {\n c = ((b0 & 0xf) << 0x12) | ((b1 & 0x3f) << 0xc) | ((b2 & 0x3f) << 0x6) | (b3 & 0x3f);\n if (c <= 0xffff || c >= 0x110000) {\n c = null;\n }\n }\n }\n if (c === null) {\n c = 0xfffd;\n bytesPerSequence = 1;\n }\n else if (c > 0xffff) {\n c -= 0x10000;\n str += String.fromCharCode(((c >>> 10) & 0x3ff) | 0xd800);\n c = 0xdc00 | (c & 0x3ff);\n }\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n return str;\n}\nexport function getVectorTypeBooleanStream(numFeatures, byteLength, data, offset) {\n const valuesPerRun = 0x83;\n // TODO: use VectorType metadata field for to test which VectorType is used\n return Math.ceil(numFeatures / valuesPerRun) * 2 == byteLength &&\n /* Test the first value byte if all bits are set to true */\n (data[offset.get() + 1] & 0xff) === (bitCount(numFeatures) << 2) - 1\n ? VectorType.CONST\n : VectorType.FLAT;\n}\nfunction bitCount(number) {\n //TODO: refactor to get rid of special case handling\n return number === 0 ? 1 : Math.floor(Math.log2(number) + 1);\n}\n//# sourceMappingURL=decodingUtils.js.map","import Vector from \"./vector\";\nexport class VariableSizeVector extends Vector {\n offsetBuffer;\n //TODO: switch to Uint32Array by changing the decodings\n constructor(name, offsetBuffer, dataBuffer, sizeOrNullabilityBuffer) {\n super(name, dataBuffer, sizeOrNullabilityBuffer);\n this.offsetBuffer = offsetBuffer;\n }\n}\n//# sourceMappingURL=variableSizeVector.js.map","import { VariableSizeVector } from \"../variableSizeVector\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\nexport class StringFlatVector extends VariableSizeVector {\n textEncoder;\n constructor(name, offsetBuffer, dataBuffer, nullabilityBuffer) {\n super(name, offsetBuffer, dataBuffer, nullabilityBuffer ?? offsetBuffer.length - 1);\n this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(index) {\n const start = this.offsetBuffer[index];\n const end = this.offsetBuffer[index + 1];\n return decodeString(this.dataBuffer, start, end);\n }\n}\n//# sourceMappingURL=stringFlatVector.js.map","import { VariableSizeVector } from \"../variableSizeVector\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\nexport class StringDictionaryVector extends VariableSizeVector {\n indexBuffer;\n textEncoder;\n constructor(name, indexBuffer, offsetBuffer, dictionaryBuffer, nullabilityBuffer) {\n super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer ?? indexBuffer.length);\n this.indexBuffer = indexBuffer;\n this.indexBuffer = indexBuffer;\n this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(index) {\n const offset = this.indexBuffer[index];\n const start = this.offsetBuffer[offset];\n const end = this.offsetBuffer[offset + 1];\n return decodeString(this.dataBuffer, start, end);\n }\n}\n//# sourceMappingURL=stringDictionaryVector.js.map","import { VariableSizeVector } from \"../variableSizeVector\";\nimport { decodeFsst } from \"../../decoding/fsstDecoder\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\nexport class StringFsstDictionaryVector extends VariableSizeVector {\n indexBuffer;\n symbolOffsetBuffer;\n symbolTableBuffer;\n textEncoder;\n // TODO: extend from StringVector\n symbolLengthBuffer;\n lengthBuffer;\n decodedDictionary;\n constructor(name, indexBuffer, offsetBuffer, dictionaryBuffer, symbolOffsetBuffer, symbolTableBuffer, nullabilityBuffer) {\n super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer);\n this.indexBuffer = indexBuffer;\n this.symbolOffsetBuffer = symbolOffsetBuffer;\n this.symbolTableBuffer = symbolTableBuffer;\n this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(index) {\n //if (this.decodedValues == null) {\n /*if (this.decodedDictionary == null) {\n if (this.symbolLengthBuffer == null) {\n // TODO: change FsstEncoder to take offsets instead of length to get rid of this conversion\n this.symbolLengthBuffer = this.offsetToLengthBuffer(this.symbolOffsetBuffer);\n this.lengthBuffer = this.offsetToLengthBuffer(this.offsetBuffer);\n }\n\n const dictionaryBuffer = decodeFsst(this.symbolTableBuffer, this.symbolLengthBuffer,\n this.dataBuffer);\n\n this.decodedDictionary = new Array(this.lengthBuffer.length);\n let i = 0;\n let strStart = 0;\n for (const strLength of this.lengthBuffer) {\n this.decodedDictionary[i++] = decodeString(dictionaryBuffer, strStart, strStart + strLength);\n strStart += strLength;\n }\n\n /!*this.decodedValues = new Array(this.indexBuffer.length);\n i = 0;\n for (const index of this.indexBuffer) {\n const value = decodedDictionary[index];\n this.decodedValues[i++] = value;\n }*!/\n }*/\n /*this.decodedValues = new Array(this.indexBuffer.length);\n i = 0;\n for (const index of this.indexBuffer) {\n const value = decodedDictionary[index];\n this.decodedValues[i++] = value;\n }*/\n if (this.decodedDictionary == null) {\n if (this.symbolLengthBuffer == null) {\n // TODO: change FsstEncoder to take offsets instead of length to get rid of this conversion\n this.symbolLengthBuffer = this.offsetToLengthBuffer(this.symbolOffsetBuffer);\n this.lengthBuffer = this.offsetToLengthBuffer(this.offsetBuffer);\n }\n this.decodedDictionary = decodeFsst(this.symbolTableBuffer, this.symbolLengthBuffer, this.dataBuffer);\n }\n const offset = this.indexBuffer[index];\n const start = this.offsetBuffer[offset];\n const end = this.offsetBuffer[offset + 1];\n return decodeString(this.decodedDictionary, start, end);\n }\n // TODO: get rid of that conversion\n offsetToLengthBuffer(offsetBuffer) {\n const lengthBuffer = new Uint32Array(offsetBuffer.length - 1);\n let previousOffset = offsetBuffer[0];\n for (let i = 1; i < offsetBuffer.length; i++) {\n const offset = offsetBuffer[i];\n lengthBuffer[i - 1] = offset - previousOffset;\n previousOffset = offset;\n }\n return lengthBuffer;\n }\n}\n//# sourceMappingURL=stringFsstDictionaryVector.js.map","/**\n * Decode FSST compressed data\n *\n * @param symbols Array of symbols, where each symbol can be between 1 and 8 bytes\n * @param symbolLengths Array of symbol lengths, length of each symbol in symbols array\n * @param compressedData FSST Compressed data, where each entry is an index to the symbols array\n * @returns Decoded data as Uint8Array\n */\n//TODO: improve -> quick and dirty implementation\nexport function decodeFsst(symbols, symbolLengths, compressedData) {\n //TODO: use typed array directly\n const decodedData = [];\n const symbolOffsets = new Array(symbolLengths.length).fill(0);\n for (let i = 1; i < symbolLengths.length; i++) {\n symbolOffsets[i] = symbolOffsets[i - 1] + symbolLengths[i - 1];\n }\n for (let i = 0; i < compressedData.length; i++) {\n if (compressedData[i] === 255) {\n decodedData.push(compressedData[++i]);\n }\n else {\n const symbolLength = symbolLengths[compressedData[i]];\n const symbolOffset = symbolOffsets[compressedData[i]];\n for (let j = 0; j < symbolLength; j++) {\n decodedData.push(symbols[symbolOffset + j]);\n }\n }\n }\n return new Uint8Array(decodedData);\n}\n//# sourceMappingURL=fsstDecoder.js.map","import { ScalarType } from \"../metadata/tileset/tilesetMetadata\";\nimport BitVector from \"../vector/flat/bitVector\";\nimport { decodeStreamMetadata } from \"../metadata/tile/streamMetadataDecoder\";\nimport { VectorType } from \"../vector/vectorType\";\nimport { BooleanFlatVector } from \"../vector/flat/booleanFlatVector\";\nimport { DoubleFlatVector } from \"../vector/flat/doubleFlatVector\";\nimport { FloatFlatVector } from \"../vector/flat/floatFlatVector\";\nimport { LongConstVector } from \"../vector/constant/longConstVector\";\nimport { LongFlatVector } from \"../vector/flat/longFlatVector\";\nimport { IntFlatVector } from \"../vector/flat/intFlatVector\";\nimport { IntConstVector } from \"../vector/constant/intConstVector\";\nimport { decodeBooleanRle, decodeDoublesLE, decodeFloatsLE, decodeNullableBooleanRle, decodeNullableDoublesLE, decodeNullableFloatsLE, skipColumn, } from \"./decodingUtils\";\nimport { decodeConstIntStream, decodeConstLongStream, decodeIntStream, decodeLongStream, decodeNullableIntStream, decodeNullableLongStream, decodeSequenceIntStream, decodeSequenceLongStream, getVectorType, } from \"./integerStreamDecoder\";\nimport { IntSequenceVector } from \"../vector/sequence/intSequenceVector\";\nimport { LongSequenceVector } from \"../vector/sequence/longSequenceVector\";\nimport { decodeSharedDictionary, decodeString } from \"./stringDecoder\";\nexport function decodePropertyColumn(data, offset, columnMetadata, numStreams, numFeatures, propertyColumnNames) {\n if (columnMetadata.type === \"scalarType\") {\n if (propertyColumnNames && !propertyColumnNames.has(columnMetadata.name)) {\n skipColumn(numStreams, data, offset);\n return null;\n }\n return decodeScalarPropertyColumn(numStreams, data, offset, numFeatures, columnMetadata.scalarType, columnMetadata);\n }\n if (numStreams != 1) {\n return null;\n }\n return decodeSharedDictionary(data, offset, columnMetadata, numFeatures, propertyColumnNames);\n}\nfunction decodeScalarPropertyColumn(numStreams, data, offset, numFeatures, column, columnMetadata) {\n let nullabilityBuffer = null;\n let numValues = 0;\n if (numStreams === 0) {\n /* Skip since this column has no values */\n return null;\n }\n // Read nullability stream if column is nullable\n if (columnMetadata.nullable) {\n const presentStreamMetadata = decodeStreamMetadata(data, offset);\n numValues = presentStreamMetadata.numValues;\n const streamDataStart = offset.get();\n // Decode the RLE boolean data\n const presentVector = decodeBooleanRle(data, numValues, offset);\n // FIX: decodeBooleanRle doesn't consume all bytes!\n // We must advance to the end of the stream using byteLength from metadata\n offset.set(streamDataStart + presentStreamMetadata.byteLength);\n nullabilityBuffer = new BitVector(presentVector, presentStreamMetadata.numValues);\n }\n const sizeOrNullabilityBuffer = nullabilityBuffer ?? numFeatures;\n const scalarType = column.physicalType;\n switch (scalarType) {\n case ScalarType.UINT_32:\n case ScalarType.INT_32:\n return decodeIntColumn(data, offset, columnMetadata, column, sizeOrNullabilityBuffer);\n case ScalarType.STRING:\n // In embedded format: numStreams includes nullability stream if column is nullable\n const stringDataStreams = columnMetadata.nullable ? numStreams - 1 : numStreams;\n return decodeString(columnMetadata.name, data, offset, stringDataStreams, nullabilityBuffer);\n case ScalarType.BOOLEAN:\n return decodeBooleanColumn(data, offset, columnMetadata, numFeatures, sizeOrNullabilityBuffer);\n case ScalarType.UINT_64:\n case ScalarType.INT_64:\n return decodeLongColumn(data, offset, columnMetadata, sizeOrNullabilityBuffer, column);\n case ScalarType.FLOAT:\n return decodeFloatColumn(data, offset, columnMetadata, sizeOrNullabilityBuffer);\n case ScalarType.DOUBLE:\n return decodeDoubleColumn(data, offset, columnMetadata, sizeOrNullabilityBuffer);\n default:\n throw new Error(`The specified data type for the field is currently not supported: ${column}`);\n }\n}\nfunction decodeBooleanColumn(data, offset, column, numFeatures, sizeOrNullabilityBuffer) {\n const dataStreamMetadata = decodeStreamMetadata(data, offset);\n const numValues = dataStreamMetadata.numValues;\n const streamDataStart = offset.get();\n const dataStream = isNullabilityBuffer(sizeOrNullabilityBuffer)\n ? decodeNullableBooleanRle(data, numValues, offset, sizeOrNullabilityBuffer)\n : decodeBooleanRle(data, numValues, offset);\n // TODO: refactor decodeNullableBooleanRle\n // Fix offset: RLE decoders don't consume all compressed bytes\n offset.set(streamDataStart + dataStreamMetadata.byteLength);\n const dataVector = new BitVector(dataStream, numValues);\n return new BooleanFlatVector(column.name, dataVector, sizeOrNullabilityBuffer);\n}\nfunction decodeFloatColumn(data, offset, column, sizeOrNullabilityBuffer) {\n const dataStreamMetadata = decodeStreamMetadata(data, offset);\n const dataStream = isNullabilityBuffer(sizeOrNullabilityBuffer)\n ? decodeNullableFloatsLE(data, offset, sizeOrNullabilityBuffer, dataStreamMetadata.numValues)\n : decodeFloatsLE(data, offset, dataStreamMetadata.numValues);\n return new FloatFlatVector(column.name, dataStream, sizeOrNullabilityBuffer);\n}\nfunction decodeDoubleColumn(data, offset, column, sizeOrNullabilityBuffer) {\n const dataStreamMetadata = decodeStreamMetadata(data, offset);\n const dataStream = isNullabilityBuffer(sizeOrNullabilityBuffer)\n ? decodeNullableDoublesLE(data, offset, sizeOrNullabilityBuffer, dataStreamMetadata.numValues)\n : decodeDoublesLE(data, offset, dataStreamMetadata.numValues);\n return new DoubleFlatVector(column.name, dataStream, sizeOrNullabilityBuffer);\n}\nfunction decodeLongColumn(data, offset, column, sizeOrNullabilityBuffer, scalarColumn) {\n const dataStreamMetadata = decodeStreamMetadata(data, offset);\n const vectorType = getVectorType(dataStreamMetadata, sizeOrNullabilityBuffer, data, offset);\n const isSigned = scalarColumn.physicalType === ScalarType.INT_64;\n if (vectorType === VectorType.FLAT) {\n const dataStream = isNullabilityBuffer(sizeOrNullabilityBuffer)\n ? decodeNullableLongStream(data, offset, dataStreamMetadata, isSigned, sizeOrNullabilityBuffer)\n : decodeLongStream(data, offset, dataStreamMetadata, isSigned);\n return new LongFlatVector(column.name, dataStream, sizeOrNullabilityBuffer);\n }\n else if (vectorType === VectorType.SEQUENCE) {\n const id = decodeSequenceLongStream(data, offset, dataStreamMetadata);\n return new LongSequenceVector(column.name, id[0], id[1], dataStreamMetadata.numRleValues);\n }\n else {\n const constValue = decodeConstLongStream(data, offset, dataStreamMetadata, isSigned);\n return new LongConstVector(column.name, constValue, sizeOrNullabilityBuffer);\n }\n}\nfunction decodeIntColumn(data, offset, column, scalarColumn, sizeOrNullabilityBuffer) {\n const dataStreamMetadata = decodeStreamMetadata(data, offset);\n const vectorType = getVectorType(dataStreamMetadata, sizeOrNullabilityBuffer, data, offset);\n const isSigned = scalarColumn.physicalType === ScalarType.INT_32;\n if (vectorType === VectorType.FLAT) {\n const dataStream = isNullabilityBuffer(sizeOrNullabilityBuffer)\n ? decodeNullableIntStream(data, offset, dataStreamMetadata, isSigned, sizeOrNullabilityBuffer)\n : decodeIntStream(data, offset, dataStreamMetadata, isSigned);\n return new IntFlatVector(column.name, dataStream, sizeOrNullabilityBuffer);\n }\n else if (vectorType === VectorType.SEQUENCE) {\n const id = decodeSequenceIntStream(data, offset, dataStreamMetadata);\n return new IntSequenceVector(column.name, id[0], id[1], dataStreamMetadata.numRleValues);\n }\n else {\n const constValue = decodeConstIntStream(data, offset, dataStreamMetadata, isSigned);\n return new IntConstVector(column.name, constValue, sizeOrNullabilityBuffer);\n }\n}\nfunction isNullabilityBuffer(sizeOrNullabilityBuffer) {\n return sizeOrNullabilityBuffer instanceof BitVector;\n}\n//# sourceMappingURL=propertyDecoder.js.map","// based on ../spec/schema/mlt_tileset_metadata.proto\nexport const ColumnScope = {\n FEATURE: 0,\n VERTEX: 1,\n};\nexport const ScalarType = {\n BOOLEAN: 0,\n INT_8: 1,\n UINT_8: 2,\n INT_32: 3,\n UINT_32: 4,\n INT_64: 5,\n UINT_64: 6,\n FLOAT: 7,\n DOUBLE: 8,\n STRING: 9,\n};\nexport const ComplexType = {\n GEOMETRY: 0,\n STRUCT: 1,\n};\nexport const LogicalScalarType = {\n ID: 0,\n};\nexport const LogicalComplexType = {\n BINARY: 0,\n RANGE_MAP: 1,\n};\n//# sourceMappingURL=tilesetMetadata.js.map","import { decodeStreamMetadata } from \"../metadata/tile/streamMetadataDecoder\";\nimport { StringFlatVector } from \"../vector/flat/stringFlatVector\";\nimport { StringDictionaryVector } from \"../vector/dictionary/stringDictionaryVector\";\nimport BitVector from \"../vector/flat/bitVector\";\nimport { PhysicalStreamType } from \"../metadata/tile/physicalStreamType\";\nimport { DictionaryType } from \"../metadata/tile/dictionaryType\";\nimport { LengthType } from \"../metadata/tile/lengthType\";\nimport { decodeIntStream, decodeLengthStreamToOffsetBuffer, decodeNullableIntStream } from \"./integerStreamDecoder\";\nimport { ScalarType } from \"../metadata/tileset/tilesetMetadata\";\nimport { decodeVarintInt32 } from \"./integerDecodingUtils\";\nimport { decodeBooleanRle, skipColumn } from \"./decodingUtils\";\nimport { StringFsstDictionaryVector } from \"../vector/fsst-dictionary/stringFsstDictionaryVector\";\nconst ROOT_COLUMN_NAME = \"default\";\nconst NESTED_COLUMN_SEPARATOR = \":\";\nexport function decodeString(name, data, offset, numStreams, bitVector) {\n let dictionaryLengthStream = null;\n let offsetStream = null;\n let dictionaryStream = null;\n let symbolLengthStream = null;\n let symbolTableStream = null;\n let presentStream = null;\n let plainLengthStream = null;\n let plainDataStream = null;\n for (let i = 0; i < numStreams; i++) {\n const streamMetadata = decodeStreamMetadata(data, offset);\n if (streamMetadata.byteLength === 0) {\n continue;\n }\n switch (streamMetadata.physicalStreamType) {\n case PhysicalStreamType.PRESENT: {\n const presentData = decodeBooleanRle(data, streamMetadata.numValues, offset);\n presentStream = new BitVector(presentData, streamMetadata.numValues);\n break;\n }\n case PhysicalStreamType.OFFSET: {\n const isNullable = bitVector != null || presentStream != null;\n const nullabilityBuffer = bitVector ?? presentStream;\n offsetStream = isNullable\n ? decodeNullableIntStream(data, offset, streamMetadata, false, nullabilityBuffer)\n : decodeIntStream(data, offset, streamMetadata, false);\n break;\n }\n case PhysicalStreamType.LENGTH: {\n const ls = decodeLengthStreamToOffsetBuffer(data, offset, streamMetadata);\n if (LengthType.DICTIONARY === streamMetadata.logicalStreamType.lengthType) {\n dictionaryLengthStream = ls;\n }\n else if (LengthType.SYMBOL === streamMetadata.logicalStreamType.lengthType) {\n symbolLengthStream = ls;\n }\n else {\n // Plain string encoding uses VAR_BINARY length type\n plainLengthStream = ls;\n }\n break;\n }\n case PhysicalStreamType.DATA: {\n const ds = data.subarray(offset.get(), offset.get() + streamMetadata.byteLength);\n offset.add(streamMetadata.byteLength);\n const dictType = streamMetadata.logicalStreamType.dictionaryType;\n if (DictionaryType.FSST === dictType) {\n symbolTableStream = ds;\n }\n else if (DictionaryType.SINGLE === dictType || DictionaryType.SHARED === dictType) {\n dictionaryStream = ds;\n }\n else if (DictionaryType.NONE === dictType) {\n plainDataStream = ds;\n }\n break;\n }\n }\n }\n return (decodeFsstDictionaryVector(name, symbolTableStream, offsetStream, dictionaryLengthStream, dictionaryStream, symbolLengthStream, bitVector ?? presentStream) ??\n decodeDictionaryVector(name, dictionaryStream, offsetStream, dictionaryLengthStream, bitVector ?? presentStream) ??\n decodePlainStringVector(name, plainLengthStream, plainDataStream, offsetStream, bitVector ?? presentStream));\n}\nfunction decodeFsstDictionaryVector(name, symbolTableStream, offsetStream, dictionaryLengthStream, dictionaryStream, symbolLengthStream, nullabilityBuffer) {\n if (!symbolTableStream) {\n return null;\n }\n return new StringFsstDictionaryVector(name, offsetStream, dictionaryLengthStream, dictionaryStream, symbolLengthStream, symbolTableStream, nullabilityBuffer);\n}\nfunction decodeDictionaryVector(name, dictionaryStream, offsetStream, dictionaryLengthStream, nullabilityBuffer) {\n if (!dictionaryStream) {\n return null;\n }\n return nullabilityBuffer\n ? new StringDictionaryVector(name, offsetStream, dictionaryLengthStream, dictionaryStream, nullabilityBuffer)\n : new StringDictionaryVector(name, offsetStream, dictionaryLengthStream, dictionaryStream);\n}\nfunction decodePlainStringVector(name, plainLengthStream, plainDataStream, offsetStream, nullabilityBuffer) {\n if (!plainLengthStream || !plainDataStream) {\n return null;\n }\n if (offsetStream) {\n return nullabilityBuffer\n ? new StringDictionaryVector(name, offsetStream, plainLengthStream, plainDataStream, nullabilityBuffer)\n : new StringDictionaryVector(name, offsetStream, plainLengthStream, plainDataStream);\n }\n if (nullabilityBuffer && nullabilityBuffer.size() !== plainLengthStream.length - 1) {\n const sparseOffsetStream = new Int32Array(nullabilityBuffer.size());\n let valueIndex = 0;\n for (let i = 0; i < nullabilityBuffer.size(); i++) {\n if (nullabilityBuffer.get(i)) {\n sparseOffsetStream[i] = valueIndex++;\n }\n else {\n sparseOffsetStream[i] = 0;\n }\n }\n return new StringDictionaryVector(name, sparseOffsetStream, plainLengthStream, plainDataStream, nullabilityBuffer);\n }\n return nullabilityBuffer\n ? new StringFlatVector(name, plainLengthStream, plainDataStream, nullabilityBuffer)\n : new StringFlatVector(name, plainLengthStream, plainDataStream);\n}\nexport function decodeSharedDictionary(data, offset, column, numFeatures, propertyColumnNames) {\n let dictionaryOffsetBuffer = null;\n let dictionaryBuffer = null;\n let symbolOffsetBuffer = null;\n let symbolTableBuffer = null;\n let dictionaryStreamDecoded = false;\n while (!dictionaryStreamDecoded) {\n const streamMetadata = decodeStreamMetadata(data, offset);\n switch (streamMetadata.physicalStreamType) {\n case PhysicalStreamType.LENGTH:\n if (LengthType.DICTIONARY === streamMetadata.logicalStreamType.lengthType) {\n dictionaryOffsetBuffer = decodeLengthStreamToOffsetBuffer(data, offset, streamMetadata);\n }\n else {\n symbolOffsetBuffer = decodeLengthStreamToOffsetBuffer(data, offset, streamMetadata);\n }\n break;\n case PhysicalStreamType.DATA:\n if (DictionaryType.SINGLE === streamMetadata.logicalStreamType.dictionaryType ||\n DictionaryType.SHARED === streamMetadata.logicalStreamType.dictionaryType) {\n dictionaryBuffer = data.subarray(offset.get(), offset.get() + streamMetadata.byteLength);\n dictionaryStreamDecoded = true;\n }\n else {\n symbolTableBuffer = data.subarray(offset.get(), offset.get() + streamMetadata.byteLength);\n }\n offset.add(streamMetadata.byteLength);\n break;\n }\n }\n const childFields = column.complexType.children;\n const stringDictionaryVectors = [];\n let i = 0;\n for (const childField of childFields) {\n const numStreams = decodeVarintInt32(data, offset, 1)[0];\n if (numStreams == 0) {\n /* Column is not present in the tile */\n continue;\n }\n const columnName = `${column.name}${childField.name === ROOT_COLUMN_NAME ? \"\" : NESTED_COLUMN_SEPARATOR + childField.name}`;\n if (propertyColumnNames) {\n if (!propertyColumnNames.has(columnName)) {\n //TODO: add size of sub column to Mlt for faster skipping\n skipColumn(numStreams, data, offset);\n continue;\n }\n }\n if (numStreams !== 2 ||\n childField.type !== \"scalarField\" ||\n childField.scalarField.physicalType !== ScalarType.STRING) {\n throw new Error(\"Currently only optional string fields are implemented for a struct.\");\n }\n const presentStreamMetadata = decodeStreamMetadata(data, offset);\n const presentStream = decodeBooleanRle(data, presentStreamMetadata.numValues, offset);\n const offsetStreamMetadata = decodeStreamMetadata(data, offset);\n const offsetCount = offsetStreamMetadata.decompressedCount;\n const isNullable = offsetCount !== numFeatures;\n const offsetStream = isNullable\n ? decodeNullableIntStream(data, offset, offsetStreamMetadata, false, new BitVector(presentStream, presentStreamMetadata.numValues))\n : decodeIntStream(data, offset, offsetStreamMetadata, false);\n stringDictionaryVectors[i++] = symbolTableBuffer\n ? new StringFsstDictionaryVector(columnName, offsetStream, dictionaryOffsetBuffer, dictionaryBuffer, symbolOffsetBuffer, symbolTableBuffer, new BitVector(presentStream, presentStreamMetadata.numValues))\n : new StringDictionaryVector(columnName, offsetStream, dictionaryOffsetBuffer, dictionaryBuffer, new BitVector(presentStream, presentStreamMetadata.numValues));\n }\n return stringDictionaryVectors;\n}\n//# sourceMappingURL=stringDecoder.js.map","import { ColumnScope, ComplexType, ScalarType, } from \"./tilesetMetadata\";\n/**\n * The type code is a single varint32 that encodes:\n * - Physical or logical type\n * - Nullable flag\n * - Whether the column has a name (typeCode >= 10)\n * - Whether the column has children (typeCode == 30 for STRUCT)\n * - For ID types: whether it uses long (64-bit) IDs\n */\n/**\n * Decodes a type code into a Column structure.\n * ID columns (0-3) are represented as physical UINT_32 or UINT_64 types in TypeScript\n */\nexport function decodeColumnType(typeCode) {\n switch (typeCode) {\n case 0:\n case 1:\n case 2:\n case 3: {\n // ID columns: 0=uint32, 1=uint64, 2=nullable uint32, 3=nullable uint64\n const column = {};\n column.nullable = (typeCode & 1) !== 0; // Bit 0 = nullable;\n column.columnScope = ColumnScope.FEATURE;\n const scalarCol = {};\n // Map to physical type since TS schema doesn't have LogicalScalarType.ID\n const physicalType = typeCode > 1 ? ScalarType.UINT_64 : ScalarType.UINT_32; // Bit 1 = longID\n scalarCol.physicalType = physicalType;\n scalarCol.type = \"physicalType\";\n column.scalarType = scalarCol;\n column.type = \"scalarType\";\n return column;\n }\n case 4: {\n // GEOMETRY (non-nullable, no children)\n const column = {};\n column.nullable = false;\n column.columnScope = ColumnScope.FEATURE;\n const complexCol = {};\n complexCol.type = \"physicalType\";\n complexCol.physicalType = ComplexType.GEOMETRY;\n column.type = \"complexType\";\n column.complexType = complexCol;\n return column;\n }\n case 30: {\n // STRUCT (non-nullable with children)\n const column = {};\n column.nullable = false;\n column.columnScope = ColumnScope.FEATURE;\n const complexCol = {};\n complexCol.type = \"physicalType\";\n complexCol.physicalType = ComplexType.STRUCT;\n column.type = \"complexType\";\n column.complexType = complexCol;\n return column;\n }\n default:\n return mapScalarType(typeCode);\n }\n}\n/**\n * Returns true if this type code requires a name to be stored.\n * ID (0-3) and GEOMETRY (4) columns have implicit names.\n * All other types (>= 10) require explicit names.\n */\nexport function columnTypeHasName(typeCode) {\n return typeCode >= 10;\n}\n/**\n * Returns true if this type code has child fields.\n * Only STRUCT (typeCode 30) has children.\n */\nexport function columnTypeHasChildren(typeCode) {\n return typeCode === 30;\n}\n/**\n * Determines if a stream count needs to be read for this column.\n * Mirrors the logic in cpp/include/mlt/metadata/type_map.hpp lines 81-118\n */\nexport function hasStreamCount(column) {\n // ID columns don't have stream count (identified by name)\n if (column.name === \"id\") {\n return false;\n }\n if (column.type === \"scalarType\") {\n const scalarCol = column.scalarType;\n if (scalarCol.type === \"physicalType\") {\n const physicalType = scalarCol.physicalType;\n switch (physicalType) {\n case ScalarType.BOOLEAN:\n case ScalarType.INT_8:\n case ScalarType.UINT_8:\n case ScalarType.INT_32:\n case ScalarType.UINT_32:\n case ScalarType.INT_64:\n case ScalarType.UINT_64:\n case ScalarType.FLOAT:\n case ScalarType.DOUBLE:\n return false;\n case ScalarType.STRING:\n return true;\n default:\n return false;\n }\n }\n else if (scalarCol.type === \"logicalType\") {\n return false;\n }\n }\n else if (column.type === \"complexType\") {\n const complexCol = column.complexType;\n if (complexCol.type === \"physicalType\") {\n const physicalType = complexCol.physicalType;\n switch (physicalType) {\n case ComplexType.GEOMETRY:\n case ComplexType.STRUCT:\n return true;\n default:\n return false;\n }\n }\n }\n console.warn(\"Unexpected column type in hasStreamCount\", column);\n return false;\n}\n/**\n * Maps a scalar type code to a Column with ScalarType.\n * Type codes 10-29 encode scalar types with nullable flag.\n * Even codes are non-nullable, odd codes are nullable.\n */\nfunction mapScalarType(typeCode) {\n let scalarType = null;\n switch (typeCode) {\n case 10:\n case 11:\n scalarType = ScalarType.BOOLEAN;\n break;\n case 12:\n case 13:\n scalarType = ScalarType.INT_8;\n break;\n case 14:\n case 15:\n scalarType = ScalarType.UINT_8;\n break;\n case 16:\n case 17:\n scalarType = ScalarType.INT_32;\n break;\n case 18:\n case 19:\n scalarType = ScalarType.UINT_32;\n break;\n case 20:\n case 21:\n scalarType = ScalarType.INT_64;\n break;\n case 22:\n case 23:\n scalarType = ScalarType.UINT_64;\n break;\n case 24:\n case 25:\n scalarType = ScalarType.FLOAT;\n break;\n case 26:\n case 27:\n scalarType = ScalarType.DOUBLE;\n break;\n case 28:\n case 29:\n scalarType = ScalarType.STRING;\n break;\n default:\n return null;\n }\n const column = {};\n column.nullable = (typeCode & 1) !== 0;\n column.columnScope = ColumnScope.FEATURE;\n const scalarCol = {};\n scalarCol.type = \"physicalType\";\n scalarCol.physicalType = scalarType;\n column.type = \"scalarType\";\n column.scalarType = scalarCol;\n return column;\n}\n//# sourceMappingURL=typeMap.js.map","import { decodeVarintInt32 } from \"../../decoding/integerDecodingUtils\";\nimport { columnTypeHasChildren, columnTypeHasName, decodeColumnType } from \"./typeMap\";\nconst textDecoder = new TextDecoder();\n/**\n * Decodes a length-prefixed UTF-8 string.\n * Layout: [len: varint32][bytes: len]\n */\nfunction decodeString(src, offset) {\n const length = decodeVarintInt32(src, offset, 1)[0];\n if (length === 0) {\n return \"\";\n }\n const start = offset.get();\n const end = start + length;\n const view = src.subarray(start, end);\n offset.add(length);\n return textDecoder.decode(view);\n}\n/**\n * Decodes a Field used as part of complex types (STRUCT children).\n * Unlike Column, Field still uses the fieldOptions bitfield for flexibility.\n */\nfunction decodeField(src, offset) {\n const fieldOptions = decodeVarintInt32(src, offset, 1)[0] >>> 0;\n const isLogical = (fieldOptions & 4 /* FieldOptions.logicalType */) !== 0;\n const isComplex = (fieldOptions & 2 /* FieldOptions.complexType */) !== 0;\n const typeValue = decodeVarintInt32(src, offset, 1)[0] >>> 0;\n const field = {};\n if ((fieldOptions & 1 /* FieldOptions.nullable */) !== 0) {\n field.nullable = true;\n }\n if (isComplex) {\n const complex = {};\n if (isLogical) {\n complex.type = \"logicalType\";\n complex.logicalType = typeValue;\n }\n else {\n complex.type = \"physicalType\";\n complex.physicalType = typeValue;\n }\n if ((fieldOptions & 8 /* FieldOptions.hasChildren */) !== 0) {\n const childCount = decodeVarintInt32(src, offset, 1)[0] >>> 0;\n complex.children = new Array(childCount);\n for (let i = 0; i < childCount; i++) {\n complex.children[i] = decodeField(src, offset);\n }\n }\n field.type = \"complexField\";\n field.complexField = complex;\n }\n else {\n const scalar = {};\n if (isLogical) {\n scalar.type = \"logicalType\";\n scalar.logicalType = typeValue;\n }\n else {\n scalar.type = \"physicalType\";\n scalar.physicalType = typeValue;\n }\n field.type = \"scalarField\";\n field.scalarField = scalar;\n }\n return field;\n}\n/**\n * The typeCode encodes the column type, nullable flag, and whether it has name/children.\n */\nfunction decodeColumn(src, offset) {\n const typeCode = decodeVarintInt32(src, offset, 1)[0] >>> 0;\n const column = decodeColumnType(typeCode);\n if (!column) {\n throw new Error(`Unsupported column type code: ${typeCode}`);\n }\n if (columnTypeHasName(typeCode)) {\n column.name = decodeString(src, offset);\n }\n else {\n // ID and GEOMETRY columns have implicit names\n if (typeCode >= 0 && typeCode <= 3) {\n column.name = \"id\";\n }\n else if (typeCode === 4) {\n column.name = \"geometry\";\n }\n }\n if (columnTypeHasChildren(typeCode)) {\n // Only STRUCT (typeCode 30) has children\n const childCount = decodeVarintInt32(src, offset, 1)[0] >>> 0;\n const complexCol = column.complexType;\n complexCol.children = new Array(childCount);\n for (let i = 0; i < childCount; i++) {\n complexCol.children[i] = decodeField(src, offset);\n }\n }\n return column;\n}\n/**\n * Top-level decoder for embedded tileset metadata.\n * Reads exactly ONE FeatureTableSchema from the stream.\n *\n * @param bytes The byte array containing the metadata\n * @param offset The current offset in the byte array (will be advanced)\n */\nexport function decodeEmbeddedTileSetMetadata(bytes, offset) {\n const meta = {};\n meta.featureTables = [];\n const table = {};\n table.name = decodeString(bytes, offset);\n const extent = decodeVarintInt32(bytes, offset, 1)[0] >>> 0;\n const columnCount = decodeVarintInt32(bytes, offset, 1)[0] >>> 0;\n table.columns = new Array(columnCount);\n for (let j = 0; j < columnCount; j++) {\n table.columns[j] = decodeColumn(bytes, offset);\n }\n meta.featureTables.push(table);\n return [meta, extent];\n}\n//# sourceMappingURL=embeddedTilesetMetadataDecoder.js.map","import FeatureTable from \"./vector/featureTable\";\nimport { ScalarType } from \"./metadata/tileset/tilesetMetadata\";\nimport IntWrapper from \"./decoding/intWrapper\";\nimport { decodeStreamMetadata } from \"./metadata/tile/streamMetadataDecoder\";\nimport { VectorType } from \"./vector/vectorType\";\nimport { IntFlatVector } from \"./vector/flat/intFlatVector\";\nimport BitVector from \"./vector/flat/bitVector\";\nimport { decodeConstIntStream, decodeConstLongStream, decodeIntStream, decodeLongFloat64Stream, decodeLongStream, decodeSequenceIntStream, decodeSequenceLongStream, getVectorType, } from \"./decoding/integerStreamDecoder\";\nimport { IntSequenceVector } from \"./vector/sequence/intSequenceVector\";\nimport { LongFlatVector } from \"./vector/flat/longFlatVector\";\nimport { LongSequenceVector } from \"./vector/sequence/longSequenceVector\";\nimport { decodeVarintInt32 } from \"./decoding/integerDecodingUtils\";\nimport { decodeGeometryColumn } from \"./decoding/geometryDecoder\";\nimport { decodePropertyColumn } from \"./decoding/propertyDecoder\";\nimport { IntConstVector } from \"./vector/constant/intConstVector\";\nimport { LongConstVector } from \"./vector/constant/longConstVector\";\nimport { decodeBooleanRle } from \"./decoding/decodingUtils\";\nimport { DoubleFlatVector } from \"./vector/flat/doubleFlatVector\";\nimport { decodeEmbeddedTileSetMetadata } from \"./metadata/tileset/embeddedTilesetMetadataDecoder\";\nimport { hasStreamCount } from \"./metadata/tileset/typeMap\";\nconst ID_COLUMN_NAME = \"id\";\nconst GEOMETRY_COLUMN_NAME = \"geometry\";\n/**\n * Decodes a tile with embedded metadata (Tag 0x01 format).\n * This is the primary decoder function for MLT tiles.\n *\n * @param tile The tile data to decode (will be decompressed if gzip-compressed)\n * @param geometryScaling Optional geometry scaling parameters\n * @param idWithinMaxSafeInteger If true, limits ID values to JavaScript safe integer range (53 bits)\n */\nexport default function decodeTile(tile, geometryScaling, idWithinMaxSafeInteger = true) {\n const offset = new IntWrapper(0);\n const featureTables = [];\n while (offset.get() < tile.length) {\n const blockLength = decodeVarintInt32(tile, offset, 1)[0] >>> 0;\n const blockStart = offset.get();\n const blockEnd = blockStart + blockLength;\n if (blockEnd > tile.length) {\n throw new Error(`Block overruns tile: ${blockEnd} > ${tile.length}`);\n }\n const tag = decodeVarintInt32(tile, offset, 1)[0] >>> 0;\n if (tag !== 1) {\n // Skip unknown block types\n offset.set(blockEnd);\n continue;\n }\n // Decode embedded metadata and extent (one of each per block)\n const decode = decodeEmbeddedTileSetMetadata(tile, offset);\n const metadata = decode[0];\n const extent = decode[1];\n const featureTableMetadata = metadata.featureTables[0];\n // Decode columns from streams\n let idVector = null;\n let geometryVector = null;\n const propertyVectors = [];\n let numFeatures = 0;\n for (const columnMetadata of featureTableMetadata.columns) {\n const columnName = columnMetadata.name;\n if (columnName === ID_COLUMN_NAME) {\n let nullabilityBuffer = null;\n // Check column metadata nullable flag, not numStreams (ID columns don't have stream count)\n if (columnMetadata.nullable) {\n const presentStreamMetadata = decodeStreamMetadata(tile, offset);\n const streamDataStart = offset.get();\n const values = decodeBooleanRle(tile, presentStreamMetadata.numValues, offset);\n // Fix offset: decodeBooleanRle doesn't consume all compressed bytes\n offset.set(streamDataStart + presentStreamMetadata.byteLength);\n nullabilityBuffer = new BitVector(values, presentStreamMetadata.numValues);\n }\n const idDataStreamMetadata = decodeStreamMetadata(tile, offset);\n numFeatures = idDataStreamMetadata.decompressedCount;\n idVector = decodeIdColumn(tile, columnMetadata, offset, columnName, idDataStreamMetadata, nullabilityBuffer ?? numFeatures, idWithinMaxSafeInteger);\n }\n else if (columnName === GEOMETRY_COLUMN_NAME) {\n const numStreams = decodeVarintInt32(tile, offset, 1)[0];\n // If no ID column, get numFeatures from geometry type stream metadata\n if (numFeatures === 0) {\n const savedOffset = offset.get();\n const geometryTypeMetadata = decodeStreamMetadata(tile, offset);\n numFeatures = geometryTypeMetadata.decompressedCount;\n offset.set(savedOffset); // Reset to re-read in decodeGeometryColumn\n }\n if (geometryScaling) {\n geometryScaling.scale = geometryScaling.extent / extent;\n }\n geometryVector = decodeGeometryColumn(tile, numStreams, offset, numFeatures, geometryScaling);\n }\n else {\n // Property columns: STRING and STRUCT have stream count, others don't\n const hasStreamCnt = hasStreamCount(columnMetadata);\n const numStreams = hasStreamCnt ? decodeVarintInt32(tile, offset, 1)[0] : 1;\n if (numStreams === 0 && columnMetadata.type === \"scalarType\") {\n continue;\n }\n const propertyVector = decodePropertyColumn(tile, offset, columnMetadata, numStreams, numFeatures, undefined);\n if (propertyVector) {\n if (Array.isArray(propertyVector)) {\n for (const property of propertyVector) {\n propertyVectors.push(property);\n }\n }\n else {\n propertyVectors.push(propertyVector);\n }\n }\n }\n }\n const featureTable = new FeatureTable(featureTableMetadata.name, geometryVector, idVector, propertyVectors, extent);\n featureTables.push(featureTable);\n offset.set(blockEnd);\n }\n return featureTables;\n}\nfunction decodeIdColumn(tile, columnMetadata, offset, columnName, idDataStreamMetadata, sizeOrNullabilityBuffer, idWithinMaxSafeInteger = false) {\n const idDataType = columnMetadata.scalarType.physicalType;\n const vectorType = getVectorType(idDataStreamMetadata, sizeOrNullabilityBuffer, tile, offset);\n if (idDataType === ScalarType.UINT_32) {\n switch (vectorType) {\n case VectorType.FLAT: {\n const id = decodeIntStream(tile, offset, idDataStreamMetadata, false);\n return new IntFlatVector(columnName, id, sizeOrNullabilityBuffer);\n }\n case VectorType.SEQUENCE: {\n const id = decodeSequenceIntStream(tile, offset, idDataStreamMetadata);\n return new IntSequenceVector(columnName, id[0], id[1], idDataStreamMetadata.numRleValues);\n }\n case VectorType.CONST: {\n const id = decodeConstIntStream(tile, offset, idDataStreamMetadata, false);\n return new IntConstVector(columnName, id, sizeOrNullabilityBuffer);\n }\n }\n }\n else {\n switch (vectorType) {\n case VectorType.FLAT: {\n if (idWithinMaxSafeInteger) {\n const id = decodeLongFloat64Stream(tile, offset, idDataStreamMetadata, false);\n return new DoubleFlatVector(columnName, id, sizeOrNullabilityBuffer);\n }\n const id = decodeLongStream(tile, offset, idDataStreamMetadata, false);\n return new LongFlatVector(columnName, id, sizeOrNullabilityBuffer);\n }\n case VectorType.SEQUENCE: {\n const id = decodeSequenceLongStream(tile, offset, idDataStreamMetadata);\n return new LongSequenceVector(columnName, id[0], id[1], idDataStreamMetadata.numRleValues);\n }\n case VectorType.CONST: {\n const id = decodeConstLongStream(tile, offset, idDataStreamMetadata, false);\n return new LongConstVector(columnName, id, sizeOrNullabilityBuffer);\n }\n }\n }\n throw new Error(\"Vector type not supported for id column.\");\n}\n//# sourceMappingURL=mltDecoder.js.map","import Point from '@mapbox/point-geometry';\nimport {type FeatureTable, decodeTile, type Feature as MLTFeature, GEOMETRY_TYPE} from '@maplibre/mlt';\nimport type {VectorTileFeatureLike, VectorTileLayerLike, VectorTileLike} from '@maplibre/vt-pbf';\n\nclass MLTVectorTileFeature implements VectorTileFeatureLike {\n _featureData: MLTFeature;\n properties: {[_: string]: any};\n type: VectorTileFeatureLike['type'];\n extent: VectorTileFeatureLike['extent'];\n id: VectorTileFeatureLike['id'];\n\n constructor(feature: MLTFeature, extent: number) {\n this._featureData = feature;\n this.properties = this._featureData.properties || {};\n switch (this._featureData.geometry?.type) {\n case GEOMETRY_TYPE.POINT:\n case GEOMETRY_TYPE.MULTIPOINT:\n this.type = 1;\n break;\n case GEOMETRY_TYPE.LINESTRING:\n case GEOMETRY_TYPE.MULTILINESTRING:\n this.type = 2;\n break;\n case GEOMETRY_TYPE.POLYGON:\n case GEOMETRY_TYPE.MULTIPOLYGON:\n this.type = 3;\n break;\n default:\n this.type = 0;\n };\n this.extent = extent;\n this.id = Number(this._featureData.id);\n }\n\n loadGeometry(): Point[][] {\n const points: Point[][] = [];\n for (const ring of this._featureData.geometry.coordinates) {\n const pointRing: Point[] = [];\n for (const coord of ring) {\n pointRing.push(new Point(coord.x, coord.y));\n }\n points.push(pointRing);\n }\n return points;\n }\n}\n\nclass MLTVectorTileLayer implements VectorTileLayerLike {\n featureTable: FeatureTable;\n name: string;\n length: number;\n version: number;\n extent: number;\n features: MLTFeature[] = [];\n \n constructor(featureTable: FeatureTable) {\n this.featureTable = featureTable;\n this.name = featureTable.name;\n this.extent = featureTable.extent;\n this.version = 2;\n this.features = featureTable.getFeatures();\n this.length = this.features.length;\n }\n\n feature(i: number): VectorTileFeatureLike {\n return new MLTVectorTileFeature(this.features[i], this.extent);\n }\n}\n\nexport class MLTVectorTile implements VectorTileLike {\n layers: Record = {};\n\n constructor(buffer: ArrayBuffer) {\n const features = decodeTile(new Uint8Array(buffer));\n this.layers = features.reduce((acc, f) => ({...acc, [f.name]: new MLTVectorTileLayer(f)}), {});\n }\n}\n","import e from\"pbf\";import t from\"@mapbox/point-geometry\";class i{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,\"id\"in e&&(\"string\"==typeof e.id?this.id=parseInt(e.id,10):\"number\"!=typeof e.id||isNaN(e.id)||(this.id=e.id))}loadGeometry(){const e=[],i=1===this.feature.type?[this.feature.geometry]:this.feature.geometry;for(const n of i){const i=[];for(const e of n)i.push(new t(e[0],e[1]));e.push(i)}return e}}const n=\"_geojsonTileLayer\";class r{constructor(e,t){this.layers={[n]:this},this.name=n,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new i(this.features[e],this.extent)}}function o(t){const i=new e;return function(e,t){for(const i in e.layers)t.writeMessage(3,a,e.layers[i])}(t,i),i.finish()}function s(e,t){const i={};for(const n in e)i[n]=new r(e[n].features,t),i[n].name=n,i[n].version=t?t.version:1,i[n].extent=t?t.extent:4096;return o({layers:i})}function a(e,t){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||\"\"),t.writeVarintField(5,e.extent||4096);const i={keys:[],values:[],keycache:{},valuecache:{}};for(let n=0;n>31}function h(e,t){const i=e.loadGeometry(),n=e.type;let r=0,o=0;for(const s of i){let i=1;1===n&&(i=s.length),t.writeVarint(u(1,i));const a=3===n?s.length-1:s.length;for(let e=0;e;\n cameraQueryGeometry: Array;\n queryPadding: number;\n getElevation: undefined | ((x: number, y: number) => number);\n params: {\n filter?: FilterSpecification;\n layers?: Set | null;\n availableImages?: Array;\n globalState?: Record;\n };\n};\n\nexport type QueryResults = {\n [_: string]: QueryResultsItem[];\n};\n\nexport type QueryResultsItem = {\n featureIndex: number;\n feature: GeoJSONFeature;\n intersectionZ?: boolean | number;\n};\n\n/**\n * An in memory index class to allow fast interaction with features\n */\nexport class FeatureIndex {\n tileID: OverscaledTileID;\n x: number;\n y: number;\n z: number;\n grid: TransferableGridIndex;\n grid3D: TransferableGridIndex;\n featureIndexArray: FeatureIndexArray;\n promoteId?: PromoteIdSpecification;\n encoding: string;\n rawTileData: ArrayBuffer;\n bucketLayerIDs: Array>;\n\n vtLayers: {[_: string]: VectorTileLayerLike};\n sourceLayerCoder: DictionaryCoder;\n\n constructor(tileID: OverscaledTileID, promoteId?: PromoteIdSpecification | null) {\n this.tileID = tileID;\n this.x = tileID.canonical.x;\n this.y = tileID.canonical.y;\n this.z = tileID.canonical.z;\n this.grid = new TransferableGridIndex(EXTENT, 16, 0);\n this.grid3D = new TransferableGridIndex(EXTENT, 16, 0);\n this.featureIndexArray = new FeatureIndexArray();\n this.promoteId = promoteId;\n }\n\n insert(feature: VectorTileFeatureLike, geometry: Array>, featureIndex: number, sourceLayerIndex: number, bucketIndex: number, is3D?: boolean) {\n const key = this.featureIndexArray.length;\n this.featureIndexArray.emplaceBack(featureIndex, sourceLayerIndex, bucketIndex);\n\n const grid = is3D ? this.grid3D : this.grid;\n\n for (let r = 0; r < geometry.length; r++) {\n const ring = geometry[r];\n\n const bbox = [Infinity, Infinity, -Infinity, -Infinity];\n for (let i = 0; i < ring.length; i++) {\n const p = ring[i];\n bbox[0] = Math.min(bbox[0], p.x);\n bbox[1] = Math.min(bbox[1], p.y);\n bbox[2] = Math.max(bbox[2], p.x);\n bbox[3] = Math.max(bbox[3], p.y);\n }\n\n if (bbox[0] < EXTENT &&\n bbox[1] < EXTENT &&\n bbox[2] >= 0 &&\n bbox[3] >= 0) {\n grid.insert(key, bbox[0], bbox[1], bbox[2], bbox[3]);\n }\n }\n }\n\n loadVTLayers(): {[_: string]: VectorTileLayerLike} {\n if (!this.vtLayers) {\n this.vtLayers = this.encoding !== 'mlt' \n ? new VectorTile(new Protobuf(this.rawTileData)).layers\n : new MLTVectorTile(this.rawTileData).layers;\n this.sourceLayerCoder = new DictionaryCoder(this.vtLayers ? Object.keys(this.vtLayers).sort() : [GEOJSON_TILE_LAYER_NAME]);\n }\n return this.vtLayers;\n }\n\n // Finds non-symbol features in this tile at a particular position.\n query(\n args: QueryParameters,\n styleLayers: {[_: string]: StyleLayer},\n serializedLayers: {[_: string]: any},\n sourceFeatureState: SourceFeatureState\n ): QueryResults {\n this.loadVTLayers();\n\n const params = args.params;\n const pixelsToTileUnits = EXTENT / args.tileSize / args.scale;\n const filter = featureFilter(params.filter, params.globalState);\n\n const queryGeometry = args.queryGeometry;\n const queryPadding = args.queryPadding * pixelsToTileUnits;\n\n const bounds = Bounds.fromPoints(queryGeometry);\n const matching = this.grid.query(bounds.minX - queryPadding, bounds.minY - queryPadding, bounds.maxX + queryPadding, bounds.maxY + queryPadding);\n\n const cameraBounds = Bounds.fromPoints(args.cameraQueryGeometry).expandBy(queryPadding);\n const matching3D = this.grid3D.query(\n cameraBounds.minX, cameraBounds.minY, cameraBounds.maxX, cameraBounds.maxY,\n (bx1, by1, bx2, by2) => {\n return polygonIntersectsBox(args.cameraQueryGeometry, bx1 - queryPadding, by1 - queryPadding, bx2 + queryPadding, by2 + queryPadding);\n });\n\n for (const key of matching3D) {\n matching.push(key);\n }\n\n matching.sort(topDownFeatureComparator);\n\n const result: QueryResults = {};\n let previousIndex;\n for (let k = 0; k < matching.length; k++) {\n const index = matching[k];\n\n // don't check the same feature more than once\n if (index === previousIndex) continue;\n previousIndex = index;\n\n const match = this.featureIndexArray.get(index);\n let featureGeometry = null;\n this.loadMatchingFeature(\n result,\n match.bucketIndex,\n match.sourceLayerIndex,\n match.featureIndex,\n filter,\n params.layers,\n params.availableImages,\n styleLayers,\n serializedLayers,\n sourceFeatureState,\n (feature: VectorTileFeatureLike, styleLayer: StyleLayer, featureState: FeatureState) => {\n if (!featureGeometry) {\n featureGeometry = loadGeometry(feature);\n }\n\n return styleLayer.queryIntersectsFeature({\n queryGeometry,\n feature,\n featureState,\n geometry: featureGeometry,\n zoom: this.z,\n transform: args.transform,\n pixelsToTileUnits,\n pixelPosMatrix: args.pixelPosMatrix,\n unwrappedTileID: this.tileID.toUnwrapped(),\n getElevation: args.getElevation\n });\n }\n );\n }\n\n return result;\n }\n\n loadMatchingFeature(\n result: QueryResults,\n bucketIndex: number,\n sourceLayerIndex: number,\n featureIndex: number,\n filter: FeatureFilter,\n filterLayerIDs: Set | undefined,\n availableImages: Array,\n styleLayers: {[_: string]: StyleLayer},\n serializedLayers: {[_: string]: any},\n sourceFeatureState?: SourceFeatureState,\n intersectionTest?: (\n feature: VectorTileFeatureLike,\n styleLayer: StyleLayer,\n featureState: any,\n id: string | number | void\n ) => boolean | number) {\n\n const layerIDs = this.bucketLayerIDs[bucketIndex];\n if (filterLayerIDs && !layerIDs.some(id => filterLayerIDs.has(id)))\n return;\n\n const sourceLayerName = this.sourceLayerCoder.decode(sourceLayerIndex);\n const sourceLayer = this.vtLayers[sourceLayerName];\n const feature = sourceLayer.feature(featureIndex);\n\n if (filter.needGeometry) {\n const evaluationFeature = toEvaluationFeature(feature, true);\n if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), evaluationFeature, this.tileID.canonical)) {\n return;\n }\n } else if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), feature)) {\n return;\n }\n\n const id = this.getId(feature, sourceLayerName);\n\n for (let l = 0; l < layerIDs.length; l++) {\n const layerID = layerIDs[l];\n\n if (filterLayerIDs && !filterLayerIDs.has(layerID)) {\n continue;\n }\n\n const styleLayer = styleLayers[layerID];\n\n if (!styleLayer) continue;\n\n let featureState = {};\n if (id && sourceFeatureState) {\n // `feature-state` expression evaluation requires feature state to be available\n featureState = sourceFeatureState.getState(styleLayer.sourceLayer || GEOJSON_TILE_LAYER_NAME, id);\n }\n\n const serializedLayer = extend({}, serializedLayers[layerID]);\n\n serializedLayer.paint = evaluateProperties(serializedLayer.paint, styleLayer.paint, feature, featureState, availableImages);\n serializedLayer.layout = evaluateProperties(serializedLayer.layout, styleLayer.layout, feature, featureState, availableImages);\n\n const intersectionZ = !intersectionTest || intersectionTest(feature, styleLayer, featureState);\n if (!intersectionZ) {\n // Only applied for non-symbol features\n continue;\n }\n\n const geojsonFeature = new GeoJSONFeature(feature, this.z, this.x, this.y, id) as MapGeoJSONFeature;\n geojsonFeature.layer = serializedLayer;\n let layerResult = result[layerID];\n if (layerResult === undefined) {\n layerResult = result[layerID] = [];\n }\n layerResult.push({featureIndex, feature: geojsonFeature, intersectionZ});\n }\n }\n\n // Given a set of symbol indexes that have already been looked up,\n // return a matching set of GeoJSONFeatures\n lookupSymbolFeatures(symbolFeatureIndexes: Array,\n serializedLayers: {[_: string]: StyleLayer},\n bucketIndex: number,\n sourceLayerIndex: number,\n filterParams: {\n filterSpec: FilterSpecification;\n globalState: Record;\n },\n filterLayerIDs: Set | null,\n availableImages: Array,\n styleLayers: {[_: string]: StyleLayer}): QueryResults {\n const result: QueryResults = {};\n this.loadVTLayers();\n\n const filter = featureFilter(filterParams.filterSpec, filterParams.globalState);\n\n for (const symbolFeatureIndex of symbolFeatureIndexes) {\n this.loadMatchingFeature(\n result,\n bucketIndex,\n sourceLayerIndex,\n symbolFeatureIndex,\n filter,\n filterLayerIDs,\n availableImages,\n styleLayers,\n serializedLayers\n );\n\n }\n return result;\n }\n\n hasLayer(id: string) {\n for (const layerIDs of this.bucketLayerIDs) {\n for (const layerID of layerIDs) {\n if (id === layerID) return true;\n }\n }\n\n return false;\n }\n\n getId(feature: VectorTileFeatureLike, sourceLayerId: string): string | number {\n let id: string | number = feature.id;\n if (this.promoteId) {\n const propName = typeof this.promoteId === 'string' ? this.promoteId : this.promoteId[sourceLayerId];\n id = feature.properties[propName] as string | number;\n if (typeof id === 'boolean') id = Number(id);\n\n // When cluster is true, the id is the cluster_id even though promoteId is set\n if (id === undefined && feature.properties?.cluster && this.promoteId) {\n id = Number(feature.properties.cluster_id);\n }\n }\n return id;\n }\n}\n\nregister(\n 'FeatureIndex',\n FeatureIndex,\n {omit: ['rawTileData', 'sourceLayerCoder']}\n);\n\nfunction evaluateProperties(serializedProperties, styleLayerProperties, feature, featureState, availableImages) {\n return mapObject(serializedProperties, (property, key) => {\n const prop = styleLayerProperties instanceof PossiblyEvaluated ? styleLayerProperties.get(key) : null;\n return prop && prop.evaluate ? prop.evaluate(feature, featureState, availableImages) : prop;\n });\n}\n\nfunction topDownFeatureComparator(a, b) {\n return b - a;\n}\n","import Point from '@mapbox/point-geometry';\n\n/**\n * Returns the part of a multiline that intersects with the provided rectangular box.\n *\n * @param lines - the lines to check\n * @param x1 - the left edge of the box\n * @param y1 - the top edge of the box\n * @param x2 - the right edge of the box\n * @param y2 - the bottom edge of the box\n * @returns lines\n */\nexport function clipLine(lines: Array>, x1: number, y1: number, x2: number, y2: number): Array> {\n const clippedLines: Array> = [];\n\n for (let l = 0; l < lines.length; l++) {\n const line = lines[l];\n let clippedLine: Point[] | undefined;\n\n for (let i = 0; i < line.length - 1; i++) {\n let p0 = line[i];\n let p1 = line[i + 1];\n\n if (p0.x < x1 && p1.x < x1) {\n continue;\n } else if (p0.x < x1) {\n p0 = new Point(x1, p0.y + (p1.y - p0.y) * ((x1 - p0.x) / (p1.x - p0.x)))._round();\n } else if (p1.x < x1) {\n p1 = new Point(x1, p0.y + (p1.y - p0.y) * ((x1 - p0.x) / (p1.x - p0.x)))._round();\n }\n\n if (p0.y < y1 && p1.y < y1) {\n continue;\n } else if (p0.y < y1) {\n p0 = new Point(p0.x + (p1.x - p0.x) * ((y1 - p0.y) / (p1.y - p0.y)), y1)._round();\n } else if (p1.y < y1) {\n p1 = new Point(p0.x + (p1.x - p0.x) * ((y1 - p0.y) / (p1.y - p0.y)), y1)._round();\n }\n\n if (p0.x >= x2 && p1.x >= x2) {\n continue;\n } else if (p0.x >= x2) {\n p0 = new Point(x2, p0.y + (p1.y - p0.y) * ((x2 - p0.x) / (p1.x - p0.x)))._round();\n } else if (p1.x >= x2) {\n p1 = new Point(x2, p0.y + (p1.y - p0.y) * ((x2 - p0.x) / (p1.x - p0.x)))._round();\n }\n\n if (p0.y >= y2 && p1.y >= y2) {\n continue;\n } else if (p0.y >= y2) {\n p0 = new Point(p0.x + (p1.x - p0.x) * ((y2 - p0.y) / (p1.y - p0.y)), y2)._round();\n } else if (p1.y >= y2) {\n p1 = new Point(p0.x + (p1.x - p0.x) * ((y2 - p0.y) / (p1.y - p0.y)), y2)._round();\n }\n\n if (!clippedLine || !p0.equals(clippedLine[clippedLine.length - 1])) {\n clippedLine = [p0];\n clippedLines.push(clippedLine);\n }\n\n clippedLine.push(p1);\n }\n }\n\n return clippedLines;\n}\n\n/**\n * Clips the geometry to the given bounds.\n * @param geometry - the geometry to clip\n * @param type - the geometry type (1=POINT, 2=LINESTRING, 3=POLYGON)\n * @param x1 - the left edge of the clipping box\n * @param y1 - the top edge of the clipping box\n * @param x2 - the right edge of the clipping box\n * @param y2 - the bottom edge of the clipping box\n * @returns the clipped geometry\n */\nexport function clipGeometry(geometry: Point[][], type: 0 | 1 | 2 | 3, x1: number, y1: number, x2: number, y2: number): Point[][] {\n let clippedGeometry = clipGeometryOnAxis(geometry, type, x1, x2, AxisType.X);\n clippedGeometry = clipGeometryOnAxis(clippedGeometry, type, y1, y2, AxisType.Y);\n return clippedGeometry;\n}\n\n/**\n * On which axis to clip\n */\nconst enum AxisType {\n X = 0,\n Y = 1\n}\n\n/**\n * Clip features between two vertical or horizontal axis-parallel lines:\n * ```\n * | |\n * ___|___ | /\n * / | \\____|____/\n * | |\n *```\n * @param geometry - the geometry to clip\n * @param type - the geometry type (1=POINT, 2=LINESTRING, 3=POLYGON)\n * @param start - the start line coordinate (x or y) to clip against\n * @param end - the end line coordinate (x or y) to clip against\n * @param axis - the axis to clip on (X or Y)\n * @returns the clipped geometry\n */\nfunction clipGeometryOnAxis(geometry: Point[][], type: 0 | 1 | 2 | 3, start: number, end: number, axis: AxisType): Point[][] {\n switch (type) {\n case 1: // POINT\n return clipPoints(geometry, start, end, axis);\n case 2: // LINESTRING\n return clipLines(geometry, start, end, axis, false);\n case 3: // POLYGON\n return clipLines(geometry, start, end, axis, true);\n }\n\n return [];\n}\n\nfunction clipPoints(geometry: Point[][], start: number, end: number, axis: AxisType): Point[][] {\n const newGeometry: Point[][] = [];\n for (const ring of geometry) {\n for (const point of ring) {\n const a = axis === AxisType.X ? point.x : point.y;\n if (a >= start && a <= end) {\n newGeometry.push([point]);\n }\n }\n }\n return newGeometry;\n}\n\n/**\n * Clips a line to the given start and end coordinates.\n * @param line - the line to clip\n * @param start - the start line coordinate (x or y) to clip against\n * @param end - the end line coordinate (x or y) to clip against\n * @param axis - the axis to clip on (X or Y)\n * @param isPolygon - whether the line is part of a polygon\n * @returns the clipped line(s)\n */\nfunction clipLineInternal(line: Point[], start: number, end: number, axis: AxisType, isPolygon: boolean): Point[][] {\n const intersectionPoint = axis === AxisType.X ? intersectionPointX : intersectionPointY;\n\n let slice: Point[] = [];\n const newLine: Point[][] = [];\n for (let i = 0; i < line.length - 1; i++) {\n const p1 = line[i];\n const p2 = line[i + 1];\n const pos1 = axis === AxisType.X ? p1.x : p1.y;\n const pos2 = axis === AxisType.X ? p2.x : p2.y;\n let exited = false;\n\n if (pos1 < start) {\n // ---|--> | (line enters the clip region from the left)\n if (pos2 > start) {\n slice.push(intersectionPoint(p1, p2, start));\n }\n } else if (pos1 > end) {\n // | <--|--- (line enters the clip region from the right)\n if (pos2 < end) {\n slice.push(intersectionPoint(p1, p2, end));\n }\n } else {\n slice.push(p1);\n }\n if (pos2 < start && pos1 >= start) {\n // <--|--- | or <--|-----|--- (line exits the clip region on the left)\n slice.push(intersectionPoint(p1, p2, start));\n exited = true;\n }\n if (pos2 > end && pos1 <= end) {\n // | ---|--> or ---|-----|--> (line exits the clip region on the right)\n slice.push(intersectionPoint(p1, p2, end));\n exited = true;\n }\n\n if (!isPolygon && exited) {\n newLine.push(slice);\n slice = [];\n }\n }\n\n // add the last point\n const last = line.length - 1;\n const lastPos = axis === AxisType.X ? line[last].x : line[last].y;\n if (lastPos >= start && lastPos <= end) {\n slice.push(line[last]);\n }\n\n // close the polygon if its endpoints are not the same after clipping\n if (isPolygon && slice.length > 0 && !slice[0].equals(slice[slice.length - 1])) {\n slice.push(new Point(slice[0].x, slice[0].y));\n }\n if (slice.length > 0) {\n newLine.push(slice);\n }\n return newLine;\n}\n\nfunction clipLines(geometry: Point[][], start: number, end: number, axis: AxisType, isPolygon: boolean): Point[][] {\n const newGeometry: Point[][] = [];\n for (const line of geometry) {\n const clippedLines = clipLineInternal(line, start, end, axis, isPolygon);\n if (clippedLines.length > 0) {\n newGeometry.push(...clippedLines);\n }\n }\n return newGeometry;\n}\n\nfunction intersectionPointX(p1: Point, p2: Point, x: number): Point {\n const t = (x - p1.x) / (p2.x - p1.x);\n return new Point(x, p1.y + (p2.y - p1.y) * t);\n}\n\nfunction intersectionPointY(p1: Point, p2: Point, y: number): Point {\n const t = (y - p1.y) / (p2.y - p1.y);\n return new Point(p1.x + (p2.x - p1.x) * t, y);\n}\n","import Point from '@mapbox/point-geometry';\n\nimport {register} from '../util/web_worker_transfer';\n\nexport class Anchor extends Point {\n angle: any;\n segment?: number;\n\n constructor(x: number, y: number, angle: number, segment?: number) {\n super(x, y);\n this.angle = angle;\n if (segment !== undefined) {\n this.segment = segment;\n }\n }\n\n clone() {\n return new Anchor(this.x, this.y, this.angle, this.segment);\n }\n}\n\nregister('Anchor', Anchor);\n","import type Point from '@mapbox/point-geometry';\nimport type {Anchor} from './anchor';\n\n/**\n * Labels placed around really sharp angles aren't readable. Check if any\n * part of the potential label has a combined angle that is too big.\n *\n * @param line - The line to check\n * @param anchor - The point on the line around which the label is anchored.\n * @param labelLength - The length of the label in geometry units.\n * @param windowSize - The check fails if the combined angles within a part of the line that is `windowSize` long is too big.\n * @param maxAngle - The maximum combined angle that any window along the label is allowed to have.\n *\n * @returns whether the label should be placed\n */\nexport function checkMaxAngle(line: Array, anchor: Anchor, labelLength: number, windowSize: number, maxAngle: number) {\n\n // horizontal labels and labels with length 0 always pass\n if (anchor.segment === undefined || labelLength === 0) return true;\n\n let p = anchor;\n let index = anchor.segment + 1;\n let anchorDistance = 0;\n\n // move backwards along the line to the first segment the label appears on\n while (anchorDistance > -labelLength / 2) {\n index--;\n\n // there isn't enough room for the label after the beginning of the line\n if (index < 0) return false;\n\n anchorDistance -= line[index].dist(p);\n p = line[index];\n }\n\n anchorDistance += line[index].dist(line[index + 1]);\n index++;\n\n // store recent corners and their total angle difference\n const recentCorners = [];\n let recentAngleDelta = 0;\n\n // move forwards by the length of the label and check angles along the way\n while (anchorDistance < labelLength / 2) {\n const prev = line[index - 1];\n const current = line[index];\n const next = line[index + 1];\n\n // there isn't enough room for the label before the end of the line\n if (!next) return false;\n\n let angleDelta = prev.angleTo(current) - current.angleTo(next);\n // restrict angle to -pi..pi range\n angleDelta = Math.abs(((angleDelta + 3 * Math.PI) % (Math.PI * 2)) - Math.PI);\n\n recentCorners.push({\n distance: anchorDistance,\n angleDelta\n });\n recentAngleDelta += angleDelta;\n\n // remove corners that are far enough away from the list of recent anchors\n while (anchorDistance - recentCorners[0].distance > windowSize) {\n recentAngleDelta -= recentCorners.shift().angleDelta;\n }\n\n // the sum of angles within the window area exceeds the maximum allowed value. check fails.\n if (recentAngleDelta > maxAngle) return false;\n\n index++;\n anchorDistance += current.dist(next);\n }\n\n // no part of the line had an angle greater than the maximum allowed. check passes.\n return true;\n}\n","import {interpolates} from '@maplibre/maplibre-gl-style-spec';\n\nimport {Anchor} from '../symbol/anchor';\nimport {checkMaxAngle} from './check_max_angle';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {Shaping, PositionedIcon} from './shaping';\n\nexport {getAnchors, getCenterAnchor};\n\nfunction getLineLength(line: Array): number {\n let lineLength = 0;\n for (let k = 0; k < line.length - 1; k++) {\n lineLength += line[k].dist(line[k + 1]);\n }\n return lineLength;\n}\n\nfunction getAngleWindowSize(\n shapedText: Shaping,\n glyphSize: number,\n boxScale: number\n): number {\n return shapedText ?\n 3 / 5 * glyphSize * boxScale :\n 0;\n}\n\nfunction getShapedLabelLength(shapedText?: Shaping | null, shapedIcon?: PositionedIcon | null): number {\n return Math.max(\n shapedText ? shapedText.right - shapedText.left : 0,\n shapedIcon ? shapedIcon.right - shapedIcon.left : 0);\n}\n\nfunction getCenterAnchor(line: Array,\n maxAngle: number,\n shapedText: Shaping,\n shapedIcon: PositionedIcon,\n glyphSize: number,\n boxScale: number) {\n const angleWindowSize = getAngleWindowSize(shapedText, glyphSize, boxScale);\n const labelLength = getShapedLabelLength(shapedText, shapedIcon) * boxScale;\n\n let prevDistance = 0;\n const centerDistance = getLineLength(line) / 2;\n\n for (let i = 0; i < line.length - 1; i++) {\n\n const a = line[i],\n b = line[i + 1];\n\n const segmentDistance = a.dist(b);\n\n if (prevDistance + segmentDistance > centerDistance) {\n // The center is on this segment\n const t = (centerDistance - prevDistance) / segmentDistance,\n x = interpolates.number(a.x, b.x, t),\n y = interpolates.number(a.y, b.y, t);\n\n const anchor = new Anchor(x, y, b.angleTo(a), i);\n anchor._round();\n if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) {\n return anchor;\n } else {\n return;\n }\n }\n\n prevDistance += segmentDistance;\n }\n}\n\nfunction getAnchors(line: Array,\n spacing: number,\n maxAngle: number,\n shapedText: Shaping,\n shapedIcon: PositionedIcon,\n glyphSize: number,\n boxScale: number,\n overscaling: number,\n tileExtent: number): Anchor[] {\n\n // Resample a line to get anchor points for labels and check that each\n // potential label passes text-max-angle check and has enough room to fit\n // on the line.\n\n const angleWindowSize = getAngleWindowSize(shapedText, glyphSize, boxScale);\n const shapedLabelLength = getShapedLabelLength(shapedText, shapedIcon);\n const labelLength = shapedLabelLength * boxScale;\n\n // Is the line continued from outside the tile boundary?\n const isLineContinued = line[0].x === 0 || line[0].x === tileExtent || line[0].y === 0 || line[0].y === tileExtent;\n\n // Is the label long, relative to the spacing?\n // If so, adjust the spacing so there is always a minimum space of `spacing / 4` between label edges.\n if (spacing - labelLength < spacing / 4) {\n spacing = labelLength + spacing / 4;\n }\n\n // Offset the first anchor by:\n // Either half the label length plus a fixed extra offset if the line is not continued\n // Or half the spacing if the line is continued.\n\n // For non-continued lines, add a bit of fixed extra offset to avoid collisions at T intersections.\n const fixedExtraOffset = glyphSize * 2;\n\n const offset = !isLineContinued ?\n ((shapedLabelLength / 2 + fixedExtraOffset) * boxScale * overscaling) % spacing :\n (spacing / 2 * overscaling) % spacing;\n\n return resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, isLineContinued, false, tileExtent);\n}\n\nfunction resample(line: Point[], offset: number, spacing: number, angleWindowSize: number, maxAngle: number, labelLength: number, isLineContinued: boolean, placeAtMiddle: boolean, tileExtent: number): Anchor[] {\n\n const halfLabelLength = labelLength / 2;\n const lineLength = getLineLength(line);\n\n let distance = 0;\n let markedDistance = offset - spacing;\n\n let anchors: Anchor[] = [];\n\n for (let i = 0; i < line.length - 1; i++) {\n\n const a = line[i],\n b = line[i + 1];\n\n const segmentDist = a.dist(b),\n angle = b.angleTo(a);\n\n while (markedDistance + spacing < distance + segmentDist) {\n markedDistance += spacing;\n\n const t = (markedDistance - distance) / segmentDist,\n x = interpolates.number(a.x, b.x, t),\n y = interpolates.number(a.y, b.y, t);\n\n // Check that the point is within the tile boundaries and that\n // the label would fit before the beginning and end of the line\n // if placed at this point.\n if (x >= 0 && x < tileExtent && y >= 0 && y < tileExtent &&\n markedDistance - halfLabelLength >= 0 &&\n markedDistance + halfLabelLength <= lineLength) {\n const anchor = new Anchor(x, y, angle, i);\n anchor._round();\n\n if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) {\n anchors.push(anchor);\n }\n }\n }\n\n distance += segmentDist;\n }\n\n if (!placeAtMiddle && !anchors.length && !isLineContinued) {\n // The first attempt at finding anchors at which labels can be placed failed.\n // Try again, but this time just try placing one anchor at the middle of the line.\n // This has the most effect for short lines in overscaled tiles, since the\n // initial offset used in overscaled tiles is calculated to align labels with positions in\n // parent tiles instead of placing the label as close to the beginning as possible.\n anchors = resample(line, distance / 2, spacing, angleWindowSize, maxAngle, labelLength, isLineContinued, true, tileExtent);\n }\n\n return anchors;\n}\n","import Point from '@mapbox/point-geometry';\n\nimport {GLYPH_PBF_BORDER} from '../style/parse_glyph_pbf';\n\nimport type {Anchor} from './anchor';\nimport type {Box, PositionedIcon, Shaping} from './shaping';\nimport {SHAPING_DEFAULT_OFFSET, applyTextFit} from './shaping';\nimport {IMAGE_PADDING} from '../render/image_atlas';\nimport type {SymbolStyleLayer} from '../style/style_layer/symbol_style_layer';\nimport type {Feature} from '@maplibre/maplibre-gl-style-spec';\nimport type {StyleImage} from '../style/style_image';\nimport ONE_EM from './one_em';\nimport {type Rect} from '../render/glyph_atlas';\n\n/**\n * A textured quad for rendering a single icon or glyph.\n *\n * The zoom range the glyph can be shown is defined by minScale and maxScale.\n *\n * @param tl - The offset of the top left corner from the anchor.\n * @param tr - The offset of the top right corner from the anchor.\n * @param bl - The offset of the bottom left corner from the anchor.\n * @param br - The offset of the bottom right corner from the anchor.\n * @param tex - The texture coordinates.\n */\nexport type SymbolQuad = {\n tl: Point;\n tr: Point;\n bl: Point;\n br: Point;\n tex: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n pixelOffsetTL: Point;\n pixelOffsetBR: Point;\n writingMode: any | void;\n glyphOffset: [number, number];\n sectionIndex: number;\n isSDF: boolean;\n minFontScaleX: number;\n minFontScaleY: number;\n};\n\n// If you have a 10px icon that isn't perfectly aligned to the pixel grid it will cover 11 actual\n// pixels. The quad needs to be padded to account for this, otherwise they'll look slightly clipped\n// on one edge in some cases.\nconst border = IMAGE_PADDING;\n\n/**\n * Create the quads used for rendering an icon.\n */\nexport function getIconQuads(\n shapedIcon: PositionedIcon,\n iconRotate: number,\n isSDFIcon: boolean,\n hasIconTextFit: boolean\n): Array {\n const quads = [];\n\n const image = shapedIcon.image;\n const pixelRatio = image.pixelRatio;\n const imageWidth = image.paddedRect.w - 2 * border;\n const imageHeight = image.paddedRect.h - 2 * border;\n\n let icon: Box = {\n x1: shapedIcon.left,\n y1: shapedIcon.top,\n x2: shapedIcon.right,\n y2: shapedIcon.bottom\n };\n\n const stretchX = image.stretchX || [[0, imageWidth]];\n const stretchY = image.stretchY || [[0, imageHeight]];\n\n const reduceRanges = (sum, range) => sum + range[1] - range[0];\n const stretchWidth = stretchX.reduce(reduceRanges, 0);\n const stretchHeight = stretchY.reduce(reduceRanges, 0);\n const fixedWidth = imageWidth - stretchWidth;\n const fixedHeight = imageHeight - stretchHeight;\n\n let stretchOffsetX = 0;\n let stretchContentWidth = stretchWidth;\n let stretchOffsetY = 0;\n let stretchContentHeight = stretchHeight;\n let fixedOffsetX = 0;\n let fixedContentWidth = fixedWidth;\n let fixedOffsetY = 0;\n let fixedContentHeight = fixedHeight;\n\n if (image.content && hasIconTextFit) {\n const content = image.content;\n const contentWidth = content[2] - content[0];\n const contentHeight = content[3] - content[1];\n // Constrict content area to fit target aspect ratio\n if (image.textFitWidth || image.textFitHeight) {\n icon = applyTextFit(shapedIcon);\n }\n stretchOffsetX = sumWithinRange(stretchX, 0, content[0]);\n stretchOffsetY = sumWithinRange(stretchY, 0, content[1]);\n stretchContentWidth = sumWithinRange(stretchX, content[0], content[2]);\n stretchContentHeight = sumWithinRange(stretchY, content[1], content[3]);\n fixedOffsetX = content[0] - stretchOffsetX;\n fixedOffsetY = content[1] - stretchOffsetY;\n fixedContentWidth = contentWidth - stretchContentWidth;\n fixedContentHeight = contentHeight - stretchContentHeight;\n }\n\n const iconLeft = icon.x1;\n const iconTop = icon.y1;\n const iconWidth = icon.x2 - iconLeft;\n const iconHeight = icon.y2 - iconTop;\n\n const makeBox = (left, top, right, bottom) => {\n\n const leftEm = getEmOffset(left.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);\n const leftPx = getPxOffset(left.fixed - fixedOffsetX, fixedContentWidth, left.stretch, stretchWidth);\n\n const topEm = getEmOffset(top.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);\n const topPx = getPxOffset(top.fixed - fixedOffsetY, fixedContentHeight, top.stretch, stretchHeight);\n\n const rightEm = getEmOffset(right.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);\n const rightPx = getPxOffset(right.fixed - fixedOffsetX, fixedContentWidth, right.stretch, stretchWidth);\n\n const bottomEm = getEmOffset(bottom.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);\n const bottomPx = getPxOffset(bottom.fixed - fixedOffsetY, fixedContentHeight, bottom.stretch, stretchHeight);\n\n const tl = new Point(leftEm, topEm);\n const tr = new Point(rightEm, topEm);\n const br = new Point(rightEm, bottomEm);\n const bl = new Point(leftEm, bottomEm);\n const pixelOffsetTL = new Point(leftPx / pixelRatio, topPx / pixelRatio);\n const pixelOffsetBR = new Point(rightPx / pixelRatio, bottomPx / pixelRatio);\n\n const angle = iconRotate * Math.PI / 180;\n\n if (angle) {\n const sin = Math.sin(angle),\n cos = Math.cos(angle),\n matrix = [cos, -sin, sin, cos] as [number, number, number, number];\n\n tl._matMult(matrix);\n tr._matMult(matrix);\n bl._matMult(matrix);\n br._matMult(matrix);\n }\n\n const x1 = left.stretch + left.fixed;\n const x2 = right.stretch + right.fixed;\n const y1 = top.stretch + top.fixed;\n const y2 = bottom.stretch + bottom.fixed;\n\n const subRect = {\n x: image.paddedRect.x + border + x1,\n y: image.paddedRect.y + border + y1,\n w: x2 - x1,\n h: y2 - y1\n };\n\n const minFontScaleX = fixedContentWidth / pixelRatio / iconWidth;\n const minFontScaleY = fixedContentHeight / pixelRatio / iconHeight;\n\n // Icon quad is padded, so texture coordinates also need to be padded.\n return {tl, tr, bl, br, tex: subRect, writingMode: undefined, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL, pixelOffsetBR, minFontScaleX, minFontScaleY, isSDF: isSDFIcon};\n };\n\n if (!hasIconTextFit || (!image.stretchX && !image.stretchY)) {\n quads.push(makeBox(\n {fixed: 0, stretch: -1},\n {fixed: 0, stretch: -1},\n {fixed: 0, stretch: imageWidth + 1},\n {fixed: 0, stretch: imageHeight + 1}));\n } else {\n const xCuts = stretchZonesToCuts(stretchX, fixedWidth, stretchWidth);\n const yCuts = stretchZonesToCuts(stretchY, fixedHeight, stretchHeight);\n\n for (let xi = 0; xi < xCuts.length - 1; xi++) {\n const x1 = xCuts[xi];\n const x2 = xCuts[xi + 1];\n for (let yi = 0; yi < yCuts.length - 1; yi++) {\n const y1 = yCuts[yi];\n const y2 = yCuts[yi + 1];\n quads.push(makeBox(x1, y1, x2, y2));\n }\n }\n }\n\n return quads;\n}\n\nfunction sumWithinRange(ranges, min, max) {\n let sum = 0;\n for (const range of ranges) {\n sum += Math.max(min, Math.min(max, range[1])) - Math.max(min, Math.min(max, range[0]));\n }\n return sum;\n}\n\nfunction stretchZonesToCuts(stretchZones, fixedSize, stretchSize) {\n const cuts = [{fixed: -border, stretch: 0}];\n\n for (const [c1, c2] of stretchZones) {\n const last = cuts[cuts.length - 1];\n cuts.push({\n fixed: c1 - last.stretch,\n stretch: last.stretch\n });\n cuts.push({\n fixed: c1 - last.stretch,\n stretch: last.stretch + (c2 - c1)\n });\n }\n cuts.push({\n fixed: fixedSize + border,\n stretch: stretchSize\n });\n return cuts;\n}\n\nfunction getEmOffset(stretchOffset, stretchSize, iconSize, iconOffset) {\n return stretchOffset / stretchSize * iconSize + iconOffset;\n}\n\nfunction getPxOffset(fixedOffset, fixedSize, stretchOffset, stretchSize) {\n return fixedOffset - fixedSize * stretchOffset / stretchSize;\n}\n\n/**\n * Create the quads used for rendering a text label.\n */\nexport function getGlyphQuads(\n anchor: Anchor,\n shaping: Shaping,\n textOffset: [number, number],\n layer: SymbolStyleLayer,\n alongLine: boolean,\n feature: Feature,\n imageMap: {[_: string]: StyleImage},\n allowVerticalPlacement: boolean\n): Array {\n\n const textRotate = layer.layout.get('text-rotate').evaluate(feature, {}) * Math.PI / 180;\n const quads = [];\n\n for (const line of shaping.positionedLines) {\n for (const positionedGlyph of line.positionedGlyphs) {\n if (!positionedGlyph.rect) continue;\n const textureRect: Rect = positionedGlyph.rect || {} as Rect;\n\n // The rects have an additional buffer that is not included in their size.\n const glyphPadding = 1.0;\n let rectBuffer = GLYPH_PBF_BORDER + glyphPadding;\n let isSDF = true;\n let pixelRatio = 1.0;\n let lineOffset = 0.0;\n\n const rotateVerticalGlyph = (alongLine || allowVerticalPlacement) && positionedGlyph.vertical;\n const halfAdvance = positionedGlyph.metrics.advance * positionedGlyph.scale / 2;\n\n // Align images and scaled glyphs in the middle of a vertical line.\n if (allowVerticalPlacement && shaping.verticalizable) {\n const scaledGlyphOffset = (positionedGlyph.scale - 1) * ONE_EM;\n const imageOffset = (ONE_EM - positionedGlyph.metrics.width * positionedGlyph.scale) / 2;\n lineOffset = line.lineOffset / 2 - (positionedGlyph.imageName ? -imageOffset : scaledGlyphOffset);\n }\n\n if (positionedGlyph.imageName) {\n const image = imageMap[positionedGlyph.imageName];\n isSDF = image.sdf;\n pixelRatio = image.pixelRatio;\n rectBuffer = IMAGE_PADDING / pixelRatio;\n }\n\n const glyphOffset = alongLine ?\n [positionedGlyph.x + halfAdvance, positionedGlyph.y] :\n [0, 0];\n\n let builtInOffset: [number, number] = alongLine ?\n [0, 0] :\n [positionedGlyph.x + halfAdvance + textOffset[0], positionedGlyph.y + textOffset[1] - lineOffset];\n\n let verticalizedLabelOffset = [0, 0] as [number, number];\n if (rotateVerticalGlyph) {\n // Vertical POI labels that are rotated 90deg CW and whose glyphs must preserve upright orientation\n // need to be rotated 90deg CCW. After a quad is rotated, it is translated to the original built-in offset.\n verticalizedLabelOffset = builtInOffset;\n builtInOffset = [0, 0];\n }\n\n const textureScale = positionedGlyph.metrics.isDoubleResolution ? 2 : 1;\n\n const x1 = (positionedGlyph.metrics.left - rectBuffer) * positionedGlyph.scale - halfAdvance + builtInOffset[0];\n const y1 = (-positionedGlyph.metrics.top - rectBuffer) * positionedGlyph.scale + builtInOffset[1];\n const x2 = x1 + textureRect.w / textureScale * positionedGlyph.scale / pixelRatio;\n const y2 = y1 + textureRect.h / textureScale * positionedGlyph.scale / pixelRatio;\n\n const tl = new Point(x1, y1);\n const tr = new Point(x2, y1);\n const bl = new Point(x1, y2);\n const br = new Point(x2, y2);\n\n if (rotateVerticalGlyph) {\n // Vertical-supporting glyphs are laid out in 24x24 point boxes (1 square em)\n // In horizontal orientation, the y values for glyphs are below the midline\n // and we use a \"yOffset\" of -17 to pull them up to the middle.\n // By rotating counter-clockwise around the point at the center of the left\n // edge of a 24x24 layout box centered below the midline, we align the center\n // of the glyphs with the horizontal midline, so the yOffset is no longer\n // necessary, but we also pull the glyph to the left along the x axis.\n // The y coordinate includes baseline yOffset, thus needs to be accounted\n // for when glyph is rotated and translated.\n const center = new Point(-halfAdvance, halfAdvance - SHAPING_DEFAULT_OFFSET);\n const verticalRotation = -Math.PI / 2;\n\n // xHalfWidthOffsetCorrection is a difference between full-width and half-width\n // advance, should be 0 for full-width glyphs and will pull up half-width glyphs.\n const xHalfWidthOffsetCorrection = ONE_EM / 2 - halfAdvance;\n const yImageOffsetCorrection = positionedGlyph.imageName ? xHalfWidthOffsetCorrection : 0.0;\n const halfWidthOffsetCorrection = new Point(5 - SHAPING_DEFAULT_OFFSET - xHalfWidthOffsetCorrection, -yImageOffsetCorrection);\n const verticalOffsetCorrection = new Point(...verticalizedLabelOffset);\n tl._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection);\n tr._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection);\n bl._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection);\n br._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection);\n }\n\n if (textRotate) {\n const sin = Math.sin(textRotate),\n cos = Math.cos(textRotate),\n matrix = [cos, -sin, sin, cos] as [number, number, number, number];\n\n tl._matMult(matrix);\n tr._matMult(matrix);\n bl._matMult(matrix);\n br._matMult(matrix);\n }\n\n const pixelOffsetTL = new Point(0, 0);\n const pixelOffsetBR = new Point(0, 0);\n const minFontScaleX = 0;\n const minFontScaleY = 0;\n quads.push({tl, tr, bl, br, tex: textureRect, writingMode: shaping.writingMode, glyphOffset, sectionIndex: positionedGlyph.sectionIndex, isSDF, pixelOffsetTL, pixelOffsetBR, minFontScaleX, minFontScaleY});\n }\n }\n\n return quads;\n}\n","import type {CollisionBoxArray} from '../data/array_types.g';\nimport Point from '@mapbox/point-geometry';\nimport type {Anchor} from './anchor';\nimport {type SymbolPadding} from '../style/style_layer/symbol_style_layer';\nimport {applyTextFit} from './shaping';\n\n/**\n * A CollisionFeature represents the area of the tile covered by a single label.\n * It is used with CollisionIndex to check if the label overlaps with any\n * previous labels. A CollisionFeature is mostly just a set of CollisionBox\n * objects.\n */\nexport class CollisionFeature {\n boxStartIndex: number;\n boxEndIndex: number;\n circleDiameter: number;\n\n /**\n * Create a CollisionFeature, adding its collision box data to the given collisionBoxArray in the process.\n * For line aligned labels a collision circle diameter is computed instead.\n *\n * @param anchor - The point along the line around which the label is anchored.\n * @param shaped - The text or icon shaping results.\n * @param boxScale - A magic number used to convert from glyph metrics units to geometry units.\n * @param padding - The amount of padding to add around the label edges.\n * @param alignLine - Whether the label is aligned with the line or the viewport.\n */\n constructor(collisionBoxArray: CollisionBoxArray,\n anchor: Anchor,\n featureIndex: number,\n sourceLayerIndex: number,\n bucketIndex: number,\n shaped: any,\n boxScale: number,\n padding: SymbolPadding,\n alignLine: boolean,\n rotate: number) {\n\n this.boxStartIndex = collisionBoxArray.length;\n\n if (alignLine) {\n // Compute height of the shape in glyph metrics and apply collision padding.\n // Note that the pixel based 'text-padding' is applied at runtime\n let top = shaped.top;\n let bottom = shaped.bottom;\n const collisionPadding = shaped.collisionPadding;\n\n if (collisionPadding) {\n top -= collisionPadding[1];\n bottom += collisionPadding[3];\n }\n\n let height = bottom - top;\n\n if (height > 0) {\n // set minimum box height to avoid very many small labels\n height = Math.max(10, height);\n this.circleDiameter = height;\n }\n } else {\n const icon = shaped.image?.content && (shaped.image.textFitWidth || shaped.image.textFitHeight) ?\n applyTextFit(shaped) :\n {\n x1: shaped.left,\n y1: shaped.top,\n x2: shaped.right,\n y2: shaped.bottom\n };\n\n // margin is in CSS order: [top, right, bottom, left]\n icon.y1 = icon.y1 * boxScale - padding[0];\n icon.y2 = icon.y2 * boxScale + padding[2];\n icon.x1 = icon.x1 * boxScale - padding[3];\n icon.x2 = icon.x2 * boxScale + padding[1];\n\n const collisionPadding = shaped.collisionPadding;\n if (collisionPadding) {\n icon.x1 -= collisionPadding[0] * boxScale;\n icon.y1 -= collisionPadding[1] * boxScale;\n icon.x2 += collisionPadding[2] * boxScale;\n icon.y2 += collisionPadding[3] * boxScale;\n }\n\n if (rotate) {\n // Account for *-rotate in point collision boxes\n // See https://github.com/mapbox/mapbox-gl-js/issues/6075\n // Doesn't account for icon-text-fit\n\n const tl = new Point(icon.x1, icon.y1);\n const tr = new Point(icon.x2, icon.y1);\n const bl = new Point(icon.x1, icon.y2);\n const br = new Point(icon.x2, icon.y2);\n\n const rotateRadians = rotate * Math.PI / 180;\n\n tl._rotate(rotateRadians);\n tr._rotate(rotateRadians);\n bl._rotate(rotateRadians);\n br._rotate(rotateRadians);\n\n // Collision features require an \"on-axis\" geometry,\n // so take the envelope of the rotated geometry\n // (may be quite large for wide labels rotated 45 degrees)\n icon.x1 = Math.min(tl.x, tr.x, bl.x, br.x);\n icon.x2 = Math.max(tl.x, tr.x, bl.x, br.x);\n icon.y1 = Math.min(tl.y, tr.y, bl.y, br.y);\n icon.y2 = Math.max(tl.y, tr.y, bl.y, br.y);\n }\n collisionBoxArray.emplaceBack(anchor.x, anchor.y, icon.x1, icon.y1, icon.x2, icon.y2, featureIndex, sourceLayerIndex, bucketIndex);\n }\n\n this.boxEndIndex = collisionBoxArray.length;\n }\n}\n","\nexport default class TinyQueue {\n constructor(data = [], compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0)) {\n this.data = data;\n this.length = this.data.length;\n this.compare = compare;\n\n if (this.length > 0) {\n for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);\n }\n }\n\n push(item) {\n this.data.push(item);\n this._up(this.length++);\n }\n\n pop() {\n if (this.length === 0) return undefined;\n\n const top = this.data[0];\n const bottom = this.data.pop();\n\n if (--this.length > 0) {\n this.data[0] = bottom;\n this._down(0);\n }\n\n return top;\n }\n\n peek() {\n return this.data[0];\n }\n\n _up(pos) {\n const {data, compare} = this;\n const item = data[pos];\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const current = data[parent];\n if (compare(item, current) >= 0) break;\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n }\n\n _down(pos) {\n const {data, compare} = this;\n const halfLength = this.length >> 1;\n const item = data[pos];\n\n while (pos < halfLength) {\n let bestChild = (pos << 1) + 1; // initially it is the left child\n const right = bestChild + 1;\n\n if (right < this.length && compare(data[right], data[bestChild]) < 0) {\n bestChild = right;\n }\n if (compare(data[bestChild], item) >= 0) break;\n\n data[pos] = data[bestChild];\n pos = bestChild;\n }\n\n data[pos] = item;\n }\n}\n","import Queue from 'tinyqueue';\n\nimport Point from '@mapbox/point-geometry';\nimport {distToSegmentSquared} from './intersection_tests';\nimport {Bounds} from '../geo/bounds';\n\n/**\n * Finds an approximation of a polygon's Pole Of Inaccessibility https://en.wikipedia.org/wiki/Pole_of_inaccessibility\n * This is a copy of https://github.com/mapbox/polylabel adapted to use Points\n *\n * @param polygonRings - first item in array is the outer ring followed optionally by the list of holes, should be an element of the result of util/classify_rings\n * @param precision - Specified in input coordinate units. If 0 returns after first run, if `> 0` repeatedly narrows the search space until the radius of the area searched for the best pole is less than precision\n * @param debug - Print some statistics to the console during execution\n * @returns Pole of Inaccessibility.\n */\nexport function findPoleOfInaccessibility(\n polygonRings: Array>,\n precision: number = 1,\n debug: boolean = false\n): Point {\n const bounds = Bounds.fromPoints(polygonRings[0]);\n\n const cellSize = Math.min(bounds.width(), bounds.height());\n let h = cellSize / 2;\n\n // a priority queue of cells in order of their \"potential\" (max distance to polygon)\n const cellQueue = new Queue([], compareMax);\n\n const {minX, minY, maxX, maxY} = bounds;\n if (cellSize === 0) return new Point(minX, minY);\n\n // cover polygon with initial cells\n for (let x = minX; x < maxX; x += cellSize) {\n for (let y = minY; y < maxY; y += cellSize) {\n cellQueue.push(new Cell(x + h, y + h, h, polygonRings));\n }\n }\n\n // take centroid as the first best guess\n let bestCell = getCentroidCell(polygonRings);\n let numProbes = cellQueue.length;\n\n while (cellQueue.length) {\n // pick the most promising cell from the queue\n const cell = cellQueue.pop();\n\n // update the best cell if we found a better one\n if (cell.d > bestCell.d || !bestCell.d) {\n bestCell = cell;\n if (debug) console.log('found best %d after %d probes', Math.round(1e4 * cell.d) / 1e4, numProbes);\n }\n\n // do not drill down further if there's no chance of a better solution\n if (cell.max - bestCell.d <= precision) continue;\n\n // split the cell into four cells\n h = cell.h / 2;\n cellQueue.push(new Cell(cell.p.x - h, cell.p.y - h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x + h, cell.p.y - h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x - h, cell.p.y + h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x + h, cell.p.y + h, h, polygonRings));\n numProbes += 4;\n }\n\n if (debug) {\n console.log(`num probes: ${numProbes}`);\n console.log(`best distance: ${bestCell.d}`);\n }\n\n return bestCell.p;\n}\n\nfunction compareMax(a, b) {\n return b.max - a.max;\n}\n\nfunction Cell(x, y, h, polygon) {\n this.p = new Point(x, y);\n this.h = h; // half the cell size\n this.d = pointToPolygonDist(this.p, polygon); // distance from cell center to polygon\n this.max = this.d + this.h * Math.SQRT2; // max distance to polygon within a cell\n}\n\n// signed distance from point to polygon outline (negative if point is outside)\nfunction pointToPolygonDist(p, polygon) {\n let inside = false;\n let minDistSq = Infinity;\n\n for (let k = 0; k < polygon.length; k++) {\n const ring = polygon[k];\n\n for (let i = 0, len = ring.length, j = len - 1; i < len; j = i++) {\n const a = ring[i];\n const b = ring[j];\n\n if ((a.y > p.y !== b.y > p.y) &&\n (p.x < (b.x - a.x) * (p.y - a.y) / (b.y - a.y) + a.x)) inside = !inside;\n\n minDistSq = Math.min(minDistSq, distToSegmentSquared(p, a, b));\n }\n }\n\n return (inside ? 1 : -1) * Math.sqrt(minDistSq);\n}\n\n// get polygon centroid\nfunction getCentroidCell(polygon) {\n let area = 0;\n let x = 0;\n let y = 0;\n const points = polygon[0];\n for (let i = 0, len = points.length, j = len - 1; i < len; j = i++) {\n const a = points[i];\n const b = points[j];\n const f = a.x * b.y - b.x * a.y;\n x += (a.x + b.x) * f;\n y += (a.y + b.y) * f;\n area += f * 3;\n }\n return new Cell(x / area, y / area, 0, polygon);\n}\n","import {VariableAnchorOffsetCollection, type VariableAnchorOffsetCollectionSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {type SymbolFeature} from '../../data/bucket/symbol_bucket';\nimport {type CanonicalTileID} from '../../tile/tile_id';\nimport ONE_EM from '../../symbol/one_em';\nimport {type SymbolStyleLayer} from './symbol_style_layer';\n\nexport enum TextAnchorEnum {\n 'center' = 1,\n 'left' = 2,\n 'right' = 3,\n 'top' = 4,\n 'bottom' = 5,\n 'top-left' = 6,\n 'top-right' = 7,\n 'bottom-left' = 8,\n 'bottom-right' = 9\n}\n\nexport type TextAnchor = keyof typeof TextAnchorEnum;\n\n// The radial offset is to the edge of the text box\n// In the horizontal direction, the edge of the text box is where glyphs start\n// But in the vertical direction, the glyphs appear to \"start\" at the baseline\n// We don't actually load baseline data, but we assume an offset of ONE_EM - 17\n// (see \"yOffset\" in shaping.js)\nconst baselineOffset = 7;\nexport const INVALID_TEXT_OFFSET = Number.POSITIVE_INFINITY;\n\nexport function evaluateVariableOffset(anchor: TextAnchor, offset: [number, number]): [number, number] {\n\n function fromRadialOffset(anchor: TextAnchor, radialOffset: number): [number, number] {\n let x = 0, y = 0;\n if (radialOffset < 0) radialOffset = 0; // Ignore negative offset.\n // solve for r where r^2 + r^2 = radialOffset^2\n const hypotenuse = radialOffset / Math.SQRT2;\n switch (anchor) {\n case 'top-right':\n case 'top-left':\n y = hypotenuse - baselineOffset;\n break;\n case 'bottom-right':\n case 'bottom-left':\n y = -hypotenuse + baselineOffset;\n break;\n case 'bottom':\n y = -radialOffset + baselineOffset;\n break;\n case 'top':\n y = radialOffset - baselineOffset;\n break;\n }\n\n switch (anchor) {\n case 'top-right':\n case 'bottom-right':\n x = -hypotenuse;\n break;\n case 'top-left':\n case 'bottom-left':\n x = hypotenuse;\n break;\n case 'left':\n x = radialOffset;\n break;\n case 'right':\n x = -radialOffset;\n break;\n }\n\n return [x, y];\n }\n\n function fromTextOffset(anchor: TextAnchor, offsetX: number, offsetY: number): [number, number] {\n let x = 0, y = 0;\n // Use absolute offset values.\n offsetX = Math.abs(offsetX);\n offsetY = Math.abs(offsetY);\n\n switch (anchor) {\n case 'top-right':\n case 'top-left':\n case 'top':\n y = offsetY - baselineOffset;\n break;\n case 'bottom-right':\n case 'bottom-left':\n case 'bottom':\n y = -offsetY + baselineOffset;\n break;\n }\n\n switch (anchor) {\n case 'top-right':\n case 'bottom-right':\n case 'right':\n x = -offsetX;\n break;\n case 'top-left':\n case 'bottom-left':\n case 'left':\n x = offsetX;\n break;\n }\n\n return [x, y];\n }\n\n return (offset[1] !== INVALID_TEXT_OFFSET) ? fromTextOffset(anchor, offset[0], offset[1]) : fromRadialOffset(anchor, offset[0]);\n}\n\n// Helper to support both text-variable-anchor and text-variable-anchor-offset. Offset values converted from EMs to PXs\nexport function getTextVariableAnchorOffset(layer: SymbolStyleLayer, feature: SymbolFeature, canonical: CanonicalTileID): VariableAnchorOffsetCollection | null {\n const layout = layer.layout;\n // If style specifies text-variable-anchor-offset, just return it\n const variableAnchorOffset = layout.get('text-variable-anchor-offset')?.evaluate(feature, {}, canonical);\n\n if (variableAnchorOffset) {\n const sourceValues = variableAnchorOffset.values;\n const destValues: VariableAnchorOffsetCollectionSpecification = [];\n\n // Convert offsets from EM to PX, and apply baseline shift\n for (let i = 0; i < sourceValues.length; i += 2) {\n const anchor = destValues[i] = sourceValues[i] as TextAnchor;\n const offset = (sourceValues[i + 1] as [number, number]).map(t => t * ONE_EM) as [number, number];\n\n if (anchor.startsWith('top')) {\n offset[1] -= baselineOffset;\n } else if (anchor.startsWith('bottom')) {\n offset[1] += baselineOffset;\n }\n\n destValues[i + 1] = offset;\n }\n\n return new VariableAnchorOffsetCollection(destValues);\n }\n\n // If style specifies text-variable-anchor, convert to the new format\n const variableAnchor = layout.get('text-variable-anchor');\n\n if (variableAnchor) {\n let textOffset: [number, number];\n const unevaluatedLayout = layer._unevaluatedLayout;\n\n // The style spec says don't use `text-offset` and `text-radial-offset` together\n // but doesn't actually specify what happens if you use both. We go with the radial offset.\n if (unevaluatedLayout.getValue('text-radial-offset') !== undefined) {\n textOffset = [layout.get('text-radial-offset').evaluate(feature, {}, canonical) * ONE_EM, INVALID_TEXT_OFFSET];\n } else {\n textOffset = layout.get('text-offset').evaluate(feature, {}, canonical).map(t => t * ONE_EM) as [number, number];\n }\n\n const anchorOffsets: VariableAnchorOffsetCollectionSpecification = [];\n\n for (const anchor of variableAnchor) {\n anchorOffsets.push(anchor, evaluateVariableOffset(anchor, textOffset));\n }\n\n return new VariableAnchorOffsetCollection(anchorOffsets);\n }\n\n return null;\n}\n","import {Anchor} from './anchor';\n\nimport {getAnchors, getCenterAnchor} from './get_anchors';\nimport {clipLine} from './clip_line';\nimport {shapeText, shapeIcon, WritingMode, fitIconToText} from './shaping';\nimport {getGlyphQuads, getIconQuads} from './quads';\nimport {CollisionFeature} from './collision_feature';\nimport {warnOnce} from '../util/util';\nimport {\n allowsVerticalWritingMode,\n allowsLetterSpacing\n} from '../util/script_detection';\nimport {findPoleOfInaccessibility} from '../util/find_pole_of_inaccessibility';\nimport {EXTENT} from '../data/extent';\nimport {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\nimport {SIZE_PACK_FACTOR, MAX_PACKED_SIZE, MAX_GLYPH_ICON_SIZE} from './symbol_size';\nimport ONE_EM from './one_em';\nimport type {CanonicalTileID} from '../tile/tile_id';\nimport type {Shaping, PositionedIcon, TextJustify} from './shaping';\nimport type {CollisionBoxArray, TextAnchorOffsetArray} from '../data/array_types.g';\nimport type {SymbolFeature} from '../data/bucket/symbol_bucket';\nimport type {StyleImage} from '../style/style_image';\nimport type {StyleGlyph} from '../style/style_glyph';\nimport type {SymbolStyleLayer} from '../style/style_layer/symbol_style_layer';\nimport type {ImagePosition} from '../render/image_atlas';\nimport type {GlyphPosition} from '../render/glyph_atlas';\nimport type {PossiblyEvaluatedPropertyValue} from '../style/properties';\n\nimport type Point from '@mapbox/point-geometry';\nimport murmur3 from 'murmurhash-js';\nimport {getIconPadding, type SymbolPadding} from '../style/style_layer/symbol_style_layer';\nimport {type VariableAnchorOffsetCollection, classifyRings} from '@maplibre/maplibre-gl-style-spec';\nimport {getTextVariableAnchorOffset, evaluateVariableOffset, INVALID_TEXT_OFFSET, type TextAnchor, TextAnchorEnum} from '../style/style_layer/variable_text_anchor';\nimport {subdivideVertexLine} from '../render/subdivision';\nimport type {SubdivisionGranularitySetting} from '../render/subdivision_granularity_settings';\n\n// The symbol layout process needs `text-size` evaluated at up to five different zoom levels, and\n// `icon-size` at up to three:\n//\n// 1. `text-size` at the zoom level of the bucket. Used to calculate a per-feature size for source `text-size`\n// expressions, and to calculate the box dimensions for icon-text-fit.\n// 2. `icon-size` at the zoom level of the bucket. Used to calculate a per-feature size for source `icon-size`\n// expressions.\n// 3. `text-size` and `icon-size` at the zoom level of the bucket, plus one. Used to calculate collision boxes.\n// 4. `text-size` at zoom level 18. Used for something line-symbol-placement-related.\n// 5. For composite `*-size` expressions: two zoom levels of curve stops that \"cover\" the zoom level of the\n// bucket. These go into a vertex buffer and are used by the shader to interpolate the size at render time.\n//\n// (1) and (2) are stored in `bucket.layers[0].layout`. The remainder are below.\n//\ntype Sizes = {\n layoutTextSize: PossiblyEvaluatedPropertyValue; // (3),\n layoutIconSize: PossiblyEvaluatedPropertyValue; // (3),\n textMaxSize: PossiblyEvaluatedPropertyValue; // (4),\n compositeTextSizes: [PossiblyEvaluatedPropertyValue, PossiblyEvaluatedPropertyValue]; // (5),\n compositeIconSizes: [PossiblyEvaluatedPropertyValue, PossiblyEvaluatedPropertyValue]; // (5)\n};\n\ntype ShapedTextOrientations = {\n vertical: Shaping | false;\n horizontal: Record;\n};\n\nexport function performSymbolLayout(args: {\n bucket: SymbolBucket;\n glyphMap: {\n [_: string]: {\n [x: number]: StyleGlyph;\n };\n };\n glyphPositions: {\n [_: string]: {\n [x: number]: GlyphPosition;\n };\n };\n imageMap: {[_: string]: StyleImage};\n imagePositions: {[_: string]: ImagePosition};\n showCollisionBoxes: boolean;\n canonical: CanonicalTileID;\n subdivisionGranularity: SubdivisionGranularitySetting;\n}) {\n args.bucket.createArrays();\n\n const tileSize = 512 * args.bucket.overscaling;\n args.bucket.tilePixelRatio = EXTENT / tileSize;\n args.bucket.compareText = {};\n args.bucket.iconsNeedLinear = false;\n\n const layer = args.bucket.layers[0];\n const layout = layer.layout;\n const unevaluatedLayoutValues = layer._unevaluatedLayout._values;\n\n const sizes: Sizes = {\n // Filled in below, if *SizeData.kind is 'composite'\n // compositeIconSizes: undefined,\n // compositeTextSizes: undefined,\n layoutIconSize: unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(args.bucket.zoom + 1), args.canonical),\n layoutTextSize: unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(args.bucket.zoom + 1), args.canonical),\n textMaxSize: unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(18))\n } as Sizes;\n\n if (args.bucket.textSizeData.kind === 'composite') {\n const {minZoom, maxZoom} = args.bucket.textSizeData;\n sizes.compositeTextSizes = [\n unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(minZoom), args.canonical),\n unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(maxZoom), args.canonical)\n ];\n }\n\n if (args.bucket.iconSizeData.kind === 'composite') {\n const {minZoom, maxZoom} = args.bucket.iconSizeData;\n sizes.compositeIconSizes = [\n unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(minZoom), args.canonical),\n unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(maxZoom), args.canonical)\n ];\n }\n\n const lineHeight = layout.get('text-line-height') * ONE_EM;\n const textAlongLine = layout.get('text-rotation-alignment') !== 'viewport' && layout.get('symbol-placement') !== 'point';\n const keepUpright = layout.get('text-keep-upright');\n const textSize = layout.get('text-size');\n\n for (const feature of args.bucket.features) {\n const fontstack = layout.get('text-font').evaluate(feature, {}, args.canonical).join(',');\n const layoutTextSizeThisZoom = textSize.evaluate(feature, {}, args.canonical);\n const layoutTextSize = sizes.layoutTextSize.evaluate(feature, {}, args.canonical);\n const layoutIconSize = sizes.layoutIconSize.evaluate(feature, {}, args.canonical);\n\n const shapedTextOrientations: ShapedTextOrientations = {\n horizontal: {} as Record,\n vertical: undefined\n };\n const text = feature.text;\n let textOffset: [number, number] = [0, 0];\n if (text) {\n const unformattedText = text.toString();\n const spacing = layout.get('text-letter-spacing').evaluate(feature, {}, args.canonical) * ONE_EM;\n const spacingIfAllowed = allowsLetterSpacing(unformattedText) ? spacing : 0;\n\n const textAnchor = layout.get('text-anchor').evaluate(feature, {}, args.canonical);\n const variableAnchorOffset = getTextVariableAnchorOffset(layer, feature, args.canonical);\n\n if (!variableAnchorOffset) {\n const radialOffset = layout.get('text-radial-offset').evaluate(feature, {}, args.canonical);\n // Layers with variable anchors use the `text-radial-offset` property and the [x, y] offset vector\n // is calculated at placement time instead of layout time\n if (radialOffset) {\n // The style spec says don't use `text-offset` and `text-radial-offset` together\n // but doesn't actually specify what happens if you use both. We go with the radial offset.\n textOffset = evaluateVariableOffset(textAnchor, [radialOffset * ONE_EM, INVALID_TEXT_OFFSET]);\n } else {\n textOffset = (layout.get('text-offset').evaluate(feature, {}, args.canonical).map(t => t * ONE_EM) as [number, number]);\n }\n }\n\n let textJustify = textAlongLine ?\n 'center' :\n layout.get('text-justify').evaluate(feature, {}, args.canonical);\n\n const symbolPlacement = layout.get('symbol-placement');\n const maxWidth = symbolPlacement === 'point' ?\n layout.get('text-max-width').evaluate(feature, {}, args.canonical) * ONE_EM :\n Infinity;\n\n const addVerticalShapingForPointLabelIfNeeded = () => {\n if (args.bucket.allowVerticalPlacement && allowsVerticalWritingMode(unformattedText)) {\n // Vertical POI label placement is meant to be used for scripts that support vertical\n // writing mode, thus, default left justification is used. If Latin\n // scripts would need to be supported, this should take into account other justifications.\n shapedTextOrientations.vertical = shapeText(text, args.glyphMap, args.glyphPositions, args.imagePositions, fontstack, maxWidth, lineHeight, textAnchor,\n 'left', spacingIfAllowed, textOffset, WritingMode.vertical, true, layoutTextSize, layoutTextSizeThisZoom);\n }\n };\n\n // If this layer uses text-variable-anchor, generate shapings for all justification possibilities.\n if (!textAlongLine && variableAnchorOffset) {\n const justifications = new Set();\n\n if (textJustify === 'auto') {\n for (let i = 0; i < variableAnchorOffset.values.length; i += 2) {\n justifications.add(getAnchorJustification(variableAnchorOffset.values[i] as TextAnchor));\n }\n } else {\n justifications.add(textJustify);\n }\n\n let singleLine = false;\n for (const justification of justifications) {\n if (shapedTextOrientations.horizontal[justification]) continue;\n if (singleLine) {\n // If the shaping for the first justification was only a single line, we\n // can re-use it for the other justifications\n shapedTextOrientations.horizontal[justification] = shapedTextOrientations.horizontal[0];\n } else {\n // If using text-variable-anchor for the layer, we use a center anchor for all shapings and apply\n // the offsets for the anchor in the placement step.\n const shaping = shapeText(text, args.glyphMap, args.glyphPositions, args.imagePositions, fontstack, maxWidth, lineHeight, 'center',\n justification, spacingIfAllowed, textOffset, WritingMode.horizontal, false, layoutTextSize, layoutTextSizeThisZoom);\n if (shaping) {\n shapedTextOrientations.horizontal[justification] = shaping;\n singleLine = shaping.positionedLines.length === 1;\n }\n }\n }\n\n addVerticalShapingForPointLabelIfNeeded();\n } else {\n if (textJustify === 'auto') {\n textJustify = getAnchorJustification(textAnchor);\n }\n\n // Horizontal point or line label.\n const shaping = shapeText(text, args.glyphMap, args.glyphPositions, args.imagePositions, fontstack, maxWidth, lineHeight, textAnchor, textJustify, spacingIfAllowed,\n textOffset, WritingMode.horizontal, false, layoutTextSize, layoutTextSizeThisZoom);\n if (shaping) shapedTextOrientations.horizontal[textJustify] = shaping;\n\n // Vertical point label (if allowVerticalPlacement is enabled).\n addVerticalShapingForPointLabelIfNeeded();\n\n // Verticalized line label.\n if (allowsVerticalWritingMode(unformattedText) && textAlongLine && keepUpright) {\n shapedTextOrientations.vertical = shapeText(text, args.glyphMap, args.glyphPositions, args.imagePositions, fontstack, maxWidth, lineHeight, textAnchor, textJustify,\n spacingIfAllowed, textOffset, WritingMode.vertical, false, layoutTextSize, layoutTextSizeThisZoom);\n }\n }\n }\n\n let shapedIcon;\n let isSDFIcon = false;\n if (feature.icon && feature.icon.name) {\n const image = args.imageMap[feature.icon.name];\n if (image) {\n shapedIcon = shapeIcon(\n args.imagePositions[feature.icon.name],\n layout.get('icon-offset').evaluate(feature, {}, args.canonical),\n layout.get('icon-anchor').evaluate(feature, {}, args.canonical));\n // null/undefined SDF property treated same as default (false)\n isSDFIcon = !!image.sdf;\n if (args.bucket.sdfIcons === undefined) {\n args.bucket.sdfIcons = isSDFIcon;\n } else if (args.bucket.sdfIcons !== isSDFIcon) {\n warnOnce('Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer');\n }\n if (image.pixelRatio !== args.bucket.pixelRatio) {\n args.bucket.iconsNeedLinear = true;\n } else if (layout.get('icon-rotate').constantOr(1) !== 0) {\n args.bucket.iconsNeedLinear = true;\n }\n }\n }\n\n const shapedText = getDefaultHorizontalShaping(shapedTextOrientations.horizontal) || shapedTextOrientations.vertical;\n args.bucket.iconsInText = shapedText ? shapedText.iconsInText : false;\n if (shapedText || shapedIcon) {\n addFeature(args.bucket, feature, shapedTextOrientations, shapedIcon, args.imageMap, sizes, layoutTextSize, layoutIconSize, textOffset, isSDFIcon, args.canonical, args.subdivisionGranularity);\n }\n }\n\n if (args.showCollisionBoxes) {\n args.bucket.generateCollisionDebugBuffers();\n }\n}\n\n// Choose the justification that matches the direction of the TextAnchor\nexport function getAnchorJustification(anchor: TextAnchor): TextJustify {\n switch (anchor) {\n case 'right':\n case 'top-right':\n case 'bottom-right':\n return 'right';\n case 'left':\n case 'top-left':\n case 'bottom-left':\n return 'left';\n }\n return 'center';\n}\n\n/**\n * Given a feature and its shaped text and icon data, add a 'symbol\n * instance' for each _possible_ placement of the symbol feature.\n * (At render it selects which of these instances to\n * show or hide based on collisions with symbols in other layers.)\n */\nfunction addFeature(bucket: SymbolBucket,\n feature: SymbolFeature,\n shapedTextOrientations: ShapedTextOrientations,\n shapedIcon: PositionedIcon,\n imageMap: {[_: string]: StyleImage},\n sizes: Sizes,\n layoutTextSize: number,\n layoutIconSize: number,\n textOffset: [number, number],\n isSDFIcon: boolean,\n canonical: CanonicalTileID,\n subdivisionGranularity: SubdivisionGranularitySetting) {\n // To reduce the number of labels that jump around when zooming we need\n // to use a text-size value that is the same for all zoom levels.\n // bucket calculates text-size at a high zoom level so that all tiles can\n // use the same value when calculating anchor positions.\n let textMaxSize = sizes.textMaxSize.evaluate(feature, {});\n if (textMaxSize === undefined) {\n textMaxSize = layoutTextSize;\n }\n const layout = bucket.layers[0].layout;\n const iconOffset = layout.get('icon-offset').evaluate(feature, {}, canonical);\n const defaultHorizontalShaping = getDefaultHorizontalShaping(shapedTextOrientations.horizontal);\n const glyphSize = 24,\n fontScale = layoutTextSize / glyphSize,\n textBoxScale = bucket.tilePixelRatio * fontScale,\n textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize,\n iconBoxScale = bucket.tilePixelRatio * layoutIconSize,\n symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'),\n textPadding = layout.get('text-padding') * bucket.tilePixelRatio,\n iconPadding = getIconPadding(layout, feature, canonical, bucket.tilePixelRatio),\n textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI,\n textAlongLine = layout.get('text-rotation-alignment') !== 'viewport' && layout.get('symbol-placement') !== 'point',\n iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point',\n symbolPlacement = layout.get('symbol-placement'),\n textRepeatDistance = symbolMinDistance / 2;\n\n const iconTextFit = layout.get('icon-text-fit');\n let verticallyShapedIcon: PositionedIcon | undefined;\n // Adjust shaped icon size when icon-text-fit is used.\n if (shapedIcon && iconTextFit !== 'none') {\n if (bucket.allowVerticalPlacement && shapedTextOrientations.vertical) {\n verticallyShapedIcon = fitIconToText(shapedIcon, shapedTextOrientations.vertical, iconTextFit,\n layout.get('icon-text-fit-padding'), iconOffset, fontScale);\n }\n if (defaultHorizontalShaping) {\n shapedIcon = fitIconToText(shapedIcon, defaultHorizontalShaping, iconTextFit,\n layout.get('icon-text-fit-padding'), iconOffset, fontScale);\n }\n }\n\n const granularity = (canonical) ? subdivisionGranularity.line.getGranularityForZoomLevel(canonical.z) : 1;\n\n const addSymbolAtAnchor = (line, anchor) => {\n if (anchor.x < 0 || anchor.x >= EXTENT || anchor.y < 0 || anchor.y >= EXTENT) {\n // Symbol layers are drawn across tile boundaries, We filter out symbols\n // outside our tile boundaries (which may be included in vector tile buffers)\n // to prevent double-drawing symbols.\n return;\n }\n addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, imageMap, verticallyShapedIcon, bucket.layers[0],\n bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index,\n textBoxScale, [textPadding, textPadding, textPadding, textPadding], textAlongLine, textOffset,\n iconBoxScale, iconPadding, iconAlongLine, iconOffset,\n feature, sizes, isSDFIcon, canonical, layoutTextSize);\n };\n\n if (symbolPlacement === 'line') {\n for (const line of clipLine(feature.geometry, 0, 0, EXTENT, EXTENT)) {\n const subdividedLine = subdivideVertexLine(line, granularity);\n const anchors = getAnchors(\n subdividedLine,\n symbolMinDistance,\n textMaxAngle,\n shapedTextOrientations.vertical || defaultHorizontalShaping,\n shapedIcon,\n glyphSize,\n textMaxBoxScale,\n bucket.overscaling,\n EXTENT\n );\n for (const anchor of anchors) {\n const shapedText = defaultHorizontalShaping;\n if (!shapedText || !anchorIsTooClose(bucket, shapedText.text, textRepeatDistance, anchor)) {\n addSymbolAtAnchor(subdividedLine, anchor);\n }\n }\n }\n } else if (symbolPlacement === 'line-center') {\n // No clipping, multiple lines per feature are allowed\n // \"lines\" with only one point are ignored as in clipLines\n for (const line of feature.geometry) {\n if (line.length > 1) {\n const subdividedLine = subdivideVertexLine(line, granularity);\n const anchor = getCenterAnchor(\n subdividedLine,\n textMaxAngle,\n shapedTextOrientations.vertical || defaultHorizontalShaping,\n shapedIcon,\n glyphSize,\n textMaxBoxScale);\n if (anchor) {\n addSymbolAtAnchor(subdividedLine, anchor);\n }\n }\n }\n } else if (feature.type === 'Polygon') {\n for (const polygon of classifyRings(feature.geometry, 0)) {\n // 16 here represents 2 pixels\n const poi = findPoleOfInaccessibility(polygon, 16);\n const subdividedLine = subdivideVertexLine(polygon[0], granularity, true);\n addSymbolAtAnchor(subdividedLine, new Anchor(poi.x, poi.y, 0));\n }\n } else if (feature.type === 'LineString') {\n // https://github.com/mapbox/mapbox-gl-js/issues/3808\n for (const line of feature.geometry) {\n const subdividedLine = subdivideVertexLine(line, granularity);\n addSymbolAtAnchor(subdividedLine, new Anchor(subdividedLine[0].x, subdividedLine[0].y, 0));\n }\n } else if (feature.type === 'Point') {\n for (const points of feature.geometry) {\n for (const point of points) {\n addSymbolAtAnchor([point], new Anchor(point.x, point.y, 0));\n }\n }\n }\n}\n\nfunction addTextVariableAnchorOffsets(textAnchorOffsets: TextAnchorOffsetArray, variableAnchorOffset: VariableAnchorOffsetCollection): [number, number] {\n const startIndex = textAnchorOffsets.length;\n const values = variableAnchorOffset?.values;\n\n if (values?.length > 0) {\n for (let i = 0; i < values.length; i += 2) {\n const anchor = TextAnchorEnum[values[i] as TextAnchor];\n const offset = values[i + 1] as [number, number];\n\n textAnchorOffsets.emplaceBack(anchor, offset[0], offset[1]);\n }\n }\n\n return [startIndex, textAnchorOffsets.length];\n}\n\nfunction addTextVertices(bucket: SymbolBucket,\n anchor: Point,\n shapedText: Shaping,\n imageMap: {[_: string]: StyleImage},\n layer: SymbolStyleLayer,\n textAlongLine: boolean,\n feature: SymbolFeature,\n textOffset: [number, number],\n lineArray: {\n lineStartIndex: number;\n lineLength: number;\n },\n writingMode: WritingMode,\n placementTypes: Array<'vertical' | 'center' | 'left' | 'right'>,\n placedTextSymbolIndices: {[_: string]: number},\n placedIconIndex: number,\n sizes: Sizes,\n canonical: CanonicalTileID) {\n const glyphQuads = getGlyphQuads(anchor, shapedText, textOffset,\n layer, textAlongLine, feature, imageMap, bucket.allowVerticalPlacement);\n\n const sizeData = bucket.textSizeData;\n let textSizeData = null;\n\n if (sizeData.kind === 'source') {\n textSizeData = [\n SIZE_PACK_FACTOR * layer.layout.get('text-size').evaluate(feature, {})\n ];\n if (textSizeData[0] > MAX_PACKED_SIZE) {\n warnOnce(`${bucket.layerIds[0]}: Value for \"text-size\" is >= ${MAX_GLYPH_ICON_SIZE}. Reduce your \"text-size\".`);\n }\n } else if (sizeData.kind === 'composite') {\n textSizeData = [\n SIZE_PACK_FACTOR * sizes.compositeTextSizes[0].evaluate(feature, {}, canonical),\n SIZE_PACK_FACTOR * sizes.compositeTextSizes[1].evaluate(feature, {}, canonical)\n ];\n if (textSizeData[0] > MAX_PACKED_SIZE || textSizeData[1] > MAX_PACKED_SIZE) {\n warnOnce(`${bucket.layerIds[0]}: Value for \"text-size\" is >= ${MAX_GLYPH_ICON_SIZE}. Reduce your \"text-size\".`);\n }\n }\n\n bucket.addSymbols(\n bucket.text,\n glyphQuads,\n textSizeData,\n textOffset,\n textAlongLine,\n feature,\n writingMode,\n anchor,\n lineArray.lineStartIndex,\n lineArray.lineLength,\n placedIconIndex,\n canonical);\n\n // The placedSymbolArray is used at render time in drawTileSymbols\n // These indices allow access to the array at collision detection time\n for (const placementType of placementTypes) {\n placedTextSymbolIndices[placementType] = bucket.text.placedSymbolArray.length - 1;\n }\n\n return glyphQuads.length * 4;\n}\n\nfunction getDefaultHorizontalShaping(\n horizontalShaping: Record\n): Shaping | null {\n // We don't care which shaping we get because this is used for collision purposes\n // and all the justifications have the same collision box\n for (const justification in horizontalShaping) {\n return horizontalShaping[justification];\n }\n return null;\n}\n\n/**\n * Add a single label & icon placement.\n */\nfunction addSymbol(bucket: SymbolBucket,\n anchor: Anchor,\n line: Array,\n shapedTextOrientations: ShapedTextOrientations,\n shapedIcon: PositionedIcon | undefined,\n imageMap: {[_: string]: StyleImage},\n verticallyShapedIcon: PositionedIcon | undefined,\n layer: SymbolStyleLayer,\n collisionBoxArray: CollisionBoxArray,\n featureIndex: number,\n sourceLayerIndex: number,\n bucketIndex: number,\n textBoxScale: number,\n textPadding: SymbolPadding,\n textAlongLine: boolean,\n textOffset: [number, number],\n iconBoxScale: number,\n iconPadding: SymbolPadding,\n iconAlongLine: boolean,\n iconOffset: [number, number],\n feature: SymbolFeature,\n sizes: Sizes,\n isSDFIcon: boolean,\n canonical: CanonicalTileID,\n layoutTextSize: number) {\n\n const lineArray = bucket.addToLineVertexArray(anchor, line);\n\n let textCollisionFeature, iconCollisionFeature, verticalTextCollisionFeature, verticalIconCollisionFeature;\n\n let numIconVertices = 0;\n let numVerticalIconVertices = 0;\n let numHorizontalGlyphVertices = 0;\n let numVerticalGlyphVertices = 0;\n let placedIconSymbolIndex = -1;\n let verticalPlacedIconSymbolIndex = -1;\n const placedTextSymbolIndices: {[k: string]: number} = {};\n let key = murmur3('');\n\n if (bucket.allowVerticalPlacement && shapedTextOrientations.vertical) {\n const textRotation = layer.layout.get('text-rotate').evaluate(feature, {}, canonical);\n const verticalTextRotation = textRotation + 90.0;\n const verticalShaping = shapedTextOrientations.vertical;\n verticalTextCollisionFeature = new CollisionFeature(collisionBoxArray, anchor, featureIndex, sourceLayerIndex, bucketIndex, verticalShaping, textBoxScale, textPadding, textAlongLine, verticalTextRotation);\n\n if (verticallyShapedIcon) {\n verticalIconCollisionFeature = new CollisionFeature(collisionBoxArray, anchor, featureIndex, sourceLayerIndex, bucketIndex, verticallyShapedIcon, iconBoxScale, iconPadding, textAlongLine, verticalTextRotation);\n }\n }\n\n //Place icon first, so text can have a reference to its index in the placed symbol array.\n //Text symbols can lazily shift at render-time because of variable anchor placement.\n //If the style specifies an `icon-text-fit` then the icon would have to shift along with it.\n // For more info check `updateVariableAnchors` in `draw_symbol.js` .\n if (shapedIcon) {\n const iconRotate = layer.layout.get('icon-rotate').evaluate(feature, {});\n const hasIconTextFit = layer.layout.get('icon-text-fit') !== 'none';\n const iconQuads = getIconQuads(shapedIcon, iconRotate, isSDFIcon, hasIconTextFit);\n const verticalIconQuads = verticallyShapedIcon ? getIconQuads(verticallyShapedIcon, iconRotate, isSDFIcon, hasIconTextFit) : undefined;\n iconCollisionFeature = new CollisionFeature(collisionBoxArray, anchor, featureIndex, sourceLayerIndex, bucketIndex, shapedIcon, iconBoxScale, iconPadding, /*align boxes to line*/false, iconRotate);\n\n numIconVertices = iconQuads.length * 4;\n\n const sizeData = bucket.iconSizeData;\n let iconSizeData = null;\n\n if (sizeData.kind === 'source') {\n iconSizeData = [\n SIZE_PACK_FACTOR * layer.layout.get('icon-size').evaluate(feature, {})\n ];\n if (iconSizeData[0] > MAX_PACKED_SIZE) {\n warnOnce(`${bucket.layerIds[0]}: Value for \"icon-size\" is >= ${MAX_GLYPH_ICON_SIZE}. Reduce your \"icon-size\".`);\n }\n } else if (sizeData.kind === 'composite') {\n iconSizeData = [\n SIZE_PACK_FACTOR * sizes.compositeIconSizes[0].evaluate(feature, {}, canonical),\n SIZE_PACK_FACTOR * sizes.compositeIconSizes[1].evaluate(feature, {}, canonical)\n ];\n if (iconSizeData[0] > MAX_PACKED_SIZE || iconSizeData[1] > MAX_PACKED_SIZE) {\n warnOnce(`${bucket.layerIds[0]}: Value for \"icon-size\" is >= ${MAX_GLYPH_ICON_SIZE}. Reduce your \"icon-size\".`);\n }\n }\n\n bucket.addSymbols(\n bucket.icon,\n iconQuads,\n iconSizeData,\n iconOffset,\n iconAlongLine,\n feature,\n WritingMode.none,\n anchor,\n lineArray.lineStartIndex,\n lineArray.lineLength,\n // The icon itself does not have an associated symbol since the text isn't placed yet\n -1, canonical);\n\n placedIconSymbolIndex = bucket.icon.placedSymbolArray.length - 1;\n\n if (verticalIconQuads) {\n numVerticalIconVertices = verticalIconQuads.length * 4;\n\n bucket.addSymbols(\n bucket.icon,\n verticalIconQuads,\n iconSizeData,\n iconOffset,\n iconAlongLine,\n feature,\n WritingMode.vertical,\n anchor,\n lineArray.lineStartIndex,\n lineArray.lineLength,\n // The icon itself does not have an associated symbol since the text isn't placed yet\n -1, canonical);\n\n verticalPlacedIconSymbolIndex = bucket.icon.placedSymbolArray.length - 1;\n }\n }\n\n const justifications = Object.keys(shapedTextOrientations.horizontal) as TextJustify[];\n for (const justification of justifications) {\n const shaping = shapedTextOrientations.horizontal[justification];\n\n if (!textCollisionFeature) {\n key = murmur3(shaping.text);\n const textRotate = layer.layout.get('text-rotate').evaluate(feature, {}, canonical);\n // As a collision approximation, we can use either the vertical or any of the horizontal versions of the feature\n // We're counting on all versions having similar dimensions\n textCollisionFeature = new CollisionFeature(collisionBoxArray, anchor, featureIndex, sourceLayerIndex, bucketIndex, shaping, textBoxScale, textPadding, textAlongLine, textRotate);\n }\n\n const singleLine = shaping.positionedLines.length === 1;\n numHorizontalGlyphVertices += addTextVertices(\n bucket, anchor, shaping, imageMap, layer, textAlongLine, feature, textOffset, lineArray,\n shapedTextOrientations.vertical ? WritingMode.horizontal : WritingMode.horizontalOnly,\n singleLine ? justifications : [justification],\n placedTextSymbolIndices, placedIconSymbolIndex, sizes, canonical);\n\n if (singleLine) {\n break;\n }\n }\n\n if (shapedTextOrientations.vertical) {\n numVerticalGlyphVertices += addTextVertices(\n bucket, anchor, shapedTextOrientations.vertical, imageMap, layer, textAlongLine, feature,\n textOffset, lineArray, WritingMode.vertical, ['vertical'], placedTextSymbolIndices, verticalPlacedIconSymbolIndex, sizes, canonical);\n }\n\n const textBoxStartIndex = textCollisionFeature ? textCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const textBoxEndIndex = textCollisionFeature ? textCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n const verticalTextBoxStartIndex = verticalTextCollisionFeature ? verticalTextCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const verticalTextBoxEndIndex = verticalTextCollisionFeature ? verticalTextCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n const iconBoxStartIndex = iconCollisionFeature ? iconCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const iconBoxEndIndex = iconCollisionFeature ? iconCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n const verticalIconBoxStartIndex = verticalIconCollisionFeature ? verticalIconCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const verticalIconBoxEndIndex = verticalIconCollisionFeature ? verticalIconCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n // Check if runtime collision circles should be used for any of the collision features.\n // It is enough to choose the tallest feature shape as circles are always placed on a line.\n // All measurements are in glyph metrics and later converted into pixels using proper font size \"layoutTextSize\"\n let collisionCircleDiameter = -1;\n\n const getCollisionCircleHeight = (feature: CollisionFeature, prevHeight: number): number => {\n if (feature && feature.circleDiameter)\n return Math.max(feature.circleDiameter, prevHeight);\n return prevHeight;\n };\n\n collisionCircleDiameter = getCollisionCircleHeight(textCollisionFeature, collisionCircleDiameter);\n collisionCircleDiameter = getCollisionCircleHeight(verticalTextCollisionFeature, collisionCircleDiameter);\n collisionCircleDiameter = getCollisionCircleHeight(iconCollisionFeature, collisionCircleDiameter);\n collisionCircleDiameter = getCollisionCircleHeight(verticalIconCollisionFeature, collisionCircleDiameter);\n const useRuntimeCollisionCircles = (collisionCircleDiameter > -1) ? 1 : 0;\n\n // Convert circle collision height into pixels\n if (useRuntimeCollisionCircles)\n collisionCircleDiameter *= layoutTextSize / ONE_EM;\n\n if (bucket.glyphOffsetArray.length >= SymbolBucket.MAX_GLYPHS) warnOnce(\n 'Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907'\n );\n\n if (feature.sortKey !== undefined) {\n bucket.addToSortKeyRanges(bucket.symbolInstances.length, feature.sortKey as number);\n }\n\n const variableAnchorOffset = getTextVariableAnchorOffset(layer, feature, canonical);\n const [textAnchorOffsetStartIndex, textAnchorOffsetEndIndex] = addTextVariableAnchorOffsets(bucket.textAnchorOffsets, variableAnchorOffset);\n\n bucket.symbolInstances.emplaceBack(\n anchor.x,\n anchor.y,\n placedTextSymbolIndices.right >= 0 ? placedTextSymbolIndices.right : -1,\n placedTextSymbolIndices.center >= 0 ? placedTextSymbolIndices.center : -1,\n placedTextSymbolIndices.left >= 0 ? placedTextSymbolIndices.left : -1,\n placedTextSymbolIndices.vertical || -1,\n placedIconSymbolIndex,\n verticalPlacedIconSymbolIndex,\n key,\n textBoxStartIndex,\n textBoxEndIndex,\n verticalTextBoxStartIndex,\n verticalTextBoxEndIndex,\n iconBoxStartIndex,\n iconBoxEndIndex,\n verticalIconBoxStartIndex,\n verticalIconBoxEndIndex,\n featureIndex,\n numHorizontalGlyphVertices,\n numVerticalGlyphVertices,\n numIconVertices,\n numVerticalIconVertices,\n useRuntimeCollisionCircles,\n 0,\n textBoxScale,\n collisionCircleDiameter,\n textAnchorOffsetStartIndex,\n textAnchorOffsetEndIndex);\n}\n\nfunction anchorIsTooClose(bucket: SymbolBucket, text: string, repeatDistance: number, anchor: Point) {\n const compareText = bucket.compareText;\n if (!(text in compareText)) {\n compareText[text] = [];\n } else {\n const otherAnchors = compareText[text];\n for (let k = otherAnchors.length - 1; k >= 0; k--) {\n if (anchor.dist(otherAnchors[k]) < repeatDistance) {\n // If it's within repeatDistance of one anchor, stop looking\n return true;\n }\n }\n }\n // If anchor is not within repeatDistance of any other anchor, add to array\n compareText[text].push(anchor);\n return false;\n}\n","\nconst ARRAY_TYPES = [\n Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nexport default class KDBush {\n\n /**\n * Creates an index from raw `ArrayBuffer` data.\n * @param {ArrayBuffer} data\n */\n static from(data) {\n if (!(data instanceof ArrayBuffer)) {\n throw new Error('Data must be an instance of ArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n if (magic !== 0xdb) {\n throw new Error('Data does not appear to be in a KDBush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, 2, 1);\n const [numItems] = new Uint32Array(data, 4, 1);\n\n return new KDBush(numItems, nodeSize, ArrayType, data);\n }\n\n /**\n * Creates an index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBuffer} [data] (For internal use only)\n */\n constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n const padCoords = (8 - idsByteSize % 8) % 8;\n\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n\n if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n this.data = data;\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = numItems * 2;\n this._finished = true;\n } else { // initialize a new index\n this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = 0;\n this._finished = false;\n\n // set header\n new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n new Uint32Array(this.data, 4, 1)[0] = numItems;\n }\n }\n\n /**\n * Add a point to the index.\n * @param {number} x\n * @param {number} y\n * @returns {number} An incremental index associated with the added item (starting from `0`).\n */\n add(x, y) {\n const index = this._pos >> 1;\n this.ids[index] = index;\n this.coords[this._pos++] = x;\n this.coords[this._pos++] = y;\n return index;\n }\n\n /**\n * Perform indexing of the added points.\n */\n finish() {\n const numAdded = this._pos >> 1;\n if (numAdded !== this.numItems) {\n throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n }\n // kd-sort both arrays for efficient search\n sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n this._finished = true;\n return this;\n }\n\n /**\n * Search the index for items within a given bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number[]} An array of indices correponding to the found items.\n */\n range(minX, minY, maxX, maxY) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n\n // recursively search for items in range in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n\n /**\n * Search the index for items within a given radius.\n * @param {number} qx\n * @param {number} qy\n * @param {number} r Query radius.\n * @returns {number[]} An array of indices correponding to the found items.\n */\n within(qx, qy, r) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n const r2 = r * r;\n\n // recursively search for items within radius in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1; // middle index\n\n // sort ids and coords around the middle index so that the halves lie\n // either left/right or top/bottom correspondingly (taking turns)\n select(ids, coords, m, left, right, axis);\n\n // recursively kd-sort first half and second half on the opposite axis\n sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, axis);\n }\n\n const t = coords[2 * k + axis];\n let i = left;\n let j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + axis] < t) i++;\n while (coords[2 * j + axis] > t) j--;\n }\n\n if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n","import type {RequestParameters} from '../util/ajax';\n\nexport type PerformanceMetrics = {\n loadTime: number;\n fullLoadTime: number;\n fps: number;\n percentDroppedFrames: number;\n totalFrames: number;\n};\n\nexport enum PerformanceMarkers {\n create = 'create',\n load = 'load',\n fullLoad = 'fullLoad'\n}\n\nlet lastFrameTime = null;\nlet frameTimes = [];\n\nconst minFramerateTarget = 60;\nconst frameTimeTarget = 1000 / minFramerateTarget;\n\nconst loadTimeKey = 'loadTime';\nconst fullLoadTimeKey = 'fullLoadTime';\n\nexport const PerformanceUtils = {\n mark(marker: PerformanceMarkers) {\n performance.mark(marker);\n },\n frame(timestamp: number) {\n const currTimestamp = timestamp;\n if (lastFrameTime != null) {\n const frameTime = currTimestamp - lastFrameTime;\n frameTimes.push(frameTime);\n }\n lastFrameTime = currTimestamp;\n },\n clearMetrics() {\n lastFrameTime = null;\n frameTimes = [];\n performance.clearMeasures(loadTimeKey);\n performance.clearMeasures(fullLoadTimeKey);\n\n for (const marker in PerformanceMarkers) {\n performance.clearMarks(PerformanceMarkers[marker]);\n }\n },\n\n getPerformanceMetrics(): PerformanceMetrics {\n performance.measure(loadTimeKey, PerformanceMarkers.create, PerformanceMarkers.load);\n performance.measure(fullLoadTimeKey, PerformanceMarkers.create, PerformanceMarkers.fullLoad);\n const loadTime = performance.getEntriesByName(loadTimeKey)[0].duration;\n const fullLoadTime = performance.getEntriesByName(fullLoadTimeKey)[0].duration;\n const totalFrames = frameTimes.length;\n\n const avgFrameTime = frameTimes.reduce((prev, curr) => prev + curr, 0) / totalFrames / 1000;\n const fps = 1 / avgFrameTime;\n\n // count frames that missed our framerate target\n const droppedFrames = frameTimes\n .filter((frameTime) => frameTime > frameTimeTarget)\n .reduce((acc, curr) => {\n return acc + (curr - frameTimeTarget) / frameTimeTarget;\n }, 0);\n const percentDroppedFrames = (droppedFrames / (totalFrames + droppedFrames)) * 100;\n\n return {\n loadTime,\n fullLoadTime,\n fps,\n percentDroppedFrames,\n totalFrames\n };\n }\n};\n\n/**\n * @internal\n * Safe wrapper for the performance resource timing API in web workers with graceful degradation\n */\nexport class RequestPerformance {\n _marks: {\n start: string;\n end: string;\n measure: string;\n };\n\n constructor (request: RequestParameters) {\n this._marks = {\n start: [request.url, 'start'].join('#'),\n end: [request.url, 'end'].join('#'),\n measure: request.url.toString()\n };\n\n performance.mark(this._marks.start);\n }\n\n finish() {\n performance.mark(this._marks.end);\n let resourceTimingData = performance.getEntriesByName(this._marks.measure);\n\n // fallback if web worker implementation of perf.getEntriesByName returns empty\n if (resourceTimingData.length === 0) {\n performance.measure(this._marks.measure, this._marks.start, this._marks.end);\n resourceTimingData = performance.getEntriesByName(this._marks.measure);\n\n // cleanup\n performance.clearMarks(this._marks.start);\n performance.clearMarks(this._marks.end);\n performance.clearMeasures(this._marks.measure);\n }\n\n return resourceTimingData;\n }\n}\n\nexport default performance;\n","import {type OverscaledTileID} from './tile_id';\nimport type {Tile} from './tile';\n\n/**\n * @internal\n * A [least-recently-used cache](https://en.wikipedia.org/wiki/Cache_algorithms)\n * with hash lookup made possible by keeping a list of keys in parallel to\n * an array of dictionary of values\n *\n * TileManager offloads currently unused tiles to this cache, and when a tile gets used again,\n * it is also removed from this cache. Thus addition is the only operation that counts as \"usage\"\n * for the purposes of LRU behaviour.\n */\nexport class TileCache {\n max: number;\n data: {\n [key: string]: Array<{\n value: Tile;\n timeout: ReturnType;\n }>;\n };\n order: Array;\n onRemove: (element: Tile) => void;\n /**\n * @param max - number of permitted values\n * @param onRemove - callback called with items when they expire\n */\n constructor(max: number, onRemove: (element: Tile) => void) {\n this.max = max;\n this.onRemove = onRemove;\n this.reset();\n }\n\n /**\n * Clear the cache\n *\n * @returns this cache\n */\n reset() {\n for (const key in this.data) {\n for (const removedData of this.data[key]) {\n if (removedData.timeout) clearTimeout(removedData.timeout);\n this.onRemove(removedData.value);\n }\n }\n\n this.data = {};\n this.order = [];\n\n return this;\n }\n\n /**\n * Add a key, value combination to the cache, trimming its size if this pushes\n * it over max length.\n *\n * @param tileID - lookup key for the item\n * @param data - tile data\n *\n * @returns this cache\n */\n add(tileID: OverscaledTileID, data: Tile, expiryTimeout: number | void) {\n const key = tileID.wrapped().key;\n if (this.data[key] === undefined) {\n this.data[key] = [];\n }\n\n const dataWrapper = {\n value: data,\n timeout: undefined\n };\n\n if (expiryTimeout !== undefined) {\n dataWrapper.timeout = setTimeout(() => {\n this.remove(tileID, dataWrapper);\n }, expiryTimeout as number);\n }\n\n this.data[key].push(dataWrapper);\n this.order.push(key);\n\n if (this.order.length > this.max) {\n const removedData = this._getAndRemoveByKey(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n\n return this;\n }\n\n /**\n * Determine whether the value attached to `key` is present\n *\n * @param tileID - the key to be looked-up\n * @returns whether the cache has this value\n */\n has(tileID: OverscaledTileID): boolean {\n return tileID.wrapped().key in this.data;\n }\n\n /**\n * Get the value attached to a specific key and remove data from cache.\n * If the key is not found, returns `null`\n *\n * @param tileID - the key to look up\n * @returns the tile data, or null if it isn't found\n */\n getAndRemove(tileID: OverscaledTileID): Tile {\n if (!this.has(tileID)) { return null; }\n return this._getAndRemoveByKey(tileID.wrapped().key);\n }\n\n /*\n * Get and remove the value with the specified key.\n */\n _getAndRemoveByKey(key: string): Tile {\n const data = this.data[key].shift();\n if (data.timeout) clearTimeout(data.timeout);\n\n if (this.data[key].length === 0) {\n delete this.data[key];\n }\n this.order.splice(this.order.indexOf(key), 1);\n\n return data.value;\n }\n\n /*\n * Get the value with the specified (wrapped tile) key.\n */\n getByKey(key: string): Tile {\n const data = this.data[key];\n return data ? data[0].value : null;\n }\n\n /**\n * Get the value attached to a specific key without removing data\n * from the cache. If the key is not found, returns `null`\n *\n * @param tileID - the key to look up\n * @returns the tile data, or null if it isn't found\n */\n get(tileID: OverscaledTileID): Tile {\n if (!this.has(tileID)) { return null; }\n\n const data = this.data[tileID.wrapped().key][0];\n return data.value;\n }\n\n /**\n * Remove a key/value combination from the cache.\n *\n * @param tileID - the key for the pair to delete\n * @param value - If a value is provided, remove that exact version of the value.\n * @returns this cache\n */\n remove(tileID: OverscaledTileID, value?: {\n value: Tile;\n timeout: ReturnType;\n }) {\n if (!this.has(tileID)) { return this; }\n const key = tileID.wrapped().key;\n\n const dataIndex = value === undefined ? 0 : this.data[key].indexOf(value);\n const data = this.data[key][dataIndex];\n this.data[key].splice(dataIndex, 1);\n if (data.timeout) clearTimeout(data.timeout);\n if (this.data[key].length === 0) {\n delete this.data[key];\n }\n this.onRemove(data.value);\n this.order.splice(this.order.indexOf(key), 1);\n\n return this;\n }\n\n /**\n * Change the max size of the cache.\n *\n * @param max - the max size of the cache\n * @returns this cache\n */\n setMaxSize(max: number): TileCache {\n this.max = max;\n\n while (this.order.length > this.max) {\n const removedData = this._getAndRemoveByKey(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n\n return this;\n }\n\n /**\n * Remove entries that do not pass a filter function. Used for removing\n * stale tiles from the cache.\n *\n * @param filterFn - Determines whether the tile is filtered. If the supplied function returns false, the tile will be filtered out.\n */\n filter(filterFn: (tile: Tile) => boolean) {\n const removed = [];\n for (const key in this.data) {\n for (const entry of this.data[key]) {\n if (!filterFn(entry.value)) {\n removed.push(entry);\n }\n }\n }\n for (const r of removed) {\n this.remove(r.value.tileID, r);\n }\n }\n}\n\nexport class BoundedLRUCache {\n private maxEntries: number;\n private map: Map;\n\n constructor(maxEntries: number) {\n this.maxEntries = maxEntries;\n this.map = new Map();\n }\n\n get(key: K): V | undefined {\n const value = this.map.get(key);\n if (value !== undefined) {\n // Move key to end (most recently used)\n this.map.delete(key);\n this.map.set(key, value);\n }\n return value;\n }\n\n set(key: K, value: V): void {\n if (this.map.has(key)) {\n this.map.delete(key);\n } else if (this.map.size >= this.maxEntries) {\n // Delete oldest\n const oldestKey = this.map.keys().next().value;\n this.map.delete(oldestKey);\n }\n this.map.set(key, value);\n }\n\n clear(): void {\n this.map.clear();\n }\n}\n","import {CircleStyleLayer} from './style_layer/circle_style_layer';\nimport {HeatmapStyleLayer} from './style_layer/heatmap_style_layer';\nimport {HillshadeStyleLayer} from './style_layer/hillshade_style_layer';\nimport {ColorReliefStyleLayer} from './style_layer/color_relief_style_layer';\nimport {FillStyleLayer} from './style_layer/fill_style_layer';\nimport {FillExtrusionStyleLayer} from './style_layer/fill_extrusion_style_layer';\nimport {LineStyleLayer} from './style_layer/line_style_layer';\nimport {SymbolStyleLayer} from './style_layer/symbol_style_layer';\nimport {BackgroundStyleLayer} from './style_layer/background_style_layer';\nimport {RasterStyleLayer} from './style_layer/raster_style_layer';\nimport {CustomStyleLayer, type CustomLayerInterface} from './style_layer/custom_style_layer';\n\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport function createStyleLayer(layer: LayerSpecification | CustomLayerInterface, globalState: Record) {\n if (layer.type === 'custom') {\n return new CustomStyleLayer(layer, globalState);\n }\n switch (layer.type) {\n case 'background':\n return new BackgroundStyleLayer(layer, globalState);\n case 'circle':\n return new CircleStyleLayer(layer, globalState);\n case 'color-relief':\n return new ColorReliefStyleLayer(layer, globalState);\n case 'fill':\n return new FillStyleLayer(layer, globalState);\n case 'fill-extrusion':\n return new FillExtrusionStyleLayer(layer, globalState);\n case 'heatmap':\n return new HeatmapStyleLayer(layer, globalState);\n case 'hillshade':\n return new HillshadeStyleLayer(layer, globalState);\n case 'line':\n return new LineStyleLayer(layer, globalState);\n case 'raster':\n return new RasterStyleLayer(layer, globalState);\n case 'symbol':\n return new SymbolStyleLayer(layer, globalState);\n }\n}\n\n","import {createStyleLayer} from './create_style_layer';\nimport {featureFilter, groupByLayout} from '@maplibre/maplibre-gl-style-spec';\nimport {GEOJSON_TILE_LAYER_NAME} from '../data/feature_index';\nimport type {StyleLayer} from './style_layer';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type LayerConfigs = {[_: string]: LayerSpecification};\n\nexport class StyleLayerIndex {\n familiesBySource: {\n [source: string]: {\n [sourceLayer: string]: Array>;\n };\n };\n keyCache: {[source: string]: string};\n\n _layerConfigs: LayerConfigs;\n _layers: {[_: string]: StyleLayer};\n\n constructor(layerConfigs?: Array | null, globalState?: Record) {\n this.keyCache = {};\n if (layerConfigs) {\n this.replace(layerConfigs, globalState);\n }\n }\n\n replace(layerConfigs: Array, globalState?: Record) {\n this._layerConfigs = {};\n this._layers = {};\n this.update(layerConfigs, [], globalState);\n }\n\n update(layerConfigs: Array, removedIds: Array, globalState?: Record) {\n for (const layerConfig of layerConfigs) {\n this._layerConfigs[layerConfig.id] = layerConfig;\n\n const layer = this._layers[layerConfig.id] = createStyleLayer(layerConfig, globalState);\n layer._featureFilter = featureFilter(layer.filter, globalState);\n if (this.keyCache[layerConfig.id])\n delete this.keyCache[layerConfig.id];\n }\n for (const id of removedIds) {\n delete this.keyCache[id];\n delete this._layerConfigs[id];\n delete this._layers[id];\n }\n\n this.familiesBySource = {};\n\n const groups = groupByLayout(Object.values(this._layerConfigs), this.keyCache);\n\n for (const layerConfigs of groups) {\n const layers = layerConfigs.map((layerConfig) => this._layers[layerConfig.id]);\n\n const layer = layers[0];\n if (layer.isHidden()) {\n continue;\n }\n\n const sourceId = layer.source || '';\n let sourceGroup = this.familiesBySource[sourceId];\n if (!sourceGroup) {\n sourceGroup = this.familiesBySource[sourceId] = {};\n }\n\n const sourceLayerId = layer.sourceLayer || GEOJSON_TILE_LAYER_NAME;\n let sourceLayerFamilies = sourceGroup[sourceLayerId];\n if (!sourceLayerFamilies) {\n sourceLayerFamilies = sourceGroup[sourceLayerId] = [];\n }\n\n sourceLayerFamilies.push(layers);\n }\n }\n}\n","import {AlphaImage} from '../util/image';\nimport {register} from '../util/web_worker_transfer';\nimport potpack from 'potpack';\n\nimport type {GlyphMetrics} from '../style/style_glyph';\nimport type {GetGlyphsResponse} from '../util/actor_messages';\n\nconst padding = 1;\n\n/**\n * A rectangle type with postion, width and height.\n */\nexport type Rect = {\n x: number;\n y: number;\n w: number;\n h: number;\n};\n\n/**\n * The glyph's position\n */\nexport type GlyphPosition = {\n rect: Rect;\n metrics: GlyphMetrics;\n};\n\n/**\n * The glyphs' positions\n */\nexport type GlyphPositions = {\n [_: string]: {\n [_: number]: GlyphPosition;\n };\n};\n\nexport class GlyphAtlas {\n image: AlphaImage;\n positions: GlyphPositions;\n\n constructor(stacks: GetGlyphsResponse) {\n const positions = {};\n const bins = [];\n\n for (const stack in stacks) {\n const glyphs = stacks[stack];\n const stackPositions = positions[stack] = {};\n\n for (const id in glyphs) {\n const src = glyphs[+id];\n if (!src || src.bitmap.width === 0 || src.bitmap.height === 0) continue;\n\n const bin = {\n x: 0,\n y: 0,\n w: src.bitmap.width + 2 * padding,\n h: src.bitmap.height + 2 * padding\n };\n bins.push(bin);\n stackPositions[id] = {rect: bin, metrics: src.metrics};\n }\n }\n\n const {w, h} = potpack(bins);\n const image = new AlphaImage({width: w || 1, height: h || 1});\n\n for (const stack in stacks) {\n const glyphs = stacks[stack];\n\n for (const id in glyphs) {\n const src = glyphs[+id];\n if (!src || src.bitmap.width === 0 || src.bitmap.height === 0) continue;\n const bin = positions[stack][id].rect;\n AlphaImage.copy(src.bitmap, image, {x: 0, y: 0}, {x: bin.x + padding, y: bin.y + padding}, src.bitmap);\n }\n }\n\n this.image = image;\n this.positions = positions;\n }\n}\n\nregister('GlyphAtlas', GlyphAtlas);\n","import {FeatureIndex} from '../data/feature_index';\nimport {performSymbolLayout} from '../symbol/symbol_layout';\nimport {CollisionBoxArray} from '../data/array_types.g';\nimport {DictionaryCoder} from '../util/dictionary_coder';\nimport {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport {LineBucket} from '../data/bucket/line_bucket';\nimport {FillBucket} from '../data/bucket/fill_bucket';\nimport {FillExtrusionBucket} from '../data/bucket/fill_extrusion_bucket';\nimport {warnOnce, mapObject} from '../util/util';\nimport {ImageAtlas} from '../render/image_atlas';\nimport {GlyphAtlas} from '../render/glyph_atlas';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\nimport {OverscaledTileID} from '../tile/tile_id';\n\nimport type {Bucket} from '../data/bucket';\nimport type {IActor} from '../util/actor';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {StyleLayerIndex} from '../style/style_layer_index';\nimport type {\n WorkerTileParameters,\n WorkerTileResult,\n} from '../source/worker_source';\nimport type {PromoteIdSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {VectorTileLike} from '@maplibre/vt-pbf';\nimport {type GetDashesResponse, MessageType, type GetGlyphsResponse, type GetImagesResponse} from '../util/actor_messages';\nimport type {SubdivisionGranularitySetting} from '../render/subdivision_granularity_settings';\nexport class WorkerTile {\n tileID: OverscaledTileID;\n uid: string | number;\n zoom: number;\n pixelRatio: number;\n tileSize: number;\n source: string;\n promoteId: PromoteIdSpecification;\n overscaling: number;\n showCollisionBoxes: boolean;\n collectResourceTiming: boolean;\n returnDependencies: boolean;\n\n status: 'parsing' | 'done';\n data: VectorTileLike;\n collisionBoxArray: CollisionBoxArray;\n\n abort: AbortController;\n vectorTile: VectorTileLike;\n inFlightDependencies: AbortController[];\n\n constructor(params: WorkerTileParameters) {\n this.tileID = new OverscaledTileID(params.tileID.overscaledZ, params.tileID.wrap, params.tileID.canonical.z, params.tileID.canonical.x, params.tileID.canonical.y);\n this.uid = params.uid;\n this.zoom = params.zoom;\n this.pixelRatio = params.pixelRatio;\n this.tileSize = params.tileSize;\n this.source = params.source;\n this.overscaling = this.tileID.overscaleFactor();\n this.showCollisionBoxes = params.showCollisionBoxes;\n this.collectResourceTiming = !!params.collectResourceTiming;\n this.returnDependencies = !!params.returnDependencies;\n this.promoteId = params.promoteId;\n this.inFlightDependencies = [];\n }\n\n async parse(data: VectorTileLike, layerIndex: StyleLayerIndex, availableImages: Array, actor: IActor, subdivisionGranularity: SubdivisionGranularitySetting): Promise {\n this.status = 'parsing';\n this.data = data;\n\n this.collisionBoxArray = new CollisionBoxArray();\n const sourceLayerCoder = new DictionaryCoder(Object.keys(data.layers).sort());\n\n const featureIndex = new FeatureIndex(this.tileID, this.promoteId);\n featureIndex.bucketLayerIDs = [];\n\n const buckets: {[_: string]: Bucket} = {};\n\n const options = {\n featureIndex,\n iconDependencies: {},\n patternDependencies: {},\n glyphDependencies: {},\n dashDependencies: {},\n availableImages,\n subdivisionGranularity\n };\n\n const layerFamilies = layerIndex.familiesBySource[this.source];\n for (const sourceLayerId in layerFamilies) {\n const sourceLayer = data.layers[sourceLayerId];\n if (!sourceLayer) {\n continue;\n }\n\n if (sourceLayer.version === 1) {\n warnOnce(`Vector tile source \"${this.source}\" layer \"${sourceLayerId}\" ` +\n 'does not use vector tile spec v2 and therefore may have some rendering errors.');\n }\n\n const sourceLayerIndex = sourceLayerCoder.encode(sourceLayerId);\n const features = [];\n for (let index = 0; index < sourceLayer.length; index++) {\n const feature = sourceLayer.feature(index);\n const id = featureIndex.getId(feature, sourceLayerId);\n features.push({feature, id, index, sourceLayerIndex});\n }\n\n for (const family of layerFamilies[sourceLayerId]) {\n const layer = family[0];\n\n if (layer.source !== this.source) {\n warnOnce(`layer.source = ${layer.source} does not equal this.source = ${this.source}`);\n }\n if (layer.isHidden(this.zoom, true)) continue;\n recalculateLayers(family, this.zoom, availableImages);\n\n const bucket = buckets[layer.id] = layer.createBucket({\n index: featureIndex.bucketLayerIDs.length,\n layers: family,\n zoom: this.zoom,\n pixelRatio: this.pixelRatio,\n overscaling: this.overscaling,\n collisionBoxArray: this.collisionBoxArray,\n sourceLayerIndex,\n sourceID: this.source\n });\n\n bucket.populate(features, options, this.tileID.canonical);\n featureIndex.bucketLayerIDs.push(family.map((l) => l.id));\n }\n }\n\n // options.glyphDependencies looks like: {\"SomeFontName\":{\"10\":true,\"32\":true}}\n // this line makes an object like: {\"SomeFontName\":[10,32]}\n const stacks: {[_: string]: Array} = mapObject(options.glyphDependencies, (glyphs) => Object.keys(glyphs).map(Number));\n\n this.inFlightDependencies.forEach((request) => request?.abort());\n this.inFlightDependencies = [];\n\n let getGlyphsPromise = Promise.resolve({});\n if (Object.keys(stacks).length) {\n const abortController = new AbortController();\n this.inFlightDependencies.push(abortController);\n getGlyphsPromise = actor.sendAsync({type: MessageType.getGlyphs, data: {stacks, source: this.source, tileID: this.tileID, type: 'glyphs'}}, abortController);\n }\n\n const icons = Object.keys(options.iconDependencies);\n let getIconsPromise = Promise.resolve({});\n if (icons.length) {\n const abortController = new AbortController();\n this.inFlightDependencies.push(abortController);\n getIconsPromise = actor.sendAsync({type: MessageType.getImages, data: {icons, source: this.source, tileID: this.tileID, type: 'icons'}}, abortController);\n }\n\n const patterns = Object.keys(options.patternDependencies);\n let getPatternsPromise = Promise.resolve({});\n if (patterns.length) {\n const abortController = new AbortController();\n this.inFlightDependencies.push(abortController);\n getPatternsPromise = actor.sendAsync({type: MessageType.getImages, data: {icons: patterns, source: this.source, tileID: this.tileID, type: 'patterns'}}, abortController);\n }\n\n const dashes = options.dashDependencies;\n let getDashesPromise = Promise.resolve({} as GetDashesResponse);\n if (Object.keys(dashes).length) {\n const abortController = new AbortController();\n this.inFlightDependencies.push(abortController);\n getDashesPromise = actor.sendAsync({type: MessageType.getDashes, data: {dashes}}, abortController);\n }\n\n const [glyphMap, iconMap, patternMap, dashPositions] = await Promise.all([getGlyphsPromise, getIconsPromise, getPatternsPromise, getDashesPromise]);\n\n const glyphAtlas = new GlyphAtlas(glyphMap);\n const imageAtlas = new ImageAtlas(iconMap, patternMap);\n\n for (const key in buckets) {\n const bucket = buckets[key];\n if (bucket instanceof SymbolBucket) {\n recalculateLayers(bucket.layers, this.zoom, availableImages);\n performSymbolLayout({\n bucket,\n glyphMap,\n glyphPositions: glyphAtlas.positions,\n imageMap: iconMap,\n imagePositions: imageAtlas.iconPositions,\n showCollisionBoxes: this.showCollisionBoxes,\n canonical: this.tileID.canonical,\n subdivisionGranularity: options.subdivisionGranularity\n });\n } else if (bucket.hasDependencies && (bucket instanceof FillBucket || bucket instanceof FillExtrusionBucket || bucket instanceof LineBucket)) {\n recalculateLayers(bucket.layers, this.zoom, availableImages);\n bucket.addFeatures(options, this.tileID.canonical, imageAtlas.patternPositions, dashPositions);\n }\n }\n\n this.status = 'done';\n return {\n buckets: Object.values(buckets).filter(b => !b.isEmpty()),\n featureIndex,\n collisionBoxArray: this.collisionBoxArray,\n glyphAtlasImage: glyphAtlas.image,\n imageAtlas,\n dashPositions,\n // Only used for benchmarking:\n glyphMap: this.returnDependencies ? glyphMap : null,\n iconMap: this.returnDependencies ? iconMap : null,\n glyphPositions: this.returnDependencies ? glyphAtlas.positions : null\n };\n }\n}\n\nfunction recalculateLayers(layers: ReadonlyArray, zoom: number, availableImages: Array) {\n // Layers are shared and may have been used by a WorkerTile with a different zoom.\n const parameters = new EvaluationParameters(zoom);\n for (const layer of layers) {\n layer.recalculate(parameters, availableImages);\n }\n}\n","import Point from '@mapbox/point-geometry';\nimport {type VectorTileFeatureLike, type VectorTileLayerLike, type VectorTileLike, fromVectorTileJs} from '@maplibre/vt-pbf';\nimport {clipGeometry} from '../symbol/clip_line';\nimport type {LoadVectorTileResult} from './vector_tile_worker_source';\nimport type {CanonicalTileID} from '../tile/tile_id';\n\nclass VectorTileFeatureOverzoomed implements VectorTileFeatureLike {\n pointsArray: Point[][];\n type: VectorTileFeatureLike['type'];\n properties: VectorTileFeatureLike['properties'];\n id: VectorTileFeatureLike['id'];\n extent: VectorTileFeatureLike['extent'];\n\n constructor(\n type: VectorTileFeatureLike['type'],\n geometry: Point[][],\n properties: VectorTileFeatureLike['properties'],\n id: VectorTileFeatureLike['id'],\n extent: VectorTileFeatureLike['extent']\n ) {\n this.type = type;\n this.properties = properties ? properties : {};\n this.extent = extent;\n this.pointsArray = geometry;\n this.id = id;\n }\n\n loadGeometry() {\n // Clone the geometry and ensure all points are Point instances\n return this.pointsArray.map(ring => \n ring.map(point => new Point(point.x, point.y))\n );\n }\n}\n\nclass VectorTileLayerOverzoomed implements VectorTileLayerLike {\n private _myFeatures: VectorTileFeatureOverzoomed[];\n name: string;\n extent: number;\n version: number = 2;\n length: number;\n\n constructor(features: VectorTileFeatureOverzoomed[], layerName: string, extent: number) {\n this._myFeatures = features;\n this.name = layerName;\n this.length = features.length;\n this.extent = extent;\n }\n\n feature(i: number): VectorTileFeatureLike {\n return this._myFeatures[i];\n }\n}\n\nexport class VectorTileOverzoomed implements VectorTileLike {\n layers: Record = {};\n\n addLayer(layer: VectorTileLayerOverzoomed) {\n this.layers[layer.name] = layer;\n }\n}\n\n/**\n * Encodes the virtual tile into binary vector tile form.\n * This is a convenience that allows `FeatureIndex` to operate the same way across `VectorTileSource` and `GeoJSONSource` data.\n * @param virtualVectorTile - a syntetically created vector tile, this tile should have the relevant layer and features already added to it.\n * @returns - the encoded vector tile along with the original virtual tile binary data.\n */\nexport function toVirtualVectorTile(virtualVectorTile: VectorTileLike): LoadVectorTileResult {\n let pbf: Uint8Array = fromVectorTileJs(virtualVectorTile);\n if (pbf.byteOffset !== 0 || pbf.byteLength !== pbf.buffer.byteLength) {\n pbf = new Uint8Array(pbf); // Compatibility with node Buffer (https://github.com/mapbox/pbf/issues/35)\n }\n return {\n vectorTile: virtualVectorTile,\n rawData: pbf.buffer\n };\n}\n\n/**\n * This function slices a source tile layer into an overzoomed tile layer for a target tile ID.\n * @param sourceLayer - the source tile layer to slice\n * @param maxZoomTileID - the maximum zoom tile ID\n * @param targetTileID - the target tile ID\n * @returns - the overzoomed tile layer\n */\nexport function sliceVectorTileLayer(sourceLayer: VectorTileLayerLike, maxZoomTileID: CanonicalTileID, targetTileID: CanonicalTileID): VectorTileLayerOverzoomed {\n const {extent} = sourceLayer;\n const dz = targetTileID.z - maxZoomTileID.z;\n const scale = Math.pow(2, dz);\n \n // Calculate the target tile's position within the source tile in target coordinate space\n // This ensures all tiles share the same coordinate system\n const offsetX = (targetTileID.x - maxZoomTileID.x * scale) * extent;\n const offsetY = (targetTileID.y - maxZoomTileID.y * scale) * extent;\n\n const featureWrappers: VectorTileFeatureOverzoomed[] = [];\n for (let index = 0; index < sourceLayer.length; index++) {\n const feature: VectorTileFeatureLike = sourceLayer.feature(index);\n let geometry = feature.loadGeometry();\n \n // Transform all coordinates to target tile space\n for (const ring of geometry) {\n for (const point of ring) {\n point.x = point.x * scale - offsetX;\n point.y = point.y * scale - offsetY;\n }\n }\n \n const buffer = 128;\n geometry = clipGeometry(geometry, feature.type, -buffer, -buffer, extent + buffer, extent + buffer);\n if (geometry.length === 0) {\n continue;\n }\n \n featureWrappers.push(new VectorTileFeatureOverzoomed(\n feature.type,\n geometry,\n feature.properties,\n feature.id,\n extent\n ));\n }\n return new VectorTileLayerOverzoomed(featureWrappers, sourceLayer.name, extent);\n}","import Protobuf from 'pbf';\nimport {VectorTile} from '@mapbox/vector-tile';\nimport {type ExpiryData, getArrayBuffer} from '../util/ajax';\nimport {WorkerTile} from './worker_tile';\nimport {BoundedLRUCache} from '../tile/tile_cache';\nimport {extend} from '../util/util';\nimport {RequestPerformance} from '../util/performance';\nimport {VectorTileOverzoomed, sliceVectorTileLayer, toVirtualVectorTile} from './vector_tile_overzoomed';\nimport {MLTVectorTile} from './vector_tile_mlt';\nimport type {\n WorkerSource,\n WorkerTileParameters,\n TileParameters,\n WorkerTileResult\n} from '../source/worker_source';\nimport type {IActor} from '../util/actor';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {StyleLayerIndex} from '../style/style_layer_index';\nimport type {VectorTileLayerLike, VectorTileLike} from '@maplibre/vt-pbf';\n\nexport type LoadVectorTileResult = {\n vectorTile: VectorTileLike;\n rawData: ArrayBufferLike;\n resourceTiming?: Array;\n} & ExpiryData;\n\ntype FetchingState = {\n rawTileData: ArrayBufferLike;\n cacheControl: ExpiryData;\n resourceTiming: any;\n};\n\nexport type AbortVectorData = () => void;\nexport type LoadVectorData = (params: WorkerTileParameters, abortController: AbortController) => Promise;\n\n/**\n * The {@link WorkerSource} implementation that supports {@link VectorTileSource}.\n * This class is designed to be easily reused to support custom source types\n * for data formats that can be parsed/converted into an in-memory VectorTile\n * representation. To do so, override its `loadVectorTile` method.\n */\nexport class VectorTileWorkerSource implements WorkerSource {\n actor: IActor;\n layerIndex: StyleLayerIndex;\n availableImages: Array;\n fetching: {[_: string]: FetchingState };\n loading: {[_: string]: WorkerTile};\n loaded: {[_: string]: WorkerTile};\n overzoomedTileResultCache: BoundedLRUCache;\n\n /**\n * @param loadVectorData - Optional method for custom loading of a VectorTile\n * object based on parameters passed from the main-thread Source. See\n * {@link VectorTileWorkerSource.loadTile}. The default implementation simply\n * loads the pbf at `params.url`.\n */\n constructor(actor: IActor, layerIndex: StyleLayerIndex, availableImages: Array) {\n this.actor = actor;\n this.layerIndex = layerIndex;\n this.availableImages = availableImages;\n this.fetching = {};\n this.loading = {};\n this.loaded = {};\n this.overzoomedTileResultCache = new BoundedLRUCache(1000);\n }\n\n /**\n * Loads a vector tile\n */\n async loadVectorTile(params: WorkerTileParameters, abortController: AbortController): Promise {\n const response = await getArrayBuffer(params.request, abortController);\n try {\n const vectorTile = params.encoding !== 'mlt' \n ? new VectorTile(new Protobuf(response.data)) \n : new MLTVectorTile(response.data);\n return {\n vectorTile,\n rawData: response.data,\n cacheControl: response.cacheControl,\n expires: response.expires\n };\n } catch (ex) {\n const bytes = new Uint8Array(response.data);\n const isGzipped = bytes[0] === 0x1f && bytes[1] === 0x8b;\n let errorMessage = `Unable to parse the tile at ${params.request.url}, `;\n if (isGzipped) {\n errorMessage += 'please make sure the data is not gzipped and that you have configured the relevant header in the server';\n } else {\n errorMessage += `got error: ${ex.message}`;\n }\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Implements {@link WorkerSource.loadTile}. Delegates to\n * {@link VectorTileWorkerSource.loadVectorData} (which by default expects\n * a `params.url` property) for fetching and producing a VectorTile object.\n */\n async loadTile(params: WorkerTileParameters): Promise {\n const {uid: tileUid, overzoomParameters} = params;\n\n if (overzoomParameters) {\n params.request = overzoomParameters.overzoomRequest;\n }\n\n const perf = (params && params.request && params.request.collectResourceTiming) ?\n new RequestPerformance(params.request) : false;\n\n const workerTile = new WorkerTile(params);\n this.loading[tileUid] = workerTile;\n\n const abortController = new AbortController();\n workerTile.abort = abortController;\n try {\n const response = await this.loadVectorTile(params, abortController);\n delete this.loading[tileUid];\n if (!response) {\n return null;\n }\n\n if (overzoomParameters) {\n const overzoomTile = this._getOverzoomTile(params, response.vectorTile);\n response.rawData = overzoomTile.rawData;\n response.vectorTile = overzoomTile.vectorTile;\n }\n\n const rawTileData = response.rawData;\n const cacheControl = {} as ExpiryData;\n if (response.expires) cacheControl.expires = response.expires;\n if (response.cacheControl) cacheControl.cacheControl = response.cacheControl;\n\n const resourceTiming = {} as {resourceTiming: any};\n if (perf) {\n const resourceTimingData = perf.finish();\n // it's necessary to eval the result of getEntriesByName() here via parse/stringify\n // late evaluation in the main thread causes TypeError: illegal invocation\n if (resourceTimingData)\n resourceTiming.resourceTiming = JSON.parse(JSON.stringify(resourceTimingData));\n }\n\n workerTile.vectorTile = response.vectorTile;\n const parsePromise = workerTile.parse(response.vectorTile, this.layerIndex, this.availableImages, this.actor, params.subdivisionGranularity);\n this.loaded[tileUid] = workerTile;\n // keep the original fetching state so that reload tile can pick it up if the original parse is cancelled by reloads' parse\n this.fetching[tileUid] = {rawTileData, cacheControl, resourceTiming};\n\n try {\n const result = await parsePromise;\n // Transferring a copy of rawTileData because the worker needs to retain its copy.\n return extend({rawTileData: rawTileData.slice(0), encoding: params.encoding}, result, cacheControl, resourceTiming);\n } finally {\n delete this.fetching[tileUid];\n }\n } catch (err) {\n delete this.loading[tileUid];\n workerTile.status = 'done';\n this.loaded[tileUid] = workerTile;\n throw err;\n }\n }\n\n /**\n * If we are seeking a tile deeper than the source's max available canonical tile, get the overzoomed tile\n * @param params - the worker tile parameters\n * @param maxZoomVectorTile - the original vector tile at the source's max available canonical zoom\n * @returns the overzoomed tile and its raw data\n */\n private _getOverzoomTile(params: WorkerTileParameters, maxZoomVectorTile: VectorTileLike): LoadVectorTileResult {\n const {tileID, source, overzoomParameters} = params;\n const {maxZoomTileID} = overzoomParameters;\n\n const cacheKey = `${maxZoomTileID.key}_${tileID.key}`;\n const cachedOverzoomTile = this.overzoomedTileResultCache.get(cacheKey);\n \n if (cachedOverzoomTile) {\n return cachedOverzoomTile;\n }\n\n const overzoomedVectorTile = new VectorTileOverzoomed();\n const layerFamilies: Record = this.layerIndex.familiesBySource[source];\n\n for (const sourceLayerId in layerFamilies) {\n const sourceLayer: VectorTileLayerLike = maxZoomVectorTile.layers[sourceLayerId];\n if (!sourceLayer) {\n continue;\n }\n\n const slicedTileLayer = sliceVectorTileLayer(sourceLayer, maxZoomTileID, tileID.canonical);\n if (slicedTileLayer.length > 0) {\n overzoomedVectorTile.addLayer(slicedTileLayer);\n }\n }\n const overzoomedVectorTileResult = toVirtualVectorTile(overzoomedVectorTile);\n this.overzoomedTileResultCache.set(cacheKey, overzoomedVectorTileResult);\n\n return overzoomedVectorTileResult;\n }\n\n /**\n * Implements {@link WorkerSource.reloadTile}.\n */\n async reloadTile(params: WorkerTileParameters): Promise {\n const uid = params.uid;\n if (!this.loaded || !this.loaded[uid]) {\n throw new Error('Should not be trying to reload a tile that was never loaded or has been removed');\n }\n const workerTile = this.loaded[uid];\n workerTile.showCollisionBoxes = params.showCollisionBoxes;\n if (workerTile.status === 'parsing') {\n const result = await workerTile.parse(workerTile.vectorTile, this.layerIndex, this.availableImages, this.actor, params.subdivisionGranularity);\n // if we have cancelled the original parse, make sure to pass the rawTileData from the original fetch\n let parseResult: WorkerTileResult;\n if (this.fetching[uid]) {\n const {rawTileData, cacheControl, resourceTiming} = this.fetching[uid];\n delete this.fetching[uid];\n parseResult = extend({rawTileData: rawTileData.slice(0), encoding: params.encoding}, result, cacheControl, resourceTiming);\n } else {\n parseResult = result;\n }\n return parseResult;\n\n }\n // if there was no vector tile data on the initial load, don't try and re-parse tile\n if (workerTile.status === 'done' && workerTile.vectorTile) {\n // this seems like a missing case where cache control is lost? see #3309\n return workerTile.parse(workerTile.vectorTile, this.layerIndex, this.availableImages, this.actor, params.subdivisionGranularity);\n }\n }\n\n /**\n * Implements {@link WorkerSource.abortTile}.\n */\n async abortTile(params: TileParameters): Promise {\n const loading = this.loading;\n const uid = params.uid;\n if (loading && loading[uid] && loading[uid].abort) {\n loading[uid].abort.abort();\n delete loading[uid];\n }\n }\n\n /**\n * Implements {@link WorkerSource.removeTile}.\n */\n async removeTile(params: TileParameters): Promise {\n if (this.loaded && this.loaded[params.uid]) {\n delete this.loaded[params.uid];\n }\n }\n}\n","import {DEMData} from '../data/dem_data';\nimport {RGBAImage} from '../util/image';\nimport type {Actor} from '../util/actor';\nimport type {\n WorkerDEMTileParameters,\n TileParameters\n} from './worker_source';\nimport {getImageData, isImageBitmap} from '../util/util';\n\nexport class RasterDEMTileWorkerSource {\n actor: Actor;\n loaded: {[_: string]: DEMData};\n\n constructor() {\n this.loaded = {};\n }\n\n async loadTile(params: WorkerDEMTileParameters): Promise {\n const {uid, encoding, rawImageData, redFactor, greenFactor, blueFactor, baseShift} = params;\n const width = rawImageData.width + 2;\n const height = rawImageData.height + 2;\n const imagePixels: RGBAImage | ImageData = isImageBitmap(rawImageData) ?\n new RGBAImage({width, height}, await getImageData(rawImageData, -1, -1, width, height)) :\n rawImageData;\n const dem = new DEMData(uid, imagePixels, encoding, redFactor, greenFactor, blueFactor, baseShift);\n this.loaded = this.loaded || {};\n this.loaded[uid] = dem;\n return dem;\n }\n\n removeTile(params: TileParameters) {\n const loaded = this.loaded,\n uid = params.uid;\n if (loaded && loaded[uid]) {\n delete loaded[uid];\n }\n }\n}\n","\nmodule.exports = rewind;\n\nfunction rewind(gj, outer) {\n var type = gj && gj.type, i;\n\n if (type === 'FeatureCollection') {\n for (i = 0; i < gj.features.length; i++) rewind(gj.features[i], outer);\n\n } else if (type === 'GeometryCollection') {\n for (i = 0; i < gj.geometries.length; i++) rewind(gj.geometries[i], outer);\n\n } else if (type === 'Feature') {\n rewind(gj.geometry, outer);\n\n } else if (type === 'Polygon') {\n rewindRings(gj.coordinates, outer);\n\n } else if (type === 'MultiPolygon') {\n for (i = 0; i < gj.coordinates.length; i++) rewindRings(gj.coordinates[i], outer);\n }\n\n return gj;\n}\n\nfunction rewindRings(rings, outer) {\n if (rings.length === 0) return;\n\n rewindRing(rings[0], outer);\n for (var i = 1; i < rings.length; i++) {\n rewindRing(rings[i], !outer);\n }\n}\n\nfunction rewindRing(ring, dir) {\n var area = 0, err = 0;\n for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {\n var k = (ring[i][0] - ring[j][0]) * (ring[j][1] + ring[i][1]);\n var m = area + k;\n err += Math.abs(area) >= Math.abs(k) ? area - m + k : k - m + area;\n area = m;\n }\n if (area + err >= 0 !== !!dir) ring.reverse();\n}\n","\nimport KDBush from 'kdbush';\n\nconst defaultOptions = {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n minPoints: 2, // minimum points to form a cluster\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n // properties to use for individual points when running the reducer\n map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nconst OFFSET_ZOOM = 2;\nconst OFFSET_ID = 3;\nconst OFFSET_PARENT = 4;\nconst OFFSET_NUM = 5;\nconst OFFSET_PROP = 6;\n\nexport default class Supercluster {\n constructor(options) {\n this.options = Object.assign(Object.create(defaultOptions), options);\n this.trees = new Array(this.options.maxZoom + 1);\n this.stride = this.options.reduce ? 7 : 6;\n this.clusterProps = [];\n }\n\n load(points) {\n const {log, minZoom, maxZoom} = this.options;\n\n if (log) console.time('total time');\n\n const timerId = `prepare ${ points.length } points`;\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point and index input points into a KD-tree\n const data = [];\n\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n if (!p.geometry) continue;\n\n const [lng, lat] = p.geometry.coordinates;\n const x = fround(lngX(lng));\n const y = fround(latY(lat));\n // store internal point/cluster data in flat numeric arrays for performance\n data.push(\n x, y, // projected point coordinates\n Infinity, // the last zoom the point was processed at\n i, // index of the source feature in the original input array\n -1, // parent cluster id\n 1 // number of points in a cluster\n );\n if (this.options.reduce) data.push(0); // noop\n }\n let tree = this.trees[maxZoom + 1] = this._createTree(data);\n\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (let z = maxZoom; z >= minZoom; z--) {\n const now = +Date.now();\n\n // create a new set of clusters for the zoom and index them with a KD-tree\n tree = this.trees[z] = this._createTree(this._cluster(tree, z));\n\n if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n\n return this;\n }\n\n getClusters(bbox, zoom) {\n let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n const minLat = Math.max(-90, Math.min(90, bbox[1]));\n let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n const tree = this.trees[this._limitZoom(zoom)];\n const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n const data = tree.data;\n const clusters = [];\n for (const id of ids) {\n const k = this.stride * id;\n clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n return clusters;\n }\n\n getChildren(clusterId) {\n const originId = this._getOriginId(clusterId);\n const originZoom = this._getOriginZoom(clusterId);\n const errorMsg = 'No cluster with the specified id.';\n\n const tree = this.trees[originZoom];\n if (!tree) throw new Error(errorMsg);\n\n const data = tree.data;\n if (originId * this.stride >= data.length) throw new Error(errorMsg);\n\n const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n const x = data[originId * this.stride];\n const y = data[originId * this.stride + 1];\n const ids = tree.within(x, y, r);\n const children = [];\n for (const id of ids) {\n const k = id * this.stride;\n if (data[k + OFFSET_PARENT] === clusterId) {\n children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n\n return children;\n }\n\n getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n const leaves = [];\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n\n getTile(z, x, y) {\n const tree = this.trees[this._limitZoom(z)];\n const z2 = Math.pow(2, z);\n const {extent, radius} = this.options;\n const p = radius / extent;\n const top = (y - p) / z2;\n const bottom = (y + 1 + p) / z2;\n\n const tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.data, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.data, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.data, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n\n getClusterExpansionZoom(clusterId) {\n let expansionZoom = this._getOriginZoom(clusterId) - 1;\n while (expansionZoom <= this.options.maxZoom) {\n const children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return expansionZoom;\n }\n\n _appendLeaves(result, clusterId, limit, offset, skipped) {\n const children = this.getChildren(clusterId);\n\n for (const child of children) {\n const props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n }\n\n _createTree(data) {\n const tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);\n for (let i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);\n tree.finish();\n tree.data = data;\n return tree;\n }\n\n _addTileFeatures(ids, data, x, y, z2, tile) {\n for (const i of ids) {\n const k = i * this.stride;\n const isCluster = data[k + OFFSET_NUM] > 1;\n\n let tags, px, py;\n if (isCluster) {\n tags = getClusterProperties(data, k, this.clusterProps);\n px = data[k];\n py = data[k + 1];\n } else {\n const p = this.points[data[k + OFFSET_ID]];\n tags = p.properties;\n const [lng, lat] = p.geometry.coordinates;\n px = lngX(lng);\n py = latY(lat);\n }\n\n const f = {\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (px * z2 - x)),\n Math.round(this.options.extent * (py * z2 - y))\n ]],\n tags\n };\n\n // assign id\n let id;\n if (isCluster || this.options.generateId) {\n // optionally generate id for points\n id = data[k + OFFSET_ID];\n } else {\n // keep id if already assigned\n id = this.points[data[k + OFFSET_ID]].id;\n }\n\n if (id !== undefined) f.id = id;\n\n tile.features.push(f);\n }\n }\n\n _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n }\n\n _cluster(tree, zoom) {\n const {radius, extent, reduce, minPoints} = this.options;\n const r = radius / (extent * Math.pow(2, zoom));\n const data = tree.data;\n const nextData = [];\n const stride = this.stride;\n\n // loop through each point\n for (let i = 0; i < data.length; i += stride) {\n // if we've already visited the point at this zoom level, skip it\n if (data[i + OFFSET_ZOOM] <= zoom) continue;\n data[i + OFFSET_ZOOM] = zoom;\n\n // find all nearby points\n const x = data[i];\n const y = data[i + 1];\n const neighborIds = tree.within(data[i], data[i + 1], r);\n\n const numPointsOrigin = data[i + OFFSET_NUM];\n let numPoints = numPointsOrigin;\n\n // count the number of points in a potential cluster\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n // filter out neighbors that are already processed\n if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];\n }\n\n // if there were neighbors to merge, and there are enough points to form a cluster\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n let wx = x * numPointsOrigin;\n let wy = y * numPointsOrigin;\n\n let clusterProperties;\n let clusterPropIndex = -1;\n\n // encode both zoom and point index on which the cluster originated -- offset by total length of features\n const id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;\n\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)\n\n const numPoints2 = data[k + OFFSET_NUM];\n wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center\n wy += data[k + 1] * numPoints2;\n\n data[k + OFFSET_PARENT] = id;\n\n if (reduce) {\n if (!clusterProperties) {\n clusterProperties = this._map(data, i, true);\n clusterPropIndex = this.clusterProps.length;\n this.clusterProps.push(clusterProperties);\n }\n reduce(clusterProperties, this._map(data, k));\n }\n }\n\n data[i + OFFSET_PARENT] = id;\n nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);\n if (reduce) nextData.push(clusterPropIndex);\n\n } else { // left points as unclustered\n for (let j = 0; j < stride; j++) nextData.push(data[i + j]);\n\n if (numPoints > 1) {\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom;\n for (let j = 0; j < stride; j++) nextData.push(data[k + j]);\n }\n }\n }\n }\n\n return nextData;\n }\n\n // get index of the point from which the cluster originated\n _getOriginId(clusterId) {\n return (clusterId - this.points.length) >> 5;\n }\n\n // get zoom of the point from which the cluster originated\n _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n\n _map(data, i, clone) {\n if (data[i + OFFSET_NUM] > 1) {\n const props = this.clusterProps[data[i + OFFSET_PROP]];\n return clone ? Object.assign({}, props) : props;\n }\n const original = this.points[data[i + OFFSET_ID]].properties;\n const result = this.options.map(original);\n return clone && result === original ? Object.assign({}, result) : result;\n }\n}\n\nfunction getClusterJSON(data, i, clusterProps) {\n return {\n type: 'Feature',\n id: data[i + OFFSET_ID],\n properties: getClusterProperties(data, i, clusterProps),\n geometry: {\n type: 'Point',\n coordinates: [xLng(data[i]), yLat(data[i + 1])]\n }\n };\n}\n\nfunction getClusterProperties(data, i, clusterProps) {\n const count = data[i + OFFSET_NUM];\n const abbrev =\n count >= 10000 ? `${Math.round(count / 1000) }k` :\n count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;\n const propIndex = data[i + OFFSET_PROP];\n const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);\n return Object.assign(properties, {\n cluster: true,\n cluster_id: data[i + OFFSET_ID],\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n const sin = Math.sin(lat * Math.PI / 180);\n const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n const y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n","\n// calculate simplification data using optimized Douglas-Peucker algorithm\n\nexport default function simplify(coords, first, last, sqTolerance) {\n let maxSqDist = sqTolerance;\n const mid = first + ((last - first) >> 1);\n let minPosToMid = last - first;\n let index;\n\n const ax = coords[first];\n const ay = coords[first + 1];\n const bx = coords[last];\n const by = coords[last + 1];\n\n for (let i = first + 3; i < last; i += 3) {\n const d = getSqSegDist(coords[i], coords[i + 1], ax, ay, bx, by);\n\n if (d > maxSqDist) {\n index = i;\n maxSqDist = d;\n\n } else if (d === maxSqDist) {\n // a workaround to ensure we choose a pivot close to the middle of the list,\n // reducing recursion depth, for certain degenerate inputs\n // https://github.com/mapbox/geojson-vt/issues/104\n const posToMid = Math.abs(i - mid);\n if (posToMid < minPosToMid) {\n index = i;\n minPosToMid = posToMid;\n }\n }\n }\n\n if (maxSqDist > sqTolerance) {\n if (index - first > 3) simplify(coords, first, index, sqTolerance);\n coords[index + 2] = maxSqDist;\n if (last - index > 3) simplify(coords, index, last, sqTolerance);\n }\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(px, py, x, y, bx, by) {\n\n let dx = bx - x;\n let dy = by - y;\n\n if (dx !== 0 || dy !== 0) {\n\n const t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = bx;\n y = by;\n\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = px - x;\n dy = py - y;\n\n return dx * dx + dy * dy;\n}\n","\nexport default function createFeature(id, type, geom, tags) {\n const feature = {\n id: id == null ? null : id,\n type,\n geometry: geom,\n tags,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n\n if (type === 'Point' || type === 'MultiPoint' || type === 'LineString') {\n calcLineBBox(feature, geom);\n\n } else if (type === 'Polygon') {\n // the outer ring (ie [0]) contains all inner rings\n calcLineBBox(feature, geom[0]);\n\n } else if (type === 'MultiLineString') {\n for (const line of geom) {\n calcLineBBox(feature, line);\n }\n\n } else if (type === 'MultiPolygon') {\n for (const polygon of geom) {\n // the outer ring (ie [0]) contains all inner rings\n calcLineBBox(feature, polygon[0]);\n }\n }\n\n return feature;\n}\n\nfunction calcLineBBox(feature, geom) {\n for (let i = 0; i < geom.length; i += 3) {\n feature.minX = Math.min(feature.minX, geom[i]);\n feature.minY = Math.min(feature.minY, geom[i + 1]);\n feature.maxX = Math.max(feature.maxX, geom[i]);\n feature.maxY = Math.max(feature.maxY, geom[i + 1]);\n }\n}\n","\nimport simplify from './simplify.js';\nimport createFeature from './feature.js';\n\n// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data\n\nexport default function convert(data, options) {\n const features = [];\n if (data.type === 'FeatureCollection') {\n for (let i = 0; i < data.features.length; i++) {\n convertFeature(features, data.features[i], options, i);\n }\n\n } else if (data.type === 'Feature') {\n convertFeature(features, data, options);\n\n } else {\n // single geometry or a geometry collection\n convertFeature(features, {geometry: data}, options);\n }\n\n return features;\n}\n\nfunction convertFeature(features, geojson, options, index) {\n if (!geojson.geometry) return;\n\n const coords = geojson.geometry.coordinates;\n if (coords && coords.length === 0) return;\n\n const type = geojson.geometry.type;\n const tolerance = Math.pow(options.tolerance / ((1 << options.maxZoom) * options.extent), 2);\n let geometry = [];\n let id = geojson.id;\n if (options.promoteId) {\n id = geojson.properties[options.promoteId];\n } else if (options.generateId) {\n id = index || 0;\n }\n if (type === 'Point') {\n convertPoint(coords, geometry);\n\n } else if (type === 'MultiPoint') {\n for (const p of coords) {\n convertPoint(p, geometry);\n }\n\n } else if (type === 'LineString') {\n convertLine(coords, geometry, tolerance, false);\n\n } else if (type === 'MultiLineString') {\n if (options.lineMetrics) {\n // explode into linestrings to be able to track metrics\n for (const line of coords) {\n geometry = [];\n convertLine(line, geometry, tolerance, false);\n features.push(createFeature(id, 'LineString', geometry, geojson.properties));\n }\n return;\n } else {\n convertLines(coords, geometry, tolerance, false);\n }\n\n } else if (type === 'Polygon') {\n convertLines(coords, geometry, tolerance, true);\n\n } else if (type === 'MultiPolygon') {\n for (const polygon of coords) {\n const newPolygon = [];\n convertLines(polygon, newPolygon, tolerance, true);\n geometry.push(newPolygon);\n }\n } else if (type === 'GeometryCollection') {\n for (const singleGeometry of geojson.geometry.geometries) {\n convertFeature(features, {\n id,\n geometry: singleGeometry,\n properties: geojson.properties\n }, options, index);\n }\n return;\n } else {\n throw new Error('Input data is not a valid GeoJSON object.');\n }\n\n features.push(createFeature(id, type, geometry, geojson.properties));\n}\n\nfunction convertPoint(coords, out) {\n out.push(projectX(coords[0]), projectY(coords[1]), 0);\n}\n\nfunction convertLine(ring, out, tolerance, isPolygon) {\n let x0, y0;\n let size = 0;\n\n for (let j = 0; j < ring.length; j++) {\n const x = projectX(ring[j][0]);\n const y = projectY(ring[j][1]);\n\n out.push(x, y, 0);\n\n if (j > 0) {\n if (isPolygon) {\n size += (x0 * y - x * y0) / 2; // area\n } else {\n size += Math.sqrt(Math.pow(x - x0, 2) + Math.pow(y - y0, 2)); // length\n }\n }\n x0 = x;\n y0 = y;\n }\n\n const last = out.length - 3;\n out[2] = 1;\n simplify(out, 0, last, tolerance);\n out[last + 2] = 1;\n\n out.size = Math.abs(size);\n out.start = 0;\n out.end = out.size;\n}\n\nfunction convertLines(rings, out, tolerance, isPolygon) {\n for (let i = 0; i < rings.length; i++) {\n const geom = [];\n convertLine(rings[i], geom, tolerance, isPolygon);\n out.push(geom);\n }\n}\n\nfunction projectX(x) {\n return x / 360 + 0.5;\n}\n\nfunction projectY(y) {\n const sin = Math.sin(y * Math.PI / 180);\n const y2 = 0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI;\n return y2 < 0 ? 0 : y2 > 1 ? 1 : y2;\n}\n","\nimport createFeature from './feature.js';\n\n/* clip features between two vertical or horizontal axis-parallel lines:\n * | |\n * ___|___ | /\n * / | \\____|____/\n * | |\n *\n * k1 and k2 are the line coordinates\n * axis: 0 for x, 1 for y\n * minAll and maxAll: minimum and maximum coordinate value for all features\n */\nexport default function clip(features, scale, k1, k2, axis, minAll, maxAll, options) {\n k1 /= scale;\n k2 /= scale;\n\n if (minAll >= k1 && maxAll < k2) return features; // trivial accept\n else if (maxAll < k1 || minAll >= k2) return null; // trivial reject\n\n const clipped = [];\n\n for (const feature of features) {\n const geometry = feature.geometry;\n let type = feature.type;\n\n const min = axis === 0 ? feature.minX : feature.minY;\n const max = axis === 0 ? feature.maxX : feature.maxY;\n\n if (min >= k1 && max < k2) { // trivial accept\n clipped.push(feature);\n continue;\n } else if (max < k1 || min >= k2) { // trivial reject\n continue;\n }\n\n let newGeometry = [];\n\n if (type === 'Point' || type === 'MultiPoint') {\n clipPoints(geometry, newGeometry, k1, k2, axis);\n\n } else if (type === 'LineString') {\n clipLine(geometry, newGeometry, k1, k2, axis, false, options.lineMetrics);\n\n } else if (type === 'MultiLineString') {\n clipLines(geometry, newGeometry, k1, k2, axis, false);\n\n } else if (type === 'Polygon') {\n clipLines(geometry, newGeometry, k1, k2, axis, true);\n\n } else if (type === 'MultiPolygon') {\n for (const polygon of geometry) {\n const newPolygon = [];\n clipLines(polygon, newPolygon, k1, k2, axis, true);\n if (newPolygon.length) {\n newGeometry.push(newPolygon);\n }\n }\n }\n\n if (newGeometry.length) {\n if (options.lineMetrics && type === 'LineString') {\n for (const line of newGeometry) {\n clipped.push(createFeature(feature.id, type, line, feature.tags));\n }\n continue;\n }\n\n if (type === 'LineString' || type === 'MultiLineString') {\n if (newGeometry.length === 1) {\n type = 'LineString';\n newGeometry = newGeometry[0];\n } else {\n type = 'MultiLineString';\n }\n }\n if (type === 'Point' || type === 'MultiPoint') {\n type = newGeometry.length === 3 ? 'Point' : 'MultiPoint';\n }\n\n clipped.push(createFeature(feature.id, type, newGeometry, feature.tags));\n }\n }\n\n return clipped.length ? clipped : null;\n}\n\nfunction clipPoints(geom, newGeom, k1, k2, axis) {\n for (let i = 0; i < geom.length; i += 3) {\n const a = geom[i + axis];\n\n if (a >= k1 && a <= k2) {\n addPoint(newGeom, geom[i], geom[i + 1], geom[i + 2]);\n }\n }\n}\n\nfunction clipLine(geom, newGeom, k1, k2, axis, isPolygon, trackMetrics) {\n\n let slice = newSlice(geom);\n const intersect = axis === 0 ? intersectX : intersectY;\n let len = geom.start;\n let segLen, t;\n\n for (let i = 0; i < geom.length - 3; i += 3) {\n const ax = geom[i];\n const ay = geom[i + 1];\n const az = geom[i + 2];\n const bx = geom[i + 3];\n const by = geom[i + 4];\n const a = axis === 0 ? ax : ay;\n const b = axis === 0 ? bx : by;\n let exited = false;\n\n if (trackMetrics) segLen = Math.sqrt(Math.pow(ax - bx, 2) + Math.pow(ay - by, 2));\n\n if (a < k1) {\n // ---|--> | (line enters the clip region from the left)\n if (b > k1) {\n t = intersect(slice, ax, ay, bx, by, k1);\n if (trackMetrics) slice.start = len + segLen * t;\n }\n } else if (a > k2) {\n // | <--|--- (line enters the clip region from the right)\n if (b < k2) {\n t = intersect(slice, ax, ay, bx, by, k2);\n if (trackMetrics) slice.start = len + segLen * t;\n }\n } else {\n addPoint(slice, ax, ay, az);\n }\n if (b < k1 && a >= k1) {\n // <--|--- | or <--|-----|--- (line exits the clip region on the left)\n t = intersect(slice, ax, ay, bx, by, k1);\n exited = true;\n }\n if (b > k2 && a <= k2) {\n // | ---|--> or ---|-----|--> (line exits the clip region on the right)\n t = intersect(slice, ax, ay, bx, by, k2);\n exited = true;\n }\n\n if (!isPolygon && exited) {\n if (trackMetrics) slice.end = len + segLen * t;\n newGeom.push(slice);\n slice = newSlice(geom);\n }\n\n if (trackMetrics) len += segLen;\n }\n\n // add the last point\n let last = geom.length - 3;\n const ax = geom[last];\n const ay = geom[last + 1];\n const az = geom[last + 2];\n const a = axis === 0 ? ax : ay;\n if (a >= k1 && a <= k2) addPoint(slice, ax, ay, az);\n\n // close the polygon if its endpoints are not the same after clipping\n last = slice.length - 3;\n if (isPolygon && last >= 3 && (slice[last] !== slice[0] || slice[last + 1] !== slice[1])) {\n addPoint(slice, slice[0], slice[1], slice[2]);\n }\n\n // add the final slice\n if (slice.length) {\n newGeom.push(slice);\n }\n}\n\nfunction newSlice(line) {\n const slice = [];\n slice.size = line.size;\n slice.start = line.start;\n slice.end = line.end;\n return slice;\n}\n\nfunction clipLines(geom, newGeom, k1, k2, axis, isPolygon) {\n for (const line of geom) {\n clipLine(line, newGeom, k1, k2, axis, isPolygon, false);\n }\n}\n\nfunction addPoint(out, x, y, z) {\n out.push(x, y, z);\n}\n\nfunction intersectX(out, ax, ay, bx, by, x) {\n const t = (x - ax) / (bx - ax);\n addPoint(out, x, ay + (by - ay) * t, 1);\n return t;\n}\n\nfunction intersectY(out, ax, ay, bx, by, y) {\n const t = (y - ay) / (by - ay);\n addPoint(out, ax + (bx - ax) * t, y, 1);\n return t;\n}\n","\nimport clip from './clip.js';\nimport createFeature from './feature.js';\n\nexport default function wrap(features, options) {\n const buffer = options.buffer / options.extent;\n let merged = features;\n const left = clip(features, 1, -1 - buffer, buffer, 0, -1, 2, options); // left world copy\n const right = clip(features, 1, 1 - buffer, 2 + buffer, 0, -1, 2, options); // right world copy\n\n if (left || right) {\n merged = clip(features, 1, -buffer, 1 + buffer, 0, -1, 2, options) || []; // center world copy\n\n if (left) merged = shiftFeatureCoords(left, 1).concat(merged); // merge left into center\n if (right) merged = merged.concat(shiftFeatureCoords(right, -1)); // merge right into center\n }\n\n return merged;\n}\n\nfunction shiftFeatureCoords(features, offset) {\n const newFeatures = [];\n\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n const type = feature.type;\n\n let newGeometry;\n\n if (type === 'Point' || type === 'MultiPoint' || type === 'LineString') {\n newGeometry = shiftCoords(feature.geometry, offset);\n\n } else if (type === 'MultiLineString' || type === 'Polygon') {\n newGeometry = [];\n for (const line of feature.geometry) {\n newGeometry.push(shiftCoords(line, offset));\n }\n } else if (type === 'MultiPolygon') {\n newGeometry = [];\n for (const polygon of feature.geometry) {\n const newPolygon = [];\n for (const line of polygon) {\n newPolygon.push(shiftCoords(line, offset));\n }\n newGeometry.push(newPolygon);\n }\n }\n\n newFeatures.push(createFeature(feature.id, type, newGeometry, feature.tags));\n }\n\n return newFeatures;\n}\n\nfunction shiftCoords(points, offset) {\n const newPoints = [];\n newPoints.size = points.size;\n\n if (points.start !== undefined) {\n newPoints.start = points.start;\n newPoints.end = points.end;\n }\n\n for (let i = 0; i < points.length; i += 3) {\n newPoints.push(points[i] + offset, points[i + 1], points[i + 2]);\n }\n return newPoints;\n}\n","\n// Transforms the coordinates of each feature in the given tile from\n// mercator-projected space into (extent x extent) tile space.\nexport default function transformTile(tile, extent) {\n if (tile.transformed) return tile;\n\n const z2 = 1 << tile.z;\n const tx = tile.x;\n const ty = tile.y;\n\n for (const feature of tile.features) {\n const geom = feature.geometry;\n const type = feature.type;\n\n feature.geometry = [];\n\n if (type === 1) {\n for (let j = 0; j < geom.length; j += 2) {\n feature.geometry.push(transformPoint(geom[j], geom[j + 1], extent, z2, tx, ty));\n }\n } else {\n for (let j = 0; j < geom.length; j++) {\n const ring = [];\n for (let k = 0; k < geom[j].length; k += 2) {\n ring.push(transformPoint(geom[j][k], geom[j][k + 1], extent, z2, tx, ty));\n }\n feature.geometry.push(ring);\n }\n }\n }\n\n tile.transformed = true;\n\n return tile;\n}\n\nfunction transformPoint(x, y, extent, z2, tx, ty) {\n return [\n Math.round(extent * (x * z2 - tx)),\n Math.round(extent * (y * z2 - ty))];\n}\n","\nexport default function createTile(features, z, tx, ty, options) {\n const tolerance = z === options.maxZoom ? 0 : options.tolerance / ((1 << z) * options.extent);\n const tile = {\n features: [],\n numPoints: 0,\n numSimplified: 0,\n numFeatures: features.length,\n source: null,\n x: tx,\n y: ty,\n z,\n transformed: false,\n minX: 2,\n minY: 1,\n maxX: -1,\n maxY: 0\n };\n for (const feature of features) {\n addFeature(tile, feature, tolerance, options);\n }\n return tile;\n}\n\nfunction addFeature(tile, feature, tolerance, options) {\n const geom = feature.geometry;\n const type = feature.type;\n const simplified = [];\n\n tile.minX = Math.min(tile.minX, feature.minX);\n tile.minY = Math.min(tile.minY, feature.minY);\n tile.maxX = Math.max(tile.maxX, feature.maxX);\n tile.maxY = Math.max(tile.maxY, feature.maxY);\n\n if (type === 'Point' || type === 'MultiPoint') {\n for (let i = 0; i < geom.length; i += 3) {\n simplified.push(geom[i], geom[i + 1]);\n tile.numPoints++;\n tile.numSimplified++;\n }\n\n } else if (type === 'LineString') {\n addLine(simplified, geom, tile, tolerance, false, false);\n\n } else if (type === 'MultiLineString' || type === 'Polygon') {\n for (let i = 0; i < geom.length; i++) {\n addLine(simplified, geom[i], tile, tolerance, type === 'Polygon', i === 0);\n }\n\n } else if (type === 'MultiPolygon') {\n\n for (let k = 0; k < geom.length; k++) {\n const polygon = geom[k];\n for (let i = 0; i < polygon.length; i++) {\n addLine(simplified, polygon[i], tile, tolerance, true, i === 0);\n }\n }\n }\n\n if (simplified.length) {\n let tags = feature.tags || null;\n\n if (type === 'LineString' && options.lineMetrics) {\n tags = {};\n for (const key in feature.tags) tags[key] = feature.tags[key];\n tags['mapbox_clip_start'] = geom.start / geom.size;\n tags['mapbox_clip_end'] = geom.end / geom.size;\n }\n\n const tileFeature = {\n geometry: simplified,\n type: type === 'Polygon' || type === 'MultiPolygon' ? 3 :\n (type === 'LineString' || type === 'MultiLineString' ? 2 : 1),\n tags\n };\n if (feature.id !== null) {\n tileFeature.id = feature.id;\n }\n tile.features.push(tileFeature);\n }\n}\n\nfunction addLine(result, geom, tile, tolerance, isPolygon, isOuter) {\n const sqTolerance = tolerance * tolerance;\n\n if (tolerance > 0 && (geom.size < (isPolygon ? sqTolerance : tolerance))) {\n tile.numPoints += geom.length / 3;\n return;\n }\n\n const ring = [];\n\n for (let i = 0; i < geom.length; i += 3) {\n if (tolerance === 0 || geom[i + 2] > sqTolerance) {\n tile.numSimplified++;\n ring.push(geom[i], geom[i + 1]);\n }\n tile.numPoints++;\n }\n\n if (isPolygon) rewind(ring, isOuter);\n\n result.push(ring);\n}\n\nfunction rewind(ring, clockwise) {\n let area = 0;\n for (let i = 0, len = ring.length, j = len - 2; i < len; j = i, i += 2) {\n area += (ring[i] - ring[j]) * (ring[i + 1] + ring[j + 1]);\n }\n if (area > 0 === clockwise) {\n for (let i = 0, len = ring.length; i < len / 2; i += 2) {\n const x = ring[i];\n const y = ring[i + 1];\n ring[i] = ring[len - 2 - i];\n ring[i + 1] = ring[len - 1 - i];\n ring[len - 2 - i] = x;\n ring[len - 1 - i] = y;\n }\n }\n}\n","\nimport convert from './convert.js'; // GeoJSON conversion and preprocessing\nimport clip from './clip.js'; // stripe clipping algorithm\nimport wrap from './wrap.js'; // date line processing\nimport transform from './transform.js'; // coordinate transformation\nimport createTile from './tile.js'; // final simplified tile generation\n\nconst defaultOptions = {\n maxZoom: 14, // max zoom to preserve detail on\n indexMaxZoom: 5, // max zoom in the tile index\n indexMaxPoints: 100000, // max number of points per tile in the tile index\n tolerance: 3, // simplification tolerance (higher means simpler)\n extent: 4096, // tile extent\n buffer: 64, // tile buffer on each side\n lineMetrics: false, // whether to calculate line metrics\n promoteId: null, // name of a feature property to be promoted to feature.id\n generateId: false, // whether to generate feature ids. Cannot be used with promoteId\n debug: 0 // logging level (0, 1 or 2)\n};\n\nclass GeoJSONVT {\n constructor(data, options) {\n options = this.options = extend(Object.create(defaultOptions), options);\n\n const debug = options.debug;\n\n if (debug) console.time('preprocess data');\n\n if (options.maxZoom < 0 || options.maxZoom > 24) throw new Error('maxZoom should be in the 0-24 range');\n if (options.promoteId && options.generateId) throw new Error('promoteId and generateId cannot be used together.');\n\n // projects and adds simplification info\n let features = convert(data, options);\n\n // tiles and tileCoords are part of the public API\n this.tiles = {};\n this.tileCoords = [];\n\n if (debug) {\n console.timeEnd('preprocess data');\n console.log('index: maxZoom: %d, maxPoints: %d', options.indexMaxZoom, options.indexMaxPoints);\n console.time('generate tiles');\n this.stats = {};\n this.total = 0;\n }\n\n // wraps features (ie extreme west and extreme east)\n features = wrap(features, options);\n\n // start slicing from the top tile down\n if (features.length) this.splitTile(features, 0, 0, 0);\n\n if (debug) {\n if (features.length) console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints);\n console.timeEnd('generate tiles');\n console.log('tiles generated:', this.total, JSON.stringify(this.stats));\n }\n }\n\n // splits features from a parent tile to sub-tiles.\n // z, x, and y are the coordinates of the parent tile\n // cz, cx, and cy are the coordinates of the target tile\n //\n // If no target tile is specified, splitting stops when we reach the maximum\n // zoom or the number of points is low as specified in the options.\n splitTile(features, z, x, y, cz, cx, cy) {\n\n const stack = [features, z, x, y];\n const options = this.options;\n const debug = options.debug;\n\n // avoid recursion by using a processing queue\n while (stack.length) {\n y = stack.pop();\n x = stack.pop();\n z = stack.pop();\n features = stack.pop();\n\n const z2 = 1 << z;\n const id = toID(z, x, y);\n let tile = this.tiles[id];\n\n if (!tile) {\n if (debug > 1) console.time('creation');\n\n tile = this.tiles[id] = createTile(features, z, x, y, options);\n this.tileCoords.push({z, x, y});\n\n if (debug) {\n if (debug > 1) {\n console.log('tile z%d-%d-%d (features: %d, points: %d, simplified: %d)',\n z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified);\n console.timeEnd('creation');\n }\n const key = `z${ z}`;\n this.stats[key] = (this.stats[key] || 0) + 1;\n this.total++;\n }\n }\n\n // save reference to original geometry in tile so that we can drill down later if we stop now\n tile.source = features;\n\n // if it's the first-pass tiling\n if (cz == null) {\n // stop tiling if we reached max zoom, or if the tile is too simple\n if (z === options.indexMaxZoom || tile.numPoints <= options.indexMaxPoints) continue;\n // if a drilldown to a specific tile\n } else if (z === options.maxZoom || z === cz) {\n // stop tiling if we reached base zoom or our target tile zoom\n continue;\n } else if (cz != null) {\n // stop tiling if it's not an ancestor of the target tile\n const zoomSteps = cz - z;\n if (x !== cx >> zoomSteps || y !== cy >> zoomSteps) continue;\n }\n\n // if we slice further down, no need to keep source geometry\n tile.source = null;\n\n if (features.length === 0) continue;\n\n if (debug > 1) console.time('clipping');\n\n // values we'll use for clipping\n const k1 = 0.5 * options.buffer / options.extent;\n const k2 = 0.5 - k1;\n const k3 = 0.5 + k1;\n const k4 = 1 + k1;\n\n let tl = null;\n let bl = null;\n let tr = null;\n let br = null;\n\n let left = clip(features, z2, x - k1, x + k3, 0, tile.minX, tile.maxX, options);\n let right = clip(features, z2, x + k2, x + k4, 0, tile.minX, tile.maxX, options);\n features = null;\n\n if (left) {\n tl = clip(left, z2, y - k1, y + k3, 1, tile.minY, tile.maxY, options);\n bl = clip(left, z2, y + k2, y + k4, 1, tile.minY, tile.maxY, options);\n left = null;\n }\n\n if (right) {\n tr = clip(right, z2, y - k1, y + k3, 1, tile.minY, tile.maxY, options);\n br = clip(right, z2, y + k2, y + k4, 1, tile.minY, tile.maxY, options);\n right = null;\n }\n\n if (debug > 1) console.timeEnd('clipping');\n\n stack.push(tl || [], z + 1, x * 2, y * 2);\n stack.push(bl || [], z + 1, x * 2, y * 2 + 1);\n stack.push(tr || [], z + 1, x * 2 + 1, y * 2);\n stack.push(br || [], z + 1, x * 2 + 1, y * 2 + 1);\n }\n }\n\n getTile(z, x, y) {\n z = +z;\n x = +x;\n y = +y;\n\n const options = this.options;\n const {extent, debug} = options;\n\n if (z < 0 || z > 24) return null;\n\n const z2 = 1 << z;\n x = (x + z2) & (z2 - 1); // wrap tile x coordinate\n\n const id = toID(z, x, y);\n if (this.tiles[id]) return transform(this.tiles[id], extent);\n\n if (debug > 1) console.log('drilling down to z%d-%d-%d', z, x, y);\n\n let z0 = z;\n let x0 = x;\n let y0 = y;\n let parent;\n\n while (!parent && z0 > 0) {\n z0--;\n x0 = x0 >> 1;\n y0 = y0 >> 1;\n parent = this.tiles[toID(z0, x0, y0)];\n }\n\n if (!parent || !parent.source) return null;\n\n // if we found a parent tile containing the original geometry, we can drill down from it\n if (debug > 1) {\n console.log('found parent tile z%d-%d-%d', z0, x0, y0);\n console.time('drilling down');\n }\n this.splitTile(parent.source, z0, x0, y0, z, x, y);\n if (debug > 1) console.timeEnd('drilling down');\n\n return this.tiles[id] ? transform(this.tiles[id], extent) : null;\n }\n}\n\nfunction toID(z, x, y) {\n return (((1 << z) * y + x) * 32) + z;\n}\n\nfunction extend(dest, src) {\n for (const i in src) dest[i] = src[i];\n return dest;\n}\n\nexport default function geojsonvt(data, options) {\n return new GeoJSONVT(data, options);\n}\n","import {getJSON} from '../util/ajax';\nimport {RequestPerformance} from '../util/performance';\nimport rewind from '@mapbox/geojson-rewind';\nimport {GeoJSONWrapper} from '@maplibre/vt-pbf';\nimport {EXTENT} from '../data/extent';\nimport Supercluster, {type Options as SuperclusterOptions, type ClusterProperties} from 'supercluster';\nimport geojsonvt, {type Options as GeoJSONVTOptions} from 'geojson-vt';\nimport {VectorTileWorkerSource} from './vector_tile_worker_source';\nimport {createExpression} from '@maplibre/maplibre-gl-style-spec';\nimport {isAbortError} from '../util/abort_error';\nimport {toVirtualVectorTile} from './vector_tile_overzoomed';\nimport {type GeoJSONSourceDiff, applySourceDiff, toUpdateable, type GeoJSONFeatureId} from './geojson_source_diff';\nimport type {WorkerTileParameters, WorkerTileResult} from './worker_source';\nimport type {LoadVectorTileResult} from './vector_tile_worker_source';\nimport type {RequestParameters} from '../util/ajax';\nimport type {ClusterIDAndSource, GeoJSONWorkerSourceLoadDataResult, RemoveSourceParams} from '../util/actor_messages';\nimport type {IActor} from '../util/actor';\nimport type {StyleLayerIndex} from '../style/style_layer_index';\n\n/**\n * The geojson worker options that can be passed to the worker\n */\nexport type GeoJSONWorkerOptions = {\n source?: string;\n cluster?: boolean;\n geojsonVtOptions?: GeoJSONVTOptions;\n superclusterOptions?: SuperclusterOptions;\n clusterProperties?: ClusterProperties;\n filter?: Array;\n promoteId?: string;\n collectResourceTiming?: boolean;\n};\n\n/**\n * Parameters needed to load GeoJSON to the worker - must specify either a `request`, `data` or `dataDiff`.\n */\nexport type LoadGeoJSONParameters = GeoJSONWorkerOptions & {\n type: 'geojson';\n /**\n * Request parameters including a URL to fetch GeoJSON data.\n */\n request?: RequestParameters;\n /**\n * GeoJSON data to set as the source's data.\n */\n data?: GeoJSON.GeoJSON;\n /**\n * GeoJSONSourceDiff to apply to the existing GeoJSON source data.\n */\n dataDiff?: GeoJSONSourceDiff;\n};\n\ntype GeoJSONIndex = ReturnType | Supercluster;\n\n/**\n * The {@link WorkerSource} implementation that supports {@link GeoJSONSource}.\n * This class is designed to be easily reused to support custom source types\n * for data formats that can be parsed/converted into an in-memory GeoJSON\n * representation. To do so, create it with\n * `new GeoJSONWorkerSource(actor, layerIndex, customLoadGeoJSONFunction)`.\n * For a full example, see [mapbox-gl-topojson](https://github.com/developmentseed/mapbox-gl-topojson).\n */\nexport class GeoJSONWorkerSource extends VectorTileWorkerSource {\n /**\n * The actual GeoJSON takes some time to load (as there may be a need to parse a diff, or to apply filters, or the\n * data may even need to be loaded via a URL). This promise resolves with a ready-to-be-consumed GeoJSON which is\n * ready to be returned by the `getData` method.\n */\n _pendingData: Promise;\n _pendingRequest: AbortController;\n _geoJSONIndex: GeoJSONIndex;\n _dataUpdateable = new Map();\n _createGeoJSONIndex: typeof createGeoJSONIndex;\n\n constructor(actor: IActor, layerIndex: StyleLayerIndex, availableImages: Array, createGeoJSONIndexFunc: typeof createGeoJSONIndex = createGeoJSONIndex) {\n super(actor, layerIndex, availableImages);\n this._createGeoJSONIndex = createGeoJSONIndexFunc;\n }\n\n /**\n * Retrieves and sends loaded vector tiles to the main thread.\n */\n override async loadVectorTile(params: WorkerTileParameters, _abortController: AbortController): Promise {\n const canonical = params.tileID.canonical;\n\n if (!this._geoJSONIndex) {\n throw new Error('Unable to parse the data into a cluster or geojson');\n }\n\n const geoJSONTile = this._geoJSONIndex.getTile(canonical.z, canonical.x, canonical.y);\n if (!geoJSONTile) {\n return null;\n }\n\n const geojsonWrapper = new GeoJSONWrapper(geoJSONTile.features, {version: 2, extent: EXTENT});\n\n return toVirtualVectorTile(geojsonWrapper);\n }\n\n /**\n * Fetches (if appropriate), parses and indexes geojson data into tiles. This\n * preparatory method must be called before {@link GeoJSONWorkerSource.loadTile}\n * can correctly serve up tiles. The first call to this method must contain a valid\n * {@link params.data}, {@link params.request} or {@link params.dataDiff}. Subsequent\n * calls may omit these parameters to reprocess the existing data (such as to update\n * clustering options).\n *\n * Defers to {@link GeoJSONWorkerSource.loadAndProcessGeoJSON} for the pre-processing.\n *\n * When a `loadData` request comes in while a previous one is being processed,\n * the previous one is aborted.\n *\n * @param params - the parameters\n * @returns a promise that resolves when the data is loaded and parsed into a GeoJSON object\n */\n async loadData(params: LoadGeoJSONParameters): Promise {\n this._pendingRequest?.abort();\n\n const perf = this._startPerformance(params);\n this._pendingRequest = new AbortController();\n try {\n // Load and process the GeoJSON data if it hasn't been loaded yet or if the data is changed.\n if (!this._pendingData || params.request || params.data || params.dataDiff) {\n this._pendingData = this.loadAndProcessGeoJSON(params, this._pendingRequest);\n }\n\n const data = await this._pendingData;\n this._geoJSONIndex = this._createGeoJSONIndex(data, params);\n this.loaded = {};\n\n const result: GeoJSONWorkerSourceLoadDataResult = {};\n\n // Sending a large GeoJSON payload from the worker thread to the main thread\n // is SLOW so we only do it if absolutely nescessary.\n // The main thread already has a copy of this data UNLESS it was loaded\n // from a URL.\n if (params.request) result.data = data;\n\n this._finishPerformance(perf, params, result);\n return result;\n } catch (err) {\n delete this._pendingRequest;\n if (isAbortError(err)) return {abandoned: true};\n throw err;\n }\n }\n\n _startPerformance(params: LoadGeoJSONParameters): RequestPerformance | undefined {\n if (!params?.request?.collectResourceTiming) return;\n return new RequestPerformance(params.request);\n }\n\n _finishPerformance(perf: RequestPerformance, params: LoadGeoJSONParameters, result: GeoJSONWorkerSourceLoadDataResult): void {\n if (!perf) return;\n const resourceTimingData = perf.finish();\n // it's necessary to eval the result of getEntriesByName() here via parse/stringify\n // late evaluation in the main thread causes TypeError: illegal invocation\n if (resourceTimingData) {\n result.resourceTiming = {};\n result.resourceTiming[params.source] = JSON.parse(JSON.stringify(resourceTimingData));\n }\n }\n\n /**\n * Get the source's full GeoJSON data source.\n * @returns a promise which is resolved with the source's actual GeoJSON\n */\n async getData(): Promise {\n return this._pendingData;\n }\n\n /**\n * Implements {@link WorkerSource.reloadTile}.\n *\n * If the tile is loaded, uses the implementation in VectorTileWorkerSource.\n * Otherwise, such as after a setData() call, we load the tile fresh.\n *\n * @param params - the parameters\n * @returns A promise that resolves when the tile is reloaded\n */\n reloadTile(params: WorkerTileParameters): Promise {\n const loaded = this.loaded;\n const uid = params.uid;\n\n if (loaded && loaded[uid]) {\n return super.reloadTile(params);\n } else {\n return this.loadTile(params);\n }\n }\n\n /**\n * Fetch, parse and process GeoJSON according to the given parameters.\n * Defers to {@link GeoJSONWorkerSource._loadGeoJSONFromString} for the fetching and parsing.\n *\n * @param params - the parameters\n * @param abortController - the abort controller that allows aborting this operation\n * @returns a promise that is resolved with the processes GeoJSON\n */\n async loadAndProcessGeoJSON(params: LoadGeoJSONParameters, abortController: AbortController): Promise {\n let data: GeoJSON.GeoJSON;\n\n if (params.request) {\n // Data is loaded from a fetchable URL\n data = await this.loadGeoJSONFromUrl(params.request, params.promoteId, abortController);\n\n } else if (params.data) {\n // Data is loaded from a GeoJSON Object\n data = this._loadGeoJSONFromObject(params.data, params.promoteId);\n\n } else if (params.dataDiff) {\n // Data is loaded from a GeoJSONSourceDiff\n data = this._loadGeoJSONFromDiff(params.dataDiff, params.promoteId, params.source);\n }\n\n delete this._pendingRequest;\n\n if (typeof data !== 'object') {\n throw new Error(`Input data given to '${params.source}' is not a valid GeoJSON object.`);\n }\n\n // Generate winding-order compliant GeoJSON Polygon and MultiPolygon geometries\n rewind(data, true);\n\n if (params.filter) {\n data = this._filterGeoJSON(data, params.filter);\n }\n\n return data;\n }\n\n /**\n * Loads GeoJSON from a URL and sets the sources updateable GeoJSON object.\n */\n async loadGeoJSONFromUrl(request: RequestParameters, promoteId: string, abortController: AbortController): Promise {\n const response = await getJSON(request, abortController);\n this._dataUpdateable = toUpdateable(response.data, promoteId);\n return response.data;\n }\n\n /**\n * Loads GeoJSON from a string and sets the sources updateable GeoJSON object.\n */\n _loadGeoJSONFromObject(data: GeoJSON.GeoJSON, promoteId: string): GeoJSON.GeoJSON {\n this._dataUpdateable = toUpdateable(data, promoteId);\n return data;\n }\n\n /**\n * Loads GeoJSON from a GeoJSONSourceDiff and applies it to the existing source updateable GeoJSON object.\n */\n _loadGeoJSONFromDiff(dataDiff: GeoJSONSourceDiff, promoteId: string, source: string): GeoJSON.FeatureCollection {\n if (!this._dataUpdateable) {\n throw new Error(`Cannot update existing geojson data in ${source}`);\n }\n\n // Incrementally apply the diff to existing source data\n applySourceDiff(this._dataUpdateable, dataDiff, promoteId);\n\n const features = Array.from(this._dataUpdateable.values());\n return this._toFeatureCollection(features);\n }\n\n /**\n * Applies a filter to a GeoJSON object.\n */\n _filterGeoJSON(data: GeoJSON.GeoJSON, filter: Array): GeoJSON.FeatureCollection {\n const compiled = createExpression(filter, {type: 'boolean', 'property-type': 'data-driven', overridable: false, transition: false} as any);\n\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n\n const features = (data as any).features.filter(feature => compiled.value.evaluate({zoom: 0}, feature));\n return this._toFeatureCollection(features);\n }\n\n /**\n * Converts an array of GeoJSON features into a GeoJSON FeatureCollection.\n */\n _toFeatureCollection(features: Array): GeoJSON.FeatureCollection {\n return {type: 'FeatureCollection', features};\n }\n\n async removeSource(_params: RemoveSourceParams): Promise {\n if (this._pendingRequest) {\n this._pendingRequest.abort();\n }\n }\n\n getClusterExpansionZoom(params: ClusterIDAndSource): number {\n return (this._geoJSONIndex as Supercluster).getClusterExpansionZoom(params.clusterId);\n }\n\n getClusterChildren(params: ClusterIDAndSource): Array {\n return (this._geoJSONIndex as Supercluster).getChildren(params.clusterId);\n }\n\n getClusterLeaves(params: {\n clusterId: number;\n limit: number;\n offset: number;\n }): Array {\n return (this._geoJSONIndex as Supercluster).getLeaves(params.clusterId, params.limit, params.offset);\n }\n}\n\nexport function createGeoJSONIndex(data: GeoJSON.GeoJSON, params: LoadGeoJSONParameters): GeoJSONIndex {\n if (params.cluster) {\n return new Supercluster(getSuperclusterOptions(params)).load((data as any).features);\n }\n return geojsonvt(data, params.geojsonVtOptions);\n}\n\nfunction getSuperclusterOptions({superclusterOptions, clusterProperties}: LoadGeoJSONParameters) {\n if (!clusterProperties || !superclusterOptions) return superclusterOptions;\n\n const mapExpressions = {};\n const reduceExpressions = {};\n const globals = {accumulated: null, zoom: 0};\n const feature = {properties: null};\n const propertyNames = Object.keys(clusterProperties);\n\n for (const key of propertyNames) {\n const [operator, mapExpression] = clusterProperties[key];\n\n const mapExpressionParsed = createExpression(mapExpression);\n const reduceExpressionParsed = createExpression(\n typeof operator === 'string' ? [operator, ['accumulated'], ['get', key]] : operator);\n\n mapExpressions[key] = mapExpressionParsed.value;\n reduceExpressions[key] = reduceExpressionParsed.value;\n }\n\n superclusterOptions.map = (pointProperties) => {\n feature.properties = pointProperties;\n const properties = {};\n for (const key of propertyNames) {\n properties[key] = mapExpressions[key].evaluate(globals, feature);\n }\n return properties;\n };\n superclusterOptions.reduce = (accumulated, clusterProperties) => {\n feature.properties = clusterProperties;\n for (const key of propertyNames) {\n globals.accumulated = accumulated[key];\n accumulated[key] = reduceExpressions[key].evaluate(globals, feature);\n }\n };\n\n return superclusterOptions;\n}\n","import {Actor, type ActorTarget, type IActor} from '../util/actor';\nimport {StyleLayerIndex} from '../style/style_layer_index';\nimport {VectorTileWorkerSource} from './vector_tile_worker_source';\nimport {RasterDEMTileWorkerSource} from './raster_dem_tile_worker_source';\nimport {rtlWorkerPlugin, type RTLTextPlugin} from './rtl_text_plugin_worker';\nimport {GeoJSONWorkerSource, type LoadGeoJSONParameters} from './geojson_worker_source';\nimport {isWorker} from '../util/util';\nimport {addProtocol, removeProtocol} from './protocol_crud';\nimport {type PluginState} from './rtl_text_plugin_status';\nimport type {\n WorkerSource,\n WorkerSourceConstructor,\n WorkerTileParameters,\n WorkerDEMTileParameters,\n TileParameters\n} from '../source/worker_source';\n\nimport type {WorkerGlobalScopeInterface} from '../util/web_worker';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {\n MessageType,\n type ClusterIDAndSource,\n type GetClusterLeavesParams,\n type RemoveSourceParams,\n type UpdateLayersParameters\n} from '../util/actor_messages';\n\n/**\n * The Worker class responsible for background thread related execution\n */\nexport default class Worker {\n self: WorkerGlobalScopeInterface & ActorTarget;\n actor: Actor;\n layerIndexes: {[_: string]: StyleLayerIndex};\n availableImages: {[_: string]: Array};\n externalWorkerSourceTypes: { [_: string]: WorkerSourceConstructor };\n /**\n * This holds a cache for the already created worker source instances.\n * The cache is build with the following hierarchy:\n * [mapId][sourceType][sourceName]: worker source instance\n * sourceType can be 'vector' for example\n */\n workerSources: {\n [_: string]: {\n [_: string]: {\n [_: string]: WorkerSource;\n };\n };\n };\n /**\n * This holds a cache for the already created DEM worker source instances.\n * The cache is build with the following hierarchy:\n * [mapId][sourceType]: DEM worker source instance\n * sourceType can be 'raster-dem' for example\n */\n demWorkerSources: {\n [_: string]: {\n [_: string]: RasterDEMTileWorkerSource;\n };\n };\n referrer: string;\n globalStates: Map>;\n\n constructor(self: WorkerGlobalScopeInterface & ActorTarget) {\n this.self = self;\n this.actor = new Actor(self);\n\n this.layerIndexes = {};\n this.availableImages = {};\n\n this.workerSources = {};\n this.demWorkerSources = {};\n this.externalWorkerSourceTypes = {};\n\n this.globalStates = new Map>();\n\n this.self.registerWorkerSource = (name: string, WorkerSource: WorkerSourceConstructor) => {\n if (this.externalWorkerSourceTypes[name]) {\n throw new Error(`Worker source with name \"${name}\" already registered.`);\n }\n this.externalWorkerSourceTypes[name] = WorkerSource;\n };\n\n this.self.addProtocol = addProtocol;\n this.self.removeProtocol = removeProtocol;\n\n // This is invoked by the RTL text plugin when the download via the `importScripts` call has finished, and the code has been parsed.\n this.self.registerRTLTextPlugin = (rtlTextPlugin: RTLTextPlugin) => {\n\n rtlWorkerPlugin.setMethods(rtlTextPlugin);\n };\n\n this.actor.registerMessageHandler(MessageType.loadDEMTile, (mapId: string, params: WorkerDEMTileParameters) => {\n return this._getDEMWorkerSource(mapId, params.source).loadTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.removeDEMTile, async (mapId: string, params: TileParameters) => {\n this._getDEMWorkerSource(mapId, params.source).removeTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.getClusterExpansionZoom, async (mapId: string, params: ClusterIDAndSource) => {\n return (this._getWorkerSource(mapId, params.type, params.source) as GeoJSONWorkerSource).getClusterExpansionZoom(params);\n });\n\n this.actor.registerMessageHandler(MessageType.getClusterChildren, async (mapId: string, params: ClusterIDAndSource) => {\n return (this._getWorkerSource(mapId, params.type, params.source) as GeoJSONWorkerSource).getClusterChildren(params);\n });\n\n this.actor.registerMessageHandler(MessageType.getClusterLeaves, async (mapId: string, params: GetClusterLeavesParams) => {\n return (this._getWorkerSource(mapId, params.type, params.source) as GeoJSONWorkerSource).getClusterLeaves(params);\n });\n\n this.actor.registerMessageHandler(MessageType.loadData, (mapId: string, params: LoadGeoJSONParameters) => {\n return (this._getWorkerSource(mapId, params.type, params.source) as GeoJSONWorkerSource).loadData(params);\n });\n\n this.actor.registerMessageHandler(MessageType.getData, (mapId: string, params: LoadGeoJSONParameters) => {\n return (this._getWorkerSource(mapId, params.type, params.source) as GeoJSONWorkerSource).getData();\n });\n\n this.actor.registerMessageHandler(MessageType.loadTile, (mapId: string, params: WorkerTileParameters) => {\n return this._getWorkerSource(mapId, params.type, params.source).loadTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.reloadTile, (mapId: string, params: WorkerTileParameters) => {\n return this._getWorkerSource(mapId, params.type, params.source).reloadTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.abortTile, (mapId: string, params: TileParameters) => {\n return this._getWorkerSource(mapId, params.type, params.source).abortTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.removeTile, (mapId: string, params: TileParameters) => {\n return this._getWorkerSource(mapId, params.type, params.source).removeTile(params);\n });\n\n this.actor.registerMessageHandler(MessageType.removeSource, async (mapId: string, params: RemoveSourceParams) => {\n if (!this.workerSources[mapId] ||\n !this.workerSources[mapId][params.type] ||\n !this.workerSources[mapId][params.type][params.source]) {\n return;\n }\n\n const worker = this.workerSources[mapId][params.type][params.source];\n delete this.workerSources[mapId][params.type][params.source];\n\n if (worker.removeSource !== undefined) {\n worker.removeSource(params);\n }\n });\n\n this.actor.registerMessageHandler(MessageType.removeMap, async (mapId: string) => {\n delete this.layerIndexes[mapId];\n delete this.availableImages[mapId];\n delete this.workerSources[mapId];\n delete this.demWorkerSources[mapId];\n this.globalStates.delete(mapId);\n });\n\n this.actor.registerMessageHandler(MessageType.setReferrer, async (_mapId: string, params: string) => {\n this.referrer = params;\n });\n\n this.actor.registerMessageHandler(MessageType.syncRTLPluginState, (mapId: string, params: PluginState) => {\n return this._syncRTLPluginState(mapId, params);\n });\n\n this.actor.registerMessageHandler(MessageType.importScript, async (_mapId: string, params: string) => {\n this.self.importScripts(params);\n });\n\n this.actor.registerMessageHandler(MessageType.setImages, (mapId: string, params: string[]) => {\n return this._setImages(mapId, params);\n });\n\n this.actor.registerMessageHandler(MessageType.updateLayers, async (mapId: string, params: UpdateLayersParameters) => {\n this._getLayerIndex(mapId).update(params.layers, params.removedIds, this._getGlobalState(mapId));\n });\n\n this.actor.registerMessageHandler(MessageType.updateGlobalState, async (mapId: string, params: Record) => {\n const globalState = this._getGlobalState(mapId);\n for (const key in params) {\n globalState[key] = params[key];\n }\n });\n\n this.actor.registerMessageHandler(MessageType.setLayers, async (mapId: string, params: Array) => {\n this._getLayerIndex(mapId).replace(params, this._getGlobalState(mapId));\n });\n }\n\n private _getGlobalState(mapId: string): Record {\n let state = this.globalStates.get(mapId);\n if (!state) {\n state = {};\n this.globalStates.set(mapId, state);\n }\n return state;\n }\n\n private async _setImages(mapId: string, images: Array): Promise {\n this.availableImages[mapId] = images;\n for (const workerSource in this.workerSources[mapId]) {\n const ws = this.workerSources[mapId][workerSource];\n for (const source in ws) {\n ws[source].availableImages = images;\n }\n }\n }\n\n private async _syncRTLPluginState(mapId: string, incomingState: PluginState): Promise {\n const state = await rtlWorkerPlugin.syncState(incomingState, this.self.importScripts);\n return state;\n }\n\n private _getAvailableImages(mapId: string) {\n let availableImages = this.availableImages[mapId];\n\n if (!availableImages) {\n availableImages = [];\n }\n\n return availableImages;\n }\n\n private _getLayerIndex(mapId: string) {\n let layerIndexes = this.layerIndexes[mapId];\n if (!layerIndexes) {\n layerIndexes = this.layerIndexes[mapId] = new StyleLayerIndex();\n }\n return layerIndexes;\n }\n\n /**\n * This is basically a lazy initialization of a worker per mapId and sourceType and sourceName\n * @param mapId - the mapId\n * @param sourceType - the source type - 'vector' for example\n * @param sourceName - the source name - 'osm' for example\n * @returns a new instance or a cached one\n */\n private _getWorkerSource(mapId: string, sourceType: string, sourceName: string): WorkerSource {\n if (!this.workerSources[mapId])\n this.workerSources[mapId] = {};\n if (!this.workerSources[mapId][sourceType])\n this.workerSources[mapId][sourceType] = {};\n\n if (!this.workerSources[mapId][sourceType][sourceName]) {\n // use a wrapped actor so that we can attach a target mapId param\n // to any messages invoked by the WorkerSource, this is very important when there are multiple maps\n const actor: IActor = {\n sendAsync: (message, abortController) => {\n message.targetMapId = mapId;\n return this.actor.sendAsync(message, abortController);\n }\n };\n switch (sourceType) {\n case 'vector':\n this.workerSources[mapId][sourceType][sourceName] = new VectorTileWorkerSource(actor, this._getLayerIndex(mapId), this._getAvailableImages(mapId));\n break;\n case 'geojson':\n this.workerSources[mapId][sourceType][sourceName] = new GeoJSONWorkerSource(actor, this._getLayerIndex(mapId), this._getAvailableImages(mapId));\n break;\n default:\n this.workerSources[mapId][sourceType][sourceName] = new (this.externalWorkerSourceTypes[sourceType])(actor, this._getLayerIndex(mapId), this._getAvailableImages(mapId));\n break;\n }\n }\n\n return this.workerSources[mapId][sourceType][sourceName];\n }\n\n /**\n * This is basically a lazy initialization of a worker per mapId and source\n * @param mapId - the mapId\n * @param sourceType - the source type - 'raster-dem' for example\n * @returns a new instance or a cached one\n */\n private _getDEMWorkerSource(mapId: string, sourceType: string) {\n if (!this.demWorkerSources[mapId])\n this.demWorkerSources[mapId] = {};\n\n if (!this.demWorkerSources[mapId][sourceType]) {\n this.demWorkerSources[mapId][sourceType] = new RasterDEMTileWorkerSource();\n }\n\n return this.demWorkerSources[mapId][sourceType];\n }\n}\n\nif (isWorker(self)) {\n self.worker = new Worker(self);\n}\n","import * as glMatrix from \"./common.js\";\n\n/**\n * 2x2 Matrix\n * @module mat2\n */\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n\n/**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\nexport function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n\n/**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\nexport function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n return out;\n}\n\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2 | null} out, or null if source matrix is not invertible\n */\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n\n // Calculate the determinant\n var det = a0 * a3 - a2 * a1;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\n\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\nexport function adjoint(out, a) {\n // Caching this value is necessary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\n\n/**\n * Calculates the determinant of a mat2\n *\n * @param {ReadonlyMat2} a the source matrix\n * @returns {Number} determinant of a\n */\nexport function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\n\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\n\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\n\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\n\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2} out\n */\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\n\n/**\n * Returns a string representation of a mat2\n *\n * @param {ReadonlyMat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nexport function str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nexport function frob(a) {\n return Math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3]);\n}\n\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {ReadonlyMat2} L the lower triangular matrix\n * @param {ReadonlyMat2} D the diagonal matrix\n * @param {ReadonlyMat2} U the upper triangular matrix\n * @param {ReadonlyMat2} a the input matrix to factorize\n */\n\nexport function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n}\n\n/**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n\n/**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\nexport var mul = multiply;\n\n/**\n * Alias for {@link mat2.subtract}\n * @function\n */\nexport var sub = subtract;","import {AbortError} from './abort_error';\nimport {subscribe} from './util';\n\nlet linkEl;\n\nlet reducedMotionQuery: MediaQueryList;\nlet reducedMotionOverride: boolean | undefined;\n\n/** */\nexport const browser = {\n frame(abortController: AbortController, fn: (paintStartTimestamp: number) => void, reject: (error: Error) => void): void {\n const frameId = requestAnimationFrame((paintStartTimestamp)=>{\n unsubscribe();\n fn(paintStartTimestamp);\n });\n\n const {unsubscribe} = subscribe(abortController.signal, 'abort', () => {\n unsubscribe();\n cancelAnimationFrame(frameId);\n reject(new AbortError(abortController.signal.reason));\n }, false);\n },\n\n frameAsync(abortController: AbortController): Promise {\n return new Promise((resolve, reject) => {\n this.frame(abortController, resolve, reject);\n });\n },\n\n getImageData(img: HTMLImageElement | ImageBitmap, padding: number = 0): ImageData {\n const context = this.getImageCanvasContext(img);\n return context.getImageData(-padding, -padding, img.width as number + 2 * padding, img.height as number + 2 * padding);\n },\n\n getImageCanvasContext(img: HTMLImageElement | ImageBitmap): CanvasRenderingContext2D {\n const canvas = window.document.createElement('canvas') as HTMLCanvasElement;\n const context = canvas.getContext('2d', {willReadFrequently: true});\n if (!context) {\n throw new Error('failed to create canvas 2d context');\n }\n canvas.width = img.width as number;\n canvas.height = img.height as number;\n context.drawImage(img, 0, 0, img.width as number, img.height as number);\n return context;\n },\n\n resolveURL(path: string) {\n if (!linkEl) linkEl = document.createElement('a');\n linkEl.href = path;\n return linkEl.href;\n },\n\n hardwareConcurrency: typeof navigator !== 'undefined' && navigator.hardwareConcurrency || 4,\n\n get prefersReducedMotion(): boolean {\n if (reducedMotionOverride !== undefined) return reducedMotionOverride;\n // In case your test crashes when checking matchMedia, call setMatchMedia from 'src/util/test/util'\n if (!matchMedia) return false;\n //Lazily initialize media query\n if (reducedMotionQuery == null) {\n reducedMotionQuery = matchMedia('(prefers-reduced-motion: reduce)');\n }\n return reducedMotionQuery.matches;\n },\n\n set prefersReducedMotion(value: boolean) {\n reducedMotionOverride = value;\n }\n};\n","/**\n * Manages time flow with optional freezing capability for deterministic rendering.\n */\nclass TimeManager {\n private _realTime = typeof performance !== 'undefined' && performance && performance.now ?\n performance.now.bind(performance) :\n Date.now.bind(Date);\n\n private _frozenAt: number | null = null;\n\n /**\n * Gets the current time, either real or frozen.\n * @returns Current time in milliseconds\n */\n getCurrentTime(): number {\n return this._frozenAt !== null ? this._frozenAt : this._realTime();\n }\n\n /**\n * Sets time at a specific timestamp.\n * @param timestamp - Time in milliseconds to set\n */\n setNow(timestamp: number): void {\n this._frozenAt = timestamp;\n }\n\n /**\n * Restores normal time flow.\n */\n restoreNow(): void {\n this._frozenAt = null;\n }\n\n /**\n * Returns whether time is currently frozen.\n * @returns True if time is frozen, false otherwise\n */\n isFrozen(): boolean {\n return this._frozenAt !== null;\n }\n}\n\nconst timeManager = new TimeManager();\n\n/**\n * Returns the current time in milliseconds.\n * When time is frozen via setNow(), returns the frozen timestamp.\n * Otherwise returns real browser time (performance.now() or Date.now()).\n *\n * @returns Current time in milliseconds\n * @example\n * ```ts\n * // Measure elapsed time\n * const start = maplibregl.now();\n * // ... later ...\n * const elapsed = maplibregl.now() - start;\n *\n * // During frozen time\n * maplibregl.setNow(16.67);\n * console.log(maplibregl.now()); // 16.67\n * maplibregl.restoreNow();\n * console.log(maplibregl.now()); // real time\n * ```\n */\nexport function now(): number {\n return timeManager.getCurrentTime();\n}\n\n/**\n * Freezes time at a specific timestamp for deterministic rendering.\n * Useful for frame-by-frame video capture where each frame needs\n * a consistent time value.\n *\n * @param timestamp - Time in milliseconds to freeze at\n * @example\n * ```ts\n * // Freeze time for video export at 60fps\n * setNow(0); // First frame\n * // ... render frame ...\n * setNow(16.67); // Second frame\n * // ... render frame ...\n * setNow(33.34); // Third frame\n * // ... done ...\n * restoreNow(); // Resume normal time\n * ```\n */\nexport function setNow(timestamp: number): void {\n timeManager.setNow(timestamp);\n}\n\n/**\n * Restores normal time flow after freezing with setNow().\n * Call this after finishing deterministic rendering operations.\n *\n * @example\n * ```ts\n * // After video export, resume normal time\n * setNow(0);\n * // ... export frames ...\n * restoreNow(); // Map animations resume normally\n * ```\n */\nexport function restoreNow(): void {\n timeManager.restoreNow();\n}\n\n/**\n * Returns whether time is currently frozen.\n * @returns True if time is frozen via setNow(), false otherwise\n * @example\n * ```ts\n * setNow(1000);\n * console.log(isTimeFrozen()); // true\n * restoreNow();\n * console.log(isTimeFrozen()); // false\n * ```\n */\nexport function isTimeFrozen(): boolean {\n return timeManager.isFrozen();\n}","import Point from '@mapbox/point-geometry';\n\ntype ScaleReturnValue = {\n x: number;\n y: number;\n boundingClientRect: DOMRect;\n};\n\nexport class DOM {\n private static readonly docStyle = typeof window !== 'undefined' && window.document && window.document.documentElement.style;\n\n private static userSelect: string;\n\n private static selectProp = DOM.testProp(['userSelect', 'MozUserSelect', 'WebkitUserSelect', 'msUserSelect']);\n\n private static transformProp = DOM.testProp(['transform', 'WebkitTransform']);\n\n private static testProp(props: string[]): string {\n if (!DOM.docStyle) return props[0];\n for (let i = 0; i < props.length; i++) {\n if (props[i] in DOM.docStyle) {\n return props[i];\n }\n }\n return props[0];\n }\n\n public static create(tagName: K, className?: string, container?: HTMLElement): HTMLElementTagNameMap[K] {\n const el = window.document.createElement(tagName);\n if (className !== undefined) el.className = className;\n if (container) container.appendChild(el);\n return el;\n }\n\n public static createNS(namespaceURI: string, tagName: string) {\n const el = window.document.createElementNS(namespaceURI, tagName);\n return el;\n }\n\n public static disableDrag() {\n if (DOM.docStyle && DOM.selectProp) {\n DOM.userSelect = DOM.docStyle[DOM.selectProp];\n DOM.docStyle[DOM.selectProp] = 'none';\n }\n }\n\n public static enableDrag() {\n if (DOM.docStyle && DOM.selectProp) {\n DOM.docStyle[DOM.selectProp] = DOM.userSelect;\n }\n }\n\n public static setTransform(el: HTMLElement, value: string) {\n el.style[DOM.transformProp] = value;\n }\n\n public static addEventListener(target: HTMLElement | Window | Document, type: string, callback: EventListenerOrEventListenerObject, options: {\n passive?: boolean;\n capture?: boolean;\n } = {}) {\n if ('passive' in options) {\n target.addEventListener(type, callback, options);\n } else {\n target.addEventListener(type, callback, options.capture);\n }\n }\n\n public static removeEventListener(target: HTMLElement | Window | Document, type: string, callback: EventListenerOrEventListenerObject, options: {\n passive?: boolean;\n capture?: boolean;\n } = {}) {\n if ('passive' in options) {\n target.removeEventListener(type, callback, options);\n } else {\n target.removeEventListener(type, callback, options.capture);\n }\n }\n\n // Suppress the next click, but only if it's immediate.\n private static suppressClickInternal(e) {\n e.preventDefault();\n e.stopPropagation();\n window.removeEventListener('click', DOM.suppressClickInternal, true);\n }\n\n public static suppressClick() {\n window.addEventListener('click', DOM.suppressClickInternal, true);\n window.setTimeout(() => {\n window.removeEventListener('click', DOM.suppressClickInternal, true);\n }, 0);\n }\n\n private static getScale(element: HTMLElement): ScaleReturnValue {\n const rect = element.getBoundingClientRect();\n return {\n x: (rect.width / element.offsetWidth) || 1,\n y: (rect.height / element.offsetHeight) || 1,\n boundingClientRect: rect,\n };\n }\n\n private static getPoint(el: HTMLElement, scale: ScaleReturnValue, e: MouseEvent | Touch): Point {\n const rect = scale.boundingClientRect;\n return new Point(\n // rect.left/top values are in page scale (like clientX/Y),\n // whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\n ((e.clientX - rect.left) / scale.x) - el.clientLeft,\n ((e.clientY - rect.top) / scale.y) - el.clientTop\n );\n }\n\n public static mousePos(el: HTMLElement, e: MouseEvent | Touch): Point {\n const scale = DOM.getScale(el);\n return DOM.getPoint(el, scale, e);\n }\n\n public static touchPos(el: HTMLElement, touches: TouchList) {\n const points: Point[] = [];\n const scale = DOM.getScale(el);\n for (let i = 0; i < touches.length; i++) {\n points.push(DOM.getPoint(el, scale, touches[i]));\n }\n return points;\n }\n\n public static mouseButton(e: MouseEvent) {\n return e.button;\n }\n\n public static remove(node: HTMLElement) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n\n /**\n * Sanitize an HTML string - this might not be enough to prevent all XSS attacks\n * Base on https://javascriptsource.com/sanitize-an-html-string-to-reduce-the-risk-of-xss-attacks/\n * (c) 2021 Chris Ferdinandi, MIT License, https://gomakethings.com\n */\n public static sanitize(str: string): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(str, 'text/html');\n const html = doc.body || document.createElement('body');\n const scripts = html.querySelectorAll('script');\n for (const script of scripts) {\n script.remove();\n }\n\n DOM.clean(html);\n\n return html.innerHTML;\n }\n\n /**\n * Check if the attribute is potentially dangerous\n */\n private static isPossiblyDangerous(name: string, value: string): boolean {\n const val = value.replace(/\\s+/g, '').toLowerCase();\n if (['src', 'href', 'xlink:href'].includes(name)) {\n if (val.includes('javascript:') || val.includes('data:')) return true;\n }\n if (name.startsWith('on')) return true;\n }\n\n /**\n\t * Remove dangerous stuff from the HTML document's nodes\n\t * @param html - The HTML document\n\t */\n private static clean(html: Element) {\n const nodes = html.children;\n for (const node of nodes) {\n DOM.removeAttributes(node);\n DOM.clean(node);\n }\n }\n\n /**\n\t * Remove potentially dangerous attributes from an element\n\t * @param elem - The element\n\t */\n private static removeAttributes(elem: Element) {\n for (const {name, value} of elem.attributes) {\n if (!DOM.isPossiblyDangerous(name, value)) continue;\n elem.removeAttribute(name);\n }\n }\n}\n","export const webpSupported = {\n supported: false,\n testSupport\n};\n\nlet glForTesting: WebGLRenderingContext|WebGL2RenderingContext;\nlet webpCheckComplete = false;\nlet webpImgTest;\nlet webpImgTestOnloadComplete = false;\n\nif (typeof document !== 'undefined') {\n webpImgTest = document.createElement('img');\n webpImgTest.onload = () => {\n if (glForTesting) testWebpTextureUpload(glForTesting);\n glForTesting = null;\n webpImgTestOnloadComplete = true;\n };\n webpImgTest.onerror = () => {\n webpCheckComplete = true;\n glForTesting = null;\n };\n webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=';\n}\n\nfunction testSupport(gl: WebGLRenderingContext | WebGL2RenderingContext) {\n if (webpCheckComplete || !webpImgTest) return;\n\n // HTMLImageElement.complete is set when an image is done loading it's source\n // regardless of whether the load was successful or not.\n // It's possible for an error to set HTMLImageElement.complete to true which would trigger\n // testWebpTextureUpload and mistakenly set exported.supported to true in browsers which don't support webp\n // To avoid this, we set a flag in the image's onload handler and only call testWebpTextureUpload\n // after a successful image load event.\n if (webpImgTestOnloadComplete) {\n testWebpTextureUpload(gl);\n } else {\n glForTesting = gl;\n\n }\n}\n\nfunction testWebpTextureUpload(gl: WebGLRenderingContext|WebGL2RenderingContext) {\n // Edge 18 supports WebP but not uploading a WebP image to a gl texture\n // Test support for this before allowing WebP images.\n // https://github.com/mapbox/mapbox-gl-js/issues/7671\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n try {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, webpImgTest);\n\n // The error does not get triggered in Edge if the context is lost\n if (gl.isContextLost()) return;\n\n webpSupported.supported = true;\n } catch {\n // Catch \"Unspecified Error.\" in Edge 18.\n }\n\n gl.deleteTexture(texture);\n\n webpCheckComplete = true;\n}\n","import {type RequestParameters, makeRequest, sameOrigin, type GetResourceResponse} from './ajax';\nimport {arrayBufferToImageBitmap, arrayBufferToImage, extend, isWorker, isImageBitmap} from './util';\nimport {webpSupported} from './webp_supported';\nimport {config} from './config';\nimport {AbortError} from './abort_error';\nimport {getProtocol} from '../source/protocol_crud';\n\ntype ImageQueueThrottleControlCallback = () => boolean;\n\nexport type ImageRequestQueueItem = {\n requestParameters: RequestParameters;\n supportImageRefresh: boolean;\n state: 'queued' | 'running' | 'completed';\n abortController: AbortController;\n onError: (error: Error) => void;\n onSuccess: (response: GetResourceResponse) => void;\n};\n\ntype ImageQueueThrottleCallbackDictionary = {\n [Key: number]: ImageQueueThrottleControlCallback;\n};\n\ntype HTMLImageElementWithPriority = HTMLImageElement &\n{\n // fetchPriority is experimental property supported on Chromium browsers from Version 102\n // By default images are downloaded with priority low, whereas fetch request downloads with priority high\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchPriority\n fetchPriority?: 'auto' | 'high' | 'low';\n};\n\n/**\n * By default, the image queue is self driven, meaning as soon as one requested item is processed,\n * it will move on to next one as quickly as it can while limiting\n * the number of concurrent requests to MAX_PARALLEL_IMAGE_REQUESTS. The default behavior\n * ensures that static views of the map can be rendered with minimal delay.\n *\n * However, the default behavior can prevent dynamic views of the map from rendering\n * smoothly in that many requests can finish in one render frame, putting too much pressure on GPU.\n *\n * When the view of the map is moving dynamically, smoother frame rates can be achieved\n * by throttling the number of items processed by the queue per frame. This can be\n * accomplished by using {@link addThrottleControl} to allow the caller to\n * use a lambda function to determine when the queue should be throttled (e.g. when isMoving())\n * and manually calling {@link processQueue} in the render loop.\n */\nexport namespace ImageRequest {\n let imageRequestQueue : ImageRequestQueueItem[];\n let currentParallelImageRequests:number;\n\n let throttleControlCallbackHandleCounter: number;\n let throttleControlCallbacks: ImageQueueThrottleCallbackDictionary;\n\n /**\n * Reset the image request queue, removing all pending requests.\n */\n export const resetRequestQueue = (): void => {\n imageRequestQueue = [];\n currentParallelImageRequests = 0;\n throttleControlCallbackHandleCounter = 0;\n throttleControlCallbacks = {};\n };\n\n /**\n * Install a callback to control when image queue throttling is desired.\n * (e.g. when the map view is moving)\n * @param callback - The callback function to install\n * @returns handle that identifies the installed callback.\n */\n export const addThrottleControl = (callback: ImageQueueThrottleControlCallback): number => {\n const handle = throttleControlCallbackHandleCounter++;\n throttleControlCallbacks[handle] = callback;\n return handle;\n };\n\n /**\n * Remove a previously installed callback by passing in the handle returned\n * by {@link addThrottleControl}.\n * @param callbackHandle - The handle for the callback to remove.\n */\n export const removeThrottleControl = (callbackHandle: number): void => {\n delete throttleControlCallbacks[callbackHandle];\n // Try updating the queue\n processQueue();\n };\n\n /**\n * Check to see if any of the installed callbacks are requesting the queue\n * to be throttled.\n * @returns `true` if any callback is causing the queue to be throttled.\n */\n const isThrottled = (): boolean => {\n for (const key of Object.keys(throttleControlCallbacks)) {\n if (throttleControlCallbacks[key]()) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Request to load an image.\n * @param requestParameters - Request parameters.\n * @param abortController - allows to abort the request.\n * @param supportImageRefresh - `true`, if the image request need to support refresh based on cache headers.\n * @returns - A promise resolved when the image is loaded.\n */\n export const getImage = (requestParameters: RequestParameters, abortController: AbortController, supportImageRefresh: boolean = true): Promise> => {\n return new Promise>((resolve, reject) => {\n if (webpSupported.supported) {\n if (!requestParameters.headers) {\n requestParameters.headers = {};\n }\n requestParameters.headers.accept = 'image/webp,*/*';\n }\n extend(requestParameters, {type: 'image'});\n const request: ImageRequestQueueItem = {\n abortController,\n requestParameters,\n supportImageRefresh,\n state: 'queued',\n onError: (error: Error) => {\n reject(error);\n },\n onSuccess: (response) => {\n resolve(response);\n }\n };\n\n imageRequestQueue.push(request);\n processQueue();\n });\n };\n\n const arrayBufferToCanvasImageSource = (data: ArrayBuffer): Promise => {\n const imageBitmapSupported = typeof createImageBitmap === 'function';\n if (imageBitmapSupported) {\n return arrayBufferToImageBitmap(data);\n } else {\n return arrayBufferToImage(data);\n }\n };\n\n const doImageRequest = async (itemInQueue: ImageRequestQueueItem) => {\n itemInQueue.state = 'running';\n const {requestParameters, supportImageRefresh, onError, onSuccess, abortController} = itemInQueue;\n // - If refreshExpiredTiles is false, then we can use HTMLImageElement to download raster images.\n // - Fetch/XHR (via MakeRequest API) will be used to download images for following scenarios:\n // 1. Style image sprite will had a issue with HTMLImageElement as described\n // here: https://github.com/mapbox/mapbox-gl-js/issues/1470\n // 2. If refreshExpiredTiles is true (default), then in order to read the image cache header,\n // fetch/XHR request will be required\n // - For any special case handling like use of AddProtocol, worker initiated request or additional headers\n // let makeRequest handle it.\n // - HtmlImageElement request automatically adds accept header for all the browser supported images\n const canUseHTMLImageElement = supportImageRefresh === false &&\n !isWorker(self) &&\n !getProtocol(requestParameters.url) &&\n (!requestParameters.headers ||\n Object.keys(requestParameters.headers).reduce((acc, item) => acc && item === 'accept', true));\n\n currentParallelImageRequests++;\n\n const getImagePromise = canUseHTMLImageElement ?\n getImageUsingHtmlImage(requestParameters, abortController) :\n makeRequest(requestParameters, abortController);\n\n try {\n const response = await getImagePromise;\n delete itemInQueue.abortController;\n itemInQueue.state = 'completed';\n if (response.data instanceof HTMLImageElement || isImageBitmap(response.data)) {\n // User using addProtocol can directly return HTMLImageElement/ImageBitmap type\n // If HtmlImageElement is used to get image then response type will be HTMLImageElement\n onSuccess(response as GetResourceResponse);\n } else if (response.data) {\n const img = await arrayBufferToCanvasImageSource(response.data);\n onSuccess({data: img, cacheControl: response.cacheControl, expires: response.expires});\n }\n } catch (err) {\n delete itemInQueue.abortController;\n onError(err);\n } finally {\n currentParallelImageRequests--;\n processQueue();\n }\n };\n\n /**\n * Process some number of items in the image request queue.\n */\n const processQueue = (): void => {\n\n const maxImageRequests = isThrottled() ?\n config.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME :\n config.MAX_PARALLEL_IMAGE_REQUESTS;\n\n // limit concurrent image loads to help with raster sources performance on big screens\n for (let numImageRequests = currentParallelImageRequests;\n numImageRequests < maxImageRequests && imageRequestQueue.length > 0;\n numImageRequests++) {\n\n const topItemInQueue: ImageRequestQueueItem = imageRequestQueue.shift();\n if (topItemInQueue.abortController.signal.aborted) {\n numImageRequests--;\n continue;\n }\n doImageRequest(topItemInQueue);\n }\n };\n\n const getImageUsingHtmlImage = (requestParameters: RequestParameters, abortController: AbortController): Promise> => {\n return new Promise>((resolve, reject) => {\n\n const image = new Image() as HTMLImageElementWithPriority;\n const url = requestParameters.url;\n const credentials = requestParameters.credentials;\n if (credentials && credentials === 'include') {\n image.crossOrigin = 'use-credentials';\n } else if ((credentials && credentials === 'same-origin') || !sameOrigin(url)) {\n image.crossOrigin = 'anonymous';\n }\n\n abortController.signal.addEventListener('abort', () => {\n // Set src to '' to actually cancel the request\n image.src = '';\n reject(new AbortError(abortController.signal.reason));\n });\n\n image.fetchPriority = 'high';\n image.onload = () => {\n image.onerror = image.onload = null;\n resolve({data: image});\n };\n image.onerror = () => {\n image.onerror = image.onload = null;\n if (abortController.signal.aborted) {\n return;\n }\n reject(new Error('Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.'));\n };\n image.src = url;\n });\n };\n}\n\nImageRequest.resetRequestQueue();\n","import type {RequestParameters} from './ajax';\n\n/**\n * A type of MapLibre resource.\n */\nexport const enum ResourceType {\n Glyphs = 'Glyphs',\n Image = 'Image',\n Source = 'Source',\n SpriteImage = 'SpriteImage',\n SpriteJSON = 'SpriteJSON',\n Style = 'Style',\n Tile = 'Tile',\n Unknown = 'Unknown',\n}\n\n/**\n * This function is used to tranform a request.\n * It is used just before executing the relevant request.\n */\nexport type RequestTransformFunction = (url: string, resourceType?: ResourceType) => RequestParameters | undefined;\n\nexport class RequestManager {\n _transformRequestFn: RequestTransformFunction | null;\n\n constructor(transformRequestFn?: RequestTransformFunction | null) {\n this._transformRequestFn = transformRequestFn ?? null;\n }\n\n transformRequest(url: string, type: ResourceType) {\n if (this._transformRequestFn) {\n return this._transformRequestFn(url, type) || {url};\n }\n\n return {url};\n }\n\n setTransformRequest(transformRequest: RequestTransformFunction | null) {\n this._transformRequestFn = transformRequest;\n }\n}\n\n","import type {SpriteSpecification} from '@maplibre/maplibre-gl-style-spec';\n\n/**\n * Takes a SpriteSpecification value and returns it in its array form. If `undefined` is passed as an input value, an\n * empty array is returned.\n * duplicated entries with identical id/url will be removed in returned array\n * @param sprite - optional sprite to coerce\n * @returns an empty array in case `undefined` is passed; id-url pairs otherwise\n */\nexport function coerceSpriteToArray(sprite?: SpriteSpecification): {id: string; url: string}[] {\n const resultArray: {id: string; url: string}[] = [];\n\n if (typeof sprite === 'string') {\n resultArray.push({id: 'default', url: sprite});\n } else if (sprite && sprite.length > 0) {\n const dedupArray: string[] = [];\n for (const {id, url} of sprite) {\n const key = `${id}${url}`;\n if (dedupArray.indexOf(key) === -1) {\n dedupArray.push(key);\n resultArray.push({id, url});\n }\n }\n }\n\n return resultArray;\n\n}\n","import {type GetResourceResponse, getJSON} from '../util/ajax';\nimport {ImageRequest} from '../util/image_request';\nimport {ResourceType} from '../util/request_manager';\n\nimport {browser} from '../util/browser';\nimport {coerceSpriteToArray} from '../util/style';\n\nimport type {SpriteSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {SpriteJSON, StyleImage} from './style_image';\nimport type {RequestManager} from '../util/request_manager';\n\nexport type LoadSpriteResult = {\n [spriteName: string]: {\n [id: string]: StyleImage;\n };\n};\n\nexport function normalizeSpriteURL(url: string, format: string, extension: string): string {\n try {\n const parsed = new URL(url);\n parsed.pathname += `${format}${extension}`;\n return parsed.toString();\n }\n catch {\n throw new Error(`Invalid sprite URL \"${url}\", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`);\n }\n}\n\nexport async function loadSprite(\n originalSprite: SpriteSpecification,\n requestManager: RequestManager,\n pixelRatio: number,\n abortController: AbortController,\n): Promise {\n const spriteArray = coerceSpriteToArray(originalSprite);\n const format = pixelRatio > 1 ? '@2x' : '';\n\n const jsonsMap: {[id: string]: Promise>} = {};\n const imagesMap: {[id: string]: Promise>} = {};\n\n for (const {id, url} of spriteArray) {\n const jsonRequestParameters = requestManager.transformRequest(normalizeSpriteURL(url, format, '.json'), ResourceType.SpriteJSON);\n jsonsMap[id] = getJSON(jsonRequestParameters, abortController);\n\n const imageRequestParameters = requestManager.transformRequest(normalizeSpriteURL(url, format, '.png'), ResourceType.SpriteImage);\n imagesMap[id] = ImageRequest.getImage(imageRequestParameters, abortController);\n }\n\n await Promise.all([...Object.values(jsonsMap), ...Object.values(imagesMap)]);\n return doOnceCompleted(jsonsMap, imagesMap);\n}\n\n/**\n * @param jsonsMap - JSON data map\n * @param imagesMap - image data map\n */\nasync function doOnceCompleted(\n jsonsMap:{[id: string]: Promise>},\n imagesMap:{[id: string]: Promise>}): Promise {\n\n const result = {} as {[spriteName: string]: {[id: string]: StyleImage}};\n for (const spriteName in jsonsMap) {\n result[spriteName] = {};\n\n const context = browser.getImageCanvasContext((await imagesMap[spriteName]).data);\n const json = (await jsonsMap[spriteName]).data;\n\n for (const id in json) {\n const {width, height, x, y, sdf, pixelRatio, stretchX, stretchY, content, textFitWidth, textFitHeight} = json[id];\n const spriteData = {width, height, x, y, context};\n result[spriteName][id] = {data: null, pixelRatio, sdf, stretchX, stretchY, content, textFitWidth, textFitHeight, spriteData};\n }\n }\n\n return result;\n}\n","import {type RGBAImage} from '../util/image';\n\nimport type {Map} from '../ui/map';\n\nexport type SpriteJSON = {[id: string]: StyleImageMetadata & {\n width: number;\n height: number;\n x: number;\n y: number;\n};};\n\n/**\n * The sprite data\n */\nexport type SpriteOnDemandStyleImage = {\n width: number;\n height: number;\n x: number;\n y: number;\n context: CanvasRenderingContext2D;\n};\n\n/**\n * The style's image metadata\n */\nexport type StyleImageData = {\n data: RGBAImage;\n version?: number;\n hasRenderCallback?: boolean;\n userImage?: StyleImageInterface;\n spriteData?: SpriteOnDemandStyleImage;\n};\n\n/**\n * Enumeration of possible values for StyleImageMetadata.textFitWidth and textFitHeight.\n */\nexport const enum TextFit {\n /**\n * The image will be resized on the specified axis to tightly fit the content rectangle to target text.\n * This is the same as not being defined.\n */\n stretchOrShrink = 'stretchOrShrink',\n /**\n * The image will be resized on the specified axis to fit the content rectangle to the target text, but will not\n * fall below the aspect ratio of the original content rectangle if the other axis is set to proportional.\n */\n stretchOnly = 'stretchOnly',\n /**\n * The image will be resized on the specified axis to fit the content rectangle to the target text and\n * will resize the other axis to maintain the aspect ratio of the content rectangle.\n */\n proportional = 'proportional'\n}\n\n/**\n * The style's image metadata\n */\nexport type StyleImageMetadata = {\n /**\n * The ratio of pixels in the image to physical pixels on the screen\n */\n pixelRatio: number;\n /**\n * Whether the image should be interpreted as an SDF image\n */\n sdf: boolean;\n /**\n * If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched horizontally.\n */\n stretchX?: Array<[number, number]>;\n /**\n * If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched vertically.\n */\n stretchY?: Array<[number, number]>;\n /**\n * If `icon-text-fit` is used in a layer with this image, this option defines the part of the image that can be covered by the content in `text-field`.\n */\n content?: [number, number, number, number];\n /**\n * If `icon-text-fit` is used in a layer with this image, this option defines constraints on the horizontal scaling of the image.\n */\n textFitWidth?: TextFit;\n /**\n * If `icon-text-fit` is used in a layer with this image, this option defines constraints on the vertical scaling of the image.\n */\n textFitHeight?: TextFit;\n};\n\n/**\n * the style's image, including data and metedata\n */\nexport type StyleImage = StyleImageData & StyleImageMetadata;\n\n/**\n * Interface for dynamically generated style images. This is a specification for\n * implementers to model: it is not an exported method or class.\n *\n * Images implementing this interface can be redrawn for every frame. They can be used to animate\n * icons and patterns or make them respond to user input. Style images can implement a\n * {@link StyleImageInterface.render} method. The method is called every frame and\n * can be used to update the image.\n *\n * @see [Add an animated icon to the map.](https://maplibre.org/maplibre-gl-js/docs/examples/add-image-animated/)\n *\n * @example\n * ```ts\n * let flashingSquare = {\n * width: 64,\n * height: 64,\n * data: new Uint8Array(64 * 64 * 4),\n *\n * onAdd: function(map) {\n * this.map = map;\n * },\n *\n * render: function() {\n * // keep repainting while the icon is on the map\n * this.map.triggerRepaint();\n *\n * // alternate between black and white based on the time\n * let value = Math.round(Date.now() / 1000) % 2 === 0 ? 255 : 0;\n *\n * // check if image needs to be changed\n * if (value !== this.previousValue) {\n * this.previousValue = value;\n *\n * let bytesPerPixel = 4;\n * for (let x = 0; x < this.width; x++) {\n * for (let y = 0; y < this.height; y++) {\n * let offset = (y * this.width + x) * bytesPerPixel;\n * this.data[offset + 0] = value;\n * this.data[offset + 1] = value;\n * this.data[offset + 2] = value;\n * this.data[offset + 3] = 255;\n * }\n * }\n *\n * // return true to indicate that the image changed\n * return true;\n * }\n * }\n * }\n *\n * map.addImage('flashing_square', flashingSquare);\n * ```\n */\n\nexport interface StyleImageInterface {\n width: number;\n height: number;\n data: Uint8Array | Uint8ClampedArray;\n /**\n * This method is called once before every frame where the icon will be used.\n * The method can optionally update the image's `data` member with a new image.\n *\n * If the method updates the image it must return `true` to commit the change.\n * If the method returns `false` or nothing the image is assumed to not have changed.\n *\n * If updates are infrequent it maybe easier to use {@link Map.updateImage} to update\n * the image instead of implementing this method.\n *\n * @returns `true` if this method updated the image. `false` if the image was not changed.\n */\n render?: () => boolean;\n /**\n * Optional method called when the layer has been added to the Map with {@link Map.addImage}.\n *\n * @param map - The Map this custom layer was just added to.\n */\n onAdd?: (map: Map, id: string) => void;\n /**\n * Optional method called when the icon is removed from the map with {@link Map.removeImage}.\n * This gives the image a chance to clean up resources and event listeners.\n */\n onRemove?: () => void;\n}\n\nexport function renderStyleImage(image: StyleImage) {\n const {userImage} = image;\n if (userImage && userImage.render) {\n const updated = userImage.render();\n if (updated) {\n image.data.replace(new Uint8Array(userImage.data.buffer));\n return true;\n }\n }\n return false;\n}\n","/* eslint-disable key-spacing */\nimport potpack from 'potpack';\n\nimport {Event, ErrorEvent, Evented} from '../util/evented';\nimport {RGBAImage} from '../util/image';\nimport {ImagePosition} from './image_atlas';\nimport {Texture} from './texture';\nimport {renderStyleImage} from '../style/style_image';\nimport {warnOnce} from '../util/util';\n\nimport type {StyleImage} from '../style/style_image';\nimport type {Context} from '../gl/context';\nimport type {PotpackBox} from 'potpack';\nimport type {GetImagesResponse} from '../util/actor_messages';\n\ntype Pattern = {\n bin: PotpackBox;\n position: ImagePosition;\n};\n\n/**\n * When copied into the atlas texture, image data is padded by one pixel on each side. Icon\n * images are padded with fully transparent pixels, while pattern images are padded with a\n * copy of the image data wrapped from the opposite side. In both cases, this ensures the\n * correct behavior of GL_LINEAR texture sampling mode.\n */\nconst padding = 1;\n\n/**\n * ImageManager does three things:\n *\n * 1. Tracks requests for icon images from tile workers and sends responses when the requests are fulfilled.\n * 2. Builds a texture atlas for pattern images.\n * 3. Rerenders renderable images once per frame\n *\n * These are disparate responsibilities and should eventually be handled by different classes. When we implement\n * data-driven support for `*-pattern`, we'll likely use per-bucket pattern atlases, and that would be a good time\n * to refactor this.\n*/\nexport class ImageManager extends Evented {\n images: {[_: string]: StyleImage};\n updatedImages: {[_: string]: boolean};\n callbackDispatchedThisFrame: {[_: string]: boolean};\n loaded: boolean;\n /**\n * This is used to track requests for images that are not yet available. When the image is loaded,\n * the requestors will be notified.\n */\n requestors: Array<{\n ids: Array;\n promiseResolve: (value: GetImagesResponse) => void;\n }>;\n\n patterns: {[_: string]: Pattern};\n atlasImage: RGBAImage;\n atlasTexture: Texture;\n dirty: boolean;\n\n constructor() {\n super();\n this.images = {};\n this.updatedImages = {};\n this.callbackDispatchedThisFrame = {};\n this.loaded = false;\n this.requestors = [];\n\n this.patterns = {};\n this.atlasImage = new RGBAImage({width: 1, height: 1});\n this.dirty = true;\n }\n\n destroy() {\n // Destroy atlas texture if it exists\n if (this.atlasTexture) {\n this.atlasTexture.destroy();\n this.atlasTexture = null;\n }\n // Remove all images and patterns\n for (const id of Object.keys(this.images)) {\n this.removeImage(id);\n }\n\n this.patterns = {};\n this.atlasImage = new RGBAImage({width: 1, height: 1});\n this.dirty = true;\n }\n isLoaded() {\n return this.loaded;\n }\n\n setLoaded(loaded: boolean) {\n if (this.loaded === loaded) {\n return;\n }\n\n this.loaded = loaded;\n\n if (loaded) {\n for (const {ids, promiseResolve} of this.requestors) {\n promiseResolve(this._getImagesForIds(ids));\n }\n this.requestors = [];\n }\n }\n\n getImage(id: string): StyleImage {\n const image = this.images[id];\n // Extract sprite image data on demand\n if (image && !image.data && image.spriteData) {\n const spriteData = image.spriteData;\n image.data = new RGBAImage({\n width: spriteData.width,\n height: spriteData.height\n }, spriteData.context.getImageData(\n spriteData.x,\n spriteData.y,\n spriteData.width,\n spriteData.height).data);\n image.spriteData = null;\n }\n\n return image;\n }\n\n addImage(id: string, image: StyleImage) {\n if (this.images[id]) throw new Error(`Image id ${id} already exist, use updateImage instead`);\n if (this._validate(id, image)) {\n this.images[id] = image;\n }\n }\n\n _validate(id: string, image: StyleImage) {\n let valid = true;\n const data = image.data || image.spriteData;\n if (!this._validateStretch(image.stretchX, data && data.width)) {\n this.fire(new ErrorEvent(new Error(`Image \"${id}\" has invalid \"stretchX\" value`)));\n valid = false;\n }\n if (!this._validateStretch(image.stretchY, data && data.height)) {\n this.fire(new ErrorEvent(new Error(`Image \"${id}\" has invalid \"stretchY\" value`)));\n valid = false;\n }\n if (!this._validateContent(image.content, image)) {\n this.fire(new ErrorEvent(new Error(`Image \"${id}\" has invalid \"content\" value`)));\n valid = false;\n }\n return valid;\n }\n\n _validateStretch(stretch: Array<[number, number]>, size: number) {\n if (!stretch) return true;\n let last = 0;\n for (const part of stretch) {\n if (part[0] < last || part[1] < part[0] || size < part[1]) return false;\n last = part[1];\n }\n return true;\n }\n\n _validateContent(content: [number, number, number, number], image: StyleImage) {\n if (!content) return true;\n if (content.length !== 4) return false;\n const spriteData = image.spriteData;\n const width = (spriteData && spriteData.width) || image.data.width;\n const height = (spriteData && spriteData.height) || image.data.height;\n if (content[0] < 0 || width < content[0]) return false;\n if (content[1] < 0 || height < content[1]) return false;\n if (content[2] < 0 || width < content[2]) return false;\n if (content[3] < 0 || height < content[3]) return false;\n if (content[2] < content[0]) return false;\n if (content[3] < content[1]) return false;\n return true;\n }\n\n updateImage(id: string, image: StyleImage, validate = true) {\n const oldImage = this.getImage(id);\n if (validate && (oldImage.data.width !== image.data.width || oldImage.data.height !== image.data.height)) {\n throw new Error(`size mismatch between old image (${oldImage.data.width}x${oldImage.data.height}) and new image (${image.data.width}x${image.data.height}).`);\n }\n image.version = oldImage.version + 1;\n this.images[id] = image;\n this.updatedImages[id] = true;\n }\n\n removeImage(id: string) {\n const image = this.images[id];\n delete this.images[id];\n delete this.patterns[id];\n\n if (image.userImage && image.userImage.onRemove) {\n image.userImage.onRemove();\n }\n }\n\n listImages(): Array {\n return Object.keys(this.images);\n }\n\n getImages(ids: Array): Promise {\n return new Promise((resolve, _reject) => {\n // If the sprite has been loaded, or if all the icon dependencies are already present\n // (i.e. if they've been added via runtime styling), then notify the requestor immediately.\n // Otherwise, delay notification until the sprite is loaded. At that point, if any of the\n // dependencies are still unavailable, we'll just assume they are permanently missing.\n let hasAllDependencies = true;\n if (!this.isLoaded()) {\n for (const id of ids) {\n if (!this.images[id]) {\n hasAllDependencies = false;\n }\n }\n }\n if (this.isLoaded() || hasAllDependencies) {\n resolve(this._getImagesForIds(ids));\n } else {\n this.requestors.push({ids, promiseResolve: resolve});\n }\n });\n }\n\n _getImagesForIds(ids: Array): GetImagesResponse {\n const response: GetImagesResponse = {};\n\n for (const id of ids) {\n let image = this.getImage(id);\n\n if (!image) {\n this.fire(new Event('styleimagemissing', {id}));\n //Try to acquire image again in case styleimagemissing has populated it\n image = this.getImage(id);\n }\n\n if (image) {\n // Clone the image so that our own copy of its ArrayBuffer doesn't get transferred.\n response[id] = {\n data: image.data.clone(),\n pixelRatio: image.pixelRatio,\n sdf: image.sdf,\n version: image.version,\n stretchX: image.stretchX,\n stretchY: image.stretchY,\n content: image.content,\n textFitWidth: image.textFitWidth,\n textFitHeight: image.textFitHeight,\n hasRenderCallback: Boolean(image.userImage && image.userImage.render)\n };\n } else {\n warnOnce(`Image \"${id}\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.`);\n }\n }\n return response;\n }\n\n // Pattern stuff\n\n getPixelSize() {\n const {width, height} = this.atlasImage;\n return {width, height};\n }\n\n getPattern(id: string): ImagePosition {\n const pattern = this.patterns[id];\n\n const image = this.getImage(id);\n if (!image) {\n return null;\n }\n\n if (pattern && pattern.position.version === image.version) {\n return pattern.position;\n }\n\n if (!pattern) {\n const w = image.data.width + padding * 2;\n const h = image.data.height + padding * 2;\n const bin = {w, h, x: 0, y: 0};\n const position = new ImagePosition(bin, image);\n this.patterns[id] = {bin, position};\n } else {\n pattern.position.version = image.version;\n }\n\n this._updatePatternAtlas();\n\n return this.patterns[id].position;\n }\n\n bind(context: Context) {\n const gl = context.gl;\n if (!this.atlasTexture) {\n this.atlasTexture = new Texture(context, this.atlasImage, gl.RGBA);\n } else if (this.dirty) {\n this.atlasTexture.update(this.atlasImage);\n this.dirty = false;\n }\n\n this.atlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n }\n\n _updatePatternAtlas() {\n const bins = [];\n for (const id in this.patterns) {\n bins.push(this.patterns[id].bin);\n }\n\n const {w, h} = potpack(bins);\n\n const dst = this.atlasImage;\n dst.resize({width: w || 1, height: h || 1});\n\n for (const id in this.patterns) {\n const {bin} = this.patterns[id];\n const x = bin.x + padding;\n const y = bin.y + padding;\n const src = this.getImage(id).data;\n const w = src.width;\n const h = src.height;\n\n RGBAImage.copy(src, dst, {x: 0, y: 0}, {x, y}, {width: w, height: h});\n\n // Add 1 pixel wrapped padding on each side of the image.\n RGBAImage.copy(src, dst, {x: 0, y: h - 1}, {x, y: y - 1}, {width: w, height: 1}); // T\n RGBAImage.copy(src, dst, {x: 0, y: 0}, {x, y: y + h}, {width: w, height: 1}); // B\n RGBAImage.copy(src, dst, {x: w - 1, y: 0}, {x: x - 1, y}, {width: 1, height: h}); // L\n RGBAImage.copy(src, dst, {x: 0, y: 0}, {x: x + w, y}, {width: 1, height: h}); // R\n }\n\n this.dirty = true;\n }\n\n beginFrame() {\n this.callbackDispatchedThisFrame = {};\n }\n\n dispatchRenderCallbacks(ids: Array) {\n for (const id of ids) {\n\n // the callback for the image was already dispatched for a different frame\n if (this.callbackDispatchedThisFrame[id]) continue;\n this.callbackDispatchedThisFrame[id] = true;\n\n const image = this.getImage(id);\n if (!image) warnOnce(`Image with ID: \"${id}\" was not found`);\n\n const updated = renderStyleImage(image);\n if (updated) {\n this.updateImage(id, image);\n }\n }\n }\n\n cloneImages() {\n const clonedImages: Record = {};\n for (const id in this.images) {\n const image = this.images[id];\n clonedImages[id] = {\n ...image,\n data: image.data ? image.data.clone() : null\n };\n }\n return clonedImages;\n }\n}\n","const INF = 1e20;\n\nexport default class TinySDF {\n constructor({\n fontSize = 24,\n buffer = 3,\n radius = 8,\n cutoff = 0.25,\n fontFamily = 'sans-serif',\n fontWeight = 'normal',\n fontStyle = 'normal',\n lang = null\n } = {}) {\n this.buffer = buffer;\n this.cutoff = cutoff;\n this.radius = radius;\n this.lang = lang;\n\n // make the canvas size big enough to both have the specified buffer around the glyph\n // for \"halo\", and account for some glyphs possibly being larger than their font size\n const size = this.size = fontSize + buffer * 4;\n\n const canvas = this._createCanvas(size);\n const ctx = this.ctx = canvas.getContext('2d', {willReadFrequently: true});\n ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`;\n\n ctx.textBaseline = 'alphabetic';\n ctx.textAlign = 'left'; // Necessary so that RTL text doesn't have different alignment\n ctx.fillStyle = 'black';\n\n // temporary arrays for the distance transform\n this.gridOuter = new Float64Array(size * size);\n this.gridInner = new Float64Array(size * size);\n this.f = new Float64Array(size);\n this.z = new Float64Array(size + 1);\n this.v = new Uint16Array(size);\n }\n\n _createCanvas(size) {\n const canvas = document.createElement('canvas');\n canvas.width = canvas.height = size;\n return canvas;\n }\n\n draw(char) {\n const {\n width: glyphAdvance,\n actualBoundingBoxAscent,\n actualBoundingBoxDescent,\n actualBoundingBoxLeft,\n actualBoundingBoxRight\n } = this.ctx.measureText(char);\n\n // The integer/pixel part of the top alignment is encoded in metrics.glyphTop\n // The remainder is implicitly encoded in the rasterization\n const glyphTop = Math.ceil(actualBoundingBoxAscent);\n const glyphLeft = 0;\n\n // If the glyph overflows the canvas size, it will be clipped at the bottom/right\n const glyphWidth = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(actualBoundingBoxRight - actualBoundingBoxLeft)));\n const glyphHeight = Math.min(this.size - this.buffer, glyphTop + Math.ceil(actualBoundingBoxDescent));\n\n const width = glyphWidth + 2 * this.buffer;\n const height = glyphHeight + 2 * this.buffer;\n\n const len = Math.max(width * height, 0);\n const data = new Uint8ClampedArray(len);\n const glyph = {data, width, height, glyphWidth, glyphHeight, glyphTop, glyphLeft, glyphAdvance};\n if (glyphWidth === 0 || glyphHeight === 0) return glyph;\n\n const {ctx, buffer, gridInner, gridOuter} = this;\n if (this.lang) ctx.lang = this.lang;\n ctx.clearRect(buffer, buffer, glyphWidth, glyphHeight);\n ctx.fillText(char, buffer, buffer + glyphTop);\n const imgData = ctx.getImageData(buffer, buffer, glyphWidth, glyphHeight);\n\n // Initialize grids outside the glyph range to alpha 0\n gridOuter.fill(INF, 0, len);\n gridInner.fill(0, 0, len);\n\n for (let y = 0; y < glyphHeight; y++) {\n for (let x = 0; x < glyphWidth; x++) {\n const a = imgData.data[4 * (y * glyphWidth + x) + 3] / 255; // alpha value\n if (a === 0) continue; // empty pixels\n\n const j = (y + buffer) * width + x + buffer;\n\n if (a === 1) { // fully drawn pixels\n gridOuter[j] = 0;\n gridInner[j] = INF;\n\n } else { // aliased pixels\n const d = 0.5 - a;\n gridOuter[j] = d > 0 ? d * d : 0;\n gridInner[j] = d < 0 ? d * d : 0;\n }\n }\n }\n\n edt(gridOuter, 0, 0, width, height, width, this.f, this.v, this.z);\n edt(gridInner, buffer, buffer, glyphWidth, glyphHeight, width, this.f, this.v, this.z);\n\n for (let i = 0; i < len; i++) {\n const d = Math.sqrt(gridOuter[i]) - Math.sqrt(gridInner[i]);\n data[i] = Math.round(255 - 255 * (d / this.radius + this.cutoff));\n }\n\n return glyph;\n }\n}\n\n// 2D Euclidean squared distance transform by Felzenszwalb & Huttenlocher https://cs.brown.edu/~pff/papers/dt-final.pdf\nfunction edt(data, x0, y0, width, height, gridSize, f, v, z) {\n for (let x = x0; x < x0 + width; x++) edt1d(data, y0 * gridSize + x, gridSize, height, f, v, z);\n for (let y = y0; y < y0 + height; y++) edt1d(data, y * gridSize + x0, 1, width, f, v, z);\n}\n\n// 1D squared distance transform\nfunction edt1d(grid, offset, stride, length, f, v, z) {\n v[0] = 0;\n z[0] = -INF;\n z[1] = INF;\n f[0] = grid[offset];\n\n for (let q = 1, k = 0, s = 0; q < length; q++) {\n f[q] = grid[offset + q * stride];\n const q2 = q * q;\n do {\n const r = v[k];\n s = (f[q] - f[r] + q2 - r * r) / (q - r) / 2;\n } while (s <= z[k] && --k > -1);\n\n k++;\n v[k] = q;\n z[k] = s;\n z[k + 1] = INF;\n }\n\n for (let q = 0, k = 0; q < length; q++) {\n while (z[k + 1] < q) k++;\n const r = v[k];\n const qr = q - r;\n grid[offset + q * stride] = f[r] + qr * qr;\n }\n}\n","import {loadGlyphRange} from '../style/load_glyph_range';\n\nimport TinySDF from '@mapbox/tiny-sdf';\nimport {codePointUsesLocalIdeographFontFamily} from '../util/unicode_properties.g';\nimport {AlphaImage} from '../util/image';\nimport {warnOnce} from '../util/util';\n\nimport type {StyleGlyph} from '../style/style_glyph';\nimport type {RequestManager} from '../util/request_manager';\nimport type {GetGlyphsResponse} from '../util/actor_messages';\n\nimport {v8} from '@maplibre/maplibre-gl-style-spec';\n\ntype Entry = {\n // null means we've requested the range, but the glyph wasn't included in the result.\n glyphs: {\n [id: number]: StyleGlyph | null;\n };\n requests: {\n [range: number]: Promise<{[_: number]: StyleGlyph | null}>;\n };\n ranges: {\n [range: number]: boolean | null;\n };\n tinySDF?: TinySDF;\n ideographTinySDF?: TinySDF;\n};\n\n/**\n * The style specification hard-codes some last resort fonts as a default fontstack.\n */\nconst defaultStack = v8.layout_symbol['text-font'].default.join(',');\n/**\n * The CSS generic font family closest to `defaultStack`.\n */\nconst defaultGenericFontFamily = 'sans-serif';\n\n/**\n * Scale factor for client-generated glyphs.\n *\n * Client-generated glyphs are rendered at 2× because CJK glyphs are more detailed than others.\n */\nconst textureScale = 2;\n\nexport class GlyphManager {\n requestManager: RequestManager;\n localIdeographFontFamily: string | false;\n entries: {[stack: string]: Entry};\n url: string;\n lang?: string;\n\n // exposed as statics to enable stubbing in unit tests\n static loadGlyphRange = loadGlyphRange;\n static TinySDF = TinySDF;\n\n constructor(requestManager: RequestManager, localIdeographFontFamily?: string | false, lang?: string) {\n this.requestManager = requestManager;\n this.localIdeographFontFamily = localIdeographFontFamily;\n this.entries = {};\n this.lang = lang;\n }\n\n setURL(url?: string | null) {\n this.url = url;\n }\n\n async getGlyphs(glyphs: {[stack: string]: Array}): Promise {\n const glyphsPromises: Promise<{stack: string; id: number; glyph: StyleGlyph}>[] = [];\n\n for (const stack in glyphs) {\n for (const id of glyphs[stack]) {\n glyphsPromises.push(this._getAndCacheGlyphsPromise(stack, id));\n }\n }\n\n const updatedGlyphs = await Promise.all(glyphsPromises);\n\n const result: GetGlyphsResponse = {};\n\n for (const {stack, id, glyph} of updatedGlyphs) {\n if (!result[stack]) {\n result[stack] = {};\n }\n // Clone the glyph so that our own copy of its ArrayBuffer doesn't get transferred.\n result[stack][id] = glyph && {\n id: glyph.id,\n bitmap: glyph.bitmap.clone(),\n metrics: glyph.metrics\n };\n }\n\n return result;\n }\n\n async _getAndCacheGlyphsPromise(stack: string, id: number): Promise<{stack: string; id: number; glyph: StyleGlyph}> {\n // Create an entry for this fontstack if it doesn’t already exist.\n let entry = this.entries[stack];\n if (!entry) {\n entry = this.entries[stack] = {\n glyphs: {},\n requests: {},\n ranges: {}\n };\n }\n\n // Try to get the glyph from the cache of client-side glyphs by codepoint.\n let glyph = entry.glyphs[id];\n if (glyph !== undefined) {\n return {stack, id, glyph};\n }\n\n // If the style hasn’t opted into server-side fonts or this codepoint is CJK, draw the glyph locally and cache it.\n if (!this.url || this._charUsesLocalIdeographFontFamily(id)) {\n glyph = entry.glyphs[id] = this._drawGlyph(entry, stack, id);\n return {stack, id, glyph};\n }\n\n return await this._downloadAndCacheRangePromise(stack, id);\n }\n\n async _downloadAndCacheRangePromise(stack: string, id: number): Promise<{stack: string; id: number; glyph: StyleGlyph}> {\n // Try to get the glyph from the cache of server-side glyphs by PBF range.\n const entry = this.entries[stack];\n const range = Math.floor(id / 256);\n if (entry.ranges[range]) {\n return {stack, id, glyph: null};\n }\n\n // Start downloading this range unless we’re currently downloading it.\n if (!entry.requests[range]) {\n const promise = GlyphManager.loadGlyphRange(stack, range, this.url, this.requestManager);\n entry.requests[range] = promise;\n }\n\n try {\n // Get the response and cache the glyphs from it.\n const response = await entry.requests[range];\n for (const id in response) {\n entry.glyphs[+id] = response[+id];\n }\n entry.ranges[range] = true;\n return {stack, id, glyph: response[id] || null};\n } catch (e) {\n // Fall back to drawing the glyph locally and caching it.\n const glyph = entry.glyphs[id] = this._drawGlyph(entry, stack, id);\n this._warnOnMissingGlyphRange(glyph, range, id, e);\n return {stack, id, glyph};\n }\n }\n\n _warnOnMissingGlyphRange(glyph: StyleGlyph, range: number, id: number, err: Error) {\n const begin = range * 256;\n const end = begin + 255;\n const codePoint = id.toString(16).padStart(4, '0').toUpperCase();\n warnOnce(`Unable to load glyph range ${range}, ${begin}-${end}. Rendering codepoint U+${codePoint} locally instead. ${err}`);\n }\n\n /**\n * Returns whether the given codepoint should be rendered locally.\n */\n _charUsesLocalIdeographFontFamily(id: number): boolean {\n return !!this.localIdeographFontFamily && codePointUsesLocalIdeographFontFamily(id);\n }\n\n /**\n * Draws a glyph offscreen using TinySDF, creating a TinySDF instance lazily.\n */\n _drawGlyph(entry: Entry, stack: string, id: number): StyleGlyph {\n // The CJK fallback font specified by the developer takes precedence over the last resort fontstack in the style specification.\n const usesLocalIdeographFontFamily = stack === defaultStack && this.localIdeographFontFamily !== '' && this._charUsesLocalIdeographFontFamily(id);\n\n // Keep a separate TinySDF instance for when we need to apply the localIdeographFontFamily fallback to keep the font selection from bleeding into non-CJK text.\n const tinySDFKey = usesLocalIdeographFontFamily ? 'ideographTinySDF' : 'tinySDF';\n entry[tinySDFKey] ||= this._createTinySDF(usesLocalIdeographFontFamily ? this.localIdeographFontFamily : stack);\n const char = entry[tinySDFKey].draw(String.fromCodePoint(id));\n\n /**\n * TinySDF's \"top\" is the distance from the alphabetic baseline to the top of the glyph.\n * Server-generated fonts specify \"top\" relative to an origin above the em box (the origin\n * comes from FreeType, but I'm unclear on exactly how it's derived)\n * ref: https://github.com/mapbox/sdf-glyph-foundry\n *\n * Server fonts don't yet include baseline information, so we can't line up exactly with them\n * (and they don't line up with each other)\n * ref: https://github.com/mapbox/node-fontnik/pull/160\n *\n * To approximately align TinySDF glyphs with server-provided glyphs, we use this baseline adjustment\n * factor calibrated to be in between DIN Pro and Arial Unicode (but closer to Arial Unicode)\n */\n const topAdjustment = 27.5;\n\n const leftAdjustment = 0.5;\n\n return {\n id,\n bitmap: new AlphaImage({width: char.width || 30 * textureScale, height: char.height || 30 * textureScale}, char.data),\n metrics: {\n width: char.glyphWidth / textureScale || 24,\n height: char.glyphHeight / textureScale || 24,\n left: (char.glyphLeft / textureScale + leftAdjustment) || 0,\n top: char.glyphTop / textureScale - topAdjustment || -8,\n advance: char.glyphAdvance / textureScale || 24,\n isDoubleResolution: true\n }\n };\n }\n\n _createTinySDF(stack: String | false): TinySDF {\n // Escape and quote the font family list for use in CSS.\n const fontFamilies = stack ? stack.split(',') : [];\n fontFamilies.push(defaultGenericFontFamily);\n const fontFamily = fontFamilies.map(fontName =>\n /[-\\w]+/.test(fontName) ? fontName : `'${CSS.escape(fontName)}'`\n ).join(',');\n\n return new GlyphManager.TinySDF({\n fontSize: 24 * textureScale,\n buffer: 3 * textureScale,\n radius: 8 * textureScale,\n cutoff: 0.25,\n fontFamily: fontFamily,\n fontWeight: this._fontWeight(fontFamilies[0]),\n fontStyle: this._fontStyle(fontFamilies[0]),\n lang: this.lang\n });\n }\n\n /**\n * Sniffs the font style out of a font family name.\n */\n _fontStyle(fontFamily: string): string {\n if (/italic/i.test(fontFamily)) {\n return 'italic';\n } else if (/oblique/i.test(fontFamily)) {\n return 'oblique';\n }\n return 'normal';\n }\n\n /**\n * Sniffs the font weight out of a font family name.\n */\n _fontWeight(fontFamily: string): string {\n // Based on the OpenType specification\n // https://learn.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass\n const weightsByName = {\n thin: 100, hairline: 100,\n 'extra light': 200, 'ultra light': 200,\n light: 300,\n normal: 400, regular: 400,\n medium: 500,\n semibold: 600, demibold: 600,\n bold: 700,\n 'extra bold': 800, 'ultra bold': 800,\n black: 900, heavy: 900,\n 'extra black': 950, 'ultra black': 950\n };\n let match;\n for (const [name, weight] of Object.entries(weightsByName)) {\n if (new RegExp(`\\\\b${name}\\\\b`, 'i').test(fontFamily)) {\n match = `${weight}`;\n }\n }\n return match;\n }\n\n destroy() {\n for (const stack in this.entries) {\n const entry = this.entries[stack];\n if (entry.tinySDF) {\n entry.tinySDF = null;\n }\n if (entry.ideographTinySDF) {\n entry.ideographTinySDF = null;\n }\n entry.glyphs = {};\n entry.requests = {};\n entry.ranges = {};\n }\n this.entries = {};\n }\n}\n","import {getArrayBuffer} from '../util/ajax';\nimport {ResourceType} from '../util/request_manager';\n\nimport {parseGlyphPbf} from './parse_glyph_pbf';\n\nimport type {StyleGlyph} from './style_glyph';\nimport type {RequestManager} from '../util/request_manager';\n\nexport async function loadGlyphRange(fontstack: string,\n range: number,\n urlTemplate: string,\n requestManager: RequestManager): Promise<{[_: number]: StyleGlyph | null}> {\n const begin = range * 256;\n const end = begin + 255;\n\n const request = requestManager.transformRequest(\n urlTemplate.replace('{fontstack}', fontstack).replace('{range}', `${begin}-${end}`),\n ResourceType.Glyphs\n );\n\n const response = await getArrayBuffer(request, new AbortController());\n if (!response || !response.data) {\n throw new Error(`Could not load glyph range. range: ${range}, ${begin}-${end}`);\n }\n const glyphs = {};\n\n for (const glyph of parseGlyphPbf(response.data)) {\n glyphs[glyph.id] = glyph;\n }\n\n return glyphs;\n}\n","import {interpolates, type Color, latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\n\nimport {sphericalToCartesian} from '../util/util';\nimport {Evented} from '../util/evented';\nimport {\n validateStyle,\n validateLight,\n emitValidationErrors\n} from './validate_style';\n\nimport type {StylePropertySpecification, LightSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {EvaluationParameters} from './evaluation_parameters';\nimport type {StyleSetterOptions} from '../style/style';\nimport {Properties, Transitionable, type Transitioning, type PossiblyEvaluated, DataConstantProperty, TRANSITION_SUFFIX} from './properties';\n\nimport type {\n Property,\n PropertyValue,\n TransitionParameters\n} from './properties';\n\ntype LightPosition = {\n x: number;\n y: number;\n z: number;\n};\n\nclass LightPositionProperty implements Property<[number, number, number], LightPosition> {\n specification: StylePropertySpecification;\n\n constructor() {\n this.specification = styleSpec.light.position as StylePropertySpecification;\n }\n\n possiblyEvaluate(\n value: PropertyValue<[number, number, number], LightPosition>,\n parameters: EvaluationParameters\n ): LightPosition {\n return sphericalToCartesian(value.expression.evaluate(parameters));\n }\n\n interpolate(a: LightPosition, b: LightPosition, t: number): LightPosition {\n return {\n x: interpolates.number(a.x, b.x, t),\n y: interpolates.number(a.y, b.y, t),\n z: interpolates.number(a.z, b.z, t),\n };\n }\n}\n\ntype LightProps = {\n 'anchor': DataConstantProperty<'map' | 'viewport'>;\n 'position': LightPositionProperty;\n 'color': DataConstantProperty;\n 'intensity': DataConstantProperty;\n};\n\ntype LightPropsPossiblyEvaluated = {\n 'anchor': 'map' | 'viewport';\n 'position': LightPosition;\n 'color': Color;\n 'intensity': number;\n};\n\nlet lightProperties: Properties;\n\n/*\n * Represents the light used to light extruded features.\n */\nexport class Light extends Evented {\n _transitionable: Transitionable;\n _transitioning: Transitioning;\n properties: PossiblyEvaluated;\n\n constructor(lightOptions?: LightSpecification) {\n super();\n lightProperties = lightProperties || new Properties({\n 'anchor': new DataConstantProperty(styleSpec.light.anchor as StylePropertySpecification),\n 'position': new LightPositionProperty(),\n 'color': new DataConstantProperty(styleSpec.light.color as StylePropertySpecification),\n 'intensity': new DataConstantProperty(styleSpec.light.intensity as StylePropertySpecification),\n });\n this._transitionable = new Transitionable(lightProperties, undefined);\n this.setLight(lightOptions);\n this._transitioning = this._transitionable.untransitioned();\n }\n\n getLight(): LightSpecification {\n return this._transitionable.serialize();\n }\n\n setLight(light?: LightSpecification, options: StyleSetterOptions = {}) {\n if (this._validate(validateLight, light, options)) {\n return;\n }\n\n for (const name in light) {\n const value = light[name];\n if (name.endsWith(TRANSITION_SUFFIX)) {\n this._transitionable.setTransition(name.slice(0, -TRANSITION_SUFFIX.length) as keyof LightProps, value);\n } else {\n this._transitionable.setValue(name as keyof LightProps, value);\n }\n }\n }\n\n updateTransitions(parameters: TransitionParameters) {\n this._transitioning = this._transitionable.transitioned(parameters, this._transitioning);\n }\n\n hasTransition() {\n return this._transitioning.hasTransition();\n }\n\n recalculate(parameters: EvaluationParameters) {\n this.properties = this._transitioning.possiblyEvaluate(parameters);\n }\n\n _validate(validate: Function, value: unknown, options?: {\n validate?: boolean;\n }) {\n if (options && options.validate === false) {\n return false;\n }\n\n return emitValidationErrors(this, validate.call(validateStyle, {\n value,\n // Workaround for https://github.com/mapbox/mapbox-gl-js/issues/2407\n style: {glyphs: true, sprite: true},\n styleSpec\n }));\n }\n}\n","import {DataConstantProperty, type PossiblyEvaluated, Properties, TRANSITION_SUFFIX, Transitionable, type Transitioning, type TransitionParameters} from './properties';\nimport {Evented} from '../util/evented';\nimport {EvaluationParameters} from './evaluation_parameters';\nimport {emitValidationErrors, validateSky, validateStyle} from './validate_style';\nimport {extend} from '../util/util';\nimport {type Color, latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\nimport {type Mesh} from '../render/mesh';\nimport type {StylePropertySpecification, SkySpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {StyleSetterOptions} from './style';\n\ntype SkyProps = {\n 'sky-color': DataConstantProperty;\n 'horizon-color': DataConstantProperty;\n 'fog-color': DataConstantProperty;\n 'fog-ground-blend': DataConstantProperty;\n 'horizon-fog-blend': DataConstantProperty;\n 'sky-horizon-blend': DataConstantProperty;\n 'atmosphere-blend': DataConstantProperty;\n};\n\ntype SkyPropsPossiblyEvaluated = {\n 'sky-color': Color;\n 'horizon-color': Color;\n 'fog-color': Color;\n 'fog-ground-blend': number;\n 'horizon-fog-blend': number;\n 'sky-horizon-blend': number;\n 'atmosphere-blend': number;\n};\n\nconst properties: Properties = new Properties({\n 'sky-color': new DataConstantProperty(styleSpec.sky['sky-color'] as StylePropertySpecification),\n 'horizon-color': new DataConstantProperty(styleSpec.sky['horizon-color'] as StylePropertySpecification),\n 'fog-color': new DataConstantProperty(styleSpec.sky['fog-color'] as StylePropertySpecification),\n 'fog-ground-blend': new DataConstantProperty(styleSpec.sky['fog-ground-blend'] as StylePropertySpecification),\n 'horizon-fog-blend': new DataConstantProperty(styleSpec.sky['horizon-fog-blend'] as StylePropertySpecification),\n 'sky-horizon-blend': new DataConstantProperty(styleSpec.sky['sky-horizon-blend'] as StylePropertySpecification),\n 'atmosphere-blend': new DataConstantProperty(styleSpec.sky['atmosphere-blend'] as StylePropertySpecification)\n});\n\nexport class Sky extends Evented {\n properties: PossiblyEvaluated;\n\n /**\n * This is used to cache the gl mesh for the sky, it should be initialized only once.\n */\n mesh: Mesh | undefined;\n atmosphereMesh: Mesh | undefined;\n _transitionable: Transitionable;\n _transitioning: Transitioning;\n\n constructor(sky?: SkySpecification) {\n super();\n this._transitionable = new Transitionable(properties, undefined);\n this.setSky(sky);\n this._transitioning = this._transitionable.untransitioned();\n this.recalculate(new EvaluationParameters(0));\n }\n\n setSky(sky?: SkySpecification, options: StyleSetterOptions = {}) {\n if (this._validate(validateSky, sky, options)) return;\n\n if (!sky) {\n sky = {\n 'sky-color': 'transparent',\n 'horizon-color': 'transparent',\n 'fog-color': 'transparent',\n 'fog-ground-blend': 1,\n 'atmosphere-blend': 0,\n };\n }\n\n for (const name in sky) {\n const value = sky[name];\n if (name.endsWith(TRANSITION_SUFFIX)) {\n this._transitionable.setTransition(name.slice(0, -TRANSITION_SUFFIX.length) as keyof SkyProps, value);\n } else {\n this._transitionable.setValue(name as keyof SkyProps, value);\n }\n }\n }\n\n getSky(): SkySpecification {\n return this._transitionable.serialize();\n }\n\n updateTransitions(parameters: TransitionParameters) {\n this._transitioning = this._transitionable.transitioned(parameters, this._transitioning);\n }\n\n hasTransition() {\n return this._transitioning.hasTransition();\n }\n\n recalculate(parameters: EvaluationParameters) {\n this.properties = this._transitioning.possiblyEvaluate(parameters);\n }\n\n _validate(validate: Function, value: unknown, options: StyleSetterOptions = {}) {\n if (options?.validate === false) {\n return false;\n }\n return emitValidationErrors(this, validate.call(validateStyle, extend({\n value,\n // Workaround for https://github.com/mapbox/mapbox-gl-js/issues/2407\n style: {glyphs: true, sprite: true},\n styleSpec\n })));\n }\n\n /**\n * Currently fog is a very simple implementation, and should only used\n * to create an atmosphere near the horizon.\n * But because the fog is drawn from the far-clipping-plane to\n * map-center, and because the fog does nothing know about the horizon,\n * this method does a fadeout in respect of pitch. So, when the horizon\n * gets out of view, which is at about pitch 70, this methods calculates\n * the corresponding opacity values. Below pitch 60 the fog is completely\n * invisible.\n */\n calculateFogBlendOpacity(pitch: number) {\n if (pitch < 60) return 0; // disable\n if (pitch < 70) return (pitch - 60) / 10; // fade in\n return 1;\n }\n}\n","import {warnOnce} from '../util/util';\n\nimport type {Context} from '../gl/context';\n\n/**\n * A dash entry\n */\nexport type DashEntry = {\n y: number;\n height: number;\n width: number;\n};\n\n/**\n * @internal\n * A LineAtlas lets us reuse rendered dashed lines\n * by writing many of them to a texture and then fetching their positions\n * using {@link LineAtlas.getDash}.\n *\n * @param width - the width\n * @param height - the height\n */\nexport class LineAtlas {\n width: number;\n height: number;\n nextRow: number;\n bytes: number;\n data: Uint8Array;\n dashEntry: {[_: string]: DashEntry};\n dirty: boolean;\n texture: WebGLTexture;\n\n constructor(width: number, height: number) {\n this.width = width;\n this.height = height;\n this.nextRow = 0;\n\n this.data = new Uint8Array(this.width * this.height);\n\n this.dashEntry = {};\n }\n\n /**\n * Get or create a dash line pattern.\n *\n * @param dasharray - the key (represented by numbers) to get the dash texture\n * @param round - whether to add circle caps in between dash segments\n * @returns position of dash texture in {@link DashEntry}\n */\n getDash(dasharray: Array, round: boolean) {\n const key = dasharray.join(',') + String(round);\n\n if (!this.dashEntry[key]) {\n this.dashEntry[key] = this.addDash(dasharray, round);\n }\n return this.dashEntry[key];\n }\n\n getDashRanges(dasharray: Array, lineAtlasWidth: number, stretch: number) {\n // If dasharray has an odd length, both the first and last parts\n // are dashes and should be joined seamlessly.\n const oddDashArray = dasharray.length % 2 === 1;\n\n const ranges = [];\n\n let left = oddDashArray ? -dasharray[dasharray.length - 1] * stretch : 0;\n let right = dasharray[0] * stretch;\n let isDash = true;\n\n ranges.push({left, right, isDash, zeroLength: dasharray[0] === 0});\n\n let currentDashLength = dasharray[0];\n for (let i = 1; i < dasharray.length; i++) {\n isDash = !isDash;\n\n const dashLength = dasharray[i];\n left = currentDashLength * stretch;\n currentDashLength += dashLength;\n right = currentDashLength * stretch;\n\n ranges.push({left, right, isDash, zeroLength: dashLength === 0});\n }\n\n return ranges;\n }\n\n addRoundDash(ranges: any, stretch: number, n: number) {\n const halfStretch = stretch / 2;\n\n for (let y = -n; y <= n; y++) {\n const row = this.nextRow + n + y;\n const index = this.width * row;\n let currIndex = 0;\n let range = ranges[currIndex];\n\n for (let x = 0; x < this.width; x++) {\n if (x / range.right > 1) { range = ranges[++currIndex]; }\n\n const distLeft = Math.abs(x - range.left);\n const distRight = Math.abs(x - range.right);\n const minDist = Math.min(distLeft, distRight);\n let signedDistance;\n\n const distMiddle = y / n * (halfStretch + 1);\n if (range.isDash) {\n const distEdge = halfStretch - Math.abs(distMiddle);\n signedDistance = Math.sqrt(minDist * minDist + distEdge * distEdge);\n } else {\n signedDistance = halfStretch - Math.sqrt(minDist * minDist + distMiddle * distMiddle);\n }\n\n this.data[index + x] = Math.max(0, Math.min(255, signedDistance + 128));\n }\n }\n }\n\n addRegularDash(ranges: any) {\n\n // Collapse any zero-length range\n // Collapse neighbouring same-type parts into a single part\n for (let i = ranges.length - 1; i >= 0; --i) {\n const part = ranges[i];\n const next = ranges[i + 1];\n if (part.zeroLength) {\n ranges.splice(i, 1);\n } else if (next && next.isDash === part.isDash) {\n next.left = part.left;\n ranges.splice(i, 1);\n }\n }\n\n // Combine the first and last parts if possible\n const first = ranges[0];\n const last = ranges[ranges.length - 1];\n if (first.isDash === last.isDash) {\n first.left = last.left - this.width;\n last.right = first.right + this.width;\n }\n\n const index = this.width * this.nextRow;\n let currIndex = 0;\n let range = ranges[currIndex];\n\n for (let x = 0; x < this.width; x++) {\n if (x / range.right > 1) {\n range = ranges[++currIndex];\n }\n\n const distLeft = Math.abs(x - range.left);\n const distRight = Math.abs(x - range.right);\n\n const minDist = Math.min(distLeft, distRight);\n const signedDistance = range.isDash ? minDist : -minDist;\n\n this.data[index + x] = Math.max(0, Math.min(255, signedDistance + 128));\n }\n }\n\n addDash(dasharray: Array, round: boolean): DashEntry {\n const n = round ? 7 : 0;\n const height = 2 * n + 1;\n\n if (this.nextRow + height > this.height) {\n warnOnce('LineAtlas out of space');\n return null;\n }\n\n let length = 0;\n for (let i = 0; i < dasharray.length; i++) { length += dasharray[i]; }\n\n if (length !== 0) {\n const stretch = this.width / length;\n const ranges = this.getDashRanges(dasharray, this.width, stretch);\n\n if (round) {\n this.addRoundDash(ranges, stretch, n);\n } else {\n this.addRegularDash(ranges);\n }\n }\n\n const dashEntry = {\n y: this.nextRow + n,\n height: 2 * n,\n width: length\n };\n\n this.nextRow += height;\n this.dirty = true;\n\n return dashEntry;\n }\n\n bind(context: Context) {\n const gl = context.gl;\n if (!this.texture) {\n this.texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.ALPHA, this.width, this.height, 0, gl.ALPHA, gl.UNSIGNED_BYTE, this.data);\n\n } else {\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n\n if (this.dirty) {\n this.dirty = false;\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, this.width, this.height, gl.ALPHA, gl.UNSIGNED_BYTE, this.data);\n }\n }\n }\n}\n","import {workerFactory} from './web_worker';\nimport {browser} from './browser';\nimport {isSafari} from './util';\nimport {type ActorTarget} from './actor';\n\nexport const PRELOAD_POOL_ID = 'maplibre_preloaded_worker_pool';\n\n/**\n * Constructs a worker pool.\n */\nexport class WorkerPool {\n static workerCount: number;\n\n active: {\n [_ in number | string]: boolean;\n };\n workers: Array;\n\n constructor() {\n this.active = {};\n }\n\n acquire(mapId: number | string): Array {\n if (!this.workers) {\n // Lazily look up the value of getWorkerCount so that\n // client code has had a chance to set it.\n this.workers = [];\n while (this.workers.length < WorkerPool.workerCount) {\n this.workers.push(workerFactory());\n }\n }\n\n this.active[mapId] = true;\n return this.workers.slice();\n }\n\n release(mapId: number | string) {\n delete this.active[mapId];\n if (this.numActive() === 0) {\n this.workers.forEach((w) => {\n w.terminate();\n });\n this.workers = null;\n }\n }\n\n isPreloaded(): boolean {\n return !!this.active[PRELOAD_POOL_ID];\n }\n\n numActive(): number {\n return Object.keys(this.active).length;\n }\n}\n\n// Based on results from A/B testing: https://github.com/maplibre/maplibre-gl-js/pull/2354\nconst availableLogicalProcessors = Math.floor(browser.hardwareConcurrency / 2);\nWorkerPool.workerCount = isSafari(globalThis) ? Math.max(Math.min(availableLogicalProcessors, 3), 1) : 1;\n","import {type AddProtocolAction, config} from './config';\nimport type {default as MaplibreWorker} from '../source/worker';\nimport type {WorkerSourceConstructor} from '../source/worker_source';\n\nexport interface WorkerGlobalScopeInterface {\n importScripts(...urls: Array): void;\n registerWorkerSource: (sourceName: string, sourceConstructor: WorkerSourceConstructor) => void;\n registerRTLTextPlugin: (_: any) => void;\n addProtocol: (customProtocol: string, loadFn: AddProtocolAction) => void;\n removeProtocol: (customProtocol: string) => void;\n worker: MaplibreWorker;\n}\n\nexport function workerFactory() {\n return new Worker(config.WORKER_URL);\n}\n","import {WorkerPool, PRELOAD_POOL_ID} from './worker_pool';\n\nlet globalWorkerPool;\n\n/**\n * Creates (if necessary) and returns the single, global WorkerPool instance\n * to be shared across each Map\n */\nexport function getGlobalWorkerPool() {\n if (!globalWorkerPool) {\n globalWorkerPool = new WorkerPool();\n }\n return globalWorkerPool;\n}\n\n/**\n * Initializes resources like WebWorkers that can be shared across maps to lower load\n * times in some situations. `setWorkerUrl()` and `setWorkerCount()`, if being\n * used, must be set before `prewarm()` is called to have an effect.\n *\n * By default, the lifecycle of these resources is managed automatically, and they are\n * lazily initialized when a Map is first created. By invoking `prewarm()`, these\n * resources will be created ahead of time, and will not be cleared when the last Map\n * is removed from the page. This allows them to be re-used by new Map instances that\n * are created later. They can be manually cleared by calling\n * `clearPrewarmedResources()`. This is only necessary if your web page remains\n * active but stops using maps altogether.\n *\n * This is primarily useful when using GL-JS maps in a single page app, wherein a user\n * would navigate between various views that can cause Map instances to constantly be\n * created and destroyed.\n *\n * @example\n * ```ts\n * prewarm()\n * ```\n */\nexport function prewarm() {\n const workerPool = getGlobalWorkerPool();\n workerPool.acquire(PRELOAD_POOL_ID);\n}\n\n/**\n * Clears up resources that have previously been created by `prewarm()`.\n * Note that this is typically not necessary. You should only call this function\n * if you expect the user of your app to not return to a Map view at any point\n * in your application.\n *\n * @example\n * ```ts\n * clearPrewarmedResources()\n * ```\n */\nexport function clearPrewarmedResources() {\n const pool = globalWorkerPool;\n if (pool) {\n // Remove the pool only if all maps that referenced the preloaded global worker pool have been removed.\n if (pool.isPreloaded() && pool.numActive() === 1) {\n pool.release(PRELOAD_POOL_ID);\n globalWorkerPool = null;\n } else {\n console.warn('Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()');\n }\n }\n}\n","import {Actor, type MessageHandler} from './actor';\nimport {getGlobalWorkerPool} from './global_worker_pool';\nimport {GLOBAL_DISPATCHER_ID, makeRequest} from './ajax';\n\nimport type {WorkerPool} from './worker_pool';\nimport type {RequestResponseMessageMap} from './actor_messages';\nimport {MessageType} from './actor_messages';\n\n/**\n * Responsible for sending messages from a {@link Source} to an associated worker source (usually with the same name).\n */\nexport class Dispatcher {\n workerPool: WorkerPool;\n actors: Array;\n currentActor: number;\n id: string | number;\n\n constructor(workerPool: WorkerPool, mapId: string | number) {\n this.workerPool = workerPool;\n this.actors = [];\n this.currentActor = 0;\n this.id = mapId;\n const workers = this.workerPool.acquire(mapId);\n for (let i = 0; i < workers.length; i++) {\n const worker = workers[i];\n const actor = new Actor(worker, mapId);\n actor.name = `Worker ${i}`;\n this.actors.push(actor);\n }\n if (!this.actors.length) throw new Error('No actors found');\n }\n\n /**\n * Broadcast a message to all Workers.\n */\n broadcast(type: T, data: RequestResponseMessageMap[T][0]): Promise {\n const promises: Promise[] = [];\n for (const actor of this.actors) {\n promises.push(actor.sendAsync({type, data}));\n }\n return Promise.all(promises);\n }\n\n /**\n * Acquires an actor to dispatch messages to. The actors are distributed in round-robin fashion.\n * @returns An actor object backed by a web worker for processing messages.\n */\n getActor(): Actor {\n this.currentActor = (this.currentActor + 1) % this.actors.length;\n return this.actors[this.currentActor];\n }\n\n remove(mapRemoved: boolean = true) {\n this.actors.forEach((actor) => { actor.remove(); });\n this.actors = [];\n if (mapRemoved) this.workerPool.release(this.id);\n }\n\n public registerMessageHandler(type: T, handler: MessageHandler) {\n for (const actor of this.actors) {\n actor.registerMessageHandler(type, handler);\n }\n }\n\n public unregisterMessageHandler(type: T) {\n for (const actor of this.actors) {\n actor.unregisterMessageHandler(type);\n }\n }\n}\n\nlet globalDispatcher: Dispatcher;\n\nexport function getGlobalDispatcher(): Dispatcher {\n if (!globalDispatcher) {\n globalDispatcher = new Dispatcher(getGlobalWorkerPool(), GLOBAL_DISPATCHER_ID);\n globalDispatcher.registerMessageHandler(MessageType.getResource, (_mapId, params, abortController) => {\n return makeRequest(params, abortController);\n });\n }\n return globalDispatcher;\n}\n","import {mat4} from 'gl-matrix';\nimport type Point from '@mapbox/point-geometry';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {CollisionIndex} from '../symbol/collision_index';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {RetainedQueryData} from '../symbol/placement';\nimport type {FilterSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {GeoJSONFeature, MapGeoJSONFeature} from '../util/vectortile_to_geojson';\nimport type {QueryResults, QueryResultsItem} from '../data/feature_index';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\ntype RenderedFeatureLayer = {\n wrappedTileID: string;\n queryResults: QueryResults;\n};\n\n/**\n * Options to pass to query the map for the rendered features\n */\nexport type QueryRenderedFeaturesOptions = {\n /**\n * An array or set of [style layer IDs](https://maplibre.org/maplibre-style-spec/#layer-id) for the query to inspect.\n * Only features within these layers will be returned. If this parameter is undefined, all layers will be checked.\n */\n layers?: Array | Set;\n /**\n * A [filter](https://maplibre.org/maplibre-style-spec/layers/#filter) to limit query results.\n */\n filter?: FilterSpecification;\n /**\n * An array of string representing the available images\n */\n availableImages?: Array;\n /**\n * Whether to check if the [options.filter] conforms to the MapLibre Style Specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function.\n */\n validate?: boolean;\n};\n\n/**\n * @internal\n * A version of QueryRenderedFeaturesOptions used internally\n */\nexport type QueryRenderedFeaturesOptionsStrict = Omit & {\n layers: Set | null;\n globalState?: Record;\n};\n\n/**\n * The options object related to the {@link Map.querySourceFeatures} method\n */\nexport type QuerySourceFeatureOptions = {\n /**\n * The name of the source layer to query. *For vector tile sources, this parameter is required.* For GeoJSON sources, it is ignored.\n */\n sourceLayer?: string;\n /**\n * A [filter](https://maplibre.org/maplibre-style-spec/layers/#filter)\n * to limit query results.\n */\n filter?: FilterSpecification;\n /**\n * Whether to check if the [parameters.filter] conforms to the MapLibre Style Specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function.\n * @defaultValue true\n */\n validate?: boolean;\n};\n\n/**\n * @internal\n * A version of QuerySourceFeatureOptions used internally\n */\nexport type QuerySourceFeatureOptionsStrict = QuerySourceFeatureOptions & {\n globalState?: Record;\n};\n\nexport type QueryRenderedFeaturesResults = {\n [key: string]: QueryRenderedFeaturesResultsItem[];\n};\n\nexport type QueryRenderedFeaturesResultsItem = QueryResultsItem & { feature: MapGeoJSONFeature };\n\n/*\n * Returns a matrix that can be used to convert from tile coordinates to viewport pixel coordinates.\n */\nfunction getPixelPosMatrix(transform, tileID: OverscaledTileID) {\n const t = mat4.create();\n mat4.translate(t, t, [1, 1, 0]);\n mat4.scale(t, t, [transform.width * 0.5, transform.height * 0.5, 1]);\n if (transform.calculatePosMatrix) { // Globe: TODO: remove this hack once queryRendererFeatures supports globe properly\n return mat4.multiply(t, t, transform.calculatePosMatrix(tileID.toUnwrapped()));\n } else {\n return t;\n }\n}\n\nfunction queryIncludes3DLayer(layers: Set | undefined, styleLayers: {[_: string]: StyleLayer}, sourceID: string) {\n if (layers) {\n for (const layerID of layers) {\n const layer = styleLayers[layerID];\n if (layer && layer.source === sourceID && layer.type === 'fill-extrusion') {\n return true;\n }\n }\n } else {\n for (const key in styleLayers) {\n const layer = styleLayers[key];\n if (layer.source === sourceID && layer.type === 'fill-extrusion') {\n return true;\n }\n }\n }\n return false;\n}\n\nexport function queryRenderedFeatures(\n tileManager: TileManager,\n styleLayers: {[_: string]: StyleLayer},\n serializedLayers: {[_: string]: any},\n queryGeometry: Array,\n params: QueryRenderedFeaturesOptionsStrict | undefined,\n transform: IReadonlyTransform,\n getElevation: undefined | ((id: OverscaledTileID, x: number, y: number) => number)\n): QueryRenderedFeaturesResults {\n\n const has3DLayer = queryIncludes3DLayer(params?.layers ?? null, styleLayers, tileManager.id);\n const maxPitchScaleFactor = transform.maxPitchScaleFactor();\n const tilesIn = tileManager.tilesIn(queryGeometry, maxPitchScaleFactor, has3DLayer);\n\n tilesIn.sort(sortTilesIn);\n const renderedFeatureLayers: RenderedFeatureLayer[] = [];\n for (const tileIn of tilesIn) {\n renderedFeatureLayers.push({\n wrappedTileID: tileIn.tileID.wrapped().key,\n queryResults: tileIn.tile.queryRenderedFeatures(\n styleLayers,\n serializedLayers,\n tileManager.getState(),\n tileIn.queryGeometry,\n tileIn.cameraQueryGeometry,\n tileIn.scale,\n params,\n transform,\n maxPitchScaleFactor,\n getPixelPosMatrix(transform, tileIn.tileID),\n getElevation ? (x: number, y: number) => getElevation(tileIn.tileID, x, y) : undefined,\n )\n });\n }\n\n const result = mergeRenderedFeatureLayers(renderedFeatureLayers);\n\n return convertFeaturesToMapFeatures(result, tileManager);\n}\n\nexport function queryRenderedSymbols(styleLayers: {[_: string]: StyleLayer},\n serializedLayers: {[_: string]: StyleLayer},\n tileManagers: {[_: string]: TileManager},\n queryGeometry: Array,\n params: QueryRenderedFeaturesOptionsStrict,\n collisionIndex: CollisionIndex,\n retainedQueryData: {\n [_: number]: RetainedQueryData;\n }): QueryRenderedFeaturesResults {\n const result: QueryResults = {};\n const renderedSymbols = collisionIndex.queryRenderedSymbols(queryGeometry);\n const bucketQueryData: RetainedQueryData[] = [];\n for (const bucketInstanceId of Object.keys(renderedSymbols).map(Number)) {\n bucketQueryData.push(retainedQueryData[bucketInstanceId]);\n }\n bucketQueryData.sort(sortTilesIn);\n\n for (const queryData of bucketQueryData) {\n const bucketSymbols = queryData.featureIndex.lookupSymbolFeatures(\n renderedSymbols[queryData.bucketInstanceId],\n serializedLayers,\n queryData.bucketIndex,\n queryData.sourceLayerIndex,\n {\n filterSpec: params.filter,\n globalState: params.globalState\n },\n params.layers,\n params.availableImages,\n styleLayers);\n\n for (const layerID in bucketSymbols) {\n const resultFeatures = result[layerID] = result[layerID] || [];\n const layerSymbols = bucketSymbols[layerID];\n layerSymbols.sort((a, b) => {\n // Match topDownFeatureComparator from FeatureIndex, but using\n // most recent sorting of features from bucket.sortFeatures\n const featureSortOrder = queryData.featureSortOrder;\n if (featureSortOrder) {\n // queryRenderedSymbols documentation says we'll return features in\n // \"top-to-bottom\" rendering order (aka last-to-first).\n // Actually there can be multiple symbol instances per feature, so\n // we sort each feature based on the first matching symbol instance.\n const sortedA = featureSortOrder.indexOf(a.featureIndex);\n const sortedB = featureSortOrder.indexOf(b.featureIndex);\n return sortedB - sortedA;\n } else {\n // Bucket hasn't been re-sorted based on angle, so use the\n // reverse of the order the features appeared in the data.\n return b.featureIndex - a.featureIndex;\n }\n });\n for (const symbolFeature of layerSymbols) {\n resultFeatures.push(symbolFeature);\n }\n }\n }\n\n return convertFeaturesToMapFeaturesMultiple(result, styleLayers, tileManagers);\n}\n\nexport function querySourceFeatures(tileManager: TileManager, params: QuerySourceFeatureOptionsStrict | undefined): GeoJSONFeature[] {\n const tiles = tileManager.getRenderableIds().map((id) => {\n return tileManager.getTileByID(id);\n });\n\n const result: GeoJSONFeature[] = [];\n\n const dataTiles = {};\n for (let i = 0; i < tiles.length; i++) {\n const tile = tiles[i];\n const dataID = tile.tileID.canonical.key;\n if (!dataTiles[dataID]) {\n dataTiles[dataID] = true;\n tile.querySourceFeatures(result, params);\n }\n }\n\n return result;\n}\n\nfunction sortTilesIn(a: {tileID: OverscaledTileID}, b: {tileID: OverscaledTileID}) {\n const idA = a.tileID;\n const idB = b.tileID;\n return (idA.overscaledZ - idB.overscaledZ) || (idA.canonical.y - idB.canonical.y) || (idA.wrap - idB.wrap) || (idA.canonical.x - idB.canonical.x);\n}\n\nfunction mergeRenderedFeatureLayers(tiles: RenderedFeatureLayer[]): QueryResults {\n // Merge results from all tiles, but if two tiles share the same\n // wrapped ID, don't duplicate features between the two tiles\n const result: QueryResults = {};\n const wrappedIDLayerMap = {};\n for (const tile of tiles) {\n const queryResults = tile.queryResults;\n const wrappedID = tile.wrappedTileID;\n const wrappedIDLayers = wrappedIDLayerMap[wrappedID] = wrappedIDLayerMap[wrappedID] || {};\n for (const layerID in queryResults) {\n const tileFeatures = queryResults[layerID];\n const wrappedIDFeatures = wrappedIDLayers[layerID] = wrappedIDLayers[layerID] || {};\n const resultFeatures = result[layerID] = result[layerID] || [];\n for (const tileFeature of tileFeatures) {\n if (!wrappedIDFeatures[tileFeature.featureIndex]) {\n wrappedIDFeatures[tileFeature.featureIndex] = true;\n resultFeatures.push(tileFeature);\n }\n }\n }\n }\n return result;\n}\n\nfunction convertFeaturesToMapFeatures(result: QueryResults, tileManager: TileManager): QueryRenderedFeaturesResults {\n // Merge state from TileManager into the results\n for (const layerID in result) {\n for (const featureWrapper of result[layerID]) {\n convertFeatureToMapFeature(featureWrapper, tileManager);\n };\n }\n return result as QueryRenderedFeaturesResults;\n}\n\nfunction convertFeaturesToMapFeaturesMultiple(result: QueryResults, styleLayers: {[_: string]: StyleLayer}, tileManagers: {[_: string]: TileManager}): QueryRenderedFeaturesResults {\n // Merge state from TileManager into the results\n for (const layerName in result) {\n for (const featureWrapper of result[layerName]) {\n const layer = styleLayers[layerName];\n const tileManager = tileManagers[layer.source];\n convertFeatureToMapFeature(featureWrapper, tileManager);\n };\n }\n return result as QueryRenderedFeaturesResults;\n}\n\nfunction convertFeatureToMapFeature(featureWrapper: QueryResultsItem, tileManager: TileManager) {\n const feature = featureWrapper.feature as MapGeoJSONFeature;\n const state = tileManager.getFeatureState(feature.layer['source-layer'], feature.id);\n feature.source = feature.layer.source;\n if (feature.layer['source-layer']) {\n feature.sourceLayer = feature.layer['source-layer'];\n }\n feature.state = state;\n}\n","import {pick, extend, type TileJSON} from '../util/util';\nimport {getJSON} from '../util/ajax';\nimport {ResourceType} from '../util/request_manager';\nimport {browser} from '../util/browser';\n\nimport type {RequestManager} from '../util/request_manager';\nimport type {RasterDEMSourceSpecification, RasterSourceSpecification, VectorSourceSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type LoadTileJsonResponse = {\n tiles: Array;\n minzoom: number;\n maxzoom: number;\n attribution: string;\n bounds: RasterSourceSpecification['bounds'];\n scheme: RasterSourceSpecification['scheme'];\n tileSize: number;\n encoding: RasterDEMSourceSpecification['encoding'];\n vectorLayerIds?: Array;\n};\n\nexport async function loadTileJson(\n options: RasterSourceSpecification | RasterDEMSourceSpecification | VectorSourceSpecification,\n requestManager: RequestManager,\n abortController: AbortController,\n): Promise {\n let tileJSON: TileJSON | typeof options = options;\n if (options.url) {\n const response = await getJSON(requestManager.transformRequest(options.url, ResourceType.Source), abortController);\n tileJSON = response.data;\n } else {\n await browser.frameAsync(abortController);\n }\n if (!tileJSON) {\n return null;\n }\n const result = pick(\n // explicit source options take precedence over TileJSON\n extend(tileJSON, options),\n ['tiles', 'minzoom', 'maxzoom', 'attribution', 'bounds', 'scheme', 'tileSize', 'encoding']\n ) as LoadTileJsonResponse;\n\n if ('vector_layers' in tileJSON && tileJSON.vector_layers) {\n result.vectorLayerIds = tileJSON.vector_layers.map((layer) => { return layer.id; });\n }\n\n return result;\n}\n","import {LngLat} from './lng_lat';\nimport type {LngLatLike} from './lng_lat';\nimport {wrap} from '../util/util';\n\n/**\n * A {@link LngLatBounds} object, an array of {@link LngLatLike} objects in [sw, ne] order,\n * or an array of numbers in [west, south, east, north] order.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let v1 = new LngLatBounds(\n * new LngLat(-73.9876, 40.7661),\n * new LngLat(-73.9397, 40.8002)\n * );\n * let v2 = new LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002])\n * let v3 = [[-73.9876, 40.7661], [-73.9397, 40.8002]];\n * ```\n */\nexport type LngLatBoundsLike = LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number];\n\n/**\n * A `LngLatBounds` object represents a geographical bounding box,\n * defined by its southwest and northeast points in longitude and latitude.\n *\n * If no arguments are provided to the constructor, a `null` bounding box is created.\n *\n * Note that any Mapbox GL method that accepts a `LngLatBounds` object as an argument or option\n * can also accept an `Array` of two {@link LngLatLike} constructs and will perform an implicit conversion.\n * This flexible type is documented as {@link LngLatBoundsLike}.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let sw = new LngLat(-73.9876, 40.7661);\n * let ne = new LngLat(-73.9397, 40.8002);\n * let llb = new LngLatBounds(sw, ne);\n * ```\n */\nexport class LngLatBounds {\n _ne: LngLat;\n _sw: LngLat;\n\n /**\n * @param sw - The southwest corner of the bounding box.\n * OR array of 4 numbers in the order of west, south, east, north\n * OR array of 2 LngLatLike: [sw,ne]\n * @param ne - The northeast corner of the bounding box.\n * @example\n * ```ts\n * let sw = new LngLat(-73.9876, 40.7661);\n * let ne = new LngLat(-73.9397, 40.8002);\n * let llb = new LngLatBounds(sw, ne);\n * ```\n * OR\n * ```ts\n * let llb = new LngLatBounds([-73.9876, 40.7661, -73.9397, 40.8002]);\n * ```\n * OR\n * ```ts\n * let llb = new LngLatBounds([sw, ne]);\n * ```\n */\n constructor(sw?: LngLatLike | [number, number, number, number] | [LngLatLike, LngLatLike], ne?: LngLatLike) {\n if (!sw) {\n // noop\n } else if (ne) {\n this.setSouthWest(sw).setNorthEast(ne);\n } else if (Array.isArray(sw)) {\n if (sw.length === 4) {\n // 4 element array: west, south, east, north\n this.setSouthWest([sw[0], sw[1]]).setNorthEast([sw[2], sw[3]]);\n } else {\n this.setSouthWest(sw[0] as LngLatLike).setNorthEast(sw[1] as LngLatLike);\n }\n }\n }\n\n /**\n * Set the northeast corner of the bounding box\n *\n * @param ne - a {@link LngLatLike} object describing the northeast corner of the bounding box.\n */\n setNorthEast(ne: LngLatLike): this {\n this._ne = ne instanceof LngLat ? new LngLat(ne.lng, ne.lat) : LngLat.convert(ne);\n return this;\n }\n\n /**\n * Set the southwest corner of the bounding box\n *\n * @param sw - a {@link LngLatLike} object describing the southwest corner of the bounding box.\n */\n setSouthWest(sw: LngLatLike): this {\n this._sw = sw instanceof LngLat ? new LngLat(sw.lng, sw.lat) : LngLat.convert(sw);\n return this;\n }\n\n /**\n * Extend the bounds to include a given LngLatLike or LngLatBoundsLike.\n *\n * @param obj - object to extend to\n */\n extend(obj: LngLatLike | LngLatBoundsLike): this {\n const sw = this._sw,\n ne = this._ne;\n let sw2, ne2;\n\n if (obj instanceof LngLat) {\n sw2 = obj;\n ne2 = obj;\n\n } else if (obj instanceof LngLatBounds) {\n sw2 = obj._sw;\n ne2 = obj._ne;\n\n if (!sw2 || !ne2) return this;\n\n } else {\n if (Array.isArray(obj)) {\n if (obj.length === 4 || (obj as any[]).every(Array.isArray)) {\n const lngLatBoundsObj = (obj as any as LngLatBoundsLike);\n return this.extend(LngLatBounds.convert(lngLatBoundsObj));\n } else {\n const lngLatObj = (obj as any as LngLatLike);\n return this.extend(LngLat.convert(lngLatObj));\n }\n\n } else if (obj && ('lng' in obj || 'lon' in obj) && 'lat' in obj) {\n return this.extend(LngLat.convert(obj));\n }\n\n return this;\n }\n\n if (!sw && !ne) {\n this._sw = new LngLat(sw2.lng, sw2.lat);\n this._ne = new LngLat(ne2.lng, ne2.lat);\n\n } else {\n sw.lng = Math.min(sw2.lng, sw.lng);\n sw.lat = Math.min(sw2.lat, sw.lat);\n ne.lng = Math.max(ne2.lng, ne.lng);\n ne.lat = Math.max(ne2.lat, ne.lat);\n }\n\n return this;\n }\n\n /**\n * Returns the geographical coordinate equidistant from the bounding box's corners.\n *\n * @returns The bounding box's center.\n * @example\n * ```ts\n * let llb = new LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.getCenter(); // = LngLat {lng: -73.96365, lat: 40.78315}\n * ```\n */\n getCenter(): LngLat {\n return new LngLat((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);\n }\n\n /**\n * Returns the southwest corner of the bounding box.\n *\n * @returns The southwest corner of the bounding box.\n */\n getSouthWest(): LngLat { return this._sw; }\n\n /**\n * Returns the northeast corner of the bounding box.\n *\n * @returns The northeast corner of the bounding box.\n */\n getNorthEast(): LngLat { return this._ne; }\n\n /**\n * Returns the northwest corner of the bounding box.\n *\n * @returns The northwest corner of the bounding box.\n */\n getNorthWest(): LngLat { return new LngLat(this.getWest(), this.getNorth()); }\n\n /**\n * Returns the southeast corner of the bounding box.\n *\n * @returns The southeast corner of the bounding box.\n */\n getSouthEast(): LngLat { return new LngLat(this.getEast(), this.getSouth()); }\n\n /**\n * Returns the west edge of the bounding box.\n *\n * @returns The west edge of the bounding box.\n */\n getWest(): number { return this._sw.lng; }\n\n /**\n * Returns the south edge of the bounding box.\n *\n * @returns The south edge of the bounding box.\n */\n getSouth(): number { return this._sw.lat; }\n\n /**\n * Returns the east edge of the bounding box.\n *\n * @returns The east edge of the bounding box.\n */\n getEast(): number { return this._ne.lng; }\n\n /**\n * Returns the north edge of the bounding box.\n *\n * @returns The north edge of the bounding box.\n */\n getNorth(): number { return this._ne.lat; }\n\n /**\n * Returns the bounding box represented as an array.\n *\n * @returns The bounding box represented as an array, consisting of the\n * southwest and northeast coordinates of the bounding represented as arrays of numbers.\n * @example\n * ```ts\n * let llb = new LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.toArray(); // = [[-73.9876, 40.7661], [-73.9397, 40.8002]]\n * ```\n */\n toArray() {\n return [this._sw.toArray(), this._ne.toArray()];\n }\n\n /**\n * Return the bounding box represented as a string.\n *\n * @returns The bounding box represents as a string of the format\n * `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.\n * @example\n * ```ts\n * let llb = new LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.toString(); // = \"LngLatBounds(LngLat(-73.9876, 40.7661), LngLat(-73.9397, 40.8002))\"\n * ```\n */\n toString() {\n return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`;\n }\n\n /**\n * Check if the bounding box is an empty/`null`-type box.\n *\n * @returns True if bounds have been defined, otherwise false.\n */\n isEmpty() {\n return !(this._sw && this._ne);\n }\n\n /**\n * Check if the point is within the bounding box.\n *\n * @param lnglat - geographic point to check against.\n * @returns `true` if the point is within the bounding box.\n * @example\n * ```ts\n * let llb = new LngLatBounds(\n * new LngLat(-73.9876, 40.7661),\n * new LngLat(-73.9397, 40.8002)\n * );\n *\n * let ll = new LngLat(-73.9567, 40.7789);\n *\n * console.log(llb.contains(ll)); // = true\n * ```\n */\n contains(lnglat: LngLatLike) {\n const {lng, lat} = LngLat.convert(lnglat);\n\n const containsLatitude = this._sw.lat <= lat && lat <= this._ne.lat;\n let containsLongitude = this._sw.lng <= lng && lng <= this._ne.lng;\n if (this._sw.lng > this._ne.lng) { // wrapped coordinates\n containsLongitude = this._sw.lng >= lng && lng >= this._ne.lng;\n }\n\n return containsLatitude && containsLongitude;\n }\n\n /**\n * Checks if this bounding box intersects with another bounding box.\n *\n * Returns true if the bounding boxes share any area, including cases where\n * they only touch along an edge or at a corner.\n *\n * This method properly handles cases where either or both bounding boxes cross\n * the antimeridian (date line).\n */\n intersects(other: LngLatBoundsLike): boolean {\n other = LngLatBounds.convert(other);\n\n const latIntersects =\n other.getNorth() >= this.getSouth() &&\n other.getSouth() <= this.getNorth();\n\n if (!latIntersects) return false;\n\n // Check if either bound covers the full world (|span| >= 360°)\n // This must be done before wrapping to preserve the span information\n const thisSpan = Math.abs(this.getEast() - this.getWest());\n const otherSpan = Math.abs(other.getEast() - other.getWest());\n\n if (thisSpan >= 360 || otherSpan >= 360) {\n return true;\n }\n\n // Normalize longitudes to [-180, 180] range\n const thisWest = wrap(this.getWest(), -180, 180);\n const thisEast = wrap(this.getEast(), -180, 180);\n const otherWest = wrap(other.getWest(), -180, 180);\n const otherEast = wrap(other.getEast(), -180, 180);\n\n // Check if either bounds wraps around the antimeridian\n const thisWraps = thisWest >= thisEast;\n const otherWraps = otherWest >= otherEast;\n\n // Both wrap: they always intersect\n if (thisWraps && otherWraps) {\n return true;\n }\n\n // Only this wraps: intersects if other is outside the gap\n if (thisWraps) {\n return otherEast >= thisWest || otherWest <= thisEast;\n }\n\n if (otherWraps) {\n // Only other wraps: intersects if this is outside the gap\n return thisEast >= otherWest || thisWest <= otherEast;\n }\n\n // Neither wraps: standard intersection check\n return otherWest <= thisEast && otherEast >= thisWest;\n }\n\n /**\n * Converts an array to a `LngLatBounds` object.\n *\n * If a `LngLatBounds` object is passed in, the function returns it unchanged.\n *\n * Internally, the function calls {@link LngLat.convert} to convert arrays to `LngLat` values.\n *\n * @param input - An array of two coordinates to convert, or a `LngLatBounds` object to return.\n * @returns A new `LngLatBounds` object, if a conversion occurred, or the original `LngLatBounds` object.\n * @example\n * ```ts\n * let arr = [[-73.9876, 40.7661], [-73.9397, 40.8002]];\n * let llb = LngLatBounds.convert(arr); // = LngLatBounds {_sw: LngLat {lng: -73.9876, lat: 40.7661}, _ne: LngLat {lng: -73.9397, lat: 40.8002}}\n * ```\n */\n static convert(input: LngLatBoundsLike | null): LngLatBounds {\n if (input instanceof LngLatBounds) return input;\n if (!input) return input as null;\n return new LngLatBounds(input);\n }\n\n /**\n * Returns a `LngLatBounds` from the coordinates extended by a given `radius`. The returned `LngLatBounds` completely contains the `radius`.\n *\n * @param center - center coordinates of the new bounds.\n * @param radius - Distance in meters from the coordinates to extend the bounds.\n * @returns A new `LngLatBounds` object representing the coordinates extended by the `radius`.\n * @example\n * ```ts\n * let center = new LngLat(-73.9749, 40.7736);\n * LngLatBounds.fromLngLat(100).toArray(); // = [[-73.97501862141328, 40.77351016847229], [-73.97478137858673, 40.77368983152771]]\n * ```\n */\n static fromLngLat(center: LngLat, radius:number = 0): LngLatBounds {\n const earthCircumferenceInMetersAtEquator = 40075017;\n const latAccuracy = 360 * radius / earthCircumferenceInMetersAtEquator,\n lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * center.lat);\n\n return new LngLatBounds(new LngLat(center.lng - lngAccuracy, center.lat - latAccuracy),\n new LngLat(center.lng + lngAccuracy, center.lat + latAccuracy));\n }\n\n /**\n * Adjusts the given bounds to handle the case where the bounds cross the 180th meridian (antimeridian).\n *\n * @returns The adjusted LngLatBounds\n * @example\n * ```ts\n * let bounds = new LngLatBounds([175.813127, -20.157768], [-178. 340903, -15.449124]);\n * let adjustedBounds = bounds.adjustAntiMeridian();\n * // adjustedBounds will be: [[175.813127, -20.157768], [181.659097, -15.449124]]\n * ```\n */\n adjustAntiMeridian(): LngLatBounds {\n const sw = new LngLat(this._sw.lng, this._sw.lat);\n const ne = new LngLat(this._ne.lng, this._ne.lat);\n\n if (sw.lng > ne.lng) {\n return new LngLatBounds(\n sw,\n new LngLat(ne.lng + 360, ne.lat)\n );\n }\n\n return new LngLatBounds(sw, ne);\n }\n\n}\n","import {LngLatBounds, type LngLatBoundsLike} from '../geo/lng_lat_bounds';\nimport {mercatorXfromLng, mercatorYfromLat} from '../geo/mercator_coordinate';\n\nimport type {CanonicalTileID} from './tile_id';\n\nexport class TileBounds {\n bounds: LngLatBounds;\n minzoom: number;\n maxzoom: number;\n\n constructor(bounds: [number, number, number, number], minzoom?: number | null, maxzoom?: number | null) {\n this.bounds = LngLatBounds.convert(this.validateBounds(bounds));\n this.minzoom = minzoom || 0;\n this.maxzoom = maxzoom || 24;\n }\n\n validateBounds(bounds: [number, number, number, number]): LngLatBoundsLike {\n // make sure the bounds property contains valid longitude and latitudes\n if (!Array.isArray(bounds) || bounds.length !== 4) return [-180, -90, 180, 90];\n return [Math.max(-180, bounds[0]), Math.max(-90, bounds[1]), Math.min(180, bounds[2]), Math.min(90, bounds[3])];\n }\n\n contains(tileID: CanonicalTileID) {\n const worldSize = Math.pow(2, tileID.z);\n const level = {\n minX: Math.floor(mercatorXfromLng(this.bounds.getWest()) * worldSize),\n minY: Math.floor(mercatorYfromLat(this.bounds.getNorth()) * worldSize),\n maxX: Math.ceil(mercatorXfromLng(this.bounds.getEast()) * worldSize),\n maxY: Math.ceil(mercatorYfromLat(this.bounds.getSouth()) * worldSize)\n };\n const hit = tileID.x >= level.minX && tileID.x < level.maxX && tileID.y >= level.minY && tileID.y < level.maxY;\n return hit;\n }\n}\n","import {Event, ErrorEvent, Evented} from '../util/evented';\n\nimport {extend, pick} from '../util/util';\nimport {loadTileJson} from './load_tilejson';\nimport {TileBounds} from '../tile/tile_bounds';\nimport {ResourceType} from '../util/request_manager';\nimport {MessageType} from '../util/actor_messages';\nimport {isAbortError} from '../util/abort_error';\n\nimport type {Source} from './source';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Tile} from '../tile/tile';\nimport type {VectorSourceSpecification, PromoteIdSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {WorkerTileParameters, OverzoomParameters, WorkerTileResult} from './worker_source';\n\nexport type VectorTileSourceOptions = VectorSourceSpecification & {\n collectResourceTiming?: boolean;\n tileSize?: number;\n};\n\n/**\n * A source containing vector tiles in [Maplibre Vector Tile format](https://maplibre.org/maplibre-tile-spec/) or [Mapbox Vector Tile format](https://docs.mapbox.com/vector-tiles/reference/).\n * (See the [Style Specification](https://maplibre.org/maplibre-style-spec/) for detailed documentation of options.)\n *\n * @group Sources\n *\n * @example\n * ```ts\n * map.addSource('some id', {\n * type: 'vector',\n * url: 'https://demotiles.maplibre.org/tiles/tiles.json'\n * });\n * ```\n *\n * @example\n * ```ts\n * map.addSource('some id', {\n * type: 'vector',\n * tiles: ['https://d25uarhxywzl1j.cloudfront.net/v0.1/{z}/{x}/{y}.mvt'],\n * minzoom: 6,\n * maxzoom: 14\n * });\n * ```\n *\n * @example\n * ```ts\n * map.getSource('some id').setUrl(\"https://demotiles.maplibre.org/tiles/tiles.json\");\n * ```\n *\n * @example\n * ```ts\n * map.getSource('some id').setTiles(['https://d25uarhxywzl1j.cloudfront.net/v0.1/{z}/{x}/{y}.mvt']);\n * ```\n * @see [Add a vector tile source](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-vector-tile-source/)\n */\nexport class VectorTileSource extends Evented implements Source {\n type: 'vector';\n id: string;\n minzoom: number;\n maxzoom: number;\n url: string;\n scheme: string;\n encoding: string;\n tileSize: number;\n promoteId: PromoteIdSpecification;\n\n _options: VectorSourceSpecification;\n _collectResourceTiming: boolean;\n dispatcher: Dispatcher;\n map: Map;\n bounds: [number, number, number, number];\n tiles: Array;\n tileBounds: TileBounds;\n reparseOverscaled: boolean;\n isTileClipped: boolean;\n _tileJSONRequest: AbortController;\n _loaded: boolean;\n\n constructor(id: string, options: VectorTileSourceOptions, dispatcher: Dispatcher, eventedParent: Evented) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n\n this.type = 'vector';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.scheme = 'xyz';\n this.tileSize = 512;\n this.reparseOverscaled = true;\n this.isTileClipped = true;\n this._loaded = false;\n\n extend(this, pick(options, ['url', 'scheme', 'tileSize', 'promoteId', 'encoding']));\n this._options = extend({type: 'vector'}, options);\n\n this._collectResourceTiming = options.collectResourceTiming;\n\n if (this.tileSize !== 512) {\n throw new Error('vector tile sources must have a tileSize of 512');\n }\n\n this.setEventedParent(eventedParent);\n }\n\n async load() {\n this._loaded = false;\n this.fire(new Event('dataloading', {dataType: 'source'}));\n this._tileJSONRequest = new AbortController();\n try {\n const tileJSON = await loadTileJson(this._options, this.map._requestManager, this._tileJSONRequest);\n this._tileJSONRequest = null;\n this._loaded = true;\n this.map.style.tileManagers[this.id].clearTiles();\n if (tileJSON) {\n extend(this, tileJSON);\n if (tileJSON.bounds) this.tileBounds = new TileBounds(tileJSON.bounds, this.minzoom, this.maxzoom);\n\n // `content` is included here to prevent a race condition where `Style._updateSources` is called\n // before the TileJSON arrives. this makes sure the tiles needed are loaded once TileJSON arrives\n // ref: https://github.com/mapbox/mapbox-gl-js/pull/4347#discussion_r104418088\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'metadata'}));\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'content'}));\n }\n } catch (err) {\n this._tileJSONRequest = null;\n this._loaded = true; // let's pretend it's loaded so the source will be ignored\n\n // only fire error event if it is not due to aborting the request\n if (!isAbortError(err)) {\n this.fire(new ErrorEvent(err));\n }\n }\n }\n\n loaded(): boolean {\n return this._loaded;\n }\n\n hasTile(tileID: OverscaledTileID) {\n return !this.tileBounds || this.tileBounds.contains(tileID.canonical);\n }\n\n onAdd(map: Map) {\n this.map = map;\n this.load();\n }\n\n setSourceProperty(callback: Function) {\n if (this._tileJSONRequest) {\n this._tileJSONRequest.abort();\n }\n\n callback();\n\n this.load();\n }\n\n /**\n * Sets the source `tiles` property and re-renders the map.\n *\n * @param tiles - An array of one or more tile source URLs, as in the TileJSON spec.\n */\n setTiles(tiles: Array): this {\n this.setSourceProperty(() => {\n this._options.tiles = tiles;\n });\n\n return this;\n }\n\n /**\n * Sets the source `url` property and re-renders the map.\n *\n * @param url - A URL to a TileJSON resource. Supported protocols are `http:` and `https:`.\n */\n setUrl(url: string): this {\n this.setSourceProperty(() => {\n this.url = url;\n this._options.url = url;\n });\n\n return this;\n }\n\n onRemove() {\n if (this._tileJSONRequest) {\n this._tileJSONRequest.abort();\n this._tileJSONRequest = null;\n }\n }\n\n serialize(): VectorSourceSpecification {\n return extend({}, this._options);\n }\n\n async loadTile(tile: Tile): Promise {\n const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n const params: WorkerTileParameters = {\n request: this.map._requestManager.transformRequest(url, ResourceType.Tile),\n uid: tile.uid,\n tileID: tile.tileID,\n zoom: tile.tileID.overscaledZ,\n tileSize: this.tileSize * tile.tileID.overscaleFactor(),\n type: this.type,\n source: this.id,\n pixelRatio: this.map.getPixelRatio(),\n showCollisionBoxes: this.map.showCollisionBoxes,\n promoteId: this.promoteId,\n subdivisionGranularity: this.map.style.projection.subdivisionGranularity,\n encoding: this.encoding,\n overzoomParameters: this._getOverzoomParameters(tile),\n };\n params.request.collectResourceTiming = this._collectResourceTiming;\n let messageType: MessageType.loadTile | MessageType.reloadTile = MessageType.reloadTile;\n if (!tile.actor || tile.state === 'expired') {\n tile.actor = this.dispatcher.getActor();\n messageType = MessageType.loadTile;\n } else if (tile.state === 'loading') {\n return new Promise((resolve, reject) => {\n tile.reloadPromise = {resolve, reject};\n });\n }\n tile.abortController = new AbortController();\n try {\n const data = await tile.actor.sendAsync({type: messageType, data: params}, tile.abortController);\n delete tile.abortController;\n\n if (tile.aborted) {\n return;\n }\n this._afterTileLoadWorkerResponse(tile, data);\n } catch (err) {\n delete tile.abortController;\n\n if (tile.aborted) {\n return;\n }\n if (err && err.status !== 404) {\n throw err;\n }\n this._afterTileLoadWorkerResponse(tile, null);\n }\n }\n\n /**\n * When the requested tile has a higher canonical Z than source maxzoom, pass overzoom parameters so worker can load the\n * deepest tile at source max zoom to generate sub tiles using geojsonvt for highest performance on vector overscaling\n */\n private _getOverzoomParameters(tile: Tile): OverzoomParameters | undefined {\n if (tile.tileID.canonical.z <= this.maxzoom) {\n return undefined;\n }\n if (this.map._zoomLevelsToOverscale === undefined) {\n return undefined;\n }\n const maxZoomTileID = tile.tileID.scaledTo(this.maxzoom).canonical;\n const maxZoomTileUrl = maxZoomTileID.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n\n return {\n maxZoomTileID,\n overzoomRequest: this.map._requestManager.transformRequest(maxZoomTileUrl, ResourceType.Tile)\n };\n }\n\n private _afterTileLoadWorkerResponse(tile: Tile, data: WorkerTileResult) {\n if (data && data.resourceTiming) {\n tile.resourceTiming = data.resourceTiming;\n }\n\n if (data && this.map._refreshExpiredTiles) {\n tile.setExpiryData(data);\n }\n tile.loadVectorData(data, this.map.painter);\n\n if (tile.reloadPromise) {\n const reloadPromise = tile.reloadPromise;\n tile.reloadPromise = null;\n this.loadTile(tile).then(reloadPromise.resolve).catch(reloadPromise.reject);\n }\n }\n\n async abortTile(tile: Tile): Promise {\n if (tile.abortController) {\n tile.abortController.abort();\n delete tile.abortController;\n }\n if (tile.actor) {\n await tile.actor.sendAsync({\n type: MessageType.abortTile,\n data: {uid: tile.uid, type: this.type, source: this.id}\n });\n }\n }\n\n async unloadTile(tile: Tile): Promise {\n tile.unloadVectorData();\n if (tile.actor) {\n await tile.actor.sendAsync({\n type: MessageType.removeTile,\n data: {\n uid: tile.uid,\n type: this.type,\n source: this.id}\n });\n }\n }\n\n hasTransition() {\n return false;\n }\n}\n","import {extend, pick} from '../util/util';\n\nimport {ImageRequest} from '../util/image_request';\n\nimport {ResourceType} from '../util/request_manager';\nimport {Event, ErrorEvent, Evented} from '../util/evented';\nimport {loadTileJson} from './load_tilejson';\nimport {TileBounds} from '../tile/tile_bounds';\nimport {Texture} from '../render/texture';\nimport {isAbortError} from '../util/abort_error';\n\nimport type {Source} from './source';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Tile} from '../tile/tile';\nimport type {\n RasterSourceSpecification,\n RasterDEMSourceSpecification\n} from '@maplibre/maplibre-gl-style-spec';\n\n/**\n * A source containing raster tiles (See the [raster source documentation](https://maplibre.org/maplibre-style-spec/sources/#raster) for detailed documentation of options.)\n *\n * @group Sources\n *\n * \\> ℹ️ **Note:** The default `tileSize` is `512`. If your tile provider (such as OpenStreetMap or Stadia Maps) serves 256px tiles, set `tileSize: 256` manually to avoid blurry rendering due to upscaling.\n *\n * @example\n * ```ts\n * map.addSource('raster-source', {\n * 'type': 'raster',\n * 'tiles': ['https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg'],\n * 'tileSize': 256, // Set this to match tile server output to avoid blurry rendering\n * });\n * ```\n *\n * @example\n * ```ts\n * map.addSource('wms-test-source', {\n * 'type': 'raster',\n * // use the tiles option to specify a WMS tile source URL\n * 'tiles': [\n * 'https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015'\n * ],\n * 'tileSize': 256 // Important for WMS if tiles are 256px\n * });\n * ```\n * @see [Add a raster tile source](https://maplibre.org/maplibre-gl-js/docs/examples/map-tiles/)\n * @see [Add a WMS source](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-wms-source/)\n * @see [Display a satellite map](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-satellite-map/)\n */\nexport class RasterTileSource extends Evented implements Source {\n type: 'raster' | 'raster-dem';\n id: string;\n minzoom: number;\n maxzoom: number;\n url: string;\n scheme: string;\n tileSize: number;\n\n bounds: [number, number, number, number];\n tileBounds: TileBounds;\n roundZoom: boolean;\n dispatcher: Dispatcher;\n map: Map;\n tiles: Array;\n\n _loaded: boolean;\n _options: RasterSourceSpecification | RasterDEMSourceSpecification;\n _tileJSONRequest: AbortController;\n\n constructor(id: string, options: RasterSourceSpecification | RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n this.setEventedParent(eventedParent);\n\n this.type = 'raster';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.roundZoom = true;\n this.scheme = 'xyz';\n this.tileSize = 512;\n this._loaded = false;\n\n this._options = extend({type: 'raster'}, options);\n extend(this, pick(options, ['url', 'scheme', 'tileSize']));\n }\n\n async load(sourceDataChanged: boolean = false) {\n this._loaded = false;\n this.fire(new Event('dataloading', {dataType: 'source'}));\n this._tileJSONRequest = new AbortController();\n try {\n const tileJSON = await loadTileJson(this._options, this.map._requestManager, this._tileJSONRequest);\n this._tileJSONRequest = null;\n this._loaded = true;\n if (tileJSON) {\n extend(this, tileJSON);\n if (tileJSON.bounds) this.tileBounds = new TileBounds(tileJSON.bounds, this.minzoom, this.maxzoom);\n\n // `content` is included here to prevent a race condition where `Style._updateSources` is called\n // before the TileJSON arrives. this makes sure the tiles needed are loaded once TileJSON arrives\n // ref: https://github.com/mapbox/mapbox-gl-js/pull/4347#discussion_r104418088\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'metadata'}));\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'content', sourceDataChanged}));\n }\n } catch (err) {\n this._tileJSONRequest = null;\n this._loaded = true; // let's pretend it's loaded so the source will be ignored\n\n // only fire error event if it is not due to aborting the request\n if (!isAbortError(err)) {\n this.fire(new ErrorEvent(err));\n }\n }\n }\n\n loaded(): boolean {\n return this._loaded;\n }\n\n onAdd(map: Map) {\n this.map = map;\n this.load();\n }\n\n onRemove() {\n if (this._tileJSONRequest) {\n this._tileJSONRequest.abort();\n this._tileJSONRequest = null;\n }\n }\n\n setSourceProperty(callback: Function) {\n if (this._tileJSONRequest) {\n this._tileJSONRequest.abort();\n this._tileJSONRequest = null;\n }\n\n callback();\n\n this.load(true);\n }\n\n /**\n * Sets the source `tiles` property and re-renders the map.\n *\n * @param tiles - An array of one or more tile source URLs, as in the raster tiles spec (See the [Style Specification](https://maplibre.org/maplibre-style-spec/)\n */\n setTiles(tiles: Array): this {\n this.setSourceProperty(() => {\n this._options.tiles = tiles;\n });\n\n return this;\n }\n\n /**\n * Sets the source `url` property and re-renders the map.\n *\n * @param url - A URL to a TileJSON resource. Supported protocols are `http:` and `https:`.\n */\n setUrl(url: string): this {\n this.setSourceProperty(() => {\n this.url = url;\n this._options.url = url;\n });\n\n return this;\n }\n\n serialize() {\n return extend({}, this._options);\n }\n\n hasTile(tileID: OverscaledTileID) {\n return !this.tileBounds || this.tileBounds.contains(tileID.canonical);\n }\n\n async loadTile(tile: Tile): Promise {\n const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n tile.abortController = new AbortController();\n try {\n const response = await ImageRequest.getImage(this.map._requestManager.transformRequest(url, ResourceType.Tile), tile.abortController, this.map._refreshExpiredTiles);\n delete tile.abortController;\n if (tile.aborted) {\n tile.state = 'unloaded';\n return;\n }\n if (response && response.data) {\n if (this.map._refreshExpiredTiles && (response.cacheControl || response.expires)) {\n tile.setExpiryData({cacheControl: response.cacheControl, expires: response.expires});\n }\n const context = this.map.painter.context;\n const gl = context.gl;\n const img = response.data;\n tile.texture = this.map.painter.getTileTexture(img.width);\n if (tile.texture) {\n tile.texture.update(img, {useMipmap: true});\n } else {\n tile.texture = new Texture(context, img, gl.RGBA, {useMipmap: true});\n tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n }\n tile.state = 'loaded';\n }\n } catch (err) {\n delete tile.abortController;\n if (tile.aborted) {\n tile.state = 'unloaded';\n } else if (err) {\n tile.state = 'errored';\n throw err;\n }\n }\n }\n\n async abortTile(tile: Tile) {\n if (tile.abortController) {\n tile.abortController.abort();\n delete tile.abortController;\n }\n }\n\n async unloadTile(tile: Tile) {\n if (tile.texture) {\n this.map.painter.saveTileTexture(tile.texture);\n }\n }\n\n hasTransition() {\n return false;\n }\n}\n","import {ImageRequest} from '../util/image_request';\nimport {ResourceType} from '../util/request_manager';\nimport {extend, isImageBitmap, readImageUsingVideoFrame} from '../util/util';\nimport {type Evented} from '../util/evented';\nimport {browser} from '../util/browser';\nimport {offscreenCanvasSupported} from '../util/offscreen_canvas_supported';\nimport {OverscaledTileID} from '../tile/tile_id';\nimport {RasterTileSource} from './raster_tile_source';\n// ensure DEMData is registered for worker transfer on main thread:\nimport '../data/dem_data';\nimport type {DEMEncoding} from '../data/dem_data';\n\nimport type {Source} from './source';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Tile} from '../tile/tile';\nimport type {RasterDEMSourceSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {isOffscreenCanvasDistorted} from '../util/offscreen_canvas_distorted';\nimport {RGBAImage} from '../util/image';\nimport {MessageType} from '../util/actor_messages';\n\n/**\n * A source containing raster DEM tiles (See the [Style Specification](https://maplibre.org/maplibre-style-spec/) for detailed documentation of options.)\n * This source can be used to show hillshading and 3D terrain\n *\n * @group Sources\n *\n * @example\n * ```ts\n * map.addSource('raster-dem-source', {\n * type: 'raster-dem',\n * url: 'https://demotiles.maplibre.org/terrain-tiles/tiles.json',\n * tileSize: 256\n * });\n * ```\n * @see [3D Terrain](https://maplibre.org/maplibre-gl-js/docs/examples/3d-terrain/)\n */\nexport class RasterDEMTileSource extends RasterTileSource implements Source {\n encoding: DEMEncoding;\n redFactor?: number;\n greenFactor?: number;\n blueFactor?: number;\n baseShift?: number;\n\n constructor(id: string, options: RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented) {\n super(id, options, dispatcher, eventedParent);\n this.type = 'raster-dem';\n this.maxzoom = 22;\n this._options = extend({type: 'raster-dem'}, options);\n this.encoding = options.encoding || 'mapbox';\n this.redFactor = options.redFactor;\n this.greenFactor = options.greenFactor;\n this.blueFactor = options.blueFactor;\n this.baseShift = options.baseShift;\n }\n\n override async loadTile(tile: Tile): Promise {\n const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n const request = this.map._requestManager.transformRequest(url, ResourceType.Tile);\n tile.neighboringTiles = this._getNeighboringTiles(tile.tileID);\n tile.abortController = new AbortController();\n try {\n const response = await ImageRequest.getImage(request, tile.abortController, this.map._refreshExpiredTiles);\n delete tile.abortController;\n if (tile.aborted) {\n tile.state = 'unloaded';\n return;\n }\n if (response && response.data) {\n const img = response.data;\n if (this.map._refreshExpiredTiles && (response.cacheControl || response.expires)) {\n tile.setExpiryData({cacheControl: response.cacheControl, expires: response.expires});\n }\n const transfer = isImageBitmap(img) && offscreenCanvasSupported();\n const rawImageData = transfer ? img : await this.readImageNow(img);\n const params = {\n type: this.type,\n uid: tile.uid,\n source: this.id,\n rawImageData,\n encoding: this.encoding,\n redFactor: this.redFactor,\n greenFactor: this.greenFactor,\n blueFactor: this.blueFactor,\n baseShift: this.baseShift\n };\n\n if (!tile.actor || tile.state === 'expired') {\n tile.actor = this.dispatcher.getActor();\n const data = await tile.actor.sendAsync({type: MessageType.loadDEMTile, data: params});\n tile.dem = data;\n tile.needsHillshadePrepare = true;\n tile.needsTerrainPrepare = true;\n tile.state = 'loaded';\n }\n }\n } catch (err) {\n delete tile.abortController;\n if (tile.aborted) {\n tile.state = 'unloaded';\n } else if (err) {\n tile.state = 'errored';\n throw err;\n }\n }\n }\n\n async readImageNow(img: ImageBitmap | HTMLImageElement): Promise {\n if (typeof VideoFrame !== 'undefined' && isOffscreenCanvasDistorted()) {\n const width = img.width + 2;\n const height = img.height + 2;\n try {\n return new RGBAImage({width, height}, await readImageUsingVideoFrame(img, -1, -1, width, height));\n } catch {\n // fall-back to browser canvas decoding\n }\n }\n return browser.getImageData(img, 1);\n }\n\n _getNeighboringTiles(tileID: OverscaledTileID): Record {\n const canonical = tileID.canonical;\n const dim = Math.pow(2, canonical.z);\n\n const px = (canonical.x - 1 + dim) % dim;\n const pxw = canonical.x === 0 ? tileID.wrap - 1 : tileID.wrap;\n const nx = (canonical.x + 1 + dim) % dim;\n const nxw = canonical.x + 1 === dim ? tileID.wrap + 1 : tileID.wrap;\n\n const neighboringTiles: Record = {};\n // add adjacent tiles\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y).key] = {backfilled: false};\n\n // Add upper neighboringTiles\n if (canonical.y > 0) {\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y - 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, tileID.wrap, canonical.z, canonical.x, canonical.y - 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y - 1).key] = {backfilled: false};\n }\n // Add lower neighboringTiles\n if (canonical.y + 1 < dim) {\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y + 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, tileID.wrap, canonical.z, canonical.x, canonical.y + 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y + 1).key] = {backfilled: false};\n }\n\n return neighboringTiles;\n }\n\n async unloadTile(tile: Tile) {\n if (tile.demTexture) this.map.painter.saveTileTexture(tile.demTexture);\n if (tile.fbo) {\n tile.fbo.destroy();\n delete tile.fbo;\n }\n if (tile.dem) delete tile.dem;\n delete tile.neighboringTiles;\n\n tile.state = 'unloaded';\n if (tile.actor) {\n await tile.actor.sendAsync({type: MessageType.removeDEMTile, data: {type: this.type, uid: tile.uid, source: this.id}});\n }\n }\n}\n","import {LngLatBounds} from '../geo/lng_lat_bounds';\n\nfunction getCoordinatesFromGeometry(geometry: GeoJSON.Geometry): number[] {\n if (geometry.type === 'GeometryCollection') {\n return geometry.geometries.map((g: Exclude) => g.coordinates).flat(Infinity) as number[];\n }\n return geometry.coordinates.flat(Infinity) as number[];\n}\n\n/**\n * Calculates the bounding box of GeoJSON data.\n * @param data - The GeoJSON data to calculate bounds for\n * @returns The bounding box of the GeoJSON data\n */\nexport function getGeoJSONBounds(data: GeoJSON.GeoJSON): LngLatBounds {\n const bounds = new LngLatBounds();\n let coordinates: number[];\n switch (data.type) {\n case 'FeatureCollection':\n coordinates = data.features.map(f => getCoordinatesFromGeometry(f.geometry)).flat(Infinity) as number[];\n break;\n case 'Feature':\n coordinates = getCoordinatesFromGeometry(data.geometry);\n break;\n default:\n coordinates = getCoordinatesFromGeometry(data);\n break;\n }\n if (coordinates.length == 0) {\n return bounds;\n }\n for (let i = 0; i < coordinates.length - 1; i += 2) {\n bounds.extend([coordinates[i], coordinates[i+1]]);\n }\n return bounds;\n}\n","import {Event, ErrorEvent, Evented} from '../util/evented';\nimport {extend, warnOnce, type ExactlyOne} from '../util/util';\nimport {EXTENT} from '../data/extent';\nimport {ResourceType} from '../util/request_manager';\nimport {browser} from '../util/browser';\nimport {applySourceDiff, mergeSourceDiffs, toUpdateable} from './geojson_source_diff';\nimport {getGeoJSONBounds} from '../util/geojson_bounds';\nimport {MessageType} from '../util/actor_messages';\nimport {tileIdToLngLatBounds} from '../tile/tile_id_to_lng_lat_bounds';\n\nimport type {LngLatBounds} from '../geo/lng_lat_bounds';\nimport type {Source} from './source';\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Tile} from '../tile/tile';\nimport type {Actor} from '../util/actor';\nimport type {GeoJSONSourceSpecification, PromoteIdSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {GeoJSONFeatureId, GeoJSONSourceDiff} from './geojson_source_diff';\nimport type {GeoJSONWorkerOptions, LoadGeoJSONParameters} from './geojson_worker_source';\nimport type {WorkerTileParameters} from './worker_source';\n\n/**\n * Options object for GeoJSONSource.\n */\nexport type GeoJSONSourceOptions = GeoJSONSourceSpecification & {\n workerOptions?: GeoJSONWorkerOptions;\n collectResourceTiming?: boolean;\n data: GeoJSON.GeoJSON | string;\n};\n\nexport type GeoJSONSourceInternalOptions = {\n data?: GeoJSON.GeoJSON | string | undefined;\n cluster?: boolean;\n clusterMaxZoom?: number;\n clusterRadius?: number;\n clusterMinPoints?: number;\n generateId?: boolean;\n};\n\n/**\n * @internal\n */\nexport type GeoJSONSourceShouldReloadTileOptions = {\n /**\n * Refresh all tiles that WILL contain these bounds.\n */\n affectedBounds: LngLatBounds[];\n};\n\n/**\n * The cluster options to set\n */\nexport type SetClusterOptions = {\n /**\n * Whether or not to cluster\n */\n cluster?: boolean;\n /**\n * The cluster's max zoom.\n * Non-integer values are rounded to the closest integer due to supercluster integer value requirements.\n */\n clusterMaxZoom?: number;\n /**\n * The cluster's radius\n */\n clusterRadius?: number;\n};\n\n/**\n * A source containing GeoJSON.\n * (See the [Style Specification](https://maplibre.org/maplibre-style-spec/#sources-geojson) for detailed documentation of options.)\n *\n * @group Sources\n *\n * @example\n * ```ts\n * map.addSource('some id', {\n * type: 'geojson',\n * data: 'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_ports.geojson'\n * });\n * ```\n *\n * @example\n * ```ts\n * map.addSource('some id', {\n * type: 'geojson',\n * data: {\n * \"type\": \"FeatureCollection\",\n * \"features\": [{\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [\n * -76.53063297271729,\n * 39.18174077994108\n * ]\n * }\n * }]\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * map.getSource('some id').setData({\n * \"type\": \"FeatureCollection\",\n * \"features\": [{\n * \"type\": \"Feature\",\n * \"properties\": { \"name\": \"Null Island\" },\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [ 0, 0 ]\n * }\n * }]\n * });\n * ```\n * @see [Draw GeoJSON points](https://maplibre.org/maplibre-gl-js/docs/examples/draw-geojson-points/)\n * @see [Add a GeoJSON line](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-geojson-line/)\n * @see [Create a heatmap from points](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-heatmap-layer/)\n * @see [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)\n */\nexport class GeoJSONSource extends Evented implements Source {\n type: 'geojson';\n id: string;\n minzoom: number;\n maxzoom: number;\n tileSize: number;\n attribution: string;\n promoteId: PromoteIdSpecification;\n\n isTileClipped: boolean;\n reparseOverscaled: boolean;\n _data: ExactlyOne<{\n url: string;\n geojson: GeoJSON.GeoJSON;\n updateable: globalThis.Map;\n }>;\n _options: GeoJSONSourceInternalOptions;\n workerOptions: GeoJSONWorkerOptions;\n map: Map;\n actor: Actor;\n _isUpdatingWorker: boolean;\n _pendingWorkerUpdate: { data?: GeoJSON.GeoJSON | string; diff?: GeoJSONSourceDiff; optionsChanged?: boolean };\n _collectResourceTiming: boolean;\n _removed: boolean;\n\n /** @internal */\n constructor(id: string, options: GeoJSONSourceOptions, dispatcher: Dispatcher, eventedParent: Evented) {\n super();\n\n this.id = id;\n\n // `type` is a property rather than a constant to make it easy for 3rd\n // parties to use GeoJSONSource to build their own source types.\n this.type = 'geojson';\n\n this.minzoom = 0;\n this.maxzoom = 18;\n this.tileSize = 512;\n this.isTileClipped = true;\n this.reparseOverscaled = true;\n this._removed = false;\n this._isUpdatingWorker = false;\n this._pendingWorkerUpdate = {data: options.data};\n\n this.actor = dispatcher.getActor();\n this.setEventedParent(eventedParent);\n\n this._data = typeof options.data === 'string' ? {url: options.data} : {geojson: options.data};\n this._options = extend({}, options);\n\n this._collectResourceTiming = options.collectResourceTiming;\n\n if (options.maxzoom !== undefined) this.maxzoom = options.maxzoom;\n if (options.type) this.type = options.type;\n if (options.attribution) this.attribution = options.attribution;\n this.promoteId = options.promoteId;\n\n if (options.clusterMaxZoom !== undefined && this.maxzoom <= options.clusterMaxZoom) {\n warnOnce(`The maxzoom value \"${this.maxzoom}\" is expected to be greater than the clusterMaxZoom value \"${options.clusterMaxZoom}\".`);\n }\n\n // sent to the worker, along with `url: ...` or `data: literal geojson`,\n // so that it can load/parse/index the geojson data\n // extending with `options.workerOptions` helps to make it easy for\n // third-party sources to hack/reuse GeoJSONSource.\n this.workerOptions = extend({\n source: this.id,\n cluster: options.cluster || false,\n geojsonVtOptions: {\n buffer: this._pixelsToTileUnits(options.buffer !== undefined ? options.buffer : 128),\n tolerance: this._pixelsToTileUnits(options.tolerance !== undefined ? options.tolerance : 0.375),\n extent: EXTENT,\n maxZoom: this.maxzoom,\n lineMetrics: options.lineMetrics || false,\n generateId: options.generateId || false\n },\n superclusterOptions: {\n maxZoom: this._getClusterMaxZoom(options.clusterMaxZoom),\n minPoints: Math.max(2, options.clusterMinPoints || 2),\n extent: EXTENT,\n radius: this._pixelsToTileUnits(options.clusterRadius || 50),\n log: false,\n generateId: options.generateId || false\n },\n clusterProperties: options.clusterProperties,\n filter: options.filter\n }, options.workerOptions);\n\n // send the promoteId to the worker to have more flexible updates, but only if it is a string\n if (typeof this.promoteId === 'string') {\n this.workerOptions.promoteId = this.promoteId;\n }\n }\n\n private _hasPendingWorkerUpdate(): boolean {\n return this._pendingWorkerUpdate.data !== undefined || this._pendingWorkerUpdate.diff !== undefined || this._pendingWorkerUpdate.optionsChanged;\n }\n\n private _pixelsToTileUnits(pixelValue: number): number {\n return pixelValue * (EXTENT / this.tileSize);\n }\n\n private _getClusterMaxZoom(clusterMaxZoom: number): number {\n const effectiveClusterMaxZoom = clusterMaxZoom ? Math.round(clusterMaxZoom) : this.maxzoom - 1;\n if (!(Number.isInteger(clusterMaxZoom) || clusterMaxZoom === undefined)) {\n warnOnce(`Integer expected for option 'clusterMaxZoom': provided value \"${clusterMaxZoom}\" rounded to \"${effectiveClusterMaxZoom}\"`);\n }\n return effectiveClusterMaxZoom;\n }\n\n async load() {\n await this._updateWorkerData();\n }\n\n onAdd(map: Map) {\n this.map = map;\n this.load();\n }\n\n /**\n * Sets the GeoJSON data and re-renders the map.\n *\n * @param data - A GeoJSON data object or a URL to one. The latter is preferable in the case of large GeoJSON files.\n * @param waitForCompletion - If true, the method will return a promise that resolves when set data is complete.\n */\n setData(data: GeoJSON.GeoJSON | string, waitForCompletion: true): Promise;\n setData(data: GeoJSON.GeoJSON | string, waitForCompletion?: false): this;\n setData(data: GeoJSON.GeoJSON | string, waitForCompletion?: boolean): this | Promise {\n this._data = typeof data === 'string' ? {url: data} : {geojson: data};\n this._pendingWorkerUpdate = {data};\n const updatePromise = this._updateWorkerData();\n if (waitForCompletion) return updatePromise;\n return this;\n }\n\n /**\n * Updates the source's GeoJSON, and re-renders the map.\n *\n * For sources with lots of features, this method can be used to make updates more quickly.\n *\n * This approach requires unique IDs for every feature in the source. The IDs can either be specified on the feature,\n * or by using the promoteId option to specify which property should be used as the ID.\n *\n * It is an error to call updateData on a source that did not have unique IDs for each of its features already.\n *\n * Updates are applied on a best-effort basis, updating an ID that does not exist will not result in an error.\n *\n * @param diff - The changes that need to be applied.\n * @param waitForCompletion - If true, the method will return a promise that resolves when the update is complete.\n */\n updateData(diff: GeoJSONSourceDiff, waitForCompletion: true): Promise;\n updateData(diff: GeoJSONSourceDiff, waitForCompletion?: false): this;\n updateData(diff: GeoJSONSourceDiff, waitForCompletion?: boolean): this | Promise {\n this._pendingWorkerUpdate.diff = mergeSourceDiffs(this._pendingWorkerUpdate.diff, diff);\n const updatePromise = this._updateWorkerData();\n if (waitForCompletion) return updatePromise;\n return this;\n }\n\n /**\n * Allows to get the source's actual GeoJSON data.\n *\n * @returns a promise which resolves to the source's actual GeoJSON data\n */\n async getData(): Promise {\n const options: LoadGeoJSONParameters = extend({type: this.type}, this.workerOptions);\n return this.actor.sendAsync({type: MessageType.getData, data: options});\n }\n\n /**\n * Allows getting the source's boundaries.\n * If there's a problem with the source's data, it will return an empty {@link LngLatBounds}.\n * @returns a promise which resolves to the source's boundaries\n */\n async getBounds(): Promise {\n return getGeoJSONBounds(await this.getData());\n }\n\n /**\n * To disable/enable clustering on the source options\n * @param options - The options to set\n * @example\n * ```ts\n * map.getSource('some id').setClusterOptions({cluster: false});\n * map.getSource('some id').setClusterOptions({cluster: false, clusterRadius: 50, clusterMaxZoom: 14});\n * ```\n */\n setClusterOptions(options: SetClusterOptions): this {\n this.workerOptions.cluster = options.cluster;\n if (options.clusterRadius !== undefined) {\n this.workerOptions.superclusterOptions.radius = this._pixelsToTileUnits(options.clusterRadius);\n }\n if (options.clusterMaxZoom !== undefined) {\n this.workerOptions.superclusterOptions.maxZoom = this._getClusterMaxZoom(options.clusterMaxZoom);\n }\n this._pendingWorkerUpdate.optionsChanged = true;\n this._updateWorkerData();\n return this;\n }\n\n /**\n * For clustered sources, fetches the zoom at which the given cluster expands.\n *\n * @param clusterId - The value of the cluster's `cluster_id` property.\n * @returns a promise that is resolved with the zoom number\n */\n getClusterExpansionZoom(clusterId: number): Promise {\n return this.actor.sendAsync({type: MessageType.getClusterExpansionZoom, data: {type: this.type, clusterId, source: this.id}});\n }\n\n /**\n * For clustered sources, fetches the children of the given cluster on the next zoom level (as an array of GeoJSON features).\n *\n * @param clusterId - The value of the cluster's `cluster_id` property.\n * @returns a promise that is resolved when the features are retrieved\n */\n getClusterChildren(clusterId: number): Promise> {\n return this.actor.sendAsync({type: MessageType.getClusterChildren, data: {type: this.type, clusterId, source: this.id}});\n }\n\n /**\n * For clustered sources, fetches the original points that belong to the cluster (as an array of GeoJSON features).\n *\n * @param clusterId - The value of the cluster's `cluster_id` property.\n * @param limit - The maximum number of features to return.\n * @param offset - The number of features to skip (e.g. for pagination).\n * @returns a promise that is resolved when the features are retrieved\n * @example\n * Retrieve cluster leaves on click\n * ```ts\n * map.on('click', 'clusters', (e) => {\n * let features = map.queryRenderedFeatures(e.point, {\n * layers: ['clusters']\n * });\n *\n * let clusterId = features[0].properties.cluster_id;\n * let pointCount = features[0].properties.point_count;\n * let clusterSource = map.getSource('clusters');\n *\n * const features = await clusterSource.getClusterLeaves(clusterId, pointCount);\n * // Print cluster leaves in the console\n * console.log('Cluster leaves:', features);\n * });\n * ```\n */\n getClusterLeaves(clusterId: number, limit: number, offset: number): Promise> {\n return this.actor.sendAsync({type: MessageType.getClusterLeaves, data: {\n type: this.type,\n source: this.id,\n clusterId,\n limit,\n offset\n }});\n }\n\n /**\n * Responsible for invoking WorkerSource's geojson.loadData target, which\n * handles loading the geojson data and preparing to serve it up as tiles,\n * using geojson-vt or supercluster as appropriate.\n */\n async _updateWorkerData(): Promise {\n if (this._isUpdatingWorker) return;\n\n if (!this._hasPendingWorkerUpdate()) {\n warnOnce(`No pending worker updates for GeoJSONSource ${this.id}.`);\n return;\n }\n\n const {data, diff} = this._pendingWorkerUpdate;\n\n const options: LoadGeoJSONParameters = extend({type: this.type}, this.workerOptions);\n if (data !== undefined) {\n if (typeof data === 'string') {\n options.request = this.map._requestManager.transformRequest(browser.resolveURL(data as string), ResourceType.Source);\n options.request.collectResourceTiming = this._collectResourceTiming;\n } else {\n options.data = data;\n }\n\n this._pendingWorkerUpdate.data = undefined;\n } else if (diff) {\n options.dataDiff = diff;\n this._pendingWorkerUpdate.diff = undefined;\n }\n\n // Reset the flag since this update is using the latest options\n this._pendingWorkerUpdate.optionsChanged = undefined;\n\n this._isUpdatingWorker = true;\n this.fire(new Event('dataloading', {dataType: 'source'}));\n try {\n const result = await this.actor.sendAsync({type: MessageType.loadData, data: options});\n this._isUpdatingWorker = false;\n if (this._removed || result.abandoned) {\n this.fire(new Event('dataabort', {dataType: 'source'}));\n return;\n }\n if (result.data) this._data = {geojson: result.data};\n const affectedGeometries = this._applyDiffToSource(diff);\n const shouldReloadTileOptions = this._getShouldReloadTileOptions(affectedGeometries);\n\n let resourceTiming: PerformanceResourceTiming[] = null;\n if (result.resourceTiming && result.resourceTiming[this.id]) {\n resourceTiming = result.resourceTiming[this.id].slice(0);\n }\n\n const eventData: any = {dataType: 'source'};\n if (this._collectResourceTiming && resourceTiming && resourceTiming.length > 0) {\n extend(eventData, {resourceTiming});\n }\n\n // although GeoJSON sources contain no metadata, we fire this event to let the TileManager\n // know its ok to start requesting tiles.\n this.fire(new Event('data', {...eventData, sourceDataType: 'metadata'}));\n this.fire(new Event('data', {...eventData, sourceDataType: 'content', shouldReloadTileOptions}));\n } catch (err) {\n this._isUpdatingWorker = false;\n if (this._removed) {\n this.fire(new Event('dataabort', {dataType: 'source'}));\n return;\n }\n this.fire(new ErrorEvent(err));\n } finally {\n // If there is more pending data, update worker again.\n if (this._hasPendingWorkerUpdate()) {\n this._updateWorkerData();\n }\n }\n }\n\n /**\n * Apply a diff to this source's data and return the affected feature geometries.\n * @param diff - The {@link GeoJSONSourceDiff} to apply.\n * @returns The affected geometries, or undefined if the diff is not applicable or all geometries are affected.\n */\n private _applyDiffToSource(diff: GeoJSONSourceDiff): GeoJSON.Geometry[] | undefined {\n if (!diff) {\n return undefined;\n }\n\n const promoteId = typeof this.promoteId === 'string' ? this.promoteId : undefined;\n\n // Lazily convert `this._data` to updateable if it's not already\n if (!this._data.url && !this._data.updateable) {\n const updateable = toUpdateable(this._data.geojson, promoteId);\n if (!updateable) throw new Error(`GeoJSONSource \"${this.id}\": GeoJSON data is not compatible with updateData`);\n this._data = {updateable};\n }\n\n if (!this._data.updateable) {\n return undefined;\n }\n const affectedGeometries = applySourceDiff(this._data.updateable, diff, promoteId);\n\n if (diff.removeAll || this._options.cluster) {\n return undefined;\n }\n\n return affectedGeometries;\n }\n\n /**\n * Get options for use in determining whether to reload a tile based on the modified features.\n * @param affectedGeometries - The feature geometries affected by the update.\n * @returns A {@link GeoJSONSourceShouldReloadTileOptions} object which contains an array of affected bounds caused by the update.\n */\n private _getShouldReloadTileOptions(affectedGeometries: GeoJSON.Geometry[]): GeoJSONSourceShouldReloadTileOptions | undefined {\n if (!affectedGeometries) return undefined;\n\n const affectedBounds = affectedGeometries\n .filter(Boolean)\n .map(g => getGeoJSONBounds(g));\n\n return {affectedBounds};\n }\n\n /**\n * Determine whether a tile should be reloaded based on a set of options associated with a {@link MapSourceDataChangedEvent}.\n * @internal\n */\n shouldReloadTile(tile: Tile, {affectedBounds}: GeoJSONSourceShouldReloadTileOptions) : boolean {\n if (tile.state === 'loading') {\n return true;\n }\n if (tile.state === 'unloaded') {\n return false;\n }\n\n // Update the tile if contained or will contain an updated feature.\n const {buffer, extent} = this.workerOptions.geojsonVtOptions;\n const tileBounds = tileIdToLngLatBounds(\n tile.tileID.canonical,\n buffer / extent\n );\n for (const bounds of affectedBounds) {\n if (tileBounds.intersects(bounds)) {\n return true;\n }\n }\n\n return false;\n }\n\n loaded(): boolean {\n return !this._isUpdatingWorker && !this._hasPendingWorkerUpdate();\n }\n\n async loadTile(tile: Tile): Promise {\n const message = !tile.actor ? MessageType.loadTile : MessageType.reloadTile;\n tile.actor = this.actor;\n const params: WorkerTileParameters = {\n type: this.type,\n uid: tile.uid,\n tileID: tile.tileID,\n zoom: tile.tileID.overscaledZ,\n maxZoom: this.maxzoom,\n tileSize: this.tileSize,\n source: this.id,\n pixelRatio: this.map.getPixelRatio(),\n showCollisionBoxes: this.map.showCollisionBoxes,\n promoteId: this.promoteId,\n subdivisionGranularity: this.map.style.projection.subdivisionGranularity\n };\n\n tile.abortController = new AbortController();\n const data = await this.actor.sendAsync({type: message, data: params}, tile.abortController);\n delete tile.abortController;\n tile.unloadVectorData();\n\n if (!tile.aborted) {\n tile.loadVectorData(data, this.map.painter, message === MessageType.reloadTile);\n }\n }\n\n async abortTile(tile: Tile) {\n if (tile.abortController) {\n tile.abortController.abort();\n delete tile.abortController;\n }\n tile.aborted = true;\n }\n\n async unloadTile(tile: Tile) {\n tile.unloadVectorData();\n await this.actor.sendAsync({type: MessageType.removeTile, data: {uid: tile.uid, type: this.type, source: this.id}});\n }\n\n onRemove() {\n this._removed = true;\n this.actor.sendAsync({type: MessageType.removeSource, data: {type: this.type, source: this.id}});\n }\n\n serialize(): GeoJSONSourceSpecification {\n return extend({}, this._options, {\n type: this.type,\n data: this._data.updateable ?\n {\n type: 'FeatureCollection',\n features: Array.from(this._data.updateable.values())\n } :\n this._data.url || this._data.geojson\n });\n }\n\n hasTransition() {\n return false;\n }\n}\n","import {latFromMercatorY, lngFromMercatorX} from '../geo/mercator_coordinate';\nimport {LngLatBounds} from '../geo/lng_lat_bounds';\nimport type {CanonicalTileID} from './tile_id';\n\nexport function tileIdToLngLatBounds(\n {x,y,z}: CanonicalTileID,\n buffer: number = 0,\n): LngLatBounds {\n const lngMin = lngFromMercatorX((x - buffer) / Math.pow(2, z));\n const latMin = latFromMercatorY((y + 1 + buffer) / Math.pow(2, z));\n\n const lngMax = lngFromMercatorX((x + 1 + buffer) / Math.pow(2, z));\n const latMax = latFromMercatorY((y - buffer) / Math.pow(2, z));\n\n return new LngLatBounds([lngMin, latMin], [lngMax, latMax]);\n}\n","import {CanonicalTileID} from '../tile/tile_id';\nimport {Event, ErrorEvent, Evented} from '../util/evented';\nimport {ImageRequest} from '../util/image_request';\nimport {ResourceType} from '../util/request_manager';\nimport {Texture} from '../render/texture';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\n\nimport type {Source} from './source';\nimport type {CanvasSourceSpecification} from './canvas_source';\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Tile} from '../tile/tile';\nimport type {\n ImageSourceSpecification,\n VideoSourceSpecification\n} from '@maplibre/maplibre-gl-style-spec';\nimport type Point from '@mapbox/point-geometry';\nimport {MAX_TILE_ZOOM} from '../util/util';\nimport {Bounds} from '../geo/bounds';\nimport {isAbortError} from '../util/abort_error';\n\n/**\n * Four geographical coordinates,\n * represented as arrays of longitude and latitude numbers, which define the corners of the image.\n * The coordinates start at the top left corner of the image and proceed in clockwise order.\n * They do not have to represent a rectangle.\n */\nexport type Coordinates = [[number, number], [number, number], [number, number], [number, number]];\n\n/**\n * The options object for the {@link ImageSource.updateImage} method\n */\nexport type UpdateImageOptions = {\n /**\n * Required image URL.\n */\n url: string;\n /**\n * The image coordinates\n */\n coordinates?: Coordinates;\n};\n\nexport type CanonicalTileRange = {\n minTileX: number;\n minTileY: number;\n maxTileX: number;\n maxTileY: number;\n};\n\n/**\n * A data source containing an image.\n * (See the [Style Specification](https://maplibre.org/maplibre-style-spec/#sources-image) for detailed documentation of options.)\n *\n * @group Sources\n *\n * @example\n * ```ts\n * // add to map\n * map.addSource('some id', {\n * type: 'image',\n * url: 'https://www.maplibre.org/images/foo.png',\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update coordinates\n * let mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * // update url and coordinates simultaneously\n * mySource.updateImage({\n * url: 'https://www.maplibre.org/images/bar.png',\n * coordinates: [\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]\n * })\n *\n * map.removeSource('some id'); // remove\n * ```\n */\nexport class ImageSource extends Evented implements Source {\n type: string;\n id: string;\n minzoom: number;\n maxzoom: number;\n tileSize: number;\n url: string;\n /**\n * This object is used to store the range of terrain tiles that overlap with this tile.\n * It is relevant for image tiles, as the image exceeds single tile boundaries.\n */\n terrainTileRanges: {[zoom: string]: CanonicalTileRange};\n\n coordinates: Coordinates;\n tiles: {[_: string]: Tile};\n options: any;\n dispatcher: Dispatcher;\n map: Map;\n texture: Texture | null;\n image: HTMLImageElement | ImageBitmap;\n tileID: CanonicalTileID;\n tileCoords: Array;\n flippedWindingOrder: boolean = false;\n _loaded: boolean;\n _request: AbortController;\n\n /** @internal */\n constructor(id: string, options: ImageSourceSpecification | VideoSourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n this.coordinates = options.coordinates;\n\n this.type = 'image';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.tileSize = 512;\n this.tiles = {};\n this._loaded = false;\n\n this.setEventedParent(eventedParent);\n\n this.options = options;\n }\n\n async load(newCoordinates?: Coordinates): Promise {\n this._loaded = false;\n this.fire(new Event('dataloading', {dataType: 'source'}));\n\n this.url = this.options.url;\n\n this._request = new AbortController();\n try {\n const image = await ImageRequest.getImage(this.map._requestManager.transformRequest(this.url, ResourceType.Image), this._request);\n this._request = null;\n this._loaded = true;\n\n if (image && image.data) {\n this.image = image.data;\n if (newCoordinates) {\n this.coordinates = newCoordinates;\n }\n this._finishLoading();\n }\n } catch (err) {\n this._request = null;\n this._loaded = true;\n if (!isAbortError(err)) {\n this.fire(new ErrorEvent(err));\n }\n }\n }\n\n loaded(): boolean {\n return this._loaded;\n }\n\n /**\n * Updates the image URL and, optionally, the coordinates. To avoid having the image flash after changing,\n * set the `raster-fade-duration` paint property on the raster layer to 0.\n *\n * @param options - The options object.\n */\n updateImage(options: UpdateImageOptions): this {\n if (!options.url) {\n return this;\n }\n\n if (this._request) {\n this._request.abort();\n this._request = null;\n }\n\n this.options.url = options.url;\n this.load(options.coordinates).finally(() => { this.texture = null; });\n return this;\n }\n\n _finishLoading() {\n if (this.map) {\n this.setCoordinates(this.coordinates);\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'metadata'}));\n }\n }\n\n onAdd(map: Map) {\n this.map = map;\n this.load();\n }\n\n onRemove() {\n if (this._request) {\n this._request.abort();\n this._request = null;\n }\n }\n\n /**\n * Sets the image's coordinates and re-renders the map.\n *\n * @param coordinates - Four geographical coordinates,\n * represented as arrays of longitude and latitude numbers, which define the corners of the image.\n * The coordinates start at the top left corner of the image and proceed in clockwise order.\n * They do not have to represent a rectangle.\n */\n setCoordinates(coordinates: Coordinates): this {\n this.coordinates = coordinates;\n\n // Calculate which mercator tile is suitable for rendering the video in\n // and create a buffer with the corner coordinates. These coordinates\n // may be outside the tile, because raster tiles aren't clipped when rendering.\n\n // transform the geo coordinates into (zoom 0) tile space coordinates\n const cornerCoords = coordinates.map(MercatorCoordinate.fromLngLat);\n\n // Compute the coordinates of the tile we'll use to hold this image's\n // render data\n this.tileID = getCoordinatesCenterTileID(cornerCoords);\n\n // Compute tiles overlapping with the image. We need to know for which\n // terrain tiles we have to render the image.\n this.terrainTileRanges = this._getOverlappingTileRanges(cornerCoords);\n\n // Constrain min/max zoom to our tile's zoom level in order to force\n // TileManager to request this tile (no matter what the map's zoom\n // level)\n this.minzoom = this.maxzoom = this.tileID.z;\n\n // Transform the corner coordinates into the coordinate space of our\n // tile.\n this.tileCoords = cornerCoords.map((coord) => this.tileID.getTilePoint(coord)._round());\n this.flippedWindingOrder = hasWrongWindingOrder(this.tileCoords);\n\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'content'}));\n return this;\n }\n\n prepare() {\n if (Object.keys(this.tiles).length === 0 || !this.image) {\n return;\n }\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.texture) {\n this.texture = new Texture(context, this.image, gl.RGBA);\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n }\n\n let newTilesLoaded = false;\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n newTilesLoaded = true;\n }\n }\n\n if (newTilesLoaded) {\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'idle', sourceId: this.id}));\n }\n }\n\n async loadTile(tile: Tile): Promise {\n // We have a single tile -- whose coordinates are this.tileID -- that\n // covers the image we want to render. If that's the one being\n // requested, set it up with the image; otherwise, mark the tile as\n // `errored` to indicate that we have no data for it.\n // If the world wraps, we may have multiple \"wrapped\" copies of the\n // single tile.\n if (this.tileID && this.tileID.equals(tile.tileID.canonical)) {\n this.tiles[String(tile.tileID.wrap)] = tile;\n tile.buckets = {};\n } else {\n tile.state = 'errored';\n }\n }\n\n serialize(): ImageSourceSpecification | VideoSourceSpecification | CanvasSourceSpecification {\n return {\n type: 'image',\n url: this.options.url,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return false;\n }\n\n /**\n * Given a list of coordinates, determine overlapping tile ranges for all zoom levels.\n *\n * @returns Overlapping tile ranges for all zoom levels.\n * @internal\n */\n private _getOverlappingTileRanges(\n coords: Array\n ): {[zoom: string]: CanonicalTileRange} {\n const {minX, minY, maxX, maxY} = Bounds.fromPoints(coords);\n\n const ranges: {[zoom: string]: CanonicalTileRange} = {};\n\n for (let z = 0; z <= MAX_TILE_ZOOM; z++) {\n const tilesAtZoom = Math.pow(2, z);\n const minTileX = Math.floor(minX * tilesAtZoom);\n const minTileY = Math.floor(minY * tilesAtZoom);\n const maxTileX = Math.floor(maxX * tilesAtZoom);\n const maxTileY = Math.floor(maxY * tilesAtZoom);\n\n ranges[z] = {\n minTileX,\n minTileY,\n maxTileX,\n maxTileY\n };\n }\n\n return ranges;\n }\n}\n\n/**\n * Given a list of coordinates, get their center as a coordinate.\n *\n * @returns centerpoint\n * @internal\n */\nexport function getCoordinatesCenterTileID(coords: Array) {\n const bounds = Bounds.fromPoints(coords);\n\n const dx = bounds.width();\n const dy = bounds.height();\n const dMax = Math.max(dx, dy);\n const zoom = Math.max(0, Math.floor(-Math.log(dMax) / Math.LN2));\n const tilesAtZoom = Math.pow(2, zoom);\n\n return new CanonicalTileID(\n zoom,\n Math.floor((bounds.minX + bounds.maxX) / 2 * tilesAtZoom),\n Math.floor((bounds.minY + bounds.maxY) / 2 * tilesAtZoom));\n}\n\nfunction hasWrongWindingOrder(coords: Array) {\n const e0x = coords[1].x - coords[0].x;\n const e0y = coords[1].y - coords[0].y;\n const e1x = coords[2].x - coords[0].x;\n const e1y = coords[2].y - coords[0].y;\n\n const crossProduct = e0x * e1y - e0y * e1x;\n\n return crossProduct < 0;\n}\n","import {getVideo} from '../util/ajax';\nimport {ResourceType} from '../util/request_manager';\n\nimport {ImageSource} from './image_source';\nimport {Texture} from '../render/texture';\nimport {Event, ErrorEvent} from '../util/evented';\nimport {ValidationError} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Evented} from '../util/evented';\nimport type {VideoSourceSpecification} from '@maplibre/maplibre-gl-style-spec';\n\n/**\n * A data source containing video.\n * (See the [Style Specification](https://maplibre.org/maplibre-style-spec/#sources-video) for detailed documentation of options.)\n *\n * @group Sources\n *\n * @example\n * ```ts\n * // add to map\n * map.addSource('some id', {\n * type: 'video',\n * url: [\n * 'https://www.mapbox.com/blog/assets/baltimore-smoke.mp4',\n * 'https://www.mapbox.com/blog/assets/baltimore-smoke.webm'\n * ],\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update\n * let mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * map.removeSource('some id'); // remove\n * ```\n * @see [Add a video](https://maplibre.org/maplibre-gl-js/docs/examples/video-on-a-map/)\n *\n * Note that when rendered as a raster layer, the layer's `raster-fade-duration` property will cause the video to fade in.\n * This happens when playback is started, paused and resumed, or when the video's coordinates are updated. To avoid this behavior,\n * set the layer's `raster-fade-duration` property to `0`.\n */\nexport class VideoSource extends ImageSource {\n options: VideoSourceSpecification;\n urls: Array;\n video: HTMLVideoElement;\n roundZoom: boolean;\n\n constructor(id: string, options: VideoSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented) {\n super(id, options, dispatcher, eventedParent);\n this.roundZoom = true;\n this.type = 'video';\n this.options = options;\n }\n\n async load() {\n this._loaded = false;\n const options = this.options;\n\n this.urls = [];\n for (const url of options.urls) {\n this.urls.push(this.map._requestManager.transformRequest(url, ResourceType.Source).url);\n }\n try {\n const video = await getVideo(this.urls);\n this._loaded = true;\n if (!video) {\n return;\n }\n this.video = video;\n this.video.loop = true;\n\n // Start repainting when video starts playing. hasTransition() will then return\n // true to trigger additional frames as long as the videos continues playing.\n this.video.addEventListener('playing', () => {\n this.map.triggerRepaint();\n });\n\n if (this.map) {\n this.video.play();\n }\n\n this._finishLoading();\n } catch (err) {\n this.fire(new ErrorEvent(err));\n }\n }\n\n /**\n * Pauses the video.\n */\n pause() {\n if (this.video) {\n this.video.pause();\n }\n }\n\n /**\n * Plays the video.\n */\n play() {\n if (this.video) {\n this.video.play();\n }\n }\n\n /**\n * Sets playback to a timestamp, in seconds.\n */\n seek(seconds: number) {\n if (this.video) {\n const seekableRange = this.video.seekable;\n if (seconds < seekableRange.start(0) || seconds > seekableRange.end(0)) {\n this.fire(new ErrorEvent(new ValidationError(`sources.${this.id}`, null, `Playback for this video can be set only between the ${seekableRange.start(0)} and ${seekableRange.end(0)}-second mark.`)));\n } else this.video.currentTime = seconds;\n }\n }\n\n /**\n * Returns the HTML `video` element.\n *\n * @returns The HTML `video` element.\n */\n getVideo(): HTMLVideoElement {\n return this.video;\n }\n\n onAdd(map: Map) {\n if (this.map) return;\n this.map = map;\n this.load();\n if (this.video) {\n this.video.play();\n this.setCoordinates(this.coordinates);\n }\n }\n\n /**\n * Sets the video's coordinates and re-renders the map.\n */\n prepare(): this {\n if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) {\n return; // not enough data for current position\n }\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.texture) {\n this.texture = new Texture(context, this.video, gl.RGBA);\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n } else if (!this.video.paused) {\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.video);\n }\n\n let newTilesLoaded = false;\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n newTilesLoaded = true;\n }\n }\n\n if (newTilesLoaded) {\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'idle', sourceId: this.id}));\n }\n }\n\n serialize(): VideoSourceSpecification {\n return {\n type: 'video',\n urls: this.urls,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return this.video && !this.video.paused;\n }\n}\n","import {ImageSource} from './image_source';\n\nimport {Texture} from '../render/texture';\nimport {Event, ErrorEvent} from '../util/evented';\nimport {ValidationError} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {Map} from '../ui/map';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {Evented} from '../util/evented';\n\n/**\n * Options to add a canvas source type to the map.\n */\nexport type CanvasSourceSpecification = {\n /**\n * Source type. Must be `\"canvas\"`.\n */\n type: 'canvas';\n /**\n * Four geographical coordinates denoting where to place the corners of the canvas, specified in `[longitude, latitude]` pairs.\n */\n coordinates: [[number, number], [number, number], [number, number], [number, number]];\n /**\n * Whether the canvas source is animated. If the canvas is static (i.e. pixels do not need to be re-read on every frame), `animate` should be set to `false` to improve performance.\n * @defaultValue true\n */\n animate?: boolean;\n /**\n * Canvas source from which to read pixels. Can be a string representing the ID of the canvas element, or the `HTMLCanvasElement` itself.\n */\n canvas?: string | HTMLCanvasElement;\n};\n\n/**\n * A data source containing the contents of an HTML canvas. See {@link CanvasSourceSpecification} for detailed documentation of options.\n *\n * @group Sources\n *\n * @example\n * ```ts\n * // add to map\n * map.addSource('some id', {\n * type: 'canvas',\n * canvas: 'idOfMyHTMLCanvas',\n * animate: true,\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update\n * let mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * map.removeSource('some id'); // remove\n * ```\n */\nexport class CanvasSource extends ImageSource {\n options: CanvasSourceSpecification;\n animate: boolean;\n canvas: HTMLCanvasElement;\n width: number;\n height: number;\n /**\n * Enables animation. The image will be copied from the canvas to the map on each frame.\n */\n play: () => void;\n /**\n * Disables animation. The map will display a static copy of the canvas image.\n */\n pause: () => void;\n _playing: boolean;\n\n /** @internal */\n constructor(id: string, options: CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented) {\n super(id, options, dispatcher, eventedParent);\n\n // We build in some validation here, since canvas sources aren't included in the style spec:\n if (!options.coordinates) {\n this.fire(new ErrorEvent(new ValidationError(`sources.${id}`, null, 'missing required property \"coordinates\"')));\n } else if (!Array.isArray(options.coordinates) || options.coordinates.length !== 4 ||\n options.coordinates.some(c => !Array.isArray(c) || c.length !== 2 || c.some(l => typeof l !== 'number'))) {\n this.fire(new ErrorEvent(new ValidationError(`sources.${id}`, null, '\"coordinates\" property must be an array of 4 longitude/latitude array pairs')));\n }\n\n if (options.animate && typeof options.animate !== 'boolean') {\n this.fire(new ErrorEvent(new ValidationError(`sources.${id}`, null, 'optional \"animate\" property must be a boolean value')));\n }\n\n if (!options.canvas) {\n this.fire(new ErrorEvent(new ValidationError(`sources.${id}`, null, 'missing required property \"canvas\"')));\n } else if (typeof options.canvas !== 'string' && !(options.canvas instanceof HTMLCanvasElement)) {\n this.fire(new ErrorEvent(new ValidationError(`sources.${id}`, null, '\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance')));\n }\n\n this.options = options;\n this.animate = options.animate !== undefined ? options.animate : true;\n }\n\n async load() {\n this._loaded = true;\n if (!this.canvas) {\n this.canvas = (this.options.canvas instanceof HTMLCanvasElement) ?\n this.options.canvas :\n document.getElementById(this.options.canvas) as HTMLCanvasElement;\n // cast to HTMLCanvasElement in else of ternary\n // should we do a safety check and throw if it's not actually HTMLCanvasElement?\n }\n this.width = this.canvas.width;\n this.height = this.canvas.height;\n\n if (this._hasInvalidDimensions()) {\n this.fire(new ErrorEvent(new Error('Canvas dimensions cannot be less than or equal to zero.')));\n return;\n }\n\n this.play = function() {\n this._playing = true;\n this.map.triggerRepaint();\n };\n\n this.pause = function() {\n if (this._playing) {\n this.prepare();\n this._playing = false;\n }\n };\n\n this._finishLoading();\n }\n\n /**\n * Returns the HTML `canvas` element.\n *\n * @returns The HTML `canvas` element.\n */\n getCanvas(): HTMLCanvasElement {\n return this.canvas;\n }\n\n onAdd(map: Map) {\n this.map = map;\n this.load();\n if (this.canvas) {\n if (this.animate) this.play();\n }\n }\n\n onRemove() {\n this.pause();\n }\n\n prepare() {\n let resize = false;\n if (this.canvas.width !== this.width) {\n this.width = this.canvas.width;\n resize = true;\n }\n if (this.canvas.height !== this.height) {\n this.height = this.canvas.height;\n resize = true;\n }\n\n if (this._hasInvalidDimensions()) return;\n\n if (Object.keys(this.tiles).length === 0) return; // not enough data for current position\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.texture) {\n this.texture = new Texture(context, this.canvas, gl.RGBA, {premultiply: true});\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n } else if (resize || this._playing) {\n this.texture.update(this.canvas, {premultiply: true});\n }\n\n let newTilesLoaded = false;\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n newTilesLoaded = true;\n }\n }\n\n if (newTilesLoaded) {\n this.fire(new Event('data', {dataType: 'source', sourceDataType: 'idle', sourceId: this.id}));\n }\n }\n\n serialize(): CanvasSourceSpecification {\n return {\n type: 'canvas',\n animate: this.animate,\n canvas: this.options.canvas,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return this._playing;\n }\n\n _hasInvalidDimensions() {\n for (const x of [this.canvas.width, this.canvas.height]) {\n if (isNaN(x) || x <= 0) return true;\n }\n return false;\n }\n}\n","import {VectorTileSource} from '../source/vector_tile_source';\nimport {RasterTileSource} from '../source/raster_tile_source';\nimport {RasterDEMTileSource} from '../source/raster_dem_tile_source';\nimport {GeoJSONSource, type GeoJSONSourceShouldReloadTileOptions} from '../source/geojson_source';\nimport {VideoSource} from '../source/video_source';\nimport {ImageSource} from '../source/image_source';\nimport {CanvasSource} from '../source/canvas_source';\nimport {type Dispatcher} from '../util/dispatcher';\n\nimport type {SourceSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {Event, Evented} from '../util/evented';\nimport type {Map} from '../ui/map';\nimport type {Tile} from '../tile/tile';\nimport type {OverscaledTileID, CanonicalTileID} from '../tile/tile_id';\nimport type {CanvasSourceSpecification} from '../source/canvas_source';\nimport {type CalculateTileZoomFunction} from '../geo/projection/covering_tiles';\n\nconst registeredSources = {} as {[key:string]: SourceClass};\n\n/**\n * The `Source` interface must be implemented by each source type, including \"core\" types (`vector`, `raster`,\n * `video`, etc.) and all custom, third-party types.\n *\n * **Event** `data` - Fired with `{dataType: 'source', sourceDataType: 'metadata'}` to indicate that any necessary metadata\n * has been loaded so that it's okay to call `loadTile`; and with `{dataType: 'source', sourceDataType: 'content'}`\n * to indicate that the source data has changed, so that any current caches should be flushed.\n *\n * @group Sources\n */\nexport interface Source {\n readonly type: string;\n /**\n * The id for the source. Must not be used by any existing source.\n */\n id: string;\n /**\n * The minimum zoom level for the source.\n */\n minzoom: number;\n /**\n * The maximum zoom level for the source.\n */\n maxzoom: number;\n /**\n * The tile size for the source.\n */\n tileSize: number;\n /**\n * The attribution for the source.\n */\n attribution?: string;\n /**\n * `true` if zoom levels are rounded to the nearest integer in the source data, `false` if they are floor-ed to the nearest integer.\n */\n roundZoom?: boolean;\n /**\n * `false` if tiles can be drawn outside their boundaries, `true` if they cannot.\n */\n isTileClipped?: boolean;\n tileID?: CanonicalTileID;\n /**\n * `true` if tiles should be sent back to the worker for each overzoomed zoom level, `false` if not.\n */\n reparseOverscaled?: boolean;\n vectorLayerIds?: Array;\n /**\n * True if the source has transition, false otherwise.\n */\n hasTransition(): boolean;\n /**\n * True if the source is loaded, false otherwise.\n */\n loaded(): boolean;\n /**\n * An ability to fire an event to all the listeners, see {@link Evented}\n * @param event - The event to fire\n */\n fire(event: Event): unknown;\n /**\n * This method is called when the source is added to the map.\n * @param map - The map instance\n */\n onAdd?(map: Map): void;\n /**\n * This method is called when the source is removed from the map.\n * @param map - The map instance\n */\n onRemove?(map: Map): void;\n /**\n * This method does the heavy lifting of loading a tile.\n * In most cases it will defer the work to the relevant worker source.\n * @param tile - The tile to load\n */\n loadTile(tile: Tile): Promise;\n /**\n * True is the tile is part of the source, false otherwise.\n * @param tileID - The tile ID\n */\n hasTile?(tileID: OverscaledTileID): boolean;\n /**\n * Allows to abort a tile loading.\n * @param tile - The tile to abort\n */\n abortTile?(tile: Tile): Promise;\n /**\n * Allows to unload a tile.\n * @param tile - The tile to unload\n */\n unloadTile?(tile: Tile): Promise;\n /**\n * @returns A plain (stringifiable) JS object representing the current state of the source.\n * Creating a source using the returned object as the `options` should result in a Source that is\n * equivalent to this one.\n */\n serialize(): any;\n /**\n * Allows to execute a prepare step before the source is used.\n */\n prepare?(): void;\n /**\n * Optional function to redefine how tiles are loaded at high pitch angles.\n */\n calculateTileZoom?: CalculateTileZoomFunction;\n /**\n * Optional function to determine whether a tile should be reloaded, given a\n * set of options associated with a `MapSourceDataChangedEvent`.\n * @internal\n */\n shouldReloadTile?(tile: Tile, options: GeoJSONSourceShouldReloadTileOptions): boolean;\n}\n\n/**\n * A general definition of a {@link Source} class for factory usage\n */\nexport type SourceClass = {\n new (id: string, specification: SourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented): Source;\n};\n\n/**\n * Creates a tiled data source instance given an options object.\n *\n * @param id - The id for the source. Must not be used by any existing source.\n * @param specification - Source options, specific to the source type (except for `options.type`, which is always required).\n * @param source - A source definition object compliant with\n * [`maplibre-gl-style-spec`](https://maplibre.org/maplibre-style-spec/#sources) or, for a third-party source type,\n * with that type's requirements.\n * @param dispatcher - A {@link Dispatcher} instance, which can be used to send messages to the workers.\n * @returns a newly created source\n */\nexport const create = (id: string, specification: SourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented): Source => {\n\n const Class = getSourceType(specification.type);\n const source = new Class(id, specification, dispatcher, eventedParent);\n\n if (source.id !== id) {\n throw new Error(`Expected Source id to be ${id} instead of ${source.id}`);\n }\n\n return source;\n};\n\nconst getSourceType = (name: string): SourceClass => {\n switch (name) {\n case 'geojson':\n return GeoJSONSource;\n case 'image':\n return ImageSource;\n case 'raster':\n return RasterTileSource;\n case 'raster-dem':\n return RasterDEMTileSource;\n case 'vector':\n return VectorTileSource;\n case 'video':\n return VideoSource;\n case 'canvas':\n return CanvasSource;\n }\n return registeredSources[name];\n};\n\nconst setSourceType = (name: string, type: SourceClass) => {\n registeredSources[name] = type;\n};\n\n/**\n * Adds a custom source type, making it available for use with {@link Map.addSource}.\n * @param name - The name of the source type; source definition objects use this name in the `{type: ...}` field.\n * @param SourceType - A {@link SourceClass} - which is a constructor for the `Source` interface.\n * @returns a promise that is resolved when the source type is ready or rejected with an error.\n */\nexport const addSourceType = async (name: string, SourceType: SourceClass): Promise => {\n if (getSourceType(name)) {\n throw new Error(`A source type called \"${name}\" already exists.`);\n }\n setSourceType(name, SourceType);\n};\n","/**\n * The possible option of the plugin's status\n *\n * `unavailable`: Not loaded.\n *\n * `deferred`: The plugin URL has been specified, but loading has been deferred.\n *\n * `requested`: at least one tile needs RTL to render, but the plugin has not been set\n *\n * `loading`: RTL is in the process of being loaded by worker.\n *\n * `loaded`: The plugin is now loaded\n *\n * `error`: The plugin failed to load\n */\nexport type RTLPluginStatus =\n 'unavailable' |\n 'deferred' |\n 'requested' |\n 'loading' |\n 'loaded' |\n 'error';\n\n/**\n * The RTL plugin state\n */\nexport type PluginState = {\n pluginStatus: RTLPluginStatus;\n pluginURL: string;\n};\n\nexport const RTLPluginLoadedEventName = 'RTLPluginLoaded';\n\n","\nimport {browser} from '../util/browser';\nimport {Event, Evented} from '../util/evented';\nimport {type RTLPluginStatus, RTLPluginLoadedEventName, type PluginState} from './rtl_text_plugin_status';\nimport {type Dispatcher, getGlobalDispatcher} from '../util/dispatcher';\nimport {MessageType} from '../util/actor_messages';\n\nclass RTLMainThreadPlugin extends Evented {\n status: RTLPluginStatus = 'unavailable';\n url: string = null;\n dispatcher: Dispatcher = getGlobalDispatcher();\n\n /** Sync RTL plugin state by broadcasting a message to the worker */\n _syncState(statusToSend: RTLPluginStatus): Promise {\n this.status = statusToSend;\n return this.dispatcher.broadcast(MessageType.syncRTLPluginState, {pluginStatus: statusToSend, pluginURL: this.url})\n .catch((e: any) => {\n this.status = 'error';\n throw e;\n });\n }\n\n /** This one is exposed to outside */\n getRTLTextPluginStatus(): RTLPluginStatus {\n return this.status;\n }\n\n clearRTLTextPlugin(): void {\n this.status = 'unavailable';\n this.url = null;\n }\n\n async setRTLTextPlugin(url: string, deferred: boolean = false): Promise {\n if (this.url) {\n // error\n throw new Error('setRTLTextPlugin cannot be called multiple times.');\n }\n\n this.url = browser.resolveURL(url);\n if (!this.url) {\n throw new Error(`requested url ${url} is invalid`);\n }\n if (this.status === 'unavailable') {\n\n // from initial state:\n if (deferred) {\n\n this.status = 'deferred';\n // fire and forget: in this case it does not need wait for the broadcasting result\n // it is important to sync the deferred status once because\n // symbol_bucket will be checking it in worker\n this._syncState(this.status);\n\n } else {\n return this._requestImport();\n }\n\n } else if (this.status === 'requested') {\n return this._requestImport();\n }\n }\n\n /** Send a message to worker which will import the RTL plugin script */\n async _requestImport() : Promise {\n\n // all errors/exceptions will be handled by _syncState\n await this._syncState('loading');\n this.status = 'loaded';\n this.fire(new Event(RTLPluginLoadedEventName));\n }\n\n /** Start a lazy loading process of RTL plugin */\n lazyLoad(): void {\n if (this.status === 'unavailable') {\n this.status = 'requested';\n } else if (this.status === 'deferred') {\n this._requestImport();\n }\n }\n}\n\nlet rtlMainThreadPlugin: RTLMainThreadPlugin = null;\n\nexport function rtlMainThreadPluginFactory(): RTLMainThreadPlugin {\n if (!rtlMainThreadPlugin) {\n rtlMainThreadPlugin = new RTLMainThreadPlugin();\n }\n return rtlMainThreadPlugin;\n}\n","import {uniqueId, parseCacheControl} from '../util/util';\nimport {deserialize as deserializeBucket} from '../data/bucket';\nimport {GEOJSON_TILE_LAYER_NAME, type FeatureIndex, type QueryResults} from '../data/feature_index';\nimport {GeoJSONFeature} from '../util/vectortile_to_geojson';\nimport {featureFilter} from '@maplibre/maplibre-gl-style-spec';\nimport {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport {CollisionBoxArray} from '../data/array_types.g';\nimport {Texture} from '../render/texture';\nimport {now} from '../util/time_control';\nimport {toEvaluationFeature} from '../data/evaluation_feature';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\nimport {rtlMainThreadPluginFactory} from '../source/rtl_text_plugin_main_thread';\n\nconst CLOCK_SKEW_RETRY_TIMEOUT = 30000;\n\nimport type {SourceFeatureState} from '../source/source_state';\nimport type {Bucket} from '../data/bucket';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {WorkerTileResult} from '../source/worker_source';\nimport type {Actor} from '../util/actor';\nimport type {DEMData} from '../data/dem_data';\nimport type {AlphaImage} from '../util/image';\nimport type {ImageAtlas} from '../render/image_atlas';\nimport type {ImageManager} from '../render/image_manager';\nimport type {Context} from '../gl/context';\nimport type {OverscaledTileID} from './tile_id';\nimport type {Framebuffer} from '../gl/framebuffer';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {LayerFeatureStates} from '../source/source_state';\nimport type Point from '@mapbox/point-geometry';\nimport type {mat4} from 'gl-matrix';\nimport type {ExpiryData} from '../util/ajax';\nimport type {QueryRenderedFeaturesOptionsStrict, QuerySourceFeatureOptionsStrict} from '../source/query_features';\nimport type {DashEntry} from '../render/line_atlas';\nimport type {VectorTileLayerLike} from '@maplibre/vt-pbf';\n/**\n * The tile's state, can be:\n *\n * - `loading` Tile data is in the process of loading.\n * - `loaded` Tile data has been loaded. Tile can be rendered.\n * - `reloading` Tile data has been loaded and is being updated. Tile can be rendered.\n * - `unloaded` Tile data has been deleted.\n * - `errored` Tile data was not loaded because of an error.\n * - `expired` Tile data was previously loaded, but has expired per its HTTP headers and is in the process of refreshing.\n */\nexport type TileState = 'loading' | 'loaded' | 'reloading' | 'unloaded' | 'errored' | 'expired';\n\n/** @internal */\ntype CrossFadeArgs = {\n fadingRole: FadingRoles;\n fadingDirection: FadingDirections;\n fadingParentID?: OverscaledTileID;\n fadeEndTime: number;\n};\n\nexport enum FadingRoles {\n Base, Parent\n}\nexport enum FadingDirections {\n Departing, Incoming\n}\n\n/**\n * A tile object is the combination of a Coordinate, which defines\n * its place, as well as a unique ID and data tracking for its content\n */\nexport class Tile {\n tileID: OverscaledTileID;\n uid: number;\n uses: number;\n tileSize: number;\n buckets: {[_: string]: Bucket};\n latestFeatureIndex: FeatureIndex | null;\n latestRawTileData: ArrayBuffer;\n latestEncoding: string;\n imageAtlas: ImageAtlas;\n imageAtlasTexture: Texture;\n dashPositions: {[_: string]: DashEntry};\n glyphAtlasImage: AlphaImage;\n glyphAtlasTexture: Texture;\n expirationTime: any;\n expiredRequestCount: number;\n state: TileState;\n fadingRole: FadingRoles;\n fadingDirection: FadingDirections;\n fadingParentID: OverscaledTileID;\n selfFading: boolean;\n timeAdded: number = 0;\n fadeEndTime: number = 0;\n fadeOpacity: number = 1;\n collisionBoxArray: CollisionBoxArray;\n redoWhenDone: boolean;\n showCollisionBoxes: boolean;\n placementSource: any;\n actor: Actor;\n vtLayers: {[_: string]: VectorTileLayerLike};\n\n neighboringTiles: Record;\n dem: DEMData;\n demMatrix: mat4;\n aborted: boolean;\n needsHillshadePrepare: boolean;\n needsTerrainPrepare: boolean;\n abortController: AbortController;\n texture: any;\n fbo: Framebuffer;\n demTexture: Texture;\n refreshedUponExpiration: boolean;\n reloadPromise: {resolve: () => void; reject: () => void};\n resourceTiming: Array;\n queryPadding: number;\n\n symbolFadeHoldUntil: number;\n hasSymbolBuckets: boolean;\n hasRTLText: boolean;\n dependencies: any;\n rtt: Array<{id: number; stamp: number}>;\n rttCoords: {[_:string]: string};\n\n /**\n * @param tileID - the tile ID\n * @param size - The tile size\n */\n constructor(tileID: OverscaledTileID, size: number) {\n this.tileID = tileID;\n this.uid = uniqueId();\n this.uses = 0;\n this.tileSize = size;\n this.buckets = {};\n this.expirationTime = null;\n this.queryPadding = 0;\n this.hasSymbolBuckets = false;\n this.hasRTLText = false;\n this.dependencies = {};\n this.rtt = [];\n this.rttCoords = {};\n\n // Counts the number of times a response was already expired when\n // received. We're using this to add a delay when making a new request\n // so we don't have to keep retrying immediately in case of a server\n // serving expired tiles.\n this.expiredRequestCount = 0;\n\n this.state = 'loading';\n }\n\n isRenderable(symbolLayer: boolean): boolean {\n return (\n this.hasData() &&\n (!this.fadeEndTime || this.fadeOpacity > 0) && // raster fading\n (symbolLayer || !this.holdingForSymbolFade()) // symbol fading\n );\n }\n\n /**\n * @internal\n * Many-to-one crossfade between a base tile and parent/ancestor tile (when zooming)\n */\n setCrossFadeLogic({fadingRole, fadingDirection, fadingParentID, fadeEndTime}: CrossFadeArgs) {\n this.resetFadeLogic();\n\n this.fadingRole = fadingRole;\n this.fadingDirection = fadingDirection;\n this.fadingParentID = fadingParentID;\n this.fadeEndTime = fadeEndTime;\n }\n\n /**\n * Self fading for edge tiles (when panning map)\n */\n setSelfFadeLogic(fadeEndTime: number) {\n this.resetFadeLogic();\n this.selfFading = true;\n this.fadeEndTime = fadeEndTime;\n }\n\n resetFadeLogic() {\n this.fadingRole = null;\n this.fadingDirection = null;\n this.fadingParentID = null;\n this.selfFading = false;\n\n this.timeAdded = now();\n this.fadeEndTime = 0;\n this.fadeOpacity = 1;\n }\n\n wasRequested() {\n return this.state === 'errored' || this.state === 'loaded' || this.state === 'reloading';\n }\n\n clearTextures(painter: any) {\n if (this.demTexture) painter.saveTileTexture(this.demTexture);\n this.demTexture = null;\n }\n\n /**\n * Given a data object with a 'buffers' property, load it into\n * this tile's elementGroups and buffers properties and set loaded\n * to true. If the data is null, like in the case of an empty\n * GeoJSON tile, no-op but still set loaded to true.\n * @param data - The data from the worker\n * @param painter - the painter\n * @param justReloaded - `true` to just reload\n */\n loadVectorData(data: WorkerTileResult, painter: any, justReloaded?: boolean | null) {\n if (this.hasData()) {\n this.unloadVectorData();\n }\n\n this.state = 'loaded';\n\n // empty GeoJSON tile\n if (!data) {\n this.collisionBoxArray = new CollisionBoxArray();\n return;\n }\n\n if (data.featureIndex) {\n this.latestFeatureIndex = data.featureIndex;\n if (data.rawTileData) {\n // Only vector tiles have rawTileData, and they won't update it for\n // 'reloadTile'\n this.latestRawTileData = data.rawTileData;\n this.latestFeatureIndex.rawTileData = data.rawTileData;\n this.latestFeatureIndex.encoding = data.encoding;\n } else if (this.latestRawTileData) {\n // If rawTileData hasn't updated, hold onto a pointer to the last\n // one we received\n this.latestFeatureIndex.rawTileData = this.latestRawTileData;\n this.latestFeatureIndex.encoding = this.latestEncoding;\n }\n }\n this.collisionBoxArray = data.collisionBoxArray;\n this.buckets = deserializeBucket(data.buckets, painter?.style);\n\n this.hasSymbolBuckets = false;\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket instanceof SymbolBucket) {\n this.hasSymbolBuckets = true;\n if (justReloaded) {\n bucket.justReloaded = true;\n } else {\n break;\n }\n }\n }\n\n this.hasRTLText = false;\n if (this.hasSymbolBuckets) {\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket instanceof SymbolBucket) {\n if (bucket.hasRTLText) {\n this.hasRTLText = true;\n rtlMainThreadPluginFactory().lazyLoad();\n break;\n }\n }\n }\n }\n\n this.queryPadding = 0;\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n this.queryPadding = Math.max(this.queryPadding, painter.style.getLayer(id).queryRadius(bucket));\n }\n\n if (data.imageAtlas) {\n this.imageAtlas = data.imageAtlas;\n }\n if (data.glyphAtlasImage) {\n this.glyphAtlasImage = data.glyphAtlasImage;\n }\n this.dashPositions = data.dashPositions;\n }\n\n /**\n * Release any data or WebGL resources referenced by this tile.\n */\n unloadVectorData() {\n for (const id in this.buckets) {\n this.buckets[id].destroy();\n }\n this.buckets = {};\n\n if (this.imageAtlasTexture) {\n this.imageAtlasTexture.destroy();\n }\n\n if (this.imageAtlas) {\n this.imageAtlas = null;\n }\n\n if (this.glyphAtlasTexture) {\n this.glyphAtlasTexture.destroy();\n }\n\n if (this.dashPositions) {\n this.dashPositions = null;\n }\n\n this.latestFeatureIndex = null;\n this.state = 'unloaded';\n }\n\n getBucket(layer: StyleLayer) {\n return this.buckets[layer.id];\n }\n\n upload(context: Context) {\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket.uploadPending()) {\n bucket.upload(context);\n }\n }\n\n const gl = context.gl;\n if (this.imageAtlas && !this.imageAtlas.uploaded) {\n this.imageAtlasTexture = new Texture(context, this.imageAtlas.image, gl.RGBA);\n this.imageAtlas.uploaded = true;\n }\n\n if (this.glyphAtlasImage) {\n this.glyphAtlasTexture = new Texture(context, this.glyphAtlasImage, gl.ALPHA);\n this.glyphAtlasImage = null;\n }\n }\n\n prepare(imageManager: ImageManager) {\n if (this.imageAtlas) {\n this.imageAtlas.patchUpdatedImages(imageManager, this.imageAtlasTexture);\n }\n }\n\n // Queries non-symbol features rendered for this tile.\n // Symbol features are queried globally\n queryRenderedFeatures(\n layers: {[_: string]: StyleLayer},\n serializedLayers: {[_: string]: any},\n sourceFeatureState: SourceFeatureState,\n queryGeometry: Array,\n cameraQueryGeometry: Array,\n scale: number,\n params: Pick | undefined,\n transform: IReadonlyTransform,\n maxPitchScaleFactor: number,\n pixelPosMatrix: mat4,\n getElevation: undefined | ((x: number, y: number) => number)\n ): QueryResults {\n if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData)\n return {};\n\n return this.latestFeatureIndex.query({\n queryGeometry,\n cameraQueryGeometry,\n scale,\n tileSize: this.tileSize,\n pixelPosMatrix,\n transform,\n params,\n queryPadding: this.queryPadding * maxPitchScaleFactor,\n getElevation\n }, layers, serializedLayers, sourceFeatureState);\n }\n\n querySourceFeatures(result: Array, params?: QuerySourceFeatureOptionsStrict) {\n const featureIndex = this.latestFeatureIndex;\n if (!featureIndex || !featureIndex.rawTileData) return;\n\n const vtLayers = featureIndex.loadVTLayers();\n\n const sourceLayer = params && params.sourceLayer ? params.sourceLayer : '';\n const layer = vtLayers[GEOJSON_TILE_LAYER_NAME] || vtLayers[sourceLayer];\n\n if (!layer) return;\n\n const filter = featureFilter(params?.filter, params?.globalState);\n const {z, x, y} = this.tileID.canonical;\n const coord = {z, x, y};\n\n for (let i = 0; i < layer.length; i++) {\n const feature = layer.feature(i);\n if (filter.needGeometry) {\n const evaluationFeature = toEvaluationFeature(feature, true);\n if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), evaluationFeature, this.tileID.canonical)) continue;\n } else if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), feature)) {\n continue;\n }\n const id = featureIndex.getId(feature, sourceLayer);\n const geojsonFeature = new GeoJSONFeature(feature, z, x, y, id);\n (geojsonFeature as any).tile = coord;\n result.push(geojsonFeature);\n }\n }\n\n hasData() {\n return this.state === 'loaded' || this.state === 'reloading' || this.state === 'expired';\n }\n\n patternsLoaded() {\n return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;\n }\n\n setExpiryData(data: ExpiryData) {\n const prior = this.expirationTime;\n\n if (data.cacheControl) {\n const parsedCC = parseCacheControl(data.cacheControl);\n if (parsedCC['max-age']) this.expirationTime = Date.now() + parsedCC['max-age'] * 1000;\n } else if (data.expires) {\n this.expirationTime = new Date(data.expires).getTime();\n }\n\n if (this.expirationTime) {\n const now = Date.now();\n let isExpired = false;\n\n if (this.expirationTime > now) {\n isExpired = false;\n } else if (!prior) {\n isExpired = true;\n } else if (this.expirationTime < prior) {\n // Expiring date is going backwards:\n // fall back to exponential backoff\n isExpired = true;\n\n } else {\n const delta = this.expirationTime - prior;\n\n if (!delta) {\n // Server is serving the same expired resource over and over: fall\n // back to exponential backoff.\n isExpired = true;\n\n } else {\n // Assume that either the client or the server clock is wrong and\n // try to interpolate a valid expiration date (from the client POV)\n // observing a minimum timeout.\n this.expirationTime = now + Math.max(delta, CLOCK_SKEW_RETRY_TIMEOUT);\n\n }\n }\n\n if (isExpired) {\n this.expiredRequestCount++;\n this.state = 'expired';\n } else {\n this.expiredRequestCount = 0;\n }\n }\n }\n\n getExpiryTimeout() {\n if (this.expirationTime) {\n if (this.expiredRequestCount) {\n return 1000 * (1 << Math.min(this.expiredRequestCount - 1, 31));\n } else {\n // Max value for `setTimeout` implementations is a 32 bit integer; cap this accordingly\n return Math.min(this.expirationTime - new Date().getTime(), Math.pow(2, 31) - 1);\n }\n }\n }\n\n setFeatureState(states: LayerFeatureStates, painter: any) {\n if (!this.latestFeatureIndex ||\n !this.latestFeatureIndex.rawTileData ||\n Object.keys(states).length === 0) {\n return;\n }\n\n const vtLayers = this.latestFeatureIndex.loadVTLayers();\n\n for (const id in this.buckets) {\n if (!painter.style.hasLayer(id)) continue;\n\n const bucket = this.buckets[id];\n // Buckets are grouped by common source-layer\n const sourceLayerId = bucket.layers[0]['sourceLayer'] || GEOJSON_TILE_LAYER_NAME;\n const sourceLayer = vtLayers[sourceLayerId];\n const sourceLayerStates = states[sourceLayerId];\n if (!sourceLayer || !sourceLayerStates || Object.keys(sourceLayerStates).length === 0) continue;\n\n bucket.update(sourceLayerStates, sourceLayer, this.imageAtlas && this.imageAtlas.patternPositions || {}, this.dashPositions || {});\n const layer = painter && painter.style && painter.style.getLayer(id);\n if (layer) {\n this.queryPadding = Math.max(this.queryPadding, layer.queryRadius(bucket));\n }\n }\n }\n\n holdingForSymbolFade(): boolean {\n return this.symbolFadeHoldUntil !== undefined;\n }\n\n symbolFadeFinished(): boolean {\n return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < now();\n }\n\n clearSymbolFadeHold() {\n this.symbolFadeHoldUntil = undefined;\n }\n\n setSymbolHoldDuration(duration: number) {\n this.symbolFadeHoldUntil = now() + duration;\n }\n\n setDependencies(namespace: string, dependencies: Array) {\n const index = {};\n for (const dep of dependencies) {\n index[dep] = true;\n }\n this.dependencies[namespace] = index;\n }\n\n hasDependency(namespaces: Array, keys: Array) {\n for (const namespace of namespaces) {\n const dependencies = this.dependencies[namespace];\n if (dependencies) {\n for (const key of keys) {\n if (dependencies[key]) {\n return true;\n }\n }\n }\n }\n return false;\n }\n}\n","import type {CollisionBoxArray} from './array_types.g';\nimport type {Style} from '../style/style';\nimport type {TypedStyleLayer} from '../style/style_layer/typed_style_layer';\nimport type {FeatureIndex} from './feature_index';\nimport type {Context} from '../gl/context';\nimport type {FeatureStates} from '../source/source_state';\nimport type {ImagePosition} from '../render/image_atlas';\nimport type {CanonicalTileID} from '../tile/tile_id';\nimport type Point from '@mapbox/point-geometry';\nimport type {SubdivisionGranularitySetting} from '../render/subdivision_granularity_settings';\nimport type {DashEntry} from '../render/line_atlas';\nimport type {Feature as StyleFeature} from '@maplibre/maplibre-gl-style-spec';\nimport type {VectorTileFeatureLike, VectorTileLayerLike} from '@maplibre/vt-pbf';\n\nexport type BucketParameters = {\n index: number;\n layers: Array;\n zoom: number;\n pixelRatio: number;\n overscaling: number;\n collisionBoxArray: CollisionBoxArray;\n sourceLayerIndex: number;\n sourceID: string;\n};\n\nexport type PopulateParameters = {\n featureIndex: FeatureIndex;\n iconDependencies: {};\n patternDependencies: {};\n glyphDependencies: {};\n dashDependencies: Record}>;\n availableImages: Array;\n subdivisionGranularity: SubdivisionGranularitySetting;\n};\n\nexport type IndexedFeature = {\n feature: VectorTileFeatureLike;\n id: number | string;\n index: number;\n sourceLayerIndex: number;\n};\n\nexport type BucketFeature = {\n index: number;\n sourceLayerIndex: number;\n geometry: Array>;\n properties: any;\n type: 0 | 1 | 2 | 3;\n id?: any;\n readonly patterns: {\n [_: string]: {\n 'min': string;\n 'mid': string;\n 'max': string;\n };\n };\n readonly dashes?: NonNullable;\n sortKey?: number;\n};\n\n/**\n * @hidden\n * The `Bucket` interface is the single point of knowledge about turning vector\n * tiles into WebGL buffers.\n *\n * `Bucket` is an abstract interface. An implementation exists for each style layer type.\n * Create a bucket via the `StyleLayer.createBucket` method.\n *\n * The concrete bucket types, using layout options from the style layer,\n * transform feature geometries into vertex and index data for use by the\n * vertex shader. They also (via `ProgramConfiguration`) use feature\n * properties and the zoom level to populate the attributes needed for\n * data-driven styling.\n *\n * Buckets are designed to be built on a worker thread and then serialized and\n * transferred back to the main thread for rendering. On the worker side, a\n * bucket's vertex, index, and attribute data is stored in `bucket.arrays: ArrayGroup`.\n * When a bucket's data is serialized and sent back to the main thread,\n * is gets deserialized (using `new Bucket(serializedBucketData)`, with\n * the array data now stored in `bucket.buffers: BufferGroup`. BufferGroups\n * hold the same data as ArrayGroups, but are tuned for consumption by WebGL.\n */\nexport interface Bucket {\n layerIds: Array;\n hasDependencies: boolean;\n readonly layers: Array;\n readonly stateDependentLayers: Array;\n readonly stateDependentLayerIds: Array;\n populate(features: Array, options: PopulateParameters, canonical: CanonicalTileID): void;\n update(states: FeatureStates, vtLayer: VectorTileLayerLike, imagePositions: {[_: string]: ImagePosition}, dashPositions: Record): void;\n isEmpty(): boolean;\n upload(context: Context): void;\n uploadPending(): boolean;\n /**\n * Release the WebGL resources associated with the buffers. Note that because\n * buckets are shared between layers having the same layout properties, they\n * must be destroyed in groups (all buckets for a tile, or all symbol buckets).\n */\n destroy(): void;\n}\n\nexport function deserialize(input: Array, style: Style): {[_: string]: Bucket} {\n const output = {};\n\n // Guard against the case where the map's style has been set to null while\n // this bucket has been parsing.\n if (!style) return output;\n\n for (const bucket of input) {\n const layers = bucket.layerIds\n .map((id) => style.getLayer(id))\n .filter(Boolean);\n\n if (layers.length === 0) {\n continue;\n }\n\n // look up StyleLayer objects from layer ids (since we don't\n // want to waste time serializing/copying them from the worker)\n (bucket as any).layers = layers;\n if (bucket.stateDependentLayerIds) {\n (bucket as any).stateDependentLayers = bucket.stateDependentLayerIds.map((lId) => layers.filter((l) => l.id === lId)[0]);\n }\n for (const layer of layers) {\n output[layer.id] = bucket;\n }\n }\n\n return output;\n}\n","import {extend} from '../util/util';\nimport type {Tile} from '../tile/tile';\nimport type {FeatureState} from '@maplibre/maplibre-gl-style-spec';\nimport type {InViewTiles} from '../tile/tile_manager_in_view_tiles';\n\nexport type FeatureStates = {[featureId: string]: FeatureState};\nexport type LayerFeatureStates = {[layer: string]: FeatureStates};\n\n/**\n * @internal\n * SourceFeatureState manages the state and pending changes\n * to features in a source, separated by source layer.\n * stateChanges and deletedStates batch all changes to the tile (updates and removes, respectively)\n * between coalesce() events. addFeatureState() and removeFeatureState() also update their counterpart's\n * list of changes, such that coalesce() can apply the proper state changes while agnostic to the order of operations.\n * In deletedStates, all null's denote complete removal of state at that scope\n*/\nexport class SourceFeatureState {\n state: LayerFeatureStates;\n stateChanges: LayerFeatureStates;\n deletedStates: {};\n\n constructor() {\n this.state = {};\n this.stateChanges = {};\n this.deletedStates = {};\n }\n\n updateState(sourceLayer: string, featureId: number | string, newState: any) {\n const feature = String(featureId);\n this.stateChanges[sourceLayer] = this.stateChanges[sourceLayer] || {};\n this.stateChanges[sourceLayer][feature] = this.stateChanges[sourceLayer][feature] || {};\n extend(this.stateChanges[sourceLayer][feature], newState);\n\n if (this.deletedStates[sourceLayer] === null) {\n this.deletedStates[sourceLayer] = {};\n for (const ft in this.state[sourceLayer]) {\n if (ft !== feature) this.deletedStates[sourceLayer][ft] = null;\n }\n } else {\n const featureDeletionQueued = this.deletedStates[sourceLayer] && this.deletedStates[sourceLayer][feature] === null;\n if (featureDeletionQueued) {\n this.deletedStates[sourceLayer][feature] = {};\n for (const prop in this.state[sourceLayer][feature]) {\n if (!newState[prop]) this.deletedStates[sourceLayer][feature][prop] = null;\n }\n } else {\n for (const key in newState) {\n const deletionInQueue = this.deletedStates[sourceLayer] && this.deletedStates[sourceLayer][feature] && this.deletedStates[sourceLayer][feature][key] === null;\n if (deletionInQueue) delete this.deletedStates[sourceLayer][feature][key];\n }\n }\n }\n }\n\n removeFeatureState(sourceLayer: string, featureId?: number | string, key?: string) {\n const sourceLayerDeleted = this.deletedStates[sourceLayer] === null;\n if (sourceLayerDeleted) return;\n\n const feature = String(featureId);\n\n this.deletedStates[sourceLayer] = this.deletedStates[sourceLayer] || {};\n\n if (key && featureId !== undefined) {\n if (this.deletedStates[sourceLayer][feature] !== null) {\n this.deletedStates[sourceLayer][feature] = this.deletedStates[sourceLayer][feature] || {};\n this.deletedStates[sourceLayer][feature][key] = null;\n }\n } else if (featureId !== undefined) {\n const updateInQueue = this.stateChanges[sourceLayer] && this.stateChanges[sourceLayer][feature];\n if (updateInQueue) {\n this.deletedStates[sourceLayer][feature] = {};\n for (key in this.stateChanges[sourceLayer][feature]) this.deletedStates[sourceLayer][feature][key] = null;\n\n } else {\n this.deletedStates[sourceLayer][feature] = null;\n }\n } else {\n this.deletedStates[sourceLayer] = null;\n }\n\n }\n\n getState(sourceLayer: string, featureId: number | string) {\n const feature = String(featureId);\n const base = this.state[sourceLayer] || {};\n const changes = this.stateChanges[sourceLayer] || {};\n\n const reconciledState = extend({}, base[feature], changes[feature]);\n\n //return empty object if the whole source layer is awaiting deletion\n if (this.deletedStates[sourceLayer] === null) return {};\n else if (this.deletedStates[sourceLayer]) {\n const featureDeletions = this.deletedStates[sourceLayer][featureId];\n if (featureDeletions === null) return {};\n for (const prop in featureDeletions) delete reconciledState[prop];\n }\n return reconciledState;\n }\n\n initializeTileState(tile: Tile, painter: any) {\n tile.setFeatureState(this.state, painter);\n }\n\n coalesceChanges(inViewTiles: InViewTiles, painter: any) {\n //track changes with full state objects, but only for features that got modified\n const featuresChanged: LayerFeatureStates = {};\n\n for (const sourceLayer in this.stateChanges) {\n this.state[sourceLayer] = this.state[sourceLayer] || {};\n const layerStates = {};\n for (const feature in this.stateChanges[sourceLayer]) {\n if (!this.state[sourceLayer][feature]) this.state[sourceLayer][feature] = {};\n extend(this.state[sourceLayer][feature], this.stateChanges[sourceLayer][feature]);\n layerStates[feature] = this.state[sourceLayer][feature];\n }\n featuresChanged[sourceLayer] = layerStates;\n }\n\n for (const sourceLayer in this.deletedStates) {\n this.state[sourceLayer] = this.state[sourceLayer] || {};\n const layerStates = {};\n\n if (this.deletedStates[sourceLayer] === null) {\n for (const ft in this.state[sourceLayer]) {\n layerStates[ft] = {};\n this.state[sourceLayer][ft] = {};\n }\n } else {\n for (const feature in this.deletedStates[sourceLayer]) {\n const deleteWholeFeatureState = this.deletedStates[sourceLayer][feature] === null;\n if (deleteWholeFeatureState) this.state[sourceLayer][feature] = {};\n else {\n for (const key of Object.keys(this.deletedStates[sourceLayer][feature])) {\n delete this.state[sourceLayer][feature][key];\n }\n }\n layerStates[feature] = this.state[sourceLayer][feature];\n }\n }\n\n featuresChanged[sourceLayer] = featuresChanged[sourceLayer] || {};\n extend(featuresChanged[sourceLayer], layerStates);\n }\n\n this.stateChanges = {};\n this.deletedStates = {};\n\n if (Object.keys(featuresChanged).length === 0) return;\n\n inViewTiles.setFeatureState(featuresChanged, painter);\n }\n}\n","import {mat4} from 'gl-matrix';\nimport {EXTENT} from '../../data/extent';\nimport {clamp, degreesToRadians, MAX_VALID_LATITUDE, zoomScale} from '../../util/util';\nimport {MercatorCoordinate, mercatorXfromLng, mercatorYfromLat, mercatorZfromAltitude} from '../mercator_coordinate';\nimport Point from '@mapbox/point-geometry';\nimport type {UnwrappedTileIDType} from '../transform_helper';\nimport type {LngLat} from '../lng_lat';\n\n/*\n* The maximum angle to use for the Mercator horizon. This must be less than 90\n* to prevent errors in `MercatorTransform::_calcMatrices()`. It shouldn't be too close\n* to 90, or the distance to the horizon will become very large, unnecessarily increasing\n* the number of tiles needed to render the map.\n*/\nexport const maxMercatorHorizonAngle = 89.25;\n\n/**\n * Returns mercator coordinates in range 0..1 for given coordinates inside a specified tile.\n * @param inTileX - X coordinate in tile units - range [0..EXTENT].\n * @param inTileY - Y coordinate in tile units - range [0..EXTENT].\n * @param canonicalTileID - Tile canonical ID - mercator X, Y and zoom.\n * @returns Mercator coordinates of the specified point in range [0..1].\n */\nexport function tileCoordinatesToMercatorCoordinates(inTileX: number, inTileY: number, canonicalTileID: {x: number; y: number; z: number}): MercatorCoordinate {\n const scale = 1.0 / (1 << canonicalTileID.z);\n return new MercatorCoordinate(\n inTileX / EXTENT * scale + canonicalTileID.x * scale,\n inTileY / EXTENT * scale + canonicalTileID.y * scale\n );\n}\n\n/**\n * Returns LngLat for given in-tile coordinates and tile ID.\n * @param inTileX - X coordinate in tile units - range [0..EXTENT].\n * @param inTileY - Y coordinate in tile units - range [0..EXTENT].\n * @param canonicalTileID - Tile canonical ID - mercator X, Y and zoom.\n */\nexport function tileCoordinatesToLocation(inTileX: number, inTileY: number, canonicalTileID: {x: number; y: number; z: number}): LngLat {\n return tileCoordinatesToMercatorCoordinates(inTileX, inTileY, canonicalTileID).toLngLat();\n}\n\n/**\n * Convert from LngLat to world coordinates (Mercator coordinates scaled by world size).\n * @param worldSize - Mercator world size computed from zoom level and tile size.\n * @param lnglat - The location to convert.\n * @returns Point\n */\nexport function projectToWorldCoordinates(worldSize: number, lnglat: LngLat): Point {\n const lat = clamp(lnglat.lat, -MAX_VALID_LATITUDE, MAX_VALID_LATITUDE);\n return new Point(\n mercatorXfromLng(lnglat.lng) * worldSize,\n mercatorYfromLat(lat) * worldSize);\n}\n\n/**\n * Convert from world coordinates (mercator coordinates scaled by world size) to LngLat.\n * @param worldSize - Mercator world size computed from zoom level and tile size.\n * @param point - World coordinate.\n * @returns LngLat\n */\nexport function unprojectFromWorldCoordinates(worldSize: number, point: Point): LngLat {\n return new MercatorCoordinate(point.x / worldSize, point.y / worldSize).toLngLat();\n}\n\n/**\n * Calculate pixel height of the visible horizon in relation to map-center (e.g. height/2),\n * multiplied by a static factor to simulate the earth-radius.\n * The calculated value is the horizontal line from the camera-height to sea-level.\n * @returns Horizon above center in pixels.\n */\nexport function getMercatorHorizon(transform: {pitch: number; cameraToCenterDistance: number}): number {\n return transform.cameraToCenterDistance * Math.min(Math.tan(degreesToRadians(90 - transform.pitch)) * 0.85,\n Math.tan(degreesToRadians(maxMercatorHorizonAngle - transform.pitch)));\n}\n\nexport function calculateTileMatrix(unwrappedTileID: UnwrappedTileIDType, worldSize: number): mat4 {\n const canonical = unwrappedTileID.canonical;\n const scale = worldSize / zoomScale(canonical.z);\n const unwrappedX = canonical.x + Math.pow(2, canonical.z) * unwrappedTileID.wrap;\n\n const worldMatrix = mat4.identity(new Float64Array(16) as any);\n mat4.translate(worldMatrix, worldMatrix, [unwrappedX * scale, canonical.y * scale, 0]);\n mat4.scale(worldMatrix, worldMatrix, [scale / EXTENT, scale / EXTENT, 1]);\n return worldMatrix;\n}\n\nexport function cameraMercatorCoordinateFromCenterAndRotation(center: LngLat, elevation: number, pitch: number, bearing: number, distance: number): MercatorCoordinate {\n const centerMercator = MercatorCoordinate.fromLngLat(center, elevation);\n const mercUnitsPerMeter = mercatorZfromAltitude(1, center.lat);\n const dMercator = distance * mercUnitsPerMeter;\n const {x, y, z} = cameraDirectionFromPitchBearing(pitch, bearing);\n const dxMercator = dMercator * -x;\n const dyMercator = dMercator * -y;\n const dzMercator = dMercator * -z;\n return new MercatorCoordinate(centerMercator.x + dxMercator, centerMercator.y + dyMercator, centerMercator.z + dzMercator);\n}\n\nexport function cameraDirectionFromPitchBearing(pitch: number, bearing: number): {x: number; y: number; z: number} {\n const pitchRadians = degreesToRadians(pitch);\n const bearingRadians = degreesToRadians(bearing);\n const z = Math.cos(-pitchRadians);\n const h = Math.sin(pitchRadians);\n const x = h * Math.sin(bearingRadians);\n const y = -h * Math.cos(bearingRadians);\n return {x, y, z};\n}\n","import {OverscaledTileID} from '../../tile/tile_id';\nimport {vec2, type vec4} from 'gl-matrix';\nimport {MercatorCoordinate} from '../mercator_coordinate';\nimport {degreesToRadians, scaleZoom} from '../../util/util';\n\nimport type {IReadonlyTransform} from '../transform_interface';\nimport type {Terrain} from '../../render/terrain';\nimport type {Frustum} from '../../util/primitives/frustum';\nimport {maxMercatorHorizonAngle} from './mercator_utils';\nimport {type IBoundingVolume, IntersectionResult} from '../../util/primitives/bounding_volume';\n\ntype CoveringTilesResult = {\n tileID: OverscaledTileID;\n distanceSq: number;\n tileDistanceToCamera: number;\n};\n\ntype CoveringTilesStackEntry = {\n zoom: number;\n x: number;\n y: number;\n wrap: number;\n fullyVisible: boolean;\n};\n\nexport type CoveringTilesOptions = {\n /**\n * Smallest allowed tile zoom.\n */\n minzoom?: number;\n /**\n * Largest allowed tile zoom.\n */\n maxzoom?: number;\n /**\n * Whether to round or floor the target zoom level. If true, the value will be rounded to the closest integer. Otherwise the value will be floored.\n */\n roundZoom?: boolean;\n /**\n * Tile size, expressed in screen pixels.\n */\n tileSize: number;\n};\n\nexport type CoveringTilesOptionsInternal = CoveringTilesOptions & {\n /**\n * `true` if tiles should be sent back to the worker for each overzoomed zoom level, `false` if not.\n * Fill this option when computing covering tiles for a source.\n * When true, any tile at `maxzoom` level that should be overscaled to a greater zoom will have\n * its zoom set to the overscaled greater zoom. When false, such tiles will have zoom set to `maxzoom`.\n */\n reparseOverscaled?: boolean;\n /**\n * When terrain is present, tile visibility will be computed in regards to the min and max elevations for each tile.\n */\n terrain?: Terrain;\n /**\n * Optional function to redefine how tiles are loaded at high pitch angles.\n */\n calculateTileZoom?: CalculateTileZoomFunction;\n};\n\n/**\n * Function to define how tiles are loaded at high pitch angles\n * @param requestedCenterZoom - the requested zoom level, valid at the center point.\n * @param distanceToTile2D - 2D distance from the camera to the candidate tile, in mercator units.\n * @param distanceToTileZ - vertical distance from the camera to the candidate tile, in mercator units.\n * @param distanceToCenter3D - distance from camera to center point, in mercator units\n * @param cameraVerticalFOV - camera vertical field of view, in degrees\n * @return the desired zoom level for this tile. May not be an integer.\n */\nexport type CalculateTileZoomFunction = (requestedCenterZoom: number,\n distanceToTile2D: number,\n distanceToTileZ: number,\n distanceToCenter3D: number,\n cameraVerticalFOV: number) => number;\n\n/**\n * A simple/heuristic function that returns whether the tile is visible under the current transform.\n * @returns an {@link IntersectionResult}.\n */\nexport function isTileVisible(frustum: Frustum, tileBoundingVolume: IBoundingVolume, plane?: vec4): IntersectionResult {\n const frustumTest = tileBoundingVolume.intersectsFrustum(frustum);\n if (!plane || frustumTest === IntersectionResult.None) {\n return frustumTest;\n }\n const planeTest = tileBoundingVolume.intersectsPlane(plane);\n\n if (planeTest === IntersectionResult.None) {\n return IntersectionResult.None;\n }\n\n if (frustumTest === IntersectionResult.Full && planeTest === IntersectionResult.Full) {\n return IntersectionResult.Full;\n }\n\n return IntersectionResult.Partial;\n}\n\n/**\n * Definite integral of cos(x)^p. The analytical solution is described in `developer-guides/covering-tiles.md`,\n * but here the integral is evaluated numerically.\n * @param p - the power to raise cos(x) to inside the itegral\n * @param x1 - the starting point of the integral.\n * @param x2 - the ending point of the integral.\n * @return the integral of cos(x)^p from x=x1 to x=x2\n */\nfunction integralOfCosXByP(p: number, x1: number, x2: number): number {\n const numPoints = 10;\n let sum = 0;\n const dx = (x2 - x1 ) / numPoints;\n // Midpoint integration\n for( let i = 0; i < numPoints; i++)\n {\n const x = x1 + (i + 0.5)/numPoints * (x2 - x1);\n sum += dx * Math.pow(Math.cos(x), p);\n }\n return sum;\n}\n\nexport function createCalculateTileZoomFunction(maxZoomLevelsOnScreen: number, tileCountMaxMinRatio: number): CalculateTileZoomFunction {\n return function (requestedCenterZoom: number,\n distanceToTile2D: number,\n distanceToTileZ: number,\n distanceToCenter3D: number,\n cameraVerticalFOV: number): number {\n /**\n * Controls how tiles are loaded at high pitch angles. Higher numbers cause fewer, lower resolution\n * tiles to be loaded. Calculate the value that will result in the selected number of zoom levels in\n * the worst-case condition (when the horizon is at the top of the screen). For more information, see\n * `developer-guides/covering-tiles.md`\n */\n const pitchTileLoadingBehavior = 2 * ((maxZoomLevelsOnScreen - 1) /\n scaleZoom(Math.cos(degreesToRadians(maxMercatorHorizonAngle - cameraVerticalFOV)) /\n Math.cos(degreesToRadians(maxMercatorHorizonAngle))) - 1);\n\n const centerPitch = Math.acos(distanceToTileZ / distanceToCenter3D);\n const tileCountPitch0 = 2 * integralOfCosXByP(pitchTileLoadingBehavior - 1, 0, degreesToRadians(cameraVerticalFOV / 2));\n const highestPitch = Math.min(degreesToRadians(maxMercatorHorizonAngle), centerPitch + degreesToRadians(cameraVerticalFOV / 2));\n const lowestPitch = Math.min(highestPitch, centerPitch - degreesToRadians(cameraVerticalFOV / 2));\n const tileCount = integralOfCosXByP(pitchTileLoadingBehavior - 1, lowestPitch, highestPitch);\n const thisTilePitch = Math.atan(distanceToTile2D / distanceToTileZ);\n const distanceToTile3D = Math.hypot(distanceToTile2D, distanceToTileZ);\n\n let thisTileDesiredZ = requestedCenterZoom;\n // if distance to candidate tile is a tiny bit farther than distance to center,\n // use the same zoom as the center. This is achieved by the scaling distance ratio by cos(fov/2)\n thisTileDesiredZ = thisTileDesiredZ + scaleZoom(distanceToCenter3D / distanceToTile3D / Math.max(0.5, Math.cos(degreesToRadians(cameraVerticalFOV / 2))));\n thisTileDesiredZ += pitchTileLoadingBehavior * scaleZoom(Math.cos(thisTilePitch)) / 2;\n thisTileDesiredZ -= scaleZoom(Math.max(1, tileCount / tileCountPitch0 / tileCountMaxMinRatio)) / 2;\n return thisTileDesiredZ;\n };\n}\nconst defaultMaxZoomLevelsOnScreen = 9.314;\nconst defaultTileCountMaxMinRatio = 3.0;\nconst defaultCalculateTileZoom = createCalculateTileZoomFunction(defaultMaxZoomLevelsOnScreen, defaultTileCountMaxMinRatio);\n\n/**\n * Return what zoom level of a tile source would most closely cover the tiles displayed by this transform.\n * @param options - The options, most importantly the source's tile size.\n * @returns An integer zoom level at which all tiles will be visible.\n */\nexport function coveringZoomLevel(transform: IReadonlyTransform, options: CoveringTilesOptions): number {\n const z = (options.roundZoom ? Math.round : Math.floor)(\n transform.zoom + scaleZoom(transform.tileSize / options.tileSize)\n );\n // At negative zoom levels load tiles from z0 because negative tile zoom levels don't exist.\n return Math.max(0, z);\n}\n\n/**\n * Returns a list of tiles that optimally covers the screen. Adapted for globe projection.\n * Correctly handles LOD when moving over the antimeridian.\n * @param transform - The transform instance.\n * @param frustum - The covering frustum.\n * @param plane - The clipping plane used by globe transform, or null.\n * @param cameraCoord - The x, y, z position of the camera in MercatorCoordinates.\n * @param centerCoord - The x, y, z position of the center point in MercatorCoordinates.\n * @param options - Additional coveringTiles options.\n * @param details - Interface to define required helper functions.\n * @returns A list of tile coordinates, ordered by ascending distance from camera.\n */\nexport function coveringTiles(transform: IReadonlyTransform, options: CoveringTilesOptionsInternal): OverscaledTileID[] {\n const frustum = transform.getCameraFrustum();\n const plane = transform.getClippingPlane();\n const cameraCoord = transform.screenPointToMercatorCoordinate(transform.getCameraPoint());\n const centerCoord = MercatorCoordinate.fromLngLat(transform.center, transform.elevation);\n cameraCoord.z = centerCoord.z + Math.cos(transform.pitchInRadians) * transform.cameraToCenterDistance / transform.worldSize;\n const detailsProvider = transform.getCoveringTilesDetailsProvider();\n const allowVariableZoom = detailsProvider.allowVariableZoom(transform, options);\n \n const desiredZ = coveringZoomLevel(transform, options);\n const minZoom = options.minzoom || 0;\n const maxZoom = options.maxzoom !== undefined ? options.maxzoom : transform.maxZoom;\n const nominalZ = Math.min(Math.max(0, desiredZ), maxZoom);\n\n const numTiles = Math.pow(2, nominalZ);\n const cameraPoint = [numTiles * cameraCoord.x, numTiles * cameraCoord.y, 0];\n const centerPoint = [numTiles * centerCoord.x, numTiles * centerCoord.y, 0];\n const distanceToCenter2d = Math.hypot(centerCoord.x - cameraCoord.x, centerCoord.y - cameraCoord.y);\n const distanceZ = Math.abs(centerCoord.z - cameraCoord.z);\n const distanceToCenter3d = Math.hypot(distanceToCenter2d, distanceZ);\n\n const newRootTile = (wrap: number): CoveringTilesStackEntry => {\n return {\n zoom: 0,\n x: 0,\n y: 0,\n wrap,\n fullyVisible: false\n };\n };\n\n // Do a depth-first traversal to find visible tiles and proper levels of detail\n const stack: Array = [];\n const result: Array = [];\n\n if (transform.renderWorldCopies && detailsProvider.allowWorldCopies()) {\n // Render copy of the globe thrice on both sides\n for (let i = 1; i <= 3; i++) {\n stack.push(newRootTile(-i));\n stack.push(newRootTile(i));\n }\n }\n\n stack.push(newRootTile(0));\n\n while (stack.length > 0) {\n const it = stack.pop();\n const x = it.x;\n const y = it.y;\n let fullyVisible = it.fullyVisible;\n const tileID = {x, y, z: it.zoom};\n const boundingVolume = detailsProvider.getTileBoundingVolume(tileID, it.wrap, transform.elevation, options);\n\n // Visibility of a tile is not required if any of its ancestor is fully visible\n if (!fullyVisible) {\n const intersectResult = isTileVisible(frustum, boundingVolume, plane);\n\n if (intersectResult === IntersectionResult.None)\n continue;\n\n fullyVisible = intersectResult === IntersectionResult.Full;\n }\n\n const distToTile2d = detailsProvider.distanceToTile2d(cameraCoord.x, cameraCoord.y, tileID, boundingVolume);\n\n let thisTileDesiredZ = desiredZ;\n if (allowVariableZoom) {\n const tileZoomFunc = options.calculateTileZoom || defaultCalculateTileZoom;\n thisTileDesiredZ = tileZoomFunc(transform.zoom + scaleZoom(transform.tileSize / options.tileSize),\n distToTile2d,\n distanceZ,\n distanceToCenter3d,\n transform.fov);\n }\n thisTileDesiredZ = (options.roundZoom ? Math.round : Math.floor)(thisTileDesiredZ);\n thisTileDesiredZ = Math.max(0, thisTileDesiredZ);\n const z = Math.min(thisTileDesiredZ, maxZoom);\n\n // We need to compute a valid wrap value for the tile to keep globe compatibility with mercator\n it.wrap = detailsProvider.getWrap(centerCoord, tileID, it.wrap);\n\n // Have we reached the target depth?\n if (it.zoom >= z) {\n if (it.zoom < minZoom) {\n continue;\n }\n const dz = nominalZ - it.zoom;\n const dx = cameraPoint[0] - 0.5 - (x << dz);\n const dy = cameraPoint[1] - 0.5 - (y << dz);\n const overscaledZ = options.reparseOverscaled ? Math.max(it.zoom, thisTileDesiredZ) : it.zoom;\n result.push({\n tileID: new OverscaledTileID(it.zoom === maxZoom ? overscaledZ : it.zoom, it.wrap, it.zoom, x, y),\n distanceSq: vec2.sqrLen([centerPoint[0] - 0.5 - x, centerPoint[1] - 0.5 - y]),\n // this variable is currently not used, but may be important to reduce the amount of loaded tiles\n tileDistanceToCamera: Math.sqrt(dx * dx + dy * dy)\n });\n continue;\n }\n\n for (let i = 0; i < 4; i++) {\n const childX = (x << 1) + (i % 2);\n const childY = (y << 1) + (i >> 1);\n const childZ = it.zoom + 1;\n stack.push({zoom: childZ, x: childX, y: childY, wrap: it.wrap, fullyVisible});\n }\n }\n\n return result.sort((a, b) => a.distanceSq - b.distanceSq).map(a => a.tileID);\n}\n","import Point from '@mapbox/point-geometry';\nimport {Bounds, type ReadOnlyBounds} from '../geo/bounds';\nimport {EXTENT} from './extent';\n\n/**\n * The bounding box covering the entire extent of a tile.\n */\nexport const EXTENT_BOUNDS = Bounds.fromPoints([new Point(0, 0), new Point(EXTENT, EXTENT)]) as ReadOnlyBounds;","import {now} from '../util/time_control';\nimport {getEdgeTiles} from '../util/util';\nimport {FadingDirections, FadingRoles, type Tile} from './tile';\nimport {type OverscaledTileID} from './tile_id';\nimport {type InViewTiles} from './tile_manager_in_view_tiles';\n\nexport function isRasterType(type: string): boolean {\n return type === 'raster' || type === 'image' || type === 'video';\n}\n\n/**\n * Designate fading bases and parents using a many-to-one relationship where the lower children fade in/out\n * with their parents. Raster shaders are not currently designed for a one-to-many fade relationship.\n *\n * Tiles that are candidates for fading out must be loaded and rendered tiles, as loading a tile to then\n * fade it out would not appear smoothly. The first source of truth for tile fading always starts at the\n * ideal tile, which continually changes on map adjustment. The state of the previously rendered ideal\n * tile plane indicates which direction to fade each part of the newer ideal plane (with varying z).\n *\n * For a pitched map, the back of the map can have decreasing zooms while the front can have increasing zooms.\n * Fade logic must therefore adapt dynamically based on the previously rendered ideal tile set.\n */\nexport function updateFadingTiles(\n inViewTiles: InViewTiles,\n idealTileIDs: OverscaledTileID[], \n retain: Record,\n maxFadingAncestorLevels: number,\n sourceMinZoom: number,\n sourceMaxZoom: number,\n rasterFadeDuration: number) {\n const currentTime: number = now();\n const edgeTileIDs: Set = getEdgeTiles(idealTileIDs);\n\n for (const idealID of idealTileIDs) {\n const idealTile = inViewTiles.getTileById(idealID.key);\n\n // reset any previously departing(ed) tiles that are now ideal tiles\n if (idealTile.fadingDirection === FadingDirections.Departing || idealTile.fadeOpacity === 0) {\n idealTile.resetFadeLogic();\n }\n\n const parentIsFader = updateFadingAncestor(inViewTiles, idealTile, retain, currentTime, maxFadingAncestorLevels, sourceMinZoom, rasterFadeDuration);\n if (parentIsFader) continue;\n\n const childIsFader = updateFadingDescendents(inViewTiles, idealTile, retain, currentTime, sourceMaxZoom, rasterFadeDuration);\n if (childIsFader) continue;\n\n const edgeIsFader = updateFadingEdge(idealTile, edgeTileIDs, currentTime, rasterFadeDuration);\n if (edgeIsFader) continue;\n\n // for all remaining non-fading ideal tiles reset the fade logic\n idealTile.resetFadeLogic();\n }\n}\n\n/**\n * Many-to-one cross-fade. Set 4 ideal tiles as the fading base for a rendered parent tile\n * as the fading parent. Here the parent is fading out and the ideal tile is fading in.\n *\n * Parent tile - fading out ■ -- Fading Parent\n * ┌──────────────┬──────┴───────┬──────────────┐\n * Ideal tiles - fading in ■ ■ ■ ■ -- Base Role = Incoming\n * ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐\n * ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■\n */\nfunction updateFadingAncestor(\n inViewTiles: InViewTiles,\n idealTile: Tile, \n retain: Record, \n now: number,\n maxFadingAncestorLevels: number,\n sourceMinZoom: number,\n rasterFadeDuration: number): boolean {\n if (!idealTile.hasData()) return false;\n\n const {tileID: idealID, fadingRole, fadingDirection, fadingParentID} = idealTile;\n // ideal tile already has fading parent - retain and return\n if (fadingRole === FadingRoles.Base && fadingDirection === FadingDirections.Incoming && fadingParentID) {\n retain[fadingParentID.key] = fadingParentID;\n return true;\n }\n\n // find a loaded parent tile to fade with the ideal tile\n const minAncestorZ = Math.max(idealID.overscaledZ - maxFadingAncestorLevels, sourceMinZoom);\n for (let ancestorZ = idealID.overscaledZ - 1; ancestorZ >= minAncestorZ; ancestorZ--) {\n const ancestorID = idealID.scaledTo(ancestorZ);\n const ancestorTile = inViewTiles.getLoadedTile(ancestorID);\n if (!ancestorTile) continue;\n\n // ideal tile (base) is fading in\n idealTile.setCrossFadeLogic({\n fadingRole: FadingRoles.Base,\n fadingDirection: FadingDirections.Incoming,\n fadingParentID: ancestorTile.tileID, // fading out\n fadeEndTime: now + rasterFadeDuration\n });\n // ancestor tile (parent) is fading out\n ancestorTile.setCrossFadeLogic({\n fadingRole: FadingRoles.Parent,\n fadingDirection: FadingDirections.Departing,\n fadeEndTime: now + rasterFadeDuration\n });\n\n retain[ancestorID.key] = ancestorID;\n return true;\n }\n return false;\n}\n\n/**\n * Many-to-one cross-fade. Search descendents of ideal tiles as the fading base with the ideal tile\n * as the fading parent. Here the children are fading out and the ideal tile is fading in.\n *\n * ■\n * ┌──────────────┬──────┴───────┬──────────────┐\n * Ideal tiles - fading in ■ ■ ■ ■ -- Fading Parent\n * ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐ ┌───┬─┴─┬───┐\n * Child tiles - fading out ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ -- Base Role = Departing\n *\n * Try direct children first. If none found, try grandchildren. Stops at the first generation that provides a fader.\n */\nfunction updateFadingDescendents(inViewTiles: InViewTiles, idealTile: Tile, retain: Record, now: number, sourceMaxZoom: number, rasterFadeDuration: number): boolean {\n if (!idealTile.hasData()) return false;\n\n // search first level of descendents (4 tiles)\n const idealChildren = idealTile.tileID.children(sourceMaxZoom);\n let hasFader = updateFadingChildren(inViewTiles, idealTile, idealChildren, retain, now, sourceMaxZoom, rasterFadeDuration);\n if (hasFader) return true;\n\n // search second level of descendents (16 tiles)\n for (const childID of idealChildren) {\n const grandChildIDs = childID.children(sourceMaxZoom);\n if (updateFadingChildren(inViewTiles, idealTile, grandChildIDs, retain, now, sourceMaxZoom, rasterFadeDuration)) {\n hasFader = true;\n }\n }\n\n return hasFader;\n}\n\nfunction updateFadingChildren(\n inViewTiles: InViewTiles,\n idealTile: Tile, \n childIDs: OverscaledTileID[], \n retain: Record, \n now: number, \n sourceMaxZoom: number,\n rasterFadeDuration: number): boolean {\n if (childIDs[0].overscaledZ >= sourceMaxZoom) return false;\n let foundFader = false;\n\n // find loaded child tiles to fade with the ideal tile\n for (const childID of childIDs) {\n const childTile = inViewTiles.getLoadedTile(childID);\n if (!childTile) continue;\n\n const {fadingRole, fadingDirection, fadingParentID} = childTile;\n if (fadingRole !== FadingRoles.Base || fadingDirection !== FadingDirections.Departing || !fadingParentID) {\n // child tile (base) is fading out\n childTile.setCrossFadeLogic({\n fadingRole: FadingRoles.Base,\n fadingDirection: FadingDirections.Departing,\n fadingParentID: idealTile.tileID,\n fadeEndTime: now + rasterFadeDuration\n });\n // ideal tile (parent) is fading in\n idealTile.setCrossFadeLogic({\n fadingRole: FadingRoles.Parent,\n fadingDirection: FadingDirections.Incoming,\n fadeEndTime: now + rasterFadeDuration\n });\n }\n\n retain[childID.key] = childID;\n foundFader = true;\n }\n\n return foundFader;\n}\n\n/**\n * One-to-one self fading for unloaded edge tiles (for panning sideways on map). for loading tiles over gaps it feels\n * more natural for them to fade in, however if they are already loaded/cached then there is no need to fade as map will\n * look cohesive with no gaps. Note that draw_raster determines fade priority, as many-to-one fade supersedes edge fading.\n */\nfunction updateFadingEdge(idealTile: Tile, edgeTileIDs: Set, now: number, rasterFadeDuration: number): boolean {\n const idealID: OverscaledTileID = idealTile.tileID;\n\n // tile is already self fading\n if (idealTile.selfFading) {\n return true;\n }\n\n // fading not needed for tiles that are already loaded\n if (idealTile.hasData()) {\n return false;\n }\n\n // enable fading for loading edges with no data\n if (edgeTileIDs.has(idealID)) {\n const fadeEndTime = now + rasterFadeDuration;\n idealTile.setSelfFadeLogic(fadeEndTime);\n return true;\n }\n\n return false;\n}\n\nexport function hasRasterTransition(inViewTiles: InViewTiles, rasterFadeDuration: number) {\n if (rasterFadeDuration <= 0) {\n return false;\n }\n const currentTime = now();\n for (const tile of inViewTiles.getAllTiles()) {\n if (tile.fadeEndTime >= currentTime) {\n return true;\n }\n }\n return false;\n}","import {type Tile} from './tile';\nimport {type InViewTiles} from './tile_manager_in_view_tiles';\n\n/**\n * For raster terrain source, backfill DEM to eliminate visible tile boundaries\n */\nexport function backfillDEM(tile: Tile, inViewTiles: InViewTiles) {\n const renderables = inViewTiles.getRenderableIds();\n for (const borderId of renderables) {\n if (!tile.neighboringTiles || !tile.neighboringTiles[borderId]) {\n continue;\n }\n const borderTile = inViewTiles.getTileById(borderId);\n if (!tile.neighboringTiles[borderId].backfilled) {\n fillBorder(tile, borderTile);\n }\n if (borderTile.neighboringTiles?.[tile.tileID.key]?.backfilled) {\n continue;\n }\n fillBorder(borderTile, tile);\n }\n}\n\nfunction fillBorder(tile: Tile, borderTile: Tile) {\n tile.needsHillshadePrepare = true;\n tile.needsTerrainPrepare = true;\n let dx = borderTile.tileID.canonical.x - tile.tileID.canonical.x;\n const dy = borderTile.tileID.canonical.y - tile.tileID.canonical.y;\n const dim = Math.pow(2, tile.tileID.canonical.z);\n const borderId = borderTile.tileID.key;\n if (dx === 0 && dy === 0) return;\n\n if (Math.abs(dy) > 1) {\n return;\n }\n if (Math.abs(dx) > 1) {\n // Adjust the delta coordinate for world wraparound.\n if (Math.abs(dx + dim) === 1) {\n dx += dim;\n } else if (Math.abs(dx - dim) === 1) {\n dx -= dim;\n }\n }\n if (!borderTile.dem || !tile.dem) return;\n tile.dem.backfillBorder(borderTile.dem, dx, dy);\n if (tile.neighboringTiles?.[borderId]) {\n tile.neighboringTiles[borderId].backfilled = true;\n }\n}\n\n","import Point from '@mapbox/point-geometry';\nimport {type LayerFeatureStates} from '../source/source_state';\nimport {type Tile} from './tile';\nimport {compareTileId, type OverscaledTileID} from './tile_id';\n\nexport class InViewTiles {\n private _tiles: Record = {};\n\n public handleWrapJump(wrapDelta: number) {\n const tiles: Record = {};\n for (const id in this._tiles) {\n const tile = this._tiles[id];\n tile.tileID = tile.tileID.unwrapTo(tile.tileID.wrap + wrapDelta);\n tiles[tile.tileID.key] = tile;\n }\n this._tiles = tiles;\n }\n\n public setFeatureState(featuresChanged: LayerFeatureStates, painter: any) {\n for (const id in this._tiles) {\n const tile = this._tiles[id];\n tile.setFeatureState(featuresChanged, painter);\n }\n }\n\n public getAllTiles(): Tile[] {\n return Object.values(this._tiles);\n }\n\n public getAllIds(sorted = false): string[] {\n if (sorted) {\n return Object.values(this._tiles).map(tile => tile.tileID).sort(compareTileId).map(id => id.key);\n }\n return Object.keys(this._tiles);\n }\n\n public getTileById(key: string): Tile | undefined {\n return this._tiles[key];\n }\n\n public setTile(key: string, tile: Tile) {\n this._tiles[key] = tile;\n }\n\n public deleteTileById(key: string) {\n delete this._tiles[key];\n }\n\n /**\n * Get a currently loaded tile.\n * - a cached tile is not a loaded tile\n * @returns the tile if it's in view and had data, null otherwise.\n */\n public getLoadedTile(tileID: OverscaledTileID): Tile | null {\n const tile = this.getTileById(tileID.key);\n if (tile?.hasData()) {\n return tile;\n }\n return null;\n }\n\n public isIdRenderable(id: string, symbolLayer: boolean = false) {\n return this.getTileById(id)?.isRenderable(symbolLayer);\n }\n\n public getRenderableIds(bearingInRadians: number = 0, symbolLayer?: boolean): Array {\n const renderables: Array = [];\n for (const id of this.getAllIds()) {\n if (this.isIdRenderable(id, symbolLayer)) {\n renderables.push(this.getTileById(id));\n }\n }\n if (symbolLayer) {\n return renderables.sort((a_: Tile, b_: Tile) => {\n const a = a_.tileID;\n const b = b_.tileID;\n const rotatedA = (new Point(a.canonical.x, a.canonical.y))._rotate(-bearingInRadians);\n const rotatedB = (new Point(b.canonical.x, b.canonical.y))._rotate(-bearingInRadians);\n return a.overscaledZ - b.overscaledZ || rotatedB.y - rotatedA.y || rotatedB.x - rotatedA.x;\n }).map(tile => tile.tileID.key);\n }\n return renderables.map(tile => tile.tileID).sort(compareTileId).map(id => id.key);\n }\n}","import {create as createSource} from '../source/source';\n\nimport {Tile} from './tile';\nimport {ErrorEvent, Event, Evented} from '../util/evented';\nimport {TileCache} from './tile_cache';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\nimport {EXTENT} from '../data/extent';\nimport type Point from '@mapbox/point-geometry';\nimport {now} from '../util/time_control';\nimport {OverscaledTileID} from './tile_id';\nimport {SourceFeatureState} from '../source/source_state';\nimport {config} from '../util/config';\nimport {coveringTiles, coveringZoomLevel} from '../geo/projection/covering_tiles';\nimport {Bounds} from '../geo/bounds';\nimport {EXTENT_BOUNDS} from '../data/extent_bounds';\nimport {GEOJSON_TILE_LAYER_NAME} from '../data/feature_index';\nimport {hasRasterTransition, isRasterType, updateFadingTiles} from './tile_manager_raster';\nimport {backfillDEM} from './tile_manager_raster_dem';\nimport {InViewTiles} from './tile_manager_in_view_tiles';\n\nimport type {Context} from '../gl/context';\nimport type {Source} from '../source/source';\nimport type {Map} from '../ui/map';\nimport type {Style} from '../style/style';\nimport type {Dispatcher} from '../util/dispatcher';\nimport type {IReadonlyTransform, ITransform} from '../geo/transform_interface';\nimport type {TileState} from './tile';\nimport type {ICanonicalTileID, SourceSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {MapSourceDataEvent} from '../ui/events';\nimport type {Terrain} from '../render/terrain';\nimport type {CanvasSourceSpecification} from '../source/canvas_source';\n\ntype TileResult = {\n tile: Tile;\n tileID: OverscaledTileID;\n queryGeometry: Array;\n cameraQueryGeometry: Array;\n scale: number;\n};\n\n/**\n * @internal\n * `TileManager` is responsible for\n *\n * - creating an instance of `Source`\n * - caching tiles loaded from an instance of `Source`\n * - handling incoming source data events events from `Map` and coordinating updates\n * - providing the current renderable tile coordinates to the `Painter`\n * - loading the tiles needed to render a given viewport\n * - retaining the tiles needed as substitutes for pending loading tiles\n * - retaining the tiles needed for fading between parents and children (for raster sources)\n * - reloading tiles when source data or dependencies change\n * - handling tile expiration and refresh timers\n * - unloading cached tiles not needed to render a given viewport\n * - managing tile state and feature state\n */\nexport class TileManager extends Evented {\n id: string;\n dispatcher: Dispatcher;\n map: Map;\n style: Style;\n\n _source: Source;\n\n /**\n * @internal\n * signifies that the TileJSON is loaded if applicable.\n * if the source type does not come with a TileJSON, the flag signifies the\n * source data has loaded (i.e geojson has been tiled on the worker and is ready)\n */\n _sourceLoaded: boolean;\n\n _sourceErrored: boolean;\n _inViewTiles: InViewTiles;\n _prevLng: number;\n _outOfViewCache: TileCache;\n _timers: Record>;\n _maxTileCacheSize: number;\n _maxTileCacheZoomLevels: number;\n _paused: boolean;\n _shouldReloadOnResume: boolean;\n transform: ITransform;\n terrain: Terrain;\n used: boolean;\n usedForTerrain: boolean;\n tileSize: number;\n _state: SourceFeatureState;\n _didEmitContent: boolean;\n _updated: boolean;\n _rasterFadeDuration: number;\n _maxFadingAncestorLevels: number;\n\n static maxUnderzooming: number = 10;\n static maxOverzooming: number = 3;\n\n constructor(id: string, options: SourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n\n this.on('data', (e: MapSourceDataEvent) => this._dataHandler(e));\n\n this.on('dataloading', () => {\n this._sourceErrored = false;\n });\n\n this.on('error', () => {\n // Only set _sourceErrored if the source does not have pending loads.\n this._sourceErrored = this._source.loaded();\n });\n\n this._source = createSource(id, options, dispatcher, this);\n\n this._inViewTiles = new InViewTiles();\n this._outOfViewCache = new TileCache(0, (tile) => this._unloadTile(tile));\n this._timers = {};\n this._maxTileCacheSize = null;\n this._maxTileCacheZoomLevels = null;\n this._rasterFadeDuration = 0;\n this._maxFadingAncestorLevels = 5;\n\n this._state = new SourceFeatureState();\n this._didEmitContent = false;\n this._updated = false;\n }\n\n onAdd(map: Map) {\n this.map = map;\n this._maxTileCacheSize = map ? map._maxTileCacheSize : null;\n this._maxTileCacheZoomLevels = map ? map._maxTileCacheZoomLevels : null;\n if (this._source && this._source.onAdd) {\n this._source.onAdd(map);\n }\n }\n\n onRemove(map: Map) {\n for (const tile of this._inViewTiles.getAllTiles()) {\n tile.unloadVectorData();\n }\n this.clearTiles();\n if (this._source && this._source.onRemove) {\n this._source.onRemove(map);\n }\n this._inViewTiles = new InViewTiles();\n }\n\n /**\n * Return true if no tile data is pending, tiles will not change unless\n * an additional API call is received.\n */\n loaded(): boolean {\n if (this._sourceErrored) { return true; }\n if (!this._sourceLoaded) { return false; }\n if (!this._source.loaded()) { return false; }\n if ((this.used !== undefined || this.usedForTerrain !== undefined) && !this.used && !this.usedForTerrain) { return true; }\n // do not consider as loaded if the update hasn't been called yet (we do not know if we will have any tiles to fetch)\n if (!this._updated) { return false; }\n\n for (const tile of this._inViewTiles.getAllTiles()) {\n if (tile.state !== 'loaded' && tile.state !== 'errored')\n return false;\n }\n return true;\n }\n\n getSource(): Source {\n return this._source;\n }\n\n getState(): SourceFeatureState {\n return this._state;\n }\n\n pause() {\n this._paused = true;\n }\n\n resume() {\n if (!this._paused) return;\n const shouldReload = this._shouldReloadOnResume;\n this._paused = false;\n this._shouldReloadOnResume = false;\n if (shouldReload) this.reload();\n if (this.transform) this.update(this.transform, this.terrain);\n }\n\n async _loadTile(tile: Tile, id: string, state: TileState): Promise {\n try {\n await this._source.loadTile(tile);\n this._tileLoaded(tile, id, state);\n } catch (err) {\n tile.state = 'errored';\n if ((err as any).status !== 404) {\n this._source.fire(new ErrorEvent(err, {tile}));\n } else {\n // continue to try loading parent/children tiles if a tile doesn't exist (404)\n this.update(this.transform, this.terrain);\n }\n }\n }\n\n _unloadTile(tile: Tile) {\n if (this._source.unloadTile)\n this._source.unloadTile(tile);\n }\n\n _abortTile(tile: Tile) {\n if (this._source.abortTile)\n this._source.abortTile(tile);\n\n this._source.fire(new Event('dataabort', {tile, coord: tile.tileID, dataType: 'source'}));\n }\n\n serialize() {\n return this._source.serialize();\n }\n\n prepare(context: Context) {\n if (this._source.prepare) {\n this._source.prepare();\n }\n\n this._state.coalesceChanges(this._inViewTiles, this.map ? this.map.painter : null);\n for (const tile of this._inViewTiles.getAllTiles()) {\n tile.upload(context);\n tile.prepare(this.map.style.imageManager);\n }\n }\n\n /**\n * Return all tile ids ordered with z-order, and cast to numbers\n */\n getIds(): Array {\n return this._inViewTiles.getAllIds(true);\n }\n\n getRenderableIds(symbolLayer?: boolean): Array {\n return this._inViewTiles.getRenderableIds(this.transform?.bearingInRadians, symbolLayer);\n }\n\n hasRenderableParent(tileID: OverscaledTileID) {\n const parentZ = tileID.overscaledZ - 1;\n if (parentZ >= this._source.minzoom) {\n const parentTile = this.getLoadedTile(tileID.scaledTo(parentZ));\n if (parentTile) {\n return this._inViewTiles.isIdRenderable(parentTile.tileID.key);\n }\n }\n return false;\n }\n\n /**\n * Reload tiles based on the current state of the source.\n * @param sourceDataChanged - If `true`, reload all tiles using a state of 'expired', otherwise reload only non-errored tiles using state of 'reloading'.\n * @param shouldReloadTileOptions - Set of options associated with a `MapSourceDataChangedEvent` that can be passed back to the associated `Source` determine whether a tile should be reloaded.\n */\n reload(\n sourceDataChanged?: boolean,\n shouldReloadTileOptions: any = undefined\n ) {\n if (this._paused) {\n this._shouldReloadOnResume = true;\n return;\n }\n\n this._outOfViewCache.reset();\n\n for (const id of this._inViewTiles.getAllIds()) {\n const tile = this._inViewTiles.getTileById(id);\n if (shouldReloadTileOptions && !this._source.shouldReloadTile(tile, shouldReloadTileOptions)) {\n continue;\n } else if (sourceDataChanged) {\n this._reloadTile(id, 'expired');\n } else if (tile.state !== 'errored') {\n this._reloadTile(id, 'reloading');\n }\n }\n }\n\n async _reloadTile(id: string, state: TileState) {\n const tile = this._inViewTiles.getTileById(id);\n\n // this potentially does not address all underlying\n // issues https://github.com/mapbox/mapbox-gl-js/issues/4252\n // - hard to tell without repro steps\n if (!tile) return;\n\n // The difference between \"loading\" tiles and \"reloading\" or \"expired\"\n // tiles is that \"reloading\"/\"expired\" tiles are \"renderable\".\n // Therefore, a \"loading\" tile cannot become a \"reloading\" tile without\n // first becoming a \"loaded\" tile.\n if (tile.state !== 'loading') {\n tile.state = state;\n }\n await this._loadTile(tile, id, state);\n }\n\n _tileLoaded(tile: Tile, id: string, previousState: TileState) {\n tile.timeAdded = now();\n // Since self-fading applies to unloaded tiles, fadeEndTime must be updated upon load\n if (tile.selfFading) {\n tile.fadeEndTime = tile.timeAdded + this._rasterFadeDuration;\n }\n\n if (previousState === 'expired') tile.refreshedUponExpiration = true;\n this._setTileReloadTimer(id, tile);\n if (this.getSource().type === 'raster-dem' && tile.dem) {\n backfillDEM(tile, this._inViewTiles);\n }\n this._state.initializeTileState(tile, this.map ? this.map.painter : null);\n\n if (!tile.aborted) {\n this._source.fire(new Event('data', {dataType: 'source', tile, coord: tile.tileID}));\n }\n }\n /**\n * Get a specific tile by TileID\n */\n getTile(tileID: OverscaledTileID): Tile {\n return this.getTileByID(tileID.key);\n }\n\n /**\n * Get a specific tile by id\n */\n getTileByID(id: string): Tile | undefined {\n return this._inViewTiles.getTileById(id);\n }\n\n /**\n * Retain the uppermost loaded children of each provided target tile, within a variable covering zoom range.\n *\n * On pitched maps, different parts of the screen show different zoom levels simultaneously.\n * Ideal tiles are generated using coveringTiles() above, which returns the ideal tile set for\n * the current pitched plane, which can carry tiles of varying zooms (overscaledZ).\n * See: https://maplibre.org/maplibre-gl-js/docs/examples/level-of-detail-control/\n *\n * A fixed `maxCoveringZoom` on a pitched map would incorrectly intersect with some\n * ideal tiles and cause distant high-pitch tiles to skip their uppermost children.\n *\n * To solve this, we calculate the max covering zoom for each ideal tile separately using its\n * `overscaledZ`. This effectively makes the \"max covering zoom plane\" parallel to the\n * \"ideal tile plane,\" ensuring that we correctly capture the uppermost children\n * of each ideal tile across the pitched view.\n *\n * Analogy: imagine two sheets of paper in 3D space:\n * - one sheet = ideal tiles at varying overscaledZ\n * - the second sheet = maxCoveringZoom\n * \n * @param retainTileMap - this parameters will be updated with the child tiles to keep\n * @param idealTilesWithoutData - which of the ideal tiles currently does not have loaded data\n * @return a set of tiles that need to be loaded\n */\n _retainLoadedChildren(retainTileMap: Record, idealTilesWithoutData: Set): Set {\n const loadedDescendents: Record = this._getLoadedDescendents(idealTilesWithoutData);\n const incomplete = new Set();\n\n // retain the uppermost descendents of target tiles\n for (const targetID of idealTilesWithoutData) {\n const descendents = loadedDescendents[targetID.key];\n if (!descendents?.length) {\n incomplete.add(targetID);\n continue;\n }\n\n // find descendents within the max covering zoom range\n const maxCoveringZoom = targetID.overscaledZ + TileManager.maxOverzooming;\n const candidates = descendents.filter(t => t.tileID.overscaledZ <= maxCoveringZoom);\n if (!candidates.length) {\n incomplete.add(targetID);\n continue;\n }\n\n // retain the uppermost descendents in the topmost zoom below the target tile\n const topZoom = Math.min(...candidates.map(t => t.tileID.overscaledZ));\n const topIDs = candidates.filter(t => t.tileID.overscaledZ === topZoom).map(t => t.tileID);\n for (const tileID of topIDs) {\n retainTileMap[tileID.key] = tileID;\n }\n\n //determine if the retained generation is fully covered\n if (!this._areDescendentsComplete(topIDs, topZoom, targetID.overscaledZ)) {\n incomplete.add(targetID);\n }\n }\n\n return incomplete;\n }\n\n /**\n * Return dictionary of qualified loaded descendents for each provided target tile id\n */\n _getLoadedDescendents(targetTileIDs: Set) {\n const loadedDescendents: Record = {};\n\n // enumerate current tiles and find the loaded descendents of each target tile\n for (const tile of this._inViewTiles.getAllTiles().filter(tile => tile.hasData())) {\n // determine if the loaded tile (hasData) is a qualified descendent of any target tile\n for (const targetID of targetTileIDs) {\n if (tile.tileID.isChildOf(targetID)) {\n (loadedDescendents[targetID.key] ||= []).push(tile);\n }\n }\n }\n\n return loadedDescendents;\n }\n\n /**\n * Determine if tile ids fully cover the current generation.\n * - 1st generation: need 4 children or 1 overscaled child\n * - 2nd generation: need 16 children or 1 overscaled child\n */\n _areDescendentsComplete(generationIDs: OverscaledTileID[], generationZ: number, ancestorZ: number) {\n //if overscaled, seeking 1 tile at generationZ, otherwise seeking a power of 4 for each descending Z\n if (generationIDs.length === 1 && generationIDs[0].isOverscaled()) {\n return generationIDs[0].overscaledZ === generationZ;\n } else {\n const expectedTiles = Math.pow(4, generationZ - ancestorZ); //4, 16, 64 (for first 3 gens)\n return expectedTiles === generationIDs.length;\n }\n }\n\n /**\n * Get a currently loaded tile.\n * - a cached tile is not a loaded tile\n * @returns the tile if it's in view and had data, null otherwise.\n */\n getLoadedTile(tileID: OverscaledTileID): Tile | null {\n return this._inViewTiles.getLoadedTile(tileID);\n }\n\n /**\n * Resizes the tile cache based on the current viewport's size\n * or the maxTileCacheSize option passed during map creation\n *\n * Larger viewports use more tiles and need larger caches. Larger viewports\n * are more likely to be found on devices with more memory and on pages where\n * the map is more important.\n */\n updateCacheSize(transform: IReadonlyTransform) {\n const widthInTiles = Math.ceil(transform.width / this._source.tileSize) + 1;\n const heightInTiles = Math.ceil(transform.height / this._source.tileSize) + 1;\n const approxTilesInView = widthInTiles * heightInTiles;\n const commonZoomRange = this._maxTileCacheZoomLevels === null ?\n config.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels;\n const viewDependentMaxSize = Math.floor(approxTilesInView * commonZoomRange);\n const maxSize = typeof this._maxTileCacheSize === 'number' ?\n Math.min(this._maxTileCacheSize, viewDependentMaxSize) : viewDependentMaxSize;\n\n this._outOfViewCache.setMaxSize(maxSize);\n }\n\n handleWrapJump(lng: number) {\n // On top of the regular z/x/y values, TileIDs have a `wrap` value that specify\n // which copy of the world the tile belongs to. For example, at `lng: 10` you\n // might render z/x/y/0 while at `lng: 370` you would render z/x/y/1.\n //\n // When lng values get wrapped (going from `lng: 370` to `long: 10`) you expect\n // to see the same thing on the screen (370 degrees and 10 degrees is the same\n // place in the world) but all the TileIDs will have different wrap values.\n //\n // In order to make this transition seamless, we calculate the rounded difference of\n // \"worlds\" between the last frame and the current frame. If the map panned by\n // a world, then we can assign all the tiles new TileIDs with updated wrap values.\n // For example, assign z/x/y/1 a new id: z/x/y/0. It is the same tile, just rendered\n // in a different position.\n //\n // This enables us to reuse the tiles at more ideal locations and prevent flickering.\n const prevLng = this._prevLng === undefined ? lng : this._prevLng;\n const lngDifference = lng - prevLng;\n const worldDifference = lngDifference / 360;\n const wrapDelta = Math.round(worldDifference);\n this._prevLng = lng;\n\n if (wrapDelta) {\n this._inViewTiles.handleWrapJump(wrapDelta);\n this._resetTileReloadTimers();\n }\n }\n\n /**\n * Removes tiles that are outside the viewport and adds new tiles that\n * are inside the viewport.\n */\n update(transform: ITransform, terrain?: Terrain) {\n if (!this._sourceLoaded || this._paused) {\n return;\n }\n this.transform = transform;\n this.terrain = terrain;\n\n this.updateCacheSize(transform);\n this.handleWrapJump(this.transform.center.lng);\n\n let idealTileIDs: OverscaledTileID[];\n\n if (!this.used && !this.usedForTerrain) {\n idealTileIDs = [];\n } else if (this._source.tileID) { // image source\n idealTileIDs = transform.getVisibleUnwrappedCoordinates(this._source.tileID)\n .map((unwrapped) => new OverscaledTileID(unwrapped.canonical.z, unwrapped.wrap, unwrapped.canonical.z, unwrapped.canonical.x, unwrapped.canonical.y));\n } else {\n idealTileIDs = coveringTiles(transform, {\n tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize,\n minzoom: this._source.minzoom,\n maxzoom: this._source.type === 'vector' && this.map._zoomLevelsToOverscale !== undefined\n ? transform.maxZoom - this.map._zoomLevelsToOverscale \n : this._source.maxzoom,\n roundZoom: this.usedForTerrain ? false : this._source.roundZoom,\n reparseOverscaled: this._source.reparseOverscaled,\n terrain,\n calculateTileZoom: this._source.calculateTileZoom,\n });\n\n if (this._source.hasTile) { // tile should be in bounds\n idealTileIDs = idealTileIDs.filter((coord) => this._source.hasTile(coord));\n }\n }\n\n // When tilemanager is used for terrain also load parent tiles for complete rendering of 3d terrain levels\n if (this.usedForTerrain) {\n idealTileIDs = this._addTerrainIdealTiles(idealTileIDs);\n }\n\n const noPendingDataEmissions = idealTileIDs.length === 0 && !this._updated && this._didEmitContent;\n this._updated = true;\n // if we won't have any tiles to fetch and content is already emitted\n // there will be no more data emissions, so we need to emit the event with isSourceLoaded = true\n if (noPendingDataEmissions) {\n this.fire(new Event('data', {sourceDataType: 'idle', dataType: 'source', sourceId: this.id}));\n }\n\n // Retain is a list of tiles that we shouldn't delete, even if they are not\n // the most ideal tile for the current viewport. This may include tiles like\n // parent or child tiles that are *already* loaded.\n const zoom: number = coveringZoomLevel(transform, this._source);\n const retain: Record = this._updateRetainedTiles(idealTileIDs, zoom);\n\n // enable fading for raster source except when using terrain which doesn't currently support fading\n const isRaster = isRasterType(this._source.type);\n if (isRaster && this._rasterFadeDuration > 0 && !terrain) {\n updateFadingTiles(this._inViewTiles, idealTileIDs, retain, this._maxFadingAncestorLevels, this._source.minzoom, this._source.maxzoom, this._rasterFadeDuration);\n }\n\n // clean up non-retained tiles that are no longer needed\n if (isRaster) {\n this._cleanUpRasterTiles(retain);\n } else {\n this._cleanUpVectorTiles(retain);\n }\n }\n\n /**\n * Remove raster tiles that are no longer retained\n */\n _cleanUpRasterTiles(retain: Record) {\n for (const id of this._inViewTiles.getAllIds()) {\n if (!retain[id]) {\n this._removeTile(id);\n }\n }\n }\n\n /**\n * Remove vector tiles that are no longer retained and also not needed for symbol fading\n */\n _cleanUpVectorTiles(retain: Record) {\n for (const id of this._inViewTiles.getAllIds()) {\n const tile = this._inViewTiles.getTileById(id);\n\n // retained - clear fade hold so if it's removed again fade timer starts fresh.\n if (retain[id]) {\n tile.clearSymbolFadeHold();\n continue;\n }\n\n // remove non-retained tiles without symbols\n if (!tile.hasSymbolBuckets) {\n this._removeTile(id);\n continue;\n }\n\n // for tile with symbols - hold for fade - then remove\n if (!tile.holdingForSymbolFade()) {\n tile.setSymbolHoldDuration(this.map._fadeDuration);\n } else if (tile.symbolFadeFinished()) {\n this._removeTile(id);\n }\n }\n }\n\n /**\n * Add ideal tiles needed for 3D terrain rendering\n */\n _addTerrainIdealTiles(idealTileIDs: OverscaledTileID[]): OverscaledTileID[] {\n const ancestors = [];\n\n for (const tileID of idealTileIDs) {\n if (tileID.canonical.z > this._source.minzoom) {\n const parent = tileID.scaledTo(tileID.canonical.z - 1);\n ancestors.push(parent);\n // load very low zoom to calculate tile visibility in transform.coveringTiles and high zoom levels correct\n const parent2 = tileID.scaledTo(Math.max(this._source.minzoom, Math.min(tileID.canonical.z, 5)));\n ancestors.push(parent2);\n }\n }\n\n return idealTileIDs.concat(ancestors);\n }\n\n releaseSymbolFadeTiles() {\n for (const id of this._inViewTiles.getAllIds()) {\n if (this._inViewTiles.getTileById(id).holdingForSymbolFade()) {\n this._removeTile(id);\n }\n }\n }\n\n /**\n * Set tiles to be retained on update of the source. For ideal tiles that do not have data, retain their loaded\n * children so they can be displayed as substitutes pending load of each ideal tile (to reduce flickering).\n * If no loaded children are available, fallback to seeking loaded parents as an alternative substitute.\n */\n _updateRetainedTiles(idealTileIDs: Array, zoom: number): Record {\n const idealTilesWithoutData = new Set();\n for (const idealID of idealTileIDs) {\n const idealTile = this._addTile(idealID);\n\n if (!idealTile.hasData()) {\n idealTilesWithoutData.add(idealID);\n }\n }\n\n // retain the tile even if it's not loaded because it's an ideal tile.\n const retainTileMap: Record = idealTileIDs.reduce((acc, t) => { acc[t.key] = t; return acc;}, {});\n const tileIdsWithoutData = this._retainLoadedChildren(retainTileMap, idealTilesWithoutData);\n\n // for remaining missing tiles with incomplete child coverage, seek a loaded parent tile\n const checked: Record = {};\n const minCoveringZoom = Math.max(zoom - TileManager.maxUnderzooming, this._source.minzoom);\n for (const tileID of tileIdsWithoutData) {\n let tile = this._inViewTiles.getTileById(tileID.key);\n\n // As we ascend up the tile pyramid of the ideal tile, we check whether the parent\n // tile has been previously requested (and errored because we only loop over tiles with no data)\n // in order to determine if we need to request its parent.\n let parentWasRequested = tile?.wasRequested();\n\n for (let overscaledZ = tileID.overscaledZ - 1; overscaledZ >= minCoveringZoom; --overscaledZ) {\n const parentId = tileID.scaledTo(overscaledZ);\n\n // Break parent tile ascent if this route has been previously checked by another child.\n if (checked[parentId.key]) break;\n checked[parentId.key] = true;\n\n tile = this.getTile(parentId);\n if (!tile && parentWasRequested) {\n tile = this._addTile(parentId);\n }\n if (tile) {\n const hasData = tile.hasData();\n if (hasData || !this.map?.cancelPendingTileRequestsWhileZooming || parentWasRequested) {\n retainTileMap[parentId.key] = parentId;\n }\n // Save the current values, since they're the parent of the next iteration\n // of the parent tile ascent loop.\n parentWasRequested = tile.wasRequested();\n if (hasData) break;\n }\n }\n }\n\n return retainTileMap;\n }\n\n /**\n * Add a tile, given its coordinate, to the pyramid.\n */\n _addTile(tileID: OverscaledTileID): Tile {\n let tile = this._inViewTiles.getTileById(tileID.key);\n if (tile)\n return tile;\n\n tile = this._outOfViewCache.getAndRemove(tileID);\n if (tile) {\n //reset fading logic to remove stale fading data from cache\n tile.resetFadeLogic();\n\n // set timer for the reloading of the tile upon expiration\n this._setTileReloadTimer(tileID.key, tile);\n\n // set the tileID because the cached tile could have had a different wrap value\n tile.tileID = tileID;\n this._state.initializeTileState(tile, this.map ? this.map.painter : null);\n }\n\n const cached = tile;\n\n if (!tile) {\n tile = new Tile(tileID, this._source.tileSize * tileID.overscaleFactor());\n this._loadTile(tile, tileID.key, tile.state);\n }\n\n tile.uses++;\n this._inViewTiles.setTile(tileID.key, tile);\n if (!cached) {\n this._source.fire(new Event('dataloading', {tile, coord: tile.tileID, dataType: 'source'}));\n }\n\n return tile;\n }\n\n /**\n * Set a timeout to reload the tile after it expires\n */\n _setTileReloadTimer(id: string, tile: Tile) {\n this._clearTileReloadTimer(id);\n\n const expiryTimeout = tile.getExpiryTimeout();\n if (expiryTimeout) {\n const reload = () => {\n this._reloadTile(id, 'expired');\n delete this._timers[id];\n };\n this._timers[id] = setTimeout(reload, expiryTimeout);\n }\n }\n\n _clearTileReloadTimer(id: string) {\n const timeout = this._timers[id];\n if (timeout) {\n clearTimeout(timeout);\n delete this._timers[id];\n }\n }\n\n _resetTileReloadTimers() {\n for (const id in this._timers) {\n clearTimeout(this._timers[id]);\n delete this._timers[id];\n }\n for (const id of this._inViewTiles.getAllIds()) {\n const tile = this._inViewTiles.getTileById(id);\n this._setTileReloadTimer(id, tile);\n }\n }\n\n /**\n * Reload any currently renderable tiles that are match one of the incoming `tileId` x/y/z\n */\n refreshTiles(tileIds: Array) {\n for (const id of this._inViewTiles.getAllIds()) {\n const tile = this._inViewTiles.getTileById(id);\n if (!this._inViewTiles.isIdRenderable(id) && tile.state != 'errored') {\n continue;\n }\n if (tileIds.some(tid => tid.equals(tile.tileID.canonical))) {\n this._reloadTile(id, 'expired');\n }\n }\n }\n\n /**\n * Remove a tile, given its id, from the pyramid\n */\n _removeTile(id: string) {\n const tile = this._inViewTiles.getTileById(id);\n if (!tile)\n return;\n\n tile.uses--;\n this._inViewTiles.deleteTileById(id);\n this._clearTileReloadTimer(id);\n\n if (tile.uses > 0)\n return;\n\n if (tile.hasData() && tile.state !== 'reloading') {\n this._outOfViewCache.add(tile.tileID, tile, tile.getExpiryTimeout());\n } else {\n tile.aborted = true;\n this._abortTile(tile);\n this._unloadTile(tile);\n }\n }\n\n /** @internal\n * Handles incoming source data messages (i.e. after the source has been updated via a worker that has fired\n * to map.ts data event). For sources with mutable data, the 'content' event fires when the underlying data\n * to a source has changed. (i.e. GeoJSONSource.setData and ImageSource.setCoordinates)\n */\n private _dataHandler(e: MapSourceDataEvent) {\n if (e.dataType !== 'source') return;\n\n if (e.sourceDataType === 'metadata') {\n this._sourceLoaded = true;\n return;\n }\n\n if (e.sourceDataType !== 'content' || !this._sourceLoaded || this._paused) {\n return;\n }\n\n this.reload(e.sourceDataChanged, e.shouldReloadTileOptions);\n if (this.transform) {\n this.update(this.transform, this.terrain);\n }\n this._didEmitContent = true;\n }\n\n /**\n * Remove all tiles from this pyramid\n */\n clearTiles() {\n this._shouldReloadOnResume = false;\n this._paused = false;\n\n for (const id of this._inViewTiles.getAllIds()) {\n this._removeTile(id);\n }\n\n this._outOfViewCache.reset();\n }\n\n /**\n * Search through our current tiles and attempt to find the tiles that\n * cover the given bounds.\n * @param pointQueryGeometry - coordinates of the corners of bounding rectangle\n * @returns result items have `{tile, minX, maxX, minY, maxY}`, where min/max bounding values are the given bounds transformed in into the coordinate space of this tile.\n */\n tilesIn(pointQueryGeometry: Array, maxPitchScaleFactor: number, has3DLayer: boolean): TileResult[] {\n const tileResults: TileResult[] = [];\n\n const transform = this.transform;\n if (!transform) return tileResults;\n const allowWorldCopies = transform.getCoveringTilesDetailsProvider().allowWorldCopies();\n\n const cameraPointQueryGeometry = has3DLayer ?\n transform.getCameraQueryGeometry(pointQueryGeometry) :\n pointQueryGeometry;\n\n const project = (point: Point) => transform.screenPointToMercatorCoordinate(point, this.terrain);\n const queryGeometry = this.transformBbox(pointQueryGeometry, project, !allowWorldCopies);\n const cameraQueryGeometry = this.transformBbox(cameraPointQueryGeometry, project, !allowWorldCopies);\n\n const ids = this.getIds();\n\n const cameraBounds = Bounds.fromPoints(cameraQueryGeometry);\n\n for (let i = 0; i < ids.length; i++) {\n const tile = this._inViewTiles.getTileById(ids[i]);\n if (tile.holdingForSymbolFade()) {\n // Tiles held for fading are covered by tiles that are closer to ideal\n continue;\n }\n // if the projection does not render world copies then we need to explicitly check for the bounding box crossing the antimeridian\n const tileIDs = allowWorldCopies ? [tile.tileID] : [tile.tileID.unwrapTo(-1), tile.tileID.unwrapTo(0)];\n const scale = Math.pow(2, transform.zoom - tile.tileID.overscaledZ);\n const queryPadding = maxPitchScaleFactor * tile.queryPadding * EXTENT / tile.tileSize / scale;\n\n for (const tileID of tileIDs) {\n\n const tileSpaceBounds = cameraBounds.map(point => tileID.getTilePoint(new MercatorCoordinate(point.x, point.y)));\n tileSpaceBounds.expandBy(queryPadding);\n\n if (tileSpaceBounds.intersects(EXTENT_BOUNDS)) {\n\n const tileSpaceQueryGeometry: Array = queryGeometry.map((c) => tileID.getTilePoint(c));\n const tileSpaceCameraQueryGeometry = cameraQueryGeometry.map((c) => tileID.getTilePoint(c));\n\n tileResults.push({\n tile,\n tileID: allowWorldCopies ? tileID : tileID.unwrapTo(0),\n queryGeometry: tileSpaceQueryGeometry,\n cameraQueryGeometry: tileSpaceCameraQueryGeometry,\n scale\n });\n }\n }\n }\n\n return tileResults;\n }\n\n private transformBbox(geom: Point[], project: (point: Point) => MercatorCoordinate, checkWrap: boolean): MercatorCoordinate[] {\n let transformed = geom.map(project);\n if (checkWrap) {\n // If the projection does not allow world copies, then a bounding box may span the antimeridian and\n // instead of a bounding box going from 179°E to 179°W, it goes from 179°W to 179°E and covers the entire\n // planet except for what should be inside it.\n const bounds = Bounds.fromPoints(geom);\n bounds.shrinkBy(Math.min(bounds.width(), bounds.height()) * 0.001);\n const projected = bounds.map(project);\n\n const newBounds = Bounds.fromPoints(transformed);\n\n if (!newBounds.covers(projected)) {\n transformed = transformed.map((coord) => coord.x > 0.5 ?\n new MercatorCoordinate(coord.x - 1, coord.y, coord.z) :\n coord\n );\n }\n }\n return transformed;\n }\n\n getVisibleCoordinates(symbolLayer?: boolean): Array {\n const coords = this.getRenderableIds(symbolLayer).map((id) => this._inViewTiles.getTileById(id).tileID);\n if (this.transform) {\n this.transform.populateCache(coords);\n }\n return coords;\n }\n\n hasTransition() {\n if (this._source.hasTransition()) {\n return true;\n }\n\n if (isRasterType(this._source.type) && hasRasterTransition(this._inViewTiles, this._rasterFadeDuration)) {\n return true;\n }\n\n return false;\n }\n\n setRasterFadeDuration(fadeDuration: number) {\n this._rasterFadeDuration = fadeDuration;\n }\n\n /**\n * Set the value of a particular state for a feature\n */\n setFeatureState(sourceLayer: string, featureId: number | string, state: any) {\n sourceLayer = sourceLayer || GEOJSON_TILE_LAYER_NAME;\n this._state.updateState(sourceLayer, featureId, state);\n }\n\n /**\n * Resets the value of a particular state key for a feature\n */\n removeFeatureState(sourceLayer?: string, featureId?: number | string, key?: string) {\n sourceLayer = sourceLayer || GEOJSON_TILE_LAYER_NAME;\n this._state.removeFeatureState(sourceLayer, featureId, key);\n }\n\n /**\n * Get the entire state object for a feature\n */\n getFeatureState(sourceLayer: string, featureId: number | string) {\n sourceLayer = sourceLayer || GEOJSON_TILE_LAYER_NAME;\n return this._state.getState(sourceLayer, featureId);\n }\n\n /**\n * Sets the set of keys that the tile depends on. This allows tiles to\n * be reloaded when their dependencies change.\n */\n setDependencies(tileKey: string, namespace: string, dependencies: Array) {\n const tile = this._inViewTiles.getTileById(tileKey);\n if (tile) {\n tile.setDependencies(namespace, dependencies);\n }\n }\n\n /**\n * Reloads all tiles that depend on the given keys.\n */\n reloadTilesForDependencies(namespaces: Array, keys: Array) {\n for (const id of this._inViewTiles.getAllIds()) {\n const tile = this._inViewTiles.getTileById(id);\n if (tile.hasDependency(namespaces, keys)) {\n this._reloadTile(id, 'reloading');\n }\n }\n this._outOfViewCache.filter(tile => !tile.hasDependency(namespaces, keys));\n }\n\n areTilesLoaded(): boolean {\n for (const tile of this._inViewTiles.getAllTiles()) {\n if (!(tile.state === 'loaded' || tile.state === 'errored')) {\n return false;\n }\n }\n return true;\n }\n}\n","import {clamp} from '../util/util';\nimport type Point from '@mapbox/point-geometry';\n\nexport class PathInterpolator {\n points: Array;\n length: number;\n paddedLength: number;\n padding: number;\n _distances: Array;\n\n constructor(points_?: Array | null, padding_?: number | null) {\n this.reset(points_, padding_);\n }\n\n reset(points_?: Array | null, padding_?: number | null) {\n this.points = points_ || [];\n\n // Compute cumulative distance from first point to every other point in the segment.\n // Last entry in the array is total length of the path\n this._distances = [0.0];\n\n for (let i = 1; i < this.points.length; i++) {\n this._distances[i] = this._distances[i - 1] + this.points[i].dist(this.points[i - 1]);\n }\n\n this.length = this._distances[this._distances.length - 1];\n this.padding = Math.min(padding_ || 0, this.length * 0.5);\n this.paddedLength = this.length - this.padding * 2.0;\n }\n\n lerp(t: number): Point {\n if (this.points.length === 1) {\n return this.points[0];\n }\n\n t = clamp(t, 0, 1);\n\n // Find the correct segment [p0, p1] where p0 <= x < p1\n let currentIndex = 1;\n let distOfCurrentIdx = this._distances[currentIndex];\n const distToTarget = t * this.paddedLength + this.padding;\n\n while (distOfCurrentIdx < distToTarget && currentIndex < this._distances.length) {\n distOfCurrentIdx = this._distances[++currentIndex];\n }\n\n // Interpolate between the two points of the segment\n const idxOfPrevPoint = currentIndex - 1;\n const distOfPrevIdx = this._distances[idxOfPrevPoint];\n const segmentLength = distOfCurrentIdx - distOfPrevIdx;\n const segmentT = segmentLength > 0 ? (distToTarget - distOfPrevIdx) / segmentLength : 0;\n\n return this.points[idxOfPrevPoint].mult(1.0 - segmentT).add(this.points[currentIndex].mult(segmentT));\n }\n}\n","import type {OverlapMode} from '../style/style_layer/overlap_mode';\n\ntype QueryArgs = {\n hitTest: boolean;\n overlapMode?: OverlapMode;\n circle?: {\n x: number;\n y: number;\n radius: number;\n };\n seenUids: {\n box: {\n [_: number]: boolean;\n };\n circle: {\n [_: number]: boolean;\n };\n };\n};\n\ntype QueryResult = {\n key: T;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n};\n\n/**\n * A key for the grid\n */\nexport type GridKey = {\n overlapMode?: OverlapMode;\n};\n\nfunction overlapAllowed(overlapA: OverlapMode, overlapB: OverlapMode): boolean {\n let allowed = true;\n\n if (overlapA === 'always') {\n // symbol A using 'always' overlap - allowed to overlap anything.\n } else if (overlapA === 'never' || overlapB === 'never') {\n // symbol A using 'never' overlap - can't overlap anything\n // symbol A using 'cooperative' overlap - can overlap 'always' or 'cooperative' symbol; can't overlap 'never'\n allowed = false;\n }\n\n return allowed;\n}\n\n/**\n * @internal\n * GridIndex is a data structure for testing the intersection of\n * circles and rectangles in a 2d plane.\n * It is optimized for rapid insertion and querying.\n * GridIndex splits the plane into a set of \"cells\" and keeps track\n * of which geometries intersect with each cell. At query time,\n * full geometry comparisons are only done for items that share\n * at least one cell. As long as the geometries are relatively\n * uniformly distributed across the plane, this greatly reduces\n * the number of comparisons necessary.\n */\nexport class GridIndex {\n circleKeys: Array;\n boxKeys: Array;\n boxCells: Array>;\n circleCells: Array>;\n bboxes: Array;\n circles: Array;\n xCellCount: number;\n yCellCount: number;\n width: number;\n height: number;\n xScale: number;\n yScale: number;\n boxUid: number;\n circleUid: number;\n\n constructor (width: number, height: number, cellSize: number) {\n const boxCells = this.boxCells = [];\n const circleCells = this.circleCells = [];\n\n // More cells -> fewer geometries to check per cell, but items tend\n // to be split across more cells.\n // Sweet spot allows most small items to fit in one cell\n this.xCellCount = Math.ceil(width / cellSize);\n this.yCellCount = Math.ceil(height / cellSize);\n\n for (let i = 0; i < this.xCellCount * this.yCellCount; i++) {\n boxCells.push([]);\n circleCells.push([]);\n }\n this.circleKeys = [];\n this.boxKeys = [];\n this.bboxes = [];\n this.circles = [];\n\n this.width = width;\n this.height = height;\n this.xScale = this.xCellCount / width;\n this.yScale = this.yCellCount / height;\n this.boxUid = 0;\n this.circleUid = 0;\n }\n\n keysLength() {\n return this.boxKeys.length + this.circleKeys.length;\n }\n\n insert(key: T, x1: number, y1: number, x2: number, y2: number) {\n this._forEachCell(x1, y1, x2, y2, this._insertBoxCell, this.boxUid++);\n this.boxKeys.push(key);\n this.bboxes.push(x1);\n this.bboxes.push(y1);\n this.bboxes.push(x2);\n this.bboxes.push(y2);\n }\n\n insertCircle(key: T, x: number, y: number, radius: number) {\n // Insert circle into grid for all cells in the circumscribing square\n // It's more than necessary (by a factor of 4/PI), but fast to insert\n this._forEachCell(x - radius, y - radius, x + radius, y + radius, this._insertCircleCell, this.circleUid++);\n this.circleKeys.push(key);\n this.circles.push(x);\n this.circles.push(y);\n this.circles.push(radius);\n }\n\n private _insertBoxCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, uid: number) {\n this.boxCells[cellIndex].push(uid);\n }\n\n private _insertCircleCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, uid: number) {\n this.circleCells[cellIndex].push(uid);\n }\n\n private _query(x1: number, y1: number, x2: number, y2: number, hitTest: boolean, overlapMode: OverlapMode, predicate?: (key: T) => boolean): Array> {\n if (x2 < 0 || x1 > this.width || y2 < 0 || y1 > this.height) {\n return [];\n }\n const result: Array> = [];\n if (x1 <= 0 && y1 <= 0 && this.width <= x2 && this.height <= y2) {\n if (hitTest) {\n // Covers the entire grid, so collides with everything\n return [{\n key: null,\n x1,\n y1,\n x2,\n y2\n }];\n }\n for (let boxUid = 0; boxUid < this.boxKeys.length; boxUid++) {\n result.push({\n key: this.boxKeys[boxUid],\n x1: this.bboxes[boxUid * 4],\n y1: this.bboxes[boxUid * 4 + 1],\n x2: this.bboxes[boxUid * 4 + 2],\n y2: this.bboxes[boxUid * 4 + 3]\n });\n }\n for (let circleUid = 0; circleUid < this.circleKeys.length; circleUid++) {\n const x = this.circles[circleUid * 3];\n const y = this.circles[circleUid * 3 + 1];\n const radius = this.circles[circleUid * 3 + 2];\n result.push({\n key: this.circleKeys[circleUid],\n x1: x - radius,\n y1: y - radius,\n x2: x + radius,\n y2: y + radius\n });\n }\n } else {\n const queryArgs: QueryArgs = {\n hitTest,\n overlapMode,\n seenUids: {box: {}, circle: {}}\n };\n this._forEachCell(x1, y1, x2, y2, this._queryCell, result, queryArgs, predicate);\n }\n\n return result;\n }\n\n query(x1: number, y1: number, x2: number, y2: number): Array> {\n return this._query(x1, y1, x2, y2, false, null);\n }\n\n hitTest(x1: number, y1: number, x2: number, y2: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean {\n return this._query(x1, y1, x2, y2, true, overlapMode, predicate).length > 0;\n }\n\n hitTestCircle(x: number, y: number, radius: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean {\n // Insert circle into grid for all cells in the circumscribing square\n // It's more than necessary (by a factor of 4/PI), but fast to insert\n const x1 = x - radius;\n const x2 = x + radius;\n const y1 = y - radius;\n const y2 = y + radius;\n if (x2 < 0 || x1 > this.width || y2 < 0 || y1 > this.height) {\n return false;\n }\n\n // Box query early exits if the bounding box is larger than the grid, but we don't do\n // the equivalent calculation for circle queries because early exit is less likely\n // and the calculation is more expensive\n const result: boolean[] = [];\n const queryArgs: QueryArgs = {\n hitTest: true,\n overlapMode,\n circle: {x, y, radius},\n seenUids: {box: {}, circle: {}}\n };\n this._forEachCell(x1, y1, x2, y2, this._queryCellCircle, result, queryArgs, predicate);\n return result.length > 0;\n }\n\n private _queryCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, result: Array>, queryArgs: QueryArgs, predicate?: (key: T) => boolean): boolean {\n const {seenUids, hitTest, overlapMode} = queryArgs;\n const boxCell = this.boxCells[cellIndex];\n\n if (boxCell !== null) {\n const bboxes = this.bboxes;\n for (const boxUid of boxCell) {\n if (!seenUids.box[boxUid]) {\n seenUids.box[boxUid] = true;\n const offset = boxUid * 4;\n const key = this.boxKeys[boxUid];\n\n if ((x1 <= bboxes[offset + 2]) &&\n (y1 <= bboxes[offset + 3]) &&\n (x2 >= bboxes[offset + 0]) &&\n (y2 >= bboxes[offset + 1]) &&\n (!predicate || predicate(key))) {\n if (!hitTest || !overlapAllowed(overlapMode, key.overlapMode)) {\n result.push({\n key,\n x1: bboxes[offset],\n y1: bboxes[offset + 1],\n x2: bboxes[offset + 2],\n y2: bboxes[offset + 3]\n });\n if (hitTest) {\n // true return value stops the query after first match\n return true;\n }\n }\n }\n }\n }\n }\n const circleCell = this.circleCells[cellIndex];\n if (circleCell !== null) {\n const circles = this.circles;\n for (const circleUid of circleCell) {\n if (!seenUids.circle[circleUid]) {\n seenUids.circle[circleUid] = true;\n const offset = circleUid * 3;\n const key = this.circleKeys[circleUid];\n\n if (this._circleAndRectCollide(\n circles[offset],\n circles[offset + 1],\n circles[offset + 2],\n x1,\n y1,\n x2,\n y2) &&\n (!predicate || predicate(key))) {\n if (!hitTest || !overlapAllowed(overlapMode, key.overlapMode)) {\n const x = circles[offset];\n const y = circles[offset + 1];\n const radius = circles[offset + 2];\n result.push({\n key,\n x1: x - radius,\n y1: y - radius,\n x2: x + radius,\n y2: y + radius\n });\n if (hitTest) {\n // true return value stops the query after first match\n return true;\n }\n }\n }\n }\n }\n }\n\n // false return to continue query\n return false;\n }\n\n private _queryCellCircle(x1: number, y1: number, x2: number, y2: number, cellIndex: number, result: Array, queryArgs: QueryArgs, predicate?: (key: T) => boolean): boolean {\n const {circle, seenUids, overlapMode} = queryArgs;\n const boxCell = this.boxCells[cellIndex];\n\n if (boxCell !== null) {\n const bboxes = this.bboxes;\n for (const boxUid of boxCell) {\n if (!seenUids.box[boxUid]) {\n seenUids.box[boxUid] = true;\n const offset = boxUid * 4;\n const key = this.boxKeys[boxUid];\n if (this._circleAndRectCollide(\n circle.x,\n circle.y,\n circle.radius,\n bboxes[offset + 0],\n bboxes[offset + 1],\n bboxes[offset + 2],\n bboxes[offset + 3]) &&\n (!predicate || predicate(key)) &&\n !overlapAllowed(overlapMode, key.overlapMode)) {\n result.push(true);\n return true;\n }\n }\n }\n }\n\n const circleCell = this.circleCells[cellIndex];\n if (circleCell !== null) {\n const circles = this.circles;\n for (const circleUid of circleCell) {\n if (!seenUids.circle[circleUid]) {\n seenUids.circle[circleUid] = true;\n const offset = circleUid * 3;\n const key = this.circleKeys[circleUid];\n if (this._circlesCollide(\n circles[offset],\n circles[offset + 1],\n circles[offset + 2],\n circle.x,\n circle.y,\n circle.radius) &&\n (!predicate || predicate(key)) &&\n !overlapAllowed(overlapMode, key.overlapMode)) {\n result.push(true);\n return true;\n }\n }\n }\n }\n }\n\n private _forEachCell(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n fn: (x1: number, y1: number, x2: number, y2: number, cellIndex: number, arg1: TArg, arg2?: QueryArgs, predicate?: (key: T) => boolean) => boolean | void,\n arg1: TArg,\n arg2?: QueryArgs,\n predicate?: (key: T) => boolean) {\n const cx1 = this._convertToXCellCoord(x1);\n const cy1 = this._convertToYCellCoord(y1);\n const cx2 = this._convertToXCellCoord(x2);\n const cy2 = this._convertToYCellCoord(y2);\n\n for (let x = cx1; x <= cx2; x++) {\n for (let y = cy1; y <= cy2; y++) {\n const cellIndex = this.xCellCount * y + x;\n if (fn.call(this, x1, y1, x2, y2, cellIndex, arg1, arg2, predicate)) return;\n }\n }\n }\n\n private _convertToXCellCoord(x: number) {\n return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(x * this.xScale)));\n }\n\n private _convertToYCellCoord(y: number) {\n return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(y * this.yScale)));\n }\n\n private _circlesCollide(x1: number, y1: number, r1: number, x2: number, y2: number, r2: number): boolean {\n const dx = x2 - x1;\n const dy = y2 - y1;\n const bothRadii = r1 + r2;\n return (bothRadii * bothRadii) > (dx * dx + dy * dy);\n }\n\n private _circleAndRectCollide(\n circleX: number,\n circleY: number,\n radius: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n ): boolean {\n const halfRectWidth = (x2 - x1) / 2;\n const distX = Math.abs(circleX - (x1 + halfRectWidth));\n if (distX > (halfRectWidth + radius)) {\n return false;\n }\n\n const halfRectHeight = (y2 - y1) / 2;\n const distY = Math.abs(circleY - (y1 + halfRectHeight));\n if (distY > (halfRectHeight + radius)) {\n return false;\n }\n\n if (distX <= halfRectWidth || distY <= halfRectHeight) {\n return true;\n }\n\n const dx = distX - halfRectWidth;\n const dy = distY - halfRectHeight;\n return (dx * dx + dy * dy <= (radius * radius));\n }\n}\n","import Point from '@mapbox/point-geometry';\n\nimport {mat2, mat4, vec2, vec4} from 'gl-matrix';\nimport * as symbolSize from './symbol_size';\nimport {addDynamicAttributes} from '../data/bucket/symbol_bucket';\n\nimport type {Painter} from '../render/painter';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport type {\n GlyphOffsetArray,\n SymbolLineVertexArray,\n SymbolDynamicLayoutArray,\n PlacedSymbol,\n} from '../data/array_types.g';\nimport {WritingMode} from '../symbol/shaping';\nimport {findLineIntersection} from '../util/util';\nimport {type UnwrappedTileID} from '../tile/tile_id';\nimport {type StructArray} from '../util/struct_array';\n\n/**\n * The result of projecting a point to the screen, with some additional information about the projection.\n */\nexport type PointProjection = {\n /**\n * The projected point.\n */\n point: Point;\n /**\n * The original W component of the projection.\n */\n signedDistanceFromCamera: number;\n /**\n * For complex projections (such as globe), true if the point is occluded by the projection, such as by being on the backfacing side of the globe.\n * If the point is simply beyond the edge of the screen, this should NOT be set to false.\n */\n isOccluded: boolean;\n};\n\n/*\n * # Overview of coordinate spaces\n *\n * ## Tile coordinate spaces\n * Each label has an anchor. Some labels have corresponding line geometries.\n * The points for both anchors and lines are stored in tile units. Each tile has it's own\n * coordinate space going from (0, 0) at the top left to (EXTENT, EXTENT) at the bottom right.\n *\n * ## Clip space (GL coordinate space)\n * At the end of everything, the vertex shader needs to produce a position in clip space,\n * which is (-1, 1) at the top left and (1, -1) in the bottom right.\n * In the depth buffer, values are between 0 (near plane) to 1 (far plane).\n *\n * ## Map pixel coordinate spaces\n * Each tile has a pixel coordinate space. It's just the tile units scaled so that one unit is\n * whatever counts as 1 pixel at the current zoom.\n * This space is used for pitch-alignment=map, rotation-alignment=map\n *\n * ## Rotated map pixel coordinate spaces\n * Like the above, but rotated so axis of the space are aligned with the viewport instead of the tile.\n * This space is used for pitch-alignment=map, rotation-alignment=viewport\n *\n * ## Viewport pixel coordinate space\n * (0, 0) is at the top left of the canvas and (pixelWidth, pixelHeight) is at the bottom right corner\n * of the canvas. This space is used for pitch-alignment=viewport\n *\n *\n * # Vertex projection\n * It goes roughly like this:\n * 1. project the anchor and line from tile units into the correct label coordinate space\n * - map pixel space pitch-alignment=map rotation-alignment=map\n * - rotated map pixel space pitch-alignment=map rotation-alignment=viewport\n * - viewport pixel space pitch-alignment=viewport rotation-alignment=*\n * 2. if the label follows a line, find the point along the line that is the correct distance from the anchor.\n * 3. add the glyph's corner offset to the point from step 3\n * 4. convert from the label coordinate space to clip space\n *\n * For horizontal labels we want to do step 1 in the shader for performance reasons (no cpu work).\n * This is what `u_label_plane_matrix` is used for.\n * For labels aligned with lines we have to steps 1 and 2 on the cpu since we need access to the line geometry.\n * This is what `updateLineLabels(...)` does.\n * Since the conversion is handled on the cpu we just set `u_label_plane_matrix` to an identity matrix.\n *\n * Steps 3 and 4 are done in the shaders for all labels.\n *\n *\n * # Custom projection handling\n * Note that since MapLibre now supports more than one projection, the transformation\n * to viewport pixel space and GL clip space now *must* go through the projection's (`transform`'s)\n * `projectTileCoordinates` function, since it might do nontrivial transformations.\n *\n * Hence projecting anything to a symbol's label plane can no longer be handled by a simple matrix,\n * since, if the symbol's label plane is viewport pixel space, `projectTileCoordinates` must be used.\n * This is applies both here and in the symbol vertex shaders.\n */\n\nexport function getPitchedLabelPlaneMatrix(\n rotateWithMap: boolean,\n transform: IReadonlyTransform,\n pixelsToTileUnits: number) {\n const m = mat4.create();\n if (!rotateWithMap) {\n const {vecSouth, vecEast} = getTileSkewVectors(transform);\n const skew = mat2.create();\n skew[0] = vecEast[0];\n skew[1] = vecEast[1];\n skew[2] = vecSouth[0];\n skew[3] = vecSouth[1];\n mat2.invert(skew, skew);\n m[0] = skew[0];\n m[1] = skew[1];\n m[4] = skew[2];\n m[5] = skew[3];\n }\n mat4.scale(m, m, [1 / pixelsToTileUnits, 1 / pixelsToTileUnits, 1]);\n return m;\n}\n\n/*\n * Returns a matrix for either converting from pitched label space to tile space,\n * or for converting from screenspace pixels to clip space.\n */\nexport function getGlCoordMatrix(\n pitchWithMap: boolean,\n rotateWithMap: boolean,\n transform: IReadonlyTransform,\n pixelsToTileUnits: number) {\n if (pitchWithMap) {\n const m = mat4.create();\n if (!rotateWithMap) {\n const {vecSouth, vecEast} = getTileSkewVectors(transform);\n m[0] = vecEast[0];\n m[1] = vecEast[1];\n m[4] = vecSouth[0];\n m[5] = vecSouth[1];\n }\n mat4.scale(m, m, [pixelsToTileUnits, pixelsToTileUnits, 1]);\n return m;\n } else {\n return transform.pixelsToClipSpaceMatrix;\n }\n}\n\nexport function getTileSkewVectors(transform: IReadonlyTransform): {vecEast: vec2; vecSouth: vec2} {\n const cosRoll = Math.cos(transform.rollInRadians);\n const sinRoll = Math.sin(transform.rollInRadians);\n const cosPitch = Math.cos(transform.pitchInRadians);\n const cosBearing = Math.cos(transform.bearingInRadians);\n const sinBearing = Math.sin(transform.bearingInRadians);\n const vecSouth = vec2.create();\n vecSouth[0] = -cosBearing * cosPitch * sinRoll - sinBearing * cosRoll;\n vecSouth[1] = -sinBearing * cosPitch * sinRoll + cosBearing * cosRoll;\n const vecSouthLen = vec2.length(vecSouth);\n if (vecSouthLen < 1.0e-9) {\n vec2.zero(vecSouth);\n } else {\n vec2.scale(vecSouth, vecSouth, 1 / vecSouthLen);\n }\n const vecEast = vec2.create();\n vecEast[0] = cosBearing * cosPitch * cosRoll - sinBearing * sinRoll;\n vecEast[1] = sinBearing * cosPitch * cosRoll + cosBearing * sinRoll;\n const vecEastLen = vec2.length(vecEast);\n if (vecEastLen < 1.0e-9) {\n vec2.zero(vecEast);\n } else {\n vec2.scale(vecEast, vecEast, 1 / vecEastLen);\n }\n\n return {vecEast, vecSouth};\n}\n\n/**\n * Projects a point using a specified matrix, including the perspective divide.\n * Uses a fast path if `getElevation` is undefined.\n */\nexport function projectWithMatrix(x: number, y: number, matrix: mat4, getElevation?: (x: number, y: number) => number): PointProjection {\n let pos;\n if (getElevation) { // slow because of handle z-index\n pos = [x, y, getElevation(x, y), 1] as vec4;\n vec4.transformMat4(pos, pos, matrix);\n } else { // fast because of ignore z-index\n pos = [x, y, 0, 1] as vec4;\n xyTransformMat4(pos, pos, matrix);\n }\n const w = pos[3];\n return {\n point: new Point(pos[0] / w, pos[1] / w),\n signedDistanceFromCamera: w,\n isOccluded: false\n };\n}\n\nexport function getPerspectiveRatio(cameraToCenterDistance: number, signedDistanceFromCamera: number): number {\n return 0.5 + 0.5 * (cameraToCenterDistance / signedDistanceFromCamera);\n}\n\nfunction isVisible(p: Point,\n clippingBuffer: [number, number]) {\n const inPaddedViewport = (\n p.x >= -clippingBuffer[0] &&\n p.x <= clippingBuffer[0] &&\n p.y >= -clippingBuffer[1] &&\n p.y <= clippingBuffer[1]);\n return inPaddedViewport;\n}\n\n/*\n * Update the `dynamicLayoutVertexBuffer` for the buffer with the correct glyph positions for the current map view.\n * This is only run on labels that are aligned with lines. Horizontal labels are handled entirely in the shader.\n */\nexport function updateLineLabels(bucket: SymbolBucket,\n painter: Painter,\n isText: boolean,\n pitchedLabelPlaneMatrix: mat4,\n pitchedLabelPlaneMatrixInverse: mat4,\n pitchWithMap: boolean,\n keepUpright: boolean,\n rotateToLine: boolean,\n unwrappedTileID: UnwrappedTileID,\n viewportWidth: number,\n viewportHeight: number,\n translation: [number, number],\n getElevation: (x: number, y: number) => number) {\n\n const sizeData = isText ? bucket.textSizeData : bucket.iconSizeData;\n const partiallyEvaluatedSize = symbolSize.evaluateSizeForZoom(sizeData, painter.transform.zoom);\n\n const clippingBuffer: [number, number] = [256 / painter.width * 2 + 1, 256 / painter.height * 2 + 1];\n\n const dynamicLayoutVertexArray = isText ?\n bucket.text.dynamicLayoutVertexArray :\n bucket.icon.dynamicLayoutVertexArray;\n dynamicLayoutVertexArray.clear();\n\n const lineVertexArray = bucket.lineVertexArray;\n const placedSymbols = isText ? bucket.text.placedSymbolArray : bucket.icon.placedSymbolArray;\n\n const aspectRatio = painter.transform.width / painter.transform.height;\n\n let useVertical = false;\n\n for (let s = 0; s < placedSymbols.length; s++) {\n const symbol = placedSymbols.get(s);\n\n // Don't do calculations for vertical glyphs unless the previous symbol was horizontal\n // and we determined that vertical glyphs were necessary.\n // Also don't do calculations for symbols that are collided and fully faded out\n if (symbol.hidden || symbol.writingMode === WritingMode.vertical && !useVertical) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n continue;\n }\n // Awkward... but we're counting on the paired \"vertical\" symbol coming immediately after its horizontal counterpart\n useVertical = false;\n\n const tileAnchorPoint = new Point(symbol.anchorX, symbol.anchorY);\n const projectionCache: ProjectionCache = {projections: {}, offsets: {}, cachedAnchorPoint: undefined, anyProjectionOccluded: false};\n\n const projectionContext: SymbolProjectionContext = {\n getElevation,\n pitchedLabelPlaneMatrix,\n lineVertexArray,\n pitchWithMap,\n projectionCache,\n transform: painter.transform,\n tileAnchorPoint,\n unwrappedTileID,\n width: viewportWidth,\n height: viewportHeight,\n translation\n };\n\n const anchorPos = projectTileCoordinatesToClipSpace(symbol.anchorX, symbol.anchorY, projectionContext);\n\n // Don't bother calculating the correct point for invisible labels.\n if (!isVisible(anchorPos.point, clippingBuffer)) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n continue;\n }\n\n const cameraToAnchorDistance = anchorPos.signedDistanceFromCamera;\n const perspectiveRatio = getPerspectiveRatio(painter.transform.cameraToCenterDistance, cameraToAnchorDistance);\n\n const fontSize = symbolSize.evaluateSizeForFeature(sizeData, partiallyEvaluatedSize, symbol);\n const pitchScaledFontSize = pitchWithMap ? (fontSize * painter.transform.getPitchedTextCorrection(symbol.anchorX, symbol.anchorY, unwrappedTileID) / perspectiveRatio) : fontSize * perspectiveRatio;\n\n const placeUnflipped = placeGlyphsAlongLine({\n projectionContext,\n pitchedLabelPlaneMatrixInverse,\n symbol,\n fontSize: pitchScaledFontSize,\n flip: false,\n keepUpright,\n glyphOffsetArray: bucket.glyphOffsetArray,\n dynamicLayoutVertexArray,\n aspectRatio,\n rotateToLine,\n });\n\n useVertical = placeUnflipped.useVertical;\n\n if (placeUnflipped.notEnoughRoom || useVertical ||\n (placeUnflipped.needsFlipping &&\n placeGlyphsAlongLine({\n projectionContext,\n pitchedLabelPlaneMatrixInverse,\n symbol,\n fontSize: pitchScaledFontSize,\n flip: true, // flipped\n keepUpright,\n glyphOffsetArray: bucket.glyphOffsetArray,\n dynamicLayoutVertexArray,\n aspectRatio,\n rotateToLine,\n }).notEnoughRoom)) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n }\n }\n\n if (isText) {\n bucket.text.dynamicLayoutVertexBuffer.updateData(dynamicLayoutVertexArray);\n } else {\n bucket.icon.dynamicLayoutVertexBuffer.updateData(dynamicLayoutVertexArray);\n }\n}\n\ntype FirstAndLastGlyphPlacement = {\n first: PlacedGlyph;\n last: PlacedGlyph;\n} | null;\n\n/*\n * Place the first and last glyph of a line label, projected to the label plane.\n * This function is called both during collision detection (to determine the label's size)\n * and during line label rendering (to make sure the label fits on the line geometry with\n * the current camera position, which may differ from the position used during collision detection).\n *\n * Calling this function has the effect of populating the \"projectionCache\" with all projected\n * vertex locations the label will need, making future calls to placeGlyphAlongLine (for all the\n * intermediate glyphs) much cheaper.\n *\n * Returns null if the label can't fit on the geometry\n */\nexport function placeFirstAndLastGlyph(\n fontScale: number,\n glyphOffsetArray: GlyphOffsetArray,\n lineOffsetX: number,\n lineOffsetY: number,\n flip: boolean,\n symbol: PlacedSymbol,\n rotateToLine: boolean,\n projectionContext: SymbolProjectionContext): FirstAndLastGlyphPlacement {\n const glyphEndIndex = symbol.glyphStartIndex + symbol.numGlyphs;\n const lineStartIndex = symbol.lineStartIndex;\n const lineEndIndex = symbol.lineStartIndex + symbol.lineLength;\n\n const firstGlyphOffset = glyphOffsetArray.getoffsetX(symbol.glyphStartIndex);\n const lastGlyphOffset = glyphOffsetArray.getoffsetX(glyphEndIndex - 1);\n\n const firstPlacedGlyph = placeGlyphAlongLine(fontScale * firstGlyphOffset, lineOffsetX, lineOffsetY, flip, symbol.segment,\n lineStartIndex, lineEndIndex, projectionContext, rotateToLine);\n if (!firstPlacedGlyph)\n return null;\n\n const lastPlacedGlyph = placeGlyphAlongLine(fontScale * lastGlyphOffset, lineOffsetX, lineOffsetY, flip, symbol.segment,\n lineStartIndex, lineEndIndex, projectionContext, rotateToLine);\n if (!lastPlacedGlyph)\n return null;\n\n if (projectionContext.projectionCache.anyProjectionOccluded) {\n return null;\n }\n\n return {first: firstPlacedGlyph, last: lastPlacedGlyph};\n}\n\ntype OrientationChangeType = {\n useVertical?: boolean;\n needsFlipping?: boolean;\n};\n\nfunction requiresOrientationChange(writingMode, firstPoint, lastPoint, aspectRatio): OrientationChangeType {\n if (writingMode === WritingMode.horizontal) {\n // On top of choosing whether to flip, choose whether to render this version of the glyphs or the alternate\n // vertical glyphs. We can't just filter out vertical glyphs in the horizontal range because the horizontal\n // and vertical versions can have slightly different projections which could lead to angles where both or\n // neither showed.\n const rise = Math.abs(lastPoint.y - firstPoint.y);\n const run = Math.abs(lastPoint.x - firstPoint.x) * aspectRatio;\n if (rise > run) {\n return {useVertical: true};\n }\n }\n\n if (writingMode === WritingMode.vertical ? firstPoint.y < lastPoint.y : firstPoint.x > lastPoint.x) {\n // Includes \"horizontalOnly\" case for labels without vertical glyphs\n return {needsFlipping: true};\n }\n\n return null;\n}\n\ntype GlyphLinePlacementResult = OrientationChangeType & {\n notEnoughRoom?: boolean;\n};\n\ntype GlyphLinePlacementArgs = {\n projectionContext: SymbolProjectionContext;\n pitchedLabelPlaneMatrixInverse: mat4;\n symbol: PlacedSymbol;\n fontSize: number;\n flip: boolean;\n keepUpright: boolean;\n glyphOffsetArray: GlyphOffsetArray;\n dynamicLayoutVertexArray: StructArray;\n aspectRatio: number;\n rotateToLine: boolean;\n};\n\n/*\n* Place first and last glyph along the line projected to label plane, and if they fit\n* iterate through all the intermediate glyphs, calculating their label plane positions\n* from the projected line.\n*\n* Finally, add resulting glyph position calculations to dynamicLayoutVertexArray for\n* upload to the GPU\n*/\nfunction placeGlyphsAlongLine(args: GlyphLinePlacementArgs): GlyphLinePlacementResult {\n const {\n projectionContext,\n pitchedLabelPlaneMatrixInverse,\n symbol,\n fontSize,\n flip,\n keepUpright,\n glyphOffsetArray,\n dynamicLayoutVertexArray,\n aspectRatio,\n rotateToLine\n } = args;\n\n const fontScale = fontSize / 24;\n const lineOffsetX = symbol.lineOffsetX * fontScale;\n const lineOffsetY = symbol.lineOffsetY * fontScale;\n\n let placedGlyphs;\n if (symbol.numGlyphs > 1) {\n const glyphEndIndex = symbol.glyphStartIndex + symbol.numGlyphs;\n const lineStartIndex = symbol.lineStartIndex;\n const lineEndIndex = symbol.lineStartIndex + symbol.lineLength;\n\n // Place the first and the last glyph in the label first, so we can figure out\n // the overall orientation of the label and determine whether it needs to be flipped in keepUpright mode\n // Note: these glyphs are placed onto the label plane\n const firstAndLastGlyph = placeFirstAndLastGlyph(fontScale, glyphOffsetArray, lineOffsetX, lineOffsetY, flip, symbol, rotateToLine, projectionContext);\n if (!firstAndLastGlyph) {\n return {notEnoughRoom: true};\n }\n const firstPoint = projectFromLabelPlaneToClipSpace(firstAndLastGlyph.first.point.x, firstAndLastGlyph.first.point.y, projectionContext, pitchedLabelPlaneMatrixInverse);\n const lastPoint = projectFromLabelPlaneToClipSpace(firstAndLastGlyph.last.point.x, firstAndLastGlyph.last.point.y, projectionContext, pitchedLabelPlaneMatrixInverse);\n\n if (keepUpright && !flip) {\n const orientationChange = requiresOrientationChange(symbol.writingMode, firstPoint, lastPoint, aspectRatio);\n if (orientationChange) {\n return orientationChange;\n }\n }\n\n placedGlyphs = [firstAndLastGlyph.first];\n for (let glyphIndex = symbol.glyphStartIndex + 1; glyphIndex < glyphEndIndex - 1; glyphIndex++) {\n // Since first and last glyph fit on the line, try placing the rest of the glyphs.\n const placedGlyph = placeGlyphAlongLine(fontScale * glyphOffsetArray.getoffsetX(glyphIndex), lineOffsetX, lineOffsetY, flip, symbol.segment,\n lineStartIndex, lineEndIndex, projectionContext, rotateToLine);\n if (!placedGlyph) {\n return {notEnoughRoom: true};\n }\n placedGlyphs.push(placedGlyph);\n }\n placedGlyphs.push(firstAndLastGlyph.last);\n } else {\n // Only a single glyph to place\n // So, determine whether to flip based on projected angle of the line segment it's on\n if (keepUpright && !flip) {\n const a = projectTileCoordinatesToLabelPlane(projectionContext.tileAnchorPoint.x, projectionContext.tileAnchorPoint.y, projectionContext).point;\n const tileVertexIndex = (symbol.lineStartIndex + symbol.segment + 1);\n const tileSegmentEnd = new Point(projectionContext.lineVertexArray.getx(tileVertexIndex), projectionContext.lineVertexArray.gety(tileVertexIndex));\n const projectedVertex = projectTileCoordinatesToLabelPlane(tileSegmentEnd.x, tileSegmentEnd.y, projectionContext);\n // We know the anchor will be in the viewport, but the end of the line segment may be\n // behind the plane of the camera, in which case we can use a point at any arbitrary (closer)\n // point on the segment.\n const b = (projectedVertex.signedDistanceFromCamera > 0) ?\n projectedVertex.point :\n projectTruncatedLineSegmentToLabelPlane(projectionContext.tileAnchorPoint, tileSegmentEnd, a, 1, projectionContext);\n\n const clipSpaceA = projectFromLabelPlaneToClipSpace(a.x, a.y, projectionContext, pitchedLabelPlaneMatrixInverse);\n const clipSpaceB = projectFromLabelPlaneToClipSpace(b.x, b.y, projectionContext, pitchedLabelPlaneMatrixInverse);\n\n const orientationChange = requiresOrientationChange(symbol.writingMode, clipSpaceA, clipSpaceB, aspectRatio);\n if (orientationChange) {\n return orientationChange;\n }\n }\n const singleGlyph = placeGlyphAlongLine(fontScale * glyphOffsetArray.getoffsetX(symbol.glyphStartIndex), lineOffsetX, lineOffsetY, flip, symbol.segment,\n symbol.lineStartIndex, symbol.lineStartIndex + symbol.lineLength, projectionContext, rotateToLine);\n if (!singleGlyph || projectionContext.projectionCache.anyProjectionOccluded)\n return {notEnoughRoom: true};\n\n placedGlyphs = [singleGlyph];\n }\n\n for (const glyph of placedGlyphs) {\n addDynamicAttributes(dynamicLayoutVertexArray, glyph.point, glyph.angle);\n }\n return {};\n}\n\n/**\n * Takes a line and direction from `previousTilePoint` to `currentTilePoint`, projects it to the correct label plane,\n * and returns a projected point along this projected line that is `minimumLength` distance away from `previousProjectedPoint`.\n * Projects a \"virtual\" vertex along a line segment.\n * @param previousTilePoint - Line start point, in tile coordinates.\n * @param currentTilePoint - Line end point, in tile coordinates.\n * @param previousProjectedPoint - Projection of `previousTilePoint` into label plane\n * @param minimumLength - Distance in the projected space along the line for the returned point.\n * @param projectionContext - Projection context, used to get terrain's `getElevation`, and to project the points to screen pixels.\n */\nfunction projectTruncatedLineSegmentToLabelPlane(previousTilePoint: Point, currentTilePoint: Point, previousProjectedPoint: Point, minimumLength: number, projectionContext: SymbolProjectionContext) {\n // We are assuming \"previousTilePoint\" won't project to a point within one unit of the camera plane\n // If it did, that would mean our label extended all the way out from within the viewport to a (very distant)\n // point near the plane of the camera. We wouldn't be able to render the label anyway once it crossed the\n // plane of the camera.\n const unitVertexToBeProjected = previousTilePoint.add(previousTilePoint.sub(currentTilePoint)._unit());\n const projectedUnitVertex = projectTileCoordinatesToLabelPlane(unitVertexToBeProjected.x, unitVertexToBeProjected.y, projectionContext).point;\n const projectedUnitSegment = previousProjectedPoint.sub(projectedUnitVertex);\n return previousProjectedPoint.add(projectedUnitSegment._mult(minimumLength / projectedUnitSegment.mag()));\n}\n\ntype IndexToPointCache = { [lineIndex: number]: Point };\n\n/**\n * @internal\n * We calculate label-plane projected points for line vertices as we place glyphs along the line\n * Since we will use the same vertices for potentially many glyphs, cache the results for this bucket\n * over the course of the render. Each vertex location also potentially has one offset equivalent\n * for us to hold onto. The vertex indices are per-symbol-bucket.\n */\ntype ProjectionCache = {\n /**\n * tile-unit vertices projected into label-plane units\n */\n projections: IndexToPointCache;\n /**\n * label-plane vertices which have been shifted to follow an offset line\n */\n offsets: IndexToPointCache;\n /**\n * Cached projected anchor point.\n */\n cachedAnchorPoint: Point | undefined;\n /**\n * Was any projected point occluded by the map itself (eg. occluded by the planet when using globe projection).\n *\n * Viewport-pitched line-following texts where *any* of the line points is hidden behind the planet curve becomes entirely hidden.\n * This is perhaps not the most ideal behavior, but it works, it is simple and planetary-scale texts such as this seem to be a rare edge case.\n */\n anyProjectionOccluded: boolean;\n};\n\n/**\n * @internal\n * Arguments necessary to project a vertex to the label plane\n */\nexport type SymbolProjectionContext = {\n /**\n * Used to cache results, save cost if projecting the same vertex multiple times\n */\n projectionCache: ProjectionCache;\n /**\n * The array of tile-unit vertices transferred from worker\n */\n lineVertexArray: SymbolLineVertexArray;\n /**\n * Matrix for transforming from pixels (symbol shaping) to potentially rotated tile units (pitched map label plane).\n */\n pitchedLabelPlaneMatrix: mat4;\n /**\n * Function to get elevation at a point\n * @param x - the x coordinate\n * @param y - the y coordinate\n */\n getElevation: (x: number, y: number) => number;\n /**\n * Only for creating synthetic vertices if vertex would otherwise project behind plane of camera,\n * but still convenient to pass it inside this type.\n */\n tileAnchorPoint: Point;\n /**\n * True when line glyphs are projected onto the map, instead of onto the viewport.\n */\n pitchWithMap: boolean;\n transform: IReadonlyTransform;\n unwrappedTileID: UnwrappedTileID;\n /**\n * Viewport width.\n */\n width: number;\n /**\n * Viewport height.\n */\n height: number;\n /**\n * Translation in tile units, computed using text-translate and text-translate-anchor paint style properties.\n */\n translation: [number, number];\n};\n\n/**\n * Only for creating synthetic vertices if vertex would otherwise project behind plane of camera\n */\nexport type ProjectionSyntheticVertexArgs = {\n distanceFromAnchor: number;\n previousVertex: Point;\n direction: number;\n absOffsetX: number;\n};\n\n/**\n * Transform a vertex from tile coordinates to label plane coordinates\n * @param index - index of vertex to project\n * @param projectionContext - necessary data to project a vertex\n * @returns the vertex projected to the label plane\n */\nexport function projectLineVertexToLabelPlane(index: number, projectionContext: SymbolProjectionContext, syntheticVertexArgs: ProjectionSyntheticVertexArgs): Point {\n const cache = projectionContext.projectionCache;\n\n if (cache.projections[index]) {\n return cache.projections[index];\n }\n const currentVertex = new Point(\n projectionContext.lineVertexArray.getx(index),\n projectionContext.lineVertexArray.gety(index));\n\n const projection = projectTileCoordinatesToLabelPlane(currentVertex.x, currentVertex.y, projectionContext);\n\n if (projection.signedDistanceFromCamera > 0) {\n cache.projections[index] = projection.point;\n cache.anyProjectionOccluded = cache.anyProjectionOccluded || projection.isOccluded;\n return projection.point;\n }\n\n // The vertex is behind the plane of the camera, so we can't project it\n // Instead, we'll create a vertex along the line that's far enough to include the glyph\n const previousLineVertexIndex = index - syntheticVertexArgs.direction;\n const previousTilePoint = syntheticVertexArgs.distanceFromAnchor === 0 ?\n projectionContext.tileAnchorPoint :\n new Point(projectionContext.lineVertexArray.getx(previousLineVertexIndex), projectionContext.lineVertexArray.gety(previousLineVertexIndex));\n\n // Don't cache because the new vertex might not be far enough out for future glyphs on the same segment\n const minimumLength = syntheticVertexArgs.absOffsetX - syntheticVertexArgs.distanceFromAnchor + 1;\n return projectTruncatedLineSegmentToLabelPlane(previousTilePoint, currentVertex, syntheticVertexArgs.previousVertex, minimumLength, projectionContext);\n}\n\n/**\n * Projects the given point in tile coordinates to the correct label plane.\n * If pitchWithMap is true, the (rotated) map plane in pixels is used,\n * otherwise screen pixels are used.\n */\nexport function projectTileCoordinatesToLabelPlane(x: number, y: number, projectionContext: SymbolProjectionContext): PointProjection {\n const translatedX = x + projectionContext.translation[0];\n const translatedY = y + projectionContext.translation[1];\n let projection;\n if (projectionContext.pitchWithMap) {\n projection = projectWithMatrix(translatedX, translatedY, projectionContext.pitchedLabelPlaneMatrix, projectionContext.getElevation);\n projection.isOccluded = false;\n } else {\n projection = projectionContext.transform.projectTileCoordinates(translatedX, translatedY, projectionContext.unwrappedTileID, projectionContext.getElevation);\n projection.point.x = (projection.point.x * 0.5 + 0.5) * projectionContext.width;\n projection.point.y = (-projection.point.y * 0.5 + 0.5) * projectionContext.height;\n }\n return projection;\n}\n\nfunction projectFromLabelPlaneToClipSpace(x: number, y: number, projectionContext: SymbolProjectionContext, pitchedLabelPlaneMatrixInverse: mat4): {x: number; y: number} {\n if (projectionContext.pitchWithMap) {\n const pos = [x, y, 0, 1] as vec4;\n vec4.transformMat4(pos, pos, pitchedLabelPlaneMatrixInverse);\n return projectionContext.transform.projectTileCoordinates(pos[0] / pos[3], pos[1] / pos[3], projectionContext.unwrappedTileID, projectionContext.getElevation).point;\n } else {\n return {\n x: (x / projectionContext.width) * 2.0 - 1.0,\n y: 1.0 - (y / projectionContext.height) * 2.0\n };\n }\n}\n\n/**\n * Projects the given point in tile coordinates to the GL clip space (-1..1).\n */\nexport function projectTileCoordinatesToClipSpace(x: number, y: number, projectionContext: SymbolProjectionContext): PointProjection {\n const projection = projectionContext.transform.projectTileCoordinates(x, y, projectionContext.unwrappedTileID, projectionContext.getElevation);\n return projection;\n}\n\n/**\n * Calculate the normal vector for a line segment\n * @param segmentVector - will be mutated as a tiny optimization\n * @param offset - magnitude of resulting vector\n * @param direction - direction of line traversal\n * @returns a normal vector from the segment, with magnitude equal to offset amount\n */\nexport function transformToOffsetNormal(segmentVector: Point, offset: number, direction: number): Point {\n return segmentVector._unit()._perp()._mult(offset * direction);\n}\n\n/**\n * Construct offset line segments for the current segment and the next segment, then extend/shrink\n * the segments until they intersect. If the segments are parallel, then they will touch with no modification.\n *\n * @param index - Index of the current vertex\n * @param prevToCurrentOffsetNormal - Normal vector of the line segment from the previous vertex to the current vertex\n * @param currentVertex - Current (non-offset) vertex projected to the label plane\n * @param lineStartIndex - Beginning index for the line this label is on\n * @param lineEndIndex - End index for the line this label is on\n * @param offsetPreviousVertex - The previous vertex projected to the label plane, and then offset along the previous segments normal\n * @param lineOffsetY - Magnitude of the offset\n * @param projectionContext - Necessary data for tile-to-label-plane projection\n * @returns The point at which the current and next line segments intersect, once offset and extended/shrunk to their meeting point\n */\nexport function findOffsetIntersectionPoint(\n index: number,\n prevToCurrentOffsetNormal: Point,\n currentVertex: Point,\n lineStartIndex: number,\n lineEndIndex: number,\n offsetPreviousVertex: Point,\n lineOffsetY: number,\n projectionContext: SymbolProjectionContext,\n syntheticVertexArgs: ProjectionSyntheticVertexArgs) {\n if (projectionContext.projectionCache.offsets[index]) {\n return projectionContext.projectionCache.offsets[index];\n }\n\n const offsetCurrentVertex = currentVertex.add(prevToCurrentOffsetNormal);\n\n if (index + syntheticVertexArgs.direction < lineStartIndex || index + syntheticVertexArgs.direction >= lineEndIndex) {\n // This is the end of the line, no intersection to calculate\n projectionContext.projectionCache.offsets[index] = offsetCurrentVertex;\n return offsetCurrentVertex;\n }\n // Offset the vertices for the next segment\n const nextVertex = projectLineVertexToLabelPlane(index + syntheticVertexArgs.direction, projectionContext, syntheticVertexArgs);\n const currentToNextOffsetNormal = transformToOffsetNormal(nextVertex.sub(currentVertex), lineOffsetY, syntheticVertexArgs.direction);\n const offsetNextSegmentBegin = currentVertex.add(currentToNextOffsetNormal);\n const offsetNextSegmentEnd = nextVertex.add(currentToNextOffsetNormal);\n\n // find the intersection of these two lines\n // if the lines are parallel, offsetCurrent/offsetNextBegin will touch\n projectionContext.projectionCache.offsets[index] = findLineIntersection(offsetPreviousVertex, offsetCurrentVertex, offsetNextSegmentBegin, offsetNextSegmentEnd) || offsetCurrentVertex;\n\n return projectionContext.projectionCache.offsets[index];\n}\n\n/**\n * Placed Glyph type\n */\ntype PlacedGlyph = {\n /**\n * The point at which the glyph should be placed, in label plane coordinates\n */\n point: Point;\n /**\n * The angle at which the glyph should be placed\n */\n angle: number;\n /**\n * The label-plane path used to reach this glyph: used only for collision detection\n */\n path: Array;\n};\n\n/*\n * Place a single glyph along its line, projected into the label plane, by iterating outward\n * from the anchor point until the distance traversed in the label plane equals the glyph's\n * offsetX. Returns null if the glyph can't fit on the line geometry.\n */\nexport function placeGlyphAlongLine(\n offsetX: number,\n lineOffsetX: number,\n lineOffsetY: number,\n flip: boolean,\n anchorSegment: number,\n lineStartIndex: number,\n lineEndIndex: number,\n projectionContext: SymbolProjectionContext,\n rotateToLine: boolean): PlacedGlyph | null {\n\n const combinedOffsetX = flip ?\n offsetX - lineOffsetX :\n offsetX + lineOffsetX;\n\n let direction = combinedOffsetX > 0 ? 1 : -1;\n\n let angle = 0;\n if (flip) {\n // The label needs to be flipped to keep text upright.\n // Iterate in the reverse direction.\n direction *= -1;\n angle = Math.PI;\n }\n\n if (direction < 0) angle += Math.PI;\n\n let currentIndex = direction > 0 ?\n lineStartIndex + anchorSegment :\n lineStartIndex + anchorSegment + 1;\n\n // Project anchor point to viewport and cache it\n let anchorPoint: Point;\n\n if (projectionContext.projectionCache.cachedAnchorPoint) {\n anchorPoint = projectionContext.projectionCache.cachedAnchorPoint;\n } else {\n anchorPoint = projectTileCoordinatesToLabelPlane(projectionContext.tileAnchorPoint.x, projectionContext.tileAnchorPoint.y, projectionContext).point;\n projectionContext.projectionCache.cachedAnchorPoint = anchorPoint;\n }\n\n let currentVertex = anchorPoint;\n let previousVertex = anchorPoint;\n\n // offsetPrev and intersectionPoint are analogous to previousVertex and currentVertex\n // but if there's a line offset they are calculated in parallel as projection happens\n let offsetIntersectionPoint: Point;\n let offsetPreviousVertex: Point;\n\n let distanceFromAnchor = 0;\n let currentSegmentDistance = 0;\n const absOffsetX = Math.abs(combinedOffsetX);\n const pathVertices: Array = [];\n\n let currentLineSegment: Point;\n while (distanceFromAnchor + currentSegmentDistance <= absOffsetX) {\n currentIndex += direction;\n\n // offset does not fit on the projected line\n if (currentIndex < lineStartIndex || currentIndex >= lineEndIndex)\n return null;\n\n // accumulate values from last iteration\n distanceFromAnchor += currentSegmentDistance;\n previousVertex = currentVertex;\n offsetPreviousVertex = offsetIntersectionPoint;\n\n const syntheticVertexArgs: ProjectionSyntheticVertexArgs = {\n absOffsetX,\n direction,\n distanceFromAnchor,\n previousVertex\n };\n\n // find next vertex in viewport space\n currentVertex = projectLineVertexToLabelPlane(currentIndex, projectionContext, syntheticVertexArgs);\n if (lineOffsetY === 0) {\n // Store vertices for collision detection and update current segment geometry\n pathVertices.push(previousVertex);\n currentLineSegment = currentVertex.sub(previousVertex);\n } else {\n // Calculate the offset for this section\n let prevToCurrentOffsetNormal;\n const prevToCurrent = currentVertex.sub(previousVertex);\n if (prevToCurrent.mag() === 0) {\n // We are starting with our anchor point directly on the vertex, so look one vertex ahead\n // to calculate a normal\n const nextVertex = projectLineVertexToLabelPlane(currentIndex + direction, projectionContext, syntheticVertexArgs);\n prevToCurrentOffsetNormal = transformToOffsetNormal(nextVertex.sub(currentVertex), lineOffsetY, direction);\n } else {\n prevToCurrentOffsetNormal = transformToOffsetNormal(prevToCurrent, lineOffsetY, direction);\n }\n // Initialize offsetPrev on our first iteration, after that it will be pre-calculated\n if (!offsetPreviousVertex)\n offsetPreviousVertex = previousVertex.add(prevToCurrentOffsetNormal);\n\n offsetIntersectionPoint = findOffsetIntersectionPoint(currentIndex, prevToCurrentOffsetNormal, currentVertex, lineStartIndex, lineEndIndex, offsetPreviousVertex, lineOffsetY, projectionContext, syntheticVertexArgs);\n\n pathVertices.push(offsetPreviousVertex);\n currentLineSegment = offsetIntersectionPoint.sub(offsetPreviousVertex);\n }\n currentSegmentDistance = currentLineSegment.mag();\n }\n\n // The point is on the current segment. Interpolate to find it.\n const segmentInterpolationT = (absOffsetX - distanceFromAnchor) / currentSegmentDistance;\n const p = currentLineSegment._mult(segmentInterpolationT)._add(offsetPreviousVertex || previousVertex);\n\n const segmentAngle = angle + Math.atan2(currentVertex.y - previousVertex.y, currentVertex.x - previousVertex.x);\n\n pathVertices.push(p);\n\n return {\n point: p,\n angle: rotateToLine ? segmentAngle : 0.0,\n path: pathVertices\n };\n}\n\nconst hiddenGlyphAttributes = new Float32Array([-Infinity, -Infinity, 0, -Infinity, -Infinity, 0, -Infinity, -Infinity, 0, -Infinity, -Infinity, 0]);\n\n// Hide them by moving them offscreen. We still need to add them to the buffer\n// because the dynamic buffer is paired with a static buffer that doesn't get updated.\nexport function hideGlyphs(num: number, dynamicLayoutVertexArray: SymbolDynamicLayoutArray) {\n for (let i = 0; i < num; i++) {\n const offset = dynamicLayoutVertexArray.length;\n dynamicLayoutVertexArray.resize(offset + 4);\n // Since all hidden glyphs have the same attributes, we can build up the array faster with a single call to Float32Array.set\n // for each set of four vertices, instead of calling addDynamicAttributes for each vertex.\n dynamicLayoutVertexArray.float32.set(hiddenGlyphAttributes, offset * 3);\n }\n}\n\n// For line label layout, we're not using z output and our w input is always 1\n// This custom matrix transformation ignores those components to make projection faster\nexport function xyTransformMat4(out: vec4, a: vec4, m: mat4) {\n const x = a[0], y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n out[3] = m[3] * x + m[7] * y + m[15];\n return out;\n}\n\n/**\n * Takes a path of points that was previously projected using the `pitchedLabelPlaneMatrix`\n * and projects it using the map projection's (mercator/globe...) `projectTileCoordinates` function.\n * Returns a new array of the projected points.\n * Does not modify the input array.\n */\nexport function projectPathSpecialProjection(projectedPath: Array, projectionContext: SymbolProjectionContext): Array {\n const inverseLabelPlaneMatrix = mat4.create();\n mat4.invert(inverseLabelPlaneMatrix, projectionContext.pitchedLabelPlaneMatrix);\n return projectedPath.map(p => {\n const backProjected = projectWithMatrix(p.x, p.y, inverseLabelPlaneMatrix, projectionContext.getElevation);\n const projected = projectionContext.transform.projectTileCoordinates(\n backProjected.point.x,\n backProjected.point.y,\n projectionContext.unwrappedTileID,\n projectionContext.getElevation\n );\n projected.point.x = (projected.point.x * 0.5 + 0.5) * projectionContext.width;\n projected.point.y = (-projected.point.y * 0.5 + 0.5) * projectionContext.height;\n return projected;\n });\n}\n\n/**\n * Takes a path of points projected to screenspace, finds the longest continuous unoccluded segment of that path\n * and returns it.\n * Does not modify the input array.\n */\nexport function pathSlicedToLongestUnoccluded(path: Array): Array {\n let longestUnoccludedStart = 0;\n let longestUnoccludedLength = 0;\n let currentUnoccludedStart = 0;\n let currentUnoccludedLength = 0;\n for (let i = 0; i < path.length; i++) {\n if (path[i].isOccluded) {\n currentUnoccludedStart = i + 1;\n currentUnoccludedLength = 0;\n } else {\n currentUnoccludedLength++;\n if (currentUnoccludedLength > longestUnoccludedLength) {\n longestUnoccludedLength = currentUnoccludedLength;\n longestUnoccludedStart = currentUnoccludedStart;\n }\n }\n }\n return path.slice(longestUnoccludedStart, longestUnoccludedStart + longestUnoccludedLength);\n}\n","import Point from '@mapbox/point-geometry';\nimport {clipLine} from './clip_line';\nimport {PathInterpolator} from './path_interpolator';\n\nimport * as intersectionTests from '../util/intersection_tests';\nimport {GridIndex} from './grid_index';\nimport {mat4, vec4} from 'gl-matrix';\nimport ONE_EM from '../symbol/one_em';\n\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {SingleCollisionBox} from '../data/bucket/symbol_bucket';\nimport type {\n GlyphOffsetArray,\n PlacedSymbol,\n SymbolLineVertexArray\n} from '../data/array_types.g';\nimport type {OverlapMode} from '../style/style_layer/overlap_mode';\nimport {type OverscaledTileID, type UnwrappedTileID} from '../tile/tile_id';\nimport {type PointProjection, type SymbolProjectionContext, getTileSkewVectors, pathSlicedToLongestUnoccluded, placeFirstAndLastGlyph, projectPathSpecialProjection, xyTransformMat4} from '../symbol/projection';\nimport {clamp, getAABB} from '../util/util';\nimport {Bounds} from '../geo/bounds';\n\n// When a symbol crosses the edge that causes it to be included in\n// collision detection, it will cause changes in the symbols around\n// it. This constant specifies how many pixels to pad the edge of\n// the viewport for collision detection so that the bulk of the changes\n// occur offscreen. Making this constant greater increases label\n// stability, but it's expensive.\nexport const viewportPadding = 100;\n\nexport type PlacedCircles = {\n circles: Array;\n offscreen: boolean;\n collisionDetected: boolean;\n};\n\nexport type PlacedBox = {\n box: Array;\n placeable: boolean;\n offscreen: boolean;\n occluded: boolean;\n};\n\nexport type FeatureKey = {\n bucketInstanceId: number;\n featureIndex: number;\n collisionGroupID: number;\n overlapMode: OverlapMode;\n};\n\ntype ProjectedBox = {\n /**\n * The AABB in the format [minX, minY, maxX, maxY].\n */\n box: [number, number, number, number];\n allPointsOccluded: boolean;\n};\n\n/**\n * @internal\n * A collision index used to prevent symbols from overlapping. It keep tracks of\n * where previous symbols have been placed and is used to check if a new\n * symbol overlaps with any previously added symbols.\n *\n * There are two steps to insertion: first placeCollisionBox/Circles checks if\n * there's room for a symbol, then insertCollisionBox/Circles actually puts the\n * symbol in the index. The two step process allows paired symbols to be inserted\n * together even if they overlap.\n */\nexport class CollisionIndex {\n grid: GridIndex;\n ignoredGrid: GridIndex;\n transform: IReadonlyTransform;\n pitchFactor: number;\n screenRightBoundary: number;\n screenBottomBoundary: number;\n gridRightBoundary: number;\n gridBottomBoundary: number;\n\n // With perspectiveRatio the fontsize is calculated for tilted maps (near = bigger, far = smaller).\n // The cutoff defines a threshold to no longer render labels near the horizon.\n perspectiveRatioCutoff: number;\n\n constructor(\n transform: IReadonlyTransform,\n grid = new GridIndex(transform.width + 2 * viewportPadding, transform.height + 2 * viewportPadding, 25),\n ignoredGrid = new GridIndex(transform.width + 2 * viewportPadding, transform.height + 2 * viewportPadding, 25)\n ) {\n this.transform = transform;\n\n this.grid = grid;\n this.ignoredGrid = ignoredGrid;\n this.pitchFactor = Math.cos(transform.pitch * Math.PI / 180.0) * transform.cameraToCenterDistance;\n\n this.screenRightBoundary = transform.width + viewportPadding;\n this.screenBottomBoundary = transform.height + viewportPadding;\n this.gridRightBoundary = transform.width + 2 * viewportPadding;\n this.gridBottomBoundary = transform.height + 2 * viewportPadding;\n\n this.perspectiveRatioCutoff = 0.6;\n }\n\n placeCollisionBox(\n collisionBox: SingleCollisionBox,\n overlapMode: OverlapMode,\n textPixelRatio: number,\n tileID: OverscaledTileID,\n unwrappedTileID: UnwrappedTileID,\n pitchWithMap: boolean,\n rotateWithMap: boolean,\n translation: [number, number],\n collisionGroupPredicate?: (key: FeatureKey) => boolean,\n getElevation?: (x: number, y: number) => number,\n shift?: Point,\n simpleProjectionMatrix?: mat4,\n ): PlacedBox {\n const x = collisionBox.anchorPointX + translation[0];\n const y = collisionBox.anchorPointY + translation[1];\n const projectedPoint = this.projectAndGetPerspectiveRatio(\n x,\n y,\n unwrappedTileID,\n getElevation,\n simpleProjectionMatrix\n );\n\n const tileToViewport = textPixelRatio * projectedPoint.perspectiveRatio;\n let projectedBox: ProjectedBox;\n\n if (!pitchWithMap && !rotateWithMap) {\n // Fast path for common symbols\n const pointX = projectedPoint.x + (shift ? shift.x * tileToViewport : 0);\n const pointY = projectedPoint.y + (shift ? shift.y * tileToViewport : 0);\n projectedBox = {\n allPointsOccluded: false,\n box: [\n pointX + collisionBox.x1 * tileToViewport,\n pointY + collisionBox.y1 * tileToViewport,\n pointX + collisionBox.x2 * tileToViewport,\n pointY + collisionBox.y2 * tileToViewport,\n ]\n };\n } else {\n projectedBox = this._projectCollisionBox(\n collisionBox,\n tileToViewport,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translation,\n projectedPoint,\n getElevation,\n shift,\n simpleProjectionMatrix,\n );\n }\n\n const [tlX, tlY, brX, brY] = projectedBox.box;\n\n // Conditions are ordered from the fastest to evaluate to the slowest.\n const occluded = pitchWithMap ? projectedBox.allPointsOccluded : projectedPoint.isOccluded;\n\n let unplaceable = occluded;\n unplaceable ||= projectedPoint.perspectiveRatio < this.perspectiveRatioCutoff;\n unplaceable ||= !this.isInsideGrid(tlX, tlY, brX, brY);\n\n if (unplaceable ||\n (overlapMode !== 'always' && this.grid.hitTest(tlX, tlY, brX, brY, overlapMode, collisionGroupPredicate))) {\n return {\n box: [tlX, tlY, brX, brY],\n placeable: false,\n offscreen: false,\n occluded\n };\n }\n\n return {\n box: [tlX, tlY, brX, brY],\n placeable: true,\n offscreen: this.isOffscreen(tlX, tlY, brX, brY),\n occluded\n };\n }\n\n placeCollisionCircles(\n overlapMode: OverlapMode,\n symbol: PlacedSymbol,\n lineVertexArray: SymbolLineVertexArray,\n glyphOffsetArray: GlyphOffsetArray,\n fontSize: number,\n unwrappedTileID: UnwrappedTileID,\n pitchedLabelPlaneMatrix: mat4,\n showCollisionCircles: boolean,\n pitchWithMap: boolean,\n collisionGroupPredicate: (key: FeatureKey) => boolean,\n circlePixelDiameter: number,\n textPixelPadding: number,\n translation: [number, number],\n getElevation: (x: number, y: number) => number\n ): PlacedCircles {\n const placedCollisionCircles = [];\n\n const tileUnitAnchorPoint = new Point(symbol.anchorX, symbol.anchorY);\n const perspectiveRatio = this.getPerspectiveRatio(tileUnitAnchorPoint.x, tileUnitAnchorPoint.y, unwrappedTileID, getElevation);\n\n const labelPlaneFontSize = pitchWithMap ? (fontSize * this.transform.getPitchedTextCorrection(symbol.anchorX, symbol.anchorY, unwrappedTileID) / perspectiveRatio) : fontSize * perspectiveRatio;\n const labelPlaneFontScale = labelPlaneFontSize / ONE_EM;\n\n const projectionCache = {projections: {}, offsets: {}, cachedAnchorPoint: undefined, anyProjectionOccluded: false};\n const lineOffsetX = symbol.lineOffsetX * labelPlaneFontScale;\n const lineOffsetY = symbol.lineOffsetY * labelPlaneFontScale;\n\n const projectionContext: SymbolProjectionContext = {\n getElevation,\n pitchedLabelPlaneMatrix,\n lineVertexArray,\n pitchWithMap,\n projectionCache,\n transform: this.transform,\n tileAnchorPoint: tileUnitAnchorPoint,\n unwrappedTileID,\n width: this.transform.width,\n height: this.transform.height,\n translation\n };\n\n const firstAndLastGlyph = placeFirstAndLastGlyph(\n labelPlaneFontScale,\n glyphOffsetArray,\n lineOffsetX,\n lineOffsetY,\n /*flip*/ false,\n symbol,\n false,\n projectionContext);\n\n let collisionDetected = false;\n let inGrid = false;\n let entirelyOffscreen = true;\n\n if (firstAndLastGlyph) {\n const radius = circlePixelDiameter * 0.5 * perspectiveRatio + textPixelPadding;\n const screenPlaneMin = new Point(-viewportPadding, -viewportPadding);\n const screenPlaneMax = new Point(this.screenRightBoundary, this.screenBottomBoundary);\n const interpolator = new PathInterpolator();\n\n // Construct a projected path from projected line vertices. Anchor points are ignored and removed\n const first = firstAndLastGlyph.first;\n const last = firstAndLastGlyph.last;\n\n let projectedPath: Array = [];\n for (let i = first.path.length - 1; i >= 1; i--) {\n projectedPath.push(first.path[i]);\n }\n for (let i = 1; i < last.path.length; i++) {\n projectedPath.push(last.path[i]);\n }\n\n // Tolerate a slightly longer distance than one diameter between two adjacent circles\n const circleDist = radius * 2.5;\n\n // The path might need to be converted into screen space if a pitched map is used as the label space\n if (pitchWithMap) {\n const screenSpacePath = this.projectPathToScreenSpace(projectedPath, projectionContext);\n // Do not try to place collision circles if even one of the points is behind the camera.\n // This is a plausible scenario with big camera pitch angles\n if (screenSpacePath.some(point => point.signedDistanceFromCamera <= 0)) {\n projectedPath = [];\n } else {\n projectedPath = screenSpacePath.map(p => p.point);\n }\n }\n\n let segments = [];\n\n if (projectedPath.length > 0) {\n // Quickly check if the path is fully inside or outside of the padded collision region.\n // For overlapping paths we'll only create collision circles for the visible segments\n const minPoint = projectedPath[0].clone();\n const maxPoint = projectedPath[0].clone();\n\n for (let i = 1; i < projectedPath.length; i++) {\n minPoint.x = Math.min(minPoint.x, projectedPath[i].x);\n minPoint.y = Math.min(minPoint.y, projectedPath[i].y);\n maxPoint.x = Math.max(maxPoint.x, projectedPath[i].x);\n maxPoint.y = Math.max(maxPoint.y, projectedPath[i].y);\n }\n\n if (minPoint.x >= screenPlaneMin.x && maxPoint.x <= screenPlaneMax.x &&\n minPoint.y >= screenPlaneMin.y && maxPoint.y <= screenPlaneMax.y) {\n // Quad fully visible\n segments = [projectedPath];\n } else if (maxPoint.x < screenPlaneMin.x || minPoint.x > screenPlaneMax.x ||\n maxPoint.y < screenPlaneMin.y || minPoint.y > screenPlaneMax.y) {\n // Not visible\n segments = [];\n } else {\n segments = clipLine([projectedPath], screenPlaneMin.x, screenPlaneMin.y, screenPlaneMax.x, screenPlaneMax.y);\n }\n }\n\n for (const seg of segments) {\n // interpolate positions for collision circles. Add a small padding to both ends of the segment\n interpolator.reset(seg, radius * 0.25);\n\n let numCircles = 0;\n\n if (interpolator.length <= 0.5 * radius) {\n numCircles = 1;\n } else {\n numCircles = Math.ceil(interpolator.paddedLength / circleDist) + 1;\n }\n\n for (let i = 0; i < numCircles; i++) {\n const t = i / Math.max(numCircles - 1, 1);\n const circlePosition = interpolator.lerp(t);\n\n // add viewport padding to the position and perform initial collision check\n const centerX = circlePosition.x + viewportPadding;\n const centerY = circlePosition.y + viewportPadding;\n\n placedCollisionCircles.push(centerX, centerY, radius, 0);\n\n const x1 = centerX - radius;\n const y1 = centerY - radius;\n const x2 = centerX + radius;\n const y2 = centerY + radius;\n\n entirelyOffscreen = entirelyOffscreen && this.isOffscreen(x1, y1, x2, y2);\n inGrid = inGrid || this.isInsideGrid(x1, y1, x2, y2);\n\n if (overlapMode !== 'always' && this.grid.hitTestCircle(centerX, centerY, radius, overlapMode, collisionGroupPredicate)) {\n // Don't early exit if we're showing the debug circles because we still want to calculate\n // which circles are in use\n collisionDetected = true;\n if (!showCollisionCircles) {\n return {\n circles: [],\n offscreen: false,\n collisionDetected\n };\n }\n }\n }\n }\n }\n\n return {\n circles: ((!showCollisionCircles && collisionDetected) || !inGrid || perspectiveRatio < this.perspectiveRatioCutoff) ? [] : placedCollisionCircles,\n offscreen: entirelyOffscreen,\n collisionDetected\n };\n }\n\n projectPathToScreenSpace(projectedPath: Array, projectionContext: SymbolProjectionContext): Array {\n const screenSpacePath = projectPathSpecialProjection(projectedPath, projectionContext);\n // We don't want to generate screenspace collision circles for parts of the line that\n // are occluded by the planet itself. Find the longest segment of the path that is\n // not occluded, and remove everything else.\n return pathSlicedToLongestUnoccluded(screenSpacePath);\n }\n\n /**\n * Because the geometries in the CollisionIndex are an approximation of the shape of\n * symbols on the map, we use the CollisionIndex to look up the symbol part of\n * `queryRenderedFeatures`.\n */\n queryRenderedSymbols(viewportQueryGeometry: Array) {\n if (viewportQueryGeometry.length === 0 || (this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0)) {\n return {};\n }\n\n const query = [];\n const bounds = new Bounds();\n for (const point of viewportQueryGeometry) {\n const gridPoint = new Point(point.x + viewportPadding, point.y + viewportPadding);\n bounds.extend(gridPoint);\n query.push(gridPoint);\n }\n\n const {minX, minY, maxX, maxY} = bounds;\n const features = this.grid.query(minX, minY, maxX, maxY)\n .concat(this.ignoredGrid.query(minX, minY, maxX, maxY));\n\n const seenFeatures = {};\n const result = {};\n\n for (const feature of features) {\n const featureKey = feature.key;\n // Skip already seen features.\n if (seenFeatures[featureKey.bucketInstanceId] === undefined) {\n seenFeatures[featureKey.bucketInstanceId] = {};\n }\n if (seenFeatures[featureKey.bucketInstanceId][featureKey.featureIndex]) {\n continue;\n }\n\n // Check if query intersects with the feature box\n // \"Collision Circles\" for line labels are treated as boxes here\n // Since there's no actual collision taking place, the circle vs. square\n // distinction doesn't matter as much, and box geometry is easier\n // to work with.\n const bbox = [\n new Point(feature.x1, feature.y1),\n new Point(feature.x2, feature.y1),\n new Point(feature.x2, feature.y2),\n new Point(feature.x1, feature.y2)\n ];\n if (!intersectionTests.polygonIntersectsPolygon(query, bbox)) {\n continue;\n }\n\n seenFeatures[featureKey.bucketInstanceId][featureKey.featureIndex] = true;\n if (result[featureKey.bucketInstanceId] === undefined) {\n result[featureKey.bucketInstanceId] = [];\n }\n result[featureKey.bucketInstanceId].push(featureKey.featureIndex);\n }\n\n return result;\n }\n\n insertCollisionBox(collisionBox: Array, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number) {\n const grid = ignorePlacement ? this.ignoredGrid : this.grid;\n\n const key = {bucketInstanceId, featureIndex, collisionGroupID, overlapMode};\n grid.insert(key, collisionBox[0], collisionBox[1], collisionBox[2], collisionBox[3]);\n }\n\n insertCollisionCircles(collisionCircles: Array, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number) {\n const grid = ignorePlacement ? this.ignoredGrid : this.grid;\n\n const key = {bucketInstanceId, featureIndex, collisionGroupID, overlapMode};\n for (let k = 0; k < collisionCircles.length; k += 4) {\n grid.insertCircle(key, collisionCircles[k], collisionCircles[k + 1], collisionCircles[k + 2]);\n }\n }\n\n projectAndGetPerspectiveRatio(x: number, y: number, unwrappedTileID: UnwrappedTileID, getElevation?: (x: number, y: number) => number, simpleProjectionMatrix?: mat4) {\n if (simpleProjectionMatrix) {\n // This branch is a fast-path for mercator transform.\n // The code here is a copy of MercatorTransform.projectTileCoordinates, slightly modified for extra performance.\n // This has a huge impact for some reason.\n let pos;\n if (getElevation) { // slow because of handle z-index\n pos = [x, y, getElevation(x, y), 1] as vec4;\n vec4.transformMat4(pos, pos, simpleProjectionMatrix);\n } else { // fast because of ignore z-index\n pos = [x, y, 0, 1] as vec4;\n xyTransformMat4(pos, pos, simpleProjectionMatrix);\n }\n const w = pos[3];\n return {\n x: (((pos[0] / w + 1) / 2) * this.transform.width) + viewportPadding,\n y: (((-pos[1] / w + 1) / 2) * this.transform.height) + viewportPadding,\n perspectiveRatio: 0.5 + 0.5 * (this.transform.cameraToCenterDistance / w),\n isOccluded: false,\n signedDistanceFromCamera: w\n };\n } else {\n const projected = this.transform.projectTileCoordinates(x, y, unwrappedTileID, getElevation);\n return {\n x: (((projected.point.x + 1) / 2) * this.transform.width) + viewportPadding,\n y: (((-projected.point.y + 1) / 2) * this.transform.height) + viewportPadding,\n // See perspective ratio comment in symbol_sdf.vertex\n // We're doing collision detection in viewport space so we need\n // to scale down boxes in the distance\n perspectiveRatio: 0.5 + 0.5 * (this.transform.cameraToCenterDistance / projected.signedDistanceFromCamera),\n isOccluded: projected.isOccluded,\n signedDistanceFromCamera: projected.signedDistanceFromCamera\n };\n }\n }\n\n getPerspectiveRatio(x: number, y: number, unwrappedTileID: UnwrappedTileID, getElevation?: (x: number, y: number) => number): number {\n // We don't care about the actual projected point, just its W component.\n const projected = this.transform.projectTileCoordinates(x, y, unwrappedTileID, getElevation);\n return 0.5 + 0.5 * (this.transform.cameraToCenterDistance / projected.signedDistanceFromCamera);\n }\n\n isOffscreen(x1: number, y1: number, x2: number, y2: number) {\n return x2 < viewportPadding || x1 >= this.screenRightBoundary || y2 < viewportPadding || y1 > this.screenBottomBoundary;\n }\n\n isInsideGrid(x1: number, y1: number, x2: number, y2: number) {\n return x2 >= 0 && x1 < this.gridRightBoundary && y2 >= 0 && y1 < this.gridBottomBoundary;\n }\n\n /*\n * Returns a matrix for transforming collision shapes to viewport coordinate space.\n * Use this function to render e.g. collision circles on the screen.\n * example transformation: clipPos = glCoordMatrix * viewportMatrix * circle_pos\n */\n getViewportMatrix() {\n const m = mat4.identity([] as any);\n mat4.translate(m, m, [-viewportPadding, -viewportPadding, 0.0]);\n return m;\n }\n\n /**\n * Applies all layout+paint properties of the given box in order to find as good approximation of its screen-space bounding box as possible.\n */\n private _projectCollisionBox(\n collisionBox: SingleCollisionBox,\n tileToViewport: number,\n tileID: OverscaledTileID,\n unwrappedTileID: UnwrappedTileID,\n pitchWithMap: boolean,\n rotateWithMap: boolean,\n translation: [number, number],\n projectedPoint: {x: number; y: number; perspectiveRatio: number; signedDistanceFromCamera: number},\n getElevation?: (x: number, y: number) => number,\n shift?: Point,\n simpleProjectionMatrix?: mat4,\n ): ProjectedBox {\n // These vectors are valid both for screen space viewport-rotation-aligned texts and for pitch-align: map texts that are map-rotation-aligned.\n let vecEastX = 1;\n let vecEastY = 0;\n let vecSouthX = 0;\n let vecSouthY = 1;\n\n const translatedAnchorX = collisionBox.anchorPointX + translation[0];\n const translatedAnchorY = collisionBox.anchorPointY + translation[1];\n\n if (rotateWithMap && !pitchWithMap) {\n // Handles screen space texts that are always aligned east-west.\n const projectedEast = this.projectAndGetPerspectiveRatio(\n translatedAnchorX + 1,\n translatedAnchorY,\n unwrappedTileID,\n getElevation,\n simpleProjectionMatrix,\n );\n const toEastX = projectedEast.x - projectedPoint.x;\n const toEastY = projectedEast.y - projectedPoint.y;\n const angle = Math.atan(toEastY / toEastX) + (toEastX < 0 ? Math.PI : 0);\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n vecEastX = cos;\n vecEastY = sin;\n vecSouthX = -sin;\n vecSouthY = cos;\n } else if (!rotateWithMap && pitchWithMap) {\n // Handles pitch-align: map texts that are always aligned with the viewport's X axis.\n const skew = getTileSkewVectors(this.transform);\n vecEastX = skew.vecEast[0];\n vecEastY = skew.vecEast[1];\n vecSouthX = skew.vecSouth[0];\n vecSouthY = skew.vecSouth[1];\n }\n\n // Configuration for screen space offsets\n let basePointX = projectedPoint.x;\n let basePointY = projectedPoint.y;\n let distanceMultiplier = tileToViewport;\n\n if (pitchWithMap) {\n // Configuration for tile space (map-pitch-aligned) offsets\n basePointX = translatedAnchorX;\n basePointY = translatedAnchorY;\n\n const zoomFraction = this.transform.zoom - tileID.overscaledZ;\n distanceMultiplier = Math.pow(2, -zoomFraction);\n distanceMultiplier *= this.transform.getPitchedTextCorrection(translatedAnchorX, translatedAnchorY, unwrappedTileID);\n\n // This next correction can't be applied when variable anchors are in use.\n if (!shift) {\n // Shader applies a perspective size correction, we need to apply the same correction.\n // For non-pitchWithMap texts, this is handled above by multiplying `textPixelRatio` with `projectedPoint.perspectiveRatio`,\n // which is equivalent to the non-pitchWithMap branch of the GLSL code.\n // Here, we compute and apply the pitchWithMap branch.\n // See the computation of `perspective_ratio` in the symbol vertex shaders for the GLSL code.\n const distanceRatio = projectedPoint.signedDistanceFromCamera / this.transform.cameraToCenterDistance;\n const perspectiveRatio = clamp(0.5 + 0.5 * distanceRatio, 0.0, 4.0); // Same clamp as what is used in the shader.\n distanceMultiplier *= perspectiveRatio;\n }\n }\n\n if (shift) {\n // Variable anchors are in use\n basePointX += vecEastX * shift.x * distanceMultiplier + vecSouthX * shift.y * distanceMultiplier;\n basePointY += vecEastY * shift.x * distanceMultiplier + vecSouthY * shift.y * distanceMultiplier;\n }\n\n const offsetXmin = collisionBox.x1 * distanceMultiplier;\n const offsetXmax = collisionBox.x2 * distanceMultiplier;\n const offsetXhalf = (offsetXmin + offsetXmax) / 2;\n const offsetYmin = collisionBox.y1 * distanceMultiplier;\n const offsetYmax = collisionBox.y2 * distanceMultiplier;\n const offsetYhalf = (offsetYmin + offsetYmax) / 2;\n\n // 0--1--2\n // | |\n // 7 3\n // | |\n // 6--5--4\n const offsetsArray: Array<{offsetX: number; offsetY: number}> = [\n {offsetX: offsetXmin, offsetY: offsetYmin},\n {offsetX: offsetXhalf, offsetY: offsetYmin},\n {offsetX: offsetXmax, offsetY: offsetYmin},\n {offsetX: offsetXmax, offsetY: offsetYhalf},\n {offsetX: offsetXmax, offsetY: offsetYmax},\n {offsetX: offsetXhalf, offsetY: offsetYmax},\n {offsetX: offsetXmin, offsetY: offsetYmax},\n {offsetX: offsetXmin, offsetY: offsetYhalf}\n ];\n\n let points: Array = [];\n\n for (const {offsetX, offsetY} of offsetsArray) {\n points.push(new Point(\n basePointX + vecEastX * offsetX + vecSouthX * offsetY,\n basePointY + vecEastY * offsetX + vecSouthY * offsetY\n ));\n }\n\n // Is any point of the collision shape visible on the globe (on beyond horizon)?\n let anyPointVisible = false;\n\n if (pitchWithMap) {\n const projected = points.map(p => this.projectAndGetPerspectiveRatio(p.x, p.y, unwrappedTileID, getElevation, simpleProjectionMatrix));\n\n // Is at least one of the projected points NOT behind the horizon?\n anyPointVisible = projected.some(p => !p.isOccluded);\n\n points = projected.map(p => new Point(p.x, p.y));\n } else {\n // Labels that are not pitchWithMap cannot ever hide behind the horizon.\n anyPointVisible = true;\n }\n\n return {\n box: getAABB(points),\n allPointsOccluded: !anyPointVisible\n };\n }\n}\n","import {CollisionIndex, viewportPadding} from './collision_index';\nimport type {FeatureKey, PlacedBox, PlacedCircles} from './collision_index';\nimport {EXTENT} from '../data/extent';\nimport * as symbolSize from './symbol_size';\nimport * as projection from './projection';\nimport {getAnchorJustification} from './symbol_layout';\nimport {getAnchorAlignment, WritingMode} from './shaping';\nimport {type mat4} from 'gl-matrix';\nimport {pixelsToTileUnits} from '../source/pixels_to_tile_units';\nimport Point from '@mapbox/point-geometry';\nimport type {IReadonlyTransform, ITransform} from '../geo/transform_interface';\nimport type {StyleLayer} from '../style/style_layer';\nimport {type PossiblyEvaluated} from '../style/properties';\nimport type {SymbolLayoutProps, SymbolLayoutPropsPossiblyEvaluated} from '../style/style_layer/symbol_style_layer_properties.g';\nimport {getOverlapMode, type OverlapMode} from '../style/style_layer/overlap_mode';\n\nimport type {Tile} from '../tile/tile';\nimport type {SymbolBucket, CollisionArrays, SingleCollisionBox, SymbolBuffers} from '../data/bucket/symbol_bucket';\nimport type {CollisionBoxArray, CollisionVertexArray, SymbolInstance, TextAnchorOffset} from '../data/array_types.g';\nimport type {FeatureIndex} from '../data/feature_index';\nimport type {OverscaledTileID, UnwrappedTileID} from '../tile/tile_id';\nimport {type Terrain} from '../render/terrain';\nimport {translatePosition, warnOnce} from '../util/util';\nimport {type TextAnchor, TextAnchorEnum} from '../style/style_layer/variable_text_anchor';\n\nclass OpacityState {\n opacity: number;\n placed: boolean;\n constructor(prevState: OpacityState, increment: number, placed: boolean, skipFade?: boolean | null) {\n if (prevState) {\n this.opacity = Math.max(0, Math.min(1, prevState.opacity + (prevState.placed ? increment : -increment)));\n } else {\n this.opacity = (skipFade && placed) ? 1 : 0;\n }\n this.placed = placed;\n }\n isHidden() {\n return this.opacity === 0 && !this.placed;\n }\n}\n\nclass JointOpacityState {\n text: OpacityState;\n icon: OpacityState;\n constructor(prevState: JointOpacityState, increment: number, placedText: boolean, placedIcon: boolean, skipFade?: boolean | null) {\n this.text = new OpacityState(prevState ? prevState.text : null, increment, placedText, skipFade);\n this.icon = new OpacityState(prevState ? prevState.icon : null, increment, placedIcon, skipFade);\n }\n isHidden() {\n return this.text.isHidden() && this.icon.isHidden();\n }\n}\n\nclass JointPlacement {\n text: boolean;\n icon: boolean;\n // skipFade = outside viewport, but within CollisionIndex::viewportPadding px of the edge\n // Because these symbols aren't onscreen yet, we can skip the \"fade in\" animation,\n // and if a subsequent viewport change brings them into view, they'll be fully\n // visible right away.\n skipFade: boolean;\n constructor(text: boolean, icon: boolean, skipFade: boolean) {\n this.text = text;\n this.icon = icon;\n this.skipFade = skipFade;\n }\n}\n\nexport class RetainedQueryData {\n bucketInstanceId: number;\n featureIndex: FeatureIndex;\n sourceLayerIndex: number;\n bucketIndex: number;\n tileID: OverscaledTileID;\n featureSortOrder: Array;\n constructor(bucketInstanceId: number,\n featureIndex: FeatureIndex,\n sourceLayerIndex: number,\n bucketIndex: number,\n tileID: OverscaledTileID) {\n this.bucketInstanceId = bucketInstanceId;\n this.featureIndex = featureIndex;\n this.sourceLayerIndex = sourceLayerIndex;\n this.bucketIndex = bucketIndex;\n this.tileID = tileID;\n }\n}\n\ntype CollisionGroup = {\n ID: number;\n predicate?: (key: FeatureKey) => boolean;\n};\n\nclass CollisionGroups {\n collisionGroups: {[groupName: string]: CollisionGroup};\n maxGroupID: number;\n crossSourceCollisions: boolean;\n\n constructor(crossSourceCollisions: boolean) {\n this.crossSourceCollisions = crossSourceCollisions;\n this.maxGroupID = 0;\n this.collisionGroups = {};\n }\n\n get(sourceID: string) {\n // The predicate/groupID mechanism allows for arbitrary grouping,\n // but the current interface defines one source == one group when\n // crossSourceCollisions == true.\n if (!this.crossSourceCollisions) {\n if (!this.collisionGroups[sourceID]) {\n const nextGroupID = ++this.maxGroupID;\n this.collisionGroups[sourceID] = {\n ID: nextGroupID,\n predicate: (key) => {\n return key.collisionGroupID === nextGroupID;\n }\n };\n }\n return this.collisionGroups[sourceID];\n } else {\n return {ID: 0, predicate: null};\n }\n }\n}\n\nfunction calculateVariableLayoutShift(\n anchor: TextAnchor,\n width: number,\n height: number,\n textOffset: [number, number],\n textBoxScale: number\n): Point {\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(anchor);\n const shiftX = -(horizontalAlign - 0.5) * width;\n const shiftY = -(verticalAlign - 0.5) * height;\n return new Point(\n shiftX + textOffset[0] * textBoxScale,\n shiftY + textOffset[1] * textBoxScale\n );\n}\n\nexport type VariableOffset = {\n textOffset: [number, number];\n width: number;\n height: number;\n anchor: TextAnchor;\n textBoxScale: number;\n prevAnchor?: TextAnchor;\n};\n\ntype TileLayerParameters = {\n bucket: SymbolBucket;\n layout: PossiblyEvaluated;\n translationText: [number, number];\n translationIcon: [number, number];\n unwrappedTileID: UnwrappedTileID;\n pitchedLabelPlaneMatrix: mat4;\n scale: number;\n textPixelRatio: number;\n holdingForFade: boolean;\n collisionBoxArray: CollisionBoxArray;\n partiallyEvaluatedTextSize: {\n uSize: number;\n uSizeT: number;\n };\n collisionGroup: CollisionGroup;\n};\n\nexport type BucketPart = {\n sortKey?: number | void;\n symbolInstanceStart: number;\n symbolInstanceEnd: number;\n parameters: TileLayerParameters;\n};\n\nexport type CrossTileID = string | number;\n\nexport class Placement {\n transform: IReadonlyTransform;\n terrain: Terrain;\n collisionIndex: CollisionIndex;\n placements: {\n [_ in CrossTileID]: JointPlacement;\n };\n opacities: {\n [_ in CrossTileID]: JointOpacityState;\n };\n variableOffsets: {\n [_ in CrossTileID]: VariableOffset;\n };\n placedOrientations: {\n [_ in CrossTileID]: number;\n };\n commitTime: number;\n prevZoomAdjustment: number;\n lastPlacementChangeTime: number;\n stale: boolean;\n fadeDuration: number;\n retainedQueryData: {\n [_: number]: RetainedQueryData;\n };\n collisionGroups: CollisionGroups;\n prevPlacement: Placement;\n zoomAtLastRecencyCheck: number;\n collisionCircleArrays: {\n [k in any]: Array;\n };\n collisionBoxArrays: Map>;\n\n constructor(transform: ITransform, terrain: Terrain, fadeDuration: number, crossSourceCollisions: boolean, prevPlacement?: Placement) {\n this.transform = transform.clone();\n this.terrain = terrain;\n this.collisionIndex = new CollisionIndex(this.transform);\n this.placements = {};\n this.opacities = {};\n this.variableOffsets = {};\n this.stale = false;\n this.commitTime = 0;\n this.fadeDuration = fadeDuration;\n this.retainedQueryData = {};\n this.collisionGroups = new CollisionGroups(crossSourceCollisions);\n this.collisionCircleArrays = {};\n this.collisionBoxArrays = new Map>();\n\n this.prevPlacement = prevPlacement;\n if (prevPlacement) {\n prevPlacement.prevPlacement = undefined; // Only hold on to one placement back\n }\n\n this.placedOrientations = {};\n }\n\n private _getTerrainElevationFunc(tileID: OverscaledTileID) {\n const terrain = this.terrain;\n return terrain ? (x: number, y: number) => terrain.getElevation(tileID, x, y) : null;\n }\n\n getBucketParts(results: Array, styleLayer: StyleLayer, tile: Tile, sortAcrossTiles: boolean) {\n const symbolBucket = (tile.getBucket(styleLayer) as SymbolBucket);\n const bucketFeatureIndex = tile.latestFeatureIndex;\n if (!symbolBucket || !bucketFeatureIndex || styleLayer.id !== symbolBucket.layerIds[0])\n return;\n\n const collisionBoxArray = tile.collisionBoxArray;\n\n const layout = symbolBucket.layers[0].layout;\n const paint = symbolBucket.layers[0].paint;\n\n const scale = Math.pow(2, this.transform.zoom - tile.tileID.overscaledZ);\n const textPixelRatio = tile.tileSize / EXTENT;\n\n const unwrappedTileID = tile.tileID.toUnwrapped();\n\n const rotateWithMap = layout.get('text-rotation-alignment') === 'map';\n const pixelsToTiles = pixelsToTileUnits(tile, 1, this.transform.zoom);\n\n const translationText = translatePosition(\n this.collisionIndex.transform,\n tile,\n paint.get('text-translate'),\n paint.get('text-translate-anchor'),);\n\n const translationIcon = translatePosition(\n this.collisionIndex.transform,\n tile,\n paint.get('icon-translate'),\n paint.get('icon-translate-anchor'),);\n\n const pitchedLabelPlaneMatrix = projection.getPitchedLabelPlaneMatrix(rotateWithMap, this.transform, pixelsToTiles);\n\n // As long as this placement lives, we have to hold onto this bucket's\n // matching FeatureIndex/data for querying purposes\n this.retainedQueryData[symbolBucket.bucketInstanceId] = new RetainedQueryData(\n symbolBucket.bucketInstanceId,\n bucketFeatureIndex,\n symbolBucket.sourceLayerIndex,\n symbolBucket.index,\n tile.tileID\n );\n\n const parameters: TileLayerParameters = {\n bucket: symbolBucket,\n layout,\n translationText,\n translationIcon,\n unwrappedTileID,\n pitchedLabelPlaneMatrix,\n scale,\n textPixelRatio,\n holdingForFade: tile.holdingForSymbolFade(),\n collisionBoxArray,\n partiallyEvaluatedTextSize: symbolSize.evaluateSizeForZoom(symbolBucket.textSizeData, this.transform.zoom),\n collisionGroup: this.collisionGroups.get(symbolBucket.sourceID)\n };\n\n if (sortAcrossTiles) {\n for (const range of symbolBucket.sortKeyRanges) {\n const {sortKey, symbolInstanceStart, symbolInstanceEnd} = range;\n results.push({sortKey, symbolInstanceStart, symbolInstanceEnd, parameters});\n }\n } else {\n results.push({\n symbolInstanceStart: 0,\n symbolInstanceEnd: symbolBucket.symbolInstances.length,\n parameters\n });\n }\n }\n\n attemptAnchorPlacement(\n textAnchorOffset: TextAnchorOffset,\n textBox: SingleCollisionBox,\n width: number,\n height: number,\n textBoxScale: number,\n rotateWithMap: boolean,\n pitchWithMap: boolean,\n textPixelRatio: number,\n tileID: OverscaledTileID,\n unwrappedTileID,\n collisionGroup: CollisionGroup,\n textOverlapMode: OverlapMode,\n symbolInstance: SymbolInstance,\n bucket: SymbolBucket,\n orientation: number,\n translationText: [number, number],\n translationIcon: [number, number],\n iconBox?: SingleCollisionBox | null,\n getElevation?: (x: number, y: number) => number,\n simpleProjectionMatrix?: mat4,\n ): {\n shift: Point;\n placedGlyphBoxes: PlacedBox;\n } {\n\n const anchor = TextAnchorEnum[textAnchorOffset.textAnchor] as TextAnchor;\n const textOffset = [textAnchorOffset.textOffset0, textAnchorOffset.textOffset1] as [number, number];\n const shift = calculateVariableLayoutShift(anchor, width, height, textOffset, textBoxScale);\n\n const placedGlyphBoxes = this.collisionIndex.placeCollisionBox(\n textBox,\n textOverlapMode,\n textPixelRatio,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translationText,\n collisionGroup.predicate,\n getElevation,\n shift,\n simpleProjectionMatrix,\n );\n\n if (iconBox) {\n const placedIconBoxes = this.collisionIndex.placeCollisionBox(\n iconBox,\n textOverlapMode,\n textPixelRatio,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translationIcon,\n collisionGroup.predicate,\n getElevation,\n shift,\n simpleProjectionMatrix,\n );\n if (!placedIconBoxes.placeable) return;\n }\n\n if (placedGlyphBoxes.placeable) {\n let prevAnchor;\n // If this label was placed in the previous placement, record the anchor position\n // to allow us to animate the transition\n if (this.prevPlacement &&\n this.prevPlacement.variableOffsets[symbolInstance.crossTileID] &&\n this.prevPlacement.placements[symbolInstance.crossTileID] &&\n this.prevPlacement.placements[symbolInstance.crossTileID].text) {\n prevAnchor = this.prevPlacement.variableOffsets[symbolInstance.crossTileID].anchor;\n }\n if (symbolInstance.crossTileID === 0) throw new Error('symbolInstance.crossTileID can\\'t be 0');\n this.variableOffsets[symbolInstance.crossTileID] = {\n textOffset,\n width,\n height,\n anchor,\n textBoxScale,\n prevAnchor\n };\n this.markUsedJustification(bucket, anchor, symbolInstance, orientation);\n\n if (bucket.allowVerticalPlacement) {\n this.markUsedOrientation(bucket, orientation, symbolInstance);\n this.placedOrientations[symbolInstance.crossTileID] = orientation;\n }\n\n return {shift, placedGlyphBoxes};\n }\n }\n\n placeLayerBucketPart(bucketPart: BucketPart, seenCrossTileIDs: {\n [k in string | number]: boolean;\n }, showCollisionBoxes: boolean) {\n\n const {\n bucket,\n layout,\n translationText,\n translationIcon,\n unwrappedTileID,\n pitchedLabelPlaneMatrix,\n textPixelRatio,\n holdingForFade,\n collisionBoxArray,\n partiallyEvaluatedTextSize,\n collisionGroup\n } = bucketPart.parameters;\n\n const textOptional = layout.get('text-optional');\n const iconOptional = layout.get('icon-optional');\n const textOverlapMode = getOverlapMode(layout, 'text-overlap', 'text-allow-overlap');\n const textAlwaysOverlap = textOverlapMode === 'always';\n const iconOverlapMode = getOverlapMode(layout, 'icon-overlap', 'icon-allow-overlap');\n const iconAlwaysOverlap = iconOverlapMode === 'always';\n const rotateWithMap = layout.get('text-rotation-alignment') === 'map';\n const pitchWithMap = layout.get('text-pitch-alignment') === 'map';\n const hasIconTextFit = layout.get('icon-text-fit') !== 'none';\n const zOrderByViewportY = layout.get('symbol-z-order') === 'viewport-y';\n\n // This logic is similar to the \"defaultOpacityState\" logic below in updateBucketOpacities\n // If we know a symbol is always supposed to show, force it to be marked visible even if\n // it wasn't placed into the collision index (because some or all of it was outside the range\n // of the collision grid).\n // There is a subtle edge case here we're accepting:\n // Symbol A has text-allow-overlap: true, icon-allow-overlap: true, icon-optional: false\n // A's icon is outside the grid, so doesn't get placed\n // A's text would be inside grid, but doesn't get placed because of icon-optional: false\n // We still show A because of the allow-overlap settings.\n // Symbol B has allow-overlap: false, and gets placed where A's text would be\n // On panning in, there is a short period when Symbol B and Symbol A will overlap\n // This is the reverse of our normal policy of \"fade in on pan\", but should look like any other\n // collision and hopefully not be too noticeable.\n // See https://github.com/mapbox/mapbox-gl-js/issues/7172\n const alwaysShowText = textAlwaysOverlap && (iconAlwaysOverlap || !bucket.hasIconData() || iconOptional);\n const alwaysShowIcon = iconAlwaysOverlap && (textAlwaysOverlap || !bucket.hasTextData() || textOptional);\n\n if (!bucket.collisionArrays && collisionBoxArray) {\n bucket.deserializeCollisionBoxes(collisionBoxArray);\n }\n\n const tileID = this.retainedQueryData[bucket.bucketInstanceId].tileID;\n const getElevation = this._getTerrainElevationFunc(tileID);\n const simpleProjectionMatrix = this.transform.getFastPathSimpleProjectionMatrix(tileID);\n\n const placeSymbol = (symbolInstance: SymbolInstance, collisionArrays: CollisionArrays, symbolIndex: number) => {\n if (seenCrossTileIDs[symbolInstance.crossTileID]) return;\n if (holdingForFade) {\n // Mark all symbols from this tile as \"not placed\", but don't add to seenCrossTileIDs, because we don't\n // know yet if we have a duplicate in a parent tile that _should_ be placed.\n this.placements[symbolInstance.crossTileID] = new JointPlacement(false, false, false);\n return;\n }\n\n let placeText = false;\n let placeIcon = false;\n let offscreen = true;\n let shift = null;\n\n let placed: PlacedBox = {box: null, placeable: false, offscreen: null, occluded: false};\n let placedVerticalText = {box: null, placeable: false, offscreen: null};\n\n let placedGlyphBoxes: PlacedBox = null;\n let placedGlyphCircles: PlacedCircles = null;\n let placedIconBoxes: PlacedBox = null;\n let textFeatureIndex = 0;\n let verticalTextFeatureIndex = 0;\n let iconFeatureIndex = 0;\n\n if (collisionArrays.textFeatureIndex) {\n textFeatureIndex = collisionArrays.textFeatureIndex;\n } else if (symbolInstance.useRuntimeCollisionCircles) {\n textFeatureIndex = symbolInstance.featureIndex;\n }\n if (collisionArrays.verticalTextFeatureIndex) {\n verticalTextFeatureIndex = collisionArrays.verticalTextFeatureIndex;\n }\n\n const textBox = collisionArrays.textBox;\n if (textBox) {\n\n const updatePreviousOrientationIfNotPlaced = (isPlaced) => {\n let previousOrientation = WritingMode.horizontal;\n if (bucket.allowVerticalPlacement && !isPlaced && this.prevPlacement) {\n const prevPlacedOrientation = this.prevPlacement.placedOrientations[symbolInstance.crossTileID];\n if (prevPlacedOrientation) {\n this.placedOrientations[symbolInstance.crossTileID] = prevPlacedOrientation;\n previousOrientation = prevPlacedOrientation;\n this.markUsedOrientation(bucket, previousOrientation, symbolInstance);\n }\n }\n return previousOrientation;\n };\n\n const placeTextForPlacementModes = (placeHorizontalFn, placeVerticalFn) => {\n if (bucket.allowVerticalPlacement && symbolInstance.numVerticalGlyphVertices > 0 && collisionArrays.verticalTextBox) {\n for (const placementMode of bucket.writingModes) {\n if (placementMode === WritingMode.vertical) {\n placed = placeVerticalFn();\n placedVerticalText = placed;\n } else {\n placed = placeHorizontalFn();\n }\n if (placed && placed.placeable) break;\n }\n } else {\n placed = placeHorizontalFn();\n }\n };\n\n const textAnchorOffsetStart = symbolInstance.textAnchorOffsetStartIndex;\n const textAnchorOffsetEnd = symbolInstance.textAnchorOffsetEndIndex;\n\n // If start+end indices match, text-variable-anchor is not in play.\n if (textAnchorOffsetEnd === textAnchorOffsetStart) {\n const placeBox = (collisionTextBox, orientation) => {\n const placedFeature = this.collisionIndex.placeCollisionBox(\n collisionTextBox,\n textOverlapMode,\n textPixelRatio,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translationText,\n collisionGroup.predicate,\n getElevation,\n undefined,\n simpleProjectionMatrix,\n );\n if (placedFeature && placedFeature.placeable) {\n this.markUsedOrientation(bucket, orientation, symbolInstance);\n this.placedOrientations[symbolInstance.crossTileID] = orientation;\n }\n return placedFeature;\n };\n\n const placeHorizontal = () => {\n return placeBox(textBox, WritingMode.horizontal);\n };\n\n const placeVertical = () => {\n const verticalTextBox = collisionArrays.verticalTextBox;\n if (bucket.allowVerticalPlacement && symbolInstance.numVerticalGlyphVertices > 0 && verticalTextBox) {\n return placeBox(verticalTextBox, WritingMode.vertical);\n }\n return {box: null, offscreen: null};\n };\n\n placeTextForPlacementModes(placeHorizontal, placeVertical);\n updatePreviousOrientationIfNotPlaced(placed && placed.placeable);\n\n } else {\n // If this symbol was in the last placement, prefer placement using same anchor, if it's still available\n let prevAnchor = TextAnchorEnum[this.prevPlacement?.variableOffsets[symbolInstance.crossTileID]?.anchor];\n\n const placeBoxForVariableAnchors = (collisionTextBox, collisionIconBox, orientation) => {\n const width = collisionTextBox.x2 - collisionTextBox.x1;\n const height = collisionTextBox.y2 - collisionTextBox.y1;\n const textBoxScale = symbolInstance.textBoxScale;\n const variableIconBox = hasIconTextFit && (iconOverlapMode === 'never') ? collisionIconBox : null;\n\n let placedBox: PlacedBox = null;\n let placementPasses = (textOverlapMode === 'never') ? 1 : 2;\n let overlapMode: OverlapMode = 'never';\n\n if (prevAnchor) {\n placementPasses++;\n }\n\n for (let pass = 0; pass < placementPasses; pass++) {\n for (let i = textAnchorOffsetStart; i < textAnchorOffsetEnd; i++) {\n const textAnchorOffset = bucket.textAnchorOffsets.get(i);\n\n if (prevAnchor && textAnchorOffset.textAnchor !== prevAnchor) {\n continue;\n }\n\n const result = this.attemptAnchorPlacement(\n textAnchorOffset, collisionTextBox, width, height,\n textBoxScale, rotateWithMap, pitchWithMap, textPixelRatio, tileID, unwrappedTileID,\n collisionGroup, overlapMode, symbolInstance, bucket, orientation, translationText, translationIcon, variableIconBox, getElevation);\n\n if (result) {\n placedBox = result.placedGlyphBoxes;\n if (placedBox && placedBox.placeable) {\n placeText = true;\n shift = result.shift;\n return placedBox;\n }\n }\n }\n\n if (prevAnchor) {\n prevAnchor = null;\n } else {\n overlapMode = textOverlapMode;\n }\n }\n\n if (showCollisionBoxes && !placedBox) {\n // No box was successfully placed\n // Generate bounds for a fake centered box, so that we can at least display something for collision debug.\n const placedFakeGlyphBox = this.collisionIndex.placeCollisionBox(\n textBox,\n 'always', // Skips expensive collision check with already placed boxes\n textPixelRatio,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translationText,\n collisionGroup.predicate,\n getElevation,\n undefined,\n simpleProjectionMatrix,\n );\n placedBox = {\n box: placedFakeGlyphBox.box,\n offscreen: false,\n placeable: false,\n occluded: false,\n };\n }\n\n return placedBox;\n };\n\n const placeHorizontal = () => {\n return placeBoxForVariableAnchors(textBox, collisionArrays.iconBox, WritingMode.horizontal);\n };\n\n const placeVertical = () => {\n const verticalTextBox = collisionArrays.verticalTextBox;\n const wasPlaced = placed && placed.placeable;\n if (bucket.allowVerticalPlacement && !wasPlaced && symbolInstance.numVerticalGlyphVertices > 0 && verticalTextBox) {\n return placeBoxForVariableAnchors(verticalTextBox, collisionArrays.verticalIconBox, WritingMode.vertical);\n }\n return {box: null, occluded: true, offscreen: null};\n };\n\n placeTextForPlacementModes(placeHorizontal, placeVertical);\n\n if (placed) {\n placeText = placed.placeable;\n offscreen = placed.offscreen;\n }\n\n const prevOrientation = updatePreviousOrientationIfNotPlaced(placed && placed.placeable);\n\n // If we didn't get placed, we still need to copy our position from the last placement for\n // fade animations\n if (!placeText && this.prevPlacement) {\n const prevOffset = this.prevPlacement.variableOffsets[symbolInstance.crossTileID];\n if (prevOffset) {\n this.variableOffsets[symbolInstance.crossTileID] = prevOffset;\n this.markUsedJustification(bucket, prevOffset.anchor, symbolInstance, prevOrientation);\n }\n }\n\n }\n }\n\n placedGlyphBoxes = placed;\n placeText = placedGlyphBoxes && placedGlyphBoxes.placeable;\n offscreen = placedGlyphBoxes && placedGlyphBoxes.offscreen;\n\n if (symbolInstance.useRuntimeCollisionCircles && symbolInstance.centerJustifiedTextSymbolIndex >= 0) {\n const placedSymbol = bucket.text.placedSymbolArray.get(symbolInstance.centerJustifiedTextSymbolIndex);\n const fontSize = symbolSize.evaluateSizeForFeature(bucket.textSizeData, partiallyEvaluatedTextSize, placedSymbol);\n\n const textPixelPadding = layout.get('text-padding');\n const circlePixelDiameter = symbolInstance.collisionCircleDiameter;\n\n placedGlyphCircles = this.collisionIndex.placeCollisionCircles(\n textOverlapMode,\n placedSymbol,\n bucket.lineVertexArray,\n bucket.glyphOffsetArray,\n fontSize,\n unwrappedTileID,\n pitchedLabelPlaneMatrix,\n showCollisionBoxes,\n pitchWithMap,\n collisionGroup.predicate,\n circlePixelDiameter,\n textPixelPadding,\n translationText,\n getElevation\n );\n\n if (placedGlyphCircles.circles.length && placedGlyphCircles.collisionDetected && !showCollisionBoxes) {\n warnOnce('Collisions detected, but collision boxes are not shown');\n }\n\n // If text-overlap is set to 'always', force \"placedCircles\" to true\n // In theory there should always be at least one circle placed\n // in this case, but for now quirks in text-anchor\n // and text-offset may prevent that from being true.\n placeText = textAlwaysOverlap || (placedGlyphCircles.circles.length > 0 && !placedGlyphCircles.collisionDetected);\n offscreen = offscreen && placedGlyphCircles.offscreen;\n }\n\n if (collisionArrays.iconFeatureIndex) {\n iconFeatureIndex = collisionArrays.iconFeatureIndex;\n }\n\n if (collisionArrays.iconBox) {\n const placeIconFeature = iconBox => {\n return this.collisionIndex.placeCollisionBox(\n iconBox,\n iconOverlapMode,\n textPixelRatio,\n tileID,\n unwrappedTileID,\n pitchWithMap,\n rotateWithMap,\n translationIcon,\n collisionGroup.predicate,\n getElevation,\n (hasIconTextFit && shift) ? shift : undefined,\n simpleProjectionMatrix,\n );\n };\n\n if (placedVerticalText && placedVerticalText.placeable && collisionArrays.verticalIconBox) {\n placedIconBoxes = placeIconFeature(collisionArrays.verticalIconBox);\n placeIcon = placedIconBoxes.placeable;\n } else {\n placedIconBoxes = placeIconFeature(collisionArrays.iconBox);\n placeIcon = placedIconBoxes.placeable;\n }\n offscreen = offscreen && placedIconBoxes.offscreen;\n }\n\n const iconWithoutText = textOptional ||\n (symbolInstance.numHorizontalGlyphVertices === 0 && symbolInstance.numVerticalGlyphVertices === 0);\n const textWithoutIcon = iconOptional || symbolInstance.numIconVertices === 0;\n\n // Combine the scales for icons and text.\n if (!iconWithoutText && !textWithoutIcon) {\n placeIcon = placeText = placeIcon && placeText;\n } else if (!textWithoutIcon) {\n placeText = placeIcon && placeText;\n } else if (!iconWithoutText) {\n placeIcon = placeIcon && placeText;\n }\n\n const hasTextBox = placeText && placedGlyphBoxes.placeable;\n const hasIconBox = placeIcon && placedIconBoxes.placeable;\n\n if (hasTextBox) {\n if (placedVerticalText && placedVerticalText.placeable && verticalTextFeatureIndex) {\n this.collisionIndex.insertCollisionBox(\n placedGlyphBoxes.box,\n textOverlapMode,\n layout.get('text-ignore-placement'),\n bucket.bucketInstanceId,\n verticalTextFeatureIndex,\n collisionGroup.ID);\n } else {\n this.collisionIndex.insertCollisionBox(\n placedGlyphBoxes.box,\n textOverlapMode,\n layout.get('text-ignore-placement'),\n bucket.bucketInstanceId,\n textFeatureIndex,\n collisionGroup.ID);\n }\n\n }\n if (hasIconBox) {\n this.collisionIndex.insertCollisionBox(\n placedIconBoxes.box,\n iconOverlapMode,\n layout.get('icon-ignore-placement'),\n bucket.bucketInstanceId,\n iconFeatureIndex,\n collisionGroup.ID);\n }\n if (placedGlyphCircles) {\n if (placeText) {\n this.collisionIndex.insertCollisionCircles(\n placedGlyphCircles.circles,\n textOverlapMode,\n layout.get('text-ignore-placement'),\n bucket.bucketInstanceId,\n textFeatureIndex,\n collisionGroup.ID);\n }\n }\n\n if (showCollisionBoxes) {\n this.storeCollisionData(bucket.bucketInstanceId, symbolIndex, collisionArrays, placedGlyphBoxes, placedIconBoxes, placedGlyphCircles);\n }\n\n if (symbolInstance.crossTileID === 0) throw new Error('symbolInstance.crossTileID can\\'t be 0');\n if (bucket.bucketInstanceId === 0) throw new Error('bucket.bucketInstanceId can\\'t be 0');\n\n // Do not show text or icons that are occluded by the globe, even if overlap mode is 'always'!\n const textVisible: boolean = (placeText || alwaysShowText) && !(placedGlyphBoxes?.occluded);\n const iconVisible = (placeIcon || alwaysShowIcon) && !(placedIconBoxes?.occluded);\n this.placements[symbolInstance.crossTileID] = new JointPlacement(textVisible, iconVisible, offscreen || bucket.justReloaded);\n seenCrossTileIDs[symbolInstance.crossTileID] = true;\n };\n\n if (zOrderByViewportY) {\n if (bucketPart.symbolInstanceStart !== 0) throw new Error('bucket.bucketInstanceId should be 0');\n const symbolIndexes = bucket.getSortedSymbolIndexes(-this.transform.bearingInRadians);\n for (let i = symbolIndexes.length - 1; i >= 0; --i) {\n const symbolIndex = symbolIndexes[i];\n placeSymbol(bucket.symbolInstances.get(symbolIndex), bucket.collisionArrays[symbolIndex], symbolIndex);\n }\n } else {\n for (let i = bucketPart.symbolInstanceStart; i < bucketPart.symbolInstanceEnd; i++) {\n placeSymbol(bucket.symbolInstances.get(i), bucket.collisionArrays[i], i);\n }\n }\n\n bucket.justReloaded = false;\n }\n\n storeCollisionData(bucketInstanceId: number, symbolIndex: number, collisionArrays: CollisionArrays, placedGlyphBoxes: PlacedBox, placedIconBoxes: PlacedBox, placedGlyphCircles: PlacedCircles): void {\n if (collisionArrays.textBox || collisionArrays.iconBox) {\n // Store the actually used collision box for debug draw\n let boxArray: Map;\n\n if (this.collisionBoxArrays.has(bucketInstanceId)) {\n boxArray = this.collisionBoxArrays.get(bucketInstanceId);\n } else {\n boxArray = new Map();\n this.collisionBoxArrays.set(bucketInstanceId, boxArray);\n }\n let realCollisionBox: {\n text: number[];\n icon: number[];\n };\n\n if (boxArray.has(symbolIndex)) {\n realCollisionBox = boxArray.get(symbolIndex);\n } else {\n realCollisionBox = {\n text: null,\n icon: null\n };\n boxArray.set(symbolIndex, realCollisionBox);\n }\n\n if (collisionArrays.textBox) {\n realCollisionBox.text = placedGlyphBoxes.box;\n }\n if (collisionArrays.iconBox) {\n realCollisionBox.icon = placedIconBoxes.box;\n }\n }\n\n if (placedGlyphCircles) {\n let circleArray = this.collisionCircleArrays[bucketInstanceId];\n\n // Group collision circles together by bucket. Circles can't be pushed forward for rendering yet as the symbol placement\n // for a bucket is not guaranteed to be complete before the commit-function has been called\n if (circleArray === undefined)\n circleArray = this.collisionCircleArrays[bucketInstanceId] = [];\n\n for (let i = 0; i < placedGlyphCircles.circles.length; i += 4) {\n circleArray.push(placedGlyphCircles.circles[i + 0] - viewportPadding); // x\n circleArray.push(placedGlyphCircles.circles[i + 1] - viewportPadding); // y\n circleArray.push(placedGlyphCircles.circles[i + 2]); // radius\n circleArray.push(placedGlyphCircles.collisionDetected ? 1 : 0); // collisionDetected-flag\n }\n }\n }\n\n markUsedJustification(bucket: SymbolBucket, placedAnchor: TextAnchor, symbolInstance: SymbolInstance, orientation: number) {\n const justifications = {\n 'left': symbolInstance.leftJustifiedTextSymbolIndex,\n 'center': symbolInstance.centerJustifiedTextSymbolIndex,\n 'right': symbolInstance.rightJustifiedTextSymbolIndex\n };\n\n let autoIndex;\n if (orientation === WritingMode.vertical) {\n autoIndex = symbolInstance.verticalPlacedTextSymbolIndex;\n } else {\n autoIndex = justifications[getAnchorJustification(placedAnchor)];\n }\n\n const indexes = [\n symbolInstance.leftJustifiedTextSymbolIndex,\n symbolInstance.centerJustifiedTextSymbolIndex,\n symbolInstance.rightJustifiedTextSymbolIndex,\n symbolInstance.verticalPlacedTextSymbolIndex\n ];\n\n for (const index of indexes) {\n if (index >= 0) {\n if (autoIndex >= 0 && index !== autoIndex) {\n // There are multiple justifications and this one isn't it: shift offscreen\n bucket.text.placedSymbolArray.get(index).crossTileID = 0;\n } else {\n // Either this is the chosen justification or the justification is hardwired: use this one\n bucket.text.placedSymbolArray.get(index).crossTileID = symbolInstance.crossTileID;\n }\n }\n }\n }\n\n markUsedOrientation(bucket: SymbolBucket, orientation: number, symbolInstance: SymbolInstance) {\n const horizontal = (orientation === WritingMode.horizontal || orientation === WritingMode.horizontalOnly) ? orientation : 0;\n const vertical = orientation === WritingMode.vertical ? orientation : 0;\n\n const horizontalIndexes = [\n symbolInstance.leftJustifiedTextSymbolIndex,\n symbolInstance.centerJustifiedTextSymbolIndex,\n symbolInstance.rightJustifiedTextSymbolIndex\n ];\n\n for (const index of horizontalIndexes) {\n bucket.text.placedSymbolArray.get(index).placedOrientation = horizontal;\n }\n\n if (symbolInstance.verticalPlacedTextSymbolIndex) {\n bucket.text.placedSymbolArray.get(symbolInstance.verticalPlacedTextSymbolIndex).placedOrientation = vertical;\n }\n }\n\n commit(now: number): void {\n this.commitTime = now;\n this.zoomAtLastRecencyCheck = this.transform.zoom;\n\n const prevPlacement = this.prevPlacement;\n let placementChanged = false;\n\n this.prevZoomAdjustment = prevPlacement ? prevPlacement.zoomAdjustment(this.transform.zoom) : 0;\n const increment = prevPlacement ? prevPlacement.symbolFadeChange(now) : 1;\n\n const prevOpacities = prevPlacement ? prevPlacement.opacities : {};\n const prevOffsets = prevPlacement ? prevPlacement.variableOffsets : {};\n const prevOrientations = prevPlacement ? prevPlacement.placedOrientations : {};\n\n // add the opacities from the current placement, and copy their current values from the previous placement\n for (const crossTileID in this.placements) {\n const jointPlacement = this.placements[crossTileID];\n const prevOpacity = prevOpacities[crossTileID];\n if (prevOpacity) {\n this.opacities[crossTileID] = new JointOpacityState(prevOpacity, increment, jointPlacement.text, jointPlacement.icon);\n placementChanged = placementChanged ||\n jointPlacement.text !== prevOpacity.text.placed ||\n jointPlacement.icon !== prevOpacity.icon.placed;\n } else {\n this.opacities[crossTileID] = new JointOpacityState(null, increment, jointPlacement.text, jointPlacement.icon, jointPlacement.skipFade);\n placementChanged = placementChanged || jointPlacement.text || jointPlacement.icon;\n }\n }\n\n // copy and update values from the previous placement that aren't in the current placement but haven't finished fading\n for (const crossTileID in prevOpacities) {\n const prevOpacity = prevOpacities[crossTileID];\n if (!this.opacities[crossTileID]) {\n const jointOpacity = new JointOpacityState(prevOpacity, increment, false, false);\n if (!jointOpacity.isHidden()) {\n this.opacities[crossTileID] = jointOpacity;\n placementChanged = placementChanged || prevOpacity.text.placed || prevOpacity.icon.placed;\n }\n }\n }\n for (const crossTileID in prevOffsets) {\n if (!this.variableOffsets[crossTileID] && this.opacities[crossTileID] && !this.opacities[crossTileID].isHidden()) {\n this.variableOffsets[crossTileID] = prevOffsets[crossTileID];\n }\n }\n\n for (const crossTileID in prevOrientations) {\n if (!this.placedOrientations[crossTileID] && this.opacities[crossTileID] && !this.opacities[crossTileID].isHidden()) {\n this.placedOrientations[crossTileID] = prevOrientations[crossTileID];\n }\n }\n\n // this.lastPlacementChangeTime is the time of the last commit() that\n // resulted in a placement change -- in other words, the start time of\n // the last symbol fade animation\n if (prevPlacement && prevPlacement.lastPlacementChangeTime === undefined) {\n throw new Error('Last placement time for previous placement is not defined');\n }\n if (placementChanged) {\n this.lastPlacementChangeTime = now;\n } else if (typeof this.lastPlacementChangeTime !== 'number') {\n this.lastPlacementChangeTime = prevPlacement ? prevPlacement.lastPlacementChangeTime : now;\n }\n }\n\n updateLayerOpacities(styleLayer: StyleLayer, tiles: Array) {\n const seenCrossTileIDs = {};\n for (const tile of tiles) {\n const symbolBucket = tile.getBucket(styleLayer) as SymbolBucket;\n if (symbolBucket && tile.latestFeatureIndex && styleLayer.id === symbolBucket.layerIds[0]) {\n this.updateBucketOpacities(symbolBucket, tile.tileID, seenCrossTileIDs, tile.collisionBoxArray);\n }\n }\n }\n\n updateBucketOpacities(bucket: SymbolBucket, tileID: OverscaledTileID, seenCrossTileIDs: {\n [k in string | number]: boolean;\n }, collisionBoxArray?: CollisionBoxArray | null) {\n if (bucket.hasTextData()) {\n bucket.text.opacityVertexArray.clear();\n bucket.text.hasVisibleVertices = false;\n }\n if (bucket.hasIconData()) {\n bucket.icon.opacityVertexArray.clear();\n bucket.icon.hasVisibleVertices = false;\n }\n if (bucket.hasIconCollisionBoxData()) bucket.iconCollisionBox.collisionVertexArray.clear();\n if (bucket.hasTextCollisionBoxData()) bucket.textCollisionBox.collisionVertexArray.clear();\n\n const layer = bucket.layers[0];\n const layout = layer.layout;\n const duplicateOpacityState = new JointOpacityState(null, 0, false, false, true);\n const textAllowOverlap = layout.get('text-allow-overlap');\n const iconAllowOverlap = layout.get('icon-allow-overlap');\n const hasVariablePlacement = layer._unevaluatedLayout.hasValue('text-variable-anchor') || layer._unevaluatedLayout.hasValue('text-variable-anchor-offset');\n const rotateWithMap = layout.get('text-rotation-alignment') === 'map';\n const pitchWithMap = layout.get('text-pitch-alignment') === 'map';\n const hasIconTextFit = layout.get('icon-text-fit') !== 'none';\n // If allow-overlap is true, we can show symbols before placement runs on them\n // But we have to wait for placement if we potentially depend on a paired icon/text\n // with allow-overlap: false.\n // See https://github.com/mapbox/mapbox-gl-js/issues/7032\n const defaultOpacityState = new JointOpacityState(null, 0,\n textAllowOverlap && (iconAllowOverlap || !bucket.hasIconData() || layout.get('icon-optional')),\n iconAllowOverlap && (textAllowOverlap || !bucket.hasTextData() || layout.get('text-optional')),\n true);\n\n if (!bucket.collisionArrays && collisionBoxArray && ((bucket.hasIconCollisionBoxData() || bucket.hasTextCollisionBoxData()))) {\n bucket.deserializeCollisionBoxes(collisionBoxArray);\n }\n\n const addOpacities = (iconOrText: SymbolBuffers, numVertices: number, opacity: number) => {\n for (let i = 0; i < numVertices / 4; i++) {\n iconOrText.opacityVertexArray.emplaceBack(opacity);\n }\n iconOrText.hasVisibleVertices = iconOrText.hasVisibleVertices || (opacity !== PACKED_HIDDEN_OPACITY);\n };\n\n const boxArrays = this.collisionBoxArrays.get(bucket.bucketInstanceId);\n\n for (let s = 0; s < bucket.symbolInstances.length; s++) {\n const symbolInstance = bucket.symbolInstances.get(s);\n const {\n numHorizontalGlyphVertices,\n numVerticalGlyphVertices,\n crossTileID\n } = symbolInstance;\n\n const isDuplicate = seenCrossTileIDs[crossTileID];\n\n let opacityState = this.opacities[crossTileID];\n if (isDuplicate) {\n opacityState = duplicateOpacityState;\n } else if (!opacityState) {\n opacityState = defaultOpacityState;\n // store the state so that future placements use it as a starting point\n this.opacities[crossTileID] = opacityState;\n }\n\n seenCrossTileIDs[crossTileID] = true;\n\n const hasText = numHorizontalGlyphVertices > 0 || numVerticalGlyphVertices > 0;\n const hasIcon = symbolInstance.numIconVertices > 0;\n\n const placedOrientation = this.placedOrientations[symbolInstance.crossTileID];\n const horizontalHidden = placedOrientation === WritingMode.vertical;\n const verticalHidden = placedOrientation === WritingMode.horizontal || placedOrientation === WritingMode.horizontalOnly;\n\n if (hasText) {\n const packedOpacity = packOpacity(opacityState.text);\n // Vertical text fades in/out on collision the same way as corresponding\n // horizontal text. Switch between vertical/horizontal should be instantaneous\n const horizontalOpacity = horizontalHidden ? PACKED_HIDDEN_OPACITY : packedOpacity;\n addOpacities(bucket.text, numHorizontalGlyphVertices, horizontalOpacity);\n const verticalOpacity = verticalHidden ? PACKED_HIDDEN_OPACITY : packedOpacity;\n addOpacities(bucket.text, numVerticalGlyphVertices, verticalOpacity);\n\n // If this label is completely faded, mark it so that we don't have to calculate\n // its position at render time. If this layer has variable placement, shift the various\n // symbol instances appropriately so that symbols from buckets that have yet to be placed\n // offset appropriately.\n const symbolHidden = opacityState.text.isHidden();\n [\n symbolInstance.rightJustifiedTextSymbolIndex,\n symbolInstance.centerJustifiedTextSymbolIndex,\n symbolInstance.leftJustifiedTextSymbolIndex\n ].forEach(index => {\n if (index >= 0) {\n bucket.text.placedSymbolArray.get(index).hidden = symbolHidden || horizontalHidden ? 1 : 0;\n }\n });\n\n if (symbolInstance.verticalPlacedTextSymbolIndex >= 0) {\n bucket.text.placedSymbolArray.get(symbolInstance.verticalPlacedTextSymbolIndex).hidden = symbolHidden || verticalHidden ? 1 : 0;\n }\n\n const prevOffset = this.variableOffsets[symbolInstance.crossTileID];\n if (prevOffset) {\n this.markUsedJustification(bucket, prevOffset.anchor, symbolInstance, placedOrientation);\n }\n\n const prevOrientation = this.placedOrientations[symbolInstance.crossTileID];\n if (prevOrientation) {\n this.markUsedJustification(bucket, 'left', symbolInstance, prevOrientation);\n this.markUsedOrientation(bucket, prevOrientation, symbolInstance);\n }\n }\n\n if (hasIcon) {\n const packedOpacity = packOpacity(opacityState.icon);\n\n const useHorizontal = !(hasIconTextFit && symbolInstance.verticalPlacedIconSymbolIndex && horizontalHidden);\n\n if (symbolInstance.placedIconSymbolIndex >= 0) {\n const horizontalOpacity = useHorizontal ? packedOpacity : PACKED_HIDDEN_OPACITY;\n addOpacities(bucket.icon, symbolInstance.numIconVertices, horizontalOpacity);\n bucket.icon.placedSymbolArray.get(symbolInstance.placedIconSymbolIndex).hidden =\n (opacityState.icon.isHidden() as any);\n }\n\n if (symbolInstance.verticalPlacedIconSymbolIndex >= 0) {\n const verticalOpacity = !useHorizontal ? packedOpacity : PACKED_HIDDEN_OPACITY;\n addOpacities(bucket.icon, symbolInstance.numVerticalIconVertices, verticalOpacity);\n bucket.icon.placedSymbolArray.get(symbolInstance.verticalPlacedIconSymbolIndex).hidden =\n (opacityState.icon.isHidden() as any);\n }\n }\n\n const realBoxes = (boxArrays && boxArrays.has(s)) ? boxArrays.get(s) : {\n text: null,\n icon: null\n };\n\n if (bucket.hasIconCollisionBoxData() || bucket.hasTextCollisionBoxData()) {\n const collisionArrays = bucket.collisionArrays[s];\n if (collisionArrays) {\n let shift = new Point(0, 0);\n if (collisionArrays.textBox || collisionArrays.verticalTextBox) {\n let used = true;\n if (hasVariablePlacement) {\n const variableOffset = this.variableOffsets[crossTileID];\n if (variableOffset) {\n // This will show either the currently placed position or the last\n // successfully placed position (so you can visualize what collision\n // just made the symbol disappear, and the most likely place for the\n // symbol to come back)\n shift = calculateVariableLayoutShift(variableOffset.anchor,\n variableOffset.width,\n variableOffset.height,\n variableOffset.textOffset,\n variableOffset.textBoxScale);\n if (rotateWithMap) {\n shift._rotate(pitchWithMap ? -this.transform.bearingInRadians : this.transform.bearingInRadians);\n }\n } else {\n // No offset -> this symbol hasn't been placed since coming on-screen\n // No single box is particularly meaningful and all of them would be too noisy\n // Use the center box just to show something's there, but mark it \"not used\"\n used = false;\n }\n }\n\n if (collisionArrays.textBox || collisionArrays.verticalTextBox) {\n let hidden: boolean;\n if (collisionArrays.textBox) {\n hidden = horizontalHidden;\n }\n if (collisionArrays.verticalTextBox) {\n hidden = verticalHidden;\n }\n updateCollisionVertices(bucket.textCollisionBox.collisionVertexArray, opacityState.text.placed, !used || hidden, realBoxes.text, shift.x, shift.y);\n }\n }\n\n if (collisionArrays.iconBox || collisionArrays.verticalIconBox) {\n const verticalIconUsed = Boolean(!verticalHidden && collisionArrays.verticalIconBox);\n let hidden: boolean;\n if (collisionArrays.iconBox) {\n hidden = verticalIconUsed;\n }\n if (collisionArrays.verticalIconBox) {\n hidden = !verticalIconUsed;\n }\n updateCollisionVertices(bucket.iconCollisionBox.collisionVertexArray, opacityState.icon.placed, hidden, realBoxes.icon,\n hasIconTextFit ? shift.x : 0,\n hasIconTextFit ? shift.y : 0);\n }\n }\n }\n }\n\n bucket.sortFeatures(-this.transform.bearingInRadians);\n if (this.retainedQueryData[bucket.bucketInstanceId]) {\n this.retainedQueryData[bucket.bucketInstanceId].featureSortOrder = bucket.featureSortOrder;\n }\n\n if (bucket.hasTextData() && bucket.text.opacityVertexBuffer) {\n bucket.text.opacityVertexBuffer.updateData(bucket.text.opacityVertexArray);\n }\n if (bucket.hasIconData() && bucket.icon.opacityVertexBuffer) {\n bucket.icon.opacityVertexBuffer.updateData(bucket.icon.opacityVertexArray);\n }\n if (bucket.hasIconCollisionBoxData() && bucket.iconCollisionBox.collisionVertexBuffer) {\n bucket.iconCollisionBox.collisionVertexBuffer.updateData(bucket.iconCollisionBox.collisionVertexArray);\n }\n if (bucket.hasTextCollisionBoxData() && bucket.textCollisionBox.collisionVertexBuffer) {\n bucket.textCollisionBox.collisionVertexBuffer.updateData(bucket.textCollisionBox.collisionVertexArray);\n }\n\n if (bucket.text.opacityVertexArray.length !== bucket.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${bucket.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${bucket.text.layoutVertexArray.length}) / 4`);\n if (bucket.icon.opacityVertexArray.length !== bucket.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${bucket.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${bucket.icon.layoutVertexArray.length}) / 4`);\n\n // Push generated collision circles to the bucket for debug rendering\n if (bucket.bucketInstanceId in this.collisionCircleArrays) {\n bucket.collisionCircleArray = this.collisionCircleArrays[bucket.bucketInstanceId];\n delete this.collisionCircleArrays[bucket.bucketInstanceId];\n }\n }\n\n symbolFadeChange(now: number) {\n return this.fadeDuration === 0 ?\n 1 :\n ((now - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment);\n }\n\n zoomAdjustment(zoom: number) {\n // When zooming out quickly, labels can overlap each other. This\n // adjustment is used to reduce the interval between placement calculations\n // and to reduce the fade duration when zooming out quickly. Discovering the\n // collisions more quickly and fading them more quickly reduces the unwanted effect.\n return Math.max(0, (this.transform.zoom - zoom) / 1.5);\n }\n\n hasTransitions(now: number) {\n return this.stale ||\n now - this.lastPlacementChangeTime < this.fadeDuration;\n }\n\n stillRecent(now: number, zoom: number) {\n // The adjustment makes placement more frequent when zooming.\n // This condition applies the adjustment only after the map has\n // stopped zooming. This avoids adding extra jank while zooming.\n const durationAdjustment = this.zoomAtLastRecencyCheck === zoom ?\n (1 - this.zoomAdjustment(zoom)) :\n 1;\n this.zoomAtLastRecencyCheck = zoom;\n\n return this.commitTime + this.fadeDuration * durationAdjustment > now;\n }\n\n setStale() {\n this.stale = true;\n }\n}\n\nfunction updateCollisionVertices(collisionVertexArray: CollisionVertexArray, placed: boolean, notUsed: boolean | number, realBox: Array, shiftX?: number, shiftY?: number) {\n if (!realBox || realBox.length === 0) {\n realBox = [0, 0, 0, 0];\n }\n\n const tlX = realBox[0] - viewportPadding;\n const tlY = realBox[1] - viewportPadding;\n const brX = realBox[2] - viewportPadding;\n const brY = realBox[3] - viewportPadding;\n\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0, shiftX || 0, shiftY || 0, tlX, tlY);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0, shiftX || 0, shiftY || 0, brX, tlY);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0, shiftX || 0, shiftY || 0, brX, brY);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0, shiftX || 0, shiftY || 0, tlX, brY);\n}\n\n// All four vertices for a glyph will have the same opacity state\n// So we pack the opacity into a uint8, and then repeat it four times\n// to make a single uint32 that we can upload for each glyph in the\n// label.\nconst shift25 = Math.pow(2, 25);\nconst shift24 = Math.pow(2, 24);\nconst shift17 = Math.pow(2, 17);\nconst shift16 = Math.pow(2, 16);\nconst shift9 = Math.pow(2, 9);\nconst shift8 = Math.pow(2, 8);\nconst shift1 = Math.pow(2, 1);\nfunction packOpacity(opacityState: OpacityState): number {\n if (opacityState.opacity === 0 && !opacityState.placed) {\n return 0;\n } else if (opacityState.opacity === 1 && opacityState.placed) {\n return 4294967295;\n }\n const targetBit = opacityState.placed ? 1 : 0;\n const opacityBits = Math.floor(opacityState.opacity * 127);\n return opacityBits * shift25 + targetBit * shift24 +\n opacityBits * shift17 + targetBit * shift16 +\n opacityBits * shift9 + targetBit * shift8 +\n opacityBits * shift1 + targetBit;\n}\n\nconst PACKED_HIDDEN_OPACITY = 0;\n","import {now} from '../util/time_control';\nimport {Placement} from '../symbol/placement';\nimport type {ITransform} from '../geo/transform_interface';\nimport type {StyleLayer} from './style_layer';\nimport type {SymbolStyleLayer} from './style_layer/symbol_style_layer';\nimport type {Tile} from '../tile/tile';\nimport type {BucketPart} from '../symbol/placement';\nimport type {Terrain} from '../render/terrain';\n\nclass LayerPlacement {\n _sortAcrossTiles: boolean;\n _currentTileIndex: number;\n _currentPartIndex: number;\n _seenCrossTileIDs: {\n [k in string | number]: boolean;\n };\n _bucketParts: Array;\n\n constructor(styleLayer: SymbolStyleLayer) {\n this._sortAcrossTiles = styleLayer.layout.get('symbol-z-order') !== 'viewport-y' &&\n !styleLayer.layout.get('symbol-sort-key').isConstant();\n\n this._currentTileIndex = 0;\n this._currentPartIndex = 0;\n this._seenCrossTileIDs = {};\n this._bucketParts = [];\n }\n\n continuePlacement(tiles: Array, placement: Placement, showCollisionBoxes: boolean, styleLayer: StyleLayer, shouldPausePlacement: () => boolean) {\n\n const bucketParts = this._bucketParts;\n\n while (this._currentTileIndex < tiles.length) {\n const tile = tiles[this._currentTileIndex];\n placement.getBucketParts(bucketParts, styleLayer, tile, this._sortAcrossTiles);\n\n this._currentTileIndex++;\n if (shouldPausePlacement()) {\n return true;\n }\n }\n\n if (this._sortAcrossTiles) {\n this._sortAcrossTiles = false;\n bucketParts.sort((a, b) => (a.sortKey as any as number) - (b.sortKey as any as number));\n }\n\n while (this._currentPartIndex < bucketParts.length) {\n const bucketPart = bucketParts[this._currentPartIndex];\n placement.placeLayerBucketPart(bucketPart, this._seenCrossTileIDs, showCollisionBoxes);\n\n this._currentPartIndex++;\n if (shouldPausePlacement()) {\n return true;\n }\n }\n return false;\n }\n}\n\nexport class PauseablePlacement {\n placement: Placement;\n _done: boolean;\n _currentPlacementIndex: number;\n _forceFullPlacement: boolean;\n _showCollisionBoxes: boolean;\n _inProgressLayer: LayerPlacement;\n\n constructor(\n transform: ITransform,\n terrain: Terrain,\n order: Array,\n forceFullPlacement: boolean,\n showCollisionBoxes: boolean,\n fadeDuration: number,\n crossSourceCollisions: boolean,\n prevPlacement?: Placement\n ) {\n this.placement = new Placement(transform, terrain, fadeDuration, crossSourceCollisions, prevPlacement);\n this._currentPlacementIndex = order.length - 1;\n this._forceFullPlacement = forceFullPlacement;\n this._showCollisionBoxes = showCollisionBoxes;\n this._done = false;\n }\n\n isDone() {\n return this._done;\n }\n\n continuePlacement(\n order: Array,\n layers: {[_: string]: StyleLayer},\n layerTiles: {[_: string]: Array}\n ) {\n const startTime = now();\n\n const shouldPausePlacement = () => {\n return this._forceFullPlacement ? false : (now() - startTime) > 2;\n };\n\n while (this._currentPlacementIndex >= 0) {\n const layerId = order[this._currentPlacementIndex];\n const layer = layers[layerId];\n const placementZoom = this.placement.collisionIndex.transform.zoom;\n if (layer.type === 'symbol' &&\n (!layer.minzoom || layer.minzoom <= placementZoom) &&\n (!layer.maxzoom || layer.maxzoom > placementZoom)) {\n\n if (!this._inProgressLayer) {\n this._inProgressLayer = new LayerPlacement(layer as any as SymbolStyleLayer);\n }\n\n const pausePlacement = this._inProgressLayer.continuePlacement(layerTiles[layer.source], this.placement, this._showCollisionBoxes, layer, shouldPausePlacement);\n\n if (pausePlacement) {\n // We didn't finish placing all layers within 2ms,\n // but we can keep rendering with a partial placement\n // We'll resume here on the next frame\n return;\n }\n\n delete this._inProgressLayer;\n }\n\n this._currentPlacementIndex--;\n }\n\n this._done = true;\n }\n\n commit(now: number) {\n this.placement.commit(now);\n return this.placement;\n }\n}\n","import KDBush from 'kdbush';\nimport {EXTENT} from '../data/extent';\n\nimport {type SymbolInstanceArray} from '../data/array_types.g';\n\nimport type {SymbolInstance} from '../data/array_types.g';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {Tile} from '../tile/tile';\n\n/*\n The CrossTileSymbolIndex generally works on the assumption that\n a conceptual \"unique symbol\" can be identified by the text of\n the label combined with the anchor point. The goal is to assign\n these conceptual \"unique symbols\" a shared crossTileID that can be\n used by Placement to keep fading opacity states consistent and to\n deduplicate labels.\n\n The CrossTileSymbolIndex indexes all the current symbol instances and\n their crossTileIDs. When a symbol bucket gets added or updated, the\n index assigns a crossTileID to each of it's symbol instances by either\n matching it with an existing id or assigning a new one.\n*/\n\n// Round anchor positions to roughly 4 pixel grid\nconst roundingFactor = 512 / EXTENT / 2;\n\nexport const KDBUSH_THRESHHOLD = 128;\n\ninterface SymbolsByKeyEntry {\n index?: KDBush;\n positions?: {x: number; y: number}[];\n crossTileIDs: number[];\n}\n\nclass TileLayerIndex {\n _symbolsByKey: Record = {};\n\n constructor(public tileID: OverscaledTileID, symbolInstances: SymbolInstanceArray, public bucketInstanceId: number) {\n // group the symbolInstances by key\n const symbolInstancesByKey = new Map();\n for (let i = 0; i < symbolInstances.length; i++) {\n const symbolInstance = symbolInstances.get(i);\n const key = symbolInstance.key;\n const instances = symbolInstancesByKey.get(key);\n if (instances) {\n // This tile may have multiple symbol instances with the same key\n // Store each one along with its coordinates\n instances.push(symbolInstance);\n } else {\n symbolInstancesByKey.set(key, [symbolInstance]);\n }\n }\n\n // index the SymbolInstances in this each bucket\n for (const [key, symbols] of symbolInstancesByKey) {\n const positions = symbols.map(symbolInstance => ({x: Math.floor(symbolInstance.anchorX * roundingFactor), y: Math.floor(symbolInstance.anchorY * roundingFactor)}));\n const crossTileIDs = symbols.map(v => v.crossTileID);\n const entry: SymbolsByKeyEntry = {positions, crossTileIDs};\n\n // once we get too many symbols for a given key, it becomes much faster to index it before queries\n if (entry.positions.length > KDBUSH_THRESHHOLD) {\n\n const index = new KDBush(entry.positions.length, 16, Uint16Array);\n for (const {x, y} of entry.positions) index.add(x, y);\n index.finish();\n\n // clear all references to the original positions data\n delete entry.positions;\n entry.index = index;\n }\n\n this._symbolsByKey[key] = entry;\n }\n }\n\n // Converts the coordinates of the input symbol instance into coordinates that be can compared\n // against other symbols in this index. Coordinates are:\n // (1) local-tile-based (so after correction we get x,y values relative to our local anchorX/Y)\n // (2) converted to the z-scale of this TileLayerIndex\n // (3) down-sampled by \"roundingFactor\" from tile coordinate precision in order to be\n // more tolerant of small differences between tiles.\n getScaledCoordinates(symbolInstance: SymbolInstance, childTileID: OverscaledTileID): {x: number; y: number} {\n const {x: localX, y: localY, z: localZ} = this.tileID.canonical;\n const {x, y, z} = childTileID.canonical;\n\n const zDifference = z - localZ;\n const scale = roundingFactor / Math.pow(2, zDifference);\n const xWorld = (x * EXTENT + symbolInstance.anchorX) * scale;\n const yWorld = (y * EXTENT + symbolInstance.anchorY) * scale;\n const xOffset = localX * EXTENT * roundingFactor;\n const yOffset = localY * EXTENT * roundingFactor;\n const result = {\n x: Math.floor(xWorld - xOffset),\n y: Math.floor(yWorld - yOffset)\n };\n\n return result;\n }\n\n findMatches(symbolInstances: SymbolInstanceArray, newTileID: OverscaledTileID, zoomCrossTileIDs: {\n [crossTileID: number]: boolean;\n }) {\n const tolerance = this.tileID.canonical.z < newTileID.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - newTileID.canonical.z);\n\n for (let i = 0; i < symbolInstances.length; i++) {\n const symbolInstance = symbolInstances.get(i);\n if (symbolInstance.crossTileID) {\n // already has a match, skip\n continue;\n }\n\n const entry = this._symbolsByKey[symbolInstance.key];\n if (!entry) {\n // No symbol with this key in this bucket\n continue;\n }\n\n const scaledSymbolCoord = this.getScaledCoordinates(symbolInstance, newTileID);\n\n if (entry.index) {\n // Return any symbol with the same keys whose coordinates are within 1\n // grid unit. (with a 4px grid, this covers a 12px by 12px area)\n const indexes = entry.index.range(\n scaledSymbolCoord.x - tolerance,\n scaledSymbolCoord.y - tolerance,\n scaledSymbolCoord.x + tolerance,\n scaledSymbolCoord.y + tolerance).sort();\n\n for (const i of indexes) {\n const crossTileID = entry.crossTileIDs[i];\n\n if (!zoomCrossTileIDs[crossTileID]) {\n // Once we've marked ourselves duplicate against this parent symbol,\n // don't let any other symbols at the same zoom level duplicate against\n // the same parent (see issue #5993)\n zoomCrossTileIDs[crossTileID] = true;\n symbolInstance.crossTileID = crossTileID;\n break;\n }\n }\n } else if (entry.positions) {\n for (let i = 0; i < entry.positions.length; i++) {\n const thisTileSymbol = entry.positions[i];\n const crossTileID = entry.crossTileIDs[i];\n\n // Return any symbol with the same keys whose coordinates are within 1\n // grid unit. (with a 4px grid, this covers a 12px by 12px area)\n if (Math.abs(thisTileSymbol.x - scaledSymbolCoord.x) <= tolerance &&\n Math.abs(thisTileSymbol.y - scaledSymbolCoord.y) <= tolerance &&\n !zoomCrossTileIDs[crossTileID]) {\n // Once we've marked ourselves duplicate against this parent symbol,\n // don't let any other symbols at the same zoom level duplicate against\n // the same parent (see issue #5993)\n zoomCrossTileIDs[crossTileID] = true;\n symbolInstance.crossTileID = crossTileID;\n break;\n }\n }\n }\n }\n }\n\n getCrossTileIDsLists() {\n return Object.values(this._symbolsByKey).map(({crossTileIDs}) => crossTileIDs);\n }\n}\n\nclass CrossTileIDs {\n maxCrossTileID: number;\n constructor() {\n this.maxCrossTileID = 0;\n }\n generate() {\n return ++this.maxCrossTileID;\n }\n}\n\nclass CrossTileSymbolLayerIndex {\n indexes: {\n [zoom in string | number]: {\n [tileId in string | number]: TileLayerIndex;\n };\n };\n usedCrossTileIDs: {\n [zoom in string | number]: {\n [crossTileID: number]: boolean;\n };\n };\n lng: number;\n\n constructor() {\n this.indexes = {};\n this.usedCrossTileIDs = {};\n this.lng = 0;\n }\n\n /*\n * Sometimes when a user pans across the antimeridian the longitude value gets wrapped.\n * To prevent labels from flashing out and in we adjust the tileID values in the indexes\n * so that they match the new wrapped version of the map.\n */\n handleWrapJump(lng: number) {\n const wrapDelta = Math.round((lng - this.lng) / 360);\n if (wrapDelta !== 0) {\n for (const zoom in this.indexes) {\n const zoomIndexes = this.indexes[zoom];\n const newZoomIndex = {};\n for (const key in zoomIndexes) {\n // change the tileID's wrap and add it to a new index\n const index = zoomIndexes[key];\n index.tileID = index.tileID.unwrapTo(index.tileID.wrap + wrapDelta);\n newZoomIndex[index.tileID.key] = index;\n }\n this.indexes[zoom] = newZoomIndex;\n }\n }\n this.lng = lng;\n }\n\n addBucket(tileID: OverscaledTileID, bucket: SymbolBucket, crossTileIDs: CrossTileIDs) {\n if (this.indexes[tileID.overscaledZ] &&\n this.indexes[tileID.overscaledZ][tileID.key]) {\n if (this.indexes[tileID.overscaledZ][tileID.key].bucketInstanceId ===\n bucket.bucketInstanceId) {\n return false;\n } else {\n // We're replacing this bucket with an updated version\n // Remove the old bucket's \"used crossTileIDs\" now so that\n // the new bucket can claim them.\n // The old index entries themselves stick around until\n // 'removeStaleBuckets' is called.\n this.removeBucketCrossTileIDs(tileID.overscaledZ,\n this.indexes[tileID.overscaledZ][tileID.key]);\n }\n }\n\n for (let i = 0; i < bucket.symbolInstances.length; i++) {\n const symbolInstance = bucket.symbolInstances.get(i);\n symbolInstance.crossTileID = 0;\n }\n\n if (!this.usedCrossTileIDs[tileID.overscaledZ]) {\n this.usedCrossTileIDs[tileID.overscaledZ] = {};\n }\n const zoomCrossTileIDs = this.usedCrossTileIDs[tileID.overscaledZ];\n\n for (const zoom in this.indexes) {\n const zoomIndexes = this.indexes[zoom];\n if (Number(zoom) > tileID.overscaledZ) {\n for (const id in zoomIndexes) {\n const childIndex = zoomIndexes[id];\n if (childIndex.tileID.isChildOf(tileID)) {\n childIndex.findMatches(bucket.symbolInstances, tileID, zoomCrossTileIDs);\n }\n }\n } else {\n const parentCoord = tileID.scaledTo(Number(zoom));\n const parentIndex = zoomIndexes[parentCoord.key];\n if (parentIndex) {\n parentIndex.findMatches(bucket.symbolInstances, tileID, zoomCrossTileIDs);\n }\n }\n }\n\n for (let i = 0; i < bucket.symbolInstances.length; i++) {\n const symbolInstance = bucket.symbolInstances.get(i);\n if (!symbolInstance.crossTileID) {\n // symbol did not match any known symbol, assign a new id\n symbolInstance.crossTileID = crossTileIDs.generate();\n zoomCrossTileIDs[symbolInstance.crossTileID] = true;\n }\n }\n\n if (this.indexes[tileID.overscaledZ] === undefined) {\n this.indexes[tileID.overscaledZ] = {};\n }\n this.indexes[tileID.overscaledZ][tileID.key] = new TileLayerIndex(tileID, bucket.symbolInstances, bucket.bucketInstanceId);\n\n return true;\n }\n\n removeBucketCrossTileIDs(zoom: string | number, removedBucket: TileLayerIndex) {\n for (const crossTileIDs of removedBucket.getCrossTileIDsLists()) {\n for (const crossTileID of crossTileIDs) {\n delete this.usedCrossTileIDs[zoom][crossTileID];\n }\n }\n }\n\n removeStaleBuckets(currentIDs: {\n [k in string | number]: boolean;\n }) {\n let tilesChanged = false;\n for (const z in this.indexes) {\n const zoomIndexes = this.indexes[z];\n for (const tileKey in zoomIndexes) {\n if (!currentIDs[zoomIndexes[tileKey].bucketInstanceId]) {\n this.removeBucketCrossTileIDs(z, zoomIndexes[tileKey]);\n delete zoomIndexes[tileKey];\n tilesChanged = true;\n }\n }\n }\n return tilesChanged;\n }\n}\n\nexport class CrossTileSymbolIndex {\n layerIndexes: {[layerId: string]: CrossTileSymbolLayerIndex};\n crossTileIDs: CrossTileIDs;\n maxBucketInstanceId: number;\n bucketsInCurrentPlacement: {[_: number]: boolean};\n\n constructor() {\n this.layerIndexes = {};\n this.crossTileIDs = new CrossTileIDs();\n this.maxBucketInstanceId = 0;\n this.bucketsInCurrentPlacement = {};\n }\n\n addLayer(styleLayer: StyleLayer, tiles: Array, lng: number) {\n let layerIndex = this.layerIndexes[styleLayer.id];\n if (layerIndex === undefined) {\n layerIndex = this.layerIndexes[styleLayer.id] = new CrossTileSymbolLayerIndex();\n }\n\n let symbolBucketsChanged = false;\n const currentBucketIDs = {};\n\n layerIndex.handleWrapJump(lng);\n\n for (const tile of tiles) {\n const symbolBucket = (tile.getBucket(styleLayer) as any as SymbolBucket);\n if (!symbolBucket || styleLayer.id !== symbolBucket.layerIds[0])\n continue;\n\n if (!symbolBucket.bucketInstanceId) {\n symbolBucket.bucketInstanceId = ++this.maxBucketInstanceId;\n }\n\n if (layerIndex.addBucket(tile.tileID, symbolBucket, this.crossTileIDs)) {\n symbolBucketsChanged = true;\n }\n currentBucketIDs[symbolBucket.bucketInstanceId] = true;\n }\n\n if (layerIndex.removeStaleBuckets(currentBucketIDs)) {\n symbolBucketsChanged = true;\n }\n\n return symbolBucketsChanged;\n }\n\n pruneUnusedLayers(usedLayers: Array) {\n const usedLayerMap = {};\n usedLayers.forEach((usedLayer) => {\n usedLayerMap[usedLayer] = true;\n });\n for (const layerId in this.layerIndexes) {\n if (!usedLayerMap[layerId]) {\n delete this.layerIndexes[layerId];\n }\n }\n }\n}\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision mediump float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\\nout highp vec4 fragColor;';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'void main() {fragColor=vec4(1.0);}';\n","// Disable Flow annotations here because Flow doesn't support importing GLSL files\n\nimport preludeFrag from './_prelude.fragment.glsl.g';\nimport preludeVert from './_prelude.vertex.glsl.g';\nimport backgroundFrag from './background.fragment.glsl.g';\nimport backgroundVert from './background.vertex.glsl.g';\nimport backgroundPatternFrag from './background_pattern.fragment.glsl.g';\nimport backgroundPatternVert from './background_pattern.vertex.glsl.g';\nimport circleFrag from './circle.fragment.glsl.g';\nimport circleVert from './circle.vertex.glsl.g';\nimport clippingMaskFrag from './clipping_mask.fragment.glsl.g';\nimport clippingMaskVert from './clipping_mask.vertex.glsl.g';\nimport heatmapFrag from './heatmap.fragment.glsl.g';\nimport heatmapVert from './heatmap.vertex.glsl.g';\nimport heatmapTextureFrag from './heatmap_texture.fragment.glsl.g';\nimport heatmapTextureVert from './heatmap_texture.vertex.glsl.g';\nimport collisionBoxFrag from './collision_box.fragment.glsl.g';\nimport collisionBoxVert from './collision_box.vertex.glsl.g';\nimport collisionCircleFrag from './collision_circle.fragment.glsl.g';\nimport collisionCircleVert from './collision_circle.vertex.glsl.g';\nimport colorReliefFrag from './color_relief.fragment.glsl.g';\nimport colorReliefVert from './color_relief.vertex.glsl.g';\nimport debugFrag from './debug.fragment.glsl.g';\nimport debugVert from './debug.vertex.glsl.g';\nimport depthVert from './depth.vertex.glsl.g';\nimport fillFrag from './fill.fragment.glsl.g';\nimport fillVert from './fill.vertex.glsl.g';\nimport fillOutlineFrag from './fill_outline.fragment.glsl.g';\nimport fillOutlineVert from './fill_outline.vertex.glsl.g';\nimport fillOutlinePatternFrag from './fill_outline_pattern.fragment.glsl.g';\nimport fillOutlinePatternVert from './fill_outline_pattern.vertex.glsl.g';\nimport fillPatternFrag from './fill_pattern.fragment.glsl.g';\nimport fillPatternVert from './fill_pattern.vertex.glsl.g';\nimport fillExtrusionFrag from './fill_extrusion.fragment.glsl.g';\nimport fillExtrusionVert from './fill_extrusion.vertex.glsl.g';\nimport fillExtrusionPatternFrag from './fill_extrusion_pattern.fragment.glsl.g';\nimport fillExtrusionPatternVert from './fill_extrusion_pattern.vertex.glsl.g';\nimport hillshadePrepareFrag from './hillshade_prepare.fragment.glsl.g';\nimport hillshadePrepareVert from './hillshade_prepare.vertex.glsl.g';\nimport hillshadeFrag from './hillshade.fragment.glsl.g';\nimport hillshadeVert from './hillshade.vertex.glsl.g';\nimport lineFrag from './line.fragment.glsl.g';\nimport lineVert from './line.vertex.glsl.g';\nimport lineGradientFrag from './line_gradient.fragment.glsl.g';\nimport lineGradientVert from './line_gradient.vertex.glsl.g';\nimport linePatternFrag from './line_pattern.fragment.glsl.g';\nimport linePatternVert from './line_pattern.vertex.glsl.g';\nimport lineSDFFrag from './line_sdf.fragment.glsl.g';\nimport lineSDFVert from './line_sdf.vertex.glsl.g';\nimport lineGradientSDFFrag from './line_gradient_sdf.fragment.glsl.g';\nimport lineGradientSDFVert from './line_gradient_sdf.vertex.glsl.g';\nimport rasterFrag from './raster.fragment.glsl.g';\nimport rasterVert from './raster.vertex.glsl.g';\nimport symbolIconFrag from './symbol_icon.fragment.glsl.g';\nimport symbolIconVert from './symbol_icon.vertex.glsl.g';\nimport symbolSDFFrag from './symbol_sdf.fragment.glsl.g';\nimport symbolSDFVert from './symbol_sdf.vertex.glsl.g';\nimport symbolTextAndIconFrag from './symbol_text_and_icon.fragment.glsl.g';\nimport symbolTextAndIconVert from './symbol_text_and_icon.vertex.glsl.g';\nimport terrainDepthFrag from './terrain_depth.fragment.glsl.g';\nimport terrainCoordsFrag from './terrain_coords.fragment.glsl.g';\nimport terrainFrag from './terrain.fragment.glsl.g';\nimport terrainVert from './terrain.vertex.glsl.g';\nimport terrainVertDepth from './terrain_depth.vertex.glsl.g';\nimport terrainVertCoords from './terrain_coords.vertex.glsl.g';\nimport projectionErrorMeasurementVert from './projection_error_measurement.vertex.glsl.g';\nimport projectionErrorMeasurementFrag from './projection_error_measurement.fragment.glsl.g';\nimport projectionMercatorVert from './_projection_mercator.vertex.glsl.g';\nimport projectionGlobeVert from './_projection_globe.vertex.glsl.g';\nimport atmosphereFrag from './atmosphere.fragment.glsl.g';\nimport atmosphereVert from './atmosphere.vertex.glsl.g';\nimport skyFrag from './sky.fragment.glsl.g';\nimport skyVert from './sky.vertex.glsl.g';\n\nexport type PreparedShader = {\n fragmentSource: string;\n vertexSource: string;\n staticAttributes: Array;\n staticUniforms: Array;\n};\n\nexport const shaders = {\n prelude: prepare(preludeFrag, preludeVert),\n projectionMercator: prepare('', projectionMercatorVert),\n projectionGlobe: prepare('', projectionGlobeVert),\n background: prepare(backgroundFrag, backgroundVert),\n backgroundPattern: prepare(backgroundPatternFrag, backgroundPatternVert),\n circle: prepare(circleFrag, circleVert),\n clippingMask: prepare(clippingMaskFrag, clippingMaskVert),\n heatmap: prepare(heatmapFrag, heatmapVert),\n heatmapTexture: prepare(heatmapTextureFrag, heatmapTextureVert),\n collisionBox: prepare(collisionBoxFrag, collisionBoxVert),\n collisionCircle: prepare(collisionCircleFrag, collisionCircleVert),\n colorRelief: prepare(colorReliefFrag, colorReliefVert),\n debug: prepare(debugFrag, debugVert),\n depth: prepare(clippingMaskFrag, depthVert),\n fill: prepare(fillFrag, fillVert),\n fillOutline: prepare(fillOutlineFrag, fillOutlineVert),\n fillOutlinePattern: prepare(fillOutlinePatternFrag, fillOutlinePatternVert),\n fillPattern: prepare(fillPatternFrag, fillPatternVert),\n fillExtrusion: prepare(fillExtrusionFrag, fillExtrusionVert),\n fillExtrusionPattern: prepare(fillExtrusionPatternFrag, fillExtrusionPatternVert),\n hillshadePrepare: prepare(hillshadePrepareFrag, hillshadePrepareVert),\n hillshade: prepare(hillshadeFrag, hillshadeVert),\n line: prepare(lineFrag, lineVert),\n lineGradient: prepare(lineGradientFrag, lineGradientVert),\n linePattern: prepare(linePatternFrag, linePatternVert),\n lineSDF: prepare(lineSDFFrag, lineSDFVert),\n lineGradientSDF: prepare(lineGradientSDFFrag, lineGradientSDFVert),\n raster: prepare(rasterFrag, rasterVert),\n symbolIcon: prepare(symbolIconFrag, symbolIconVert),\n symbolSDF: prepare(symbolSDFFrag, symbolSDFVert),\n symbolTextAndIcon: prepare(symbolTextAndIconFrag, symbolTextAndIconVert),\n terrain: prepare(terrainFrag, terrainVert),\n terrainDepth: prepare(terrainDepthFrag, terrainVertDepth),\n terrainCoords: prepare(terrainCoordsFrag, terrainVertCoords),\n projectionErrorMeasurement: prepare(projectionErrorMeasurementFrag, projectionErrorMeasurementVert),\n atmosphere: prepare(atmosphereFrag, atmosphereVert),\n sky: prepare(skyFrag, skyVert),\n};\n\n/** Expand #pragmas to #ifdefs, extract attributes and uniforms */\nfunction prepare(fragmentSource: string, vertexSource: string): PreparedShader {\n const re = /#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g;\n\n const vertexAttributes = vertexSource.match(/in ([\\w]+) ([\\w]+)/g);\n const fragmentUniforms = fragmentSource.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g);\n const vertexUniforms = vertexSource.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g);\n const shaderUniforms = vertexUniforms ? vertexUniforms.concat(fragmentUniforms) : fragmentUniforms;\n\n const fragmentPragmas = {};\n\n fragmentSource = fragmentSource.replace(re, (match, operation, precision, type, name) => {\n fragmentPragmas[name] = true;\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nin ${precision} ${type} ${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n return `\n#ifdef HAS_UNIFORM_u_${name}\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n });\n\n vertexSource = vertexSource.replace(re, (match, operation, precision, type, name) => {\n const attrType = type === 'float' ? 'vec2' : 'vec4';\n const unpackType = name.match(/color/) ? 'color' : attrType;\n\n if (fragmentPragmas[name]) {\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nuniform lowp float u_${name}_t;\nin ${precision} ${attrType} a_${name};\nout ${precision} ${type} ${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n if (unpackType === 'vec4') {\n // vec4 attributes are only used for cross-faded properties, and are not packed\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${name} = a_${name};\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n } else {\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${name} = unpack_mix_${unpackType}(a_${name}, u_${name}_t);\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n }\n } else {\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nuniform lowp float u_${name}_t;\nin ${precision} ${attrType} a_${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n if (unpackType === 'vec4') {\n // vec4 attributes are only used for cross-faded properties, and are not packed\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${precision} ${type} ${name} = a_${name};\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n } else /* */ {\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${precision} ${type} ${name} = unpack_mix_${unpackType}(a_${name}, u_${name}_t);\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n }\n }\n });\n\n return {fragmentSource, vertexSource, staticAttributes: vertexAttributes, staticUniforms: shaderUniforms};\n}\n\n/** Transpile WebGL2 vertex shader source to WebGL1 */\nexport function transpileVertexShaderToWebGL1(source: string): string {\n return source\n .replace(/\\bin\\s/g, 'attribute ')\n .replace(/\\bout\\s/g, 'varying ')\n .replace(/texture\\(/g, 'texture2D(');\n}\n\n/** Transpile WebGL2 fragment shader source to WebGL1 */\nexport function transpileFragmentShaderToWebGL1(source: string): string {\n return source\n .replace(/\\bin\\s/g, 'varying ')\n .replace('out highp vec4 fragColor;', '')\n .replace(/fragColor/g, 'gl_FragColor')\n .replace(/texture\\(/g, 'texture2D(');\n}\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision highp float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c\\n);}\\n#ifdef TERRAIN3D\\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\\n#endif\\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\\n#ifdef TERRAIN3D\\nhighp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\\n#else\\nreturn 1.0;\\n#endif\\n}float calculate_visibility(vec4 pos) {\\n#ifdef TERRAIN3D\\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\\n#else\\nreturn 1.0;\\n#endif\\n}float ele(vec2 pos) {\\n#ifdef TERRAIN3D\\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\\n#else\\nreturn 0.0;\\n#endif\\n}float get_elevation(vec2 pos) {\\n#ifdef TERRAIN3D\\n#ifdef GLOBE\\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\\n#endif\\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\\n#else\\nreturn 0.0;\\n#endif\\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#define GLOBE_RADIUS 6371008.8\\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); \\nif (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len\\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec3 v_data;in float v_visibility;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main(void) {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\\n#ifdef GLOBE\\nvec3 center_vector=projectToSphere(circle_center);\\n#endif\\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\\n#ifdef GLOBE\\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\\n#else\\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\\n#endif\\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\\n#ifdef GLOBE\\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\\n#else\\ngl_Position=projectTileWithElevation(corner_position,ele);\\n#endif\\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform highp float u_intensity;in vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main() {\\n#pragma mapbox: initialize highp float weight\\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#pragma mapbox: define mediump float radius\\nconst highp float ZERO=1.0/255.0/16.0;\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main(void) {\\n#pragma mapbox: initialize highp float weight\\n#pragma mapbox: initialize mediump float radius\\nvec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);\\n#ifdef GLOBE\\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\\n#else\\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(0.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;void main() {\\n#ifdef GLOBE\\ngl_Position=projectTileFor3D(a_pos,0.0);\\n#else\\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\nfragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_fill_translate;in vec2 a_pos;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 v_pos;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec4 v_color;void main() {fragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;\\n#ifdef TERRAIN3D\\nin vec2 a_centroid;\\n#endif\\nout vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;\\n#ifdef TERRAIN3D\\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\\n#else\\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\\n#endif\\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\\n#ifdef GLOBE\\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\\n#else\\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\\n#endif\\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\\n#ifdef GLOBE\\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\\n#endif\\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;\\n#ifdef TERRAIN3D\\nin vec2 a_centroid;\\n#endif\\n#ifdef GLOBE\\nout vec3 v_sphere_pos;\\n#endif\\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\\n#ifdef TERRAIN3D\\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\\n#else\\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\\n#endif\\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\\n#ifdef GLOBE\\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\\n#else\\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\\n#endif\\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\\n#define PI 3.141592653589793\\n#define STANDARD 0\\n#define COMBINED 1\\n#define IGOR 2\\n#define MULTIDIRECTIONAL 3\\n#define BASIC 4\\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '\\n#define scale 0.015873016\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_width2=vec2(outset,inset);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '\\n#define scale 0.015873016\\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_width2=vec2(outset,inset);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;\\n#ifdef GLOBE\\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\\n#endif\\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default '#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}';\n","// This file is generated. Edit build/generate-shaders.ts, then run `npm run codegen`.\nexport default 'in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}';\n","import {type SegmentVector} from '../data/segment';\nimport {type VertexBuffer} from '../gl/vertex_buffer';\nimport {type IndexBuffer} from '../gl/index_buffer';\n\nexport class Mesh {\n vertexBuffer: VertexBuffer;\n indexBuffer: IndexBuffer;\n segments: SegmentVector;\n\n constructor(vertexBuffer: VertexBuffer, indexBuffer: IndexBuffer, segments: SegmentVector) {\n this.vertexBuffer = vertexBuffer;\n this.indexBuffer = indexBuffer;\n this.segments = segments;\n }\n\n destroy(): void {\n this.vertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.segments.destroy();\n\n this.vertexBuffer = null;\n this.indexBuffer = null;\n this.segments = null;\n }\n}\n","import {createLayout} from '../util/struct_array';\n\nexport default createLayout([\n {name: 'a_pos', type: 'Int16', components: 2}\n]);\n","import type {Projection, ProjectionGPUContext, TileMeshUsage} from './projection';\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport {EXTENT} from '../../data/extent';\nimport {type PreparedShader, shaders} from '../../shaders/shaders';\nimport type {Context} from '../../gl/context';\nimport {Mesh} from '../../render/mesh';\nimport {PosArray, TriangleIndexArray} from '../../data/array_types.g';\nimport {SegmentVector} from '../../data/segment';\nimport posAttributes from '../../data/pos_attributes';\nimport {SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\n\nexport const MercatorShaderDefine = '#define PROJECTION_MERCATOR';\nexport const MercatorShaderVariantKey = 'mercator';\n\nexport class MercatorProjection implements Projection {\n private _cachedMesh: Mesh = null;\n\n get name(): 'mercator' {\n return 'mercator';\n }\n\n get useSubdivision(): boolean {\n // Mercator never uses subdivision.\n return false;\n }\n\n get shaderVariantName(): string {\n return MercatorShaderVariantKey;\n }\n\n get shaderDefine(): string {\n return MercatorShaderDefine;\n }\n\n get shaderPreludeCode(): PreparedShader {\n return shaders.projectionMercator;\n }\n\n get vertexShaderPreludeCode(): string {\n return shaders.projectionMercator.vertexSource;\n }\n\n get subdivisionGranularity(): SubdivisionGranularitySetting {\n return SubdivisionGranularitySetting.noSubdivision;\n }\n\n get useGlobeControls(): boolean {\n return false;\n }\n\n get transitionState(): number {\n return 0;\n }\n\n get latitudeErrorCorrectionRadians(): number {\n return 0;\n }\n\n public destroy(): void {\n // Do nothing.\n }\n\n public updateGPUdependent(_: ProjectionGPUContext): void {\n // Do nothing.\n }\n\n public getMeshFromTileID(context: Context, _tileID: CanonicalTileID, _hasBorder: boolean, _allowPoles: boolean, _usage: TileMeshUsage): Mesh {\n if (this._cachedMesh) {\n return this._cachedMesh;\n }\n\n // The parameters tileID, hasBorder and allowPoles are all ignored on purpose for mercator meshes.\n\n const tileExtentArray = new PosArray();\n tileExtentArray.emplaceBack(0, 0);\n tileExtentArray.emplaceBack(EXTENT, 0);\n tileExtentArray.emplaceBack(0, EXTENT);\n tileExtentArray.emplaceBack(EXTENT, EXTENT);\n const tileExtentBuffer = context.createVertexBuffer(tileExtentArray, posAttributes.members);\n const tileExtentSegments = SegmentVector.simpleSegment(0, 0, 4, 2);\n\n const quadTriangleIndices = new TriangleIndexArray();\n quadTriangleIndices.emplaceBack(1, 0, 2);\n quadTriangleIndices.emplaceBack(1, 2, 3);\n const quadTriangleIndexBuffer = context.createIndexBuffer(quadTriangleIndices);\n\n this._cachedMesh = new Mesh(tileExtentBuffer, quadTriangleIndexBuffer, tileExtentSegments);\n return this._cachedMesh;\n }\n\n public recalculate(): void {\n // Do nothing.\n }\n\n public hasTransition(): boolean {\n return false;\n }\n\n setErrorQueryLatitudeDegrees(_value: number) {\n // Do nothing.\n }\n}\n","import {interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport Point from '@mapbox/point-geometry';\nimport {clamp, type Complete, type RequireAtLeastOne} from '../util/util';\n\n/**\n * An `EdgeInset` object represents screen space padding applied to the edges of the viewport.\n * This shifts the apparent center or the vanishing point of the map. This is useful for adding floating UI elements\n * on top of the map and having the vanishing point shift as UI elements resize.\n *\n * @group Geography and Geometry\n */\nexport class EdgeInsets {\n /**\n * @defaultValue 0\n */\n top: number;\n /**\n * @defaultValue 0\n */\n bottom: number;\n /**\n * @defaultValue 0\n */\n left: number;\n /**\n * @defaultValue 0\n */\n right: number;\n\n constructor(top: number = 0, bottom: number = 0, left: number = 0, right: number = 0) {\n if (isNaN(top) || top < 0 ||\n isNaN(bottom) || bottom < 0 ||\n isNaN(left) || left < 0 ||\n isNaN(right) || right < 0\n ) {\n throw new Error('Invalid value for edge-insets, top, bottom, left and right must all be numbers');\n }\n\n this.top = top;\n this.bottom = bottom;\n this.left = left;\n this.right = right;\n }\n\n /**\n * Interpolates the inset in-place.\n * This maintains the current inset value for any inset not present in `target`.\n * @param start - interpolation start\n * @param target - interpolation target\n * @param t - interpolation step/weight\n * @returns the insets\n */\n interpolate(start: PaddingOptions | EdgeInsets, target: PaddingOptions, t: number): EdgeInsets {\n if (target.top != null && start.top != null) this.top = interpolates.number(start.top, target.top, t);\n if (target.bottom != null && start.bottom != null) this.bottom = interpolates.number(start.bottom, target.bottom, t);\n if (target.left != null && start.left != null) this.left = interpolates.number(start.left, target.left, t);\n if (target.right != null && start.right != null) this.right = interpolates.number(start.right, target.right, t);\n\n return this;\n }\n\n /**\n * Utility method that computes the new apprent center or vanishing point after applying insets.\n * This is in pixels and with the top left being (0.0) and +y being downwards.\n *\n * @param width - the width\n * @param height - the height\n * @returns the point\n */\n getCenter(width: number, height: number): Point {\n // Clamp insets so they never overflow width/height and always calculate a valid center\n const x = clamp((this.left + width - this.right) / 2, 0, width);\n const y = clamp((this.top + height - this.bottom) / 2, 0, height);\n\n return new Point(x, y);\n }\n\n equals(other: PaddingOptions): boolean {\n return this.top === other.top &&\n this.bottom === other.bottom &&\n this.left === other.left &&\n this.right === other.right;\n }\n\n clone(): EdgeInsets {\n return new EdgeInsets(this.top, this.bottom, this.left, this.right);\n }\n\n /**\n * Returns the current state as json, useful when you want to have a\n * read-only representation of the inset.\n *\n * @returns state as json\n */\n toJSON(): Complete {\n return {\n top: this.top,\n bottom: this.bottom,\n left: this.left,\n right: this.right\n };\n }\n}\n\n/**\n * Options for setting padding on calls to methods such as {@link Map.fitBounds}, {@link Map.fitScreenCoordinates}, and {@link Map.setPadding}. Adjust these options to set the amount of padding in pixels added to the edges of the canvas. Set a uniform padding on all edges or individual values for each edge. All properties of this object must be\n * non-negative integers.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let bbox = [[-79, 43], [-73, 45]];\n * map.fitBounds(bbox, {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * ```\n *\n * @example\n * ```ts\n * let bbox = [[-79, 43], [-73, 45]];\n * map.fitBounds(bbox, {\n * padding: 20\n * });\n * ```\n * @see [Fit to the bounds of a LineString](https://maplibre.org/maplibre-gl-js/docs/examples/zoomto-linestring/)\n * @see [Fit a map to a bounding box](https://maplibre.org/maplibre-gl-js/docs/examples/fitbounds/)\n */\nexport type PaddingOptions = RequireAtLeastOne<{\n /**\n * Padding in pixels from the top of the map canvas.\n */\n top: number;\n /**\n * Padding in pixels from the bottom of the map canvas.\n */\n bottom: number;\n /**\n * Padding in pixels from the left of the map canvas.\n */\n right: number;\n /**\n * Padding in pixels from the right of the map canvas.\n */\n left: number;\n}>;\n","import {LngLat, type LngLatLike} from './lng_lat';\nimport {LngLatBounds} from './lng_lat_bounds';\nimport Point from '@mapbox/point-geometry';\nimport {wrap, clamp, degreesToRadians, radiansToDegrees, zoomScale, MAX_VALID_LATITUDE, scaleZoom} from '../util/util';\nimport {mat4, mat2} from 'gl-matrix';\nimport {EdgeInsets} from './edge_insets';\nimport {altitudeFromMercatorZ, MercatorCoordinate, mercatorZfromAltitude} from './mercator_coordinate';\nimport {cameraMercatorCoordinateFromCenterAndRotation, cameraDirectionFromPitchBearing} from './projection/mercator_utils';\nimport {EXTENT} from '../data/extent';\n\nimport type {PaddingOptions} from './edge_insets';\nimport type {IReadonlyTransform, ITransformGetters, TransformConstrainFunction} from './transform_interface';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport {Bounds} from './bounds';\n/**\n * If a path crossing the antimeridian would be shorter, extend the final coordinate so that\n * interpolating between the two endpoints will cross it.\n * @param center - The LngLat object of the desired center. This object will be mutated.\n */\nexport function normalizeCenter(tr: IReadonlyTransform, center: LngLat): void {\n if (!tr.renderWorldCopies || tr.lngRange) return;\n const delta = center.lng - tr.center.lng;\n center.lng +=\n delta > 180 ? -360 :\n delta < -180 ? 360 : 0;\n}\n\nexport type UnwrappedTileIDType = {\n /**\n * Tile wrap: 0 for the \"main\" world,\n * negative values for worlds left of the main,\n * positive values for worlds right of the main.\n */\n wrap?: number;\n canonical: {\n /**\n * Tile X coordinate, in range 0..(z^2)-1\n */\n x: number;\n /**\n * Tile Y coordinate, in range 0..(z^2)-1\n */\n y: number;\n /**\n * Tile zoom level.\n */\n z: number;\n };\n};\n\nexport type TransformHelperCallbacks = {\n /**\n * The transform's default getter of center lngLat and zoom to ensure that\n * 1) everything beyond the bounds is excluded\n * 2) a given lngLat is as near the center as possible\n * Bounds are those set by maxBounds or North & South \"Poles\" and, if only 1 globe is displayed, antimeridian.\n */\n defaultConstrain: TransformConstrainFunction;\n\n /**\n * Updates the underlying transform's internal matrices.\n */\n calcMatrices: () => void;\n};\n\nexport type TransformOptions = {\n /**\n * The minimum zoom level of the map.\n */\n minZoom?: number;\n /**\n * The maximum zoom level of the map.\n */\n maxZoom?: number;\n /**\n * The minimum pitch of the map.\n */\n minPitch?: number;\n /**\n * The maximum pitch of the map.\n */\n maxPitch?: number;\n /**\n * Whether to render multiple copies of the world side by side in the map.\n */\n renderWorldCopies?: boolean;\n /**\n * An override of the transform's default constraining function for respecting its longitude and latitude bounds.\n */\n constrainOverride?: TransformConstrainFunction | null;\n};\n\nfunction getTileZoom(zoom: number): number {\n return Math.max(0, Math.floor(zoom));\n}\n\n/**\n * @internal\n * This class stores all values that define a transform's state,\n * such as center, zoom, minZoom, etc.\n * This can be used as a helper for implementing the ITransform interface.\n */\nexport class TransformHelper implements ITransformGetters {\n private _callbacks: TransformHelperCallbacks;\n\n _tileSize: number; // constant\n _tileZoom: number; // integer zoom level for tiles\n _lngRange: [number, number];\n _latRange: [number, number];\n _scale: number; // computed based on zoom\n _width: number;\n _height: number;\n /**\n * Vertical field of view in radians.\n */\n _fovInRadians: number;\n /**\n * This transform's bearing in radians.\n */\n _bearingInRadians: number;\n /**\n * Pitch in radians.\n */\n _pitchInRadians: number;\n /**\n * Roll in radians.\n */\n _rollInRadians: number;\n _zoom: number;\n _renderWorldCopies: boolean;\n _minZoom: number;\n _maxZoom: number;\n _minPitch: number;\n _maxPitch: number;\n _center: LngLat;\n _elevation: number;\n _minElevationForCurrentTile: number;\n _pixelPerMeter: number;\n _edgeInsets: EdgeInsets;\n _unmodified: boolean;\n\n _constraining: boolean;\n _rotationMatrix: mat2;\n _pixelsToGLUnits: [number, number];\n _pixelsToClipSpaceMatrix: mat4;\n _clipSpaceToPixelsMatrix: mat4;\n _cameraToCenterDistance: number;\n\n _nearZ: number;\n _farZ: number;\n _autoCalculateNearFarZ: boolean;\n\n _constrainOverride: TransformConstrainFunction;\n\n constructor(callbacks: TransformHelperCallbacks, options?: TransformOptions) {\n this._callbacks = callbacks;\n this._tileSize = 512; // constant\n\n this._renderWorldCopies = options?.renderWorldCopies === undefined ? true : !!options?.renderWorldCopies;\n this._minZoom = options?.minZoom || 0;\n this._maxZoom = options?.maxZoom || 22;\n\n this._minPitch = (options?.minPitch === undefined || options?.minPitch === null) ? 0 : options?.minPitch;\n this._maxPitch = (options?.maxPitch === undefined || options?.maxPitch === null) ? 60 : options?.maxPitch;\n\n this._constrainOverride = options?.constrainOverride ?? null;\n\n this.setMaxBounds();\n\n this._width = 0;\n this._height = 0;\n this._center = new LngLat(0, 0);\n this._elevation = 0;\n this._zoom = 0;\n this._tileZoom = getTileZoom(this._zoom);\n this._scale = zoomScale(this._zoom);\n this._bearingInRadians = 0;\n this._fovInRadians = 0.6435011087932844;\n this._pitchInRadians = 0;\n this._rollInRadians = 0;\n this._unmodified = true;\n this._edgeInsets = new EdgeInsets();\n this._minElevationForCurrentTile = 0;\n this._autoCalculateNearFarZ = true;\n }\n\n public apply(thatI: ITransformGetters, constrain?: boolean, forceOverrideZ?: boolean): void {\n this._constrainOverride = thatI.constrainOverride;\n this._latRange = thatI.latRange;\n this._lngRange = thatI.lngRange;\n this._width = thatI.width;\n this._height = thatI.height;\n this._center = thatI.center;\n this._elevation = thatI.elevation;\n this._minElevationForCurrentTile = thatI.minElevationForCurrentTile;\n this._zoom = thatI.zoom;\n this._tileZoom = getTileZoom(this._zoom);\n this._scale = zoomScale(this._zoom);\n this._bearingInRadians = thatI.bearingInRadians;\n this._fovInRadians = thatI.fovInRadians;\n this._pitchInRadians = thatI.pitchInRadians;\n this._rollInRadians = thatI.rollInRadians;\n this._unmodified = thatI.unmodified;\n this._edgeInsets = new EdgeInsets(thatI.padding.top, thatI.padding.bottom, thatI.padding.left, thatI.padding.right);\n this._minZoom = thatI.minZoom;\n this._maxZoom = thatI.maxZoom;\n this._minPitch = thatI.minPitch;\n this._maxPitch = thatI.maxPitch;\n this._renderWorldCopies = thatI.renderWorldCopies;\n this._cameraToCenterDistance = thatI.cameraToCenterDistance;\n this._nearZ = thatI.nearZ;\n this._farZ = thatI.farZ;\n this._autoCalculateNearFarZ = !forceOverrideZ && thatI.autoCalculateNearFarZ;\n if (constrain) {\n this.constrainInternal();\n }\n this._calcMatrices();\n }\n\n get pixelsToClipSpaceMatrix(): mat4 { return this._pixelsToClipSpaceMatrix; }\n get clipSpaceToPixelsMatrix(): mat4 { return this._clipSpaceToPixelsMatrix; }\n\n get minElevationForCurrentTile(): number { return this._minElevationForCurrentTile; }\n setMinElevationForCurrentTile(ele: number) {\n this._minElevationForCurrentTile = ele;\n }\n\n get tileSize(): number { return this._tileSize; }\n get tileZoom(): number { return this._tileZoom; }\n get scale(): number { return this._scale; }\n\n /**\n * Gets the transform's width in pixels. Use {@link resize} to set the transform's size.\n */\n get width(): number { return this._width; }\n\n /**\n * Gets the transform's height in pixels. Use {@link resize} to set the transform's size.\n */\n get height(): number { return this._height; }\n\n /**\n * Gets the transform's bearing in radians.\n */\n get bearingInRadians(): number { return this._bearingInRadians; }\n\n get lngRange(): [number, number] { return this._lngRange; }\n get latRange(): [number, number] { return this._latRange; }\n\n get pixelsToGLUnits(): [number, number] { return this._pixelsToGLUnits; }\n\n get minZoom(): number { return this._minZoom; }\n setMinZoom(zoom: number) {\n if (this._minZoom === zoom) return;\n this._minZoom = zoom;\n this.setZoom(this.applyConstrain(this._center, this.zoom).zoom);\n }\n\n get maxZoom(): number { return this._maxZoom; }\n setMaxZoom(zoom: number) {\n if (this._maxZoom === zoom) return;\n this._maxZoom = zoom;\n this.setZoom(this.applyConstrain(this._center, this.zoom).zoom);\n }\n\n get minPitch(): number { return this._minPitch; }\n setMinPitch(pitch: number) {\n if (this._minPitch === pitch) return;\n this._minPitch = pitch;\n this.setPitch(Math.max(this.pitch, pitch));\n }\n\n get maxPitch(): number { return this._maxPitch; }\n setMaxPitch(pitch: number) {\n if (this._maxPitch === pitch) return;\n this._maxPitch = pitch;\n this.setPitch(Math.min(this.pitch, pitch));\n }\n\n get renderWorldCopies(): boolean { return this._renderWorldCopies; }\n setRenderWorldCopies(renderWorldCopies: boolean) {\n if (renderWorldCopies === undefined) {\n renderWorldCopies = true;\n } else if (renderWorldCopies === null) {\n renderWorldCopies = false;\n }\n\n this._renderWorldCopies = renderWorldCopies;\n }\n\n get constrainOverride(): TransformConstrainFunction { return this._constrainOverride; }\n setConstrainOverride(constrain?: TransformConstrainFunction | null) {\n if (constrain === undefined) constrain = null;\n if (this._constrainOverride === constrain) return;\n this._constrainOverride = constrain;\n this.constrainInternal();\n this._calcMatrices();\n }\n\n get worldSize(): number {\n return this._tileSize * this._scale;\n }\n\n get centerOffset(): Point {\n return this.centerPoint._sub(this.size._div(2));\n }\n\n /**\n * Gets the transform's dimensions packed into a Point object.\n */\n get size(): Point {\n return new Point(this._width, this._height);\n }\n\n get bearing(): number {\n return this._bearingInRadians / Math.PI * 180;\n }\n setBearing(bearing: number) {\n const b = wrap(bearing, -180, 180) * Math.PI / 180;\n if (this._bearingInRadians === b) return;\n this._unmodified = false;\n this._bearingInRadians = b;\n this._calcMatrices();\n\n // 2x2 matrix for rotating points\n this._rotationMatrix = mat2.create();\n mat2.rotate(this._rotationMatrix, this._rotationMatrix, -this._bearingInRadians);\n }\n\n get rotationMatrix(): mat2 { return this._rotationMatrix; }\n\n get pitchInRadians(): number {\n return this._pitchInRadians;\n }\n get pitch(): number {\n return this._pitchInRadians / Math.PI * 180;\n }\n setPitch(pitch: number) {\n const p = clamp(pitch, this.minPitch, this.maxPitch) / 180 * Math.PI;\n if (this._pitchInRadians === p) return;\n this._unmodified = false;\n this._pitchInRadians = p;\n this._calcMatrices();\n }\n\n get rollInRadians(): number {\n return this._rollInRadians;\n }\n get roll(): number {\n return this._rollInRadians / Math.PI * 180;\n }\n setRoll(roll: number) {\n const r = roll / 180 * Math.PI;\n if (this._rollInRadians === r) return;\n this._unmodified = false;\n this._rollInRadians = r;\n this._calcMatrices();\n }\n\n get fovInRadians(): number {\n return this._fovInRadians;\n }\n get fov(): number {\n return radiansToDegrees(this._fovInRadians);\n }\n setFov(fov: number) {\n fov = clamp(fov, 0.1, 150);\n if (this.fov === fov) return;\n this._unmodified = false;\n this._fovInRadians = degreesToRadians(fov);\n this._calcMatrices();\n }\n\n get zoom(): number { return this._zoom; }\n setZoom(zoom: number) {\n const constrainedZoom = this.applyConstrain(this._center, zoom).zoom;\n if (this._zoom === constrainedZoom) return;\n this._unmodified = false;\n this._zoom = constrainedZoom;\n this._tileZoom = Math.max(0, Math.floor(constrainedZoom));\n this._scale = zoomScale(constrainedZoom);\n this.constrainInternal();\n this._calcMatrices();\n }\n\n get center(): LngLat { return this._center; }\n setCenter(center: LngLat) {\n if (center.lat === this._center.lat && center.lng === this._center.lng) return;\n this._unmodified = false;\n this._center = center;\n this.constrainInternal();\n this._calcMatrices();\n }\n\n /**\n * Elevation at current center point, meters above sea level\n */\n get elevation(): number { return this._elevation; }\n setElevation(elevation: number) {\n if (elevation === this._elevation) return;\n this._elevation = elevation;\n this.constrainInternal();\n this._calcMatrices();\n }\n\n get padding(): PaddingOptions { return this._edgeInsets.toJSON(); }\n setPadding(padding: PaddingOptions) {\n if (this._edgeInsets.equals(padding)) return;\n this._unmodified = false;\n // Update edge-insets in-place\n this._edgeInsets.interpolate(this._edgeInsets, padding, 1);\n this._calcMatrices();\n }\n\n /**\n * The center of the screen in pixels with the top-left corner being (0,0)\n * and +y axis pointing downwards. This accounts for padding.\n */\n get centerPoint(): Point {\n return this._edgeInsets.getCenter(this._width, this._height);\n }\n\n /**\n * @internal\n */\n get pixelsPerMeter(): number { return this._pixelPerMeter; }\n\n get unmodified(): boolean { return this._unmodified; }\n\n get cameraToCenterDistance(): number { return this._cameraToCenterDistance; }\n\n get nearZ(): number { return this._nearZ; }\n get farZ(): number { return this._farZ; }\n get autoCalculateNearFarZ(): boolean { return this._autoCalculateNearFarZ; }\n overrideNearFarZ(nearZ: number, farZ: number): void {\n this._autoCalculateNearFarZ = false;\n this._nearZ = nearZ;\n this._farZ = farZ;\n this._calcMatrices();\n }\n clearNearFarZOverride(): void {\n this._autoCalculateNearFarZ = true;\n this._calcMatrices();\n }\n\n /**\n * Returns if the padding params match\n *\n * @param padding - the padding to check against\n * @returns true if they are equal, false otherwise\n */\n isPaddingEqual(padding: PaddingOptions): boolean {\n return this._edgeInsets.equals(padding);\n }\n\n /**\n * Helper method to update edge-insets in place\n *\n * @param start - the starting padding\n * @param target - the target padding\n * @param t - the step/weight\n */\n interpolatePadding(start: PaddingOptions, target: PaddingOptions, t: number): void {\n this._unmodified = false;\n this._edgeInsets.interpolate(start, target, t);\n this.constrainInternal();\n this._calcMatrices();\n }\n\n resize(width: number, height: number, constrain: boolean = true): void {\n this._width = width;\n this._height = height;\n if (constrain) this.constrainInternal();\n this._calcMatrices();\n }\n\n /**\n * Returns the maximum geographical bounds the map is constrained to, or `null` if none set.\n * @returns max bounds\n */\n getMaxBounds(): LngLatBounds | null {\n if (!this._latRange || this._latRange.length !== 2 ||\n !this._lngRange || this._lngRange.length !== 2) return null;\n\n return new LngLatBounds([this._lngRange[0], this._latRange[0]], [this._lngRange[1], this._latRange[1]]);\n }\n\n /**\n * Sets or clears the map's geographical constraints.\n * @param bounds - A {@link LngLatBounds} object describing the new geographic boundaries of the map.\n */\n setMaxBounds(bounds?: LngLatBounds | null): void {\n if (bounds) {\n this._lngRange = [bounds.getWest(), bounds.getEast()];\n this._latRange = [bounds.getSouth(), bounds.getNorth()];\n this.constrainInternal();\n } else {\n this._lngRange = null;\n this._latRange = [-MAX_VALID_LATITUDE, MAX_VALID_LATITUDE];\n }\n }\n\n /**\n * When the map is pitched, some of the 3D features that intersect a query will not intersect\n * the query at the surface of the earth. Instead the feature may be closer and only intersect\n * the query because it extrudes into the air.\n * @param queryGeometry - For point queries, the line from the query point to the \"camera point\",\n * for other geometries, the envelope of the query geometry and the \"camera point\"\n * @returns a geometry that includes all of the original query as well as all possible ares of the\n * screen where the *base* of a visible extrusion could be.\n *\n */\n getCameraQueryGeometry(cameraPoint: Point, queryGeometry: Array): Array {\n if (queryGeometry.length === 1) {\n return [queryGeometry[0], cameraPoint];\n } else {\n const {minX, minY, maxX, maxY} = Bounds.fromPoints(queryGeometry).extend(cameraPoint);\n return [\n new Point(minX, minY),\n new Point(maxX, minY),\n new Point(maxX, maxY),\n new Point(minX, maxY),\n new Point(minX, minY)\n ];\n }\n }\n\n applyConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n if (this._constrainOverride !== null) {\n return this._constrainOverride(lngLat, zoom);\n } else {\n return this._callbacks.defaultConstrain(lngLat, zoom);\n }\n };\n\n /**\n * @internal\n * Snaps the transform's center, zoom, etc. into the valid range.\n */\n private constrainInternal(): void {\n if (!this.center || !this._width || !this._height || this._constraining) return;\n this._constraining = true;\n const unmodified = this._unmodified;\n const {center, zoom} = this.applyConstrain(this.center, this.zoom);\n this.setCenter(center);\n this.setZoom(zoom);\n this._unmodified = unmodified;\n this._constraining = false;\n }\n\n /**\n * This function is called every time one of the transform's defining properties (center, pitch, etc.) changes.\n * This function should update the transform's internal data, such as matrices.\n * Any derived `_calcMatrices` function should also call the base function first. The base function only depends on the `_width` and `_height` fields.\n */\n private _calcMatrices(): void {\n if (this._width && this._height) {\n this._pixelsToGLUnits = [2 / this._width, -2 / this._height];\n\n let m = mat4.identity(new Float64Array(16) as any);\n mat4.scale(m, m, [this._width / 2, -this._height / 2, 1]);\n mat4.translate(m, m, [1, -1, 0]);\n this._clipSpaceToPixelsMatrix = m;\n\n m = mat4.identity(new Float64Array(16) as any);\n mat4.scale(m, m, [1, -1, 1]);\n mat4.translate(m, m, [-1, -1, 0]);\n mat4.scale(m, m, [2 / this._width, 2 / this._height, 1]);\n this._pixelsToClipSpaceMatrix = m;\n const halfFov = this.fovInRadians / 2;\n this._cameraToCenterDistance = 0.5 / Math.tan(halfFov) * this._height;\n }\n this._callbacks.calcMatrices();\n }\n\n calculateCenterFromCameraLngLatAlt(lnglat: LngLatLike, alt: number, bearing?: number, pitch?: number): {center: LngLat; elevation: number; zoom: number} {\n const cameraBearing = bearing !== undefined ? bearing : this.bearing;\n const cameraPitch = pitch = pitch !== undefined ? pitch : this.pitch;\n\n const {distanceToCenter, clampedElevation} = this._distanceToCenterFromAltElevationPitch(alt, this.elevation, cameraPitch);\n const {x, y} = cameraDirectionFromPitchBearing(cameraPitch, cameraBearing);\n \n // The mercator transform scale changes with latitude. At high latitudes, there are more \"Merc units\" per meter\n // than at the equator. We treat the center point as our fundamental quantity. This means we want to convert\n // elevation to Mercator Z using the scale factor at the center point (not the camera point). Since the center point is\n // initially unknown, we compute it using the scale factor at the camera point. This gives us a better estimate of the\n // center point scale factor, which we use to recompute the center point. We repeat until the error is very small.\n // This typically takes about 5 iterations.\n const camMercator = MercatorCoordinate.fromLngLat(lnglat, alt);\n let metersPerMercUnit = altitudeFromMercatorZ(1, camMercator.y);\n let centerMercator: MercatorCoordinate;\n let dMercator: number;\n let iter = 0;\n const maxIter = 10;\n do {\n iter += 1;\n if (iter > maxIter) {\n break;\n }\n dMercator = distanceToCenter / metersPerMercUnit;\n const dx = x * dMercator;\n const dy = y * dMercator;\n centerMercator = new MercatorCoordinate(camMercator.x + dx, camMercator.y + dy);\n metersPerMercUnit = 1 / centerMercator.meterInMercatorCoordinateUnits();\n } while (Math.abs(distanceToCenter - dMercator * metersPerMercUnit) > 1.0e-12);\n\n const center = centerMercator.toLngLat();\n const zoom = scaleZoom(this.height / 2 / Math.tan(this.fovInRadians / 2) / dMercator / this.tileSize);\n return {center, elevation: clampedElevation, zoom};\n }\n\n recalculateZoomAndCenter(elevation: number): void {\n if (this.elevation - elevation === 0) return;\n\n // Critical: Stay in pixels and use original center to avoid instability at extreme latitudes when using Mercator-LngLat\n const mercUnitsPerPixel = 1 / this.worldSize;\n const originalMercUnitsPerMeter = mercatorZfromAltitude(1, this.center.lat);\n const originalPixelsPerMeter = originalMercUnitsPerMeter * this.worldSize;\n\n // Determine camera\n const originalCenterMercator = MercatorCoordinate.fromLngLat(this.center, this.elevation);\n const originalCenterPixelX = originalCenterMercator.x / mercUnitsPerPixel;\n const originalCenterPixelY = originalCenterMercator.y / mercUnitsPerPixel;\n const originalCenterPixelZ = originalCenterMercator.z / mercUnitsPerPixel;\n \n const cameraPitch = this.pitch;\n const cameraBearing = this.bearing;\n const {x, y, z} = cameraDirectionFromPitchBearing(cameraPitch, cameraBearing);\n const dCamPixel = this.cameraToCenterDistance;\n const camPixelX = originalCenterPixelX + dCamPixel * -x;\n const camPixelY = originalCenterPixelY + dCamPixel * -y;\n const camPixelZ = originalCenterPixelZ + dCamPixel * z;\n\n // Determine corresponding center\n const {distanceToCenter, clampedElevation} = this._distanceToCenterFromAltElevationPitch(camPixelZ / originalPixelsPerMeter, elevation, cameraPitch);\n const distanceToCenterPixels = distanceToCenter * originalPixelsPerMeter;\n const centerPixelX = camPixelX + x * distanceToCenterPixels;\n const centerPixelY = camPixelY + y * distanceToCenterPixels;\n const center = new MercatorCoordinate(centerPixelX * mercUnitsPerPixel, centerPixelY * mercUnitsPerPixel, 0).toLngLat();\n\n const mercUnitsPerMeter = mercatorZfromAltitude(1, center.lat);\n const zoom = scaleZoom(this.height / 2 / Math.tan(this.fovInRadians / 2) / distanceToCenter / mercUnitsPerMeter / this.tileSize);\n\n // Update matrices\n this._elevation = clampedElevation;\n this._center = center;\n this.setZoom(zoom);\n }\n\n _distanceToCenterFromAltElevationPitch(alt: number, elevation: number, pitch: number): {distanceToCenter: number; clampedElevation: number} {\n const dzNormalized = -Math.cos(degreesToRadians(pitch));\n const altitudeAGL = alt - elevation;\n let distanceToCenter: number;\n let clampedElevation = elevation;\n if (dzNormalized * altitudeAGL >= 0.0 || Math.abs(dzNormalized) < 0.1) {\n distanceToCenter = 10000;\n clampedElevation = alt + distanceToCenter * dzNormalized;\n } else {\n distanceToCenter = -altitudeAGL / dzNormalized;\n }\n return {distanceToCenter, clampedElevation};\n }\n\n getCameraPoint(): Point {\n const pitch = this.pitchInRadians;\n const offset = Math.tan(pitch) * (this.cameraToCenterDistance || 1);\n return this.centerPoint.add(new Point(offset * Math.sin(this.rollInRadians), offset * Math.cos(this.rollInRadians)));\n }\n\n getCameraAltitude(): number {\n const altitude = Math.cos(this.pitchInRadians) * this._cameraToCenterDistance / this._pixelPerMeter;\n return altitude + this.elevation;\n }\n\n getCameraLngLat(): LngLat {\n const pixelPerMeter = mercatorZfromAltitude(1, this.center.lat) * this.worldSize;\n const cameraToCenterDistanceMeters = this.cameraToCenterDistance / pixelPerMeter;\n const camMercator = cameraMercatorCoordinateFromCenterAndRotation(this.center, this.elevation, this.pitch, this.bearing, cameraToCenterDistanceMeters);\n return camMercator.toLngLat();\n }\n\n getMercatorTileCoordinates(overscaledTileID: OverscaledTileID): [number, number, number, number] {\n if (!overscaledTileID) {\n return [0, 0, 1, 1];\n }\n const scale = (overscaledTileID.canonical.z >= 0) ? (1 << overscaledTileID.canonical.z) : Math.pow(2.0, overscaledTileID.canonical.z);\n return [\n overscaledTileID.canonical.x / scale,\n overscaledTileID.canonical.y / scale,\n 1.0 / scale / EXTENT,\n 1.0 / scale / EXTENT\n ];\n }\n}\n","import {vec3, type vec4} from 'gl-matrix';\nimport {type Frustum} from './frustum';\nimport {IntersectionResult, type IBoundingVolume} from './bounding_volume';\n\nexport class Aabb implements IBoundingVolume {\n min: vec3;\n max: vec3;\n center: vec3;\n\n constructor(min_: vec3, max_: vec3) {\n this.min = min_;\n this.max = max_;\n this.center = vec3.scale([] as any, vec3.add([] as any, this.min, this.max), 0.5);\n }\n\n quadrant(index: number): Aabb {\n const split = [(index % 2) === 0, index < 2];\n const qMin = vec3.clone(this.min);\n const qMax = vec3.clone(this.max);\n for (let axis = 0; axis < split.length; axis++) {\n qMin[axis] = split[axis] ? this.min[axis] : this.center[axis];\n qMax[axis] = split[axis] ? this.center[axis] : this.max[axis];\n }\n // Elevation is always constant, hence quadrant.max.z = this.max.z\n qMax[2] = this.max[2];\n return new Aabb(qMin, qMax);\n }\n\n distanceX(point: Array): number {\n const pointOnAabb = Math.max(Math.min(this.max[0], point[0]), this.min[0]);\n return pointOnAabb - point[0];\n }\n\n distanceY(point: Array): number {\n const pointOnAabb = Math.max(Math.min(this.max[1], point[1]), this.min[1]);\n return pointOnAabb - point[1];\n }\n\n /**\n * Performs a frustum-aabb intersection test.\n */\n intersectsFrustum(frustum: Frustum): IntersectionResult {\n // Execute separating axis test between two convex objects to find intersections\n // Each frustum plane together with 3 major axes define the separating axes\n let fullyInside = true;\n\n for (let p = 0; p < frustum.planes.length; p++) {\n const planeIntersection = this.intersectsPlane(frustum.planes[p]);\n\n if (planeIntersection === IntersectionResult.None) {\n return IntersectionResult.None;\n }\n if (planeIntersection === IntersectionResult.Partial) {\n fullyInside = false;\n }\n }\n\n if (fullyInside) {\n return IntersectionResult.Full;\n }\n\n if (frustum.aabb.min[0] > this.max[0] || frustum.aabb.min[1] > this.max[1] || frustum.aabb.min[2] > this.max[2] ||\n frustum.aabb.max[0] < this.min[0] || frustum.aabb.max[1] < this.min[1] || frustum.aabb.max[2] < this.min[2]) {\n return IntersectionResult.None;\n }\n\n return IntersectionResult.Partial;\n }\n\n /**\n * Performs a halfspace-aabb intersection test.\n */\n intersectsPlane(plane: vec4): IntersectionResult {\n let distMin = plane[3];\n let distMax = plane[3];\n for (let i = 0; i < 3; i++) {\n if (plane[i] > 0) {\n distMin += plane[i] * this.min[i];\n distMax += plane[i] * this.max[i];\n } else {\n distMax += plane[i] * this.min[i];\n distMin += plane[i] * this.max[i];\n }\n }\n\n if (distMin >= 0) {\n return IntersectionResult.Full;\n }\n if (distMax < 0) {\n return IntersectionResult.None;\n }\n return IntersectionResult.Partial;\n }\n}\n","import {OverscaledTileID} from '../../tile/tile_id';\nimport {Aabb} from '../../util/primitives/aabb';\nimport {clamp} from '../../util/util';\nimport {type MercatorCoordinate} from '../mercator_coordinate';\nimport {type IReadonlyTransform} from '../transform_interface';\nimport {type CoveringTilesOptionsInternal} from './covering_tiles';\nimport {type CoveringTilesDetailsProvider} from './covering_tiles_details_provider';\n\nexport class MercatorCoveringTilesDetailsProvider implements CoveringTilesDetailsProvider {\n\n distanceToTile2d(pointX: number, pointY: number, _tileID: {x: number; y: number; z: number}, aabb: Aabb): number {\n const distanceX = aabb.distanceX([pointX, pointY]);\n const distanceY = aabb.distanceY([pointX, pointY]);\n return Math.hypot(distanceX, distanceY);\n }\n\n /**\n * Returns the wrap value for a given tile, computed so that tiles will remain loaded when crossing the antimeridian.\n */\n getWrap(centerCoord: MercatorCoordinate, tileID: {x:number; y: number; z: number}, parentWrap: number): number {\n return parentWrap;\n }\n\n /**\n * Returns the AABB of the specified tile.\n * @param tileID - Tile x, y and z for zoom.\n */\n getTileBoundingVolume(tileID: {x: number; y: number; z: number}, wrap: number, elevation: number, options: CoveringTilesOptionsInternal): Aabb {\n let minElevation = 0;\n let maxElevation = 0;\n if (options?.terrain) {\n const overscaledTileID = new OverscaledTileID(tileID.z, wrap, tileID.z, tileID.x, tileID.y);\n const minMax = options.terrain.getMinMaxElevation(overscaledTileID);\n minElevation = minMax.minElevation ?? Math.min(0, elevation);\n maxElevation = minMax.maxElevation ?? Math.max(0, elevation);\n }\n const numTiles = 1 << tileID.z;\n return new Aabb([wrap + tileID.x / numTiles, tileID.y / numTiles, minElevation],\n [wrap + (tileID.x + 1) / numTiles, (tileID.y + 1) / numTiles, maxElevation]);\n }\n \n allowVariableZoom(transform: IReadonlyTransform, options: CoveringTilesOptionsInternal): boolean {\n const zfov = transform.fov * (Math.abs(Math.cos(transform.rollInRadians)) * transform.height + Math.abs(Math.sin(transform.rollInRadians)) * transform.width) / transform.height;\n const maxConstantZoomPitch = clamp(78.5 - zfov / 2, 0.0, 60.0);\n return (!!options.terrain || transform.pitch > maxConstantZoomPitch);\n }\n\n allowWorldCopies(): boolean {\n return true;\n }\n\n prepareNextFrame(): void { \n // Do nothing\n }\n}","import {type mat4, vec3, vec4} from 'gl-matrix';\nimport {Aabb} from './aabb';\nimport {pointPlaneSignedDistance, rayPlaneIntersection} from '../util';\n\nexport class Frustum {\n\n constructor(public points: vec4[], public planes: vec4[], public aabb: Aabb) { }\n\n public static fromInvProjectionMatrix(invProj: mat4, worldSize: number = 1, zoom: number = 0, horizonPlane?: vec4, flippedNearFar?: boolean): Frustum {\n const clipSpaceCorners = [\n [-1, 1, -1, 1],\n [1, 1, -1, 1],\n [1, -1, -1, 1],\n [-1, -1, -1, 1],\n [-1, 1, 1, 1],\n [1, 1, 1, 1],\n [1, -1, 1, 1],\n [-1, -1, 1, 1]\n ];\n\n // Globe and mercator projection matrices have different Y directions, hence we need different sets of indices.\n // This should be fixed in the future.\n const frustumPlanePointIndices = flippedNearFar ? [\n [6, 5, 4], // near\n [0, 1, 2], // far\n [0, 3, 7], // left\n [2, 1, 5], // right\n [3, 2, 6], // bottom\n [0, 4, 5] // top\n ] : [\n [0, 1, 2], // near\n [6, 5, 4], // far\n [0, 3, 7], // left\n [2, 1, 5], // right\n [3, 2, 6], // bottom\n [0, 4, 5] // top\n ];\n\n const scale = Math.pow(2, zoom);\n\n // Transform frustum corner points from clip space to tile space, Z to meters\n const frustumCoords = clipSpaceCorners.map(v => unprojectClipSpacePoint(v, invProj, worldSize, scale));\n\n if (horizonPlane) {\n // A horizon clipping plane was supplied.\n adjustFarPlaneByHorizonPlane(frustumCoords, frustumPlanePointIndices[0], horizonPlane, flippedNearFar);\n }\n\n const frustumPlanes = frustumPlanePointIndices.map((p: number[]) => {\n const a = vec3.sub([] as any, frustumCoords[p[0]] as vec3, frustumCoords[p[1]] as vec3);\n const b = vec3.sub([] as any, frustumCoords[p[2]] as vec3, frustumCoords[p[1]] as vec3);\n const n = vec3.normalize([] as any, vec3.cross([] as any, a, b)) as any;\n const d = -vec3.dot(n, frustumCoords[p[1]] as vec3);\n return n.concat(d);\n });\n\n const min: vec3 = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY];\n const max: vec3 = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY];\n\n for (const p of frustumCoords) {\n for (let i = 0; i < 3; i++) {\n min[i] = Math.min(min[i], p[i]);\n max[i] = Math.max(max[i], p[i]);\n }\n }\n\n return new Frustum(frustumCoords, frustumPlanes, new Aabb(min, max));\n }\n}\n\nfunction unprojectClipSpacePoint(point: vec4 | number[], invProj: mat4, worldSize: number, scale: number): vec4 {\n const v = vec4.transformMat4([] as any, point as any, invProj) as any;\n const s = 1.0 / v[3] / worldSize * scale;\n return vec4.mul(v as any, v as any, [s, s, 1.0 / v[3], s] as vec4);\n}\n\n/**\n * Modifies points in the supplied `frustumCoords` array so that the frustum's far plane only lies as far as the horizon,\n * which improves frustum culling effectiveness.\n * @param frustumCoords - Points of the frustum.\n * @param nearPlanePointsIndices - Which indices in the `frustumCoords` form the near plane.\n * @param horizonPlane - The horizon plane.\n */\nfunction adjustFarPlaneByHorizonPlane(frustumCoords: vec4[], nearPlanePointsIndices: number[], horizonPlane: vec4, flippedNearFar: boolean): void {\n // For each of the 4 edges from near to far plane,\n // we find at which distance these edges intersect the given clipping plane,\n // select the maximal value from these distances and then we move\n // the frustum's far plane so that it is at most as far away from the near plane\n // as this maximal distance.\n\n const nearPlanePointsOffset = flippedNearFar ? 4 : 0;\n const farPlanePointsOffset = flippedNearFar ? 0 : 4;\n\n let maxDist = 0;\n const cornerRayLengths: number[] = [];\n const cornerRayNormalizedDirections: vec3[] = [];\n for (let i = 0; i < 4; i++) {\n const dir = vec3.sub([] as any, frustumCoords[i + farPlanePointsOffset] as vec3, frustumCoords[i + nearPlanePointsOffset] as vec3);\n const len = vec3.length(dir);\n vec3.scale(dir, dir, 1.0 / len); // normalize\n cornerRayLengths.push(len);\n cornerRayNormalizedDirections.push(dir);\n }\n\n for (let i = 0; i < 4; i++) {\n const dist = rayPlaneIntersection(frustumCoords[i + nearPlanePointsOffset] as vec3, cornerRayNormalizedDirections[i], horizonPlane);\n if (dist !== null && dist >= 0) {\n maxDist = Math.max(maxDist, dist);\n } else {\n // Use the original ray length for rays parallel to the horizon plane, or for rays pointing away from it.\n maxDist = Math.max(maxDist, cornerRayLengths[i]);\n }\n }\n\n // Compute the near plane.\n // We use its normal as the \"view vector\" - direction in which the camera is looking.\n const nearPlaneNormalized = getNormalizedNearPlane(frustumCoords, nearPlanePointsIndices);\n\n // We also try to adjust the far plane position so that it exactly intersects the point on the horizon\n // that is most distant from the near plane.\n const idealFarPlaneDistanceFromNearPlane = getIdealNearFarPlaneDistance(horizonPlane, nearPlaneNormalized);\n if (idealFarPlaneDistanceFromNearPlane !== null) {\n const idealCornerRayLength = idealFarPlaneDistanceFromNearPlane / vec3.dot(cornerRayNormalizedDirections[0], nearPlaneNormalized as vec3); // dot(near plane, ray dir) is the same for all 4 corners\n maxDist = Math.min(maxDist, idealCornerRayLength);\n }\n\n for (let i = 0; i < 4; i++) {\n const targetLength = Math.min(maxDist, cornerRayLengths[i]);\n const newPoint = [\n frustumCoords[i + nearPlanePointsOffset][0] + cornerRayNormalizedDirections[i][0] * targetLength,\n frustumCoords[i + nearPlanePointsOffset][1] + cornerRayNormalizedDirections[i][1] * targetLength,\n frustumCoords[i + nearPlanePointsOffset][2] + cornerRayNormalizedDirections[i][2] * targetLength,\n 1,\n ] as vec4;\n frustumCoords[i + farPlanePointsOffset] = newPoint;\n }\n}\n\n/**\n * Returns the near plane equation with unit length direction.\n * @param frustumCoords - Points of the frustum.\n * @param nearPlanePointsIndices - Which indices in the `frustumCoords` form the near plane.\n */\nfunction getNormalizedNearPlane(frustumCoords: vec4[], nearPlanePointsIndices: number[]): vec4 {\n const nearPlaneA = vec3.sub([] as any, frustumCoords[nearPlanePointsIndices[0]] as vec3, frustumCoords[nearPlanePointsIndices[1]] as vec3);\n const nearPlaneB = vec3.sub([] as any, frustumCoords[nearPlanePointsIndices[2]] as vec3, frustumCoords[nearPlanePointsIndices[1]] as vec3);\n const nearPlaneNormalized = [0, 0, 0, 0] as vec4;\n vec3.normalize(nearPlaneNormalized as vec3, vec3.cross([] as any, nearPlaneA, nearPlaneB)) as any;\n nearPlaneNormalized[3] = -vec3.dot(nearPlaneNormalized as vec3, frustumCoords[nearPlanePointsIndices[0]] as vec3);\n return nearPlaneNormalized;\n}\n\n/**\n * Returns the ideal distance between the frustum's near and far plane so that the far plane only lies as far as the horizon.\n */\nfunction getIdealNearFarPlaneDistance(horizonPlane: vec4, nearPlaneNormalized: vec4): number | null {\n // Normalize the horizon plane to unit direction\n const horizonPlaneLen = vec3.len(horizonPlane as vec3);\n const normalizedHorizonPlane = vec4.scale([] as any, horizonPlane, 1 / horizonPlaneLen);\n\n // Project the view vector onto the horizon plane\n const projectedViewDirection = vec3.sub([] as any, nearPlaneNormalized as vec3, vec3.scale([] as any, normalizedHorizonPlane as vec3, vec3.dot(nearPlaneNormalized as vec3, normalizedHorizonPlane as vec3)));\n const projectedViewLength = vec3.len(projectedViewDirection);\n \n // projectedViewLength will be 0 if the camera is looking straight down\n if (projectedViewLength > 0) {\n // Find the radius and center of the horizon circle (the horizon circle is the intersection of the planet's sphere and the horizon plane).\n const horizonCircleRadius = Math.sqrt(1 - normalizedHorizonPlane[3] * normalizedHorizonPlane[3]);\n const horizonCircleCenter = vec3.scale([] as any, normalizedHorizonPlane as vec3, -normalizedHorizonPlane[3]); // The horizon plane normal always points towards the camera.\n // Find the furthest point on the horizon circle from the near plane.\n const pointFurthestOnHorizonCircle = vec3.add([] as any, horizonCircleCenter, vec3.scale([] as any, projectedViewDirection, horizonCircleRadius / projectedViewLength));\n // Compute this point's distance from the near plane.\n return pointPlaneSignedDistance(nearPlaneNormalized, pointFurthestOnHorizonCircle);\n } else {\n return null;\n }\n}\n","import {LngLat, type LngLatLike} from '../lng_lat';\nimport {MercatorCoordinate, mercatorXfromLng, mercatorYfromLat, mercatorZfromAltitude} from '../mercator_coordinate';\nimport Point from '@mapbox/point-geometry';\nimport {wrap, clamp, createIdentityMat4f64, createMat4f64, degreesToRadians, createIdentityMat4f32, zoomScale, scaleZoom} from '../../util/util';\nimport {type mat2, mat4, vec3, vec4} from 'gl-matrix';\nimport {UnwrappedTileID, OverscaledTileID, type CanonicalTileID, calculateTileKey} from '../../tile/tile_id';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport {type PointProjection, xyTransformMat4} from '../../symbol/projection';\nimport {LngLatBounds} from '../lng_lat_bounds';\nimport {getMercatorHorizon, projectToWorldCoordinates, unprojectFromWorldCoordinates, calculateTileMatrix, maxMercatorHorizonAngle, cameraMercatorCoordinateFromCenterAndRotation} from './mercator_utils';\nimport {EXTENT} from '../../data/extent';\nimport {TransformHelper} from '../transform_helper';\nimport {MercatorCoveringTilesDetailsProvider} from './mercator_covering_tiles_details_provider';\nimport {Frustum} from '../../util/primitives/frustum';\n\nimport type {Terrain} from '../../render/terrain';\nimport type {IReadonlyTransform, ITransform, TransformConstrainFunction} from '../transform_interface';\nimport type {TransformOptions} from '../transform_helper';\nimport type {PaddingOptions} from '../edge_insets';\nimport type {ProjectionData, ProjectionDataParams} from './projection_data';\nimport type {CoveringTilesDetailsProvider} from './covering_tiles_details_provider';\n\nexport class MercatorTransform implements ITransform {\n private _helper: TransformHelper;\n\n //\n // Implementation of transform getters and setters\n //\n\n get pixelsToClipSpaceMatrix(): mat4 {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix(): mat4 {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits(): [number, number] {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset(): Point {\n return this._helper.centerOffset;\n }\n get size(): Point {\n return this._helper.size;\n }\n get rotationMatrix(): mat2 {\n return this._helper.rotationMatrix;\n }\n get centerPoint(): Point {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter(): number {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(zoom: number): void {\n this._helper.setMinZoom(zoom);\n }\n setMaxZoom(zoom: number): void {\n this._helper.setMaxZoom(zoom);\n }\n setMinPitch(pitch: number): void {\n this._helper.setMinPitch(pitch);\n }\n setMaxPitch(pitch: number): void {\n this._helper.setMaxPitch(pitch);\n }\n setRenderWorldCopies(renderWorldCopies: boolean): void {\n this._helper.setRenderWorldCopies(renderWorldCopies);\n }\n setBearing(bearing: number): void {\n this._helper.setBearing(bearing);\n }\n setPitch(pitch: number): void {\n this._helper.setPitch(pitch);\n }\n setRoll(roll: number): void {\n this._helper.setRoll(roll);\n }\n setFov(fov: number): void {\n this._helper.setFov(fov);\n }\n setZoom(zoom: number): void {\n this._helper.setZoom(zoom);\n }\n setCenter(center: LngLat): void {\n this._helper.setCenter(center);\n }\n setElevation(elevation: number): void {\n this._helper.setElevation(elevation);\n }\n setMinElevationForCurrentTile(elevation: number): void {\n this._helper.setMinElevationForCurrentTile(elevation);\n }\n setPadding(padding: PaddingOptions): void {\n this._helper.setPadding(padding);\n }\n interpolatePadding(start: PaddingOptions, target: PaddingOptions, t: number): void {\n return this._helper.interpolatePadding(start, target, t);\n }\n isPaddingEqual(padding: PaddingOptions): boolean {\n return this._helper.isPaddingEqual(padding);\n }\n resize(width: number, height: number, constrain: boolean = true): void {\n this._helper.resize(width, height, constrain);\n }\n getMaxBounds(): LngLatBounds {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(bounds?: LngLatBounds): void {\n this._helper.setMaxBounds(bounds);\n }\n setConstrainOverride(constrain?: TransformConstrainFunction | null): void {\n this._helper.setConstrainOverride(constrain);\n }\n overrideNearFarZ(nearZ: number, farZ: number): void {\n this._helper.overrideNearFarZ(nearZ, farZ);\n }\n clearNearFarZOverride(): void {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(queryGeometry: Point[]): Point[] {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), queryGeometry);\n }\n\n get tileSize(): number {\n return this._helper.tileSize;\n }\n get tileZoom(): number {\n return this._helper.tileZoom;\n }\n get scale(): number {\n return this._helper.scale;\n }\n get worldSize(): number {\n return this._helper.worldSize;\n }\n get width(): number {\n return this._helper.width;\n }\n get height(): number {\n return this._helper.height;\n }\n get lngRange(): [number, number] {\n return this._helper.lngRange;\n }\n get latRange(): [number, number] {\n return this._helper.latRange;\n }\n get minZoom(): number {\n return this._helper.minZoom;\n }\n get maxZoom(): number {\n return this._helper.maxZoom;\n }\n get zoom(): number {\n return this._helper.zoom;\n }\n get center(): LngLat {\n return this._helper.center;\n }\n get minPitch(): number {\n return this._helper.minPitch;\n }\n get maxPitch(): number {\n return this._helper.maxPitch;\n }\n get pitch(): number {\n return this._helper.pitch;\n }\n get pitchInRadians(): number {\n return this._helper.pitchInRadians;\n }\n get roll(): number {\n return this._helper.roll;\n }\n get rollInRadians(): number {\n return this._helper.rollInRadians;\n }\n get bearing(): number {\n return this._helper.bearing;\n }\n get bearingInRadians(): number {\n return this._helper.bearingInRadians;\n }\n get fov(): number {\n return this._helper.fov;\n }\n get fovInRadians(): number {\n return this._helper.fovInRadians;\n }\n get elevation(): number {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile(): number {\n return this._helper.minElevationForCurrentTile;\n }\n get padding(): PaddingOptions {\n return this._helper.padding;\n }\n get unmodified(): boolean {\n return this._helper.unmodified;\n }\n get renderWorldCopies(): boolean {\n return this._helper.renderWorldCopies;\n }\n get cameraToCenterDistance(): number { \n return this._helper.cameraToCenterDistance;\n }\n get constrainOverride(): TransformConstrainFunction {\n return this._helper.constrainOverride;\n }\n public get nearZ(): number { \n return this._helper.nearZ; \n }\n public get farZ(): number { \n return this._helper.farZ; \n }\n public get autoCalculateNearFarZ(): boolean { \n return this._helper.autoCalculateNearFarZ; \n }\n setTransitionState(_value: number, _error: number): void {\n // Do nothing\n }\n //\n // Implementation of mercator transform\n //\n\n private _cameraPosition: vec3;\n\n private _mercatorMatrix: mat4;\n private _projectionMatrix: mat4;\n private _viewProjMatrix: mat4;\n private _invViewProjMatrix: mat4;\n private _invProjMatrix: mat4;\n private _alignedProjMatrix: mat4;\n private _pixelMatrix: mat4;\n private _pixelMatrix3D: mat4;\n private _pixelMatrixInverse: mat4;\n private _fogMatrix: mat4;\n\n private _posMatrixCache: Map = new Map();\n private _alignedPosMatrixCache: Map = new Map();\n private _fogMatrixCacheF32: Map = new Map();\n\n private _coveringTilesDetailsProvider;\n\n constructor(options?: TransformOptions) {\n this._helper = new TransformHelper({\n calcMatrices: () => { this._calcMatrices(); },\n defaultConstrain: (center, zoom) => { return this.defaultConstrain(center, zoom); }\n }, options);\n this._coveringTilesDetailsProvider = new MercatorCoveringTilesDetailsProvider();\n }\n\n public clone(): ITransform {\n const clone = new MercatorTransform();\n clone.apply(this);\n return clone;\n }\n\n public apply(that: IReadonlyTransform, constrain?: boolean, forceOverrideZ?: boolean): void {\n this._helper.apply(that, constrain, forceOverrideZ);\n }\n\n public get cameraPosition(): vec3 { return this._cameraPosition; }\n public get projectionMatrix(): mat4 { return this._projectionMatrix; }\n public get modelViewProjectionMatrix(): mat4 { return this._viewProjMatrix; }\n public get inverseProjectionMatrix(): mat4 { return this._invProjMatrix; }\n public get mercatorMatrix(): mat4 { return this._mercatorMatrix; } // Not part of ITransform interface\n\n getVisibleUnwrappedCoordinates(tileID: CanonicalTileID): Array {\n const result = [new UnwrappedTileID(0, tileID)];\n if (this._helper._renderWorldCopies) {\n const utl = this.screenPointToMercatorCoordinate(new Point(0, 0));\n const utr = this.screenPointToMercatorCoordinate(new Point(this._helper._width, 0));\n const ubl = this.screenPointToMercatorCoordinate(new Point(this._helper._width, this._helper._height));\n const ubr = this.screenPointToMercatorCoordinate(new Point(0, this._helper._height));\n const w0 = Math.floor(Math.min(utl.x, utr.x, ubl.x, ubr.x));\n const w1 = Math.floor(Math.max(utl.x, utr.x, ubl.x, ubr.x));\n\n // Add an extra copy of the world on each side to properly render ImageSources and CanvasSources.\n // Both sources draw outside the tile boundaries of the tile that \"contains them\" so we need\n // to add extra copies on both sides in case offscreen tiles need to draw into on-screen ones.\n const extraWorldCopy = 1;\n\n for (let w = w0 - extraWorldCopy; w <= w1 + extraWorldCopy; w++) {\n if (w === 0) continue;\n result.push(new UnwrappedTileID(w, tileID));\n }\n }\n return result;\n }\n\n getCameraFrustum(): Frustum {\n return Frustum.fromInvProjectionMatrix(this._invViewProjMatrix, this.worldSize);\n }\n getClippingPlane(): vec4 | null {\n return null;\n }\n getCoveringTilesDetailsProvider(): CoveringTilesDetailsProvider {\n return this._coveringTilesDetailsProvider;\n }\n\n recalculateZoomAndCenter(terrain?: Terrain): void {\n // find position the camera is looking on\n const center = this.screenPointToLocation(this.centerPoint, terrain);\n const elevation = terrain ? terrain.getElevationForLngLatZoom(center, this._helper._tileZoom) : 0;\n this._helper.recalculateZoomAndCenter(elevation);\n }\n\n setLocationAtPoint(lnglat: LngLat, point: Point) {\n const z = mercatorZfromAltitude(this.elevation, this.center.lat);\n const a = this.screenPointToMercatorCoordinateAtZ(point, z);\n const b = this.screenPointToMercatorCoordinateAtZ(this.centerPoint, z);\n const loc = MercatorCoordinate.fromLngLat(lnglat);\n const newCenter = new MercatorCoordinate(\n loc.x - (a.x - b.x),\n loc.y - (a.y - b.y));\n this.setCenter(newCenter?.toLngLat());\n if (this._helper._renderWorldCopies) {\n this.setCenter(this.center.wrap());\n }\n }\n\n locationToScreenPoint(lnglat: LngLat, terrain?: Terrain): Point {\n return terrain ?\n this.coordinatePoint(MercatorCoordinate.fromLngLat(lnglat), terrain.getElevationForLngLat(lnglat, this), this._pixelMatrix3D) :\n this.coordinatePoint(MercatorCoordinate.fromLngLat(lnglat));\n }\n\n screenPointToLocation(p: Point, terrain?: Terrain): LngLat {\n return this.screenPointToMercatorCoordinate(p, terrain)?.toLngLat();\n }\n\n screenPointToMercatorCoordinate(p: Point, terrain?: Terrain): MercatorCoordinate {\n // get point-coordinate from terrain coordinates framebuffer\n if (terrain) {\n const coordinate = terrain.pointCoordinate(p);\n if (coordinate != null) {\n return coordinate;\n }\n }\n return this.screenPointToMercatorCoordinateAtZ(p);\n }\n\n screenPointToMercatorCoordinateAtZ(p: Point, mercatorZ?: number): MercatorCoordinate {\n\n // calculate point-coordinate on flat earth\n const targetZ = mercatorZ ? mercatorZ : 0;\n // since we don't know the correct projected z value for the point,\n // unproject two points to get a line and then find the point on that\n // line with z=0\n\n const coord0 = [p.x, p.y, 0, 1] as vec4;\n const coord1 = [p.x, p.y, 1, 1] as vec4;\n\n vec4.transformMat4(coord0, coord0, this._pixelMatrixInverse);\n vec4.transformMat4(coord1, coord1, this._pixelMatrixInverse);\n\n const w0 = coord0[3];\n const w1 = coord1[3];\n const x0 = coord0[0] / w0;\n const x1 = coord1[0] / w1;\n const y0 = coord0[1] / w0;\n const y1 = coord1[1] / w1;\n const z0 = coord0[2] / w0;\n const z1 = coord1[2] / w1;\n\n const t = z0 === z1 ? 0 : (targetZ - z0) / (z1 - z0);\n\n return new MercatorCoordinate(\n interpolates.number(x0, x1, t) / this.worldSize,\n interpolates.number(y0, y1, t) / this.worldSize,\n targetZ);\n }\n\n /**\n * Given a coordinate, return the screen point that corresponds to it\n * @param coord - the coordinates\n * @param elevation - the elevation\n * @param pixelMatrix - the pixel matrix\n * @returns screen point\n */\n coordinatePoint(coord: MercatorCoordinate, elevation: number = 0, pixelMatrix: mat4 = this._pixelMatrix): Point {\n const p = [coord.x * this.worldSize, coord.y * this.worldSize, elevation, 1] as vec4;\n vec4.transformMat4(p, p, pixelMatrix);\n return new Point(p[0] / p[3], p[1] / p[3]);\n }\n\n getBounds(): LngLatBounds {\n const top = Math.max(0, this._helper._height / 2 - getMercatorHorizon(this));\n return new LngLatBounds()\n .extend(this.screenPointToLocation(new Point(0, top)))\n .extend(this.screenPointToLocation(new Point(this._helper._width, top)))\n .extend(this.screenPointToLocation(new Point(this._helper._width, this._helper._height)))\n .extend(this.screenPointToLocation(new Point(0, this._helper._height)));\n }\n\n isPointOnMapSurface(p: Point, terrain?: Terrain): boolean {\n if (terrain) {\n const coordinate = terrain.pointCoordinate(p);\n return coordinate != null;\n }\n return (p.y > this.height / 2 - getMercatorHorizon(this));\n }\n\n /**\n * Calculate the posMatrix that, given a tile coordinate, would be used to display the tile on a map.\n * This function is specific to the mercator projection.\n * @param tileID - the tile ID\n * @param aligned - whether to use a pixel-aligned matrix variant, intended for rendering raster tiles\n * @param useFloat32 - when true, returns a float32 matrix instead of float64. Use float32 for matrices that are passed to shaders, use float64 for everything else.\n */\n calculatePosMatrix(tileID: UnwrappedTileID | OverscaledTileID, aligned: boolean = false, useFloat32?: boolean): mat4 {\n const posMatrixKey = tileID.key ?? calculateTileKey(tileID.wrap, tileID.canonical.z, tileID.canonical.z, tileID.canonical.x, tileID.canonical.y);\n const cache = aligned ? this._alignedPosMatrixCache : this._posMatrixCache;\n if (cache.has(posMatrixKey)) {\n const matrices = cache.get(posMatrixKey);\n return useFloat32 ? matrices.f32 : matrices.f64;\n }\n\n const tileMatrix = calculateTileMatrix(tileID, this.worldSize);\n mat4.multiply(tileMatrix, aligned ? this._alignedProjMatrix : this._viewProjMatrix, tileMatrix);\n const matrices = {\n f64: tileMatrix,\n f32: new Float32Array(tileMatrix), // Must have a 32 bit float version for WebGL, otherwise WebGL calls in Chrome get very slow.\n };\n cache.set(posMatrixKey, matrices);\n // Make sure to return the correct precision\n return useFloat32 ? matrices.f32 : matrices.f64;\n }\n\n calculateFogMatrix(unwrappedTileID: UnwrappedTileID): mat4 {\n const posMatrixKey = unwrappedTileID.key;\n const cache = this._fogMatrixCacheF32;\n if (cache.has(posMatrixKey)) {\n return cache.get(posMatrixKey);\n }\n\n const fogMatrix = calculateTileMatrix(unwrappedTileID, this.worldSize);\n mat4.multiply(fogMatrix, this._fogMatrix, fogMatrix);\n\n cache.set(posMatrixKey, new Float32Array(fogMatrix)); // Must be 32 bit floats, otherwise WebGL calls in Chrome get very slow.\n return cache.get(posMatrixKey);\n }\n\n /**\n * This mercator implementation returns center lngLat and zoom to ensure that:\n *\n * 1) everything beyond the bounds is excluded\n * 2) a given lngLat is as near the center as possible\n *\n * Bounds are those set by maxBounds or North & South \"Poles\" and, if only 1 globe is displayed, antimeridian.\n */\n defaultConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n zoom = clamp(+zoom, this.minZoom, this.maxZoom);\n const result = {\n center: new LngLat(lngLat.lng, lngLat.lat),\n zoom\n };\n\n let lngRange = this._helper._lngRange;\n\n if (!this._helper._renderWorldCopies && lngRange === null) {\n const almost180 = 180 - 1e-10;\n lngRange = [-almost180, almost180];\n }\n\n const worldSize = this.tileSize * zoomScale(result.zoom); // A world size for the requested zoom level, not the current world size\n let minY = 0;\n let maxY = worldSize;\n let minX = 0;\n let maxX = worldSize;\n let scaleY = 0;\n let scaleX = 0;\n const {x: screenWidth, y: screenHeight} = this.size;\n\n if (this._helper._latRange) {\n const latRange = this._helper._latRange;\n minY = mercatorYfromLat(latRange[1]) * worldSize;\n maxY = mercatorYfromLat(latRange[0]) * worldSize;\n const shouldZoomIn = maxY - minY < screenHeight;\n if (shouldZoomIn) scaleY = screenHeight / (maxY - minY);\n }\n\n if (lngRange) {\n minX = wrap(\n mercatorXfromLng(lngRange[0]) * worldSize,\n 0,\n worldSize\n );\n maxX = wrap(\n mercatorXfromLng(lngRange[1]) * worldSize,\n 0,\n worldSize\n );\n\n if (maxX < minX) maxX += worldSize;\n\n const shouldZoomIn = maxX - minX < screenWidth;\n if (shouldZoomIn) scaleX = screenWidth / (maxX - minX);\n }\n\n const {x: originalX, y: originalY} = projectToWorldCoordinates(worldSize, lngLat);\n let modifiedX, modifiedY;\n\n const scale = Math.max(scaleX || 0, scaleY || 0);\n\n if (scale) {\n // zoom in to exclude all beyond the given lng/lat ranges\n const newPoint = new Point(\n scaleX ? (maxX + minX) / 2 : originalX,\n scaleY ? (maxY + minY) / 2 : originalY);\n result.center = unprojectFromWorldCoordinates(worldSize, newPoint).wrap();\n result.zoom += scaleZoom(scale);\n return result;\n }\n\n if (this._helper._latRange) {\n const h2 = screenHeight / 2;\n if (originalY - h2 < minY) modifiedY = minY + h2;\n if (originalY + h2 > maxY) modifiedY = maxY - h2;\n }\n\n if (lngRange) {\n const centerX = (minX + maxX) / 2;\n let wrappedX = originalX;\n if (this._helper._renderWorldCopies) {\n wrappedX = wrap(originalX, centerX - worldSize / 2, centerX + worldSize / 2);\n }\n const w2 = screenWidth / 2;\n\n if (wrappedX - w2 < minX) modifiedX = minX + w2;\n if (wrappedX + w2 > maxX) modifiedX = maxX - w2;\n }\n\n // pan the map if the screen goes off the range\n if (modifiedX !== undefined || modifiedY !== undefined) {\n const newPoint = new Point(modifiedX ?? originalX, modifiedY ?? originalY);\n result.center = unprojectFromWorldCoordinates(worldSize, newPoint).wrap();\n }\n\n return result;\n };\n\n applyConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n return this._helper.applyConstrain(lngLat, zoom);\n };\n\n calculateCenterFromCameraLngLatAlt(lnglat: LngLatLike, alt: number, bearing?: number, pitch?: number): {center: LngLat; elevation: number; zoom: number} {\n return this._helper.calculateCenterFromCameraLngLatAlt(lnglat, alt, bearing, pitch);\n }\n\n _calculateNearFarZIfNeeded(cameraToSeaLevelDistance: number, limitedPitchRadians: number, offset: Point): void {\n if (!this._helper.autoCalculateNearFarZ) {\n return;\n }\n // In case of negative minimum elevation (e.g. the dead see, under the sea maps) use a lower plane for calculation\n const minRenderDistanceBelowCameraInMeters = 100;\n const minElevation = Math.min(this.elevation, this.minElevationForCurrentTile, this.getCameraAltitude() - minRenderDistanceBelowCameraInMeters);\n const cameraToLowestPointDistance = cameraToSeaLevelDistance - minElevation * this._helper._pixelPerMeter / Math.cos(limitedPitchRadians);\n const lowestPlane = minElevation < 0 ? cameraToLowestPointDistance : cameraToSeaLevelDistance;\n\n // Find the distance from the center point [width/2 + offset.x, height/2 + offset.y] to the\n // center top point [width/2 + offset.x, 0] in Z units, using the law of sines.\n // 1 Z unit is equivalent to 1 horizontal px at the center of the map\n // (the distance between[width/2, height/2] and [width/2 + 1, height/2])\n const groundAngle = Math.PI / 2 + this.pitchInRadians;\n const zfov = degreesToRadians(this.fov) * (Math.abs(Math.cos(degreesToRadians(this.roll))) * this.height + Math.abs(Math.sin(degreesToRadians(this.roll))) * this.width) / this.height;\n const fovAboveCenter = zfov * (0.5 + offset.y / this.height);\n const topHalfSurfaceDistance = Math.sin(fovAboveCenter) * lowestPlane / Math.sin(clamp(Math.PI - groundAngle - fovAboveCenter, 0.01, Math.PI - 0.01));\n\n // Find the distance from the center point to the horizon\n const horizon = getMercatorHorizon(this);\n const horizonAngle = Math.atan(horizon / this._helper.cameraToCenterDistance);\n const minFovCenterToHorizonRadians = degreesToRadians(90 - maxMercatorHorizonAngle);\n const fovCenterToHorizon = horizonAngle > minFovCenterToHorizonRadians ? 2 * horizonAngle * (0.5 + offset.y / (horizon * 2)) : minFovCenterToHorizonRadians;\n const topHalfSurfaceDistanceHorizon = Math.sin(fovCenterToHorizon) * lowestPlane / Math.sin(clamp(Math.PI - groundAngle - fovCenterToHorizon, 0.01, Math.PI - 0.01));\n\n // Calculate z distance of the farthest fragment that should be rendered.\n // Add a bit extra to avoid precision problems when a fragment's distance is exactly `furthestDistance`\n const topHalfMinDistance = Math.min(topHalfSurfaceDistance, topHalfSurfaceDistanceHorizon);\n\n this._helper._farZ = (Math.cos(Math.PI / 2 - limitedPitchRadians) * topHalfMinDistance + lowestPlane) * 1.01;\n\n // The larger the value of nearZ is\n // - the more depth precision is available for features (good)\n // - clipping starts appearing sooner when the camera is close to 3d features (bad)\n //\n // Other values work for mapbox-gl-js but deck.gl was encountering precision issues\n // when rendering custom layers. This value was experimentally chosen and\n // seems to solve z-fighting issues in deck.gl while not clipping buildings too close to the camera.\n this._helper._nearZ = this._helper._height / 50;\n }\n\n _calcMatrices(): void {\n if (!this._helper._height) return;\n\n const offset = this.centerOffset;\n const point = projectToWorldCoordinates(this.worldSize, this.center);\n const x = point.x, y = point.y;\n this._helper._pixelPerMeter = mercatorZfromAltitude(1, this.center.lat) * this.worldSize;\n\n // Calculate the camera to sea-level distance in pixel in respect of terrain\n const limitedPitchRadians = degreesToRadians(Math.min(this.pitch, maxMercatorHorizonAngle));\n const cameraToSeaLevelDistance = Math.max(this._helper.cameraToCenterDistance / 2, this._helper.cameraToCenterDistance + this._helper._elevation * this._helper._pixelPerMeter / Math.cos(limitedPitchRadians));\n\n this._calculateNearFarZIfNeeded(cameraToSeaLevelDistance, limitedPitchRadians, offset);\n\n // matrix for conversion from location to clip space(-1 .. 1)\n let m: mat4;\n m = new Float64Array(16) as any;\n mat4.perspective(m, this.fovInRadians, this._helper._width / this._helper._height, this._helper._nearZ, this._helper._farZ);\n this._invProjMatrix = new Float64Array(16) as any as mat4;\n mat4.invert(this._invProjMatrix, m);\n\n // Apply center of perspective offset\n m[8] = -offset.x * 2 / this._helper._width;\n m[9] = offset.y * 2 / this._helper._height;\n this._projectionMatrix = mat4.clone(m);\n\n mat4.scale(m, m, [1, -1, 1]);\n mat4.translate(m, m, [0, 0, -this._helper.cameraToCenterDistance]);\n mat4.rotateZ(m, m, -this.rollInRadians);\n mat4.rotateX(m, m, this.pitchInRadians);\n mat4.rotateZ(m, m, -this.bearingInRadians);\n mat4.translate(m, m, [-x, -y, 0]);\n\n // The mercatorMatrix can be used to transform points from mercator coordinates\n // ([0, 0] nw, [1, 1] se) to clip space.\n this._mercatorMatrix = mat4.scale([] as any, m, [this.worldSize, this.worldSize, this.worldSize]);\n\n // scale vertically to meters per pixel (inverse of ground resolution):\n mat4.scale(m, m, [1, 1, this._helper._pixelPerMeter]);\n\n // matrix for conversion from world space to screen coordinates in 2D\n this._pixelMatrix = mat4.multiply(new Float64Array(16) as any, this.clipSpaceToPixelsMatrix, m);\n\n // matrix for conversion from world space to clip space (-1 .. 1)\n mat4.translate(m, m, [0, 0, -this.elevation]); // elevate camera over terrain\n this._viewProjMatrix = m;\n this._invViewProjMatrix = mat4.invert([] as any, m);\n\n const cameraPos: vec4 = [0, 0, -1, 1];\n vec4.transformMat4(cameraPos, cameraPos, this._invViewProjMatrix);\n this._cameraPosition = [\n cameraPos[0] / cameraPos[3],\n cameraPos[1] / cameraPos[3],\n cameraPos[2] / cameraPos[3]\n ];\n\n // create a fog matrix, same es proj-matrix but with near clipping-plane in mapcenter\n // needed to calculate a correct z-value for fog calculation, because projMatrix z value is not\n this._fogMatrix = new Float64Array(16) as any;\n mat4.perspective(this._fogMatrix, this.fovInRadians, this.width / this.height, cameraToSeaLevelDistance, this._helper._farZ);\n this._fogMatrix[8] = -offset.x * 2 / this.width;\n this._fogMatrix[9] = offset.y * 2 / this.height;\n mat4.scale(this._fogMatrix, this._fogMatrix, [1, -1, 1]);\n mat4.translate(this._fogMatrix, this._fogMatrix, [0, 0, -this.cameraToCenterDistance]);\n mat4.rotateZ(this._fogMatrix, this._fogMatrix, -this.rollInRadians);\n mat4.rotateX(this._fogMatrix, this._fogMatrix, this.pitchInRadians);\n mat4.rotateZ(this._fogMatrix, this._fogMatrix, -this.bearingInRadians);\n mat4.translate(this._fogMatrix, this._fogMatrix, [-x, -y, 0]);\n mat4.scale(this._fogMatrix, this._fogMatrix, [1, 1, this._helper._pixelPerMeter]);\n mat4.translate(this._fogMatrix, this._fogMatrix, [0, 0, -this.elevation]); // elevate camera over terrain\n\n // matrix for conversion from world space to screen coordinates in 3D\n this._pixelMatrix3D = mat4.multiply(new Float64Array(16) as any, this.clipSpaceToPixelsMatrix, m);\n\n // Make a second projection matrix that is aligned to a pixel grid for rendering raster tiles.\n // We're rounding the (floating point) x/y values to achieve to avoid rendering raster images to fractional\n // coordinates. Additionally, we adjust by half a pixel in either direction in case that viewport dimension\n // is an odd integer to preserve rendering to the pixel grid. We're rotating this shift based on the angle\n // of the transformation so that 0°, 90°, 180°, and 270° rasters are crisp, and adjust the shift so that\n // it is always <= 0.5 pixels.\n const xShift = (this._helper._width % 2) / 2, yShift = (this._helper._height % 2) / 2,\n angleCos = Math.cos(this.bearingInRadians), angleSin = Math.sin(-this.bearingInRadians),\n dx = x - Math.round(x) + angleCos * xShift + angleSin * yShift,\n dy = y - Math.round(y) + angleCos * yShift + angleSin * xShift;\n const alignedM = new Float64Array(m) as any as mat4;\n mat4.translate(alignedM, alignedM, [dx > 0.5 ? dx - 1 : dx, dy > 0.5 ? dy - 1 : dy, 0]);\n this._alignedProjMatrix = alignedM;\n\n // inverse matrix for conversion from screen coordinates to location\n m = mat4.invert(new Float64Array(16) as any, this._pixelMatrix);\n if (!m) throw new Error('failed to invert matrix');\n this._pixelMatrixInverse = m;\n\n this._clearMatrixCaches();\n }\n\n private _clearMatrixCaches(): void {\n this._posMatrixCache.clear();\n this._alignedPosMatrixCache.clear();\n this._fogMatrixCacheF32.clear();\n }\n\n maxPitchScaleFactor(): number {\n // calcMatrices hasn't run yet\n if (!this._pixelMatrixInverse) return 1;\n\n const coord = this.screenPointToMercatorCoordinate(new Point(0, 0));\n const p = [coord.x * this.worldSize, coord.y * this.worldSize, 0, 1] as vec4;\n const topPoint = vec4.transformMat4(p, p, this._pixelMatrix);\n return topPoint[3] / this._helper.cameraToCenterDistance;\n }\n\n getCameraPoint(): Point {\n return this._helper.getCameraPoint();\n }\n\n getCameraAltitude(): number {\n return this._helper.getCameraAltitude();\n }\n\n getCameraLngLat(): LngLat {\n const pixelPerMeter = mercatorZfromAltitude(1, this.center.lat) * this.worldSize;\n const cameraToCenterDistanceMeters = this._helper.cameraToCenterDistance / pixelPerMeter;\n const camMercator = cameraMercatorCoordinateFromCenterAndRotation(this.center, this.elevation, this.pitch, this.bearing, cameraToCenterDistanceMeters);\n return camMercator.toLngLat();\n }\n\n lngLatToCameraDepth(lngLat: LngLat, elevation: number) {\n const coord = MercatorCoordinate.fromLngLat(lngLat);\n const p = [coord.x * this.worldSize, coord.y * this.worldSize, elevation, 1] as vec4;\n vec4.transformMat4(p, p, this._viewProjMatrix);\n return (p[2] / p[3]);\n }\n\n getProjectionData(params: ProjectionDataParams): ProjectionData {\n const {overscaledTileID, aligned, applyTerrainMatrix} = params;\n const mercatorTileCoordinates = this._helper.getMercatorTileCoordinates(overscaledTileID);\n const tilePosMatrix = overscaledTileID ? this.calculatePosMatrix(overscaledTileID, aligned, true) : null;\n \n let mainMatrix: mat4;\n if (overscaledTileID && overscaledTileID.terrainRttPosMatrix32f && applyTerrainMatrix) {\n mainMatrix = overscaledTileID.terrainRttPosMatrix32f;\n } else if (tilePosMatrix) {\n mainMatrix = tilePosMatrix; // This matrix should be float32\n } else {\n mainMatrix = createIdentityMat4f32();\n }\n return {\n mainMatrix, // Might be set to a custom matrix by different projections.\n tileMercatorCoords: mercatorTileCoordinates,\n clippingPlane: [0, 0, 0, 0],\n projectionTransition: 0.0, // Range 0..1, where 0 is mercator, 1 is another projection, mostly globe.\n fallbackMatrix: mainMatrix,\n };\n }\n\n isLocationOccluded(_: LngLat): boolean {\n return false;\n }\n\n getPixelScale(): number {\n return 1.0;\n }\n\n getCircleRadiusCorrection(): number {\n return 1.0;\n }\n\n getPitchedTextCorrection(_textAnchorX: number, _textAnchorY: number, _tileID: UnwrappedTileID): number {\n return 1.0;\n }\n\n transformLightDirection(dir: vec3): vec3 {\n return vec3.clone(dir);\n }\n\n getRayDirectionFromPixel(_p: Point): vec3 {\n throw new Error('Not implemented.'); // No need for this in mercator transform\n }\n\n projectTileCoordinates(x: number, y: number, unwrappedTileID: UnwrappedTileID, getElevation: (x: number, y: number) => number): PointProjection {\n const matrix = this.calculatePosMatrix(unwrappedTileID);\n let pos;\n if (getElevation) { // slow because of handle z-index\n pos = [x, y, getElevation(x, y), 1] as vec4;\n vec4.transformMat4(pos, pos, matrix);\n } else { // fast because of ignore z-index\n pos = [x, y, 0, 1] as vec4;\n xyTransformMat4(pos, pos, matrix);\n }\n const w = pos[3];\n return {\n point: new Point(pos[0] / w, pos[1] / w),\n signedDistanceFromCamera: w,\n isOccluded: false\n };\n }\n\n populateCache(coords: Array): void {\n for (const coord of coords) {\n // Return value is thrown away, but this function will still\n // place the pos matrix into the transform's internal cache.\n this.calculatePosMatrix(coord);\n }\n }\n\n getMatrixForModel(location: LngLatLike, altitude?: number): mat4 {\n const modelAsMercatorCoordinate = MercatorCoordinate.fromLngLat(\n location,\n altitude\n );\n const scale = modelAsMercatorCoordinate.meterInMercatorCoordinateUnits();\n\n const m = createIdentityMat4f64();\n mat4.translate(m, m, [modelAsMercatorCoordinate.x, modelAsMercatorCoordinate.y, modelAsMercatorCoordinate.z]);\n mat4.rotateZ(m, m, Math.PI);\n mat4.rotateX(m, m, Math.PI / 2);\n mat4.scale(m, m, [-scale, scale, scale]);\n return m;\n }\n\n getProjectionDataForCustomLayer(applyGlobeMatrix: boolean = true): ProjectionData {\n const tileID = new OverscaledTileID(0, 0, 0, 0, 0);\n const projectionData = this.getProjectionData({overscaledTileID: tileID, applyGlobeMatrix});\n\n const tileMatrix = calculateTileMatrix(tileID, this.worldSize);\n mat4.multiply(tileMatrix, this._viewProjMatrix, tileMatrix);\n\n projectionData.tileMercatorCoords = [0, 0, 1, 1];\n\n // Even though we requested projection data for the mercator base tile which covers the entire mercator range,\n // the shader projection machinery still expects inputs to be in tile units range [0..EXTENT].\n // Since custom layers are expected to supply mercator coordinates [0..1], we need to rescale\n // both matrices by EXTENT. We also need to rescale Z.\n\n const scale: vec3 = [EXTENT, EXTENT, this.worldSize / this._helper.pixelsPerMeter];\n\n // We pass full-precision 64bit float matrices to custom layers to prevent precision loss in case the user wants to do further transformations.\n // Otherwise we get very visible precision-artifacts and twitching for objects that are bulding-scale.\n const projectionMatrixScaled = createMat4f64();\n mat4.scale(projectionMatrixScaled, tileMatrix, scale);\n\n projectionData.fallbackMatrix = projectionMatrixScaled;\n projectionData.mainMatrix = projectionMatrixScaled;\n return projectionData;\n }\n\n getFastPathSimpleProjectionMatrix(tileID: OverscaledTileID): mat4 {\n return this.calculatePosMatrix(tileID);\n }\n}\n","import Point from '@mapbox/point-geometry';\nimport {type IReadonlyTransform, type ITransform} from '../transform_interface';\nimport {type LngLat, type LngLatLike} from '../lng_lat';\nimport {type CameraForBoundsOptions, type PointLike} from '../../ui/camera';\nimport {type PaddingOptions} from '../edge_insets';\nimport {type LngLatBounds} from '../lng_lat_bounds';\nimport {degreesToRadians, getRollPitchBearing, type RollPitchBearing, rollPitchBearingToQuat, scaleZoom, warnOnce, zoomScale} from '../../util/util';\nimport {quat} from 'gl-matrix';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport {projectToWorldCoordinates, unprojectFromWorldCoordinates} from './mercator_utils';\n\nexport type MapControlsDeltas = {\n panDelta: Point;\n zoomDelta: number;\n bearingDelta: number;\n pitchDelta: number;\n rollDelta: number;\n around: Point;\n};\n\nexport type CameraForBoxAndBearingHandlerResult = {\n center: LngLat;\n zoom: number;\n bearing: number;\n};\n\nexport type EaseToHandlerOptions = {\n bearing: number;\n pitch: number;\n roll: number;\n padding: PaddingOptions;\n offsetAsPoint: Point;\n around?: LngLat;\n aroundPoint?: Point;\n center?: LngLatLike;\n zoom?: number;\n offset?: PointLike;\n};\n\nexport type EaseToHandlerResult = {\n easeFunc: (k: number) => void;\n elevationCenter: LngLat;\n isZooming: boolean;\n};\n\nexport type FlyToHandlerOptions = {\n bearing: number;\n pitch: number;\n roll: number;\n padding: PaddingOptions;\n offsetAsPoint: Point;\n center?: LngLatLike;\n locationAtOffset: LngLat;\n zoom?: number;\n minZoom?: number;\n};\n\nexport type FlyToHandlerResult = {\n easeFunc: (k: number, scale: number, centerFactor: number, pointAtOffset: Point) => void;\n scaleOfZoom: number;\n scaleOfMinZoom?: number;\n targetCenter: LngLat;\n pixelPathLength: number;\n};\n\nexport type UpdateRotationArgs = {\n /**\n * The starting Euler angles.\n */\n startEulerAngles: RollPitchBearing;\n\n /**\n * The end Euler angles.\n */\n endEulerAngles: RollPitchBearing;\n\n /**\n * The transform to be updated\n */\n tr: ITransform;\n\n /**\n * The interpolation fraction, between 0 and 1.\n */\n k: number;\n\n /**\n * If true, use spherical linear interpolation. If false, use linear interpolation of Euler angles.\n */\n useSlerp: boolean;\n};\n\n/**\n * @internal\n */\nexport function cameraBoundsWarning() {\n warnOnce(\n 'Map cannot fit within canvas with the given bounds, padding, and/or offset.'\n );\n}\n\n/**\n * @internal\n * Contains projection-specific functions related to camera controls, easeTo, flyTo, inertia, etc.\n */\nexport interface ICameraHelper {\n get useGlobeControls(): boolean;\n\n handlePanInertia(pan: Point, transform: IReadonlyTransform): {\n easingCenter: LngLat;\n easingOffset: Point;\n };\n\n handleMapControlsRollPitchBearingZoom(deltas: MapControlsDeltas, tr: ITransform): void;\n\n handleMapControlsPan(deltas: MapControlsDeltas, tr: ITransform, preZoomAroundLoc: LngLat): void;\n\n cameraForBoxAndBearing(options: CameraForBoundsOptions, padding: PaddingOptions, bounds: LngLatBounds, bearing: number, tr: IReadonlyTransform): CameraForBoxAndBearingHandlerResult;\n\n handleJumpToCenterZoom(tr: ITransform, options: { zoom?: number; center?: LngLatLike }): void;\n\n handleEaseTo(tr: ITransform, options: EaseToHandlerOptions): EaseToHandlerResult;\n\n handleFlyTo(tr: ITransform, options: FlyToHandlerOptions): FlyToHandlerResult;\n}\n\n/**\n * @internal\n * Set a transform's rotation to a value interpolated between startEulerAngles and endEulerAngles\n */\nexport function updateRotation(args: UpdateRotationArgs) {\n if (args.useSlerp) {\n // At pitch ==0, the Euler angle representation is ambiguous. In this case, set the Euler angles\n // to the representation requested by the caller\n if (args.k < 1) {\n const startRotation = rollPitchBearingToQuat(args.startEulerAngles.roll, args.startEulerAngles.pitch, args.startEulerAngles.bearing);\n const endRotation = rollPitchBearingToQuat(args.endEulerAngles.roll, args.endEulerAngles.pitch, args.endEulerAngles.bearing);\n const rotation: quat = new Float64Array(4) as any;\n quat.slerp(rotation, startRotation, endRotation, args.k);\n const eulerAngles = getRollPitchBearing(rotation);\n args.tr.setRoll(eulerAngles.roll);\n args.tr.setPitch(eulerAngles.pitch);\n args.tr.setBearing(eulerAngles.bearing);\n } else {\n args.tr.setRoll(args.endEulerAngles.roll);\n args.tr.setPitch(args.endEulerAngles.pitch);\n args.tr.setBearing(args.endEulerAngles.bearing);\n }\n } else {\n args.tr.setRoll(interpolates.number(args.startEulerAngles.roll, args.endEulerAngles.roll, args.k));\n args.tr.setPitch(interpolates.number(args.startEulerAngles.pitch, args.endEulerAngles.pitch, args.k));\n args.tr.setBearing(interpolates.number(args.startEulerAngles.bearing, args.endEulerAngles.bearing, args.k));\n }\n}\n\nexport function cameraForBoxAndBearing(options: CameraForBoundsOptions, padding: PaddingOptions, bounds: LngLatBounds, bearing: number, tr: IReadonlyTransform): CameraForBoxAndBearingHandlerResult {\n const edgePadding = tr.padding;\n\n // Consider all corners of the rotated bounding box derived from the given points\n // when find the camera position that fits the given points.\n\n const nwWorld = projectToWorldCoordinates(tr.worldSize, bounds.getNorthWest());\n const neWorld = projectToWorldCoordinates(tr.worldSize, bounds.getNorthEast());\n const seWorld = projectToWorldCoordinates(tr.worldSize, bounds.getSouthEast());\n const swWorld = projectToWorldCoordinates(tr.worldSize, bounds.getSouthWest());\n\n const bearingRadians = degreesToRadians(-bearing);\n\n const nwRotatedWorld = nwWorld.rotate(bearingRadians);\n const neRotatedWorld = neWorld.rotate(bearingRadians);\n const seRotatedWorld = seWorld.rotate(bearingRadians);\n const swRotatedWorld = swWorld.rotate(bearingRadians);\n\n const upperRight = new Point(\n Math.max(nwRotatedWorld.x, neRotatedWorld.x, swRotatedWorld.x, seRotatedWorld.x),\n Math.max(nwRotatedWorld.y, neRotatedWorld.y, swRotatedWorld.y, seRotatedWorld.y)\n );\n\n const lowerLeft = new Point(\n Math.min(nwRotatedWorld.x, neRotatedWorld.x, swRotatedWorld.x, seRotatedWorld.x),\n Math.min(nwRotatedWorld.y, neRotatedWorld.y, swRotatedWorld.y, seRotatedWorld.y)\n );\n\n // Calculate zoom: consider the original bbox and padding.\n const size = upperRight.sub(lowerLeft);\n\n const availableWidth = (tr.width - (edgePadding.left + edgePadding.right + padding.left + padding.right));\n const availableHeight = (tr.height - (edgePadding.top + edgePadding.bottom + padding.top + padding.bottom));\n const scaleX = availableWidth / size.x;\n const scaleY = availableHeight / size.y;\n\n if (scaleY < 0 || scaleX < 0) {\n cameraBoundsWarning();\n return undefined;\n }\n\n const zoom = Math.min(scaleZoom(tr.scale * Math.min(scaleX, scaleY)), options.maxZoom);\n\n // Calculate center: apply the zoom, the configured offset, as well as offset that exists as a result of padding.\n const offset = Point.convert(options.offset);\n const paddingOffsetX = (padding.left - padding.right) / 2;\n const paddingOffsetY = (padding.top - padding.bottom) / 2;\n const paddingOffset = new Point(paddingOffsetX, paddingOffsetY);\n const rotatedPaddingOffset = paddingOffset.rotate(degreesToRadians(bearing));\n const offsetAtInitialZoom = offset.add(rotatedPaddingOffset);\n const offsetAtFinalZoom = offsetAtInitialZoom.mult(tr.scale / zoomScale(zoom));\n\n const center = unprojectFromWorldCoordinates(\n tr.worldSize,\n // either world diagonal can be used (NW-SE or NE-SW)\n nwWorld.add(seWorld).div(2).sub(offsetAtFinalZoom)\n );\n\n const result = {\n center,\n zoom,\n bearing\n };\n\n return result;\n}","import type Point from '@mapbox/point-geometry';\nimport {LngLat, type LngLatLike} from '../lng_lat';\nimport {cameraForBoxAndBearing, type CameraForBoxAndBearingHandlerResult, type EaseToHandlerResult, type EaseToHandlerOptions, type FlyToHandlerResult, type FlyToHandlerOptions, type ICameraHelper, type MapControlsDeltas, updateRotation, type UpdateRotationArgs} from './camera_helper';\nimport {normalizeCenter} from '../transform_helper';\nimport {rollPitchBearingEqual, scaleZoom, zoomScale} from '../../util/util';\nimport {getMercatorHorizon, projectToWorldCoordinates, unprojectFromWorldCoordinates} from './mercator_utils';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {IReadonlyTransform, ITransform} from '../transform_interface';\nimport type {CameraForBoundsOptions} from '../../ui/camera';\nimport type {PaddingOptions} from '../edge_insets';\nimport type {LngLatBounds} from '../lng_lat_bounds';\n\n/**\n * @internal\n */\nexport class MercatorCameraHelper implements ICameraHelper {\n get useGlobeControls(): boolean { return false; }\n\n handlePanInertia(pan: Point, transform: IReadonlyTransform): {\n easingCenter: LngLat;\n easingOffset: Point;\n } {\n // Reduce the offset so that it never goes past the horizon. If it goes past\n // the horizon, the pan direction is opposite of the intended direction.\n const offsetLength = pan.mag();\n const pixelsToHorizon = Math.abs(getMercatorHorizon(transform));\n const horizonFactor = 0.75; // Must be < 1 to prevent the offset from crossing the horizon\n const offsetAsPoint = pan.mult(Math.min(pixelsToHorizon * horizonFactor / offsetLength, 1.0));\n return {\n easingOffset: offsetAsPoint,\n easingCenter: transform.center,\n };\n }\n\n handleMapControlsRollPitchBearingZoom(deltas: MapControlsDeltas, tr: ITransform): void {\n if (deltas.bearingDelta) tr.setBearing(tr.bearing + deltas.bearingDelta);\n if (deltas.pitchDelta) tr.setPitch(tr.pitch + deltas.pitchDelta);\n if (deltas.rollDelta) tr.setRoll(tr.roll + deltas.rollDelta);\n if (deltas.zoomDelta) tr.setZoom(tr.zoom + deltas.zoomDelta);\n }\n\n handleMapControlsPan(deltas: MapControlsDeltas, tr: ITransform, preZoomAroundLoc: LngLat): void {\n // If we are rotating about the center point, there is no need to update the transform center. Doing so causes\n // a small amount of drift of the center point, especially when pitch is close to 90 degrees.\n // In this case, return early.\n if (deltas.around.distSqr(tr.centerPoint) < 1.0e-2) {\n return;\n }\n tr.setLocationAtPoint(preZoomAroundLoc, deltas.around);\n }\n\n cameraForBoxAndBearing(options: CameraForBoundsOptions, padding: PaddingOptions, bounds: LngLatBounds, bearing: number, tr: IReadonlyTransform): CameraForBoxAndBearingHandlerResult {\n return cameraForBoxAndBearing(options, padding, bounds, bearing, tr);\n }\n\n handleJumpToCenterZoom(tr: ITransform, options: { zoom?: number; center?: LngLatLike }): void {\n // Mercator zoom & center handling.\n const optionsZoom = typeof options.zoom !== 'undefined';\n\n const zoom = optionsZoom ? +options.zoom : tr.zoom;\n if (tr.zoom !== zoom) {\n tr.setZoom(+options.zoom);\n }\n\n if (options.center !== undefined) {\n tr.setCenter(LngLat.convert(options.center));\n }\n }\n\n handleEaseTo(tr: ITransform, options: EaseToHandlerOptions): EaseToHandlerResult {\n const startZoom = tr.zoom;\n const startPadding = tr.padding;\n const startEulerAngles = {roll: tr.roll, pitch: tr.pitch, bearing: tr.bearing};\n const endRoll = options.roll === undefined ? tr.roll : options.roll;\n const endPitch = options.pitch === undefined ? tr.pitch : options.pitch;\n const endBearing = options.bearing === undefined ? tr.bearing : options.bearing;\n const endEulerAngles = {roll: endRoll, pitch: endPitch, bearing: endBearing};\n\n const optionsZoom = typeof options.zoom !== 'undefined';\n\n const doPadding = !tr.isPaddingEqual(options.padding);\n\n let isZooming = false;\n\n const zoom = optionsZoom ? +options.zoom : tr.zoom;\n\n let pointAtOffset = tr.centerPoint.add(options.offsetAsPoint);\n const locationAtOffset = tr.screenPointToLocation(pointAtOffset);\n const {center, zoom: endZoom} = tr.applyConstrain(\n LngLat.convert(options.center || locationAtOffset),\n zoom ?? startZoom\n );\n normalizeCenter(tr, center);\n\n const from = projectToWorldCoordinates(tr.worldSize, locationAtOffset);\n const delta = projectToWorldCoordinates(tr.worldSize, center).sub(from);\n\n const finalScale = zoomScale(endZoom - startZoom);\n isZooming = (endZoom !== startZoom);\n\n const easeFunc = (k: number) => {\n if (isZooming) {\n tr.setZoom(interpolates.number(startZoom, endZoom, k));\n }\n if (!rollPitchBearingEqual(startEulerAngles, endEulerAngles)) {\n updateRotation({\n startEulerAngles,\n endEulerAngles,\n tr,\n k,\n useSlerp: startEulerAngles.roll != endEulerAngles.roll} as UpdateRotationArgs);\n }\n if (doPadding) {\n tr.interpolatePadding(startPadding, options.padding, k);\n // When padding is being applied, Transform.centerPoint is changing continuously,\n // thus we need to recalculate offsetPoint every frame\n pointAtOffset = tr.centerPoint.add(options.offsetAsPoint);\n }\n\n if (options.around) {\n tr.setLocationAtPoint(options.around, options.aroundPoint);\n } else {\n const scale = zoomScale(tr.zoom - startZoom);\n const base = endZoom > startZoom ?\n Math.min(2, finalScale) :\n Math.max(0.5, finalScale);\n const speedup = Math.pow(base, 1 - k);\n const newCenter = unprojectFromWorldCoordinates(tr.worldSize, from.add(delta.mult(k * speedup)).mult(scale));\n tr.setLocationAtPoint(tr.renderWorldCopies ? newCenter.wrap() : newCenter, pointAtOffset);\n }\n };\n\n return {\n easeFunc,\n isZooming,\n elevationCenter: center,\n };\n }\n\n handleFlyTo(tr: ITransform, options: FlyToHandlerOptions): FlyToHandlerResult {\n const optionsZoom = typeof options.zoom !== 'undefined';\n\n const startZoom = tr.zoom;\n\n // Obtain target center and zoom\n const constrained = tr.applyConstrain(\n LngLat.convert(options.center || options.locationAtOffset),\n optionsZoom ? +options.zoom : startZoom\n );\n const targetCenter = constrained.center;\n const targetZoom = constrained.zoom;\n\n normalizeCenter(tr, targetCenter);\n\n const from = projectToWorldCoordinates(tr.worldSize, options.locationAtOffset);\n const delta = projectToWorldCoordinates(tr.worldSize, targetCenter).sub(from);\n\n const pixelPathLength = delta.mag();\n\n const scaleOfZoom = zoomScale(targetZoom - startZoom);\n\n const optionsMinZoom = typeof options.minZoom !== 'undefined';\n\n let scaleOfMinZoom: number;\n\n if (optionsMinZoom) {\n const minZoomPreConstrain = Math.min(+options.minZoom, startZoom, targetZoom);\n const minZoom = tr.applyConstrain(targetCenter, minZoomPreConstrain).zoom;\n scaleOfMinZoom = zoomScale(minZoom - startZoom);\n }\n\n const easeFunc = (k: number, scale: number, centerFactor: number, pointAtOffset: Point) => {\n tr.setZoom(k === 1 ? targetZoom : startZoom + scaleZoom(scale));\n const newCenter = k === 1 ? targetCenter : unprojectFromWorldCoordinates(tr.worldSize, from.add(delta.mult(centerFactor)).mult(scale));\n tr.setLocationAtPoint(tr.renderWorldCopies ? newCenter.wrap() : newCenter, pointAtOffset);\n };\n\n return {\n easeFunc,\n scaleOfZoom,\n targetCenter,\n scaleOfMinZoom,\n pixelPathLength,\n };\n }\n}\n","import {Color} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {BlendFuncType, ColorMaskType} from './types';\n\nconst ZERO = 0x0000;\nconst ONE = 0x0001;\nconst ONE_MINUS_SRC_ALPHA = 0x0303;\n\nexport class ColorMode {\n blendFunction: BlendFuncType;\n blendColor: Color;\n mask: ColorMaskType;\n\n constructor(blendFunction: BlendFuncType, blendColor: Color, mask: ColorMaskType) {\n this.blendFunction = blendFunction;\n this.blendColor = blendColor;\n this.mask = mask;\n }\n\n static Replace: BlendFuncType;\n\n static disabled: Readonly;\n static unblended: Readonly;\n static alphaBlended: Readonly;\n}\n\nColorMode.Replace = [ONE, ZERO];\n\nColorMode.disabled = new ColorMode(ColorMode.Replace, Color.transparent, [false, false, false, false]);\nColorMode.unblended = new ColorMode(ColorMode.Replace, Color.transparent, [true, true, true, true]);\nColorMode.alphaBlended = new ColorMode([ONE, ONE_MINUS_SRC_ALPHA], Color.transparent, [true, true, true, true]);\n","import type {CullFaceModeType, FrontFaceType} from './types';\n\nconst FRONT = 0x0404;\nconst BACK = 0x0405;\nconst CCW = 0x0901;\n\nexport class CullFaceMode {\n enable: boolean;\n mode: CullFaceModeType;\n frontFace: FrontFaceType;\n\n constructor(enable: boolean, mode: CullFaceModeType, frontFace: FrontFaceType) {\n this.enable = enable;\n this.mode = mode;\n this.frontFace = frontFace;\n }\n\n static disabled: Readonly;\n\n /**\n * The standard GL cull mode. Culls backfacing triangles when counterclockwise vertex order is used.\n * Use for 3D geometry such as terrain.\n */\n static backCCW: Readonly;\n\n /**\n * Opposite of {@link backCCW}. Culls front-facing triangles when counterclockwise vertex order is used.\n */\n static frontCCW: Readonly;\n}\n\nCullFaceMode.disabled = new CullFaceMode(false, BACK, CCW);\nCullFaceMode.backCCW = new CullFaceMode(true, BACK, CCW);\nCullFaceMode.frontCCW = new CullFaceMode(true, FRONT, CCW);\n","import type {DepthFuncType, DepthMaskType, DepthRangeType} from './types';\n\nconst ALWAYS = 0x0207;\n\nexport class DepthMode {\n func: DepthFuncType;\n mask: DepthMaskType;\n range: DepthRangeType;\n\n // DepthMask enums\n static ReadOnly: boolean;\n static ReadWrite: boolean;\n\n constructor(depthFunc: DepthFuncType, depthMask: DepthMaskType, depthRange: DepthRangeType) {\n this.func = depthFunc;\n this.mask = depthMask;\n this.range = depthRange;\n }\n\n static disabled: Readonly;\n}\n\nDepthMode.ReadOnly = false;\nDepthMode.ReadWrite = true;\n\nDepthMode.disabled = new DepthMode(ALWAYS, DepthMode.ReadOnly, [0, 1]);\n","import type {StencilOpConstant, StencilTestGL} from './types';\n\nconst ALWAYS = 0x0207;\nconst KEEP = 0x1E00;\n\nexport class StencilMode {\n test: StencilTestGL;\n ref: number;\n mask: number;\n fail: StencilOpConstant;\n depthFail: StencilOpConstant;\n pass: StencilOpConstant;\n\n constructor(test: StencilTestGL, ref: number, mask: number, fail: StencilOpConstant,\n depthFail: StencilOpConstant, pass: StencilOpConstant) {\n this.test = test;\n this.ref = ref;\n this.mask = mask;\n this.fail = fail;\n this.depthFail = depthFail;\n this.pass = pass;\n }\n\n static disabled: Readonly;\n}\n\nStencilMode.disabled = new StencilMode({func: ALWAYS, mask: 0}, 0, 0, KEEP, KEEP, KEEP);\n","import {Uniform1f} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../../render/uniform_binding';\n\nexport type ProjectionErrorMeasurementUniformsType = {\n 'u_input': Uniform1f;\n 'u_output_expected': Uniform1f;\n};\n\nconst projectionErrorMeasurementUniforms = (context: Context, locations: UniformLocations): ProjectionErrorMeasurementUniformsType => ({\n 'u_input': new Uniform1f(context, locations.u_input),\n 'u_output_expected': new Uniform1f(context, locations.u_output_expected),\n});\n\nconst projectionErrorMeasurementUniformValues = (\n input: number,\n outputExpected: number\n): UniformValues => ({\n 'u_input': input,\n 'u_output_expected': outputExpected,\n});\n\nexport {projectionErrorMeasurementUniforms, projectionErrorMeasurementUniformValues};\n","const cache = new WeakMap();\nexport function isWebGL2(\n gl: WebGLRenderingContext | WebGL2RenderingContext\n): gl is WebGL2RenderingContext {\n if (cache.has(gl)) {\n return cache.get(gl);\n } else {\n const value = gl.getParameter(gl.VERSION)?.startsWith('WebGL 2.0');\n cache.set(gl, value);\n return value;\n }\n}\n","import {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {ColorMode} from '../../gl/color_mode';\nimport {CullFaceMode} from '../../gl/cull_face_mode';\nimport {DepthMode} from '../../gl/depth_mode';\nimport {StencilMode} from '../../gl/stencil_mode';\nimport {warnOnce} from '../../util/util';\nimport {projectionErrorMeasurementUniformValues} from '../../render/program/projection_error_measurement_program';\nimport {Mesh} from '../../render/mesh';\nimport {SegmentVector} from '../../data/segment';\nimport {PosArray, TriangleIndexArray} from '../../data/array_types.g';\nimport posAttributes from '../../data/pos_attributes';\nimport {type Framebuffer} from '../../gl/framebuffer';\nimport {isWebGL2} from '../../gl/webgl2';\nimport {type ProjectionGPUContext} from './projection';\n\n/**\n * For vector globe the vertex shader projects mercator coordinates to angular coordinates on a sphere.\n * This projection requires some inverse trigonometry `atan(exp(...))`, which is inaccurate on some GPUs (mainly on AMD and Nvidia).\n * The inaccuracy is severe enough to require a workaround. The uncorrected map is shifted north-south by up to several hundred meters in some latitudes.\n * Since the inaccuracy is hardware-dependant and may change in the future, we need to measure the error at runtime.\n *\n * Our approach relies on several assumptions:\n *\n * - the error is only present in the \"latitude\" component (longitude doesn't need any inverse trigonometry)\n * - the error is continuous and changes slowly with latitude\n * - at zoom levels where the error is noticeable, the error is more-or-less the same across the entire visible map area (and thus can be described with a single number)\n *\n * Solution:\n *\n * Every few frames, launch a GPU shader that measures the error for the current map center latitude, and writes it to a 1x1 texture.\n * Read back that texture, and offset the globe projection matrix according to the error (interpolating smoothly from old error to new error if needed).\n * The texture readback is done asynchronously using Pixel Pack Buffers (WebGL2) when possible, and has a few frames of latency, but that should not be a problem.\n *\n * General operation of this class each frame is:\n *\n * - render the error shader into a fbo, read that pixel into a PBO, place a fence\n * - wait a few frames to allow the GPU (and driver) to actually execute the shader\n * - wait for the fence to be signalled (guaranteeing the shader to actually be executed)\n * - read back the PBO's contents\n * - wait a few more frames\n * - repeat\n */\nexport class ProjectionErrorMeasurement {\n // We wait at least this many frames after measuring until we read back the value.\n // After this period, we might wait more frames until a fence is signalled to make sure the rendering is completed.\n private readonly _readbackWaitFrames = 4;\n // We wait this many frames after *reading back* a measurement until we trigger measure again.\n // We could in theory render the measurement pixel immediately, but we wait to make sure\n // no pipeline stall happens.\n private readonly _measureWaitFrames = 6;\n private readonly _texWidth = 1;\n private readonly _texHeight = 1;\n private readonly _texFormat: number;\n private readonly _texType: number;\n\n private _fullscreenTriangle: Mesh;\n private _fbo: Framebuffer;\n private _resultBuffer: Uint8Array;\n private _pbo: WebGLBuffer;\n private _cachedRenderContext: ProjectionGPUContext;\n\n private _measuredError: number = 0; // Result of last measurement\n private _updateCount: number = 0;\n private _lastReadbackFrame: number = -1000;\n\n get awaitingQuery(): boolean {\n return !!this._readbackQueue;\n }\n\n // There is never more than one readback waiting\n private _readbackQueue: {\n frameNumberIssued: number; // Frame number when the data was first computed\n sync: WebGLSync;\n } = null;\n\n public constructor(renderContext: ProjectionGPUContext) {\n this._cachedRenderContext = renderContext;\n\n const context = renderContext.context;\n const gl = context.gl;\n\n this._texFormat = gl.RGBA;\n this._texType = gl.UNSIGNED_BYTE;\n\n const vertexArray = new PosArray();\n vertexArray.emplaceBack(-1, -1);\n vertexArray.emplaceBack(2, -1);\n vertexArray.emplaceBack(-1, 2);\n const indexArray = new TriangleIndexArray();\n indexArray.emplaceBack(0, 1, 2);\n\n this._fullscreenTriangle = new Mesh(\n context.createVertexBuffer(vertexArray, posAttributes.members),\n context.createIndexBuffer(indexArray),\n SegmentVector.simpleSegment(0, 0, vertexArray.length, indexArray.length)\n );\n\n this._resultBuffer = new Uint8Array(4);\n\n context.activeTexture.set(gl.TEXTURE1);\n\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(gl.TEXTURE_2D, 0, this._texFormat, this._texWidth, this._texHeight, 0, this._texFormat, this._texType, null);\n\n this._fbo = context.createFramebuffer(this._texWidth, this._texHeight, false, false);\n this._fbo.colorAttachment.set(texture);\n\n if (isWebGL2(gl)) {\n this._pbo = gl.createBuffer();\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, this._pbo);\n gl.bufferData(gl.PIXEL_PACK_BUFFER, 4, gl.STREAM_READ);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n }\n }\n\n public destroy() {\n const gl = this._cachedRenderContext.context.gl;\n this._fullscreenTriangle.destroy();\n this._fbo.destroy();\n gl.deleteBuffer(this._pbo);\n this._fullscreenTriangle = null;\n this._fbo = null;\n this._pbo = null;\n this._resultBuffer = null;\n }\n\n public updateErrorLoop(normalizedMercatorY: number, expectedAngleY: number): number {\n const currentFrame = this._updateCount;\n\n if (this._readbackQueue) {\n // Try to read back if enough frames elapsed. Otherwise do nothing, just wait another frame.\n if (currentFrame >= this._readbackQueue.frameNumberIssued + this._readbackWaitFrames) {\n // Try to read back - it is possible that this method does nothing, then\n // the readback queue will not be cleared and we will retry next frame.\n this._tryReadback();\n }\n } else {\n if (currentFrame >= this._lastReadbackFrame + this._measureWaitFrames) {\n this._renderErrorTexture(normalizedMercatorY, expectedAngleY);\n }\n }\n\n this._updateCount++;\n return this._measuredError;\n }\n\n private _bindFramebuffer() {\n const context = this._cachedRenderContext.context;\n const gl = context.gl;\n context.activeTexture.set(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, this._fbo.colorAttachment.get());\n context.bindFramebuffer.set(this._fbo.framebuffer);\n }\n\n private _renderErrorTexture(input: number, outputExpected: number): void {\n const context = this._cachedRenderContext.context;\n const gl = context.gl;\n\n // Update framebuffer contents\n this._bindFramebuffer();\n context.viewport.set([0, 0, this._texWidth, this._texHeight]);\n context.clear({color: Color.transparent});\n\n const program = this._cachedRenderContext.useProgram('projectionErrorMeasurement');\n\n program.draw(context, gl.TRIANGLES,\n DepthMode.disabled, StencilMode.disabled,\n ColorMode.unblended, CullFaceMode.disabled,\n projectionErrorMeasurementUniformValues(input, outputExpected), null, null,\n '$clipping', this._fullscreenTriangle.vertexBuffer, this._fullscreenTriangle.indexBuffer,\n this._fullscreenTriangle.segments);\n\n if (this._pbo && isWebGL2(gl)) {\n // Read back into PBO\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, this._pbo);\n gl.readBuffer(gl.COLOR_ATTACHMENT0);\n gl.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, 0);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);\n gl.flush();\n\n this._readbackQueue = {\n frameNumberIssued: this._updateCount,\n sync,\n };\n } else {\n // Read it back later.\n this._readbackQueue = {\n frameNumberIssued: this._updateCount,\n sync: null,\n };\n }\n }\n\n private _tryReadback(): void {\n const gl = this._cachedRenderContext.context.gl;\n\n if (this._pbo && this._readbackQueue && isWebGL2(gl)) {\n // WebGL 2 path\n const waitResult = gl.clientWaitSync(this._readbackQueue.sync, 0, 0);\n\n if (waitResult === gl.WAIT_FAILED) {\n warnOnce('WebGL2 clientWaitSync failed.');\n this._readbackQueue = null;\n this._lastReadbackFrame = this._updateCount;\n return;\n }\n\n if (waitResult === gl.TIMEOUT_EXPIRED) {\n return; // Wait one more frame\n }\n\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, this._pbo);\n gl.getBufferSubData(gl.PIXEL_PACK_BUFFER, 0, this._resultBuffer, 0, 4);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n } else {\n // WebGL1 compatible\n this._bindFramebuffer();\n gl.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, this._resultBuffer);\n }\n\n // If we made it here, _resultBuffer contains the new measurement\n this._readbackQueue = null;\n this._measuredError = ProjectionErrorMeasurement._parseRGBA8float(this._resultBuffer);\n this._lastReadbackFrame = this._updateCount;\n }\n\n private static _parseRGBA8float(buffer: Uint8Array): number {\n let result = 0;\n result += buffer[0] / 256.0;\n result += buffer[1] / 65536.0;\n result += buffer[2] / 16777216.0;\n if (buffer[3] < 127.0) {\n result = -result;\n }\n return result / 128.0;\n }\n}\n","import {type Context} from '../gl/context';\nimport {Mesh} from '../render/mesh';\nimport {PosArray, TriangleIndexArray} from '../data/array_types.g';\nimport {SegmentVector} from '../data/segment';\nimport {NORTH_POLE_Y, SOUTH_POLE_Y} from '../render/subdivision';\nimport {EXTENT} from '../data/extent';\nimport posAttributes from '../data/pos_attributes';\n\n/**\n * The size of border region for stencil masks, in internal tile coordinates.\n * Used for globe rendering.\n */\nconst EXTENT_STENCIL_BORDER = EXTENT / 128;\n\n/**\n * Options for generating a tile mesh.\n * Can optionally configure any of the following:\n * - mesh subdivision granularity\n * - border presence\n * - special geometry for the north and/or south pole\n */\nexport type CreateTileMeshOptions = {\n /**\n * Specifies how much should the tile mesh be subdivided.\n * A value of 1 leads to a simple quad, a value of 4 will result in a grid of 4x4 quads.\n */\n granularity?: number;\n /**\n * When true, an additional ring of quads is generated along the border, always extending `EXTENT_STENCIL_BORDER` units away from the main mesh.\n */\n generateBorders?: boolean;\n /**\n * When true, additional geometry is generated along the north edge of the mesh, connecting it to the pole special vertex position.\n * This geometry replaces the mesh border along this edge, if one is present.\n */\n extendToNorthPole?: boolean;\n /**\n * When true, additional geometry is generated along the south edge of the mesh, connecting it to the pole special vertex position.\n * This geometry replaces the mesh border along this edge, if one is present.\n */\n extendToSouthPole?: boolean;\n};\n\n/**\n * Stores the prepared vertex and index buffer bytes for a mesh.\n */\nexport type TileMesh = {\n /**\n * The vertex data. Each vertex is two 16 bit signed integers, one for X, one for Y.\n */\n vertices: ArrayBuffer;\n /**\n * The index data. Each triangle is defined by three indices. The indices may either be 16 bit or 32 bit unsigned integers,\n * depending on the mesh creation arguments and on whether the mesh can fit into 16 bit indices.\n */\n indices: ArrayBuffer;\n /**\n * A helper boolean indicating whether the indices are 32 bit.\n */\n uses32bitIndices: boolean;\n};\n\n/**\n * Describes desired type of vertex indices, either 16 bit uint, 32 bit uint, or, if undefined, any of the two options.\n */\nexport type IndicesType = '32bit' | '16bit' | undefined;\n\n/**\n * @internal\n * Creates a mesh of a quad that covers the entire tile (covering positions in range 0..EXTENT),\n * is optionally subdivided into finer quads, optionally includes a border\n * and optionally extends to the north and/or special pole vertices.\n * Also allocates and populates WebGL buffers for the mesh.\n * Forces 16 bit indices that are used throughout MapLibre.\n * @param context - The WebGL context wrapper.\n * @param options - Specify options for tile mesh creation such as granularity or border.\n * @returns The mesh vertices and indices, already allocated and uploaded into WebGL buffers.\n */\nexport function createTileMeshWithBuffers(context: Context, options: CreateTileMeshOptions): Mesh {\n const tileMesh = createTileMesh(options, '16bit');\n const vertices = PosArray.deserialize({\n arrayBuffer: tileMesh.vertices,\n length: tileMesh.vertices.byteLength / 2 / 2, // Two values per vertex, 16 bit\n });\n const indices = TriangleIndexArray.deserialize({\n arrayBuffer: tileMesh.indices,\n length: tileMesh.indices.byteLength / 2 / 3, // Three values per triangle, 16 bit\n });\n const mesh = new Mesh(\n context.createVertexBuffer(vertices, posAttributes.members),\n context.createIndexBuffer(indices),\n SegmentVector.simpleSegment(0, 0, vertices.length, indices.length)\n );\n\n return mesh;\n}\n\n/**\n * Creates a mesh of a quad that covers the entire tile (covering positions in range 0..EXTENT),\n * is optionally subdivided into finer quads, optionally includes a border\n * and optionally extends to the north and/or special pole vertices.\n * Additionally the resulting mesh indices type can be specified using `forceIndicesSize`.\n * @example\n * ```\n * // Creating a mesh for a tile that can be used for raster layers, hillshade, etc.\n * const meshBuffers = createTileMesh({\n * granularity: map.style.projection.subdivisionGranularity.tile.getGranularityForZoomLevel(tileID.z),\n * generateBorders: true,\n * extendToNorthPole: tileID.y === 0,\n * extendToSouthPole: tileID.y === (1 << tileID.z) - 1,\n * }, '16bit');\n * ```\n * @param options - Specify options for tile mesh creation such as granularity or border.\n * @param forceIndicesSize - Specifies what indices type to use. The values '32bit' and '16bit' force their respective indices size. If undefined, the mesh may use either size, and will pick 16 bit indices if possible. If '16bit' is specified and the mesh exceeds 65536 vertices, an exception is thrown.\n * @returns Typed arrays of the mesh vertices and indices.\n */\nexport function createTileMesh(options: CreateTileMeshOptions, forceIndicesSize?: IndicesType): TileMesh {\n // We only want to generate the north/south border if the tile\n // does NOT border the north/south edge of the mercator range.\n const granularity = options.granularity !== undefined ? Math.max(options.granularity, 1) : 1;\n\n const quadsPerAxisX = granularity + (options.generateBorders ? 2 : 0); // two extra quads for border\n const quadsPerAxisY = granularity + ((options.extendToNorthPole || options.generateBorders) ? 1 : 0) + (options.extendToSouthPole || options.generateBorders ? 1 : 0);\n const verticesPerAxisX = quadsPerAxisX + 1; // one more vertex than quads\n const verticesPerAxisY = quadsPerAxisY + 1; // one more vertex than quads\n const offsetX = options.generateBorders ? -1 : 0;\n const offsetY = (options.generateBorders || options.extendToNorthPole) ? -1 : 0;\n const endX = granularity + (options.generateBorders ? 1 : 0);\n const endY = granularity + ((options.generateBorders || options.extendToSouthPole) ? 1 : 0);\n\n const vertexCount = verticesPerAxisX * verticesPerAxisY;\n const indexCount = quadsPerAxisX * quadsPerAxisY * 6;\n\n const overflows16bitIndices = verticesPerAxisX * verticesPerAxisY > (1 << 16);\n\n if (overflows16bitIndices && forceIndicesSize === '16bit') {\n throw new Error('Granularity is too large and meshes would not fit inside 16 bit vertex indices.');\n }\n\n const use32bitIndices = overflows16bitIndices || forceIndicesSize === '32bit';\n\n const vertices = new Int16Array(vertexCount * 2);\n\n let vertexId = 0;\n\n for (let y = offsetY; y <= endY; y++) {\n for (let x = offsetX; x <= endX; x++) {\n let vx = x / granularity * EXTENT;\n if (x === -1) {\n vx = -EXTENT_STENCIL_BORDER;\n }\n if (x === granularity + 1) {\n vx = EXTENT + EXTENT_STENCIL_BORDER;\n }\n let vy = y / granularity * EXTENT;\n if (y === -1) {\n vy = options.extendToNorthPole ? NORTH_POLE_Y : (-EXTENT_STENCIL_BORDER);\n }\n if (y === granularity + 1) {\n vy = options.extendToSouthPole ? SOUTH_POLE_Y : EXTENT + EXTENT_STENCIL_BORDER;\n }\n\n vertices[vertexId++] = vx;\n vertices[vertexId++] = vy;\n }\n }\n\n const indices = use32bitIndices ? new Uint32Array(indexCount) : new Uint16Array(indexCount);\n\n let indexId = 0;\n\n for (let y = 0; y < quadsPerAxisY; y++) {\n for (let x = 0; x < quadsPerAxisX; x++) {\n const v0 = x + y * verticesPerAxisX;\n const v1 = (x + 1) + y * verticesPerAxisX;\n const v2 = x + (y + 1) * verticesPerAxisX;\n const v3 = (x + 1) + (y + 1) * verticesPerAxisX;\n\n // v0----v1\n // | / |\n // | / |\n // v2----v3\n indices[indexId++] = v0;\n indices[indexId++] = v2;\n indices[indexId++] = v1;\n\n indices[indexId++] = v1;\n indices[indexId++] = v2;\n indices[indexId++] = v3;\n }\n }\n\n return {\n vertices: vertices.buffer.slice(0),\n indices: indices.buffer.slice(0),\n uses32bitIndices: use32bitIndices,\n };\n}","import type {Context} from '../../gl/context';\nimport type {CanonicalTileID} from '../../tile/tile_id';\nimport {type Mesh} from '../../render/mesh';\nimport {now} from '../../util/time_control';\nimport {easeCubicInOut, lerp} from '../../util/util';\nimport {mercatorYfromLat} from '../mercator_coordinate';\nimport {SubdivisionGranularityExpression, SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\nimport type {Projection, ProjectionGPUContext, TileMeshUsage} from './projection';\nimport {type PreparedShader, shaders} from '../../shaders/shaders';\nimport {ProjectionErrorMeasurement} from './globe_projection_error_measurement';\nimport {createTileMeshWithBuffers, type CreateTileMeshOptions} from '../../util/create_tile_mesh';\nimport {type EvaluationParameters} from '../../style/evaluation_parameters';\n\nexport const VerticalPerspectiveShaderDefine = '#define GLOBE';\nexport const VerticalPerspectiveShaderVariantKey = 'globe';\n\nexport const globeConstants = {\n errorTransitionTimeSeconds: 0.5\n};\n\nconst granularitySettingsGlobe: SubdivisionGranularitySetting = new SubdivisionGranularitySetting({\n fill: new SubdivisionGranularityExpression(128, 2),\n line: new SubdivisionGranularityExpression(512, 0),\n // Always keep at least some subdivision on raster tiles, etc,\n // otherwise they will be visibly warped at high zooms (before mercator transition).\n // This si not needed on fill, because fill geometry tends to already be\n // highly tessellated and granular at high zooms.\n tile: new SubdivisionGranularityExpression(128, 32),\n // Stencil granularity must never be higher than fill granularity,\n // otherwise we would get seams in the oceans at zoom levels where\n // stencil has higher granularity than fill.\n stencil: new SubdivisionGranularityExpression(128, 1),\n circle: 3\n});\n\nexport class VerticalPerspectiveProjection implements Projection {\n private _tileMeshCache: {[_: string]: Mesh} = {};\n\n // GPU atan() error correction\n private _errorMeasurement: ProjectionErrorMeasurement;\n private _errorQueryLatitudeDegrees: number;\n private _errorCorrectionUsable: number = 0.0;\n private _errorMeasurementLastValue: number = 0.0;\n private _errorCorrectionPreviousValue: number = 0.0;\n private _errorMeasurementLastChangeTime: number = -1000.0;\n\n get name(): 'vertical-perspective' {\n return 'vertical-perspective';\n }\n\n get transitionState(): number {\n return 1;\n }\n\n get useSubdivision(): boolean {\n return true;\n }\n\n get shaderVariantName(): string {\n return VerticalPerspectiveShaderVariantKey;\n }\n\n get shaderDefine(): string {\n return VerticalPerspectiveShaderDefine;\n }\n\n get shaderPreludeCode(): PreparedShader {\n return shaders.projectionGlobe;\n }\n\n get vertexShaderPreludeCode(): string {\n return shaders.projectionMercator.vertexSource;\n }\n\n get subdivisionGranularity(): SubdivisionGranularitySetting {\n return granularitySettingsGlobe;\n }\n\n get useGlobeControls(): boolean {\n return true;\n }\n\n /**\n * @internal\n * Globe projection periodically measures the error of the GPU's\n * projection from mercator to globe and computes how much to correct\n * the globe's latitude alignment.\n * This stores the correction that should be applied to the projection matrix.\n */\n get latitudeErrorCorrectionRadians(): number { return this._errorCorrectionUsable; }\n\n public destroy() {\n if (this._errorMeasurement) {\n this._errorMeasurement.destroy();\n }\n }\n\n public updateGPUdependent(renderContext: ProjectionGPUContext): void {\n if (!this._errorMeasurement) {\n this._errorMeasurement = new ProjectionErrorMeasurement(renderContext);\n }\n const mercatorY = mercatorYfromLat(this._errorQueryLatitudeDegrees);\n const expectedResult = 2.0 * Math.atan(Math.exp(Math.PI - (mercatorY * Math.PI * 2.0))) - Math.PI * 0.5;\n const newValue = this._errorMeasurement.updateErrorLoop(mercatorY, expectedResult);\n\n const currentTime = now();\n\n if (newValue !== this._errorMeasurementLastValue) {\n this._errorCorrectionPreviousValue = this._errorCorrectionUsable; // store the interpolated value\n this._errorMeasurementLastValue = newValue;\n this._errorMeasurementLastChangeTime = currentTime;\n }\n\n const sinceUpdateSeconds = (currentTime - this._errorMeasurementLastChangeTime) / 1000.0;\n const mix = Math.min(Math.max(sinceUpdateSeconds / globeConstants.errorTransitionTimeSeconds, 0.0), 1.0);\n const newCorrection = -this._errorMeasurementLastValue; // Note the negation\n this._errorCorrectionUsable = lerp(this._errorCorrectionPreviousValue, newCorrection, easeCubicInOut(mix));\n }\n\n private _getMeshKey(options: CreateTileMeshOptions): string {\n return `${options.granularity.toString(36)}_${options.generateBorders ? 'b' : ''}${options.extendToNorthPole ? 'n' : ''}${options.extendToSouthPole ? 's' : ''}`;\n }\n\n public getMeshFromTileID(context: Context, canonical: CanonicalTileID, hasBorder: boolean, allowPoles: boolean, usage: TileMeshUsage): Mesh {\n // Stencil granularity must match fill granularity\n const granularityConfig = usage === 'stencil' ? granularitySettingsGlobe.stencil : granularitySettingsGlobe.tile;\n const granularity = granularityConfig.getGranularityForZoomLevel(canonical.z);\n const north = (canonical.y === 0) && allowPoles;\n const south = (canonical.y === (1 << canonical.z) - 1) && allowPoles;\n return this._getMesh(context, {\n granularity,\n generateBorders: hasBorder,\n extendToNorthPole: north,\n extendToSouthPole: south,\n });\n }\n\n private _getMesh(context: Context, options: CreateTileMeshOptions): Mesh {\n const key = this._getMeshKey(options);\n\n if (key in this._tileMeshCache) {\n return this._tileMeshCache[key];\n }\n\n const mesh = createTileMeshWithBuffers(context, options);\n this._tileMeshCache[key] = mesh;\n return mesh;\n }\n\n recalculate(_params: EvaluationParameters): void {\n // Do nothing.\n }\n\n hasTransition(): boolean {\n const currentTime = now();\n let dirty = false;\n // Error correction transition\n dirty = dirty || (currentTime - this._errorMeasurementLastChangeTime) / 1000.0 < (globeConstants.errorTransitionTimeSeconds + 0.2);\n // Error correction query in flight\n dirty = dirty || (this._errorMeasurement && this._errorMeasurement.awaitingQuery);\n return dirty;\n }\n\n setErrorQueryLatitudeDegrees(value: number) {\n this._errorQueryLatitudeDegrees = value;\n }\n}","import {ProjectionDefinition, type ProjectionDefinitionSpecification, type ProjectionSpecification, type StylePropertySpecification, latest as styleSpec} from '@maplibre/maplibre-gl-style-spec';\nimport {DataConstantProperty, type PossiblyEvaluated, Properties, Transitionable, type Transitioning, type TransitionParameters} from '../../style/properties';\nimport {Evented} from '../../util/evented';\nimport {EvaluationParameters} from '../../style/evaluation_parameters';\nimport {MercatorProjection} from './mercator_projection';\nimport {VerticalPerspectiveProjection} from './vertical_perspective_projection';\nimport {type Projection, type ProjectionGPUContext, type TileMeshUsage} from './projection';\nimport {type PreparedShader} from '../../shaders/shaders';\nimport {type SubdivisionGranularitySetting} from '../../render/subdivision_granularity_settings';\nimport {type Context} from '../../gl/context';\nimport {type CanonicalTileID} from '../../tile/tile_id';\nimport {type Mesh} from '../../render/mesh';\n\ntype ProjectionProps = {\n type: DataConstantProperty;\n};\n\ntype ProjectionPossiblyEvaluated = {\n type: ProjectionDefinitionSpecification;\n};\n\nconst properties: Properties = new Properties({\n 'type': new DataConstantProperty(styleSpec.projection.type as StylePropertySpecification)\n});\n\nexport class GlobeProjection extends Evented implements Projection {\n properties: PossiblyEvaluated;\n\n _transitionable: Transitionable;\n _transitioning: Transitioning;\n _mercatorProjection: MercatorProjection;\n _verticalPerspectiveProjection: VerticalPerspectiveProjection;\n\n constructor(projection?: ProjectionSpecification) {\n super();\n this._transitionable = new Transitionable(properties, undefined);\n this.setProjection(projection);\n this._transitioning = this._transitionable.untransitioned();\n this.recalculate(new EvaluationParameters(0));\n this._mercatorProjection = new MercatorProjection();\n this._verticalPerspectiveProjection = new VerticalPerspectiveProjection();\n }\n\n public get transitionState(): number {\n const currentProjectionSpecValue = this.properties.get('type');\n if (typeof currentProjectionSpecValue === 'string' && currentProjectionSpecValue === 'mercator') {\n return 0;\n }\n if (typeof currentProjectionSpecValue === 'string' && currentProjectionSpecValue === 'vertical-perspective') {\n return 1;\n }\n if (currentProjectionSpecValue instanceof ProjectionDefinition) {\n if (currentProjectionSpecValue.from === 'vertical-perspective' && currentProjectionSpecValue.to === 'mercator') {\n return 1 - currentProjectionSpecValue.transition;\n }\n if (currentProjectionSpecValue.from === 'mercator' && currentProjectionSpecValue.to === 'vertical-perspective') {\n return currentProjectionSpecValue.transition;\n }\n };\n return 1;\n }\n\n get useGlobeRendering(): boolean {\n return this.transitionState > 0;\n }\n\n get latitudeErrorCorrectionRadians(): number { return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians; }\n\n private get currentProjection(): Projection {\n return this.useGlobeRendering ? this._verticalPerspectiveProjection : this._mercatorProjection;\n }\n\n get name(): ProjectionSpecification['type'] {\n return 'globe';\n }\n\n get useSubdivision(): boolean {\n return this.currentProjection.useSubdivision;\n }\n\n get shaderVariantName(): string {\n return this.currentProjection.shaderVariantName;\n }\n\n get shaderDefine(): string {\n return this.currentProjection.shaderDefine;\n }\n\n get shaderPreludeCode(): PreparedShader {\n return this.currentProjection.shaderPreludeCode;\n }\n\n get vertexShaderPreludeCode(): string {\n return this.currentProjection.vertexShaderPreludeCode;\n }\n\n get subdivisionGranularity(): SubdivisionGranularitySetting {\n return this.currentProjection.subdivisionGranularity;\n }\n\n get useGlobeControls(): boolean {\n return this.transitionState > 0;\n }\n\n public destroy(): void {\n this._mercatorProjection.destroy();\n this._verticalPerspectiveProjection.destroy();\n }\n\n public updateGPUdependent(context: ProjectionGPUContext): void {\n this._mercatorProjection.updateGPUdependent(context);\n this._verticalPerspectiveProjection.updateGPUdependent(context);\n }\n\n public getMeshFromTileID(context: Context, _tileID: CanonicalTileID, _hasBorder: boolean, _allowPoles: boolean, _usage: TileMeshUsage): Mesh {\n return this.currentProjection.getMeshFromTileID(context, _tileID, _hasBorder, _allowPoles, _usage);\n }\n\n setProjection(projection?: ProjectionSpecification) {\n this._transitionable.setValue('type', projection?.type || 'mercator');\n }\n\n updateTransitions(parameters: TransitionParameters) {\n this._transitioning = this._transitionable.transitioned(parameters, this._transitioning);\n }\n\n hasTransition(): boolean {\n return this._transitioning.hasTransition() || this.currentProjection.hasTransition();\n }\n\n recalculate(parameters: EvaluationParameters) {\n this.properties = this._transitioning.possiblyEvaluate(parameters);\n }\n\n setErrorQueryLatitudeDegrees(value: number) {\n this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(value);\n this._mercatorProjection.setErrorQueryLatitudeDegrees(value);\n }\n}\n","import {type ReadonlyVec4, vec3} from 'gl-matrix';\nimport {clamp, createVec3f64, lerp, MAX_VALID_LATITUDE, mod, remapSaturate, scaleZoom, wrap} from '../../util/util';\nimport {LngLat} from '../lng_lat';\nimport {EXTENT} from '../../data/extent';\nimport type Point from '@mapbox/point-geometry';\n\nexport function getGlobeCircumferencePixels(transform: {worldSize: number; center: {lat: number}}): number {\n const radius = getGlobeRadiusPixels(transform.worldSize, transform.center.lat);\n const circumference = 2.0 * Math.PI * radius;\n return circumference;\n}\n\nexport function globeDistanceOfLocationsPixels(transform: {worldSize: number; center: {lat: number}}, a: LngLat, b: LngLat): number {\n const vecA = angularCoordinatesToSurfaceVector(a);\n const vecB = angularCoordinatesToSurfaceVector(b);\n const dot = vec3.dot(vecA, vecB);\n const radians = Math.acos(dot);\n const circumference = getGlobeCircumferencePixels(transform);\n return radians / (2.0 * Math.PI) * circumference;\n}\n\n/**\n * For given mercator coordinates in range 0..1, returns the angular coordinates on the sphere's surface, in radians.\n */\nexport function mercatorCoordinatesToAngularCoordinatesRadians(mercatorX: number, mercatorY: number): [number, number] {\n const sphericalX = mod(mercatorX * Math.PI * 2.0 + Math.PI, Math.PI * 2);\n const sphericalY = 2.0 * Math.atan(Math.exp(Math.PI - (mercatorY * Math.PI * 2.0))) - Math.PI * 0.5;\n return [sphericalX, sphericalY];\n}\n\n/**\n * For a given longitude and latitude (note: in radians) returns the normalized vector from the planet center to the specified place on the surface.\n * @param lngRadians - Longitude in radians.\n * @param latRadians - Latitude in radians.\n */\nexport function angularCoordinatesRadiansToVector(lngRadians: number, latRadians: number): vec3 {\n const len = Math.cos(latRadians);\n const vec = new Float64Array(3) as any;\n vec[0] = Math.sin(lngRadians) * len;\n vec[1] = Math.sin(latRadians);\n vec[2] = Math.cos(lngRadians) * len;\n return vec;\n}\n\n/**\n * Projects a point within a tile to the surface of the unit sphere globe.\n * @param inTileX - X coordinate inside the tile in range [0 .. 8192].\n * @param inTileY - Y coordinate inside the tile in range [0 .. 8192].\n * @param tileIdX - Tile's X coordinate in range [0 .. 2^zoom - 1].\n * @param tileIdY - Tile's Y coordinate in range [0 .. 2^zoom - 1].\n * @param tileIdZ - Tile's zoom.\n * @returns A 3D vector - coordinates of the projected point on a unit sphere.\n */\nexport function projectTileCoordinatesToSphere(inTileX: number, inTileY: number, tileIdX: number, tileIdY: number, tileIdZ: number): vec3 {\n // This code could be assembled from 3 functions, but this is a hot path for symbol placement,\n // so for optimization purposes everything is inlined by hand.\n //\n // Non-inlined variant of this function would be this:\n // const mercator = tileCoordinatesToMercatorCoordinates(inTileX, inTileY, tileID);\n // const angular = mercatorCoordinatesToAngularCoordinatesRadians(mercator.x, mercator.y);\n // const sphere = angularCoordinatesRadiansToVector(angular[0], angular[1]);\n // return sphere;\n const scale = 1.0 / (1 << tileIdZ);\n const mercatorX = inTileX / EXTENT * scale + tileIdX * scale;\n const mercatorY = inTileY / EXTENT * scale + tileIdY * scale;\n const sphericalX = mod(mercatorX * Math.PI * 2.0 + Math.PI, Math.PI * 2);\n const sphericalY = 2.0 * Math.atan(Math.exp(Math.PI - (mercatorY * Math.PI * 2.0))) - Math.PI * 0.5;\n const len = Math.cos(sphericalY);\n const vec = new Float64Array(3) as any;\n vec[0] = Math.sin(sphericalX) * len;\n vec[1] = Math.sin(sphericalY);\n vec[2] = Math.cos(sphericalX) * len;\n return vec;\n}\n\n/**\n * For a given longitude and latitude (note: in degrees) returns the normalized vector from the planet center to the specified place on the surface.\n */\nexport function angularCoordinatesToSurfaceVector(lngLat: LngLat): vec3 {\n return angularCoordinatesRadiansToVector(lngLat.lng * Math.PI / 180, lngLat.lat * Math.PI / 180);\n}\n\nexport function getGlobeRadiusPixels(worldSize: number, latitudeDegrees: number) {\n // We want zoom levels to be consistent between globe and flat views.\n // This means that the pixel size of features at the map center point\n // should be the same for both globe and flat view.\n // For this reason we scale the globe up when map center is nearer to the poles.\n return worldSize / (2.0 * Math.PI) / Math.cos(latitudeDegrees * Math.PI / 180);\n}\n\n/**\n * Given a 3D point on the surface of a unit sphere, returns its angular coordinates in degrees.\n * The input vector must be normalized.\n */\nexport function sphereSurfacePointToCoordinates(surface: vec3): LngLat {\n const latRadians = Math.asin(surface[1]);\n const latDegrees = latRadians / Math.PI * 180.0;\n const lengthXZ = Math.sqrt(surface[0] * surface[0] + surface[2] * surface[2]);\n if (lengthXZ > 1e-6) {\n const projX = surface[0] / lengthXZ;\n const projZ = surface[2] / lengthXZ;\n const acosZ = Math.acos(projZ);\n const lngRadians = (projX > 0) ? acosZ : -acosZ;\n const lngDegrees = lngRadians / Math.PI * 180.0;\n return new LngLat(wrap(lngDegrees, -180, 180), latDegrees);\n } else {\n return new LngLat(0.0, latDegrees);\n }\n}\n\n/**\n * Given a normalized horizon plane in Ax+By+Cz+D=0 format, compute the center and radius of\n * the circle in that plain that contains the entire visible portion of the unit sphere from horizon\n * to horizon.\n * @param horizonPlane - The plane that passes through visible horizon in Ax + By + Cz + D = 0 format where mag(A,B,C)=1\n * @returns the center point and radius of the disc that passes through the entire visible horizon\n */\nexport function horizonPlaneToCenterAndRadius(horizonPlane: ReadonlyVec4): { center: vec3; radius: number } {\n const center = createVec3f64();\n center[0] = horizonPlane[0] * -horizonPlane[3];\n center[1] = horizonPlane[1] * -horizonPlane[3];\n center[2] = horizonPlane[2] * -horizonPlane[3];\n /*\n .*******\n ****|\\\n ** | \\\n ** | 1\n * radius | \\\n * | \\\n * center +--D--+(0,0,0)\n */\n const radius = Math.sqrt(1 - horizonPlane[3] * horizonPlane[3]);\n return {center, radius};\n}\n\n/**\n * Computes the closest point on a sphere to `point`.\n * @param center - Center of the sphere\n * @param radius - Radius of the sphere\n * @param point - Point inside or outside the sphere\n * @returns A 3d vector of the point on the sphere closest to `point`\n */\nexport function clampToSphere(center: vec3, radius: number, point: vec3) {\n const relativeToCenter = createVec3f64();\n vec3.sub(relativeToCenter, point, center);\n const clamped = createVec3f64();\n vec3.scaleAndAdd(clamped, center, relativeToCenter, radius / vec3.len(relativeToCenter));\n return clamped;\n}\n\nfunction planetScaleAtLatitude(latitudeDegrees: number): number {\n return Math.cos(latitudeDegrees * Math.PI / 180);\n}\n\n/**\n * Computes how much to modify zoom to keep the globe size constant when changing latitude.\n * @param transform - An instance of any transform. Does not have any relation on the computed values.\n * @param oldLat - Latitude before change, in degrees.\n * @param newLat - Latitude after change, in degrees.\n * @returns A value to add to zoom level used for old latitude to keep same planet radius at new latitude.\n */\nexport function getZoomAdjustment(oldLat: number, newLat: number): number {\n const oldCircumference = planetScaleAtLatitude(oldLat);\n const newCircumference = planetScaleAtLatitude(newLat);\n return scaleZoom(newCircumference / oldCircumference);\n}\n\nexport function getDegreesPerPixel(worldSize: number, lat: number): number {\n return 360.0 / getGlobeCircumferencePixels({worldSize, center: {lat}});\n}\n\n/**\n * Returns transform's new center rotation after applying panning.\n * @param panDelta - Panning delta, in same units as what is supplied to {@link HandlerManager}.\n * @param tr - Current transform. This object is not modified by the function.\n * @returns New center location to set to the map's transform to apply the specified panning.\n */\nexport function computeGlobePanCenter(panDelta: Point, tr: {\n readonly bearingInRadians: number;\n readonly worldSize: number;\n readonly center: LngLat;\n readonly zoom: number;\n}): LngLat {\n // Apply map bearing to the panning vector\n const rotatedPanDelta = panDelta.rotate(tr.bearingInRadians);\n // Compute what the current zoom would be if the transform center would be moved to latitude 0.\n const normalizedGlobeZoom = tr.zoom + getZoomAdjustment(tr.center.lat, 0);\n // Note: we divide longitude speed by planet width at the given latitude. But we diminish this effect when the globe is zoomed out a lot.\n const lngSpeed = lerp(\n 1.0 / planetScaleAtLatitude(tr.center.lat), // speed adjusted by latitude\n 1.0 / planetScaleAtLatitude(Math.min(Math.abs(tr.center.lat), 60)), // also adjusted, but latitude is clamped to 60° to avoid too large speeds near poles\n remapSaturate(normalizedGlobeZoom, 7, 3, 0, 1.0) // Values chosen so that globe interactions feel good. Not scientific by any means.\n );\n const panningDegreesPerPixel = getDegreesPerPixel(tr.worldSize, tr.center.lat);\n return new LngLat(\n tr.center.lng - rotatedPanDelta.x * panningDegreesPerPixel * lngSpeed,\n clamp(tr.center.lat + rotatedPanDelta.y * panningDegreesPerPixel, -MAX_VALID_LATITUDE, MAX_VALID_LATITUDE)\n );\n}\n\n/**\n * Integration of `1 / cos(x)`.\n */\nfunction integrateSecX(x: number): number {\n const xHalf = 0.5 * x;\n const sin = Math.sin(xHalf);\n const cos = Math.cos(xHalf);\n return Math.log(sin + cos) - Math.log(cos - sin);\n}\n\n/**\n * Interpolates globe center between two locations while preserving apparent rotation speed during interpolation.\n * @param start - The starting location of the interpolation.\n * @param deltaLng - Longitude delta to the end of the interpolation.\n * @param deltaLat - Latitude delta to the end of the interpolation.\n * @param t - The interpolation point in [0..1], where 0 is starting location, 1 is end location and other values are in between.\n * @returns The interpolated location.\n */\nexport function interpolateLngLatForGlobe(start: LngLat, deltaLng: number, deltaLat: number, t: number): LngLat {\n // Rate of change of longitude when moving the globe should be roughly 1/cos(latitude)\n // We want to use this rate of change, even for interpolation during easing.\n // Thus we know the derivative of our interpolation function: 1/cos(x)\n // To get our interpolation function, we need to integrate that.\n\n const interpolatedLat = start.lat + deltaLat * t;\n\n if (Math.abs(deltaLat) > 1) {\n const endLat = start.lat + deltaLat;\n const onDifferentHemispheres = Math.sign(endLat) !== Math.sign(start.lat);\n // Where do we sample the integrated speed curve?\n const samplePointStart = (onDifferentHemispheres ? -Math.abs(start.lat) : Math.abs(start.lat)) * Math.PI / 180;\n const samplePointEnd = Math.abs(start.lat + deltaLat) * Math.PI / 180;\n // Read the integrated speed curve at those points, and at the interpolation value \"t\".\n const valueT = integrateSecX(samplePointStart + t * (samplePointEnd - samplePointStart));\n const valueStart = integrateSecX(samplePointStart);\n const valueEnd = integrateSecX(samplePointEnd);\n // Compute new interpolation factor based on the speed curve\n const newT = (valueT - valueStart) / (valueEnd - valueStart);\n // Interpolate using that factor\n const interpolatedLng = start.lng + deltaLng * newT;\n return new LngLat(\n interpolatedLng,\n interpolatedLat\n );\n } else {\n // Fall back to simple interpolation when latitude doesn't change much.\n const interpolatedLng = start.lng + deltaLng * t;\n return new LngLat(\n interpolatedLng,\n interpolatedLat\n );\n }\n}\n","import {type CoveringTilesOptionsInternal} from '../../geo/projection/covering_tiles';\nimport {type IBoundingVolume} from './bounding_volume';\n\ntype BoundingVolumeFactory = (tileID: {x: number; y: number; z: number}, wrap: number, elevation: number, options: CoveringTilesOptionsInternal) => T;\n\nexport class BoundingVolumeCache {\n private _cachePrevious: Map = new Map();\n private _cache: Map = new Map();\n private _hadAnyChanges = false;\n private _boundingVolumeFactory: BoundingVolumeFactory;\n\n constructor(boundingVolumeFactory: BoundingVolumeFactory) {\n this._boundingVolumeFactory = boundingVolumeFactory;\n }\n\n /**\n * Prepares bounding volume cache for next frame. Call at the beginning of a frame.\n * Bounding volume of any tile accesses in the last frame is kept in the cache, other (unaccessed) bounding volumes are deleted.\n */\n swapBuffers() {\n if (!this._hadAnyChanges) {\n // If no new bounding volumes were added this frame, no need to conserve memory, do not clear caches.\n return;\n }\n const oldCache = this._cachePrevious;\n this._cachePrevious = this._cache;\n this._cache = oldCache;\n this._cache.clear();\n this._hadAnyChanges = false;\n }\n\n /**\n * Returns the bounding volume of the specified tile, fetching it from cache or creating it using the factory function if needed.\n * @param tileID - Tile x, y and z for zoom.\n */\n getTileBoundingVolume(tileID: {x: number; y: number; z: number}, wrap: number, elevation: number, options: CoveringTilesOptionsInternal): T {\n const key = `${tileID.z}_${tileID.x}_${tileID.y}_${options?.terrain ? 't' : ''}`;\n const cached = this._cache.get(key);\n if (cached) {\n return cached;\n }\n const cachedPrevious = this._cachePrevious.get(key);\n if (cachedPrevious) {\n this._cache.set(key, cachedPrevious);\n return cachedPrevious;\n }\n const boundingVolume = this._boundingVolumeFactory(tileID, wrap, elevation, options);\n this._cache.set(key, boundingVolume);\n this._hadAnyChanges = true;\n return boundingVolume;\n }\n}\n","import {quat, vec3, type vec4} from 'gl-matrix';\nimport {type Frustum} from './frustum';\nimport {IntersectionResult, type IBoundingVolume} from './bounding_volume';\n\n/**\n * A general convex bounding volume, defined by a set of points.\n */\nexport class ConvexVolume implements IBoundingVolume {\n // Precomputed AABB for rejecting frustum intersection.\n min: vec3;\n max: vec3;\n\n points: vec3[];\n planes: vec4[];\n\n /**\n * Creates an instance of a general convex bounding volume.\n * Note that the provided points array is used *as is*, its contents are not copied!\n *\n * Additionally, an AABB must be provided for rejecting frustum intersections.\n * This AABB does not need to bound this convex volume (it may be smaller),\n * but it *must* accurately bound the actual shape this volume is approximating.\n * @param points - Points forming the convex shape. Note that this array reference is used *as is*, its contents are not copied!\n * @param min - The bounding AABB's min point.\n * @param max - The bounding AABB's min point.\n */\n constructor(points: vec3[], planes: vec4[], min: vec3, max: vec3) {\n this.min = min;\n this.max = max;\n this.points = points;\n this.planes = planes;\n }\n\n /**\n * Creates a convex BV equivalent to the specified AABB.\n * @param min - The AABB's min point.\n * @param max - The AABB's max point.\n */\n public static fromAabb(min: vec3, max: vec3): ConvexVolume {\n const points = [];\n for (let i = 0; i < 8; i++) {\n points.push([\n ((i >> 0) & 1) === 1 ? max[0] : min[0],\n ((i >> 1) & 1) === 1 ? max[1] : min[1],\n ((i >> 2) & 1) === 1 ? max[2] : min[2]\n ]);\n }\n return new ConvexVolume(points, [\n [-1, 0, 0, max[0]],\n [1, 0, 0, -min[0]],\n [0, -1, 0, max[1]],\n [0, 1, 0, -min[1]],\n [0, 0, -1, max[2]],\n [0, 0, 1, -min[2]]\n ], min, max);\n }\n\n /**\n * Creates a convex bounding volume that is actually an oriented bounding box created from the specified center, half-size and rotation angles.\n * @param center - Center of the OBB.\n * @param halfSize - The half-size of the OBB in each axis. The box will extend by this value in each direction for the given axis.\n * @param angles - The rotation of the box. Euler angles, in degrees.\n */\n public static fromCenterSizeAngles(center: vec3, halfSize: vec3, angles: vec3): ConvexVolume {\n const q = quat.fromEuler([] as any, angles[0], angles[1], angles[2]);\n const axisX = vec3.transformQuat([] as any, [halfSize[0], 0, 0], q);\n const axisY = vec3.transformQuat([] as any, [0, halfSize[1], 0], q);\n const axisZ = vec3.transformQuat([] as any, [0, 0, halfSize[2]], q);\n // Find the AABB min/max\n const min = [...center] as vec3;\n const max = [...center] as vec3;\n for (let i = 0; i < 8; i++) {\n for (let axis = 0; axis < 3; axis++) {\n const point = center[axis]\n + axisX[axis] * ((((i >> 0) & 1) === 1) ? 1 : -1)\n + axisY[axis] * ((((i >> 1) & 1) === 1) ? 1 : -1)\n + axisZ[axis] * ((((i >> 2) & 1) === 1) ? 1 : -1);\n min[axis] = Math.min(min[axis], point);\n max[axis] = Math.max(max[axis], point);\n }\n }\n const points = [];\n for (let i = 0; i < 8; i++) {\n const p = [...center] as vec3;\n vec3.add(p, p, vec3.scale([] as any, axisX, ((i >> 0) & 1) === 1 ? 1 : -1));\n vec3.add(p, p, vec3.scale([] as any, axisY, ((i >> 1) & 1) === 1 ? 1 : -1));\n vec3.add(p, p, vec3.scale([] as any, axisZ, ((i >> 2) & 1) === 1 ? 1 : -1));\n points.push(p);\n }\n return new ConvexVolume(points, [\n [...axisX, -vec3.dot(axisX, points[0])] as vec4,\n [...axisY, -vec3.dot(axisY, points[0])] as vec4,\n [...axisZ, -vec3.dot(axisZ, points[0])] as vec4,\n [-axisX[0], -axisX[1], -axisX[2], -vec3.dot(axisX, points[7])] as vec4,\n [-axisY[0], -axisY[1], -axisY[2], -vec3.dot(axisY, points[7])] as vec4,\n [-axisZ[0], -axisZ[1], -axisZ[2], -vec3.dot(axisZ, points[7])] as vec4,\n ], min, max);\n }\n\n /**\n * Performs an approximate frustum-obb intersection test.\n */\n intersectsFrustum(frustum: Frustum): IntersectionResult {\n // Performance-critical\n let fullyInside = true;\n\n const boxPointCount = this.points.length;\n const boxPlaneCount = this.planes.length;\n const frustumPlaneCount = frustum.planes.length;\n const frustumPointCount = frustum.points.length;\n\n // Test whether this volume's points are inside the frustum\n for (let i = 0; i < frustumPlaneCount; i++) {\n const plane = frustum.planes[i];\n let boxPointsPassed = 0;\n for(let j = 0; j < boxPointCount; j++) {\n const point = this.points[j];\n // Get point-plane distance sign\n if (plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3] >= 0) {\n boxPointsPassed++;\n }\n }\n\n if (boxPointsPassed === 0) {\n return IntersectionResult.None;\n }\n if (boxPointsPassed < boxPointCount) {\n fullyInside = false;\n }\n }\n\n if (fullyInside) {\n return IntersectionResult.Full;\n }\n\n // Test whether the frustum's points are inside this volume.\n for (let i = 0; i < boxPlaneCount; i++) {\n const plane = this.planes[i];\n let frustumPointsPassed = 0;\n for (let j = 0; j < frustumPointCount; j++) {\n const point = frustum.points[j];\n if (plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3] >= 0) {\n frustumPointsPassed++;\n }\n }\n if (frustumPointsPassed === 0) {\n return IntersectionResult.None;\n }\n }\n\n return IntersectionResult.Partial;\n }\n\n /**\n * Performs an intersection test with a halfspace.\n */\n intersectsPlane(plane: vec4): IntersectionResult {\n const pointCount = this.points.length;\n let positivePoints = 0;\n for (let i = 0; i < pointCount; i++) {\n const point = this.points[i];\n if (plane[0] * point[0] + plane[1] * point[1] + plane[2] * point[2] + plane[3] >= 0) {\n positivePoints++;\n }\n }\n\n if (positivePoints === pointCount) {\n return IntersectionResult.Full;\n }\n if (positivePoints === 0) {\n return IntersectionResult.None;\n }\n return IntersectionResult.Partial;\n }\n}\n","import {EXTENT} from '../../data/extent';\nimport {projectTileCoordinatesToSphere} from './globe_utils';\nimport {BoundingVolumeCache} from '../../util/primitives/bounding_volume_cache';\nimport {coveringZoomLevel, type CoveringTilesOptionsInternal} from './covering_tiles';\nimport {vec3, type vec4} from 'gl-matrix';\nimport type {IReadonlyTransform} from '../transform_interface';\nimport type {MercatorCoordinate} from '../mercator_coordinate';\nimport type {CoveringTilesDetailsProvider} from './covering_tiles_details_provider';\nimport {OverscaledTileID} from '../../tile/tile_id';\nimport {earthRadius} from '../lng_lat';\nimport {ConvexVolume} from '../../util/primitives/convex_volume';\nimport {threePlaneIntersection} from '../../util/util';\n\n/**\n * Computes distance of a point to a tile in an arbitrary axis.\n * World is assumed to have size 1, distance returned is to the nearer tile edge.\n * @param point - Point position.\n * @param tile - Tile position.\n * @param tileSize - Tile size.\n */\nfunction distanceToTileSimple(point: number, tile: number, tileSize: number): number {\n const delta = point - tile;\n return (delta < 0) ? -delta : Math.max(0, delta - tileSize);\n}\n\nfunction distanceToTileWrapX(pointX: number, pointY: number, tileCornerX: number, tileCornerY: number, tileSize: number): number {\n const tileCornerToPointX = pointX - tileCornerX;\n\n let distanceX: number;\n if (tileCornerToPointX < 0) {\n // Point is left of tile\n distanceX = Math.min(-tileCornerToPointX, 1.0 + tileCornerToPointX - tileSize);\n } else if (tileCornerToPointX > 1) {\n // Point is right of tile\n distanceX = Math.min(Math.max(tileCornerToPointX - tileSize, 0), 1.0 - tileCornerToPointX);\n } else {\n // Point is inside tile in the X axis.\n distanceX = 0;\n }\n\n return Math.max(distanceX, distanceToTileSimple(pointY, tileCornerY, tileSize));\n}\n\nexport class GlobeCoveringTilesDetailsProvider implements CoveringTilesDetailsProvider {\n private _boundingVolumeCache: BoundingVolumeCache = new BoundingVolumeCache(this._computeTileBoundingVolume);\n\n /**\n * Prepares the internal bounding volume cache for the next frame.\n */\n prepareNextFrame() {\n this._boundingVolumeCache.swapBuffers();\n }\n\n /**\n * Returns the distance of a point to a square tile. If the point is inside the tile, returns 0.\n * Assumes the world to be of size 1.\n * Handles distances on a sphere correctly: X is wrapped when crossing the antimeridian,\n * when crossing the poles Y is mirrored and X is shifted by half world size.\n */\n distanceToTile2d(pointX: number, pointY: number, tileID: {x: number; y: number; z: number}, _bv: ConvexVolume): number {\n const scale = 1 << tileID.z;\n const tileMercatorSize = 1.0 / scale;\n const tileCornerX = tileID.x / scale; // In range 0..1\n const tileCornerY = tileID.y / scale; // In range 0..1\n\n const worldSize = 1.0;\n const halfWorld = 0.5 * worldSize;\n let smallestDistance = 2.0 * worldSize;\n // Original tile\n smallestDistance = Math.min(smallestDistance, distanceToTileWrapX(pointX, pointY, tileCornerX, tileCornerY, tileMercatorSize));\n // Up\n smallestDistance = Math.min(smallestDistance, distanceToTileWrapX(pointX, pointY, tileCornerX + halfWorld, -tileCornerY - tileMercatorSize, tileMercatorSize));\n // Down\n smallestDistance = Math.min(smallestDistance, distanceToTileWrapX(pointX, pointY, tileCornerX + halfWorld, worldSize + worldSize - tileCornerY - tileMercatorSize, tileMercatorSize));\n\n return smallestDistance;\n }\n\n /**\n * Returns the wrap value for a given tile, computed so that tiles will remain loaded when crossing the antimeridian.\n */\n getWrap(centerCoord: MercatorCoordinate, tileID: {x: number; y: number; z: number}, _parentWrap: number): number {\n const scale = 1 << tileID.z;\n const tileMercatorSize = 1.0 / scale;\n const tileX = tileID.x / scale; // In range 0..1\n const distanceCurrent = distanceToTileSimple(centerCoord.x, tileX, tileMercatorSize);\n const distanceLeft = distanceToTileSimple(centerCoord.x, tileX - 1.0, tileMercatorSize);\n const distanceRight = distanceToTileSimple(centerCoord.x, tileX + 1.0, tileMercatorSize);\n const distanceSmallest = Math.min(distanceCurrent, distanceLeft, distanceRight);\n if (distanceSmallest === distanceRight) {\n return 1;\n }\n if (distanceSmallest === distanceLeft) {\n return -1;\n }\n return 0;\n }\n \n allowVariableZoom(transform: IReadonlyTransform, options: CoveringTilesOptionsInternal): boolean {\n return coveringZoomLevel(transform, options) > 4;\n }\n\n allowWorldCopies(): boolean {\n return false;\n }\n\n getTileBoundingVolume(tileID: { x: number; y: number; z: number }, wrap: number, elevation: number, options: CoveringTilesOptionsInternal) {\n return this._boundingVolumeCache.getTileBoundingVolume(tileID, wrap, elevation, options);\n }\n\n private _computeTileBoundingVolume(tileID: {x: number; y: number; z: number}, wrap: number, elevation: number, options: CoveringTilesOptionsInternal): ConvexVolume {\n let minElevation = 0;\n let maxElevation = 0;\n if (options?.terrain) {\n const overscaledTileID = new OverscaledTileID(tileID.z, wrap, tileID.z, tileID.x, tileID.y);\n const minMax = options.terrain.getMinMaxElevation(overscaledTileID);\n minElevation = minMax.minElevation ?? Math.min(0, elevation);\n maxElevation = minMax.maxElevation ?? Math.max(0, elevation);\n }\n // Convert elevation to distances from center of a unit sphere planet (so that 1 is surface)\n minElevation /= earthRadius;\n maxElevation /= earthRadius;\n minElevation += 1;\n maxElevation += 1;\n\n if (tileID.z <= 0) {\n // Tile covers the entire sphere.\n return ConvexVolume.fromAabb( // We return an AABB in this case.\n [-maxElevation, -maxElevation, -maxElevation],\n [maxElevation, maxElevation, maxElevation]\n );\n } else if (tileID.z === 1) {\n // Tile covers a quarter of the sphere.\n // X is 1 at lng=E90°\n // Y is 1 at **north** pole\n // Z is 1 at null island\n return ConvexVolume.fromAabb( // We also just use AABBs for this zoom level.\n [tileID.x === 0 ? -maxElevation : 0, tileID.y === 0 ? 0 : -maxElevation, -maxElevation],\n [tileID.x === 0 ? 0 : maxElevation, tileID.y === 0 ? maxElevation : 0, maxElevation]\n );\n } else {\n const corners = [\n projectTileCoordinatesToSphere(0, 0, tileID.x, tileID.y, tileID.z),\n projectTileCoordinatesToSphere(EXTENT, 0, tileID.x, tileID.y, tileID.z),\n projectTileCoordinatesToSphere(EXTENT, EXTENT, tileID.x, tileID.y, tileID.z),\n projectTileCoordinatesToSphere(0, EXTENT, tileID.x, tileID.y, tileID.z),\n ];\n\n const extremesPoints = [];\n\n for (const c of corners) {\n extremesPoints.push(vec3.scale([] as any, c, maxElevation));\n }\n\n if (maxElevation !== minElevation) {\n // Only add additional points if terrain is enabled and is not flat.\n for (const c of corners) {\n extremesPoints.push(vec3.scale([] as any, c, minElevation));\n }\n }\n\n // Special handling of poles - we need to extend the tile AABB\n // to include the pole for tiles that border mercator north/south edge.\n if (tileID.y === 0) {\n extremesPoints.push([0, 1, 0]); // North pole\n }\n if (tileID.y === (1 << tileID.z) - 1) {\n extremesPoints.push([0, -1, 0]); // South pole\n }\n\n // Compute a best-fit AABB for the frustum rejection test\n const aabbMin: vec3 = [1, 1, 1];\n const aabbMax: vec3 = [-1, -1, -1];\n\n for (const c of extremesPoints) {\n for (let i = 0; i < 3; i++) {\n aabbMin[i] = Math.min(aabbMin[i], c[i]);\n aabbMax[i] = Math.max(aabbMax[i], c[i]);\n }\n }\n\n // Now we compute the actual bounding volume.\n // The up/down plane will be normal to the tile's center.\n // The north/south plane will be used for the tile's north and south edge and will be orthogonal to the up/down plane.\n // The left and right planes will be determined by the tile's east/west edges and will differ slightly - we are not creating a box!\n // We will find the min and max extents for the up/down and north/south planes using the set of points\n // where the extremes are likely to lie.\n\n // Vector \"center\" (from planet center to tile center) will be our up/down axis.\n const center = projectTileCoordinatesToSphere(EXTENT / 2, EXTENT / 2, tileID.x, tileID.y, tileID.z);\n // Vector to the east of \"center\".\n const centerEast = vec3.cross([] as any, [0, 1, 0], center);\n vec3.normalize(centerEast, centerEast);\n // Vector to the north of \"center\" will be our north/south axis.\n const north = vec3.cross([] as any, center, centerEast);\n vec3.normalize(north, north);\n\n // Axes for the east and west edge of our bounding volume.\n // These axes are NOT opposites of each other, they differ!\n // They are also not orthogonal to the up/down and north/south axes.\n const axisEast = vec3.cross([] as any, corners[2], corners[1]);\n vec3.normalize(axisEast, axisEast);\n const axisWest = vec3.cross([] as any, corners[0], corners[3]);\n vec3.normalize(axisWest, axisWest);\n\n // Now we will expand the extremes point set for bounding volume creation.\n // We will also include the tile center point, since it will always be an extreme for the \"center\" axis.\n extremesPoints.push(vec3.scale([] as any, center, maxElevation));\n // No need to include a minElevation-scaled center, since we already have minElevation corners in the set and these will always lie lower than the center.\n\n // The extremes might also lie on the midpoint of the north or south edge.\n // For tiles in the north hemisphere, only the south edge can contain an extreme,\n // since when we imagine the tile's actual shape projected onto the plane normal to \"center\" vector,\n // the tile's north edge will curve towards the tile center, thus its extremes are accounted for by the\n // corners, however the south edge will curve away from the center point, extending beyond the tile's edges,\n // thus it must be included.\n // The poles are an exception - they must always be included in the extremes, if the tile touches the north/south mercator range edge.\n //\n // A tile's exaggerated shape on the northern hemisphere, projected onto the normal plane of \"center\".\n // The \"c\" is the tile's center point. The \"m\" is the edge mid point we are looking for.\n //\n // /-- --\\\n // / ------- \\\n // / \\\n // / c \\\n // / \\\n // /-- --\\\n // ----- -----\n // ---m---\n \n if (tileID.y >= (1 << tileID.z) / 2) {\n // South hemisphere - include the tile's north edge midpoint\n extremesPoints.push(vec3.scale([] as any, projectTileCoordinatesToSphere(EXTENT / 2, 0, tileID.x, tileID.y, tileID.z), maxElevation));\n // No need to include minElevation variant of this point, for the same reason why we don't include minElevation center.\n }\n if (tileID.y < (1 << tileID.z) / 2) {\n // North hemisphere - include the tile's south edge midpoint\n extremesPoints.push(vec3.scale([] as any, projectTileCoordinatesToSphere(EXTENT / 2, EXTENT, tileID.x, tileID.y, tileID.z), maxElevation));\n // No need to include minElevation variant of this point, for the same reason why we don't include minElevation center.\n }\n\n // Find the min and max extends and the midpoints along each axis,\n // using the set of extreme points.\n const upDownMinMax = findAxisMinMax(center, extremesPoints);\n const northSouthMinMax = findAxisMinMax(north, extremesPoints);\n\n const planeUp = [-center[0], -center[1], -center[2], upDownMinMax.max] as vec4;\n const planeDown = [center[0], center[1], center[2], -upDownMinMax.min] as vec4;\n const planeNorth = [-north[0], -north[1], -north[2], northSouthMinMax.max] as vec4;\n const planeSouth = [north[0], north[1], north[2], -northSouthMinMax.min] as vec4;\n const planeEast = [...axisEast, 0] as vec4;\n const planeWest = [...axisWest, 0] as vec4;\n\n const points: vec3[] = [];\n\n // North points\n if (tileID.y === 0) {\n // If the tile borders a pole, then \n points.push(\n threePlaneIntersection(planeWest, planeEast, planeUp),\n threePlaneIntersection(planeWest, planeEast, planeDown),\n );\n } else {\n points.push(\n threePlaneIntersection(planeNorth, planeEast, planeUp),\n threePlaneIntersection(planeNorth, planeEast, planeDown),\n threePlaneIntersection(planeNorth, planeWest, planeUp),\n threePlaneIntersection(planeNorth, planeWest, planeDown)\n );\n }\n\n // South points\n if (tileID.y === (1 << tileID.z) - 1) {\n points.push(\n threePlaneIntersection(planeWest, planeEast, planeUp),\n threePlaneIntersection(planeWest, planeEast, planeDown),\n );\n } else {\n points.push(\n threePlaneIntersection(planeSouth, planeEast, planeUp),\n threePlaneIntersection(planeSouth, planeEast, planeDown),\n threePlaneIntersection(planeSouth, planeWest, planeUp),\n threePlaneIntersection(planeSouth, planeWest, planeDown)\n );\n }\n\n return new ConvexVolume(points, [\n planeUp,\n planeDown,\n planeNorth,\n planeSouth,\n planeEast,\n planeWest\n ], aabbMin, aabbMax);\n }\n }\n}\n\nfunction findAxisMinMax(axis: vec3, points: vec3[]) {\n let min = +Infinity;\n let max = -Infinity;\n for (const c of points) {\n const dot = vec3.dot(axis, c);\n min = Math.min(min, dot);\n max = Math.max(max, dot);\n }\n return {\n min,\n max\n };\n}","import {type mat2, mat4, vec3, vec4} from 'gl-matrix';\nimport {TransformHelper} from '../transform_helper';\nimport {LngLat, type LngLatLike, earthRadius} from '../lng_lat';\nimport {angleToRotateBetweenVectors2D, clamp, createIdentityMat4f32, createIdentityMat4f64, createMat4f64, createVec3f64, createVec4f64, differenceOfAnglesDegrees, distanceOfAnglesRadians, MAX_VALID_LATITUDE, pointPlaneSignedDistance, warnOnce} from '../../util/util';\nimport {OverscaledTileID, UnwrappedTileID, type CanonicalTileID} from '../../tile/tile_id';\nimport Point from '@mapbox/point-geometry';\nimport {MercatorCoordinate} from '../mercator_coordinate';\nimport {LngLatBounds} from '../lng_lat_bounds';\nimport {tileCoordinatesToMercatorCoordinates} from './mercator_utils';\nimport {angularCoordinatesToSurfaceVector, clampToSphere, getGlobeRadiusPixels, getZoomAdjustment, horizonPlaneToCenterAndRadius, mercatorCoordinatesToAngularCoordinatesRadians, projectTileCoordinatesToSphere, sphereSurfacePointToCoordinates} from './globe_utils';\nimport {GlobeCoveringTilesDetailsProvider} from './globe_covering_tiles_details_provider';\nimport {Frustum} from '../../util/primitives/frustum';\n\nimport type {Terrain} from '../../render/terrain';\nimport type {PointProjection} from '../../symbol/projection';\nimport type {IReadonlyTransform, ITransform, TransformConstrainFunction} from '../transform_interface';\nimport type {TransformOptions} from '../transform_helper';\nimport type {PaddingOptions} from '../edge_insets';\nimport type {ProjectionData, ProjectionDataParams} from './projection_data';\nimport type {CoveringTilesDetailsProvider} from './covering_tiles_details_provider';\n\n/**\n * Describes the intersection of ray and sphere.\n * When null, no intersection occurred.\n * When both \"t\" values are the same, the ray just touched the sphere's surface.\n * When both value are different, a full intersection occurred.\n */\ntype RaySphereIntersection = {\n /**\n * The ray parameter for intersection that is \"less\" along the ray direction.\n * Note that this value can be negative, meaning that this intersection occurred before the ray's origin.\n * The intersection point can be computed as `origin + direction * tMin`.\n */\n tMin: number;\n /**\n * The ray parameter for intersection that is \"more\" along the ray direction.\n * Note that this value can be negative, meaning that this intersection occurred before the ray's origin.\n * The intersection point can be computed as `origin + direction * tMax`.\n */\n tMax: number;\n} | null;\n\nexport class VerticalPerspectiveTransform implements ITransform {\n private _helper: TransformHelper;\n\n //\n // Implementation of transform getters and setters\n //\n\n get pixelsToClipSpaceMatrix(): mat4 {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix(): mat4 {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits(): [number, number] {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset(): Point {\n return this._helper.centerOffset;\n }\n get size(): Point {\n return this._helper.size;\n }\n get rotationMatrix(): mat2 {\n return this._helper.rotationMatrix;\n }\n get centerPoint(): Point {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter(): number {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(zoom: number): void {\n this._helper.setMinZoom(zoom);\n }\n setMaxZoom(zoom: number): void {\n this._helper.setMaxZoom(zoom);\n }\n setMinPitch(pitch: number): void {\n this._helper.setMinPitch(pitch);\n }\n setMaxPitch(pitch: number): void {\n this._helper.setMaxPitch(pitch);\n }\n setRenderWorldCopies(renderWorldCopies: boolean): void {\n this._helper.setRenderWorldCopies(renderWorldCopies);\n }\n setBearing(bearing: number): void {\n this._helper.setBearing(bearing);\n }\n setPitch(pitch: number): void {\n this._helper.setPitch(pitch);\n }\n setRoll(roll: number): void {\n this._helper.setRoll(roll);\n }\n setFov(fov: number): void {\n this._helper.setFov(fov);\n }\n setZoom(zoom: number): void {\n this._helper.setZoom(zoom);\n }\n setCenter(center: LngLat): void {\n this._helper.setCenter(center);\n }\n setElevation(elevation: number): void {\n this._helper.setElevation(elevation);\n }\n setMinElevationForCurrentTile(elevation: number): void {\n this._helper.setMinElevationForCurrentTile(elevation);\n }\n setPadding(padding: PaddingOptions): void {\n this._helper.setPadding(padding);\n }\n interpolatePadding(start: PaddingOptions, target: PaddingOptions, t: number): void {\n return this._helper.interpolatePadding(start, target, t);\n }\n isPaddingEqual(padding: PaddingOptions): boolean {\n return this._helper.isPaddingEqual(padding);\n }\n resize(width: number, height: number): void {\n this._helper.resize(width, height);\n }\n getMaxBounds(): LngLatBounds {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(bounds?: LngLatBounds): void {\n this._helper.setMaxBounds(bounds);\n }\n setConstrainOverride(constrain?: TransformConstrainFunction | null): void {\n this._helper.setConstrainOverride(constrain);\n }\n overrideNearFarZ(nearZ: number, farZ: number): void {\n this._helper.overrideNearFarZ(nearZ, farZ);\n }\n clearNearFarZOverride(): void {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(queryGeometry: Point[]): Point[] {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), queryGeometry);\n }\n\n get tileSize(): number {\n return this._helper.tileSize;\n }\n get tileZoom(): number {\n return this._helper.tileZoom;\n }\n get scale(): number {\n return this._helper.scale;\n }\n get worldSize(): number {\n return this._helper.worldSize;\n }\n get width(): number {\n return this._helper.width;\n }\n get height(): number {\n return this._helper.height;\n }\n get lngRange(): [number, number] {\n return this._helper.lngRange;\n }\n get latRange(): [number, number] {\n return this._helper.latRange;\n }\n get minZoom(): number {\n return this._helper.minZoom;\n }\n get maxZoom(): number {\n return this._helper.maxZoom;\n }\n get zoom(): number {\n return this._helper.zoom;\n }\n get center(): LngLat {\n return this._helper.center;\n }\n get minPitch(): number {\n return this._helper.minPitch;\n }\n get maxPitch(): number {\n return this._helper.maxPitch;\n }\n get pitch(): number {\n return this._helper.pitch;\n }\n get pitchInRadians(): number {\n return this._helper.pitchInRadians;\n }\n get roll(): number {\n return this._helper.roll;\n }\n get rollInRadians(): number {\n return this._helper.rollInRadians;\n }\n get bearing(): number {\n return this._helper.bearing;\n }\n get bearingInRadians(): number {\n return this._helper.bearingInRadians;\n }\n get fov(): number {\n return this._helper.fov;\n }\n get fovInRadians(): number {\n return this._helper.fovInRadians;\n }\n get elevation(): number {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile(): number {\n return this._helper.minElevationForCurrentTile;\n }\n get padding(): PaddingOptions {\n return this._helper.padding;\n }\n get unmodified(): boolean {\n return this._helper.unmodified;\n }\n get renderWorldCopies(): boolean {\n return this._helper.renderWorldCopies;\n }\n get constrainOverride(): TransformConstrainFunction {\n return this._helper.constrainOverride;\n }\n public get nearZ(): number { \n return this._helper.nearZ; \n }\n public get farZ(): number { \n return this._helper.farZ; \n }\n public get autoCalculateNearFarZ(): boolean { \n return this._helper.autoCalculateNearFarZ; \n }\n setTransitionState(_value: number): void {\n // Do nothing\n }\n //\n // Implementation of globe transform\n //\n\n private _cachedClippingPlane: vec4 = createVec4f64();\n private _cachedFrustum: Frustum;\n private _projectionMatrix: mat4 = createIdentityMat4f64();\n private _globeViewProjMatrix32f: mat4 = createIdentityMat4f32(); // Must be 32 bit floats, otherwise WebGL calls in Chrome get very slow.\n private _globeViewProjMatrixNoCorrection: mat4 = createIdentityMat4f64();\n private _globeViewProjMatrixNoCorrectionInverted: mat4 = createIdentityMat4f64();\n private _globeProjMatrixInverted: mat4 = createIdentityMat4f64();\n\n private _cameraPosition: vec3 = createVec3f64();\n private _globeLatitudeErrorCorrectionRadians: number = 0;\n /**\n * Globe projection can smoothly interpolate between globe view and mercator. This variable controls this interpolation.\n * Value 0 is mercator, value 1 is globe, anything between is an interpolation between the two projections.\n */\n\n private _coveringTilesDetailsProvider: GlobeCoveringTilesDetailsProvider;\n\n public constructor(options?: TransformOptions) {\n this._helper = new TransformHelper({\n calcMatrices: () => { this._calcMatrices(); },\n defaultConstrain: (center, zoom) => { return this.defaultConstrain(center, zoom); }\n }, options);\n this._coveringTilesDetailsProvider = new GlobeCoveringTilesDetailsProvider();\n }\n\n clone(): ITransform {\n const clone = new VerticalPerspectiveTransform();\n clone.apply(this);\n return clone;\n }\n\n public apply(that: IReadonlyTransform, globeLatitudeErrorCorrectionRadians?: number): void {\n this._globeLatitudeErrorCorrectionRadians = globeLatitudeErrorCorrectionRadians || 0;\n this._helper.apply(that);\n }\n\n public get projectionMatrix(): mat4 { return this._projectionMatrix; }\n\n public get modelViewProjectionMatrix(): mat4 { return this._globeViewProjMatrixNoCorrection; }\n\n public get inverseProjectionMatrix(): mat4 { return this._globeProjMatrixInverted; }\n\n public get cameraPosition(): vec3 {\n // Return a copy - don't let outside code mutate our precomputed camera position.\n const copy = createVec3f64(); // Ensure the resulting vector is float64s\n copy[0] = this._cameraPosition[0];\n copy[1] = this._cameraPosition[1];\n copy[2] = this._cameraPosition[2];\n return copy;\n }\n\n get cameraToCenterDistance(): number {\n // Globe uses the same cameraToCenterDistance as mercator.\n return this._helper.cameraToCenterDistance;\n }\n\n getProjectionData(params: ProjectionDataParams): ProjectionData {\n const {overscaledTileID, applyGlobeMatrix} = params;\n const mercatorTileCoordinates = this._helper.getMercatorTileCoordinates(overscaledTileID);\n return {\n mainMatrix: this._globeViewProjMatrix32f,\n tileMercatorCoords: mercatorTileCoordinates,\n clippingPlane: this._cachedClippingPlane as [number, number, number, number],\n projectionTransition: applyGlobeMatrix ? 1 : 0,\n fallbackMatrix: this._globeViewProjMatrix32f,\n };\n }\n\n private _computeClippingPlane(globeRadiusPixels: number): vec4 {\n // We want to compute a plane equation that, when applied to the unit sphere generated\n // in the vertex shader, places all visible parts of the sphere into the positive half-space\n // and all the non-visible parts in the negative half-space.\n // We can then use that to accurately clip all non-visible geometry.\n\n // cam....------------A\n // .... |\n // .... |\n // ....B\n // ggggggggg\n // gggggg | .gggggg\n // ggg | ...ggg ^\n // gg | |\n // g | y\n // g | |\n // g C #---x--->\n //\n // Notes:\n // - note the coordinate axes\n // - \"g\" marks the globe edge\n // - the dotted line is the camera center \"ray\" - we are looking in this direction\n // - \"cam\" is camera origin\n // - \"C\" is globe center\n // - \"B\" is the point on \"top\" of the globe - camera is looking at B - \"B\" is the intersection between the camera center ray and the globe\n // - this._pitchInRadians is the angle at B between points cam,B,A\n // - this.cameraToCenterDistance is the distance from camera to \"B\"\n // - globe radius is (0.5 * this.worldSize)\n // - \"T\" is any point where a tangent line from \"cam\" touches the globe surface\n // - elevation is assumed to be zero - globe rendering must be separate from terrain rendering anyway\n\n const pitch = this.pitchInRadians;\n // scale things so that the globe radius is 1\n const distanceCameraToB = this.cameraToCenterDistance / globeRadiusPixels;\n const radius = 1;\n\n // Distance from camera to \"A\" - the point at the same elevation as camera, right above center point on globe\n const distanceCameraToA = Math.sin(pitch) * distanceCameraToB;\n // Distance from \"A\" to \"C\"\n const distanceAtoC = (Math.cos(pitch) * distanceCameraToB + radius);\n // Distance from camera to \"C\" - the globe center\n const distanceCameraToC = Math.sqrt(distanceCameraToA * distanceCameraToA + distanceAtoC * distanceAtoC);\n // cam - C - T angle cosine (at C)\n const camCTcosine = radius / distanceCameraToC;\n // Distance from globe center to the plane defined by all possible \"T\" points\n const tangentPlaneDistanceToC = camCTcosine * radius;\n\n let vectorCtoCamX = -distanceCameraToA;\n let vectorCtoCamY = distanceAtoC;\n // Normalize the vector\n const vectorCtoCamLength = Math.sqrt(vectorCtoCamX * vectorCtoCamX + vectorCtoCamY * vectorCtoCamY);\n vectorCtoCamX /= vectorCtoCamLength;\n vectorCtoCamY /= vectorCtoCamLength;\n\n // Note the swizzled components\n const planeVector: vec3 = [0, vectorCtoCamX, vectorCtoCamY];\n // Apply transforms - lat, lng and angle (NOT pitch - already accounted for, as it affects the tangent plane)\n vec3.rotateZ(planeVector, planeVector, [0, 0, 0], -this.bearingInRadians);\n vec3.rotateX(planeVector, planeVector, [0, 0, 0], -1 * this.center.lat * Math.PI / 180.0);\n vec3.rotateY(planeVector, planeVector, [0, 0, 0], this.center.lng * Math.PI / 180.0);\n // Normalize the plane vector\n const scale = 1 / vec3.length(planeVector);\n vec3.scale(planeVector, planeVector, scale);\n return [...planeVector, -tangentPlaneDistanceToC * scale];\n }\n\n public isLocationOccluded(location: LngLat): boolean {\n return !this.isSurfacePointVisible(angularCoordinatesToSurfaceVector(location));\n }\n\n public transformLightDirection(dir: vec3): vec3 {\n const sphereX = this._helper._center.lng * Math.PI / 180.0;\n const sphereY = this._helper._center.lat * Math.PI / 180.0;\n\n const len = Math.cos(sphereY);\n const spherePos: vec3 = [\n Math.sin(sphereX) * len,\n Math.sin(sphereY),\n Math.cos(sphereX) * len\n ];\n\n const axisRight: vec3 = [spherePos[2], 0.0, -spherePos[0]]; // Equivalent to cross(vec3(0.0, 1.0, 0.0), vec)\n const axisDown: vec3 = [0, 0, 0];\n vec3.cross(axisDown, axisRight, spherePos);\n vec3.normalize(axisRight, axisRight);\n vec3.normalize(axisDown, axisDown);\n\n const transformed: vec3 = [\n axisRight[0] * dir[0] + axisDown[0] * dir[1] + spherePos[0] * dir[2],\n axisRight[1] * dir[0] + axisDown[1] * dir[1] + spherePos[1] * dir[2],\n axisRight[2] * dir[0] + axisDown[2] * dir[1] + spherePos[2] * dir[2]\n ];\n\n const normalized: vec3 = [0, 0, 0];\n vec3.normalize(normalized, transformed);\n return normalized;\n }\n\n public getPixelScale(): number {\n return 1.0 / Math.cos(this._helper._center.lat * Math.PI / 180);\n }\n\n public getCircleRadiusCorrection(): number {\n return Math.cos(this._helper._center.lat * Math.PI / 180);\n }\n\n public getPitchedTextCorrection(textAnchorX: number, textAnchorY: number, tileID: UnwrappedTileID): number {\n const mercator = tileCoordinatesToMercatorCoordinates(textAnchorX, textAnchorY, tileID.canonical);\n const angular = mercatorCoordinatesToAngularCoordinatesRadians(mercator.x, mercator.y);\n return this.getCircleRadiusCorrection() / Math.cos(angular[1]);\n }\n\n public projectTileCoordinates(x: number, y: number, unwrappedTileID: UnwrappedTileID, getElevation: (x: number, y: number) => number): PointProjection {\n const canonical = unwrappedTileID.canonical;\n const spherePos = projectTileCoordinatesToSphere(x, y, canonical.x, canonical.y, canonical.z);\n const elevation = getElevation ? getElevation(x, y) : 0.0;\n const vectorMultiplier = 1.0 + elevation / earthRadius;\n const pos: vec4 = [spherePos[0] * vectorMultiplier, spherePos[1] * vectorMultiplier, spherePos[2] * vectorMultiplier, 1];\n vec4.transformMat4(pos, pos, this._globeViewProjMatrixNoCorrection);\n\n // Also check whether the point projects to the backfacing side of the sphere.\n const plane = this._cachedClippingPlane;\n // dot(position on sphere, occlusion plane equation)\n const dotResult = plane[0] * spherePos[0] + plane[1] * spherePos[1] + plane[2] * spherePos[2] + plane[3];\n const isOccluded = dotResult < 0.0;\n\n return {\n point: new Point(pos[0] / pos[3], pos[1] / pos[3]),\n signedDistanceFromCamera: pos[3],\n isOccluded\n };\n }\n\n private _calcMatrices(): void {\n if (!this._helper._width || !this._helper._height) {\n return;\n }\n\n const globeRadiusPixels = getGlobeRadiusPixels(this.worldSize, this.center.lat);\n\n // Construct a completely separate matrix for globe view\n const globeMatrix = createMat4f64();\n const globeMatrixUncorrected = createMat4f64();\n if (this._helper.autoCalculateNearFarZ) {\n this._helper._nearZ = 0.5;\n this._helper._farZ = this.cameraToCenterDistance + globeRadiusPixels * 2.0; // just set the far plane far enough - we will calculate our own z in the vertex shader anyway\n }\n mat4.perspective(globeMatrix, this.fovInRadians, this.width / this.height, this._helper._nearZ, this._helper._farZ);\n\n // Apply center of perspective offset\n const offset = this.centerOffset;\n globeMatrix[8] = -offset.x * 2 / this._helper._width;\n globeMatrix[9] = offset.y * 2 / this._helper._height;\n this._projectionMatrix = mat4.clone(globeMatrix);\n\n this._globeProjMatrixInverted = createMat4f64();\n mat4.invert(this._globeProjMatrixInverted, globeMatrix);\n mat4.translate(globeMatrix, globeMatrix, [0, 0, -this.cameraToCenterDistance]);\n mat4.rotateZ(globeMatrix, globeMatrix, this.rollInRadians);\n mat4.rotateX(globeMatrix, globeMatrix, -this.pitchInRadians);\n mat4.rotateZ(globeMatrix, globeMatrix, this.bearingInRadians);\n mat4.translate(globeMatrix, globeMatrix, [0.0, 0, -globeRadiusPixels]);\n // Rotate the sphere to center it on viewed coordinates\n\n const scaleVec = createVec3f64();\n scaleVec[0] = globeRadiusPixels;\n scaleVec[1] = globeRadiusPixels;\n scaleVec[2] = globeRadiusPixels;\n\n // Keep a atan-correction-free matrix for transformations done on the CPU with accurate math\n mat4.rotateX(globeMatrixUncorrected, globeMatrix, this.center.lat * Math.PI / 180.0);\n mat4.rotateY(globeMatrixUncorrected, globeMatrixUncorrected, -this.center.lng * Math.PI / 180.0);\n mat4.scale(globeMatrixUncorrected, globeMatrixUncorrected, scaleVec); // Scale the unit sphere to a sphere with diameter of 1\n this._globeViewProjMatrixNoCorrection = globeMatrixUncorrected;\n\n mat4.rotateX(globeMatrix, globeMatrix, this.center.lat * Math.PI / 180.0 - this._globeLatitudeErrorCorrectionRadians);\n mat4.rotateY(globeMatrix, globeMatrix, -this.center.lng * Math.PI / 180.0);\n mat4.scale(globeMatrix, globeMatrix, scaleVec); // Scale the unit sphere to a sphere with diameter of 1\n this._globeViewProjMatrix32f = new Float32Array(globeMatrix);\n\n this._globeViewProjMatrixNoCorrectionInverted = createMat4f64();\n mat4.invert(this._globeViewProjMatrixNoCorrectionInverted, globeMatrixUncorrected);\n\n const zero = createVec3f64();\n this._cameraPosition = createVec3f64();\n this._cameraPosition[2] = this.cameraToCenterDistance / globeRadiusPixels;\n vec3.rotateZ(this._cameraPosition, this._cameraPosition, zero, -this.rollInRadians);\n vec3.rotateX(this._cameraPosition, this._cameraPosition, zero, this.pitchInRadians);\n vec3.rotateZ(this._cameraPosition, this._cameraPosition, zero, -this.bearingInRadians);\n vec3.add(this._cameraPosition, this._cameraPosition, [0, 0, 1]);\n vec3.rotateX(this._cameraPosition, this._cameraPosition, zero, -this.center.lat * Math.PI / 180.0);\n vec3.rotateY(this._cameraPosition, this._cameraPosition, zero, this.center.lng * Math.PI / 180.0);\n\n this._cachedClippingPlane = this._computeClippingPlane(globeRadiusPixels);\n\n const matrix = mat4.clone(this._globeViewProjMatrixNoCorrectionInverted);\n mat4.scale(matrix, matrix, [1, 1, -1]);\n this._cachedFrustum = Frustum.fromInvProjectionMatrix(matrix, 1, 0, this._cachedClippingPlane, true);\n }\n\n calculateFogMatrix(_unwrappedTileID: UnwrappedTileID): mat4 {\n warnOnce('calculateFogMatrix is not supported on globe projection.');\n const m = createMat4f64();\n mat4.identity(m);\n return m;\n }\n\n getVisibleUnwrappedCoordinates(tileID: CanonicalTileID): UnwrappedTileID[] {\n // Globe has no wrap.\n return [new UnwrappedTileID(0, tileID)];\n }\n\n getCameraFrustum(): Frustum {\n return this._cachedFrustum;\n }\n getClippingPlane(): vec4 | null {\n return this._cachedClippingPlane;\n }\n getCoveringTilesDetailsProvider(): CoveringTilesDetailsProvider {\n return this._coveringTilesDetailsProvider;\n }\n\n recalculateZoomAndCenter(terrain?: Terrain): void {\n if (terrain) {\n warnOnce('terrain is not fully supported on vertical perspective projection.');\n }\n this._helper.recalculateZoomAndCenter(0);\n }\n\n maxPitchScaleFactor(): number {\n // In mercaltor it uses the pixelMatrix, but this is not available here...\n return 1;\n }\n\n getCameraPoint(): Point {\n return this._helper.getCameraPoint();\n }\n\n getCameraAltitude(): number {\n return this._helper.getCameraAltitude();\n }\n\n getCameraLngLat(): LngLat {\n return this._helper.getCameraLngLat();\n }\n\n lngLatToCameraDepth(lngLat: LngLat, elevation: number): number {\n if (!this._globeViewProjMatrixNoCorrection) {\n return 1.0; // _calcMatrices hasn't run yet\n }\n const vec = angularCoordinatesToSurfaceVector(lngLat);\n vec3.scale(vec, vec, (1.0 + elevation / earthRadius));\n const result = createVec4f64();\n vec4.transformMat4(result, [vec[0], vec[1], vec[2], 1], this._globeViewProjMatrixNoCorrection);\n return result[2] / result[3];\n }\n\n populateCache(_coords: OverscaledTileID[]): void {\n // Do nothing\n }\n\n getBounds(): LngLatBounds {\n const xMid = this.width * 0.5;\n const yMid = this.height * 0.5;\n\n // LngLat extremes will probably tend to be in screen corners or in middle of screen edges.\n // These test points should result in a pretty good approximation.\n const testPoints = [\n new Point(0, 0),\n new Point(xMid, 0),\n new Point(this.width, 0),\n new Point(this.width, yMid),\n new Point(this.width, this.height),\n new Point(xMid, this.height),\n new Point(0, this.height),\n new Point(0, yMid),\n ];\n\n const projectedPoints = [];\n for (const p of testPoints) {\n projectedPoints.push(this.unprojectScreenPoint(p));\n }\n\n // We can't construct a simple min/max aabb, since points might lie on either side of the antimeridian.\n // We will instead compute the furthest points relative to map center.\n // We also take advantage of the fact that `unprojectScreenPoint` will snap pixels\n // outside the planet to the closest point on the planet's horizon.\n let mostEast = 0, mostWest = 0, mostNorth = 0, mostSouth = 0; // We will store these values signed.\n const center = this.center;\n for (const p of projectedPoints) {\n const dLng = differenceOfAnglesDegrees(center.lng, p.lng);\n const dLat = differenceOfAnglesDegrees(center.lat, p.lat);\n if (dLng < mostWest) {\n mostWest = dLng;\n }\n if (dLng > mostEast) {\n mostEast = dLng;\n }\n if (dLat < mostSouth) {\n mostSouth = dLat;\n }\n if (dLat > mostNorth) {\n mostNorth = dLat;\n }\n }\n\n const boundsArray: [number, number, number, number] = [\n center.lng + mostWest, // west\n center.lat + mostSouth, // south\n center.lng + mostEast, // east\n center.lat + mostNorth // north\n ];\n\n // Sometimes the poles might end up not being on the horizon,\n // thus not being detected as the northernmost/southernmost points.\n // We fix that here.\n if (this.isSurfacePointOnScreen([0, 1, 0])) {\n // North pole is visible\n // This also means that the entire longitude range must be visible\n boundsArray[3] = 90;\n boundsArray[0] = -180;\n boundsArray[2] = 180;\n }\n if (this.isSurfacePointOnScreen([0, -1, 0])) {\n // South pole is visible\n boundsArray[1] = -90;\n boundsArray[0] = -180;\n boundsArray[2] = 180;\n }\n\n return new LngLatBounds(boundsArray);\n }\n\n defaultConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n // Globe: TODO: respect _lngRange, _latRange\n // It is possible to implement exact constrain for globe, but I don't think it is worth the effort.\n const constrainedLat = clamp(lngLat.lat, -MAX_VALID_LATITUDE, MAX_VALID_LATITUDE);\n const constrainedZoom = clamp(+zoom, this.minZoom + getZoomAdjustment(0, constrainedLat), this.maxZoom);\n return {\n center: new LngLat(\n lngLat.lng,\n constrainedLat\n ),\n zoom: constrainedZoom\n };\n };\n\n applyConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n return this._helper.applyConstrain(lngLat, zoom);\n };\n\n calculateCenterFromCameraLngLatAlt(lngLat: LngLatLike, alt: number, bearing?: number, pitch?: number): {center: LngLat; elevation: number; zoom: number} {\n return this._helper.calculateCenterFromCameraLngLatAlt(lngLat, alt, bearing, pitch);\n }\n\n /**\n * Note: automatically adjusts zoom to keep planet size consistent\n * (same size before and after a {@link setLocationAtPoint} call).\n */\n setLocationAtPoint(lnglat: LngLat, point: Point): void {\n // This returns some fake coordinates for pixels that do not lie on the planet.\n // Whatever uses this `setLocationAtPoint` function will need to account for that.\n const pointLngLat = this.unprojectScreenPoint(point);\n const vecToPixelCurrent = angularCoordinatesToSurfaceVector(pointLngLat);\n const vecToTarget = angularCoordinatesToSurfaceVector(lnglat);\n\n const zero = createVec3f64();\n vec3.zero(zero);\n\n const rotatedPixelVector = createVec3f64();\n vec3.rotateY(rotatedPixelVector, vecToPixelCurrent, zero, -this.center.lng * Math.PI / 180.0);\n vec3.rotateX(rotatedPixelVector, rotatedPixelVector, zero, this.center.lat * Math.PI / 180.0);\n\n // We are looking for the lng,lat that will rotate `vecToTarget`\n // so that it is equal to `rotatedPixelVector`.\n\n // The second rotation around X axis cannot change the X component,\n // so we first must find the longitude such that rotating `vecToTarget` with it\n // will place it so its X component is equal to X component of `rotatedPixelVector`.\n // There will exist zero, one or two longitudes that satisfy this.\n\n // x |\n // / |\n // / | the line is the target X - rotatedPixelVector.x\n // / | the x is vecToTarget projected to x,z plane\n // . | the dot is origin\n //\n // We need to rotate vecToTarget so that it intersects the line.\n // If vecToTarget is shorter than the distance to the line from origin, it is impossible.\n\n // Otherwise, we compute the intersection of the line with a ring with radius equal to\n // length of vecToTarget projected to XZ plane.\n\n const vecToTargetXZLengthSquared = vecToTarget[0] * vecToTarget[0] + vecToTarget[2] * vecToTarget[2];\n const targetXSquared = rotatedPixelVector[0] * rotatedPixelVector[0];\n if (vecToTargetXZLengthSquared < targetXSquared) {\n // Zero solutions - setLocationAtPoint is impossible.\n return;\n }\n\n // The intersection's Z coordinates\n const intersectionA = Math.sqrt(vecToTargetXZLengthSquared - targetXSquared);\n const intersectionB = -intersectionA; // the second solution\n\n const lngA = angleToRotateBetweenVectors2D(vecToTarget[0], vecToTarget[2], rotatedPixelVector[0], intersectionA);\n const lngB = angleToRotateBetweenVectors2D(vecToTarget[0], vecToTarget[2], rotatedPixelVector[0], intersectionB);\n\n const vecToTargetLngA = createVec3f64();\n vec3.rotateY(vecToTargetLngA, vecToTarget, zero, -lngA);\n const latA = angleToRotateBetweenVectors2D(vecToTargetLngA[1], vecToTargetLngA[2], rotatedPixelVector[1], rotatedPixelVector[2]);\n const vecToTargetLngB = createVec3f64();\n vec3.rotateY(vecToTargetLngB, vecToTarget, zero, -lngB);\n const latB = angleToRotateBetweenVectors2D(vecToTargetLngB[1], vecToTargetLngB[2], rotatedPixelVector[1], rotatedPixelVector[2]);\n // Is at least one of the needed latitudes valid?\n\n const limit = Math.PI * 0.5;\n\n const isValidA = latA >= -limit && latA <= limit;\n const isValidB = latB >= -limit && latB <= limit;\n\n let validLng: number;\n let validLat: number;\n if (isValidA && isValidB) {\n // Pick the solution that is closer to current map center.\n const centerLngRadians = this.center.lng * Math.PI / 180.0;\n const centerLatRadians = this.center.lat * Math.PI / 180.0;\n const lngDistA = distanceOfAnglesRadians(lngA, centerLngRadians);\n const latDistA = distanceOfAnglesRadians(latA, centerLatRadians);\n const lngDistB = distanceOfAnglesRadians(lngB, centerLngRadians);\n const latDistB = distanceOfAnglesRadians(latB, centerLatRadians);\n\n if ((lngDistA + latDistA) < (lngDistB + latDistB)) {\n validLng = lngA;\n validLat = latA;\n } else {\n validLng = lngB;\n validLat = latB;\n }\n } else if (isValidA) {\n validLng = lngA;\n validLat = latA;\n } else if (isValidB) {\n validLng = lngB;\n validLat = latB;\n } else {\n // No solution.\n return;\n }\n\n const newLng = validLng / Math.PI * 180;\n const newLat = validLat / Math.PI * 180;\n const oldLat = this.center.lat;\n this.setCenter(new LngLat(newLng, clamp(newLat, -90, 90)));\n this.setZoom(this.zoom + getZoomAdjustment(oldLat, this.center.lat));\n }\n\n locationToScreenPoint(lnglat: LngLat, terrain?: Terrain): Point {\n const pos = angularCoordinatesToSurfaceVector(lnglat);\n\n if (terrain) {\n const elevation = terrain.getElevationForLngLatZoom(lnglat, this._helper._tileZoom);\n vec3.scale(pos, pos, 1.0 + elevation / earthRadius);\n }\n\n return this._projectSurfacePointToScreen(pos);\n }\n\n /**\n * Projects a given vector on the surface of a unit sphere (or possible above the surface)\n * and returns its coordinates on screen in pixels.\n */\n private _projectSurfacePointToScreen(pos: vec3): Point {\n const projected = createVec4f64();\n vec4.transformMat4(projected, [...pos, 1] as vec4, this._globeViewProjMatrixNoCorrection);\n projected[0] /= projected[3];\n projected[1] /= projected[3];\n return new Point(\n (projected[0] * 0.5 + 0.5) * this.width,\n (-projected[1] * 0.5 + 0.5) * this.height\n );\n }\n\n screenPointToMercatorCoordinate(p: Point, terrain?: Terrain): MercatorCoordinate {\n if (terrain) {\n // Mercator has terrain handling implemented properly and since terrain\n // simply draws tile coordinates into a special framebuffer, this works well even for globe.\n const coordinate = terrain.pointCoordinate(p);\n if (coordinate) {\n return coordinate;\n }\n }\n return MercatorCoordinate.fromLngLat(this.unprojectScreenPoint(p));\n }\n\n screenPointToLocation(p: Point, terrain?: Terrain): LngLat {\n return this.screenPointToMercatorCoordinate(p, terrain)?.toLngLat();\n }\n\n isPointOnMapSurface(p: Point, _terrain?: Terrain): boolean {\n const rayOrigin = this._cameraPosition;\n const rayDirection = this.getRayDirectionFromPixel(p);\n\n const intersection = this.rayPlanetIntersection(rayOrigin, rayDirection);\n\n return !!intersection;\n }\n\n /**\n * Computes normalized direction of a ray from the camera to the given screen pixel.\n */\n getRayDirectionFromPixel(p: Point): vec3 {\n const pos = createVec4f64();\n pos[0] = (p.x / this.width) * 2.0 - 1.0;\n pos[1] = ((p.y / this.height) * 2.0 - 1.0) * -1.0;\n pos[2] = 1;\n pos[3] = 1;\n vec4.transformMat4(pos, pos, this._globeViewProjMatrixNoCorrectionInverted);\n pos[0] /= pos[3];\n pos[1] /= pos[3];\n pos[2] /= pos[3];\n const ray = createVec3f64();\n ray[0] = pos[0] - this._cameraPosition[0];\n ray[1] = pos[1] - this._cameraPosition[1];\n ray[2] = pos[2] - this._cameraPosition[2];\n const rayNormalized: vec3 = createVec3f64();\n vec3.normalize(rayNormalized, ray);\n return rayNormalized;\n }\n\n /**\n * For a given point on the unit sphere of the planet, returns whether it is visible from\n * camera's position (not taking into account camera rotation at all).\n */\n private isSurfacePointVisible(p: vec3): boolean {\n const plane = this._cachedClippingPlane;\n // dot(position on sphere, occlusion plane equation)\n const dotResult = plane[0] * p[0] + plane[1] * p[1] + plane[2] * p[2] + plane[3];\n return dotResult >= 0.0;\n }\n\n /**\n * Returns whether surface point is visible on screen.\n * It must both project to a pixel in screen bounds and not be occluded by the planet.\n */\n private isSurfacePointOnScreen(vec: vec3): boolean {\n if (!this.isSurfacePointVisible(vec)) {\n return false;\n }\n\n const projected = createVec4f64();\n vec4.transformMat4(projected, [...vec, 1] as vec4, this._globeViewProjMatrixNoCorrection);\n projected[0] /= projected[3];\n projected[1] /= projected[3];\n projected[2] /= projected[3];\n return projected[0] > -1 && projected[0] < 1 &&\n projected[1] > -1 && projected[1] < 1 &&\n projected[2] > -1 && projected[2] < 1;\n }\n\n /**\n * Returns the two intersection points of the ray and the planet's sphere,\n * or null if no intersection occurs.\n * The intersections are encoded as the parameter for parametric ray equation,\n * with `tMin` being the first intersection and `tMax` being the second.\n * Eg. the nearer intersection point can then be computed as `origin + direction * tMin`.\n * @param origin - The ray origin.\n * @param direction - The normalized ray direction.\n */\n private rayPlanetIntersection(origin: vec3, direction: vec3): RaySphereIntersection {\n const originDotDirection = vec3.dot(origin, direction);\n const planetRadiusSquared = 1.0; // planet is a unit sphere, so its radius squared is 1\n\n // Ray-sphere intersection involves a quadratic equation.\n // However solving it in the traditional schoolbook way leads to floating point precision issues.\n // Here we instead use the approach suggested in the book Ray Tracing Gems, chapter 7.\n // https://www.realtimerendering.com/raytracinggems/rtg/index.html\n const inner = createVec3f64();\n const scaledDir = createVec3f64();\n vec3.scale(scaledDir, direction, originDotDirection);\n vec3.sub(inner, origin, scaledDir);\n const discriminant = planetRadiusSquared - vec3.dot(inner, inner);\n\n if (discriminant < 0) {\n return null;\n }\n\n const c = vec3.dot(origin, origin) - planetRadiusSquared;\n const q = -originDotDirection + (originDotDirection < 0 ? 1 : -1) * Math.sqrt(discriminant);\n const t0 = c / q;\n const t1 = q;\n // Assume the ray origin is never inside the sphere\n const tMin = Math.min(t0, t1);\n const tMax = Math.max(t0, t1);\n return {\n tMin,\n tMax\n };\n }\n\n /**\n * @internal\n * Returns a {@link LngLat} representing geographical coordinates that correspond to the specified pixel coordinates.\n * Note: if the point does not lie on the globe, returns a location on the visible globe horizon (edge) that is\n * as close to the point as possible.\n * @param p - Screen point in pixels to unproject.\n * @param terrain - Optional terrain.\n */\n private unprojectScreenPoint(p: Point): LngLat {\n // Here we compute the intersection of the ray towards the pixel at `p` and the planet sphere.\n // As always, we assume that the planet is centered at 0,0,0 and has radius 1.\n // Ray origin is `_cameraPosition` and direction is `rayNormalized`.\n const rayOrigin = this._cameraPosition;\n const rayDirection = this.getRayDirectionFromPixel(p);\n const intersection = this.rayPlanetIntersection(rayOrigin, rayDirection);\n\n if (intersection) {\n // Ray intersects the sphere -> compute intersection LngLat.\n // Assume the ray origin is never inside the sphere - just use tMin\n const intersectionPoint = createVec3f64();\n vec3.add(intersectionPoint, rayOrigin, [\n rayDirection[0] * intersection.tMin,\n rayDirection[1] * intersection.tMin,\n rayDirection[2] * intersection.tMin\n ]);\n const sphereSurface = createVec3f64();\n vec3.normalize(sphereSurface, intersectionPoint);\n return sphereSurfacePointToCoordinates(sphereSurface);\n }\n\n // Ray does not intersect the sphere -> find the closest point on the horizon to the ray.\n // Intersect the ray with the clipping plane, since we know that the intersection of the clipping plane and the sphere is the horizon.\n const horizonPlane = this._cachedClippingPlane;\n const directionDotPlaneXyz = horizonPlane[0] * rayDirection[0] + horizonPlane[1] * rayDirection[1] + horizonPlane[2] * rayDirection[2];\n const originToPlaneDistance = pointPlaneSignedDistance(horizonPlane, rayOrigin);\n const distanceToIntersection = -originToPlaneDistance / directionDotPlaneXyz;\n\n const maxRayLength = 2.0; // One globe diameter\n const planeIntersection = createVec3f64();\n\n if (distanceToIntersection > 0) {\n vec3.add(planeIntersection, rayOrigin, [\n rayDirection[0] * distanceToIntersection,\n rayDirection[1] * distanceToIntersection,\n rayDirection[2] * distanceToIntersection\n ]);\n } else {\n // When the ray takes too long to hit the plane (>maxRayLength), or if the plane intersection is behind the camera, handle things differently.\n // Take a point along the ray at distance maxRayLength, project it to clipping plane, then continue as normal to find the horizon point.\n const distantPoint = createVec3f64();\n vec3.add(distantPoint, rayOrigin, [\n rayDirection[0] * maxRayLength,\n rayDirection[1] * maxRayLength,\n rayDirection[2] * maxRayLength\n ]);\n const distanceFromPlane = pointPlaneSignedDistance(this._cachedClippingPlane, distantPoint);\n vec3.sub(planeIntersection, distantPoint, [\n this._cachedClippingPlane[0] * distanceFromPlane,\n this._cachedClippingPlane[1] * distanceFromPlane,\n this._cachedClippingPlane[2] * distanceFromPlane\n ]);\n }\n\n const horizonDisk = horizonPlaneToCenterAndRadius(horizonPlane);\n const closestOnHorizon = clampToSphere(horizonDisk.center, horizonDisk.radius, planeIntersection);\n\n return sphereSurfacePointToCoordinates(closestOnHorizon);\n }\n\n getMatrixForModel(location: LngLatLike, altitude?: number): mat4 {\n const lnglat = LngLat.convert(location);\n const scale = 1.0 / earthRadius;\n\n const m = createIdentityMat4f64();\n mat4.rotateY(m, m, lnglat.lng / 180.0 * Math.PI);\n mat4.rotateX(m, m, -lnglat.lat / 180.0 * Math.PI);\n mat4.translate(m, m, [0, 0, 1 + altitude / earthRadius]);\n mat4.rotateX(m, m, Math.PI * 0.5);\n mat4.scale(m, m, [scale, scale, scale]);\n return m;\n }\n\n getProjectionDataForCustomLayer(applyGlobeMatrix: boolean = true): ProjectionData {\n const globeData = this.getProjectionData({overscaledTileID: new OverscaledTileID(0, 0, 0, 0, 0), applyGlobeMatrix});\n globeData.tileMercatorCoords = [0, 0, 1, 1];\n return globeData;\n }\n\n getFastPathSimpleProjectionMatrix(_tileID: OverscaledTileID): mat4 {\n return undefined;\n }\n}\n","import type {mat2, mat4, vec3, vec4} from 'gl-matrix';\nimport {TransformHelper} from '../transform_helper';\nimport {MercatorTransform} from './mercator_transform';\nimport {VerticalPerspectiveTransform} from './vertical_perspective_transform';\nimport {type LngLat, type LngLatLike,} from '../lng_lat';\nimport {lerp} from '../../util/util';\nimport type {OverscaledTileID, UnwrappedTileID, CanonicalTileID} from '../../tile/tile_id';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {MercatorCoordinate} from '../mercator_coordinate';\nimport type {LngLatBounds} from '../lng_lat_bounds';\nimport type {Frustum} from '../../util/primitives/frustum';\nimport type {Terrain} from '../../render/terrain';\nimport type {PointProjection} from '../../symbol/projection';\nimport type {IReadonlyTransform, ITransform, TransformConstrainFunction} from '../transform_interface';\nimport type {TransformOptions} from '../transform_helper';\nimport type {PaddingOptions} from '../edge_insets';\nimport type {ProjectionData, ProjectionDataParams} from './projection_data';\nimport type {CoveringTilesDetailsProvider} from './covering_tiles_details_provider';\n\n/**\n * Globe transform is a transform that moves between vertical perspective and mercator projections.\n */\nexport class GlobeTransform implements ITransform {\n private _helper: TransformHelper;\n\n //\n // Implementation of transform getters and setters\n //\n\n get pixelsToClipSpaceMatrix(): mat4 {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix(): mat4 {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits(): [number, number] {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset(): Point {\n return this._helper.centerOffset;\n }\n get size(): Point {\n return this._helper.size;\n }\n get rotationMatrix(): mat2 {\n return this._helper.rotationMatrix;\n }\n get centerPoint(): Point {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter(): number {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(zoom: number): void {\n this._helper.setMinZoom(zoom);\n }\n setMaxZoom(zoom: number): void {\n this._helper.setMaxZoom(zoom);\n }\n setMinPitch(pitch: number): void {\n this._helper.setMinPitch(pitch);\n }\n setMaxPitch(pitch: number): void {\n this._helper.setMaxPitch(pitch);\n }\n setRenderWorldCopies(renderWorldCopies: boolean): void {\n this._helper.setRenderWorldCopies(renderWorldCopies);\n }\n setBearing(bearing: number): void {\n this._helper.setBearing(bearing);\n }\n setPitch(pitch: number): void {\n this._helper.setPitch(pitch);\n }\n setRoll(roll: number): void {\n this._helper.setRoll(roll);\n }\n setFov(fov: number): void {\n this._helper.setFov(fov);\n }\n setZoom(zoom: number): void {\n this._helper.setZoom(zoom);\n }\n setCenter(center: LngLat): void {\n this._helper.setCenter(center);\n }\n setElevation(elevation: number): void {\n this._helper.setElevation(elevation);\n }\n setMinElevationForCurrentTile(elevation: number): void {\n this._helper.setMinElevationForCurrentTile(elevation);\n }\n setPadding(padding: PaddingOptions): void {\n this._helper.setPadding(padding);\n }\n interpolatePadding(start: PaddingOptions, target: PaddingOptions, t: number): void {\n return this._helper.interpolatePadding(start, target, t);\n }\n isPaddingEqual(padding: PaddingOptions): boolean {\n return this._helper.isPaddingEqual(padding);\n }\n resize(width: number, height: number, constrainTransform: boolean = true): void {\n this._helper.resize(width, height, constrainTransform);\n }\n getMaxBounds(): LngLatBounds {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(bounds?: LngLatBounds): void {\n this._helper.setMaxBounds(bounds);\n }\n setConstrainOverride(constrain?: TransformConstrainFunction | null): void {\n this._helper.setConstrainOverride(constrain);\n }\n overrideNearFarZ(nearZ: number, farZ: number): void {\n this._helper.overrideNearFarZ(nearZ, farZ);\n }\n clearNearFarZOverride(): void {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(queryGeometry: Point[]): Point[] {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), queryGeometry);\n }\n\n get tileSize(): number {\n return this._helper.tileSize;\n }\n get tileZoom(): number {\n return this._helper.tileZoom;\n }\n get scale(): number {\n return this._helper.scale;\n }\n get worldSize(): number {\n return this._helper.worldSize;\n }\n get width(): number {\n return this._helper.width;\n }\n get height(): number {\n return this._helper.height;\n }\n get lngRange(): [number, number] {\n return this._helper.lngRange;\n }\n get latRange(): [number, number] {\n return this._helper.latRange;\n }\n get minZoom(): number {\n return this._helper.minZoom;\n }\n get maxZoom(): number {\n return this._helper.maxZoom;\n }\n get zoom(): number {\n return this._helper.zoom;\n }\n get center(): LngLat {\n return this._helper.center;\n }\n get minPitch(): number {\n return this._helper.minPitch;\n }\n get maxPitch(): number {\n return this._helper.maxPitch;\n }\n get pitch(): number {\n return this._helper.pitch;\n }\n get pitchInRadians(): number {\n return this._helper.pitchInRadians;\n }\n get roll(): number {\n return this._helper.roll;\n }\n get rollInRadians(): number {\n return this._helper.rollInRadians;\n }\n get bearing(): number {\n return this._helper.bearing;\n }\n get bearingInRadians(): number {\n return this._helper.bearingInRadians;\n }\n get fov(): number {\n return this._helper.fov;\n }\n get fovInRadians(): number {\n return this._helper.fovInRadians;\n }\n get elevation(): number {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile(): number {\n return this._helper.minElevationForCurrentTile;\n }\n get padding(): PaddingOptions {\n return this._helper.padding;\n }\n get unmodified(): boolean {\n return this._helper.unmodified;\n }\n get renderWorldCopies(): boolean {\n return this._helper.renderWorldCopies;\n }\n get cameraToCenterDistance(): number {\n return this._helper.cameraToCenterDistance;\n }\n get constrainOverride(): TransformConstrainFunction {\n return this._helper.constrainOverride;\n }\n public get nearZ(): number { \n return this._helper.nearZ; \n }\n public get farZ(): number { \n return this._helper.farZ; \n }\n public get autoCalculateNearFarZ(): boolean { \n return this._helper.autoCalculateNearFarZ; \n }\n //\n // Implementation of globe transform\n //\n\n private _globeLatitudeErrorCorrectionRadians: number = 0;\n\n /**\n * True when globe render path should be used instead of the old but simpler mercator rendering.\n * Globe automatically transitions to mercator at high zoom levels, which causes a switch from\n * globe to mercator render path.\n */\n get isGlobeRendering(): boolean {\n return this._globeness > 0;\n }\n\n setTransitionState(globeness: number, errorCorrectionValue: number): void {\n this._globeness = globeness;\n this._globeLatitudeErrorCorrectionRadians = errorCorrectionValue;\n this._calcMatrices();\n this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame();\n this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame();\n }\n\n private get currentTransform(): ITransform {\n return this.isGlobeRendering ? this._verticalPerspectiveTransform : this._mercatorTransform;\n }\n\n /**\n * Globe projection can smoothly interpolate between globe view and mercator. This variable controls this interpolation.\n * Value 0 is mercator, value 1 is globe, anything between is an interpolation between the two projections.\n */\n private _globeness: number = 1.0;\n private _mercatorTransform: MercatorTransform;\n private _verticalPerspectiveTransform: VerticalPerspectiveTransform;\n\n public constructor(options?: TransformOptions) {\n this._helper = new TransformHelper({\n calcMatrices: () => { this._calcMatrices(); },\n defaultConstrain: (center, zoom) => { return this.defaultConstrain(center, zoom); }\n }, options);\n this._globeness = 1; // When transform is cloned for use in symbols, `_updateAnimation` function which usually sets this value never gets called.\n this._mercatorTransform = new MercatorTransform();\n this._verticalPerspectiveTransform = new VerticalPerspectiveTransform();\n }\n\n clone(): ITransform {\n const clone = new GlobeTransform();\n clone._globeness = this._globeness;\n clone._globeLatitudeErrorCorrectionRadians = this._globeLatitudeErrorCorrectionRadians;\n clone.apply(this);\n return clone;\n }\n\n public apply(that: IReadonlyTransform): void {\n this._helper.apply(that);\n this._mercatorTransform.apply(this);\n this._verticalPerspectiveTransform.apply(this, this._globeLatitudeErrorCorrectionRadians);\n }\n\n public get projectionMatrix(): mat4 { return this.currentTransform.projectionMatrix; }\n\n public get modelViewProjectionMatrix(): mat4 { return this.currentTransform.modelViewProjectionMatrix; }\n\n public get inverseProjectionMatrix(): mat4 { return this.currentTransform.inverseProjectionMatrix; }\n\n public get cameraPosition(): vec3 { return this.currentTransform.cameraPosition; }\n\n getProjectionData(params: ProjectionDataParams): ProjectionData {\n const mercatorProjectionData = this._mercatorTransform.getProjectionData(params);\n const verticalPerspectiveProjectionData = this._verticalPerspectiveTransform.getProjectionData(params);\n\n return {\n mainMatrix: this.isGlobeRendering ? verticalPerspectiveProjectionData.mainMatrix : mercatorProjectionData.mainMatrix,\n clippingPlane: verticalPerspectiveProjectionData.clippingPlane,\n tileMercatorCoords: verticalPerspectiveProjectionData.tileMercatorCoords,\n projectionTransition: params.applyGlobeMatrix ? this._globeness : 0,\n fallbackMatrix: mercatorProjectionData.fallbackMatrix,\n };\n }\n\n public isLocationOccluded(location: LngLat): boolean {\n return this.currentTransform.isLocationOccluded(location);\n }\n\n public transformLightDirection(dir: vec3): vec3 {\n return this.currentTransform.transformLightDirection(dir);\n }\n\n public getPixelScale(): number {\n return lerp(this._mercatorTransform.getPixelScale(), this._verticalPerspectiveTransform.getPixelScale(), this._globeness);\n }\n\n public getCircleRadiusCorrection(): number {\n return lerp(this._mercatorTransform.getCircleRadiusCorrection(), this._verticalPerspectiveTransform.getCircleRadiusCorrection(), this._globeness);\n }\n\n public getPitchedTextCorrection(textAnchorX: number, textAnchorY: number, tileID: UnwrappedTileID): number {\n const mercatorCorrection = this._mercatorTransform.getPitchedTextCorrection(textAnchorX, textAnchorY, tileID);\n const verticalCorrection = this._verticalPerspectiveTransform.getPitchedTextCorrection(textAnchorX, textAnchorY, tileID);\n return lerp(mercatorCorrection, verticalCorrection, this._globeness);\n }\n\n public projectTileCoordinates(x: number, y: number, unwrappedTileID: UnwrappedTileID, getElevation: (x: number, y: number) => number): PointProjection {\n return this.currentTransform.projectTileCoordinates(x, y, unwrappedTileID, getElevation);\n }\n\n private _calcMatrices(): void {\n if (!this._helper._width || !this._helper._height) {\n return;\n }\n // VerticalPerspective reads our near/farZ values and autoCalculateNearFarZ:\n // - if autoCalculateNearFarZ is true then it computes globe Z values\n // - if autoCalculateNearFarZ is false then it inherits our Z values\n // In either case, its Z values are consistent with out settings and we want to copy its Z values to our helper.\n this._verticalPerspectiveTransform.apply(this, this._globeLatitudeErrorCorrectionRadians);\n this._helper._nearZ = this._verticalPerspectiveTransform.nearZ;\n this._helper._farZ = this._verticalPerspectiveTransform.farZ;\n\n // When transitioning between globe and mercator, we need to synchronize the depth values in both transforms.\n // For this reason we first update vertical perspective and then sync our Z values to its result.\n // Now if globe rendering, we always want to force mercator transform to adapt our Z values.\n // If not, it will either compute its own (autoCalculateNearFarZ=false) or adapt our (autoCalculateNearFarZ=true).\n // In either case we want to (again) sync our Z values, this time with\n this._mercatorTransform.apply(this, true, this.isGlobeRendering);\n this._helper._nearZ = this._mercatorTransform.nearZ;\n this._helper._farZ = this._mercatorTransform.farZ;\n }\n\n calculateFogMatrix(unwrappedTileID: UnwrappedTileID): mat4 {\n return this.currentTransform.calculateFogMatrix(unwrappedTileID);\n }\n\n getVisibleUnwrappedCoordinates(tileID: CanonicalTileID): UnwrappedTileID[] {\n return this.currentTransform.getVisibleUnwrappedCoordinates(tileID);\n }\n\n getCameraFrustum(): Frustum {\n return this.currentTransform.getCameraFrustum();\n }\n getClippingPlane(): vec4 | null {\n return this.currentTransform.getClippingPlane();\n }\n getCoveringTilesDetailsProvider(): CoveringTilesDetailsProvider {\n return this.currentTransform.getCoveringTilesDetailsProvider();\n }\n\n recalculateZoomAndCenter(terrain?: Terrain): void {\n this._mercatorTransform.recalculateZoomAndCenter(terrain);\n this._verticalPerspectiveTransform.recalculateZoomAndCenter(terrain);\n }\n\n maxPitchScaleFactor(): number {\n // Using mercator version of this should be good enough approximation for globe.\n return this._mercatorTransform.maxPitchScaleFactor();\n }\n\n getCameraPoint(): Point {\n return this._helper.getCameraPoint();\n }\n\n getCameraAltitude(): number {\n return this._helper.getCameraAltitude();\n }\n\n getCameraLngLat(): LngLat {\n return this._helper.getCameraLngLat();\n }\n\n lngLatToCameraDepth(lngLat: LngLat, elevation: number): number {\n return this.currentTransform.lngLatToCameraDepth(lngLat, elevation);\n }\n\n populateCache(coords: OverscaledTileID[]): void {\n this._mercatorTransform.populateCache(coords);\n this._verticalPerspectiveTransform.populateCache(coords);\n }\n\n getBounds(): LngLatBounds {\n return this.currentTransform.getBounds();\n }\n\n defaultConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n return this.currentTransform.defaultConstrain(lngLat, zoom);\n };\n\n applyConstrain: TransformConstrainFunction = (lngLat, zoom) => {\n return this._helper.applyConstrain(lngLat, zoom);\n };\n\n calculateCenterFromCameraLngLatAlt(lngLat: LngLatLike, alt: number, bearing?: number, pitch?: number): {center: LngLat; elevation: number; zoom: number} {\n return this._helper.calculateCenterFromCameraLngLatAlt(lngLat, alt, bearing, pitch);\n }\n\n /**\n * Note: automatically adjusts zoom to keep planet size consistent\n * (same size before and after a {@link setLocationAtPoint} call).\n */\n setLocationAtPoint(lnglat: LngLat, point: Point): void {\n if (!this.isGlobeRendering) {\n this._mercatorTransform.setLocationAtPoint(lnglat, point);\n this.apply(this._mercatorTransform);\n return;\n }\n this._verticalPerspectiveTransform.setLocationAtPoint(lnglat, point);\n this.apply(this._verticalPerspectiveTransform);\n return;\n }\n\n locationToScreenPoint(lnglat: LngLat, terrain?: Terrain): Point {\n return this.currentTransform.locationToScreenPoint(lnglat, terrain);\n }\n\n screenPointToMercatorCoordinate(p: Point, terrain?: Terrain): MercatorCoordinate {\n return this.currentTransform.screenPointToMercatorCoordinate(p, terrain);\n }\n\n screenPointToLocation(p: Point, terrain?: Terrain): LngLat {\n return this.currentTransform.screenPointToLocation(p, terrain);\n }\n\n isPointOnMapSurface(p: Point, terrain?: Terrain): boolean {\n return this.currentTransform.isPointOnMapSurface(p, terrain);\n }\n\n /**\n * Computes normalized direction of a ray from the camera to the given screen pixel.\n */\n getRayDirectionFromPixel(p: Point): vec3 {\n return this._verticalPerspectiveTransform.getRayDirectionFromPixel(p);\n }\n\n getMatrixForModel(location: LngLatLike, altitude?: number): mat4 {\n return this.currentTransform.getMatrixForModel(location, altitude);\n }\n\n getProjectionDataForCustomLayer(applyGlobeMatrix: boolean = true): ProjectionData {\n const mercatorData = this._mercatorTransform.getProjectionDataForCustomLayer(applyGlobeMatrix);\n\n if (!this.isGlobeRendering) {\n return mercatorData;\n }\n\n const globeData = this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(applyGlobeMatrix);\n globeData.fallbackMatrix = mercatorData.mainMatrix;\n return globeData;\n }\n\n getFastPathSimpleProjectionMatrix(tileID: OverscaledTileID): mat4 {\n return this.currentTransform.getFastPathSimpleProjectionMatrix(tileID);\n }\n}\n","import Point from '@mapbox/point-geometry';\nimport {cameraBoundsWarning, type CameraForBoxAndBearingHandlerResult, type EaseToHandlerResult, type EaseToHandlerOptions, type FlyToHandlerResult, type FlyToHandlerOptions, type ICameraHelper, type MapControlsDeltas, updateRotation, type UpdateRotationArgs, cameraForBoxAndBearing} from './camera_helper';\nimport {LngLat, type LngLatLike} from '../lng_lat';\nimport {angularCoordinatesToSurfaceVector, computeGlobePanCenter, getGlobeRadiusPixels, getZoomAdjustment, globeDistanceOfLocationsPixels, interpolateLngLatForGlobe} from './globe_utils';\nimport {clamp, createVec3f64, differenceOfAnglesDegrees, MAX_VALID_LATITUDE, remapSaturate, rollPitchBearingEqual, scaleZoom, warnOnce, zoomScale} from '../../util/util';\nimport {type mat4, vec3} from 'gl-matrix';\nimport {normalizeCenter} from '../transform_helper';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\n\nimport type {IReadonlyTransform, ITransform} from '../transform_interface';\nimport type {CameraForBoundsOptions} from '../../ui/camera';\nimport type {LngLatBounds} from '../lng_lat_bounds';\nimport type {PaddingOptions} from '../edge_insets';\n\n/**\n * @internal\n */\nexport class VerticalPerspectiveCameraHelper implements ICameraHelper {\n\n get useGlobeControls(): boolean { return true; }\n\n handlePanInertia(pan: Point, transform: IReadonlyTransform): {\n easingCenter: LngLat;\n easingOffset: Point;\n } {\n const panCenter = computeGlobePanCenter(pan, transform);\n if (Math.abs(panCenter.lng - transform.center.lng) > 180) {\n // If easeTo target would be over 180° distant, the animation would move\n // in the opposite direction that what the user intended.\n // Thus we clamp the movement to 179.5°.\n panCenter.lng = transform.center.lng + 179.5 * Math.sign(panCenter.lng - transform.center.lng);\n }\n return {\n easingCenter: panCenter,\n easingOffset: new Point(0, 0),\n };\n }\n\n handleMapControlsRollPitchBearingZoom(deltas: MapControlsDeltas, tr: ITransform): void {\n const zoomPixel = deltas.around;\n const zoomLoc = tr.screenPointToLocation(zoomPixel);\n\n if (deltas.bearingDelta) tr.setBearing(tr.bearing + deltas.bearingDelta);\n if (deltas.pitchDelta) tr.setPitch(tr.pitch + deltas.pitchDelta);\n if (deltas.rollDelta) tr.setRoll(tr.roll + deltas.rollDelta);\n const oldZoomPreZoomDelta = tr.zoom;\n if (deltas.zoomDelta) tr.setZoom(tr.zoom + deltas.zoomDelta);\n const actualZoomDelta = tr.zoom - oldZoomPreZoomDelta;\n\n if (actualZoomDelta === 0) {\n return;\n }\n\n // Problem: `setLocationAtPoint` for globe works when it is called a single time, but is a little glitchy in practice when used repeatedly for zooming.\n // - `setLocationAtPoint` repeatedly called at a location behind a pole will eventually glitch out\n // - `setLocationAtPoint` at location the longitude of which is more than 90° different from current center will eventually glitch out\n // But otherwise works fine at higher zooms, or when the target is somewhat near the current map center.\n // Solution: use a heuristic zooming in the problematic cases and interpolate to `setLocationAtPoint` when possible.\n\n // Magic numbers that control:\n // - when zoom movement slowing starts for cursor not on globe (avoid unnatural map movements)\n // - when we interpolate from exact zooming to heuristic zooming based on longitude difference of target location to current center\n // - when we interpolate from exact zooming to heuristic zooming based on globe being too small on screen\n // - when zoom movement slowing starts for globe being too small on viewport (avoids unnatural/unwanted map movements when map is zoomed out a lot)\n const raySurfaceDistanceForSlowingStart = 0.3; // Zoom movement slowing will start when the planet surface to ray distance is greater than this number (globe radius is 1, so 0.3 is ~2000km form the surface).\n const slowingMultiplier = 0.5; // The lower this value, the slower will the \"zoom movement slowing\" occur.\n const interpolateToHeuristicStartLng = 45; // When zoom location longitude is this many degrees away from map center, we start interpolating from exact zooming to heuristic zooming.\n const interpolateToHeuristicEndLng = 85; // Longitude difference at which interpolation to heuristic zooming ends.\n const interpolateToHeuristicExponent = 0.25; // Makes interpolation smoother.\n const interpolateToHeuristicStartRadius = 0.75; // When globe is this many times larger than the smaller viewport dimension, we start interpolating from exact zooming to heuristic zooming.\n const interpolateToHeuristicEndRadius = 0.35; // Globe size at which interpolation to heuristic zooming ends.\n const slowingRadiusStart = 0.9; // If globe is this many times larger than the smaller viewport dimension, start inhibiting map movement while zooming\n const slowingRadiusStop = 0.5;\n const slowingRadiusSlowFactor = 0.25; // How much is movement slowed when globe is too small\n\n const dLngRaw = differenceOfAnglesDegrees(tr.center.lng, zoomLoc.lng);\n const dLng = dLngRaw / (Math.abs(dLngRaw / 180) + 1.0); // This gradually reduces the amount of longitude change if the zoom location is very far, eg. on the other side of the pole (possible when looking at a pole).\n const dLat = differenceOfAnglesDegrees(tr.center.lat, zoomLoc.lat);\n\n // Slow zoom movement down if the mouse ray is far from the planet.\n const rayDirection = tr.getRayDirectionFromPixel(zoomPixel);\n const rayOrigin = tr.cameraPosition;\n const distanceToClosestPoint = vec3.dot(rayOrigin, rayDirection) * -1; // Globe center relative to ray origin is equal to -rayOrigin and rayDirection is normalized, thus we want to compute dot(-rayOrigin, rayDirection).\n const closestPoint = createVec3f64();\n vec3.add(closestPoint, rayOrigin, [\n rayDirection[0] * distanceToClosestPoint,\n rayDirection[1] * distanceToClosestPoint,\n rayDirection[2] * distanceToClosestPoint\n ]);\n const distanceFromSurface = vec3.length(closestPoint) - 1;\n const distanceFactor = Math.exp(-Math.max(distanceFromSurface - raySurfaceDistanceForSlowingStart, 0) * slowingMultiplier);\n\n // Slow zoom movement down if the globe is too small on viewport\n const radius = getGlobeRadiusPixels(tr.worldSize, tr.center.lat) / Math.min(tr.width, tr.height); // Radius relative to larger viewport dimension\n const radiusFactor = remapSaturate(radius, slowingRadiusStart, slowingRadiusStop, 1.0, slowingRadiusSlowFactor);\n\n // Compute how much to move towards the zoom location\n const factor = (1.0 - zoomScale(-actualZoomDelta)) * Math.min(distanceFactor, radiusFactor);\n\n const oldCenterLat = tr.center.lat;\n const oldZoom = tr.zoom;\n const heuristicCenter = new LngLat(\n tr.center.lng + dLng * factor,\n clamp(tr.center.lat + dLat * factor, -MAX_VALID_LATITUDE, MAX_VALID_LATITUDE)\n );\n\n // Now compute the map center exact zoom\n tr.setLocationAtPoint(zoomLoc, zoomPixel);\n const exactCenter = tr.center;\n\n // Interpolate between exact zooming and heuristic zooming depending on the longitude difference between current center and zoom location.\n const interpolationFactorLongitude = remapSaturate(Math.abs(dLngRaw), interpolateToHeuristicStartLng, interpolateToHeuristicEndLng, 0, 1);\n const interpolationFactorRadius = remapSaturate(radius, interpolateToHeuristicStartRadius, interpolateToHeuristicEndRadius, 0, 1);\n const heuristicFactor = Math.pow(Math.max(interpolationFactorLongitude, interpolationFactorRadius), interpolateToHeuristicExponent);\n\n const lngExactToHeuristic = differenceOfAnglesDegrees(exactCenter.lng, heuristicCenter.lng);\n const latExactToHeuristic = differenceOfAnglesDegrees(exactCenter.lat, heuristicCenter.lat);\n\n tr.setCenter(new LngLat(\n exactCenter.lng + lngExactToHeuristic * heuristicFactor,\n exactCenter.lat + latExactToHeuristic * heuristicFactor\n ).wrap());\n tr.setZoom(oldZoom + getZoomAdjustment(oldCenterLat, tr.center.lat));\n }\n\n handleMapControlsPan(deltas: MapControlsDeltas, tr: ITransform, _preZoomAroundLoc: LngLat): void {\n if (!deltas.panDelta) {\n return;\n }\n\n // These are actually very similar to mercator controls, and should converge to them at high zooms.\n // We avoid using the \"grab a place and move it around\" approach from mercator here,\n // since it is not a very pleasant way to pan a globe.\n const oldLat = tr.center.lat;\n const oldZoom = tr.zoom;\n tr.setCenter(computeGlobePanCenter(deltas.panDelta, tr).wrap());\n // Setting the center might adjust zoom to keep globe size constant, we need to avoid adding this adjustment a second time\n tr.setZoom(oldZoom + getZoomAdjustment(oldLat, tr.center.lat));\n }\n\n cameraForBoxAndBearing(options: CameraForBoundsOptions, padding: PaddingOptions, bounds: LngLatBounds, bearing: number, tr: ITransform): CameraForBoxAndBearingHandlerResult {\n const result = cameraForBoxAndBearing(options, padding, bounds, bearing, tr);\n // If globe is enabled, we use the parameters computed for mercator, and just update the zoom to fit the bounds.\n\n // Get clip space bounds including padding\n const xLeft = (padding.left) / tr.width * 2.0 - 1.0;\n const xRight = (tr.width - padding.right) / tr.width * 2.0 - 1.0;\n const yTop = (padding.top) / tr.height * -2.0 + 1.0;\n const yBottom = (tr.height - padding.bottom) / tr.height * -2.0 + 1.0;\n\n // Get camera bounds\n const flipEastWest = differenceOfAnglesDegrees(bounds.getWest(), bounds.getEast()) < 0;\n const lngWest = flipEastWest ? bounds.getEast() : bounds.getWest();\n const lngEast = flipEastWest ? bounds.getWest() : bounds.getEast();\n\n const latNorth = Math.max(bounds.getNorth(), bounds.getSouth()); // \"getNorth\" doesn't always return north...\n const latSouth = Math.min(bounds.getNorth(), bounds.getSouth());\n\n // Additional vectors will be tested for the rectangle midpoints\n const lngMid = lngWest + differenceOfAnglesDegrees(lngWest, lngEast) * 0.5;\n const latMid = latNorth + differenceOfAnglesDegrees(latNorth, latSouth) * 0.5;\n\n // Obtain a globe projection matrix that does not include pitch (unsupported)\n const clonedTr = tr.clone();\n clonedTr.setCenter(result.center);\n clonedTr.setBearing(result.bearing);\n clonedTr.setPitch(0);\n clonedTr.setRoll(0);\n clonedTr.setZoom(result.zoom);\n const matrix = clonedTr.modelViewProjectionMatrix;\n\n // Vectors to test - the bounds' corners and edge midpoints\n const testVectors = [\n angularCoordinatesToSurfaceVector(bounds.getNorthWest()),\n angularCoordinatesToSurfaceVector(bounds.getNorthEast()),\n angularCoordinatesToSurfaceVector(bounds.getSouthWest()),\n angularCoordinatesToSurfaceVector(bounds.getSouthEast()),\n // Also test edge midpoints\n angularCoordinatesToSurfaceVector(new LngLat(lngEast, latMid)),\n angularCoordinatesToSurfaceVector(new LngLat(lngWest, latMid)),\n angularCoordinatesToSurfaceVector(new LngLat(lngMid, latNorth)),\n angularCoordinatesToSurfaceVector(new LngLat(lngMid, latSouth))\n ];\n const vecToCenter = angularCoordinatesToSurfaceVector(result.center);\n\n // Test each vector, measure how much to scale down the globe to satisfy all tested points that they are inside clip space.\n let smallestNeededScale = Number.POSITIVE_INFINITY;\n for (const vec of testVectors) {\n if (xLeft < 0)\n smallestNeededScale = VerticalPerspectiveCameraHelper.getLesserNonNegativeNonNull(smallestNeededScale, VerticalPerspectiveCameraHelper.solveVectorScale(vec, vecToCenter, matrix, 'x', xLeft));\n if (xRight > 0)\n smallestNeededScale = VerticalPerspectiveCameraHelper.getLesserNonNegativeNonNull(smallestNeededScale, VerticalPerspectiveCameraHelper.solveVectorScale(vec, vecToCenter, matrix, 'x', xRight));\n if (yTop > 0)\n smallestNeededScale = VerticalPerspectiveCameraHelper.getLesserNonNegativeNonNull(smallestNeededScale, VerticalPerspectiveCameraHelper.solveVectorScale(vec, vecToCenter, matrix, 'y', yTop));\n if (yBottom < 0)\n smallestNeededScale = VerticalPerspectiveCameraHelper.getLesserNonNegativeNonNull(smallestNeededScale, VerticalPerspectiveCameraHelper.solveVectorScale(vec, vecToCenter, matrix, 'y', yBottom));\n }\n\n if (!Number.isFinite(smallestNeededScale) || smallestNeededScale === 0) {\n cameraBoundsWarning();\n return undefined;\n }\n\n // Compute target zoom from the obtained scale.\n result.zoom = clonedTr.zoom + scaleZoom(smallestNeededScale);\n return result;\n }\n\n /**\n * Handles the zoom and center change during camera jumpTo.\n */\n handleJumpToCenterZoom(tr: ITransform, options: { zoom?: number; center?: LngLatLike }): void {\n // Special zoom & center handling for globe:\n // Globe constrained center isn't dependent on zoom level\n const startingLat = tr.center.lat;\n const constrainedCenter = tr.applyConstrain(options.center ? LngLat.convert(options.center) : tr.center, tr.zoom).center;\n tr.setCenter(constrainedCenter.wrap());\n\n // Make sure to compute correct target zoom level if no zoom is specified\n const targetZoom = (typeof options.zoom !== 'undefined') ? +options.zoom : (tr.zoom + getZoomAdjustment(startingLat, constrainedCenter.lat));\n if (tr.zoom !== targetZoom) {\n tr.setZoom(targetZoom);\n }\n }\n\n handleEaseTo(tr: ITransform, options: EaseToHandlerOptions): EaseToHandlerResult {\n const startZoom = tr.zoom;\n const startCenter = tr.center;\n const startPadding = tr.padding;\n const startEulerAngles = {roll: tr.roll, pitch: tr.pitch, bearing: tr.bearing};\n const endRoll = options.roll === undefined ? tr.roll : options.roll;\n const endPitch = options.pitch === undefined ? tr.pitch : options.pitch;\n const endBearing = options.bearing === undefined ? tr.bearing : options.bearing;\n const endEulerAngles = {roll: endRoll, pitch: endPitch, bearing: endBearing};\n\n const optionsZoom = typeof options.zoom !== 'undefined';\n\n const doPadding = !tr.isPaddingEqual(options.padding);\n\n let isZooming = false;\n\n // Globe needs special handling for how zoom should be animated.\n // 1) if zoom is set, ease to the given mercator zoom\n // 2) if neither is set, assume constant apparent zoom (constant planet size) is to be kept\n const preConstrainCenter = options.center ?\n LngLat.convert(options.center) :\n startCenter;\n const constrainedCenter = tr.applyConstrain(\n preConstrainCenter,\n startZoom // zoom can be whatever at this stage, it should not affect anything if globe is enabled\n ).center;\n normalizeCenter(tr, constrainedCenter);\n\n const clonedTr = tr.clone();\n clonedTr.setCenter(constrainedCenter);\n\n clonedTr.setZoom(optionsZoom ?\n +options.zoom :\n startZoom + getZoomAdjustment(startCenter.lat, preConstrainCenter.lat));\n clonedTr.setBearing(options.bearing);\n const clampedPoint = new Point(\n clamp(tr.centerPoint.x + options.offsetAsPoint.x, 0, tr.width),\n clamp(tr.centerPoint.y + options.offsetAsPoint.y, 0, tr.height)\n );\n clonedTr.setLocationAtPoint(constrainedCenter, clampedPoint);\n // Find final animation targets\n const endCenterWithShift = (options.offset && options.offsetAsPoint.mag()) > 0 ? clonedTr.center : constrainedCenter;\n const endZoomWithShift = optionsZoom ?\n +options.zoom :\n startZoom + getZoomAdjustment(startCenter.lat, endCenterWithShift.lat);\n\n // Planet radius for a given zoom level differs according to latitude\n // Convert zooms to what they would be at equator for the given planet radius\n const normalizedStartZoom = startZoom + getZoomAdjustment(startCenter.lat, 0);\n const normalizedEndZoom = endZoomWithShift + getZoomAdjustment(endCenterWithShift.lat, 0);\n const deltaLng = differenceOfAnglesDegrees(startCenter.lng, endCenterWithShift.lng);\n const deltaLat = differenceOfAnglesDegrees(startCenter.lat, endCenterWithShift.lat);\n\n const finalScale = zoomScale(normalizedEndZoom - normalizedStartZoom);\n isZooming = (endZoomWithShift !== startZoom);\n\n const easeFunc = (k: number) => {\n if (!rollPitchBearingEqual(startEulerAngles, endEulerAngles)) {\n updateRotation({\n startEulerAngles,\n endEulerAngles,\n tr,\n k,\n useSlerp: startEulerAngles.roll != endEulerAngles.roll} as UpdateRotationArgs);\n }\n\n if (doPadding) {\n tr.interpolatePadding(startPadding, options.padding,k);\n }\n\n if (options.around) {\n warnOnce('Easing around a point is not supported under globe projection.');\n tr.setLocationAtPoint(options.around, options.aroundPoint);\n } else {\n const base = normalizedEndZoom > normalizedStartZoom ?\n Math.min(2, finalScale) :\n Math.max(0.5, finalScale);\n const speedup = Math.pow(base, 1 - k);\n const factor = k * speedup;\n\n // Spherical lerp might be used here instead, but that was tested and it leads to very weird paths when the interpolated arc gets near the poles.\n // Instead we interpolate LngLat almost directly, but taking into account that\n // one degree of longitude gets progressively smaller relative to latitude towards the poles.\n const newCenter = interpolateLngLatForGlobe(startCenter, deltaLng, deltaLat, factor);\n tr.setCenter(newCenter.wrap());\n }\n\n if (isZooming) {\n const normalizedInterpolatedZoom = interpolates.number(normalizedStartZoom, normalizedEndZoom, k);\n const interpolatedZoom = normalizedInterpolatedZoom + getZoomAdjustment(0, tr.center.lat);\n tr.setZoom(interpolatedZoom);\n }\n };\n\n return {\n easeFunc,\n isZooming,\n elevationCenter: endCenterWithShift,\n };\n }\n\n handleFlyTo(tr: ITransform, options: FlyToHandlerOptions): FlyToHandlerResult {\n const optionsZoom = typeof options.zoom !== 'undefined';\n\n const startCenter = tr.center;\n const startZoom = tr.zoom;\n const startPadding = tr.padding;\n\n const doPadding = !tr.isPaddingEqual(options.padding);\n\n // Obtain target center and zoom\n const constrainedCenter = tr.applyConstrain(\n LngLat.convert(options.center || options.locationAtOffset),\n startZoom\n ).center;\n const targetZoom = optionsZoom ? +options.zoom : tr.zoom + getZoomAdjustment(tr.center.lat, constrainedCenter.lat);\n\n // Compute target center that respects offset by creating a temporary transform and calling its `setLocationAtPoint`.\n const clonedTr = tr.clone();\n clonedTr.setCenter(constrainedCenter);\n\n clonedTr.setZoom(targetZoom);\n clonedTr.setBearing(options.bearing);\n const clampedPoint = new Point(\n clamp(tr.centerPoint.x + options.offsetAsPoint.x, 0, tr.width),\n clamp(tr.centerPoint.y + options.offsetAsPoint.y, 0, tr.height)\n );\n clonedTr.setLocationAtPoint(constrainedCenter, clampedPoint);\n const targetCenter = clonedTr.center;\n\n normalizeCenter(tr, targetCenter);\n\n const pixelPathLength = globeDistanceOfLocationsPixels(tr, startCenter, targetCenter);\n\n const normalizedStartZoom = startZoom + getZoomAdjustment(startCenter.lat, 0);\n const normalizedTargetZoom = targetZoom + getZoomAdjustment(targetCenter.lat, 0);\n const scaleOfZoom = zoomScale(normalizedTargetZoom - normalizedStartZoom);\n\n const optionsMinZoom = typeof options.minZoom === 'number';\n\n let scaleOfMinZoom: number;\n\n if (optionsMinZoom) {\n const normalizedOptionsMinZoom = +options.minZoom + getZoomAdjustment(targetCenter.lat, 0);\n const normalizedMinZoomPreConstrain = Math.min(normalizedOptionsMinZoom, normalizedStartZoom, normalizedTargetZoom);\n const minZoomPreConstrain = normalizedMinZoomPreConstrain + getZoomAdjustment(0, targetCenter.lat);\n const minZoom = tr.applyConstrain(targetCenter, minZoomPreConstrain).zoom;\n const normalizedMinZoom = minZoom + getZoomAdjustment(targetCenter.lat, 0);\n scaleOfMinZoom = zoomScale(normalizedMinZoom - normalizedStartZoom);\n }\n\n const deltaLng = differenceOfAnglesDegrees(startCenter.lng, targetCenter.lng);\n const deltaLat = differenceOfAnglesDegrees(startCenter.lat, targetCenter.lat);\n\n const easeFunc = (k: number, scale: number, centerFactor: number, _pointAtOffset: Point) => {\n const interpolatedCenter = interpolateLngLatForGlobe(startCenter, deltaLng, deltaLat, centerFactor);\n\n if (doPadding) {\n tr.interpolatePadding(startPadding, options.padding,k);\n }\n\n const newCenter = k === 1 ? targetCenter : interpolatedCenter;\n tr.setCenter(newCenter.wrap());\n\n const interpolatedZoom = normalizedStartZoom + scaleZoom(scale);\n tr.setZoom(k === 1 ? targetZoom : (interpolatedZoom + getZoomAdjustment(0, newCenter.lat)));\n };\n\n return {\n easeFunc,\n scaleOfZoom,\n targetCenter,\n scaleOfMinZoom,\n pixelPathLength,\n };\n }\n\n /**\n * Computes how much to scale the globe in order for a given point on its surface (a location) to project to a given clip space coordinate in either the X or the Y axis.\n * @param vector - Position of the queried location on the surface of the unit sphere globe.\n * @param toCenter - Position of current transform center on the surface of the unit sphere globe.\n * This is needed because zooming the globe not only changes its scale,\n * but also moves the camera closer or further away along this vector (pitch is disregarded).\n * @param projection - The globe projection matrix.\n * @param targetDimension - The dimension in which the scaled vector must match the target value in clip space.\n * @param targetValue - The target clip space value in the specified dimension to which the queried vector must project.\n * @returns How much to scale the globe.\n */\n private static solveVectorScale(vector: vec3, toCenter: vec3, projection: mat4, targetDimension: 'x' | 'y', targetValue: number): number | null {\n // We want to compute how much to scale the sphere in order for the input `vector` to project to `targetValue` in the given `targetDimension` (X or Y).\n const k = targetValue;\n const columnXorY = targetDimension === 'x' ?\n [projection[0], projection[4], projection[8], projection[12]] : // X\n [projection[1], projection[5], projection[9], projection[13]]; // Y\n const columnZ = [projection[3], projection[7], projection[11], projection[15]];\n\n const vecDotXY = vector[0] * columnXorY[0] + vector[1] * columnXorY[1] + vector[2] * columnXorY[2];\n const vecDotZ = vector[0] * columnZ[0] + vector[1] * columnZ[1] + vector[2] * columnZ[2];\n const toCenterDotXY = toCenter[0] * columnXorY[0] + toCenter[1] * columnXorY[1] + toCenter[2] * columnXorY[2];\n const toCenterDotZ = toCenter[0] * columnZ[0] + toCenter[1] * columnZ[1] + toCenter[2] * columnZ[2];\n\n // The following can be derived from writing down what happens to a vector scaled by a parameter (\"V * t\") when it is multiplied by a projection matrix, then solving for \"t\".\n // Or rather, we derive it for a vector \"V * t + (1-t) * C\". Where V is `vector` and C is `toCenter`. The extra addition is needed because zooming out also moves the camera along \"C\".\n\n const t = (toCenterDotXY + columnXorY[3] - k * toCenterDotZ - k * columnZ[3]) / (toCenterDotXY - vecDotXY - k * toCenterDotZ + k * vecDotZ);\n\n if (\n toCenterDotXY + k * vecDotZ === vecDotXY + k * toCenterDotZ ||\n columnZ[3] * (vecDotXY - toCenterDotXY) + columnXorY[3] * (toCenterDotZ - vecDotZ) + vecDotXY * toCenterDotZ === toCenterDotXY * vecDotZ\n ) {\n // The computed result is invalid.\n return null;\n }\n return t;\n }\n\n /**\n * Returns `newValue` if it is:\n *\n * - not null AND\n * - not negative AND\n * - smaller than `newValue`,\n *\n * ...otherwise returns `oldValue`.\n */\n private static getLesserNonNegativeNonNull(oldValue: number, newValue: number): number {\n if (newValue !== null && newValue >= 0 && newValue < oldValue) {\n return newValue;\n } else {\n return oldValue;\n }\n }\n}\n","import {MercatorCameraHelper} from './mercator_camera_helper';\nimport {VerticalPerspectiveCameraHelper} from './vertical_perspective_camera_helper';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {CameraForBoxAndBearingHandlerResult, EaseToHandlerResult, EaseToHandlerOptions, FlyToHandlerResult, FlyToHandlerOptions, ICameraHelper, MapControlsDeltas} from './camera_helper';\nimport type {LngLat, LngLatLike} from '../lng_lat';\nimport type {IReadonlyTransform, ITransform} from '../transform_interface';\nimport type {GlobeProjection} from './globe_projection';\nimport type {CameraForBoundsOptions} from '../../ui/camera';\nimport type {LngLatBounds} from '../lng_lat_bounds';\nimport type {PaddingOptions} from '../edge_insets';\n\n/**\n * @internal\n */\nexport class GlobeCameraHelper implements ICameraHelper {\n private _globe: GlobeProjection;\n private _mercatorCameraHelper: MercatorCameraHelper;\n private _verticalPerspectiveCameraHelper: VerticalPerspectiveCameraHelper;\n\n constructor(globe: GlobeProjection) {\n this._globe = globe;\n this._mercatorCameraHelper = new MercatorCameraHelper();\n this._verticalPerspectiveCameraHelper = new VerticalPerspectiveCameraHelper();\n }\n\n get useGlobeControls(): boolean { return this._globe.useGlobeRendering; }\n\n get currentHelper(): ICameraHelper {\n return this.useGlobeControls ? this._verticalPerspectiveCameraHelper : this._mercatorCameraHelper;\n }\n\n handlePanInertia(pan: Point, transform: IReadonlyTransform): {\n easingCenter: LngLat;\n easingOffset: Point;\n } {\n return this.currentHelper.handlePanInertia(pan, transform);\n }\n\n handleMapControlsRollPitchBearingZoom(deltas: MapControlsDeltas, tr: ITransform): void {\n return this.currentHelper.handleMapControlsRollPitchBearingZoom(deltas, tr);\n }\n\n handleMapControlsPan(deltas: MapControlsDeltas, tr: ITransform, preZoomAroundLoc: LngLat): void {\n this.currentHelper.handleMapControlsPan(deltas, tr, preZoomAroundLoc);\n }\n\n cameraForBoxAndBearing(options: CameraForBoundsOptions, padding: PaddingOptions, bounds: LngLatBounds, bearing: number, tr: ITransform): CameraForBoxAndBearingHandlerResult {\n return this.currentHelper.cameraForBoxAndBearing(options, padding, bounds, bearing, tr);\n }\n\n /**\n * Handles the zoom and center change during camera jumpTo.\n */\n handleJumpToCenterZoom(tr: ITransform, options: { zoom?: number; center?: LngLatLike }): void {\n this.currentHelper.handleJumpToCenterZoom(tr, options);\n }\n\n handleEaseTo(tr: ITransform, options: EaseToHandlerOptions): EaseToHandlerResult {\n return this.currentHelper.handleEaseTo(tr, options);\n }\n\n handleFlyTo(tr: ITransform, options: FlyToHandlerOptions): FlyToHandlerResult {\n return this.currentHelper.handleFlyTo(tr, options);\n }\n}","import {Event, ErrorEvent, Evented} from '../util/evented';\nimport {type StyleLayer} from './style_layer';\nimport {isRasterStyleLayer} from './style_layer/raster_style_layer';\nimport {createStyleLayer} from './create_style_layer';\nimport {loadSprite} from './load_sprite';\nimport {ImageManager} from '../render/image_manager';\nimport {GlyphManager} from '../render/glyph_manager';\nimport {Light} from './light';\nimport {Sky} from './sky';\nimport {LineAtlas} from '../render/line_atlas';\nimport {clone, extend, deepEqual, filterObject, mapObject} from '../util/util';\nimport {coerceSpriteToArray} from '../util/style';\nimport {getJSON, getReferrer} from '../util/ajax';\nimport {ResourceType} from '../util/request_manager';\nimport {browser} from '../util/browser';\nimport {now} from '../util/time_control';\nimport {Dispatcher} from '../util/dispatcher';\nimport {validateStyle, emitValidationErrors as _emitValidationErrors} from './validate_style';\nimport {type Source} from '../source/source';\nimport {type QueryRenderedFeaturesOptions, type QueryRenderedFeaturesOptionsStrict, type QueryRenderedFeaturesResults, type QueryRenderedFeaturesResultsItem, type QuerySourceFeatureOptions, queryRenderedFeatures, queryRenderedSymbols, querySourceFeatures} from '../source/query_features';\nimport {TileManager} from '../tile/tile_manager';\nimport {type GeoJSONSource} from '../source/geojson_source';\nimport {latest as styleSpec, derefLayers, emptyStyle, diff as diffStyles, type DiffCommand} from '@maplibre/maplibre-gl-style-spec';\nimport {getGlobalWorkerPool} from '../util/global_worker_pool';\nimport {rtlMainThreadPluginFactory} from '../source/rtl_text_plugin_main_thread';\nimport {RTLPluginLoadedEventName} from '../source/rtl_text_plugin_status';\nimport {PauseablePlacement} from './pauseable_placement';\nimport {ZoomHistory} from './zoom_history';\nimport {CrossTileSymbolIndex} from '../symbol/cross_tile_symbol_index';\nimport {validateCustomStyleLayer} from './style_layer/custom_style_layer';\nimport type {MapGeoJSONFeature} from '../util/vectortile_to_geojson';\nimport type Point from '@mapbox/point-geometry';\n\n// We're skipping validation errors with the `source.canvas` identifier in order\n// to continue to allow canvas sources to be added at runtime/updated in\n// smart setStyle (see https://github.com/mapbox/mapbox-gl-js/pull/6424):\nconst emitValidationErrors = (evented: Evented, errors?: ReadonlyArray<{\n message: string;\n identifier?: string;\n}> | null) =>\n _emitValidationErrors(evented, errors && errors.filter(error => error.identifier !== 'source.canvas'));\n\nimport type {Map} from '../ui/map';\nimport type {IReadonlyTransform, ITransform} from '../geo/transform_interface';\nimport type {StyleImage} from './style_image';\nimport type {EvaluationParameters} from './evaluation_parameters';\nimport type {Placement} from '../symbol/placement';\nimport type {\n LayerSpecification,\n FilterSpecification,\n StyleSpecification,\n LightSpecification,\n SourceSpecification,\n SpriteSpecification,\n DiffOperations,\n ProjectionSpecification,\n SkySpecification,\n StateSpecification\n} from '@maplibre/maplibre-gl-style-spec';\nimport type {CanvasSourceSpecification} from '../source/canvas_source';\nimport type {CustomLayerInterface} from './style_layer/custom_style_layer';\nimport type {Validator} from './validate_style';\nimport {\n type GetDashesParameters,\n type GetDashesResponse,\n MessageType,\n type GetGlyphsParameters,\n type GetGlyphsResponse,\n type GetImagesParameters,\n type GetImagesResponse\n} from '../util/actor_messages';\nimport {type Projection} from '../geo/projection/projection';\nimport {createProjectionFromName} from '../geo/projection/projection_factory';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\nconst empty = emptyStyle() as StyleSpecification;\n/**\n * A feature identifier that is bound to a source\n */\nexport type FeatureIdentifier = {\n /**\n * Unique id of the feature.\n */\n id?: string | number | undefined;\n /**\n * The id of the vector or GeoJSON source for the feature.\n */\n source: string;\n /**\n * *For vector tile sources, `sourceLayer` is required.*\n */\n sourceLayer?: string | undefined;\n};\n\n/**\n * The options object related to the {@link Map}'s style related methods\n */\nexport type StyleOptions = {\n /**\n * If false, style validation will be skipped. Useful in production environment.\n */\n validate?: boolean;\n /**\n * Defines a CSS\n * font-family for locally overriding generation of Chinese, Japanese, and Korean characters.\n * For these characters, font settings from the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold).\n * Set to `false`, to enable font settings from the map's style for these glyph ranges.\n * Forces a full update.\n */\n localIdeographFontFamily?: string | false;\n};\n\n/**\n * Supporting type to add validation to another style related type\n */\nexport type StyleSetterOptions = {\n /**\n * Whether to check if the filter conforms to the MapLibre Style Specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function.\n */\n validate?: boolean;\n};\n\n/**\n * Part of {@link Map.setStyle} options, transformStyle is a convenience function that allows to modify a style after it is fetched but before it is committed to the map state.\n *\n * This function exposes previous and next styles, it can be commonly used to support a range of functionalities like:\n *\n * - when previous style carries certain 'state' that needs to be carried over to a new style gracefully;\n * - when a desired style is a certain combination of previous and incoming style;\n * - when an incoming style requires modification based on external state.\n * - when an incoming style uses relative paths, which need to be converted to absolute.\n *\n * @param previous - The current style.\n * @param next - The next style.\n * @returns resulting style that will to be applied to the map\n *\n * @example\n * ```ts\n * map.setStyle('https://demotiles.maplibre.org/style.json', {\n * transformStyle: (previousStyle, nextStyle) => ({\n * ...nextStyle,\n * // make relative sprite path like \"../sprite\" absolute\n * sprite: new URL(nextStyle.sprite, \"https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprites/\").href,\n * // make relative glyphs path like \"../fonts/{fontstack}/{range}.pbf\" absolute\n * glyphs: new URL(nextStyle.glyphs, \"https://demotiles.maplibre.org/font/\").href,\n * sources: {\n * // make relative vector url like \"../../\" absolute\n * ...nextStyle.sources.map(source => {\n * if (source.url) {\n * source.url = new URL(source.url, \"https://tiles.openfreemap.org/planet\");\n * }\n * return source;\n * }),\n * // copy a source from previous style\n * 'osm': previousStyle.sources.osm\n * },\n * layers: [\n * // background layer\n * nextStyle.layers[0],\n * // copy a layer from previous style\n * previousStyle.layers[0],\n * // other layers from the next style\n * ...nextStyle.layers.slice(1).map(layer => {\n * // hide the layers we don't need from demotiles style\n * if (layer.id.startsWith('geolines')) {\n * layer.layout = {...layer.layout || {}, visibility: 'none'};\n * // filter out US polygons\n * } else if (layer.id.startsWith('coastline') || layer.id.startsWith('countries')) {\n * layer.filter = ['!=', ['get', 'ADM0_A3'], 'USA'];\n * }\n * return layer;\n * })\n * ]\n * })\n * });\n * ```\n */\nexport type TransformStyleFunction = (previous: StyleSpecification | undefined, next: StyleSpecification) => StyleSpecification;\n\n/**\n * The options object related to the {@link Map}'s style related methods\n */\nexport type StyleSwapOptions = {\n /**\n * If false, force a 'full' update, removing the current style\n * and building the given one instead of attempting a diff-based update.\n */\n diff?: boolean;\n /**\n * TransformStyleFunction is a convenience function\n * that allows to modify a style after it is fetched but before it is committed to the map state. Refer to {@link TransformStyleFunction}.\n */\n transformStyle?: TransformStyleFunction;\n};\n\n/**\n * Specifies a layer to be added to a {@link Style}. In addition to a standard {@link LayerSpecification}\n * or a {@link CustomLayerInterface}, a {@link LayerSpecification} with an embedded {@link SourceSpecification} can also be provided.\n */\nexport type AddLayerObject = LayerSpecification | (Omit & {source: SourceSpecification}) | CustomLayerInterface;\n\n/**\n * The Style base class\n */\nexport class Style extends Evented {\n map: Map;\n stylesheet: StyleSpecification;\n dispatcher: Dispatcher;\n imageManager: ImageManager;\n glyphManager: GlyphManager;\n lineAtlas: LineAtlas;\n light: Light;\n projection: Projection | undefined;\n sky: Sky;\n\n _frameRequest: AbortController;\n _loadStyleRequest: AbortController;\n _spriteRequest: AbortController;\n _layers: {[_: string]: StyleLayer};\n _serializedLayers: {[_: string]: LayerSpecification};\n _order: Array;\n tileManagers: {[_: string]: TileManager};\n zoomHistory: ZoomHistory;\n _loaded: boolean;\n _changed: boolean;\n _updatedSources: {[_: string]: 'clear' | 'reload'};\n _updatedLayers: {[_: string]: true};\n _removedLayers: {[_: string]: StyleLayer};\n _changedImages: {[_: string]: true};\n _glyphsDidChange: boolean;\n _updatedPaintProps: {[layer: string]: true};\n _layerOrderChanged: boolean;\n // image ids of images loaded from style's sprite\n _spritesImagesIds: {[spriteId: string]: string[]};\n // image ids of all images loaded (sprite + user)\n _availableImages: Array;\n _globalState: Record;\n crossTileSymbolIndex: CrossTileSymbolIndex;\n pauseablePlacement: PauseablePlacement;\n placement: Placement;\n z: number;\n\n constructor(map: Map, options: StyleOptions = {}) {\n super();\n\n this.map = map;\n this.dispatcher = new Dispatcher(getGlobalWorkerPool(), map._getMapId());\n this.dispatcher.registerMessageHandler(MessageType.getGlyphs, (mapId, params) => {\n return this.getGlyphs(mapId, params);\n });\n this.dispatcher.registerMessageHandler(MessageType.getImages, (mapId, params) => {\n return this.getImages(mapId, params);\n });\n this.dispatcher.registerMessageHandler(MessageType.getDashes, (mapId, params) => {\n return this.getDashes(mapId, params);\n });\n this.imageManager = new ImageManager();\n this.imageManager.setEventedParent(this);\n const glyphLang = map._container?.lang || (typeof document !== 'undefined' && document.documentElement?.lang) || undefined;\n this.glyphManager = new GlyphManager(map._requestManager, options.localIdeographFontFamily, glyphLang);\n this.lineAtlas = new LineAtlas(256, 512);\n this.crossTileSymbolIndex = new CrossTileSymbolIndex();\n\n this._setInitialValues();\n\n this._resetUpdates();\n\n this.dispatcher.broadcast(MessageType.setReferrer, getReferrer());\n rtlMainThreadPluginFactory().on(RTLPluginLoadedEventName, this._rtlPluginLoaded);\n\n this.on('data', (event) => {\n if (event.dataType !== 'source' || event.sourceDataType !== 'metadata') {\n return;\n }\n\n const tileManager = this.tileManagers[event.sourceId];\n if (!tileManager) {\n return;\n }\n\n const source = tileManager.getSource();\n if (!source || !source.vectorLayerIds) {\n return;\n }\n\n for (const layerId in this._layers) {\n const layer = this._layers[layerId];\n if (layer.source === source.id) {\n this._validateLayer(layer);\n }\n }\n });\n }\n\n private _setInitialValues() {\n this._spritesImagesIds = {};\n this._layers = {};\n this._order = [];\n this.tileManagers = {};\n this.zoomHistory = new ZoomHistory();\n this._availableImages = [];\n this._globalState = {};\n this._serializedLayers = {};\n this.stylesheet = null;\n this.light = null;\n this.sky = null;\n if (this.projection) {\n this.projection.destroy();\n delete this.projection;\n }\n this._loaded = false;\n this._changed = false;\n this._updatedLayers = {};\n this._updatedSources = {};\n this._changedImages = {};\n this._glyphsDidChange = false;\n this._updatedPaintProps = {};\n this._layerOrderChanged = false;\n this.crossTileSymbolIndex = new (this.crossTileSymbolIndex?.constructor || Object)();\n this.pauseablePlacement = undefined;\n this.placement = undefined;\n this.z = 0;\n }\n\n _rtlPluginLoaded = () => {\n for (const id in this.tileManagers) {\n const sourceType = this.tileManagers[id].getSource().type;\n if (sourceType === 'vector' || sourceType === 'geojson') {\n // Non-vector sources don't have any symbols buckets to reload when the RTL text plugin loads\n // They also load more quickly, so they're more likely to have already displaying tiles\n // that would be unnecessarily booted by the plugin load event\n this.tileManagers[id].reload(); // Should be a no-op if the plugin loads before any tiles load\n }\n }\n };\n\n setGlobalStateProperty(name: string, value: any) {\n this._checkLoaded();\n\n const newValue = value === null ?\n this.stylesheet.state?.[name]?.default ?? null :\n value;\n\n if (deepEqual(newValue, this._globalState[name])) {\n return this;\n }\n\n this._globalState[name] = newValue;\n\n this._applyGlobalStateChanges([name]);\n }\n\n getGlobalState() {\n return this._globalState;\n }\n\n setGlobalState(newStylesheetState: StateSpecification) {\n this._checkLoaded();\n\n const changedGlobalStateRefs = [];\n\n for (const propertyName in newStylesheetState) {\n const didChange = !deepEqual(this._globalState[propertyName], newStylesheetState[propertyName].default);\n\n if (didChange) {\n changedGlobalStateRefs.push(propertyName);\n this._globalState[propertyName] = newStylesheetState[propertyName].default;\n }\n }\n\n this._applyGlobalStateChanges(changedGlobalStateRefs);\n }\n\n /**\n * @internal\n * Find all sources that are affected by the global state changes and reload them.\n * Find all paint properties that are affected by the global state changes and update them.\n * For example, if a layer filter uses global-state expression, this function will find the source id of that layer.\n */\n _applyGlobalStateChanges(globalStateRefs: string[]) {\n if (globalStateRefs.length === 0) {\n return;\n }\n\n const sourceIdsToReload = new Set();\n const globalStateChange = {};\n\n for (const ref of globalStateRefs) {\n globalStateChange[ref] = this._globalState[ref];\n\n for (const layerId in this._layers) {\n const layer = this._layers[layerId];\n const layoutAffectingGlobalStateRefs = layer.getLayoutAffectingGlobalStateRefs();\n const paintAffectingGlobalStateRefs = layer.getPaintAffectingGlobalStateRefs();\n const visibilityAffectingGlobalStateRefs = layer.getVisibilityAffectingGlobalStateRefs();\n\n if (layoutAffectingGlobalStateRefs.has(ref)) {\n sourceIdsToReload.add(layer.source);\n }\n if (paintAffectingGlobalStateRefs.has(ref)) {\n for (const {name, value} of paintAffectingGlobalStateRefs.get(ref)) {\n this._updatePaintProperty(layer, name, value);\n }\n }\n if (visibilityAffectingGlobalStateRefs?.has(ref)) {\n layer.recalculateVisibility();\n this._updateLayer(layer);\n }\n }\n }\n\n // Propagate global state changes to workers\n this.dispatcher.broadcast(MessageType.updateGlobalState, globalStateChange);\n\n for (const id in this.tileManagers) {\n if (sourceIdsToReload.has(id)) {\n this._reloadSource(id);\n this._changed = true;\n }\n }\n }\n\n loadURL(url: string, options: StyleSwapOptions & StyleSetterOptions = {}, previousStyle?: StyleSpecification) {\n this.fire(new Event('dataloading', {dataType: 'style'}));\n\n options.validate = typeof options.validate === 'boolean' ?\n options.validate : true;\n\n const request = this.map._requestManager.transformRequest(url, ResourceType.Style);\n this._loadStyleRequest = new AbortController();\n const abortController = this._loadStyleRequest;\n getJSON(request, this._loadStyleRequest).then((response) => {\n this._loadStyleRequest = null;\n this._load(response.data, options, previousStyle);\n }).catch((error) => {\n this._loadStyleRequest = null;\n if (error && !abortController.signal.aborted) { // ignore abort\n this.fire(new ErrorEvent(error));\n }\n });\n }\n\n loadJSON(json: StyleSpecification, options: StyleSetterOptions & StyleSwapOptions = {}, previousStyle?: StyleSpecification) {\n this.fire(new Event('dataloading', {dataType: 'style'}));\n\n this._frameRequest = new AbortController();\n browser.frameAsync(this._frameRequest).then(() => {\n this._frameRequest = null;\n options.validate = options.validate !== false;\n this._load(json, options, previousStyle);\n }).catch(() => {}); // ignore abort\n }\n\n loadEmpty() {\n this.fire(new Event('dataloading', {dataType: 'style'}));\n this._load(empty, {validate: false});\n }\n\n _load(json: StyleSpecification, options: StyleSwapOptions & StyleSetterOptions, previousStyle?: StyleSpecification) {\n let nextState = options.transformStyle ? options.transformStyle(previousStyle, json) : json;\n if (options.validate && emitValidationErrors(this, validateStyle(nextState))) {\n return;\n }\n\n nextState = {...nextState};\n\n this._loaded = true;\n this.stylesheet = nextState;\n\n for (const id in nextState.sources) {\n this.addSource(id, nextState.sources[id], {validate: false});\n }\n\n if (nextState.sprite) {\n this._loadSprite(nextState.sprite);\n } else {\n this.imageManager.setLoaded(true);\n }\n\n this.glyphManager.setURL(nextState.glyphs);\n this._createLayers();\n\n this.light = new Light(this.stylesheet.light);\n this._setProjectionInternal(this.stylesheet.projection?.type || 'mercator');\n\n this.sky = new Sky(this.stylesheet.sky);\n\n this.map.setTerrain(this.stylesheet.terrain ?? null);\n\n this.fire(new Event('data', {dataType: 'style'}));\n this.fire(new Event('style.load'));\n }\n\n private _createLayers() {\n const dereferencedLayers = derefLayers(this.stylesheet.layers);\n\n this.setGlobalState(this.stylesheet.state ?? null);\n\n // Broadcast layers to workers first, so that expensive style processing (createStyleLayer)\n // can happen in parallel on both main and worker threads.\n this.dispatcher.broadcast(MessageType.setLayers, dereferencedLayers);\n\n this._order = dereferencedLayers.map((layer) => layer.id);\n this._layers = {};\n\n // reset serialization field, to be populated only when needed\n this._serializedLayers = null;\n for (const layer of dereferencedLayers) {\n const styledLayer = createStyleLayer(layer, this._globalState);\n styledLayer.setEventedParent(this, {layer: {id: layer.id}});\n this._layers[layer.id] = styledLayer;\n\n if (isRasterStyleLayer(styledLayer) && this.tileManagers[styledLayer.source]) {\n const rasterFadeDuration = layer.paint?.['raster-fade-duration'] ?? styledLayer.paint.get('raster-fade-duration');\n this.tileManagers[styledLayer.source].setRasterFadeDuration(rasterFadeDuration);\n }\n }\n }\n\n _loadSprite(sprite: SpriteSpecification, isUpdate: boolean = false, completion: (err: Error) => void = undefined) {\n this.imageManager.setLoaded(false);\n\n const abortController = new AbortController();\n this._spriteRequest = abortController;\n let err: Error;\n loadSprite(sprite, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((images) => {\n this._spriteRequest = null;\n if (images) {\n for (const spriteId in images) {\n this._spritesImagesIds[spriteId] = [];\n\n // remove old sprite's loaded images (for the same sprite id) that are not in new sprite\n const imagesToRemove = this._spritesImagesIds[spriteId] ? this._spritesImagesIds[spriteId].filter(id => !(id in images)) : [];\n for (const id of imagesToRemove) {\n this.imageManager.removeImage(id);\n this._changedImages[id] = true;\n }\n\n for (const id in images[spriteId]) {\n // don't prefix images of the \"default\" sprite\n const imageId = spriteId === 'default' ? id : `${spriteId}:${id}`;\n // save all the sprite's images' ids to be able to delete them in `removeSprite`\n this._spritesImagesIds[spriteId].push(imageId);\n if (imageId in this.imageManager.images) {\n this.imageManager.updateImage(imageId, images[spriteId][id], false);\n } else {\n this.imageManager.addImage(imageId, images[spriteId][id]);\n }\n\n if (isUpdate) {\n this._changedImages[imageId] = true;\n }\n }\n }\n }\n }).catch((error) => {\n this._spriteRequest = null;\n err = error;\n if (!abortController.signal.aborted) { // ignore abort\n this.fire(new ErrorEvent(err));\n }\n }).finally(() => {\n this.imageManager.setLoaded(true);\n this._availableImages = this.imageManager.listImages();\n\n if (isUpdate) {\n this._changed = true;\n }\n\n this.dispatcher.broadcast(MessageType.setImages, this._availableImages);\n this.fire(new Event('data', {dataType: 'style'}));\n\n if (completion) {\n completion(err);\n }\n });\n }\n\n _unloadSprite() {\n for (const id of Object.values(this._spritesImagesIds).flat()) {\n this.imageManager.removeImage(id);\n this._changedImages[id] = true;\n }\n\n this._spritesImagesIds = {};\n this._availableImages = this.imageManager.listImages();\n this._changed = true;\n this.dispatcher.broadcast(MessageType.setImages, this._availableImages);\n this.fire(new Event('data', {dataType: 'style'}));\n }\n\n _validateLayer(layer: StyleLayer) {\n const tileManager = this.tileManagers[layer.source];\n if (!tileManager) {\n return;\n }\n\n const sourceLayer = layer.sourceLayer;\n if (!sourceLayer) {\n return;\n }\n\n const source = tileManager.getSource();\n if (source.type === 'geojson' || (source.vectorLayerIds && source.vectorLayerIds.indexOf(sourceLayer) === -1)) {\n this.fire(new ErrorEvent(new Error(\n `Source layer \"${sourceLayer}\" ` +\n `does not exist on source \"${source.id}\" ` +\n `as specified by style layer \"${layer.id}\".`\n )));\n }\n }\n\n loaded() {\n if (!this._loaded)\n return false;\n\n if (Object.keys(this._updatedSources).length)\n return false;\n\n for (const id in this.tileManagers)\n if (!this.tileManagers[id].loaded())\n return false;\n\n if (!this.imageManager.isLoaded())\n return false;\n\n return true;\n }\n\n /**\n * @hidden\n * take an array of string IDs, and based on this._layers, generate an array of LayerSpecification\n * @param ids - an array of string IDs, for which serialized layers will be generated. If omitted, all serialized layers will be returned\n * @param returnClose - if true, return a clone of the layer object\n * @returns generated result\n */\n private _serializeByIds(ids: Array, returnClone: boolean = false): Array {\n\n const serializedLayersDictionary = this._serializedAllLayers();\n if (!ids || ids.length === 0) {\n return returnClone ? Object.values(clone(serializedLayersDictionary)) : Object.values(serializedLayersDictionary);\n }\n\n const serializedLayers = [];\n for (const id of ids) {\n // this check will skip all custom layers\n if (serializedLayersDictionary[id]) {\n const toPush = returnClone ? clone(serializedLayersDictionary[id]) : serializedLayersDictionary[id];\n serializedLayers.push(toPush);\n }\n }\n\n return serializedLayers;\n }\n\n /**\n * @hidden\n * Lazy initialization of this._serializedLayers dictionary and return it\n * @returns this._serializedLayers dictionary\n */\n private _serializedAllLayers(): {[_: string]: LayerSpecification} {\n let serializedLayers = this._serializedLayers;\n if (serializedLayers) {\n return serializedLayers;\n }\n\n serializedLayers = this._serializedLayers = {};\n const allLayerIds: string [] = Object.keys(this._layers);\n for (const layerId of allLayerIds) {\n const layer = this._layers[layerId];\n if (layer.type !== 'custom') {\n serializedLayers[layerId] = layer.serialize();\n }\n }\n\n return serializedLayers;\n }\n\n hasTransitions() {\n if (this.light?.hasTransition()) {\n return true;\n }\n\n if (this.sky?.hasTransition()) {\n return true;\n }\n\n if (this.projection?.hasTransition()) {\n return true;\n }\n\n for (const id in this.tileManagers) {\n if (this.tileManagers[id].hasTransition()) {\n return true;\n }\n }\n\n for (const id in this._layers) {\n if (this._layers[id].hasTransition()) {\n return true;\n }\n }\n\n return false;\n }\n\n _checkLoaded() {\n if (!this._loaded) {\n throw new Error('Style is not done loading.');\n }\n }\n\n /**\n * @internal\n * Apply queued style updates in a batch and recalculate zoom-dependent paint properties.\n */\n update(parameters: EvaluationParameters) {\n if (!this._loaded) {\n return;\n }\n\n const changed = this._changed;\n if (changed) {\n const updatedIds = Object.keys(this._updatedLayers);\n const removedIds = Object.keys(this._removedLayers);\n\n if (updatedIds.length || removedIds.length) {\n this._updateWorkerLayers(updatedIds, removedIds);\n }\n for (const id in this._updatedSources) {\n const action = this._updatedSources[id];\n\n if (action === 'reload') {\n this._reloadSource(id);\n } else if (action === 'clear') {\n this._clearSource(id);\n } else {\n throw new Error(`Invalid action ${action}`);\n }\n }\n\n this._updateTilesForChangedImages();\n this._updateTilesForChangedGlyphs();\n\n for (const id in this._updatedPaintProps) {\n this._layers[id].updateTransitions(parameters);\n }\n\n this.light.updateTransitions(parameters);\n this.sky.updateTransitions(parameters);\n\n this._resetUpdates();\n }\n\n const managersUsedBefore = {};\n\n // save 'used' status to managersUsedBefore object and reset all tileManagers 'used' field to false\n for (const id in this.tileManagers) {\n const tileManager = this.tileManagers[id];\n\n // tileManager.used could be undefined, and managersUsedBefore[id] is also 'undefined'\n managersUsedBefore[id] = tileManager.used;\n tileManager.used = false;\n }\n\n // loop all layers and find layers that are not hidden at parameters.zoom\n // and set used to true in tileManagers dictionary for the sources of these layers\n for (const layerId of this._order) {\n const layer = this._layers[layerId];\n\n layer.recalculate(parameters, this._availableImages);\n if (!layer.isHidden(parameters.zoom) && layer.source) {\n this.tileManagers[layer.source].used = true;\n }\n }\n\n // cross check managersUsedBefore against updated this.tileManagers dictionary\n // if \"used\" field is different fire visibility event\n for (const id in managersUsedBefore) {\n const tileManager = this.tileManagers[id];\n\n // (undefine !== false) will evaluate to true and fire an useless visibility event\n // need force \"falsy\" values to boolean to avoid the case above\n if (!!managersUsedBefore[id] !== !!tileManager.used) {\n tileManager.fire(new Event('data',\n {\n sourceDataType: 'visibility',\n dataType: 'source',\n sourceId: id\n }));\n }\n }\n\n this.light.recalculate(parameters);\n this.sky.recalculate(parameters);\n this.projection.recalculate(parameters);\n this.z = parameters.zoom;\n\n if (changed) {\n this.fire(new Event('data', {dataType: 'style'}));\n }\n }\n\n /*\n * Apply any queued image changes.\n */\n _updateTilesForChangedImages() {\n const changedImages = Object.keys(this._changedImages);\n if (changedImages.length) {\n for (const name in this.tileManagers) {\n this.tileManagers[name].reloadTilesForDependencies(['icons', 'patterns'], changedImages);\n }\n this._changedImages = {};\n }\n }\n\n _updateTilesForChangedGlyphs() {\n if (this._glyphsDidChange) {\n for (const name in this.tileManagers) {\n this.tileManagers[name].reloadTilesForDependencies(['glyphs'], ['']);\n }\n this._glyphsDidChange = false;\n }\n }\n\n _updateWorkerLayers(updatedIds: Array, removedIds: Array) {\n this.dispatcher.broadcast(MessageType.updateLayers, {\n layers: this._serializeByIds(updatedIds, false),\n removedIds\n });\n }\n\n _resetUpdates() {\n this._changed = false;\n\n this._updatedLayers = {};\n this._removedLayers = {};\n\n this._updatedSources = {};\n this._updatedPaintProps = {};\n\n this._changedImages = {};\n this._glyphsDidChange = false;\n }\n\n /**\n * Update this style's state to match the given style JSON, performing only\n * the necessary mutations.\n *\n * May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec\n * diff algorithm produces an operation that is not supported.\n *\n * @returns true if any changes were made; false otherwise\n */\n setState(nextState: StyleSpecification, options: StyleSwapOptions & StyleSetterOptions = {}) {\n this._checkLoaded();\n\n const serializedStyle = this.serialize();\n nextState = options.transformStyle ? options.transformStyle(serializedStyle, nextState) : nextState;\n const validate = options.validate ?? true;\n if (validate && emitValidationErrors(this, validateStyle(nextState))) return false;\n\n nextState = clone(nextState);\n nextState.layers = derefLayers(nextState.layers);\n\n const changes = diffStyles(serializedStyle, nextState);\n const operations = this._getOperationsToPerform(changes);\n\n if (operations.unimplemented.length > 0) {\n throw new Error(`Unimplemented: ${operations.unimplemented.join(', ')}.`);\n }\n\n if (operations.operations.length === 0) {\n return false;\n }\n\n for (const styleChangeOperation of operations.operations) {\n styleChangeOperation();\n }\n\n this.stylesheet = nextState;\n\n // reset serialization field, to be populated only when needed\n this._serializedLayers = null;\n\n return true;\n }\n\n _getOperationsToPerform(diff: DiffCommand[]) {\n const operations: Function[] = [];\n const unimplemented: string[] = [];\n for (const op of diff) {\n switch (op.command) {\n case 'setCenter':\n case 'setZoom':\n case 'setBearing':\n case 'setPitch':\n case 'setRoll':\n continue;\n case 'addLayer':\n operations.push(() => this.addLayer.apply(this, op.args));\n break;\n case 'removeLayer':\n operations.push(() => this.removeLayer.apply(this, op.args));\n break;\n case 'setPaintProperty':\n operations.push(() => this.setPaintProperty.apply(this, op.args));\n break;\n case 'setLayoutProperty':\n operations.push(() => this.setLayoutProperty.apply(this, op.args));\n break;\n case 'setFilter':\n operations.push(() => this.setFilter.apply(this, op.args));\n break;\n case 'addSource':\n operations.push(() => this.addSource.apply(this, op.args));\n break;\n case 'removeSource':\n operations.push(() => this.removeSource.apply(this, op.args));\n break;\n case 'setLayerZoomRange':\n operations.push(() => this.setLayerZoomRange.apply(this, op.args));\n break;\n case 'setLight':\n operations.push(() => this.setLight.apply(this, op.args));\n break;\n case 'setGeoJSONSourceData':\n operations.push(() => this.setGeoJSONSourceData.apply(this, op.args));\n break;\n case 'setGlyphs':\n operations.push(() => this.setGlyphs.apply(this, op.args));\n break;\n case 'setSprite':\n operations.push(() => this.setSprite.apply(this, op.args));\n break;\n case 'setTerrain':\n operations.push(() => this.map.setTerrain.apply(this, op.args));\n break;\n case 'setSky':\n operations.push(() => this.setSky.apply(this, op.args));\n break;\n case 'setProjection':\n this.setProjection.apply(this, op.args);\n break;\n case 'setGlobalState':\n operations.push(() => this.setGlobalState.apply(this, op.args));\n break;\n case 'setTransition':\n operations.push(() => {});\n break;\n default:\n unimplemented.push(op.command);\n break;\n }\n }\n return {\n operations,\n unimplemented\n };\n }\n\n addImage(id: string, image: StyleImage) {\n if (this.getImage(id)) {\n return this.fire(new ErrorEvent(new Error(`An image named \"${id}\" already exists.`)));\n }\n this.imageManager.addImage(id, image);\n this._afterImageUpdated(id);\n }\n\n updateImage(id: string, image: StyleImage) {\n this.imageManager.updateImage(id, image);\n }\n\n getImage(id: string): StyleImage {\n return this.imageManager.getImage(id);\n }\n\n removeImage(id: string) {\n if (!this.getImage(id)) {\n return this.fire(new ErrorEvent(new Error(`An image named \"${id}\" does not exist.`)));\n }\n this.imageManager.removeImage(id);\n this._afterImageUpdated(id);\n }\n\n _afterImageUpdated(id: string) {\n this._availableImages = this.imageManager.listImages();\n this._changedImages[id] = true;\n this._changed = true;\n this.dispatcher.broadcast(MessageType.setImages, this._availableImages);\n this.fire(new Event('data', {dataType: 'style'}));\n }\n\n listImages() {\n this._checkLoaded();\n\n return this.imageManager.listImages();\n }\n\n addSource(id: string, source: SourceSpecification | CanvasSourceSpecification, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n\n if (this.tileManagers[id] !== undefined) {\n throw new Error(`Source \"${id}\" already exists.`);\n }\n\n if (!source.type) {\n throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(source).join(', ')}.`);\n }\n\n const builtIns = ['vector', 'raster', 'geojson', 'video', 'image'];\n const shouldValidate = builtIns.indexOf(source.type) >= 0;\n if (shouldValidate && this._validate(validateStyle.source, `sources.${id}`, source, null, options)) return;\n if (this.map && this.map._collectResourceTiming) (source as any).collectResourceTiming = true;\n const tileManager = this.tileManagers[id] = new TileManager(id, source, this.dispatcher);\n tileManager.style = this;\n tileManager.setEventedParent(this, () => ({\n isSourceLoaded: tileManager.loaded(),\n source: tileManager.serialize(),\n sourceId: id\n }));\n\n tileManager.onAdd(this.map);\n this._changed = true;\n }\n\n /**\n * Remove a source from this stylesheet, given its id.\n * @param id - id of the source to remove\n * @throws if no source is found with the given ID\n */\n removeSource(id: string): this {\n this._checkLoaded();\n\n if (this.tileManagers[id] === undefined) {\n throw new Error('There is no source with this ID');\n }\n for (const layerId in this._layers) {\n if (this._layers[layerId].source === id) {\n return this.fire(new ErrorEvent(new Error(`Source \"${id}\" cannot be removed while layer \"${layerId}\" is using it.`)));\n }\n }\n\n const tileManager = this.tileManagers[id];\n delete this.tileManagers[id];\n delete this._updatedSources[id];\n tileManager.fire(new Event('data', {sourceDataType: 'metadata', dataType: 'source', sourceId: id}));\n tileManager.setEventedParent(null);\n tileManager.onRemove(this.map);\n this._changed = true;\n }\n\n /**\n * Set the data of a GeoJSON source, given its id.\n * @param id - id of the source\n * @param data - GeoJSON source\n */\n setGeoJSONSourceData(id: string, data: GeoJSON.GeoJSON | string) {\n this._checkLoaded();\n\n if (this.tileManagers[id] === undefined) throw new Error(`There is no source with this ID=${id}`);\n const geojsonSource: GeoJSONSource = (this.tileManagers[id].getSource() as any);\n if (geojsonSource.type !== 'geojson') throw new Error(`geojsonSource.type is ${geojsonSource.type}, which is !== 'geojson`);\n\n geojsonSource.setData(data);\n this._changed = true;\n }\n\n /**\n * Get a source by ID.\n * @param id - ID of the desired source\n * @returns source\n */\n getSource(id: string): Source | undefined {\n return this.tileManagers[id] && this.tileManagers[id].getSource();\n }\n\n /**\n * Add a layer to the map style. The layer will be inserted before the layer with\n * ID `before`, or appended if `before` is omitted.\n * @param layerObject - The style layer to add.\n * @param before - ID of an existing layer to insert before\n * @param options - Style setter options.\n */\n addLayer(layerObject: AddLayerObject, before?: string, options: StyleSetterOptions = {}): this {\n this._checkLoaded();\n\n const id = layerObject.id;\n\n if (this.getLayer(id)) {\n this.fire(new ErrorEvent(new Error(`Layer \"${id}\" already exists on this map.`)));\n return;\n }\n\n let layer: ReturnType;\n if (layerObject.type === 'custom') {\n\n if (emitValidationErrors(this, validateCustomStyleLayer(layerObject))) return;\n\n layer = createStyleLayer(layerObject, this._globalState);\n\n } else {\n if ('source' in layerObject && typeof layerObject.source === 'object') {\n this.addSource(id, layerObject.source);\n layerObject = clone(layerObject);\n layerObject = extend(layerObject, {source: id});\n }\n\n // this layer is not in the style.layers array, so we pass an impossible array index\n if (this._validate(validateStyle.layer,\n `layers.${id}`, layerObject, {arrayIndex: -1}, options)) return;\n\n layer = createStyleLayer(layerObject as LayerSpecification | CustomLayerInterface, this._globalState);\n this._validateLayer(layer);\n\n layer.setEventedParent(this, {layer: {id}});\n }\n\n const index = before ? this._order.indexOf(before) : this._order.length;\n if (before && index === -1) {\n this.fire(new ErrorEvent(new Error(`Cannot add layer \"${id}\" before non-existing layer \"${before}\".`)));\n return;\n }\n\n this._order.splice(index, 0, id);\n this._layerOrderChanged = true;\n\n this._layers[id] = layer;\n\n if (this._removedLayers[id] && layer.source && layer.type !== 'custom') {\n // If, in the current batch, we have already removed this layer\n // and we are now re-adding it with a different `type`, then we\n // need to clear (rather than just reload) the underlying source's\n // tiles. Otherwise, tiles marked 'reloading' will have buckets /\n // buffers that are set up for the _previous_ version of this\n // layer, causing, e.g.:\n // https://github.com/mapbox/mapbox-gl-js/issues/3633\n const removed = this._removedLayers[id];\n delete this._removedLayers[id];\n if (removed.type !== layer.type) {\n this._updatedSources[layer.source] = 'clear';\n } else {\n this._updatedSources[layer.source] = 'reload';\n this.tileManagers[layer.source].pause();\n }\n }\n this._updateLayer(layer);\n\n if (layer.onAdd) {\n layer.onAdd(this.map);\n }\n }\n\n /**\n * Moves a layer to a different z-position. The layer will be inserted before the layer with\n * ID `before`, or appended if `before` is omitted.\n * @param id - ID of the layer to move\n * @param before - ID of an existing layer to insert before\n */\n moveLayer(id: string, before?: string) {\n this._checkLoaded();\n this._changed = true;\n\n const layer = this._layers[id];\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`The layer '${id}' does not exist in the map's style and cannot be moved.`)));\n return;\n }\n\n if (id === before) {\n return;\n }\n\n const index = this._order.indexOf(id);\n this._order.splice(index, 1);\n\n const newIndex = before ? this._order.indexOf(before) : this._order.length;\n if (before && newIndex === -1) {\n this.fire(new ErrorEvent(new Error(`Cannot move layer \"${id}\" before non-existing layer \"${before}\".`)));\n return;\n }\n this._order.splice(newIndex, 0, id);\n\n this._layerOrderChanged = true;\n }\n\n /**\n * Remove the layer with the given id from the style.\n * A {@link ErrorEvent} event will be fired if no such layer exists.\n *\n * @param id - id of the layer to remove\n */\n removeLayer(id: string) {\n this._checkLoaded();\n\n const layer = this._layers[id];\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot remove non-existing layer \"${id}\".`)));\n return;\n }\n\n layer.setEventedParent(null);\n\n const index = this._order.indexOf(id);\n this._order.splice(index, 1);\n\n this._layerOrderChanged = true;\n this._changed = true;\n this._removedLayers[id] = layer;\n delete this._layers[id];\n\n if (this._serializedLayers) {\n delete this._serializedLayers[id];\n }\n delete this._updatedLayers[id];\n delete this._updatedPaintProps[id];\n\n if (layer.onRemove) {\n layer.onRemove(this.map);\n }\n }\n\n /**\n * Return the style layer object with the given `id`.\n *\n * @param id - id of the desired layer\n * @returns a layer, if one with the given `id` exists\n */\n getLayer(id: string): StyleLayer | undefined {\n return this._layers[id];\n }\n\n /**\n * Return the ids of all layers currently in the style, including custom layers, in order.\n *\n * @returns ids of layers, in order\n */\n getLayersOrder(): string[] {\n return [...this._order];\n }\n\n /**\n * Checks if a specific layer is present within the style.\n *\n * @param id - the id of the desired layer\n * @returns a boolean specifying if the given layer is present\n */\n hasLayer(id: string): boolean {\n return id in this._layers;\n }\n\n setLayerZoomRange(layerId: string, minzoom?: number | null, maxzoom?: number | null) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer \"${layerId}\".`)));\n return;\n }\n\n if (layer.minzoom === minzoom && layer.maxzoom === maxzoom) return;\n\n if (minzoom != null) {\n layer.minzoom = minzoom;\n }\n if (maxzoom != null) {\n layer.maxzoom = maxzoom;\n }\n this._updateLayer(layer);\n }\n\n setFilter(layerId: string, filter?: FilterSpecification | null, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot filter non-existing layer \"${layerId}\".`)));\n return;\n }\n\n if (deepEqual(layer.filter, filter)) {\n return;\n }\n\n if (filter === null || filter === undefined) {\n layer.setFilter(undefined);\n this._updateLayer(layer);\n return;\n }\n\n if (this._validate(validateStyle.filter, `layers.${layer.id}.filter`, filter, null, options)) {\n return;\n }\n\n layer.setFilter(clone(filter));\n this._updateLayer(layer);\n }\n\n /**\n * Get a layer's filter object\n * @param layer - the layer to inspect\n * @returns the layer's filter, if any\n */\n getFilter(layer: string): FilterSpecification | void {\n return clone(this.getLayer(layer).filter);\n }\n\n setLayoutProperty(layerId: string, name: string, value: any, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot style non-existing layer \"${layerId}\".`)));\n return;\n }\n\n if (deepEqual(layer.getLayoutProperty(name), value)) return;\n\n layer.setLayoutProperty(name, value, options);\n this._updateLayer(layer);\n }\n\n /**\n * Get a layout property's value from a given layer\n * @param layerId - the layer to inspect\n * @param name - the name of the layout property\n * @returns the property value\n */\n getLayoutProperty(layerId: string, name: string) {\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot get style of non-existing layer \"${layerId}\".`)));\n return;\n }\n\n return layer.getLayoutProperty(name);\n }\n\n setPaintProperty(layerId: string, name: string, value: any, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire(new ErrorEvent(new Error(`Cannot style non-existing layer \"${layerId}\".`)));\n return;\n }\n\n if (deepEqual(layer.getPaintProperty(name), value)) return;\n\n this._updatePaintProperty(layer, name, value, options);\n }\n\n _updatePaintProperty(layer: StyleLayer, name: string, value: any, options: StyleSetterOptions = {}) {\n const requiresRelayout = layer.setPaintProperty(name, value, options);\n if (requiresRelayout) {\n this._updateLayer(layer);\n }\n\n if (isRasterStyleLayer(layer) && name === 'raster-fade-duration') {\n this.tileManagers[layer.source].setRasterFadeDuration(value);\n }\n\n this._changed = true;\n this._updatedPaintProps[layer.id] = true;\n // reset serialization field, to be populated only when needed\n this._serializedLayers = null;\n }\n\n getPaintProperty(layer: string, name: string) {\n return this.getLayer(layer).getPaintProperty(name);\n }\n\n setFeatureState(target: FeatureIdentifier, state: any) {\n this._checkLoaded();\n const sourceId = target.source;\n const sourceLayer = target.sourceLayer;\n const tileManager = this.tileManagers[sourceId];\n\n if (tileManager === undefined) {\n this.fire(new ErrorEvent(new Error(`The source '${sourceId}' does not exist in the map's style.`)));\n return;\n }\n const sourceType = tileManager.getSource().type;\n if (sourceType === 'geojson' && sourceLayer) {\n this.fire(new ErrorEvent(new Error('GeoJSON sources cannot have a sourceLayer parameter.')));\n return;\n }\n if (sourceType === 'vector' && !sourceLayer) {\n this.fire(new ErrorEvent(new Error('The sourceLayer parameter must be provided for vector source types.')));\n return;\n }\n if (target.id === undefined) {\n this.fire(new ErrorEvent(new Error('The feature id parameter must be provided.')));\n }\n\n tileManager.setFeatureState(sourceLayer, target.id, state);\n }\n\n removeFeatureState(target: FeatureIdentifier, key?: string) {\n this._checkLoaded();\n const sourceId = target.source;\n const tileManager = this.tileManagers[sourceId];\n\n if (tileManager === undefined) {\n this.fire(new ErrorEvent(new Error(`The source '${sourceId}' does not exist in the map's style.`)));\n return;\n }\n\n const sourceType = tileManager.getSource().type;\n const sourceLayer = sourceType === 'vector' ? target.sourceLayer : undefined;\n\n if (sourceType === 'vector' && !sourceLayer) {\n this.fire(new ErrorEvent(new Error('The sourceLayer parameter must be provided for vector source types.')));\n return;\n }\n\n if (key && (typeof target.id !== 'string' && typeof target.id !== 'number')) {\n this.fire(new ErrorEvent(new Error('A feature id is required to remove its specific state property.')));\n return;\n }\n\n tileManager.removeFeatureState(sourceLayer, target.id, key);\n }\n\n getFeatureState(target: FeatureIdentifier) {\n this._checkLoaded();\n const sourceId = target.source;\n const sourceLayer = target.sourceLayer;\n const tileManager = this.tileManagers[sourceId];\n\n if (tileManager === undefined) {\n this.fire(new ErrorEvent(new Error(`The source '${sourceId}' does not exist in the map's style.`)));\n return;\n }\n const sourceType = tileManager.getSource().type;\n if (sourceType === 'vector' && !sourceLayer) {\n this.fire(new ErrorEvent(new Error('The sourceLayer parameter must be provided for vector source types.')));\n return;\n }\n if (target.id === undefined) {\n this.fire(new ErrorEvent(new Error('The feature id parameter must be provided.')));\n }\n\n return tileManager.getFeatureState(sourceLayer, target.id);\n }\n\n getTransition() {\n return extend({duration: 300, delay: 0}, this.stylesheet && this.stylesheet.transition);\n }\n\n serialize(): StyleSpecification | undefined {\n // We return undefined before we're loaded, following the pattern of Map.getStyle() before\n // the Style object is initialized.\n // Internally, Style._validate() calls Style.serialize() but callers are responsible for\n // calling Style._checkLoaded() first if their validation requires the style to be loaded.\n if (!this._loaded) return;\n\n const sources = mapObject(this.tileManagers, (source) => source.serialize());\n const layers = this._serializeByIds(this._order, true);\n const terrain = this.map.getTerrain() || undefined;\n const myStyleSheet = this.stylesheet;\n\n return filterObject({\n version: myStyleSheet.version,\n name: myStyleSheet.name,\n metadata: myStyleSheet.metadata,\n light: myStyleSheet.light,\n sky: myStyleSheet.sky,\n center: myStyleSheet.center,\n zoom: myStyleSheet.zoom,\n bearing: myStyleSheet.bearing,\n pitch: myStyleSheet.pitch,\n sprite: myStyleSheet.sprite,\n glyphs: myStyleSheet.glyphs,\n transition: myStyleSheet.transition,\n projection: myStyleSheet.projection,\n sources,\n layers,\n terrain\n },\n (value) => { return value !== undefined; });\n }\n\n _updateLayer(layer: StyleLayer) {\n this._updatedLayers[layer.id] = true;\n if (layer.source && !this._updatedSources[layer.source] &&\n //Skip for raster layers (https://github.com/mapbox/mapbox-gl-js/issues/7865)\n this.tileManagers[layer.source].getSource().type !== 'raster') {\n this._updatedSources[layer.source] = 'reload';\n this.tileManagers[layer.source].pause();\n }\n\n // upon updating, serialized layer dictionary should be reset.\n // When needed, it will be populated with the correct copy again.\n this._serializedLayers = null;\n this._changed = true;\n }\n\n _flattenAndSortRenderedFeatures(sourceResults: QueryRenderedFeaturesResults[]): MapGeoJSONFeature[] {\n // Feature order is complicated.\n // The order between features in two 2D layers is always determined by layer order.\n // The order between features in two 3D layers is always determined by depth.\n // The order between a feature in a 2D layer and a 3D layer is tricky:\n // Most often layer order determines the feature order in this case. If\n // a line layer is above a extrusion layer the line feature will be rendered\n // above the extrusion. If the line layer is below the extrusion layer,\n // it will be rendered below it.\n //\n // There is a weird case though.\n // You have layers in this order: extrusion_layer_a, line_layer, extrusion_layer_b\n // Each layer has a feature that overlaps the other features.\n // The feature in extrusion_layer_a is closer than the feature in extrusion_layer_b so it is rendered above.\n // The feature in line_layer is rendered above extrusion_layer_a.\n // This means that that the line_layer feature is above the extrusion_layer_b feature despite\n // it being in an earlier layer.\n\n const isLayer3D = layerId => this._layers[layerId].type === 'fill-extrusion';\n\n const layerIndex = {};\n const features3D: QueryRenderedFeaturesResultsItem[] = [];\n for (let l = this._order.length - 1; l >= 0; l--) {\n const layerId = this._order[l];\n if (isLayer3D(layerId)) {\n layerIndex[layerId] = l;\n for (const sourceResult of sourceResults) {\n const layerFeatures = sourceResult[layerId];\n if (layerFeatures) {\n for (const featureWrapper of layerFeatures) {\n features3D.push(featureWrapper);\n }\n }\n }\n }\n }\n\n features3D.sort((a, b) => {\n return (b.intersectionZ as number) - (a.intersectionZ as number);\n });\n\n const features: MapGeoJSONFeature[] = [];\n for (let l = this._order.length - 1; l >= 0; l--) {\n const layerId = this._order[l];\n\n if (isLayer3D(layerId)) {\n // add all 3D features that are in or above the current layer\n for (let i = features3D.length - 1; i >= 0; i--) {\n const topmost3D = features3D[i].feature;\n if (layerIndex[topmost3D.layer.id] < l) break;\n features.push(topmost3D);\n features3D.pop();\n }\n } else {\n for (const sourceResult of sourceResults) {\n const layerFeatures = sourceResult[layerId];\n if (layerFeatures) {\n for (const featureWrapper of layerFeatures) {\n features.push(featureWrapper.feature);\n }\n }\n }\n }\n }\n\n return features;\n }\n\n queryRenderedFeatures(queryGeometry: Point[], params: QueryRenderedFeaturesOptions, transform: IReadonlyTransform): MapGeoJSONFeature[] {\n if (params && params.filter) {\n this._validate(validateStyle.filter, 'queryRenderedFeatures.filter', params.filter, null, params);\n }\n\n const includedSources = {};\n if (params && params.layers) {\n const isArrayOrSet = Array.isArray(params.layers) || params.layers instanceof Set;\n if (!isArrayOrSet) {\n this.fire(new ErrorEvent(new Error('parameters.layers must be an Array or a Set of strings')));\n return [];\n }\n for (const layerId of params.layers) {\n const layer = this._layers[layerId];\n if (!layer) {\n // this layer is not in the style.layers array\n this.fire(new ErrorEvent(new Error(`The layer '${layerId}' does not exist in the map's style and cannot be queried for features.`)));\n return [];\n }\n includedSources[layer.source] = true;\n }\n }\n\n const sourceResults: QueryRenderedFeaturesResults[] = [];\n\n params.availableImages = this._availableImages;\n\n // LayerSpecification is serialized StyleLayer, and this casting is safe.\n const serializedLayers = this._serializedAllLayers() as {[_: string]: StyleLayer};\n\n const layersAsSet = params.layers instanceof Set ? params.layers : Array.isArray(params.layers) ? new Set(params.layers) : null;\n const paramsStrict: QueryRenderedFeaturesOptionsStrict = {\n ...params,\n layers: layersAsSet,\n globalState: this._globalState\n };\n\n for (const id in this.tileManagers) {\n if (params.layers && !includedSources[id]) continue;\n sourceResults.push(\n queryRenderedFeatures(\n this.tileManagers[id],\n this._layers,\n serializedLayers,\n queryGeometry,\n paramsStrict,\n transform,\n this.map.terrain ?\n (id: OverscaledTileID, x: number, y: number) =>\n this.map.terrain.getElevation(id, x, y) :\n undefined)\n );\n }\n\n if (this.placement) {\n // If a placement has run, query against its CollisionIndex\n // for symbol results, and treat it as an extra source to merge\n sourceResults.push(\n queryRenderedSymbols(\n this._layers,\n serializedLayers,\n this.tileManagers,\n queryGeometry,\n paramsStrict,\n this.placement.collisionIndex,\n this.placement.retainedQueryData)\n );\n }\n\n return this._flattenAndSortRenderedFeatures(sourceResults);\n }\n\n querySourceFeatures(\n sourceID: string,\n params?: QuerySourceFeatureOptions\n ) {\n if (params?.filter) {\n this._validate(validateStyle.filter, 'querySourceFeatures.filter', params.filter, null, params);\n }\n const tileManager = this.tileManagers[sourceID];\n return tileManager ? querySourceFeatures(tileManager, params ? {...params, globalState: this._globalState} : {globalState: this._globalState}) : [];\n }\n\n getLight() {\n return this.light.getLight();\n }\n\n setLight(lightOptions: LightSpecification, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n\n const light = this.light.getLight();\n let _update = false;\n for (const key in lightOptions) {\n if (!deepEqual(lightOptions[key], light[key])) {\n _update = true;\n break;\n }\n }\n if (!_update) return;\n\n const parameters = {\n now: now(),\n transition: extend({\n duration: 300,\n delay: 0\n }, this.stylesheet.transition)\n };\n\n this.light.setLight(lightOptions, options);\n this.light.updateTransitions(parameters);\n }\n\n getProjection(): ProjectionSpecification {\n return this.stylesheet?.projection;\n }\n\n setProjection(projection: ProjectionSpecification) {\n this._checkLoaded();\n if (this.projection) {\n if (this.projection.name === projection.type) return;\n this.projection.destroy();\n delete this.projection;\n }\n this.stylesheet.projection = projection;\n this._setProjectionInternal(projection.type);\n }\n\n getSky(): SkySpecification {\n return this.stylesheet?.sky;\n }\n\n setSky(skyOptions?: SkySpecification, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n const sky = this.getSky();\n\n let update = false;\n if (!skyOptions && !sky) return;\n\n if (skyOptions && !sky) {\n update = true;\n } else if (!skyOptions && sky) {\n update = true;\n } else {\n for (const key in skyOptions) {\n if (!deepEqual(skyOptions[key], sky[key])) {\n update = true;\n break;\n }\n }\n }\n if (!update) return;\n\n const parameters = {\n now: now(),\n transition: extend({\n duration: 300,\n delay: 0\n }, this.stylesheet.transition)\n };\n\n this.stylesheet.sky = skyOptions;\n this.sky.setSky(skyOptions, options);\n this.sky.updateTransitions(parameters);\n }\n\n _setProjectionInternal(name: ProjectionSpecification['type']) {\n const projectionObjects = createProjectionFromName(name, this.map.transformConstrain);\n this.projection = projectionObjects.projection;\n this.map.migrateProjection(projectionObjects.transform, projectionObjects.cameraHelper);\n for (const key in this.tileManagers) {\n this.tileManagers[key].reload();\n }\n }\n\n _validate(validate: Validator, key: string, value: any, props: any, options: {\n validate?: boolean;\n } = {}) {\n if (options && options.validate === false) {\n return false;\n }\n return emitValidationErrors(this, validate.call(validateStyle, extend({\n key,\n style: this.serialize(),\n value,\n styleSpec\n }, props)));\n }\n\n _remove(mapRemoved: boolean = true) {\n if (this._frameRequest) {\n this._frameRequest.abort();\n this._frameRequest = null;\n }\n if (this._loadStyleRequest) {\n this._loadStyleRequest.abort();\n this._loadStyleRequest = null;\n }\n if (this._spriteRequest) {\n this._spriteRequest.abort();\n this._spriteRequest = null;\n }\n rtlMainThreadPluginFactory().off(RTLPluginLoadedEventName, this._rtlPluginLoaded);\n for (const layerId in this._layers) {\n const layer: StyleLayer = this._layers[layerId];\n layer.setEventedParent(null);\n }\n for (const id in this.tileManagers) {\n const tileManager = this.tileManagers[id];\n tileManager.setEventedParent(null);\n tileManager.onRemove(this.map);\n }\n this.imageManager.setEventedParent(null);\n this.setEventedParent(null);\n if (mapRemoved) {\n this.dispatcher.broadcast(MessageType.removeMap, undefined);\n }\n this.dispatcher.remove(mapRemoved);\n }\n\n _clearSource(id: string) {\n this.tileManagers[id].clearTiles();\n }\n\n _reloadSource(id: string) {\n this.tileManagers[id].resume();\n this.tileManagers[id].reload();\n }\n\n _updateSources(transform: ITransform) {\n for (const id in this.tileManagers) {\n this.tileManagers[id].update(transform, this.map.terrain);\n }\n }\n\n _generateCollisionBoxes() {\n for (const id in this.tileManagers) {\n this._reloadSource(id);\n }\n }\n\n _updatePlacement(transform: ITransform, showCollisionBoxes: boolean, fadeDuration: number, crossSourceCollisions: boolean, forceFullPlacement: boolean = false) {\n let symbolBucketsChanged = false;\n let placementCommitted = false;\n\n const layerTiles = {};\n\n for (const layerID of this._order) {\n const styleLayer = this._layers[layerID];\n if (styleLayer.type !== 'symbol') continue;\n\n if (!layerTiles[styleLayer.source]) {\n const tileManager = this.tileManagers[styleLayer.source];\n layerTiles[styleLayer.source] = tileManager.getRenderableIds(true)\n .map((id) => tileManager.getTileByID(id))\n .sort((a, b) => (b.tileID.overscaledZ - a.tileID.overscaledZ) || (a.tileID.isLessThan(b.tileID) ? -1 : 1));\n }\n\n const layerBucketsChanged = this.crossTileSymbolIndex.addLayer(styleLayer, layerTiles[styleLayer.source], transform.center.lng);\n symbolBucketsChanged = symbolBucketsChanged || layerBucketsChanged;\n }\n this.crossTileSymbolIndex.pruneUnusedLayers(this._order);\n\n // Anything that changes our \"in progress\" layer and tile indices requires us\n // to start over. When we start over, we do a full placement instead of incremental\n // to prevent starvation.\n // We need to restart placement to keep layer indices in sync.\n // Also force full placement when fadeDuration === 0 to ensure that newly loaded\n // tiles will fully display symbols in their first frame\n forceFullPlacement = forceFullPlacement || this._layerOrderChanged || fadeDuration === 0;\n\n if (forceFullPlacement || !this.pauseablePlacement || (this.pauseablePlacement.isDone() && !this.placement.stillRecent(now(), transform.zoom))) {\n this.pauseablePlacement = new PauseablePlacement(transform, this.map.terrain, this._order, forceFullPlacement, showCollisionBoxes, fadeDuration, crossSourceCollisions, this.placement);\n this._layerOrderChanged = false;\n }\n\n if (this.pauseablePlacement.isDone()) {\n // the last placement finished running, but the next one hasn’t\n // started yet because of the `stillRecent` check immediately\n // above, so mark it stale to ensure that we request another\n // render frame\n this.placement.setStale();\n } else {\n this.pauseablePlacement.continuePlacement(this._order, this._layers, layerTiles);\n\n if (this.pauseablePlacement.isDone()) {\n this.placement = this.pauseablePlacement.commit(now());\n placementCommitted = true;\n }\n\n if (symbolBucketsChanged) {\n // since the placement gets split over multiple frames it is possible\n // these buckets were processed before they were changed and so the\n // placement is already stale while it is in progress\n this.pauseablePlacement.placement.setStale();\n }\n }\n\n if (placementCommitted || symbolBucketsChanged) {\n for (const layerID of this._order) {\n const styleLayer = this._layers[layerID];\n if (styleLayer.type !== 'symbol') continue;\n this.placement.updateLayerOpacities(styleLayer, layerTiles[styleLayer.source]);\n }\n }\n\n // needsRender is false when we have just finished a placement that didn't change the visibility of any symbols\n const needsRerender = !this.pauseablePlacement.isDone() || this.placement.hasTransitions(now());\n return needsRerender;\n }\n\n _releaseSymbolFadeTiles() {\n for (const id in this.tileManagers) {\n this.tileManagers[id].releaseSymbolFadeTiles();\n }\n }\n\n // Callbacks from web workers\n\n async getImages(mapId: string | number, params: GetImagesParameters): Promise {\n const images = await this.imageManager.getImages(params.icons);\n\n // Apply queued image changes before setting the tile's dependencies so that the tile\n // is not reloaded unnecessarily. Without this forced update the reload could happen in cases\n // like this one:\n // - icons contains \"my-image\"\n // - imageManager.getImages(...) triggers `onstyleimagemissing`\n // - the user adds \"my-image\" within the callback\n // - addImage adds \"my-image\" to this._changedImages\n // - the next frame triggers a reload of this tile even though it already has the latest version\n this._updateTilesForChangedImages();\n\n const tileManager = this.tileManagers[params.source];\n if (tileManager) {\n tileManager.setDependencies(params.tileID.key, params.type, params.icons);\n }\n return images;\n }\n\n async getGlyphs(mapId: string | number, params: GetGlyphsParameters): Promise {\n const glyphs = await this.glyphManager.getGlyphs(params.stacks);\n const tileManager = this.tileManagers[params.source];\n if (tileManager) {\n // we are not setting stacks as dependencies since for now\n // we just need to know which tiles have glyph dependencies\n tileManager.setDependencies(params.tileID.key, params.type, ['']);\n }\n return glyphs;\n }\n\n getGlyphsUrl() {\n return this.stylesheet.glyphs || null;\n }\n\n setGlyphs(glyphsUrl: string | null, options: StyleSetterOptions = {}) {\n this._checkLoaded();\n if (glyphsUrl && this._validate(validateStyle.glyphs, 'glyphs', glyphsUrl, null, options)) {\n return;\n }\n\n this._glyphsDidChange = true;\n this.stylesheet.glyphs = glyphsUrl;\n this.glyphManager.entries = {};\n this.glyphManager.setURL(glyphsUrl);\n }\n\n async getDashes(mapId: string | number, params: GetDashesParameters): Promise {\n const result: GetDashesResponse = {};\n for (const [key, dash] of Object.entries(params.dashes)) {\n result[key] = this.lineAtlas.getDash(dash.dasharray, dash.round);\n }\n return result;\n }\n\n /**\n * Add a sprite.\n *\n * @param id - The id of the desired sprite\n * @param url - The url to load the desired sprite from\n * @param options - The style setter options\n * @param completion - The completion handler\n */\n addSprite(id: string, url: string, options: StyleSetterOptions = {}, completion?: (err: Error) => void) {\n this._checkLoaded();\n\n const spriteToAdd = [{id, url}];\n const updatedSprite = [\n ...coerceSpriteToArray(this.stylesheet.sprite),\n ...spriteToAdd\n ];\n\n if (this._validate(validateStyle.sprite, 'sprite', updatedSprite, null, options)) return;\n\n this.stylesheet.sprite = updatedSprite;\n this._loadSprite(spriteToAdd, true, completion);\n }\n\n /**\n * Remove a sprite by its id. When the last sprite is removed, the whole `this.stylesheet.sprite` object becomes\n * `undefined`. This falsy `undefined` value later prevents attempts to load the sprite when it's absent.\n *\n * @param id - the id of the sprite to remove\n */\n removeSprite(id: string) {\n this._checkLoaded();\n\n const internalSpriteRepresentation = coerceSpriteToArray(this.stylesheet.sprite);\n\n if (!internalSpriteRepresentation.find(sprite => sprite.id === id)) {\n this.fire(new ErrorEvent(new Error(`Sprite \"${id}\" doesn't exists on this map.`)));\n return;\n }\n\n if (this._spritesImagesIds[id]) {\n for (const imageId of this._spritesImagesIds[id]) {\n this.imageManager.removeImage(imageId);\n this._changedImages[imageId] = true;\n }\n }\n\n internalSpriteRepresentation.splice(internalSpriteRepresentation.findIndex(sprite => sprite.id === id), 1);\n this.stylesheet.sprite = internalSpriteRepresentation.length > 0 ? internalSpriteRepresentation : undefined;\n\n delete this._spritesImagesIds[id];\n this._availableImages = this.imageManager.listImages();\n this._changed = true;\n this.dispatcher.broadcast(MessageType.setImages, this._availableImages);\n this.fire(new Event('data', {dataType: 'style'}));\n }\n\n /**\n * Get the current sprite value.\n *\n * @returns empty array when no sprite is set; id-url pairs otherwise\n */\n getSprite() {\n return coerceSpriteToArray(this.stylesheet.sprite);\n }\n\n /**\n * Set a new value for the style's sprite.\n *\n * @param sprite - new sprite value\n * @param options - style setter options\n * @param completion - the completion handler\n */\n setSprite(sprite: SpriteSpecification, options: StyleSetterOptions = {}, completion?: (err: Error) => void) {\n this._checkLoaded();\n\n if (sprite && this._validate(validateStyle.sprite, 'sprite', sprite, null, options)) {\n return;\n }\n\n this.stylesheet.sprite = sprite;\n\n if (sprite) {\n this._loadSprite(sprite, true, completion);\n } else {\n this._unloadSprite();\n if (completion) {\n completion(null);\n }\n }\n }\n\n /**\n * Destroys all internal resources of the style (sources, images, layers, etc.)\n */\n destroy() {\n // cancel any pending requests\n if (this._frameRequest) {\n this._frameRequest.abort();\n this._frameRequest = null;\n }\n if (this._loadStyleRequest) {\n this._loadStyleRequest.abort();\n this._loadStyleRequest = null;\n }\n if (this._spriteRequest) {\n this._spriteRequest.abort();\n this._spriteRequest = null;\n }\n\n // remove sourcecaches\n for (const id in this.tileManagers) {\n const tileManager = this.tileManagers[id];\n tileManager.setEventedParent(null);\n tileManager.onRemove(this.map);\n }\n this.tileManagers = {};\n\n // Destroy imageManager and clear images\n if (this.imageManager) {\n this.imageManager.setEventedParent(null);\n this.imageManager.destroy();\n this._availableImages = [];\n this._spritesImagesIds = {};\n }\n\n // Destroy glyphManager\n if (this.glyphManager) {\n this.glyphManager.destroy();\n }\n\n // Remove layers\n for (const layerId in this._layers) {\n const layer = this._layers[layerId];\n layer.setEventedParent(null);\n if (layer.onRemove) layer.onRemove(this.map);\n }\n\n // reset internal state\n this._setInitialValues();\n\n // Remove event listeners\n this.setEventedParent(null);\n this.dispatcher.unregisterMessageHandler(MessageType.getGlyphs);\n this.dispatcher.unregisterMessageHandler(MessageType.getImages);\n this.dispatcher.unregisterMessageHandler(MessageType.getDashes);\n this.dispatcher.remove(true);\n this._listeners = {};\n this._oneTimeListeners = {};\n }\n}\n","import {warnOnce} from '../../util/util';\nimport {MercatorProjection} from './mercator_projection';\nimport {MercatorTransform} from './mercator_transform';\nimport {MercatorCameraHelper} from './mercator_camera_helper';\nimport {GlobeProjection} from './globe_projection';\nimport {GlobeTransform} from './globe_transform';\nimport {GlobeCameraHelper} from './globe_camera_helper';\nimport {VerticalPerspectiveCameraHelper} from './vertical_perspective_camera_helper';\nimport {VerticalPerspectiveTransform} from './vertical_perspective_transform';\nimport {VerticalPerspectiveProjection} from './vertical_perspective_projection';\n\nimport type {ProjectionSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {Projection} from './projection';\nimport type {ITransform, TransformConstrainFunction} from '../transform_interface';\nimport type {ICameraHelper} from './camera_helper';\n\nexport function createProjectionFromName(name: ProjectionSpecification['type'], transformConstrain?: TransformConstrainFunction): {\n projection: Projection;\n transform: ITransform;\n cameraHelper: ICameraHelper;\n} {\n const transformOptions = {constrainOverride: transformConstrain};\n if (Array.isArray(name)) {\n const globeProjection = new GlobeProjection({type: name});\n return {\n projection: globeProjection,\n transform: new GlobeTransform(transformOptions),\n cameraHelper: new GlobeCameraHelper(globeProjection),\n };\n }\n switch (name) {\n case 'mercator':\n {\n return {\n projection: new MercatorProjection(),\n transform: new MercatorTransform(transformOptions),\n cameraHelper: new MercatorCameraHelper(),\n };\n }\n case 'globe':\n {\n const globeProjection = new GlobeProjection({type: [\n 'interpolate',\n ['linear'],\n ['zoom'],\n 11,\n 'vertical-perspective',\n 12,\n 'mercator'\n ]});\n return {\n projection: globeProjection,\n transform: new GlobeTransform(transformOptions),\n cameraHelper: new GlobeCameraHelper(globeProjection),\n };\n }\n case 'vertical-perspective':\n {\n return {\n projection: new VerticalPerspectiveProjection(),\n transform: new VerticalPerspectiveTransform(transformOptions),\n cameraHelper: new VerticalPerspectiveCameraHelper(),\n };\n }\n default:\n {\n warnOnce(`Unknown projection name: ${name}. Falling back to mercator projection.`);\n return {\n projection: new MercatorProjection(),\n transform: new MercatorTransform(transformOptions),\n cameraHelper: new MercatorCameraHelper(),\n };\n }\n }\n}\n","import {createLayout} from '../util/struct_array';\n\nexport default createLayout([\n {name: 'a_pos', type: 'Int16', components: 2},\n {name: 'a_texture_pos', type: 'Int16', components: 2}\n]);\n","\nimport type {Program} from './program';\nimport type {VertexBuffer} from '../gl/vertex_buffer';\nimport type {IndexBuffer} from '../gl/index_buffer';\nimport type {Context} from '../gl/context';\n\n/**\n * @internal\n * A vertex array object used to pass data to the webgl code\n */\nexport class VertexArrayObject {\n context: Context;\n boundProgram: Program;\n boundLayoutVertexBuffer: VertexBuffer;\n boundPaintVertexBuffers: Array;\n boundIndexBuffer: IndexBuffer;\n boundVertexOffset: number;\n boundDynamicVertexBuffer: VertexBuffer;\n boundDynamicVertexBuffer2: VertexBuffer;\n boundDynamicVertexBuffer3: VertexBuffer;\n vao: any;\n\n constructor() {\n this.boundProgram = null;\n this.boundLayoutVertexBuffer = null;\n this.boundPaintVertexBuffers = [];\n this.boundIndexBuffer = null;\n this.boundVertexOffset = null;\n this.boundDynamicVertexBuffer = null;\n this.vao = null;\n }\n\n bind(context: Context,\n program: Program,\n layoutVertexBuffer: VertexBuffer,\n paintVertexBuffers: Array,\n indexBuffer?: IndexBuffer | null,\n vertexOffset?: number | null,\n dynamicVertexBuffer?: VertexBuffer | null,\n dynamicVertexBuffer2?: VertexBuffer | null,\n dynamicVertexBuffer3?: VertexBuffer | null) {\n\n this.context = context;\n\n let paintBuffersDiffer = this.boundPaintVertexBuffers.length !== paintVertexBuffers.length;\n for (let i = 0; !paintBuffersDiffer && i < paintVertexBuffers.length; i++) {\n if (this.boundPaintVertexBuffers[i] !== paintVertexBuffers[i]) {\n paintBuffersDiffer = true;\n }\n }\n\n const isFreshBindRequired = (\n !this.vao ||\n this.boundProgram !== program ||\n this.boundLayoutVertexBuffer !== layoutVertexBuffer ||\n paintBuffersDiffer ||\n this.boundIndexBuffer !== indexBuffer ||\n this.boundVertexOffset !== vertexOffset ||\n this.boundDynamicVertexBuffer !== dynamicVertexBuffer ||\n this.boundDynamicVertexBuffer2 !== dynamicVertexBuffer2 ||\n this.boundDynamicVertexBuffer3 !== dynamicVertexBuffer3\n );\n\n if (isFreshBindRequired) {\n this.freshBind(program, layoutVertexBuffer, paintVertexBuffers, indexBuffer, vertexOffset, dynamicVertexBuffer, dynamicVertexBuffer2, dynamicVertexBuffer3);\n } else {\n context.bindVertexArray.set(this.vao);\n\n if (dynamicVertexBuffer) {\n // The buffer may have been updated. Rebind to upload data.\n dynamicVertexBuffer.bind();\n }\n\n if (indexBuffer && indexBuffer.dynamicDraw) {\n indexBuffer.bind();\n }\n\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.bind();\n }\n\n if (dynamicVertexBuffer3) {\n dynamicVertexBuffer3.bind();\n }\n }\n }\n\n freshBind(program: Program,\n layoutVertexBuffer: VertexBuffer,\n paintVertexBuffers: Array,\n indexBuffer?: IndexBuffer | null,\n vertexOffset?: number | null,\n dynamicVertexBuffer?: VertexBuffer | null,\n dynamicVertexBuffer2?: VertexBuffer | null,\n dynamicVertexBuffer3?: VertexBuffer | null) {\n\n const numNextAttributes = program.numAttributes;\n\n const context = this.context;\n const gl = context.gl;\n\n if (this.vao) this.destroy();\n this.vao = context.createVertexArray();\n context.bindVertexArray.set(this.vao);\n\n // store the arguments so that we can verify them when the vao is bound again\n this.boundProgram = program;\n this.boundLayoutVertexBuffer = layoutVertexBuffer;\n this.boundPaintVertexBuffers = paintVertexBuffers;\n this.boundIndexBuffer = indexBuffer;\n this.boundVertexOffset = vertexOffset;\n this.boundDynamicVertexBuffer = dynamicVertexBuffer;\n this.boundDynamicVertexBuffer2 = dynamicVertexBuffer2;\n this.boundDynamicVertexBuffer3 = dynamicVertexBuffer3;\n\n layoutVertexBuffer.enableAttributes(gl, program);\n for (const vertexBuffer of paintVertexBuffers) {\n vertexBuffer.enableAttributes(gl, program);\n }\n\n if (dynamicVertexBuffer) {\n dynamicVertexBuffer.enableAttributes(gl, program);\n }\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.enableAttributes(gl, program);\n }\n if (dynamicVertexBuffer3) {\n dynamicVertexBuffer3.enableAttributes(gl, program);\n }\n\n layoutVertexBuffer.bind();\n layoutVertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n for (const vertexBuffer of paintVertexBuffers) {\n vertexBuffer.bind();\n vertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n }\n\n if (dynamicVertexBuffer) {\n dynamicVertexBuffer.bind();\n dynamicVertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n }\n if (indexBuffer) {\n indexBuffer.bind();\n }\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.bind();\n dynamicVertexBuffer2.setVertexAttribPointers(gl, program, vertexOffset);\n }\n if (dynamicVertexBuffer3) {\n dynamicVertexBuffer3.bind();\n dynamicVertexBuffer3.setVertexAttribPointers(gl, program, vertexOffset);\n }\n\n context.currentNumAttributes = numNextAttributes;\n }\n\n destroy() {\n if (this.vao) {\n this.context.deleteVertexArray(this.vao);\n this.vao = null;\n }\n }\n}\n","import {\n Uniform1i,\n Uniform1f,\n Uniform4f,\n UniformMatrix4f,\n UniformColor\n} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../../render/uniform_binding';\nimport {type Sky} from '../../style/sky';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {type mat4} from 'gl-matrix';\n\nexport type TerrainPreludeUniformsType = {\n 'u_depth': Uniform1i;\n 'u_terrain': Uniform1i;\n 'u_terrain_dim': Uniform1f;\n 'u_terrain_matrix': UniformMatrix4f;\n 'u_terrain_unpack': Uniform4f;\n 'u_terrain_exaggeration': Uniform1f;\n};\n\nexport type TerrainUniformsType = {\n 'u_texture': Uniform1i;\n 'u_ele_delta': Uniform1f;\n 'u_fog_matrix': UniformMatrix4f;\n 'u_fog_color': UniformColor;\n 'u_fog_ground_blend': Uniform1f;\n 'u_fog_ground_blend_opacity': Uniform1f;\n 'u_horizon_color': UniformColor;\n 'u_horizon_fog_blend': Uniform1f;\n 'u_is_globe_mode': Uniform1f;\n};\n\nexport type TerrainDepthUniformsType = {\n 'u_ele_delta': Uniform1f;\n};\n\nexport type TerrainCoordsUniformsType = {\n 'u_texture': Uniform1i;\n 'u_terrain_coords_id': Uniform1f;\n 'u_ele_delta': Uniform1f;\n};\n\nconst terrainPreludeUniforms = (context: Context, locations: UniformLocations): TerrainPreludeUniformsType => ({\n 'u_depth': new Uniform1i(context, locations.u_depth),\n 'u_terrain': new Uniform1i(context, locations.u_terrain),\n 'u_terrain_dim': new Uniform1f(context, locations.u_terrain_dim),\n 'u_terrain_matrix': new UniformMatrix4f(context, locations.u_terrain_matrix),\n 'u_terrain_unpack': new Uniform4f(context, locations.u_terrain_unpack),\n 'u_terrain_exaggeration': new Uniform1f(context, locations.u_terrain_exaggeration)\n});\n\nconst terrainUniforms = (context: Context, locations: UniformLocations): TerrainUniformsType => ({\n 'u_texture': new Uniform1i(context, locations.u_texture),\n 'u_ele_delta': new Uniform1f(context, locations.u_ele_delta),\n 'u_fog_matrix': new UniformMatrix4f(context, locations.u_fog_matrix),\n 'u_fog_color': new UniformColor(context, locations.u_fog_color),\n 'u_fog_ground_blend': new Uniform1f(context, locations.u_fog_ground_blend),\n 'u_fog_ground_blend_opacity': new Uniform1f(context, locations.u_fog_ground_blend_opacity),\n 'u_horizon_color': new UniformColor(context, locations.u_horizon_color),\n 'u_horizon_fog_blend': new Uniform1f(context, locations.u_horizon_fog_blend),\n 'u_is_globe_mode': new Uniform1f(context, locations.u_is_globe_mode)\n});\n\nconst terrainDepthUniforms = (context: Context, locations: UniformLocations): TerrainDepthUniformsType => ({\n 'u_ele_delta': new Uniform1f(context, locations.u_ele_delta)\n});\n\nconst terrainCoordsUniforms = (context: Context, locations: UniformLocations): TerrainCoordsUniformsType => ({\n 'u_texture': new Uniform1i(context, locations.u_texture),\n 'u_terrain_coords_id': new Uniform1f(context, locations.u_terrain_coords_id),\n 'u_ele_delta': new Uniform1f(context, locations.u_ele_delta)\n});\n\nconst terrainUniformValues = (\n eleDelta: number,\n fogMatrix: mat4,\n sky: Sky,\n pitch: number,\n isGlobeMode: boolean): UniformValues => ({\n 'u_texture': 0,\n 'u_ele_delta': eleDelta,\n 'u_fog_matrix': fogMatrix,\n 'u_fog_color': sky ? sky.properties.get('fog-color') : Color.white,\n 'u_fog_ground_blend': sky ? sky.properties.get('fog-ground-blend') : 1,\n // Set opacity to 0 when in globe mode to disable fog\n 'u_fog_ground_blend_opacity': isGlobeMode ? 0 : (sky ? sky.calculateFogBlendOpacity(pitch) : 0),\n 'u_horizon_color': sky ? sky.properties.get('horizon-color') : Color.white,\n 'u_horizon_fog_blend': sky ? sky.properties.get('horizon-fog-blend') : 1,\n 'u_is_globe_mode': isGlobeMode ? 1 : 0\n});\n\nconst terrainDepthUniformValues = (\n eleDelta: number\n): UniformValues => ({\n 'u_ele_delta': eleDelta\n});\n\nconst terrainCoordsUniformValues = (\n coordsId: number,\n eleDelta: number\n): UniformValues => ({\n 'u_terrain_coords_id': coordsId / 255,\n 'u_texture': 0,\n 'u_ele_delta': eleDelta\n});\n\nexport {terrainUniforms, terrainDepthUniforms, terrainCoordsUniforms, terrainPreludeUniforms, terrainUniformValues, terrainDepthUniformValues, terrainCoordsUniformValues};\n","import {Uniform1f, Uniform4f, type UniformLocations, UniformMatrix4f} from '../uniform_binding';\nimport {type Context} from '../../gl/context';\n// This next import is needed for the \"@link\" in the documentation to work properly.\n\nimport type {ProjectionData} from '../../geo/projection/projection_data';\n\nexport type ProjectionPreludeUniformsType = {\n 'u_projection_matrix': UniformMatrix4f;\n 'u_projection_tile_mercator_coords': Uniform4f;\n 'u_projection_clipping_plane': Uniform4f;\n 'u_projection_transition': Uniform1f;\n 'u_projection_fallback_matrix': UniformMatrix4f;\n};\n\nexport const projectionUniforms = (context: Context, locations: UniformLocations): ProjectionPreludeUniformsType => ({\n 'u_projection_matrix': new UniformMatrix4f(context, locations.u_projection_matrix),\n 'u_projection_tile_mercator_coords': new Uniform4f(context, locations.u_projection_tile_mercator_coords),\n 'u_projection_clipping_plane': new Uniform4f(context, locations.u_projection_clipping_plane),\n 'u_projection_transition': new Uniform1f(context, locations.u_projection_transition),\n 'u_projection_fallback_matrix': new UniformMatrix4f(context, locations.u_projection_fallback_matrix),\n});\n\n/**\n * Maps a field name in {@link ProjectionData} to its corresponding uniform name in {@link ProjectionPreludeUniformsType}.\n */\nexport const projectionObjectToUniformMap: {[field in keyof ProjectionData]: keyof ProjectionPreludeUniformsType} = {\n mainMatrix: 'u_projection_matrix',\n tileMercatorCoords: 'u_projection_tile_mercator_coords',\n clippingPlane: 'u_projection_clipping_plane',\n projectionTransition: 'u_projection_transition',\n fallbackMatrix: 'u_projection_fallback_matrix',\n};\n","import {type PreparedShader, shaders, transpileVertexShaderToWebGL1, transpileFragmentShaderToWebGL1} from '../shaders/shaders';\nimport {type ProgramConfiguration} from '../data/program_configuration';\nimport {VertexArrayObject} from './vertex_array_object';\nimport {type Context} from '../gl/context';\nimport {isWebGL2} from '../gl/webgl2';\n\nimport type {SegmentVector} from '../data/segment';\nimport type {VertexBuffer} from '../gl/vertex_buffer';\nimport type {IndexBuffer} from '../gl/index_buffer';\nimport type {DepthMode} from '../gl/depth_mode';\nimport type {StencilMode} from '../gl/stencil_mode';\nimport type {ColorMode} from '../gl/color_mode';\nimport type {CullFaceMode} from '../gl/cull_face_mode';\nimport type {UniformBindings, UniformValues, UniformLocations} from './uniform_binding';\nimport type {BinderUniform} from '../data/program_configuration';\nimport {terrainPreludeUniforms, type TerrainPreludeUniformsType} from './program/terrain_program';\nimport type {TerrainData} from '../render/terrain';\nimport {projectionObjectToUniformMap, type ProjectionPreludeUniformsType, projectionUniforms} from './program/projection_program';\nimport type {ProjectionData} from '../geo/projection/projection_data';\n\nexport type DrawMode = WebGLRenderingContextBase['LINES'] | WebGLRenderingContextBase['TRIANGLES'] | WebGL2RenderingContext['LINE_STRIP'];\n\nfunction getTokenizedAttributesAndUniforms(array: Array): Array {\n const result = [];\n\n for (let i = 0; i < array.length; i++) {\n if (array[i] === null) continue;\n const token = array[i].split(' ');\n result.push(token.pop());\n }\n return result;\n}\n\n/**\n * @internal\n * A webgl program to execute in the GPU space\n */\nexport class Program {\n program: WebGLProgram;\n attributes: {[_: string]: number};\n numAttributes: number;\n fixedUniforms: Us;\n terrainUniforms: TerrainPreludeUniformsType;\n projectionUniforms: ProjectionPreludeUniformsType;\n binderUniforms: Array;\n failedToCreate: boolean;\n\n constructor(context: Context,\n source: PreparedShader,\n configuration: ProgramConfiguration,\n fixedUniforms: (b: Context, a: UniformLocations) => Us,\n showOverdrawInspector: boolean,\n hasTerrain: boolean,\n projectionPrelude: PreparedShader,\n projectionDefine: string,\n extraDefines: Array = []) {\n\n const gl = context.gl;\n this.program = gl.createProgram();\n\n const staticAttrInfo = getTokenizedAttributesAndUniforms(source.staticAttributes);\n const dynamicAttrInfo = configuration ? configuration.getBinderAttributes() : [];\n const allAttrInfo = staticAttrInfo.concat(dynamicAttrInfo);\n\n const preludeUniformsInfo = shaders.prelude.staticUniforms ? getTokenizedAttributesAndUniforms(shaders.prelude.staticUniforms) : [];\n const projectionPreludeUniformsInfo = projectionPrelude.staticUniforms ? getTokenizedAttributesAndUniforms(projectionPrelude.staticUniforms) : [];\n const staticUniformsInfo = source.staticUniforms ? getTokenizedAttributesAndUniforms(source.staticUniforms) : [];\n const dynamicUniformsInfo = configuration ? configuration.getBinderUniforms() : [];\n // remove duplicate uniforms\n const uniformList = preludeUniformsInfo.concat(projectionPreludeUniformsInfo).concat(staticUniformsInfo).concat(dynamicUniformsInfo);\n const allUniformsInfo = [];\n for (const uniform of uniformList) {\n if (allUniformsInfo.indexOf(uniform) < 0) allUniformsInfo.push(uniform);\n }\n\n const defines = configuration ? configuration.defines() : [];\n if (isWebGL2(gl)) {\n defines.unshift('#version 300 es');\n }\n if (showOverdrawInspector) {\n defines.push('#define OVERDRAW_INSPECTOR;');\n }\n if (hasTerrain) {\n defines.push('#define TERRAIN3D;');\n }\n if (projectionDefine) {\n defines.push(projectionDefine);\n }\n if (extraDefines) {\n defines.push(...extraDefines);\n }\n\n let fragmentSource = defines.concat(shaders.prelude.fragmentSource, projectionPrelude.fragmentSource, source.fragmentSource).join('\\n');\n let vertexSource = defines.concat(shaders.prelude.vertexSource, projectionPrelude.vertexSource, source.vertexSource).join('\\n');\n\n if (!isWebGL2(gl)) {\n fragmentSource = transpileFragmentShaderToWebGL1(fragmentSource);\n vertexSource = transpileVertexShaderToWebGL1(vertexSource);\n }\n\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n if (gl.isContextLost()) {\n this.failedToCreate = true;\n return;\n }\n gl.shaderSource(fragmentShader, fragmentSource);\n gl.compileShader(fragmentShader);\n\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n throw new Error(`Could not compile fragment shader: ${gl.getShaderInfoLog(fragmentShader)}`);\n }\n\n gl.attachShader(this.program, fragmentShader);\n\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n if (gl.isContextLost()) {\n this.failedToCreate = true;\n return;\n }\n gl.shaderSource(vertexShader, vertexSource);\n gl.compileShader(vertexShader);\n\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n throw new Error(`Could not compile vertex shader: ${gl.getShaderInfoLog(vertexShader)}`);\n }\n\n gl.attachShader(this.program, vertexShader);\n\n this.attributes = {};\n const uniformLocations = {};\n\n this.numAttributes = allAttrInfo.length;\n\n for (let i = 0; i < this.numAttributes; i++) {\n if (allAttrInfo[i]) {\n gl.bindAttribLocation(this.program, i, allAttrInfo[i]);\n this.attributes[allAttrInfo[i]] = i;\n }\n }\n\n gl.linkProgram(this.program);\n\n if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {\n throw new Error(`Program failed to link: ${gl.getProgramInfoLog(this.program)}`);\n }\n\n gl.deleteShader(vertexShader);\n gl.deleteShader(fragmentShader);\n\n for (let it = 0; it < allUniformsInfo.length; it++) {\n const uniform = allUniformsInfo[it];\n if (uniform && !uniformLocations[uniform]) {\n const uniformLocation = gl.getUniformLocation(this.program, uniform);\n if (uniformLocation) {\n uniformLocations[uniform] = uniformLocation;\n }\n }\n }\n\n this.fixedUniforms = fixedUniforms(context, uniformLocations);\n this.terrainUniforms = terrainPreludeUniforms(context, uniformLocations);\n this.projectionUniforms = projectionUniforms(context, uniformLocations);\n this.binderUniforms = configuration ? configuration.getUniforms(context, uniformLocations) : [];\n }\n\n draw(context: Context,\n drawMode: DrawMode,\n depthMode: Readonly,\n stencilMode: Readonly,\n colorMode: Readonly,\n cullFaceMode: Readonly,\n uniformValues: UniformValues,\n terrain: TerrainData,\n projectionData: ProjectionData,\n layerID: string,\n layoutVertexBuffer: VertexBuffer,\n indexBuffer: IndexBuffer,\n segments: SegmentVector,\n currentProperties?: any,\n zoom?: number | null,\n configuration?: ProgramConfiguration | null,\n dynamicLayoutBuffer?: VertexBuffer | null,\n dynamicLayoutBuffer2?: VertexBuffer | null,\n dynamicLayoutBuffer3?: VertexBuffer | null) {\n\n const gl = context.gl;\n\n if (this.failedToCreate) return;\n\n context.program.set(this.program);\n context.setDepthMode(depthMode);\n context.setStencilMode(stencilMode);\n context.setColorMode(colorMode);\n context.setCullFace(cullFaceMode);\n\n // set variables used by the 3d functions defined in _prelude.vertex.glsl\n if (terrain) {\n context.activeTexture.set(gl.TEXTURE2);\n gl.bindTexture(gl.TEXTURE_2D, terrain.depthTexture);\n context.activeTexture.set(gl.TEXTURE3);\n gl.bindTexture(gl.TEXTURE_2D, terrain.texture);\n for (const name in this.terrainUniforms) {\n this.terrainUniforms[name].set(terrain[name]);\n }\n }\n\n if (projectionData) {\n for (const fieldName in projectionData) {\n const uniformName = projectionObjectToUniformMap[fieldName];\n this.projectionUniforms[uniformName].set(projectionData[fieldName]);\n }\n }\n\n if (uniformValues) {\n for (const name in this.fixedUniforms) {\n this.fixedUniforms[name].set(uniformValues[name]);\n }\n }\n\n if (configuration) {\n configuration.setUniforms(context, this.binderUniforms, currentProperties, {zoom: (zoom as any)});\n }\n\n let primitiveSize = 0;\n switch (drawMode) {\n case gl.LINES:\n primitiveSize = 2;\n break;\n case gl.TRIANGLES:\n primitiveSize = 3;\n break;\n case gl.LINE_STRIP:\n primitiveSize = 1;\n break;\n }\n\n for (const segment of segments.get()) {\n const vaos = segment.vaos || (segment.vaos = {});\n const vao: VertexArrayObject = vaos[layerID] || (vaos[layerID] = new VertexArrayObject());\n\n vao.bind(\n context,\n this,\n layoutVertexBuffer,\n configuration ? configuration.getPaintVertexBuffers() : [],\n indexBuffer,\n segment.vertexOffset,\n dynamicLayoutBuffer,\n dynamicLayoutBuffer2,\n dynamicLayoutBuffer3\n );\n\n gl.drawElements(\n drawMode,\n segment.primitiveLength * primitiveSize,\n gl.UNSIGNED_SHORT,\n segment.primitiveOffset * primitiveSize * 2);\n }\n }\n}\n","import {\n type Uniform1i,\n type Uniform1f,\n type Uniform2f,\n type Uniform3f\n} from '../uniform_binding';\nimport {pixelsToTileUnits} from '../../source/pixels_to_tile_units';\n\nimport type {Painter} from '../painter';\nimport type {OverscaledTileID} from '../../tile/tile_id';\nimport type {CrossFaded} from '../../style/properties';\nimport type {CrossfadeParameters} from '../../style/evaluation_parameters';\nimport type {UniformValues} from '../uniform_binding';\nimport type {Tile} from '../../tile/tile';\nimport type {ResolvedImage} from '@maplibre/maplibre-gl-style-spec';\n\ntype BackgroundPatternUniformsType = {\n 'u_image': Uniform1i;\n 'u_pattern_tl_a': Uniform2f;\n 'u_pattern_br_a': Uniform2f;\n 'u_pattern_tl_b': Uniform2f;\n 'u_pattern_br_b': Uniform2f;\n 'u_texsize': Uniform2f;\n 'u_mix': Uniform1f;\n 'u_pattern_size_a': Uniform2f;\n 'u_pattern_size_b': Uniform2f;\n 'u_scale_a': Uniform1f;\n 'u_scale_b': Uniform1f;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n 'u_tile_units_to_pixels': Uniform1f;\n};\n\nexport type PatternUniformsType = {\n // pattern uniforms:\n 'u_image': Uniform1i;\n 'u_texsize': Uniform2f;\n 'u_scale': Uniform3f;\n 'u_fade': Uniform1f;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n};\n\nfunction patternUniformValues(crossfade: CrossfadeParameters, painter: Painter, tile: Tile): UniformValues {\n\n const tileRatio = 1 / pixelsToTileUnits(tile, 1, painter.transform.tileZoom);\n\n const numTiles = Math.pow(2, tile.tileID.overscaledZ);\n const tileSizeAtNearestZoom = tile.tileSize * Math.pow(2, painter.transform.tileZoom) / numTiles;\n\n const pixelX = tileSizeAtNearestZoom * (tile.tileID.canonical.x + tile.tileID.wrap * numTiles);\n const pixelY = tileSizeAtNearestZoom * tile.tileID.canonical.y;\n\n return {\n 'u_image': 0,\n 'u_texsize': tile.imageAtlasTexture.size,\n 'u_scale': [tileRatio, crossfade.fromScale, crossfade.toScale],\n 'u_fade': crossfade.t,\n // split the pixel coord into two pairs of 16 bit numbers. The glsl spec only guarantees 16 bits of precision.\n 'u_pixel_coord_upper': [pixelX >> 16, pixelY >> 16],\n 'u_pixel_coord_lower': [pixelX & 0xFFFF, pixelY & 0xFFFF]\n };\n}\n\nfunction bgPatternUniformValues(\n image: CrossFaded,\n crossfade: CrossfadeParameters,\n painter: Painter,\n tile: {\n tileID: OverscaledTileID;\n tileSize: number;\n }\n): UniformValues {\n const imagePosA = painter.imageManager.getPattern(image.from.toString());\n const imagePosB = painter.imageManager.getPattern(image.to.toString());\n const {width, height} = painter.imageManager.getPixelSize();\n\n const numTiles = Math.pow(2, tile.tileID.overscaledZ);\n const tileSizeAtNearestZoom = tile.tileSize * Math.pow(2, painter.transform.tileZoom) / numTiles;\n\n const pixelX = tileSizeAtNearestZoom * (tile.tileID.canonical.x + tile.tileID.wrap * numTiles);\n const pixelY = tileSizeAtNearestZoom * tile.tileID.canonical.y;\n\n return {\n 'u_image': 0,\n 'u_pattern_tl_a': (imagePosA as any).tl,\n 'u_pattern_br_a': (imagePosA as any).br,\n 'u_pattern_tl_b': (imagePosB as any).tl,\n 'u_pattern_br_b': (imagePosB as any).br,\n 'u_texsize': [width, height],\n 'u_mix': crossfade.t,\n 'u_pattern_size_a': (imagePosA as any).displaySize,\n 'u_pattern_size_b': (imagePosB as any).displaySize,\n 'u_scale_a': crossfade.fromScale,\n 'u_scale_b': crossfade.toScale,\n 'u_tile_units_to_pixels': 1 / pixelsToTileUnits(tile, 1, painter.transform.tileZoom),\n // split the pixel coord into two pairs of 16 bit numbers. The glsl spec only guarantees 16 bits of precision.\n 'u_pixel_coord_upper': [pixelX >> 16, pixelY >> 16],\n 'u_pixel_coord_lower': [pixelX & 0xFFFF, pixelY & 0xFFFF]\n };\n}\nexport {bgPatternUniformValues, patternUniformValues};\n","import {patternUniformValues} from './pattern';\nimport {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n Uniform3f\n} from '../uniform_binding';\n\nimport {mat3, vec3} from 'gl-matrix';\nimport {extend} from '../../util/util';\n\nimport type {Context} from '../../gl/context';\nimport type {Painter} from '../painter';\nimport type {OverscaledTileID} from '../../tile/tile_id';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {CrossfadeParameters} from '../../style/evaluation_parameters';\nimport type {Tile} from '../../tile/tile';\n\nexport type FillExtrusionUniformsType = {\n 'u_lightpos': Uniform3f;\n 'u_lightpos_globe': Uniform3f;\n 'u_lightintensity': Uniform1f;\n 'u_lightcolor': Uniform3f;\n 'u_vertical_gradient': Uniform1f;\n 'u_opacity': Uniform1f;\n 'u_fill_translate': Uniform2f;\n};\n\nexport type FillExtrusionPatternUniformsType = {\n 'u_lightpos': Uniform3f;\n 'u_lightpos_globe': Uniform3f;\n 'u_lightintensity': Uniform1f;\n 'u_lightcolor': Uniform3f;\n 'u_height_factor': Uniform1f;\n 'u_vertical_gradient': Uniform1f;\n 'u_opacity': Uniform1f;\n 'u_fill_translate': Uniform2f;\n // pattern uniforms:\n 'u_texsize': Uniform2f;\n 'u_image': Uniform1i;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n 'u_scale': Uniform3f;\n 'u_fade': Uniform1f;\n};\n\nconst fillExtrusionUniforms = (context: Context, locations: UniformLocations): FillExtrusionUniformsType => ({\n 'u_lightpos': new Uniform3f(context, locations.u_lightpos),\n 'u_lightpos_globe': new Uniform3f(context, locations.u_lightpos_globe),\n 'u_lightintensity': new Uniform1f(context, locations.u_lightintensity),\n 'u_lightcolor': new Uniform3f(context, locations.u_lightcolor),\n 'u_vertical_gradient': new Uniform1f(context, locations.u_vertical_gradient),\n 'u_opacity': new Uniform1f(context, locations.u_opacity),\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate),\n});\n\nconst fillExtrusionPatternUniforms = (context: Context, locations: UniformLocations): FillExtrusionPatternUniformsType => ({\n 'u_lightpos': new Uniform3f(context, locations.u_lightpos),\n 'u_lightpos_globe': new Uniform3f(context, locations.u_lightpos_globe),\n 'u_lightintensity': new Uniform1f(context, locations.u_lightintensity),\n 'u_lightcolor': new Uniform3f(context, locations.u_lightcolor),\n 'u_vertical_gradient': new Uniform1f(context, locations.u_vertical_gradient),\n 'u_height_factor': new Uniform1f(context, locations.u_height_factor),\n 'u_opacity': new Uniform1f(context, locations.u_opacity),\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate),\n // pattern uniforms\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_pixel_coord_upper': new Uniform2f(context, locations.u_pixel_coord_upper),\n 'u_pixel_coord_lower': new Uniform2f(context, locations.u_pixel_coord_lower),\n 'u_scale': new Uniform3f(context, locations.u_scale),\n 'u_fade': new Uniform1f(context, locations.u_fade)\n});\n\nconst fillExtrusionUniformValues = (\n painter: Painter,\n shouldUseVerticalGradient: boolean,\n opacity: number,\n translate: [number, number],\n): UniformValues => {\n const light = painter.style.light;\n const _lp = light.properties.get('position');\n const lightPos = [_lp.x, _lp.y, _lp.z] as vec3;\n const lightMat = mat3.create();\n if (light.properties.get('anchor') === 'viewport') {\n mat3.fromRotation(lightMat, painter.transform.bearingInRadians);\n }\n vec3.transformMat3(lightPos, lightPos, lightMat);\n const transformedLightPos = painter.transform.transformLightDirection(lightPos);\n\n const lightColor = light.properties.get('color');\n\n return {\n 'u_lightpos': lightPos,\n 'u_lightpos_globe': transformedLightPos,\n 'u_lightintensity': light.properties.get('intensity'),\n 'u_lightcolor': [lightColor.r, lightColor.g, lightColor.b],\n 'u_vertical_gradient': +shouldUseVerticalGradient,\n 'u_opacity': opacity,\n 'u_fill_translate': translate,\n };\n};\n\nconst fillExtrusionPatternUniformValues = (\n painter: Painter,\n shouldUseVerticalGradient: boolean,\n opacity: number,\n translate: [number, number],\n coord: OverscaledTileID,\n crossfade: CrossfadeParameters,\n tile: Tile\n): UniformValues => {\n return extend(fillExtrusionUniformValues(painter, shouldUseVerticalGradient, opacity, translate),\n patternUniformValues(crossfade, painter, tile),\n {\n 'u_height_factor': -Math.pow(2, coord.overscaledZ) / tile.tileSize / 8\n });\n};\n\nexport {\n fillExtrusionUniforms,\n fillExtrusionPatternUniforms,\n fillExtrusionUniformValues,\n fillExtrusionPatternUniformValues\n};\n","import {patternUniformValues} from './pattern';\nimport {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n Uniform3f,\n} from '../uniform_binding';\nimport {extend} from '../../util/util';\n\nimport type {Painter} from '../painter';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {CrossfadeParameters} from '../../style/evaluation_parameters';\nimport type {Tile} from '../../tile/tile';\n\nexport type FillUniformsType = {\n 'u_fill_translate': Uniform2f;\n};\n\nexport type FillOutlineUniformsType = {\n 'u_world': Uniform2f;\n 'u_fill_translate': Uniform2f;\n};\n\nexport type FillPatternUniformsType = {\n // pattern uniforms:\n 'u_texsize': Uniform2f;\n 'u_image': Uniform1i;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n 'u_scale': Uniform3f;\n 'u_fade': Uniform1f;\n 'u_fill_translate': Uniform2f;\n};\n\nexport type FillOutlinePatternUniformsType = {\n 'u_world': Uniform2f;\n // pattern uniforms:\n 'u_texsize': Uniform2f;\n 'u_image': Uniform1i;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n 'u_scale': Uniform3f;\n 'u_fade': Uniform1f;\n 'u_fill_translate': Uniform2f;\n};\n\nconst fillUniforms = (context: Context, locations: UniformLocations): FillUniformsType => ({\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate)\n});\n\nconst fillPatternUniforms = (context: Context, locations: UniformLocations): FillPatternUniformsType => ({\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_pixel_coord_upper': new Uniform2f(context, locations.u_pixel_coord_upper),\n 'u_pixel_coord_lower': new Uniform2f(context, locations.u_pixel_coord_lower),\n 'u_scale': new Uniform3f(context, locations.u_scale),\n 'u_fade': new Uniform1f(context, locations.u_fade),\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate)\n});\n\nconst fillOutlineUniforms = (context: Context, locations: UniformLocations): FillOutlineUniformsType => ({\n 'u_world': new Uniform2f(context, locations.u_world),\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate)\n});\n\nconst fillOutlinePatternUniforms = (context: Context, locations: UniformLocations): FillOutlinePatternUniformsType => ({\n 'u_world': new Uniform2f(context, locations.u_world),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_pixel_coord_upper': new Uniform2f(context, locations.u_pixel_coord_upper),\n 'u_pixel_coord_lower': new Uniform2f(context, locations.u_pixel_coord_lower),\n 'u_scale': new Uniform3f(context, locations.u_scale),\n 'u_fade': new Uniform1f(context, locations.u_fade),\n 'u_fill_translate': new Uniform2f(context, locations.u_fill_translate)\n});\n\nconst fillPatternUniformValues = (\n painter: Painter,\n crossfade: CrossfadeParameters,\n tile: Tile,\n translate: [number, number]\n): UniformValues => extend(\n patternUniformValues(crossfade, painter, tile),\n {\n 'u_fill_translate': translate,\n }\n);\n\nconst fillUniformValues = (translate: [number, number]): UniformValues => ({\n 'u_fill_translate': translate,\n});\n\nconst fillOutlineUniformValues = (drawingBufferSize: [number, number], translate: [number, number]): UniformValues => ({\n 'u_world': drawingBufferSize,\n 'u_fill_translate': translate,\n});\n\nconst fillOutlinePatternUniformValues = (\n painter: Painter,\n crossfade: CrossfadeParameters,\n tile: Tile,\n drawingBufferSize: [number, number],\n translate: [number, number]\n): UniformValues => extend(\n fillPatternUniformValues(painter, crossfade, tile, translate),\n {\n 'u_world': drawingBufferSize\n }\n);\n\nexport {\n fillUniforms,\n fillPatternUniforms,\n fillOutlineUniforms,\n fillOutlinePatternUniforms,\n fillUniformValues,\n fillPatternUniformValues,\n fillOutlineUniformValues,\n fillOutlinePatternUniformValues\n};\n","import {Uniform1i, Uniform1f, Uniform2f} from '../uniform_binding';\nimport {pixelsToTileUnits} from '../../source/pixels_to_tile_units';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Tile} from '../../tile/tile';\nimport type {CircleStyleLayer} from '../../style/style_layer/circle_style_layer';\nimport type {Painter} from '../painter';\nimport {EXTENT} from '../../data/extent';\n\nexport type CircleUniformsType = {\n 'u_camera_to_center_distance': Uniform1f;\n 'u_scale_with_map': Uniform1i;\n 'u_pitch_with_map': Uniform1i;\n 'u_extrude_scale': Uniform2f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_globe_extrude_scale': Uniform1f;\n 'u_translate': Uniform2f;\n};\n\nconst circleUniforms = (context: Context, locations: UniformLocations): CircleUniformsType => ({\n 'u_camera_to_center_distance': new Uniform1f(context, locations.u_camera_to_center_distance),\n 'u_scale_with_map': new Uniform1i(context, locations.u_scale_with_map),\n 'u_pitch_with_map': new Uniform1i(context, locations.u_pitch_with_map),\n 'u_extrude_scale': new Uniform2f(context, locations.u_extrude_scale),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_globe_extrude_scale': new Uniform1f(context, locations.u_globe_extrude_scale),\n 'u_translate': new Uniform2f(context, locations.u_translate),\n});\n\nconst circleUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: CircleStyleLayer,\n translate: [number, number],\n radiusCorrectionFactor: number\n): UniformValues => {\n const transform = painter.transform;\n\n let pitchWithMap: boolean, extrudeScale: [number, number];\n let globeExtrudeScale: number = 0;\n if (layer.paint.get('circle-pitch-alignment') === 'map') {\n const pixelRatio = pixelsToTileUnits(tile, 1, transform.zoom);\n pitchWithMap = true;\n extrudeScale = [pixelRatio, pixelRatio];\n\n // For globe rendering we need to know how much to extrude the circle as an *angle*.\n // The calculation: (one pixel in tile units) / (earth circumference in tile units) * (2PI radians) * radiusCorrectionFactor\n globeExtrudeScale = pixelRatio / (EXTENT * Math.pow(2, tile.tileID.overscaledZ)) * 2.0 * Math.PI * radiusCorrectionFactor;\n } else {\n pitchWithMap = false;\n extrudeScale = transform.pixelsToGLUnits;\n }\n\n return {\n 'u_camera_to_center_distance': transform.cameraToCenterDistance,\n 'u_scale_with_map': +(layer.paint.get('circle-pitch-scale') === 'map'),\n 'u_pitch_with_map': +(pitchWithMap),\n 'u_device_pixel_ratio': painter.pixelRatio,\n 'u_extrude_scale': extrudeScale,\n 'u_globe_extrude_scale': globeExtrudeScale,\n 'u_translate': translate,\n };\n};\n\nexport {circleUniforms, circleUniformValues};\n","import {Uniform2f} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {IReadonlyTransform} from '../../geo/transform_interface';\n\nexport type CollisionUniformsType = {\n 'u_pixel_extrude_scale': Uniform2f;\n};\n\nexport type CollisionCircleUniformsType = {\n 'u_viewport_size': Uniform2f;\n};\n\nconst collisionUniforms = (context: Context, locations: UniformLocations): CollisionUniformsType => ({\n 'u_pixel_extrude_scale': new Uniform2f(context, locations.u_pixel_extrude_scale)\n});\n\nconst collisionCircleUniforms = (context: Context, locations: UniformLocations): CollisionCircleUniformsType => ({\n 'u_viewport_size': new Uniform2f(context, locations.u_viewport_size)\n});\n\nconst collisionUniformValues = (transform: {width: number; height: number}): UniformValues => {\n return {\n 'u_pixel_extrude_scale': [1.0 / transform.width, 1.0 / transform.height],\n };\n};\n\nconst collisionCircleUniformValues = (transform: IReadonlyTransform): UniformValues => {\n return {\n 'u_viewport_size': [transform.width, transform.height]\n };\n};\n\nexport {collisionUniforms, collisionUniformValues, collisionCircleUniforms, collisionCircleUniformValues};\n","import {UniformColor, Uniform1i, Uniform1f} from '../uniform_binding';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Color} from '@maplibre/maplibre-gl-style-spec';\n\nexport type DebugUniformsType = {\n 'u_color': UniformColor;\n 'u_overlay': Uniform1i;\n 'u_overlay_scale': Uniform1f;\n};\n\nconst debugUniforms = (context: Context, locations: UniformLocations): DebugUniformsType => ({\n 'u_color': new UniformColor(context, locations.u_color),\n 'u_overlay': new Uniform1i(context, locations.u_overlay),\n 'u_overlay_scale': new Uniform1f(context, locations.u_overlay_scale)\n});\n\nconst debugUniformValues = (color: Color, scaleRatio: number = 1): UniformValues => ({\n 'u_color': color,\n 'u_overlay': 0,\n 'u_overlay_scale': scaleRatio\n});\n\nexport {debugUniforms, debugUniformValues};\n","import {mat4} from 'gl-matrix';\n\nimport {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n UniformMatrix4f\n} from '../uniform_binding';\nimport {pixelsToTileUnits} from '../../source/pixels_to_tile_units';\n\nimport type {Context} from '../../gl/context';\nimport type {Tile} from '../../tile/tile';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Painter} from '../painter';\nimport type {HeatmapStyleLayer} from '../../style/style_layer/heatmap_style_layer';\nimport {EXTENT} from '../../data/extent';\n\nexport type HeatmapUniformsType = {\n 'u_extrude_scale': Uniform1f;\n 'u_intensity': Uniform1f;\n 'u_globe_extrude_scale': Uniform1f;\n};\n\nexport type HeatmapTextureUniformsType = {\n 'u_matrix': UniformMatrix4f;\n 'u_world': Uniform2f;\n 'u_image': Uniform1i;\n 'u_color_ramp': Uniform1i;\n 'u_opacity': Uniform1f;\n};\n\nconst heatmapUniforms = (context: Context, locations: UniformLocations): HeatmapUniformsType => ({\n 'u_extrude_scale': new Uniform1f(context, locations.u_extrude_scale),\n 'u_intensity': new Uniform1f(context, locations.u_intensity),\n 'u_globe_extrude_scale': new Uniform1f(context, locations.u_globe_extrude_scale)\n});\n\nconst heatmapTextureUniforms = (context: Context, locations: UniformLocations): HeatmapTextureUniformsType => ({\n 'u_matrix': new UniformMatrix4f(context, locations.u_matrix),\n 'u_world': new Uniform2f(context, locations.u_world),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_color_ramp': new Uniform1i(context, locations.u_color_ramp),\n 'u_opacity': new Uniform1f(context, locations.u_opacity)\n});\n\nconst heatmapUniformValues = (tile: Tile, zoom: number, intensity: number, radiusCorrectionFactor: number): UniformValues => {\n const pixelRatio = pixelsToTileUnits(tile, 1, zoom);\n // See comment in circle_program.ts\n const globeExtrudeScale = pixelRatio / (EXTENT * Math.pow(2, tile.tileID.overscaledZ)) * 2.0 * Math.PI * radiusCorrectionFactor;\n return {\n 'u_extrude_scale': pixelsToTileUnits(tile, 1, zoom),\n 'u_intensity': intensity,\n 'u_globe_extrude_scale': globeExtrudeScale\n };\n};\n\nconst heatmapTextureUniformValues = (\n painter: Painter,\n layer: HeatmapStyleLayer,\n textureUnit: number,\n colorRampUnit: number\n): UniformValues => {\n const matrix = mat4.create();\n mat4.ortho(matrix, 0, painter.width, painter.height, 0, 0, 1);\n\n const gl = painter.context.gl;\n\n return {\n 'u_matrix': matrix,\n 'u_world': [gl.drawingBufferWidth, gl.drawingBufferHeight],\n 'u_image': textureUnit,\n 'u_color_ramp': colorRampUnit,\n 'u_opacity': layer.paint.get('heatmap-opacity')\n };\n};\n\nexport {\n heatmapUniforms,\n heatmapTextureUniforms,\n heatmapUniformValues,\n heatmapTextureUniformValues\n};\n","import {mat4} from 'gl-matrix';\n\nimport {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n UniformColor,\n UniformFloatArray,\n UniformColorArray,\n UniformMatrix4f,\n Uniform4f\n} from '../uniform_binding';\nimport {EXTENT} from '../../data/extent';\nimport {MercatorCoordinate} from '../../geo/mercator_coordinate';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Tile} from '../../tile/tile';\nimport type {Painter} from '../painter';\nimport type {HillshadeStyleLayer} from '../../style/style_layer/hillshade_style_layer';\nimport type {DEMData} from '../../data/dem_data';\nimport type {OverscaledTileID} from '../../tile/tile_id';\n\nexport type HillshadeUniformsType = {\n 'u_image': Uniform1i;\n 'u_latrange': Uniform2f;\n 'u_exaggeration': Uniform1f;\n 'u_altitudes': UniformFloatArray;\n 'u_azimuths': UniformFloatArray;\n 'u_accent': UniformColor;\n 'u_method': Uniform1i;\n 'u_shadows': UniformColorArray;\n 'u_highlights': UniformColorArray;\n};\n\nexport type HillshadePrepareUniformsType = {\n 'u_matrix': UniformMatrix4f;\n 'u_image': Uniform1i;\n 'u_dimension': Uniform2f;\n 'u_zoom': Uniform1f;\n 'u_unpack': Uniform4f;\n};\n\nconst hillshadeUniforms = (context: Context, locations: UniformLocations): HillshadeUniformsType => ({\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_latrange': new Uniform2f(context, locations.u_latrange),\n 'u_exaggeration': new Uniform1f(context, locations.u_exaggeration),\n 'u_altitudes': new UniformFloatArray(context, locations.u_altitudes),\n 'u_azimuths': new UniformFloatArray(context, locations.u_azimuths),\n 'u_accent': new UniformColor(context, locations.u_accent),\n 'u_method': new Uniform1i(context, locations.u_method),\n 'u_shadows': new UniformColorArray(context, locations.u_shadows),\n 'u_highlights': new UniformColorArray(context, locations.u_highlights)\n});\n\nconst hillshadePrepareUniforms = (context: Context, locations: UniformLocations): HillshadePrepareUniformsType => ({\n 'u_matrix': new UniformMatrix4f(context, locations.u_matrix),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_dimension': new Uniform2f(context, locations.u_dimension),\n 'u_zoom': new Uniform1f(context, locations.u_zoom),\n 'u_unpack': new Uniform4f(context, locations.u_unpack)\n});\n\nconst hillshadeUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: HillshadeStyleLayer,\n): UniformValues => {\n const accent = layer.paint.get('hillshade-accent-color');\n let method;\n switch (layer.paint.get('hillshade-method')) {\n case 'basic':\n method = 4;\n break;\n case 'combined':\n method = 1;\n break;\n case 'igor':\n method = 2;\n break;\n case 'multidirectional':\n method = 3;\n break;\n case 'standard':\n default:\n method = 0;\n break;\n }\n\n const illumination = layer.getIlluminationProperties();\n\n for (let i = 0; i < illumination.directionRadians.length; i++) {\n // modify azimuthal angle by map rotation if light is anchored at the viewport\n if (layer.paint.get('hillshade-illumination-anchor') === 'viewport') {\n illumination.directionRadians[i] += painter.transform.bearingInRadians;\n }\n }\n return {\n 'u_image': 0,\n 'u_latrange': getTileLatRange(painter, tile.tileID),\n 'u_exaggeration': layer.paint.get('hillshade-exaggeration'),\n 'u_altitudes': illumination.altitudeRadians,\n 'u_azimuths': illumination.directionRadians,\n 'u_accent': accent,\n 'u_method': method,\n 'u_highlights': illumination.highlightColor,\n 'u_shadows': illumination.shadowColor\n };\n};\n\nconst hillshadeUniformPrepareValues = (tileID: OverscaledTileID, dem: DEMData): UniformValues => {\n\n const stride = dem.stride;\n const matrix = mat4.create();\n // Flip rendering at y axis.\n mat4.ortho(matrix, 0, EXTENT, -EXTENT, 0, 0, 1);\n mat4.translate(matrix, matrix, [0, -EXTENT, 0]);\n\n return {\n 'u_matrix': matrix,\n 'u_image': 1,\n 'u_dimension': [stride, stride],\n 'u_zoom': tileID.overscaledZ,\n 'u_unpack': dem.getUnpackVector()\n };\n};\n\nfunction getTileLatRange(painter: Painter, tileID: OverscaledTileID) {\n // for scaling the magnitude of a points slope by its latitude\n const tilesAtZoom = Math.pow(2, tileID.canonical.z);\n const y = tileID.canonical.y;\n return [\n new MercatorCoordinate(0, y / tilesAtZoom).toLngLat().lat,\n new MercatorCoordinate(0, (y + 1) / tilesAtZoom).toLngLat().lat];\n}\n\nexport {\n hillshadeUniforms,\n hillshadePrepareUniforms,\n hillshadeUniformValues,\n hillshadeUniformPrepareValues\n};\n","import {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n Uniform4f\n} from '../uniform_binding';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {ColorReliefStyleLayer} from '../../style/style_layer/color_relief_style_layer';\nimport type {DEMData} from '../../data/dem_data';\n\nexport type ColorReliefUniformsType = {\n 'u_image': Uniform1i;\n 'u_unpack': Uniform4f;\n 'u_dimension': Uniform2f;\n 'u_elevation_stops': Uniform1i;\n 'u_color_stops': Uniform1i;\n 'u_color_ramp_size': Uniform1i;\n 'u_opacity': Uniform1f;\n};\n\nconst colorReliefUniforms = (context: Context, locations: UniformLocations): ColorReliefUniformsType => ({\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_unpack': new Uniform4f(context, locations.u_unpack),\n 'u_dimension': new Uniform2f(context, locations.u_dimension),\n 'u_elevation_stops': new Uniform1i(context, locations.u_elevation_stops),\n 'u_color_stops': new Uniform1i(context, locations.u_color_stops),\n 'u_color_ramp_size': new Uniform1i(context, locations.u_color_ramp_size),\n 'u_opacity': new Uniform1f(context, locations.u_opacity)\n});\n\nconst colorReliefUniformValues = (\n layer: ColorReliefStyleLayer,\n dem: DEMData,\n colorRampSize: number = 0\n): UniformValues => {\n\n return {\n 'u_image': 0,\n 'u_unpack': dem.getUnpackVector(),\n 'u_dimension': [dem.stride, dem.stride],\n 'u_elevation_stops': 1,\n 'u_color_stops': 4,\n 'u_color_ramp_size': colorRampSize,\n 'u_opacity': layer.paint.get('color-relief-opacity')\n };\n};\n\nexport {\n colorReliefUniforms,\n colorReliefUniformValues,\n};\n","import {Uniform1i, Uniform1f, Uniform2f, Uniform3f} from '../uniform_binding';\nimport {pixelsToTileUnits} from '../../source/pixels_to_tile_units';\nimport {extend, translatePosition} from '../../util/util';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {IReadonlyTransform} from '../../geo/transform_interface';\nimport type {Tile} from '../../tile/tile';\nimport type {LineStyleLayer} from '../../style/style_layer/line_style_layer';\nimport type {Painter} from '../painter';\nimport type {CrossfadeParameters} from '../../style/evaluation_parameters';\n\nexport type LineUniformsType = {\n 'u_translation': Uniform2f;\n 'u_ratio': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_units_to_pixels': Uniform2f;\n};\n\nexport type LineGradientUniformsType = {\n 'u_translation': Uniform2f;\n 'u_ratio': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_units_to_pixels': Uniform2f;\n 'u_image': Uniform1i;\n 'u_image_height': Uniform1f;\n};\n\nexport type LinePatternUniformsType = {\n 'u_translation': Uniform2f;\n 'u_texsize': Uniform2f;\n 'u_ratio': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_units_to_pixels': Uniform2f;\n 'u_image': Uniform1i;\n 'u_scale': Uniform3f;\n 'u_fade': Uniform1f;\n};\n\nexport type LineSDFUniformsType = {\n 'u_translation': Uniform2f;\n 'u_ratio': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_units_to_pixels': Uniform2f;\n 'u_tileratio': Uniform1f;\n 'u_crossfade_from': Uniform1f;\n 'u_crossfade_to': Uniform1f;\n 'u_image': Uniform1i;\n 'u_mix': Uniform1f;\n 'u_lineatlas_width': Uniform1f;\n 'u_lineatlas_height': Uniform1f;\n};\n\nexport type LineGradientSDFUniformsType = {\n 'u_translation': Uniform2f;\n 'u_ratio': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_units_to_pixels': Uniform2f;\n 'u_image': Uniform1i;\n 'u_image_height': Uniform1f;\n 'u_tileratio': Uniform1f;\n 'u_crossfade_from': Uniform1f;\n 'u_crossfade_to': Uniform1f;\n 'u_image_dash': Uniform1i;\n 'u_mix': Uniform1f;\n 'u_lineatlas_width': Uniform1f;\n 'u_lineatlas_height': Uniform1f;\n};\n\nconst lineUniforms = (context: Context, locations: UniformLocations): LineUniformsType => ({\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_ratio': new Uniform1f(context, locations.u_ratio),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_units_to_pixels': new Uniform2f(context, locations.u_units_to_pixels)\n});\n\nconst lineGradientUniforms = (context: Context, locations: UniformLocations): LineGradientUniformsType => ({\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_ratio': new Uniform1f(context, locations.u_ratio),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_units_to_pixels': new Uniform2f(context, locations.u_units_to_pixels),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_image_height': new Uniform1f(context, locations.u_image_height)\n});\n\nconst linePatternUniforms = (context: Context, locations: UniformLocations): LinePatternUniformsType => ({\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_ratio': new Uniform1f(context, locations.u_ratio),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_units_to_pixels': new Uniform2f(context, locations.u_units_to_pixels),\n 'u_scale': new Uniform3f(context, locations.u_scale),\n 'u_fade': new Uniform1f(context, locations.u_fade)\n});\n\nconst lineSDFUniforms = (context: Context, locations: UniformLocations): LineSDFUniformsType => ({\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_ratio': new Uniform1f(context, locations.u_ratio),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_units_to_pixels': new Uniform2f(context, locations.u_units_to_pixels),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_mix': new Uniform1f(context, locations.u_mix),\n 'u_tileratio': new Uniform1f(context, locations.u_tileratio),\n 'u_crossfade_from': new Uniform1f(context, locations.u_crossfade_from),\n 'u_crossfade_to': new Uniform1f(context, locations.u_crossfade_to),\n 'u_lineatlas_width': new Uniform1f(context, locations.u_lineatlas_width),\n 'u_lineatlas_height': new Uniform1f(context, locations.u_lineatlas_height)\n});\n\nconst lineGradientSDFUniforms = (context: Context, locations: UniformLocations): LineGradientSDFUniformsType => ({\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_ratio': new Uniform1f(context, locations.u_ratio),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_units_to_pixels': new Uniform2f(context, locations.u_units_to_pixels),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_image_height': new Uniform1f(context, locations.u_image_height),\n 'u_tileratio': new Uniform1f(context, locations.u_tileratio),\n 'u_crossfade_from': new Uniform1f(context, locations.u_crossfade_from),\n 'u_crossfade_to': new Uniform1f(context, locations.u_crossfade_to),\n 'u_image_dash': new Uniform1i(context, locations.u_image_dash),\n 'u_mix': new Uniform1f(context, locations.u_mix),\n 'u_lineatlas_width': new Uniform1f(context, locations.u_lineatlas_width),\n 'u_lineatlas_height': new Uniform1f(context, locations.u_lineatlas_height)\n});\n\nconst lineUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: LineStyleLayer,\n ratioScale: number,\n): UniformValues => {\n const transform = painter.transform;\n\n return {\n 'u_translation': calculateTranslation(painter, tile, layer),\n 'u_ratio': ratioScale / pixelsToTileUnits(tile, 1, transform.zoom),\n 'u_device_pixel_ratio': painter.pixelRatio,\n 'u_units_to_pixels': [\n 1 / transform.pixelsToGLUnits[0],\n 1 / transform.pixelsToGLUnits[1]\n ]\n };\n};\n\nconst lineGradientUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: LineStyleLayer,\n ratioScale: number,\n imageHeight: number,\n): UniformValues => {\n return extend(lineUniformValues(painter, tile, layer, ratioScale), {\n 'u_image': 0,\n 'u_image_height': imageHeight,\n });\n};\n\nconst linePatternUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: LineStyleLayer,\n ratioScale: number,\n crossfade: CrossfadeParameters,\n): UniformValues => {\n const transform = painter.transform;\n const tileZoomRatio = calculateTileRatio(tile, transform);\n return {\n 'u_translation': calculateTranslation(painter, tile, layer),\n 'u_texsize': tile.imageAtlasTexture.size,\n // camera zoom ratio\n 'u_ratio': ratioScale / pixelsToTileUnits(tile, 1, transform.zoom),\n 'u_device_pixel_ratio': painter.pixelRatio,\n 'u_image': 0,\n 'u_scale': [tileZoomRatio, crossfade.fromScale, crossfade.toScale],\n 'u_fade': crossfade.t,\n 'u_units_to_pixels': [\n 1 / transform.pixelsToGLUnits[0],\n 1 / transform.pixelsToGLUnits[1]\n ]\n };\n};\n\nconst lineSDFUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: LineStyleLayer,\n ratioScale: number,\n crossfade: CrossfadeParameters,\n): UniformValues => {\n const transform = painter.transform;\n const tileRatio = calculateTileRatio(tile, transform);\n\n return extend(lineUniformValues(painter, tile, layer, ratioScale), {\n 'u_tileratio': tileRatio,\n 'u_crossfade_from': crossfade.fromScale,\n 'u_crossfade_to': crossfade.toScale,\n 'u_image': 0,\n 'u_mix': crossfade.t,\n 'u_lineatlas_width': painter.lineAtlas.width,\n 'u_lineatlas_height': painter.lineAtlas.height,\n });\n};\n\nconst lineGradientSDFUniformValues = (\n painter: Painter,\n tile: Tile,\n layer: LineStyleLayer,\n ratioScale: number,\n crossfade: CrossfadeParameters,\n imageHeight: number,\n): UniformValues => {\n const transform = painter.transform;\n const tileRatio = calculateTileRatio(tile, transform);\n\n return extend(lineUniformValues(painter, tile, layer, ratioScale), {\n 'u_image': 0,\n 'u_image_height': imageHeight,\n 'u_tileratio': tileRatio,\n 'u_crossfade_from': crossfade.fromScale,\n 'u_crossfade_to': crossfade.toScale,\n 'u_image_dash': 1,\n 'u_mix': crossfade.t,\n 'u_lineatlas_width': painter.lineAtlas.width,\n 'u_lineatlas_height': painter.lineAtlas.height,\n });\n};\n\nfunction calculateTileRatio(tile: Tile, transform: IReadonlyTransform) {\n return 1 / pixelsToTileUnits(tile, 1, transform.tileZoom);\n}\n\nfunction calculateTranslation(painter: Painter, tile: Tile, layer: LineStyleLayer): [number, number] {\n // Translate line points prior to any transformation\n return translatePosition(\n painter.transform,\n tile,\n layer.paint.get('line-translate'),\n layer.paint.get('line-translate-anchor')\n );\n}\n\nexport {\n lineUniforms,\n lineGradientUniforms,\n linePatternUniforms,\n lineSDFUniforms,\n lineGradientSDFUniforms,\n lineUniformValues,\n lineGradientUniformValues,\n linePatternUniformValues,\n lineSDFUniformValues,\n lineGradientSDFUniformValues\n};\n","import {Uniform1i, Uniform1f, Uniform2f, Uniform3f, Uniform4f} from '../uniform_binding';\n\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {RasterStyleLayer} from '../../style/style_layer/raster_style_layer';\nimport type Point from '@mapbox/point-geometry';\n\nexport type RasterUniformsType = {\n 'u_tl_parent': Uniform2f;\n 'u_scale_parent': Uniform1f;\n 'u_buffer_scale': Uniform1f;\n 'u_fade_t': Uniform1f;\n 'u_opacity': Uniform1f;\n 'u_image0': Uniform1i;\n 'u_image1': Uniform1i;\n 'u_brightness_low': Uniform1f;\n 'u_brightness_high': Uniform1f;\n 'u_saturation_factor': Uniform1f;\n 'u_contrast_factor': Uniform1f;\n 'u_spin_weights': Uniform3f;\n 'u_coords_top': Uniform4f;\n 'u_coords_bottom': Uniform4f;\n};\n\nconst rasterUniforms = (context: Context, locations: UniformLocations): RasterUniformsType => ({\n 'u_tl_parent': new Uniform2f(context, locations.u_tl_parent),\n 'u_scale_parent': new Uniform1f(context, locations.u_scale_parent),\n 'u_buffer_scale': new Uniform1f(context, locations.u_buffer_scale),\n 'u_fade_t': new Uniform1f(context, locations.u_fade_t),\n 'u_opacity': new Uniform1f(context, locations.u_opacity),\n 'u_image0': new Uniform1i(context, locations.u_image0),\n 'u_image1': new Uniform1i(context, locations.u_image1),\n 'u_brightness_low': new Uniform1f(context, locations.u_brightness_low),\n 'u_brightness_high': new Uniform1f(context, locations.u_brightness_high),\n 'u_saturation_factor': new Uniform1f(context, locations.u_saturation_factor),\n 'u_contrast_factor': new Uniform1f(context, locations.u_contrast_factor),\n 'u_spin_weights': new Uniform3f(context, locations.u_spin_weights),\n 'u_coords_top': new Uniform4f(context, locations.u_coords_top),\n 'u_coords_bottom': new Uniform4f(context, locations.u_coords_bottom)\n});\n\nconst rasterUniformValues = (\n parentTL: [number, number],\n parentScaleBy: number,\n fade: {\n mix: number;\n opacity: number;\n },\n layer: RasterStyleLayer,\n cornerCoords: Array,\n): UniformValues => ({\n 'u_tl_parent': parentTL,\n 'u_scale_parent': parentScaleBy,\n // If u_buffer_scale is ever something else than a constant 1,\n // the north/south pole handling in the vertex shader might need modification\n // so that the texture coordinares for poles always lie beyond the edge of the texture.\n // Right now the coordinates are placed right at the texture border.\n 'u_buffer_scale': 1,\n 'u_fade_t': fade.mix,\n 'u_opacity': fade.opacity * layer.paint.get('raster-opacity'),\n 'u_image0': 0,\n 'u_image1': 1,\n 'u_brightness_low': layer.paint.get('raster-brightness-min'),\n 'u_brightness_high': layer.paint.get('raster-brightness-max'),\n 'u_saturation_factor': saturationFactor(layer.paint.get('raster-saturation')),\n 'u_contrast_factor': contrastFactor(layer.paint.get('raster-contrast')),\n 'u_spin_weights': spinWeights(layer.paint.get('raster-hue-rotate')),\n 'u_coords_top': [cornerCoords[0].x, cornerCoords[0].y, cornerCoords[1].x, cornerCoords[1].y],\n 'u_coords_bottom': [cornerCoords[3].x, cornerCoords[3].y, cornerCoords[2].x, cornerCoords[2].y]\n});\n\nfunction spinWeights(angle) {\n angle *= Math.PI / 180;\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n return [\n (2 * c + 1) / 3,\n (-Math.sqrt(3) * s - c + 1) / 3,\n (Math.sqrt(3) * s - c + 1) / 3\n ];\n}\n\nfunction contrastFactor(contrast) {\n return contrast > 0 ?\n 1 / (1 - contrast) :\n 1 + contrast;\n}\n\nfunction saturationFactor(saturation) {\n return saturation > 0 ?\n 1 - 1 / (1.001 - saturation) :\n -saturation;\n}\n\nexport {rasterUniforms, rasterUniformValues};\n","import {Uniform1i, Uniform1f, Uniform2f, UniformMatrix4f} from '../uniform_binding';\nimport {extend} from '../../util/util';\n\nimport type {Context} from '../../gl/context';\nimport type {Painter} from '../painter';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport {type mat4} from 'gl-matrix';\n\nexport type SymbolIconUniformsType = {\n 'u_is_size_zoom_constant': Uniform1i;\n 'u_is_size_feature_constant': Uniform1i;\n 'u_size_t': Uniform1f;\n 'u_size': Uniform1f;\n 'u_camera_to_center_distance': Uniform1f;\n 'u_pitch': Uniform1f;\n 'u_rotate_symbol': Uniform1i;\n 'u_aspect_ratio': Uniform1f;\n 'u_fade_change': Uniform1f;\n 'u_label_plane_matrix': UniformMatrix4f;\n 'u_coord_matrix': UniformMatrix4f;\n 'u_is_text': Uniform1i;\n 'u_pitch_with_map': Uniform1i;\n 'u_is_along_line': Uniform1i;\n 'u_is_variable_anchor': Uniform1i;\n 'u_texsize': Uniform2f;\n 'u_texture': Uniform1i;\n 'u_translation': Uniform2f;\n 'u_pitched_scale': Uniform1f;\n};\n\nexport type SymbolSDFUniformsType = {\n 'u_is_size_zoom_constant': Uniform1i;\n 'u_is_size_feature_constant': Uniform1i;\n 'u_size_t': Uniform1f;\n 'u_size': Uniform1f;\n 'u_camera_to_center_distance': Uniform1f;\n 'u_pitch': Uniform1f;\n 'u_rotate_symbol': Uniform1i;\n 'u_aspect_ratio': Uniform1f;\n 'u_fade_change': Uniform1f;\n 'u_label_plane_matrix': UniformMatrix4f;\n 'u_coord_matrix': UniformMatrix4f;\n 'u_is_text': Uniform1i;\n 'u_pitch_with_map': Uniform1i;\n 'u_is_along_line': Uniform1i;\n 'u_is_variable_anchor': Uniform1i;\n 'u_texsize': Uniform2f;\n 'u_texture': Uniform1i;\n 'u_gamma_scale': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_is_halo': Uniform1i;\n 'u_translation': Uniform2f;\n 'u_pitched_scale': Uniform1f;\n};\n\nexport type symbolTextAndIconUniformsType = {\n 'u_is_size_zoom_constant': Uniform1i;\n 'u_is_size_feature_constant': Uniform1i;\n 'u_size_t': Uniform1f;\n 'u_size': Uniform1f;\n 'u_camera_to_center_distance': Uniform1f;\n 'u_pitch': Uniform1f;\n 'u_rotate_symbol': Uniform1i;\n 'u_aspect_ratio': Uniform1f;\n 'u_fade_change': Uniform1f;\n 'u_label_plane_matrix': UniformMatrix4f;\n 'u_coord_matrix': UniformMatrix4f;\n 'u_is_text': Uniform1i;\n 'u_pitch_with_map': Uniform1i;\n 'u_is_along_line': Uniform1i;\n 'u_is_variable_anchor': Uniform1i;\n 'u_texsize': Uniform2f;\n 'u_texsize_icon': Uniform2f;\n 'u_texture': Uniform1i;\n 'u_texture_icon': Uniform1i;\n 'u_gamma_scale': Uniform1f;\n 'u_device_pixel_ratio': Uniform1f;\n 'u_is_halo': Uniform1i;\n 'u_translation': Uniform2f;\n 'u_pitched_scale': Uniform1f;\n};\n\nconst symbolIconUniforms = (context: Context, locations: UniformLocations): SymbolIconUniformsType => ({\n 'u_is_size_zoom_constant': new Uniform1i(context, locations.u_is_size_zoom_constant),\n 'u_is_size_feature_constant': new Uniform1i(context, locations.u_is_size_feature_constant),\n 'u_size_t': new Uniform1f(context, locations.u_size_t),\n 'u_size': new Uniform1f(context, locations.u_size),\n 'u_camera_to_center_distance': new Uniform1f(context, locations.u_camera_to_center_distance),\n 'u_pitch': new Uniform1f(context, locations.u_pitch),\n 'u_rotate_symbol': new Uniform1i(context, locations.u_rotate_symbol),\n 'u_aspect_ratio': new Uniform1f(context, locations.u_aspect_ratio),\n 'u_fade_change': new Uniform1f(context, locations.u_fade_change),\n 'u_label_plane_matrix': new UniformMatrix4f(context, locations.u_label_plane_matrix),\n 'u_coord_matrix': new UniformMatrix4f(context, locations.u_coord_matrix),\n 'u_is_text': new Uniform1i(context, locations.u_is_text),\n 'u_pitch_with_map': new Uniform1i(context, locations.u_pitch_with_map),\n 'u_is_along_line': new Uniform1i(context, locations.u_is_along_line),\n 'u_is_variable_anchor': new Uniform1i(context, locations.u_is_variable_anchor),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_texture': new Uniform1i(context, locations.u_texture),\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_pitched_scale': new Uniform1f(context, locations.u_pitched_scale),\n});\n\nconst symbolSDFUniforms = (context: Context, locations: UniformLocations): SymbolSDFUniformsType => ({\n 'u_is_size_zoom_constant': new Uniform1i(context, locations.u_is_size_zoom_constant),\n 'u_is_size_feature_constant': new Uniform1i(context, locations.u_is_size_feature_constant),\n 'u_size_t': new Uniform1f(context, locations.u_size_t),\n 'u_size': new Uniform1f(context, locations.u_size),\n 'u_camera_to_center_distance': new Uniform1f(context, locations.u_camera_to_center_distance),\n 'u_pitch': new Uniform1f(context, locations.u_pitch),\n 'u_rotate_symbol': new Uniform1i(context, locations.u_rotate_symbol),\n 'u_aspect_ratio': new Uniform1f(context, locations.u_aspect_ratio),\n 'u_fade_change': new Uniform1f(context, locations.u_fade_change),\n 'u_label_plane_matrix': new UniformMatrix4f(context, locations.u_label_plane_matrix),\n 'u_coord_matrix': new UniformMatrix4f(context, locations.u_coord_matrix),\n 'u_is_text': new Uniform1i(context, locations.u_is_text),\n 'u_pitch_with_map': new Uniform1i(context, locations.u_pitch_with_map),\n 'u_is_along_line': new Uniform1i(context, locations.u_is_along_line),\n 'u_is_variable_anchor': new Uniform1i(context, locations.u_is_variable_anchor),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_texture': new Uniform1i(context, locations.u_texture),\n 'u_gamma_scale': new Uniform1f(context, locations.u_gamma_scale),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_is_halo': new Uniform1i(context, locations.u_is_halo),\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_pitched_scale': new Uniform1f(context, locations.u_pitched_scale),\n});\n\nconst symbolTextAndIconUniforms = (context: Context, locations: UniformLocations): symbolTextAndIconUniformsType => ({\n 'u_is_size_zoom_constant': new Uniform1i(context, locations.u_is_size_zoom_constant),\n 'u_is_size_feature_constant': new Uniform1i(context, locations.u_is_size_feature_constant),\n 'u_size_t': new Uniform1f(context, locations.u_size_t),\n 'u_size': new Uniform1f(context, locations.u_size),\n 'u_camera_to_center_distance': new Uniform1f(context, locations.u_camera_to_center_distance),\n 'u_pitch': new Uniform1f(context, locations.u_pitch),\n 'u_rotate_symbol': new Uniform1i(context, locations.u_rotate_symbol),\n 'u_aspect_ratio': new Uniform1f(context, locations.u_aspect_ratio),\n 'u_fade_change': new Uniform1f(context, locations.u_fade_change),\n 'u_label_plane_matrix': new UniformMatrix4f(context, locations.u_label_plane_matrix),\n 'u_coord_matrix': new UniformMatrix4f(context, locations.u_coord_matrix),\n 'u_is_text': new Uniform1i(context, locations.u_is_text),\n 'u_pitch_with_map': new Uniform1i(context, locations.u_pitch_with_map),\n 'u_is_along_line': new Uniform1i(context, locations.u_is_along_line),\n 'u_is_variable_anchor': new Uniform1i(context, locations.u_is_variable_anchor),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_texsize_icon': new Uniform2f(context, locations.u_texsize_icon),\n 'u_texture': new Uniform1i(context, locations.u_texture),\n 'u_texture_icon': new Uniform1i(context, locations.u_texture_icon),\n 'u_gamma_scale': new Uniform1f(context, locations.u_gamma_scale),\n 'u_device_pixel_ratio': new Uniform1f(context, locations.u_device_pixel_ratio),\n 'u_is_halo': new Uniform1i(context, locations.u_is_halo),\n 'u_translation': new Uniform2f(context, locations.u_translation),\n 'u_pitched_scale': new Uniform1f(context, locations.u_pitched_scale),\n});\n\nconst symbolIconUniformValues = (\n functionType: string,\n size: {\n uSizeT: number;\n uSize: number;\n },\n rotateInShader: boolean,\n pitchWithMap: boolean,\n isAlongLine: boolean,\n isVariableAnchor: boolean,\n painter: Painter,\n labelPlaneMatrix: mat4,\n glCoordMatrix: mat4,\n translation: [number, number],\n isText: boolean,\n texSize: [number, number],\n pitchedScale: number\n): UniformValues => {\n const transform = painter.transform;\n\n return {\n 'u_is_size_zoom_constant': +(functionType === 'constant' || functionType === 'source'),\n 'u_is_size_feature_constant': +(functionType === 'constant' || functionType === 'camera'),\n 'u_size_t': size ? size.uSizeT : 0,\n 'u_size': size ? size.uSize : 0,\n 'u_camera_to_center_distance': transform.cameraToCenterDistance,\n 'u_pitch': transform.pitch / 360 * 2 * Math.PI,\n 'u_rotate_symbol': +rotateInShader,\n 'u_aspect_ratio': transform.width / transform.height,\n 'u_fade_change': painter.options.fadeDuration ? painter.symbolFadeChange : 1,\n 'u_label_plane_matrix': labelPlaneMatrix,\n 'u_coord_matrix': glCoordMatrix,\n 'u_is_text': +isText,\n 'u_pitch_with_map': +pitchWithMap,\n 'u_is_along_line': isAlongLine,\n 'u_is_variable_anchor': isVariableAnchor,\n 'u_texsize': texSize,\n 'u_texture': 0,\n 'u_translation': translation,\n 'u_pitched_scale': pitchedScale\n };\n};\n\nconst symbolSDFUniformValues = (\n functionType: string,\n size: {\n uSizeT: number;\n uSize: number;\n },\n rotateInShader: boolean,\n pitchWithMap: boolean,\n isAlongLine: boolean,\n isVariableAnchor: boolean,\n painter: Painter,\n labelPlaneMatrix: mat4,\n glCoordMatrix: mat4,\n translation: [number, number],\n isText: boolean,\n texSize: [number, number],\n isHalo: boolean,\n pitchedScale: number\n): UniformValues => {\n const transform = painter.transform;\n\n return extend(symbolIconUniformValues(functionType, size,\n rotateInShader, pitchWithMap, isAlongLine, isVariableAnchor, painter, labelPlaneMatrix,\n glCoordMatrix, translation, isText, texSize, pitchedScale), {\n 'u_gamma_scale': (pitchWithMap ? Math.cos(transform.pitch * Math.PI / 180.0) * transform.cameraToCenterDistance : 1),\n 'u_device_pixel_ratio': painter.pixelRatio,\n 'u_is_halo': +isHalo\n });\n};\n\nconst symbolTextAndIconUniformValues = (\n functionType: string,\n size: {\n uSizeT: number;\n uSize: number;\n },\n rotateInShader: boolean,\n pitchWithMap: boolean,\n isAlongLine: boolean,\n isVariableAnchor: boolean,\n painter: Painter,\n labelPlaneMatrix: mat4,\n glCoordMatrix: mat4,\n translation: [number, number],\n texSizeSDF: [number, number],\n texSizeIcon: [number, number],\n pitchedScale: number\n): UniformValues => {\n return extend(symbolSDFUniformValues(functionType, size,\n rotateInShader, pitchWithMap, isAlongLine, isVariableAnchor, painter, labelPlaneMatrix,\n glCoordMatrix, translation, true, texSizeSDF, true, pitchedScale), {\n 'u_texsize_icon': texSizeIcon,\n 'u_texture_icon': 1\n });\n};\n\nexport {symbolIconUniforms, symbolSDFUniforms, symbolIconUniformValues, symbolSDFUniformValues, symbolTextAndIconUniformValues, symbolTextAndIconUniforms};\n","import {bgPatternUniformValues} from './pattern';\nimport {\n Uniform1i,\n Uniform1f,\n Uniform2f,\n UniformColor\n} from '../uniform_binding';\nimport {extend} from '../../util/util';\n\nimport type {Painter} from '../painter';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {Color, ResolvedImage} from '@maplibre/maplibre-gl-style-spec';\nimport type {CrossFaded} from '../../style/properties';\nimport type {CrossfadeParameters} from '../../style/evaluation_parameters';\nimport type {OverscaledTileID} from '../../tile/tile_id';\n\nexport type BackgroundUniformsType = {\n 'u_opacity': Uniform1f;\n 'u_color': UniformColor;\n};\n\nexport type BackgroundPatternUniformsType = {\n 'u_opacity': Uniform1f;\n // pattern uniforms:\n 'u_image': Uniform1i;\n 'u_pattern_tl_a': Uniform2f;\n 'u_pattern_br_a': Uniform2f;\n 'u_pattern_tl_b': Uniform2f;\n 'u_pattern_br_b': Uniform2f;\n 'u_texsize': Uniform2f;\n 'u_mix': Uniform1f;\n 'u_pattern_size_a': Uniform2f;\n 'u_pattern_size_b': Uniform2f;\n 'u_scale_a': Uniform1f;\n 'u_scale_b': Uniform1f;\n 'u_pixel_coord_upper': Uniform2f;\n 'u_pixel_coord_lower': Uniform2f;\n 'u_tile_units_to_pixels': Uniform1f;\n};\n\nconst backgroundUniforms = (context: Context, locations: UniformLocations): BackgroundUniformsType => ({\n 'u_opacity': new Uniform1f(context, locations.u_opacity),\n 'u_color': new UniformColor(context, locations.u_color)\n});\n\nconst backgroundPatternUniforms = (context: Context, locations: UniformLocations): BackgroundPatternUniformsType => ({\n 'u_opacity': new Uniform1f(context, locations.u_opacity),\n 'u_image': new Uniform1i(context, locations.u_image),\n 'u_pattern_tl_a': new Uniform2f(context, locations.u_pattern_tl_a),\n 'u_pattern_br_a': new Uniform2f(context, locations.u_pattern_br_a),\n 'u_pattern_tl_b': new Uniform2f(context, locations.u_pattern_tl_b),\n 'u_pattern_br_b': new Uniform2f(context, locations.u_pattern_br_b),\n 'u_texsize': new Uniform2f(context, locations.u_texsize),\n 'u_mix': new Uniform1f(context, locations.u_mix),\n 'u_pattern_size_a': new Uniform2f(context, locations.u_pattern_size_a),\n 'u_pattern_size_b': new Uniform2f(context, locations.u_pattern_size_b),\n 'u_scale_a': new Uniform1f(context, locations.u_scale_a),\n 'u_scale_b': new Uniform1f(context, locations.u_scale_b),\n 'u_pixel_coord_upper': new Uniform2f(context, locations.u_pixel_coord_upper),\n 'u_pixel_coord_lower': new Uniform2f(context, locations.u_pixel_coord_lower),\n 'u_tile_units_to_pixels': new Uniform1f(context, locations.u_tile_units_to_pixels)\n});\n\nconst backgroundUniformValues = (opacity: number, color: Color): UniformValues => ({\n 'u_opacity': opacity,\n 'u_color': color\n});\n\nconst backgroundPatternUniformValues = (\n opacity: number,\n painter: Painter,\n image: CrossFaded,\n tile: {\n tileID: OverscaledTileID;\n tileSize: number;\n },\n crossfade: CrossfadeParameters\n): UniformValues => extend(\n bgPatternUniformValues(image, crossfade, painter, tile),\n {\n 'u_opacity': opacity\n }\n);\n\nexport {\n backgroundUniforms,\n backgroundPatternUniforms,\n backgroundUniformValues,\n backgroundPatternUniformValues\n};\n","import {fillExtrusionUniforms, fillExtrusionPatternUniforms} from './fill_extrusion_program';\nimport {fillPatternUniforms, fillOutlineUniforms, fillOutlinePatternUniforms, fillUniforms} from './fill_program';\nimport {circleUniforms} from './circle_program';\nimport {collisionUniforms, collisionCircleUniforms} from './collision_program';\nimport {debugUniforms} from './debug_program';\nimport {heatmapUniforms, heatmapTextureUniforms} from './heatmap_program';\nimport {hillshadeUniforms, hillshadePrepareUniforms} from './hillshade_program';\nimport {colorReliefUniforms} from './color_relief_program';\nimport {lineUniforms, lineGradientUniforms, linePatternUniforms, lineSDFUniforms, lineGradientSDFUniforms} from './line_program';\nimport {rasterUniforms} from './raster_program';\nimport {symbolIconUniforms, symbolSDFUniforms, symbolTextAndIconUniforms} from './symbol_program';\nimport {backgroundUniforms, backgroundPatternUniforms} from './background_program';\nimport {terrainUniforms, terrainDepthUniforms, terrainCoordsUniforms} from './terrain_program';\nimport {projectionErrorMeasurementUniforms} from './projection_error_measurement_program';\nimport {atmosphereUniforms} from './atmosphere_program';\nimport {skyUniforms} from './sky_program';\n\nconst emptyUniforms = (_: any, __: any): any => {};\n\nexport const programUniforms = {\n fillExtrusion: fillExtrusionUniforms,\n fillExtrusionPattern: fillExtrusionPatternUniforms,\n fill: fillUniforms,\n fillPattern: fillPatternUniforms,\n fillOutline: fillOutlineUniforms,\n fillOutlinePattern: fillOutlinePatternUniforms,\n circle: circleUniforms,\n collisionBox: collisionUniforms,\n collisionCircle: collisionCircleUniforms,\n debug: debugUniforms,\n depth: emptyUniforms,\n clippingMask: emptyUniforms,\n heatmap: heatmapUniforms,\n heatmapTexture: heatmapTextureUniforms,\n hillshade: hillshadeUniforms,\n hillshadePrepare: hillshadePrepareUniforms,\n colorRelief: colorReliefUniforms,\n line: lineUniforms,\n lineGradient: lineGradientUniforms,\n linePattern: linePatternUniforms,\n lineSDF: lineSDFUniforms,\n lineGradientSDF: lineGradientSDFUniforms,\n raster: rasterUniforms,\n symbolIcon: symbolIconUniforms,\n symbolSDF: symbolSDFUniforms,\n symbolTextAndIcon: symbolTextAndIconUniforms,\n background: backgroundUniforms,\n backgroundPattern: backgroundPatternUniforms,\n terrain: terrainUniforms,\n terrainDepth: terrainDepthUniforms,\n terrainCoords: terrainCoordsUniforms,\n projectionErrorMeasurement: projectionErrorMeasurementUniforms,\n atmosphere: atmosphereUniforms,\n sky: skyUniforms\n};\n","import type {Context} from '../../gl/context';\nimport {type UniformValues, type UniformLocations, Uniform1f, Uniform3f, UniformMatrix4f} from '../uniform_binding';\nimport {type mat4, type vec3} from 'gl-matrix';\n\nexport type atmosphereUniformsType = {\n 'u_sun_pos': Uniform3f;\n 'u_atmosphere_blend': Uniform1f;\n 'u_globe_position': Uniform3f;\n 'u_globe_radius': Uniform1f;\n 'u_inv_proj_matrix': UniformMatrix4f;\n};\n\nconst atmosphereUniforms = (context: Context, locations: UniformLocations): atmosphereUniformsType => ({\n 'u_sun_pos': new Uniform3f(context, locations.u_sun_pos),\n 'u_atmosphere_blend': new Uniform1f(context, locations.u_atmosphere_blend),\n 'u_globe_position': new Uniform3f(context, locations.u_globe_position),\n 'u_globe_radius': new Uniform1f(context, locations.u_globe_radius),\n 'u_inv_proj_matrix': new UniformMatrix4f(context, locations.u_inv_proj_matrix),\n});\n\nconst atmosphereUniformValues = (\n sunPos: vec3,\n atmosphereBlend: number,\n globePosition: vec3,\n globeRadius: number,\n invProjMatrix: mat4,\n): UniformValues => ({\n 'u_sun_pos': sunPos,\n 'u_atmosphere_blend': atmosphereBlend,\n 'u_globe_position': globePosition,\n 'u_globe_radius': globeRadius,\n 'u_inv_proj_matrix': invProjMatrix,\n});\n\nexport {atmosphereUniforms, atmosphereUniformValues};\n","import {UniformColor, Uniform1f, Uniform2f} from '../uniform_binding';\nimport type {Context} from '../../gl/context';\nimport type {UniformValues, UniformLocations} from '../uniform_binding';\nimport {type IReadonlyTransform} from '../../geo/transform_interface';\nimport {type Sky} from '../../style/sky';\nimport {getMercatorHorizon} from '../../geo/projection/mercator_utils';\n\nexport type SkyUniformsType = {\n 'u_sky_color': UniformColor;\n 'u_horizon_color': UniformColor;\n 'u_horizon': Uniform2f;\n 'u_horizon_normal': Uniform2f;\n 'u_sky_horizon_blend': Uniform1f;\n 'u_sky_blend': Uniform1f;\n};\n\nconst skyUniforms = (context: Context, locations: UniformLocations): SkyUniformsType => ({\n 'u_sky_color': new UniformColor(context, locations.u_sky_color),\n 'u_horizon_color': new UniformColor(context, locations.u_horizon_color),\n 'u_horizon': new Uniform2f(context, locations.u_horizon),\n 'u_horizon_normal': new Uniform2f(context, locations.u_horizon_normal),\n 'u_sky_horizon_blend': new Uniform1f(context, locations.u_sky_horizon_blend),\n 'u_sky_blend': new Uniform1f(context, locations.u_sky_blend),\n});\n\nconst skyUniformValues = (sky: Sky, transform: IReadonlyTransform, pixelRatio: number): UniformValues => {\n const cosRoll = Math.cos(transform.rollInRadians);\n const sinRoll = Math.sin(transform.rollInRadians);\n const mercatorHorizon = getMercatorHorizon(transform);\n const projectionData = transform.getProjectionData({overscaledTileID: null, applyGlobeMatrix: true, applyTerrainMatrix: true});\n const skyBlend = projectionData.projectionTransition;\n return {\n 'u_sky_color': sky.properties.get('sky-color'),\n 'u_horizon_color': sky.properties.get('horizon-color'),\n 'u_horizon': [(transform.width / 2 - mercatorHorizon * sinRoll) * pixelRatio,\n (transform.height / 2 + mercatorHorizon * cosRoll) * pixelRatio],\n 'u_horizon_normal': [-sinRoll, cosRoll],\n 'u_sky_horizon_blend': (sky.properties.get('sky-horizon-blend') * transform.height / 2) * pixelRatio,\n 'u_sky_blend': skyBlend,\n };\n};\n\nexport {skyUniforms, skyUniformValues};\n","\nimport type {StructArray} from '../util/struct_array';\nimport type {TriangleIndexArray, LineIndexArray, LineStripIndexArray} from '../data/index_array_type';\nimport type {Context} from '../gl/context';\n\n/**\n * @internal\n * an index buffer class\n */\nexport class IndexBuffer {\n context: Context;\n buffer: WebGLBuffer;\n dynamicDraw: boolean;\n\n constructor(context: Context, array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean) {\n this.context = context;\n const gl = context.gl;\n this.buffer = gl.createBuffer();\n this.dynamicDraw = Boolean(dynamicDraw);\n\n // The bound index buffer is part of vertex array object state. We don't want to\n // modify whatever VAO happens to be currently bound, so make sure the default\n // vertex array provided by the context is bound instead.\n this.context.unbindVAO();\n\n context.bindElementBuffer.set(this.buffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, array.arrayBuffer, this.dynamicDraw ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW);\n\n if (!this.dynamicDraw) {\n delete array.arrayBuffer;\n }\n }\n\n bind() {\n this.context.bindElementBuffer.set(this.buffer);\n }\n\n updateData(array: StructArray) {\n const gl = this.context.gl;\n if (!this.dynamicDraw) throw new Error('Attempted to update data while not in dynamic mode.');\n // The right VAO will get this buffer re-bound later in VertexArrayObject.bind\n // See https://github.com/mapbox/mapbox-gl-js/issues/5620\n this.context.unbindVAO();\n this.bind();\n gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, array.arrayBuffer);\n }\n\n destroy() {\n const gl = this.context.gl;\n if (this.buffer) {\n gl.deleteBuffer(this.buffer);\n delete this.buffer;\n }\n }\n}\n","\nimport type {\n StructArray,\n StructArrayMember\n} from '../util/struct_array';\n\nimport type {Program} from '../render/program';\nimport type {Context} from '../gl/context';\n\n/**\n * An Enum for AttributeType\n */\nconst AttributeType = {\n Int8: 'BYTE',\n Uint8: 'UNSIGNED_BYTE',\n Int16: 'SHORT',\n Uint16: 'UNSIGNED_SHORT',\n Int32: 'INT',\n Uint32: 'UNSIGNED_INT',\n Float32: 'FLOAT'\n};\n\n/**\n * @internal\n * The `VertexBuffer` class turns a `StructArray` into a WebGL buffer. Each member of the StructArray's\n * Struct type is converted to a WebGL attribute.\n */\nexport class VertexBuffer {\n length: number;\n attributes: ReadonlyArray;\n itemSize: number;\n dynamicDraw: boolean;\n context: Context;\n buffer: WebGLBuffer;\n\n /**\n * @param dynamicDraw - Whether this buffer will be repeatedly updated.\n */\n constructor(context: Context, array: StructArray, attributes: ReadonlyArray, dynamicDraw?: boolean) {\n this.length = array.length;\n this.attributes = attributes;\n this.itemSize = array.bytesPerElement;\n this.dynamicDraw = dynamicDraw;\n\n this.context = context;\n const gl = context.gl;\n this.buffer = gl.createBuffer();\n context.bindVertexBuffer.set(this.buffer);\n gl.bufferData(gl.ARRAY_BUFFER, array.arrayBuffer, this.dynamicDraw ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW);\n\n if (!this.dynamicDraw) {\n delete array.arrayBuffer;\n }\n }\n\n bind() {\n this.context.bindVertexBuffer.set(this.buffer);\n }\n\n updateData(array: StructArray) {\n if (array.length !== this.length) throw new Error(`Length of new data is ${array.length}, which doesn't match current length of ${this.length}`);\n const gl = this.context.gl;\n this.bind();\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, array.arrayBuffer);\n }\n\n enableAttributes(gl: WebGLRenderingContext|WebGL2RenderingContext, program: Program) {\n for (let j = 0; j < this.attributes.length; j++) {\n const member = this.attributes[j];\n const attribIndex: number | void = program.attributes[member.name];\n if (attribIndex !== undefined) {\n gl.enableVertexAttribArray(attribIndex);\n }\n }\n }\n\n /**\n * Set the attribute pointers in a WebGL context\n * @param gl - The WebGL context\n * @param program - The active WebGL program\n * @param vertexOffset - Index of the starting vertex of the segment\n */\n setVertexAttribPointers(gl: WebGLRenderingContext|WebGL2RenderingContext, program: Program, vertexOffset?: number | null) {\n for (let j = 0; j < this.attributes.length; j++) {\n const member = this.attributes[j];\n const attribIndex: number | void = program.attributes[member.name];\n\n if (attribIndex !== undefined) {\n gl.vertexAttribPointer(\n attribIndex,\n member.components,\n gl[AttributeType[member.type]],\n false,\n this.itemSize,\n member.offset + (this.itemSize * (vertexOffset || 0))\n );\n }\n }\n }\n\n /**\n * Destroy the GL buffer bound to the given WebGL context\n */\n destroy() {\n const gl = this.context.gl;\n if (this.buffer) {\n gl.deleteBuffer(this.buffer);\n delete this.buffer;\n }\n }\n}\n","import {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {isWebGL2} from './webgl2';\n\nimport type {Context} from './context';\nimport type {\n BlendFuncType,\n BlendEquationType,\n ColorMaskType,\n DepthRangeType,\n DepthMaskType,\n StencilFuncType,\n StencilOpType,\n DepthFuncType,\n TextureUnitType,\n ViewportType,\n CullFaceModeType,\n FrontFaceType,\n} from './types';\n\nexport interface IValue {\n current: T;\n default: T;\n dirty: boolean;\n get(): T;\n setDefault(): void;\n set(value: T): void;\n}\n\nclass BaseValue implements IValue {\n gl: WebGLRenderingContext|WebGL2RenderingContext;\n current: T;\n default: T;\n dirty: boolean;\n\n constructor(context: Context) {\n this.gl = context.gl;\n this.default = this.getDefault();\n this.current = this.default;\n this.dirty = false;\n }\n\n get(): T {\n return this.current;\n }\n set(value: T) { // eslint-disable-line\n // overridden in child classes;\n }\n\n getDefault(): T {\n return this.default; // overridden in child classes\n }\n setDefault() {\n this.set(this.default);\n }\n}\n\nexport class ClearColor extends BaseValue {\n getDefault(): Color {\n return Color.transparent;\n }\n set(v: Color) {\n const c = this.current;\n if (v.r === c.r && v.g === c.g && v.b === c.b && v.a === c.a && !this.dirty) return;\n this.gl.clearColor(v.r, v.g, v.b, v.a);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class ClearDepth extends BaseValue {\n getDefault(): number {\n return 1;\n }\n set(v: number) {\n if (v === this.current && !this.dirty) return;\n this.gl.clearDepth(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class ClearStencil extends BaseValue {\n getDefault(): number {\n return 0;\n }\n set(v: number) {\n if (v === this.current && !this.dirty) return;\n this.gl.clearStencil(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class ColorMask extends BaseValue {\n getDefault(): ColorMaskType {\n return [true, true, true, true];\n }\n set(v: ColorMaskType) {\n const c = this.current;\n if (v[0] === c[0] && v[1] === c[1] && v[2] === c[2] && v[3] === c[3] && !this.dirty) return;\n this.gl.colorMask(v[0], v[1], v[2], v[3]);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthMask extends BaseValue {\n getDefault(): DepthMaskType {\n return true;\n }\n set(v: DepthMaskType): void {\n if (v === this.current && !this.dirty) return;\n this.gl.depthMask(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class StencilMask extends BaseValue {\n getDefault(): number {\n return 0xFF;\n }\n set(v: number): void {\n if (v === this.current && !this.dirty) return;\n this.gl.stencilMask(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class StencilFunc extends BaseValue {\n getDefault(): StencilFuncType {\n return {\n func: this.gl.ALWAYS,\n ref: 0,\n mask: 0xFF\n };\n }\n set(v: StencilFuncType): void {\n const c = this.current;\n if (v.func === c.func && v.ref === c.ref && v.mask === c.mask && !this.dirty) return;\n this.gl.stencilFunc(v.func, v.ref, v.mask);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class StencilOp extends BaseValue {\n getDefault(): StencilOpType {\n const gl = this.gl;\n return [gl.KEEP, gl.KEEP, gl.KEEP];\n }\n set(v: StencilOpType) {\n const c = this.current;\n if (v[0] === c[0] && v[1] === c[1] && v[2] === c[2] && !this.dirty) return;\n this.gl.stencilOp(v[0], v[1], v[2]);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class StencilTest extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n if (v) {\n gl.enable(gl.STENCIL_TEST);\n } else {\n gl.disable(gl.STENCIL_TEST);\n }\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthRange extends BaseValue {\n getDefault(): DepthRangeType {\n return [0, 1];\n }\n set(v: DepthRangeType) {\n const c = this.current;\n if (v[0] === c[0] && v[1] === c[1] && !this.dirty) return;\n this.gl.depthRange(v[0], v[1]);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthTest extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n if (v) {\n gl.enable(gl.DEPTH_TEST);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthFunc extends BaseValue {\n getDefault(): DepthFuncType {\n return this.gl.LESS;\n }\n set(v: DepthFuncType) {\n if (v === this.current && !this.dirty) return;\n this.gl.depthFunc(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class Blend extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n if (v) {\n gl.enable(gl.BLEND);\n } else {\n gl.disable(gl.BLEND);\n }\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BlendFunc extends BaseValue {\n getDefault(): BlendFuncType {\n const gl = this.gl;\n return [gl.ONE, gl.ZERO];\n }\n set(v: BlendFuncType) {\n const c = this.current;\n if (v[0] === c[0] && v[1] === c[1] && !this.dirty) return;\n this.gl.blendFunc(v[0], v[1]);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BlendColor extends BaseValue {\n getDefault(): Color {\n return Color.transparent;\n }\n set(v: Color) {\n const c = this.current;\n if (v.r === c.r && v.g === c.g && v.b === c.b && v.a === c.a && !this.dirty) return;\n this.gl.blendColor(v.r, v.g, v.b, v.a);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BlendEquation extends BaseValue {\n getDefault(): BlendEquationType {\n return this.gl.FUNC_ADD;\n }\n set(v: BlendEquationType) {\n if (v === this.current && !this.dirty) return;\n this.gl.blendEquation(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class CullFace extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n if (v) {\n gl.enable(gl.CULL_FACE);\n } else {\n gl.disable(gl.CULL_FACE);\n }\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class CullFaceSide extends BaseValue {\n getDefault(): CullFaceModeType {\n return this.gl.BACK;\n }\n set(v: CullFaceModeType) {\n if (v === this.current && !this.dirty) return;\n this.gl.cullFace(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class FrontFace extends BaseValue {\n getDefault(): FrontFaceType {\n return this.gl.CCW;\n }\n set(v: FrontFaceType) {\n if (v === this.current && !this.dirty) return;\n this.gl.frontFace(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class ProgramValue extends BaseValue {\n getDefault(): WebGLProgram {\n return null;\n }\n set(v?: WebGLProgram | null) {\n if (v === this.current && !this.dirty) return;\n this.gl.useProgram(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class ActiveTextureUnit extends BaseValue {\n getDefault(): TextureUnitType {\n return this.gl.TEXTURE0;\n }\n set(v: TextureUnitType) {\n if (v === this.current && !this.dirty) return;\n this.gl.activeTexture(v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class Viewport extends BaseValue {\n getDefault(): ViewportType {\n const gl = this.gl;\n return [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight];\n }\n set(v: ViewportType) {\n const c = this.current;\n if (v[0] === c[0] && v[1] === c[1] && v[2] === c[2] && v[3] === c[3] && !this.dirty) return;\n this.gl.viewport(v[0], v[1], v[2], v[3]);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindFramebuffer extends BaseValue {\n getDefault(): WebGLFramebuffer {\n return null;\n }\n set(v?: WebGLFramebuffer | null) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.bindFramebuffer(gl.FRAMEBUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindRenderbuffer extends BaseValue {\n getDefault(): WebGLRenderbuffer {\n return null;\n }\n set(v?: WebGLRenderbuffer | null) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.bindRenderbuffer(gl.RENDERBUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindTexture extends BaseValue {\n getDefault(): WebGLTexture {\n return null;\n }\n set(v?: WebGLTexture | null) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.bindTexture(gl.TEXTURE_2D, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindVertexBuffer extends BaseValue {\n getDefault(): WebGLBuffer {\n return null;\n }\n set(v?: WebGLBuffer | null) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindElementBuffer extends BaseValue {\n getDefault(): WebGLBuffer {\n return null;\n }\n set(v?: WebGLBuffer | null) {\n // Always rebind\n const gl = this.gl;\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class BindVertexArray extends BaseValue {\n getDefault(): WebGLVertexArrayObject | null {\n return null;\n }\n set(v: WebGLVertexArrayObject | null) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n\n if (isWebGL2(gl)) {\n gl.bindVertexArray(v);\n } else {\n gl.getExtension('OES_vertex_array_object')?.bindVertexArrayOES(v);\n }\n\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class PixelStoreUnpack extends BaseValue {\n getDefault(): number {\n return 4;\n }\n set(v: number) {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class PixelStoreUnpackPremultiplyAlpha extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean): void {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, ((v as any)));\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class PixelStoreUnpackFlipY extends BaseValue {\n getDefault(): boolean {\n return false;\n }\n set(v: boolean): void {\n if (v === this.current && !this.dirty) return;\n const gl = this.gl;\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, ((v as any)));\n this.current = v;\n this.dirty = false;\n }\n}\n\nclass FramebufferAttachment extends BaseValue {\n parent: WebGLFramebuffer;\n context: Context;\n\n constructor(context: Context, parent: WebGLFramebuffer) {\n super(context);\n this.context = context;\n this.parent = parent;\n }\n getDefault() {\n return null;\n }\n}\n\nexport class ColorAttachment extends FramebufferAttachment {\n setDirty() {\n this.dirty = true;\n }\n set(v?: WebGLTexture | null): void {\n if (v === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n // note: it's possible to attach a renderbuffer to the color\n // attachment point, but thus far MBGL only uses textures for color\n const gl = this.gl;\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, v, 0);\n\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthAttachment extends FramebufferAttachment {\n set(v?: WebGLRenderbuffer | null): void {\n if (v === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n // note: it's possible to attach a texture to the depth attachment\n // point, but thus far MBGL only uses renderbuffers for depth\n const gl = this.gl;\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n\nexport class DepthStencilAttachment extends FramebufferAttachment {\n set(v?: WebGLRenderbuffer | null): void {\n if (v === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n // note: it's possible to attach a texture to the depth attachment\n // point, but thus far MBGL only uses renderbuffers for depth\n const gl = this.gl;\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, v);\n this.current = v;\n this.dirty = false;\n }\n}\n","/**\n * Error message to use when framebuffer is incomplete\n */\nexport const FRAMEBUFFER_NOT_COMPLETE_ERROR = 'Framebuffer is not complete';\n\n/**\n * Check if an error is a framebuffer not complete error\n * @param error - An error object\n * @returns - true if the error is a framebuffer not complete error\n */\nexport function isFramebufferNotCompleteError(error: Error): boolean {\n return error.message === FRAMEBUFFER_NOT_COMPLETE_ERROR;\n}\n\n/**\n * Use this when you need to create a framebuffer not complete error.\n * @returns An error object with the message \"Framebuffer is not complete\"\n */\nexport function createFramebufferNotCompleteError(): Error {\n return new Error(FRAMEBUFFER_NOT_COMPLETE_ERROR);\n}\n","import {ColorAttachment, DepthAttachment, DepthStencilAttachment} from './value';\n\nimport type {Context} from './context';\nimport {createFramebufferNotCompleteError} from '../util/framebuffer_error';\n\n/**\n * @internal\n * A framebuffer holder object\n */\nexport class Framebuffer {\n context: Context;\n width: number;\n height: number;\n framebuffer: WebGLFramebuffer;\n colorAttachment: ColorAttachment;\n depthAttachment: DepthAttachment;\n\n constructor(context: Context, width: number, height: number, hasDepth: boolean, hasStencil: boolean) {\n this.context = context;\n this.width = width;\n this.height = height;\n const gl = context.gl;\n const fbo = this.framebuffer = gl.createFramebuffer();\n\n this.colorAttachment = new ColorAttachment(context, fbo);\n if (hasDepth) {\n this.depthAttachment = hasStencil ? new DepthStencilAttachment(context, fbo) : new DepthAttachment(context, fbo);\n } else if (hasStencil) {\n throw new Error('Stencil cannot be set without depth');\n }\n if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) !== gl.FRAMEBUFFER_COMPLETE) {\n throw createFramebufferNotCompleteError();\n }\n }\n\n destroy() {\n const gl = this.context.gl;\n\n const texture = this.colorAttachment.get();\n if (texture) gl.deleteTexture(texture);\n\n if (this.depthAttachment) {\n const renderbuffer = this.depthAttachment.get();\n if (renderbuffer) gl.deleteRenderbuffer(renderbuffer);\n }\n\n gl.deleteFramebuffer(this.framebuffer);\n }\n}\n","import {IndexBuffer} from './index_buffer';\n\nimport {VertexBuffer} from './vertex_buffer';\nimport {Framebuffer} from './framebuffer';\nimport {type DepthMode} from './depth_mode';\nimport {type StencilMode} from './stencil_mode';\nimport {ColorMode} from './color_mode';\nimport {type CullFaceMode} from './cull_face_mode';\nimport {deepEqual} from '../util/util';\nimport {ClearColor, ClearDepth, ClearStencil, ColorMask, DepthMask, StencilMask, StencilFunc, StencilOp, StencilTest, DepthRange, DepthTest, DepthFunc, Blend, BlendFunc, BlendColor, BlendEquation, CullFace, CullFaceSide, FrontFace, ProgramValue, ActiveTextureUnit, Viewport, BindFramebuffer, BindRenderbuffer, BindTexture, BindVertexBuffer, BindElementBuffer, BindVertexArray, PixelStoreUnpack, PixelStoreUnpackPremultiplyAlpha, PixelStoreUnpackFlipY} from './value';\n\nimport type {TriangleIndexArray, LineIndexArray, LineStripIndexArray} from '../data/index_array_type';\nimport type {\n StructArray,\n StructArrayMember\n} from '../util/struct_array';\nimport type {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {isWebGL2} from './webgl2';\n\ntype ClearArgs = {\n color?: Color;\n depth?: number;\n stencil?: number;\n};\n\n/**\n * @internal\n * A webgl wrapper class to allow injection, mocking and abstaction\n */\nexport class Context {\n gl: WebGLRenderingContext | WebGL2RenderingContext;\n\n currentNumAttributes: number;\n maxTextureSize: number;\n\n clearColor: ClearColor;\n clearDepth: ClearDepth;\n clearStencil: ClearStencil;\n colorMask: ColorMask;\n depthMask: DepthMask;\n stencilMask: StencilMask;\n stencilFunc: StencilFunc;\n stencilOp: StencilOp;\n stencilTest: StencilTest;\n depthRange: DepthRange;\n depthTest: DepthTest;\n depthFunc: DepthFunc;\n blend: Blend;\n blendFunc: BlendFunc;\n blendColor: BlendColor;\n blendEquation: BlendEquation;\n cullFace: CullFace;\n cullFaceSide: CullFaceSide;\n frontFace: FrontFace;\n program: ProgramValue;\n activeTexture: ActiveTextureUnit;\n viewport: Viewport;\n bindFramebuffer: BindFramebuffer;\n bindRenderbuffer: BindRenderbuffer;\n bindTexture: BindTexture;\n bindVertexBuffer: BindVertexBuffer;\n bindElementBuffer: BindElementBuffer;\n bindVertexArray: BindVertexArray;\n pixelStoreUnpack: PixelStoreUnpack;\n pixelStoreUnpackPremultiplyAlpha: PixelStoreUnpackPremultiplyAlpha;\n pixelStoreUnpackFlipY: PixelStoreUnpackFlipY;\n\n extTextureFilterAnisotropic: EXT_texture_filter_anisotropic | null;\n extTextureFilterAnisotropicMax?: GLfloat;\n HALF_FLOAT?: GLenum;\n RGBA16F?: GLenum;\n RGB16F?: GLenum;\n\n constructor(gl: WebGLRenderingContext | WebGL2RenderingContext) {\n this.gl = gl;\n this.clearColor = new ClearColor(this);\n this.clearDepth = new ClearDepth(this);\n this.clearStencil = new ClearStencil(this);\n this.colorMask = new ColorMask(this);\n this.depthMask = new DepthMask(this);\n this.stencilMask = new StencilMask(this);\n this.stencilFunc = new StencilFunc(this);\n this.stencilOp = new StencilOp(this);\n this.stencilTest = new StencilTest(this);\n this.depthRange = new DepthRange(this);\n this.depthTest = new DepthTest(this);\n this.depthFunc = new DepthFunc(this);\n this.blend = new Blend(this);\n this.blendFunc = new BlendFunc(this);\n this.blendColor = new BlendColor(this);\n this.blendEquation = new BlendEquation(this);\n this.cullFace = new CullFace(this);\n this.cullFaceSide = new CullFaceSide(this);\n this.frontFace = new FrontFace(this);\n this.program = new ProgramValue(this);\n this.activeTexture = new ActiveTextureUnit(this);\n this.viewport = new Viewport(this);\n this.bindFramebuffer = new BindFramebuffer(this);\n this.bindRenderbuffer = new BindRenderbuffer(this);\n this.bindTexture = new BindTexture(this);\n this.bindVertexBuffer = new BindVertexBuffer(this);\n this.bindElementBuffer = new BindElementBuffer(this);\n this.bindVertexArray = new BindVertexArray(this);\n this.pixelStoreUnpack = new PixelStoreUnpack(this);\n this.pixelStoreUnpackPremultiplyAlpha = new PixelStoreUnpackPremultiplyAlpha(this);\n this.pixelStoreUnpackFlipY = new PixelStoreUnpackFlipY(this);\n\n this.extTextureFilterAnisotropic = (\n gl.getExtension('EXT_texture_filter_anisotropic') ||\n gl.getExtension('MOZ_EXT_texture_filter_anisotropic') ||\n gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic')\n );\n\n if (this.extTextureFilterAnisotropic) {\n this.extTextureFilterAnisotropicMax = gl.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n }\n\n this.maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n\n if (isWebGL2(gl)) {\n this.HALF_FLOAT = gl.HALF_FLOAT;\n const extColorBufferHalfFloat = gl.getExtension('EXT_color_buffer_half_float');\n this.RGBA16F = gl.RGBA16F ?? extColorBufferHalfFloat?.RGBA16F_EXT;\n this.RGB16F = gl.RGB16F ?? extColorBufferHalfFloat?.RGB16F_EXT;\n gl.getExtension('EXT_color_buffer_float');\n } else {\n gl.getExtension('EXT_color_buffer_half_float');\n gl.getExtension('OES_texture_half_float_linear');\n const extTextureHalfFloat = gl.getExtension('OES_texture_half_float');\n this.HALF_FLOAT = extTextureHalfFloat?.HALF_FLOAT_OES;\n }\n }\n\n setDefault() {\n this.unbindVAO();\n\n this.clearColor.setDefault();\n this.clearDepth.setDefault();\n this.clearStencil.setDefault();\n this.colorMask.setDefault();\n this.depthMask.setDefault();\n this.stencilMask.setDefault();\n this.stencilFunc.setDefault();\n this.stencilOp.setDefault();\n this.stencilTest.setDefault();\n this.depthRange.setDefault();\n this.depthTest.setDefault();\n this.depthFunc.setDefault();\n this.blend.setDefault();\n this.blendFunc.setDefault();\n this.blendColor.setDefault();\n this.blendEquation.setDefault();\n this.cullFace.setDefault();\n this.cullFaceSide.setDefault();\n this.frontFace.setDefault();\n this.program.setDefault();\n this.activeTexture.setDefault();\n this.bindFramebuffer.setDefault();\n this.pixelStoreUnpack.setDefault();\n this.pixelStoreUnpackPremultiplyAlpha.setDefault();\n this.pixelStoreUnpackFlipY.setDefault();\n }\n\n setDirty() {\n this.clearColor.dirty = true;\n this.clearDepth.dirty = true;\n this.clearStencil.dirty = true;\n this.colorMask.dirty = true;\n this.depthMask.dirty = true;\n this.stencilMask.dirty = true;\n this.stencilFunc.dirty = true;\n this.stencilOp.dirty = true;\n this.stencilTest.dirty = true;\n this.depthRange.dirty = true;\n this.depthTest.dirty = true;\n this.depthFunc.dirty = true;\n this.blend.dirty = true;\n this.blendFunc.dirty = true;\n this.blendColor.dirty = true;\n this.blendEquation.dirty = true;\n this.cullFace.dirty = true;\n this.cullFaceSide.dirty = true;\n this.frontFace.dirty = true;\n this.program.dirty = true;\n this.activeTexture.dirty = true;\n this.viewport.dirty = true;\n this.bindFramebuffer.dirty = true;\n this.bindRenderbuffer.dirty = true;\n this.bindTexture.dirty = true;\n this.bindVertexBuffer.dirty = true;\n this.bindElementBuffer.dirty = true;\n this.bindVertexArray.dirty = true;\n this.pixelStoreUnpack.dirty = true;\n this.pixelStoreUnpackPremultiplyAlpha.dirty = true;\n this.pixelStoreUnpackFlipY.dirty = true;\n }\n\n createIndexBuffer(array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean) {\n return new IndexBuffer(this, array, dynamicDraw);\n }\n\n createVertexBuffer(array: StructArray, attributes: ReadonlyArray, dynamicDraw?: boolean) {\n return new VertexBuffer(this, array, attributes, dynamicDraw);\n }\n\n createRenderbuffer(storageFormat: number, width: number, height: number) {\n const gl = this.gl;\n\n const rbo = gl.createRenderbuffer();\n this.bindRenderbuffer.set(rbo);\n gl.renderbufferStorage(gl.RENDERBUFFER, storageFormat, width, height);\n this.bindRenderbuffer.set(null);\n\n return rbo;\n }\n\n createFramebuffer(width: number, height: number, hasDepth: boolean, hasStencil: boolean) {\n return new Framebuffer(this, width, height, hasDepth, hasStencil);\n }\n\n clear({\n color,\n depth,\n stencil\n }: ClearArgs) {\n const gl = this.gl;\n let mask = 0;\n\n if (color) {\n mask |= gl.COLOR_BUFFER_BIT;\n this.clearColor.set(color);\n this.colorMask.set([true, true, true, true]);\n }\n\n if (typeof depth !== 'undefined') {\n mask |= gl.DEPTH_BUFFER_BIT;\n\n // Workaround for platforms where clearDepth doesn't seem to work\n // without resetting the depthRange. See https://github.com/mapbox/mapbox-gl-js/issues/3437\n this.depthRange.set([0, 1]);\n\n this.clearDepth.set(depth);\n this.depthMask.set(true);\n }\n\n if (typeof stencil !== 'undefined') {\n mask |= gl.STENCIL_BUFFER_BIT;\n this.clearStencil.set(stencil);\n this.stencilMask.set(0xFF);\n }\n\n gl.clear(mask);\n }\n\n setCullFace(cullFaceMode: Readonly) {\n if (cullFaceMode.enable === false) {\n this.cullFace.set(false);\n } else {\n this.cullFace.set(true);\n this.cullFaceSide.set(cullFaceMode.mode);\n this.frontFace.set(cullFaceMode.frontFace);\n }\n }\n\n setDepthMode(depthMode: Readonly) {\n if (depthMode.func === this.gl.ALWAYS && !depthMode.mask) {\n this.depthTest.set(false);\n } else {\n this.depthTest.set(true);\n this.depthFunc.set(depthMode.func);\n this.depthMask.set(depthMode.mask);\n this.depthRange.set(depthMode.range);\n }\n }\n\n setStencilMode(stencilMode: Readonly) {\n if (stencilMode.test.func === this.gl.ALWAYS && !stencilMode.mask) {\n this.stencilTest.set(false);\n } else {\n this.stencilTest.set(true);\n this.stencilMask.set(stencilMode.mask);\n this.stencilOp.set([stencilMode.fail, stencilMode.depthFail, stencilMode.pass]);\n this.stencilFunc.set({\n func: stencilMode.test.func,\n ref: stencilMode.ref,\n mask: stencilMode.test.mask\n });\n }\n }\n\n setColorMode(colorMode: Readonly) {\n if (deepEqual(colorMode.blendFunction, ColorMode.Replace)) {\n this.blend.set(false);\n } else {\n this.blend.set(true);\n this.blendFunc.set(colorMode.blendFunction);\n this.blendColor.set(colorMode.blendColor);\n }\n\n this.colorMask.set(colorMode.mask);\n }\n\n createVertexArray(): WebGLVertexArrayObject | undefined {\n if (isWebGL2(this.gl))\n return this.gl.createVertexArray();\n return this.gl.getExtension('OES_vertex_array_object')?.createVertexArrayOES();\n }\n\n deleteVertexArray(x: WebGLVertexArrayObject | undefined) {\n if (isWebGL2(this.gl))\n return this.gl.deleteVertexArray(x);\n return this.gl.getExtension('OES_vertex_array_object')?.deleteVertexArrayOES(x);\n }\n\n unbindVAO() {\n // Unbinding the VAO prevents other things (custom layers, new buffer creation) from\n // unintentionally changing the state of the last VAO used.\n this.bindVertexArray.set(null);\n }\n}\n","import type {Painter} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {SymbolBucket} from '../data/bucket/symbol_bucket';\nimport {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {collisionUniformValues, collisionCircleUniformValues} from './program/collision_program';\nimport {QuadTriangleArray, CollisionCircleLayoutArray} from '../data/array_types.g';\nimport {collisionCircleLayout} from '../data/bucket/symbol_attributes';\nimport {SegmentVector} from '../data/segment';\nimport {type VertexBuffer} from '../gl/vertex_buffer';\nimport {type IndexBuffer} from '../gl/index_buffer';\n\ntype TileBatch = {\n circleArray: Array;\n circleOffset: number;\n coord: OverscaledTileID;\n};\n\nlet quadTriangles: QuadTriangleArray;\n\nexport function drawCollisionDebug(painter: Painter, tileManager: TileManager, layer: StyleLayer, coords: Array, isText: boolean) {\n const context = painter.context;\n const transform = painter.transform;\n const gl = context.gl;\n const program = painter.useProgram('collisionBox');\n const tileBatches: Array = [];\n let circleCount = 0;\n let circleOffset = 0;\n\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n const tile = tileManager.getTile(coord);\n const bucket: SymbolBucket = (tile.getBucket(layer) as any);\n if (!bucket) {\n continue;\n }\n const buffers = isText ? bucket.textCollisionBox : bucket.iconCollisionBox;\n // Get collision circle data of this bucket\n const circleArray: Array = bucket.collisionCircleArray;\n if (circleArray.length > 0) {\n tileBatches.push({\n circleArray,\n circleOffset,\n coord\n });\n\n circleCount += circleArray.length / 4; // 4 values per circle\n circleOffset = circleCount;\n }\n\n // Draw collision boxes\n if (!buffers) {\n continue;\n }\n\n program.draw(context, gl.LINES,\n DepthMode.disabled, StencilMode.disabled,\n painter.colorModeForRenderPass(),\n CullFaceMode.disabled,\n collisionUniformValues(painter.transform),\n painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord),\n transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: true, applyTerrainMatrix: true}),\n layer.id, buffers.layoutVertexBuffer, buffers.indexBuffer,\n buffers.segments, null, painter.transform.zoom, null, null,\n buffers.collisionVertexBuffer);\n }\n\n if (!isText || !tileBatches.length) {\n return;\n }\n\n // Render collision circles\n const circleProgram = painter.useProgram('collisionCircle');\n\n // Construct vertex data\n const vertexData = new CollisionCircleLayoutArray();\n vertexData.resize(circleCount * 4);\n vertexData._trim();\n\n let vertexOffset = 0;\n\n for (const batch of tileBatches) {\n for (let i = 0; i < batch.circleArray.length / 4; i++) {\n const circleIdx = i * 4;\n const x = batch.circleArray[circleIdx + 0];\n const y = batch.circleArray[circleIdx + 1];\n const radius = batch.circleArray[circleIdx + 2];\n const collision = batch.circleArray[circleIdx + 3];\n\n // 4 floats per vertex, 4 vertices per quad\n vertexData.emplace(vertexOffset++, x, y, radius, collision, 0);\n vertexData.emplace(vertexOffset++, x, y, radius, collision, 1);\n vertexData.emplace(vertexOffset++, x, y, radius, collision, 2);\n vertexData.emplace(vertexOffset++, x, y, radius, collision, 3);\n }\n }\n if (!quadTriangles || quadTriangles.length < circleCount * 2) {\n quadTriangles = createQuadTriangles(circleCount);\n }\n\n const indexBuffer: IndexBuffer = context.createIndexBuffer(quadTriangles, true);\n const vertexBuffer: VertexBuffer = context.createVertexBuffer(vertexData, collisionCircleLayout.members, true);\n\n // Render batches\n for (const batch of tileBatches) {\n const uniforms = collisionCircleUniformValues(painter.transform);\n\n circleProgram.draw(\n context,\n gl.TRIANGLES,\n DepthMode.disabled,\n StencilMode.disabled,\n painter.colorModeForRenderPass(),\n CullFaceMode.disabled,\n uniforms,\n painter.style.map.terrain && painter.style.map.terrain.getTerrainData(batch.coord),\n null,\n layer.id,\n vertexBuffer,\n indexBuffer,\n SegmentVector.simpleSegment(0, batch.circleOffset * 2, batch.circleArray.length, batch.circleArray.length / 2),\n null,\n painter.transform.zoom,\n null,\n null,\n null);\n }\n\n vertexBuffer.destroy();\n indexBuffer.destroy();\n}\n\nfunction createQuadTriangles(quadCount: number): QuadTriangleArray {\n const triCount = quadCount * 2;\n const array = new QuadTriangleArray();\n\n array.resize(triCount);\n array._trim();\n\n // Two triangles and 4 vertices per quad.\n for (let i = 0; i < triCount; i++) {\n const idx = i * 6;\n\n array.uint16[idx + 0] = i * 4 + 0;\n array.uint16[idx + 1] = i * 4 + 1;\n array.uint16[idx + 2] = i * 4 + 2;\n array.uint16[idx + 3] = i * 4 + 2;\n array.uint16[idx + 4] = i * 4 + 3;\n array.uint16[idx + 5] = i * 4 + 0;\n }\n\n return array;\n}\n","import Point from '@mapbox/point-geometry';\nimport {drawCollisionDebug} from './draw_collision_debug';\n\nimport {SegmentVector} from '../data/segment';\nimport {pixelsToTileUnits} from '../source/pixels_to_tile_units';\nimport {type EvaluatedZoomSize, evaluateSizeForFeature, evaluateSizeForZoom} from '../symbol/symbol_size';\nimport {mat4} from 'gl-matrix';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {addDynamicAttributes} from '../data/bucket/symbol_bucket';\n\nimport {getAnchorAlignment, WritingMode} from '../symbol/shaping';\nimport ONE_EM from '../symbol/one_em';\n\nimport {\n type SymbolIconUniformsType,\n symbolIconUniformValues,\n symbolSDFUniformValues,\n symbolTextAndIconUniformValues\n} from './program/symbol_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {SymbolStyleLayer} from '../style/style_layer/symbol_style_layer';\n\nimport type {Texture, TextureFilter} from '../render/texture';\nimport type {OverscaledTileID, UnwrappedTileID} from '../tile/tile_id';\nimport type {UniformValues} from './uniform_binding';\nimport type {SymbolSDFUniformsType} from '../render/program/symbol_program';\nimport type {CrossTileID, VariableOffset} from '../symbol/placement';\nimport type {SymbolBucket, SymbolBuffers} from '../data/bucket/symbol_bucket';\nimport type {TerrainData} from '../render/terrain';\nimport type {SymbolLayerSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {ColorMode} from '../gl/color_mode';\nimport type {Program} from './program';\nimport type {TextAnchor} from '../style/style_layer/variable_text_anchor';\nimport {getGlCoordMatrix, getPerspectiveRatio, getPitchedLabelPlaneMatrix, hideGlyphs, projectWithMatrix, projectTileCoordinatesToClipSpace, projectTileCoordinatesToLabelPlane, type SymbolProjectionContext, updateLineLabels} from '../symbol/projection';\nimport {translatePosition} from '../util/util';\nimport type {ProjectionData} from '../geo/projection/projection_data';\n\ntype SymbolTileRenderState = {\n segments: SegmentVector;\n sortKey: number;\n terrainData: TerrainData;\n state: {\n program: Program;\n buffers: SymbolBuffers;\n uniformValues: UniformValues;\n projectionData: ProjectionData;\n atlasTexture: Texture;\n atlasTextureIcon: Texture | null;\n atlasInterpolation: TextureFilter;\n atlasInterpolationIcon: TextureFilter;\n isSDF: boolean;\n hasHalo: boolean;\n };\n};\n\nconst identityMat4 = mat4.identity(new Float32Array(16));\n\nexport function drawSymbols(painter: Painter, tileManager: TileManager, layer: SymbolStyleLayer, coords: Array, variableOffsets: {\n [_ in CrossTileID]: VariableOffset;\n}, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'translucent') return;\n\n const {isRenderingToTexture} = renderOptions;\n // Disable the stencil test so that labels aren't clipped to tile boundaries.\n const stencilMode = StencilMode.disabled;\n const colorMode = painter.colorModeForRenderPass();\n const hasVariablePlacement = layer._unevaluatedLayout.hasValue('text-variable-anchor') || layer._unevaluatedLayout.hasValue('text-variable-anchor-offset');\n\n // Compute variable-offsets before painting since icons and text data positioning\n // depend on each other in this case.\n if (hasVariablePlacement) {\n updateVariableAnchors(coords, painter, layer, tileManager,\n layer.layout.get('text-rotation-alignment'),\n layer.layout.get('text-pitch-alignment'),\n layer.paint.get('text-translate'),\n layer.paint.get('text-translate-anchor'),\n variableOffsets\n );\n }\n\n if (layer.paint.get('icon-opacity').constantOr(1) !== 0) {\n drawLayerSymbols(painter, tileManager, layer, coords, false,\n layer.paint.get('icon-translate'),\n layer.paint.get('icon-translate-anchor'),\n layer.layout.get('icon-rotation-alignment'),\n layer.layout.get('icon-pitch-alignment'),\n layer.layout.get('icon-keep-upright'),\n stencilMode, colorMode, isRenderingToTexture\n );\n }\n\n if (layer.paint.get('text-opacity').constantOr(1) !== 0) {\n drawLayerSymbols(painter, tileManager, layer, coords, true,\n layer.paint.get('text-translate'),\n layer.paint.get('text-translate-anchor'),\n layer.layout.get('text-rotation-alignment'),\n layer.layout.get('text-pitch-alignment'),\n layer.layout.get('text-keep-upright'),\n stencilMode, colorMode, isRenderingToTexture\n );\n }\n\n if (tileManager.map.showCollisionBoxes) {\n drawCollisionDebug(painter, tileManager, layer, coords, true);\n drawCollisionDebug(painter, tileManager, layer, coords, false);\n }\n}\n\nfunction calculateVariableRenderShift(\n anchor: TextAnchor,\n width: number,\n height: number,\n textOffset: [number, number],\n textBoxScale: number,\n renderTextSize: number): Point {\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(anchor);\n const shiftX = -(horizontalAlign - 0.5) * width;\n const shiftY = -(verticalAlign - 0.5) * height;\n return new Point(\n (shiftX / textBoxScale + textOffset[0]) * renderTextSize,\n (shiftY / textBoxScale + textOffset[1]) * renderTextSize\n );\n}\n\nfunction updateVariableAnchors(coords: Array,\n painter: Painter,\n layer:SymbolStyleLayer, tileManager: TileManager,\n rotationAlignment: SymbolLayerSpecification['layout']['text-rotation-alignment'],\n pitchAlignment: SymbolLayerSpecification['layout']['text-pitch-alignment'],\n translate: [number, number],\n translateAnchor: 'map' | 'viewport',\n variableOffsets: {[_ in CrossTileID]: VariableOffset}) {\n const transform = painter.transform;\n const terrain = painter.style.map.terrain;\n const rotateWithMap = rotationAlignment === 'map';\n const pitchWithMap = pitchAlignment === 'map';\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n const bucket = tile.getBucket(layer) as SymbolBucket;\n if (!bucket || !bucket.text || !bucket.text.segments.get().length) continue;\n\n const sizeData = bucket.textSizeData;\n const size = evaluateSizeForZoom(sizeData, transform.zoom);\n\n const pixelToTileScale = pixelsToTileUnits(tile, 1, painter.transform.zoom);\n const pitchedLabelPlaneMatrix = getPitchedLabelPlaneMatrix(rotateWithMap, painter.transform, pixelToTileScale);\n const updateTextFitIcon = layer.layout.get('icon-text-fit') !== 'none' && bucket.hasIconData();\n\n if (size) {\n const tileScale = Math.pow(2, transform.zoom - tile.tileID.overscaledZ);\n const getElevation = terrain ? (x: number, y: number) => terrain.getElevation(coord, x, y) : null;\n const translation = translatePosition(transform, tile, translate, translateAnchor);\n updateVariableAnchorsForBucket(bucket, rotateWithMap, pitchWithMap, variableOffsets,\n transform, pitchedLabelPlaneMatrix, tileScale, size, updateTextFitIcon, translation, coord.toUnwrapped(), getElevation);\n }\n }\n}\n\nfunction getShiftedAnchor(projectedAnchorPoint: Point, projectionContext: SymbolProjectionContext, rotateWithMap, shift: Point, transformAngle: number, pitchedTextShiftCorrection: number) {\n // Usual case is that we take the projected anchor and add the pixel-based shift\n // calculated earlier. In the (somewhat weird) case of pitch-aligned text, we add an equivalent\n // tile-unit based shift to the anchor before projecting to the label plane.\n const translatedAnchor = projectionContext.tileAnchorPoint.add(new Point(projectionContext.translation[0], projectionContext.translation[1]));\n if (projectionContext.pitchWithMap) {\n let adjustedShift = shift.mult(pitchedTextShiftCorrection);\n if (!rotateWithMap) {\n adjustedShift = adjustedShift.rotate(-transformAngle);\n }\n const tileAnchorShifted = translatedAnchor.add(adjustedShift);\n return projectWithMatrix(tileAnchorShifted.x, tileAnchorShifted.y, projectionContext.pitchedLabelPlaneMatrix, projectionContext.getElevation).point;\n } else {\n if (rotateWithMap) {\n // Compute the angle with which to rotate the anchor, so that it is aligned with\n // the map's actual east-west axis. Very similar to what is done in the shader.\n // Note that the label plane must be screen pixels here.\n const projectedAnchorRight = projectTileCoordinatesToLabelPlane(projectionContext.tileAnchorPoint.x + 1, projectionContext.tileAnchorPoint.y, projectionContext);\n const east = projectedAnchorRight.point.sub(projectedAnchorPoint);\n const angle = Math.atan(east.y / east.x) + (east.x < 0 ? Math.PI : 0);\n return projectedAnchorPoint.add(shift.rotate(angle));\n } else {\n return projectedAnchorPoint.add(shift);\n }\n }\n}\n\nfunction updateVariableAnchorsForBucket(\n bucket: SymbolBucket,\n rotateWithMap: boolean,\n pitchWithMap: boolean,\n variableOffsets: {[_ in CrossTileID]: VariableOffset},\n transform: IReadonlyTransform,\n pitchedLabelPlaneMatrix: mat4,\n tileScale: number,\n size: EvaluatedZoomSize,\n updateTextFitIcon: boolean,\n translation: [number, number],\n unwrappedTileID: UnwrappedTileID,\n getElevation: (x: number, y: number) => number) {\n const placedSymbols = bucket.text.placedSymbolArray;\n const dynamicTextLayoutVertexArray = bucket.text.dynamicLayoutVertexArray;\n const dynamicIconLayoutVertexArray = bucket.icon.dynamicLayoutVertexArray;\n const placedTextShifts = {};\n\n dynamicTextLayoutVertexArray.clear();\n for (let s = 0; s < placedSymbols.length; s++) {\n const symbol = placedSymbols.get(s);\n const skipOrientation = bucket.allowVerticalPlacement && !symbol.placedOrientation;\n const variableOffset = (!symbol.hidden && symbol.crossTileID && !skipOrientation) ? variableOffsets[symbol.crossTileID] : null;\n\n if (!variableOffset) {\n // These symbols are from a justification that is not being used, or a label that wasn't placed\n // so we don't need to do the extra math to figure out what incremental shift to apply.\n hideGlyphs(symbol.numGlyphs, dynamicTextLayoutVertexArray);\n } else {\n const tileAnchor = new Point(symbol.anchorX, symbol.anchorY);\n const projectionContext: SymbolProjectionContext = {\n getElevation,\n width: transform.width,\n height: transform.height,\n pitchedLabelPlaneMatrix,\n lineVertexArray: null,\n pitchWithMap,\n transform,\n projectionCache: null,\n tileAnchorPoint: tileAnchor,\n translation,\n unwrappedTileID\n };\n const projectedAnchor = pitchWithMap ?\n projectTileCoordinatesToClipSpace(tileAnchor.x, tileAnchor.y, projectionContext) :\n projectTileCoordinatesToLabelPlane(tileAnchor.x, tileAnchor.y, projectionContext);\n const perspectiveRatio = getPerspectiveRatio(transform.cameraToCenterDistance, projectedAnchor.signedDistanceFromCamera);\n let renderTextSize = evaluateSizeForFeature(bucket.textSizeData, size, symbol) * perspectiveRatio / ONE_EM;\n if (pitchWithMap) {\n // Go from size in pixels to equivalent size in tile units\n renderTextSize *= bucket.tilePixelRatio / tileScale;\n }\n\n const {width, height, anchor, textOffset, textBoxScale} = variableOffset;\n const shift = calculateVariableRenderShift(anchor, width, height, textOffset, textBoxScale, renderTextSize);\n\n const pitchedTextCorrection = transform.getPitchedTextCorrection(tileAnchor.x + translation[0], tileAnchor.y + translation[1], unwrappedTileID);\n const shiftedAnchor = getShiftedAnchor(projectedAnchor.point, projectionContext, rotateWithMap, shift, -transform.bearingInRadians, pitchedTextCorrection);\n\n const angle = (bucket.allowVerticalPlacement && symbol.placedOrientation === WritingMode.vertical) ? Math.PI / 2 : 0;\n for (let g = 0; g < symbol.numGlyphs; g++) {\n addDynamicAttributes(dynamicTextLayoutVertexArray, shiftedAnchor, angle);\n }\n //Only offset horizontal text icons\n if (updateTextFitIcon && symbol.associatedIconIndex >= 0) {\n placedTextShifts[symbol.associatedIconIndex] = {shiftedAnchor, angle};\n }\n }\n }\n\n if (updateTextFitIcon) {\n dynamicIconLayoutVertexArray.clear();\n const placedIcons = bucket.icon.placedSymbolArray;\n for (let i = 0; i < placedIcons.length; i++) {\n const placedIcon = placedIcons.get(i);\n if (placedIcon.hidden) {\n hideGlyphs(placedIcon.numGlyphs, dynamicIconLayoutVertexArray);\n } else {\n const shift = placedTextShifts[i];\n if (!shift) {\n hideGlyphs(placedIcon.numGlyphs, dynamicIconLayoutVertexArray);\n } else {\n for (let g = 0; g < placedIcon.numGlyphs; g++) {\n addDynamicAttributes(dynamicIconLayoutVertexArray, shift.shiftedAnchor, shift.angle);\n }\n }\n }\n }\n bucket.icon.dynamicLayoutVertexBuffer.updateData(dynamicIconLayoutVertexArray);\n }\n bucket.text.dynamicLayoutVertexBuffer.updateData(dynamicTextLayoutVertexArray);\n}\n\nfunction getSymbolProgramName(isSDF: boolean, isText: boolean, bucket: SymbolBucket) {\n if (bucket.iconsInText && isText) {\n return 'symbolTextAndIcon';\n } else if (isSDF) {\n return 'symbolSDF';\n } else {\n return 'symbolIcon';\n }\n}\n\nfunction drawLayerSymbols(\n painter: Painter,\n tileManager: TileManager,\n layer: SymbolStyleLayer,\n coords: Array,\n isText: boolean,\n translate: [number, number],\n translateAnchor: 'map' | 'viewport',\n rotationAlignment: SymbolLayerSpecification['layout']['text-rotation-alignment'],\n pitchAlignment: SymbolLayerSpecification['layout']['text-pitch-alignment'],\n keepUpright: boolean,\n stencilMode: StencilMode,\n colorMode: Readonly, \n isRenderingToTexture: boolean) {\n\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n\n const rotateWithMap = rotationAlignment === 'map';\n const pitchWithMap = pitchAlignment === 'map';\n const alongLine = rotationAlignment !== 'viewport' && layer.layout.get('symbol-placement') !== 'point';\n // Line label rotation happens in `updateLineLabels`\n // Pitched point labels are automatically rotated by the pitchedLabelPlaneMatrix projection\n // Unpitched point labels need to have their rotation applied after projection\n const rotateInShader = rotateWithMap && !pitchWithMap && !alongLine;\n\n const hasSortKey = !layer.layout.get('symbol-sort-key').isConstant();\n let sortFeaturesByKey = false;\n\n const depthMode = painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n\n const hasVariablePlacement = layer._unevaluatedLayout.hasValue('text-variable-anchor') || layer._unevaluatedLayout.hasValue('text-variable-anchor-offset');\n\n const tileRenderState: Array = [];\n\n const pitchedTextRescaling = transform.getCircleRadiusCorrection();\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n const bucket = tile.getBucket(layer) as SymbolBucket;\n if (!bucket) continue;\n const buffers = isText ? bucket.text : bucket.icon;\n\n if (!buffers || !buffers.segments.get().length || !buffers.hasVisibleVertices) continue;\n const programConfiguration = buffers.programConfigurations.get(layer.id);\n\n const isSDF = isText || bucket.sdfIcons;\n\n const sizeData = isText ? bucket.textSizeData : bucket.iconSizeData;\n const transformed = pitchWithMap || transform.pitch !== 0;\n\n const program = painter.useProgram(getSymbolProgramName(isSDF, isText, bucket), programConfiguration);\n const size = evaluateSizeForZoom(sizeData, transform.zoom);\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n\n let texSize: [number, number];\n let texSizeIcon: [number, number] = [0, 0];\n let atlasTexture: Texture;\n let atlasInterpolation: TextureFilter;\n let atlasTextureIcon = null;\n let atlasInterpolationIcon: TextureFilter;\n if (isText) {\n atlasTexture = tile.glyphAtlasTexture;\n atlasInterpolation = gl.LINEAR;\n texSize = tile.glyphAtlasTexture.size;\n if (bucket.iconsInText) {\n texSizeIcon = tile.imageAtlasTexture.size;\n atlasTextureIcon = tile.imageAtlasTexture;\n const zoomDependentSize = sizeData.kind === 'composite' || sizeData.kind === 'camera';\n atlasInterpolationIcon = transformed || painter.options.rotating || painter.options.zooming || zoomDependentSize ? gl.LINEAR : gl.NEAREST;\n }\n } else {\n const iconScaled = layer.layout.get('icon-size').constantOr(0) !== 1 || bucket.iconsNeedLinear;\n atlasTexture = tile.imageAtlasTexture;\n atlasInterpolation = isSDF || painter.options.rotating || painter.options.zooming || iconScaled || transformed ?\n gl.LINEAR :\n gl.NEAREST;\n texSize = tile.imageAtlasTexture.size;\n }\n\n // See the comment at the beginning of src/symbol/projection.ts for an overview of the symbol projection process\n const s = pixelsToTileUnits(tile, 1, painter.transform.zoom);\n const pitchedLabelPlaneMatrix = getPitchedLabelPlaneMatrix(rotateWithMap, painter.transform, s);\n const pitchedLabelPlaneMatrixInverse = mat4.create();\n mat4.invert(pitchedLabelPlaneMatrixInverse, pitchedLabelPlaneMatrix);\n const glCoordMatrixForShader = getGlCoordMatrix(pitchWithMap, rotateWithMap, painter.transform, s);\n\n const translation = translatePosition(transform, tile, translate, translateAnchor);\n const projectionData = transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: !isRenderingToTexture, applyTerrainMatrix: true});\n\n const hasVariableAnchors = hasVariablePlacement && bucket.hasTextData();\n const updateTextFitIcon = layer.layout.get('icon-text-fit') !== 'none' &&\n hasVariableAnchors &&\n bucket.hasIconData();\n\n if (alongLine) {\n const getElevation = painter.style.map.terrain ? (x: number, y: number) => painter.style.map.terrain.getElevation(coord, x, y) : null;\n const rotateToLine = layer.layout.get('text-rotation-alignment') === 'map';\n updateLineLabels(bucket, painter, isText, pitchedLabelPlaneMatrix, pitchedLabelPlaneMatrixInverse, pitchWithMap, keepUpright, rotateToLine, coord.toUnwrapped(), transform.width, transform.height, translation, getElevation);\n }\n\n const shaderVariableAnchor = (isText && hasVariablePlacement) || updateTextFitIcon;\n\n // If the label plane matrix is used, it transforms either map-pitch-aligned pixels, or to screenspace pixels\n const combinedLabelPlaneMatrix = pitchWithMap ? pitchedLabelPlaneMatrix : painter.transform.clipSpaceToPixelsMatrix;\n // Label plane matrix is unused in the shader if variable anchors are used or the text is placed along a line\n const noLabelPlane = (alongLine || shaderVariableAnchor);\n const uLabelPlaneMatrix = noLabelPlane ? identityMat4 : combinedLabelPlaneMatrix;\n\n const hasHalo = isSDF && layer.paint.get(isText ? 'text-halo-width' : 'icon-halo-width').constantOr(1) !== 0;\n\n let uniformValues: UniformValues;\n if (isSDF) {\n if (!bucket.iconsInText) {\n uniformValues = symbolSDFUniformValues(sizeData.kind,\n size, rotateInShader, pitchWithMap, alongLine, shaderVariableAnchor, painter,\n uLabelPlaneMatrix, glCoordMatrixForShader, translation, isText, texSize, true, pitchedTextRescaling);\n } else {\n uniformValues = symbolTextAndIconUniformValues(sizeData.kind,\n size, rotateInShader, pitchWithMap, alongLine, shaderVariableAnchor, painter,\n uLabelPlaneMatrix, glCoordMatrixForShader, translation, texSize, texSizeIcon, pitchedTextRescaling);\n }\n } else {\n uniformValues = symbolIconUniformValues(sizeData.kind,\n size, rotateInShader, pitchWithMap, alongLine, shaderVariableAnchor, painter,\n uLabelPlaneMatrix, glCoordMatrixForShader, translation, isText, texSize, pitchedTextRescaling);\n }\n\n const state = {\n program,\n buffers,\n uniformValues,\n projectionData,\n atlasTexture,\n atlasTextureIcon,\n atlasInterpolation,\n atlasInterpolationIcon,\n isSDF,\n hasHalo\n };\n\n if (hasSortKey && bucket.canOverlap) {\n sortFeaturesByKey = true;\n const oldSegments = buffers.segments.get();\n for (const segment of oldSegments) {\n tileRenderState.push({\n segments: new SegmentVector([segment]),\n sortKey: segment.sortKey,\n state,\n terrainData\n });\n }\n } else {\n tileRenderState.push({\n segments: buffers.segments,\n sortKey: 0,\n state,\n terrainData\n });\n }\n }\n\n if (sortFeaturesByKey) {\n tileRenderState.sort((a, b) => a.sortKey - b.sortKey);\n }\n\n for (const segmentState of tileRenderState) {\n const state = segmentState.state;\n\n context.activeTexture.set(gl.TEXTURE0);\n state.atlasTexture.bind(state.atlasInterpolation, gl.CLAMP_TO_EDGE);\n if (state.atlasTextureIcon) {\n context.activeTexture.set(gl.TEXTURE1);\n if (state.atlasTextureIcon) {\n state.atlasTextureIcon.bind(state.atlasInterpolationIcon, gl.CLAMP_TO_EDGE);\n }\n }\n\n if (state.isSDF) {\n const uniformValues = state.uniformValues;\n if (state.hasHalo) {\n uniformValues['u_is_halo'] = 1;\n drawSymbolElements(state.buffers, segmentState.segments, layer, painter, state.program, depthMode, stencilMode, colorMode, uniformValues, state.projectionData, segmentState.terrainData);\n }\n uniformValues['u_is_halo'] = 0;\n }\n drawSymbolElements(state.buffers, segmentState.segments, layer, painter, state.program, depthMode, stencilMode, colorMode, state.uniformValues, state.projectionData, segmentState.terrainData);\n }\n}\n\nfunction drawSymbolElements(\n buffers: SymbolBuffers,\n segments: SegmentVector,\n layer: SymbolStyleLayer,\n painter: Painter,\n program: Program,\n depthMode: Readonly,\n stencilMode: StencilMode,\n colorMode: Readonly,\n uniformValues: UniformValues,\n projectionData: ProjectionData,\n terrainData: TerrainData) {\n const context = painter.context;\n const gl = context.gl;\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, colorMode, CullFaceMode.backCCW,\n uniformValues, terrainData, projectionData, layer.id, buffers.layoutVertexBuffer,\n buffers.indexBuffer, segments, layer.paint,\n painter.transform.zoom, buffers.programConfigurations.get(layer.id),\n buffers.dynamicLayoutVertexBuffer, buffers.opacityVertexBuffer);\n}\n","import {Texture} from './texture';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {ColorMode} from '../gl/color_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {type Context} from '../gl/context';\nimport {type Framebuffer} from '../gl/framebuffer';\nimport {type Tile} from '../tile/tile';\nimport {\n heatmapUniformValues,\n heatmapTextureUniformValues\n} from './program/heatmap_program';\nimport {HEATMAP_FULL_RENDER_FBO_KEY} from '../style/style_layer/heatmap_style_layer';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {HeatmapStyleLayer} from '../style/style_layer/heatmap_style_layer';\nimport type {HeatmapBucket} from '../data/bucket/heatmap_bucket';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\nexport function drawHeatmap(painter: Painter, tileManager: TileManager, layer: HeatmapStyleLayer, tileIDs: Array, renderOptions: RenderOptions) {\n if (layer.paint.get('heatmap-opacity') === 0) {\n return;\n }\n const context = painter.context;\n const {isRenderingToTexture, isRenderingGlobe} = renderOptions;\n\n if (painter.style.map.terrain) {\n for (const coord of tileIDs) {\n const tile = tileManager.getTile(coord);\n // Skip tiles that have uncovered parents to avoid flickering; we don't need\n // to use complex tile masking here because the change between zoom levels is subtle,\n // so it's fine to simply render the parent until all its 4 children are loaded\n if (tileManager.hasRenderableParent(coord)) continue;\n if (painter.renderPass === 'offscreen') {\n prepareHeatmapTerrain(painter, tile, layer, coord, isRenderingGlobe);\n } else if (painter.renderPass === 'translucent') {\n renderHeatmapTerrain(painter, layer, coord, isRenderingToTexture, isRenderingGlobe);\n }\n }\n context.viewport.set([0, 0, painter.width, painter.height]);\n } else {\n if (painter.renderPass === 'offscreen') {\n prepareHeatmapFlat(painter, tileManager, layer, tileIDs);\n } else if (painter.renderPass === 'translucent') {\n renderHeatmapFlat(painter, layer);\n }\n\n }\n}\n\nfunction prepareHeatmapFlat(painter: Painter, tileManager: TileManager, layer: HeatmapStyleLayer, coords: Array) {\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n\n // Allow kernels to be drawn across boundaries, so that\n // large kernels are not clipped to tiles\n const stencilMode = StencilMode.disabled;\n // Turn on additive blending for kernels, which is a key aspect of kernel density estimation formula\n const colorMode = new ColorMode([gl.ONE, gl.ONE], Color.transparent, [true, true, true, true]);\n\n bindFramebuffer(context, painter, layer);\n\n context.clear({color: Color.transparent});\n\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n\n // Skip tiles that have uncovered parents to avoid flickering; we don't need\n // to use complex tile masking here because the change between zoom levels is subtle,\n // so it's fine to simply render the parent until all its 4 children are loaded\n if (tileManager.hasRenderableParent(coord)) continue;\n\n const tile = tileManager.getTile(coord);\n const bucket: HeatmapBucket = (tile.getBucket(layer) as any);\n if (!bucket) continue;\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram('heatmap', programConfiguration);\n\n const projectionData = transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: true, applyTerrainMatrix: false});\n\n const radiusCorrectionFactor = transform.getCircleRadiusCorrection();\n\n program.draw(context, gl.TRIANGLES, DepthMode.disabled, stencilMode, colorMode, CullFaceMode.backCCW,\n heatmapUniformValues(tile, transform.zoom, layer.paint.get('heatmap-intensity'), radiusCorrectionFactor),\n null, projectionData,\n layer.id, bucket.layoutVertexBuffer, bucket.indexBuffer,\n bucket.segments, layer.paint, transform.zoom,\n programConfiguration);\n }\n\n context.viewport.set([0, 0, painter.width, painter.height]);\n}\n\nfunction renderHeatmapFlat(painter: Painter, layer: HeatmapStyleLayer) {\n const context = painter.context;\n const gl = context.gl;\n\n context.setColorMode(painter.colorModeForRenderPass());\n\n // Here we bind two different textures from which we'll sample in drawing\n // heatmaps: the kernel texture, prepared in the offscreen pass, and a\n // color ramp texture.\n const fbo = layer.heatmapFbos.get(HEATMAP_FULL_RENDER_FBO_KEY);\n if (!fbo) return;\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n\n context.activeTexture.set(gl.TEXTURE1);\n const colorRampTexture = getColorRampTexture(context, layer);\n colorRampTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n painter.useProgram('heatmapTexture').draw(context, gl.TRIANGLES,\n DepthMode.disabled, StencilMode.disabled, painter.colorModeForRenderPass(), CullFaceMode.disabled,\n heatmapTextureUniformValues(painter, layer, 0, 1), null, null,\n layer.id, painter.viewportBuffer, painter.quadTriangleIndexBuffer,\n painter.viewportSegments, layer.paint, painter.transform.zoom);\n}\n\nfunction prepareHeatmapTerrain(painter: Painter, tile: Tile, layer: HeatmapStyleLayer, coord: OverscaledTileID, isRenderingGlobe: boolean) {\n const context = painter.context;\n const gl = context.gl;\n\n const stencilMode = StencilMode.disabled;\n // Turn on additive blending for kernels, which is a key aspect of kernel density estimation formula\n const colorMode = new ColorMode([gl.ONE, gl.ONE], Color.transparent, [true, true, true, true]);\n\n const bucket: HeatmapBucket = (tile.getBucket(layer) as any);\n if (!bucket) return;\n\n const tileKey = coord.key;\n let fbo = layer.heatmapFbos.get(tileKey);\n if (!fbo) {\n fbo = createHeatmapFbo(context, tile.tileSize, tile.tileSize);\n layer.heatmapFbos.set(tileKey, fbo);\n }\n\n context.bindFramebuffer.set(fbo.framebuffer);\n context.viewport.set([0, 0, tile.tileSize, tile.tileSize]);\n\n context.clear({color: Color.transparent});\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram('heatmap', programConfiguration, !isRenderingGlobe);\n\n const projectionData = painter.transform.getProjectionData({overscaledTileID: tile.tileID, applyGlobeMatrix: true, applyTerrainMatrix: true});\n\n const terrainData = painter.style.map.terrain.getTerrainData(coord);\n program.draw(context, gl.TRIANGLES, DepthMode.disabled, stencilMode, colorMode, CullFaceMode.disabled,\n heatmapUniformValues(tile, painter.transform.zoom, layer.paint.get('heatmap-intensity'), 1.0), terrainData, projectionData,\n layer.id, bucket.layoutVertexBuffer, bucket.indexBuffer,\n bucket.segments, layer.paint, painter.transform.zoom,\n programConfiguration);\n}\n\nfunction renderHeatmapTerrain(painter: Painter, layer: HeatmapStyleLayer, coord: OverscaledTileID, isRenderingToTexture: boolean, isRenderingGlobe: boolean) {\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n\n context.setColorMode(painter.colorModeForRenderPass());\n\n const colorRampTexture = getColorRampTexture(context, layer);\n\n // Here we bind two different textures from which we'll sample in drawing\n // heatmaps: the kernel texture, prepared in the offscreen pass, and a\n // color ramp texture.\n const tileKey = coord.key;\n const fbo = layer.heatmapFbos.get(tileKey);\n if (!fbo) return;\n\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n\n context.activeTexture.set(gl.TEXTURE1);\n colorRampTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n const projectionData = transform.getProjectionData({overscaledTileID: coord, applyTerrainMatrix: isRenderingGlobe, applyGlobeMatrix: !isRenderingToTexture});\n\n painter.useProgram('heatmapTexture').draw(context, gl.TRIANGLES,\n DepthMode.disabled, StencilMode.disabled, painter.colorModeForRenderPass(), CullFaceMode.disabled,\n heatmapTextureUniformValues(painter, layer, 0, 1), null, projectionData,\n layer.id, painter.rasterBoundsBuffer, painter.quadTriangleIndexBuffer,\n painter.rasterBoundsSegments, layer.paint, transform.zoom);\n\n // destroy the FBO after rendering\n fbo.destroy();\n layer.heatmapFbos.delete(tileKey);\n}\n\nfunction bindFramebuffer(context: Context, painter: Painter, layer: HeatmapStyleLayer) {\n const gl = context.gl;\n context.activeTexture.set(gl.TEXTURE1);\n\n // Use a 4x downscaled screen texture for better performance\n context.viewport.set([0, 0, painter.width / 4, painter.height / 4]);\n\n let fbo = layer.heatmapFbos.get(HEATMAP_FULL_RENDER_FBO_KEY);\n\n if (!fbo) {\n fbo = createHeatmapFbo(context, painter.width / 4, painter.height / 4);\n layer.heatmapFbos.set(HEATMAP_FULL_RENDER_FBO_KEY, fbo);\n } else {\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n context.bindFramebuffer.set(fbo.framebuffer);\n }\n}\n\nfunction createHeatmapFbo(context: Context, width: number, height: number): Framebuffer {\n const gl = context.gl;\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\n // Use the higher precision half-float texture where available (producing much smoother looking heatmaps);\n // Otherwise, fall back to a low precision texture\n const numType = context.HALF_FLOAT ?? gl.UNSIGNED_BYTE;\n const internalFormat = context.RGBA16F ?? gl.RGBA;\n\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, width, height, 0, gl.RGBA, numType, null);\n\n const fbo = context.createFramebuffer(width, height, false, false);\n fbo.colorAttachment.set(texture);\n\n return fbo;\n}\n\nfunction getColorRampTexture(context: Context, layer: HeatmapStyleLayer): Texture {\n if (!layer.colorRampTexture) {\n layer.colorRampTexture = new Texture(context, layer.colorRamp, context.gl.RGBA);\n }\n return layer.colorRampTexture;\n}\n","import {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {Texture} from './texture';\nimport {\n lineUniformValues,\n linePatternUniformValues,\n lineSDFUniformValues,\n lineGradientUniformValues,\n lineGradientSDFUniformValues\n} from './program/line_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {LineStyleLayer} from '../style/style_layer/line_style_layer';\nimport type {LineBucket} from '../data/bucket/line_bucket';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {Tile} from '../tile/tile';\nimport type {Context} from '../gl/context';\nimport type {ProgramConfiguration} from '../data/program_configuration';\nimport {clamp, nextPowerOfTwo} from '../util/util';\nimport {renderColorRamp} from '../util/color_ramp';\nimport {EXTENT} from '../data/extent';\nimport type {RGBAImage} from '../util/image';\n\ntype GradientTexture = {\n texture?: Texture;\n gradient?: RGBAImage;\n version?: number;\n};\n\nfunction updateGradientTexture(\n painter: Painter,\n tileManager: TileManager,\n context: Context,\n gl: WebGLRenderingContext,\n layer: LineStyleLayer,\n bucket: LineBucket,\n coord: OverscaledTileID,\n layerGradient: GradientTexture\n): Texture {\n let textureResolution = 256;\n if (layer.stepInterpolant) {\n const sourceMaxZoom = tileManager.getSource().maxzoom;\n const potentialOverzoom = coord.canonical.z === sourceMaxZoom ?\n Math.ceil(1 << (painter.transform.maxZoom - coord.canonical.z)) : 1;\n const lineLength = bucket.maxLineLength / EXTENT;\n // Logical pixel tile size is 512px, and 1024px right before current zoom + 1\n const maxTilePixelSize = 1024;\n // Maximum possible texture coverage heuristic, bound by hardware max texture size\n const maxTextureCoverage = lineLength * maxTilePixelSize * potentialOverzoom;\n textureResolution = clamp(nextPowerOfTwo(maxTextureCoverage), 256, context.maxTextureSize);\n }\n layerGradient.gradient = renderColorRamp({\n expression: layer.gradientExpression(),\n evaluationKey: 'lineProgress',\n resolution: textureResolution,\n image: layerGradient.gradient || undefined,\n clips: bucket.lineClipsArray\n });\n if (layerGradient.texture) {\n layerGradient.texture.update(layerGradient.gradient);\n } else {\n layerGradient.texture = new Texture(context, layerGradient.gradient, gl.RGBA);\n }\n layerGradient.version = layer.gradientVersion;\n return layerGradient.texture;\n}\n\nfunction bindImagePatternTextures(\n context: Context,\n gl: WebGLRenderingContext,\n tile: Tile,\n programConfiguration: ProgramConfiguration,\n crossfade: ReturnType\n) {\n context.activeTexture.set(gl.TEXTURE0);\n tile.imageAtlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n programConfiguration.updatePaintBuffers(crossfade);\n}\n\nfunction bindDasharrayTextures(\n painter: Painter,\n context: Context,\n gl: WebGLRenderingContext,\n programConfiguration: ProgramConfiguration,\n programChanged: boolean,\n crossfade: ReturnType\n) {\n if (programChanged || painter.lineAtlas.dirty) {\n context.activeTexture.set(gl.TEXTURE0);\n painter.lineAtlas.bind(context);\n }\n programConfiguration.updatePaintBuffers(crossfade);\n}\n\nfunction bindGradientTextures(\n painter: Painter,\n tileManager: TileManager,\n context: Context,\n gl: WebGLRenderingContext,\n layer: LineStyleLayer,\n bucket: LineBucket,\n coord: OverscaledTileID\n) {\n const layerGradient = bucket.gradients[layer.id];\n let gradientTexture = layerGradient.texture;\n if (layer.gradientVersion !== layerGradient.version) {\n gradientTexture = updateGradientTexture(painter, tileManager, context, gl, layer, bucket, coord, layerGradient);\n }\n context.activeTexture.set(gl.TEXTURE0);\n gradientTexture.bind(layer.stepInterpolant ? gl.NEAREST : gl.LINEAR, gl.CLAMP_TO_EDGE);\n}\n\nfunction bindGradientAndDashTextures(\n painter: Painter,\n tileManager: TileManager,\n context: Context,\n gl: WebGLRenderingContext,\n layer: LineStyleLayer,\n bucket: LineBucket,\n coord: OverscaledTileID,\n programConfiguration: ProgramConfiguration,\n crossfade: ReturnType\n) {\n // Bind gradient texture to TEXTURE0\n const layerGradient = bucket.gradients[layer.id];\n let gradientTexture = layerGradient.texture;\n if (layer.gradientVersion !== layerGradient.version) {\n gradientTexture = updateGradientTexture(painter, tileManager, context, gl, layer, bucket, coord, layerGradient);\n }\n context.activeTexture.set(gl.TEXTURE0);\n gradientTexture.bind(layer.stepInterpolant ? gl.NEAREST : gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n // Bind dash atlas to TEXTURE1\n context.activeTexture.set(gl.TEXTURE1);\n painter.lineAtlas.bind(context);\n\n programConfiguration.updatePaintBuffers(crossfade);\n}\n\nexport function drawLine(painter: Painter, tileManager: TileManager, layer: LineStyleLayer, coords: Array, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'translucent') return;\n\n const {isRenderingToTexture} = renderOptions;\n\n const opacity = layer.paint.get('line-opacity');\n const width = layer.paint.get('line-width');\n if (opacity.constantOr(1) === 0 || width.constantOr(1) === 0) return;\n\n const depthMode = painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n const colorMode = painter.colorModeForRenderPass();\n\n const dasharrayProperty = layer.paint.get('line-dasharray');\n const dasharray = dasharrayProperty.constantOr(1 as any);\n const patternProperty = layer.paint.get('line-pattern');\n const image = patternProperty.constantOr(1 as any);\n\n const gradient = layer.paint.get('line-gradient');\n const crossfade = layer.getCrossfadeParameters();\n\n let programId: string;\n if (image) programId = 'linePattern';\n else if (dasharray && gradient) programId = 'lineGradientSDF';\n else if (dasharray) programId = 'lineSDF';\n else if (gradient) programId = 'lineGradient';\n else programId = 'line';\n\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n\n let firstTile = true;\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n\n if (image && !tile.patternsLoaded()) continue;\n\n const bucket: LineBucket = (tile.getBucket(layer) as any);\n if (!bucket) continue;\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const prevProgram = painter.context.program.get();\n const program = painter.useProgram(programId, programConfiguration);\n const programChanged = firstTile || program.program !== prevProgram;\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n\n const constantPattern = patternProperty.constantOr(null);\n const constantDasharray = dasharrayProperty && dasharrayProperty.constantOr(null);\n\n if (constantPattern && tile.imageAtlas) {\n const atlas = tile.imageAtlas;\n const posTo = atlas.patternPositions[constantPattern.to.toString()];\n const posFrom = atlas.patternPositions[constantPattern.from.toString()];\n if (posTo && posFrom) programConfiguration.setConstantPatternPositions(posTo, posFrom);\n\n } else if (constantDasharray) {\n const round = layer.layout.get('line-cap') === 'round';\n const dashTo = painter.lineAtlas.getDash(constantDasharray.to, round);\n const dashFrom = painter.lineAtlas.getDash(constantDasharray.from, round);\n programConfiguration.setConstantDashPositions(dashTo, dashFrom);\n }\n\n const projectionData = transform.getProjectionData({\n overscaledTileID: coord,\n applyGlobeMatrix: !isRenderingToTexture,\n applyTerrainMatrix: true\n });\n\n const pixelRatio = transform.getPixelScale();\n\n let uniformValues;\n if (image) {\n uniformValues = linePatternUniformValues(painter, tile, layer, pixelRatio, crossfade);\n bindImagePatternTextures(context, gl, tile, programConfiguration, crossfade);\n } else if (dasharray && gradient) {\n uniformValues = lineGradientSDFUniformValues(painter, tile, layer, pixelRatio, crossfade, bucket.lineClipsArray.length);\n bindGradientAndDashTextures(painter, tileManager, context, gl, layer, bucket, coord, programConfiguration, crossfade);\n } else if (dasharray) {\n uniformValues = lineSDFUniformValues(painter, tile, layer, pixelRatio, crossfade);\n bindDasharrayTextures(painter, context, gl, programConfiguration, programChanged, crossfade);\n } else if (gradient) {\n uniformValues = lineGradientUniformValues(painter, tile, layer, pixelRatio, bucket.lineClipsArray.length);\n bindGradientTextures(painter, tileManager, context, gl, layer, bucket, coord);\n } else {\n uniformValues = lineUniformValues(painter, tile, layer, pixelRatio);\n }\n\n const stencil = painter.stencilModeForClipping(coord);\n\n program.draw(context, gl.TRIANGLES, depthMode,\n stencil, colorMode, CullFaceMode.disabled, uniformValues, terrainData, projectionData,\n layer.id, bucket.layoutVertexBuffer, bucket.indexBuffer, bucket.segments,\n layer.paint, painter.transform.zoom, programConfiguration, bucket.layoutVertexBuffer2);\n\n firstTile = false;\n // once refactored so that bound texture state is managed, we'll also be able to remove this firstTile/programChanged logic\n }\n}\n","import type {CrossFaded} from '../style/properties';\nimport type {ResolvedImage} from '@maplibre/maplibre-gl-style-spec';\nimport type {Tile} from '../tile/tile';\nimport type {ProgramConfiguration} from '../data/program_configuration';\nimport type {FillExtrusionStyleLayer} from '../style/style_layer/fill_extrusion_style_layer';\nimport type {FillStyleLayer} from '../style/style_layer/fill_style_layer';\n\n/**\n * A simple helper shared by draw_fill and draw_fill_extrusions to find the correct pattern positions AND update program.\n * For transitionable properties, especially 'fill-pattern' and 'fill-extrusion-pattern', while rendering certain frames\n * tile.imageAtlas has been updated by worker to hold the new pattern only, but rendering code is still looking for the previous image.\n * The mismatch was causing setConstantPatternPositions method not being called and pixelRatio was always the\n * default of 1, instead of actual values set by original map.addImage.\n *\n * @param programConfiguration - to be used to set pattern position and device pixel ratio.\n * @param propertyName - 'fill-pattern' or 'fill-extrusion-pattern' property key\n * @param constantPattern - either 'fill-pattern' or 'fill-extrusion-pattern' property value\n * @param tile - current tile being drawn\n * @param layer - current layer being rendered\n */\nexport function updatePatternPositionsInProgram(\n programConfiguration: ProgramConfiguration,\n propertyName: 'fill-pattern' | 'fill-extrusion-pattern',\n constantPattern: CrossFaded,\n tile: Tile,\n layer: FillStyleLayer | FillExtrusionStyleLayer): void {\n\n if (!constantPattern || !tile || !tile.imageAtlas) {\n return;\n }\n\n const patternPositions = tile.imageAtlas.patternPositions;\n let posTo = patternPositions[constantPattern.to.toString()];\n let posFrom = patternPositions[constantPattern.from.toString()];\n\n // https://github.com/maplibre/maplibre-gl-js/issues/3377\n if (!posTo && posFrom) posTo = posFrom;\n if (!posFrom && posTo) posFrom = posTo;\n\n // try again in case patternPositions has been updated by worker\n if (!posTo || !posFrom) {\n const transitioned = layer.getPaintProperty(propertyName) as string;\n posTo = patternPositions[transitioned];\n posFrom = patternPositions[transitioned];\n }\n\n if (posTo && posFrom) {\n programConfiguration.setConstantPatternPositions(posTo, posFrom);\n }\n}\n","import {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {type ColorMode} from '../gl/color_mode';\nimport {\n fillUniformValues,\n fillPatternUniformValues,\n fillOutlineUniformValues,\n fillOutlinePatternUniformValues\n} from './program/fill_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {FillStyleLayer} from '../style/style_layer/fill_style_layer';\nimport type {FillBucket} from '../data/bucket/fill_bucket';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport {updatePatternPositionsInProgram} from './update_pattern_positions_in_program';\nimport {translatePosition} from '../util/util';\n\nexport function drawFill(painter: Painter, tileManager: TileManager, layer: FillStyleLayer, coords: Array, renderOptions: RenderOptions) {\n const color = layer.paint.get('fill-color');\n const opacity = layer.paint.get('fill-opacity');\n\n if (opacity.constantOr(1) === 0) {\n return;\n }\n\n const {isRenderingToTexture} = renderOptions;\n const colorMode = painter.colorModeForRenderPass();\n const pattern = layer.paint.get('fill-pattern');\n const pass = painter.opaquePassEnabledForLayer() &&\n (!pattern.constantOr(1 as any) &&\n color.constantOr(Color.transparent).a === 1 &&\n opacity.constantOr(0) === 1) ? 'opaque' : 'translucent';\n\n // Draw fill\n if (painter.renderPass === pass) {\n const depthMode = painter.getDepthModeForSublayer(\n 1, painter.renderPass === 'opaque' ? DepthMode.ReadWrite : DepthMode.ReadOnly);\n drawFillTiles(painter, tileManager, layer, coords, depthMode, colorMode, false, isRenderingToTexture);\n }\n\n // Draw stroke\n if (painter.renderPass === 'translucent' && layer.paint.get('fill-antialias')) {\n\n // If we defined a different color for the fill outline, we are\n // going to ignore the bits in 0x07 and just care about the global\n // clipping mask.\n // Otherwise, we only want to drawFill the antialiased parts that are\n // *outside* the current shape. This is important in case the fill\n // or stroke color is translucent. If we wouldn't clip to outside\n // the current shape, some pixels from the outline stroke overlapped\n // the (non-antialiased) fill.\n const depthMode = painter.getDepthModeForSublayer(\n layer.getPaintProperty('fill-outline-color') ? 2 : 0, DepthMode.ReadOnly);\n drawFillTiles(painter, tileManager, layer, coords, depthMode, colorMode, true, isRenderingToTexture);\n }\n}\n\nfunction drawFillTiles(\n painter: Painter,\n tileManager: TileManager,\n layer: FillStyleLayer,\n coords: Array,\n depthMode: Readonly,\n colorMode: Readonly,\n isOutline: boolean,\n isRenderingToTexture: boolean) {\n const gl = painter.context.gl;\n const fillPropertyName = 'fill-pattern';\n const patternProperty = layer.paint.get(fillPropertyName);\n const image = patternProperty && patternProperty.constantOr(1 as any);\n const crossfade = layer.getCrossfadeParameters();\n let drawMode, programName, uniformValues, indexBuffer, segments;\n\n const transform = painter.transform;\n\n const propertyFillTranslate = layer.paint.get('fill-translate');\n const propertyFillTranslateAnchor = layer.paint.get('fill-translate-anchor');\n\n if (!isOutline) {\n programName = image ? 'fillPattern' : 'fill';\n drawMode = gl.TRIANGLES;\n } else {\n programName = image && !layer.getPaintProperty('fill-outline-color') ? 'fillOutlinePattern' : 'fillOutline';\n drawMode = gl.LINES;\n }\n\n const constantPattern = patternProperty.constantOr(null);\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n if (image && !tile.patternsLoaded()) continue;\n\n const bucket: FillBucket = (tile.getBucket(layer) as any);\n if (!bucket) continue;\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram(programName, programConfiguration);\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n\n if (image) {\n painter.context.activeTexture.set(gl.TEXTURE0);\n tile.imageAtlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n programConfiguration.updatePaintBuffers(crossfade);\n }\n\n updatePatternPositionsInProgram(programConfiguration, fillPropertyName, constantPattern, tile, layer);\n\n const projectionData = transform.getProjectionData({\n overscaledTileID: coord,\n applyGlobeMatrix: !isRenderingToTexture,\n applyTerrainMatrix: true\n });\n\n const translateForUniforms = translatePosition(transform, tile, propertyFillTranslate, propertyFillTranslateAnchor);\n\n if (!isOutline) {\n indexBuffer = bucket.indexBuffer;\n segments = bucket.segments;\n uniformValues = image ? fillPatternUniformValues(painter, crossfade, tile, translateForUniforms) : fillUniformValues(translateForUniforms);\n } else {\n indexBuffer = bucket.indexBuffer2;\n segments = bucket.segments2;\n const drawingBufferSize = [gl.drawingBufferWidth, gl.drawingBufferHeight] as [number, number];\n uniformValues = (programName === 'fillOutlinePattern' && image) ?\n fillOutlinePatternUniformValues(painter, crossfade, tile, drawingBufferSize, translateForUniforms) :\n fillOutlineUniformValues(drawingBufferSize, translateForUniforms);\n }\n\n const stencil = painter.stencilModeForClipping(coord);\n\n program.draw(painter.context, drawMode, depthMode,\n stencil, colorMode, CullFaceMode.backCCW, uniformValues, terrainData, projectionData,\n layer.id, bucket.layoutVertexBuffer, indexBuffer, segments,\n layer.paint, painter.transform.zoom, programConfiguration);\n }\n}\n","import {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {ColorMode} from '../gl/color_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {\n fillExtrusionUniformValues,\n fillExtrusionPatternUniformValues,\n} from './program/fill_extrusion_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {FillExtrusionStyleLayer} from '../style/style_layer/fill_extrusion_style_layer';\nimport type {FillExtrusionBucket} from '../data/bucket/fill_extrusion_bucket';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\nimport {updatePatternPositionsInProgram} from './update_pattern_positions_in_program';\nimport {translatePosition} from '../util/util';\n\nexport function drawFillExtrusion(painter: Painter, tileManager: TileManager, layer: FillExtrusionStyleLayer, coords: Array, renderOptions: RenderOptions) {\n const opacity = layer.paint.get('fill-extrusion-opacity');\n if (opacity === 0) {\n return;\n }\n\n const {isRenderingToTexture} = renderOptions;\n if (painter.renderPass === 'translucent') {\n const depthMode = new DepthMode(painter.context.gl.LEQUAL, DepthMode.ReadWrite, painter.depthRangeFor3D);\n\n if (opacity === 1 && !layer.paint.get('fill-extrusion-pattern').constantOr(1 as any)) {\n const colorMode = painter.colorModeForRenderPass();\n drawExtrusionTiles(painter, tileManager, layer, coords, depthMode, StencilMode.disabled, colorMode, isRenderingToTexture);\n\n } else {\n // Draw transparent buildings in two passes so that only the closest surface is drawn.\n // First draw all the extrusions into only the depth buffer. No colors are drawn.\n drawExtrusionTiles(painter, tileManager, layer, coords, depthMode,\n StencilMode.disabled,\n ColorMode.disabled, isRenderingToTexture);\n\n // Then draw all the extrusions a second type, only coloring fragments if they have the\n // same depth value as the closest fragment in the previous pass. Use the stencil buffer\n // to prevent the second draw in cases where we have coincident polygons.\n drawExtrusionTiles(painter, tileManager, layer, coords, depthMode,\n painter.stencilModeFor3D(),\n painter.colorModeForRenderPass(), isRenderingToTexture);\n }\n }\n}\n\nfunction drawExtrusionTiles(\n painter: Painter,\n tileManager: TileManager,\n layer: FillExtrusionStyleLayer,\n coords: OverscaledTileID[],\n depthMode: DepthMode,\n stencilMode: Readonly,\n colorMode: Readonly,\n isRenderingToTexture: boolean) {\n const context = painter.context;\n const gl = context.gl;\n const fillPropertyName = 'fill-extrusion-pattern';\n const patternProperty = layer.paint.get(fillPropertyName);\n const image = patternProperty.constantOr(1 as any);\n const crossfade = layer.getCrossfadeParameters();\n const opacity = layer.paint.get('fill-extrusion-opacity');\n const constantPattern = patternProperty.constantOr(null);\n const transform = painter.transform;\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n const bucket: FillExtrusionBucket = (tile.getBucket(layer) as any);\n if (!bucket) continue;\n\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram(image ? 'fillExtrusionPattern' : 'fillExtrusion', programConfiguration);\n\n if (image) {\n painter.context.activeTexture.set(gl.TEXTURE0);\n tile.imageAtlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n programConfiguration.updatePaintBuffers(crossfade);\n }\n\n const projectionData = transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: !isRenderingToTexture, applyTerrainMatrix: true});\n updatePatternPositionsInProgram(programConfiguration, fillPropertyName, constantPattern, tile, layer);\n\n const translate = translatePosition(\n transform,\n tile,\n layer.paint.get('fill-extrusion-translate'),\n layer.paint.get('fill-extrusion-translate-anchor')\n );\n\n const shouldUseVerticalGradient = layer.paint.get('fill-extrusion-vertical-gradient');\n const uniformValues = image ?\n fillExtrusionPatternUniformValues(painter, shouldUseVerticalGradient, opacity, translate, coord, crossfade, tile) :\n fillExtrusionUniformValues(painter, shouldUseVerticalGradient, opacity, translate);\n\n program.draw(context, context.gl.TRIANGLES, depthMode, stencilMode, colorMode, CullFaceMode.backCCW,\n uniformValues, terrainData, projectionData, layer.id, bucket.layoutVertexBuffer, bucket.indexBuffer,\n bucket.segments, layer.paint, painter.transform.zoom,\n programConfiguration, painter.style.map.terrain && bucket.centroidVertexBuffer);\n }\n}\n","import {Texture} from './texture';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {type ColorMode} from '../gl/color_mode';\nimport {\n hillshadeUniformValues,\n hillshadeUniformPrepareValues\n} from './program/hillshade_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {HillshadeStyleLayer} from '../style/style_layer/hillshade_style_layer';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\nexport function drawHillshade(painter: Painter, tileManager: TileManager, layer: HillshadeStyleLayer, tileIDs: Array, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'offscreen' && painter.renderPass !== 'translucent') return;\n\n const {isRenderingToTexture} = renderOptions;\n const context = painter.context;\n const projection = painter.style.projection;\n const useSubdivision = projection.useSubdivision;\n\n const depthMode = painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n const colorMode = painter.colorModeForRenderPass();\n\n if (painter.renderPass === 'offscreen') {\n // Prepare tiles\n prepareHillshade(painter, tileManager, tileIDs, layer, depthMode, StencilMode.disabled, colorMode);\n context.viewport.set([0, 0, painter.width, painter.height]);\n } else if (painter.renderPass === 'translucent') {\n // Globe (or any projection with subdivision) needs two-pass rendering to avoid artifacts when rendering texture tiles.\n // See comments in draw_raster.ts for more details.\n if (useSubdivision) {\n // Two-pass rendering\n const [stencilBorderless, stencilBorders, coords] = painter.stencilConfigForOverlapTwoPass(tileIDs);\n renderHillshade(painter, tileManager, layer, coords, stencilBorderless, depthMode, colorMode, false, isRenderingToTexture); // draw without borders\n renderHillshade(painter, tileManager, layer, coords, stencilBorders, depthMode, colorMode, true, isRenderingToTexture); // draw with borders\n } else {\n // Simple rendering\n const [stencil, coords] = painter.getStencilConfigForOverlapAndUpdateStencilID(tileIDs);\n renderHillshade(painter, tileManager, layer, coords, stencil, depthMode, colorMode, false, isRenderingToTexture);\n }\n }\n}\n\nfunction renderHillshade(\n painter: Painter,\n tileManager: TileManager,\n layer: HillshadeStyleLayer,\n coords: Array,\n stencilModes: {[_: number]: Readonly},\n depthMode: Readonly,\n colorMode: Readonly,\n useBorder: boolean,\n isRenderingToTexture: boolean\n) {\n const projection = painter.style.projection;\n const context = painter.context;\n const transform = painter.transform;\n const gl = context.gl;\n\n const defines = [`#define NUM_ILLUMINATION_SOURCES ${layer.paint.get('hillshade-highlight-color').values.length}`];\n const program = painter.useProgram('hillshade', null, false, defines);\n const align = !painter.options.moving;\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n const fbo = tile.fbo;\n if (!fbo) {\n continue;\n }\n const mesh = projection.getMeshFromTileID(context, coord.canonical, useBorder, true, 'raster');\n\n const terrainData = painter.style.map.terrain?.getTerrainData(coord);\n\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n\n const projectionData = transform.getProjectionData({\n overscaledTileID: coord,\n aligned: align,\n applyGlobeMatrix: !isRenderingToTexture,\n applyTerrainMatrix: true\n });\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilModes[coord.overscaledZ], colorMode, CullFaceMode.backCCW,\n hillshadeUniformValues(painter, tile, layer), terrainData, projectionData, layer.id, mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n }\n}\n\n// hillshade rendering is done in two steps. the prepare step first calculates the slope of the terrain in the x and y\n// directions for each pixel, and saves those values to a framebuffer texture in the r and g channels.\nfunction prepareHillshade(\n painter: Painter,\n tileManager: TileManager,\n tileIDs: Array,\n layer: HillshadeStyleLayer,\n depthMode: Readonly,\n stencilMode: Readonly,\n colorMode: Readonly) {\n\n const context = painter.context;\n const gl = context.gl;\n\n for (const coord of tileIDs) {\n const tile = tileManager.getTile(coord);\n const dem = tile.dem;\n\n if (!dem || !dem.data) {\n continue;\n }\n\n if (!tile.needsHillshadePrepare) {\n continue;\n }\n\n const tileSize = dem.dim;\n const textureStride = dem.stride;\n\n const pixelData = dem.getPixels();\n context.activeTexture.set(gl.TEXTURE1);\n\n context.pixelStoreUnpackPremultiplyAlpha.set(false);\n tile.demTexture = tile.demTexture || painter.getTileTexture(textureStride);\n if (tile.demTexture) {\n const demTexture = tile.demTexture;\n demTexture.update(pixelData, {premultiply: false});\n demTexture.bind(gl.NEAREST, gl.CLAMP_TO_EDGE);\n } else {\n tile.demTexture = new Texture(context, pixelData, gl.RGBA, {premultiply: false});\n tile.demTexture.bind(gl.NEAREST, gl.CLAMP_TO_EDGE);\n }\n\n context.activeTexture.set(gl.TEXTURE0);\n\n let fbo = tile.fbo;\n\n if (!fbo) {\n const renderTexture = new Texture(context, {width: tileSize, height: tileSize, data: null}, gl.RGBA);\n renderTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n fbo = tile.fbo = context.createFramebuffer(tileSize, tileSize, true, false);\n fbo.colorAttachment.set(renderTexture.texture);\n }\n\n context.bindFramebuffer.set(fbo.framebuffer);\n context.viewport.set([0, 0, tileSize, tileSize]);\n\n painter.useProgram('hillshadePrepare').draw(context, gl.TRIANGLES,\n depthMode, stencilMode, colorMode, CullFaceMode.disabled,\n hillshadeUniformPrepareValues(tile.tileID, dem),\n null, null, layer.id, painter.rasterBoundsBuffer,\n painter.quadTriangleIndexBuffer, painter.rasterBoundsSegments);\n\n tile.needsHillshadePrepare = false;\n }\n}\n","import {Texture} from './texture';\nimport type {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {type ColorMode} from '../gl/color_mode';\nimport {\n colorReliefUniformValues\n} from './program/color_relief_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {ColorReliefStyleLayer} from '../style/style_layer/color_relief_style_layer';\nimport type {OverscaledTileID} from '../tile/tile_id';\n\nexport function drawColorRelief(painter: Painter, tileManager: TileManager, layer: ColorReliefStyleLayer, tileIDs: Array, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'translucent') return;\n if (!tileIDs.length) return;\n\n const {isRenderingToTexture} = renderOptions;\n const projection = painter.style.projection;\n const useSubdivision = projection.useSubdivision;\n\n const depthMode = painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n const colorMode = painter.colorModeForRenderPass();\n\n // Globe (or any projection with subdivision) needs two-pass rendering to avoid artifacts when rendering texture tiles.\n // See comments in draw_raster.ts for more details.\n if (useSubdivision) {\n // Two-pass rendering\n const [stencilBorderless, stencilBorders, coords] = painter.stencilConfigForOverlapTwoPass(tileIDs);\n renderColorRelief(painter, tileManager, layer, coords, stencilBorderless, depthMode, colorMode, false, isRenderingToTexture); // draw without borders\n renderColorRelief(painter, tileManager, layer, coords, stencilBorders, depthMode, colorMode, true, isRenderingToTexture); // draw with borders\n } else {\n // Simple rendering\n const [stencil, coords] = painter.getStencilConfigForOverlapAndUpdateStencilID(tileIDs);\n renderColorRelief(painter, tileManager, layer, coords, stencil, depthMode, colorMode, false, isRenderingToTexture);\n }\n}\n\nfunction renderColorRelief(\n painter: Painter,\n tileManager: TileManager,\n layer: ColorReliefStyleLayer,\n coords: Array,\n stencilModes: {[_: number]: Readonly},\n depthMode: Readonly,\n colorMode: Readonly,\n useBorder: boolean,\n isRenderingToTexture: boolean\n) {\n const projection = painter.style.projection;\n const context = painter.context;\n const transform = painter.transform;\n const gl = context.gl;\n const program = painter.useProgram('colorRelief');\n const align = !painter.options.moving;\n\n let firstTile = true;\n let colorRampSize = 0;\n\n for (const coord of coords) {\n const tile = tileManager.getTile(coord);\n const dem = tile.dem;\n if(firstTile) {\n const maxLength = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n const {elevationTexture, colorTexture} = layer.getColorRampTextures(context, maxLength, dem.getUnpackVector());\n context.activeTexture.set(gl.TEXTURE1);\n elevationTexture.bind(gl.NEAREST, gl.CLAMP_TO_EDGE);\n context.activeTexture.set(gl.TEXTURE4);\n colorTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n firstTile = false;\n colorRampSize = elevationTexture.size[0];\n }\n\n if (!dem || !dem.data) {\n continue;\n }\n\n const textureStride = dem.stride;\n\n const pixelData = dem.getPixels();\n context.activeTexture.set(gl.TEXTURE0);\n\n context.pixelStoreUnpackPremultiplyAlpha.set(false);\n tile.demTexture = tile.demTexture || painter.getTileTexture(textureStride);\n if (tile.demTexture) {\n const demTexture = tile.demTexture;\n demTexture.update(pixelData, {premultiply: false});\n demTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n } else {\n tile.demTexture = new Texture(context, pixelData, gl.RGBA, {premultiply: false});\n tile.demTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n }\n\n const mesh = projection.getMeshFromTileID(context, coord.canonical, useBorder, true, 'raster');\n\n const terrainData = painter.style.map.terrain?.getTerrainData(coord);\n\n const projectionData = transform.getProjectionData({\n overscaledTileID: coord,\n aligned: align,\n applyGlobeMatrix: !isRenderingToTexture,\n applyTerrainMatrix: true\n });\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilModes[coord.overscaledZ], colorMode, CullFaceMode.backCCW,\n colorReliefUniformValues(layer, tile.dem, colorRampSize), terrainData, projectionData, layer.id, mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n }\n}\n","import {clamp} from '../util/util';\n\nimport {ImageSource} from '../source/image_source';\nimport {now} from '../util/time_control';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {rasterUniformValues} from './program/raster_program';\nimport {EXTENT} from '../data/extent';\nimport {FadingDirections} from '../tile/tile';\nimport Point from '@mapbox/point-geometry';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {RasterStyleLayer} from '../style/style_layer/raster_style_layer';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport type {Tile} from '../tile/tile';\n\ntype FadeProperties = {\n parentTile: Tile;\n parentScaleBy: number;\n parentTopLeft: [number, number];\n fadeValues: FadeValues;\n};\n\ntype FadeValues = {\n tileOpacity: number;\n parentTileOpacity?: number;\n fadeMix: {opacity: number; mix: number};\n};\n\nconst cornerCoords = [\n new Point(0, 0),\n new Point(EXTENT, 0),\n new Point(EXTENT, EXTENT),\n new Point(0, EXTENT),\n];\n\nexport function drawRaster(painter: Painter, tileManager: TileManager, layer: RasterStyleLayer, tileIDs: Array, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'translucent') return;\n if (layer.paint.get('raster-opacity') === 0) return;\n if (!tileIDs.length) return;\n\n const {isRenderingToTexture} = renderOptions;\n const source = tileManager.getSource();\n\n const projection = painter.style.projection;\n const useSubdivision = projection.useSubdivision;\n\n // When rendering globe (or any other subdivided projection), two passes are needed.\n // Subdivided tiles with different granularities might have tiny gaps between them.\n // To combat this, tile meshes for globe have a slight border region.\n // However tiles borders will overlap, and a part of a tile often\n // gets hidden by its neighbour's border, which displays an ugly stretched texture.\n // To both hide the border stretch and avoid tiny gaps, tiles are first drawn without borders (with gaps),\n // and then any missing pixels (gaps, not marked in stencil) get overdrawn with tile borders.\n // This approach also avoids pixel shader overdraw, as any pixel is drawn at most once.\n\n // Stencil mask and two-pass is not used for ImageSource sources regardless of projection.\n if (source instanceof ImageSource) {\n // Image source - no stencil is used\n drawTiles(painter, tileManager, layer, tileIDs, null, false, false, source.tileCoords, source.flippedWindingOrder, isRenderingToTexture);\n } else if (useSubdivision) {\n // Two-pass rendering\n const [stencilBorderless, stencilBorders, coords] = painter.stencilConfigForOverlapTwoPass(tileIDs);\n drawTiles(painter, tileManager, layer, coords, stencilBorderless, false, true, cornerCoords, false, isRenderingToTexture); // draw without borders\n drawTiles(painter, tileManager, layer, coords, stencilBorders, true, true, cornerCoords, false, isRenderingToTexture); // draw with borders\n } else {\n // Simple rendering\n const [stencil, coords] = painter.getStencilConfigForOverlapAndUpdateStencilID(tileIDs);\n drawTiles(painter, tileManager, layer, coords, stencil, false, true, cornerCoords, false, isRenderingToTexture);\n }\n}\n\nfunction drawTiles(\n painter: Painter,\n tileManager: TileManager,\n layer: RasterStyleLayer,\n coords: Array,\n stencilModes: {[_: number]: Readonly} | null,\n useBorder: boolean,\n allowPoles: boolean,\n corners: Array,\n flipCullfaceMode: boolean = false,\n isRenderingToTexture: boolean = false) {\n const minTileZ = coords[coords.length - 1].overscaledZ;\n\n const context = painter.context;\n const gl = context.gl;\n const program = painter.useProgram('raster');\n const transform = painter.transform;\n\n const projection = painter.style.projection;\n\n const colorMode = painter.colorModeForRenderPass();\n const align = !painter.options.moving;\n const rasterOpacity = layer.paint.get('raster-opacity');\n const rasterResampling = layer.paint.get('raster-resampling');\n const fadeDuration = layer.paint.get('raster-fade-duration');\n const isTerrain = !!painter.style.map.terrain;\n\n // Draw all tiles\n for (const coord of coords) {\n // Set the lower zoom level to sublayer 0, and higher zoom levels to higher sublayers\n // Use gl.LESS to prevent double drawing in areas where tiles overlap.\n const depthMode = painter.getDepthModeForSublayer(coord.overscaledZ - minTileZ,\n rasterOpacity === 1 ? DepthMode.ReadWrite : DepthMode.ReadOnly, gl.LESS);\n\n const tile = tileManager.getTile(coord);\n const textureFilter = rasterResampling === 'nearest' ? gl.NEAREST : gl.LINEAR;\n\n // create and bind first texture\n context.activeTexture.set(gl.TEXTURE0);\n tile.texture.bind(textureFilter, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n\n // create second texture - use either the current tile or fade tile to bind second texture below\n context.activeTexture.set(gl.TEXTURE1);\n const {parentTile, parentScaleBy, parentTopLeft, fadeValues} = getFadeProperties(tile, tileManager, fadeDuration, isTerrain);\n tile.fadeOpacity = fadeValues.tileOpacity;\n if (parentTile) {\n parentTile.fadeOpacity = fadeValues.parentTileOpacity;\n parentTile.texture.bind(textureFilter, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n } else {\n tile.texture.bind(textureFilter, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n }\n\n // Enable anisotropic filtering only when the pitch is greater than 20 degrees\n // to preserve image sharpness on flat or slightly tilted maps.\n if (tile.texture.useMipmap && context.extTextureFilterAnisotropic && painter.transform.pitch > 20) {\n gl.texParameterf(gl.TEXTURE_2D, context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,\n context.extTextureFilterAnisotropicMax);\n }\n\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n const projectionData = transform.getProjectionData({overscaledTileID: coord, aligned: align, applyGlobeMatrix: !isRenderingToTexture, applyTerrainMatrix: true});\n const uniformValues = rasterUniformValues(parentTopLeft, parentScaleBy, fadeValues.fadeMix, layer, corners);\n\n const mesh = projection.getMeshFromTileID(context, coord.canonical, useBorder, allowPoles, 'raster');\n const stencilMode = stencilModes ? stencilModes[coord.overscaledZ] : StencilMode.disabled;\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, colorMode, flipCullfaceMode ? CullFaceMode.frontCCW : CullFaceMode.backCCW,\n uniformValues, terrainData, projectionData, layer.id, mesh.vertexBuffer,\n mesh.indexBuffer, mesh.segments);\n }\n}\n\n/**\n * Get fade properties for current tile - either cross-fading or self-fading properties.\n */\nfunction getFadeProperties(tile: Tile, tileManager: TileManager, fadeDuration: number, isTerrain: boolean): FadeProperties {\n const defaults: FadeProperties = {\n parentTile: null,\n parentScaleBy: 1,\n parentTopLeft: [0, 0],\n fadeValues: {tileOpacity: 1, parentTileOpacity: 1, fadeMix: {opacity: 1, mix: 0}}\n };\n\n if (fadeDuration === 0 || isTerrain) return defaults;\n\n // cross-fade with parent first if available\n if (tile.fadingParentID) {\n const parentTile = tileManager.getLoadedTile(tile.fadingParentID);\n if (!parentTile) return defaults;\n\n const parentScaleBy = Math.pow(2, parentTile.tileID.overscaledZ - tile.tileID.overscaledZ);\n const parentTopLeft: [number, number] = [\n (tile.tileID.canonical.x * parentScaleBy) % 1,\n (tile.tileID.canonical.y * parentScaleBy) % 1\n ];\n\n const fadeValues = getCrossFadeValues(tile, parentTile, fadeDuration);\n return {parentTile, parentScaleBy, parentTopLeft, fadeValues};\n }\n\n // self-fade for edge tiles\n if (tile.selfFading) {\n const fadeValues = getSelfFadeValues(tile, fadeDuration);\n return {parentTile: null, parentScaleBy: 1, parentTopLeft: [0, 0], fadeValues};\n }\n\n return defaults;\n}\n\n/**\n * Cross-fade values for a base tile with a parent tile (for zooming in/out)\n */\nfunction getCrossFadeValues(tile: Tile, parentTile: Tile, fadeDuration: number): FadeValues {\n const currentTime = now();\n\n const timeSinceTile = (currentTime - tile.timeAdded) / fadeDuration;\n const timeSinceParent = (currentTime - parentTile.timeAdded) / fadeDuration;\n\n // get fading opacity based on current fade direction\n const doFadeIn = (tile.fadingDirection === FadingDirections.Incoming);\n const opacity1 = clamp(timeSinceTile, 0, 1);\n const opacity2 = clamp(1 - timeSinceParent, 0, 1);\n\n const tileOpacity = doFadeIn ? opacity1 : opacity2;\n const parentTileOpacity = doFadeIn ? opacity2 : opacity1;\n const fadeMix = {\n opacity: 1,\n mix: 1 - tileOpacity\n };\n\n return {tileOpacity, parentTileOpacity, fadeMix};\n}\n\n/**\n * Simple fade-in values for tile without a parent (i.e. edge tiles)\n */\nfunction getSelfFadeValues(tile: Tile, fadeDuration: number): FadeValues {\n const currentTime = now();\n\n const timeSinceTile = (currentTime - tile.timeAdded) / fadeDuration;\n const tileOpacity = clamp(timeSinceTile, 0, 1);\n const fadeMix = {\n opacity: tileOpacity,\n mix: 0\n };\n\n return {tileOpacity, fadeMix};\n}\n","import {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {debugUniformValues} from './program/debug_program';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {ColorMode} from '../gl/color_mode';\n\nimport type {Painter} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {OverscaledTileID} from '../tile/tile_id';\nimport {type Style} from '../style/style';\n\nconst topColor = new Color(1, 0, 0, 1);\nconst btmColor = new Color(0, 1, 0, 1);\nconst leftColor = new Color(0, 0, 1, 1);\nconst rightColor = new Color(1, 0, 1, 1);\nconst centerColor = new Color(0, 1, 1, 1);\n\nexport function drawDebugPadding(painter: Painter) {\n const padding = painter.transform.padding;\n const lineWidth = 3;\n // Top\n drawHorizontalLine(painter, painter.transform.height - (padding.top || 0), lineWidth, topColor);\n // Bottom\n drawHorizontalLine(painter, padding.bottom || 0, lineWidth, btmColor);\n // Left\n drawVerticalLine(painter, padding.left || 0, lineWidth, leftColor);\n // Right\n drawVerticalLine(painter, painter.transform.width - (padding.right || 0), lineWidth, rightColor);\n // Center\n const center = painter.transform.centerPoint;\n drawCrosshair(painter, center.x, painter.transform.height - center.y, centerColor);\n}\n\nfunction drawCrosshair(painter: Painter, x: number, y: number, color: Color) {\n const size = 20;\n const lineWidth = 2;\n //Vertical line\n drawDebugSSRect(painter, x - lineWidth / 2, y - size / 2, lineWidth, size, color);\n //Horizontal line\n drawDebugSSRect(painter, x - size / 2, y - lineWidth / 2, size, lineWidth, color);\n}\n\nfunction drawHorizontalLine(painter: Painter, y: number, lineWidth: number, color: Color) {\n drawDebugSSRect(painter, 0, y + lineWidth / 2, painter.transform.width, lineWidth, color);\n}\n\nfunction drawVerticalLine(painter: Painter, x: number, lineWidth: number, color: Color) {\n drawDebugSSRect(painter, x - lineWidth / 2, 0, lineWidth, painter.transform.height, color);\n}\n\nfunction drawDebugSSRect(painter: Painter, x: number, y: number, width: number, height: number, color: Color) {\n const context = painter.context;\n const gl = context.gl;\n\n gl.enable(gl.SCISSOR_TEST);\n gl.scissor(x * painter.pixelRatio, y * painter.pixelRatio, width * painter.pixelRatio, height * painter.pixelRatio);\n context.clear({color});\n gl.disable(gl.SCISSOR_TEST);\n}\n\nexport function drawDebug(painter: Painter, tileManager: TileManager, coords: Array) {\n for (let i = 0; i < coords.length; i++) {\n drawDebugTile(painter, tileManager, coords[i]);\n }\n}\n\nfunction drawDebugTile(painter: Painter, tileManager: TileManager, coord: OverscaledTileID) {\n const context = painter.context;\n const gl = context.gl;\n\n const program = painter.useProgram('debug');\n\n const depthMode = DepthMode.disabled;\n const stencilMode = StencilMode.disabled;\n const colorMode = painter.colorModeForRenderPass();\n const id = '$debug';\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n\n context.activeTexture.set(gl.TEXTURE0);\n\n const tileRawData = tileManager.getTileByID(coord.key).latestRawTileData;\n const tileByteLength = (tileRawData && tileRawData.byteLength) || 0;\n const tileSizeKb = Math.floor(tileByteLength / 1024);\n const tileSize = tileManager.getTile(coord).tileSize;\n const scaleRatio = (512 / Math.min(tileSize, 512) * (coord.overscaledZ / painter.transform.zoom)) * 0.5;\n let tileIdText = coord.canonical.toString();\n if (coord.overscaledZ !== coord.canonical.z) {\n tileIdText += ` => ${coord.overscaledZ}`;\n }\n const tileLabel = `${tileIdText} ${tileSizeKb}kB`;\n drawTextToOverlay(painter, tileLabel);\n\n const projectionData = painter.transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: true, applyTerrainMatrix: true});\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, ColorMode.alphaBlended, CullFaceMode.disabled,\n debugUniformValues(Color.transparent, scaleRatio), null, projectionData, id,\n painter.debugBuffer, painter.quadTriangleIndexBuffer, painter.debugSegments);\n program.draw(context, gl.LINE_STRIP, depthMode, stencilMode, colorMode, CullFaceMode.disabled,\n debugUniformValues(Color.red), terrainData, projectionData, id,\n painter.debugBuffer, painter.tileBorderIndexBuffer, painter.debugSegments);\n}\n\nfunction drawTextToOverlay(painter: Painter, text: string) {\n painter.initDebugOverlayCanvas();\n const canvas = painter.debugOverlayCanvas;\n const gl = painter.context.gl;\n const ctx2d = painter.debugOverlayCanvas.getContext('2d');\n ctx2d.clearRect(0, 0, canvas.width, canvas.height);\n\n ctx2d.shadowColor = 'white';\n ctx2d.shadowBlur = 2;\n ctx2d.lineWidth = 1.5;\n ctx2d.strokeStyle = 'white';\n ctx2d.textBaseline = 'top';\n ctx2d.font = `bold ${36}px Open Sans, sans-serif`;\n ctx2d.fillText(text, 5, 5);\n ctx2d.strokeText(text, 5, 5);\n\n painter.debugOverlayTexture.update(canvas);\n painter.debugOverlayTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n}\n\nexport function selectDebugSource(style: Style, zoom: number): TileManager | null {\n // Use vector source with highest maxzoom\n // Else use source with highest maxzoom of any type\n let selectedSource: TileManager = null;\n const layers = Object.values(style._layers);\n const sources = layers.flatMap((layer) => {\n if (layer.source && !layer.isHidden(zoom)) {\n const tileManager = style.tileManagers[layer.source];\n return [tileManager];\n } else {\n return [];\n }\n });\n const vectorSources = sources.filter((source) => source.getSource().type === 'vector');\n const otherSources = sources.filter((source) => source.getSource().type !== 'vector');\n const considerSource = (source: TileManager) => {\n if (!selectedSource || (selectedSource.getSource().maxzoom < source.getSource().maxzoom)) {\n selectedSource = source;\n }\n };\n vectorSources.forEach((source) => considerSource(source));\n if (!selectedSource) {\n otherSources.forEach((source) => considerSource(source));\n }\n return selectedSource;\n}\n","import {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {terrainUniformValues, terrainDepthUniformValues, terrainCoordsUniformValues} from './program/terrain_program';\nimport type {Painter, RenderOptions} from './painter';\nimport type {Tile} from '../tile/tile';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {ColorMode} from '../gl/color_mode';\nimport {type Terrain} from './terrain';\n\n/**\n * Redraw the Depth Framebuffer\n * @param painter - the painter\n * @param terrain - the terrain\n */\nfunction drawDepth(painter: Painter, terrain: Terrain) {\n const context = painter.context;\n const gl = context.gl;\n const tr = painter.transform;\n const colorMode = ColorMode.unblended;\n const depthMode = new DepthMode(gl.LEQUAL, DepthMode.ReadWrite, [0, 1]);\n const tiles = terrain.tileManager.getRenderableTiles();\n const program = painter.useProgram('terrainDepth');\n context.bindFramebuffer.set(terrain.getFramebuffer('depth').framebuffer);\n context.viewport.set([0, 0, painter.width / devicePixelRatio, painter.height / devicePixelRatio]);\n context.clear({color: Color.transparent, depth: 1});\n for (const tile of tiles) {\n const mesh = terrain.getTerrainMesh(tile.tileID);\n const terrainData = terrain.getTerrainData(tile.tileID);\n const projectionData = tr.getProjectionData({overscaledTileID: tile.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true});\n const uniformValues = terrainDepthUniformValues(terrain.getMeshFrameDelta(tr.zoom));\n program.draw(context, gl.TRIANGLES, depthMode, StencilMode.disabled, colorMode, CullFaceMode.backCCW, uniformValues, terrainData, projectionData, 'terrain', mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n }\n context.bindFramebuffer.set(null);\n context.viewport.set([0, 0, painter.width, painter.height]);\n}\n\n/**\n * Redraw the Coords Framebuffers\n * @param painter - the painter\n * @param terrain - the terrain\n */\nfunction drawCoords(painter: Painter, terrain: Terrain) {\n const context = painter.context;\n const gl = context.gl;\n const tr = painter.transform;\n const colorMode = ColorMode.unblended;\n const depthMode = new DepthMode(gl.LEQUAL, DepthMode.ReadWrite, [0, 1]);\n const coords = terrain.getCoordsTexture();\n const tiles = terrain.tileManager.getRenderableTiles();\n\n // draw tile-coords into framebuffer\n const program = painter.useProgram('terrainCoords');\n context.bindFramebuffer.set(terrain.getFramebuffer('coords').framebuffer);\n context.viewport.set([0, 0, painter.width / devicePixelRatio, painter.height / devicePixelRatio]);\n context.clear({color: Color.transparent, depth: 1});\n terrain.coordsIndex = [];\n for (const tile of tiles) {\n const mesh = terrain.getTerrainMesh(tile.tileID);\n const terrainData = terrain.getTerrainData(tile.tileID);\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, coords.texture);\n const uniformValues = terrainCoordsUniformValues(255 - terrain.coordsIndex.length, terrain.getMeshFrameDelta(tr.zoom));\n const projectionData = tr.getProjectionData({overscaledTileID: tile.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true});\n program.draw(context, gl.TRIANGLES, depthMode, StencilMode.disabled, colorMode, CullFaceMode.backCCW, uniformValues, terrainData, projectionData, 'terrain', mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n terrain.coordsIndex.push(tile.tileID.key);\n }\n context.bindFramebuffer.set(null);\n context.viewport.set([0, 0, painter.width, painter.height]);\n}\n\nfunction drawTerrain(painter: Painter, terrain: Terrain, tiles: Array, renderOptions: RenderOptions) {\n const {isRenderingGlobe} = renderOptions;\n const context = painter.context;\n const gl = context.gl;\n const tr = painter.transform;\n const colorMode = painter.colorModeForRenderPass();\n const depthMode = painter.getDepthModeFor3D();\n const program = painter.useProgram('terrain');\n\n context.bindFramebuffer.set(null);\n context.viewport.set([0, 0, painter.width, painter.height]);\n\n for (const tile of tiles) {\n const mesh = terrain.getTerrainMesh(tile.tileID);\n const texture = painter.renderToTexture.getTexture(tile);\n const terrainData = terrain.getTerrainData(tile.tileID);\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, texture.texture);\n const eleDelta = terrain.getMeshFrameDelta(tr.zoom);\n const fogMatrix = tr.calculateFogMatrix(tile.tileID.toUnwrapped());\n const uniformValues = terrainUniformValues(eleDelta, fogMatrix, painter.style.sky, tr.pitch, isRenderingGlobe);\n const projectionData = tr.getProjectionData({overscaledTileID: tile.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true});\n program.draw(context, gl.TRIANGLES, depthMode, StencilMode.disabled, colorMode, CullFaceMode.backCCW, uniformValues, terrainData, projectionData, 'terrain', mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n }\n}\n\nexport {\n drawTerrain,\n drawDepth,\n drawCoords\n};\n","import {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {PosArray, TriangleIndexArray} from '../data/array_types.g';\nimport posAttributes from '../data/pos_attributes';\nimport {SegmentVector} from '../data/segment';\nimport {skyUniformValues} from './program/sky_program';\nimport {atmosphereUniformValues} from './program/atmosphere_program';\nimport {type Sky} from '../style/sky';\nimport {type Light} from '../style/light';\nimport {Mesh} from './mesh';\nimport {mat4, vec3, vec4} from 'gl-matrix';\nimport {type IReadonlyTransform} from '../geo/transform_interface';\nimport {ColorMode} from '../gl/color_mode';\nimport type {Painter} from './painter';\nimport {type Context} from '../gl/context';\nimport {getGlobeRadiusPixels} from '../geo/projection/globe_utils';\n\nfunction getMesh(context: Context, sky: Sky): Mesh {\n // Create the Sky mesh the first time we need it\n if (!sky.mesh) {\n const vertexArray = new PosArray();\n vertexArray.emplaceBack(-1, -1);\n vertexArray.emplaceBack(1, -1);\n vertexArray.emplaceBack(1, 1);\n vertexArray.emplaceBack(-1, 1);\n\n const indexArray = new TriangleIndexArray();\n indexArray.emplaceBack(0, 1, 2);\n indexArray.emplaceBack(0, 2, 3);\n\n sky.mesh = new Mesh(\n context.createVertexBuffer(vertexArray, posAttributes.members),\n context.createIndexBuffer(indexArray),\n SegmentVector.simpleSegment(0, 0, vertexArray.length, indexArray.length)\n );\n }\n\n return sky.mesh;\n}\n\nexport function drawSky(painter: Painter, sky: Sky) {\n const context = painter.context;\n const gl = context.gl;\n\n const skyUniforms = skyUniformValues(sky, painter.style.map.transform, painter.pixelRatio);\n\n const depthMode = new DepthMode(gl.LEQUAL, DepthMode.ReadWrite, [0, 1]);\n const stencilMode = StencilMode.disabled;\n const colorMode = painter.colorModeForRenderPass();\n const program = painter.useProgram('sky');\n\n const mesh = getMesh(context, sky);\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, colorMode,\n CullFaceMode.disabled, skyUniforms, null, undefined, 'sky', mesh.vertexBuffer,\n mesh.indexBuffer, mesh.segments);\n}\n\nfunction getSunPos(light: Light, transform: IReadonlyTransform): vec3 {\n const _lp = light.properties.get('position');\n const lightPos = [-_lp.x, -_lp.y, -_lp.z] as vec3;\n\n const lightMat = mat4.identity(new Float64Array(16) as any);\n\n if (light.properties.get('anchor') === 'map') {\n mat4.rotateZ(lightMat, lightMat, transform.rollInRadians);\n mat4.rotateX(lightMat, lightMat, -transform.pitchInRadians);\n mat4.rotateZ(lightMat, lightMat, transform.bearingInRadians);\n mat4.rotateX(lightMat, lightMat, transform.center.lat * Math.PI / 180.0);\n mat4.rotateY(lightMat, lightMat, -transform.center.lng * Math.PI / 180.0);\n }\n\n vec3.transformMat4(lightPos, lightPos, lightMat);\n\n return lightPos;\n}\n\nexport function drawAtmosphere(painter: Painter, sky: Sky, light: Light) {\n const context = painter.context;\n const gl = context.gl;\n const program = painter.useProgram('atmosphere');\n const depthMode = new DepthMode(gl.LEQUAL, DepthMode.ReadOnly, [0, 1]);\n const transform = painter.transform;\n\n const sunPos = getSunPos(light, painter.transform);\n\n const projectionData = transform.getProjectionData({overscaledTileID: null, applyGlobeMatrix: true, applyTerrainMatrix: true});\n const atmosphereBlend = sky.properties.get('atmosphere-blend') * projectionData.projectionTransition;\n\n if (atmosphereBlend === 0) {\n // Don't draw anything if atmosphere is fully transparent\n return;\n }\n\n const globeRadius = getGlobeRadiusPixels(transform.worldSize, transform.center.lat);\n const invProjMatrix = transform.inverseProjectionMatrix;\n const vec = new Float64Array(4) as any as vec4;\n vec[3] = 1;\n vec4.transformMat4(vec, vec, transform.modelViewProjectionMatrix);\n vec[0] /= vec[3];\n vec[1] /= vec[3];\n vec[2] /= vec[3];\n vec[3] = 1;\n vec4.transformMat4(vec, vec, invProjMatrix);\n vec[0] /= vec[3];\n vec[1] /= vec[3];\n vec[2] /= vec[3];\n vec[3] = 1;\n const globePosition = [vec[0], vec[1], vec[2]] as vec3;\n\n const uniformValues = atmosphereUniformValues(sunPos, atmosphereBlend, globePosition, globeRadius, invProjMatrix);\n\n const mesh = getMesh(context, sky);\n\n program.draw(context, gl.TRIANGLES, depthMode, StencilMode.disabled, ColorMode.alphaBlended, CullFaceMode.disabled, uniformValues, null, null, 'atmosphere', mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n}\n","import {now} from '../util/time_control';\nimport {mat4} from 'gl-matrix';\nimport {TileManager} from '../tile/tile_manager';\nimport {EXTENT} from '../data/extent';\nimport {SegmentVector} from '../data/segment';\nimport {RasterBoundsArray, PosArray, TriangleIndexArray, LineStripIndexArray} from '../data/array_types.g';\nimport rasterBoundsAttributes from '../data/raster_bounds_attributes';\nimport posAttributes from '../data/pos_attributes';\nimport {type ProgramConfiguration} from '../data/program_configuration';\nimport {CrossTileSymbolIndex} from '../symbol/cross_tile_symbol_index';\nimport {shaders} from '../shaders/shaders';\nimport {Program} from './program';\nimport {programUniforms} from './program/program_uniforms';\nimport {Context} from '../gl/context';\nimport {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\nimport {ColorMode} from '../gl/color_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {Texture} from './texture';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {drawSymbols} from './draw_symbol';\nimport {drawCircles} from './draw_circle';\nimport {drawHeatmap} from './draw_heatmap';\nimport {drawLine} from './draw_line';\nimport {drawFill} from './draw_fill';\nimport {drawFillExtrusion} from './draw_fill_extrusion';\nimport {drawHillshade} from './draw_hillshade';\nimport {drawColorRelief} from './draw_color_relief';\nimport {drawRaster} from './draw_raster';\nimport {drawBackground} from './draw_background';\nimport {drawDebug, drawDebugPadding, selectDebugSource} from './draw_debug';\nimport {drawCustom} from './draw_custom';\nimport {drawDepth, drawCoords} from './draw_terrain';\nimport {type OverscaledTileID} from '../tile/tile_id';\nimport {drawSky, drawAtmosphere} from './draw_sky';\nimport {Mesh} from './mesh';\nimport {MercatorShaderDefine, MercatorShaderVariantKey} from '../geo/projection/mercator_projection';\n\nimport type {IReadonlyTransform} from '../geo/transform_interface';\nimport type {Style} from '../style/style';\nimport type {StyleLayer} from '../style/style_layer';\nimport type {CrossFaded} from '../style/properties';\nimport type {LineAtlas} from './line_atlas';\nimport type {ImageManager} from './image_manager';\nimport type {GlyphManager} from './glyph_manager';\nimport type {VertexBuffer} from '../gl/vertex_buffer';\nimport type {IndexBuffer} from '../gl/index_buffer';\nimport type {DepthRangeType, DepthMaskType, DepthFuncType} from '../gl/types';\nimport type {ResolvedImage} from '@maplibre/maplibre-gl-style-spec';\nimport type {RenderToTexture} from './render_to_texture';\nimport type {ProjectionData} from '../geo/projection/projection_data';\nimport {coveringTiles} from '../geo/projection/covering_tiles';\nimport {isSymbolStyleLayer} from '../style/style_layer/symbol_style_layer';\nimport {isCircleStyleLayer} from '../style/style_layer/circle_style_layer';\nimport {isHeatmapStyleLayer} from '../style/style_layer/heatmap_style_layer';\nimport {isLineStyleLayer} from '../style/style_layer/line_style_layer';\nimport {isFillStyleLayer} from '../style/style_layer/fill_style_layer';\nimport {isFillExtrusionStyleLayer} from '../style/style_layer/fill_extrusion_style_layer';\nimport {isHillshadeStyleLayer} from '../style/style_layer/hillshade_style_layer';\nimport {isColorReliefStyleLayer} from '../style/style_layer/color_relief_style_layer';\nimport {isRasterStyleLayer} from '../style/style_layer/raster_style_layer';\nimport {isBackgroundStyleLayer} from '../style/style_layer/background_style_layer';\nimport {isCustomStyleLayer} from '../style/style_layer/custom_style_layer';\n\nexport type RenderPass = 'offscreen' | 'opaque' | 'translucent';\n\ntype PainterOptions = {\n showOverdrawInspector: boolean;\n showTileBoundaries: boolean;\n showPadding: boolean;\n rotating: boolean;\n zooming: boolean;\n moving: boolean;\n fadeDuration: number;\n};\n\nexport type RenderOptions = {\n isRenderingToTexture: boolean;\n isRenderingGlobe: boolean;\n};\n\n/**\n * @internal\n * Initialize a new painter object.\n */\nexport class Painter {\n context: Context;\n transform: IReadonlyTransform;\n renderToTexture: RenderToTexture;\n _tileTextures: {\n [_: number]: Array;\n };\n numSublayers: number;\n depthEpsilon: number;\n emptyProgramConfiguration: ProgramConfiguration;\n width: number;\n height: number;\n pixelRatio: number;\n tileExtentBuffer: VertexBuffer;\n tileExtentSegments: SegmentVector;\n tileExtentMesh: Mesh;\n\n debugBuffer: VertexBuffer;\n debugSegments: SegmentVector;\n rasterBoundsBuffer: VertexBuffer;\n rasterBoundsSegments: SegmentVector;\n rasterBoundsBufferPosOnly: VertexBuffer;\n rasterBoundsSegmentsPosOnly: SegmentVector;\n viewportBuffer: VertexBuffer;\n viewportSegments: SegmentVector;\n quadTriangleIndexBuffer: IndexBuffer;\n tileBorderIndexBuffer: IndexBuffer;\n _tileClippingMaskIDs: {[_: string]: number};\n stencilClearMode: StencilMode;\n style: Style;\n options: PainterOptions;\n lineAtlas: LineAtlas;\n imageManager: ImageManager;\n glyphManager: GlyphManager;\n depthRangeFor3D: DepthRangeType;\n opaquePassCutoff: number;\n renderPass: RenderPass;\n currentLayer: number;\n currentStencilSource: string;\n nextStencilID: number;\n id: string;\n _showOverdrawInspector: boolean;\n cache: {[_: string]: Program};\n crossTileSymbolIndex: CrossTileSymbolIndex;\n symbolFadeChange: number;\n debugOverlayTexture: Texture;\n debugOverlayCanvas: HTMLCanvasElement;\n // this object stores the current camera-matrix and the last render time\n // of the terrain-facilitators. e.g. depth & coords framebuffers\n // every time the camera-matrix changes the terrain-facilitators will be redrawn.\n terrainFacilitator: {dirty: boolean; matrix: mat4; renderTime: number};\n\n constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, transform: IReadonlyTransform) {\n this.context = new Context(gl);\n this.transform = transform;\n this._tileTextures = {};\n this.terrainFacilitator = {dirty: true, matrix: mat4.identity(new Float64Array(16) as any), renderTime: 0};\n\n this.setup();\n\n // Within each layer there are multiple distinct z-planes that can be drawn to.\n // This is implemented using the WebGL depth buffer.\n this.numSublayers = TileManager.maxOverzooming + TileManager.maxUnderzooming + 1;\n this.depthEpsilon = 1 / Math.pow(2, 16);\n\n this.crossTileSymbolIndex = new CrossTileSymbolIndex();\n }\n\n /*\n * Update the GL viewport, projection matrix, and transforms to compensate\n * for a new width and height value.\n */\n resize(width: number, height: number, pixelRatio: number) {\n this.width = Math.floor(width * pixelRatio);\n this.height = Math.floor(height * pixelRatio);\n this.pixelRatio = pixelRatio;\n this.context.viewport.set([0, 0, this.width, this.height]);\n\n if (this.style) {\n for (const layerId of this.style._order) {\n this.style._layers[layerId].resize();\n }\n }\n }\n\n setup() {\n const context = this.context;\n\n const tileExtentArray = new PosArray();\n tileExtentArray.emplaceBack(0, 0);\n tileExtentArray.emplaceBack(EXTENT, 0);\n tileExtentArray.emplaceBack(0, EXTENT);\n tileExtentArray.emplaceBack(EXTENT, EXTENT);\n this.tileExtentBuffer = context.createVertexBuffer(tileExtentArray, posAttributes.members);\n this.tileExtentSegments = SegmentVector.simpleSegment(0, 0, 4, 2);\n\n const debugArray = new PosArray();\n debugArray.emplaceBack(0, 0);\n debugArray.emplaceBack(EXTENT, 0);\n debugArray.emplaceBack(0, EXTENT);\n debugArray.emplaceBack(EXTENT, EXTENT);\n this.debugBuffer = context.createVertexBuffer(debugArray, posAttributes.members);\n this.debugSegments = SegmentVector.simpleSegment(0, 0, 4, 5);\n\n const rasterBoundsArray = new RasterBoundsArray();\n rasterBoundsArray.emplaceBack(0, 0, 0, 0);\n rasterBoundsArray.emplaceBack(EXTENT, 0, EXTENT, 0);\n rasterBoundsArray.emplaceBack(0, EXTENT, 0, EXTENT);\n rasterBoundsArray.emplaceBack(EXTENT, EXTENT, EXTENT, EXTENT);\n this.rasterBoundsBuffer = context.createVertexBuffer(rasterBoundsArray, rasterBoundsAttributes.members);\n this.rasterBoundsSegments = SegmentVector.simpleSegment(0, 0, 4, 2);\n\n const rasterBoundsArrayPosOnly = new PosArray();\n rasterBoundsArrayPosOnly.emplaceBack(0, 0);\n rasterBoundsArrayPosOnly.emplaceBack(EXTENT, 0);\n rasterBoundsArrayPosOnly.emplaceBack(0, EXTENT);\n rasterBoundsArrayPosOnly.emplaceBack(EXTENT, EXTENT);\n this.rasterBoundsBufferPosOnly = context.createVertexBuffer(rasterBoundsArrayPosOnly, posAttributes.members);\n this.rasterBoundsSegmentsPosOnly = SegmentVector.simpleSegment(0, 0, 4, 5);\n\n const viewportArray = new PosArray();\n viewportArray.emplaceBack(0, 0);\n viewportArray.emplaceBack(1, 0);\n viewportArray.emplaceBack(0, 1);\n viewportArray.emplaceBack(1, 1);\n this.viewportBuffer = context.createVertexBuffer(viewportArray, posAttributes.members);\n this.viewportSegments = SegmentVector.simpleSegment(0, 0, 4, 2);\n\n const tileLineStripIndices = new LineStripIndexArray();\n tileLineStripIndices.emplaceBack(0);\n tileLineStripIndices.emplaceBack(1);\n tileLineStripIndices.emplaceBack(3);\n tileLineStripIndices.emplaceBack(2);\n tileLineStripIndices.emplaceBack(0);\n this.tileBorderIndexBuffer = context.createIndexBuffer(tileLineStripIndices);\n\n const quadTriangleIndices = new TriangleIndexArray();\n quadTriangleIndices.emplaceBack(1, 0, 2);\n quadTriangleIndices.emplaceBack(1, 2, 3);\n this.quadTriangleIndexBuffer = context.createIndexBuffer(quadTriangleIndices);\n\n const gl = this.context.gl;\n this.stencilClearMode = new StencilMode({func: gl.ALWAYS, mask: 0}, 0x0, 0xFF, gl.ZERO, gl.ZERO, gl.ZERO);\n\n this.tileExtentMesh = new Mesh(this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);\n }\n\n /*\n * Reset the drawing canvas by clearing the stencil buffer so that we can draw\n * new tiles at the same location, while retaining previously drawn pixels.\n */\n clearStencil() {\n const context = this.context;\n const gl = context.gl;\n\n this.nextStencilID = 1;\n this.currentStencilSource = undefined;\n\n // As a temporary workaround for https://github.com/mapbox/mapbox-gl-js/issues/5490,\n // pending an upstream fix, we draw a fullscreen stencil=0 clipping mask here,\n // effectively clearing the stencil buffer: once an upstream patch lands, remove\n // this function in favor of context.clear({ stencil: 0x0 })\n\n const matrix = mat4.create();\n mat4.ortho(matrix, 0, this.width, this.height, 0, 0, 1);\n mat4.scale(matrix, matrix, [gl.drawingBufferWidth, gl.drawingBufferHeight, 0]);\n\n const projectionData: ProjectionData = {\n mainMatrix: matrix,\n tileMercatorCoords: [0, 0, 1, 1],\n clippingPlane: [0, 0, 0, 0],\n projectionTransition: 0.0,\n fallbackMatrix: matrix,\n };\n\n // Note: we force a simple mercator projection for the shader, since we want to draw a fullscreen quad.\n this.useProgram('clippingMask', null, true).draw(context, gl.TRIANGLES,\n DepthMode.disabled, this.stencilClearMode, ColorMode.disabled, CullFaceMode.disabled,\n null, null, projectionData,\n '$clipping', this.viewportBuffer,\n this.quadTriangleIndexBuffer, this.viewportSegments);\n }\n\n _renderTileClippingMasks(layer: StyleLayer, tileIDs: Array, renderToTexture: boolean) {\n if (this.currentStencilSource === layer.source || !layer.isTileClipped() || !tileIDs || !tileIDs.length) {\n return;\n }\n\n this.currentStencilSource = layer.source;\n\n if (this.nextStencilID + tileIDs.length > 256) {\n // we'll run out of fresh IDs so we need to clear and start from scratch\n this.clearStencil();\n }\n\n const context = this.context;\n context.setColorMode(ColorMode.disabled);\n context.setDepthMode(DepthMode.disabled);\n\n const stencilRefs = {};\n\n // Set stencil ref values for all tiles\n for (const tileID of tileIDs) {\n stencilRefs[tileID.key] = this.nextStencilID++;\n }\n\n // A two-pass approach is needed. See comment in draw_raster.ts for more details.\n // However, we use a simpler approach because we don't care about overdraw here.\n\n // First pass - draw tiles with borders and with GL_ALWAYS\n this._renderTileMasks(stencilRefs, tileIDs, renderToTexture, true);\n // Second pass - draw borderless tiles with GL_ALWAYS\n this._renderTileMasks(stencilRefs, tileIDs, renderToTexture, false);\n\n this._tileClippingMaskIDs = stencilRefs;\n }\n\n _renderTileMasks(tileStencilRefs: {[_: string]: number}, tileIDs: Array, renderToTexture: boolean, useBorders: boolean) {\n const context = this.context;\n const gl = context.gl;\n const projection = this.style.projection;\n const transform = this.transform;\n\n const program = this.useProgram('clippingMask');\n\n // tiles are usually supplied in ascending order of z, then y, then x\n for (const tileID of tileIDs) {\n const stencilRef = tileStencilRefs[tileID.key];\n const terrainData = this.style.map.terrain && this.style.map.terrain.getTerrainData(tileID);\n\n const mesh = projection.getMeshFromTileID(this.context, tileID.canonical, useBorders, true, 'stencil');\n\n const projectionData = transform.getProjectionData({overscaledTileID: tileID, applyGlobeMatrix: !renderToTexture, applyTerrainMatrix: true});\n\n program.draw(context, gl.TRIANGLES, DepthMode.disabled,\n // Tests will always pass, and ref value will be written to stencil buffer.\n new StencilMode({func: gl.ALWAYS, mask: 0}, stencilRef, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE),\n ColorMode.disabled, renderToTexture ? CullFaceMode.disabled : CullFaceMode.backCCW, null,\n terrainData, projectionData, '$clipping', mesh.vertexBuffer,\n mesh.indexBuffer, mesh.segments);\n }\n }\n\n /**\n * Fills the depth buffer with the geometry of all supplied tiles.\n * Does not change the color buffer or the stencil buffer.\n */\n _renderTilesDepthBuffer() {\n const context = this.context;\n const gl = context.gl;\n const projection = this.style.projection;\n const transform = this.transform;\n\n const program = this.useProgram('depth');\n const depthMode = this.getDepthModeFor3D();\n const tileIDs = coveringTiles(transform, {tileSize: transform.tileSize});\n\n // tiles are usually supplied in ascending order of z, then y, then x\n for (const tileID of tileIDs) {\n const terrainData = this.style.map.terrain && this.style.map.terrain.getTerrainData(tileID);\n const mesh = projection.getMeshFromTileID(this.context, tileID.canonical, true, true, 'raster');\n\n const projectionData = transform.getProjectionData({overscaledTileID: tileID, applyGlobeMatrix: true, applyTerrainMatrix: true});\n\n program.draw(context, gl.TRIANGLES, depthMode, StencilMode.disabled,\n ColorMode.disabled, CullFaceMode.backCCW, null,\n terrainData, projectionData, '$clipping', mesh.vertexBuffer,\n mesh.indexBuffer, mesh.segments);\n }\n }\n\n stencilModeFor3D(): StencilMode {\n this.currentStencilSource = undefined;\n\n if (this.nextStencilID + 1 > 256) {\n this.clearStencil();\n }\n\n const id = this.nextStencilID++;\n const gl = this.context.gl;\n return new StencilMode({func: gl.NOTEQUAL, mask: 0xFF}, id, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE);\n }\n\n stencilModeForClipping(tileID: OverscaledTileID): StencilMode {\n const gl = this.context.gl;\n return new StencilMode({func: gl.EQUAL, mask: 0xFF}, this._tileClippingMaskIDs[tileID.key], 0x00, gl.KEEP, gl.KEEP, gl.REPLACE);\n }\n\n /*\n * Sort coordinates by Z as drawing tiles is done in Z-descending order.\n * All children with the same Z write the same stencil value. Children\n * stencil values are greater than parent's. This is used only for raster\n * and raster-dem tiles, which are already clipped to tile boundaries, to\n * mask area of tile overlapped by children tiles.\n * Stencil ref values continue range used in _tileClippingMaskIDs.\n *\n * Attention: This function changes this.nextStencilID even if the result of it\n * is not used, which might cause problems when rendering due to invalid stencil\n * values.\n * Returns [StencilMode for tile overscaleZ map, sortedCoords].\n */\n getStencilConfigForOverlapAndUpdateStencilID(tileIDs: Array): [{\n [_: number]: Readonly;\n }, Array] {\n const gl = this.context.gl;\n const coords = tileIDs.sort((a, b) => b.overscaledZ - a.overscaledZ);\n const minTileZ = coords[coords.length - 1].overscaledZ;\n const stencilValues = coords[0].overscaledZ - minTileZ + 1;\n if (stencilValues > 1) {\n this.currentStencilSource = undefined;\n if (this.nextStencilID + stencilValues > 256) {\n this.clearStencil();\n }\n const zToStencilMode = {};\n for (let i = 0; i < stencilValues; i++) {\n zToStencilMode[i + minTileZ] = new StencilMode({func: gl.GEQUAL, mask: 0xFF}, i + this.nextStencilID, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE);\n }\n this.nextStencilID += stencilValues;\n return [zToStencilMode, coords];\n }\n return [{[minTileZ]: StencilMode.disabled}, coords];\n }\n\n stencilConfigForOverlapTwoPass(tileIDs: Array): [\n { [_: number]: Readonly }, // borderless tiles - high priority & high stencil values\n { [_: number]: Readonly }, // tiles with border - low priority\n Array\n ] {\n const gl = this.context.gl;\n const coords = tileIDs.sort((a, b) => b.overscaledZ - a.overscaledZ);\n const minTileZ = coords[coords.length - 1].overscaledZ;\n const stencilValues = coords[0].overscaledZ - minTileZ + 1;\n\n this.clearStencil();\n\n if (stencilValues > 1) {\n const zToStencilModeHigh = {};\n const zToStencilModeLow = {};\n for (let i = 0; i < stencilValues; i++) {\n zToStencilModeHigh[i + minTileZ] = new StencilMode({func: gl.GREATER, mask: 0xFF}, stencilValues + 1 + i, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE);\n zToStencilModeLow[i + minTileZ] = new StencilMode({func: gl.GREATER, mask: 0xFF}, 1 + i, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE);\n }\n this.nextStencilID = stencilValues * 2 + 1;\n return [\n zToStencilModeHigh,\n zToStencilModeLow,\n coords\n ];\n } else {\n this.nextStencilID = 3;\n return [\n {[minTileZ]: new StencilMode({func: gl.GREATER, mask: 0xFF}, 2, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE)},\n {[minTileZ]: new StencilMode({func: gl.GREATER, mask: 0xFF}, 1, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE)},\n coords\n ];\n }\n }\n\n colorModeForRenderPass(): Readonly {\n const gl = this.context.gl;\n if (this._showOverdrawInspector) {\n const numOverdrawSteps = 8;\n const a = 1 / numOverdrawSteps;\n\n return new ColorMode([gl.CONSTANT_COLOR, gl.ONE], new Color(a, a, a, 0), [true, true, true, true]);\n } else if (this.renderPass === 'opaque') {\n return ColorMode.unblended;\n } else {\n return ColorMode.alphaBlended;\n }\n }\n\n getDepthModeForSublayer(n: number, mask: DepthMaskType, func?: DepthFuncType | null): Readonly {\n if (!this.opaquePassEnabledForLayer()) return DepthMode.disabled;\n const depth = 1 - ((1 + this.currentLayer) * this.numSublayers + n) * this.depthEpsilon;\n return new DepthMode(func || this.context.gl.LEQUAL, mask, [depth, depth]);\n }\n\n getDepthModeFor3D(): Readonly {\n return new DepthMode(this.context.gl.LEQUAL, DepthMode.ReadWrite, this.depthRangeFor3D);\n }\n\n /*\n * The opaque pass and 3D layers both use the depth buffer.\n * Layers drawn above 3D layers need to be drawn using the\n * painter's algorithm so that they appear above 3D features.\n * This returns true for layers that can be drawn using the\n * opaque pass.\n */\n opaquePassEnabledForLayer() {\n return this.currentLayer < this.opaquePassCutoff;\n }\n\n render(style: Style, options: PainterOptions) {\n this.style = style;\n this.options = options;\n\n this.lineAtlas = style.lineAtlas;\n this.imageManager = style.imageManager;\n this.glyphManager = style.glyphManager;\n\n this.symbolFadeChange = style.placement.symbolFadeChange(now());\n\n this.imageManager.beginFrame();\n\n const layerIds = this.style._order;\n const tileManagers = this.style.tileManagers;\n\n const coordsAscending: {[_: string]: Array} = {};\n const coordsDescending: {[_: string]: Array} = {};\n const coordsDescendingSymbol: {[_: string]: Array} = {};\n const renderOptions: RenderOptions = {isRenderingToTexture: false, isRenderingGlobe: style.projection?.transitionState > 0};\n\n for (const id in tileManagers) {\n const tileManager = tileManagers[id];\n if (tileManager.used) {\n tileManager.prepare(this.context);\n }\n\n coordsAscending[id] = tileManager.getVisibleCoordinates(false);\n coordsDescending[id] = coordsAscending[id].slice().reverse();\n coordsDescendingSymbol[id] = tileManager.getVisibleCoordinates(true).reverse();\n }\n\n this.opaquePassCutoff = Infinity;\n for (let i = 0; i < layerIds.length; i++) {\n const layerId = layerIds[i];\n if (this.style._layers[layerId].is3D()) {\n this.opaquePassCutoff = i;\n break;\n }\n }\n\n this.maybeDrawDepthAndCoords(false);\n\n if (this.renderToTexture) {\n this.renderToTexture.prepareForRender(this.style, this.transform.zoom);\n // this is disabled, because render-to-texture is rendering all layers from bottom to top.\n this.opaquePassCutoff = 0;\n }\n\n // Offscreen pass ===============================================\n // We first do all rendering that requires rendering to a separate\n // framebuffer, and then save those for rendering back to the map\n // later: in doing this we avoid doing expensive framebuffer restores.\n this.renderPass = 'offscreen';\n\n for (const layerId of layerIds) {\n const layer = this.style._layers[layerId];\n if (!layer.hasOffscreenPass() || layer.isHidden(this.transform.zoom)) continue;\n\n const coords = coordsDescending[layer.source];\n if (layer.type !== 'custom' && !coords.length) continue;\n\n this.renderLayer(this, tileManagers[layer.source], layer, coords, renderOptions);\n }\n\n // Execute offscreen GPU tasks of the projection manager\n this.style.projection?.updateGPUdependent({\n context: this.context,\n useProgram: (name: string) => this.useProgram(name)\n });\n\n // Rebind the main framebuffer now that all offscreen layers have been rendered:\n this.context.viewport.set([0, 0, this.width, this.height]);\n this.context.bindFramebuffer.set(null);\n\n // Clear buffers in preparation for drawing to the main framebuffer\n this.context.clear({color: options.showOverdrawInspector ? Color.black : Color.transparent, depth: 1});\n this.clearStencil();\n\n // draw sky first to not overwrite symbols\n if (this.style.sky) drawSky(this, this.style.sky);\n\n this._showOverdrawInspector = options.showOverdrawInspector;\n this.depthRangeFor3D = [0, 1 - ((style._order.length + 2) * this.numSublayers * this.depthEpsilon)];\n\n // Opaque pass ===============================================\n // Draw opaque layers top-to-bottom first.\n if (!this.renderToTexture) {\n this.renderPass = 'opaque';\n\n for (this.currentLayer = layerIds.length - 1; this.currentLayer >= 0; this.currentLayer--) {\n const layer = this.style._layers[layerIds[this.currentLayer]];\n const tileManager = tileManagers[layer.source];\n const coords = coordsAscending[layer.source];\n\n this._renderTileClippingMasks(layer, coords, false);\n this.renderLayer(this, tileManager, layer, coords, renderOptions);\n }\n }\n\n // Translucent pass ===============================================\n // Draw all other layers bottom-to-top.\n this.renderPass = 'translucent';\n\n let globeDepthRendered = false;\n\n for (this.currentLayer = 0; this.currentLayer < layerIds.length; this.currentLayer++) {\n const layer = this.style._layers[layerIds[this.currentLayer]];\n const tileManager = tileManagers[layer.source];\n\n if (this.renderToTexture && this.renderToTexture.renderLayer(layer, renderOptions)) continue;\n\n if (!this.opaquePassEnabledForLayer() && !globeDepthRendered) {\n globeDepthRendered = true;\n // Render the globe sphere into the depth buffer - but only if globe is enabled and terrain is disabled.\n // There should be no need for explicitly writing tile depths when terrain is enabled.\n if (renderOptions.isRenderingGlobe && !this.style.map.terrain) {\n this._renderTilesDepthBuffer();\n }\n }\n\n // For symbol layers in the translucent pass, we add extra tiles to the renderable set\n // for cross-tile symbol fading. Symbol layers don't use tile clipping, so no need to render\n // separate clipping masks\n const coords = (layer.type === 'symbol' ? coordsDescendingSymbol : coordsDescending)[layer.source];\n\n this._renderTileClippingMasks(layer, coordsAscending[layer.source], !!this.renderToTexture);\n this.renderLayer(this, tileManager, layer, coords, renderOptions);\n }\n\n // Render atmosphere, only for Globe projection\n if (renderOptions.isRenderingGlobe) {\n drawAtmosphere(this, this.style.sky, this.style.light);\n }\n\n if (this.options.showTileBoundaries) {\n const selectedSource = selectDebugSource(this.style, this.transform.zoom);\n if (selectedSource) {\n drawDebug(this, selectedSource, selectedSource.getVisibleCoordinates());\n }\n }\n\n if (this.options.showPadding) {\n drawDebugPadding(this);\n }\n\n // Set defaults for most GL values so that anyone using the state after the render\n // encounters more expected values.\n this.context.setDefault();\n }\n\n /**\n * Update the depth and coords framebuffers, if the contents of those frame buffers is out of date.\n * If requireExact is false, then the contents of those frame buffers is not updated if it is close\n * to accurate (that is, the camera has not moved much since it was updated last).\n */\n maybeDrawDepthAndCoords(requireExact: boolean) {\n if (!this.style || !this.style.map || !this.style.map.terrain) {\n return;\n }\n const prevMatrix = this.terrainFacilitator.matrix;\n const currMatrix = this.transform.modelViewProjectionMatrix;\n\n // Update coords/depth-framebuffer on camera movement, or tile reloading\n let doUpdate = this.terrainFacilitator.dirty;\n doUpdate ||= requireExact ? !mat4.exactEquals(prevMatrix, currMatrix) : !mat4.equals(prevMatrix, currMatrix);\n doUpdate ||= this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime);\n\n if (!doUpdate) {\n return;\n }\n\n mat4.copy(prevMatrix, currMatrix);\n this.terrainFacilitator.renderTime = Date.now();\n this.terrainFacilitator.dirty = false;\n drawDepth(this, this.style.map.terrain);\n drawCoords(this, this.style.map.terrain);\n }\n\n renderLayer(painter: Painter, tileManager: TileManager, layer: StyleLayer, coords: Array, renderOptions: RenderOptions) {\n if (layer.isHidden(this.transform.zoom)) return;\n if (layer.type !== 'background' && layer.type !== 'custom' && !(coords || []).length) return;\n this.id = layer.id;\n\n if (isSymbolStyleLayer(layer)) {\n drawSymbols(painter, tileManager, layer, coords, this.style.placement.variableOffsets, renderOptions);\n } else if (isCircleStyleLayer(layer)) {\n drawCircles(painter, tileManager, layer, coords, renderOptions);\n } else if (isHeatmapStyleLayer(layer)) {\n drawHeatmap(painter, tileManager, layer, coords, renderOptions);\n } else if (isLineStyleLayer(layer)) {\n drawLine(painter, tileManager, layer, coords, renderOptions);\n } else if (isFillStyleLayer(layer)) {\n drawFill(painter, tileManager, layer, coords, renderOptions);\n } else if (isFillExtrusionStyleLayer(layer)) {\n drawFillExtrusion(painter, tileManager, layer, coords, renderOptions);\n } else if (isHillshadeStyleLayer(layer)) {\n drawHillshade(painter, tileManager, layer, coords, renderOptions);\n } else if (isColorReliefStyleLayer(layer)) {\n drawColorRelief(painter, tileManager, layer, coords, renderOptions);\n } else if (isRasterStyleLayer(layer)) {\n drawRaster(painter, tileManager, layer, coords, renderOptions);\n } else if (isBackgroundStyleLayer(layer)) {\n drawBackground(painter, tileManager, layer, coords, renderOptions);\n } else if (isCustomStyleLayer(layer)) {\n drawCustom(painter, tileManager, layer, renderOptions);\n }\n }\n\n saveTileTexture(texture: Texture) {\n const textures = this._tileTextures[texture.size[0]];\n if (!textures) {\n this._tileTextures[texture.size[0]] = [texture];\n } else {\n textures.push(texture);\n }\n }\n\n getTileTexture(size: number) {\n const textures = this._tileTextures[size];\n return textures && textures.length > 0 ? textures.pop() : null;\n }\n\n /**\n * Checks whether a pattern image is needed, and if it is, whether it is not loaded.\n *\n * @returns true if a needed image is missing and rendering needs to be skipped.\n */\n isPatternMissing(image?: CrossFaded | null): boolean {\n if (!image) return false;\n if (!image.from || !image.to) return true;\n const imagePosA = this.imageManager.getPattern(image.from.toString());\n const imagePosB = this.imageManager.getPattern(image.to.toString());\n return !imagePosA || !imagePosB;\n }\n\n /**\n * Finds the required shader and its variant (base/terrain/globe, etc.) and binds it, compiling a new shader if required.\n * @param name - Name of the desired shader.\n * @param programConfiguration - Configuration of shader's inputs.\n * @param forceSimpleProjection - Whether to force the use of a shader variant with simple mercator projection vertex shader.\n * @param defines - Additional macros to be injected at the beginning of the shader. Expected format is `['#define XYZ']`, etc.\n * False by default. Use true when drawing with a simple projection matrix is desired, eg. when drawing a fullscreen quad.\n * @returns\n */\n useProgram(name: string, programConfiguration?: ProgramConfiguration | null, forceSimpleProjection: boolean = false, defines: Array = []): Program {\n this.cache = this.cache || {};\n const useTerrain = !!this.style.map.terrain;\n\n const projection = this.style.projection;\n\n const projectionPrelude = forceSimpleProjection ? shaders.projectionMercator : projection.shaderPreludeCode;\n const projectionDefine = forceSimpleProjection ? MercatorShaderDefine : projection.shaderDefine;\n const projectionKey = `/${forceSimpleProjection ? MercatorShaderVariantKey : projection.shaderVariantName}`;\n\n const configurationKey = (programConfiguration ? programConfiguration.cacheKey : '');\n const overdrawKey = (this._showOverdrawInspector ? '/overdraw' : '');\n const terrainKey = (useTerrain ? '/terrain' : '');\n const definesKey = (defines ? `/${defines.join('/')}` : '');\n\n const key = name + configurationKey + projectionKey + overdrawKey + terrainKey + definesKey;\n\n if (!this.cache[key]) {\n this.cache[key] = new Program(\n this.context,\n shaders[name],\n programConfiguration,\n programUniforms[name],\n this._showOverdrawInspector,\n useTerrain,\n projectionPrelude,\n projectionDefine,\n defines\n );\n }\n return this.cache[key];\n }\n\n /*\n * Reset some GL state to default values to avoid hard-to-debug bugs\n * in custom layers.\n */\n setCustomLayerDefaults() {\n // Prevent custom layers from unintentionally modify the last VAO used.\n // All other state is state is restored on it's own, but for VAOs it's\n // simpler to unbind so that we don't have to track the state of VAOs.\n this.context.unbindVAO();\n\n // The default values for this state is meaningful and often expected.\n // Leaving this state dirty could cause a lot of confusion for users.\n this.context.cullFace.setDefault();\n this.context.activeTexture.setDefault();\n this.context.pixelStoreUnpack.setDefault();\n this.context.pixelStoreUnpackPremultiplyAlpha.setDefault();\n this.context.pixelStoreUnpackFlipY.setDefault();\n }\n\n /*\n * Set GL state that is shared by all layers.\n */\n setBaseState() {\n const gl = this.context.gl;\n this.context.cullFace.set(false);\n this.context.viewport.set([0, 0, this.width, this.height]);\n this.context.blendEquation.set(gl.FUNC_ADD);\n }\n\n initDebugOverlayCanvas() {\n if (this.debugOverlayCanvas == null) {\n this.debugOverlayCanvas = document.createElement('canvas');\n this.debugOverlayCanvas.width = 512;\n this.debugOverlayCanvas.height = 512;\n const gl = this.context.gl;\n this.debugOverlayTexture = new Texture(this.context, this.debugOverlayCanvas, gl.RGBA);\n }\n }\n\n destroy() {\n if (this._tileTextures) {\n for (const size in this._tileTextures) {\n const textures = this._tileTextures[size];\n if (textures) {\n for (const texture of textures) {\n texture.destroy();\n }\n }\n }\n this._tileTextures = {};\n }\n\n if (this.tileExtentBuffer) this.tileExtentBuffer.destroy();\n if (this.debugBuffer) this.debugBuffer.destroy();\n if (this.rasterBoundsBuffer) this.rasterBoundsBuffer.destroy();\n if (this.rasterBoundsBufferPosOnly) this.rasterBoundsBufferPosOnly.destroy();\n if (this.viewportBuffer) this.viewportBuffer.destroy();\n if (this.tileBorderIndexBuffer) this.tileBorderIndexBuffer.destroy();\n if (this.quadTriangleIndexBuffer) this.quadTriangleIndexBuffer.destroy();\n if (this.tileExtentMesh) this.tileExtentMesh.vertexBuffer?.destroy();\n if (this.tileExtentMesh) this.tileExtentMesh.indexBuffer?.destroy();\n\n if (this.debugOverlayTexture) {\n this.debugOverlayTexture.destroy();\n }\n\n if (this.cache) {\n for (const key in this.cache) {\n const program = this.cache[key];\n if (program && program.program) {\n this.context.gl.deleteProgram(program.program);\n }\n }\n this.cache = {};\n }\n\n if (this.context) {\n this.context.setDefault();\n }\n }\n\n /*\n * Return true if drawing buffer size is != from requested size.\n * That means that we've reached GL limits somehow.\n * Note: drawing buffer size changes only when canvas size changes\n */\n overLimit() {\n const {drawingBufferWidth, drawingBufferHeight} = this.context.gl;\n return this.width !== drawingBufferWidth || this.height !== drawingBufferHeight;\n }\n}\n","import {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {type Program} from './program';\nimport {circleUniformValues} from './program/circle_program';\nimport {SegmentVector} from '../data/segment';\nimport {type OverscaledTileID} from '../tile/tile_id';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {CircleStyleLayer} from '../style/style_layer/circle_style_layer';\nimport type {CircleBucket} from '../data/bucket/circle_bucket';\nimport type {ProgramConfiguration} from '../data/program_configuration';\nimport type {VertexBuffer} from '../gl/vertex_buffer';\nimport type {IndexBuffer} from '../gl/index_buffer';\nimport type {UniformValues} from './uniform_binding';\nimport type {CircleUniformsType} from './program/circle_program';\nimport type {TerrainData} from '../render/terrain';\nimport {translatePosition} from '../util/util';\nimport type {ProjectionData} from '../geo/projection/projection_data';\n\ntype TileRenderState = {\n programConfiguration: ProgramConfiguration;\n program: Program;\n layoutVertexBuffer: VertexBuffer;\n indexBuffer: IndexBuffer;\n uniformValues: UniformValues;\n terrainData: TerrainData;\n projectionData: ProjectionData;\n};\n\ntype SegmentsTileRenderState = {\n segments: SegmentVector;\n sortKey: number;\n state: TileRenderState;\n};\n\nexport function drawCircles(painter: Painter, tileManager: TileManager, layer: CircleStyleLayer, coords: Array, renderOptions: RenderOptions) {\n if (painter.renderPass !== 'translucent') return;\n\n const {isRenderingToTexture} = renderOptions;\n const opacity = layer.paint.get('circle-opacity');\n const strokeWidth = layer.paint.get('circle-stroke-width');\n const strokeOpacity = layer.paint.get('circle-stroke-opacity');\n const sortFeaturesByKey = !layer.layout.get('circle-sort-key').isConstant();\n\n if (opacity.constantOr(1) === 0 && (strokeWidth.constantOr(1) === 0 || strokeOpacity.constantOr(1) === 0)) {\n return;\n }\n\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n\n const depthMode = painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n // Turn off stencil testing to allow circles to be drawn across boundaries,\n // so that large circles are not clipped to tiles\n const stencilMode = StencilMode.disabled;\n const colorMode = painter.colorModeForRenderPass();\n\n const segmentsRenderStates: Array = [];\n\n // Note: due to how the shader is written, this value only has effect when globe rendering is enabled and `circle-pitch-alignment` is set to 'map'.\n const radiusCorrectionFactor = transform.getCircleRadiusCorrection();\n\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n\n const tile = tileManager.getTile(coord);\n const bucket: CircleBucket = (tile.getBucket(layer) as any);\n if (!bucket) continue;\n\n const styleTranslate = layer.paint.get('circle-translate');\n const styleTranslateAnchor = layer.paint.get('circle-translate-anchor');\n const translateForUniforms = translatePosition(transform, tile, styleTranslate, styleTranslateAnchor);\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram('circle', programConfiguration);\n const layoutVertexBuffer = bucket.layoutVertexBuffer;\n const indexBuffer = bucket.indexBuffer;\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(coord);\n const uniformValues = circleUniformValues(painter, tile, layer, translateForUniforms, radiusCorrectionFactor);\n\n const projectionData = transform.getProjectionData({overscaledTileID: coord, applyGlobeMatrix: !isRenderingToTexture, applyTerrainMatrix: true});\n\n const state: TileRenderState = {\n programConfiguration,\n program,\n layoutVertexBuffer,\n indexBuffer,\n uniformValues,\n terrainData,\n projectionData\n };\n\n if (sortFeaturesByKey) {\n const oldSegments = bucket.segments.get();\n for (const segment of oldSegments) {\n segmentsRenderStates.push({\n segments: new SegmentVector([segment]),\n sortKey: (segment.sortKey as any as number),\n state\n });\n }\n } else {\n segmentsRenderStates.push({\n segments: bucket.segments,\n sortKey: 0,\n state\n });\n }\n\n }\n\n if (sortFeaturesByKey) {\n segmentsRenderStates.sort((a, b) => a.sortKey - b.sortKey);\n }\n\n for (const segmentsState of segmentsRenderStates) {\n const {programConfiguration, program, layoutVertexBuffer, indexBuffer, uniformValues, terrainData, projectionData} = segmentsState.state;\n const segments = segmentsState.segments;\n\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, colorMode, CullFaceMode.backCCW,\n uniformValues, terrainData, projectionData, layer.id,\n layoutVertexBuffer, indexBuffer, segments,\n layer.paint, painter.transform.zoom, programConfiguration);\n }\n}\n","import {StencilMode} from '../gl/stencil_mode';\nimport {DepthMode} from '../gl/depth_mode';\nimport {CullFaceMode} from '../gl/cull_face_mode';\nimport {\n backgroundUniformValues,\n backgroundPatternUniformValues\n} from './program/background_program';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {BackgroundStyleLayer} from '../style/style_layer/background_style_layer';\nimport {type OverscaledTileID} from '../tile/tile_id';\nimport {coveringTiles} from '../geo/projection/covering_tiles';\n\nexport function drawBackground(painter: Painter, tileManager: TileManager, layer: BackgroundStyleLayer, coords: Array, renderOptions: RenderOptions) {\n const color = layer.paint.get('background-color');\n const opacity = layer.paint.get('background-opacity');\n\n if (opacity === 0) return;\n\n const {isRenderingToTexture} = renderOptions;\n const context = painter.context;\n const gl = context.gl;\n const projection = painter.style.projection;\n const transform = painter.transform;\n const tileSize = transform.tileSize;\n const image = layer.paint.get('background-pattern');\n\n if (painter.isPatternMissing(image)) return;\n\n const pass = (!image && color.a === 1 && opacity === 1 && painter.opaquePassEnabledForLayer()) ? 'opaque' : 'translucent';\n if (painter.renderPass !== pass) return;\n\n const stencilMode = StencilMode.disabled;\n const depthMode = painter.getDepthModeForSublayer(0, pass === 'opaque' ? DepthMode.ReadWrite : DepthMode.ReadOnly);\n const colorMode = painter.colorModeForRenderPass();\n const program = painter.useProgram(image ? 'backgroundPattern' : 'background');\n const tileIDs = coords ? coords : coveringTiles(transform, {tileSize, terrain: painter.style.map.terrain});\n\n if (image) {\n context.activeTexture.set(gl.TEXTURE0);\n painter.imageManager.bind(painter.context);\n }\n\n const crossfade = layer.getCrossfadeParameters();\n \n for (const tileID of tileIDs) {\n const projectionData = transform.getProjectionData({\n overscaledTileID: tileID,\n applyGlobeMatrix: !isRenderingToTexture,\n applyTerrainMatrix: true\n });\n\n const uniformValues = image ?\n backgroundPatternUniformValues(opacity, painter, image, {tileID, tileSize}, crossfade) :\n backgroundUniformValues(opacity, color);\n const terrainData = painter.style.map.terrain && painter.style.map.terrain.getTerrainData(tileID);\n\n // For globe rendering, background uses tile meshes *without* borders and no stencil clipping.\n // This works assuming the tileIDs list contains only tiles of the same zoom level.\n // This seems to always be the case for background layers, but I'm leaving this comment\n // here in case this assumption is false in the future.\n\n // In case background starts having tiny holes at tile boundaries, switch to meshes with borders\n // and also enable stencil clipping. Make sure to render a proper tile clipping mask into stencil\n // first though, as that doesn't seem to happen for background layers as of writing this.\n\n const mesh = projection.getMeshFromTileID(context, tileID.canonical, false, true, 'raster');\n program.draw(context, gl.TRIANGLES, depthMode, stencilMode, colorMode, CullFaceMode.backCCW,\n uniformValues, terrainData, projectionData, layer.id,\n mesh.vertexBuffer, mesh.indexBuffer, mesh.segments);\n }\n}\n","import {DepthMode} from '../gl/depth_mode';\nimport {StencilMode} from '../gl/stencil_mode';\n\nimport type {Painter, RenderOptions} from './painter';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {CustomRenderMethodInput, CustomStyleLayer} from '../style/style_layer/custom_style_layer';\n\nexport function drawCustom(painter: Painter, tileManager: TileManager, layer: CustomStyleLayer, renderOptions: RenderOptions) {\n\n const {isRenderingGlobe} = renderOptions;\n const context = painter.context;\n const implementation = layer.implementation;\n const projection = painter.style.projection;\n const transform = painter.transform;\n\n const projectionData = transform.getProjectionDataForCustomLayer(isRenderingGlobe);\n\n const customLayerArgs: CustomRenderMethodInput = {\n farZ: transform.farZ,\n nearZ: transform.nearZ,\n fov: transform.fov * Math.PI / 180, // fov converted to radians\n modelViewProjectionMatrix: transform.modelViewProjectionMatrix,\n projectionMatrix: transform.projectionMatrix,\n shaderData: {\n variantName: projection.shaderVariantName,\n vertexShaderPrelude: `const float PI = 3.141592653589793;\\nuniform mat4 u_projection_matrix;\\n${projection.shaderPreludeCode.vertexSource}`,\n define: projection.shaderDefine,\n },\n defaultProjectionData: projectionData,\n };\n\n const renderingMode = implementation.renderingMode ? implementation.renderingMode : '2d';\n\n if (painter.renderPass === 'offscreen') {\n const prerender = implementation.prerender;\n if (prerender) {\n painter.setCustomLayerDefaults();\n context.setColorMode(painter.colorModeForRenderPass());\n\n prerender.call(implementation, context.gl, customLayerArgs);\n\n context.setDirty();\n painter.setBaseState();\n }\n } else if (painter.renderPass === 'translucent') {\n\n painter.setCustomLayerDefaults();\n\n context.setColorMode(painter.colorModeForRenderPass());\n context.setStencilMode(StencilMode.disabled);\n\n const depthMode = renderingMode === '3d' ?\n painter.getDepthModeFor3D() :\n painter.getDepthModeForSublayer(0, DepthMode.ReadOnly);\n\n context.setDepthMode(depthMode);\n\n implementation.render(context.gl, customLayerArgs);\n\n context.setDirty();\n painter.setBaseState();\n context.bindFramebuffer.set(null);\n }\n}\n","/**\n * Throttle the given function to run at most every `period` milliseconds.\n */\nexport function throttle void>(fn: T, time: number): (...args: Parameters) => ReturnType {\n let pending = false;\n let timerId: ReturnType = null;\n let lastCallContext = null;\n let lastCallArgs: Parameters;\n\n const later = () => {\n timerId = null;\n if (pending) {\n fn.apply(lastCallContext, lastCallArgs);\n timerId = setTimeout(later, time);\n pending = false;\n }\n };\n\n return (...args: Parameters) => {\n pending = true;\n lastCallContext = this;\n lastCallArgs = args;\n if (!timerId) {\n later();\n }\n return timerId;\n };\n}\n","import {throttle} from '../util/throttle';\nimport {LngLat} from '../geo/lng_lat';\n\nimport type {Map} from './map';\n\n/**\n * Adds the map's position to its page's location hash.\n * Passed as an option to the map object.\n *\n * @group Markers and Controls\n */\nexport class Hash {\n _map: Map;\n _hashName: string;\n\n constructor(hashName?: string | null) {\n this._hashName = hashName && encodeURIComponent(hashName);\n }\n\n /**\n * Map element to listen for coordinate changes\n *\n * @param map - The map object\n */\n addTo(map: Map) {\n this._map = map;\n addEventListener('hashchange', this._onHashChange, false);\n this._map.on('moveend', this._updateHash);\n return this;\n }\n\n /**\n * Removes hash\n */\n remove() {\n removeEventListener('hashchange', this._onHashChange, false);\n this._map.off('moveend', this._updateHash);\n clearTimeout(this._updateHash());\n this._removeHash();\n\n delete this._map;\n return this;\n }\n\n getHashString(mapFeedback?: boolean) {\n const center = this._map.getCenter(),\n zoom = Math.round(this._map.getZoom() * 100) / 100,\n // derived from equation: 512px * 2^z / 360 / 10^d < 0.5px\n precision = Math.ceil((zoom * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10),\n m = Math.pow(10, precision),\n lng = Math.round(center.lng * m) / m,\n lat = Math.round(center.lat * m) / m,\n bearing = this._map.getBearing(),\n pitch = this._map.getPitch();\n let hash = '';\n if (mapFeedback) {\n // new map feedback site has some constraints that don't allow\n // us to use the same hash format as we do for the Map hash option.\n hash += `/${lng}/${lat}/${zoom}`;\n } else {\n hash += `${zoom}/${lat}/${lng}`;\n }\n\n if (bearing || pitch) hash += (`/${Math.round(bearing * 10) / 10}`);\n if (pitch) hash += (`/${Math.round(pitch)}`);\n\n if (this._hashName) {\n const hashName = this._hashName;\n let found = false;\n const parts = window.location.hash.slice(1).split('&').map(part => {\n const key = part.split('=')[0];\n if (key === hashName) {\n found = true;\n return `${key}=${hash}`;\n }\n return part;\n }).filter(a => a);\n if (!found) {\n parts.push(`${hashName}=${hash}`);\n }\n return `#${parts.join('&')}`;\n }\n\n return `#${hash}`;\n }\n\n _getCurrentHash = () => {\n // Get the current hash from location, stripped from its number sign\n const hash = window.location.hash.replace('#', '');\n if (this._hashName) {\n // Split the parameter-styled hash into parts and find the value we need\n let keyval;\n hash.split('&').map(\n part => part.split('=')\n ).forEach(part => {\n if (part[0] === this._hashName) {\n keyval = part;\n }\n });\n return (keyval ? keyval[1] || '' : '').split('/');\n }\n return hash.split('/');\n };\n\n _onHashChange = () => {\n const hash = this._getCurrentHash();\n\n if (!this._isValidHash(hash)) {\n return false;\n }\n\n const bearing = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(hash[3] || 0) : this._map.getBearing();\n this._map.jumpTo({\n center: [+hash[2], +hash[1]],\n zoom: +hash[0],\n bearing,\n pitch: +(hash[4] || 0)\n });\n\n return true;\n };\n\n _updateHashUnthrottled = () => {\n // Replace if already present, else append the updated hash string\n const location = window.location.href.replace(/(#.*)?$/, this.getHashString());\n window.history.replaceState(window.history.state, null, location);\n };\n\n _removeHash = () => {\n const currentHash = this._getCurrentHash();\n if (currentHash.length === 0) {\n return;\n }\n const baseHash = currentHash.join('/');\n let targetHash = baseHash;\n if (targetHash.split('&').length > 0) {\n targetHash = targetHash.split('&')[0]; // #3/1/2&foo=bar -> #3/1/2\n }\n if (this._hashName) {\n targetHash = `${this._hashName}=${baseHash}`;\n }\n let replaceString = window.location.hash.replace(targetHash, '');\n if (replaceString.startsWith('#&')) {\n replaceString = replaceString.slice(0, 1) + replaceString.slice(2);\n } else if (replaceString === '#') {\n replaceString = '';\n }\n let location = window.location.href.replace(/(#.+)?$/, replaceString);\n location = location.replace('&&', '&');\n window.history.replaceState(window.history.state, null, location);\n };\n\n /**\n * Mobile Safari doesn't allow updating the hash more than 100 times per 30 seconds.\n */\n _updateHash: () => ReturnType = throttle(this._updateHashUnthrottled, 30 * 1000 / 100);\n\n _isValidHash(hash: number[]) {\n if (hash.length < 3 || hash.some(isNaN)) {\n return false;\n }\n\n // LngLat() throws error if latitude is out of range, and it's valid if it succeeds.\n try {\n new LngLat(+hash[2], +hash[1]);\n } catch {\n return false;\n }\n\n const zoom = +hash[0];\n const bearing = +(hash[3] || 0);\n const pitch = +(hash[4] || 0);\n\n return zoom >= this._map.getMinZoom() && zoom <= this._map.getMaxZoom() &&\n bearing >= -180 && bearing <= 180 &&\n pitch >= this._map.getMinPitch() && pitch <= this._map.getMaxPitch();\n };\n}\n","import {now} from '../util/time_control';\nimport type {Map} from './map';\nimport {bezier, clamp, extend} from '../util/util';\nimport Point from '@mapbox/point-geometry';\nimport type {DragPanOptions} from './handler/shim/drag_pan';\nimport {type EaseToOptions} from './camera';\n\nconst defaultInertiaOptions = {\n linearity: 0.3,\n easing: bezier(0, 0, 0.3, 1),\n};\n\nconst defaultPanInertiaOptions = extend({\n deceleration: 2500,\n maxSpeed: 1400\n}, defaultInertiaOptions);\n\nconst defaultZoomInertiaOptions = extend({\n deceleration: 20,\n maxSpeed: 1400\n}, defaultInertiaOptions);\n\nconst defaultBearingInertiaOptions = extend({\n deceleration: 1000,\n maxSpeed: 360\n}, defaultInertiaOptions);\n\nconst defaultPitchInertiaOptions = extend({\n deceleration: 1000,\n maxSpeed: 90\n}, defaultInertiaOptions);\n\nconst defaultRollInertiaOptions = extend({\n deceleration: 1000,\n maxSpeed: 360\n}, defaultInertiaOptions);\n\nexport type InertiaOptions = {\n linearity: number;\n easing: (t: number) => number;\n deceleration: number;\n maxSpeed: number;\n};\n\nexport class HandlerInertia {\n _map: Map;\n _inertiaBuffer: Array<{\n time: number;\n settings: any;\n }>;\n\n constructor(map: Map) {\n this._map = map;\n this.clear();\n }\n\n clear() {\n this._inertiaBuffer = [];\n }\n\n record(settings: any) {\n this._drainInertiaBuffer();\n this._inertiaBuffer.push({time: now(), settings});\n }\n\n _drainInertiaBuffer() {\n const inertia = this._inertiaBuffer,\n currentTime = now(),\n cutoff = 160; //msec\n\n while (inertia.length > 0 && currentTime - inertia[0].time > cutoff)\n inertia.shift();\n }\n\n _onMoveEnd(panInertiaOptions?: DragPanOptions | boolean): EaseToOptions {\n this._drainInertiaBuffer();\n if (this._inertiaBuffer.length < 2) {\n return;\n }\n\n const deltas = {\n zoom: 0,\n bearing: 0,\n pitch: 0,\n roll: 0,\n pan: new Point(0, 0),\n pinchAround: undefined,\n around: undefined\n };\n\n for (const {settings} of this._inertiaBuffer) {\n deltas.zoom += settings.zoomDelta || 0;\n deltas.bearing += settings.bearingDelta || 0;\n deltas.pitch += settings.pitchDelta || 0;\n deltas.roll += settings.rollDelta || 0;\n if (settings.panDelta) deltas.pan._add(settings.panDelta);\n if (settings.around) deltas.around = settings.around;\n if (settings.pinchAround) deltas.pinchAround = settings.pinchAround;\n }\n\n const lastEntry = this._inertiaBuffer[this._inertiaBuffer.length - 1];\n const duration = (lastEntry.time - this._inertiaBuffer[0].time);\n\n const easeOptions = {} as any;\n\n if (deltas.pan.mag()) {\n const result = calculateEasing(deltas.pan.mag(), duration, extend({}, defaultPanInertiaOptions, panInertiaOptions || {}));\n const finalPan = deltas.pan.mult(result.amount / deltas.pan.mag());\n const computedEaseOptions = this._map.cameraHelper.handlePanInertia(finalPan, this._map.transform);\n easeOptions.center = computedEaseOptions.easingCenter;\n easeOptions.offset = computedEaseOptions.easingOffset;\n extendDuration(easeOptions, result);\n }\n\n if (deltas.zoom) {\n const result = calculateEasing(deltas.zoom, duration, defaultZoomInertiaOptions);\n easeOptions.zoom = this._map.transform.zoom + result.amount;\n extendDuration(easeOptions, result);\n }\n\n if (deltas.bearing) {\n const result = calculateEasing(deltas.bearing, duration, defaultBearingInertiaOptions);\n easeOptions.bearing = this._map.transform.bearing + clamp(result.amount, -179, 179);\n extendDuration(easeOptions, result);\n }\n\n if (deltas.pitch) {\n const result = calculateEasing(deltas.pitch, duration, defaultPitchInertiaOptions);\n easeOptions.pitch = this._map.transform.pitch + result.amount;\n extendDuration(easeOptions, result);\n }\n\n if (deltas.roll) {\n const result = calculateEasing(deltas.roll, duration, defaultRollInertiaOptions);\n easeOptions.roll = this._map.transform.roll + clamp(result.amount, -179, 179);\n extendDuration(easeOptions, result);\n }\n\n if (easeOptions.zoom || easeOptions.bearing) {\n const last = deltas.pinchAround === undefined ? deltas.around : deltas.pinchAround;\n easeOptions.around = last ? this._map.unproject(last) : this._map.getCenter();\n }\n\n this.clear();\n return extend(easeOptions, {\n noMoveStart: true\n });\n\n }\n}\n\n// Unfortunately zoom, bearing, etc can't have different durations and easings so\n// we need to choose one. We use the longest duration and it's corresponding easing.\nfunction extendDuration(easeOptions, result) {\n if (!easeOptions.duration || easeOptions.duration < result.duration) {\n easeOptions.duration = result.duration;\n easeOptions.easing = result.easing;\n }\n}\n\nfunction calculateEasing(amount, inertiaDuration: number, inertiaOptions) {\n const {maxSpeed, linearity, deceleration} = inertiaOptions;\n const speed = clamp(\n amount * linearity / (inertiaDuration / 1000),\n -maxSpeed,\n maxSpeed);\n const duration = Math.abs(speed) / (deceleration * linearity);\n return {\n easing: inertiaOptions.easing,\n duration: duration * 1000,\n amount: speed * (duration / 2)\n };\n}\n","import {Event} from '../util/evented';\n\nimport {DOM} from '../util/dom';\nimport Point from '@mapbox/point-geometry';\nimport {extend} from '../util/util';\nimport type {MapGeoJSONFeature} from '../util/vectortile_to_geojson';\n\nimport type {Map} from './map';\nimport type {LngLat} from '../geo/lng_lat';\nimport type {ProjectionSpecification, SourceSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport {type GeoJSONSourceShouldReloadTileOptions} from '../source/geojson_source';\n\n/**\n * An event from the mouse relevant to a specific layer.\n *\n * @group Event Related\n */\nexport type MapLayerMouseEvent = MapMouseEvent & { features?: MapGeoJSONFeature[] };\n\n/**\n * An event from a touch device relevant to a specific layer.\n *\n * @group Event Related\n */\nexport type MapLayerTouchEvent = MapTouchEvent & { features?: MapGeoJSONFeature[] };\n\n/**\n * The source event data type\n */\nexport type MapSourceDataType = 'content' | 'metadata' | 'visibility' | 'idle';\n\n/**\n * `MapLayerEventType` - a mapping between the event name and the event.\n * !!! note\n * These events are compatible with the optional `layerId` parameter.\n * If `layerId` is included as the second argument in {@link Map.on}, the event listener will fire only when the\n * event action contains a visible portion of the specified layer.\n * The following example can be used for all the events.\n *\n * @group Event Related\n * @example\n * ```ts\n * // Initialize the map\n * let map = new Map({ // map options });\n * // Set an event listener for a specific layer\n * map.on('the-event-name', 'poi-label', (e) => {\n * console.log('An event has occurred on a visible portion of the poi-label layer');\n * });\n * ```\n */\nexport type MapLayerEventType = {\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released contains a visible portion of the specified layer.\n *\n * @see [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)\n * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)\n */\n click: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released twice contains a visible portion of the specified layer.\n *\n * !!! note\n * Under normal conditions, this event will be preceded by two `click` events.\n */\n dblclick: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is pressed while inside a visible portion of the specified layer.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n mousedown: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is released while inside a visible portion of the specified layer.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n mouseup: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is moved while the cursor is inside a visible portion of the specified layer.\n * As you move the cursor across the layer, the event will fire every time the cursor changes position within that layer.\n *\n * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/get-coordinates-of-the-mouse-pointer/)\n * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Display a popup on over](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n * @see [Animate symbol to follow the mouse](https://maplibre.org/maplibre-gl-js/docs/examples/animate-symbol-to-follow-the-mouse/)\n */\n mousemove: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) enters a visible portion of a specified layer from\n * outside that layer or outside the map canvas.\n *\n * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)\n * @see [Display a popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n */\n mouseenter: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) leaves a visible portion of a specified layer, or leaves\n * the map canvas.\n *\n * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Display a popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n */\n mouseleave: MapLayerMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is moved inside a visible portion of the specified layer.\n *\n * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/get-coordinates-of-the-mouse-pointer/)\n * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n */\n mouseover: MapLayerMouseEvent;\n /**\n * Fired when a point device (usually a mouse) leaves the visible portion of the specified layer.\n */\n mouseout: MapLayerMouseEvent;\n /**\n * Fired when the right button of the mouse is clicked or the context menu key is pressed within visible portion of the specified layer.\n */\n contextmenu: MapLayerMouseEvent;\n /**\n * Fired when a [`touchstart`](https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) event occurs within the visible portion of the specified layer.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchstart: MapLayerTouchEvent;\n /**\n * Fired when a [`touchend`](https://developer.mozilla.org/en-US/docs/Web/Events/touchend) event occurs within the visible portion of the specified layer.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchend: MapLayerTouchEvent;\n /**\n * Fired when a [`touchstart`](https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) event occurs within the visible portion of the specified layer.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchcancel: MapLayerTouchEvent;\n};\n\n/**\n * `MapEventType` - a mapping between the event name and the event value.\n * These events are used with the {@link Map.on} method.\n * When using a `layerId` with {@link Map.on} method, please refer to {@link MapLayerEventType}.\n * The following example can be used for all the events.\n *\n * @group Event Related\n * @example\n * ```ts\n * // Initialize the map\n * let map = new Map({ // map options });\n * // Set an event listener\n * map.on('the-event-name', () => {\n * console.log('An event has occurred!');\n * });\n * ```\n */\nexport interface MapEventType {\n /**\n * Fired when an error occurs. This is GL JS's primary error reporting\n * mechanism. We use an event instead of `throw` to better accommodate\n * asynchronous operations. If no listeners are bound to the `error` event, the\n * error will be printed to the console.\n */\n error: ErrorEvent;\n /**\n * Fired immediately after all necessary resources have been downloaded\n * and the first visually complete rendering of the map has occurred.\n *\n * @see [Draw GeoJSON points](https://maplibre.org/maplibre-gl-js/docs/examples/draw-geojson-points/)\n * @see [Add live realtime data](https://maplibre.org/maplibre-gl-js/docs/examples/add-live-realtime-data/)\n * @see [Animate a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-a-point/)\n */\n load: MapLibreEvent;\n /**\n * Fired after the last frame rendered before the map enters an\n * \"idle\" state:\n *\n * - No camera transitions are in progress\n * - All currently requested tiles have loaded\n * - All fade/transition animations have completed\n */\n idle: MapLibreEvent;\n /**\n * Fired immediately after the map has been removed with {@link Map.remove}.\n */\n remove: MapLibreEvent;\n /**\n * Fired whenever the map is drawn to the screen, as the result of\n *\n * - a change to the map's position, zoom, pitch, or bearing\n * - a change to the map's style\n * - a change to a GeoJSON source\n * - the loading of a vector tile, GeoJSON file, glyph, or sprite\n */\n render: MapLibreEvent;\n /**\n * Fired immediately after the map has been resized.\n */\n resize: MapLibreEvent;\n /**\n * Fired when the WebGL context is lost.\n */\n webglcontextlost: MapContextEvent;\n /**\n * Fired when the WebGL context is restored.\n */\n webglcontextrestored: MapContextEvent;\n /**\n * Fired when any map data (style, source, tile, etc) begins loading or\n * changing asynchronously. All `dataloading` events are followed by a `data`,\n * `dataabort` or `error` event.\n */\n dataloading: MapDataEvent;\n /**\n * Fired when any map data loads or changes. See {@link MapDataEvent} for more information.\n * @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\n */\n data: MapDataEvent;\n tiledataloading: MapDataEvent;\n /**\n * Fired when one of the map's sources begins loading or changing asynchronously.\n * All `sourcedataloading` events are followed by a `sourcedata`, `sourcedataabort` or `error` event.\n */\n sourcedataloading: MapSourceDataEvent;\n /**\n * Fired when the map's style begins loading or changing asynchronously.\n * All `styledataloading` events are followed by a `styledata`\n * or `error` event.\n */\n styledataloading: MapStyleDataEvent;\n /**\n * Fired when one of the map's sources loads or changes, including if a tile belonging\n * to a source loads or changes.\n */\n sourcedata: MapSourceDataEvent;\n /**\n * Fired when the map's style loads or changes.\n */\n styledata: MapStyleDataEvent;\n /**\n * Fired when an icon or pattern needed by the style is missing. The missing image can\n * be added with {@link Map.addImage} within this event listener callback to prevent the image from\n * being skipped. This event can be used to dynamically generate icons and patterns.\n * @see [Generate and add a missing icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/generate-and-add-a-missing-icon-to-the-map/)\n */\n styleimagemissing: MapStyleImageMissingEvent;\n /**\n * Fired when a request for one of the map's sources' tiles or data is aborted.\n */\n dataabort: MapDataEvent;\n /**\n * Fired when a request for one of the map's sources' data is aborted.\n */\n sourcedataabort: MapSourceDataEvent;\n /**\n * Fired when the user cancels a \"box zoom\" interaction, or when the bounding box does not meet the minimum size threshold.\n * See {@link BoxZoomHandler}.\n */\n boxzoomcancel: MapLibreZoomEvent;\n /**\n * Fired when a \"box zoom\" interaction starts. See {@link BoxZoomHandler}.\n */\n boxzoomstart: MapLibreZoomEvent;\n /**\n * Fired when a \"box zoom\" interaction ends. See {@link BoxZoomHandler}.\n */\n boxzoomend: MapLibreZoomEvent;\n /**\n * Fired when a [`touchcancel`](https://developer.mozilla.org/en-US/docs/Web/Events/touchcancel) event occurs within the map.\n */\n touchcancel: MapTouchEvent;\n /**\n * Fired when a [`touchmove`](https://developer.mozilla.org/en-US/docs/Web/Events/touchmove) event occurs within the map.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchmove: MapTouchEvent;\n /**\n * Fired when a [`touchend`](https://developer.mozilla.org/en-US/docs/Web/Events/touchend) event occurs within the map.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchend: MapTouchEvent;\n /**\n * Fired when a [`touchstart`](https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) event occurs within the map.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n touchstart: MapTouchEvent;\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released at the same point on the map.\n *\n * @see [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)\n * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)\n */\n click: MapMouseEvent;\n /**\n * Fired when the right button of the mouse is clicked or the context menu key is pressed within the map.\n */\n contextmenu: MapMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is pressed and released twice at the same point on the map in rapid succession.\n *\n * !!! note\n * Under normal conditions, this event will be preceded by two `click` events.\n */\n dblclick: MapMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is moved while the cursor is inside the map.\n * As you move the cursor across the map, the event will fire every time the cursor changes position within the map.\n *\n * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/get-coordinates-of-the-mouse-pointer/)\n * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Display a popup on over](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n */\n mousemove: MapMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is released within the map.\n *\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n mouseup: MapMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is pressed within the map.\n *\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n mousedown: MapMouseEvent;\n /**\n * Fired when a point device (usually a mouse) leaves the map's canvas.\n */\n mouseout: MapMouseEvent;\n /**\n * Fired when a pointing device (usually a mouse) is moved within the map.\n * As you move the cursor across a web page containing a map,\n * the event will fire each time it enters the map or any child elements.\n *\n * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/get-coordinates-of-the-mouse-pointer/)\n * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n */\n mouseover: MapMouseEvent;\n /**\n * Fired just before the map begins a transition from one\n * view to another, as the result of either user interaction or methods such as {@link Map.jumpTo}.\n *\n */\n movestart: MapLibreEvent;\n /**\n * Fired repeatedly during an animated transition from one view to\n * another, as the result of either user interaction or methods such as {@link Map.flyTo}.\n *\n * @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\n */\n move: MapLibreEvent;\n /**\n * Fired just after the map completes a transition from one\n * view to another, as the result of either user interaction or methods such as {@link Map.jumpTo}.\n *\n * @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\n */\n moveend: MapLibreEvent;\n /**\n * Fired just before the map begins a transition from one zoom level to another,\n * as the result of either user interaction or methods such as {@link Map.flyTo}.\n */\n zoomstart: MapLibreEvent;\n /**\n * Fired repeatedly during an animated transition from one zoom level to another,\n * as the result of either user interaction or methods such as {@link Map.flyTo}.\n */\n zoom: MapLibreEvent;\n /**\n * Fired just after the map completes a transition from one zoom level to another,\n * as the result of either user interaction or methods such as {@link Map.flyTo}.\n */\n zoomend: MapLibreEvent;\n /**\n * Fired when a \"drag to rotate\" interaction starts. See {@link DragRotateHandler}.\n */\n rotatestart: MapLibreEvent;\n /**\n * Fired repeatedly during a \"drag to rotate\" interaction. See {@link DragRotateHandler}.\n */\n rotate: MapLibreEvent;\n /**\n * Fired when a \"drag to rotate\" interaction ends. See {@link DragRotateHandler}.\n */\n rotateend: MapLibreEvent;\n /**\n * Fired when a \"drag to pan\" interaction starts. See {@link DragPanHandler}.\n */\n dragstart: MapLibreEvent;\n /**\n * Fired repeatedly during a \"drag to pan\" interaction. See {@link DragPanHandler}.\n */\n drag: MapLibreEvent;\n /**\n * Fired when a \"drag to pan\" interaction ends. See {@link DragPanHandler}.\n * @see [Create a draggable marker](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-marker/)\n */\n dragend: MapLibreEvent;\n /**\n * Fired whenever the map's pitch (tilt) begins a change as\n * the result of either user interaction or methods such as {@link Map.flyTo} .\n */\n pitchstart: MapLibreEvent;\n /**\n * Fired repeatedly during the map's pitch (tilt) animation between\n * one state and another as the result of either user interaction\n * or methods such as {@link Map.flyTo}.\n */\n pitch: MapLibreEvent;\n /**\n * Fired immediately after the map's pitch (tilt) finishes changing as\n * the result of either user interaction or methods such as {@link Map.flyTo}.\n */\n pitchend: MapLibreEvent;\n /**\n * Fired when a [`wheel`](https://developer.mozilla.org/en-US/docs/Web/Events/wheel) event occurs within the map.\n */\n wheel: MapWheelEvent;\n /**\n * Fired when terrain is changed\n */\n terrain: MapTerrainEvent;\n /**\n * Fired whenever the cooperativeGestures option prevents a gesture from being handled by the map.\n * This is useful for showing your own UI when this happens.\n */\n cooperativegestureprevented: MapLibreEvent & {\n gestureType: 'wheel_zoom' | 'touch_pan';\n };\n /**\n * Fired when map's projection is modified in other ways than by map being moved.\n */\n projectiontransition: MapProjectionEvent;\n};\n\n/**\n * The base event for MapLibre\n *\n * @group Event Related\n */\nexport type MapLibreEvent = {\n type: keyof MapEventType | keyof MapLayerEventType;\n target: Map;\n originalEvent: TOrig;\n};\n\n/**\n * The style data event\n *\n * @group Event Related\n */\nexport type MapStyleDataEvent = MapLibreEvent & {\n dataType: 'style';\n};\n\n/**\n * The source data event interface\n *\n * @group Event Related\n */\nexport type MapSourceDataEvent = MapLibreEvent & {\n dataType: 'source';\n /**\n * True if the event has a `dataType` of `source` and the source has no outstanding network requests.\n */\n isSourceLoaded: boolean;\n /**\n * The [style spec representation of the source](https://maplibre.org/maplibre-style-spec/#sources) if the event has a `dataType` of `source`.\n */\n source: SourceSpecification;\n sourceId: string;\n sourceDataType: MapSourceDataType;\n sourceDataChanged?: boolean;\n /**\n * The tile being loaded or changed, if the event has a `dataType` of `source` and\n * the event is related to loading of a tile.\n */\n tile: any;\n\n /**\n * Options to determine whether a tile should be reloaded.\n * @internal\n */\n shouldReloadTileOptions: GeoJSONSourceShouldReloadTileOptions;\n};\n/**\n * `MapMouseEvent` is the event type for mouse-related map events.\n *\n * @group Event Related\n *\n * @example\n * ```ts\n * // The `click` event is an example of a `MapMouseEvent`.\n * // Set up an event listener on the map.\n * map.on('click', (e) => {\n * // The event object (e) contains information like the\n * // coordinates of the point on the map that was clicked.\n * console.log('A click event has occurred at ' + e.lngLat);\n * });\n * ```\n */\nexport class MapMouseEvent extends Event implements MapLibreEvent {\n /**\n * The event type\n */\n type: 'mousedown' | 'mouseup' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseenter' | 'mouseleave' | 'mouseout' | 'contextmenu';\n\n /**\n * The `Map` object that fired the event.\n */\n target: Map;\n\n /**\n * The DOM event which caused the map event.\n */\n originalEvent: MouseEvent;\n\n /**\n * The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.\n */\n point: Point;\n\n /**\n * The geographic location on the map of the mouse cursor.\n */\n lngLat: LngLat;\n\n /**\n * Prevents subsequent default processing of the event by the map.\n *\n * Calling this method will prevent the following default map behaviors:\n *\n * * On `mousedown` events, the behavior of {@link DragPanHandler}\n * * On `mousedown` events, the behavior of {@link DragRotateHandler}\n * * On `mousedown` events, the behavior of {@link BoxZoomHandler}\n * * On `dblclick` events, the behavior of {@link DoubleClickZoomHandler}\n *\n */\n preventDefault() {\n this._defaultPrevented = true;\n }\n\n /**\n * `true` if `preventDefault` has been called.\n */\n get defaultPrevented(): boolean {\n return this._defaultPrevented;\n }\n\n _defaultPrevented: boolean;\n\n constructor(type: string, map: Map, originalEvent: MouseEvent, data: any = {}) {\n originalEvent = originalEvent instanceof MouseEvent ? originalEvent : new MouseEvent(type, originalEvent);\n const point = DOM.mousePos(map.getCanvas(), originalEvent);\n const lngLat = map.unproject(point);\n super(type, extend({point, lngLat, originalEvent}, data));\n this._defaultPrevented = false;\n this.target = map;\n }\n}\n\n/**\n * `MapTouchEvent` is the event type for touch-related map events.\n *\n * @group Event Related\n */\nexport class MapTouchEvent extends Event implements MapLibreEvent {\n /**\n * The event type.\n */\n type: 'touchstart' | 'touchmove' | 'touchend' | 'touchcancel';\n\n /**\n * The `Map` object that fired the event.\n */\n target: Map;\n\n /**\n * The DOM event which caused the map event.\n */\n originalEvent: TouchEvent;\n\n /**\n * The geographic location on the map of the center of the touch event points.\n */\n lngLat: LngLat;\n\n /**\n * The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left\n * corner.\n */\n point: Point;\n\n /**\n * The array of pixel coordinates corresponding to a\n * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.\n */\n points: Array;\n\n /**\n * The geographical locations on the map corresponding to a\n * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.\n */\n lngLats: Array;\n\n /**\n * Prevents subsequent default processing of the event by the map.\n *\n * Calling this method will prevent the following default map behaviors:\n *\n * * On `touchstart` events, the behavior of {@link DragPanHandler}\n * * On `touchstart` events, the behavior of {@link TwoFingersTouchZoomRotateHandler}\n *\n */\n preventDefault() {\n this._defaultPrevented = true;\n }\n\n /**\n * `true` if `preventDefault` has been called.\n */\n get defaultPrevented(): boolean {\n return this._defaultPrevented;\n }\n\n _defaultPrevented: boolean;\n\n constructor(type: string, map: Map, originalEvent: TouchEvent) {\n const touches = type === 'touchend' ? originalEvent.changedTouches : originalEvent.touches;\n const points = DOM.touchPos(map.getCanvasContainer(), touches);\n const lngLats = points.map((t) => map.unproject(t));\n const point = points.reduce((prev, curr, i, arr) => {\n return prev.add(curr.div(arr.length));\n }, new Point(0, 0));\n const lngLat = map.unproject(point);\n super(type, {points, point, lngLats, lngLat, originalEvent});\n this._defaultPrevented = false;\n }\n}\n\n/**\n * `MapWheelEvent` is the event type for the `wheel` map event.\n *\n * @group Event Related\n */\nexport class MapWheelEvent extends Event {\n /**\n * The event type.\n */\n type: 'wheel';\n\n /**\n * The `Map` object that fired the event.\n */\n target: Map;\n\n /**\n * The DOM event which caused the map event.\n */\n originalEvent: WheelEvent;\n\n /**\n * Prevents subsequent default processing of the event by the map.\n *\n * Calling this method will prevent the behavior of {@link ScrollZoomHandler}.\n */\n preventDefault() {\n this._defaultPrevented = true;\n }\n\n /**\n * `true` if `preventDefault` has been called.\n */\n get defaultPrevented(): boolean {\n return this._defaultPrevented;\n }\n\n _defaultPrevented: boolean;\n\n /** */\n constructor(type: string, map: Map, originalEvent: WheelEvent) {\n super(type, {originalEvent});\n this._defaultPrevented = false;\n }\n}\n\n/**\n * A `MapLibreZoomEvent` is the event type for the boxzoom-related map events emitted by the {@link BoxZoomHandler}.\n *\n * @group Event Related\n */\nexport type MapLibreZoomEvent = {\n /**\n * The type of boxzoom event. One of `boxzoomstart`, `boxzoomend` or `boxzoomcancel`\n */\n type: 'boxzoomstart' | 'boxzoomend' | 'boxzoomcancel';\n /**\n * The `Map` instance that triggered the event\n */\n target: Map;\n /**\n * The DOM event that triggered the boxzoom event. Can be a `MouseEvent` or `KeyboardEvent`\n */\n originalEvent: MouseEvent;\n};\n\n/**\n * A `MapDataEvent` object is emitted with the `data`\n * and `dataloading` events. Possible values for\n * `dataType`s are:\n *\n * - `'source'`: The non-tile data associated with any source\n * - `'style'`: The [style](https://maplibre.org/maplibre-style-spec/) used by the map\n *\n * Possible values for `sourceDataType`s are:\n *\n * - `'metadata'`: indicates that any necessary source metadata has been loaded (such as TileJSON) and it is ok to start loading tiles\n * - `'content'`: indicates the source data has changed (such as when source.setData() has been called on GeoJSONSource)\n * - `'visibility'`: send when the source becomes used when at least one of its layers becomes visible in style sense (inside the layer's zoom range and with layout.visibility set to 'visible')\n * - `'idle'`: indicates that no new source data has been fetched (but the source has done loading)\n *\n * @group Event Related\n *\n * @example\n * ```ts\n * // The sourcedata event is an example of MapDataEvent.\n * // Set up an event listener on the map.\n * map.on('sourcedata', (e) => {\n * if (e.isSourceLoaded) {\n * // Do something when the source has finished loading\n * }\n * });\n * ```\n */\nexport type MapDataEvent = {\n /**\n * The event type.\n */\n type: string;\n /**\n * The type of data that has changed. One of `'source'`, `'style'`.\n */\n dataType: string;\n /**\n * Included if the event has a `dataType` of `source` and the event signals that internal data has been received or changed. Possible values are `metadata`, `content`, `visibility` and `idle`.\n */\n sourceDataType: MapSourceDataType;\n};\n\n/**\n * The terrain event\n *\n * @group Event Related\n */\nexport type MapTerrainEvent = {\n type: 'terrain';\n};\n\n/**\n * The map projection event\n *\n * @group Event Related\n */\nexport type MapProjectionEvent = {\n type: 'projectiontransition';\n /**\n * Specifies the name of the new projection.\n * For example:\n *\n * - `globe` to describe globe that has internally switched to mercator\n * - `vertical-perspective` to describe a globe that doesn't change to mercator\n * - `mercator` to describe mercator projection\n */\n newProjection: ProjectionSpecification['type'];\n};\n\n/**\n * An event related to the web gl context\n *\n * @group Event Related\n */\nexport type MapContextEvent = {\n type: 'webglcontextlost' | 'webglcontextrestored';\n originalEvent: WebGLContextEvent;\n};\n\n/**\n * The style image missing event\n *\n * @group Event Related\n *\n * @see [Generate and add a missing icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/generate-and-add-a-missing-icon-to-the-map/)\n */\nexport type MapStyleImageMissingEvent = MapLibreEvent & {\n type: 'styleimagemissing';\n id: string;\n};\n","import {MapMouseEvent, MapTouchEvent, MapWheelEvent} from '../events';\nimport {type Handler} from '../handler_manager';\nimport type {Map} from '../map';\nimport type Point from '@mapbox/point-geometry';\n\nexport class MapEventHandler implements Handler {\n\n _mousedownPos: Point;\n _clickTolerance: number;\n _map: Map;\n\n constructor(map: Map, options: {\n clickTolerance: number;\n }) {\n this._map = map;\n this._clickTolerance = options.clickTolerance;\n }\n\n reset() {\n delete this._mousedownPos;\n }\n\n wheel(e: WheelEvent) {\n // If mapEvent.preventDefault() is called by the user, prevent handlers such as:\n // - ScrollZoom\n return this._firePreventable(new MapWheelEvent(e.type, this._map, e));\n }\n\n mousedown(e: MouseEvent, point: Point) {\n this._mousedownPos = point;\n // If mapEvent.preventDefault() is called by the user, prevent handlers such as:\n // - MousePan\n // - MouseRotate\n // - MousePitch\n // - DblclickHandler\n return this._firePreventable(new MapMouseEvent(e.type, this._map, e));\n }\n\n mouseup(e: MouseEvent) {\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n click(e: MouseEvent, point: Point) {\n if (this._mousedownPos && this._mousedownPos.dist(point) >= this._clickTolerance) return;\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n dblclick(e: MouseEvent) {\n // If mapEvent.preventDefault() is called by the user, prevent handlers such as:\n // - DblClickZoom\n return this._firePreventable(new MapMouseEvent(e.type, this._map, e));\n }\n\n mouseover(e: MouseEvent) {\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n mouseout(e: MouseEvent) {\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n touchstart(e: TouchEvent) {\n // If mapEvent.preventDefault() is called by the user, prevent handlers such as:\n // - TouchPan\n // - TouchZoom\n // - TouchRotate\n // - TouchPitch\n // - TapZoom\n // - SwipeZoom\n return this._firePreventable(new MapTouchEvent(e.type, this._map, e));\n }\n\n touchmove(e: TouchEvent) {\n this._map.fire(new MapTouchEvent(e.type, this._map, e));\n }\n\n touchend(e: TouchEvent) {\n this._map.fire(new MapTouchEvent(e.type, this._map, e));\n }\n\n touchcancel(e: TouchEvent) {\n this._map.fire(new MapTouchEvent(e.type, this._map, e));\n }\n\n _firePreventable(mapEvent: MapMouseEvent | MapTouchEvent | MapWheelEvent) {\n this._map.fire(mapEvent);\n if (mapEvent.defaultPrevented) {\n // returning an object marks the handler as active and resets other handlers\n return {};\n }\n }\n\n isEnabled() {\n return true;\n }\n\n isActive() {\n return false;\n }\n enable() {}\n disable() {}\n}\n\nexport class BlockableMapEventHandler {\n _map: Map;\n _delayContextMenu: boolean;\n _ignoreContextMenu: boolean;\n _contextMenuEvent: MouseEvent;\n\n constructor(map: Map) {\n this._map = map;\n }\n\n reset() {\n this._delayContextMenu = false;\n this._ignoreContextMenu = true;\n delete this._contextMenuEvent;\n }\n\n mousemove(e: MouseEvent) {\n // mousemove map events should not be fired when interaction handlers (pan, rotate, etc) are active\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n mousedown() {\n this._delayContextMenu = true;\n this._ignoreContextMenu = false;\n }\n\n mouseup() {\n this._delayContextMenu = false;\n if (this._contextMenuEvent) {\n this._map.fire(new MapMouseEvent('contextmenu', this._map, this._contextMenuEvent));\n delete this._contextMenuEvent;\n }\n }\n contextmenu(e: MouseEvent) {\n if (this._delayContextMenu) {\n // Mac: contextmenu fired on mousedown; we save it until mouseup for consistency's sake\n this._contextMenuEvent = e;\n } else if (!this._ignoreContextMenu) {\n // Windows: contextmenu fired on mouseup, so fire event now\n this._map.fire(new MapMouseEvent(e.type, this._map, e));\n }\n\n // prevent browser context menu when necessary\n if (this._map.listens('contextmenu')) {\n e.preventDefault();\n }\n }\n\n isEnabled() {\n return true;\n }\n\n isActive() {\n return false;\n }\n enable() {}\n disable() {}\n}\n","import type {Map} from '../map';\nimport type {PointLike} from '../camera';\nimport type {IReadonlyTransform} from '../../geo/transform_interface';\nimport Point from '@mapbox/point-geometry';\nimport {type LngLat} from '../../geo/lng_lat';\n\n/**\n * @internal\n * Shared utilities for the Handler classes to access the correct camera state.\n * If Camera.transformCameraUpdate is specified or terrain is enabled, the\n * \"desired state\" of camera may differ from the state used for rendering. The\n * handlers need the \"desired state\" to track accumulated changes.\n */\nexport class TransformProvider {\n _map: Map;\n\n constructor(map: Map) {\n this._map = map;\n }\n\n get transform(): IReadonlyTransform {\n return this._map._requestedCameraState || this._map.transform;\n }\n\n get center() {\n return {lng: this.transform.center.lng, lat: this.transform.center.lat};\n }\n\n get zoom() {\n return this.transform.zoom;\n }\n\n get pitch() {\n return this.transform.pitch;\n }\n\n get bearing() {\n return this.transform.bearing;\n }\n\n unproject(point: PointLike): LngLat {\n return this.transform.screenPointToLocation(Point.convert(point), this._map.terrain);\n }\n}\n","import {DOM} from '../../util/dom';\n\nimport {Event} from '../../util/evented';\nimport {TransformProvider} from './transform-provider';\n\nimport type {Map} from '../map';\nimport type Point from '@mapbox/point-geometry';\nimport {type Handler} from '../handler_manager';\n\n/**\n * The `BoxZoomHandler` allows the user to zoom the map to fit within a bounding box.\n * The bounding box is defined by clicking and holding `shift` while dragging the cursor.\n *\n * @group Handlers\n */\nexport class BoxZoomHandler implements Handler {\n _map: Map;\n _tr: TransformProvider;\n _el: HTMLElement;\n _container: HTMLElement;\n _enabled: boolean;\n _active: boolean;\n _startPos: Point;\n _lastPos: Point;\n _box: HTMLElement;\n _clickTolerance: number;\n\n /** @internal */\n constructor(map: Map, options: {\n clickTolerance: number;\n }) {\n this._map = map;\n this._tr = new TransformProvider(map);\n this._el = map.getCanvasContainer();\n this._container = map.getContainer();\n this._clickTolerance = options.clickTolerance || 1;\n }\n\n /**\n * Returns a Boolean indicating whether the \"box zoom\" interaction is enabled.\n *\n * @returns `true` if the \"box zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"box zoom\" interaction is active, i.e. currently being used.\n *\n * @returns `true` if the \"box zoom\" interaction is active.\n */\n isActive() {\n return !!this._active;\n }\n\n /**\n * Enables the \"box zoom\" interaction.\n *\n * @example\n * ```ts\n * map.boxZoom.enable();\n * ```\n */\n enable() {\n if (this.isEnabled()) return;\n this._enabled = true;\n }\n\n /**\n * Disables the \"box zoom\" interaction.\n *\n * @example\n * ```ts\n * map.boxZoom.disable();\n * ```\n */\n disable() {\n if (!this.isEnabled()) return;\n this._enabled = false;\n }\n\n mousedown(e: MouseEvent, point: Point) {\n if (!this.isEnabled()) return;\n if (!(e.shiftKey && e.button === 0)) return;\n\n DOM.disableDrag();\n this._startPos = this._lastPos = point;\n this._active = true;\n }\n\n mousemoveWindow(e: MouseEvent, point: Point) {\n if (!this._active) return;\n\n const pos = point;\n\n if (this._lastPos.equals(pos) || (!this._box && pos.dist(this._startPos) < this._clickTolerance)) {\n return;\n }\n\n const p0 = this._startPos;\n this._lastPos = pos;\n\n if (!this._box) {\n this._box = DOM.create('div', 'maplibregl-boxzoom', this._container);\n this._container.classList.add('maplibregl-crosshair');\n this._fireEvent('boxzoomstart', e);\n }\n\n const minX = Math.min(p0.x, pos.x),\n maxX = Math.max(p0.x, pos.x),\n minY = Math.min(p0.y, pos.y),\n maxY = Math.max(p0.y, pos.y);\n\n DOM.setTransform(this._box, `translate(${minX}px,${minY}px)`);\n\n this._box.style.width = `${maxX - minX}px`;\n this._box.style.height = `${maxY - minY}px`;\n }\n\n mouseupWindow(e: MouseEvent, point: Point) {\n if (!this._active) return;\n\n if (e.button !== 0) return;\n\n const p0 = this._startPos,\n p1 = point;\n\n this.reset();\n\n DOM.suppressClick();\n\n if (p0.x === p1.x && p0.y === p1.y) {\n this._fireEvent('boxzoomcancel', e);\n } else {\n this._map.fire(new Event('boxzoomend', {originalEvent: e}));\n return {\n cameraAnimation: map => map.fitScreenCoordinates(p0, p1, this._tr.bearing, {linear: true})\n };\n }\n }\n\n keydown(e: KeyboardEvent) {\n if (!this._active) return;\n\n if (e.keyCode === 27) {\n this.reset();\n this._fireEvent('boxzoomcancel', e);\n }\n }\n\n reset() {\n this._active = false;\n\n this._container.classList.remove('maplibregl-crosshair');\n\n if (this._box) {\n DOM.remove(this._box);\n this._box = null;\n }\n\n DOM.enableDrag();\n\n delete this._startPos;\n delete this._lastPos;\n }\n\n _fireEvent(type: string, e: any) {\n return this._map.fire(new Event(type, {originalEvent: e}));\n }\n}\n","import type Point from '@mapbox/point-geometry';\n\nexport function indexTouches(touches: Array, points: Array) {\n if (touches.length !== points.length) throw new Error(`The number of touches and points are not equal - touches ${touches.length}, points ${points.length}`);\n const obj = {};\n for (let i = 0; i < touches.length; i++) {\n obj[touches[i].identifier] = points[i];\n }\n return obj;\n}\n","import Point from '@mapbox/point-geometry';\nimport {indexTouches} from './handler_util';\n\nfunction getCentroid(points: Array) {\n const sum = new Point(0, 0);\n for (const point of points) {\n sum._add(point);\n }\n return sum.div(points.length);\n}\n\nexport const MAX_TAP_INTERVAL = 500;\nconst MAX_TOUCH_TIME = 500;\nexport const MAX_DIST = 30;\n\nexport class SingleTapRecognizer {\n\n numTouches: number;\n centroid: Point;\n startTime: number;\n aborted: boolean;\n touches: {\n [k in number | string]: Point;\n };\n\n constructor(options: {\n numTouches: number;\n }) {\n this.reset();\n this.numTouches = options.numTouches;\n }\n\n reset() {\n delete this.centroid;\n delete this.startTime;\n delete this.touches;\n this.aborted = false;\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array) {\n\n if (this.centroid || mapTouches.length > this.numTouches) {\n this.aborted = true;\n }\n if (this.aborted) {\n return;\n }\n\n if (this.startTime === undefined) {\n this.startTime = e.timeStamp;\n }\n\n if (mapTouches.length === this.numTouches) {\n this.centroid = getCentroid(points);\n this.touches = indexTouches(mapTouches, points);\n }\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array) {\n if (this.aborted || !this.centroid) return;\n\n const newTouches = indexTouches(mapTouches, points);\n for (const id in this.touches) {\n const prevPos = this.touches[id];\n const pos = newTouches[id];\n if (!pos || pos.dist(prevPos) > MAX_DIST) {\n this.aborted = true;\n }\n }\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array) {\n if (!this.centroid || e.timeStamp - this.startTime > MAX_TOUCH_TIME) {\n this.aborted = true;\n }\n\n if (mapTouches.length === 0) {\n const centroid = !this.aborted && this.centroid;\n this.reset();\n if (centroid) return centroid;\n }\n }\n\n}\n\nexport class TapRecognizer {\n\n singleTap: SingleTapRecognizer;\n numTaps: number;\n lastTime: number;\n lastTap: Point;\n count: number;\n\n constructor(options: {\n numTaps: number;\n numTouches: number;\n }) {\n this.singleTap = new SingleTapRecognizer(options);\n this.numTaps = options.numTaps;\n this.reset();\n }\n\n reset() {\n this.lastTime = Infinity;\n delete this.lastTap;\n this.count = 0;\n this.singleTap.reset();\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array) {\n this.singleTap.touchstart(e, points, mapTouches);\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array) {\n this.singleTap.touchmove(e, points, mapTouches);\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array) {\n const tap = this.singleTap.touchend(e, points, mapTouches);\n if (tap) {\n const soonEnough = e.timeStamp - this.lastTime < MAX_TAP_INTERVAL;\n const closeEnough = !this.lastTap || this.lastTap.dist(tap) < MAX_DIST;\n\n if (!soonEnough || !closeEnough) {\n this.reset();\n }\n\n this.count++;\n this.lastTime = e.timeStamp;\n this.lastTap = tap;\n\n if (this.count === this.numTaps) {\n this.reset();\n return tap;\n }\n }\n }\n}\n","import {TapRecognizer} from './tap_recognizer';\nimport type Point from '@mapbox/point-geometry';\nimport type {Map} from '../map';\nimport {TransformProvider} from './transform-provider';\nimport {type Handler} from '../handler_manager';\n\n/**\n * A `TapZoomHandler` allows the user to zoom the map at a point by double tapping\n */\nexport class TapZoomHandler implements Handler {\n _tr: TransformProvider;\n _enabled: boolean;\n _active: boolean;\n _zoomIn: TapRecognizer;\n _zoomOut: TapRecognizer;\n\n constructor(map: Map) {\n this._tr = new TransformProvider(map);\n this._zoomIn = new TapRecognizer({\n numTouches: 1,\n numTaps: 2\n });\n\n this._zoomOut = new TapRecognizer({\n numTouches: 2,\n numTaps: 1\n });\n\n this.reset();\n }\n\n reset() {\n this._active = false;\n this._zoomIn.reset();\n this._zoomOut.reset();\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array) {\n this._zoomIn.touchstart(e, points, mapTouches);\n this._zoomOut.touchstart(e, points, mapTouches);\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array) {\n this._zoomIn.touchmove(e, points, mapTouches);\n this._zoomOut.touchmove(e, points, mapTouches);\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array) {\n const zoomInPoint = this._zoomIn.touchend(e, points, mapTouches);\n const zoomOutPoint = this._zoomOut.touchend(e, points, mapTouches);\n const tr = this._tr;\n\n if (zoomInPoint) {\n this._active = true;\n e.preventDefault();\n setTimeout(() => this.reset(), 0);\n return {\n cameraAnimation: (map: Map) => map.easeTo({\n duration: 300,\n zoom: tr.zoom + 1,\n around: tr.unproject(zoomInPoint)\n }, {originalEvent: e})\n };\n } else if (zoomOutPoint) {\n this._active = true;\n e.preventDefault();\n setTimeout(() => this.reset(), 0);\n return {\n cameraAnimation: (map: Map) => map.easeTo({\n duration: 300,\n zoom: tr.zoom - 1,\n around: tr.unproject(zoomOutPoint)\n }, {originalEvent: e})\n };\n }\n }\n\n touchcancel() {\n this.reset();\n }\n\n enable() {\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isActive() {\n return this._active;\n }\n}\n","import {DOM} from '../../util/dom';\nimport type Point from '@mapbox/point-geometry';\nimport {type DragMoveStateManager} from './drag_move_state_manager';\nimport {type Handler} from '../handler_manager';\n\ninterface DragMovementResult {\n bearingDelta?: number;\n pitchDelta?: number;\n rollDelta?: number;\n around?: Point;\n panDelta?: Point;\n}\n\nexport interface DragPanResult extends DragMovementResult {\n around: Point;\n panDelta: Point;\n}\n\nexport interface DragRotateResult extends DragMovementResult {\n bearingDelta: number;\n}\n\nexport interface DragPitchResult extends DragMovementResult {\n pitchDelta: number;\n}\n\nexport interface DragRollResult extends DragMovementResult {\n rollDelta: number;\n}\n\ntype DragMoveFunction = (lastPoint: Point, currnetPoint: Point) => T;\n\nexport interface DragMoveHandler extends Handler {\n dragStart: (e: E, point: Point) => void;\n dragMove: (e: E, point: Point) => T | void;\n dragEnd: (e: E) => void;\n}\n\nexport type DragMoveHandlerOptions = {\n /**\n * If the movement is shorter than this value, consider it a click.\n */\n clickTolerance: number;\n /**\n * The move function to run on a valid movement.\n */\n move: DragMoveFunction;\n /**\n * A class used to manage the state of the drag event - start, checking valid moves, end. See the class documentation for more details.\n */\n moveStateManager: DragMoveStateManager;\n /**\n * A method used to assign the dragStart, dragMove, and dragEnd methods to the relevant event handlers, as well as assigning the contextmenu handler\n * @param handler - the handler\n */\n assignEvents: (handler: DragMoveHandler) => void;\n /**\n * Should the move start on the \"start\" event, or should it start on the first valid move.\n */\n activateOnStart?: boolean;\n /**\n * If true, handler will be enabled during construction\n */\n enable?: boolean;\n};\n\n/**\n * A generic class to create handlers for drag events, from both mouse and touch events.\n */\nexport class DragHandler implements DragMoveHandler {\n // Event handlers that may be assigned by the implementations of this class\n contextmenu?: Handler['contextmenu'];\n mousedown?: Handler['mousedown'];\n mousemoveWindow?: Handler['mousemoveWindow'];\n mouseup?: Handler['mouseup'];\n touchstart?: Handler['touchstart'];\n touchmoveWindow?: Handler['touchmoveWindow'];\n touchend?: Handler['touchend'];\n\n _clickTolerance: number;\n _moveFunction: DragMoveFunction;\n _activateOnStart: boolean;\n _active: boolean;\n _enabled: boolean;\n _moved: boolean;\n _lastPoint: Point | null;\n _moveStateManager: DragMoveStateManager;\n\n constructor(options: DragMoveHandlerOptions) {\n this._enabled = !!options.enable;\n this._moveStateManager = options.moveStateManager;\n this._clickTolerance = options.clickTolerance || 1;\n this._moveFunction = options.move;\n this._activateOnStart = !!options.activateOnStart;\n\n options.assignEvents(this);\n\n this.reset();\n }\n\n reset(e?: E) {\n this._active = false;\n this._moved = false;\n delete this._lastPoint;\n this._moveStateManager.endMove(e);\n }\n\n _move(...params: Parameters>) {\n const move = this._moveFunction(...params);\n if (move.bearingDelta || move.pitchDelta || move.rollDelta || move.around || move.panDelta) {\n this._active = true;\n return move;\n }\n }\n\n dragStart(e: E, point: Point);\n dragStart(e: E, point: Point[]);\n dragStart(e: E, point: Point | Point[]) {\n if (!this.isEnabled() || this._lastPoint) return;\n\n if (!this._moveStateManager.isValidStartEvent(e)) return;\n this._moveStateManager.startMove(e);\n\n this._lastPoint = Array.isArray(point) ? point[0] : point;\n\n if (this._activateOnStart && this._lastPoint) this._active = true;\n }\n\n dragMove(e: E, point: Point);\n dragMove(e: E, point: Point[]);\n dragMove(e: E, point: Point | Point[]) {\n if (!this.isEnabled()) return;\n const lastPoint = this._lastPoint;\n if (!lastPoint) return;\n e.preventDefault();\n\n if (!this._moveStateManager.isValidMoveEvent(e)) {\n this.reset(e);\n return;\n }\n\n const movePoint = Array.isArray(point) ? point[0] : point;\n\n if (!this._moved && movePoint.dist(lastPoint) < this._clickTolerance) return;\n this._moved = true;\n this._lastPoint = movePoint;\n\n return this._move(lastPoint, movePoint);\n }\n\n dragEnd(e: E) {\n if (!this.isEnabled() || !this._lastPoint) return;\n if (!this._moveStateManager.isValidEndEvent(e)) return;\n if (this._moved) DOM.suppressClick();\n this.reset(e);\n }\n\n enable() {\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isActive() {\n return this._active;\n }\n\n getClickTolerance() {\n return this._clickTolerance;\n }\n}\n","import {DOM} from '../../util/dom';\n\nconst LEFT_BUTTON = 0;\nconst RIGHT_BUTTON = 2;\n\n// the values for each button in MouseEvent.buttons\nconst BUTTONS_FLAGS = {\n [LEFT_BUTTON]: 1,\n [RIGHT_BUTTON]: 2\n};\n\nfunction buttonNoLongerPressed(e: MouseEvent, button: number) {\n const flag = BUTTONS_FLAGS[button];\n return e.buttons === undefined || (e.buttons & flag) !== flag;\n}\n\n/*\n * Drag events are initiated by specific interaction which needs to be tracked until it ends.\n * This requires some state management:\n * 1. registering the initiating event,\n * 2. tracking that it was not canceled / not confusing it with another event firing.\n * 3. recognizing the ending event and cleaning up any internal state\n *\n * Concretely, we implement two state managers:\n * 1. MouseMoveStateManager\n * Receives a functions that is used to recognize mouse events that should be registered as the\n * relevant drag interactions - i.e. dragging with the right mouse button, or while CTRL is pressed.\n * 2. OneFingerTouchMoveStateManager\n * Checks if a drag event is using one finger, and continuously tracking that this is the same event\n * (i.e. to make sure not additional finger has started interacting with the screen before raising\n * the first finger).\n */\nexport interface DragMoveStateManager {\n startMove: (e: E) => void;\n endMove: (e?: E) => void;\n isValidStartEvent: (e: E) => boolean;\n isValidMoveEvent: (e: E) => boolean;\n isValidEndEvent: (e?: E) => boolean;\n}\n\nexport class MouseMoveStateManager implements DragMoveStateManager {\n _eventButton: number | undefined;\n _correctEvent: (e: MouseEvent) => boolean;\n\n constructor(options: {\n checkCorrectEvent: (e: MouseEvent) => boolean;\n }) {\n this._correctEvent = options.checkCorrectEvent;\n }\n\n startMove(e: MouseEvent) {\n const eventButton = DOM.mouseButton(e);\n this._eventButton = eventButton;\n }\n\n endMove(_e?: MouseEvent) {\n delete this._eventButton;\n }\n\n isValidStartEvent(e: MouseEvent) {\n return this._correctEvent(e);\n }\n\n isValidMoveEvent(e: MouseEvent) {\n // Some browsers don't fire a `mouseup` when the mouseup occurs outside\n // the window or iframe:\n // https://github.com/mapbox/mapbox-gl-js/issues/4622\n //\n // If the button is no longer pressed during this `mousemove` it may have\n // been released outside of the window or iframe.\n return !buttonNoLongerPressed(e, this._eventButton);\n }\n\n isValidEndEvent(e: MouseEvent) {\n const eventButton = DOM.mouseButton(e);\n return eventButton === this._eventButton;\n }\n}\n\nexport class OneFingerTouchMoveStateManager implements DragMoveStateManager {\n _firstTouch: number | undefined;\n\n constructor() {\n this._firstTouch = undefined;\n }\n\n _isOneFingerTouch(e: TouchEvent) {\n return e.targetTouches.length === 1;\n }\n\n _isSameTouchEvent(e: TouchEvent) {\n return e.targetTouches[0].identifier === this._firstTouch;\n }\n\n startMove(e: TouchEvent) {\n const firstTouch = e.targetTouches[0].identifier;\n this._firstTouch = firstTouch;\n }\n\n endMove(_e?: TouchEvent) {\n delete this._firstTouch;\n }\n\n isValidStartEvent(e: TouchEvent) {\n return this._isOneFingerTouch(e);\n }\n\n isValidMoveEvent(e: TouchEvent) {\n return this._isOneFingerTouch(e) && this._isSameTouchEvent(e);\n }\n\n isValidEndEvent(e: TouchEvent) {\n return this._isOneFingerTouch(e) && this._isSameTouchEvent(e);\n }\n}\n\nexport class MouseOrTouchMoveStateManager implements DragMoveStateManager {\n constructor(\n private mouseMoveStateManager = new MouseMoveStateManager({checkCorrectEvent: () => true}), \n private oneFingerTouchMoveStateManager = new OneFingerTouchMoveStateManager()\n ) {}\n\n _executeRelevantHandler(e: MouseEvent | TouchEvent, onMouseEvent: (MouseEvent) => any, onTouchEvent: (TouchEvent) => any) {\n if (e instanceof MouseEvent) return onMouseEvent(e);\n if (typeof TouchEvent !== 'undefined' && e instanceof TouchEvent) return onTouchEvent(e);\n }\n\n startMove(e: MouseEvent | TouchEvent) {\n this._executeRelevantHandler(e,\n e => this.mouseMoveStateManager.startMove(e),\n e => this.oneFingerTouchMoveStateManager.startMove(e));\n }\n\n endMove(e?: MouseEvent | TouchEvent) {\n this._executeRelevantHandler(e,\n e => this.mouseMoveStateManager.endMove(e),\n e => this.oneFingerTouchMoveStateManager.endMove(e));\n }\n\n isValidStartEvent(e: MouseEvent | TouchEvent) {\n return this._executeRelevantHandler(e,\n e => this.mouseMoveStateManager.isValidStartEvent(e),\n e => this.oneFingerTouchMoveStateManager.isValidStartEvent(e));\n }\n\n isValidMoveEvent(e: MouseEvent | TouchEvent) {\n return this._executeRelevantHandler(e,\n e => this.mouseMoveStateManager.isValidMoveEvent(e),\n e => this.oneFingerTouchMoveStateManager.isValidMoveEvent(e));\n }\n\n isValidEndEvent(e?: MouseEvent | TouchEvent) {\n return this._executeRelevantHandler(e,\n e => this.mouseMoveStateManager.isValidEndEvent(e),\n e => this.oneFingerTouchMoveStateManager.isValidEndEvent(e));\n }\n}\n","import Point from '@mapbox/point-geometry';\n\nimport {DOM} from '../../util/dom';\nimport {type DragMoveHandler, type DragPanResult, type DragRotateResult, type DragPitchResult, DragHandler, type DragRollResult} from './drag_handler';\nimport {MouseMoveStateManager} from './drag_move_state_manager';\nimport {getAngleDelta} from '../../util/util';\n\n/**\n * `MousePanHandler` allows the user to pan the map by clicking and dragging\n */\nexport interface MousePanHandler extends DragMoveHandler {}\n/**\n * `MouseRotateHandler` allows the user to rotate the map by clicking and dragging\n */\nexport interface MouseRotateHandler extends DragMoveHandler {}\n/**\n * `MousePitchHandler` allows the user to zoom the map by pitching\n */\nexport interface MousePitchHandler extends DragMoveHandler {}\n/**\n * `MouseRollHandler` allows the user to roll the camera by holding `Ctrl`, right-clicking and dragging\n */\nexport interface MouseRollHandler extends DragMoveHandler {}\n\nconst LEFT_BUTTON = 0;\nconst RIGHT_BUTTON = 2;\n\nconst assignEvents = (handler: DragHandler) => {\n handler.mousedown = handler.dragStart;\n handler.mousemoveWindow = handler.dragMove;\n handler.mouseup = handler.dragEnd;\n handler.contextmenu = (e: MouseEvent) => {\n e.preventDefault();\n };\n};\n\nexport function generateMousePanHandler({enable, clickTolerance}: {\n clickTolerance: number;\n enable?: boolean;\n}): MousePanHandler {\n const mouseMoveStateManager = new MouseMoveStateManager({\n checkCorrectEvent: (e: MouseEvent) => DOM.mouseButton(e) === LEFT_BUTTON && !e.ctrlKey,\n });\n return new DragHandler({\n clickTolerance,\n move: (lastPoint: Point, point: Point) =>\n ({around: point, panDelta: point.sub(lastPoint)}),\n activateOnStart: true,\n moveStateManager: mouseMoveStateManager,\n enable,\n assignEvents,\n });\n};\n\nexport function generateMouseRotationHandler({enable, clickTolerance, aroundCenter = true, minPixelCenterThreshold = 100, rotateDegreesPerPixelMoved = 0.8}: {\n clickTolerance: number;\n enable?: boolean;\n aroundCenter?: boolean;\n minPixelCenterThreshold?: number;\n rotateDegreesPerPixelMoved?: number;\n}, getCenter: () => Point): MouseRotateHandler {\n const mouseMoveStateManager = new MouseMoveStateManager({\n checkCorrectEvent: (e: MouseEvent): boolean =>\n (DOM.mouseButton(e) === LEFT_BUTTON && e.ctrlKey) ||\n (DOM.mouseButton(e) === RIGHT_BUTTON && !e.ctrlKey),\n });\n return new DragHandler({\n clickTolerance,\n move: (lastPoint: Point, currentPoint: Point) => {\n const center = getCenter();\n if (aroundCenter && Math.abs(center.y - lastPoint.y) > minPixelCenterThreshold) {\n // Avoid rotation related to y axis since it is \"saved\" for pitch\n return {bearingDelta: getAngleDelta(new Point(lastPoint.x, currentPoint.y), currentPoint, center)};\n }\n let bearingDelta = (currentPoint.x - lastPoint.x) * rotateDegreesPerPixelMoved;\n if (aroundCenter && currentPoint.y < center.y) {\n bearingDelta = -bearingDelta;\n }\n return {bearingDelta};\n },\n // prevent browser context menu when necessary; we don't allow it with rotation\n // because we can't discern rotation gesture start from contextmenu on Mac\n moveStateManager: mouseMoveStateManager,\n enable,\n assignEvents,\n });\n};\n\nexport function generateMousePitchHandler({enable, clickTolerance, pitchDegreesPerPixelMoved = -0.5}: {\n clickTolerance: number;\n pitchDegreesPerPixelMoved?: number;\n enable?: boolean;\n}): MousePitchHandler {\n const mouseMoveStateManager = new MouseMoveStateManager({\n checkCorrectEvent: (e: MouseEvent): boolean =>\n (DOM.mouseButton(e) === LEFT_BUTTON && e.ctrlKey) ||\n (DOM.mouseButton(e) === RIGHT_BUTTON),\n });\n return new DragHandler({\n clickTolerance,\n move: (lastPoint: Point, point: Point) => \n ({pitchDelta: (point.y - lastPoint.y) * pitchDegreesPerPixelMoved}),\n // prevent browser context menu when necessary; we don't allow it with rotation\n // because we can't discern rotation gesture start from contextmenu on Mac\n moveStateManager: mouseMoveStateManager,\n enable,\n assignEvents,\n });\n};\n\nexport function generateMouseRollHandler({enable, clickTolerance, rollDegreesPerPixelMoved = 0.3}: {\n clickTolerance: number;\n rollDegreesPerPixelMoved?: number;\n enable?: boolean;\n}, getCenter: () => Point): MouseRollHandler {\n const mouseMoveStateManager = new MouseMoveStateManager({\n checkCorrectEvent: (e: MouseEvent): boolean =>\n (DOM.mouseButton(e) === RIGHT_BUTTON && e.ctrlKey),\n });\n return new DragHandler({\n clickTolerance,\n move: (lastPoint: Point, currentPoint: Point) => {\n const center = getCenter();\n let rollDelta = (currentPoint.x - lastPoint.x) * rollDegreesPerPixelMoved;\n if (currentPoint.y < center.y) {\n rollDelta = -rollDelta;\n }\n return {rollDelta};\n },\n // prevent browser context menu when necessary; we don't allow it with roll\n // because we can't discern roll gesture start from contextmenu on Mac\n moveStateManager: mouseMoveStateManager,\n enable,\n assignEvents,\n });\n};\n","import Point from '@mapbox/point-geometry';\nimport {indexTouches} from './handler_util';\nimport {type Handler} from '../handler_manager';\nimport type {Map} from '../map';\n\n/**\n * A `TouchPanHandler` allows the user to pan the map using touch gestures.\n */\nexport class TouchPanHandler implements Handler {\n\n _enabled: boolean;\n _active: boolean;\n _touches: {\n [k in string | number]: Point;\n };\n _clickTolerance: number;\n _sum: Point;\n _map: Map;\n\n constructor(options: {clickTolerance: number}, map: Map) {\n this._clickTolerance = options.clickTolerance || 1;\n this._map = map;\n this.reset();\n }\n\n reset() {\n this._active = false;\n this._touches = {};\n this._sum = new Point(0, 0);\n }\n\n _shouldBePrevented(touchesCount: number) {\n const minTouches = this._map.cooperativeGestures.isEnabled() ? 2 : 1;\n return touchesCount < minTouches;\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array) {\n return this._calculateTransform(e, points, mapTouches);\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array) {\n if (!this._active) return;\n if (this._shouldBePrevented(mapTouches.length)) {\n this._map.cooperativeGestures.notifyGestureBlocked('touch_pan', e);\n return;\n }\n e.preventDefault();\n return this._calculateTransform(e, points, mapTouches);\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array) {\n this._calculateTransform(e, points, mapTouches);\n\n if (this._active && this._shouldBePrevented(mapTouches.length)) {\n this.reset();\n }\n }\n\n touchcancel() {\n this.reset();\n }\n\n _calculateTransform(e: TouchEvent, points: Array, mapTouches: Array) {\n if (mapTouches.length > 0) this._active = true;\n\n const touches = indexTouches(mapTouches, points);\n\n const touchPointSum = new Point(0, 0);\n const touchDeltaSum = new Point(0, 0);\n let touchDeltaCount = 0;\n\n for (const identifier in touches) {\n const point = touches[identifier];\n const prevPoint = this._touches[identifier];\n if (prevPoint) {\n touchPointSum._add(point);\n touchDeltaSum._add(point.sub(prevPoint));\n touchDeltaCount++;\n touches[identifier] = point;\n }\n }\n\n this._touches = touches;\n\n if (this._shouldBePrevented(touchDeltaCount) || !touchDeltaSum.mag()) return;\n\n const panDelta = touchDeltaSum.div(touchDeltaCount);\n this._sum._add(panDelta);\n if (this._sum.mag() < this._clickTolerance) return;\n\n const around = touchPointSum.div(touchDeltaCount);\n\n return {\n around,\n panDelta\n };\n }\n\n enable() {\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isActive() {\n return this._active;\n }\n}\n","import type Point from '@mapbox/point-geometry';\nimport {DOM} from '../../util/dom';\nimport type {Map} from '../map';\nimport {type Handler, type HandlerResult} from '../handler_manager';\n\n/**\n * An options object sent to the enable function of some of the handlers\n */\nexport type AroundCenterOptions = {\n /**\n * If \"center\" is passed, map will zoom around the center of map\n */\n around: 'center';\n};\n\n/**\n * The `TwoFingersTouchHandler`s allows the user to zoom, pitch and rotate the map using two fingers\n *\n */\nabstract class TwoFingersTouchHandler implements Handler {\n\n _enabled?: boolean;\n _active?: boolean;\n _firstTwoTouches?: [number, number];\n _vector?: Point;\n _startVector?: Point;\n _aroundCenter?: boolean;\n\n /** @internal */\n constructor() {\n this.reset();\n }\n\n reset(): void {\n this._active = false;\n delete this._firstTwoTouches;\n }\n\n abstract _start(points: [Point, Point]): void;\n abstract _move(points: [Point, Point], pinchAround: Point | null, e: TouchEvent): HandlerResult | void;\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array): void {\n if (this._firstTwoTouches || mapTouches.length < 2) return;\n\n this._firstTwoTouches = [\n mapTouches[0].identifier,\n mapTouches[1].identifier\n ];\n\n // implemented by child classes\n this._start([points[0], points[1]]);\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array): HandlerResult | void {\n if (!this._firstTwoTouches) return;\n\n e.preventDefault();\n\n const [idA, idB] = this._firstTwoTouches;\n const a = getTouchById(mapTouches, points, idA);\n const b = getTouchById(mapTouches, points, idB);\n if (!a || !b) return;\n const pinchAround = this._aroundCenter ? null : a.add(b).div(2);\n\n // implemented by child classes\n return this._move([a, b], pinchAround, e);\n\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array): void {\n if (!this._firstTwoTouches) return;\n\n const [idA, idB] = this._firstTwoTouches;\n const a = getTouchById(mapTouches, points, idA);\n const b = getTouchById(mapTouches, points, idB);\n if (a && b) return;\n\n if (this._active) DOM.suppressClick();\n\n this.reset();\n }\n\n touchcancel(): void {\n this.reset();\n }\n\n /**\n * Enables the \"drag to pitch\" interaction.\n *\n * @example\n * ```ts\n * map.touchPitch.enable();\n * ```\n */\n enable(options?: AroundCenterOptions | boolean | null): void {\n this._enabled = true;\n this._aroundCenter = !!options && (options as AroundCenterOptions).around === 'center';\n }\n\n /**\n * Disables the \"drag to pitch\" interaction.\n *\n * @example\n * ```ts\n * map.touchPitch.disable();\n * ```\n */\n disable(): void {\n this._enabled = false;\n this.reset();\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pitch\" interaction is enabled.\n *\n * @returns `true` if the \"drag to pitch\" interaction is enabled.\n */\n isEnabled(): boolean {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pitch\" interaction is active, i.e. currently being used.\n *\n * @returns `true` if the \"drag to pitch\" interaction is active.\n */\n isActive(): boolean {\n return !!this._active;\n }\n}\n\nfunction getTouchById(mapTouches: Array, points: Array, identifier: number): Point | undefined {\n for (let i = 0; i < mapTouches.length; i++) {\n if (mapTouches[i].identifier === identifier) return points[i];\n }\n return undefined;\n}\n\n/* ZOOM */\n\nconst ZOOM_THRESHOLD = 0.1;\n\nfunction getZoomDelta(distance: number, lastDistance: number): number {\n return Math.log(distance / lastDistance) / Math.LN2;\n}\n\n/**\n * The `TwoFingersTouchHandler`s allows the user to zoom the map two fingers\n *\n * @group Handlers\n */\nexport class TwoFingersTouchZoomHandler extends TwoFingersTouchHandler {\n\n _distance?: number;\n _startDistance?: number;\n\n reset() {\n super.reset();\n delete this._distance;\n delete this._startDistance;\n }\n\n _start(points: [Point, Point]): void {\n this._startDistance = this._distance = points[0].dist(points[1]);\n }\n\n _move(points: [Point, Point], pinchAround: Point | null): HandlerResult | void {\n const lastDistance = this._distance!;\n this._distance = points[0].dist(points[1]);\n if (!this._active && Math.abs(getZoomDelta(this._distance, this._startDistance!)) < ZOOM_THRESHOLD) return;\n this._active = true;\n return {\n zoomDelta: getZoomDelta(this._distance, lastDistance),\n pinchAround\n };\n }\n}\n\n/* ROTATE */\n\nconst ROTATION_THRESHOLD = 25; // pixels along circumference of touch circle\n\nfunction getBearingDelta(a: Point, b: Point): number {\n return a.angleWith(b) * 180 / Math.PI;\n}\n\n/**\n * The `TwoFingersTouchHandler`s allows the user to rotate the map two fingers\n *\n * @group Handlers\n */\nexport class TwoFingersTouchRotateHandler extends TwoFingersTouchHandler {\n _minDiameter?: number;\n\n reset(): void {\n super.reset();\n delete this._minDiameter;\n delete this._startVector;\n delete this._vector;\n }\n\n _start(points: [Point, Point]): void {\n this._startVector = this._vector = points[0].sub(points[1]);\n this._minDiameter = points[0].dist(points[1]);\n }\n\n _move(points: [Point, Point], pinchAround: Point | null, _e: TouchEvent): HandlerResult | void {\n const lastVector = this._vector!;\n this._vector = points[0].sub(points[1]);\n\n if (!this._active && this._isBelowThreshold(this._vector)) return;\n this._active = true;\n\n return {\n bearingDelta: getBearingDelta(this._vector, lastVector),\n pinchAround\n };\n }\n\n _isBelowThreshold(vector: Point): boolean {\n /*\n * The threshold before a rotation actually happens is configured in\n * pixels along the circumference of the circle formed by the two fingers.\n * This makes the threshold in degrees larger when the fingers are close\n * together and smaller when the fingers are far apart.\n *\n * Use the smallest diameter from the whole gesture to reduce sensitivity\n * when pinching in and out.\n */\n\n this._minDiameter = Math.min(this._minDiameter!, vector.mag());\n const circumference = Math.PI * this._minDiameter;\n const threshold = ROTATION_THRESHOLD / circumference * 360;\n\n const bearingDeltaSinceStart = getBearingDelta(vector, this._startVector!);\n return Math.abs(bearingDeltaSinceStart) < threshold;\n }\n}\n\n/* PITCH */\n\nfunction isVertical(vector: Point): boolean {\n return Math.abs(vector.y) > Math.abs(vector.x);\n}\n\nconst ALLOWED_SINGLE_TOUCH_TIME = 100;\n\n/**\n * The `TwoFingersTouchPitchHandler` allows the user to pitch the map by dragging up and down with two fingers.\n *\n * @group Handlers\n */\nexport class TwoFingersTouchPitchHandler extends TwoFingersTouchHandler {\n\n _valid?: boolean;\n _firstMove?: number;\n _lastPoints?: [Point, Point];\n _map: Map;\n _currentTouchCount: number = 0;\n\n constructor(map: Map) {\n super();\n this._map = map;\n }\n\n reset(): void {\n super.reset();\n this._valid = undefined;\n delete this._firstMove;\n delete this._lastPoints;\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array): void {\n super.touchstart(e, points, mapTouches);\n this._currentTouchCount = mapTouches.length;\n }\n\n _start(points: [Point, Point]): void {\n this._lastPoints = points;\n if (isVertical(points[0].sub(points[1]))) {\n // fingers are more horizontal than vertical\n this._valid = false;\n }\n }\n\n _move(points: [Point, Point], center: Point | null, e: TouchEvent): HandlerResult | void {\n // If cooperative gestures is enabled, we need a 3-finger minimum for this gesture to register\n if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) {\n return;\n }\n\n const vectorA = points[0].sub(this._lastPoints![0]);\n const vectorB = points[1].sub(this._lastPoints![1]);\n\n this._valid = this.gestureBeginsVertically(vectorA, vectorB, e.timeStamp);\n if (!this._valid) return;\n\n this._lastPoints = points;\n this._active = true;\n const yDeltaAverage = (vectorA.y + vectorB.y) / 2;\n const degreesPerPixelMoved = -0.5;\n return {\n pitchDelta: yDeltaAverage * degreesPerPixelMoved\n };\n }\n\n gestureBeginsVertically(vectorA: Point, vectorB: Point, timeStamp: number): boolean | undefined {\n if (this._valid !== undefined) return this._valid;\n\n const threshold = 2;\n const movedA = vectorA.mag() >= threshold;\n const movedB = vectorB.mag() >= threshold;\n\n // neither finger has moved a meaningful amount, wait\n if (!movedA && !movedB) return;\n\n // One finger has moved and the other has not.\n // If enough time has passed, decide it is not a pitch.\n if (!movedA || !movedB) {\n if (this._firstMove === undefined) {\n this._firstMove = timeStamp;\n }\n\n if (timeStamp - this._firstMove < ALLOWED_SINGLE_TOUCH_TIME) {\n // still waiting for a movement from the second finger\n return undefined;\n } else {\n return false;\n }\n }\n\n const isSameDirection = vectorA.y > 0 === vectorB.y > 0;\n return isVertical(vectorA) && isVertical(vectorB) && isSameDirection;\n }\n}\n","import {type Handler} from '../handler_manager';\nimport type {Map} from '../map';\nimport {TransformProvider} from './transform-provider';\n\nconst defaultOptions = {\n panStep: 100,\n bearingStep: 15,\n pitchStep: 10\n};\n\n/**\n * The `KeyboardHandler` allows the user to zoom, rotate, and pan the map using\n * the following keyboard shortcuts:\n *\n * - `=` / `+`: Increase the zoom level by 1.\n * - `Shift-=` / `Shift-+`: Increase the zoom level by 2.\n * - `-`: Decrease the zoom level by 1.\n * - `Shift--`: Decrease the zoom level by 2.\n * - Arrow keys: Pan by 100 pixels.\n * - `Shift+⇢`: Increase the rotation by 15 degrees.\n * - `Shift+⇠`: Decrease the rotation by 15 degrees.\n * - `Shift+⇡`: Increase the pitch by 10 degrees.\n * - `Shift+⇣`: Decrease the pitch by 10 degrees.\n *\n * @group Handlers\n */\nexport class KeyboardHandler implements Handler {\n _tr: TransformProvider;\n _enabled: boolean;\n _active: boolean;\n _panStep: number;\n _bearingStep: number;\n _pitchStep: number;\n _rotationDisabled: boolean;\n\n /** @internal */\n constructor(map: Map) {\n this._tr = new TransformProvider(map);\n const stepOptions = defaultOptions;\n this._panStep = stepOptions.panStep;\n this._bearingStep = stepOptions.bearingStep;\n this._pitchStep = stepOptions.pitchStep;\n this._rotationDisabled = false;\n }\n\n reset() {\n this._active = false;\n }\n\n keydown(e: KeyboardEvent) {\n if (e.altKey || e.ctrlKey || e.metaKey) return;\n\n let zoomDir = 0;\n let bearingDir = 0;\n let pitchDir = 0;\n let xDir = 0;\n let yDir = 0;\n\n switch (e.keyCode) {\n case 61:\n case 107:\n case 171:\n case 187:\n zoomDir = 1;\n break;\n\n case 189:\n case 109:\n case 173:\n zoomDir = -1;\n break;\n\n case 37:\n if (e.shiftKey) {\n bearingDir = -1;\n } else {\n e.preventDefault();\n xDir = -1;\n }\n break;\n\n case 39:\n if (e.shiftKey) {\n bearingDir = 1;\n } else {\n e.preventDefault();\n xDir = 1;\n }\n break;\n\n case 38:\n if (e.shiftKey) {\n pitchDir = 1;\n } else {\n e.preventDefault();\n yDir = -1;\n }\n break;\n\n case 40:\n if (e.shiftKey) {\n pitchDir = -1;\n } else {\n e.preventDefault();\n yDir = 1;\n }\n break;\n\n default:\n return;\n }\n\n if (this._rotationDisabled) {\n bearingDir = 0;\n pitchDir = 0;\n }\n\n return {\n cameraAnimation: (map: Map) => {\n const tr = this._tr;\n map.easeTo({\n duration: 300,\n easeId: 'keyboardHandler',\n easing: easeOut,\n\n zoom: zoomDir ? Math.round(tr.zoom) + zoomDir * (e.shiftKey ? 2 : 1) : tr.zoom,\n bearing: tr.bearing + bearingDir * this._bearingStep,\n pitch: tr.pitch + pitchDir * this._pitchStep,\n offset: [-xDir * this._panStep, -yDir * this._panStep],\n center: tr.center\n }, {originalEvent: e});\n }\n };\n }\n\n /**\n * Enables the \"keyboard rotate and zoom\" interaction.\n *\n * @example\n * ```ts\n * map.keyboard.enable();\n * ```\n */\n enable() {\n this._enabled = true;\n }\n\n /**\n * Disables the \"keyboard rotate and zoom\" interaction.\n *\n * @example\n * ```ts\n * map.keyboard.disable();\n * ```\n */\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n /**\n * Returns a Boolean indicating whether the \"keyboard rotate and zoom\"\n * interaction is enabled.\n *\n * @returns `true` if the \"keyboard rotate and zoom\"\n * interaction is enabled.\n */\n isEnabled() {\n return this._enabled;\n }\n\n /**\n * Returns true if the handler is enabled and has detected the start of a\n * zoom/rotate gesture.\n *\n * @returns `true` if the handler is enabled and has detected the\n * start of a zoom/rotate gesture.\n */\n isActive() {\n return this._active;\n }\n\n /**\n * Disables the \"keyboard pan/rotate\" interaction, leaving the\n * \"keyboard zoom\" interaction enabled.\n *\n * @example\n * ```ts\n * map.keyboard.disableRotation();\n * ```\n */\n disableRotation() {\n this._rotationDisabled = true;\n }\n\n /**\n * Enables the \"keyboard pan/rotate\" interaction.\n *\n * @example\n * ```ts\n * map.keyboard.enable();\n * map.keyboard.enableRotation();\n * ```\n */\n enableRotation() {\n this._rotationDisabled = false;\n }\n}\n\nfunction easeOut(t: number) {\n return t * (2 - t);\n}\n","import {DOM} from '../../util/dom';\n\nimport {defaultEasing, bezier, zoomScale, scaleZoom} from '../../util/util';\nimport {now} from '../../util/time_control';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport {LngLat} from '../../geo/lng_lat';\nimport {TransformProvider} from './transform-provider';\n\nimport type {Map} from '../map';\nimport type Point from '@mapbox/point-geometry';\nimport type {AroundCenterOptions} from './two_fingers_touch';\nimport type {Handler} from '../handler_manager';\n\n// deltaY value for mouse scroll wheel identification\nconst wheelZoomDelta = 4.000244140625;\n\n// These magic numbers control the rate of zoom. Trackpad events fire at a greater\n// frequency than mouse scroll wheel, so reduce the zoom rate per wheel tick\nconst defaultZoomRate = 1 / 100;\nconst wheelZoomRate = 1 / 450;\n\n// upper bound on how much we scale the map in any single render frame; this\n// is used to limit zoom rate in the case of very fast scrolling\nconst maxScalePerFrame = 2;\n\n// Minimum time difference value to be used for calculating zoom easing in renderFrame();\n// this is used to normalise very fast (typically 0 to 0.3ms) repeating lastWheelEventTimeDiff\n// values generated by Chromium based browsers during fast scrolling wheel events.\nconst wheelEventTimeDiffAdjustment = 5;\n\n/**\n * The `ScrollZoomHandler` allows the user to zoom the map by scrolling.\n *\n * @group Handlers\n */\nexport class ScrollZoomHandler implements Handler {\n _map: Map;\n _tr: TransformProvider;\n _enabled: boolean;\n _active: boolean;\n _zooming: boolean;\n _aroundCenter: boolean;\n _aroundPoint: Point;\n _type: 'wheel' | 'trackpad' | null;\n _lastValue: number;\n _timeout: ReturnType; // used for delayed-handling of a single wheel movement\n _finishTimeout: ReturnType; // used to delay final '{move,zoom}end' events\n\n _lastWheelEvent: any;\n _lastWheelEventTime: number;\n\n _lastExpectedZoom: number;\n _startZoom: number;\n _targetZoom: number;\n _delta: number;\n _easing: ((a: number) => number);\n _prevEase: {\n start: number;\n duration: number;\n easing: (_: number) => number;\n };\n\n _frameId: boolean;\n _triggerRenderFrame: () => void;\n\n _defaultZoomRate: number;\n _wheelZoomRate: number;\n\n /** @internal */\n constructor(map: Map, triggerRenderFrame: () => void) {\n this._map = map;\n this._tr = new TransformProvider(map);\n this._triggerRenderFrame = triggerRenderFrame;\n\n this._delta = 0;\n\n this._defaultZoomRate = defaultZoomRate;\n this._wheelZoomRate = wheelZoomRate;\n }\n\n /**\n * Set the zoom rate of a trackpad\n * @param zoomRate - 1/100 The rate used to scale trackpad movement to a zoom value.\n * @example\n * Speed up trackpad zoom\n * ```ts\n * map.scrollZoom.setZoomRate(1/25);\n * ```\n */\n setZoomRate(zoomRate: number) {\n this._defaultZoomRate = zoomRate;\n }\n\n /**\n * Set the zoom rate of a mouse wheel\n * @param wheelZoomRate - 1/450 The rate used to scale mouse wheel movement to a zoom value.\n * @example\n * Slow down zoom of mouse wheel\n * ```ts\n * map.scrollZoom.setWheelZoomRate(1/600);\n * ```\n */\n setWheelZoomRate(wheelZoomRate: number) {\n this._wheelZoomRate = wheelZoomRate;\n }\n\n /**\n * Returns a Boolean indicating whether the \"scroll to zoom\" interaction is enabled.\n * @returns `true` if the \"scroll to zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /*\n * Active state is turned on and off with every scroll wheel event and is set back to false before the map\n * render is called, so _active is not a good candidate for determining if a scroll zoom animation is in\n * progress.\n */\n isActive() {\n return !!this._active || this._finishTimeout !== undefined;\n }\n\n isZooming() {\n return !!this._zooming;\n }\n\n /**\n * Enables the \"scroll to zoom\" interaction.\n *\n * @param options - Options object.\n * @example\n * ```ts\n * map.scrollZoom.enable();\n * map.scrollZoom.enable({ around: 'center' })\n * ```\n */\n enable(options?: AroundCenterOptions | boolean) {\n if (this.isEnabled()) return;\n this._enabled = true;\n this._aroundCenter = !!options && (options as AroundCenterOptions).around === 'center';\n }\n\n /**\n * Disables the \"scroll to zoom\" interaction.\n *\n * @example\n * ```ts\n * map.scrollZoom.disable();\n * ```\n */\n disable() {\n if (!this.isEnabled()) return;\n this._enabled = false;\n }\n\n /**\n * Determines whether or not the gesture is blocked due to cooperativeGestures.\n */\n _shouldBePrevented(e: WheelEvent) {\n if (!this._map.cooperativeGestures.isEnabled()) {\n return false;\n }\n\n const isTrackpadPinch = e.ctrlKey;\n const isBypassed = isTrackpadPinch || this._map.cooperativeGestures.isBypassed(e);\n\n return !isBypassed;\n }\n\n wheel(e: WheelEvent) {\n if (!this.isEnabled()) return;\n if (this._shouldBePrevented(e)) {\n this._map.cooperativeGestures.notifyGestureBlocked('wheel_zoom', e);\n return;\n }\n let value = e.deltaMode === WheelEvent.DOM_DELTA_LINE ? e.deltaY * 40 : e.deltaY;\n const currentTime = now(),\n timeDelta = currentTime - (this._lastWheelEventTime || 0);\n\n this._lastWheelEventTime = currentTime;\n\n if (value !== 0 && (value % wheelZoomDelta) === 0) {\n // This one is definitely a mouse wheel event.\n this._type = 'wheel';\n\n } else if (value !== 0 && Math.abs(value) < 4) {\n // This one is definitely a trackpad event because it is so small.\n this._type = 'trackpad';\n\n } else if (timeDelta > 400) {\n // This is likely a new scroll action.\n this._type = null;\n this._lastValue = value;\n\n // Start a timeout in case this was a singular event, and delay it by up to 40ms.\n this._timeout = setTimeout(this._onTimeout, 40, e);\n\n } else if (!this._type) {\n // This is a repeating event, but we don't know the type of event just yet.\n // If the delta per time is small, we assume it's a fast trackpad; otherwise we switch into wheel mode.\n this._type = (Math.abs(timeDelta * value) < 200) ? 'trackpad' : 'wheel';\n\n // Make sure our delayed event isn't fired again, because we accumulate\n // the previous event (which was less than 40ms ago) into this event.\n if (this._timeout) {\n clearTimeout(this._timeout);\n this._timeout = null;\n value += this._lastValue;\n }\n }\n\n // Slow down zoom if shift key is held for more precise zooming\n if (e.shiftKey && value) value = value / 4;\n\n // Only fire the callback if we actually know what type of scrolling device the user uses.\n if (this._type) {\n this._lastWheelEvent = e;\n this._delta -= value;\n if (!this._active) {\n this._start(e);\n }\n }\n\n e.preventDefault();\n }\n\n _onTimeout = (initialEvent: MouseEvent) => {\n this._type = 'wheel';\n this._delta -= this._lastValue;\n if (!this._active) {\n this._start(initialEvent);\n }\n };\n\n _start(e: MouseEvent) {\n if (!this._delta) return;\n\n if (this._frameId) {\n this._frameId = null;\n }\n\n this._active = true;\n if (!this.isZooming()) {\n this._zooming = true;\n }\n\n if (this._finishTimeout) {\n clearTimeout(this._finishTimeout);\n delete this._finishTimeout;\n }\n\n const pos = DOM.mousePos(this._map.getCanvas(), e);\n const tr = this._tr;\n\n // Whether aroundPoint is actually unprojectable is not a problem to be solved here, but in handler_manager.ts instead.\n if (this._aroundCenter) {\n this._aroundPoint = tr.transform.locationToScreenPoint(LngLat.convert(tr.center));\n } else {\n this._aroundPoint = pos;\n }\n\n if (!this._frameId) {\n this._frameId = true;\n this._triggerRenderFrame();\n }\n }\n\n renderFrame() {\n if (!this._frameId) return;\n this._frameId = null;\n\n if (!this.isActive()) return;\n const tr = this._tr.transform;\n\n // When globe is enabled zoom might be modified by the map center latitude being changes (either by panning or by zoom moving the map)\n if (typeof this._lastExpectedZoom === 'number') {\n const externalZoomChange = tr.zoom - this._lastExpectedZoom;\n if (typeof this._startZoom === 'number') {\n this._startZoom += externalZoomChange;\n }\n if (typeof this._targetZoom === 'number') {\n this._targetZoom += externalZoomChange;\n }\n }\n\n // if we've had scroll events since the last render frame, consume the\n // accumulated delta, and update the target zoom level accordingly\n if (this._delta !== 0) {\n // For trackpad events and single mouse wheel ticks, use the default zoom rate\n const zoomRate = (this._type === 'wheel' && Math.abs(this._delta) > wheelZoomDelta) ? this._wheelZoomRate : this._defaultZoomRate;\n // Scale by sigmoid of scroll wheel delta.\n let scale = maxScalePerFrame / (1 + Math.exp(-Math.abs(this._delta * zoomRate)));\n\n if (this._delta < 0 && scale !== 0) {\n scale = 1 / scale;\n }\n\n const fromScale = typeof this._targetZoom !== 'number' ? tr.scale : zoomScale(this._targetZoom);\n this._targetZoom = tr.applyConstrain(tr.getCameraLngLat(), scaleZoom(fromScale * scale)).zoom;\n\n // if this is a mouse wheel, refresh the starting zoom and easing\n // function we're using to smooth out the zooming between wheel\n // events\n if (this._type === 'wheel') {\n this._startZoom = tr.zoom;\n this._easing = this._smoothOutEasing(200);\n }\n\n this._delta = 0;\n }\n\n const targetZoom = typeof this._targetZoom !== 'number' ? tr.zoom : this._targetZoom;\n const startZoom = this._startZoom;\n const easing = this._easing;\n\n let finished = false;\n let zoom;\n\n if (this._type === 'wheel' && startZoom && easing) {\n const lastWheelEventTimeDiff = now() - this._lastWheelEventTime;\n\n const t = Math.min((lastWheelEventTimeDiff + wheelEventTimeDiffAdjustment) / 200, 1);\n\n const k = easing(t);\n zoom = interpolates.number(startZoom, targetZoom, k);\n if (t < 1) {\n if (!this._frameId) {\n this._frameId = true;\n }\n } else {\n finished = true;\n }\n } else {\n zoom = targetZoom;\n finished = true;\n }\n\n this._active = true;\n\n if (finished) {\n this._active = false;\n this._finishTimeout = setTimeout(() => {\n this._zooming = false;\n this._triggerRenderFrame();\n delete this._targetZoom;\n delete this._lastExpectedZoom;\n delete this._finishTimeout;\n }, 200);\n }\n\n this._lastExpectedZoom = zoom;\n\n return {\n noInertia: true,\n needsRenderFrame: !finished,\n zoomDelta: zoom - tr.zoom,\n around: this._aroundPoint,\n originalEvent: this._lastWheelEvent\n };\n }\n\n _smoothOutEasing(duration: number) {\n let easing = defaultEasing;\n\n if (this._prevEase) {\n const currentEase = this._prevEase;\n const t = (now() - currentEase.start) / currentEase.duration;\n const speed = currentEase.easing(t + 0.01) - currentEase.easing(t);\n\n // Quick hack to make new bezier that is continuous with last\n const x = 0.27 / Math.sqrt(speed * speed + 0.0001) * 0.01;\n const y = Math.sqrt(0.27 * 0.27 - x * x);\n\n easing = bezier(x, y, 0.25, 1);\n }\n\n this._prevEase = {\n start: now(),\n duration,\n easing\n };\n\n return easing;\n }\n\n reset() {\n this._active = false;\n this._zooming = false;\n delete this._targetZoom;\n delete this._lastExpectedZoom;\n if (this._finishTimeout) {\n clearTimeout(this._finishTimeout);\n delete this._finishTimeout;\n }\n }\n}\n","import type {ClickZoomHandler} from '../click_zoom';\nimport type {TapZoomHandler} from './../tap_zoom';\n\n/**\n * The `DoubleClickZoomHandler` allows the user to zoom the map at a point by\n * double clicking or double tapping.\n *\n * @group Handlers\n */\nexport class DoubleClickZoomHandler {\n\n _clickZoom: ClickZoomHandler;\n _tapZoom: TapZoomHandler;\n\n /** @internal */\n constructor(clickZoom: ClickZoomHandler, TapZoom: TapZoomHandler) {\n this._clickZoom = clickZoom;\n this._tapZoom = TapZoom;\n }\n\n /**\n * Enables the \"double click to zoom\" interaction.\n *\n * @example\n * ```ts\n * map.doubleClickZoom.enable();\n * ```\n */\n enable() {\n this._clickZoom.enable();\n this._tapZoom.enable();\n }\n\n /**\n * Disables the \"double click to zoom\" interaction.\n *\n * @example\n * ```ts\n * map.doubleClickZoom.disable();\n * ```\n */\n disable() {\n this._clickZoom.disable();\n this._tapZoom.disable();\n }\n\n /**\n * Returns a Boolean indicating whether the \"double click to zoom\" interaction is enabled.\n *\n * @returns `true` if the \"double click to zoom\" interaction is enabled.\n */\n isEnabled() {\n return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();\n }\n\n /**\n * Returns a Boolean indicating whether the \"double click to zoom\" interaction is active, i.e. currently being used.\n *\n * @returns `true` if the \"double click to zoom\" interaction is active.\n */\n isActive() {\n return this._clickZoom.isActive() || this._tapZoom.isActive();\n }\n}\n","import type Point from '@mapbox/point-geometry';\nimport type {Map} from '../map';\nimport {TransformProvider} from './transform-provider';\nimport {type Handler} from '../handler_manager';\n\n/**\n * The `ClickZoomHandler` allows the user to zoom the map at a point by double clicking\n * It is used by other handlers\n */\nexport class ClickZoomHandler implements Handler {\n\n _tr: TransformProvider;\n _enabled: boolean;\n _active: boolean;\n\n /** @internal */\n constructor(map: Map) {\n this._tr = new TransformProvider(map);\n this.reset();\n }\n\n reset() {\n this._active = false;\n }\n\n dblclick(e: MouseEvent, point: Point) {\n e.preventDefault();\n return {\n cameraAnimation: (map: Map) => {\n map.easeTo({\n duration: 300,\n zoom: this._tr.zoom + (e.shiftKey ? -1 : 1),\n around: this._tr.unproject(point)\n }, {originalEvent: e});\n }\n };\n }\n\n enable() {\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isActive() {\n return this._active;\n }\n}\n","import {type Handler} from '../handler_manager';\nimport {TapRecognizer, MAX_TAP_INTERVAL, MAX_DIST} from './tap_recognizer';\nimport type Point from '@mapbox/point-geometry';\n\n/**\n * A `TapDragZoomHandler` allows the user to zoom the map at a point by double tapping. It also allows the user pan the map by dragging.\n */\nexport class TapDragZoomHandler implements Handler {\n\n _enabled: boolean;\n _active: boolean;\n _swipePoint: Point;\n _swipeTouch: number;\n _tapTime: number;\n _tapPoint: Point;\n _tap: TapRecognizer;\n\n constructor() {\n\n this._tap = new TapRecognizer({\n numTouches: 1,\n numTaps: 1\n });\n\n this.reset();\n }\n\n reset() {\n this._active = false;\n delete this._swipePoint;\n delete this._swipeTouch;\n delete this._tapTime;\n delete this._tapPoint;\n this._tap.reset();\n }\n\n touchstart(e: TouchEvent, points: Array, mapTouches: Array) {\n if (this._swipePoint) return;\n\n if (!this._tapTime) {\n this._tap.touchstart(e, points, mapTouches);\n } else {\n const swipePoint = points[0];\n\n const soonEnough = e.timeStamp - this._tapTime < MAX_TAP_INTERVAL;\n const closeEnough = this._tapPoint.dist(swipePoint) < MAX_DIST;\n\n if (!soonEnough || !closeEnough) {\n this.reset();\n } else if (mapTouches.length > 0) {\n this._swipePoint = swipePoint;\n this._swipeTouch = mapTouches[0].identifier;\n }\n }\n }\n\n touchmove(e: TouchEvent, points: Array, mapTouches: Array) {\n if (!this._tapTime) {\n this._tap.touchmove(e, points, mapTouches);\n } else if (this._swipePoint) {\n if (mapTouches[0].identifier !== this._swipeTouch) {\n return;\n }\n\n const newSwipePoint = points[0];\n const dist = newSwipePoint.y - this._swipePoint.y;\n this._swipePoint = newSwipePoint;\n\n e.preventDefault();\n this._active = true;\n\n return {\n zoomDelta: dist / 128\n };\n }\n }\n\n touchend(e: TouchEvent, points: Array, mapTouches: Array) {\n if (!this._tapTime) {\n const point = this._tap.touchend(e, points, mapTouches);\n if (point) {\n this._tapTime = e.timeStamp;\n this._tapPoint = point;\n }\n } else if (this._swipePoint) {\n if (mapTouches.length === 0) {\n this.reset();\n }\n }\n }\n\n touchcancel() {\n this.reset();\n }\n\n enable() {\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this.reset();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isActive() {\n return this._active;\n }\n}\n","import type {MousePanHandler} from '../mouse';\nimport type {TouchPanHandler} from './../touch_pan';\n\n/**\n * A {@link DragPanHandler} options object\n */\nexport type DragPanOptions = {\n /**\n * factor used to scale the drag velocity\n * @defaultValue 0\n */\n linearity?: number;\n /**\n * easing function applied to `map.panTo` when applying the drag.\n * @param t - the easing function\n * @defaultValue bezier(0, 0, 0.3, 1)\n */\n easing?: (t: number) => number;\n /**\n * the maximum value of the drag velocity.\n * @defaultValue 1400\n */\n deceleration?: number;\n /**\n * the rate at which the speed reduces after the pan ends.\n * @defaultValue 2500\n */\n maxSpeed?: number;\n};\n\n/**\n * The `DragPanHandler` allows the user to pan the map by clicking and dragging\n * the cursor.\n *\n * @group Handlers\n */\nexport class DragPanHandler {\n\n _el: HTMLElement;\n _mousePan: MousePanHandler;\n _touchPan: TouchPanHandler;\n _inertiaOptions: DragPanOptions | boolean;\n\n /** @internal */\n constructor(el: HTMLElement, mousePan: MousePanHandler, touchPan: TouchPanHandler) {\n this._el = el;\n this._mousePan = mousePan;\n this._touchPan = touchPan;\n }\n\n /**\n * Enables the \"drag to pan\" interaction.\n *\n * @param options - Options object\n * @example\n * ```ts\n * map.dragPan.enable();\n * map.dragPan.enable({\n * linearity: 0.3,\n * easing: bezier(0, 0, 0.3, 1),\n * maxSpeed: 1400,\n * deceleration: 2500,\n * });\n * ```\n */\n enable(options?: DragPanOptions | boolean) {\n this._inertiaOptions = options || {};\n this._mousePan.enable();\n this._touchPan.enable();\n this._el.classList.add('maplibregl-touch-drag-pan');\n }\n\n /**\n * Disables the \"drag to pan\" interaction.\n *\n * @example\n * ```ts\n * map.dragPan.disable();\n * ```\n */\n disable() {\n this._mousePan.disable();\n this._touchPan.disable();\n this._el.classList.remove('maplibregl-touch-drag-pan');\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pan\" interaction is enabled.\n *\n * @returns `true` if the \"drag to pan\" interaction is enabled.\n */\n isEnabled() {\n return this._mousePan.isEnabled() && this._touchPan.isEnabled();\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pan\" interaction is active, i.e. currently being used.\n *\n * @returns `true` if the \"drag to pan\" interaction is active.\n */\n isActive() {\n return this._mousePan.isActive() || this._touchPan.isActive();\n }\n}\n","import type {MousePitchHandler, MouseRollHandler, MouseRotateHandler} from '../mouse';\n\n/**\n * Options object for `DragRotateHandler`.\n */\nexport type DragRotateHandlerOptions = {\n /**\n * Control the map pitch in addition to the bearing\n * @defaultValue true\n */\n pitchWithRotate: boolean;\n /**\n * Control the map roll in addition to the bearing\n * @defaultValue false\n */\n rollEnabled: boolean;\n};\n\n/**\n * The `DragRotateHandler` allows the user to rotate the map by clicking and\n * dragging the cursor while holding the right mouse button or `ctrl` key.\n *\n * @group Handlers\n */\nexport class DragRotateHandler {\n\n _mouseRotate: MouseRotateHandler;\n _mousePitch: MousePitchHandler;\n _mouseRoll: MouseRollHandler;\n _pitchWithRotate: boolean;\n _rollEnabled: boolean;\n\n /** @internal */\n constructor(options: DragRotateHandlerOptions, mouseRotate: MouseRotateHandler, mousePitch: MousePitchHandler, mouseRoll: MouseRollHandler) {\n this._pitchWithRotate = options.pitchWithRotate;\n this._rollEnabled = options.rollEnabled;\n this._mouseRotate = mouseRotate;\n this._mousePitch = mousePitch;\n this._mouseRoll = mouseRoll;\n }\n\n /**\n * Enables the \"drag to rotate\" interaction.\n *\n * @example\n * ```ts\n * map.dragRotate.enable();\n * ```\n */\n enable() {\n this._mouseRotate.enable();\n if (this._pitchWithRotate) this._mousePitch.enable();\n if (this._rollEnabled) this._mouseRoll.enable();\n }\n\n /**\n * Disables the \"drag to rotate\" interaction.\n *\n * @example\n * ```ts\n * map.dragRotate.disable();\n * ```\n */\n disable() {\n this._mouseRotate.disable();\n this._mousePitch.disable();\n this._mouseRoll.disable();\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to rotate\" interaction is enabled.\n *\n * @returns `true` if the \"drag to rotate\" interaction is enabled.\n */\n isEnabled() {\n return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled()) && (!this._rollEnabled || this._mouseRoll.isEnabled());\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to rotate\" interaction is active, i.e. currently being used.\n *\n * @returns `true` if the \"drag to rotate\" interaction is active.\n */\n isActive() {\n return this._mouseRotate.isActive() || this._mousePitch.isActive() || this._mouseRoll.isActive();\n }\n}\n","import type {TwoFingersTouchZoomHandler, TwoFingersTouchRotateHandler, AroundCenterOptions} from '../two_fingers_touch';\nimport type {TapDragZoomHandler} from '../tap_drag_zoom';\n\n/**\n * The `TwoFingersTouchZoomRotateHandler` allows the user to zoom and rotate the map by\n * pinching on a touchscreen.\n *\n * They can zoom with one finger by double tapping and dragging. On the second tap,\n * hold the finger down and drag up or down to zoom in or out.\n *\n * @group Handlers\n */\nexport class TwoFingersTouchZoomRotateHandler {\n\n _el: HTMLElement;\n _touchZoom: TwoFingersTouchZoomHandler;\n _touchRotate: TwoFingersTouchRotateHandler;\n _tapDragZoom: TapDragZoomHandler;\n _rotationDisabled: boolean;\n _enabled: boolean;\n\n /** @internal */\n constructor(el: HTMLElement, touchZoom: TwoFingersTouchZoomHandler, touchRotate: TwoFingersTouchRotateHandler, tapDragZoom: TapDragZoomHandler) {\n this._el = el;\n this._touchZoom = touchZoom;\n this._touchRotate = touchRotate;\n this._tapDragZoom = tapDragZoom;\n this._rotationDisabled = false;\n this._enabled = true;\n }\n\n /**\n * Enables the \"pinch to rotate and zoom\" interaction.\n *\n * @param options - Options object.\n *\n * @example\n * ```ts\n * map.touchZoomRotate.enable();\n * map.touchZoomRotate.enable({ around: 'center' });\n * ```\n */\n enable(options?: AroundCenterOptions | boolean | null) {\n this._touchZoom.enable(options);\n if (!this._rotationDisabled) this._touchRotate.enable(options);\n this._tapDragZoom.enable();\n this._el.classList.add('maplibregl-touch-zoom-rotate');\n }\n\n /**\n * Disables the \"pinch to rotate and zoom\" interaction.\n *\n * @example\n * ```ts\n * map.touchZoomRotate.disable();\n * ```\n */\n disable() {\n this._touchZoom.disable();\n this._touchRotate.disable();\n this._tapDragZoom.disable();\n this._el.classList.remove('maplibregl-touch-zoom-rotate');\n }\n\n /**\n * Returns a Boolean indicating whether the \"pinch to rotate and zoom\" interaction is enabled.\n *\n * @returns `true` if the \"pinch to rotate and zoom\" interaction is enabled.\n */\n isEnabled() {\n return this._touchZoom.isEnabled() &&\n (this._rotationDisabled || this._touchRotate.isEnabled()) &&\n this._tapDragZoom.isEnabled();\n }\n\n /**\n * Returns true if the handler is enabled and has detected the start of a zoom/rotate gesture.\n *\n * @returns `true` if the handler is active, `false` otherwise\n */\n isActive() {\n return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();\n }\n\n /**\n * Disables the \"pinch to rotate\" interaction, leaving the \"pinch to zoom\"\n * interaction enabled.\n *\n * @example\n * ```ts\n * map.touchZoomRotate.disableRotation();\n * ```\n */\n disableRotation() {\n this._rotationDisabled = true;\n this._touchRotate.disable();\n }\n\n /**\n * Enables the \"pinch to rotate\" interaction.\n *\n * @example\n * ```ts\n * map.touchZoomRotate.enable();\n * map.touchZoomRotate.enableRotation();\n * ```\n */\n enableRotation() {\n this._rotationDisabled = false;\n if (this._touchZoom.isEnabled()) this._touchRotate.enable();\n }\n}\n","import {DOM} from '../../util/dom';\nimport {Event} from '../../util/evented';\nimport {type Handler} from '../handler_manager';\n\nimport type {Map} from '../map';\n\n/**\n * The {@link CooperativeGesturesHandler} options object for the gesture settings\n */\nexport type GestureOptions = boolean;\n\n/**\n * A `CooperativeGestureHandler` is a control that adds cooperative gesture info when user tries to zoom in/out.\n *\n * When the CooperativeGestureHandler blocks a gesture, it will emit a `cooperativegestureprevented` event.\n *\n * @group Handlers\n *\n * @example\n * ```ts\n * const map = new Map({\n * cooperativeGestures: true\n * });\n * ```\n * @see [Example: cooperative gestures](https://maplibre.org/maplibre-gl-js/docs/examples/cooperative-gestures/)\n **/\nexport class CooperativeGesturesHandler implements Handler {\n _options: GestureOptions;\n _map: Map;\n _container: HTMLElement;\n /**\n * This is the key that will allow to bypass the cooperative gesture protection\n */\n _bypassKey: 'metaKey' | 'ctrlKey' = navigator.userAgent.indexOf('Mac') !== -1 ? 'metaKey' : 'ctrlKey';\n _enabled: boolean;\n\n constructor(map: Map, options: GestureOptions) {\n this._map = map;\n this._options = options;\n this._enabled = false;\n }\n isActive(): boolean {\n return false;\n }\n reset(): void {}\n\n _setupUI() {\n if (this._container) return;\n const mapCanvasContainer = this._map.getCanvasContainer();\n // Add a cooperative gestures class (enable touch-action: pan-x pan-y;)\n mapCanvasContainer.classList.add('maplibregl-cooperative-gestures');\n this._container = DOM.create('div', 'maplibregl-cooperative-gesture-screen', mapCanvasContainer);\n let desktopMessage = this._map._getUIString('CooperativeGesturesHandler.WindowsHelpText');\n if (this._bypassKey === 'metaKey') {\n desktopMessage = this._map._getUIString('CooperativeGesturesHandler.MacHelpText');\n }\n const mobileMessage = this._map._getUIString('CooperativeGesturesHandler.MobileHelpText');\n // Create and append the desktop message div\n const desktopDiv = document.createElement('div');\n desktopDiv.className = 'maplibregl-desktop-message';\n desktopDiv.textContent = desktopMessage;\n this._container.appendChild(desktopDiv);\n // Create and append the mobile message div\n const mobileDiv = document.createElement('div');\n mobileDiv.className = 'maplibregl-mobile-message';\n mobileDiv.textContent = mobileMessage;\n this._container.appendChild(mobileDiv);\n // Remove cooperative gesture screen from the accessibility tree since screenreaders cannot interact with the map using gestures\n this._container.setAttribute('aria-hidden', 'true');\n }\n\n _destroyUI() {\n if (this._container) {\n DOM.remove(this._container);\n const mapCanvasContainer = this._map.getCanvasContainer();\n mapCanvasContainer.classList.remove('maplibregl-cooperative-gestures');\n }\n delete this._container;\n }\n\n enable() {\n this._setupUI();\n this._enabled = true;\n }\n\n disable() {\n this._enabled = false;\n this._destroyUI();\n }\n\n isEnabled() {\n return this._enabled;\n }\n\n isBypassed(event: MouseEvent | WheelEvent | PointerEvent) {\n return event[this._bypassKey];\n }\n\n notifyGestureBlocked(gestureType: 'wheel_zoom' | 'touch_pan', originalEvent: Event) {\n if (!this._enabled) return;\n\n // notify subscribers that a cooperative gesture was prevented\n this._map.fire(new Event('cooperativegestureprevented', {gestureType, originalEvent}));\n\n // Alert user how to scroll/pan\n this._container.classList.add('maplibregl-show');\n setTimeout(() => {\n this._container.classList.remove('maplibregl-show');\n }, 100);\n }\n}\n","import {Event} from '../util/evented';\nimport {DOM} from '../util/dom';\nimport {type Map, type CompleteMapOptions} from './map';\nimport {HandlerInertia} from './handler_inertia';\nimport {MapEventHandler, BlockableMapEventHandler} from './handler/map_event';\nimport {BoxZoomHandler} from './handler/box_zoom';\nimport {TapZoomHandler} from './handler/tap_zoom';\nimport {generateMouseRotationHandler, generateMousePitchHandler, generateMousePanHandler, generateMouseRollHandler} from './handler/mouse';\nimport {TouchPanHandler} from './handler/touch_pan';\nimport {TwoFingersTouchZoomHandler, TwoFingersTouchRotateHandler, TwoFingersTouchPitchHandler} from './handler/two_fingers_touch';\nimport {KeyboardHandler} from './handler/keyboard';\nimport {ScrollZoomHandler} from './handler/scroll_zoom';\nimport {DoubleClickZoomHandler} from './handler/shim/dblclick_zoom';\nimport {ClickZoomHandler} from './handler/click_zoom';\nimport {TapDragZoomHandler} from './handler/tap_drag_zoom';\nimport {DragPanHandler} from './handler/shim/drag_pan';\nimport {DragRotateHandler} from './handler/shim/drag_rotate';\nimport {TwoFingersTouchZoomRotateHandler} from './handler/shim/two_fingers_touch';\nimport {CooperativeGesturesHandler} from './handler/cooperative_gestures';\nimport {extend, isPointableEvent, isTouchableEvent, isTouchableOrPointableType} from '../util/util';\nimport {browser} from '../util/browser';\nimport Point from '@mapbox/point-geometry';\nimport {type MapControlsDeltas} from '../geo/projection/camera_helper';\nimport type {LngLat} from '../geo/lng_lat';\nimport type {ITransform} from '../geo/transform_interface';\nimport type {Terrain} from '../render/terrain';\n\nconst isMoving = (p: EventsInProgress) => p.zoom || p.drag || p.roll || p.pitch || p.rotate;\n\nclass RenderFrameEvent extends Event {\n type: 'renderFrame';\n timeStamp: number;\n}\n\n/**\n * Handlers interpret dom events and return camera changes that should be\n * applied to the map (`HandlerResult`s). The camera changes are all deltas.\n * The handler itself should have no knowledge of the map's current state.\n * This makes it easier to merge multiple results and keeps handlers simpler.\n * For example, if there is a mousedown and mousemove, the mousePan handler\n * would return a `panDelta` on the mousemove.\n */\nexport interface Handler {\n enable(): void;\n disable(): void;\n isEnabled(): boolean;\n /**\n * This is used to indicate if the handler is currently active or not.\n * In case a handler is active, it will block other handlers from getting the relevant events.\n * There is an allow list of handlers that can be active at the same time, which is configured when adding a handler.\n */\n isActive(): boolean;\n /**\n * `reset` can be called by the manager at any time and must reset everything to it's original state\n */\n reset(): void;\n // Handlers can optionally implement these methods.\n // They are called with dom events whenever those dom evens are received.\n readonly touchstart?: (e: TouchEvent, points: Array, mapTouches: Array) => HandlerResult | void;\n readonly touchmove?: (e: TouchEvent, points: Array, mapTouches: Array) => HandlerResult | void;\n readonly touchmoveWindow?: (e: TouchEvent, points: Array, mapTouches: Array) => HandlerResult | void;\n readonly touchend?: (e: TouchEvent, points: Array, mapTouches: Array) => HandlerResult | void;\n readonly touchcancel?: (e: TouchEvent, points: Array, mapTouches: Array) => HandlerResult | void;\n readonly mousedown?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly mousemove?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly mousemoveWindow?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly mouseup?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly mouseupWindow?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly dblclick?: (e: MouseEvent, point: Point) => HandlerResult | void;\n readonly contextmenu?: (e: MouseEvent) => HandlerResult | void;\n readonly wheel?: (e: WheelEvent, point: Point) => HandlerResult | void;\n readonly keydown?: (e: KeyboardEvent) => HandlerResult | void;\n readonly keyup?: (e: KeyboardEvent) => HandlerResult | void;\n /**\n * `renderFrame` is the only non-dom event. It is called during render\n * frames and can be used to smooth camera changes (see scroll handler).\n */\n readonly renderFrame?: () => HandlerResult | void;\n}\n\n/**\n * All handler methods that are called with events can optionally return a `HandlerResult`.\n */\nexport type HandlerResult = {\n panDelta?: Point;\n zoomDelta?: number;\n bearingDelta?: number;\n pitchDelta?: number;\n rollDelta?: number;\n /**\n * the point to not move when changing the camera\n */\n around?: Point | null;\n /**\n * same as above, except for pinch actions, which are given higher priority\n */\n pinchAround?: Point | null;\n /**\n * A method that can fire a one-off easing by directly changing the map's camera.\n */\n cameraAnimation?: (map: Map) => any;\n /**\n * The last three properties are needed by only one handler: scrollzoom.\n * The DOM event to be used as the `originalEvent` on any camera change events.\n */\n originalEvent?: Event;\n /**\n * Makes the manager trigger a frame, allowing the handler to return multiple results over time (see scrollzoom).\n */\n needsRenderFrame?: boolean;\n /**\n * The camera changes won't get recorded for inertial zooming.\n */\n noInertia?: boolean;\n};\n\nexport type EventInProgress = {\n handlerName: string;\n originalEvent: Event;\n};\n\nexport type EventsInProgress = {\n zoom?: EventInProgress;\n roll?: EventInProgress;\n pitch?: EventInProgress;\n rotate?: EventInProgress;\n drag?: EventInProgress;\n};\n\nexport type MapControlsScenarioOptions = {\n terrain?: Terrain | null;\n tr: ITransform;\n deltasForHelper: MapControlsDeltas;\n preZoomAroundLoc: LngLat;\n combinedEventsInProgress: EventsInProgress;\n panDelta?: Point;\n};\n\nfunction hasChange(result: HandlerResult) {\n return (result.panDelta && result.panDelta.mag()) || result.zoomDelta || result.bearingDelta || result.pitchDelta || result.rollDelta;\n}\n\nexport class HandlerManager {\n _map: Map;\n _el: HTMLElement;\n _handlers: Array<{\n handlerName: string;\n handler: Handler;\n allowed: Array;\n }>;\n _eventsInProgress: EventsInProgress;\n _frameId: number;\n _inertia: HandlerInertia;\n _bearingSnap: number;\n _handlersById: {[x: string]: Handler};\n _updatingCamera: boolean;\n _changes: Array<[HandlerResult, EventsInProgress, {[handlerName: string]: Event}]>;\n _terrainMovement: boolean;\n _zoom: {handlerName: string};\n _previousActiveHandlers: {[x: string]: Handler};\n _listeners: Array<[Window | Document | HTMLElement, string, {\n passive?: boolean;\n capture?: boolean;\n } | undefined]>;\n\n constructor(map: Map, options: CompleteMapOptions) {\n this._map = map;\n this._el = this._map.getCanvasContainer();\n this._handlers = [];\n this._handlersById = {};\n this._changes = [];\n\n this._inertia = new HandlerInertia(map);\n this._bearingSnap = options.bearingSnap;\n this._previousActiveHandlers = {};\n\n // Track whether map is currently moving, to compute start/move/end events\n this._eventsInProgress = {};\n\n this._addDefaultHandlers(options);\n\n const el = this._el;\n\n this._listeners = [\n // This needs to be `passive: true` so that a double tap fires two\n // pairs of touchstart/end events in iOS Safari 13. If this is set to\n // `passive: false` then the second pair of events is only fired if\n // preventDefault() is called on the first touchstart. Calling preventDefault()\n // undesirably prevents click events.\n [el, 'touchstart', {passive: true}],\n // This needs to be `passive: false` so that scrolls and pinches can be\n // prevented in browsers that don't support `touch-actions: none`, for example iOS Safari 12.\n [el, 'touchmove', {passive: false}],\n [el, 'touchend', undefined],\n [el, 'touchcancel', undefined],\n\n [el, 'mousedown', undefined],\n [el, 'mousemove', undefined],\n [el, 'mouseup', undefined],\n\n // Bind window-level event listeners for move and up/end events. In the absence of\n // the pointer capture API, which is not supported by all necessary platforms,\n // window-level event listeners give us the best shot at capturing events that\n // fall outside the map canvas element. Use `{capture: true}` for the move event\n // to prevent map move events from being fired during a drag.\n [document, 'mousemove', {capture: true}],\n [document, 'mouseup', undefined],\n\n [el, 'mouseover', undefined],\n [el, 'mouseout', undefined],\n [el, 'dblclick', undefined],\n [el, 'click', undefined],\n\n [el, 'keydown', {capture: false}],\n [el, 'keyup', undefined],\n\n [el, 'wheel', {passive: false}],\n [el, 'contextmenu', undefined],\n\n [window, 'blur', undefined]\n ];\n\n for (const [target, type, listenerOptions] of this._listeners) {\n DOM.addEventListener(target, type, target === document ? this.handleWindowEvent : this.handleEvent, listenerOptions);\n }\n }\n\n destroy() {\n for (const [target, type, listenerOptions] of this._listeners) {\n DOM.removeEventListener(target, type, target === document ? this.handleWindowEvent : this.handleEvent, listenerOptions);\n }\n }\n\n _addDefaultHandlers(options: CompleteMapOptions) {\n const map = this._map;\n const el = map.getCanvasContainer();\n this._add('mapEvent', new MapEventHandler(map, options));\n\n const boxZoom = map.boxZoom = new BoxZoomHandler(map, options);\n this._add('boxZoom', boxZoom);\n if (options.interactive && options.boxZoom) {\n boxZoom.enable();\n }\n\n const cooperativeGestures = map.cooperativeGestures = new CooperativeGesturesHandler(map, options.cooperativeGestures);\n this._add('cooperativeGestures', cooperativeGestures);\n if (options.cooperativeGestures) {\n cooperativeGestures.enable();\n }\n\n const tapZoom = new TapZoomHandler(map);\n const clickZoom = new ClickZoomHandler(map);\n map.doubleClickZoom = new DoubleClickZoomHandler(clickZoom, tapZoom);\n this._add('tapZoom', tapZoom);\n this._add('clickZoom', clickZoom);\n if (options.interactive && options.doubleClickZoom) {\n map.doubleClickZoom.enable();\n }\n\n const tapDragZoom = new TapDragZoomHandler();\n this._add('tapDragZoom', tapDragZoom);\n\n const touchPitch = map.touchPitch = new TwoFingersTouchPitchHandler(map);\n this._add('touchPitch', touchPitch);\n if (options.interactive && options.touchPitch) {\n map.touchPitch.enable(options.touchPitch);\n }\n const getCenter = () => map.project(map.getCenter());\n const mouseRotate = generateMouseRotationHandler(options, getCenter);\n const mousePitch = generateMousePitchHandler(options);\n const mouseRoll = generateMouseRollHandler(options, getCenter);\n map.dragRotate = new DragRotateHandler(options, mouseRotate, mousePitch, mouseRoll);\n this._add('mouseRotate', mouseRotate, ['mousePitch']);\n this._add('mousePitch', mousePitch, ['mouseRotate', 'mouseRoll']);\n this._add('mouseRoll', mouseRoll, ['mousePitch']);\n if (options.interactive && options.dragRotate) {\n map.dragRotate.enable();\n }\n\n const mousePan = generateMousePanHandler(options);\n const touchPan = new TouchPanHandler(options, map);\n map.dragPan = new DragPanHandler(el, mousePan, touchPan);\n this._add('mousePan', mousePan);\n this._add('touchPan', touchPan, ['touchZoom', 'touchRotate']);\n if (options.interactive && options.dragPan) {\n map.dragPan.enable(options.dragPan);\n }\n\n const touchRotate = new TwoFingersTouchRotateHandler();\n const touchZoom = new TwoFingersTouchZoomHandler();\n map.touchZoomRotate = new TwoFingersTouchZoomRotateHandler(el, touchZoom, touchRotate, tapDragZoom);\n this._add('touchRotate', touchRotate, ['touchPan', 'touchZoom']);\n this._add('touchZoom', touchZoom, ['touchPan', 'touchRotate']);\n if (options.interactive && options.touchZoomRotate) {\n map.touchZoomRotate.enable(options.touchZoomRotate);\n }\n\n this._add('blockableMapEvent', new BlockableMapEventHandler(map));\n\n const scrollZoom = map.scrollZoom = new ScrollZoomHandler(map, () => this._triggerRenderFrame());\n this._add('scrollZoom', scrollZoom, ['mousePan']);\n if (options.interactive && options.scrollZoom) {\n map.scrollZoom.enable(options.scrollZoom);\n }\n\n const keyboard = map.keyboard = new KeyboardHandler(map);\n this._add('keyboard', keyboard);\n if (options.interactive && options.keyboard) {\n map.keyboard.enable();\n }\n }\n\n _add(handlerName: string, handler: Handler, allowed?: Array) {\n this._handlers.push({handlerName, handler, allowed});\n this._handlersById[handlerName] = handler;\n }\n\n stop(allowEndAnimation: boolean) {\n // do nothing if this method was triggered by a gesture update\n if (this._updatingCamera) return;\n\n for (const {handler} of this._handlers) {\n handler.reset();\n }\n this._inertia.clear();\n this._fireEvents({}, {}, allowEndAnimation);\n this._changes = [];\n }\n\n isActive() {\n for (const {handler} of this._handlers) {\n if (handler.isActive()) return true;\n }\n return false;\n }\n\n isZooming() {\n return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();\n }\n isRotating() {\n return !!this._eventsInProgress.rotate;\n }\n\n isMoving() {\n return Boolean(isMoving(this._eventsInProgress)) || this.isZooming();\n }\n\n _blockedByActive(activeHandlers: {[x: string]: Handler}, allowed: Array, myName: string) {\n for (const name in activeHandlers) {\n if (name === myName) continue;\n if (!allowed || allowed.indexOf(name) < 0) {\n return true;\n }\n }\n return false;\n }\n\n handleWindowEvent = (e: { type: 'mousemove' | 'mouseup' | 'touchmove'}) => {\n this.handleEvent(e, `${e.type}Window`);\n };\n\n _getMapTouches(touches: TouchList) {\n const mapTouches = [];\n for (const t of touches) {\n const target = (t.target as any as Node);\n if (this._el.contains(target)) {\n mapTouches.push(t);\n }\n }\n return mapTouches as any as TouchList;\n }\n\n handleEvent = (e: Event, eventName?: keyof Handler) => {\n\n if (e.type === 'blur') {\n this.stop(true);\n return;\n }\n\n this._updatingCamera = true;\n\n const inputEvent = e.type === 'renderFrame' ? undefined : e as UIEvent;\n\n /*\n * We don't call e.preventDefault() for any events by default.\n * Handlers are responsible for calling it where necessary.\n */\n\n const mergedHandlerResult: HandlerResult = {needsRenderFrame: false};\n const eventsInProgress: EventsInProgress = {};\n const activeHandlers = {};\n\n for (const {handlerName, handler, allowed} of this._handlers) {\n if (!handler.isEnabled()) continue;\n\n let data: HandlerResult;\n if (this._blockedByActive(activeHandlers, allowed, handlerName)) {\n handler.reset();\n\n } else {\n if (handler[eventName || e.type]) {\n if (isPointableEvent(e, eventName || e.type)){\n const point = DOM.mousePos(this._map.getCanvas(), e);\n data = handler[eventName || e.type](e, point);\n } else if (isTouchableEvent(e, eventName || e.type)) {\n const eventTouches = e.touches;\n const mapTouches = this._getMapTouches(eventTouches);\n const points = DOM.touchPos(this._map.getCanvas(), mapTouches);\n data = handler[eventName || e.type](e, points, mapTouches);\n } else if (!isTouchableOrPointableType(eventName || e.type)) {\n data = handler[eventName || e.type](e);\n }\n this.mergeHandlerResult(mergedHandlerResult, eventsInProgress, data, handlerName, inputEvent);\n if (data && data.needsRenderFrame) {\n this._triggerRenderFrame();\n }\n }\n }\n\n if (data || handler.isActive()) {\n activeHandlers[handlerName] = handler;\n }\n }\n\n const deactivatedHandlers: {[handlerName: string]: Event} = {};\n for (const name in this._previousActiveHandlers) {\n if (!activeHandlers[name]) {\n deactivatedHandlers[name] = inputEvent;\n }\n }\n this._previousActiveHandlers = activeHandlers;\n\n if (Object.keys(deactivatedHandlers).length || hasChange(mergedHandlerResult)) {\n this._changes.push([mergedHandlerResult, eventsInProgress, deactivatedHandlers]);\n this._triggerRenderFrame();\n }\n\n if (Object.keys(activeHandlers).length || hasChange(mergedHandlerResult)) {\n this._map._stop(true);\n }\n\n this._updatingCamera = false;\n\n const {cameraAnimation} = mergedHandlerResult;\n if (cameraAnimation) {\n this._inertia.clear();\n this._fireEvents({}, {}, true);\n this._changes = [];\n cameraAnimation(this._map);\n }\n };\n\n mergeHandlerResult(mergedHandlerResult: HandlerResult,\n eventsInProgress: EventsInProgress,\n handlerResult: HandlerResult,\n name: string,\n e?: UIEvent) {\n if (!handlerResult) return;\n\n extend(mergedHandlerResult, handlerResult);\n\n const eventData = {handlerName: name, originalEvent: handlerResult.originalEvent || e};\n\n // track which handler changed which camera property\n if (handlerResult.zoomDelta !== undefined) {\n eventsInProgress.zoom = eventData;\n }\n if (handlerResult.panDelta !== undefined) {\n eventsInProgress.drag = eventData;\n }\n if (handlerResult.rollDelta !== undefined) {\n eventsInProgress.roll = eventData;\n }\n if (handlerResult.pitchDelta !== undefined) {\n eventsInProgress.pitch = eventData;\n }\n if (handlerResult.bearingDelta !== undefined) {\n eventsInProgress.rotate = eventData;\n }\n\n }\n\n _applyChanges() {\n const combined: HandlerResult = {};\n const combinedEventsInProgress: EventsInProgress = {};\n const combinedDeactivatedHandlers = {};\n\n for (const [change, eventsInProgress, deactivatedHandlers] of this._changes) {\n\n if (change.panDelta) combined.panDelta = (combined.panDelta || new Point(0, 0))._add(change.panDelta);\n if (change.zoomDelta) combined.zoomDelta = (combined.zoomDelta || 0) + change.zoomDelta;\n if (change.bearingDelta) combined.bearingDelta = (combined.bearingDelta || 0) + change.bearingDelta;\n if (change.pitchDelta) combined.pitchDelta = (combined.pitchDelta || 0) + change.pitchDelta;\n if (change.rollDelta) combined.rollDelta = (combined.rollDelta || 0) + change.rollDelta;\n if (change.around !== undefined) combined.around = change.around;\n if (change.pinchAround !== undefined) combined.pinchAround = change.pinchAround;\n if (change.noInertia) combined.noInertia = change.noInertia;\n\n extend(combinedEventsInProgress, eventsInProgress);\n extend(combinedDeactivatedHandlers, deactivatedHandlers);\n }\n\n this._updateMapTransform(combined, combinedEventsInProgress, combinedDeactivatedHandlers);\n this._changes = [];\n }\n\n _updateMapTransform(combinedResult: HandlerResult,\n combinedEventsInProgress: EventsInProgress,\n deactivatedHandlers: {[handlerName: string]: Event}) {\n const map = this._map;\n const tr = map._getTransformForUpdate();\n const terrain = map.terrain;\n\n if (!hasChange(combinedResult) && !(terrain && this._terrainMovement)) {\n return this._fireEvents(combinedEventsInProgress, deactivatedHandlers, true);\n }\n\n // stop any ongoing camera animations (easeTo, flyTo)\n map._stop(true);\n\n let {panDelta, zoomDelta, bearingDelta, pitchDelta, rollDelta, around, pinchAround} = combinedResult;\n\n if (pinchAround !== undefined) {\n around = pinchAround;\n }\n\n around = around || map.transform.centerPoint;\n\n if (terrain && !tr.isPointOnMapSurface(around)) {\n around = tr.centerPoint;\n }\n\n const deltasForHelper: MapControlsDeltas = {\n panDelta,\n zoomDelta,\n rollDelta,\n pitchDelta,\n bearingDelta,\n around,\n };\n\n // Pre-zoom location under the mouse cursor is required for accurate mercator panning and zooming\n if (this._map.cameraHelper.useGlobeControls && !tr.isPointOnMapSurface(around)) {\n around = tr.centerPoint;\n }\n // If we are rotating about the center point, avoid numerical issues near the horizon by using the transform's\n // center directly, instead of computing it from the screen point\n const preZoomAroundLoc = around.distSqr(tr.centerPoint) < 1.0e-2 ?\n tr.center :\n tr.screenPointToLocation(panDelta ? around.sub(panDelta) : around);\n\n this._handleMapControls({\n terrain,\n tr,\n deltasForHelper,\n preZoomAroundLoc,\n combinedEventsInProgress,\n panDelta,\n });\n\n map._applyUpdatedTransform(tr);\n\n this._map._update();\n if (!combinedResult.noInertia) this._inertia.record(combinedResult);\n this._fireEvents(combinedEventsInProgress, deactivatedHandlers, true);\n\n }\n\n _handleMapControls({\n terrain,\n tr,\n deltasForHelper,\n preZoomAroundLoc,\n combinedEventsInProgress,\n panDelta}: MapControlsScenarioOptions) {\n\n const cameraHelper = this._map.cameraHelper;\n\n cameraHelper.handleMapControlsRollPitchBearingZoom(deltasForHelper, tr);\n\n if (!terrain) {\n cameraHelper.handleMapControlsPan(deltasForHelper, tr, preZoomAroundLoc);\n return;\n }\n\n if (cameraHelper.useGlobeControls) {\n if (!this._terrainMovement && (combinedEventsInProgress.drag || combinedEventsInProgress.zoom)) {\n this._terrainMovement = true;\n this._map._elevationFreeze = true;\n }\n cameraHelper.handleMapControlsPan(deltasForHelper, tr, preZoomAroundLoc);\n return;\n }\n\n if (!this._terrainMovement && (combinedEventsInProgress.drag || combinedEventsInProgress.zoom)) {\n this._terrainMovement = true;\n this._map._elevationFreeze = true;\n cameraHelper.handleMapControlsPan(deltasForHelper, tr, preZoomAroundLoc);\n return;\n }\n\n if (combinedEventsInProgress.drag && this._terrainMovement && panDelta) {\n tr.setCenter(tr.screenPointToLocation(tr.centerPoint.sub(panDelta)));\n return;\n }\n\n cameraHelper.handleMapControlsPan(deltasForHelper, tr, preZoomAroundLoc);\n }\n\n _fireEvents(newEventsInProgress: EventsInProgress, deactivatedHandlers: {[handlerName: string]: Event}, allowEndAnimation: boolean) {\n\n const wasMoving = isMoving(this._eventsInProgress);\n const nowMoving = isMoving(newEventsInProgress);\n\n const startEvents = {};\n\n for (const eventName in newEventsInProgress) {\n const {originalEvent} = newEventsInProgress[eventName];\n if (!this._eventsInProgress[eventName]) {\n startEvents[`${eventName}start`] = originalEvent;\n }\n this._eventsInProgress[eventName] = newEventsInProgress[eventName];\n }\n\n // fire start events only after this._eventsInProgress has been updated\n if (!wasMoving && nowMoving) {\n this._fireEvent('movestart', nowMoving.originalEvent);\n }\n\n for (const name in startEvents) {\n this._fireEvent(name, startEvents[name]);\n }\n\n if (nowMoving) {\n this._fireEvent('move', nowMoving.originalEvent);\n }\n\n for (const eventName in newEventsInProgress) {\n const {originalEvent} = newEventsInProgress[eventName];\n this._fireEvent(eventName, originalEvent);\n }\n\n const endEvents = {};\n\n let originalEndEvent;\n for (const eventName in this._eventsInProgress) {\n const {handlerName, originalEvent} = this._eventsInProgress[eventName];\n if (!this._handlersById[handlerName].isActive()) {\n delete this._eventsInProgress[eventName];\n originalEndEvent = deactivatedHandlers[handlerName] || originalEvent;\n endEvents[`${eventName}end`] = originalEndEvent;\n }\n }\n\n for (const name in endEvents) {\n this._fireEvent(name, endEvents[name]);\n }\n\n const stillMoving = isMoving(this._eventsInProgress);\n const finishedMoving = (wasMoving || nowMoving) && !stillMoving;\n if (finishedMoving && this._terrainMovement) {\n this._map._elevationFreeze = false;\n this._terrainMovement = false;\n const tr = this._map._getTransformForUpdate();\n if (this._map.getCenterClampedToGround()) {\n tr.recalculateZoomAndCenter(this._map.terrain);\n }\n this._map._applyUpdatedTransform(tr);\n }\n if (allowEndAnimation && finishedMoving) {\n this._updatingCamera = true;\n const inertialEase = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions);\n\n const shouldSnapToNorth = bearing => bearing !== 0 && -this._bearingSnap < bearing && bearing < this._bearingSnap;\n\n if (inertialEase && (inertialEase.essential || !browser.prefersReducedMotion)) {\n if (shouldSnapToNorth(inertialEase.bearing || this._map.getBearing())) {\n inertialEase.bearing = 0;\n }\n inertialEase.freezeElevation = true;\n this._map.easeTo(inertialEase, {originalEvent: originalEndEvent});\n } else {\n this._map.fire(new Event('moveend', {originalEvent: originalEndEvent}));\n if (shouldSnapToNorth(this._map.getBearing())) {\n this._map.resetNorth();\n }\n }\n this._updatingCamera = false;\n }\n\n }\n\n _fireEvent(type: string, e?: Event) {\n this._map.fire(new Event(type, e ? {originalEvent: e} : {}));\n }\n\n _requestFrame() {\n this._map.triggerRepaint();\n return this._map._renderTaskQueue.add(timeStamp => {\n delete this._frameId;\n this.handleEvent(new RenderFrameEvent('renderFrame', {timeStamp}));\n this._applyChanges();\n });\n }\n\n _triggerRenderFrame() {\n if (this._frameId === undefined) {\n this._frameId = this._requestFrame();\n }\n }\n}\n","import {extend, wrap, defaultEasing, pick, scaleZoom} from '../util/util';\nimport {interpolates} from '@maplibre/maplibre-gl-style-spec';\nimport {browser} from '../util/browser';\nimport {now} from '../util/time_control';\nimport {LngLat} from '../geo/lng_lat';\nimport {LngLatBounds} from '../geo/lng_lat_bounds';\nimport Point from '@mapbox/point-geometry';\nimport {Event, Evented} from '../util/evented';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\n\nimport type {Terrain} from '../render/terrain';\nimport type {ITransform} from '../geo/transform_interface';\nimport type {LngLatLike} from '../geo/lng_lat';\nimport type {LngLatBoundsLike} from '../geo/lng_lat_bounds';\nimport type {TaskID} from '../util/task_queue';\nimport type {PaddingOptions} from '../geo/edge_insets';\nimport type {HandlerManager} from './handler_manager';\nimport type {ICameraHelper} from '../geo/projection/camera_helper';\n\n/**\n * A [Point](https://github.com/mapbox/point-geometry) or an array of two numbers representing `x` and `y` screen coordinates in pixels.\n *\n * @group Geography and Geometry\n *\n * @example\n * ```ts\n * let p1 = new Point(-77, 38); // a PointLike which is a Point\n * let p2 = [-77, 38]; // a PointLike which is an array of two numbers\n * ```\n */\nexport type PointLike = Point | [number, number];\n\n/**\n * Options common to {@link Map.jumpTo}, {@link Map.easeTo}, and {@link Map.flyTo}, controlling the desired location,\n * zoom, bearing, pitch, and roll of the camera. All properties are optional, and when a property is omitted, the current\n * camera value for that property will remain unchanged.\n *\n * @example\n * Set the map's initial perspective with CameraOptions\n * ```ts\n * let map = new Map({\n * container: 'map',\n * style: 'https://demotiles.maplibre.org/style.json',\n * center: [-73.5804, 45.53483],\n * pitch: 60,\n * bearing: -60,\n * zoom: 10\n * });\n * ```\n * @see [Set pitch and bearing](https://maplibre.org/maplibre-gl-js/docs/examples/set-pitch-and-bearing/)\n * @see [Jump to a series of locations](https://maplibre.org/maplibre-gl-js/docs/examples/jump-to-a-series-of-locations/)\n * @see [Fly to a location](https://maplibre.org/maplibre-gl-js/docs/examples/fly-to-a-location/)\n * @see [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/display-buildings-in-3d/)\n */\nexport type CameraOptions = CenterZoomBearing & {\n /**\n * The desired pitch in degrees. The pitch is the angle towards the horizon\n * measured in degrees with a range between 0 and 60 degrees. For example, pitch: 0 provides the appearance\n * of looking straight down at the map, while pitch: 60 tilts the user's perspective towards the horizon.\n * Increasing the pitch value is often used to display 3D objects.\n */\n pitch?: number;\n /**\n * The desired roll in degrees. The roll is the angle about the camera boresight.\n */\n roll?: number;\n /**\n * The elevation of the center point in meters above sea level.\n */\n elevation?: number;\n};\n\n/**\n * Holds center, zoom and bearing properties\n */\nexport type CenterZoomBearing = {\n /**\n * The desired center.\n */\n center?: LngLatLike;\n /**\n * The desired mercator zoom level.\n */\n zoom?: number;\n /**\n * The desired bearing in degrees. The bearing is the compass direction that\n * is \"up\". For example, `bearing: 90` orients the map so that east is up.\n */\n bearing?: number;\n};\n\n/**\n * The options object related to the {@link Map.jumpTo} method\n */\nexport type JumpToOptions = CameraOptions & {\n /**\n * Dimensions in pixels applied on each side of the viewport for shifting the vanishing point.\n */\n padding?: PaddingOptions;\n};\n\n/**\n * A options object for the {@link Map.cameraForBounds} method\n */\nexport type CameraForBoundsOptions = CameraOptions & {\n /**\n * The amount of padding in pixels to add to the given bounds.\n */\n padding?: number | PaddingOptions;\n /**\n * The center of the given bounds relative to the map's center, measured in pixels.\n * @defaultValue [0, 0]\n */\n offset?: PointLike;\n /**\n * The maximum zoom level to allow when the camera would transition to the specified bounds.\n */\n maxZoom?: number;\n};\n\n/**\n * The {@link Map.flyTo} options object\n */\nexport type FlyToOptions = AnimationOptions & CameraOptions & {\n /**\n * The zooming \"curve\" that will occur along the\n * flight path. A high value maximizes zooming for an exaggerated animation, while a low\n * value minimizes zooming for an effect closer to {@link Map.easeTo}. 1.42 is the average\n * value selected by participants in the user study discussed in\n * [van Wijk (2003)](https://www.win.tue.nl/~vanwijk/zoompan.pdf). A value of\n * `Math.pow(6, 0.25)` would be equivalent to the root mean squared average velocity. A\n * value of 1 would produce a circular motion.\n * @defaultValue 1.42\n */\n curve?: number;\n /**\n * The zero-based zoom level at the peak of the flight path. If\n * `options.curve` is specified, this option is ignored.\n */\n minZoom?: number;\n /**\n * The average speed of the animation defined in relation to\n * `options.curve`. A speed of 1.2 means that the map appears to move along the flight path\n * by 1.2 times `options.curve` screenfulls every second. A _screenfull_ is the map's visible span.\n * It does not correspond to a fixed physical distance, but varies by zoom level.\n * @defaultValue 1.2\n */\n speed?: number;\n /**\n * The average speed of the animation measured in screenfulls\n * per second, assuming a linear timing curve. If `options.speed` is specified, this option is ignored.\n */\n screenSpeed?: number;\n /**\n * The animation's maximum duration, measured in milliseconds.\n * If duration exceeds maximum duration, it resets to 0.\n */\n maxDuration?: number;\n /**\n * The amount of padding in pixels to add to the given bounds.\n */\n padding?: number | PaddingOptions;\n};\n\n/**\n * The {@link Map.easeTo} options object\n */\nexport type EaseToOptions = AnimationOptions & CameraOptions & {\n delayEndEvents?: number;\n padding?: number | PaddingOptions;\n /**\n * If `zoom` is specified, `around` determines the point around which the zoom is centered.\n */\n around?: LngLatLike;\n easeId?: string;\n noMoveStart?: boolean;\n};\n\n/**\n * Options for {@link Map.fitBounds} method\n */\nexport type FitBoundsOptions = FlyToOptions & {\n /**\n * If `true`, the map transitions using {@link Map.easeTo}. If `false`, the map transitions using {@link Map.flyTo}.\n * See those functions and {@link AnimationOptions} for information about options available.\n * @defaultValue false\n */\n linear?: boolean;\n /**\n * The center of the given bounds relative to the map's center, measured in pixels.\n * @defaultValue [0, 0]\n */\n offset?: PointLike;\n /**\n * The maximum zoom level to allow when the map view transitions to the specified bounds.\n */\n maxZoom?: number;\n};\n\n/**\n * Options common to map movement methods that involve animation, such as {@link Map.panBy} and\n * {@link Map.easeTo}, controlling the duration and easing function of the animation. All properties\n * are optional.\n *\n */\nexport type AnimationOptions = {\n /**\n * The animation's duration, measured in milliseconds.\n */\n duration?: number;\n /**\n * A function taking a time in the range 0..1 and returning a number where 0 is\n * the initial state and 1 is the final state.\n */\n easing?: (_: number) => number;\n /**\n * of the target center relative to real map container center at the end of animation.\n */\n offset?: PointLike;\n /**\n * If `false`, no animation will occur.\n */\n animate?: boolean;\n /**\n * If `true`, then the animation is considered essential and will not be affected by\n * [`prefers-reduced-motion`](https://developer.mozilla.org/en-US/docs/Web/CSS/\\@media/prefers-reduced-motion).\n */\n essential?: boolean;\n /**\n * Default false. Needed in 3D maps to let the camera stay in a constant\n * height based on sea-level. After the animation finished the zoom-level will be recalculated in respect of\n * the distance from the camera to the center-coordinate-altitude.\n */\n freezeElevation?: boolean;\n};\n\n/**\n * A callback hook that allows manipulating the camera and being notified about camera updates before they happen\n */\nexport type CameraUpdateTransformFunction = (next: {\n center: LngLat;\n zoom: number;\n roll: number;\n pitch: number;\n bearing: number;\n elevation: number;\n}) => {\n center?: LngLat;\n zoom?: number;\n roll?: number;\n pitch?: number;\n bearing?: number;\n elevation?: number;\n};\n\nexport abstract class Camera extends Evented {\n transform: ITransform;\n cameraHelper: ICameraHelper;\n terrain: Terrain;\n handlers: HandlerManager;\n\n _moving: boolean;\n _zooming: boolean;\n _rotating: boolean;\n _pitching: boolean;\n _rolling: boolean;\n _padding: boolean;\n\n _bearingSnap: number;\n _easeStart: number;\n _easeOptions: {\n duration?: number;\n easing?: (_: number) => number;\n };\n _easeId: string | void;\n\n _onEaseFrame: (_: number) => void;\n _onEaseEnd: (easeId?: string) => void;\n _easeFrameId: TaskID;\n\n /**\n * @internal\n * holds the geographical coordinate of the target\n */\n _elevationCenter: LngLat;\n /**\n * @internal\n * holds the targ altitude value, = center elevation of the target.\n * This value may changes during flight, because new terrain-tiles loads during flight.\n */\n _elevationTarget: number;\n /**\n * @internal\n * holds the start altitude value, = center elevation before animation begins\n * this value will recalculated during flight in respect of changing _elevationTarget values,\n * so the linear interpolation between start and target keeps smooth and without jumps.\n */\n _elevationStart: number;\n /**\n * @internal\n * Saves the current state of the elevation freeze - this is used during map movement to prevent \"rocky\" camera movement.\n */\n _elevationFreeze: boolean;\n /**\n * @internal\n * Used to track accumulated changes during continuous interaction\n */\n _requestedCameraState?: ITransform;\n /**\n * A callback used to defer camera updates or apply arbitrary constraints.\n * If specified, this Camera instance can be used as a stateless component in React etc.\n */\n transformCameraUpdate: CameraUpdateTransformFunction | null;\n\n /**\n * @internal\n * If true, the elevation of the center point will automatically be set to the terrain elevation\n * (or zero if terrain is not enabled). If false, the elevation of the center point will default\n * to sea level and will not automatically update. Defaults to true. Needs to be set to false to\n * keep the camera above ground when pitch \\> 90 degrees.\n */\n _centerClampedToGround: boolean;\n\n abstract _requestRenderFrame(a: () => void): TaskID;\n abstract _cancelRenderFrame(_: TaskID): void;\n\n constructor(transform: ITransform, cameraHelper: ICameraHelper, options: {\n bearingSnap: number;\n }) {\n super();\n this._moving = false;\n this._zooming = false;\n this.transform = transform;\n this._bearingSnap = options.bearingSnap;\n this.cameraHelper = cameraHelper;\n\n this.on('moveend', () => {\n delete this._requestedCameraState;\n });\n }\n\n /**\n * @internal\n * Creates a new specialized transform instance from a projection instance and migrates\n * to this new transform, carrying over all the properties of the old transform (center, pitch, etc.).\n * When the style's projection is changed (or first set), this function should be called.\n */\n migrateProjection(newTransform: ITransform, newCameraHelper: ICameraHelper) {\n newTransform.apply(this.transform);\n this.transform = newTransform;\n this.cameraHelper = newCameraHelper;\n }\n\n /**\n * Returns the map's geographical centerpoint.\n *\n * @returns The map's geographical centerpoint.\n * @example\n * Return a LngLat object such as `{lng: 0, lat: 0}`\n * ```ts\n * let center = map.getCenter();\n * // access longitude and latitude values directly\n * let {lng, lat} = map.getCenter();\n * ```\n */\n getCenter(): LngLat { return new LngLat(this.transform.center.lng, this.transform.center.lat); }\n\n /**\n * Sets the map's geographical centerpoint. Equivalent to `jumpTo({center: center})`.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param center - The centerpoint to set.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * map.setCenter([-74, 38]);\n * ```\n */\n setCenter(center: LngLatLike, eventData?: any) {\n return this.jumpTo({center}, eventData);\n }\n\n /**\n * Returns the elevation of the map's center point.\n *\n * @returns The elevation of the map's center point, in meters above sea level.\n */\n getCenterElevation(): number { return this.transform.elevation; }\n\n /**\n * Sets the elevation of the map's center point, in meters above sea level. Equivalent to `jumpTo({elevation: elevation})`.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param elevation - The elevation to set, in meters above sea level.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n setCenterElevation(elevation: number, eventData?: any): this {\n this.jumpTo({elevation}, eventData);\n return this;\n }\n\n /**\n * Returns the value of `centerClampedToGround`.\n *\n * If true, the elevation of the center point will automatically be set to the terrain elevation\n * (or zero if terrain is not enabled). If false, the elevation of the center point will default\n * to sea level and will not automatically update. Defaults to true. Needs to be set to false to\n * keep the camera above ground when pitch \\> 90 degrees.\n */\n getCenterClampedToGround(): boolean { return this._centerClampedToGround; }\n\n /**\n * Sets the value of `centerClampedToGround`.\n *\n * If true, the elevation of the center point will automatically be set to the terrain elevation\n * (or zero if terrain is not enabled). If false, the elevation of the center point will default\n * to sea level and will not automatically update. Defaults to true. Needs to be set to false to\n * keep the camera above ground when pitch \\> 90 degrees.\n */\n setCenterClampedToGround(centerClampedToGround: boolean): void {\n this._centerClampedToGround = centerClampedToGround;\n }\n\n /**\n * Pans the map by the specified offset.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param offset - `x` and `y` coordinates by which to pan the map.\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js/docs/examples/navigate-the-map-with-game-like-controls/)\n */\n panBy(offset: PointLike, options?: EaseToOptions, eventData?: any): this {\n offset = Point.convert(offset).mult(-1);\n return this.panTo(this.transform.center, extend({offset}, options), eventData);\n }\n\n /**\n * Pans the map to the specified location with an animated transition.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param lnglat - The location to pan the map to.\n * @param options - Options describing the destination and animation of the transition.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * map.panTo([-74, 38]);\n * // Specify that the panTo animation should last 5000 milliseconds.\n * map.panTo([-74, 38], {duration: 5000});\n * ```\n * @see [Update a feature in realtime](https://maplibre.org/maplibre-gl-js/docs/examples/update-a-feature-in-realtime/)\n */\n panTo(lnglat: LngLatLike, options?: EaseToOptions, eventData?: any): this {\n return this.easeTo(extend({\n center: lnglat\n }, options), eventData);\n }\n\n /**\n * Returns the map's current zoom level.\n *\n * @returns The map's current zoom level.\n * @example\n * ```ts\n * map.getZoom();\n * ```\n */\n getZoom(): number { return this.transform.zoom; }\n\n /**\n * Sets the map's zoom level. Equivalent to `jumpTo({zoom: zoom})`.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, and `zoomend`.\n *\n * @param zoom - The zoom level to set (0-20).\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * Zoom to the zoom level 5 without an animated transition\n * ```ts\n * map.setZoom(5);\n * ```\n */\n setZoom(zoom: number, eventData?: any): this {\n this.jumpTo({zoom}, eventData);\n return this;\n }\n\n /**\n * Zooms the map to the specified zoom level, with an animated transition.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, and `zoomend`.\n *\n * @param zoom - The zoom level to transition to.\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * // Zoom to the zoom level 5 without an animated transition\n * map.zoomTo(5);\n * // Zoom to the zoom level 8 with an animated transition\n * map.zoomTo(8, {\n * duration: 2000,\n * offset: [100, 50]\n * });\n * ```\n */\n zoomTo(zoom: number, options?: EaseToOptions | null, eventData?: any): this {\n return this.easeTo(extend({\n zoom\n }, options), eventData);\n }\n\n /**\n * Increases the map's zoom level by 1.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, and `zoomend`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * Zoom the map in one level with a custom animation duration\n * ```ts\n * map.zoomIn({duration: 1000});\n * ```\n */\n zoomIn(options?: AnimationOptions, eventData?: any): this {\n this.zoomTo(this.getZoom() + 1, options, eventData);\n return this;\n }\n\n /**\n * Decreases the map's zoom level by 1.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, and `zoomend`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * Zoom the map out one level with a custom animation offset\n * ```ts\n * map.zoomOut({offset: [80, 60]});\n * ```\n */\n zoomOut(options?: AnimationOptions, eventData?: any): this {\n this.zoomTo(this.getZoom() - 1, options, eventData);\n return this;\n }\n\n /**\n * Returns the map's current vertical field of view, in degrees.\n *\n * @returns The map's current vertical field of view.\n * @defaultValue 36.87\n * @example\n * ```ts\n * const verticalFieldOfView = map.getVerticalFieldOfView();\n * ```\n */\n getVerticalFieldOfView(): number { return this.transform.fov; }\n\n /**\n * Sets the map's vertical field of view, in degrees.\n *\n * Triggers the following events: `movestart`, `move`, and `moveend`.\n *\n * @param fov - The vertical field of view to set, in degrees (0-180).\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @defaultValue 36.87\n * @example\n * Change vertical field of view to 30 degrees\n * ```ts\n * map.setVerticalFieldOfView(30);\n * ```\n */\n setVerticalFieldOfView(fov: number, eventData?: any): this {\n if (fov != this.transform.fov) {\n this.transform.setFov(fov);\n this.fire(new Event('movestart', eventData))\n .fire(new Event('move', eventData))\n .fire(new Event('moveend', eventData));\n }\n return this;\n }\n\n /**\n * Returns the map's current bearing. The bearing is the compass direction that is \"up\"; for example, a bearing\n * of 90° orients the map so that east is up.\n *\n * @returns The map's current bearing.\n * @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js/docs/examples/navigate-the-map-with-game-like-controls/)\n */\n getBearing(): number { return this.transform.bearing; }\n\n /**\n * Sets the map's bearing (rotation). The bearing is the compass direction that is \"up\"; for example, a bearing\n * of 90° orients the map so that east is up.\n *\n * Equivalent to `jumpTo({bearing: bearing})`.\n *\n * Triggers the following events: `movestart`, `moveend`, and `rotate`.\n *\n * @param bearing - The desired bearing.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * Rotate the map to 90 degrees\n * ```ts\n * map.setBearing(90);\n * ```\n */\n setBearing(bearing: number, eventData?: any): this {\n this.jumpTo({bearing}, eventData);\n return this;\n }\n\n /**\n * Returns the current padding applied around the map viewport.\n *\n * @returns The current padding around the map viewport.\n */\n getPadding(): PaddingOptions { return this.transform.padding; }\n\n /**\n * Sets the padding in pixels around the viewport.\n *\n * Equivalent to `jumpTo({padding: padding})`.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param padding - The desired padding.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * Sets a left padding of 300px, and a top padding of 50px\n * ```ts\n * map.setPadding({ left: 300, top: 50 });\n * ```\n */\n setPadding(padding: PaddingOptions, eventData?: any): this {\n this.jumpTo({padding}, eventData);\n return this;\n }\n\n /**\n * Rotates the map to the specified bearing, with an animated transition. The bearing is the compass direction\n * that is \"up\"; for example, a bearing of 90° orients the map so that east is up.\n *\n * Triggers the following events: `movestart`, `moveend`, and `rotate`.\n *\n * @param bearing - The desired bearing.\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n rotateTo(bearing: number, options?: EaseToOptions, eventData?: any): this {\n return this.easeTo(extend({\n bearing\n }, options), eventData);\n }\n\n /**\n * Rotates the map so that north is up (0° bearing), with an animated transition.\n *\n * Triggers the following events: `movestart`, `moveend`, and `rotate`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n resetNorth(options?: AnimationOptions, eventData?: any): this {\n this.rotateTo(0, extend({duration: 1000}, options), eventData);\n return this;\n }\n\n /**\n * Rotates and pitches the map so that north is up (0° bearing) and pitch and roll are 0°, with an animated transition.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `pitchstart`, `pitch`, `pitchend`, `rollstart`, `roll`, `rollend`, and `rotate`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n resetNorthPitch(options?: AnimationOptions, eventData?: any): this {\n this.easeTo(extend({\n bearing: 0,\n pitch: 0,\n roll: 0,\n duration: 1000\n }, options), eventData);\n return this;\n }\n\n /**\n * Snaps the map so that north is up (0° bearing), if the current bearing is close enough to it (i.e. within the\n * `bearingSnap` threshold).\n *\n * Triggers the following events: `movestart`, `moveend`, and `rotate`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n snapToNorth(options?: AnimationOptions, eventData?: any): this {\n if (Math.abs(this.getBearing()) < this._bearingSnap) {\n return this.resetNorth(options, eventData);\n }\n return this;\n }\n\n /**\n * Returns the map's current pitch (tilt).\n *\n * @returns The map's current pitch, measured in degrees away from the plane of the screen.\n */\n getPitch(): number { return this.transform.pitch; }\n\n /**\n * Sets the map's pitch (tilt). Equivalent to `jumpTo({pitch: pitch})`.\n *\n * Triggers the following events: `movestart`, `moveend`, `pitchstart`, and `pitchend`.\n *\n * @param pitch - The pitch to set, measured in degrees away from the plane of the screen (0-60).\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n setPitch(pitch: number, eventData?: any): this {\n this.jumpTo({pitch}, eventData);\n return this;\n }\n\n /**\n * Returns the map's current roll angle.\n *\n * @returns The map's current roll, measured in degrees about the camera boresight.\n */\n getRoll(): number { return this.transform.roll; }\n\n /**\n * Sets the map's roll angle. Equivalent to `jumpTo({roll: roll})`.\n *\n * Triggers the following events: `movestart`, `moveend`, `rollstart`, and `rollend`.\n *\n * @param roll - The roll to set, measured in degrees about the camera boresight\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n */\n setRoll(roll: number, eventData?: any): this {\n this.jumpTo({roll}, eventData);\n return this;\n }\n\n /**\n * @param bounds - Calculate the center for these bounds in the viewport and use\n * the highest zoom level up to and including {@link Map.getMaxZoom} that fits\n * in the viewport. LngLatBounds represent a box that is always axis-aligned with bearing 0.\n * Bounds will be taken in [sw, ne] order. Southwest point will always be to the left of the northeast point.\n * @param options - Options object\n * @returns If map is able to fit to provided bounds, returns `center`, `zoom`, and `bearing`.\n * If map is unable to fit, method will warn and return undefined.\n * @example\n * ```ts\n * let bbox = [[-79, 43], [-73, 45]];\n * let newCameraTransform = map.cameraForBounds(bbox, {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * ```\n */\n cameraForBounds(bounds: LngLatBoundsLike, options?: CameraForBoundsOptions): CenterZoomBearing | undefined {\n bounds = LngLatBounds.convert(bounds).adjustAntiMeridian();\n const bearing = options && options.bearing || 0;\n\n return this._cameraForBoxAndBearing(bounds.getNorthWest(), bounds.getSouthEast(), bearing, options);\n }\n\n /**\n * @internal\n * Calculate the center of these two points in the viewport and use\n * the highest zoom level up to and including {@link Map.getMaxZoom} that fits\n * the AABB defined by these points in the viewport at the specified bearing.\n * @param p0 - First point\n * @param p1 - Second point\n * @param bearing - Desired map bearing at end of animation, in degrees\n * @param options - the camera options\n * @returns If map is able to fit to provided bounds, returns `center`, `zoom`, and `bearing`.\n * If map is unable to fit, method will warn and return undefined.\n * @example\n * ```ts\n * let p0 = [-79, 43];\n * let p1 = [-73, 45];\n * let bearing = 90;\n * let newCameraTransform = map._cameraForBoxAndBearing(p0, p1, bearing, {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * ```\n */\n _cameraForBoxAndBearing(p0: LngLatLike, p1: LngLatLike, bearing: number, options?: CameraForBoundsOptions): CenterZoomBearing | undefined {\n const defaultPadding = {\n top: 0,\n bottom: 0,\n right: 0,\n left: 0\n };\n options = extend({\n padding: defaultPadding,\n offset: [0, 0],\n maxZoom: this.transform.maxZoom\n }, options);\n\n if (typeof options.padding === 'number') {\n const p = options.padding;\n options.padding = {\n top: p,\n bottom: p,\n right: p,\n left: p\n };\n }\n\n const padding = extend(defaultPadding, options.padding) as PaddingOptions;\n options.padding = padding;\n const tr = this.transform;\n const bounds = new LngLatBounds(p0, p1);\n\n return this.cameraHelper.cameraForBoxAndBearing(options, padding, bounds, bearing, tr);\n }\n\n /**\n * Pans and zooms the map to contain its visible area within the specified geographical bounds.\n * This function will also reset the map's bearing to 0 if bearing is nonzero.\n *\n * Triggers the following events: `movestart` and `moveend`.\n *\n * @param bounds - Center these bounds in the viewport and use the highest\n * zoom level up to and including {@link Map.getMaxZoom} that fits them in the viewport.\n * Bounds will be taken in [sw, ne] order. Southwest point will always be to the left of the northeast point.\n * @param options - Options supports all properties from {@link AnimationOptions} and {@link CameraOptions} in addition to the fields below.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * let bbox = [[-79, 43], [-73, 45]];\n * map.fitBounds(bbox, {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * ```\n * @see [Fit a map to a bounding box](https://maplibre.org/maplibre-gl-js/docs/examples/fit-a-map-to-a-bounding-box/)\n */\n fitBounds(bounds: LngLatBoundsLike, options?: FitBoundsOptions, eventData?: any): this {\n return this._fitInternal(\n this.cameraForBounds(bounds, options),\n options,\n eventData);\n }\n\n /**\n * Pans, rotates and zooms the map to to fit the box made by points p0 and p1\n * once the map is rotated to the specified bearing. To zoom without rotating,\n * pass in the current map bearing.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, `zoomend` and `rotate`.\n *\n * @param p0 - First point on screen, in pixel coordinates\n * @param p1 - Second point on screen, in pixel coordinates\n * @param bearing - Desired map bearing at end of animation, in degrees\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * let p0 = [220, 400];\n * let p1 = [500, 900];\n * map.fitScreenCoordinates(p0, p1, map.getBearing(), {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * ```\n * @see Used by {@link BoxZoomHandler}\n */\n fitScreenCoordinates(p0: PointLike, p1: PointLike, bearing: number, options?: FitBoundsOptions, eventData?: any): this {\n return this._fitInternal(\n this._cameraForBoxAndBearing(\n this.transform.screenPointToLocation(Point.convert(p0)),\n this.transform.screenPointToLocation(Point.convert(p1)),\n bearing,\n options),\n options,\n eventData);\n }\n\n _fitInternal(calculatedOptions?: CenterZoomBearing, options?: FitBoundsOptions, eventData?: any): this {\n // cameraForBounds warns + returns undefined if unable to fit:\n if (!calculatedOptions) return this;\n\n options = extend(calculatedOptions, options);\n // Explicitly remove the padding field because, calculatedOptions already accounts for padding by setting zoom and center accordingly.\n delete options.padding;\n\n return options.linear ?\n this.easeTo(options, eventData) :\n this.flyTo(options, eventData);\n }\n\n /**\n * Changes any combination of center, zoom, bearing, pitch, and roll, without\n * an animated transition. The map will retain its current values for any\n * details not specified in `options`.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, `zoomend`, `pitchstart`,\n * `pitch`, `pitchend`, `rollstart`, `roll`, `rollend` and `rotate`.\n *\n * @param options - Options object\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * // jump to coordinates at current zoom\n * map.jumpTo({center: [0, 0]});\n * // jump with zoom, pitch, and bearing options\n * map.jumpTo({\n * center: [0, 0],\n * zoom: 8,\n * pitch: 45,\n * bearing: 90\n * });\n * ```\n * @see [Jump to a series of locations](https://maplibre.org/maplibre-gl-js/docs/examples/jump-to-a-series-of-locations/)\n * @see [Update a feature in realtime](https://maplibre.org/maplibre-gl-js/docs/examples/update-a-feature-in-realtime/)\n */\n jumpTo(options: JumpToOptions, eventData?: any): this {\n this.stop();\n\n const tr = this._getTransformForUpdate();\n let bearingChanged = false,\n pitchChanged = false;\n let rollChanged = false;\n\n const oldZoom = tr.zoom;\n\n this.cameraHelper.handleJumpToCenterZoom(tr, options);\n\n const zoomChanged = tr.zoom !== oldZoom;\n\n if ('elevation' in options && tr.elevation !== +options.elevation) {\n tr.setElevation(+options.elevation);\n }\n\n if ('bearing' in options && tr.bearing !== +options.bearing) {\n bearingChanged = true;\n tr.setBearing(+options.bearing);\n }\n\n if ('pitch' in options && tr.pitch !== +options.pitch) {\n pitchChanged = true;\n tr.setPitch(+options.pitch);\n }\n\n if ('roll' in options && tr.roll !== +options.roll) {\n rollChanged = true;\n tr.setRoll(+options.roll);\n }\n\n if (options.padding != null && !tr.isPaddingEqual(options.padding)) {\n tr.setPadding(options.padding);\n }\n this._applyUpdatedTransform(tr);\n\n this.fire(new Event('movestart', eventData))\n .fire(new Event('move', eventData));\n\n if (zoomChanged) {\n this.fire(new Event('zoomstart', eventData))\n .fire(new Event('zoom', eventData))\n .fire(new Event('zoomend', eventData));\n }\n\n if (bearingChanged) {\n this.fire(new Event('rotatestart', eventData))\n .fire(new Event('rotate', eventData))\n .fire(new Event('rotateend', eventData));\n }\n\n if (pitchChanged) {\n this.fire(new Event('pitchstart', eventData))\n .fire(new Event('pitch', eventData))\n .fire(new Event('pitchend', eventData));\n }\n\n if (rollChanged) {\n this.fire(new Event('rollstart', eventData))\n .fire(new Event('roll', eventData))\n .fire(new Event('rollend', eventData));\n }\n\n return this.fire(new Event('moveend', eventData));\n }\n\n /**\n * Given a camera 'from' position and a position to look at (`to`), calculates zoom and camera rotation and returns them as {@link CameraOptions}.\n * @param from - The camera to look from\n * @param altitudeFrom - The altitude of the camera to look from\n * @param to - The center to look at\n * @param altitudeTo - Optional altitude of the center to look at. If none given the ground height will be used.\n * @returns the calculated camera options\n * @example\n * ```ts\n * // Calculate options to look from (1°, 0°, 1000m) to (1°, 1°, 0m)\n * const cameraLngLat = new LngLat(1, 0);\n * const cameraAltitude = 1000;\n * const targetLngLat = new LngLat(1, 1);\n * const targetAltitude = 0;\n * const cameraOptions = map.calculateCameraOptionsFromTo(cameraLngLat, cameraAltitude, targetLngLat, targetAltitude);\n * // Apply calculated options\n * map.jumpTo(cameraOptions);\n * ```\n */\n calculateCameraOptionsFromTo(from: LngLatLike, altitudeFrom: number, to: LngLatLike, altitudeTo: number = 0): CameraOptions {\n const fromMercator = MercatorCoordinate.fromLngLat(from, altitudeFrom);\n const toMercator = MercatorCoordinate.fromLngLat(to, altitudeTo);\n const dx = toMercator.x - fromMercator.x;\n const dy = toMercator.y - fromMercator.y;\n const dz = toMercator.z - fromMercator.z;\n\n const distance3D = Math.hypot(dx, dy, dz);\n if (distance3D === 0) throw new Error('Can\\'t calculate camera options with same From and To');\n\n const groundDistance = Math.hypot(dx, dy);\n\n const zoom = scaleZoom(this.transform.cameraToCenterDistance / distance3D / this.transform.tileSize);\n const bearing = (Math.atan2(dx, -dy) * 180) / Math.PI;\n let pitch = (Math.acos(groundDistance / distance3D) * 180) / Math.PI;\n pitch = dz < 0 ? 90 - pitch : 90 + pitch;\n\n return {\n center: toMercator.toLngLat(),\n elevation: altitudeTo,\n zoom,\n pitch,\n bearing\n };\n }\n\n /**\n * Given a camera position and rotation, calculates zoom and center point and returns them as {@link CameraOptions}.\n * @param cameraLngLat - The lng, lat of the camera to look from\n * @param cameraAlt - The altitude of the camera to look from, in meters above sea level\n * @param bearing - Bearing of the camera, in degrees\n * @param pitch - Pitch of the camera, in degrees\n * @param roll - Roll of the camera, in degrees\n * @returns the calculated camera options\n * @example\n * ```ts\n * // Calculate options to look from camera position(1°, 0°, 1000m) with bearing = 90°, pitch = 30°, and roll = 45°\n * const cameraLngLat = new LngLat(1, 0);\n * const cameraAltitude = 1000;\n * const bearing = 90;\n * const pitch = 30;\n * const roll = 45;\n * const cameraOptions = map.calculateCameraOptionsFromCameraLngLatAltRotation(cameraLngLat, cameraAltitude, bearing, pitch, roll);\n * // Apply calculated options\n * map.jumpTo(cameraOptions);\n * ```\n */\n calculateCameraOptionsFromCameraLngLatAltRotation(cameraLngLat: LngLatLike, cameraAlt: number, bearing: number, pitch: number, roll?: number): CameraOptions {\n const centerInfo = this.transform.calculateCenterFromCameraLngLatAlt(cameraLngLat, cameraAlt, bearing, pitch);\n return {\n center: centerInfo.center,\n elevation: centerInfo.elevation,\n zoom: centerInfo.zoom,\n bearing,\n pitch,\n roll\n };\n }\n\n /**\n * Changes any combination of `center`, `zoom`, `bearing`, `pitch`, `roll`, and `padding` with an animated transition\n * between old and new values. The map will retain its current values for any\n * details not specified in `options`.\n *\n * !!! note \"Reduced Motion\"\n * The transition will happen instantly if the user has enabled\n * the `reduced motion` accessibility feature enabled in their operating system,\n * unless `options` includes `essential: true`.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, `zoomend`, `pitchstart`,\n * `pitch`, `pitchend`, `rollstart`, `roll`, `rollend`, and `rotate`.\n *\n * @param options - Options describing the destination and animation of the transition.\n * Accepts {@link CameraOptions} and {@link AnimationOptions}.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js/docs/examples/navigate-the-map-with-game-like-controls/)\n */\n easeTo(options: EaseToOptions, eventData?: any): this {\n this._stop(false, options.easeId);\n\n options = extend({\n offset: [0, 0],\n duration: 500,\n easing: defaultEasing\n }, options);\n\n if (options.animate === false || (!options.essential && browser.prefersReducedMotion)) {\n options.duration = 0;\n }\n\n const tr = this._getTransformForUpdate();\n const startBearing = this.getBearing(),\n startPitch = tr.pitch,\n startRoll = tr.roll,\n bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing,\n pitch = 'pitch' in options ? +options.pitch : startPitch,\n roll = 'roll' in options ? this._normalizeBearing(options.roll, startRoll) : startRoll,\n padding = ('padding' in options ? options.padding : tr.padding) as PaddingOptions;\n const offsetAsPoint = Point.convert(options.offset);\n\n let around, aroundPoint;\n\n if (options.around) {\n around = LngLat.convert(options.around);\n aroundPoint = tr.locationToScreenPoint(around);\n }\n\n const currently = {\n moving: this._moving,\n zooming: this._zooming,\n rotating: this._rotating,\n pitching: this._pitching,\n rolling: this._rolling\n };\n\n const easeHandler = this.cameraHelper.handleEaseTo(tr, {\n bearing,\n pitch,\n roll,\n padding,\n around,\n aroundPoint,\n offsetAsPoint,\n offset: options.offset,\n zoom: options.zoom,\n center: options.center,\n });\n\n this._rotating = this._rotating || (startBearing !== bearing);\n this._pitching = this._pitching || (pitch !== startPitch);\n this._rolling = this._rolling || (roll !== startRoll);\n this._padding = !tr.isPaddingEqual(padding);\n this._zooming = this._zooming || easeHandler.isZooming;\n this._easeId = options.easeId;\n this._prepareEase(eventData, options.noMoveStart, currently);\n\n if (this.terrain) {\n this._prepareElevation(easeHandler.elevationCenter);\n }\n\n this._ease((k) => {\n easeHandler.easeFunc(k);\n\n if (this.terrain && !options.freezeElevation) this._updateElevation(k);\n this._applyUpdatedTransform(tr);\n this._fireMoveEvents(eventData);\n\n }, (interruptingEaseId?: string) => {\n if (this.terrain && options.freezeElevation) this._finalizeElevation();\n this._afterEase(eventData, interruptingEaseId);\n }, options as any);\n\n return this;\n }\n\n _prepareEase(eventData: any, noMoveStart: boolean,\n currently: { moving?: boolean; zooming?: boolean; rotating?: boolean; pitching?: boolean; rolling?: boolean} = {}) {\n this._moving = true;\n if (!noMoveStart && !currently.moving) {\n this.fire(new Event('movestart', eventData));\n }\n if (this._zooming && !currently.zooming) {\n this.fire(new Event('zoomstart', eventData));\n }\n if (this._rotating && !currently.rotating) {\n this.fire(new Event('rotatestart', eventData));\n }\n if (this._pitching && !currently.pitching) {\n this.fire(new Event('pitchstart', eventData));\n }\n if (this._rolling && !currently.rolling) {\n this.fire(new Event('rollstart', eventData));\n }\n }\n\n _prepareElevation(center: LngLat) {\n this._elevationCenter = center;\n this._elevationStart = this.transform.elevation;\n this._elevationTarget = this.terrain.getElevationForLngLatZoom(center, this.transform.tileZoom);\n this._elevationFreeze = true;\n }\n\n _updateElevation(k: number) {\n\n if (this._elevationStart === undefined || this._elevationCenter === undefined) {\n this._prepareElevation(this.transform.center);\n }\n\n this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom));\n const elevation = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);\n // target terrain updated during flight, slowly move camera to new height\n if (k < 1 && elevation !== this._elevationTarget) {\n const pitch1 = this._elevationTarget - this._elevationStart;\n const pitch2 = (elevation - (pitch1 * k + this._elevationStart)) / (1 - k);\n this._elevationStart += k * (pitch1 - pitch2);\n this._elevationTarget = elevation;\n }\n this.transform.setElevation(interpolates.number(this._elevationStart, this._elevationTarget, k));\n }\n\n _finalizeElevation() {\n this._elevationFreeze = false;\n if (this.getCenterClampedToGround()) {\n this.transform.recalculateZoomAndCenter(this.terrain);\n }\n }\n\n /**\n * @internal\n * Called when the camera is about to be manipulated.\n * If `transformCameraUpdate` is specified or terrain is enabled, a copy of\n * the current transform is created to track the accumulated changes.\n * This underlying transform represents the \"desired state\" proposed by input handlers / animations / UI controls.\n * It may differ from the state used for rendering (`this.transform`).\n * @returns Transform to apply changes to\n */\n _getTransformForUpdate(): ITransform {\n if (!this.transformCameraUpdate && !this.terrain) return this.transform;\n\n if (!this._requestedCameraState) {\n this._requestedCameraState = this.transform.clone();\n }\n return this._requestedCameraState;\n }\n\n /**\n * @internal\n * Checks the given transform for the camera being below terrain surface and\n * returns new pitch and zoom to fix that.\n *\n * With the new pitch and zoom, the camera will be at the same ground\n * position but at higher altitude. It will still point to the same spot on\n * the map.\n *\n * @param tr - The transform to check.\n */\n _elevateCameraIfInsideTerrain(tr: ITransform) : { pitch?: number; zoom?: number } {\n if (!this.terrain && tr.elevation >= 0 && tr.pitch <= 90) {\n return {};\n }\n const cameraLngLat = tr.getCameraLngLat();\n const cameraAltitude = tr.getCameraAltitude();\n const minAltitude = this.terrain ? this.terrain.getElevationForLngLatZoom(cameraLngLat, tr.zoom) : 0;\n if (cameraAltitude < minAltitude) {\n const newCamera = this.calculateCameraOptionsFromTo(\n cameraLngLat, minAltitude, tr.center, tr.elevation);\n return {\n pitch: newCamera.pitch,\n zoom: newCamera.zoom,\n };\n }\n return {};\n }\n\n /**\n * @internal\n * Called after the camera is done being manipulated.\n * @param tr - the requested camera end state\n * If the camera is inside terrain, it gets elevated.\n * Call `transformCameraUpdate` if present, and then apply the \"approved\" changes.\n */\n _applyUpdatedTransform(tr: ITransform) {\n const modifiers : ((tr: ITransform) => ReturnType)[] = [];\n modifiers.push(tr => this._elevateCameraIfInsideTerrain(tr));\n if (this.transformCameraUpdate) {\n modifiers.push(tr => this.transformCameraUpdate(tr));\n }\n if (!modifiers.length) {\n return;\n }\n const finalTransform = tr.clone();\n for (const modifier of modifiers) {\n const nextTransform = finalTransform.clone();\n const {\n center,\n zoom,\n roll,\n pitch,\n bearing,\n elevation\n } = modifier(nextTransform);\n if (center) nextTransform.setCenter(center);\n if (elevation !== undefined) nextTransform.setElevation(elevation);\n if (zoom !== undefined) nextTransform.setZoom(zoom);\n if (roll !== undefined) nextTransform.setRoll(roll);\n if (pitch !== undefined) nextTransform.setPitch(pitch);\n if (bearing !== undefined) nextTransform.setBearing(bearing);\n finalTransform.apply(nextTransform);\n }\n this.transform.apply(finalTransform);\n }\n\n _fireMoveEvents(eventData?: any) {\n this.fire(new Event('move', eventData));\n if (this._zooming) {\n this.fire(new Event('zoom', eventData));\n }\n if (this._rotating) {\n this.fire(new Event('rotate', eventData));\n }\n if (this._pitching) {\n this.fire(new Event('pitch', eventData));\n }\n if (this._rolling) {\n this.fire(new Event('roll', eventData));\n }\n }\n\n _afterEase(eventData?: any, easeId?: string) {\n // if this easing is being stopped to start another easing with\n // the same id then don't fire any events to avoid extra start/stop events\n if (this._easeId && easeId && this._easeId === easeId) {\n return;\n }\n delete this._easeId;\n\n const wasZooming = this._zooming;\n const wasRotating = this._rotating;\n const wasPitching = this._pitching;\n const wasRolling = this._rolling;\n this._moving = false;\n this._zooming = false;\n this._rotating = false;\n this._pitching = false;\n this._rolling = false;\n this._padding = false;\n\n if (wasZooming) {\n this.fire(new Event('zoomend', eventData));\n }\n if (wasRotating) {\n this.fire(new Event('rotateend', eventData));\n }\n if (wasPitching) {\n this.fire(new Event('pitchend', eventData));\n }\n if (wasRolling) {\n this.fire(new Event('rollend', eventData));\n }\n this.fire(new Event('moveend', eventData));\n }\n\n /**\n * Changes any combination of center, zoom, bearing, pitch, and roll, animating the transition along a curve that\n * evokes flight. The animation seamlessly incorporates zooming and panning to help\n * the user maintain her bearings even after traversing a great distance.\n *\n * !!! note \"Reduced Motion\"\n * The animation will be skipped, and this will behave equivalently to `jumpTo`\n * if the user has the `reduced motion` accessibility feature enabled in their operating system,\n * unless 'options' includes `essential: true`.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, `zoomstart`, `zoom`, `zoomend`, `pitchstart`,\n * `pitch`, `pitchend`, `rollstart`, `roll`, `rollend`, and `rotate`.\n *\n * @param options - Options describing the destination and animation of the transition.\n * Accepts {@link CameraOptions}, {@link AnimationOptions},\n * and the following additional options.\n * @param eventData - Additional properties to be added to event objects of events triggered by this method.\n * @example\n * ```ts\n * // fly with default options to null island\n * map.flyTo({center: [0, 0], zoom: 9});\n * // using flyTo options\n * map.flyTo({\n * center: [0, 0],\n * zoom: 9,\n * speed: 0.2,\n * curve: 1,\n * easing(t) {\n * return t;\n * }\n * });\n * ```\n * @see [Fly to a location](https://maplibre.org/maplibre-gl-js/docs/examples/fly-to-a-location/)\n * @see [Slowly fly to a location](https://maplibre.org/maplibre-gl-js/docs/examples/slowly-fly-to-a-location/)\n * @see [Fly to a location based on scroll position](https://maplibre.org/maplibre-gl-js/docs/examples/fly-to-a-location-based-on-scroll-position/)\n */\n flyTo(options: FlyToOptions, eventData?: any): this {\n // Fall through to jumpTo if user has set prefers-reduced-motion\n if (!options.essential && browser.prefersReducedMotion) {\n const coercedOptions = pick(options, ['center', 'zoom', 'bearing', 'pitch', 'roll', 'elevation', 'padding']) as JumpToOptions;\n return this.jumpTo(coercedOptions, eventData);\n }\n\n // This method implements an “optimal path” animation, as detailed in:\n //\n // Van Wijk, Jarke J.; Nuij, Wim A. A. “Smooth and efficient zooming and panning.” INFOVIS\n // ’03. pp. 15–22. .\n //\n // Where applicable, local variable documentation begins with the associated variable or\n // function in van Wijk (2003).\n\n this.stop();\n\n options = extend({\n offset: [0, 0],\n speed: 1.2,\n curve: 1.42,\n easing: defaultEasing\n }, options);\n\n const tr = this._getTransformForUpdate(),\n startBearing = tr.bearing,\n startPitch = tr.pitch,\n startRoll = tr.roll,\n startPadding = tr.padding;\n\n const bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing;\n const pitch = 'pitch' in options ? +options.pitch : startPitch;\n const roll = 'roll' in options ? this._normalizeBearing(options.roll, startRoll) : startRoll;\n const padding = ('padding' in options ? options.padding : tr.padding) as PaddingOptions;\n\n const offsetAsPoint = Point.convert(options.offset);\n let pointAtOffset = tr.centerPoint.add(offsetAsPoint);\n const locationAtOffset = tr.screenPointToLocation(pointAtOffset);\n\n const flyToHandler = this.cameraHelper.handleFlyTo(tr, {\n bearing,\n pitch,\n roll,\n padding,\n locationAtOffset,\n offsetAsPoint,\n center: options.center,\n minZoom: options.minZoom,\n zoom: options.zoom,\n });\n\n let rho = options.curve;\n\n // w₀: Initial visible span, measured in pixels at the initial scale.\n const w0 = Math.max(tr.width, tr.height);\n // w₁: Final visible span, measured in pixels with respect to the initial scale.\n const w1 = w0 / flyToHandler.scaleOfZoom;\n // Length of the flight path as projected onto the ground plane, measured in pixels from\n // the world image origin at the initial scale.\n const u1 = flyToHandler.pixelPathLength;\n\n if (typeof flyToHandler.scaleOfMinZoom === 'number') {\n // wm: Maximum visible span, measured in pixels with respect to the initial\n // scale.\n const wMax = w0 / flyToHandler.scaleOfMinZoom;\n rho = Math.sqrt(wMax / u1 * 2);\n }\n\n // ρ²\n const rho2 = rho * rho;\n\n /**\n * rᵢ: Returns the zoom-out factor at one end of the animation.\n *\n * @param descent - `true` for the descent, `false` for the ascent\n */\n function zoomOutFactor(descent: boolean) {\n const b = (w1 * w1 - w0 * w0 + (descent ? -1 : 1) * rho2 * rho2 * u1 * u1) / (2 * (descent ? w1 : w0) * rho2 * u1);\n return Math.log(Math.sqrt(b * b + 1) - b);\n }\n\n function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\n function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\n function tanh(n) { return sinh(n) / cosh(n); }\n\n // r₀: Zoom-out factor during ascent.\n const r0 = zoomOutFactor(false);\n\n // w(s): Returns the visible span on the ground, measured in pixels with respect to the\n // initial scale. Uses the current vertical field of view setting.\n let w: (_: number) => number = function (s) {\n return (cosh(r0) / cosh(r0 + rho * s));\n };\n\n // u(s): Returns the distance along the flight path as projected onto the ground plane,\n // measured in pixels from the world image origin at the initial scale.\n let u: (_: number) => number = function (s) {\n return w0 * ((cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2) / u1;\n };\n\n // S: Total length of the flight path, measured in ρ-screenfulls.\n let S = (zoomOutFactor(true) - r0) / rho;\n\n // When u₀ = u₁, the optimal path doesn’t require both ascent and descent.\n if (Math.abs(u1) < 0.000002 || !isFinite(S)) {\n // Perform a more or less instantaneous transition if the path is too short.\n if (Math.abs(w0 - w1) < 0.000001) return this.easeTo(options, eventData);\n\n const k = w1 < w0 ? -1 : 1;\n S = Math.abs(Math.log(w1 / w0)) / rho;\n\n u = () => 0;\n w = (s) => Math.exp(k * rho * s);\n }\n\n if ('duration' in options) {\n options.duration = +options.duration;\n } else {\n const V = 'screenSpeed' in options ? +options.screenSpeed / rho : +options.speed;\n options.duration = 1000 * S / V;\n }\n\n if (options.maxDuration && options.duration > options.maxDuration) {\n options.duration = 0;\n }\n\n this._zooming = true;\n this._rotating = (startBearing !== bearing);\n this._pitching = (pitch !== startPitch);\n this._rolling = (roll !== startRoll);\n this._padding = !tr.isPaddingEqual(padding as PaddingOptions);\n\n this._prepareEase(eventData, false);\n if (this.terrain) this._prepareElevation(flyToHandler.targetCenter);\n\n this._ease((k) => {\n // s: The distance traveled along the flight path, measured in ρ-screenfulls.\n const s = k * S;\n const scale = 1 / w(s);\n const centerFactor = u(s);\n if (this._rotating) {\n tr.setBearing(interpolates.number(startBearing, bearing, k));\n }\n if (this._pitching) {\n tr.setPitch(interpolates.number(startPitch, pitch, k));\n }\n if (this._rolling) {\n tr.setRoll(interpolates.number(startRoll, roll, k));\n }\n if (this._padding) {\n tr.interpolatePadding(startPadding, padding as PaddingOptions, k);\n // When padding is being applied, Transform.centerPoint is changing continuously,\n // thus we need to recalculate offsetPoint every frame\n pointAtOffset = tr.centerPoint.add(offsetAsPoint);\n }\n\n flyToHandler.easeFunc(k, scale, centerFactor, pointAtOffset);\n\n if (this.terrain && !options.freezeElevation) this._updateElevation(k);\n this._applyUpdatedTransform(tr);\n this._fireMoveEvents(eventData);\n }, () => {\n if (this.terrain && options.freezeElevation) this._finalizeElevation();\n this._afterEase(eventData);\n }, options);\n\n return this;\n }\n\n isEasing() {\n return !!this._easeFrameId;\n }\n\n /**\n * Stops any animated transition underway.\n */\n stop(): this {\n return this._stop();\n }\n\n _stop(allowGestures?: boolean, easeId?: string): this {\n if (this._easeFrameId) {\n this._cancelRenderFrame(this._easeFrameId);\n delete this._easeFrameId;\n delete this._onEaseFrame;\n }\n\n if (this._onEaseEnd) {\n // The _onEaseEnd function might emit events which trigger new\n // animation, which sets a new _onEaseEnd. Ensure we don't delete\n // it unintentionally.\n const onEaseEnd = this._onEaseEnd;\n delete this._onEaseEnd;\n onEaseEnd.call(this, easeId);\n }\n if (!allowGestures) {\n this.handlers?.stop(false);\n }\n return this;\n }\n\n _ease(frame: (_: number) => void,\n finish: () => void,\n options: {\n animate?: boolean;\n duration?: number;\n easing?: (_: number) => number;\n }) {\n if (options.animate === false || options.duration === 0) {\n frame(1);\n finish();\n } else {\n this._easeStart = now();\n this._easeOptions = options;\n this._onEaseFrame = frame;\n this._onEaseEnd = finish;\n this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback);\n }\n }\n\n // Callback for map._requestRenderFrame\n _renderFrameCallback = () => {\n const t = Math.min((now() - this._easeStart) / this._easeOptions.duration, 1);\n this._onEaseFrame(this._easeOptions.easing(t));\n\n // if _stop is called during _onEaseFrame from _fireMoveEvents we should avoid a new _requestRenderFrame, checking it by ensuring _easeFrameId was not deleted\n if (t < 1 && this._easeFrameId) {\n this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback);\n } else {\n this.stop();\n }\n };\n\n // convert bearing so that it's numerically close to the current one so that it interpolates properly\n _normalizeBearing(bearing: number, currentBearing: number) {\n bearing = wrap(bearing, -180, 180);\n const diff = Math.abs(bearing - currentBearing);\n if (Math.abs(bearing - 360 - currentBearing) < diff) bearing -= 360;\n if (Math.abs(bearing + 360 - currentBearing) < diff) bearing += 360;\n return bearing;\n }\n\n /**\n * Gets the elevation at a given location, in meters above sea level.\n * Returns null if terrain is not enabled.\n * If terrain is enabled with some exaggeration value, the value returned here will be reflective of (multiplied by) that exaggeration value.\n * This method should be used for proper positioning of custom 3d objects, as explained [here](https://maplibre.org/maplibre-gl-js/docs/examples/adding-3d-models-using-threejs-on-terrain/)\n * @param lngLatLike - [x,y] or LngLat coordinates of the location\n * @returns elevation in meters\n */\n queryTerrainElevation(lngLatLike: LngLatLike): number | null {\n if (!this.terrain) {\n return null;\n }\n return this.terrain.getElevationForLngLat(LngLat.convert(lngLatLike), this.transform);\n }\n}\n","import {DOM} from '../../util/dom';\n\nimport type {Map} from '../map';\nimport type {ControlPosition, IControl} from './control';\nimport type {MapDataEvent} from '../events';\nimport type {StyleSpecification} from '@maplibre/maplibre-gl-style-spec';\n/**\n * The {@link AttributionControl} options object\n */\nexport type AttributionControlOptions = {\n /**\n * If `true`, the attribution control will always collapse when moving the map. If `false`,\n * force the expanded attribution control. The default is a responsive attribution that collapses when the user moves the map on maps less than 640 pixels wide.\n * **Attribution should not be collapsed if it can comfortably fit on the map. `compact` should only be used to modify default attribution when map size makes it impossible to fit default attribution and when the automatic compact resizing for default settings are not sufficient.**\n */\n compact?: boolean;\n /**\n * Attributions to show in addition to any other attributions.\n */\n customAttribution?: string | Array;\n};\n\nexport const defaultAttributionControlOptions: AttributionControlOptions = {\n compact: true,\n customAttribution: 'MapLibre'\n};\n\n/**\n * An `AttributionControl` control presents the map's attribution information. By default, the attribution control is expanded (regardless of map width).\n * @group Markers and Controls\n * @example\n * ```ts\n * let map = new Map({attributionControl: false})\n * .addControl(new AttributionControl({\n * compact: true\n * }));\n * ```\n */\nexport class AttributionControl implements IControl {\n options: AttributionControlOptions;\n _map: Map;\n _compact: boolean | undefined;\n _container: HTMLElement;\n _innerContainer: HTMLElement;\n _compactButton: HTMLElement;\n _editLink: HTMLAnchorElement;\n _attribHTML: string;\n styleId: string;\n styleOwner: string;\n\n /**\n * @param options - the attribution options\n */\n constructor(options: AttributionControlOptions = defaultAttributionControlOptions) {\n this.options = options;\n }\n\n getDefaultPosition(): ControlPosition {\n return 'bottom-right';\n }\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._compact = this.options.compact;\n this._container = DOM.create('details', 'maplibregl-ctrl maplibregl-ctrl-attrib');\n this._compactButton = DOM.create('summary', 'maplibregl-ctrl-attrib-button', this._container);\n this._compactButton.addEventListener('click', this._toggleAttribution);\n this._setElementTitle(this._compactButton, 'ToggleAttribution');\n this._innerContainer = DOM.create('div', 'maplibregl-ctrl-attrib-inner', this._container);\n\n this._updateAttributions();\n this._updateCompact();\n\n this._map.on('styledata', this._updateData);\n this._map.on('sourcedata', this._updateData);\n this._map.on('terrain', this._updateData);\n this._map.on('resize', this._updateCompact);\n this._map.on('drag', this._updateCompactMinimize);\n\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n\n this._map.off('styledata', this._updateData);\n this._map.off('sourcedata', this._updateData);\n this._map.off('terrain', this._updateData);\n this._map.off('resize', this._updateCompact);\n this._map.off('drag', this._updateCompactMinimize);\n\n this._map = undefined;\n this._compact = undefined;\n this._attribHTML = undefined;\n }\n\n _setElementTitle(element: HTMLElement, title: 'ToggleAttribution' | 'MapFeedback') {\n const str = this._map._getUIString(`AttributionControl.${title}`);\n element.title = str;\n element.setAttribute('aria-label', str);\n }\n\n _toggleAttribution = () => {\n if (this._container.classList.contains('maplibregl-compact')) {\n if (this._container.classList.contains('maplibregl-compact-show')) {\n this._container.setAttribute('open', '');\n this._container.classList.remove('maplibregl-compact-show');\n } else {\n this._container.classList.add('maplibregl-compact-show');\n this._container.removeAttribute('open');\n }\n }\n };\n\n _updateData = (e: MapDataEvent) => {\n if (e && (e.sourceDataType === 'metadata' || e.sourceDataType === 'visibility' || e.dataType === 'style' || e.type === 'terrain')) {\n this._updateAttributions();\n }\n };\n\n _updateAttributions() {\n if (!this._map.style) return;\n let attributions: Array = [];\n if (this.options.customAttribution) {\n if (Array.isArray(this.options.customAttribution)) {\n attributions = attributions.concat(\n this.options.customAttribution.map(attribution => {\n if (typeof attribution !== 'string') return '';\n return attribution;\n })\n );\n } else if (typeof this.options.customAttribution === 'string') {\n attributions.push(this.options.customAttribution);\n }\n }\n\n if (this._map.style.stylesheet) {\n const stylesheet = this._map.style.stylesheet as StyleSpecification & { owner: string; id: string };\n this.styleOwner = stylesheet.owner;\n this.styleId = stylesheet.id;\n }\n\n const tileManagers = this._map.style.tileManagers;\n for (const id in tileManagers) {\n const tileManager = tileManagers[id];\n if (tileManager.used || tileManager.usedForTerrain) {\n const source = tileManager.getSource();\n if (source.attribution && attributions.indexOf(source.attribution) < 0) {\n attributions.push(source.attribution);\n }\n }\n }\n\n // remove any entries that are whitespace\n attributions = attributions.filter(e => String(e).trim());\n\n // remove any entries that are substrings of another entry.\n // first sort by length so that substrings come first\n attributions.sort((a, b) => a.length - b.length);\n attributions = attributions.filter((attrib, i) => {\n for (let j = i + 1; j < attributions.length; j++) {\n if (attributions[j].indexOf(attrib) >= 0) { return false; }\n }\n return true;\n });\n\n // check if attribution string is different to minimize DOM changes\n const attribHTML = attributions.join(' | ');\n if (attribHTML === this._attribHTML) return;\n\n this._attribHTML = attribHTML;\n\n if (attributions.length) {\n this._innerContainer.innerHTML = DOM.sanitize(attribHTML);\n this._container.classList.remove('maplibregl-attrib-empty');\n } else {\n this._container.classList.add('maplibregl-attrib-empty');\n }\n this._updateCompact();\n // remove old DOM node from _editLink\n this._editLink = null;\n }\n\n _updateCompact = () => {\n if (this._map.getCanvasContainer().offsetWidth <= 640 || this._compact) {\n if (this._compact === false) {\n this._container.setAttribute('open', '');\n } else if (!this._container.classList.contains('maplibregl-compact') && !this._container.classList.contains('maplibregl-attrib-empty')) {\n this._container.setAttribute('open', '');\n this._container.classList.add('maplibregl-compact', 'maplibregl-compact-show');\n }\n } else {\n this._container.setAttribute('open', '');\n if (this._container.classList.contains('maplibregl-compact')) {\n this._container.classList.remove('maplibregl-compact', 'maplibregl-compact-show');\n }\n }\n };\n\n _updateCompactMinimize = () => {\n if (this._container.classList.contains('maplibregl-compact')) {\n if (this._container.classList.contains('maplibregl-compact-show')) {\n this._container.classList.remove('maplibregl-compact-show');\n }\n }\n };\n}\n","import {DOM} from '../../util/dom';\n\nimport type {Map} from '../map';\nimport type {ControlPosition, IControl} from './control';\n\n/**\n * The {@link LogoControl} options object\n */\nexport type LogoControlOptions = {\n /**\n * If `true`, force a compact logo.\n * If `false`, force the full logo. The default is a responsive logo that collapses when the map is less than 640 pixels wide.\n */\n compact?: boolean;\n};\n\n/**\n * A `LogoControl` is a control that adds the watermark.\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * map.addControl(new LogoControl({compact: false}));\n * ```\n **/\nexport class LogoControl implements IControl {\n options: LogoControlOptions;\n _map: Map;\n _compact: boolean;\n _container: HTMLElement;\n\n /**\n * @param options - the control's options\n */\n constructor(options: LogoControlOptions = {}) {\n this.options = options;\n }\n\n getDefaultPosition(): ControlPosition {\n return 'bottom-left';\n }\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._compact = this.options && this.options.compact;\n this._container = DOM.create('div', 'maplibregl-ctrl');\n const anchor = DOM.create('a', 'maplibregl-ctrl-logo');\n anchor.target = '_blank';\n anchor.rel = 'noopener nofollow';\n anchor.href = 'https://maplibre.org/';\n anchor.setAttribute('aria-label', this._map._getUIString('LogoControl.Title'));\n anchor.setAttribute('rel', 'noopener nofollow');\n this._container.appendChild(anchor);\n this._container.style.display = 'block';\n\n this._map.on('resize', this._updateCompact);\n this._updateCompact();\n\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n this._map.off('resize', this._updateCompact);\n this._map = undefined;\n this._compact = undefined;\n }\n\n _updateCompact = () => {\n const containerChildren = this._container.children;\n if (containerChildren.length) {\n const anchor = containerChildren[0];\n if (this._map.getCanvasContainer().offsetWidth <= 640 || this._compact) {\n if (this._compact !== false) {\n anchor.classList.add('maplibregl-compact');\n }\n } else {\n anchor.classList.remove('maplibregl-compact');\n }\n }\n };\n\n}\n","export type TaskID = number;\n\ntype Task = {\n callback: (timeStamp: number) => void;\n id: TaskID;\n cancelled: boolean;\n};\n\nexport class TaskQueue {\n _queue: Array;\n _id: TaskID;\n _cleared: boolean;\n _currentlyRunning: Array | false;\n\n constructor() {\n this._queue = [];\n this._id = 0;\n this._cleared = false;\n this._currentlyRunning = false;\n }\n\n add(callback: (timeStamp: number) => void): TaskID {\n const id = ++this._id;\n const queue = this._queue;\n queue.push({callback, id, cancelled: false});\n return id;\n }\n\n remove(id: TaskID) {\n const running = this._currentlyRunning;\n const queue = running ? this._queue.concat(running) : this._queue;\n for (const task of queue) {\n if (task.id === id) {\n task.cancelled = true;\n return;\n }\n }\n }\n\n run(timeStamp: number = 0) {\n if (this._currentlyRunning) throw new Error('Attempting to run(), but is already running.');\n const queue = this._currentlyRunning = this._queue;\n\n // Tasks queued by callbacks in the current queue should be executed\n // on the next run, not the current run.\n this._queue = [];\n\n for (const task of queue) {\n if (task.cancelled) continue;\n task.callback(timeStamp);\n if (this._cleared) break;\n }\n\n this._cleared = false;\n this._currentlyRunning = false;\n }\n\n clear() {\n if (this._currentlyRunning) {\n this._cleared = true;\n }\n this._queue = [];\n }\n}\n","import {createLayout} from '../util/struct_array';\n\nexport default createLayout([\n {name: 'a_pos3d', type: 'Int16', components: 3}\n]);\n","import {type OverscaledTileID} from './tile_id';\nimport {Tile} from './tile';\nimport {EXTENT} from '../data/extent';\nimport {mat4} from 'gl-matrix';\nimport {Evented} from '../util/evented';\nimport type {ITransform} from '../geo/transform_interface';\nimport type {TileManager} from './tile_manager';\nimport type {Source} from '../source/source';\nimport {type Terrain} from '../render/terrain';\nimport {now} from '../util/time_control';\nimport {coveringTiles} from '../geo/projection/covering_tiles';\nimport {createMat4f64} from '../util/util';\nimport {type CanonicalTileRange} from '../source/image_source';\n\n/**\n * @internal\n * This class is a helper for the Terrain-class, it:\n *\n * - loads raster-dem tiles\n * - manages all renderToTexture tiles.\n * - caches previous rendered tiles.\n * - finds all necessary renderToTexture tiles for a OverscaledTileID area\n * - finds the corresponding raster-dem tile for OverscaledTileID\n */\nexport class TerrainTileManager extends Evented {\n /**\n * tile manager for the raster-dem source.\n */\n tileManager: TileManager;\n /**\n * stores all render-to-texture tiles.\n */\n _tiles: {[_: string]: Tile};\n /**\n * contains a list of tileID-keys for the current scene. (only for performance)\n */\n _renderableTilesKeys: Array;\n /**\n * raster-dem-tile for a TileID cache.\n */\n _sourceTileCache: {[_: string]: string};\n /**\n * minimum zoomlevel to render the terrain.\n */\n minzoom: number;\n /**\n * maximum zoomlevel to render the terrain.\n */\n maxzoom: number;\n /**\n * render-to-texture tileSize in scene.\n */\n tileSize: number;\n /**\n * raster-dem tiles will load for performance the actualZoom - deltaZoom zoom-level.\n */\n deltaZoom: number;\n /**\n * used to determine whether depth & coord framebuffers need updating\n */\n _lastTilesetChange: number = now();\n\n constructor(tileManager: TileManager) {\n super();\n this.tileManager = tileManager;\n this._tiles = {};\n this._renderableTilesKeys = [];\n this._sourceTileCache = {};\n this.minzoom = 0;\n this.maxzoom = 22;\n this.deltaZoom = 1;\n this.tileSize = tileManager._source.tileSize * 2 ** this.deltaZoom;\n tileManager.usedForTerrain = true;\n tileManager.tileSize = this.tileSize;\n }\n\n destruct() {\n this.tileManager.usedForTerrain = false;\n this.tileManager.tileSize = null;\n }\n\n getSource(): Source {\n return this.tileManager._source;\n }\n\n /**\n * Load Terrain Tiles, create internal render-to-texture tiles, free GPU memory.\n * @param transform - the operation to do\n * @param terrain - the terrain\n */\n update(transform: ITransform, terrain: Terrain): void {\n // load raster-dem tiles for the current scene.\n this.tileManager.update(transform, terrain);\n // create internal render-to-texture tiles for the current scene.\n this._renderableTilesKeys = [];\n const keys = {};\n for (const tileID of coveringTiles(transform, {\n tileSize: this.tileSize,\n minzoom: this.minzoom,\n maxzoom: this.maxzoom,\n reparseOverscaled: false,\n terrain,\n calculateTileZoom: this.tileManager._source.calculateTileZoom\n })) {\n keys[tileID.key] = true;\n this._renderableTilesKeys.push(tileID.key);\n if (!this._tiles[tileID.key]) {\n tileID.terrainRttPosMatrix32f = new Float64Array(16) as any;\n mat4.ortho(tileID.terrainRttPosMatrix32f, 0, EXTENT, EXTENT, 0, 0, 1);\n this._tiles[tileID.key] = new Tile(tileID, this.tileSize);\n this._lastTilesetChange = now();\n }\n }\n // free unused tiles\n for (const key in this._tiles) {\n if (!keys[key]) delete this._tiles[key];\n }\n }\n\n /**\n * Free render to texture cache\n * @param tileID - optional, free only corresponding to tileID.\n */\n freeRtt(tileID?: OverscaledTileID) {\n for (const key in this._tiles) {\n const tile = this._tiles[key];\n if (!tileID || tile.tileID.equals(tileID) || tile.tileID.isChildOf(tileID) || tileID.isChildOf(tile.tileID))\n tile.rtt = [];\n }\n }\n\n /**\n * get a list of tiles, which are loaded and should be rendered in the current scene\n * @returns the renderable tiles\n */\n getRenderableTiles(): Array {\n return this._renderableTilesKeys.map(key => this.getTileByID(key));\n }\n\n /**\n * get terrain tile by the TileID key\n * @param id - the tile id\n * @returns the tile\n */\n getTileByID(id: string): Tile {\n return this._tiles[id];\n }\n\n /**\n * Searches for the corresponding current renderable terrain-tiles\n * @param tileID - the tile to look for\n * @returns the tiles that were found\n */\n getTerrainCoords(\n tileID: OverscaledTileID,\n terrainTileRanges?: {[zoom: string]: CanonicalTileRange}\n ): Record {\n if (terrainTileRanges) {\n return this._getTerrainCoordsForTileRanges(tileID, terrainTileRanges);\n } else {\n return this._getTerrainCoordsForRegularTile(tileID);\n }\n }\n\n /**\n * Searches for the corresponding current renderable terrain-tiles.\n * Includes terrain tiles that are either:\n * - the same as the tileID\n * - a parent of the tileID\n * - a child of the tileID\n * @param tileID - the tile to look for\n * @returns the tiles that were found\n */\n _getTerrainCoordsForRegularTile(tileID: OverscaledTileID): Record {\n const coords: Record = {};\n for (const key of this._renderableTilesKeys) {\n const terrainTileID = this._tiles[key].tileID;\n const coord = tileID.clone();\n const mat = createMat4f64();\n if (terrainTileID.canonical.equals(tileID.canonical)) {\n mat4.ortho(mat, 0, EXTENT, EXTENT, 0, 0, 1);\n } else if (terrainTileID.canonical.isChildOf(tileID.canonical)) {\n const dz = terrainTileID.canonical.z - tileID.canonical.z;\n const dx = terrainTileID.canonical.x - (terrainTileID.canonical.x >> dz << dz);\n const dy = terrainTileID.canonical.y - (terrainTileID.canonical.y >> dz << dz);\n const size = EXTENT >> dz;\n mat4.ortho(mat, 0, size, size, 0, 0, 1); // Note: we are using `size` instead of `EXTENT` here\n mat4.translate(mat, mat, [-dx * size, -dy * size, 0]);\n } else if (tileID.canonical.isChildOf(terrainTileID.canonical)) {\n const dz = tileID.canonical.z - terrainTileID.canonical.z;\n const dx = tileID.canonical.x - (tileID.canonical.x >> dz << dz);\n const dy = tileID.canonical.y - (tileID.canonical.y >> dz << dz);\n const size = EXTENT >> dz;\n mat4.ortho(mat, 0, EXTENT, EXTENT, 0, 0, 1);\n mat4.translate(mat, mat, [dx * size, dy * size, 0]);\n mat4.scale(mat, mat, [1 / (2 ** dz), 1 / (2 ** dz), 0]);\n } else {\n continue;\n }\n coord.terrainRttPosMatrix32f = new Float32Array(mat);\n coords[key] = coord;\n }\n return coords;\n }\n\n /**\n * Searches for the corresponding current renderable terrain-tiles.\n * Includes terrain tiles that are within terrain tile ranges.\n * @param tileID - the tile to look for\n * @returns the tiles that were found\n */\n _getTerrainCoordsForTileRanges(\n tileID: OverscaledTileID,\n terrainTileRanges: {[zoom: string]: CanonicalTileRange}\n ): Record {\n const coords: Record = {};\n for (const key of this._renderableTilesKeys) {\n const terrainTileID = this._tiles[key].tileID;\n if (!this._isWithinTileRanges(terrainTileID, terrainTileRanges)) {\n continue;\n }\n\n const coord = tileID.clone();\n const mat = createMat4f64();\n if (terrainTileID.canonical.z === tileID.canonical.z) {\n const dx = tileID.canonical.x - terrainTileID.canonical.x;\n const dy = tileID.canonical.y - terrainTileID.canonical.y;\n mat4.ortho(mat, 0, EXTENT, EXTENT, 0, 0, 1);\n mat4.translate(mat, mat, [dx * EXTENT, dy * EXTENT, 0]);\n } else if (terrainTileID.canonical.z > tileID.canonical.z) {\n const dz = terrainTileID.canonical.z - tileID.canonical.z;\n // this translation is needed to project tileID to terrainTileID zoom level\n const dx = terrainTileID.canonical.x - (terrainTileID.canonical.x >> dz << dz);\n const dy = terrainTileID.canonical.y - (terrainTileID.canonical.y >> dz << dz);\n // this translation is needed if terrainTileID is not a parent of tileID\n const dx2 = tileID.canonical.x - (terrainTileID.canonical.x >> dz);\n const dy2 = tileID.canonical.y - (terrainTileID.canonical.y >> dz);\n\n const size = EXTENT >> dz;\n mat4.ortho(mat, 0, size, size, 0, 0, 1);\n mat4.translate(mat, mat, [-dx * size + dx2 * EXTENT, -dy * size + dy2 * EXTENT, 0]);\n } else { // terrainTileID.canonical.z < tileID.canonical.z\n const dz = tileID.canonical.z - terrainTileID.canonical.z;\n // this translation is needed to project tileID to terrainTileID zoom level\n const dx = tileID.canonical.x - (tileID.canonical.x >> dz << dz);\n const dy = tileID.canonical.y - (tileID.canonical.y >> dz << dz);\n // this translation is needed if terrainTileID is not a parent of tileID\n const dx2 = (tileID.canonical.x >> dz) - terrainTileID.canonical.x;\n const dy2 = (tileID.canonical.y >> dz) - terrainTileID.canonical.y;\n\n const size = EXTENT << dz;\n mat4.ortho(mat, 0, size, size, 0, 0, 1);\n mat4.translate(mat, mat, [dx * EXTENT + dx2 * size, dy * EXTENT + dy2 * size, 0]);\n }\n coord.terrainRttPosMatrix32f = new Float32Array(mat);\n coords[key] = coord;\n }\n return coords;\n }\n\n /**\n * find the covering raster-dem tile\n * @param tileID - the tile to look for\n * @param searchForDEM - Optional parameter to search for (parent) source tiles with loaded dem.\n * @returns the tile\n */\n getSourceTile(tileID: OverscaledTileID, searchForDEM?: boolean): Tile | undefined {\n const source = this.tileManager._source;\n let z = tileID.overscaledZ - this.deltaZoom;\n if (z > source.maxzoom) z = source.maxzoom;\n if (z < source.minzoom) return undefined;\n // cache for tileID to terrain-tileID\n if (!this._sourceTileCache[tileID.key])\n this._sourceTileCache[tileID.key] = tileID.scaledTo(z).key;\n let tile = this.findTileInCaches(this._sourceTileCache[tileID.key]);\n // during tile-loading phase look if parent tiles (with loaded dem) are available.\n if (!tile?.dem && searchForDEM) {\n while (z >= source.minzoom && !tile?.dem)\n tile = this.findTileInCaches(tileID.scaledTo(z--).key);\n }\n return tile;\n }\n\n findTileInCaches(key: string): Tile | undefined {\n let tile = this.tileManager.getTileByID(key);\n if (tile) {\n return tile;\n }\n tile = this.tileManager._outOfViewCache.getByKey(key);\n return tile;\n }\n\n /**\n * gets whether any tiles were loaded after a specific time. This is used to update depth & coords framebuffers.\n * @param time - the time\n * @returns true if any tiles came into view at or after the specified time\n */\n anyTilesAfterTime(time = Date.now()): boolean {\n return this._lastTilesetChange >= time;\n }\n\n /**\n * Checks whether a tile is within the canonical tile ranges.\n * @param tileID - Tile to check\n * @param canonicalTileRanges - Canonical tile ranges\n * @returns\n */\n private _isWithinTileRanges(\n tileID: OverscaledTileID,\n canonicalTileRanges: {[zoom: string]: CanonicalTileRange}\n ): boolean {\n return canonicalTileRanges[tileID.canonical.z] &&\n tileID.canonical.x >= canonicalTileRanges[tileID.canonical.z].minTileX &&\n tileID.canonical.x <= canonicalTileRanges[tileID.canonical.z].maxTileX &&\n tileID.canonical.y >= canonicalTileRanges[tileID.canonical.z].minTileY &&\n tileID.canonical.y <= canonicalTileRanges[tileID.canonical.z].maxTileY;\n }\n}\n","\nimport {mat4, vec2} from 'gl-matrix';\nimport {OverscaledTileID} from '../tile/tile_id';\nimport {RGBAImage} from '../util/image';\nimport {warnOnce} from '../util/util';\nimport {Pos3dArray, TriangleIndexArray} from '../data/array_types.g';\nimport pos3dAttributes from '../data/pos3d_attributes';\nimport {SegmentVector} from '../data/segment';\nimport {Texture} from '../render/texture';\nimport {MercatorCoordinate} from '../geo/mercator_coordinate';\nimport {TerrainTileManager} from '../tile/terrain_tile_manager';\nimport {EXTENT} from '../data/extent';\nimport {type LngLat, earthRadius} from '../geo/lng_lat';\nimport {Mesh} from './mesh';\nimport {isInBoundsForZoomLngLat} from '../util/world_bounds';\nimport {NORTH_POLE_Y, SOUTH_POLE_Y} from './subdivision';\nimport {coveringTiles} from '../geo/projection/covering_tiles';\nimport type Point from '@mapbox/point-geometry';\nimport type {Tile} from '../tile/tile';\nimport type {Framebuffer} from '../gl/framebuffer';\nimport type {TileManager} from '../tile/tile_manager';\nimport type {TerrainSpecification} from '@maplibre/maplibre-gl-style-spec';\nimport type {Painter} from './painter';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\n\n/**\n * @internal\n * A terrain GPU related object\n */\nexport type TerrainData = {\n 'u_depth': number;\n 'u_terrain': number;\n 'u_terrain_dim': number;\n 'u_terrain_matrix': mat4;\n 'u_terrain_unpack': number[];\n 'u_terrain_exaggeration': number;\n texture: WebGLTexture;\n depthTexture: WebGLTexture;\n tile: Tile;\n};\n\n/**\n * @internal\n * This is the main class which handles most of the 3D Terrain logic. It has the following topics:\n *\n * 1. loads raster-dem tiles via the internal tileManager this.tileManager\n * 2. creates a depth-framebuffer, which is used to calculate the visibility of coordinates\n * 3. creates a coords-framebuffer, which is used the get to tile-coordinate for a screen-pixel\n * 4. stores all render-to-texture tiles in the this.tileManager._tiles\n * 5. calculates the elevation for a specific tile-coordinate\n * 6. creates a terrain-mesh\n *\n * A note about the GPU resource-usage:\n *\n * Framebuffers:\n *\n * - one for the depth & coords framebuffer with the size of the map-div.\n * - one for rendering a tile to texture with the size of tileSize (= 512x512).\n *\n * Textures:\n *\n * - one texture for an empty raster-dem tile with size 1x1\n * - one texture for an empty depth-buffer, when terrain is disabled with size 1x1\n * - one texture for an each loaded raster-dem with size of the source.tileSize\n * - one texture for the coords-framebuffer with the size of the map-div.\n * - one texture for the depth-framebuffer with the size of the map-div.\n * - one texture for the encoded tile-coords with the size 2*tileSize (=1024x1024)\n * - finally for each render-to-texture tile (= this._tiles) a set of textures\n * for each render stack (The stack-concept is documented in painter.ts).\n *\n * Normally there exists 1-3 Textures per tile, depending on the stylesheet.\n * Each Textures has the size 2*tileSize (= 1024x1024). Also there exists a\n * cache of the last 150 newest rendered tiles.\n *\n */\nexport class Terrain {\n /**\n * The style this terrain corresponds to\n */\n painter: Painter;\n /**\n * the tilemanager this terrain is based on\n */\n tileManager: TerrainTileManager;\n /**\n * the TerrainSpecification object passed to this instance\n */\n options: TerrainSpecification;\n /**\n * define the meshSize per tile.\n */\n meshSize: number;\n /**\n * multiplicator for the elevation. Used to make terrain more \"extreme\".\n */\n exaggeration: number;\n /**\n * to not see pixels in the render-to-texture tiles it is good to render them bigger\n * this number is the multiplicator (must be a power of 2) for the current tileSize.\n * So to get good results with not too much memory footprint a value of 2 should be fine.\n */\n qualityFactor: number;\n /**\n * holds the framebuffer object in size of the screen to render the coords & depth into a texture.\n */\n _fbo: Framebuffer;\n _fboCoordsTexture: Texture;\n _fboDepthTexture: Texture;\n _emptyDepthTexture: Texture;\n /**\n * GL Objects for the terrain-mesh\n * The mesh is a regular mesh, which has the advantage that it can be reused for all tiles.\n */\n _meshCache: { [key: string]: Mesh } = {};\n /**\n * coords index contains a list of tileID.keys. This index is used to identify\n * the tile via the alpha-cannel in the coords-texture.\n * As the alpha-channel has 1 Byte a max of 255 tiles can rendered without an error.\n */\n coordsIndex: Array;\n /**\n * tile-coords encoded in the rgb channel, _coordsIndex is in the alpha-channel.\n */\n _coordsTexture: Texture;\n /**\n * accuracy of the coords. 2 * tileSize should be enough.\n */\n _coordsTextureSize: number;\n /**\n * variables for an empty dem texture, which is used while the raster-dem tile is loading.\n */\n _emptyDemUnpack: number[];\n _emptyDemTexture: Texture;\n _emptyDemMatrix: mat4;\n /**\n * as of overzooming of raster-dem tiles in high zoomlevels, this cache contains\n * matrices to transform from vector-tile coords to raster-dem-tile coords.\n */\n _demMatrixCache: {[_: string]: { matrix: mat4; coord: OverscaledTileID }};\n\n constructor(painter: Painter, tileManager: TileManager, options: TerrainSpecification) {\n this.painter = painter;\n this.tileManager = new TerrainTileManager(tileManager);\n this.options = options;\n this.exaggeration = typeof options.exaggeration === 'number' ? options.exaggeration : 1.0;\n this.qualityFactor = 2;\n this.meshSize = 128;\n this._demMatrixCache = {};\n this.coordsIndex = [];\n this._coordsTextureSize = 1024;\n }\n\n /**\n * get the elevation-value from original dem-data for a given tile-coordinate\n * @param tileID - the tile to get elevation for\n * @param x - between 0 .. EXTENT\n * @param y - between 0 .. EXTENT\n * @param extent - optional, default 8192\n * @returns the elevation\n */\n getDEMElevation(tileID: OverscaledTileID, x: number, y: number, extent: number = EXTENT): number {\n if (!(x >= 0 && x < extent && y >= 0 && y < extent)) return 0;\n const terrain = this.getTerrainData(tileID);\n const dem = terrain.tile?.dem;\n if (!dem) return 0;\n\n const pos = vec2.transformMat4([] as any, [x / extent * EXTENT, y / extent * EXTENT], terrain.u_terrain_matrix);\n const coord = [pos[0] * dem.dim, pos[1] * dem.dim];\n\n // bilinear interpolation\n const cx = Math.floor(coord[0]),\n cy = Math.floor(coord[1]),\n tx = coord[0] - cx,\n ty = coord[1] - cy;\n return (\n dem.get(cx, cy) * (1 - tx) * (1 - ty) +\n dem.get(cx + 1, cy) * (tx) * (1 - ty) +\n dem.get(cx, cy + 1) * (1 - tx) * (ty) +\n dem.get(cx + 1, cy + 1) * (tx) * (ty)\n );\n }\n\n /**\n * Get the elevation for given {@link LngLat} in respect of exaggeration.\n * @param lnglat - the location\n * @param zoom - the zoom, use {@link getElevationForLngLat} if you don't want a specific zoom level, but more accurate results.\n * @returns the elevation\n */\n getElevationForLngLatZoom(lnglat: LngLat, zoom: number) {\n if (!isInBoundsForZoomLngLat(zoom, lnglat.wrap())) return 0;\n const {tileID, mercatorX, mercatorY} = this._getOverscaledTileIDFromLngLatZoom(lnglat, zoom);\n return this.getElevation(tileID, mercatorX % EXTENT, mercatorY % EXTENT, EXTENT);\n }\n\n /**\n * Get the elevation for given {@link LngLat} in respect of exaggeration.\n * This will traverse up the zoom levels to find the first tile with data to return.\n * @param lnglat - the location\n * @returns the elevation\n */\n getElevationForLngLat(lnglat: LngLat, transform: IReadonlyTransform) {\n const terrainCoveringTiles = coveringTiles(transform, {maxzoom: this.tileManager.maxzoom, minzoom: this.tileManager.minzoom, tileSize: 512, terrain: this});\n let zoom = 0;\n for (const tile of terrainCoveringTiles) {\n if (tile.canonical.z > zoom) {\n zoom = Math.min(tile.canonical.z, this.tileManager.maxzoom);\n }\n }\n return this.getElevationForLngLatZoom(lnglat, zoom);\n }\n\n /**\n * Get the elevation for given coordinate in respect of exaggeration.\n * @param tileID - the tile id\n * @param x - between 0 .. EXTENT\n * @param y - between 0 .. EXTENT\n * @param extent - optional, default 8192\n * @returns the elevation\n */\n getElevation(tileID: OverscaledTileID, x: number, y: number, extent: number = EXTENT): number {\n return this.getDEMElevation(tileID, x, y, extent) * this.exaggeration;\n }\n\n /**\n * returns a Terrain Object for a tile. Unless the tile corresponds to data (e.g. tile is loading), return a flat dem object\n * @param tileID - the tile to get the terrain for\n * @returns the terrain data to use in the program\n */\n getTerrainData(tileID: OverscaledTileID): TerrainData {\n // create empty DEM Objects, which will used while raster-dem tiles are loading.\n // creates an empty depth-buffer texture which is needed, during the initialization process of the 3d mesh..\n if (!this._emptyDemTexture) {\n const context = this.painter.context;\n const image = new RGBAImage({width: 1, height: 1}, new Uint8Array(1 * 4));\n this._emptyDepthTexture = new Texture(context, image, context.gl.RGBA, {premultiply: false});\n this._emptyDemUnpack = [0, 0, 0, 0];\n this._emptyDemTexture = new Texture(context, new RGBAImage({width: 1, height: 1}), context.gl.RGBA, {premultiply: false});\n this._emptyDemTexture.bind(context.gl.NEAREST, context.gl.CLAMP_TO_EDGE);\n this._emptyDemMatrix = mat4.identity([] as any);\n }\n // find covering dem tile and prepare demTexture\n const sourceTile = this.tileManager.getSourceTile(tileID, true);\n if (sourceTile && sourceTile.dem && (!sourceTile.demTexture || sourceTile.needsTerrainPrepare)) {\n const context = this.painter.context;\n sourceTile.demTexture = this.painter.getTileTexture(sourceTile.dem.stride);\n if (sourceTile.demTexture) sourceTile.demTexture.update(sourceTile.dem.getPixels(), {premultiply: false});\n else sourceTile.demTexture = new Texture(context, sourceTile.dem.getPixels(), context.gl.RGBA, {premultiply: false});\n sourceTile.demTexture.bind(context.gl.NEAREST, context.gl.CLAMP_TO_EDGE);\n sourceTile.needsTerrainPrepare = false;\n }\n // create matrix for lookup in dem data\n const matrixKey = sourceTile && sourceTile.toString() + sourceTile.tileID.key + tileID.key;\n if (matrixKey && !this._demMatrixCache[matrixKey]) {\n const maxzoom = this.tileManager.getSource().maxzoom;\n let dz = tileID.canonical.z - sourceTile.tileID.canonical.z;\n if (tileID.overscaledZ > tileID.canonical.z) {\n if (tileID.canonical.z >= maxzoom) dz = tileID.canonical.z - maxzoom;\n else warnOnce('cannot calculate elevation if elevation maxzoom > source.maxzoom');\n }\n const dx = tileID.canonical.x - (tileID.canonical.x >> dz << dz);\n const dy = tileID.canonical.y - (tileID.canonical.y >> dz << dz);\n const demMatrix = mat4.fromScaling(new Float64Array(16) as any, [1 / (EXTENT << dz), 1 / (EXTENT << dz), 0]);\n mat4.translate(demMatrix, demMatrix, [dx * EXTENT, dy * EXTENT, 0]);\n this._demMatrixCache[tileID.key] = {matrix: demMatrix, coord: tileID};\n }\n // return uniform values & textures\n return {\n 'u_depth': 2,\n 'u_terrain': 3,\n 'u_terrain_dim': sourceTile && sourceTile.dem && sourceTile.dem.dim || 1,\n 'u_terrain_matrix': matrixKey ? this._demMatrixCache[tileID.key].matrix : this._emptyDemMatrix,\n 'u_terrain_unpack': sourceTile && sourceTile.dem && sourceTile.dem.getUnpackVector() || this._emptyDemUnpack,\n 'u_terrain_exaggeration': this.exaggeration,\n texture: (sourceTile && sourceTile.demTexture || this._emptyDemTexture).texture,\n depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture,\n tile: sourceTile\n };\n }\n\n /**\n * get a framebuffer as big as the map-div, which will be used to render depth & coords into a texture\n * @param texture - the texture\n * @returns the frame buffer\n */\n getFramebuffer(texture: string): Framebuffer {\n const painter = this.painter;\n const width = painter.width / devicePixelRatio;\n const height = painter.height / devicePixelRatio;\n if (this._fbo && (this._fbo.width !== width || this._fbo.height !== height)) {\n this._fbo.destroy();\n this._fboCoordsTexture.destroy();\n this._fboDepthTexture.destroy();\n delete this._fbo;\n delete this._fboDepthTexture;\n delete this._fboCoordsTexture;\n }\n if (!this._fboCoordsTexture) {\n this._fboCoordsTexture = new Texture(painter.context, {width, height, data: null}, painter.context.gl.RGBA, {premultiply: false});\n this._fboCoordsTexture.bind(painter.context.gl.NEAREST, painter.context.gl.CLAMP_TO_EDGE);\n }\n if (!this._fboDepthTexture) {\n this._fboDepthTexture = new Texture(painter.context, {width, height, data: null}, painter.context.gl.RGBA, {premultiply: false});\n this._fboDepthTexture.bind(painter.context.gl.NEAREST, painter.context.gl.CLAMP_TO_EDGE);\n }\n if (!this._fbo) {\n this._fbo = painter.context.createFramebuffer(width, height, true, false);\n this._fbo.depthAttachment.set(painter.context.createRenderbuffer(painter.context.gl.DEPTH_COMPONENT16, width, height));\n }\n this._fbo.colorAttachment.set(texture === 'coords' ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture);\n return this._fbo;\n }\n\n /**\n * create coords texture, needed to grab coordinates from canvas\n * encode coords coordinate into 4 bytes:\n * - 8 lower bits for x\n * - 8 lower bits for y\n * - 4 higher bits for x\n * - 4 higher bits for y\n * - 8 bits for coordsIndex (1 .. 255) (= number of terraintile), is later setted in draw_terrain uniform value\n * @returns the texture\n */\n getCoordsTexture(): Texture {\n const context = this.painter.context;\n if (this._coordsTexture) return this._coordsTexture;\n const data = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4);\n for (let y = 0, i = 0; y < this._coordsTextureSize; y++) for (let x = 0; x < this._coordsTextureSize; x++, i += 4) {\n data[i + 0] = x & 255;\n data[i + 1] = y & 255;\n data[i + 2] = ((x >> 8) << 4) | (y >> 8);\n data[i + 3] = 0;\n }\n const image = new RGBAImage({width: this._coordsTextureSize, height: this._coordsTextureSize}, new Uint8Array(data.buffer));\n const texture = new Texture(context, image, context.gl.RGBA, {premultiply: false});\n texture.bind(context.gl.NEAREST, context.gl.CLAMP_TO_EDGE);\n this._coordsTexture = texture;\n return texture;\n }\n\n /**\n * Reads a pixel from the coords-framebuffer and translate this to mercator, or null, if the pixel doesn't lie on the terrain's surface (but the sky instead).\n * @param p - Screen-Coordinate\n * @returns Mercator coordinate for a screen pixel, or null, if the pixel is not covered by terrain (is in the sky).\n */\n pointCoordinate(p: Point): MercatorCoordinate {\n // First, ensure the coords framebuffer is up to date.\n this.painter.maybeDrawDepthAndCoords(true);\n\n const rgba = new Uint8Array(4);\n const context = this.painter.context, gl = context.gl;\n const px = Math.round(p.x * this.painter.pixelRatio / devicePixelRatio);\n const py = Math.round(p.y * this.painter.pixelRatio / devicePixelRatio);\n const fbHeight = Math.round(this.painter.height / devicePixelRatio);\n // grab coordinate pixel from coordinates framebuffer\n context.bindFramebuffer.set(this.getFramebuffer('coords').framebuffer);\n gl.readPixels(px, fbHeight - py - 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, rgba);\n context.bindFramebuffer.set(null);\n // decode coordinates (encoding see getCoordsTexture)\n const x = rgba[0] + ((rgba[2] >> 4) << 8);\n const y = rgba[1] + ((rgba[2] & 15) << 8);\n const tileID = this.coordsIndex[255 - rgba[3]];\n const tile = tileID && this.tileManager.getTileByID(tileID);\n\n if (!tile) {\n return null;\n }\n\n const coordsSize = this._coordsTextureSize;\n const worldSize = (1 << tile.tileID.canonical.z) * coordsSize;\n return new MercatorCoordinate(\n (tile.tileID.canonical.x * coordsSize + x) / worldSize + tile.tileID.wrap,\n (tile.tileID.canonical.y * coordsSize + y) / worldSize,\n this.getElevation(tile.tileID, x, y, coordsSize)\n );\n }\n\n /**\n * Reads the depth value from the depth-framebuffer at a given screen pixel\n * @param p - Screen coordinate\n * @returns depth value in clip space (between 0 and 1)\n */\n\n depthAtPoint(p: Point): number {\n const rgba = new Uint8Array(4);\n const context = this.painter.context, gl = context.gl;\n context.bindFramebuffer.set(this.getFramebuffer('depth').framebuffer);\n gl.readPixels(p.x, this.painter.height / devicePixelRatio - p.y - 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, rgba);\n context.bindFramebuffer.set(null);\n // decode coordinates (encoding see terran_depth.fragment.glsl)\n const depthValue = (rgba[0] / (256 * 256 * 256) + rgba[1] / (256 * 256) + rgba[2] / 256 + rgba[3]) / 256;\n return depthValue;\n }\n\n /**\n * create a regular mesh which will be used by all terrain-tiles\n * @returns the created regular mesh\n */\n getTerrainMesh(tileId: OverscaledTileID): Mesh {\n const globeEnabled = this.painter.style.projection?.transitionState > 0;\n const northPole = globeEnabled && tileId.canonical.y === 0;\n const southPole = globeEnabled && tileId.canonical.y === (1 << tileId.canonical.z) - 1;\n const key = `m_${northPole ? 'n' : ''}_${southPole ? 's' : ''}`;\n if (this._meshCache[key]) {\n return this._meshCache[key];\n }\n const context = this.painter.context;\n\n const vertexArray = new Pos3dArray();\n const indexArray = new TriangleIndexArray();\n const meshSize = this.meshSize;\n const delta = EXTENT / meshSize;\n const meshSize2 = meshSize * meshSize;\n for (let y = 0; y <= meshSize; y++) for (let x = 0; x <= meshSize; x++) {\n vertexArray.emplaceBack(x * delta, y * delta, 0);\n }\n for (let y = 0; y < meshSize2; y += meshSize + 1) for (let x = 0; x < meshSize; x++) {\n indexArray.emplaceBack(x + y, meshSize + x + y + 1, meshSize + x + y + 2);\n indexArray.emplaceBack(x + y, meshSize + x + y + 2, x + y + 1);\n }\n // add an extra frame around the mesh to avoid stitching on tile boundaries with different zoomlevels\n // top-bottom frame + pole vertices, if needed\n const offsetTop = vertexArray.length;\n const offsetTopEdge = 0;\n const offsetBottom = offsetTop + (meshSize + 1);\n const offsetBottomEdge = (meshSize + 1) * meshSize;\n const northY = northPole ? NORTH_POLE_Y : 0;\n const northZ = northPole ? 0 : 1;\n const southY = southPole ? SOUTH_POLE_Y : EXTENT;\n const southZ = southPole ? 0 : 1;\n for (let x = 0; x <= meshSize; x++) {\n vertexArray.emplaceBack(x * delta, northY, northZ);\n }\n for (let x = 0; x <= meshSize; x++) {\n vertexArray.emplaceBack(x * delta, southY, southZ);\n }\n for (let x = 0; x < meshSize; x++) {\n indexArray.emplaceBack(offsetBottomEdge + x, offsetBottom + x, offsetBottom + x + 1);\n indexArray.emplaceBack(offsetBottomEdge + x, offsetBottom + x + 1, offsetBottomEdge + x + 1);\n indexArray.emplaceBack(offsetTopEdge + x, offsetTop + x + 1, offsetTop + x);\n indexArray.emplaceBack(offsetTopEdge + x, offsetTopEdge + x + 1, offsetTop + x + 1);\n }\n // left-right frame\n const offsetLeft = vertexArray.length;\n const offsetRight = offsetLeft + (meshSize + 1) * 2;\n for (const x of [0, 1]) for (let y = 0; y <= meshSize; y++) for (const z of [0, 1]) {\n vertexArray.emplaceBack(x * EXTENT, y * delta, z);\n }\n for (let y = 0; y < meshSize * 2; y += 2) {\n indexArray.emplaceBack(offsetLeft + y, offsetLeft + y + 1, offsetLeft + y + 3);\n indexArray.emplaceBack(offsetLeft + y, offsetLeft + y + 3, offsetLeft + y + 2);\n indexArray.emplaceBack(offsetRight + y, offsetRight + y + 3, offsetRight + y + 1);\n indexArray.emplaceBack(offsetRight + y, offsetRight + y + 2, offsetRight + y + 3);\n }\n\n const mesh = new Mesh(\n context.createVertexBuffer(vertexArray, pos3dAttributes.members),\n context.createIndexBuffer(indexArray),\n SegmentVector.simpleSegment(0, 0, vertexArray.length, indexArray.length)\n );\n this._meshCache[key] = mesh;\n return mesh;\n }\n\n /**\n * Calculates a height of the frame around the terrain-mesh to avoid stitching between\n * tile boundaries in different zoomlevels.\n * @param zoom - current zoomlevel\n * @returns the elevation delta in meters\n */\n getMeshFrameDelta(zoom: number): number {\n // divide by 5 is evaluated by trial & error to get a frame in the right height\n return 2 * Math.PI * earthRadius / Math.pow(2, Math.max(zoom, 0)) / 5;\n }\n\n getMinTileElevationForLngLatZoom(lnglat: LngLat, zoom: number) {\n if (!isInBoundsForZoomLngLat(zoom, lnglat.wrap())) return 0;\n const {tileID} = this._getOverscaledTileIDFromLngLatZoom(lnglat, zoom);\n return this.getMinMaxElevation(tileID).minElevation ?? 0;\n }\n\n /**\n * Get the minimum and maximum elevation contained in a tile. This includes any\n * exaggeration included in the terrain.\n *\n * @param tileID - ID of the tile to be used as a source for the min/max elevation\n * @returns the minimum and maximum elevation found in the tile, including the terrain's\n * exaggeration\n */\n getMinMaxElevation(tileID: OverscaledTileID): {minElevation: number | null; maxElevation: number | null} {\n const tile = this.getTerrainData(tileID).tile;\n const minMax = {minElevation: null, maxElevation: null};\n if (tile && tile.dem) {\n minMax.minElevation = tile.dem.min * this.exaggeration;\n minMax.maxElevation = tile.dem.max * this.exaggeration;\n }\n return minMax;\n }\n\n _getOverscaledTileIDFromLngLatZoom(lnglat: LngLat, zoom: number): { tileID: OverscaledTileID; mercatorX: number; mercatorY: number} {\n const mercatorCoordinate = MercatorCoordinate.fromLngLat(lnglat.wrap());\n const worldSize = (1 << zoom) * EXTENT;\n const mercatorX = mercatorCoordinate.x * worldSize;\n const mercatorY = mercatorCoordinate.y * worldSize;\n const tileX = Math.floor(mercatorX / EXTENT), tileY = Math.floor(mercatorY / EXTENT);\n const tileID = new OverscaledTileID(zoom, 0, zoom, tileX, tileY);\n return {\n tileID,\n mercatorX,\n mercatorY\n };\n }\n}\n","import {Texture} from '../render/texture';\nimport {type Context} from './context';\nimport {type Framebuffer} from './framebuffer';\n\nexport type PoolObject = {\n id: number;\n fbo: Framebuffer;\n texture: Texture;\n stamp: number;\n inUse: boolean;\n};\n/**\n * @internal\n * `RenderPool` is a resource pool for textures and framebuffers\n */\nexport class RenderPool {\n private _objects: Array;\n /**\n * An index array of recently used pool objects.\n * Items that are used recently are last in the array\n */\n private _recentlyUsed: Array;\n private _stamp: number;\n\n constructor(\n private readonly _context: Context,\n private readonly _size: number,\n private readonly _tileSize: number) {\n this._objects = [];\n this._recentlyUsed = [];\n this._stamp = 0;\n }\n\n public destruct() {\n for (const obj of this._objects) {\n obj.texture.destroy();\n obj.fbo.destroy();\n }\n }\n\n private _createObject(id: number): PoolObject {\n const fbo = this._context.createFramebuffer(this._tileSize, this._tileSize, true, true);\n const texture = new Texture(this._context, {width: this._tileSize, height: this._tileSize, data: null}, this._context.gl.RGBA);\n texture.bind(this._context.gl.LINEAR, this._context.gl.CLAMP_TO_EDGE);\n if (this._context.extTextureFilterAnisotropic) {\n this._context.gl.texParameterf(this._context.gl.TEXTURE_2D, this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, this._context.extTextureFilterAnisotropicMax);\n }\n fbo.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize));\n fbo.colorAttachment.set(texture.texture);\n return {id, fbo, texture, stamp: -1, inUse: false};\n }\n\n public getObjectForId(id: number): PoolObject {\n return this._objects[id];\n }\n\n public useObject(obj: PoolObject) {\n obj.inUse = true;\n this._recentlyUsed = this._recentlyUsed.filter(id => obj.id !== id);\n this._recentlyUsed.push(obj.id);\n }\n\n public stampObject(obj: PoolObject) {\n obj.stamp = ++this._stamp;\n }\n\n public getOrCreateFreeObject(): PoolObject {\n // check for free existing object\n for (const id of this._recentlyUsed) {\n if (!this._objects[id].inUse)\n return this._objects[id];\n }\n if (this._objects.length >= this._size)\n throw new Error('No free RenderPool available, call freeAllObjects() required!');\n // create new object\n const obj = this._createObject(this._objects.length);\n this._objects.push(obj);\n return obj;\n }\n\n public freeObject(obj: PoolObject) {\n obj.inUse = false;\n }\n\n public freeAllObjects() {\n for (const obj of this._objects)\n this.freeObject(obj);\n }\n\n public isFull(): boolean {\n if (this._objects.length < this._size) {\n return false;\n }\n return this._objects.some(o => !o.inUse) === false;\n }\n}\n","import {type Painter, type RenderOptions} from './painter';\nimport {type Tile} from '../tile/tile';\nimport {Color} from '@maplibre/maplibre-gl-style-spec';\nimport {type OverscaledTileID} from '../tile/tile_id';\nimport {drawTerrain} from './draw_terrain';\nimport {type Style} from '../style/style';\nimport {type Terrain} from './terrain';\nimport {RenderPool} from '../gl/render_pool';\nimport {type Texture} from './texture';\nimport type {StyleLayer} from '../style/style_layer';\nimport {ImageSource} from '../source/image_source';\n\n/**\n * lookup table which layers should rendered to texture\n */\nconst LAYERS: { [keyof in StyleLayer['type']]?: boolean } = {\n background: true,\n fill: true,\n line: true,\n raster: true,\n hillshade: true,\n 'color-relief': true\n};\n\n/**\n * @internal\n * A helper class to help define what should be rendered to texture and how\n */\nexport class RenderToTexture {\n painter: Painter;\n terrain: Terrain;\n pool: RenderPool;\n /**\n * coordsAscending contains a list of all tiles which should be rendered for one render-to-texture tile\n * e.g. render 4 raster-tiles with size 256px to the 512px render-to-texture tile\n */\n _coordsAscending: {[_: string]: {[_:string]: Array}};\n /**\n * create a string representation of all to tiles rendered to render-to-texture tiles\n * this string representation is used to check if tile should be re-rendered.\n */\n _coordsAscendingStr: {[_: string]: {[_:string]: string}};\n /**\n * store for render-stacks\n * a render stack is a set of layers which should be rendered into one texture\n * every stylesheet can have multiple stacks. A new stack is created if layers which should\n * not rendered to texture sit between layers which should rendered to texture. e.g. hillshading or symbols\n */\n _stacks: Array>;\n /**\n * remember the previous processed layer to check if a new stack is needed\n */\n _prevType: string;\n /**\n * a list of tiles that can potentially rendered\n */\n _renderableTiles: Array;\n /**\n * a list of tiles that should be rendered to screen in the next render-call\n */\n _rttTiles: Array;\n /**\n * a list of all layer-ids which should be rendered\n */\n _renderableLayerIds: Array;\n\n constructor(painter: Painter, terrain: Terrain) {\n this.painter = painter;\n this.terrain = terrain;\n this.pool = new RenderPool(painter.context, 30, terrain.tileManager.tileSize * terrain.qualityFactor);\n }\n\n destruct() {\n this.pool.destruct();\n }\n\n getTexture(tile: Tile): Texture {\n return this.pool.getObjectForId(tile.rtt[this._stacks.length - 1].id).texture;\n }\n\n prepareForRender(style: Style, zoom: number) {\n this._stacks = [];\n this._prevType = null;\n this._rttTiles = [];\n this._renderableTiles = this.terrain.tileManager.getRenderableTiles();\n this._renderableLayerIds = style._order.filter(id => !style._layers[id].isHidden(zoom));\n\n this._coordsAscending = {};\n for (const id in style.tileManagers) {\n this._coordsAscending[id] = {};\n const tileIDs = style.tileManagers[id].getVisibleCoordinates();\n const source = style.tileManagers[id].getSource();\n const terrainTileRanges = source instanceof ImageSource ? source.terrainTileRanges : null;\n for (const tileID of tileIDs) {\n const keys = this.terrain.tileManager.getTerrainCoords(tileID, terrainTileRanges);\n for (const key in keys) {\n if (!this._coordsAscending[id][key]) this._coordsAscending[id][key] = [];\n this._coordsAscending[id][key].push(keys[key]);\n }\n }\n }\n\n this._coordsAscendingStr = {};\n for (const id of style._order) {\n const layer = style._layers[id], source = layer.source;\n if (LAYERS[layer.type]) {\n if (!this._coordsAscendingStr[source]) {\n this._coordsAscendingStr[source] = {};\n for (const key in this._coordsAscending[source])\n this._coordsAscendingStr[source][key] = this._coordsAscending[source][key].map(c => c.key).sort().join();\n }\n }\n }\n\n // check tiles to render\n for (const tile of this._renderableTiles) {\n for (const source in this._coordsAscendingStr) {\n // rerender if there are more coords to render than in the last rendering\n const coords = this._coordsAscendingStr[source][tile.tileID.key];\n if (coords && coords !== tile.rttCoords[source]) tile.rtt = [];\n }\n }\n }\n\n /**\n * due that switching textures is relatively slow, the render\n * layer-by-layer context is not practicable. To bypass this problem\n * this lines of code stack all layers and later render all at once.\n * Because of the stylesheet possibility to mixing render-to-texture layers\n * and 'live'-layers (f.e. symbols) it is necessary to create more stacks. For example\n * a symbol-layer is in between of fill-layers.\n * @param layer - the layer to render\n * @param renderOptions - flags describing how to render the layer\n * @returns if true layer is rendered to texture, otherwise false\n */\n renderLayer(layer: StyleLayer, renderOptions: RenderOptions): boolean {\n if (layer.isHidden(this.painter.transform.zoom)) return false;\n\n const options: RenderOptions = {...renderOptions, isRenderingToTexture: true};\n const type = layer.type;\n const painter = this.painter;\n const isLastLayer = this._renderableLayerIds[this._renderableLayerIds.length - 1] === layer.id;\n\n // remember background, fill, line & raster layer to render into a stack\n if (LAYERS[type]) {\n // create a new stack if previous layer was not rendered to texture (f.e. symbols)\n if (!this._prevType || !LAYERS[this._prevType]) this._stacks.push([]);\n // push current render-to-texture layer to render-stack\n this._prevType = type;\n this._stacks[this._stacks.length - 1].push(layer.id);\n // rendering is done later, all in once\n if (!isLastLayer) return true;\n }\n\n // in case a stack is finished render all collected stack-layers into a texture\n if (LAYERS[this._prevType] || (LAYERS[type] && isLastLayer)) {\n this._prevType = type;\n const stack = this._stacks.length - 1, layers = this._stacks[stack] || [];\n for (const tile of this._renderableTiles) {\n // if render pool is full draw current tiles to screen and free pool\n if (this.pool.isFull()) {\n drawTerrain(this.painter, this.terrain, this._rttTiles, options);\n this._rttTiles = [];\n this.pool.freeAllObjects();\n }\n this._rttTiles.push(tile);\n // check for cached PoolObject\n if (tile.rtt[stack]) {\n const obj = this.pool.getObjectForId(tile.rtt[stack].id);\n if (obj.stamp === tile.rtt[stack].stamp) {\n this.pool.useObject(obj);\n continue;\n }\n }\n // get free PoolObject\n const obj = this.pool.getOrCreateFreeObject();\n this.pool.useObject(obj);\n this.pool.stampObject(obj);\n tile.rtt[stack] = {id: obj.id, stamp: obj.stamp};\n // prepare PoolObject for rendering\n painter.context.bindFramebuffer.set(obj.fbo.framebuffer);\n painter.context.clear({color: Color.transparent, stencil: 0});\n painter.currentStencilSource = undefined;\n for (let l = 0; l < layers.length; l++) {\n const layer = painter.style._layers[layers[l]];\n const coords = layer.source ? this._coordsAscending[layer.source][tile.tileID.key] : [tile.tileID];\n painter.context.viewport.set([0, 0, obj.fbo.width, obj.fbo.height]);\n painter._renderTileClippingMasks(layer, coords, true);\n painter.renderLayer(painter, painter.style.tileManagers[layer.source], layer, coords, options);\n if (layer.source) tile.rttCoords[layer.source] = this._coordsAscendingStr[layer.source][tile.tileID.key];\n }\n }\n drawTerrain(this.painter, this.terrain, this._rttTiles, options);\n this._rttTiles = [];\n this.pool.freeAllObjects();\n\n return LAYERS[type];\n }\n\n return false;\n }\n\n}\n","export const defaultLocale = {\n 'AttributionControl.ToggleAttribution': 'Toggle attribution',\n 'AttributionControl.MapFeedback': 'Map feedback',\n 'FullscreenControl.Enter': 'Enter fullscreen',\n 'FullscreenControl.Exit': 'Exit fullscreen',\n 'GeolocateControl.FindMyLocation': 'Find my location',\n 'GeolocateControl.LocationNotAvailable': 'Location not available',\n 'LogoControl.Title': 'MapLibre logo',\n 'Map.Title': 'Map',\n 'Marker.Title': 'Map marker',\n 'NavigationControl.ResetBearing': 'Reset bearing to north',\n 'NavigationControl.ZoomIn': 'Zoom in',\n 'NavigationControl.ZoomOut': 'Zoom out',\n 'Popup.Close': 'Close popup',\n 'ScaleControl.Feet': 'ft',\n 'ScaleControl.Meters': 'm',\n 'ScaleControl.Kilometers': 'km',\n 'ScaleControl.Miles': 'mi',\n 'ScaleControl.NauticalMiles': 'nm',\n 'GlobeControl.Enable': 'Enable globe',\n 'GlobeControl.Disable': 'Disable globe',\n 'TerrainControl.Enable': 'Enable terrain',\n 'TerrainControl.Disable': 'Disable terrain',\n 'CooperativeGesturesHandler.WindowsHelpText': 'Use Ctrl + scroll to zoom the map',\n 'CooperativeGesturesHandler.MacHelpText': 'Use ⌘ + scroll to zoom the map',\n 'CooperativeGesturesHandler.MobileHelpText': 'Use two fingers to move the map',\n};\n","import {extend, warnOnce, uniqueId, isImageBitmap, type Complete, pick, type Subscription} from '../util/util';\nimport {browser} from '../util/browser';\nimport {now} from '../util/time_control';\nimport {DOM} from '../util/dom';\nimport packageJSON from '../../package.json' with {type: 'json'};\nimport {type GetResourceResponse, getJSON} from '../util/ajax';\nimport {ImageRequest} from '../util/image_request';\nimport {RequestManager, ResourceType} from '../util/request_manager';\nimport {Style, type StyleSwapOptions} from '../style/style';\nimport {EvaluationParameters} from '../style/evaluation_parameters';\nimport {Painter} from '../render/painter';\nimport {Hash} from './hash';\nimport {HandlerManager} from './handler_manager';\nimport {Camera, type CameraOptions, type CameraUpdateTransformFunction, type FitBoundsOptions} from './camera';\nimport {LngLat} from '../geo/lng_lat';\nimport {LngLatBounds} from '../geo/lng_lat_bounds';\nimport Point from '@mapbox/point-geometry';\nimport {AttributionControl, type AttributionControlOptions, defaultAttributionControlOptions} from './control/attribution_control';\nimport {LogoControl} from './control/logo_control';\nimport {RGBAImage} from '../util/image';\nimport {Event, ErrorEvent, type Listener} from '../util/evented';\nimport {type MapEventType, type MapLayerEventType, MapMouseEvent, type MapSourceDataEvent, type MapStyleDataEvent} from './events';\nimport {TaskQueue} from '../util/task_queue';\nimport {throttle} from '../util/throttle';\nimport {webpSupported} from '../util/webp_supported';\nimport {PerformanceMarkers, PerformanceUtils} from '../util/performance';\nimport {type Source} from '../source/source';\nimport {type StyleLayer} from '../style/style_layer';\nimport {Terrain} from '../render/terrain';\nimport {RenderToTexture} from '../render/render_to_texture';\nimport {config} from '../util/config';\nimport {defaultLocale} from './default_locale';\nimport {MercatorTransform} from '../geo/projection/mercator_transform';\nimport {MercatorCameraHelper} from '../geo/projection/mercator_camera_helper';\nimport {isAbortError} from '../util/abort_error';\nimport {isFramebufferNotCompleteError} from '../util/framebuffer_error';\nimport {coveringTiles, type CoveringTilesOptions, createCalculateTileZoomFunction} from '../geo/projection/covering_tiles';\nimport {CanonicalTileID, type OverscaledTileID} from '../tile/tile_id';\n\nimport type {RequestTransformFunction} from '../util/request_manager';\nimport type {LngLatLike} from '../geo/lng_lat';\nimport type {LngLatBoundsLike} from '../geo/lng_lat_bounds';\nimport type {AddLayerObject, FeatureIdentifier, StyleOptions, StyleSetterOptions} from '../style/style';\nimport type {MapDataEvent} from './events';\nimport type {StyleImage, StyleImageInterface, StyleImageMetadata} from '../style/style_image';\nimport type {PointLike} from './camera';\nimport type {ScrollZoomHandler} from './handler/scroll_zoom';\nimport type {BoxZoomHandler} from './handler/box_zoom';\nimport type {AroundCenterOptions, TwoFingersTouchPitchHandler} from './handler/two_fingers_touch';\nimport type {DragRotateHandler} from './handler/shim/drag_rotate';\nimport type {DragPanHandler, DragPanOptions} from './handler/shim/drag_pan';\nimport type {CooperativeGesturesHandler, GestureOptions} from './handler/cooperative_gestures';\nimport type {KeyboardHandler} from './handler/keyboard';\nimport type {DoubleClickZoomHandler} from './handler/shim/dblclick_zoom';\nimport type {TwoFingersTouchZoomRotateHandler} from './handler/shim/two_fingers_touch';\nimport type {TaskID} from '../util/task_queue';\nimport type {\n FilterSpecification,\n StyleSpecification,\n LightSpecification,\n SourceSpecification,\n TerrainSpecification,\n ProjectionSpecification,\n SkySpecification,\n} from '@maplibre/maplibre-gl-style-spec';\nimport type {CanvasSourceSpecification} from '../source/canvas_source';\nimport type {GeoJSONFeature, MapGeoJSONFeature} from '../util/vectortile_to_geojson';\nimport type {ControlPosition, IControl} from './control/control';\nimport type {QueryRenderedFeaturesOptions, QuerySourceFeatureOptions} from '../source/query_features';\nimport type {ITransform, TransformConstrainFunction} from '../geo/transform_interface';\nimport type {ICameraHelper} from '../geo/projection/camera_helper';\n\nconst version = packageJSON.version;\n\nexport type WebGLSupportedVersions = 'webgl2' | 'webgl' | undefined;\nexport type WebGLContextAttributesWithType = WebGLContextAttributes & {contextType?: WebGLSupportedVersions};\n\n/**\n * The {@link Map} options object.\n */\nexport type MapOptions = {\n /**\n * If `true`, the map's position (zoom, center latitude, center longitude, bearing, and pitch) will be synced with the hash fragment of the page's URL.\n * For example, `http://path/to/my/page.html#2.59/39.26/53.07/-24.1/60`.\n * An additional string may optionally be provided to indicate a parameter-styled hash,\n * e.g. http://path/to/my/page.html#map=2.59/39.26/53.07/-24.1/60&foo=bar, where foo\n * is a custom parameter and bar is an arbitrary hash distinct from the map hash.\n * @defaultValue false\n */\n hash?: boolean | string;\n /**\n * If `false`, no mouse, touch, or keyboard listeners will be attached to the map, so it will not respond to interaction.\n * @defaultValue true\n */\n interactive?: boolean;\n /**\n * The HTML element in which MapLibre GL JS will render the map, or the element's string `id`. The specified element must have no children.\n */\n container: HTMLElement | string;\n /**\n * The threshold, measured in degrees, that determines when the map's\n * bearing will snap to north. For example, with a `bearingSnap` of 7, if the user rotates\n * the map within 7 degrees of north, the map will automatically snap to exact north.\n * @defaultValue 7\n */\n bearingSnap?: number;\n /**\n * If set, an {@link AttributionControl} will be added to the map with the provided options.\n * To disable the attribution control, pass `false`.\n * !!! note\n * Showing the logo of MapLibre is not required for using MapLibre.\n * @defaultValue compact: true, customAttribution: \"MapLibre ...\".\n */\n attributionControl?: false | AttributionControlOptions;\n /**\n * If `true`, the MapLibre logo will be shown.\n */\n maplibreLogo?: boolean;\n /**\n * A string representing the position of the MapLibre wordmark on the map. Valid options are `top-left`,`top-right`, `bottom-left`, or `bottom-right`.\n * @defaultValue 'bottom-left'\n */\n logoPosition?: ControlPosition;\n /**\n * Set of WebGLContextAttributes that are applied to the WebGL context of the map.\n * See https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext for more details.\n * `contextType` can be set to `webgl2` or `webgl` to force a WebGL version. Not setting it, Maplibre will do it's best to get a suitable context.\n * @defaultValue antialias: false, powerPreference: 'high-performance', preserveDrawingBuffer: false, failIfMajorPerformanceCaveat: false, desynchronized: false, contextType: 'webgl2withfallback'\n */\n canvasContextAttributes?: WebGLContextAttributesWithType;\n /**\n * If `false`, the map won't attempt to re-request tiles once they expire per their HTTP `cacheControl`/`expires` headers.\n * @defaultValue true\n */\n refreshExpiredTiles?: boolean;\n /**\n * If set, the map will be constrained to the given bounds.\n */\n maxBounds?: LngLatBoundsLike;\n /**\n * If `true`, the \"scroll to zoom\" interaction is enabled. {@link AroundCenterOptions} are passed as options to {@link ScrollZoomHandler.enable}.\n * @defaultValue true\n */\n scrollZoom?: boolean | AroundCenterOptions;\n /**\n * The minimum zoom level of the map (0-24).\n * @defaultValue 0\n */\n minZoom?: number | null;\n /**\n * The maximum zoom level of the map (0-24).\n * @defaultValue 22\n */\n maxZoom?: number | null;\n /**\n * The minimum pitch of the map (0-180).\n * @defaultValue 0\n */\n minPitch?: number | null;\n /**\n * The maximum pitch of the map (0-180).\n * @defaultValue 60\n */\n maxPitch?: number | null;\n /**\n * If `true`, the \"box zoom\" interaction is enabled (see {@link BoxZoomHandler}).\n * @defaultValue true\n */\n boxZoom?: boolean;\n /**\n * If `true`, the \"drag to rotate\" interaction is enabled (see {@link DragRotateHandler}).\n * @defaultValue true\n */\n dragRotate?: boolean;\n /**\n * If `true`, the \"drag to pan\" interaction is enabled. An `Object` value is passed as options to {@link DragPanHandler.enable}.\n * @defaultValue true\n */\n dragPan?: boolean | DragPanOptions;\n /**\n * If `true`, keyboard shortcuts are enabled (see {@link KeyboardHandler}).\n * @defaultValue true\n */\n keyboard?: boolean;\n /**\n * If `true`, the \"double click to zoom\" interaction is enabled (see {@link DoubleClickZoomHandler}).\n * @defaultValue true\n */\n doubleClickZoom?: boolean;\n /**\n * If `true`, the \"pinch to rotate and zoom\" interaction is enabled. An `Object` value is passed as options to {@link TwoFingersTouchZoomRotateHandler.enable}.\n * @defaultValue true\n */\n touchZoomRotate?: boolean | AroundCenterOptions;\n /**\n * If `true`, the \"drag to pitch\" interaction is enabled. An `Object` value is passed as options to {@link TwoFingersTouchPitchHandler.enable}.\n * @defaultValue true\n */\n touchPitch?: boolean | AroundCenterOptions;\n /**\n * If `true` or set to an options object, the map is only accessible on desktop while holding Command/Ctrl and only accessible on mobile with two fingers. Interacting with the map using normal gestures will trigger an informational screen. With this option enabled, \"drag to pitch\" requires a three-finger gesture. Cooperative gestures are disabled when a map enters fullscreen using {@link FullscreenControl}.\n * @defaultValue false\n */\n cooperativeGestures?: GestureOptions;\n /**\n * If `true`, the map will automatically resize when the browser window resizes.\n * @defaultValue true\n */\n trackResize?: boolean;\n /**\n * The initial geographical centerpoint of the map. If `center` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `[0, 0]`\n * !!! note\n * MapLibre GL JS uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON.\n * @defaultValue [0, 0]\n */\n center?: LngLatLike;\n /**\n * The elevation of the initial geographical centerpoint of the map, in meters above sea level. If `elevation` is not specified in the constructor options, it will default to `0`.\n * @defaultValue 0\n */\n elevation?: number;\n /**\n * The initial zoom level of the map. If `zoom` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @defaultValue 0\n */\n zoom?: number;\n /**\n * The initial bearing (rotation) of the map, measured in degrees counter-clockwise from north. If `bearing` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @defaultValue 0\n */\n bearing?: number;\n /**\n * The initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-85). If `pitch` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`. Values greater than 60 degrees are experimental and may result in rendering issues. If you encounter any, please raise an issue with details in the MapLibre project.\n * @defaultValue 0\n */\n pitch?: number;\n /**\n * The initial roll angle of the map, measured in degrees counter-clockwise about the camera boresight. If `roll` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @defaultValue 0\n */\n roll?: number;\n /**\n * If `true`, multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude. If set to `false`:\n *\n * - When the map is zoomed out far enough that a single representation of the world does not fill the map's entire\n * container, there will be blank space beyond 180 and -180 degrees longitude.\n * - Features that cross 180 and -180 degrees longitude will be cut in two (with one portion on the right edge of the\n * map and the other on the left edge of the map) at every zoom level.\n * @defaultValue true\n */\n renderWorldCopies?: boolean;\n /**\n * The maximum number of tiles stored in the tile cache for a given source. If omitted, the cache will be dynamically sized based on the current viewport which can be set using `maxTileCacheZoomLevels` constructor options.\n * @defaultValue null\n */\n maxTileCacheSize?: number | null;\n /**\n * The maximum number of zoom levels for which to store tiles for a given source. Tile cache dynamic size is calculated by multiplying `maxTileCacheZoomLevels` with the approximate number of tiles in the viewport for a given source.\n * @defaultValue 5\n */\n maxTileCacheZoomLevels?: number;\n /**\n * A callback run before the Map makes a request for an external URL. The callback can be used to modify the url, set headers, or set the credentials property for cross-origin requests.\n * Expected to return an object with a `url` property and optionally `headers` and `credentials` properties.\n * @defaultValue null\n */\n transformRequest?: RequestTransformFunction | null;\n /**\n * A callback run before the map's camera is moved due to user input or animation. The callback can be used to modify the new center, zoom, pitch and bearing.\n * Expected to return an object containing center, zoom, pitch or bearing values to overwrite.\n * @defaultValue null\n */\n transformCameraUpdate?: CameraUpdateTransformFunction | null;\n /**\n * A callback that overrides how the map constrains the viewport's lnglat and zoom to respect the longitude and latitude bounds.\n * @see [Customize the map transform constrain](https://maplibre.org/maplibre-gl-js/docs/examples/customize-the-map-transform-constrain/)\n * Expected to return an object containing center and zoom.\n * @defaultValue null\n */\n transformConstrain?: TransformConstrainFunction | null;\n /**\n * A patch to apply to the default localization table for UI strings, e.g. control tooltips. The `locale` object maps namespaced UI string IDs to translated strings in the target language; see `src/ui/default_locale.js` for an example with all supported string IDs. The object may specify all UI strings (thereby adding support for a new translation) or only a subset of strings (thereby patching the default translation table).\n * For an example, see https://maplibre.org/maplibre-gl-js/docs/examples/locale-switching/\n * Alternatively, search the official plugins page for plugins related to localization.\n * @defaultValue null\n */\n locale?: Record;\n /**\n * Controls the duration of the fade-in/fade-out animation for label collisions after initial map load, in milliseconds. This setting affects all symbol layers. This setting does not affect the duration of runtime styling transitions or raster tile cross-fading.\n * @defaultValue 300\n */\n fadeDuration?: number;\n /**\n * If `true`, symbols from multiple sources can collide with each other during collision detection. If `false`, collision detection is run separately for the symbols in each source.\n * @defaultValue true\n */\n crossSourceCollisions?: boolean;\n /**\n * If `true`, Resource Timing API information will be collected for requests made by GeoJSON and Vector Tile web workers (this information is normally inaccessible from the main Javascript thread). Information will be returned in a `resourceTiming` property of relevant `data` events.\n * @defaultValue false\n */\n collectResourceTiming?: boolean;\n /**\n * The max number of pixels a user can shift the mouse pointer during a click for it to be considered a valid click (as opposed to a mouse drag).\n * @defaultValue 3\n */\n clickTolerance?: number;\n /**\n * The initial bounds of the map. If `bounds` is specified, it overrides `center` and `zoom` constructor options.\n */\n bounds?: LngLatBoundsLike;\n /**\n * A {@link FitBoundsOptions} options object to use _only_ when fitting the initial `bounds` provided above.\n */\n fitBoundsOptions?: FitBoundsOptions;\n /**\n * Defines a CSS\n * font-family for locally overriding generation of Chinese, Japanese, and Korean characters.\n * For these characters, font settings from the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold).\n * Set to `false`, to enable font settings from the map's style for these glyph ranges.\n * The purpose of this option is to avoid bandwidth-intensive glyph server requests.\n * @see [Use locally generated ideographs](https://maplibre.org/maplibre-gl-js/docs/examples/use-locally-generated-ideographs/)\n * @defaultValue 'sans-serif'\n */\n localIdeographFontFamily?: string | false;\n /**\n * The map's MapLibre style. This must be a JSON object conforming to\n * the schema described in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/),\n * or a URL to such JSON.\n * When the style is not specified, calling {@link Map.setStyle} is required to render the map.\n */\n style?: StyleSpecification | string;\n /**\n * If `false`, the map's pitch (tilt) control with \"drag to rotate\" interaction will be disabled.\n * @defaultValue true\n */\n pitchWithRotate?: boolean;\n /**\n * If `false`, the map's roll control with \"drag to rotate\" interaction will be disabled.\n * @defaultValue false\n */\n rollEnabled?: boolean;\n /**\n * If `true`, gesture inertia (such as panning) is disabled. If not provided, gesture inertia defaults to the user's device settings.\n * @defaultValue undefined\n */\n reduceMotion?: boolean | undefined;\n /**\n * The pixel ratio.\n * The canvas' `width` attribute will be `container.clientWidth * pixelRatio` and its `height` attribute will be `container.clientHeight * pixelRatio`. Defaults to `devicePixelRatio` if not specified.\n */\n pixelRatio?: number;\n /**\n * If false, style validation will be skipped. Useful in production environment.\n * @defaultValue true\n */\n validateStyle?: boolean;\n /**\n * The canvas' `width` and `height` max size. The values are passed as an array where the first element is max width and the second element is max height.\n * You shouldn't set this above WebGl `MAX_TEXTURE_SIZE`.\n * @defaultValue [4096, 4096].\n */\n maxCanvasSize?: [number, number];\n /**\n * Determines whether to cancel, or retain, tiles from the current viewport which are still loading but which belong to a farther (smaller) zoom level than the current one.\n * * If `true`, when zooming in, tiles which didn't manage to load for previous zoom levels will become canceled. This might save some computing resources for slower devices, but the map details might appear more abruptly at the end of the zoom.\n * * If `false`, when zooming in, the previous zoom level(s) tiles will progressively appear, giving a smoother map details experience. However, more tiles will be rendered in a short period of time.\n * @defaultValue true\n */\n cancelPendingTileRequestsWhileZooming?: boolean;\n /**\n * If true, the elevation of the center point will automatically be set to the terrain elevation\n * (or zero if terrain is not enabled). If false, the elevation of the center point will default\n * to sea level and will not automatically update. Defaults to true. Needs to be set to false to\n * keep the camera above ground when pitch \\> 90 degrees.\n */\n centerClampedToGround?: boolean;\n /**\n * Allows overzooming by splitting vector tiles after max zoom.\n * Defines the number of zoom level that will overscale from map's max zoom and below.\n * For example if the map's max zoom is 20 and this is set to 3, the zoom levels of 20, 19 and 18 will be overscaled \n * and the rest will be split.\n * When undefined, all zoom levels after source's max zoom will be overscaled.\n * This can help in reducing the size of the overscaling and improve performance in high zoom levels.\n * The drawback is that it changes rendering for polygon centered labels and changes the results of query rendered features.\n * @defaultValue undefined\n * @experimental\n */\n experimentalZoomLevelsToOverscale?: number;\n};\n\nexport type AddImageOptions = {\n\n};\n\n// This type is used inside map since all properties are assigned a default value.\nexport type CompleteMapOptions = Complete;\n\ntype DelegatedListener = {\n layers: string[];\n listener: Listener;\n delegates: {[E in keyof MapEventType]?: Delegate};\n};\n\ntype Delegate = (e: E) => void;\n\ntype LostContextStyle = {\n style: StyleSpecification | null;\n images: {[_: string]: StyleImage} | null;\n};\n\nconst defaultMinZoom = -2;\nconst defaultMaxZoom = 22;\n\n// the default values, but also the valid range\nconst defaultMinPitch = 0;\nconst defaultMaxPitch = 60;\n\n// use this variable to check maxPitch for validity\nconst maxPitchThreshold = 180;\n\nconst defaultOptions: Readonly> = {\n hash: false,\n interactive: true,\n bearingSnap: 7,\n attributionControl: defaultAttributionControlOptions,\n maplibreLogo: false,\n refreshExpiredTiles: true,\n\n canvasContextAttributes: {\n antialias: false,\n preserveDrawingBuffer: false,\n powerPreference: 'high-performance',\n failIfMajorPerformanceCaveat: false,\n desynchronized: false,\n contextType: undefined\n },\n\n scrollZoom: true,\n minZoom: defaultMinZoom,\n maxZoom: defaultMaxZoom,\n minPitch: defaultMinPitch,\n maxPitch: defaultMaxPitch,\n\n boxZoom: true,\n dragRotate: true,\n dragPan: true,\n keyboard: true,\n doubleClickZoom: true,\n touchZoomRotate: true,\n touchPitch: true,\n cooperativeGestures: false,\n\n trackResize: true,\n\n center: [0, 0],\n elevation: 0,\n zoom: 0,\n bearing: 0,\n pitch: 0,\n roll: 0,\n\n renderWorldCopies: true,\n maxTileCacheSize: null,\n maxTileCacheZoomLevels: config.MAX_TILE_CACHE_ZOOM_LEVELS,\n transformRequest: null,\n transformCameraUpdate: null,\n transformConstrain: null,\n fadeDuration: 300,\n crossSourceCollisions: true,\n clickTolerance: 3,\n localIdeographFontFamily: 'sans-serif',\n pitchWithRotate: true,\n rollEnabled: false,\n reduceMotion: undefined,\n validateStyle: true,\n /**Because GL MAX_TEXTURE_SIZE is usually at least 4096px. */\n maxCanvasSize: [4096, 4096],\n cancelPendingTileRequestsWhileZooming: true,\n centerClampedToGround: true,\n experimentalZoomLevelsToOverscale: undefined\n};\n\n/**\n * The `Map` object represents the map on your page. It exposes methods\n * and properties that enable you to programmatically change the map,\n * and fires events as users interact with it.\n *\n * You create a `Map` by specifying a `container` and other options, see {@link MapOptions} for the full list.\n * Then MapLibre GL JS initializes the map on the page and returns your `Map` object.\n *\n * @group Main\n *\n * @example\n * ```ts\n * let map = new Map({\n * container: 'map',\n * center: [-122.420679, 37.772537],\n * zoom: 13,\n * style: style_object,\n * hash: true,\n * transformRequest: (url, resourceType)=> {\n * if(resourceType === 'Source' && url.startsWith('http://myHost')) {\n * return {\n * url: url.replace('http', 'https'),\n * headers: { 'my-custom-header': true},\n * credentials: 'include' // Include cookies for cross-origin requests\n * }\n * }\n * }\n * });\n * ```\n * @see [Display a map](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-map/)\n */\nexport class Map extends Camera {\n style: Style;\n painter: Painter;\n handlers: HandlerManager;\n\n _container: HTMLElement;\n _canvasContainer: HTMLElement;\n _controlContainer: HTMLElement;\n _controlPositions: Partial>;\n _interactive: boolean;\n _showTileBoundaries: boolean;\n _showCollisionBoxes: boolean;\n _showPadding: boolean;\n _showOverdrawInspector: boolean;\n _repaint: boolean;\n _vertices: boolean;\n _canvas: HTMLCanvasElement;\n _maxTileCacheSize: number | null;\n _maxTileCacheZoomLevels: number;\n _frameRequest: AbortController;\n _styleDirty: boolean;\n _sourcesDirty: boolean;\n _placementDirty: boolean;\n\n _loaded: boolean;\n _idleTriggered = false;\n // accounts for placement finishing as well\n _fullyLoaded: boolean;\n _trackResize: boolean;\n _resizeObserver: ResizeObserver;\n _canvasContextAttributes: WebGLContextAttributesWithType;\n _refreshExpiredTiles: boolean;\n _hash: Hash;\n _delegatedListeners: Record;\n _fadeDuration: number;\n _crossSourceCollisions: boolean;\n _crossFadingFactor = 1;\n _collectResourceTiming: boolean;\n _renderTaskQueue = new TaskQueue();\n _controls: Array = [];\n _mapId = uniqueId();\n _localIdeographFontFamily: string | false;\n _validateStyle: boolean;\n _requestManager: RequestManager;\n _locale: Record;\n _removed: boolean;\n _clickTolerance: number;\n _overridePixelRatio: number | null | undefined;\n _maxCanvasSize: [number, number];\n _terrainDataCallback: (e: MapStyleDataEvent | MapSourceDataEvent) => void;\n /** @internal */\n _zoomLevelsToOverscale: number | undefined;\n /**\n * @internal\n * image queue throttling handle. To be used later when clean up\n */\n _imageQueueHandle: number;\n\n /**\n * @internal\n * Used to store the previous style and images when a context loss occurs, so they can be restored.\n */\n _lostContextStyle: LostContextStyle = {\n style: null,\n images: null\n };\n\n /**\n * The map's {@link ScrollZoomHandler}, which implements zooming in and out with a scroll wheel or trackpad.\n * Find more details and examples using `scrollZoom` in the {@link ScrollZoomHandler} section.\n */\n scrollZoom: ScrollZoomHandler;\n\n /**\n * The map's {@link BoxZoomHandler}, which implements zooming using a drag gesture with the Shift key pressed.\n * Find more details and examples using `boxZoom` in the {@link BoxZoomHandler} section.\n */\n boxZoom: BoxZoomHandler;\n\n /**\n * The map's {@link DragRotateHandler}, which implements rotating the map while dragging with the right\n * mouse button or with the Control key pressed. Find more details and examples using `dragRotate`\n * in the {@link DragRotateHandler} section.\n */\n dragRotate: DragRotateHandler;\n\n /**\n * The map's {@link DragPanHandler}, which implements dragging the map with a mouse or touch gesture.\n * Find more details and examples using `dragPan` in the {@link DragPanHandler} section.\n */\n dragPan: DragPanHandler;\n\n /**\n * The map's {@link KeyboardHandler}, which allows the user to zoom, rotate, and pan the map using keyboard\n * shortcuts. Find more details and examples using `keyboard` in the {@link KeyboardHandler} section.\n */\n keyboard: KeyboardHandler;\n\n /**\n * The map's {@link DoubleClickZoomHandler}, which allows the user to zoom by double clicking.\n * Find more details and examples using `doubleClickZoom` in the {@link DoubleClickZoomHandler} section.\n */\n doubleClickZoom: DoubleClickZoomHandler;\n\n /**\n * The map's {@link TwoFingersTouchZoomRotateHandler}, which allows the user to zoom or rotate the map with touch gestures.\n * Find more details and examples using `touchZoomRotate` in the {@link TwoFingersTouchZoomRotateHandler} section.\n */\n touchZoomRotate: TwoFingersTouchZoomRotateHandler;\n\n /**\n * The map's {@link TwoFingersTouchPitchHandler}, which allows the user to pitch the map with touch gestures.\n * Find more details and examples using `touchPitch` in the {@link TwoFingersTouchPitchHandler} section.\n */\n touchPitch: TwoFingersTouchPitchHandler;\n\n /**\n * The map's {@link CooperativeGesturesHandler}, which allows the user to see cooperative gesture info when user tries to zoom in/out.\n * Find more details and examples using `cooperativeGestures` in the {@link CooperativeGesturesHandler} section.\n */\n cooperativeGestures: CooperativeGesturesHandler;\n\n /**\n * The map's property which determines whether to cancel, or retain, tiles from the current viewport which are still loading but which belong to a farther (smaller) zoom level than the current one.\n * * If `true`, when zooming in, tiles which didn't manage to load for previous zoom levels will become canceled. This might save some computing resources for slower devices, but the map details might appear more abruptly at the end of the zoom.\n * * If `false`, when zooming in, the previous zoom level(s) tiles will progressively appear, giving a smoother map details experience. However, more tiles will be rendered in a short period of time.\n * @defaultValue true\n */\n cancelPendingTileRequestsWhileZooming: boolean;\n\n /**\n * The map transform's callback that overrides the default constrain function.\n * @defaultValue null\n */\n transformConstrain: TransformConstrainFunction | null;\n\n constructor(options: MapOptions) {\n PerformanceUtils.mark(PerformanceMarkers.create);\n\n const resolvedOptions = {...defaultOptions, ...options, canvasContextAttributes: {\n ...defaultOptions.canvasContextAttributes,\n ...options.canvasContextAttributes\n }} as CompleteMapOptions;\n\n if (resolvedOptions.minZoom != null && resolvedOptions.maxZoom != null && resolvedOptions.minZoom > resolvedOptions.maxZoom) {\n throw new Error('maxZoom must be greater than or equal to minZoom');\n }\n\n if (resolvedOptions.minPitch != null && resolvedOptions.maxPitch != null && resolvedOptions.minPitch > resolvedOptions.maxPitch) {\n throw new Error('maxPitch must be greater than or equal to minPitch');\n }\n\n if (resolvedOptions.minPitch != null && resolvedOptions.minPitch < defaultMinPitch) {\n throw new Error(`minPitch must be greater than or equal to ${defaultMinPitch}`);\n }\n\n if (resolvedOptions.maxPitch != null && resolvedOptions.maxPitch > maxPitchThreshold) {\n throw new Error(`maxPitch must be less than or equal to ${maxPitchThreshold}`);\n }\n\n // For now we will use a temporary MercatorTransform instance.\n // Transform specialization will later be set by style when it creates its projection instance.\n // When this happens, the new transform will inherit all properties of this temporary transform.\n const transform = new MercatorTransform();\n const cameraHelper = new MercatorCameraHelper();\n if (resolvedOptions.minZoom !== undefined) {\n transform.setMinZoom(resolvedOptions.minZoom);\n }\n if (resolvedOptions.maxZoom !== undefined) {\n transform.setMaxZoom(resolvedOptions.maxZoom);\n }\n if (resolvedOptions.minPitch !== undefined) {\n transform.setMinPitch(resolvedOptions.minPitch);\n }\n if (resolvedOptions.maxPitch !== undefined) {\n transform.setMaxPitch(resolvedOptions.maxPitch);\n }\n if (resolvedOptions.renderWorldCopies !== undefined) {\n transform.setRenderWorldCopies(resolvedOptions.renderWorldCopies);\n }\n if (resolvedOptions.transformConstrain !== null) {\n transform.setConstrainOverride(resolvedOptions.transformConstrain);\n }\n\n super(transform, cameraHelper, {bearingSnap: resolvedOptions.bearingSnap});\n\n this._interactive = resolvedOptions.interactive;\n this._maxTileCacheSize = resolvedOptions.maxTileCacheSize;\n this._maxTileCacheZoomLevels = resolvedOptions.maxTileCacheZoomLevels;\n this._canvasContextAttributes = {...resolvedOptions.canvasContextAttributes};\n this._trackResize = resolvedOptions.trackResize === true;\n this._bearingSnap = resolvedOptions.bearingSnap;\n this._centerClampedToGround = resolvedOptions.centerClampedToGround;\n this._refreshExpiredTiles = resolvedOptions.refreshExpiredTiles === true;\n this._fadeDuration = resolvedOptions.fadeDuration;\n this._crossSourceCollisions = resolvedOptions.crossSourceCollisions === true;\n this._collectResourceTiming = resolvedOptions.collectResourceTiming === true;\n this._locale = {...defaultLocale, ...resolvedOptions.locale};\n this._clickTolerance = resolvedOptions.clickTolerance;\n this._overridePixelRatio = resolvedOptions.pixelRatio;\n this._maxCanvasSize = resolvedOptions.maxCanvasSize;\n this._zoomLevelsToOverscale = resolvedOptions.experimentalZoomLevelsToOverscale;\n this.transformCameraUpdate = resolvedOptions.transformCameraUpdate;\n this.transformConstrain = resolvedOptions.transformConstrain;\n this.cancelPendingTileRequestsWhileZooming = resolvedOptions.cancelPendingTileRequestsWhileZooming === true;\n\n if (resolvedOptions.reduceMotion !== undefined) {\n browser.prefersReducedMotion = resolvedOptions.reduceMotion;\n }\n\n this._imageQueueHandle = ImageRequest.addThrottleControl(() => this.isMoving());\n\n this._requestManager = new RequestManager(resolvedOptions.transformRequest);\n\n if (typeof resolvedOptions.container === 'string') {\n this._container = document.getElementById(resolvedOptions.container);\n if (!this._container) {\n throw new Error(`Container '${resolvedOptions.container}' not found.`);\n }\n } else if (resolvedOptions.container instanceof HTMLElement) {\n this._container = resolvedOptions.container;\n } else {\n throw new Error('Invalid type: \\'container\\' must be a String or HTMLElement.');\n }\n\n if (resolvedOptions.maxBounds) {\n this.setMaxBounds(resolvedOptions.maxBounds);\n }\n\n this._setupContainer();\n this._setupPainter();\n\n this.on('move', () => this._update(false));\n this.on('moveend', () => this._update(false));\n this.on('zoom', () => this._update(true));\n this.on('terrain', () => {\n this.painter.terrainFacilitator.dirty = true;\n this._update(true);\n });\n this.once('idle', () => { this._idleTriggered = true; });\n\n if (typeof window !== 'undefined') {\n addEventListener('online', this._onWindowOnline, false);\n let initialResizeEventCaptured = false;\n const throttledResizeCallback = throttle((entries: ResizeObserverEntry[]) => {\n if (this._trackResize && !this._removed) {\n this.resize(entries);\n this.redraw();\n }\n }, 50);\n this._resizeObserver = new ResizeObserver((entries) => {\n if (!initialResizeEventCaptured) {\n initialResizeEventCaptured = true;\n return;\n }\n throttledResizeCallback(entries);\n });\n this._resizeObserver.observe(this._container);\n }\n\n this.handlers = new HandlerManager(this, resolvedOptions);\n\n const hashName = (typeof resolvedOptions.hash === 'string' && resolvedOptions.hash) || undefined;\n this._hash = resolvedOptions.hash && (new Hash(hashName)).addTo(this);\n // don't set position from options if set through hash\n if (!this._hash || !this._hash._onHashChange()) {\n this.jumpTo({\n center: resolvedOptions.center,\n elevation: resolvedOptions.elevation,\n zoom: resolvedOptions.zoom,\n bearing: resolvedOptions.bearing,\n pitch: resolvedOptions.pitch,\n roll: resolvedOptions.roll\n });\n\n if (resolvedOptions.bounds) {\n this.resize();\n this.fitBounds(resolvedOptions.bounds, extend({}, resolvedOptions.fitBoundsOptions, {duration: 0}));\n }\n }\n\n // When no style is set or it's using something other than the globe projection, we can constrain the camera.\n // When a style is set with other projections though, we can't constrain the camera until the style is loaded\n // and the correct transform is used. Otherwise, valid points in the desired projection could be rejected\n const shouldConstrainUsingMercatorTransform = typeof resolvedOptions.style === 'string' || !(resolvedOptions.style?.projection?.type === 'globe');\n this.resize(null, shouldConstrainUsingMercatorTransform);\n\n this._localIdeographFontFamily = resolvedOptions.localIdeographFontFamily;\n this._validateStyle = resolvedOptions.validateStyle;\n\n if (resolvedOptions.style) this.setStyle(resolvedOptions.style, {localIdeographFontFamily: resolvedOptions.localIdeographFontFamily});\n\n if (resolvedOptions.attributionControl)\n this.addControl(new AttributionControl(typeof resolvedOptions.attributionControl === 'boolean' ? undefined : resolvedOptions.attributionControl));\n\n if (resolvedOptions.maplibreLogo)\n this.addControl(new LogoControl(), resolvedOptions.logoPosition);\n\n this.on('style.load', () => {\n // If we didn't constrain the camera before, we do it now\n if (!shouldConstrainUsingMercatorTransform) this._resizeTransform();\n if (this.transform.unmodified) {\n const coercedOptions = pick(this.style.stylesheet, ['center', 'zoom', 'bearing', 'pitch', 'roll']) as CameraOptions;\n this.jumpTo(coercedOptions);\n }\n });\n this.on('data', (event: MapDataEvent) => {\n this._update(event.dataType === 'style');\n this.fire(new Event(`${event.dataType}data`, event));\n });\n this.on('dataloading', (event: MapDataEvent) => {\n this.fire(new Event(`${event.dataType}dataloading`, event));\n });\n this.on('dataabort', (event: MapDataEvent) => {\n this.fire(new Event('sourcedataabort', event));\n });\n }\n\n /**\n * @internal\n * Returns a unique number for this map instance which is used for the MapLoadEvent\n * to make sure we only fire one event per instantiated map object.\n * @returns the uniq map ID\n */\n _getMapId() {\n return this._mapId;\n }\n\n /**\n * Sets a global state property that can be retrieved with the [`global-state` expression](https://maplibre.org/maplibre-style-spec/expressions/#global-state).\n * If the value is null, it resets the property to its default value defined in the [`state` style property](https://maplibre.org/maplibre-style-spec/root/#state).\n *\n * @param propertyName - The name of the state property to set.\n * @param value - The value of the state property to set.\n */\n setGlobalStateProperty(propertyName: string, value: any) {\n this.style.setGlobalStateProperty(propertyName, value);\n return this._update(true);\n }\n\n /**\n * Returns the global map state\n *\n * @returns The map state object.\n */\n getGlobalState(): Record {\n return this.style.getGlobalState();\n }\n\n /**\n * Adds an {@link IControl} to the map, calling `control.onAdd(this)`.\n *\n * An {@link ErrorEvent} will be fired if the image parameter is invalid.\n *\n * @param control - The {@link IControl} to add.\n * @param position - position on the map to which the control will be added.\n * Valid values are `'top-left'`, `'top-right'`, `'bottom-left'`, and `'bottom-right'`. Defaults to `'top-right'`.\n * @example\n * Add zoom and rotation controls to the map.\n * ```ts\n * map.addControl(new NavigationControl());\n * ```\n * @see [Display map navigation controls](https://maplibre.org/maplibre-gl-js/docs/examples/display-map-navigation-controls/)\n */\n addControl(control: IControl, position?: ControlPosition): Map {\n if (position === undefined) {\n if (control.getDefaultPosition) {\n position = control.getDefaultPosition();\n } else {\n position = 'top-right';\n }\n }\n if (!control || !control.onAdd) {\n return this.fire(new ErrorEvent(new Error(\n 'Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.')));\n }\n const controlElement = control.onAdd(this);\n this._controls.push(control);\n\n const positionContainer = this._controlPositions[position];\n if (position.indexOf('bottom') !== -1) {\n positionContainer.insertBefore(controlElement, positionContainer.firstChild);\n } else {\n positionContainer.appendChild(controlElement);\n }\n return this;\n }\n\n /**\n * Removes the control from the map.\n *\n * An {@link ErrorEvent} will be fired if the image parameter is invalid.\n *\n * @param control - The {@link IControl} to remove.\n * @example\n * ```ts\n * // Define a new navigation control.\n * let navigation = new NavigationControl();\n * // Add zoom and rotation controls to the map.\n * map.addControl(navigation);\n * // Remove zoom and rotation controls from the map.\n * map.removeControl(navigation);\n * ```\n */\n removeControl(control: IControl): Map {\n if (!control || !control.onRemove) {\n return this.fire(new ErrorEvent(new Error(\n 'Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.')));\n }\n const ci = this._controls.indexOf(control);\n if (ci > -1) this._controls.splice(ci, 1);\n control.onRemove(this);\n return this;\n }\n\n /**\n * Checks if a control exists on the map.\n *\n * @param control - The {@link IControl} to check.\n * @returns true if map contains control.\n * @example\n * ```ts\n * // Define a new navigation control.\n * let navigation = new NavigationControl();\n * // Add zoom and rotation controls to the map.\n * map.addControl(navigation);\n * // Check that the navigation control exists on the map.\n * map.hasControl(navigation);\n * ```\n */\n hasControl(control: IControl): boolean {\n return this._controls.indexOf(control) > -1;\n }\n\n /**\n * Returns an array of `OverscaledTileID` objects that cover the current viewport for a given tile size.\n * This method is useful for determining which tiles are visible in the current viewport.\n *\n * @param options - Options for calculating the covering tiles.\n * @returns An array of `OverscaledTileID` objects.\n * @example\n * ```ts\n * // Get the tiles to cover the view for a 512x512px tile source\n * const tiles = map.coveringTiles({tileSize: 512});\n * ```\n */\n coveringTiles(options: CoveringTilesOptions): OverscaledTileID[] {\n return coveringTiles(this.transform, options);\n }\n\n calculateCameraOptionsFromTo(from: LngLat, altitudeFrom: number, to: LngLat, altitudeTo?: number): CameraOptions {\n if (altitudeTo == null && this.terrain) {\n altitudeTo = this.terrain.getElevationForLngLat(to, this.transform);\n }\n return super.calculateCameraOptionsFromTo(from, altitudeFrom, to, altitudeTo);\n }\n\n /**\n * Resizes the map according to the dimensions of its\n * `container` element.\n *\n * Checks if the map container size changed and updates the map if it has changed.\n * This method must be called after the map's `container` is resized programmatically\n * or when the map is shown after being initially hidden with CSS.\n *\n * Triggers the following events: `movestart`, `move`, `moveend`, and `resize`.\n *\n * @param eventData - Additional properties to be passed to `movestart`, `move`, `resize`, and `moveend`\n * events that get triggered as a result of resize. This can be useful for differentiating the\n * source of an event (for example, user-initiated or programmatically-triggered events).\n * @example\n * Resize the map when the map container is shown after being initially hidden with CSS.\n * ```ts\n * let mapDiv = document.getElementById('map');\n * if (mapDiv.style.visibility === true) map.resize();\n * ```\n */\n resize(eventData?: any, constrainTransform = true): Map {\n const [width, height] = this._containerDimensions();\n\n const clampedPixelRatio = this._getClampedPixelRatio(width, height);\n this._resizeCanvas(width, height, clampedPixelRatio);\n this.painter.resize(width, height, clampedPixelRatio);\n\n // check if we've reached GL limits, in that case further clamps pixelRatio\n if (this.painter.overLimit()) {\n const gl = this.painter.context.gl;\n // store updated _maxCanvasSize value\n this._maxCanvasSize = [gl.drawingBufferWidth, gl.drawingBufferHeight];\n const clampedPixelRatio = this._getClampedPixelRatio(width, height);\n this._resizeCanvas(width, height, clampedPixelRatio);\n this.painter.resize(width, height, clampedPixelRatio);\n }\n\n this._resizeTransform(constrainTransform);\n\n const fireMoving = !this._moving;\n if (fireMoving) {\n this.stop();\n this.fire(new Event('movestart', eventData))\n .fire(new Event('move', eventData));\n }\n\n this.fire(new Event('resize', eventData));\n\n if (fireMoving) this.fire(new Event('moveend', eventData));\n\n return this;\n }\n\n _resizeTransform(constrainTransform = true) {\n const [width, height] = this._containerDimensions();\n\n this.transform.resize(width, height, constrainTransform);\n this._requestedCameraState?.resize(width, height, constrainTransform);\n }\n\n /**\n * @internal\n * Return the map's pixel ratio eventually scaled down to respect maxCanvasSize.\n * Internally you should use this and not getPixelRatio().\n */\n _getClampedPixelRatio(width: number, height: number): number {\n const {0: maxCanvasWidth, 1: maxCanvasHeight} = this._maxCanvasSize;\n const pixelRatio = this.getPixelRatio();\n\n const canvasWidth = width * pixelRatio;\n const canvasHeight = height * pixelRatio;\n\n const widthScaleFactor = canvasWidth > maxCanvasWidth ? (maxCanvasWidth / canvasWidth) : 1;\n const heightScaleFactor = canvasHeight > maxCanvasHeight ? (maxCanvasHeight / canvasHeight) : 1;\n\n return Math.min(widthScaleFactor, heightScaleFactor) * pixelRatio;\n }\n\n /**\n * Returns the map's pixel ratio.\n * Note that the pixel ratio actually applied may be lower to respect maxCanvasSize.\n * @returns The pixel ratio.\n */\n getPixelRatio(): number {\n return this._overridePixelRatio ?? devicePixelRatio;\n }\n\n /**\n * Sets the map's pixel ratio. This allows to override `devicePixelRatio`.\n * After this call, the canvas' `width` attribute will be `container.clientWidth * pixelRatio`\n * and its height attribute will be `container.clientHeight * pixelRatio`.\n * Set this to null to disable `devicePixelRatio` override.\n * Note that the pixel ratio actually applied may be lower to respect maxCanvasSize.\n * @param pixelRatio - The pixel ratio.\n */\n setPixelRatio(pixelRatio: number) {\n this._overridePixelRatio = pixelRatio;\n this.resize();\n }\n\n /**\n * Returns the map's geographical bounds. When the bearing or pitch is non-zero, the visible region is not\n * an axis-aligned rectangle, and the result is the smallest bounds that encompasses the visible region.\n * @returns The geographical bounds of the map as {@link LngLatBounds}.\n * @example\n * ```ts\n * let bounds = map.getBounds();\n * ```\n */\n getBounds(): LngLatBounds {\n return this.transform.getBounds();\n }\n\n /**\n * Returns the maximum geographical bounds the map is constrained to, or `null` if none set.\n * @returns The map object.\n * @example\n * ```ts\n * let maxBounds = map.getMaxBounds();\n * ```\n */\n getMaxBounds(): LngLatBounds | null {\n return this.transform.getMaxBounds();\n }\n\n /**\n * Sets or clears the map's geographical bounds.\n *\n * Pan and zoom operations are constrained within these bounds.\n * If a pan or zoom is performed that would\n * display regions outside these bounds, the map will\n * instead display a position and zoom level\n * as close as possible to the operation's request while still\n * remaining within the bounds.\n *\n * @param bounds - The maximum bounds to set. If `null` or `undefined` is provided, the function removes the map's maximum bounds.\n * @example\n * Define bounds that conform to the `LngLatBoundsLike` object as set the max bounds.\n * ```ts\n * let bounds = [\n * [-74.04728, 40.68392], // [west, south]\n * [-73.91058, 40.87764] // [east, north]\n * ];\n * map.setMaxBounds(bounds);\n * ```\n */\n setMaxBounds(bounds?: LngLatBoundsLike | null): Map {\n this.transform.setMaxBounds(LngLatBounds.convert(bounds));\n return this._update();\n }\n\n /**\n * Sets or clears the map's minimum zoom level.\n * If the map's current zoom level is lower than the new minimum,\n * the map will zoom to the new minimum.\n *\n * It is not always possible to zoom out and reach the set `minZoom`.\n * Other factors such as map height may restrict zooming. For example,\n * if the map is 512px tall it will not be possible to zoom below zoom 0\n * no matter what the `minZoom` is set to.\n *\n * A {@link ErrorEvent} event will be fired if minZoom is out of bounds.\n *\n * @param minZoom - The minimum zoom level to set (-2 - 24).\n * If `null` or `undefined` is provided, the function removes the current minimum zoom (i.e. sets it to -2).\n * @example\n * ```ts\n * map.setMinZoom(12.25);\n * ```\n */\n setMinZoom(minZoom?: number | null): Map {\n\n minZoom = minZoom === null || minZoom === undefined ? defaultMinZoom : minZoom;\n\n if (minZoom >= defaultMinZoom && minZoom <= this.transform.maxZoom) {\n const tr = this._getTransformForUpdate();\n tr.setMinZoom(minZoom);\n this._applyUpdatedTransform(tr);\n this._update();\n\n return this;\n\n } else throw new Error(`minZoom must be between ${defaultMinZoom} and the current maxZoom, inclusive`);\n }\n\n /**\n * Returns the map's minimum allowable zoom level.\n *\n * @returns minZoom\n * @example\n * ```ts\n * let minZoom = map.getMinZoom();\n * ```\n */\n getMinZoom(): number { return this.transform.minZoom; }\n\n /**\n * Sets or clears the map's maximum zoom level.\n * If the map's current zoom level is higher than the new maximum,\n * the map will zoom to the new maximum.\n *\n * A {@link ErrorEvent} event will be fired if minZoom is out of bounds.\n *\n * @param maxZoom - The maximum zoom level to set.\n * If `null` or `undefined` is provided, the function removes the current maximum zoom (sets it to 22).\n * @example\n * ```ts\n * map.setMaxZoom(18.75);\n * ```\n */\n setMaxZoom(maxZoom?: number | null): Map {\n\n maxZoom = maxZoom === null || maxZoom === undefined ? defaultMaxZoom : maxZoom;\n\n if (maxZoom >= this.transform.minZoom) {\n const tr = this._getTransformForUpdate();\n tr.setMaxZoom(maxZoom);\n this._applyUpdatedTransform(tr);\n this._update();\n\n return this;\n\n } else throw new Error('maxZoom must be greater than the current minZoom');\n }\n\n /**\n * Returns the map's maximum allowable zoom level.\n *\n * @returns The maxZoom\n * @example\n * ```ts\n * let maxZoom = map.getMaxZoom();\n * ```\n */\n getMaxZoom(): number { return this.transform.maxZoom; }\n\n /**\n * Sets or clears the map's minimum pitch.\n * If the map's current pitch is lower than the new minimum,\n * the map will pitch to the new minimum.\n *\n * A {@link ErrorEvent} event will be fired if minPitch is out of bounds.\n *\n * @param minPitch - The minimum pitch to set (0-180). Values greater than 60 degrees are experimental and may result in rendering issues. If you encounter any, please raise an issue with details in the MapLibre project.\n * If `null` or `undefined` is provided, the function removes the current minimum pitch (i.e. sets it to 0).\n */\n setMinPitch(minPitch?: number | null): Map {\n\n minPitch = minPitch === null || minPitch === undefined ? defaultMinPitch : minPitch;\n\n if (minPitch < defaultMinPitch) {\n throw new Error(`minPitch must be greater than or equal to ${defaultMinPitch}`);\n }\n\n if (minPitch >= defaultMinPitch && minPitch <= this.transform.maxPitch) {\n this.transform.setMinPitch(minPitch);\n this._update();\n\n if (this.getPitch() < minPitch) this.setPitch(minPitch);\n\n return this;\n\n } else throw new Error(`minPitch must be between ${defaultMinPitch} and the current maxPitch, inclusive`);\n }\n\n /**\n * Returns the map's minimum allowable pitch.\n *\n * @returns The minPitch\n */\n getMinPitch(): number { return this.transform.minPitch; }\n\n /**\n * Sets or clears the map's maximum pitch.\n * If the map's current pitch is higher than the new maximum,\n * the map will pitch to the new maximum.\n *\n * A {@link ErrorEvent} event will be fired if maxPitch is out of bounds.\n *\n * @param maxPitch - The maximum pitch to set (0-180). Values greater than 60 degrees are experimental and may result in rendering issues. If you encounter any, please raise an issue with details in the MapLibre project.\n * If `null` or `undefined` is provided, the function removes the current maximum pitch (sets it to 60).\n */\n setMaxPitch(maxPitch?: number | null): Map {\n\n maxPitch = maxPitch === null || maxPitch === undefined ? defaultMaxPitch : maxPitch;\n\n if (maxPitch > maxPitchThreshold) {\n throw new Error(`maxPitch must be less than or equal to ${maxPitchThreshold}`);\n }\n\n if (maxPitch >= this.transform.minPitch) {\n this.transform.setMaxPitch(maxPitch);\n this._update();\n\n if (this.getPitch() > maxPitch) this.setPitch(maxPitch);\n\n return this;\n\n } else throw new Error('maxPitch must be greater than the current minPitch');\n }\n\n /**\n * Returns the map's maximum allowable pitch.\n *\n * @returns The maxPitch\n */\n getMaxPitch(): number { return this.transform.maxPitch; }\n\n /**\n * Returns the state of `renderWorldCopies`. If `true`, multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude. If set to `false`:\n *\n * - When the map is zoomed out far enough that a single representation of the world does not fill the map's entire\n * container, there will be blank space beyond 180 and -180 degrees longitude.\n * - Features that cross 180 and -180 degrees longitude will be cut in two (with one portion on the right edge of the\n * map and the other on the left edge of the map) at every zoom level.\n * @returns The renderWorldCopies\n * @example\n * ```ts\n * let worldCopiesRendered = map.getRenderWorldCopies();\n * ```\n * @see [Render world copies](https://maplibre.org/maplibre-gl-js/docs/examples/render-world-copies/)\n */\n getRenderWorldCopies(): boolean { return this.transform.renderWorldCopies; }\n\n /**\n * Sets the state of `renderWorldCopies`.\n *\n * @param renderWorldCopies - If `true`, multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude. If set to `false`:\n *\n * - When the map is zoomed out far enough that a single representation of the world does not fill the map's entire\n * container, there will be blank space beyond 180 and -180 degrees longitude.\n * - Features that cross 180 and -180 degrees longitude will be cut in two (with one portion on the right edge of the\n * map and the other on the left edge of the map) at every zoom level.\n *\n * `undefined` is treated as `true`, `null` is treated as `false`.\n * @example\n * ```ts\n * map.setRenderWorldCopies(true);\n * ```\n * @see [Render world copies](https://maplibre.org/maplibre-gl-js/docs/examples/render-world-copies/)\n */\n setRenderWorldCopies(renderWorldCopies?: boolean | null): Map {\n this.transform.setRenderWorldCopies(renderWorldCopies);\n return this._update();\n }\n\n /** Sets or clears the callback overriding how the map constrains the viewport's lnglat and zoom to respect the longitude and latitude bounds.\n *\n * @param constrain - A {@link TransformConstrainFunction} callback defining how the viewport should respect the bounds.\n *\n * `null` clears the callback and reverts the constrain to the map transform's default constrain function.\n * @example\n * ```ts\n * function customTransformConstrain(lngLat, zoom) {\n * return {center: lngLat, zoom: zoom ?? 0};\n * };\n * map.setTransformConstrain(customTransformConstrain);\n * ```\n * @see [Customize the map transform constrain](https://maplibre.org/maplibre-gl-js/docs/examples/customize-the-map-transform-constrain/)\n */\n setTransformConstrain(constrain?: TransformConstrainFunction | null): Map {\n this.transform.setConstrainOverride(constrain);\n return this._update();\n }\n\n /**\n * Returns a [Point](https://github.com/mapbox/point-geometry) representing pixel coordinates, relative to the map's `container`,\n * that correspond to the specified geographical location.\n *\n * @param lnglat - The geographical location to project.\n * @returns The [Point](https://github.com/mapbox/point-geometry) corresponding to `lnglat`, relative to the map's `container`.\n * @example\n * ```ts\n * let coordinate = [-122.420679, 37.772537];\n * let point = map.project(coordinate);\n * ```\n */\n project(lnglat: LngLatLike): Point {\n return this.transform.locationToScreenPoint(LngLat.convert(lnglat), this.style && this.terrain);\n }\n\n /**\n * Returns a {@link LngLat} representing geographical coordinates that correspond\n * to the specified pixel coordinates.\n *\n * @param point - The pixel coordinates to unproject.\n * @returns The {@link LngLat} corresponding to `point`.\n * @example\n * ```ts\n * map.on('click', (e) => {\n * // When the map is clicked, get the geographic coordinate.\n * let coordinate = map.unproject(e.point);\n * });\n * ```\n */\n unproject(point: PointLike): LngLat {\n return this.transform.screenPointToLocation(Point.convert(point), this.terrain);\n }\n\n /**\n * Returns true if the map is panning, zooming, rotating, or pitching due to a camera animation or user gesture.\n * @returns true if the map is moving.\n * @example\n * ```ts\n * let isMoving = map.isMoving();\n * ```\n */\n isMoving(): boolean {\n return this._moving || this.handlers?.isMoving();\n }\n\n /**\n * Returns true if the map is zooming due to a camera animation or user gesture.\n * @returns true if the map is zooming.\n * @example\n * ```ts\n * let isZooming = map.isZooming();\n * ```\n */\n isZooming(): boolean {\n return this._zooming || this.handlers?.isZooming();\n }\n\n /**\n * Returns true if the map is rotating due to a camera animation or user gesture.\n * @returns true if the map is rotating.\n * @example\n * ```ts\n * map.isRotating();\n * ```\n */\n isRotating(): boolean {\n return this._rotating || this.handlers?.isRotating();\n }\n\n _createDelegatedListener(type: keyof MapEventType | string, layerIds: string[], listener: Listener): DelegatedListener {\n if (type === 'mouseenter' || type === 'mouseover') {\n let mousein = false;\n const mousemove = (e) => {\n const existingLayers = layerIds.filter((layerId) => this.getLayer(layerId));\n const features = existingLayers.length !== 0 ? this.queryRenderedFeatures(e.point, {layers: existingLayers}) : [];\n if (!features.length) {\n mousein = false;\n } else if (!mousein) {\n mousein = true;\n listener.call(this, new MapMouseEvent(type, this, e.originalEvent, {features}));\n }\n };\n const mouseout = () => {\n mousein = false;\n };\n return {layers: layerIds, listener, delegates: {mousemove, mouseout}};\n } else if (type === 'mouseleave' || type === 'mouseout') {\n let mousein = false;\n const mousemove = (e) => {\n const existingLayers = layerIds.filter((layerId) => this.getLayer(layerId));\n const features = existingLayers.length !== 0 ? this.queryRenderedFeatures(e.point, {layers: existingLayers}) : [];\n if (features.length) {\n mousein = true;\n } else if (mousein) {\n mousein = false;\n listener.call(this, new MapMouseEvent(type, this, e.originalEvent));\n }\n };\n const mouseout = (e) => {\n if (mousein) {\n mousein = false;\n listener.call(this, new MapMouseEvent(type, this, e.originalEvent));\n }\n };\n return {layers: layerIds, listener, delegates: {mousemove, mouseout}};\n } else {\n const delegate = (e) => {\n const existingLayers = layerIds.filter((layerId) => this.getLayer(layerId));\n const features = existingLayers.length !== 0 ? this.queryRenderedFeatures(e.point, {layers: existingLayers}) : [];\n if (features.length) {\n // Here we need to mutate the original event, so that preventDefault works as expected.\n e.features = features;\n listener.call(this, e);\n delete e.features;\n }\n };\n return {layers: layerIds, listener, delegates: {[type]: delegate}};\n }\n }\n\n _saveDelegatedListener(type: keyof MapEventType | string, delegatedListener: DelegatedListener): void {\n this._delegatedListeners = this._delegatedListeners || {};\n this._delegatedListeners[type] = this._delegatedListeners[type] || [];\n this._delegatedListeners[type].push(delegatedListener);\n }\n\n _removeDelegatedListener(type: string, layerIds: string[], listener: Listener) {\n if (!this._delegatedListeners || !this._delegatedListeners[type]) {\n return;\n }\n\n const listeners = this._delegatedListeners[type];\n for (let i = 0; i < listeners.length; i++) {\n const delegatedListener = listeners[i];\n if (\n delegatedListener.listener === listener &&\n delegatedListener.layers.length === layerIds.length &&\n delegatedListener.layers.every((layerId: string) => layerIds.includes(layerId))\n ) {\n for (const event in delegatedListener.delegates) {\n this.off(event, delegatedListener.delegates[event]);\n }\n listeners.splice(i, 1);\n return;\n }\n }\n }\n\n /**\n * @event\n * Adds a listener for events of a specified type, optionally limited to features in a specified style layer(s).\n * See {@link MapEventType} and {@link MapLayerEventType} for a full list of events and their description.\n *\n * | Event | Compatible with `layerId` |\n * |------------------------|---------------------------|\n * | `mousedown` | yes |\n * | `mouseup` | yes |\n * | `mouseover` | yes |\n * | `mouseout` | yes |\n * | `mousemove` | yes |\n * | `mouseenter` | yes (required) |\n * | `mouseleave` | yes (required) |\n * | `click` | yes |\n * | `dblclick` | yes |\n * | `contextmenu` | yes |\n * | `touchstart` | yes |\n * | `touchend` | yes |\n * | `touchcancel` | yes |\n * | `wheel` | |\n * | `resize` | |\n * | `remove` | |\n * | `touchmove` | |\n * | `movestart` | |\n * | `move` | |\n * | `moveend` | |\n * | `dragstart` | |\n * | `drag` | |\n * | `dragend` | |\n * | `zoomstart` | |\n * | `zoom` | |\n * | `zoomend` | |\n * | `rotatestart` | |\n * | `rotate` | |\n * | `rotateend` | |\n * | `pitchstart` | |\n * | `pitch` | |\n * | `pitchend` | |\n * | `boxzoomstart` | |\n * | `boxzoomend` | |\n * | `boxzoomcancel` | |\n * | `webglcontextlost` | |\n * | `webglcontextrestored` | |\n * | `load` | |\n * | `render` | |\n * | `idle` | |\n * | `error` | |\n * | `data` | |\n * | `styledata` | |\n * | `sourcedata` | |\n * | `dataloading` | |\n * | `styledataloading` | |\n * | `sourcedataloading` | |\n * | `styleimagemissing` | |\n * | `dataabort` | |\n * | `sourcedataabort` | |\n *\n * @param type - The event type to listen for. Events compatible with the optional `layerId` parameter are triggered\n * when the cursor enters a visible portion of the specified layer from outside that layer or outside the map canvas.\n * @param layer - The ID of a style layer or a listener if no ID is provided. Event will only be triggered if its location\n * is within a visible feature in this layer. The event will have a `features` property containing\n * an array of the matching features. If `layer` is not supplied, the event will not have a `features` property.\n * Please note that many event types are not compatible with the optional `layer` parameter.\n * @param listener - The function to be called when the event is fired.\n * @example\n * ```ts\n * // Set an event listener that will fire\n * // when the map has finished loading\n * map.on('load', () => {\n * // Once the map has finished loading,\n * // add a new layer\n * map.addLayer({\n * id: 'points-of-interest',\n * source: {\n * type: 'vector',\n * url: 'https://maplibre.org/maplibre-style-spec/'\n * },\n * 'source-layer': 'poi_label',\n * type: 'circle',\n * paint: {\n * // MapLibre Style Specification paint properties\n * },\n * layout: {\n * // MapLibre Style Specification layout properties\n * }\n * });\n * });\n * ```\n * @example\n * ```ts\n * // Set an event listener that will fire\n * // when a feature on the countries layer of the map is clicked\n * map.on('click', 'countries', (e) => {\n * new Popup()\n * .setLngLat(e.lngLat)\n * .setHTML(`Country name: ${e.features[0].properties.name}`)\n * .addTo(map);\n * });\n * ```\n * @see [Display popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)\n * @see [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n * @see [Create a draggable marker](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n on(\n type: T,\n layer: string,\n listener: (ev: MapLayerEventType[T] & Object) => void,\n ): Subscription;\n /**\n * Overload of the `on` method that allows to listen to events specifying multiple layers.\n * @event\n * @param type - The type of the event.\n * @param layerIds - The array of style layer IDs.\n * @param listener - The listener callback.\n */\n on(\n type: T,\n layerIds: string[],\n listener: (ev: MapLayerEventType[T] & Object) => void\n ): Subscription;\n /**\n * Overload of the `on` method that allows to listen to events without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The listener callback.\n */\n on(type: T, listener: (ev: MapEventType[T] & Object) => void): Subscription;\n /**\n * Overload of the `on` method that allows to listen to events without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The listener callback.\n */\n on(type: keyof MapEventType | string, listener: Listener): Subscription;\n on(type: keyof MapEventType | string, layerIdsOrListener: string | string[] | Listener, listener?: Listener): Subscription {\n if (listener === undefined) {\n return super.on(type, layerIdsOrListener as Listener);\n }\n\n const layerIds = typeof layerIdsOrListener === 'string' ? [layerIdsOrListener] : layerIdsOrListener as string[];\n\n const delegatedListener = this._createDelegatedListener(type, layerIds, listener);\n\n this._saveDelegatedListener(type, delegatedListener);\n\n for (const event in delegatedListener.delegates) {\n this.on(event, delegatedListener.delegates[event]);\n }\n\n return {\n unsubscribe: () => {\n this._removeDelegatedListener(type, layerIds, listener);\n }\n };\n }\n\n /**\n * Adds a listener that will be called only once to a specified event type, optionally limited to features in a specified style layer.\n *\n * @event\n * @param type - The event type to listen for; one of `'mousedown'`, `'mouseup'`, `'click'`, `'dblclick'`,\n * `'mousemove'`, `'mouseenter'`, `'mouseleave'`, `'mouseover'`, `'mouseout'`, `'contextmenu'`, `'touchstart'`,\n * `'touchend'`, or `'touchcancel'`. `mouseenter` and `mouseover` events are triggered when the cursor enters\n * a visible portion of the specified layer from outside that layer or outside the map canvas. `mouseleave`\n * and `mouseout` events are triggered when the cursor leaves a visible portion of the specified layer, or leaves\n * the map canvas.\n * @param layer - The ID of a style layer or a listener if no ID is provided. Only events whose location is within a visible\n * feature in this layer will trigger the listener. The event will have a `features` property containing\n * an array of the matching features.\n * @param listener - The function to be called when the event is fired.\n * @returns `this` if listener is provided, promise otherwise to allow easier usage of async/await\n */\n once(\n type: T,\n layer: string,\n listener?: (ev: MapLayerEventType[T] & Object) => void,\n ): this | Promise;\n /**\n * Overload of the `once` method that allows to listen to events specifying multiple layers.\n * @event\n * @param type - The type of the event.\n * @param layerIds - The array of style layer IDs.\n * @param listener - The listener callback.\n */\n once(\n type: T,\n layerIds: string[],\n listener?: (ev: MapLayerEventType[T] & Object) => void\n ): this | Promise;\n /**\n * Overload of the `once` method that allows to listen to events without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The listener callback.\n */\n once(type: T, listener?: (ev: MapEventType[T] & Object) => void): this | Promise;\n /**\n * Overload of the `once` method that allows to listen to events without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The listener callback.\n */\n once(type: keyof MapEventType | string, listener?: Listener): this | Promise;\n once(type: keyof MapEventType | string, layerIdsOrListener: string | string[] | Listener, listener?: Listener): this | Promise {\n if (listener === undefined) {\n return super.once(type, layerIdsOrListener as Listener);\n }\n\n const layerIds = typeof layerIdsOrListener === 'string' ? [layerIdsOrListener] : layerIdsOrListener as string[];\n\n const delegatedListener = this._createDelegatedListener(type, layerIds, listener);\n\n for (const key in delegatedListener.delegates) {\n const delegate: Delegate = delegatedListener.delegates[key];\n delegatedListener.delegates[key] = (...args: Parameters) => {\n this._removeDelegatedListener(type, layerIds, listener);\n delegate(...args);\n };\n }\n\n this._saveDelegatedListener(type, delegatedListener);\n\n for (const event in delegatedListener.delegates) {\n this.once(event, delegatedListener.delegates[event]);\n }\n\n return this;\n }\n\n /**\n * Removes an event listener for events previously added with `{@link Map.on}`.\n *\n * @event\n * @param type - The event type previously used to install the listener.\n * @param layer - The layer ID or listener previously used to install the listener.\n * @param listener - The function previously installed as a listener.\n */\n off(\n type: T,\n layer: string,\n listener: (ev: MapLayerEventType[T] & Object) => void,\n ): this;\n /**\n * Overload of the `off` method that allows to remove an event created with multiple layers.\n * Provide the same layer IDs as to `on` or `once`, when the listener was registered.\n * @event\n * @param type - The type of the event.\n * @param layers - The layer IDs previously used to install the listener.\n * @param listener - The function previously installed as a listener.\n */\n off(\n type: T,\n layers: string[],\n listener: (ev: MapLayerEventType[T] & Object) => void,\n ): this;\n /**\n * Overload of the `off` method that allows to remove an event created without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The function previously installed as a listener.\n */\n off(type: T, listener: (ev: MapEventType[T] & Object) => void): this;\n /**\n * Overload of the `off` method that allows to remove an event created without specifying a layer.\n * @event\n * @param type - The type of the event.\n * @param listener - The function previously installed as a listener.\n */\n off(type: keyof MapEventType | string, listener: Listener): this;\n off(type: keyof MapEventType | string, layerIdsOrListener: string | string[] | Listener, listener?: Listener): this {\n if (listener === undefined) {\n return super.off(type, layerIdsOrListener as Listener);\n }\n\n const layerIds = typeof layerIdsOrListener === 'string' ? [layerIdsOrListener] : layerIdsOrListener as string[];\n this._removeDelegatedListener(type, layerIds, listener);\n\n return this;\n }\n\n /**\n * Returns an array of MapGeoJSONFeature objects\n * representing visible features that satisfy the query parameters.\n *\n * @param geometryOrOptions - (optional) The geometry of the query region in pixel points within the map viewport:\n * either a single pixel point or a pair of top-left and bottom-right pixel points describing a bounding box.\n * The origin of the pixel points is at the top-left of the map viewport.\n * Omitting this parameter (i.e. calling {@link Map.queryRenderedFeatures} with zero arguments,\n * or with only a `options` argument) is equivalent to passing a bounding box encompassing the entire\n * map viewport.\n * The geometryOrOptions can receive a {@link QueryRenderedFeaturesOptions} only to support a situation where the function receives only one parameter which is the options parameter.\n * @param options - (optional) Options object.\n *\n * @returns An array of MapGeoJSONFeature objects.\n *\n * The `properties` value of each returned feature object contains the properties of its source feature. For GeoJSON sources, only\n * string and numeric property values are supported (i.e. `null`, `Array`, and `Object` values are not supported).\n *\n * Each feature includes top-level `layer`, `source`, and `sourceLayer` properties. The `layer` property is an object\n * representing the style layer to which the feature belongs. Layout and paint properties in this object contain values\n * which are fully evaluated for the given zoom level and feature.\n *\n * Only features that are currently rendered are included. Some features will **not** be included, like:\n *\n * - Features from layers whose `visibility` property is `\"none\"`.\n * - Features from layers whose zoom range excludes the current zoom level.\n * - Symbol features that have been hidden due to text or icon collision.\n *\n * Features from all other layers are included, including features that may have no visible\n * contribution to the rendered result; for example, because the layer's opacity or color alpha component is set to\n * 0.\n *\n * The topmost rendered feature appears first in the returned array, and subsequent features are sorted by\n * descending z-order. Features that are rendered multiple times (due to wrapping across the antemeridian at low\n * zoom levels) are returned only once (though subject to the following caveat).\n *\n * Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature\n * geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple\n * times in query results. For example, suppose there is a highway running through the bounding rectangle of a query.\n * The results of the query will be those parts of the highway that lie within the map tiles covering the bounding\n * rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile\n * will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple\n * tiles due to tile buffering.\n *\n * @example\n * Find all features at a point\n * ```ts\n * let features = map.queryRenderedFeatures(\n * [20, 35],\n * { layers: ['my-layer-name'] }\n * );\n * ```\n *\n * @example\n * Find all features within a static bounding box\n * ```ts\n * let features = map.queryRenderedFeatures(\n * [[10, 20], [30, 50]],\n * { layers: ['my-layer-name'] }\n * );\n * ```\n *\n * @example\n * Find all features within a bounding box around a point\n * ```ts\n * let width = 10;\n * let height = 20;\n * let features = map.queryRenderedFeatures([\n * [point.x - width / 2, point.y - height / 2],\n * [point.x + width / 2, point.y + height / 2]\n * ], { layers: ['my-layer-name'] });\n * ```\n *\n * @example\n * Query all rendered features from a single layer\n * ```ts\n * let features = map.queryRenderedFeatures({ layers: ['my-layer-name'] });\n * ```\n * @see [Get features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/get-features-under-the-mouse-pointer/)\n */\n queryRenderedFeatures(geometryOrOptions?: PointLike | [PointLike, PointLike] | QueryRenderedFeaturesOptions, options?: QueryRenderedFeaturesOptions): MapGeoJSONFeature[] {\n if (!this.style) {\n return [];\n }\n let queryGeometry: Point[];\n const isGeometry = geometryOrOptions instanceof Point || Array.isArray(geometryOrOptions);\n const geometry = isGeometry ? geometryOrOptions : [[0, 0], [this.transform.width, this.transform.height]];\n options = options || (isGeometry ? {} : geometryOrOptions) || {};\n\n if (geometry instanceof Point || typeof geometry[0] === 'number') {\n queryGeometry = [Point.convert(geometry as PointLike)];\n } else {\n const tl = Point.convert(geometry[0] as PointLike);\n const br = Point.convert(geometry[1] as PointLike);\n queryGeometry = [tl, new Point(br.x, tl.y), br, new Point(tl.x, br.y), tl];\n }\n\n return this.style.queryRenderedFeatures(queryGeometry, options, this.transform);\n }\n\n /**\n * Returns an array of MapGeoJSONFeature objects\n * representing features within the specified vector tile or GeoJSON source that satisfy the query parameters.\n *\n * @param sourceId - The ID of the vector tile or GeoJSON source to query.\n * @param parameters - The options object.\n * @returns An array of MapGeoJSONFeature objects.\n *\n * In contrast to {@link Map.queryRenderedFeatures}, this function returns all features matching the query parameters,\n * whether or not they are rendered by the current style (i.e. visible). The domain of the query includes all currently-loaded\n * vector tiles and GeoJSON source tiles: this function does not check tiles outside the currently\n * visible viewport.\n *\n * Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature\n * geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple\n * times in query results. For example, suppose there is a highway running through the bounding rectangle of a query.\n * The results of the query will be those parts of the highway that lie within the map tiles covering the bounding\n * rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile\n * will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple\n * tiles due to tile buffering.\n *\n * @example\n * Find all features in one source layer in a vector source\n * ```ts\n * let features = map.querySourceFeatures('your-source-id', {\n * sourceLayer: 'your-source-layer'\n * });\n * ```\n *\n */\n querySourceFeatures(sourceId: string, parameters?: QuerySourceFeatureOptions | null): GeoJSONFeature[] {\n return this.style.querySourceFeatures(sourceId, parameters);\n }\n\n /**\n * Updates the map's MapLibre style object with a new value.\n *\n * If a style is already set when this is used and options.diff is set to true, the map renderer will attempt to compare the given style\n * against the map's current state and perform only the changes necessary to make the map style match the desired state. Changes in sprites\n * (images used for icons and patterns) and glyphs (fonts for label text) **cannot** be diffed. If the sprites or fonts used in the current\n * style and the given style are different in any way, the map renderer will force a full update, removing the current style and building\n * the given one from scratch.\n *\n *\n * @param style - A JSON object conforming to the schema described in the\n * [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/), or a URL to such JSON.\n * @param options - The options object.\n *\n * @example\n * ```ts\n * map.setStyle(\"https://demotiles.maplibre.org/style.json\");\n *\n * map.setStyle('https://demotiles.maplibre.org/style.json', {\n * transformStyle: (previousStyle, nextStyle) => ({\n * ...nextStyle,\n * sources: {\n * ...nextStyle.sources,\n * // copy a source from previous style\n * 'osm': previousStyle.sources.osm\n * },\n * layers: [\n * // background layer\n * nextStyle.layers[0],\n * // copy a layer from previous style\n * previousStyle.layers[0],\n * // other layers from the next style\n * ...nextStyle.layers.slice(1).map(layer => {\n * // hide the layers we don't need from demotiles style\n * if (layer.id.startsWith('geolines')) {\n * layer.layout = {...layer.layout || {}, visibility: 'none'};\n * // filter out US polygons\n * } else if (layer.id.startsWith('coastline') || layer.id.startsWith('countries')) {\n * layer.filter = ['!=', ['get', 'ADM0_A3'], 'USA'];\n * }\n * return layer;\n * })\n * ]\n * })\n * });\n * ```\n */\n setStyle(style: StyleSpecification | string | null, options?: StyleSwapOptions & StyleOptions): this {\n options = extend({},\n {\n localIdeographFontFamily: this._localIdeographFontFamily,\n validate: this._validateStyle\n }, options);\n\n if ((options.diff !== false && options.localIdeographFontFamily === this._localIdeographFontFamily) && this.style && style) {\n this._diffStyle(style, options);\n return this;\n } else {\n this._localIdeographFontFamily = options.localIdeographFontFamily;\n return this._updateStyle(style, options);\n }\n }\n\n /**\n * Updates the requestManager's transform request with a new function\n *\n * @param transformRequest - A callback run before the Map makes a request for an external URL. The callback can be used to modify the url, set headers, or set the credentials property for cross-origin requests.\n * Expected to return an object with a `url` property and optionally `headers` and `credentials` properties\n *\n * @example\n * ```ts\n * map.setTransformRequest((url: string, resourceType: string) => {});\n * ```\n */\n setTransformRequest(transformRequest: RequestTransformFunction | null): this {\n this._requestManager.setTransformRequest(transformRequest);\n return this;\n }\n\n _getUIString(key: keyof typeof defaultLocale) {\n const str = this._locale[key];\n if (str == null) {\n throw new Error(`Missing UI string '${key}'`);\n }\n\n return str;\n }\n\n _updateStyle(style: StyleSpecification | string | null, options?: StyleSwapOptions & StyleOptions) {\n // transformStyle relies on having previous style serialized, if it is not loaded yet, delay _updateStyle until previous style is loaded\n if (options.transformStyle && this.style && !this.style._loaded) {\n this.style.once('style.load', () => this._updateStyle(style, options));\n return;\n }\n\n const previousStyle = this.style && options.transformStyle ? this.style.serialize() : undefined;\n if (this.style) {\n this.style.setEventedParent(null);\n\n // Only release workers when map is getting disposed\n this.style._remove(!style);\n }\n\n if (!style) {\n this.style?.projection?.destroy();\n delete this.style;\n return this;\n } else {\n this.style = new Style(this, options || {});\n }\n\n this.style.setEventedParent(this, {style: this.style});\n\n if (typeof style === 'string') {\n this.style.loadURL(style, options, previousStyle);\n } else {\n this.style.loadJSON(style, options, previousStyle);\n }\n\n return this;\n }\n\n _lazyInitEmptyStyle() {\n if (!this.style) {\n this.style = new Style(this, {});\n this.style.setEventedParent(this, {style: this.style});\n this.style.loadEmpty();\n }\n }\n\n _diffStyle(style: StyleSpecification | string, options?: StyleSwapOptions & StyleOptions) {\n if (typeof style === 'string') {\n const url = style;\n const request = this._requestManager.transformRequest(url, ResourceType.Style);\n getJSON(request, new AbortController()).then((response) => {\n this._updateDiff(response.data, options);\n }).catch((error) => {\n if (error) {\n this.fire(new ErrorEvent(error));\n }\n });\n } else if (typeof style === 'object') {\n this._updateDiff(style, options);\n }\n }\n\n _updateDiff(style: StyleSpecification, options?: StyleSwapOptions & StyleOptions) {\n try {\n if (this.style.setState(style, options)) {\n this._update(true);\n }\n } catch (e) {\n warnOnce(\n `Unable to perform style diff: ${e.message || e.error || e}. Rebuilding the style from scratch.`\n );\n this._updateStyle(style, options);\n }\n }\n\n /**\n * Returns the map's MapLibre style object, a JSON object which can be used to recreate the map's style.\n *\n * @returns The map's style JSON object.\n *\n * @example\n * ```ts\n * let styleJson = map.getStyle();\n * ```\n *\n */\n getStyle(): StyleSpecification {\n if (this.style) {\n return this.style.serialize();\n }\n }\n\n /**\n * @internal\n * Returns the map's style and cloned images to restore context.\n * @returns An object containing the style and images.\n */\n _getStyleAndImages(): LostContextStyle {\n if (this.style) {\n return {\n style: this.style.serialize(),\n images: this.style.imageManager.cloneImages()\n };\n }\n return {style: null, images: {}};\n }\n\n /**\n * Returns a Boolean indicating whether the map's style is fully loaded.\n *\n * @returns A Boolean indicating whether the style is fully loaded.\n *\n * @example\n * ```ts\n * let styleLoadStatus = map.isStyleLoaded();\n * ```\n */\n isStyleLoaded(): boolean | void {\n if (!this.style) return warnOnce('There is no style added to the map.');\n return this.style.loaded();\n }\n\n /**\n * Adds a source to the map's style.\n *\n * Events triggered:\n *\n * Triggers the `source.add` event.\n *\n * @param id - The ID of the source to add. Must not conflict with existing sources.\n * @param source - The source object, conforming to the\n * MapLibre Style Specification's [source definition](https://maplibre.org/maplibre-style-spec/sources) or\n * {@link CanvasSourceSpecification}.\n * @example\n * ```ts\n * map.addSource('my-data', {\n * type: 'vector',\n * url: 'https://demotiles.maplibre.org/tiles/tiles.json'\n * });\n * ```\n * @example\n * ```ts\n * map.addSource('my-data', {\n * \"type\": \"geojson\",\n * \"data\": {\n * \"type\": \"Feature\",\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [-77.0323, 38.9131]\n * },\n * \"properties\": {\n * \"title\": \"Mapbox DC\",\n * \"marker-symbol\": \"monument\"\n * }\n * }\n * });\n * ```\n * @see GeoJSON source: [Add live realtime data](https://maplibre.org/maplibre-gl-js/docs/examples/add-live-realtime-data/)\n */\n addSource(id: string, source: SourceSpecification | CanvasSourceSpecification): this {\n this._lazyInitEmptyStyle();\n this.style.addSource(id, source);\n return this._update(true);\n }\n\n /**\n * Returns a Boolean indicating whether the source is loaded. Returns `true` if the source with\n * the given ID in the map's style has no outstanding network requests, otherwise `false`.\n *\n * A {@link ErrorEvent} event will be fired if there is no source wit the specified ID.\n *\n * @param id - The ID of the source to be checked.\n * @returns A Boolean indicating whether the source is loaded.\n * @example\n * ```ts\n * let sourceLoaded = map.isSourceLoaded('bathymetry-data');\n * ```\n */\n isSourceLoaded(id: string): boolean {\n const tileManager = this.style && this.style.tileManagers[id];\n if (tileManager === undefined) {\n this.fire(new ErrorEvent(new Error(`There is no tile manager with ID '${id}'`)));\n return;\n }\n return tileManager.loaded();\n }\n\n /**\n * Loads a 3D terrain mesh, based on a \"raster-dem\" source.\n *\n * Triggers the `terrain` event.\n *\n * @param options - Options object.\n * @example\n * ```ts\n * map.setTerrain({ source: 'terrain' });\n * ```\n */\n setTerrain(options: TerrainSpecification | null): this {\n this.style._checkLoaded();\n\n // clear event handlers\n if (this._terrainDataCallback) this.style.off('data', this._terrainDataCallback);\n\n if (!options) {\n // remove terrain\n if (this.terrain) this.terrain.tileManager.destruct();\n this.terrain = null;\n if (this.painter.renderToTexture) this.painter.renderToTexture.destruct();\n this.painter.renderToTexture = null;\n this.transform.setMinElevationForCurrentTile(0);\n if (this._centerClampedToGround) {\n this.transform.setElevation(0);\n }\n } else {\n // add terrain\n const tileManager = this.style.tileManagers[options.source];\n if (!tileManager) throw new Error(`cannot load terrain, because there exists no source with ID: ${options.source}`);\n // Update terrain tiles when adding new terrain\n if (this.terrain === null) tileManager.reload();\n // Warn once if user is using the same source for hillshade/color-relief and terrain\n for (const index in this.style._layers) {\n const thisLayer = this.style._layers[index];\n if (thisLayer.type === 'hillshade' && thisLayer.source === options.source) {\n warnOnce('You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.');\n }\n if (thisLayer.type === 'color-relief' && thisLayer.source === options.source) {\n warnOnce('You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.');\n }\n }\n this.terrain = new Terrain(this.painter, tileManager, options);\n this.painter.renderToTexture = new RenderToTexture(this.painter, this.terrain);\n this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n this._terrainDataCallback = e => {\n if (e.dataType === 'style') {\n this.terrain.tileManager.freeRtt();\n } else if (e.dataType === 'source' && e.tile) {\n if (e.sourceId === options.source && !this._elevationFreeze) {\n this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n if (this._centerClampedToGround) {\n this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n }\n }\n\n if (e.source?.type === 'image') {\n this.terrain.tileManager.freeRtt();\n } else {\n this.terrain.tileManager.freeRtt(e.tile.tileID);\n }\n }\n };\n this.style.on('data', this._terrainDataCallback);\n }\n\n this.fire(new Event('terrain', {terrain: options}));\n return this;\n }\n\n /**\n * Get the terrain-options if terrain is loaded\n * @returns the TerrainSpecification passed to setTerrain\n * @example\n * ```ts\n * map.getTerrain(); // { source: 'terrain' };\n * ```\n */\n getTerrain(): TerrainSpecification | null {\n return this.terrain?.options ?? null;\n }\n\n /**\n * Returns a Boolean indicating whether all tiles in the viewport from all sources on\n * the style are loaded.\n *\n * @returns A Boolean indicating whether all tiles are loaded.\n * @example\n * ```ts\n * let tilesLoaded = map.areTilesLoaded();\n * ```\n */\n areTilesLoaded(): boolean {\n const tileManagers = this.style && this.style.tileManagers;\n for (const tileManager of Object.values(tileManagers)) {\n if (!tileManager.areTilesLoaded()) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Removes a source from the map's style.\n *\n * @param id - The ID of the source to remove.\n * @example\n * ```ts\n * map.removeSource('bathymetry-data');\n * ```\n */\n removeSource(id: string): Map {\n this.style.removeSource(id);\n return this._update(true);\n }\n\n /**\n * Returns the source with the specified ID in the map's style.\n *\n * This method is often used to update a source using the instance members for the relevant\n * source type as defined in classes that derive from {@link Source}.\n * For example, setting the `data` for a GeoJSON source or updating the `url` and `coordinates`\n * of an image source.\n *\n * @param id - The ID of the source to get.\n * @returns The style source with the specified ID or `undefined` if the ID\n * corresponds to no existing sources.\n * The shape of the object varies by source type.\n * A list of options for each source type is available on the MapLibre Style Specification's\n * [Sources](https://maplibre.org/maplibre-style-spec/sources/) page.\n * @example\n * ```ts\n * let sourceObject = map.getSource('points');\n * ```\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n * @see [Animate a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-a-point/)\n * @see [Add live realtime data](https://maplibre.org/maplibre-gl-js/docs/examples/add-live-realtime-data/)\n */\n getSource(id: string): TSource | undefined {\n return this.style.getSource(id) as TSource;\n }\n\n /**\n * Change the tile Level of Detail behavior of the specified source. These parameters have no effect when\n * pitch == 0, and the largest effect when the horizon is visible on screen.\n *\n * @param maxZoomLevelsOnScreen - The maximum number of distinct zoom levels allowed on screen at a time.\n * There will generally be fewer zoom levels on the screen, the maximum can only be reached when the horizon\n * is at the top of the screen. Increasing the maximum number of zoom levels causes the zoom level to decay\n * faster toward the horizon.\n * @param tileCountMaxMinRatio - The ratio of the maximum number of tiles loaded (at high pitch) to the minimum\n * number of tiles loaded. Increasing this ratio allows more tiles to be loaded at high pitch angles. If the ratio\n * would otherwise be exceeded, the zoom level is reduced uniformly to keep the number of tiles within the limit.\n * @param sourceId - The ID of the source to set tile LOD parameters for. All sources will be updated if unspecified.\n * If `sourceId` is specified but a corresponding source does not exist, an error is thrown.\n * @example\n * ```ts\n * map.setSourceTileLodParams(4.0, 3.0, 'terrain');\n * ```\n * @see [Modify Level of Detail behavior](https://maplibre.org/maplibre-gl-js/docs/examples/level-of-detail-control/)\n\n */\n setSourceTileLodParams(maxZoomLevelsOnScreen: number, tileCountMaxMinRatio: number, sourceId?: string) : this {\n if (sourceId) {\n const source = this.getSource(sourceId);\n if(!source) {\n throw new Error(`There is no source with ID \"${sourceId}\", cannot set LOD parameters`);\n }\n source.calculateTileZoom = createCalculateTileZoomFunction(Math.max(1, maxZoomLevelsOnScreen), Math.max(1, tileCountMaxMinRatio));\n } else {\n for (const id in this.style.tileManagers) {\n this.style.tileManagers[id].getSource().calculateTileZoom = createCalculateTileZoomFunction(Math.max(1, maxZoomLevelsOnScreen), Math.max(1, tileCountMaxMinRatio));\n }\n }\n this._update(true);\n return this;\n }\n\n /**\n * Triggers a reload of the selected tiles\n *\n * @param sourceId - The ID of the source\n * @param tileIds - An array of tile IDs to be reloaded. If not defined, all tiles will be reloaded.\n * @example\n * ```ts\n * map.refreshTiles('satellite', [{x:1024, y: 1023, z: 11}, {x:1023, y: 1023, z: 11}]);\n * ```\n */\n refreshTiles(sourceId: string, tileIds?: Array<{x: number; y: number; z: number}>) {\n const tileManager = this.style.tileManagers[sourceId];\n if(!tileManager) {\n throw new Error(`There is no tile manager with ID \"${sourceId}\", cannot refresh tile`);\n }\n if (tileIds === undefined) {\n tileManager.reload(true);\n } else {\n tileManager.refreshTiles(tileIds.map((tileId) => {return new CanonicalTileID(tileId.z, tileId.x, tileId.y);}));\n }\n }\n\n /**\n * Add an image to the style. This image can be displayed on the map like any other icon in the style's\n * sprite using the image's ID with\n * [`icon-image`](https://maplibre.org/maplibre-style-spec/layers/#layout-symbol-icon-image),\n * [`background-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-background-background-pattern),\n * [`fill-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-fill-fill-pattern),\n * or [`line-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-line-line-pattern).\n *\n * A {@link ErrorEvent} event will be fired if the image parameter is invalid or there is not enough space in the sprite to add this image.\n *\n * @param id - The ID of the image.\n * @param image - The image as an `HTMLImageElement`, `ImageData`, `ImageBitmap` or object with `width`, `height`, and `data`\n * properties with the same format as `ImageData`.\n * @param options - Options object.\n * @example\n * ```ts\n * // If the style's sprite does not already contain an image with ID 'cat',\n * // add the image 'cat-icon.png' to the style's sprite with the ID 'cat'.\n * const image = await map.loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/400px-Cat_silhouette.svg.png');\n * if (!map.hasImage('cat')) map.addImage('cat', image.data);\n *\n * // Add a stretchable image that can be used with `icon-text-fit`\n * // In this example, the image is 600px wide by 400px high.\n * const image = await map.loadImage('https://upload.wikimedia.org/wikipedia/commons/8/89/Black_and_White_Boxed_%28bordered%29.png');\n * if (map.hasImage('border-image')) return;\n * map.addImage('border-image', image.data, {\n * content: [16, 16, 300, 384], // place text over left half of image, avoiding the 16px border\n * stretchX: [[16, 584]], // stretch everything horizontally except the 16px border\n * stretchY: [[16, 384]], // stretch everything vertically except the 16px border\n * });\n * ```\n * @see Use `HTMLImageElement`: [Add an icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-an-icon-to-the-map/)\n * @see Use `ImageData`: [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-generated-icon-to-the-map/)\n */\n addImage(id: string,\n image: HTMLImageElement | ImageBitmap | ImageData | {\n width: number;\n height: number;\n data: Uint8Array | Uint8ClampedArray;\n } | StyleImageInterface,\n options: Partial = {}): this {\n const {\n pixelRatio = 1,\n sdf = false,\n stretchX,\n stretchY,\n content,\n textFitWidth,\n textFitHeight\n } = options;\n this._lazyInitEmptyStyle();\n const version = 0;\n\n if (image instanceof HTMLImageElement || isImageBitmap(image)) {\n const {width, height, data} = browser.getImageData(image);\n this.style.addImage(id, {data: new RGBAImage({width, height}, data), pixelRatio, stretchX, stretchY, content, textFitWidth, textFitHeight, sdf, version});\n } else if (image.width === undefined || image.height === undefined) {\n return this.fire(new ErrorEvent(new Error(\n 'Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, ' +\n 'or object with `width`, `height`, and `data` properties with the same format as `ImageData`')));\n } else {\n const {width, height, data} = image as ImageData;\n const userImage = (image as any as StyleImageInterface);\n\n this.style.addImage(id, {\n data: new RGBAImage({width, height}, new Uint8Array(data)),\n pixelRatio,\n stretchX,\n stretchY,\n content,\n textFitWidth,\n textFitHeight,\n sdf,\n version,\n userImage\n });\n\n if (userImage.onAdd) {\n userImage.onAdd(this, id);\n }\n return this;\n }\n }\n\n /**\n * Update an existing image in a style. This image can be displayed on the map like any other icon in the style's\n * sprite using the image's ID with\n * [`icon-image`](https://maplibre.org/maplibre-style-spec/layers/#layout-symbol-icon-image),\n * [`background-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-background-background-pattern),\n * [`fill-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-fill-fill-pattern),\n * or [`line-pattern`](https://maplibre.org/maplibre-style-spec/layers/#paint-line-line-pattern).\n *\n * An {@link ErrorEvent} will be fired if the image parameter is invalid.\n *\n * @param id - The ID of the image.\n * @param image - The image as an `HTMLImageElement`, `ImageData`, `ImageBitmap` or object with `width`, `height`, and `data`\n * properties with the same format as `ImageData`.\n * @example\n * ```ts\n * // If an image with the ID 'cat' already exists in the style's sprite,\n * // replace that image with a new image, 'other-cat-icon.png'.\n * if (map.hasImage('cat')) map.updateImage('cat', './other-cat-icon.png');\n * ```\n */\n updateImage(id: string,\n image: HTMLImageElement | ImageBitmap | ImageData | {\n width: number;\n height: number;\n data: Uint8Array | Uint8ClampedArray;\n } | StyleImageInterface): this {\n\n const existingImage = this.style.getImage(id);\n if (!existingImage) {\n return this.fire(new ErrorEvent(new Error(\n 'The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.')));\n }\n const imageData = (image instanceof HTMLImageElement || isImageBitmap(image)) ?\n browser.getImageData(image) :\n image;\n const {width, height, data} = imageData;\n\n if (width === undefined || height === undefined) {\n return this.fire(new ErrorEvent(new Error(\n 'Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, ' +\n 'or object with `width`, `height`, and `data` properties with the same format as `ImageData`')));\n }\n\n if (width !== existingImage.data.width || height !== existingImage.data.height) {\n return this.fire(new ErrorEvent(new Error(\n 'The width and height of the updated image must be that same as the previous version of the image')));\n }\n\n const copy = !(image instanceof HTMLImageElement || isImageBitmap(image));\n existingImage.data.replace(data, copy);\n\n this.style.updateImage(id, existingImage);\n return this;\n }\n\n /**\n * Returns an image, specified by ID, currently available in the map.\n * This includes both images from the style's original sprite\n * and any images that have been added at runtime using {@link Map.addImage}.\n *\n * @param id - The ID of the image.\n * @returns An image in the map with the specified ID.\n *\n * @example\n * ```ts\n * let coffeeShopIcon = map.getImage(\"coffee_cup\");\n * ```\n */\n getImage(id: string): StyleImage {\n return this.style.getImage(id);\n }\n\n /**\n * Check whether or not an image with a specific ID exists in the style. This checks both images\n * in the style's original sprite and any images\n * that have been added at runtime using {@link Map.addImage}.\n *\n * An {@link ErrorEvent} will be fired if the image parameter is invalid.\n *\n * @param id - The ID of the image.\n *\n * @returns A Boolean indicating whether the image exists.\n * @example\n * Check if an image with the ID 'cat' exists in the style's sprite.\n * ```ts\n * let catIconExists = map.hasImage('cat');\n * ```\n */\n hasImage(id: string): boolean {\n if (!id) {\n this.fire(new ErrorEvent(new Error('Missing required image id')));\n return false;\n }\n\n return !!this.style.getImage(id);\n }\n\n /**\n * Remove an image from a style. This can be an image from the style's original\n * sprite or any images\n * that have been added at runtime using {@link Map.addImage}.\n *\n * @param id - The ID of the image.\n *\n * @example\n * ```ts\n * // If an image with the ID 'cat' exists in\n * // the style's sprite, remove it.\n * if (map.hasImage('cat')) map.removeImage('cat');\n * ```\n */\n removeImage(id: string) {\n this.style.removeImage(id);\n }\n\n /**\n * Load an image from an external URL to be used with {@link Map.addImage}. External\n * domains must support [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS).\n *\n * @param url - The URL of the image file. Image file must be in png, webp, or jpg format.\n * @returns a promise that is resolved when the image is loaded\n *\n * @example\n * Load an image from an external URL.\n * ```ts\n * const response = await map.loadImage('https://picsum.photos/50/50');\n * // Add the loaded image to the style's sprite with the ID 'photo'.\n * map.addImage('photo', response.data);\n * ```\n * @see [Add an icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-an-icon-to-the-map/)\n */\n loadImage(url: string): Promise> {\n return ImageRequest.getImage(this._requestManager.transformRequest(url, ResourceType.Image), new AbortController());\n }\n\n /**\n * Returns an Array of strings containing the IDs of all images currently available in the map.\n * This includes both images from the style's original sprite\n * and any images that have been added at runtime using {@link Map.addImage}.\n *\n * @returns An Array of strings containing the names of all sprites/images currently available in the map.\n *\n * @example\n * ```ts\n * let allImages = map.listImages();\n * ```\n */\n listImages(): Array {\n return this.style.listImages();\n }\n\n /**\n * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)\n * to the map's style.\n *\n * A layer defines how data from a specified source will be styled. Read more about layer types\n * and available paint and layout properties in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/layers).\n *\n * @param layer - The layer to add,\n * conforming to either the MapLibre Style Specification's [layer definition](https://maplibre.org/maplibre-style-spec/layers) or,\n * less commonly, the {@link CustomLayerInterface} specification. Can also be a layer definition with an embedded source definition.\n * The MapLibre Style Specification's layer definition is appropriate for most layers.\n *\n * @param beforeId - The ID of an existing layer to insert the new layer before,\n * resulting in the new layer appearing visually beneath the existing layer.\n * If this argument is not specified, the layer will be appended to the end of the layers array\n * and appear visually above all other layers.\n *\n * @example\n * Add a circle layer with a vector source\n * ```ts\n * map.addLayer({\n * id: 'points-of-interest',\n * source: {\n * type: 'vector',\n * url: 'https://demotiles.maplibre.org/tiles/tiles.json'\n * },\n * 'source-layer': 'poi_label',\n * type: 'circle',\n * paint: {\n * // MapLibre Style Specification paint properties\n * },\n * layout: {\n * // MapLibre Style Specification layout properties\n * }\n * });\n * ```\n *\n * @example\n * Define a source before using it to create a new layer\n * ```ts\n * map.addSource('state-data', {\n * type: 'geojson',\n * data: 'path/to/data.geojson'\n * });\n *\n * map.addLayer({\n * id: 'states',\n * // References the GeoJSON source defined above\n * // and does not require a `source-layer`\n * source: 'state-data',\n * type: 'symbol',\n * layout: {\n * // Set the label content to the\n * // feature's `name` property\n * text-field: ['get', 'name']\n * }\n * });\n * ```\n *\n * @example\n * Add a new symbol layer before an existing layer\n * ```ts\n * map.addLayer({\n * id: 'states',\n * // References a source that's already been defined\n * source: 'state-data',\n * type: 'symbol',\n * layout: {\n * // Set the label content to the\n * // feature's `name` property\n * text-field: ['get', 'name']\n * }\n * // Add the layer before the existing `cities` layer\n * }, 'cities');\n * ```\n * @see [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)\n * @see [Add a vector tile source](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-vector-tile-source/)\n * @see [Add a WMS source](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-wms-source/)\n */\n addLayer(layer: AddLayerObject, beforeId?: string) {\n this._lazyInitEmptyStyle();\n this.style.addLayer(layer, beforeId);\n return this._update(true);\n }\n\n /**\n * Moves a layer to a different z-position.\n *\n * @param id - The ID of the layer to move.\n * @param beforeId - The ID of an existing layer to insert the new layer before. When viewing the map, the `id` layer will appear beneath the `beforeId` layer. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map.\n *\n * @example\n * Move a layer with ID 'polygon' before the layer with ID 'country-label'. The `polygon` layer will appear beneath the `country-label` layer on the map.\n * ```ts\n * map.moveLayer('polygon', 'country-label');\n * ```\n */\n moveLayer(id: string, beforeId?: string): this {\n this.style.moveLayer(id, beforeId);\n return this._update(true);\n }\n\n /**\n * Removes the layer with the given ID from the map's style.\n *\n * An {@link ErrorEvent} will be fired if the image parameter is invalid.\n *\n * @param id - The ID of the layer to remove\n *\n * @example\n * If a layer with ID 'state-data' exists, remove it.\n * ```ts\n * if (map.getLayer('state-data')) map.removeLayer('state-data');\n * ```\n */\n removeLayer(id: string): this {\n this.style.removeLayer(id);\n return this._update(true);\n }\n\n /**\n * Returns the layer with the specified ID in the map's style.\n *\n * @param id - The ID of the layer to get.\n * @returns The layer with the specified ID, or `undefined`\n * if the ID corresponds to no existing layers.\n *\n * @example\n * ```ts\n * let stateDataLayer = map.getLayer('state-data');\n * ```\n * @see [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-symbols-by-toggling-a-list/)\n * @see [Filter symbols by text input](https://maplibre.org/maplibre-gl-js/docs/examples/filter-symbols-by-text-input/)\n */\n getLayer(id: string): StyleLayer | undefined {\n return this.style.getLayer(id);\n }\n\n /**\n * Return the ids of all layers currently in the style, including custom layers, in order.\n *\n * @returns ids of layers, in order\n *\n * @example\n * ```ts\n * const orderedLayerIds = map.getLayersOrder();\n * ```\n */\n getLayersOrder(): string[] {\n return this.style.getLayersOrder();\n }\n\n /**\n * Sets the zoom extent for the specified style layer. The zoom extent includes the\n * [minimum zoom level](https://maplibre.org/maplibre-style-spec/layers/#minzoom)\n * and [maximum zoom level](https://maplibre.org/maplibre-style-spec/layers/#maxzoom))\n * at which the layer will be rendered.\n *\n * !!! note\n * For style layers using vector sources, style layers cannot be rendered at zoom levels lower than the\n * minimum zoom level of the _source layer_ because the data does not exist at those zoom levels. If the minimum\n * zoom level of the source layer is higher than the minimum zoom level defined in the style layer, the style\n * layer will not be rendered at all zoom levels in the zoom range.\n *\n * @param layerId - The ID of the layer to which the zoom extent will be applied.\n * @param minzoom - The minimum zoom to set (0-24).\n * @param maxzoom - The maximum zoom to set (0-24).\n *\n * @example\n * ```ts\n * map.setLayerZoomRange('my-layer', 2, 5);\n * ```\n */\n setLayerZoomRange(layerId: string, minzoom: number, maxzoom: number): this {\n this.style.setLayerZoomRange(layerId, minzoom, maxzoom);\n return this._update(true);\n }\n\n /**\n * Sets the filter for the specified style layer.\n *\n * Filters control which features a style layer renders from its source.\n * Any feature for which the filter expression evaluates to `true` will be\n * rendered on the map. Those that are false will be hidden.\n *\n * Use `setFilter` to show a subset of your source data.\n *\n * To clear the filter, pass `null` or `undefined` as the second parameter.\n *\n * @param layerId - The ID of the layer to which the filter will be applied.\n * @param filter - The filter, conforming to the MapLibre Style Specification's\n * [filter definition](https://maplibre.org/maplibre-style-spec/layers/#filter). If `null` or `undefined` is provided, the function removes any existing filter from the layer.\n * @param options - Options object.\n *\n * @example\n * Display only features with the 'name' property 'USA'\n * ```ts\n * map.setFilter('my-layer', ['==', ['get', 'name'], 'USA']);\n * ```\n * @example\n * Display only features with five or more 'available-spots'\n * ```ts\n * map.setFilter('bike-docks', ['>=', ['get', 'available-spots'], 5]);\n * ```\n * @example\n * Remove the filter for the 'bike-docks' style layer\n * ```ts\n * map.setFilter('bike-docks', null);\n * ```\n * @see [Create a timeline animation](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)\n */\n setFilter(layerId: string, filter?: FilterSpecification | null, options: StyleSetterOptions = {}) {\n this.style.setFilter(layerId, filter, options);\n return this._update(true);\n }\n\n /**\n * Returns the filter applied to the specified style layer.\n *\n * @param layerId - The ID of the style layer whose filter to get.\n * @returns The layer's filter.\n */\n getFilter(layerId: string): FilterSpecification | void {\n return this.style.getFilter(layerId);\n }\n\n /**\n * Sets the value of a paint property in the specified style layer.\n *\n * @param layerId - The ID of the layer to set the paint property in.\n * @param name - The name of the paint property to set.\n * @param value - The value of the paint property to set.\n * Must be of a type appropriate for the property, as defined in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).\n * Pass `null` to unset the existing value.\n * @param options - Options object.\n * @example\n * ```ts\n * map.setPaintProperty('my-layer', 'fill-color', '#faafee');\n * ```\n * @see [Change a layer's color with buttons](https://maplibre.org/maplibre-gl-js/docs/examples/change-a-layers-color-with-buttons/)\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n setPaintProperty(layerId: string, name: string, value: any, options: StyleSetterOptions = {}): this {\n this.style.setPaintProperty(layerId, name, value, options);\n return this._update(true);\n }\n\n /**\n * Returns the value of a paint property in the specified style layer.\n *\n * @param layerId - The ID of the layer to get the paint property from.\n * @param name - The name of a paint property to get.\n * @returns The value of the specified paint property.\n */\n getPaintProperty(layerId: string, name: string) {\n return this.style.getPaintProperty(layerId, name);\n }\n\n /**\n * Sets the value of a layout property in the specified style layer.\n *\n * @param layerId - The ID of the layer to set the layout property in.\n * @param name - The name of the layout property to set.\n * @param value - The value of the layout property. Must be of a type appropriate for the property, as defined in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).\n * @param options - The options object.\n * @example\n * ```ts\n * map.setLayoutProperty('my-layer', 'visibility', 'none');\n * ```\n */\n setLayoutProperty(layerId: string, name: string, value: any, options: StyleSetterOptions = {}): this {\n this.style.setLayoutProperty(layerId, name, value, options);\n return this._update(true);\n }\n\n /**\n * Returns the value of a layout property in the specified style layer.\n *\n * @param layerId - The ID of the layer to get the layout property from.\n * @param name - The name of the layout property to get.\n * @returns The value of the specified layout property.\n */\n getLayoutProperty(layerId: string, name: string) {\n return this.style.getLayoutProperty(layerId, name);\n }\n\n /**\n * Sets the value of the style's glyphs property.\n *\n * @param glyphsUrl - Glyph URL to set. Must conform to the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/glyphs/).\n * @param options - Options object.\n * @example\n * ```ts\n * map.setGlyphs('https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf');\n * ```\n */\n setGlyphs(glyphsUrl: string | null, options: StyleSetterOptions = {}): this {\n this._lazyInitEmptyStyle();\n this.style.setGlyphs(glyphsUrl, options);\n return this._update(true);\n }\n\n /**\n * Returns the value of the style's glyphs URL\n *\n * @returns glyphs Style's glyphs url\n */\n getGlyphs(): string | null {\n return this.style.getGlyphsUrl();\n }\n\n /**\n * Adds a sprite to the map's style. Fires the `style` event.\n *\n * @param id - The ID of the sprite to add. Must not conflict with existing sprites.\n * @param url - The URL to load the sprite from\n * @param options - Options object.\n * @example\n * ```ts\n * map.addSprite('sprite-two', 'http://example.com/sprite-two');\n * ```\n */\n addSprite(id: string, url: string, options: StyleSetterOptions = {}): this {\n this._lazyInitEmptyStyle();\n this.style.addSprite(id, url, options, (err) => {\n if (!err) {\n this._update(true);\n }\n });\n return this;\n }\n\n /**\n * Removes the sprite from the map's style. Fires the `style` event.\n *\n * @param id - The ID of the sprite to remove. If the sprite is declared as a single URL, the ID must be \"default\".\n * @example\n * ```ts\n * map.removeSprite('sprite-two');\n * map.removeSprite('default');\n * ```\n */\n removeSprite(id: string) {\n this._lazyInitEmptyStyle();\n this.style.removeSprite(id);\n return this._update(true);\n }\n\n /**\n * Returns the as-is value of the style's sprite.\n *\n * @returns style's sprite list of id-url pairs\n */\n getSprite(): {id: string; url: string}[] {\n return this.style.getSprite();\n }\n\n /**\n * Sets the value of the style's sprite property.\n *\n * @param spriteUrl - Sprite URL to set.\n * @param options - Options object.\n * @example\n * ```ts\n * map.setSprite('YOUR_SPRITE_URL');\n * ```\n */\n setSprite(spriteUrl: string | null, options: StyleSetterOptions = {}) {\n this._lazyInitEmptyStyle();\n this.style.setSprite(spriteUrl, options, (err) => {\n if (!err) {\n this._update(true);\n }\n });\n return this;\n }\n\n /**\n * Sets the any combination of light values.\n *\n * @param light - Light properties to set. Must conform to the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/light).\n * @param options - Options object.\n *\n * @example\n * ```ts\n * let layerVisibility = map.getLayoutProperty('my-layer', 'visibility');\n * ```\n */\n setLight(light: LightSpecification, options: StyleSetterOptions = {}) {\n this._lazyInitEmptyStyle();\n this.style.setLight(light, options);\n return this._update(true);\n }\n\n /**\n * Returns the value of the light object.\n *\n * @returns light Light properties of the style.\n */\n getLight(): LightSpecification {\n return this.style.getLight();\n }\n\n /**\n * Sets the value of style's sky properties.\n *\n * @param sky - Sky properties to set. Must conform to the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/sky/).\n * @param options - Options object.\n *\n * @example\n * ```ts\n * map.setSky({'atmosphere-blend': 1.0});\n * ```\n */\n setSky(sky: SkySpecification, options: StyleSetterOptions = {}) {\n this._lazyInitEmptyStyle();\n this.style.setSky(sky, options);\n return this._update(true);\n }\n\n /**\n * Returns the value of the style's sky.\n *\n * @returns the sky properties of the style.\n * @example\n * ```ts\n * map.getSky();\n * ```\n */\n getSky(): SkySpecification {\n return this.style.getSky();\n }\n\n /**\n * Sets the `state` of a feature.\n * A feature's `state` is a set of user-defined key-value pairs that are assigned to a feature at runtime.\n * When using this method, the `state` object is merged with any existing key-value pairs in the feature's state.\n * Features are identified by their `feature.id` attribute, which can be any number or string.\n *\n * This method can only be used with sources that have a `feature.id` attribute. The `feature.id` attribute can be defined in three ways:\n *\n * - For vector or GeoJSON sources, including an `id` attribute in the original data file.\n * - For vector or GeoJSON sources, using the [`promoteId`](https://maplibre.org/maplibre-style-spec/sources/#promoteid) option at the time the source is defined.\n * - For GeoJSON sources, using the [`generateId`](https://maplibre.org/maplibre-style-spec/sources/#generateid) option to auto-assign an `id` based on the feature's index in the source data. If you change feature data using `map.getSource('some id').setData(..)`, you may need to re-apply state taking into account updated `id` values.\n *\n * !!! note\n * You can use the [`feature-state` expression](https://maplibre.org/maplibre-style-spec/expressions/#feature-state) to access the values in a feature's state object for the purposes of styling.\n *\n * @param feature - Feature identifier. Feature objects returned from\n * {@link Map.queryRenderedFeatures} or event handlers can be used as feature identifiers.\n * @param state - A set of key-value pairs. The values should be valid JSON types.\n *\n * @example\n * ```ts\n * // When the mouse moves over the `my-layer` layer, update\n * // the feature state for the feature under the mouse\n * map.on('mousemove', 'my-layer', (e) => {\n * if (e.features.length > 0) {\n * map.setFeatureState({\n * source: 'my-source',\n * sourceLayer: 'my-source-layer',\n * id: e.features[0].id,\n * }, {\n * hover: true\n * });\n * }\n * });\n * ```\n * @see [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n */\n setFeatureState(feature: FeatureIdentifier, state: any): this {\n this.style.setFeatureState(feature, state);\n return this._update();\n }\n\n /**\n * Removes the `state` of a feature, setting it back to the default behavior.\n * If only a `target.source` is specified, it will remove the state for all features from that source.\n * If `target.id` is also specified, it will remove all keys for that feature's state.\n * If `key` is also specified, it removes only that key from that feature's state.\n * Features are identified by their `feature.id` attribute, which can be any number or string.\n *\n * @param target - Identifier of where to remove state. It can be a source, a feature, or a specific key of feature.\n * Feature objects returned from {@link Map.queryRenderedFeatures} or event handlers can be used as feature identifiers.\n * @param key - (optional) The key in the feature state to reset.\n * @example\n * Reset the entire state object for all features in the `my-source` source\n * ```ts\n * map.removeFeatureState({\n * source: 'my-source'\n * });\n * ```\n *\n * @example\n * When the mouse leaves the `my-layer` layer,\n * reset the entire state object for the\n * feature under the mouse\n * ```ts\n * map.on('mouseleave', 'my-layer', (e) => {\n * map.removeFeatureState({\n * source: 'my-source',\n * sourceLayer: 'my-source-layer',\n * id: e.features[0].id\n * });\n * });\n * ```\n *\n * @example\n * When the mouse leaves the `my-layer` layer,\n * reset only the `hover` key-value pair in the\n * state for the feature under the mouse\n * ```ts\n * map.on('mouseleave', 'my-layer', (e) => {\n * map.removeFeatureState({\n * source: 'my-source',\n * sourceLayer: 'my-source-layer',\n * id: e.features[0].id\n * }, 'hover');\n * });\n * ```\n */\n removeFeatureState(target: FeatureIdentifier, key?: string): this {\n this.style.removeFeatureState(target, key);\n return this._update();\n }\n\n /**\n * Gets the `state` of a feature.\n * A feature's `state` is a set of user-defined key-value pairs that are assigned to a feature at runtime.\n * Features are identified by their `feature.id` attribute, which can be any number or string.\n *\n * !!! note\n * To access the values in a feature's state object for the purposes of styling the feature, use the [`feature-state` expression](https://maplibre.org/maplibre-style-spec/expressions/#feature-state).\n *\n * @param feature - Feature identifier. Feature objects returned from\n * {@link Map.queryRenderedFeatures} or event handlers can be used as feature identifiers.\n * @returns The state of the feature: a set of key-value pairs that was assigned to the feature at runtime.\n *\n * @example\n * When the mouse moves over the `my-layer` layer,\n * get the feature state for the feature under the mouse\n * ```ts\n * map.on('mousemove', 'my-layer', (e) => {\n * if (e.features.length > 0) {\n * map.getFeatureState({\n * source: 'my-source',\n * sourceLayer: 'my-source-layer',\n * id: e.features[0].id\n * });\n * }\n * });\n * ```\n */\n getFeatureState(feature: FeatureIdentifier): any {\n return this.style.getFeatureState(feature);\n }\n\n /**\n * Returns the map's containing HTML element.\n *\n * @returns The map's container.\n */\n getContainer(): HTMLElement {\n return this._container;\n }\n\n /**\n * Returns the HTML element containing the map's `` element.\n *\n * If you want to add non-GL overlays to the map, you should append them to this element.\n *\n * This is the element to which event bindings for map interactivity (such as panning and zooming) are\n * attached. It will receive bubbled events from child elements such as the ``, but not from\n * map controls.\n *\n * @returns The container of the map's ``.\n * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-point/)\n */\n getCanvasContainer(): HTMLElement {\n return this._canvasContainer;\n }\n\n /**\n * Returns the map's `` element.\n *\n * @returns The map's `` element.\n * @see [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-the-map-on-a-clicked-symbol/)\n */\n getCanvas(): HTMLCanvasElement {\n return this._canvas;\n }\n\n _containerDimensions() {\n let width = 0;\n let height = 0;\n\n if (this._container) {\n width = this._container.clientWidth || 400;\n height = this._container.clientHeight || 300;\n }\n\n return [width, height];\n }\n\n _setupContainer() {\n const container = this._container;\n container.classList.add('maplibregl-map');\n\n const canvasContainer = this._canvasContainer = DOM.create('div', 'maplibregl-canvas-container', container);\n if (this._interactive) {\n canvasContainer.classList.add('maplibregl-interactive');\n }\n\n this._canvas = DOM.create('canvas', 'maplibregl-canvas', canvasContainer);\n this._canvas.addEventListener('webglcontextlost', this._contextLost, false);\n this._canvas.addEventListener('webglcontextrestored', this._contextRestored, false);\n this._canvas.setAttribute('tabindex', this._interactive ? '0' : '-1');\n this._canvas.setAttribute('aria-label', this._getUIString('Map.Title'));\n this._canvas.setAttribute('role', 'region');\n\n const dimensions = this._containerDimensions();\n const clampedPixelRatio = this._getClampedPixelRatio(dimensions[0], dimensions[1]);\n this._resizeCanvas(dimensions[0], dimensions[1], clampedPixelRatio);\n\n const controlContainer = this._controlContainer = DOM.create('div', 'maplibregl-control-container', container);\n const positions = this._controlPositions = {};\n ['top-left', 'top-right', 'bottom-left', 'bottom-right'].forEach((positionName) => {\n positions[positionName] = DOM.create('div', `maplibregl-ctrl-${positionName} `, controlContainer);\n });\n\n this._container.addEventListener('scroll', this._onMapScroll, false);\n }\n\n _resizeCanvas(width: number, height: number, pixelRatio: number) {\n // Request the required canvas size taking the pixelratio into account.\n this._canvas.width = Math.floor(pixelRatio * width);\n this._canvas.height = Math.floor(pixelRatio * height);\n\n // Maintain the same canvas size, potentially downscaling it for HiDPI displays\n this._canvas.style.width = `${width}px`;\n this._canvas.style.height = `${height}px`;\n }\n\n _setupPainter() {\n\n // Maplibre WebGL context requires alpha, depth and stencil buffers. It also forces premultipliedAlpha: true.\n // We use the values provided in the map constructor for the rest of context attributes\n const attributes = {\n ...this._canvasContextAttributes,\n alpha: true,\n depth: true,\n stencil: true,\n premultipliedAlpha: true\n };\n\n let webglcontextcreationerrorDetailObject: any = null;\n this._canvas.addEventListener('webglcontextcreationerror', (args: WebGLContextEvent) => {\n webglcontextcreationerrorDetailObject = {requestedAttributes: attributes};\n if (args) {\n webglcontextcreationerrorDetailObject.statusMessage = args.statusMessage;\n webglcontextcreationerrorDetailObject.type = args.type;\n }\n }, {once: true});\n\n let gl: WebGL2RenderingContext | WebGLRenderingContext | null = null;\n if (this._canvasContextAttributes.contextType) {\n gl = this._canvas.getContext(this._canvasContextAttributes.contextType, attributes) as WebGL2RenderingContext | WebGLRenderingContext;\n } else {\n gl = this._canvas.getContext('webgl2', attributes) as WebGL2RenderingContext || this._canvas.getContext('webgl', attributes) as WebGLRenderingContext;\n }\n\n if (!gl) {\n const msg = 'Failed to initialize WebGL';\n if (webglcontextcreationerrorDetailObject) {\n webglcontextcreationerrorDetailObject.message = msg;\n throw new Error(JSON.stringify(webglcontextcreationerrorDetailObject));\n } else {\n throw new Error(msg);\n }\n }\n\n this.painter = new Painter(gl, this.transform);\n\n webpSupported.testSupport(gl);\n }\n\n override migrateProjection(newTransform: ITransform, newCameraHelper: ICameraHelper) {\n super.migrateProjection(newTransform, newCameraHelper);\n this.painter.transform = newTransform;\n this.fire(new Event('projectiontransition', {\n newProjection: this.style.projection.name,\n }));\n }\n\n _contextLost = (event: any) => {\n event.preventDefault();\n if (this._frameRequest) {\n this._frameRequest.abort();\n this._frameRequest = null;\n }\n this.painter.destroy();\n\n // check if style contains custom layers to warn user that they can't be restored automatically\n for (const layer of Object.values(this.style._layers)) {\n if (layer.type === 'custom') {\n console.warn(`Custom layer with id '${layer.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`);\n }\n\n if (layer._listeners) {\n for (const [event] of Object.entries(layer._listeners)) {\n console.warn(`Custom layer with id '${layer.id}' had event listeners for event '${event}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);\n }\n }\n }\n\n this._lostContextStyle = this._getStyleAndImages();\n this.style.destroy();\n this.style = null;\n this.fire(new Event('webglcontextlost', {originalEvent: event}));\n };\n\n _contextRestored = (event: any) => {\n if (this._lostContextStyle.style) {\n this.setStyle(this._lostContextStyle.style, {diff: false});\n }\n\n if (this._lostContextStyle.images) {\n this.style.imageManager.images = this._lostContextStyle.images;\n }\n\n this._setupPainter();\n this.resize();\n this._update();\n this.fire(new Event('webglcontextrestored', {originalEvent: event}));\n };\n\n _onMapScroll = (event: any) => {\n if (event.target !== this._container) return;\n\n // Revert any scroll which would move the canvas outside of the view\n this._container.scrollTop = 0;\n this._container.scrollLeft = 0;\n return false;\n };\n\n /**\n * Returns a Boolean indicating whether the map is fully loaded.\n *\n * Returns `false` if the style is not yet fully loaded,\n * or if there has been a change to the sources or style that\n * has not yet fully loaded.\n *\n * @returns A Boolean indicating whether the map is fully loaded.\n */\n loaded(): boolean {\n return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();\n }\n\n /**\n * @internal\n * Update this map's style and sources, and re-render the map.\n *\n * @param updateStyle - mark the map's style for reprocessing as\n * well as its sources\n */\n _update(updateStyle?: boolean) {\n if (!this.style || !this.style._loaded) return this;\n\n this._styleDirty = this._styleDirty || updateStyle;\n this._sourcesDirty = true;\n this.triggerRepaint();\n\n return this;\n }\n\n /**\n * @internal\n * Request that the given callback be executed during the next render\n * frame. Schedule a render frame if one is not already scheduled.\n *\n * @returns An id that can be used to cancel the callback\n */\n _requestRenderFrame(callback: () => void): TaskID {\n this._update();\n return this._renderTaskQueue.add(callback);\n }\n\n _cancelRenderFrame(id: TaskID) {\n this._renderTaskQueue.remove(id);\n }\n\n /**\n * @internal\n * Call when a (re-)render of the map is required:\n *\n * - The style has changed (`setPaintProperty()`, etc.)\n * - Source data has changed (e.g. tiles have finished loading)\n * - The map has is moving (or just finished moving)\n * - A transition is in progress\n *\n * @param paintStartTimeStamp - The time when the animation frame began executing.\n */\n _render(paintStartTimeStamp: number) {\n const fadeDuration = this._idleTriggered ? this._fadeDuration : 0;\n\n const isGlobeRendering = this.style.projection?.transitionState > 0;\n\n // A custom layer may have used the context asynchronously. Mark the state as dirty.\n this.painter.context.setDirty();\n this.painter.setBaseState();\n\n this._renderTaskQueue.run(paintStartTimeStamp);\n // A task queue callback may have fired a user event which may have removed the map\n if (this._removed) return;\n\n let crossFading = false;\n\n // If the style has changed, the map is being zoomed, or a transition or fade is in progress:\n // - Apply style changes (in a batch)\n // - Recalculate paint properties.\n if (this.style && this._styleDirty) {\n this._styleDirty = false;\n\n const zoom = this.transform.zoom;\n const currentTime = now();\n this.style.zoomHistory.update(zoom, currentTime);\n\n const parameters = new EvaluationParameters(zoom, {\n now: currentTime,\n fadeDuration,\n zoomHistory: this.style.zoomHistory,\n transition: this.style.getTransition()\n });\n\n const factor = parameters.crossFadingFactor();\n if (factor !== 1 || factor !== this._crossFadingFactor) {\n crossFading = true;\n this._crossFadingFactor = factor;\n }\n\n this.style.update(parameters);\n }\n\n const globeRenderingChanged = this.style.projection?.transitionState > 0 !== isGlobeRendering;\n this.style.projection?.setErrorQueryLatitudeDegrees(this.transform.center.lat);\n this.transform.setTransitionState(this.style.projection?.transitionState, this.style.projection?.latitudeErrorCorrectionRadians);\n\n // If we are in _render for any reason other than an in-progress paint\n // transition, update tile managers to check for and load any tiles we\n // need for the current transform\n if (this.style && (this._sourcesDirty || globeRenderingChanged)) {\n this._sourcesDirty = false;\n this.style._updateSources(this.transform);\n }\n\n // update terrain stuff\n if (this.terrain) {\n this.terrain.tileManager.update(this.transform, this.terrain);\n this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n if (!this._elevationFreeze && this._centerClampedToGround) {\n this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom));\n }\n } else {\n this.transform.setMinElevationForCurrentTile(0);\n if (this._centerClampedToGround) {\n this.transform.setElevation(0);\n }\n }\n\n this._placementDirty = this.style && this.style._updatePlacement(this.transform, this.showCollisionBoxes, fadeDuration, this._crossSourceCollisions, globeRenderingChanged);\n\n // Actually draw\n this.painter.render(this.style, {\n showTileBoundaries: this.showTileBoundaries,\n showOverdrawInspector: this._showOverdrawInspector,\n rotating: this.isRotating(),\n zooming: this.isZooming(),\n moving: this.isMoving(),\n fadeDuration,\n showPadding: this.showPadding,\n });\n\n this.fire(new Event('render'));\n\n if (this.loaded() && !this._loaded) {\n this._loaded = true;\n PerformanceUtils.mark(PerformanceMarkers.load);\n this.fire(new Event('load'));\n }\n\n if (this.style && (this.style.hasTransitions() || crossFading)) {\n this._styleDirty = true;\n }\n\n if (this.style && !this._placementDirty) {\n // Since no fade operations are in progress, we can release\n // all tiles held for fading. If we didn't do this, the tiles\n // would just sit in the TileManagers until the next render\n this.style._releaseSymbolFadeTiles();\n }\n\n // Schedule another render frame if it's needed.\n //\n // Even though `_styleDirty` and `_sourcesDirty` are reset in this\n // method, synchronous events fired during Style.update or\n // Style._updateSources could have caused them to be set again.\n const somethingDirty = this._sourcesDirty || this._styleDirty || this._placementDirty;\n if (somethingDirty || this._repaint) {\n this.triggerRepaint();\n } else if (!this.isMoving() && this.loaded()) {\n this.fire(new Event('idle'));\n }\n\n if (this._loaded && !this._fullyLoaded && !somethingDirty) {\n this._fullyLoaded = true;\n PerformanceUtils.mark(PerformanceMarkers.fullLoad);\n }\n\n return this;\n }\n\n /**\n * Force a synchronous redraw of the map.\n * @example\n * ```ts\n * map.redraw();\n * ```\n */\n redraw(): this {\n if (this.style) {\n // cancel the scheduled update\n if (this._frameRequest) {\n this._frameRequest.abort();\n this._frameRequest = null;\n }\n this._render(0);\n }\n return this;\n }\n\n /**\n * Clean up and release all internal resources associated with this map.\n *\n * This includes DOM elements, event bindings, web workers, and WebGL resources.\n *\n * Use this method when you are done using the map and wish to ensure that it no\n * longer consumes browser resources. Afterwards, you must not call any other\n * methods on the map.\n */\n remove() {\n if (this._hash) this._hash.remove();\n\n for (const control of this._controls) control.onRemove(this);\n this._controls = [];\n\n if (this._frameRequest) {\n this._frameRequest.abort();\n this._frameRequest = null;\n }\n this._renderTaskQueue.clear();\n this.painter.destroy();\n this.handlers.destroy();\n delete this.handlers;\n this.setStyle(null);\n if (typeof window !== 'undefined') {\n removeEventListener('online', this._onWindowOnline, false);\n }\n\n ImageRequest.removeThrottleControl(this._imageQueueHandle);\n\n this._resizeObserver?.disconnect();\n const extension = this.painter.context.gl.getExtension('WEBGL_lose_context');\n if (extension?.loseContext) extension.loseContext();\n this._canvas.removeEventListener('webglcontextrestored', this._contextRestored, false);\n this._canvas.removeEventListener('webglcontextlost', this._contextLost, false);\n DOM.remove(this._canvasContainer);\n DOM.remove(this._controlContainer);\n this._container.removeEventListener('scroll', this._onMapScroll, false);\n this._container.classList.remove('maplibregl-map');\n\n PerformanceUtils.clearMetrics();\n\n this._removed = true;\n this.fire(new Event('remove'));\n }\n\n /**\n * Trigger the rendering of a single frame. Use this method with custom layers to\n * repaint the map when the layer changes. Calling this multiple times before the\n * next frame is rendered will still result in only a single frame being rendered.\n * @example\n * ```ts\n * map.triggerRepaint();\n * ```\n * @see [Add a 3D model](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-3d-model-using-threejs/)\n * @see [Add an animated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-an-animated-icon-to-the-map/)\n */\n triggerRepaint() {\n if (this.style && !this._frameRequest) {\n this._frameRequest = new AbortController();\n browser.frame(\n this._frameRequest,\n (paintStartTimeStamp) => {\n PerformanceUtils.frame(paintStartTimeStamp);\n this._frameRequest = null;\n try {\n this._render(paintStartTimeStamp);\n } catch(error) {\n if (!isAbortError(error) && !isFramebufferNotCompleteError(error)) {\n throw error;\n }\n }\n },\n () => {}\n );\n }\n }\n\n _onWindowOnline = () => {\n this._update();\n };\n\n /**\n * Gets and sets a Boolean indicating whether the map will render an outline\n * around each tile and the tile ID. These tile boundaries are useful for\n * debugging.\n *\n * The uncompressed file size of the first vector source is drawn in the top left\n * corner of each tile, next to the tile ID.\n *\n * @example\n * ```ts\n * map.showTileBoundaries = true;\n * ```\n */\n get showTileBoundaries(): boolean { return !!this._showTileBoundaries; }\n set showTileBoundaries(value: boolean) {\n if (this._showTileBoundaries === value) return;\n this._showTileBoundaries = value;\n this._update();\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will visualize\n * the padding offsets.\n */\n get showPadding(): boolean { return !!this._showPadding; }\n set showPadding(value: boolean) {\n if (this._showPadding === value) return;\n this._showPadding = value;\n this._update();\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will render boxes\n * around all symbols in the data source, revealing which symbols\n * were rendered or which were hidden due to collisions.\n * This information is useful for debugging.\n */\n get showCollisionBoxes(): boolean { return !!this._showCollisionBoxes; }\n set showCollisionBoxes(value: boolean) {\n if (this._showCollisionBoxes === value) return;\n this._showCollisionBoxes = value;\n if (value) {\n // When we turn collision boxes on we have to generate them for existing tiles\n // When we turn them off, there's no cost to leaving existing boxes in place\n this.style._generateCollisionBoxes();\n } else {\n // Otherwise, call an update to remove collision boxes\n this._update();\n }\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map should color-code\n * each fragment to show how many times it has been shaded.\n * White fragments have been shaded 8 or more times.\n * Black fragments have been shaded 0 times.\n * This information is useful for debugging.\n */\n get showOverdrawInspector(): boolean { return !!this._showOverdrawInspector; }\n set showOverdrawInspector(value: boolean) {\n if (this._showOverdrawInspector === value) return;\n this._showOverdrawInspector = value;\n this._update();\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will\n * continuously repaint. This information is useful for analyzing performance.\n */\n get repaint(): boolean { return !!this._repaint; }\n set repaint(value: boolean) {\n if (this._repaint !== value) {\n this._repaint = value;\n this.triggerRepaint();\n }\n }\n // show vertices\n get vertices(): boolean { return !!this._vertices; }\n set vertices(value: boolean) { this._vertices = value; this._update(); }\n\n /**\n * Returns the package version of the library\n * @returns Package version of the library\n */\n get version(): string {\n return version;\n }\n\n /**\n * Returns the elevation for the point where the camera is looking.\n * This value corresponds to:\n * \"meters above sea level\" * \"exaggeration\"\n * @returns The elevation.\n */\n getCameraTargetElevation(): number {\n return this.transform.elevation;\n }\n\n /**\n * Gets the {@link ProjectionSpecification}.\n * @returns the projection specification.\n * @example\n * ```ts\n * let projection = map.getProjection();\n * ```\n */\n getProjection(): ProjectionSpecification { return this.style.getProjection(); }\n\n /**\n * Sets the {@link ProjectionSpecification}.\n * @param projection - the projection specification to set\n * @returns\n */\n setProjection(projection: ProjectionSpecification) {\n this._lazyInitEmptyStyle();\n this.style.setProjection(projection);\n return this._update(true);\n }\n}\n","import Point from '@mapbox/point-geometry';\n\nimport {DOM} from '../../util/dom';\nimport {extend, getAngleDelta} from '../../util/util';\nimport {DragHandler, type DragMoveHandler, type DragRotateResult} from '../handler/drag_handler';\nimport {MouseOrTouchMoveStateManager} from '../handler/drag_move_state_manager';\n\nimport type {Map} from '../map';\nimport type {IControl} from './control';\n\n/**\n * The {@link NavigationControl} options object\n */\nexport type NavigationControlOptions = {\n /**\n * If `true` the compass button is included.\n */\n showCompass?: boolean;\n /**\n * If `true` the zoom-in and zoom-out buttons are included.\n */\n showZoom?: boolean;\n /**\n * If `true` the pitch is visualized by rotating X-axis of compass.\n */\n visualizePitch?: boolean;\n /**\n * If `true` the roll is visualized by rotating the compass.\n */\n visualizeRoll?: boolean;\n};\n\nconst defaultOptions: NavigationControlOptions = {\n showCompass: true,\n showZoom: true,\n visualizePitch: false,\n visualizeRoll: true\n};\n\n/**\n * A `NavigationControl` control contains zoom buttons and a compass.\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * let nav = new NavigationControl();\n * map.addControl(nav, 'top-left');\n * ```\n * @see [Display map navigation controls](https://maplibre.org/maplibre-gl-js/docs/examples/display-map-navigation-controls/)\n */\nexport class NavigationControl implements IControl {\n _map: Map;\n options: NavigationControlOptions;\n _container: HTMLElement;\n _zoomInButton: HTMLButtonElement;\n _zoomOutButton: HTMLButtonElement;\n _compass: HTMLButtonElement;\n _compassIcon: HTMLElement;\n _handler: MouseRotateWrapper;\n\n /**\n * @param options - the control's options\n */\n constructor(options?: NavigationControlOptions) {\n this.options = extend({}, defaultOptions, options);\n\n this._container = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-group');\n this._container.addEventListener('contextmenu', (e) => e.preventDefault());\n\n if (this.options.showZoom) {\n this._zoomInButton = this._createButton('maplibregl-ctrl-zoom-in', (e) => this._map.zoomIn({}, {originalEvent: e}));\n DOM.create('span', 'maplibregl-ctrl-icon', this._zoomInButton).setAttribute('aria-hidden', 'true');\n this._zoomOutButton = this._createButton('maplibregl-ctrl-zoom-out', (e) => this._map.zoomOut({}, {originalEvent: e}));\n DOM.create('span', 'maplibregl-ctrl-icon', this._zoomOutButton).setAttribute('aria-hidden', 'true');\n }\n if (this.options.showCompass) {\n this._compass = this._createButton('maplibregl-ctrl-compass', (e) => {\n if (this.options.visualizePitch) {\n this._map.resetNorthPitch({}, {originalEvent: e});\n } else {\n this._map.resetNorth({}, {originalEvent: e});\n }\n });\n this._compassIcon = DOM.create('span', 'maplibregl-ctrl-icon', this._compass);\n this._compassIcon.setAttribute('aria-hidden', 'true');\n }\n }\n\n _updateZoomButtons = () => {\n const zoom = this._map.getZoom();\n const isMax = zoom === this._map.getMaxZoom();\n const isMin = zoom === this._map.getMinZoom();\n this._zoomInButton.disabled = isMax;\n this._zoomOutButton.disabled = isMin;\n this._zoomInButton.setAttribute('aria-disabled', isMax.toString());\n this._zoomOutButton.setAttribute('aria-disabled', isMin.toString());\n };\n\n _rotateCompassArrow = () => {\n if (this.options.visualizePitch && this.options.visualizeRoll) {\n this._compassIcon.style.transform = `scale(${1 / Math.pow(Math.cos(this._map.transform.pitchInRadians), 0.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`;\n return;\n }\n if (this.options.visualizePitch) {\n this._compassIcon.style.transform = `scale(${1 / Math.pow(Math.cos(this._map.transform.pitchInRadians), 0.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`;\n return;\n }\n if (this.options.visualizeRoll) {\n this._compassIcon.style.transform = `rotate(${-this._map.transform.bearing - this._map.transform.roll}deg)`;\n return;\n }\n this._compassIcon.style.transform = `rotate(${-this._map.transform.bearing}deg)`;\n };\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n if (this.options.showZoom) {\n this._setButtonTitle(this._zoomInButton, 'ZoomIn');\n this._setButtonTitle(this._zoomOutButton, 'ZoomOut');\n this._map.on('zoom', this._updateZoomButtons);\n this._updateZoomButtons();\n }\n if (this.options.showCompass) {\n this._setButtonTitle(this._compass, 'ResetBearing');\n if (this.options.visualizePitch) {\n this._map.on('pitch', this._rotateCompassArrow);\n }\n if (this.options.visualizeRoll) {\n this._map.on('roll', this._rotateCompassArrow);\n }\n this._map.on('rotate', this._rotateCompassArrow);\n this._rotateCompassArrow();\n this._handler = new MouseRotateWrapper(this._map, this._compass, this.options.visualizePitch);\n }\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n if (this.options.showZoom) {\n this._map.off('zoom', this._updateZoomButtons);\n }\n if (this.options.showCompass) {\n if (this.options.visualizePitch) {\n this._map.off('pitch', this._rotateCompassArrow);\n }\n if (this.options.visualizeRoll) {\n this._map.off('roll', this._rotateCompassArrow);\n }\n this._map.off('rotate', this._rotateCompassArrow);\n this._handler.off();\n delete this._handler;\n }\n\n delete this._map;\n }\n\n _createButton(className: string, fn: (e?: any) => unknown) {\n const a = DOM.create('button', className, this._container) as HTMLButtonElement;\n a.type = 'button';\n a.addEventListener('click', fn);\n return a;\n }\n\n _setButtonTitle = (button: HTMLButtonElement, title: 'ZoomIn' | 'ZoomOut' | 'ResetBearing') => {\n const str = this._map._getUIString(`NavigationControl.${title}`);\n button.title = str;\n button.setAttribute('aria-label', str);\n };\n}\n\nclass MouseRotateWrapper {\n\n map: Map;\n _clickTolerance: number;\n element: HTMLElement;\n _rotatePitchHandler: DragMoveHandler;\n _startPos: Point;\n _lastPos: Point;\n\n constructor(map: Map, element: HTMLElement, pitch: boolean = false) {\n this._clickTolerance = 10;\n this.element = element;\n \n const moveStateManager = new MouseOrTouchMoveStateManager();\n this._rotatePitchHandler = new DragHandler({\n clickTolerance: 3,\n move: (lastPoint: Point, currentPoint: Point) => {\n const rect = element.getBoundingClientRect();\n const center = new Point((rect.bottom - rect.top) / 2, (rect.right - rect.left) / 2);\n const bearingDelta = getAngleDelta(new Point(lastPoint.x, currentPoint.y), currentPoint, center);\n const pitchDelta = pitch ? (currentPoint.y - lastPoint.y) * -0.5 : undefined;\n return {bearingDelta, pitchDelta};\n },\n moveStateManager,\n enable: true,\n assignEvents: () => {},\n });\n this.map = map;\n\n DOM.addEventListener(element, 'mousedown', this.mousedown);\n DOM.addEventListener(element, 'touchstart', this.touchstart, {passive: false});\n DOM.addEventListener(element, 'touchcancel', this.reset);\n }\n\n startMove(e: MouseEvent | TouchEvent, point: Point) {\n this._rotatePitchHandler.dragStart(e, point);\n DOM.disableDrag();\n }\n\n move(e: MouseEvent | TouchEvent, point: Point) {\n const map = this.map;\n const {bearingDelta, pitchDelta} = this._rotatePitchHandler.dragMove(e, point) || {};\n if (bearingDelta) map.setBearing(map.getBearing() + bearingDelta);\n if (pitchDelta) map.setPitch(map.getPitch() + pitchDelta);\n }\n\n off() {\n const element = this.element;\n DOM.removeEventListener(element, 'mousedown', this.mousedown);\n DOM.removeEventListener(element, 'touchstart', this.touchstart, {passive: false});\n DOM.removeEventListener(window, 'touchmove', this.touchmove, {passive: false});\n DOM.removeEventListener(window, 'touchend', this.touchend);\n DOM.removeEventListener(element, 'touchcancel', this.reset);\n this.offTemp();\n }\n\n offTemp() {\n DOM.enableDrag();\n DOM.removeEventListener(window, 'mousemove', this.mousemove);\n DOM.removeEventListener(window, 'mouseup', this.mouseup);\n DOM.removeEventListener(window, 'touchmove', this.touchmove, {passive: false});\n DOM.removeEventListener(window, 'touchend', this.touchend);\n }\n\n mousedown = (e: MouseEvent) => {\n this.startMove(e, DOM.mousePos(this.element, e));\n DOM.addEventListener(window, 'mousemove', this.mousemove);\n DOM.addEventListener(window, 'mouseup', this.mouseup);\n };\n\n mousemove = (e: MouseEvent) => {\n this.move(e, DOM.mousePos(this.element, e));\n };\n\n mouseup = (e: MouseEvent) => {\n this._rotatePitchHandler.dragEnd(e);\n this.offTemp();\n };\n\n touchstart = (e: TouchEvent) => {\n if (e.targetTouches.length !== 1) {\n this.reset();\n } else {\n this._startPos = this._lastPos = DOM.touchPos(this.element, e.targetTouches)[0];\n this.startMove(e, this._startPos);\n DOM.addEventListener(window, 'touchmove', this.touchmove, {passive: false});\n DOM.addEventListener(window, 'touchend', this.touchend);\n }\n };\n\n touchmove = (e: TouchEvent) => {\n if (e.targetTouches.length !== 1) {\n this.reset();\n } else {\n this._lastPos = DOM.touchPos(this.element, e.targetTouches)[0];\n this.move(e, this._lastPos);\n }\n };\n\n touchend = (e: TouchEvent) => {\n if (e.targetTouches.length === 0 &&\n this._startPos &&\n this._lastPos &&\n this._startPos.dist(this._lastPos) < this._clickTolerance) {\n this.element.click();\n }\n delete this._startPos;\n delete this._lastPos;\n this.offTemp();\n };\n\n reset = () => {\n this._rotatePitchHandler.reset();\n delete this._startPos;\n delete this._lastPos;\n this.offTemp();\n };\n}\n","let supportsGeolocation;\n\nexport async function checkGeolocationSupport(forceRecalculation = false): Promise {\n if (supportsGeolocation !== undefined && !forceRecalculation) {\n return supportsGeolocation;\n }\n if (window.navigator.permissions === undefined) {\n supportsGeolocation = !!window.navigator.geolocation;\n return supportsGeolocation;\n }\n // navigator.permissions has incomplete browser support\n // https://caniuse.com/#feat=permissions-api\n // Test for the case where a browser disables Geolocation because of an\n // insecure origin\n try {\n const permissions = await window.navigator.permissions.query({name: 'geolocation'});\n supportsGeolocation = permissions.state !== 'denied';\n } catch {\n // Fix for iOS16 which rejects query but still supports geolocation\n supportsGeolocation = !!window.navigator.geolocation;\n }\n return supportsGeolocation;\n}\n","import {LngLat} from '../geo/lng_lat';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {IReadonlyTransform} from '../geo/transform_interface';\n\n/**\n * Given a LngLat, prior projected position, and a transform, return a new LngLat shifted\n * n × 360° east or west for some n ≥ 0 such that:\n *\n * * the projected location of the result is on screen, if possible, and secondarily:\n * * the difference between the projected location of the result and the prior position\n * is minimized.\n *\n * The object is to preserve perceived object constancy for Popups and Markers as much as\n * possible; they should avoid shifting large distances across the screen, even when the\n * map center changes by ±360° due to automatic wrapping, and when about to go off screen,\n * should wrap just enough to avoid doing so.\n */\nexport function smartWrap(lngLat: LngLat, priorPos: Point, transform: IReadonlyTransform, useNormalWrap: boolean = false): LngLat {\n if (useNormalWrap || !transform.getCoveringTilesDetailsProvider().allowWorldCopies()) {\n return lngLat?.wrap();\n }\n const originalLngLat = new LngLat(lngLat.lng, lngLat.lat);\n lngLat = new LngLat(lngLat.lng, lngLat.lat);\n\n // First, try shifting one world in either direction, and see if either is closer to the\n // prior position. This preserves object constancy when the map center is auto-wrapped\n // during animations.\n if (priorPos) {\n const left = new LngLat(lngLat.lng - 360, lngLat.lat);\n const right = new LngLat(lngLat.lng + 360, lngLat.lat);\n const delta = transform.locationToScreenPoint(lngLat).distSqr(priorPos);\n if (transform.locationToScreenPoint(left).distSqr(priorPos) < delta) {\n lngLat = left;\n } else if (transform.locationToScreenPoint(right).distSqr(priorPos) < delta) {\n lngLat = right;\n }\n }\n\n // Second, wrap toward the center until the new position is on screen, or we can't get\n // any closer.\n while (Math.abs(lngLat.lng - transform.center.lng) > 180) {\n const pos = transform.locationToScreenPoint(lngLat);\n if (pos.x >= 0 && pos.y >= 0 && pos.x <= transform.width && pos.y <= transform.height) {\n break;\n }\n if (lngLat.lng > transform.center.lng) {\n lngLat.lng -= 360;\n } else {\n lngLat.lng += 360;\n }\n }\n\n // Apply the change only if new coord is below horizon\n if (lngLat.lng !== originalLngLat.lng && transform.isPointOnMapSurface(transform.locationToScreenPoint(lngLat))) {\n return lngLat;\n }\n\n return originalLngLat;\n}\n","/**\n * Where to position the anchor.\n * Used by a popup and a marker.\n */\nexport type PositionAnchor = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport const anchorTranslate: {\n [_ in PositionAnchor]: string;\n} = {\n 'center': 'translate(-50%,-50%)',\n 'top': 'translate(-50%,0)',\n 'top-left': 'translate(0,0)',\n 'top-right': 'translate(-100%,0)',\n 'bottom': 'translate(-50%,-100%)',\n 'bottom-left': 'translate(0,-100%)',\n 'bottom-right': 'translate(-100%,-100%)',\n 'left': 'translate(0,-50%)',\n 'right': 'translate(-100%,-50%)'\n};\n\nexport function applyAnchorClass(element: HTMLElement, anchor: PositionAnchor, prefix: string) {\n const classList = element.classList;\n for (const key in anchorTranslate) {\n classList.remove(`maplibregl-${prefix}-anchor-${key}`);\n }\n classList.add(`maplibregl-${prefix}-anchor-${anchor}`);\n}\n","import {DOM} from '../util/dom';\nimport {browser} from '../util/browser';\nimport {LngLat} from '../geo/lng_lat';\nimport Point from '@mapbox/point-geometry';\nimport {smartWrap} from '../util/smart_wrap';\nimport {anchorTranslate, applyAnchorClass} from './anchor';\nimport type {PositionAnchor} from './anchor';\nimport {Event, Evented} from '../util/evented';\nimport type {Map} from './map';\nimport {type Popup, type Offset} from './popup';\nimport type {LngLatLike} from '../geo/lng_lat';\nimport type {MapMouseEvent, MapTouchEvent} from './events';\nimport type {PointLike} from './camera';\n\n/**\n * Alignment options of rotation and pitch\n */\nexport type Alignment = 'map' | 'viewport' | 'auto';\n\n/**\n * The {@link Marker} options object\n */\nexport type MarkerOptions = {\n /**\n * DOM element to use as a marker. The default is a light blue, droplet-shaped SVG marker.\n */\n element?: HTMLElement;\n /**\n * Space-separated CSS class names to add to marker element.\n */\n className?: string;\n /**\n * The offset in pixels as a {@link PointLike} object to apply relative to the element's center. Negatives indicate left and up.\n */\n offset?: PointLike;\n /**\n * A string indicating the part of the Marker that should be positioned closest to the coordinate set via {@link Marker.setLngLat}.\n * Options are `'center'`, `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-left'`, `'top-right'`, `'bottom-left'`, and `'bottom-right'`.\n * @defaultValue 'center'\n * */\n anchor?: PositionAnchor;\n /**\n * The color to use for the default marker if options.element is not provided. The default is light blue.\n * @defaultValue '#3FB1CE'\n */\n color?: string;\n /**\n * The scale to use for the default marker if options.element is not provided. The default scale corresponds to a height of `41px` and a width of `27px`.\n * @defaultValue 1\n */\n scale?: number;\n /**\n * A boolean indicating whether or not a marker is able to be dragged to a new position on the map.\n * @defaultValue false\n */\n draggable?: boolean;\n /**\n * The max number of pixels a user can shift the mouse pointer during a click on the marker for it to be considered a valid click (as opposed to a marker drag). The default is to inherit map's clickTolerance.\n * @defaultValue 0\n */\n clickTolerance?: number;\n /**\n * The rotation angle of the marker in degrees, relative to its respective `rotationAlignment` setting. A positive value will rotate the marker clockwise.\n * @defaultValue 0\n */\n rotation?: number;\n /**\n * `map` aligns the `Marker`'s rotation relative to the map, maintaining a bearing as the map rotates. `viewport` aligns the `Marker`'s rotation relative to the viewport, agnostic to map rotations. `auto` is equivalent to `viewport`.\n * @defaultValue 'auto'\n */\n rotationAlignment?: Alignment;\n /**\n * `map` aligns the `Marker` to the plane of the map. `viewport` aligns the `Marker` to the plane of the viewport. `auto` automatically matches the value of `rotationAlignment`.\n * @defaultValue 'auto'\n */\n pitchAlignment?: Alignment;\n /**\n * Marker's opacity when it's in clear view (not behind 3d terrain)\n * @defaultValue 1\n */\n opacity?: string;\n /**\n * Marker's opacity when it's behind 3d terrain\n * @defaultValue 0.2\n */\n opacityWhenCovered?: string;\n /**\n * If `true`, rounding is disabled for placement of the marker, allowing for\n * subpixel positioning and smoother movement when the marker is translated.\n * @defaultValue false\n */\n subpixelPositioning?: boolean;\n};\n\n/**\n * Creates a marker component\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * let marker = new Marker()\n * .setLngLat([30.5, 50.5])\n * .addTo(map);\n * ```\n *\n * @example\n * Set options\n * ```ts\n * let marker = new Marker({\n * color: \"#FFFFFF\",\n * draggable: true\n * }).setLngLat([30.5, 50.5])\n * .addTo(map);\n * ```\n * @see [Add custom icons with Markers](https://maplibre.org/maplibre-gl-js/docs/examples/add-custom-icons-with-markers/)\n * @see [Create a draggable Marker](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-marker/)\n *\n * ## Events\n *\n * **Event** `dragstart` of type {@link Event} will be fired when dragging starts.\n *\n * **Event** `drag` of type {@link Event} will be fired while dragging.\n *\n * **Event** `dragend` of type {@link Event} will be fired when the marker is finished being dragged.\n */\nexport class Marker extends Evented {\n _map: Map;\n _anchor: PositionAnchor;\n _offset: Point;\n _element: HTMLElement;\n _popup: Popup;\n _lngLat: LngLat;\n _pos: Point;\n _flatPos: Point;\n _color: string;\n _scale: number;\n _defaultMarker: boolean;\n _draggable: boolean;\n _clickTolerance: number;\n _isDragging: boolean;\n _state: 'inactive' | 'pending' | 'active'; // used for handling drag events\n _positionDelta: Point;\n _pointerdownPos: Point;\n _rotation: number;\n _pitchAlignment: Alignment;\n _rotationAlignment: Alignment;\n _originalTabIndex: string; // original tabindex of _element\n _opacity: string;\n _opacityWhenCovered: string;\n _opacityTimeout: ReturnType;\n _subpixelPositioning: boolean;\n\n /**\n * @param options - the options\n */\n constructor(options?: MarkerOptions) {\n super();\n\n this._anchor = options && options.anchor || 'center';\n this._color = options && options.color || '#3FB1CE';\n this._scale = options && options.scale || 1;\n this._draggable = options && options.draggable || false;\n this._clickTolerance = options && options.clickTolerance || 0;\n this._subpixelPositioning = options && options.subpixelPositioning || false;\n this._isDragging = false;\n this._state = 'inactive';\n this._rotation = options && options.rotation || 0;\n this._rotationAlignment = options && options.rotationAlignment || 'auto';\n this._pitchAlignment = options && options.pitchAlignment && options.pitchAlignment !== 'auto' ? options.pitchAlignment : this._rotationAlignment;\n this.setOpacity(options?.opacity, options?.opacityWhenCovered);\n\n if (!options || !options.element) {\n this._defaultMarker = true;\n this._element = DOM.create('div');\n\n // create default map marker SVG\n const svg = DOM.createNS('http://www.w3.org/2000/svg', 'svg');\n const defaultHeight = 41;\n const defaultWidth = 27;\n svg.setAttributeNS(null, 'display', 'block');\n svg.setAttributeNS(null, 'height', `${defaultHeight}px`);\n svg.setAttributeNS(null, 'width', `${defaultWidth}px`);\n svg.setAttributeNS(null, 'viewBox', `0 0 ${defaultWidth} ${defaultHeight}`);\n\n const markerLarge = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n markerLarge.setAttributeNS(null, 'stroke', 'none');\n markerLarge.setAttributeNS(null, 'stroke-width', '1');\n markerLarge.setAttributeNS(null, 'fill', 'none');\n markerLarge.setAttributeNS(null, 'fill-rule', 'evenodd');\n\n const page1 = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n page1.setAttributeNS(null, 'fill-rule', 'nonzero');\n\n const shadow = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n shadow.setAttributeNS(null, 'transform', 'translate(3.0, 29.0)');\n shadow.setAttributeNS(null, 'fill', '#000000');\n\n const ellipses = [\n {'rx': '10.5', 'ry': '5.25002273'},\n {'rx': '10.5', 'ry': '5.25002273'},\n {'rx': '9.5', 'ry': '4.77275007'},\n {'rx': '8.5', 'ry': '4.29549936'},\n {'rx': '7.5', 'ry': '3.81822308'},\n {'rx': '6.5', 'ry': '3.34094679'},\n {'rx': '5.5', 'ry': '2.86367051'},\n {'rx': '4.5', 'ry': '2.38636864'}\n ];\n\n for (const data of ellipses) {\n const ellipse = DOM.createNS('http://www.w3.org/2000/svg', 'ellipse');\n ellipse.setAttributeNS(null, 'opacity', '0.04');\n ellipse.setAttributeNS(null, 'cx', '10.5');\n ellipse.setAttributeNS(null, 'cy', '5.80029008');\n ellipse.setAttributeNS(null, 'rx', data['rx']);\n ellipse.setAttributeNS(null, 'ry', data['ry']);\n shadow.appendChild(ellipse);\n }\n\n const background = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n background.setAttributeNS(null, 'fill', this._color);\n\n const bgPath = DOM.createNS('http://www.w3.org/2000/svg', 'path');\n bgPath.setAttributeNS(null, 'd', 'M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z');\n\n background.appendChild(bgPath);\n\n const border = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n border.setAttributeNS(null, 'opacity', '0.25');\n border.setAttributeNS(null, 'fill', '#000000');\n\n const borderPath = DOM.createNS('http://www.w3.org/2000/svg', 'path');\n borderPath.setAttributeNS(null, 'd', 'M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z');\n\n border.appendChild(borderPath);\n\n const maki = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n maki.setAttributeNS(null, 'transform', 'translate(6.0, 7.0)');\n maki.setAttributeNS(null, 'fill', '#FFFFFF');\n\n const circleContainer = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n circleContainer.setAttributeNS(null, 'transform', 'translate(8.0, 8.0)');\n\n const circle1 = DOM.createNS('http://www.w3.org/2000/svg', 'circle');\n circle1.setAttributeNS(null, 'fill', '#000000');\n circle1.setAttributeNS(null, 'opacity', '0.25');\n circle1.setAttributeNS(null, 'cx', '5.5');\n circle1.setAttributeNS(null, 'cy', '5.5');\n circle1.setAttributeNS(null, 'r', '5.4999962');\n\n const circle2 = DOM.createNS('http://www.w3.org/2000/svg', 'circle');\n circle2.setAttributeNS(null, 'fill', '#FFFFFF');\n circle2.setAttributeNS(null, 'cx', '5.5');\n circle2.setAttributeNS(null, 'cy', '5.5');\n circle2.setAttributeNS(null, 'r', '5.4999962');\n\n circleContainer.appendChild(circle1);\n circleContainer.appendChild(circle2);\n\n page1.appendChild(shadow);\n page1.appendChild(background);\n page1.appendChild(border);\n page1.appendChild(maki);\n page1.appendChild(circleContainer);\n\n svg.appendChild(page1);\n\n svg.setAttributeNS(null, 'height', `${defaultHeight * this._scale}px`);\n svg.setAttributeNS(null, 'width', `${defaultWidth * this._scale}px`);\n\n this._element.appendChild(svg);\n\n // if no element and no offset option given apply an offset for the default marker\n // the -14 as the y value of the default marker offset was determined as follows\n //\n // the marker tip is at the center of the shadow ellipse from the default svg\n // the y value of the center of the shadow ellipse relative to the svg top left is \"shadow transform translate-y (29.0) + ellipse cy (5.80029008)\"\n // offset to the svg center \"height (41 / 2)\" gives (29.0 + 5.80029008) - (41 / 2) and rounded for an integer pixel offset gives 14\n // negative is used to move the marker up from the center so the tip is at the Marker lngLat\n this._offset = Point.convert(options && options.offset || [0, -14]);\n } else {\n this._element = options.element;\n this._offset = Point.convert(options && options.offset || [0, 0]);\n }\n\n this._element.classList.add('maplibregl-marker');\n this._element.addEventListener('dragstart', (e: DragEvent) => {\n e.preventDefault();\n });\n this._element.addEventListener('mousedown', (e: MouseEvent) => {\n // prevent focusing on click\n e.preventDefault();\n });\n applyAnchorClass(this._element, this._anchor, 'marker');\n\n if (options && options.className) {\n for (const name of options.className.split(' ')) {\n this._element.classList.add(name);\n }\n }\n\n this._popup = null;\n }\n\n /**\n * Attaches the `Marker` to a `Map` object.\n * @param map - The MapLibre GL JS map to add the marker to.\n * @example\n * ```ts\n * let marker = new Marker()\n * .setLngLat([30.5, 50.5])\n * .addTo(map); // add the marker to the map\n * ```\n */\n addTo(map: Map): this {\n this.remove();\n this._map = map;\n\n if (!this._element.hasAttribute('aria-label')) {\n this._element.setAttribute('aria-label', map._getUIString('Marker.Title'));\n }\n\n // aria-label is set either by user or above default, so set role\n // since div is interactive and cannot have aria-label without a role\n if (!this._element.hasAttribute('role')) {\n this._element.setAttribute('role', 'button');\n }\n\n map.getCanvasContainer().appendChild(this._element);\n map.on('move', this._update);\n map.on('moveend', this._update);\n map.on('terrain', this._update);\n map.on('projectiontransition', this._update);\n\n this.setDraggable(this._draggable);\n this._update();\n\n // If we attached the `click` listener to the marker element, the popup\n // would close once the event propagated to `map` due to the\n // `Popup._onClickClose` listener.\n this._map.on('click', this._onMapClick);\n\n return this;\n }\n\n /**\n * Removes the marker from a map\n * @example\n * ```ts\n * let marker = new Marker().addTo(map);\n * marker.remove();\n * ```\n */\n remove(): this {\n if (this._opacityTimeout) {\n clearTimeout(this._opacityTimeout);\n delete this._opacityTimeout;\n }\n if (this._map) {\n this._map.off('click', this._onMapClick);\n this._map.off('move', this._update);\n this._map.off('moveend', this._update);\n this._map.off('terrain', this._update);\n this._map.off('projectiontransition', this._update);\n this._map.off('mousedown', this._addDragHandler);\n this._map.off('touchstart', this._addDragHandler);\n this._map.off('mouseup', this._onUp);\n this._map.off('touchend', this._onUp);\n this._map.off('mousemove', this._onMove);\n this._map.off('touchmove', this._onMove);\n delete this._map;\n }\n DOM.remove(this._element);\n if (this._popup) this._popup.remove();\n return this;\n }\n\n /**\n * Get the marker's geographical location.\n *\n * The longitude of the result may differ by a multiple of 360 degrees from the longitude previously\n * set by `setLngLat` because `Marker` wraps the anchor longitude across copies of the world to keep\n * the marker on screen.\n *\n * @returns A {@link LngLat} describing the marker's location.\n * @example\n * ```ts\n * // Store the marker's longitude and latitude coordinates in a variable\n * let lngLat = marker.getLngLat();\n * // Print the marker's longitude and latitude values in the console\n * console.log('Longitude: ' + lngLat.lng + ', Latitude: ' + lngLat.lat )\n * ```\n * @see [Create a draggable Marker](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-marker/)\n */\n getLngLat(): LngLat {\n return this._lngLat;\n }\n\n /**\n * Set the marker's geographical position and move it.\n * @param lnglat - A {@link LngLat} describing where the marker should be located.\n * @example\n * Create a new marker, set the longitude and latitude, and add it to the map\n * ```ts\n * new Marker()\n * .setLngLat([-65.017, -16.457])\n * .addTo(map);\n * ```\n * @see [Add custom icons with Markers](https://maplibre.org/maplibre-gl-js/docs/examples/add-custom-icons-with-markers/)\n * @see [Create a draggable Marker](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-draggable-marker/)\n */\n setLngLat(lnglat: LngLatLike): this {\n this._lngLat = LngLat.convert(lnglat);\n this._pos = null;\n if (this._popup) this._popup.setLngLat(this._lngLat);\n this._update();\n return this;\n }\n\n /**\n * Returns the `Marker`'s HTML element.\n * @returns element\n */\n getElement(): HTMLElement {\n return this._element;\n }\n\n /**\n * Binds a {@link Popup} to the {@link Marker}.\n * @param popup - An instance of the {@link Popup} class. If undefined or null, any popup\n * set on this {@link Marker} instance is unset.\n * @example\n * ```ts\n * let marker = new Marker()\n * .setLngLat([0, 0])\n * .setPopup(new Popup().setHTML(\"

Hello World!

\")) // add popup\n * .addTo(map);\n * ```\n * @see [Attach a popup to a marker instance](https://maplibre.org/maplibre-gl-js/docs/examples/attach-a-popup-to-a-marker-instance/)\n */\n setPopup(popup?: Popup | null): this {\n if (this._popup) {\n this._popup.remove();\n this._popup = null;\n this._element.removeEventListener('keypress', this._onKeyPress);\n\n if (!this._originalTabIndex) {\n this._element.removeAttribute('tabindex');\n }\n }\n\n if (popup) {\n if (!('offset' in popup.options)) {\n const markerHeight = 41 - (5.8 / 2);\n const markerRadius = 13.5;\n const linearOffset = Math.abs(markerRadius) / Math.SQRT2;\n popup.options.offset = this._defaultMarker ? {\n 'top': [0, 0],\n 'top-left': [0, 0],\n 'top-right': [0, 0],\n 'bottom': [0, -markerHeight],\n 'bottom-left': [linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n 'bottom-right': [-linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n 'left': [markerRadius, (markerHeight - markerRadius) * -1],\n 'right': [-markerRadius, (markerHeight - markerRadius) * -1]\n } as Offset : this._offset;\n }\n this._popup = popup;\n\n this._originalTabIndex = this._element.getAttribute('tabindex');\n if (!this._originalTabIndex) {\n this._element.setAttribute('tabindex', '0');\n }\n this._element.addEventListener('keypress', this._onKeyPress);\n }\n\n return this;\n }\n\n /**\n * Set the option to allow subpixel positioning of the marker by passing a boolean\n *\n * @param value - when set to `true`, subpixel positioning is enabled for the marker.\n *\n * @example\n * ```ts\n * let marker = new Marker()\n * marker.setSubpixelPositioning(true);\n * ```\n */\n setSubpixelPositioning(value: boolean) {\n this._subpixelPositioning = value;\n return this;\n }\n\n _onKeyPress = (e: KeyboardEvent) => {\n const code = e.code;\n const legacyCode = e.charCode || e.keyCode;\n\n if (\n (code === 'Space') || (code === 'Enter') ||\n (legacyCode === 32) || (legacyCode === 13) // space or enter\n ) {\n this.togglePopup();\n }\n };\n\n _onMapClick = (e: MapMouseEvent) => {\n const targetElement = e.originalEvent.target;\n const element = this._element;\n\n if (this._popup && (targetElement === element || element.contains(targetElement as any))) {\n this.togglePopup();\n }\n };\n\n /**\n * Returns the {@link Popup} instance that is bound to the {@link Marker}.\n * @returns popup\n * @example\n * ```ts\n * let marker = new Marker()\n * .setLngLat([0, 0])\n * .setPopup(new Popup().setHTML(\"

Hello World!

\"))\n * .addTo(map);\n *\n * console.log(marker.getPopup()); // return the popup instance\n * ```\n */\n getPopup(): Popup {\n return this._popup;\n }\n\n /**\n * Opens or closes the {@link Popup} instance that is bound to the {@link Marker}, depending on the current state of the {@link Popup}.\n * @example\n * ```ts\n * let marker = new Marker()\n * .setLngLat([0, 0])\n * .setPopup(new Popup().setHTML(\"

Hello World!

\"))\n * .addTo(map);\n *\n * marker.togglePopup(); // toggle popup open or closed\n * ```\n */\n togglePopup(): this {\n const popup = this._popup;\n\n if (this._element.style.opacity === this._opacityWhenCovered) return this;\n\n if (!popup) return this;\n else if (popup.isOpen()) popup.remove();\n else {\n popup.setLngLat(this._lngLat);\n popup.addTo(this._map);\n }\n return this;\n }\n\n _updateOpacity(force: boolean = false) {\n const terrain = this._map?.terrain;\n const occluded = this._map.transform.isLocationOccluded(this._lngLat);\n if (!terrain || occluded) {\n const targetOpacity = occluded ? this._opacityWhenCovered : this._opacity;\n if (this._element.style.opacity !== targetOpacity) { this._element.style.opacity = targetOpacity; }\n return;\n }\n if (force) {\n this._opacityTimeout = null;\n } else {\n if (this._opacityTimeout) { return; }\n this._opacityTimeout = setTimeout(() => {\n this._opacityTimeout = null;\n }, 100);\n }\n\n const map = this._map;\n\n // Read depth framebuffer, getting position of terrain in line of sight to marker\n const terrainDistance = map.terrain.depthAtPoint(this._pos);\n // Transform marker position to clip space\n const elevation = map.terrain.getElevationForLngLat(this._lngLat, map.transform);\n const markerDistance = map.transform.lngLatToCameraDepth(this._lngLat, elevation);\n const forgiveness = .006;\n if (markerDistance - terrainDistance < forgiveness) {\n this._element.style.opacity = this._opacity;\n return;\n }\n // If the base is obscured, use the offset to check if the marker's center is obscured.\n const metersToCenter = -this._offset.y / map.transform.pixelsPerMeter;\n const elevationToCenter = Math.sin(map.getPitch() * Math.PI / 180) * metersToCenter;\n const terrainDistanceCenter = map.terrain.depthAtPoint(new Point(this._pos.x, this._pos.y - this._offset.y));\n const markerDistanceCenter = map.transform.lngLatToCameraDepth(this._lngLat, elevation + elevationToCenter);\n // Display at full opacity if center is visible.\n const centerIsInvisible = markerDistanceCenter - terrainDistanceCenter > forgiveness;\n\n if (this._popup?.isOpen() && centerIsInvisible) this._popup.remove();\n this._element.style.opacity = centerIsInvisible ? this._opacityWhenCovered : this._opacity;\n }\n\n _update = (e?: { type: 'move' | 'moveend' | 'terrain' | 'render' }) => {\n if (!this._map) return;\n\n const isFullyLoaded = this._map.loaded() && !this._map.isMoving();\n if (e?.type === 'terrain' || (e?.type === 'render' && !isFullyLoaded)) {\n this._map.once('render', this._update);\n }\n\n this._lngLat = smartWrap(this._lngLat, this._flatPos, this._map.transform);\n\n this._flatPos = this._pos = this._map.project(this._lngLat)._add(this._offset);\n if (this._map.terrain) {\n // flat position is saved because smartWrap needs non-elevated points\n this._flatPos = this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset);\n }\n\n let rotation = '';\n if (this._rotationAlignment === 'viewport' || this._rotationAlignment === 'auto') {\n rotation = `rotateZ(${this._rotation}deg)`;\n } else if (this._rotationAlignment === 'map') {\n rotation = `rotateZ(${this._rotation - this._map.getBearing()}deg)`;\n }\n\n let pitch = '';\n if (this._pitchAlignment === 'viewport' || this._pitchAlignment === 'auto') {\n pitch = 'rotateX(0deg)';\n } else if (this._pitchAlignment === 'map') {\n pitch = `rotateX(${this._map.getPitch()}deg)`;\n }\n\n // because rounding the coordinates at every `move` event causes stuttered zooming\n // we only round them when _update is called with `moveend` or when its called with\n // no arguments (when the Marker is initialized or Marker.setLngLat is invoked).\n if (!this._subpixelPositioning && (!e || e.type === 'moveend')) {\n this._pos = this._pos.round();\n }\n\n DOM.setTransform(this._element, `${anchorTranslate[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${pitch} ${rotation}`);\n\n browser.frameAsync(new AbortController()).then(() => { // Run _updateOpacity only after painter.render and drawDepth\n this._updateOpacity(e && e.type === 'moveend');\n }).catch(() => {});\n };\n\n /**\n * Get the marker's offset.\n * @returns The marker's screen coordinates in pixels.\n */\n getOffset(): Point {\n return this._offset;\n }\n\n /**\n * Sets the offset of the marker\n * @param offset - The offset in pixels as a {@link PointLike} object to apply relative to the element's center. Negatives indicate left and up.\n */\n setOffset(offset: PointLike): this {\n this._offset = Point.convert(offset);\n this._update();\n return this;\n }\n\n /**\n * Adds a CSS class to the marker element.\n *\n * @param className - on-empty string with CSS class name to add to marker element\n *\n * @example\n * ```\n * let marker = new Marker()\n * marker.addClassName('some-class')\n * ```\n */\n addClassName(className: string) {\n this._element.classList.add(className);\n }\n\n /**\n * Removes a CSS class from the marker element.\n *\n * @param className - Non-empty string with CSS class name to remove from marker element\n *\n * @example\n * ```ts\n * let marker = new Marker()\n * marker.removeClassName('some-class')\n * ```\n */\n removeClassName(className: string) {\n this._element.classList.remove(className);\n }\n\n /**\n * Add or remove the given CSS class on the marker element, depending on whether the element currently has that class.\n *\n * @param className - Non-empty string with CSS class name to add/remove\n *\n * @returns if the class was removed return false, if class was added, then return true\n *\n * @example\n * ```ts\n * let marker = new Marker()\n * marker.toggleClassName('toggleClass')\n * ```\n */\n toggleClassName(className: string): boolean {\n return this._element.classList.toggle(className);\n }\n\n _onMove = (e: MapMouseEvent | MapTouchEvent) => {\n if (!this._isDragging) {\n const clickTolerance = this._clickTolerance || this._map._clickTolerance;\n this._isDragging = e.point.dist(this._pointerdownPos) >= clickTolerance;\n }\n if (!this._isDragging) return;\n\n this._pos = e.point.sub(this._positionDelta);\n this._lngLat = this._map.unproject(this._pos);\n this.setLngLat(this._lngLat);\n // suppress click event so that popups don't toggle on drag\n this._element.style.pointerEvents = 'none';\n\n // make sure dragstart only fires on the first move event after mousedown.\n // this can't be on mousedown because that event doesn't necessarily\n // imply that a drag is about to happen.\n if (this._state === 'pending') {\n this._state = 'active';\n this.fire(new Event('dragstart'));\n }\n this.fire(new Event('drag'));\n };\n\n _onUp = () => {\n // revert to normal pointer event handling\n this._element.style.pointerEvents = 'auto';\n this._positionDelta = null;\n this._pointerdownPos = null;\n this._isDragging = false;\n this._map.off('mousemove', this._onMove);\n this._map.off('touchmove', this._onMove);\n\n // only fire dragend if it was preceded by at least one drag event\n if (this._state === 'active') {\n this.fire(new Event('dragend'));\n }\n\n this._state = 'inactive';\n };\n\n _addDragHandler = (e: MapMouseEvent | MapTouchEvent) => {\n if (this._element.contains(e.originalEvent.target as any)) {\n e.preventDefault();\n\n // We need to calculate the pixel distance between the click point\n // and the marker position, with the offset accounted for. Then we\n // can subtract this distance from the mousemove event's position\n // to calculate the new marker position.\n // If we don't do this, the marker 'jumps' to the click position\n // creating a jarring UX effect.\n this._positionDelta = e.point.sub(this._pos).add(this._offset);\n\n this._pointerdownPos = e.point;\n\n this._state = 'pending';\n this._map.on('mousemove', this._onMove);\n this._map.on('touchmove', this._onMove);\n this._map.once('mouseup', this._onUp);\n this._map.once('touchend', this._onUp);\n }\n };\n\n /**\n * Sets the `draggable` property and functionality of the marker\n * @param shouldBeDraggable - Turns drag functionality on/off\n */\n setDraggable(shouldBeDraggable?: boolean): this {\n this._draggable = !!shouldBeDraggable; // convert possible undefined value to false\n\n // handle case where map may not exist yet\n // e.g. when setDraggable is called before addTo\n if (this._map) {\n if (shouldBeDraggable) {\n this._map.on('mousedown', this._addDragHandler);\n this._map.on('touchstart', this._addDragHandler);\n } else {\n this._map.off('mousedown', this._addDragHandler);\n this._map.off('touchstart', this._addDragHandler);\n }\n }\n\n return this;\n }\n\n /**\n * Returns true if the marker can be dragged\n * @returns True if the marker is draggable.\n */\n isDraggable(): boolean {\n return this._draggable;\n }\n\n /**\n * Sets the `rotation` property of the marker.\n * @param rotation - The rotation angle of the marker (clockwise, in degrees), relative to its respective {@link Marker.setRotationAlignment} setting.\n */\n setRotation(rotation?: number): this {\n this._rotation = rotation || 0;\n this._update();\n return this;\n }\n\n /**\n * Returns the current rotation angle of the marker (in degrees).\n * @returns The current rotation angle of the marker.\n */\n getRotation(): number {\n return this._rotation;\n }\n\n /**\n * Sets the `rotationAlignment` property of the marker.\n * @param alignment - Sets the `rotationAlignment` property of the marker. defaults to 'auto'\n */\n setRotationAlignment(alignment?: Alignment): this {\n this._rotationAlignment = alignment || 'auto';\n this._update();\n return this;\n }\n\n /**\n * Returns the current `rotationAlignment` property of the marker.\n * @returns The current rotational alignment of the marker.\n */\n getRotationAlignment(): Alignment {\n return this._rotationAlignment;\n }\n\n /**\n * Sets the `pitchAlignment` property of the marker.\n * @param alignment - Sets the `pitchAlignment` property of the marker. If alignment is 'auto', it will automatically match `rotationAlignment`.\n */\n setPitchAlignment(alignment?: Alignment): this {\n this._pitchAlignment = alignment && alignment !== 'auto' ? alignment : this._rotationAlignment;\n this._update();\n return this;\n }\n\n /**\n * Returns the current `pitchAlignment` property of the marker.\n * @returns The current pitch alignment of the marker in degrees.\n */\n getPitchAlignment(): Alignment {\n return this._pitchAlignment;\n }\n\n /**\n * Sets the `opacity` and `opacityWhenCovered` properties of the marker.\n * When called without arguments, resets opacity and opacityWhenCovered to defaults\n * @param opacity - Sets the `opacity` property of the marker.\n * @param opacityWhenCovered - Sets the `opacityWhenCovered` property of the marker.\n */\n setOpacity(opacity?: string, opacityWhenCovered?: string): this {\n // Reset opacity when called without params or from constructor\n if (this._opacity === undefined || (opacity === undefined && opacityWhenCovered === undefined)) {\n this._opacity = '1';\n this._opacityWhenCovered = '0.2';\n }\n\n if (opacity !== undefined) {\n this._opacity = opacity;\n }\n if (opacityWhenCovered !== undefined) {\n this._opacityWhenCovered = opacityWhenCovered;\n }\n\n if (this._map) {\n this._updateOpacity(true);\n }\n return this;\n }\n}\n","import {Event, Evented} from '../../util/evented';\nimport {DOM} from '../../util/dom';\nimport {extend, warnOnce} from '../../util/util';\nimport {checkGeolocationSupport} from '../../util/geolocation_support';\nimport {LngLat} from '../../geo/lng_lat';\nimport {Marker} from '../marker';\n\nimport type {Map} from '../map';\nimport type {FitBoundsOptions} from '../camera';\nimport type {IControl} from './control';\nimport {LngLatBounds} from '../../geo/lng_lat_bounds';\n\n/**\n * The {@link GeolocateControl} options object\n */\nexport type GeolocateControlOptions = {\n /**\n * A Geolocation API [PositionOptions](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions) object.\n * @defaultValue `{enableHighAccuracy: false, timeout: 6000}`\n */\n positionOptions?: PositionOptions;\n /**\n * A options object to use when the map is panned and zoomed to the user's location. The default is to use a `maxZoom` of 15 to limit how far the map will zoom in for very accurate locations.\n */\n fitBoundsOptions?: FitBoundsOptions;\n /**\n * If `true` the `GeolocateControl` becomes a toggle button and when active the map will receive updates to the user's location as it changes.\n * @defaultValue false\n */\n trackUserLocation?: boolean;\n /**\n * By default, if `showUserLocation` is `true`, a transparent circle will be drawn around the user location indicating the accuracy (95% confidence level) of the user's location. Set to `false` to disable. Always disabled when `showUserLocation` is `false`.\n * @defaultValue true\n */\n showAccuracyCircle?: boolean;\n /**\n * By default a dot will be shown on the map at the user's location. Set to `false` to disable.\n * @defaultValue true\n */\n showUserLocation?: boolean;\n};\n\nconst defaultOptions: GeolocateControlOptions = {\n positionOptions: {\n enableHighAccuracy: false,\n maximumAge: 0,\n timeout: 6000 /* 6 sec */\n },\n fitBoundsOptions: {\n maxZoom: 15\n },\n trackUserLocation: false,\n showAccuracyCircle: true,\n showUserLocation: true\n};\n\nlet numberOfWatches = 0;\nlet noTimeout = false;\n\n/**\n * A `GeolocateControl` control provides a button that uses the browser's geolocation\n * API to locate the user on the map.\n *\n * Not all browsers support geolocation,\n * and some users may disable the feature. Geolocation support for modern\n * browsers including Chrome requires sites to be served over HTTPS. If\n * geolocation support is not available, the `GeolocateControl` will show\n * as disabled.\n *\n * The zoom level applied will depend on the accuracy of the geolocation provided by the device.\n *\n * The `GeolocateControl` has two modes. If `trackUserLocation` is `false` (default) the control acts as a button, which when pressed will set the map's camera to target the user location. If the user moves, the map won't update. This is most suited for the desktop. If `trackUserLocation` is `true` the control acts as a toggle button that when active the user's location is actively monitored for changes. In this mode the `GeolocateControl` has three interaction states:\n * * active - the map's camera automatically updates as the user's location changes, keeping the location dot in the center. Initial state and upon clicking the `GeolocateControl` button.\n * * passive - the user's location dot automatically updates, but the map's camera does not. Occurs upon the user initiating a map movement.\n * * disabled - occurs if Geolocation is not available, disabled or denied.\n *\n * These interaction states can't be controlled programmatically, rather they are set based on user interactions.\n *\n * ## State Diagram\n * ![GeolocateControl state diagram](https://github.com/maplibre/maplibre-gl-js/assets/3269297/78e720e5-d781-4da8-9803-a7a0e6aaaa9f)\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * map.addControl(new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * }));\n * ```\n * @see [Locate the user](https://maplibre.org/maplibre-gl-js/docs/examples/locate-the-user/)\n *\n * ## Events\n *\n * **Event** `trackuserlocationend` of type {@link Event} will be fired when the `GeolocateControl` changes to the background state, which happens when a user changes the camera during an active position lock. This only applies when `trackUserLocation` is `true`. In the background state, the dot on the map will update with location updates but the camera will not.\n *\n * **Event** `trackuserlocationstart` of type {@link Event} will be fired when the `GeolocateControl` changes to the active lock state, which happens either upon first obtaining a successful Geolocation API position for the user (a `geolocate` event will follow), or the user clicks the geolocate button when in the background state which uses the last known position to recenter the map and enter active lock state (no `geolocate` event will follow unless the users's location changes).\n *\n * **Event** `userlocationlostfocus` of type {@link Event} will be fired when the `GeolocateControl` changes to the background state, which happens when a user changes the camera during an active position lock. This only applies when `trackUserLocation` is `true`. In the background state, the dot on the map will update with location updates but the camera will not.\n *\n * **Event** `userlocationfocus` of type {@link Event} will be fired when the `GeolocateControl` changes to the active lock state, which happens upon the user clicks the geolocate button when in the background state which uses the last known position to recenter the map and enter active lock state.\n *\n * **Event** `geolocate` of type {@link Event} will be fired on each Geolocation API position update which returned as success.\n * `data` - The returned [Position](https://developer.mozilla.org/en-US/docs/Web/API/Position) object from the callback in [Geolocation.getCurrentPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) or [Geolocation.watchPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition).\n *\n * **Event** `error` of type {@link Event} will be fired on each Geolocation API position update which returned as an error.\n * `data` - The returned [PositionError](https://developer.mozilla.org/en-US/docs/Web/API/PositionError) object from the callback in [Geolocation.getCurrentPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) or [Geolocation.watchPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition).\n *\n * **Event** `outofmaxbounds` of type {@link Event} will be fired on each Geolocation API position update which returned as success but user position is out of map `maxBounds`.\n * `data` - The returned [Position](https://developer.mozilla.org/en-US/docs/Web/API/Position) object from the callback in [Geolocation.getCurrentPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) or [Geolocation.watchPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition).\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when a trackuserlocationend event occurs.\n * geolocate.on('trackuserlocationend', () => {\n * console.log('A trackuserlocationend event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when a trackuserlocationstart event occurs.\n * geolocate.on('trackuserlocationstart', () => {\n * console.log('A trackuserlocationstart event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when an userlocationlostfocus event occurs.\n * geolocate.on('userlocationlostfocus', function() {\n * console.log('An userlocationlostfocus event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when an userlocationfocus event occurs.\n * geolocate.on('userlocationfocus', function() {\n * console.log('An userlocationfocus event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when a geolocate event occurs.\n * geolocate.on('geolocate', () => {\n * console.log('A geolocate event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when an error event occurs.\n * geolocate.on('error', () => {\n * console.log('An error event has occurred.')\n * });\n * ```\n *\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * // Set an event listener that fires\n * // when an outofmaxbounds event occurs.\n * geolocate.on('outofmaxbounds', () => {\n * console.log('An outofmaxbounds event has occurred.')\n * });\n * ```\n */\nexport class GeolocateControl extends Evented implements IControl {\n _map: Map;\n options: GeolocateControlOptions;\n _container: HTMLElement;\n _dotElement: HTMLElement;\n _circleElement: HTMLElement;\n _geolocateButton: HTMLButtonElement;\n _geolocationWatchID: number;\n _timeoutId: ReturnType;\n /* Geolocate Control Watch States\n * This is the private state of the control.\n *\n * OFF\n * off/inactive\n * WAITING_ACTIVE\n * Geolocate Control was clicked but still waiting for Geolocation API response with user location\n * ACTIVE_LOCK\n * Showing the user location as a dot AND tracking the camera to be fixed to their location. If their location changes the map moves to follow.\n * ACTIVE_ERROR\n * There was en error from the Geolocation API while trying to show and track the user location.\n * BACKGROUND\n * Showing the user location as a dot but the camera doesn't follow their location as it changes.\n * BACKGROUND_ERROR\n * There was an error from the Geolocation API while trying to show (but not track) the user location.\n */\n _watchState: 'OFF' | 'ACTIVE_LOCK' | 'WAITING_ACTIVE' | 'ACTIVE_ERROR' | 'BACKGROUND' | 'BACKGROUND_ERROR';\n _lastKnownPosition: any;\n _userLocationDotMarker: Marker;\n _accuracyCircleMarker: Marker;\n _accuracy: number;\n _setup: boolean; // set to true once the control has been setup\n\n /**\n * @param options - the control's options\n */\n constructor(options: GeolocateControlOptions) {\n super();\n this.options = extend({}, defaultOptions, options);\n }\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._container = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-group');\n this._setupUI();\n checkGeolocationSupport().then((supported) => this._finishSetupUI(supported));\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n // clear the geolocation watch if exists\n if (this._geolocationWatchID !== undefined) {\n window.navigator.geolocation.clearWatch(this._geolocationWatchID);\n this._geolocationWatchID = undefined;\n }\n\n // clear the markers from the map\n if (this.options.showUserLocation && this._userLocationDotMarker) {\n this._userLocationDotMarker.remove();\n }\n if (this.options.showAccuracyCircle && this._accuracyCircleMarker) {\n this._accuracyCircleMarker.remove();\n }\n\n DOM.remove(this._container);\n this._map.off('zoom', this._onUpdate);\n this._map.off('move', this._onUpdate);\n this._map.off('rotate', this._onUpdate);\n this._map.off('pitch', this._onUpdate);\n this._map = undefined;\n numberOfWatches = 0;\n noTimeout = false;\n }\n\n /**\n * Check if the Geolocation API Position is outside the map's `maxBounds`.\n *\n * @param position - the Geolocation API Position\n * @returns `true` if position is outside the map's `maxBounds`, otherwise returns `false`.\n */\n _isOutOfMapMaxBounds(position: GeolocationPosition) {\n const bounds = this._map.getMaxBounds();\n const coordinates = position.coords;\n\n return bounds && (\n coordinates.longitude < bounds.getWest() ||\n coordinates.longitude > bounds.getEast() ||\n coordinates.latitude < bounds.getSouth() ||\n coordinates.latitude > bounds.getNorth()\n );\n }\n\n _setErrorState() {\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n this._watchState = 'ACTIVE_ERROR';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-active-error');\n break;\n case 'ACTIVE_LOCK':\n this._watchState = 'ACTIVE_ERROR';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-waiting');\n // turn marker grey\n break;\n case 'BACKGROUND':\n this._watchState = 'BACKGROUND_ERROR';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-background-error');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-waiting');\n // turn marker grey\n break;\n case 'ACTIVE_ERROR':\n case 'BACKGROUND_ERROR':\n // already in error state\n break;\n case 'OFF':\n case undefined:\n // when trackUserLocation is false, watchState is undefined\n // when trackUserLocation is true but not activated, watchState is 'OFF'\n // in both cases, no error state transition is needed\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n }\n\n /**\n * When the Geolocation API returns a new location, update the `GeolocateControl`.\n *\n * @param position - the Geolocation API Position\n */\n _onSuccess = (position: GeolocationPosition) => {\n if (!this._map) {\n // control has since been removed\n return;\n }\n\n if (this._isOutOfMapMaxBounds(position)) {\n this._setErrorState();\n\n this.fire(new Event('outofmaxbounds', position));\n this._updateMarker();\n this._finish();\n\n return;\n }\n\n if (this.options.trackUserLocation) {\n // keep a record of the position so that if the state is BACKGROUND and the user\n // clicks the button, we can move to ACTIVE_LOCK immediately without waiting for\n // watchPosition to trigger _onSuccess\n this._lastKnownPosition = position;\n\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n case 'ACTIVE_LOCK':\n case 'ACTIVE_ERROR':\n this._watchState = 'ACTIVE_LOCK';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-active');\n break;\n case 'BACKGROUND':\n case 'BACKGROUND_ERROR':\n this._watchState = 'BACKGROUND';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background-error');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-background');\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n }\n\n // if showUserLocation and the watch state isn't off then update the marker location\n if (this.options.showUserLocation && this._watchState !== 'OFF') {\n this._updateMarker(position);\n }\n\n // if in normal mode (not watch mode), or if in watch mode and the state is active watch\n // then update the camera\n if (!this.options.trackUserLocation || this._watchState === 'ACTIVE_LOCK') {\n this._updateCamera(position);\n }\n\n if (this.options.showUserLocation) {\n this._dotElement.classList.remove('maplibregl-user-location-dot-stale');\n }\n\n this.fire(new Event('geolocate', position));\n this._finish();\n };\n\n /**\n * Update the camera location to center on the current position\n *\n * @param position - the Geolocation API Position\n */\n _updateCamera = (position: GeolocationPosition) => {\n const center = new LngLat(position.coords.longitude, position.coords.latitude);\n const radius = position.coords.accuracy;\n const bearing = this._map.getBearing();\n const options = extend({bearing}, this.options.fitBoundsOptions);\n const newBounds = LngLatBounds.fromLngLat(center, radius);\n\n this._map.fitBounds(newBounds, options, {\n geolocateSource: true // tag this camera change so it won't cause the control to change to background state\n });\n };\n\n /**\n * Update the user location dot Marker to the current position\n *\n * @param position - the Geolocation API Position\n */\n _updateMarker = (position?: GeolocationPosition | null) => {\n if (position) {\n const center = new LngLat(position.coords.longitude, position.coords.latitude);\n this._accuracyCircleMarker.setLngLat(center).addTo(this._map);\n this._userLocationDotMarker.setLngLat(center).addTo(this._map);\n this._accuracy = position.coords.accuracy;\n this._updateCircleRadiusIfNeeded();\n } else {\n this._userLocationDotMarker.remove();\n this._accuracyCircleMarker.remove();\n }\n };\n\n _updateCircleRadiusIfNeeded() {\n const userLocation = this._userLocationDotMarker.getLngLat();\n if (!this.options.showUserLocation || !this.options.showAccuracyCircle || !this._accuracy || !userLocation) {\n return;\n }\n const screenPosition = this._map.project(userLocation);\n const userLocationWith100Px = this._map.unproject([screenPosition.x + 100, screenPosition.y]);\n const pixelsToMeters = userLocation.distanceTo(userLocationWith100Px) / 100;\n const circleDiameter = 2 * this._accuracy / pixelsToMeters;\n this._circleElement.style.width = `${circleDiameter.toFixed(2)}px`;\n this._circleElement.style.height = `${circleDiameter.toFixed(2)}px`;\n }\n\n _onUpdate = () => {\n this._updateCircleRadiusIfNeeded();\n };\n\n _onError = (error: GeolocationPositionError) => {\n if (!this._map) {\n // control has since been removed\n return;\n }\n\n if (error.code === 1) {\n // PERMISSION_DENIED\n this._watchState = 'OFF';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background-error');\n this._geolocateButton.disabled = true;\n const title = this._map._getUIString('GeolocateControl.LocationNotAvailable');\n this._geolocateButton.title = title;\n this._geolocateButton.setAttribute('aria-label', title);\n\n if (this._geolocationWatchID !== undefined) {\n this._clearWatch();\n }\n } else if (error.code === 3 && noTimeout) {\n // this represents a forced error state\n // this was triggered to force immediate geolocation when a watch is already present\n // see https://github.com/mapbox/mapbox-gl-js/issues/8214\n // and https://w3c.github.io/geolocation-api/#example-5-forcing-the-user-agent-to-return-a-fresh-cached-position\n return;\n } else {\n this._setErrorState();\n }\n\n if (this._watchState !== 'OFF' && this.options.showUserLocation) {\n this._dotElement.classList.add('maplibregl-user-location-dot-stale');\n }\n\n this.fire(new Event('error', error));\n\n this._finish();\n };\n\n _finish = () => {\n if (this._timeoutId) { clearTimeout(this._timeoutId); }\n this._timeoutId = undefined;\n };\n\n _setupUI = () => {\n // the control could have been removed before reaching here\n if (!this._map) {\n return;\n }\n\n this._container.addEventListener('contextmenu', (e: MouseEvent) => e.preventDefault());\n this._geolocateButton = DOM.create('button', 'maplibregl-ctrl-geolocate', this._container);\n DOM.create('span', 'maplibregl-ctrl-icon', this._geolocateButton).setAttribute('aria-hidden', 'true');\n this._geolocateButton.type = 'button';\n this._geolocateButton.disabled = true;\n };\n\n _finishSetupUI = (supported: boolean) => {\n // this method is called asynchronously during onAdd\n if (!this._map) {\n // control has since been removed\n return;\n }\n\n if (supported === false) {\n warnOnce('Geolocation support is not available so the GeolocateControl will be disabled.');\n const title = this._map._getUIString('GeolocateControl.LocationNotAvailable');\n this._geolocateButton.disabled = true;\n this._geolocateButton.title = title;\n this._geolocateButton.setAttribute('aria-label', title);\n } else {\n const title = this._map._getUIString('GeolocateControl.FindMyLocation');\n this._geolocateButton.disabled = false;\n this._geolocateButton.title = title;\n this._geolocateButton.setAttribute('aria-label', title);\n }\n\n if (this.options.trackUserLocation) {\n this._geolocateButton.setAttribute('aria-pressed', 'false');\n this._watchState = 'OFF';\n }\n\n // when showUserLocation is enabled, keep the Geolocate button disabled until the device location marker is setup on the map\n if (this.options.showUserLocation) {\n this._dotElement = DOM.create('div', 'maplibregl-user-location-dot');\n\n this._userLocationDotMarker = new Marker({element: this._dotElement});\n\n this._circleElement = DOM.create('div', 'maplibregl-user-location-accuracy-circle');\n this._accuracyCircleMarker = new Marker({element: this._circleElement, pitchAlignment: 'map'});\n\n if (this.options.trackUserLocation) this._watchState = 'OFF';\n\n this._map.on('zoom', this._onUpdate);\n this._map.on('move', this._onUpdate);\n this._map.on('rotate', this._onUpdate);\n this._map.on('pitch', this._onUpdate);\n }\n\n this._geolocateButton.addEventListener('click', () => this.trigger());\n\n this._setup = true;\n\n // when the camera is changed (and it's not as a result of the Geolocation Control) change\n // the watch mode to background watch, so that the marker is updated but not the camera.\n if (this.options.trackUserLocation) {\n this._map.on('movestart', (event: any) => {\n const fromResize = event?.[0] instanceof ResizeObserverEntry;\n if (!event.geolocateSource && this._watchState === 'ACTIVE_LOCK' && !fromResize && !this._map.isZooming()) {\n this._watchState = 'BACKGROUND';\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active');\n\n this.fire(new Event('trackuserlocationend'));\n this.fire(new Event('userlocationlostfocus'));\n }\n });\n }\n };\n\n /**\n * Programmatically request and move the map to the user's location.\n *\n * @returns `false` if called before control was added to a map, otherwise returns `true`.\n * @example\n * ```ts\n * // Initialize the geolocate control.\n * let geolocate = new GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * });\n * // Add the control to the map.\n * map.addControl(geolocate);\n * map.on('load', () => {\n * geolocate.trigger();\n * });\n * ```\n */\n trigger(): boolean {\n if (!this._setup) {\n warnOnce('Geolocate control triggered before added to a map');\n return false;\n }\n if (this.options.trackUserLocation) {\n // update watchState and do any outgoing state cleanup\n switch (this._watchState) {\n case 'OFF':\n // turn on the Geolocate Control\n this._watchState = 'WAITING_ACTIVE';\n\n this.fire(new Event('trackuserlocationstart'));\n break;\n case 'WAITING_ACTIVE':\n case 'ACTIVE_LOCK':\n case 'ACTIVE_ERROR':\n case 'BACKGROUND_ERROR':\n // turn off the Geolocate Control\n numberOfWatches--;\n noTimeout = false;\n this._watchState = 'OFF';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background-error');\n\n this.fire(new Event('trackuserlocationend'));\n break;\n case 'BACKGROUND':\n this._watchState = 'ACTIVE_LOCK';\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-background');\n // set camera to last known location\n if (this._lastKnownPosition) this._updateCamera(this._lastKnownPosition);\n\n this.fire(new Event('trackuserlocationstart'));\n this.fire(new Event('userlocationfocus'));\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n\n // incoming state setup\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-active');\n break;\n case 'ACTIVE_LOCK':\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-active');\n break;\n case 'OFF':\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n\n // manage geolocation.watchPosition / geolocation.clearWatch\n if (this._watchState === 'OFF' && this._geolocationWatchID !== undefined) {\n // clear watchPosition as we've changed to an OFF state\n this._clearWatch();\n } else if (this._geolocationWatchID === undefined) {\n // enable watchPosition since watchState is not OFF and there is no watchPosition already running\n\n this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.setAttribute('aria-pressed', 'true');\n\n numberOfWatches++;\n let positionOptions;\n if (numberOfWatches > 1) {\n positionOptions = {maximumAge: 600000, timeout: 0};\n noTimeout = true;\n } else {\n positionOptions = this.options.positionOptions;\n noTimeout = false;\n }\n\n this._geolocationWatchID = window.navigator.geolocation.watchPosition(\n this._onSuccess, this._onError, positionOptions);\n }\n } else {\n window.navigator.geolocation.getCurrentPosition(\n this._onSuccess, this._onError, this.options.positionOptions);\n\n // This timeout ensures that we still call finish() even if\n // the user declines to share their location in Firefox\n this._timeoutId = setTimeout(this._finish, 10000 /* 10sec */);\n }\n\n return true;\n }\n\n _clearWatch() {\n window.navigator.geolocation.clearWatch(this._geolocationWatchID);\n\n this._geolocationWatchID = undefined;\n this._geolocateButton.classList.remove('maplibregl-ctrl-geolocate-waiting');\n this._geolocateButton.setAttribute('aria-pressed', 'false');\n\n if (this.options.showUserLocation) {\n this._updateMarker(null);\n }\n }\n}\n","import {DOM} from '../../util/dom';\n\nimport type {Map} from '../map';\nimport type {ControlPosition, IControl} from './control';\n\n/**\n * The unit type for length to use for the {@link ScaleControl}\n */\nexport type Unit = 'imperial' | 'metric' | 'nautical';\n\n/**\n * The {@link ScaleControl} options object\n */\nexport type ScaleControlOptions = {\n /**\n * The maximum length of the scale control in pixels.\n * @defaultValue 100\n */\n maxWidth?: number;\n /**\n * Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).\n * @defaultValue 'metric'\n */\n unit?: Unit;\n};\n\nconst defaultOptions: ScaleControlOptions = {\n maxWidth: 100,\n unit: 'metric'\n};\n\n/**\n * A `ScaleControl` control displays the ratio of a distance on the map to the corresponding distance on the ground.\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * let scale = new ScaleControl({\n * maxWidth: 80,\n * unit: 'imperial'\n * });\n * map.addControl(scale);\n *\n * scale.setUnit('metric');\n * ```\n */\nexport class ScaleControl implements IControl {\n _map: Map;\n _container: HTMLElement;\n options: ScaleControlOptions;\n\n /**\n * @param options - the control's options\n */\n constructor(options?: ScaleControlOptions) {\n this.options = {...defaultOptions, ...options};\n }\n\n getDefaultPosition(): ControlPosition {\n return 'bottom-left';\n }\n\n _onMove = () => {\n updateScale(this._map, this._container, this.options);\n };\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._container = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-scale', map.getContainer());\n\n this._map.on('move', this._onMove);\n this._onMove();\n\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n this._map.off('move', this._onMove);\n this._map = undefined;\n }\n\n /**\n * Set the scale's unit of the distance\n *\n * @param unit - Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).\n */\n setUnit = (unit: Unit) => {\n this.options.unit = unit;\n updateScale(this._map, this._container, this.options);\n };\n}\n\nfunction updateScale(map: Map, container: HTMLElement, options: ScaleControlOptions) {\n // A horizontal scale is imagined to be present at center of the map\n // container with maximum length (Default) as 100px.\n // Using spherical law of cosines approximation, the real distance is\n // found between the two coordinates.\n // Minimum maxWidth is calculated for the scale box.\n const optWidth = options && options.maxWidth || 100;\n const y = map._container.clientHeight / 2;\n const x = map._container.clientWidth / 2;\n const left = map.unproject([x - optWidth / 2, y]);\n const right = map.unproject([x + optWidth / 2, y]);\n\n const globeWidth = Math.round(map.project(right).x - map.project(left).x);\n const maxWidth = Math.min(optWidth, globeWidth, map._container.clientWidth);\n\n const maxMeters = left.distanceTo(right);\n // The real distance corresponding to 100px scale length is rounded off to\n // near pretty number and the scale length for the same is found out.\n // Default unit of the scale is based on User's locale.\n if (options && options.unit === 'imperial') {\n const maxFeet = 3.2808 * maxMeters;\n if (maxFeet > 5280) {\n const maxMiles = maxFeet / 5280;\n setScale(container, maxWidth, maxMiles, map._getUIString('ScaleControl.Miles'));\n } else {\n setScale(container, maxWidth, maxFeet, map._getUIString('ScaleControl.Feet'));\n }\n } else if (options && options.unit === 'nautical') {\n const maxNauticals = maxMeters / 1852;\n setScale(container, maxWidth, maxNauticals, map._getUIString('ScaleControl.NauticalMiles'));\n } else if (maxMeters >= 1000) {\n setScale(container, maxWidth, maxMeters / 1000, map._getUIString('ScaleControl.Kilometers'));\n } else {\n setScale(container, maxWidth, maxMeters, map._getUIString('ScaleControl.Meters'));\n }\n}\n\nfunction setScale(container: HTMLElement, maxWidth: number, maxDistance: number, unit: string) {\n const distance = getRoundNum(maxDistance);\n const ratio = distance / maxDistance;\n container.style.width = `${maxWidth * ratio}px`;\n container.innerHTML = `${distance} ${unit}`;\n}\n\nfunction getDecimalRoundNum(d) {\n const multiplier = Math.pow(10, Math.ceil(-Math.log(d) / Math.LN10));\n return Math.round(d * multiplier) / multiplier;\n}\n\nfunction getRoundNum(num) {\n const pow10 = Math.pow(10, (`${Math.floor(num)}`).length - 1);\n let d = num / pow10;\n\n d = d >= 10 ? 10 :\n d >= 5 ? 5 :\n d >= 3 ? 3 :\n d >= 2 ? 2 :\n d >= 1 ? 1 : getDecimalRoundNum(d);\n\n return pow10 * d;\n}\n","import {extend} from '../util/util';\nimport {Event, Evented} from '../util/evented';\nimport {type MapMouseEvent} from './events';\nimport {DOM} from '../util/dom';\nimport {LngLat} from '../geo/lng_lat';\nimport Point from '@mapbox/point-geometry';\nimport {smartWrap} from '../util/smart_wrap';\nimport {anchorTranslate, applyAnchorClass} from './anchor';\n\nimport type {PositionAnchor} from './anchor';\nimport type {Map} from './map';\nimport type {LngLatLike} from '../geo/lng_lat';\nimport type {PointLike} from './camera';\n\nconst defaultOptions = {\n closeButton: true,\n closeOnClick: true,\n focusAfterOpen: true,\n className: '',\n maxWidth: '240px',\n subpixelPositioning: false,\n locationOccludedOpacity: undefined,\n};\n\n/**\n * A pixel offset specified as:\n *\n * - A single number specifying a distance from the location\n * - A {@link PointLike} specifying a constant offset\n * - An object of {@link PointLike}s specifying an offset for each anchor position\n *\n * Negative offsets indicate left and up.\n */\nexport type Offset = number | PointLike | {\n [_ in PositionAnchor]: PointLike;\n};\n\n/**\n * The {@link Popup} options object\n */\nexport type PopupOptions = {\n /**\n * If `true`, a close button will appear in the top right corner of the popup.\n * @defaultValue true\n */\n closeButton?: boolean;\n /**\n * If `true`, the popup will closed when the map is clicked.\n * @defaultValue true\n */\n closeOnClick?: boolean;\n /**\n * If `true`, the popup will closed when the map moves.\n * @defaultValue false\n */\n closeOnMove?: boolean;\n /**\n * If `true`, the popup will try to focus the first focusable element inside the popup.\n * @defaultValue true\n */\n focusAfterOpen?: boolean;\n /**\n * A string indicating the part of the Popup that should\n * be positioned closest to the coordinate set via {@link Popup.setLngLat}.\n * Options are `'center'`, `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-left'`,\n * `'top-right'`, `'bottom-left'`, and `'bottom-right'`. If unset the anchor will be\n * dynamically set to ensure the popup falls within the map container with a preference\n * for `'bottom'`.\n */\n anchor?: PositionAnchor;\n /**\n * A pixel offset applied to the popup's location\n */\n offset?: Offset;\n /**\n * Space-separated CSS class names to add to popup container\n */\n className?: string;\n /**\n * A string that sets the CSS property of the popup's maximum width, eg `'300px'`.\n * To ensure the popup resizes to fit its content, set this property to `'none'`.\n * Available values can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n * @defaultValue '240px'\n */\n maxWidth?: string;\n /**\n * If `true`, rounding is disabled for placement of the popup, allowing for\n * subpixel positioning and smoother movement when the popup is translated.\n * @defaultValue false\n */\n subpixelPositioning?: boolean;\n /**\n * Optional opacity when the location is behind the globe.\n * Note that if a number is provided, it will be converted to a string.\n * @defaultValue undefined\n */\n locationOccludedOpacity?: number | string;\n};\n\nconst focusQuerySelector = [\n 'a[href]',\n '[tabindex]:not([tabindex=\\'-1\\'])',\n '[contenteditable]:not([contenteditable=\\'false\\'])',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n].join(', ');\n\n/**\n * A popup component.\n *\n * @group Markers and Controls\n *\n *\n * @example\n * Create a popup\n * ```ts\n * let popup = new Popup();\n * // Set an event listener that will fire\n * // any time the popup is opened\n * popup.on('open', () => {\n * console.log('popup was opened');\n * });\n * ```\n *\n * @example\n * Create a popup\n * ```ts\n * let popup = new Popup();\n * // Set an event listener that will fire\n * // any time the popup is closed\n * popup.on('close', () => {\n * console.log('popup was closed');\n * });\n * ```\n *\n * @example\n * ```ts\n * let markerHeight = 50, markerRadius = 10, linearOffset = 25;\n * let popupOffsets = {\n * 'top': [0, 0],\n * 'top-left': [0,0],\n * 'top-right': [0,0],\n * 'bottom': [0, -markerHeight],\n * 'bottom-left': [linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n * 'bottom-right': [-linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n * 'left': [markerRadius, (markerHeight - markerRadius) * -1],\n * 'right': [-markerRadius, (markerHeight - markerRadius) * -1]\n * };\n * let popup = new Popup({offset: popupOffsets, className: 'my-class'})\n * .setLngLat(e.lngLat)\n * .setHTML(\"

Hello World!

\")\n * .setMaxWidth(\"300px\")\n * .addTo(map);\n * ```\n * @see [Display a popup](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n * @see [Display a popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n * @see [Attach a popup to a marker instance](https://maplibre.org/maplibre-gl-js/docs/examples/attach-a-popup-to-a-marker-instance/)\n *\n * ## Events\n *\n * **Event** `open` of type {@link Event} will be fired when the popup is opened manually or programmatically.\n *\n * **Event** `close` of type {@link Event} will be fired when the popup is closed manually or programmatically.\n */\nexport class Popup extends Evented {\n _map: Map;\n options: PopupOptions;\n _content: HTMLElement;\n _container: HTMLElement;\n _closeButton: HTMLButtonElement;\n _tip: HTMLElement;\n _lngLat: LngLat;\n _trackPointer: boolean;\n _pos: Point;\n _flatPos: Point;\n\n /**\n * @param options - the options\n */\n constructor(options?: PopupOptions) {\n super();\n this.options = extend(Object.create(defaultOptions), options);\n }\n\n /**\n * Adds the popup to a map.\n *\n * @param map - The MapLibre GL JS map to add the popup to.\n * @example\n * ```ts\n * new Popup()\n * .setLngLat([0, 0])\n * .setHTML(\"

Null Island

\")\n * .addTo(map);\n * ```\n * @see [Display a popup](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n * @see [Display a popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n * @see [Show polygon information on click](https://maplibre.org/maplibre-gl-js/docs/examples/show-polygon-information-on-click/)\n */\n addTo(map: Map): this {\n if (this._map) this.remove();\n\n this._map = map;\n if (this.options.closeOnClick) {\n this._map.on('click', this._onClose);\n }\n\n if (this.options.closeOnMove) {\n this._map.on('move', this._onClose);\n }\n\n this._map.on('remove', this.remove);\n this._update();\n this._focusFirstElement();\n\n if (this._trackPointer) {\n this._map.on('mousemove', this._onMouseMove);\n this._map.on('mouseup', this._onMouseUp);\n if (this._container) {\n this._container.classList.add('maplibregl-popup-track-pointer');\n }\n this._map._canvasContainer.classList.add('maplibregl-track-pointer');\n } else {\n this._map.on('move', this._update);\n }\n\n this.fire(new Event('open'));\n\n return this;\n }\n\n /**\n * Add opacity to popup if in globe projection and location is behind view\n */\n _updateOpacity = () => {\n if (this.options.locationOccludedOpacity === undefined) {\n return;\n }\n if (this._map.transform.isLocationOccluded(this.getLngLat())) {\n this._container.style.opacity = `${this.options.locationOccludedOpacity}`;\n } else {\n this._container.style.opacity = '';\n }\n };\n\n /**\n * @returns `true` if the popup is open, `false` if it is closed.\n */\n isOpen() {\n return !!this._map;\n }\n\n /**\n * Removes the popup from the map it has been added to.\n *\n * @example\n * ```ts\n * let popup = new Popup().addTo(map);\n * popup.remove();\n * ```\n */\n remove = (): this => {\n if (this._content) {\n DOM.remove(this._content);\n }\n\n if (this._container) {\n DOM.remove(this._container);\n delete this._container;\n }\n\n if (this._map) {\n this._map.off('move', this._update);\n this._map.off('move', this._onClose);\n this._map.off('click', this._onClose);\n this._map.off('remove', this.remove);\n this._map.off('mousemove', this._onMouseMove);\n this._map.off('mouseup', this._onMouseUp);\n this._map.off('drag', this._onDrag);\n this._map._canvasContainer.classList.remove('maplibregl-track-pointer');\n delete this._map;\n this.fire(new Event('close'));\n }\n\n return this;\n };\n\n /**\n * Returns the geographical location of the popup's anchor.\n *\n * The longitude of the result may differ by a multiple of 360 degrees from the longitude previously\n * set by `setLngLat` because `Popup` wraps the anchor longitude across copies of the world to keep\n * the popup on screen.\n *\n * @returns The geographical location of the popup's anchor.\n */\n getLngLat(): LngLat {\n return this._lngLat;\n }\n\n /**\n * Sets the geographical location of the popup's anchor, and moves the popup to it. Replaces trackPointer() behavior.\n *\n * @param lnglat - The geographical location to set as the popup's anchor.\n */\n setLngLat(lnglat: LngLatLike): this {\n this._lngLat = LngLat.convert(lnglat);\n this._pos = null;\n this._flatPos = null;\n\n this._trackPointer = false;\n\n this._update();\n\n if (this._map) {\n this._map.on('move', this._update);\n this._map.off('mousemove', this._onMouseMove);\n if (this._container) {\n this._container.classList.remove('maplibregl-popup-track-pointer');\n }\n this._map._canvasContainer.classList.remove('maplibregl-track-pointer');\n }\n\n return this;\n }\n\n /**\n * Tracks the popup anchor to the cursor position on screens with a pointer device (it will be hidden on touchscreens). Replaces the `setLngLat` behavior.\n * For most use cases, set `closeOnClick` and `closeButton` to `false`.\n * @example\n * ```ts\n * let popup = new Popup({ closeOnClick: false, closeButton: false })\n * .setHTML(\"

Hello World!

\")\n * .trackPointer()\n * .addTo(map);\n * ```\n */\n trackPointer(): this {\n this._trackPointer = true;\n this._pos = null;\n this._flatPos = null;\n this._update();\n if (this._map) {\n this._map.off('move', this._update);\n this._map.on('mousemove', this._onMouseMove);\n this._map.on('drag', this._onDrag);\n if (this._container) {\n this._container.classList.add('maplibregl-popup-track-pointer');\n }\n this._map._canvasContainer.classList.add('maplibregl-track-pointer');\n }\n\n return this;\n\n }\n\n /**\n * Returns the `Popup`'s HTML element.\n * @example\n * Change the `Popup` element's font size\n * ```ts\n * let popup = new Popup()\n * .setLngLat([-96, 37.8])\n * .setHTML(\"

Hello World!

\")\n * .addTo(map);\n * let popupElem = popup.getElement();\n * popupElem.style.fontSize = \"25px\";\n * ```\n * @returns element\n */\n getElement(): HTMLElement {\n return this._container;\n }\n\n /**\n * Sets the popup's content to a string of text.\n *\n * This function creates a [Text](https://developer.mozilla.org/en-US/docs/Web/API/Text) node in the DOM,\n * so it cannot insert raw HTML. Use this method for security against XSS\n * if the popup content is user-provided.\n *\n * @param text - Textual content for the popup.\n * @example\n * ```ts\n * let popup = new Popup()\n * .setLngLat(e.lngLat)\n * .setText('Hello, world!')\n * .addTo(map);\n * ```\n */\n setText(text: string): this {\n return this.setDOMContent(document.createTextNode(text));\n }\n\n /**\n * Sets the popup's content to the HTML provided as a string.\n *\n * This method does not perform HTML filtering or sanitization, and must be\n * used only with trusted content. Consider {@link Popup.setText} if\n * the content is an untrusted text string.\n *\n * @param html - A string representing HTML content for the popup.\n * @example\n * ```ts\n * let popup = new Popup()\n * .setLngLat(e.lngLat)\n * .setHTML(\"

Hello World!

\")\n * .addTo(map);\n * ```\n * @see [Display a popup](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup/)\n * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-hover/)\n * @see [Display a popup on click](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-popup-on-click/)\n * @see [Attach a popup to a marker instance](https://maplibre.org/maplibre-gl-js/docs/examples/attach-a-popup-to-a-marker-instance/)\n */\n setHTML(html: string): this {\n const frag = document.createDocumentFragment();\n const temp = document.createElement('body');\n let child: ChildNode;\n temp.innerHTML = html;\n while (true) {\n child = temp.firstChild;\n if (!child) break;\n frag.appendChild(child);\n }\n\n return this.setDOMContent(frag);\n }\n\n /**\n * Returns the popup's maximum width.\n *\n * @returns The maximum width of the popup.\n */\n getMaxWidth(): string {\n return this._container?.style.maxWidth;\n }\n\n /**\n * Sets the popup's maximum width. This is setting the CSS property `max-width`.\n * Available values can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n *\n * @param maxWidth - A string representing the value for the maximum width.\n */\n setMaxWidth(maxWidth: string): this {\n this.options.maxWidth = maxWidth;\n this._update();\n return this;\n }\n\n /**\n * Sets the popup's content to the element provided as a DOM node.\n *\n * @param htmlNode - A DOM node to be used as content for the popup.\n * @example\n * Create an element with the popup content\n * ```ts\n * let div = document.createElement('div');\n * div.innerHTML = 'Hello, world!';\n * let popup = new Popup()\n * .setLngLat(e.lngLat)\n * .setDOMContent(div)\n * .addTo(map);\n * ```\n */\n setDOMContent(htmlNode: Node): this {\n if (this._content) {\n // Clear out children first.\n while (this._content.hasChildNodes()) {\n if (this._content.firstChild) {\n this._content.removeChild(this._content.firstChild);\n }\n }\n } else {\n this._content = DOM.create('div', 'maplibregl-popup-content', this._container);\n }\n\n // The close button should be the last tabbable element inside the popup for a good keyboard UX.\n this._content.appendChild(htmlNode);\n this._createCloseButton();\n this._update();\n this._focusFirstElement();\n return this;\n }\n\n /**\n * Adds a CSS class to the popup container element.\n *\n * @param className - Non-empty string with CSS class name to add to popup container\n *\n * @example\n * ```ts\n * let popup = new Popup()\n * popup.addClassName('some-class')\n * ```\n */\n addClassName(className: string) {\n if (this._container) {\n this._container.classList.add(className);\n }\n return this;\n }\n\n /**\n * Removes a CSS class from the popup container element.\n *\n * @param className - Non-empty string with CSS class name to remove from popup container\n *\n * @example\n * ```ts\n * let popup = new Popup()\n * popup.removeClassName('some-class')\n * ```\n */\n removeClassName(className: string) {\n if (this._container) {\n this._container.classList.remove(className);\n }\n return this;\n }\n\n /**\n * Sets the popup's offset.\n *\n * @param offset - Sets the popup's offset.\n */\n setOffset (offset?: Offset): this {\n this.options.offset = offset;\n this._update();\n return this;\n }\n\n /**\n * Add or remove the given CSS class on the popup container, depending on whether the container currently has that class.\n *\n * @param className - Non-empty string with CSS class name to add/remove\n *\n * @returns if the class was removed return false, if class was added, then return true, undefined if there is no container\n *\n * @example\n * ```ts\n * let popup = new Popup()\n * popup.toggleClassName('toggleClass')\n * ```\n */\n toggleClassName(className: string): boolean | undefined {\n if (this._container) {\n return this._container.classList.toggle(className);\n }\n }\n\n /**\n * Set the option to allow subpixel positioning of the popup by passing a boolean\n *\n * @param value - When boolean is true, subpixel positioning is enabled for the popup.\n *\n * @example\n * ```ts\n * let popup = new Popup()\n * popup.setSubpixelPositioning(true);\n * ```\n */\n setSubpixelPositioning(value: boolean) {\n this.options.subpixelPositioning = value;\n }\n\n _createCloseButton() {\n if (this.options.closeButton) {\n this._closeButton = DOM.create('button', 'maplibregl-popup-close-button', this._content);\n this._closeButton.type = 'button';\n this._closeButton.innerHTML = '×';\n this._closeButton.addEventListener('click', this._onClose);\n }\n }\n\n _onMouseUp = (event: MapMouseEvent) => {\n this._update(event.point);\n };\n\n _onMouseMove = (event: MapMouseEvent) => {\n this._update(event.point);\n };\n\n _onDrag = (event: MapMouseEvent) => {\n this._update(event.point);\n };\n\n _update = (cursor?: Point) => {\n const hasPosition = this._lngLat || this._trackPointer;\n\n if (!this._map || !hasPosition || !this._content) { return; }\n\n if (!this._container) {\n this._container = DOM.create('div', 'maplibregl-popup', this._map.getContainer());\n this._tip = DOM.create('div', 'maplibregl-popup-tip', this._container);\n this._container.appendChild(this._content);\n if (this.options.className) {\n for (const name of this.options.className.split(' ')) {\n this._container.classList.add(name);\n }\n }\n\n if (this._closeButton) {\n this._closeButton.setAttribute('aria-label', this._map._getUIString('Popup.Close'));\n }\n\n if (this._trackPointer) {\n this._container.classList.add('maplibregl-popup-track-pointer');\n }\n }\n\n if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth) {\n this._container.style.maxWidth = this.options.maxWidth;\n }\n\n this._lngLat = smartWrap(this._lngLat, this._flatPos, this._map.transform, this._trackPointer);\n\n if (this._trackPointer && !cursor) return;\n\n const pos = this._flatPos = this._pos = this._trackPointer && cursor ? cursor : this._map.project(this._lngLat);\n if (this._map.terrain) {\n // flat position is saved because smartWrap needs non-elevated points\n this._flatPos = this._trackPointer && cursor ? cursor : this._map.transform.locationToScreenPoint(this._lngLat);\n }\n\n let anchor = this.options.anchor;\n const offset = normalizeOffset(this.options.offset);\n\n if (!anchor) {\n const width = this._container.offsetWidth;\n const height = this._container.offsetHeight;\n let anchorComponents;\n\n if (pos.y + offset.bottom.y < height) {\n anchorComponents = ['top'];\n } else if (pos.y > this._map.transform.height - height) {\n anchorComponents = ['bottom'];\n } else {\n anchorComponents = [];\n }\n\n if (pos.x < width / 2) {\n anchorComponents.push('left');\n } else if (pos.x > this._map.transform.width - width / 2) {\n anchorComponents.push('right');\n }\n\n if (anchorComponents.length === 0) {\n anchor = 'bottom';\n } else {\n anchor = (anchorComponents.join('-') as any);\n }\n }\n\n let offsetedPos = pos.add(offset[anchor]);\n\n if (!this.options.subpixelPositioning) {\n offsetedPos = offsetedPos.round();\n }\n\n DOM.setTransform(this._container, `${anchorTranslate[anchor]} translate(${offsetedPos.x}px,${offsetedPos.y}px)`);\n applyAnchorClass(this._container, anchor, 'popup');\n\n this._updateOpacity();\n };\n\n _focusFirstElement() {\n if (!this.options.focusAfterOpen || !this._container) return;\n\n const firstFocusable = this._container.querySelector(focusQuerySelector) as HTMLElement;\n\n if (firstFocusable) firstFocusable.focus();\n }\n\n _onClose = () => {\n this.remove();\n };\n}\n\nfunction normalizeOffset(offset?: Offset | null) {\n if (!offset) {\n return normalizeOffset(new Point(0, 0));\n\n } else if (typeof offset === 'number') {\n // input specifies a radius from which to calculate offsets at all positions\n const cornerOffset = Math.round(Math.abs(offset) / Math.SQRT2);\n return {\n 'center': new Point(0, 0),\n 'top': new Point(0, offset),\n 'top-left': new Point(cornerOffset, cornerOffset),\n 'top-right': new Point(-cornerOffset, cornerOffset),\n 'bottom': new Point(0, -offset),\n 'bottom-left': new Point(cornerOffset, -cornerOffset),\n 'bottom-right': new Point(-cornerOffset, -cornerOffset),\n 'left': new Point(offset, 0),\n 'right': new Point(-offset, 0)\n };\n\n } else if (offset instanceof Point || Array.isArray(offset)) {\n // input specifies a single offset to be applied to all positions\n const convertedOffset = Point.convert(offset);\n return {\n 'center': convertedOffset,\n 'top': convertedOffset,\n 'top-left': convertedOffset,\n 'top-right': convertedOffset,\n 'bottom': convertedOffset,\n 'bottom-left': convertedOffset,\n 'bottom-right': convertedOffset,\n 'left': convertedOffset,\n 'right': convertedOffset\n };\n\n } else {\n // input specifies an offset per position\n return {\n 'center': Point.convert(offset['center'] || [0, 0]),\n 'top': Point.convert(offset['top'] || [0, 0]),\n 'top-left': Point.convert(offset['top-left'] || [0, 0]),\n 'top-right': Point.convert(offset['top-right'] || [0, 0]),\n 'bottom': Point.convert(offset['bottom'] || [0, 0]),\n 'bottom-left': Point.convert(offset['bottom-left'] || [0, 0]),\n 'bottom-right': Point.convert(offset['bottom-right'] || [0, 0]),\n 'left': Point.convert(offset['left'] || [0, 0]),\n 'right': Point.convert(offset['right'] || [0, 0])\n };\n }\n}\n","import packageJSON from '../package.json' with {type: 'json'};\nimport {Map, type MapOptions, type WebGLContextAttributesWithType} from './ui/map';\nimport {NavigationControl, type NavigationControlOptions} from './ui/control/navigation_control';\nimport {GeolocateControl, type GeolocateControlOptions} from './ui/control/geolocate_control';\nimport {AttributionControl, type AttributionControlOptions} from './ui/control/attribution_control';\nimport {LogoControl, type LogoControlOptions} from './ui/control/logo_control';\nimport {ScaleControl, type ScaleControlOptions, type Unit} from './ui/control/scale_control';\nimport {FullscreenControl, type FullscreenControlOptions} from './ui/control/fullscreen_control';\nimport {TerrainControl} from './ui/control/terrain_control';\nimport {GlobeControl} from './ui/control/globe_control';\nimport {type Offset, Popup, type PopupOptions} from './ui/popup';\nimport {type Alignment, Marker, type MarkerOptions} from './ui/marker';\nimport {type AddLayerObject, type FeatureIdentifier, Style, type StyleOptions, type StyleSetterOptions, type StyleSwapOptions, type TransformStyleFunction} from './style/style';\nimport {LngLat, type LngLatLike} from './geo/lng_lat';\nimport {LngLatBounds, type LngLatBoundsLike} from './geo/lng_lat_bounds';\nimport Point from '@mapbox/point-geometry';\nimport {MercatorCoordinate} from './geo/mercator_coordinate';\nimport {Evented, type ErrorEvent, Event, type Listener} from './util/evented';\nimport {type AddProtocolAction, config} from './util/config';\nimport {rtlMainThreadPluginFactory} from './source/rtl_text_plugin_main_thread';\nimport {now, setNow, restoreNow, isTimeFrozen} from './util/time_control';\nimport {WorkerPool} from './util/worker_pool';\nimport {prewarm, clearPrewarmedResources} from './util/global_worker_pool';\nimport {AJAXError, type ExpiryData, type GetResourceResponse, type RequestParameters} from './util/ajax';\nimport {GeoJSONSource, type SetClusterOptions} from './source/geojson_source';\nimport {CanvasSource, type CanvasSourceSpecification} from './source/canvas_source';\nimport {type CanonicalTileRange, type Coordinates, ImageSource, type UpdateImageOptions} from './source/image_source';\nimport {RasterDEMTileSource} from './source/raster_dem_tile_source';\nimport {RasterTileSource} from './source/raster_tile_source';\nimport {VectorTileSource} from './source/vector_tile_source';\nimport {VideoSource} from './source/video_source';\nimport {type Source, type SourceClass, addSourceType} from './source/source';\nimport {addProtocol, removeProtocol} from './source/protocol_crud';\nimport {type Dispatcher, getGlobalDispatcher} from './util/dispatcher';\nimport {EdgeInsets, type PaddingOptions} from './geo/edge_insets';\nimport {type MapTerrainEvent, type MapStyleImageMissingEvent, type MapStyleDataEvent, type MapSourceDataEvent, type MapLibreZoomEvent, type MapLibreEvent, type MapLayerTouchEvent, type MapLayerMouseEvent, type MapLayerEventType, type MapEventType, type MapDataEvent, type MapContextEvent, MapWheelEvent, MapTouchEvent, MapMouseEvent, type MapSourceDataType, type MapProjectionEvent} from './ui/events';\nimport {BoxZoomHandler} from './ui/handler/box_zoom';\nimport {DragRotateHandler} from './ui/handler/shim/drag_rotate';\nimport {DragPanHandler, type DragPanOptions} from './ui/handler/shim/drag_pan';\nimport {ScrollZoomHandler} from './ui/handler/scroll_zoom';\nimport {TwoFingersTouchZoomRotateHandler} from './ui/handler/shim/two_fingers_touch';\nimport {Hash} from './ui/hash';\nimport {CooperativeGesturesHandler, type GestureOptions} from './ui/handler/cooperative_gestures';\nimport {DoubleClickZoomHandler} from './ui/handler/shim/dblclick_zoom';\nimport {KeyboardHandler} from './ui/handler/keyboard';\nimport {TwoFingersTouchPitchHandler, TwoFingersTouchRotateHandler, TwoFingersTouchZoomHandler, type AroundCenterOptions} from './ui/handler/two_fingers_touch';\nimport {MessageType, type ActorMessage, type RequestResponseMessageMap} from './util/actor_messages';\nimport {createTileMesh, type CreateTileMeshOptions, type IndicesType, type TileMesh} from './util/create_tile_mesh';\nimport type {ControlPosition, IControl} from './ui/control/control';\nimport type {CustomRenderMethod, CustomLayerInterface, CustomRenderMethodInput} from './style/style_layer/custom_style_layer';\nimport type {AnimationOptions, CameraForBoundsOptions, CameraOptions, CameraUpdateTransformFunction, CenterZoomBearing, EaseToOptions, FitBoundsOptions, FlyToOptions, JumpToOptions, PointLike} from './ui/camera';\nimport type {DistributiveKeys, DistributiveOmit, GeoJSONFeature, MapGeoJSONFeature} from './util/vectortile_to_geojson';\nimport type {Handler, HandlerResult} from './ui/handler_manager';\nimport type {Complete, RequireAtLeastOne, Subscription} from './util/util';\nimport type {CalculateTileZoomFunction, CoveringTilesOptions} from './geo/projection/covering_tiles';\nimport type {TransformConstrainFunction} from './geo/transform_interface';\nimport type {StyleImage, StyleImageData, StyleImageInterface, StyleImageMetadata, TextFit} from './style/style_image';\nimport type {StyleLayer} from './style/style_layer';\nimport type {Tile} from './tile/tile';\nimport type {GeoJSONFeatureDiff, GeoJSONFeatureId, GeoJSONSourceDiff} from './source/geojson_source_diff';\nimport type {QueryRenderedFeaturesOptions, QuerySourceFeatureOptions} from './source/query_features';\nimport type {RequestTransformFunction, ResourceType} from './util/request_manager';\nimport type {OverscaledTileID} from './tile/tile_id';\nimport type {PositionAnchor} from './ui/anchor';\nimport type {ProjectionData} from './geo/projection/projection_data';\nimport type {WorkerTileResult} from './source/worker_source';\nimport type {Actor, IActor} from './util/actor';\nimport type {Bucket} from './data/bucket';\nimport type {CollisionBoxArray} from './data/array_types.g';\nimport type {AlphaImage} from './util/image';\nimport type {GlyphPosition, GlyphPositions} from './render/glyph_atlas';\nimport type {ImageAtlas} from './render/image_atlas';\nimport type {StyleGlyph} from './style/style_glyph';\nimport type {FeatureIndex} from './data/feature_index';\nimport type {DashEntry} from './render/line_atlas';\nconst version = packageJSON.version;\n\nexport type * from '@maplibre/maplibre-gl-style-spec';\n\n/**\n * Sets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text).\n * Necessary for supporting the Arabic and Hebrew languages, which are written right-to-left.\n *\n * @param pluginURL - URL pointing to the Mapbox RTL text plugin source.\n * @param lazy - If set to `true`, maplibre will defer loading the plugin until rtl text is encountered,\n * rtl text will then be rendered only after the plugin finishes loading.\n * @example\n * ```ts\n * setRTLTextPlugin('https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js', false);\n * ```\n * @see [Add support for right-to-left scripts](https://maplibre.org/maplibre-gl-js/docs/examples/mapbox-gl-rtl-text/)\n */\nfunction setRTLTextPlugin(pluginURL: string, lazy: boolean): Promise {\n return rtlMainThreadPluginFactory().setRTLTextPlugin(pluginURL, lazy);\n}\n/**\n * Gets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text) status.\n * The status can be `unavailable` (i.e. not requested or removed), `loading`, `loaded` or `error`.\n * If the status is `loaded` and the plugin is requested again, an error will be thrown.\n *\n * @example\n * ```ts\n * const pluginStatus = getRTLTextPluginStatus();\n * ```\n */\nfunction getRTLTextPluginStatus(): string {\n return rtlMainThreadPluginFactory().getRTLTextPluginStatus();\n}\n/**\n * Returns the package version of the library\n * @returns Package version of the library\n */\nfunction getVersion() { return version; }\n/**\n * Gets the number of web workers instantiated on a page with GL JS maps.\n * By default, workerCount is 1 except for Safari browser where it is set to half the number of CPU cores (capped at 3).\n * Make sure to set this property before creating any map instances for it to have effect.\n *\n * @returns Number of workers currently configured.\n * @example\n * ```ts\n * const workerCount = getWorkerCount()\n * ```\n */\nfunction getWorkerCount() { return WorkerPool.workerCount; }\n/**\n * Sets the number of web workers instantiated on a page with GL JS maps.\n * By default, workerCount is 1 except for Safari browser where it is set to half the number of CPU cores (capped at 3).\n * Make sure to set this property before creating any map instances for it to have effect.\n *\n * @example\n * ```ts\n * setWorkerCount(2);\n * ```\n */\nfunction setWorkerCount(count: number) { WorkerPool.workerCount = count; }\n/**\n * Gets and sets the maximum number of images (raster tiles, sprites, icons) to load in parallel,\n * which affects performance in raster-heavy maps. 16 by default.\n *\n * @returns Number of parallel requests currently configured.\n * @example\n * ```ts\n * getMaxParallelImageRequests();\n * ```\n */\nfunction getMaxParallelImageRequests() { return config.MAX_PARALLEL_IMAGE_REQUESTS; }\n/**\n * Sets the maximum number of images (raster tiles, sprites, icons) to load in parallel,\n * which affects performance in raster-heavy maps. 16 by default.\n *\n * @example\n * ```ts\n * setMaxParallelImageRequests(10);\n * ```\n */\nfunction setMaxParallelImageRequests(numRequests: number) { config.MAX_PARALLEL_IMAGE_REQUESTS = numRequests; }\n/**\n * Gets the worker url\n * @returns The worker url\n */\nfunction getWorkerUrl() { return config.WORKER_URL; }\n/**\n * Sets the worker url\n */\nfunction setWorkerUrl(value: string) { config.WORKER_URL = value; }\n/**\n * Allows loading javascript code in the worker thread.\n * *Note* that since this is using some very internal classes and flows it is considered experimental and can break at any point.\n *\n * It can be useful for the following examples:\n * 1. Using `self.addProtocol` in the worker thread - note that you might need to also register the protocol on the main thread.\n * 2. Using `self.registerWorkerSource(workerSource: WorkerSource)` to register a worker source, which should come with `addSourceType` usually.\n * 3. using `self.actor.registerMessageHandler` to override some internal worker operations\n * @param workerUrl - the worker url e.g. a url of a javascript file to load in the worker\n * @returns\n *\n * @example\n * ```ts\n * // below is an example of sending a js file to the worker to load the method there\n * // Note that you'll need to call the global function `addProtocol` in the worker to register the protocol there.\n * // add-protocol-worker.js\n * async function loadFn(params, abortController) {\n * const t = await fetch(`https://${params.url.split(\"://\")[1]}`);\n * if (t.status == 200) {\n * const buffer = await t.arrayBuffer();\n * return {data: buffer}\n * } else {\n * throw new Error(`Tile fetch error: ${t.statusText}`);\n * }\n * }\n * self.addProtocol('custom', loadFn);\n *\n * // main.js\n * importScriptInWorkers('add-protocol-worker.js');\n * ```\n */\nfunction importScriptInWorkers(workerUrl: string) { return getGlobalDispatcher().broadcast(MessageType.importScript, workerUrl); }\n\nexport {\n Map,\n NavigationControl,\n GeolocateControl,\n AttributionControl,\n LogoControl,\n ScaleControl,\n FullscreenControl,\n TerrainControl,\n GlobeControl,\n Hash,\n Popup,\n Marker,\n Style,\n LngLat,\n LngLatBounds,\n Point,\n MercatorCoordinate,\n Evented,\n Event,\n AJAXError,\n config,\n CanvasSource,\n GeoJSONSource,\n ImageSource,\n RasterDEMTileSource,\n RasterTileSource,\n VectorTileSource,\n VideoSource,\n EdgeInsets,\n BoxZoomHandler,\n DragRotateHandler,\n DragPanHandler,\n ScrollZoomHandler,\n TwoFingersTouchZoomRotateHandler,\n CooperativeGesturesHandler,\n DoubleClickZoomHandler,\n KeyboardHandler,\n TwoFingersTouchZoomHandler,\n TwoFingersTouchRotateHandler,\n TwoFingersTouchPitchHandler,\n MapWheelEvent,\n MapTouchEvent,\n MapMouseEvent,\n type Handler,\n type RequireAtLeastOne,\n type CameraUpdateTransformFunction,\n type TransformConstrainFunction,\n type CustomRenderMethod,\n type CalculateTileZoomFunction,\n type MapSourceDataType,\n type TileMesh,\n type CreateTileMeshOptions,\n type ControlPosition,\n type Subscription,\n type Complete,\n type CameraOptions,\n type CenterZoomBearing,\n type StyleImage,\n type StyleImageData,\n type StyleImageMetadata,\n type StyleLayer,\n type GetResourceResponse,\n type MapGeoJSONFeature,\n type Alignment,\n type AddProtocolAction,\n type SourceClass,\n type IndicesType,\n type AttributionControlOptions,\n type CanonicalTileRange,\n type Tile,\n type Listener,\n type Coordinates,\n type UpdateImageOptions,\n type DragPanOptions,\n type FullscreenControlOptions,\n type SetClusterOptions,\n type GeoJSONSourceDiff,\n type GeolocateControlOptions,\n type LogoControlOptions,\n type StyleImageInterface,\n type AddLayerObject,\n type StyleSetterOptions,\n type CameraForBoundsOptions,\n type EaseToOptions,\n type FitBoundsOptions,\n type FlyToOptions,\n type FeatureIdentifier,\n type JumpToOptions,\n type QueryRenderedFeaturesOptions,\n type QuerySourceFeatureOptions,\n type AnimationOptions,\n type StyleSwapOptions,\n type StyleOptions,\n type RequestTransformFunction,\n type MarkerOptions,\n type NavigationControlOptions,\n type PopupOptions,\n type Offset,\n type OverscaledTileID,\n type ScaleControlOptions,\n type Unit,\n type AroundCenterOptions,\n type HandlerResult,\n type CustomRenderMethodInput,\n type ExpiryData,\n type PositionAnchor,\n type ProjectionData,\n type GeoJSONFeatureId,\n type GeoJSONFeatureDiff,\n type TextFit,\n type TransformStyleFunction,\n type DistributiveOmit,\n type DistributiveKeys,\n type RequestParameters,\n type RequestResponseMessageMap,\n type WorkerTileResult,\n type ResourceType,\n type Dispatcher,\n type Actor,\n type IActor,\n type ActorMessage,\n type Bucket,\n type CollisionBoxArray,\n type FeatureIndex,\n type AlphaImage,\n type GlyphPositions,\n type GlyphPosition,\n type ImageAtlas,\n type MessageType,\n type StyleGlyph,\n type MapOptions,\n type GestureOptions,\n type WebGLContextAttributesWithType,\n type IControl,\n type CustomLayerInterface,\n type CanvasSourceSpecification,\n type PaddingOptions,\n type LngLatLike,\n type PointLike,\n type LngLatBoundsLike,\n type Source,\n type MapProjectionEvent,\n type MapTerrainEvent,\n type MapStyleImageMissingEvent,\n type MapStyleDataEvent,\n type MapSourceDataEvent,\n type MapLibreZoomEvent,\n type MapLibreEvent,\n type MapLayerTouchEvent,\n type MapLayerMouseEvent,\n type MapLayerEventType,\n type MapEventType,\n type MapDataEvent,\n type MapContextEvent,\n type ErrorEvent,\n type GeoJSONFeature,\n type CoveringTilesOptions,\n type DashEntry,\n setRTLTextPlugin,\n getRTLTextPluginStatus,\n prewarm,\n clearPrewarmedResources,\n getVersion,\n getWorkerCount,\n setWorkerCount,\n getMaxParallelImageRequests,\n setMaxParallelImageRequests,\n getWorkerUrl,\n setWorkerUrl,\n addProtocol,\n removeProtocol,\n addSourceType,\n importScriptInWorkers,\n createTileMesh,\n now,\n setNow,\n restoreNow,\n isTimeFrozen\n};\n","import {DOM} from '../../util/dom';\n\nimport {warnOnce} from '../../util/util';\n\nimport {Event, Evented} from '../../util/evented';\nimport type {Map} from '../map';\nimport type {IControl} from './control';\n\n/**\n * The {@link FullscreenControl} options object\n */\nexport type FullscreenControlOptions = {\n /**\n * `container` is the [compatible DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen#Compatible_elements) which should be made full screen. By default, the map container element will be made full screen.\n */\n container?: HTMLElement;\n};\n\n/**\n * A `FullscreenControl` control contains a button for toggling the map in and out of fullscreen mode.\n * When [requestFullscreen](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen) is not supported, fullscreen is handled via CSS properties.\n * The map's `cooperativeGestures` option is temporarily disabled while the map\n * is in fullscreen mode, and is restored when the map exist fullscreen mode.\n *\n * @group Markers and Controls\n * @param options - the full screen control options\n *\n * @example\n * ```ts\n * map.addControl(new FullscreenControl({container: document.querySelector('body')}));\n * ```\n * @see [View a fullscreen map](https://maplibre.org/maplibre-gl-js/docs/examples/fullscreen/)\n *\n * ## Events\n *\n * **Event** `fullscreenstart` of type {@link Event} will be fired when fullscreen mode has started.\n *\n * **Event** `fullscreenend` of type {@link Event} will be fired when fullscreen mode has ended.\n */\nexport class FullscreenControl extends Evented implements IControl {\n _map: Map;\n _controlContainer: HTMLElement;\n _fullscreen: boolean;\n _fullscreenchange: string;\n _fullscreenButton: HTMLButtonElement;\n _container: HTMLElement;\n _prevCooperativeGesturesEnabled: boolean;\n\n /**\n * @param options - the control's options\n */\n constructor(options: FullscreenControlOptions = {}) {\n super();\n this._fullscreen = false;\n\n if (options && options.container) {\n if (options.container instanceof HTMLElement) {\n this._container = options.container;\n } else {\n warnOnce('Full screen control \\'container\\' must be a DOM element.');\n }\n }\n\n if ('onfullscreenchange' in document) {\n this._fullscreenchange = 'fullscreenchange';\n } else if ('onmozfullscreenchange' in document) {\n this._fullscreenchange = 'mozfullscreenchange';\n } else if ('onwebkitfullscreenchange' in document) {\n this._fullscreenchange = 'webkitfullscreenchange';\n } else if ('onmsfullscreenchange' in document) {\n this._fullscreenchange = 'MSFullscreenChange';\n }\n }\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map): HTMLElement {\n this._map = map;\n if (!this._container) this._container = this._map.getContainer();\n this._controlContainer = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-group');\n this._setupUI();\n return this._controlContainer;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._controlContainer);\n this._map = null;\n window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);\n }\n\n _setupUI() {\n const button = this._fullscreenButton = DOM.create('button', (('maplibregl-ctrl-fullscreen')), this._controlContainer);\n DOM.create('span', 'maplibregl-ctrl-icon', button).setAttribute('aria-hidden', 'true');\n button.type = 'button';\n this._updateTitle();\n this._fullscreenButton.addEventListener('click', this._onClickFullscreen);\n window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);\n }\n\n _updateTitle() {\n const title = this._getTitle();\n this._fullscreenButton.setAttribute('aria-label', title);\n this._fullscreenButton.title = title;\n }\n\n _getTitle() {\n return this._map._getUIString(this._isFullscreen() ? 'FullscreenControl.Exit' : 'FullscreenControl.Enter');\n }\n\n _isFullscreen() {\n return this._fullscreen;\n }\n\n _onFullscreenChange = () => {\n let fullscreenElement =\n window.document.fullscreenElement ||\n (window.document as any).mozFullScreenElement ||\n (window.document as any).webkitFullscreenElement ||\n (window.document as any).msFullscreenElement;\n\n while (fullscreenElement?.shadowRoot?.fullscreenElement) {\n fullscreenElement = fullscreenElement.shadowRoot.fullscreenElement;\n }\n\n if ((fullscreenElement === this._container) !== this._fullscreen) {\n this._handleFullscreenChange();\n }\n };\n\n _handleFullscreenChange() {\n this._fullscreen = !this._fullscreen;\n this._fullscreenButton.classList.toggle('maplibregl-ctrl-shrink');\n this._fullscreenButton.classList.toggle('maplibregl-ctrl-fullscreen');\n this._updateTitle();\n\n if (this._fullscreen) {\n this.fire(new Event('fullscreenstart'));\n this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled();\n this._map.cooperativeGestures.disable();\n } else {\n this.fire(new Event('fullscreenend'));\n if (this._prevCooperativeGesturesEnabled) {\n this._map.cooperativeGestures.enable();\n }\n }\n }\n\n _onClickFullscreen = () => {\n if (this._isFullscreen()) {\n this._exitFullscreen();\n } else {\n this._requestFullscreen();\n }\n };\n\n _exitFullscreen() {\n if (window.document.exitFullscreen) {\n (window.document as any).exitFullscreen();\n } else if ((window.document as any).mozCancelFullScreen) {\n (window.document as any).mozCancelFullScreen();\n } else if ((window.document as any).msExitFullscreen) {\n (window.document as any).msExitFullscreen();\n } else if ((window.document as any).webkitCancelFullScreen) {\n (window.document as any).webkitCancelFullScreen();\n } else {\n this._togglePseudoFullScreen();\n }\n }\n\n _requestFullscreen() {\n if (this._container.requestFullscreen) {\n this._container.requestFullscreen();\n } else if ((this._container as any).mozRequestFullScreen) {\n (this._container as any).mozRequestFullScreen();\n } else if ((this._container as any).msRequestFullscreen) {\n (this._container as any).msRequestFullscreen();\n } else if ((this._container as any).webkitRequestFullscreen) {\n (this._container as any).webkitRequestFullscreen();\n } else {\n this._togglePseudoFullScreen();\n }\n }\n\n _togglePseudoFullScreen() {\n this._container.classList.toggle('maplibregl-pseudo-fullscreen');\n this._handleFullscreenChange();\n this._map.resize();\n }\n}\n","import {DOM} from '../../util/dom';\n\nimport type {Map} from '../map';\nimport type {IControl} from './control';\n\n/**\n * A `GlobeControl` control contains a button for toggling the map projection between \"mercator\" and \"globe\".\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * let map = new Map()\n * .addControl(new GlobeControl());\n * ```\n * \n * @see [Display a globe with a fill extrusion layer](https://maplibre.org/maplibre-gl-js/docs/examples/display-a-globe-with-a-fill-extrusion-layer/)\n */\nexport class GlobeControl implements IControl {\n _map: Map;\n _container: HTMLElement;\n _globeButton: HTMLButtonElement;\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._container = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-group');\n this._globeButton = DOM.create('button', 'maplibregl-ctrl-globe', this._container);\n DOM.create('span', 'maplibregl-ctrl-icon', this._globeButton).setAttribute('aria-hidden', 'true');\n this._globeButton.type = 'button';\n this._globeButton.addEventListener('click', this._toggleProjection);\n\n this._updateGlobeIcon();\n this._map.on('styledata', this._updateGlobeIcon);\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n this._map.off('styledata', this._updateGlobeIcon);\n this._globeButton.removeEventListener('click', this._toggleProjection);\n this._map = undefined;\n }\n\n _toggleProjection = () => {\n const currentProjection = this._map.getProjection()?.type;\n if (currentProjection === 'mercator' || !currentProjection) {\n this._map.setProjection({type: 'globe'});\n } else {\n this._map.setProjection({type: 'mercator'});\n }\n this._updateGlobeIcon();\n };\n\n _updateGlobeIcon = () => {\n this._globeButton.classList.remove('maplibregl-ctrl-globe');\n this._globeButton.classList.remove('maplibregl-ctrl-globe-enabled');\n if (this._map.getProjection()?.type === 'globe') {\n this._globeButton.classList.add('maplibregl-ctrl-globe-enabled');\n this._globeButton.title = this._map._getUIString('GlobeControl.Disable');\n } else {\n this._globeButton.classList.add('maplibregl-ctrl-globe');\n this._globeButton.title = this._map._getUIString('GlobeControl.Enable');\n }\n };\n}\n","import {DOM} from '../../util/dom';\n\nimport type {Map} from '../map';\nimport type {IControl} from './control';\nimport type {TerrainSpecification} from '@maplibre/maplibre-gl-style-spec';\n\n/**\n * A `TerrainControl` control contains a button for turning the terrain on and off.\n *\n * @group Markers and Controls\n *\n * @example\n * ```ts\n * let map = new Map({TerrainControl: false})\n * .addControl(new TerrainControl({\n * source: \"terrain\"\n * }));\n * ```\n */\nexport class TerrainControl implements IControl {\n options: TerrainSpecification;\n _map: Map;\n _container: HTMLElement;\n _terrainButton: HTMLButtonElement;\n\n /**\n * @param options - the control's options\n */\n constructor(options: TerrainSpecification) {\n this.options = options;\n }\n\n /** {@inheritDoc IControl.onAdd} */\n onAdd(map: Map) {\n this._map = map;\n this._container = DOM.create('div', 'maplibregl-ctrl maplibregl-ctrl-group');\n this._terrainButton = DOM.create('button', 'maplibregl-ctrl-terrain', this._container);\n DOM.create('span', 'maplibregl-ctrl-icon', this._terrainButton).setAttribute('aria-hidden', 'true');\n this._terrainButton.type = 'button';\n this._terrainButton.addEventListener('click', this._toggleTerrain);\n\n this._updateTerrainIcon();\n this._map.on('terrain', this._updateTerrainIcon);\n return this._container;\n }\n\n /** {@inheritDoc IControl.onRemove} */\n onRemove() {\n DOM.remove(this._container);\n this._map.off('terrain', this._updateTerrainIcon);\n this._map = undefined;\n }\n\n _toggleTerrain = () => {\n if (this._map.getTerrain()) {\n this._map.setTerrain(null);\n } else {\n this._map.setTerrain(this.options);\n }\n this._updateTerrainIcon();\n };\n\n _updateTerrainIcon = () => {\n this._terrainButton.classList.remove('maplibregl-ctrl-terrain');\n this._terrainButton.classList.remove('maplibregl-ctrl-terrain-enabled');\n if (this._map.terrain) {\n this._terrainButton.classList.add('maplibregl-ctrl-terrain-enabled');\n this._terrainButton.title = this._map._getUIString('TerrainControl.Disable');\n } else {\n this._terrainButton.classList.add('maplibregl-ctrl-terrain');\n this._terrainButton.title = this._map._getUIString('TerrainControl.Enable');\n }\n };\n}\n","//\n// Our custom intro provides a specialized \"define()\" function, called by the\n// AMD modules below, that sets up the worker blob URL and then executes the\n// main module, storing its exported value as 'maplibregl'\n\n// The three \"chunks\" imported here are produced by a first Rollup pass,\n// which outputs them as AMD modules.\n\n// Shared dependencies\nimport '../../staging/maplibregl/shared';\n\n// Worker and its unique dependencies\n// When this wrapper function is passed to our custom define() in build/rollup/bundle_prelude.js,\n// it gets stringified, together with the shared wrapper (using\n// Function.toString()), and the resulting string of code is made into a\n// Blob URL that gets used by the main module to create the web workers.\nimport '../../staging/maplibregl/worker';\n\n// Main module and its dependencies\nimport '../../staging/maplibregl/index';\n\nexport default maplibregl;\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","Point","x","y","this","SuppressedError","prototype","clone","add","p","_add","sub","_sub","multByPoint","_multByPoint","divByPoint","_divByPoint","mult","k","_mult","div","_div","rotate","a","_rotate","rotateAround","_rotateAround","matMult","m","_matMult","unit","_unit","perp","_perp","round","_round","mag","Math","sqrt","equals","other","dist","distSqr","dx","dy","angle","atan2","angleTo","b","angleWith","angleWithSep","cos","sin","constructor","convert","Array","isArray","undefined","Error","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","unitbezier","sampleCurveX","t","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","i","x2","abs","d2","t0","t1","solve","supportsOffscreenCanvas","offscreenCanvasDistorted","offscreenCanvasSupported","OffscreenCanvas","getContext","createImageBitmap","isOffscreenCanvasDistorted","size","context","willReadFrequently","base","fillStyle","fillRect","floor","data","getImageData","EPSILON","ARRAY_TYPE","Float32Array","create","out","glMatrix.ARRAY_TYPE","identity","length","z","fromValues","scale","cross","az","bz","len","transformMat4","w","fromEuler","order","arguments","halfToRad","PI","sx","sy","sz","cz","vec3.create","vec3.fromValues","mat3.create","EXTENT","pixelsToTileUnits","tile","pixelValue","tileSize","pow","tileID","overscaledZ","mod","n","lerp","mix","easeCubicInOut","t2","t3","bezier","defaultEasing","clamp","min","max","wrap","d","extend","dest","sources","src","id","mapObject","input","iterator","output","key","call","filterObject","map","warnOnceHistory","warnOnce","message","console","warn","isCounterClockwise","c","isWorker","self","WorkerGlobalScope","_isSafari","isImageBitmap","image","ImageBitmap","transparentPngUrl","readImageUsingVideoFrame","width","height","VideoFrame","frame","timestamp","format","startsWith","swapBR","Uint8ClampedArray","copyTo","destRowOffset","offset","stride","sourceLeft","sourceTop","rect","layout","computeVideoFrameParameters","tmp","close","offscreenCanvas","offscreenCanvasContext","subscribe","target","listener","options","addEventListener","unsubscribe","removeEventListener","degreesToRadians","degrees","radiansToDegrees","touchableEvents","touchstart","touchmove","touchmoveWindow","touchend","touchcancel","pointableEvents","dblclick","click","mouseover","mouseout","mousedown","mousemove","mousemoveWindow","mouseup","mouseupWindow","contextmenu","wheel","ABORT_ERROR","AbortError","messageOrError","super","name","stack","isAbortError","error","config","MAX_PARALLEL_IMAGE_REQUESTS","MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME","MAX_TILE_CACHE_ZOOM_LEVELS","REGISTERED_PROTOCOLS","WORKER_URL","getProtocol","url","substring","indexOf","GLOBAL_DISPATCHER_ID","AJAXError","status","statusText","body","getReferrer","worker","referrer","window","location","protocol","parent","href","makeRequest","requestParameters","abortController","test","protocolLoadFn","actor","sendAsync","type","targetMapId","fetch","Request","AbortController","Object","hasOwnProperty","request","method","credentials","headers","cache","signal","response","parsePromise","has","set","Blob","ok","blob","arrayBuffer","json","text","throwIfAborted","cacheControl","get","expires","makeFetchRequest","mustQueue","xhr","XMLHttpRequest","open","responseType","setRequestHeader","_a","Accept","withCredentials","onerror","onload","aborted","JSON","parse","err","getResponseHeader","abort","reason","send","makeXMLHttpRequest","sameOrigin","inComingUrl","urlObj","URL","locationObj","host","_addEventListener","listenerList","push","_removeEventListener","index","splice","Event","ErrorEvent","Evented","on","_listeners","off","_oneTimeListeners","once","fire","event","properties","listens","listeners","slice","oneTimeListeners","_eventedParent","_eventedParentData","setEventedParent","v8Spec","$version","$root","version","required","values","metadata","center","centerAltitude","zoom","bearing","default","period","units","pitch","roll","state","light","sky","projection","terrain","sprite","glyphs","transition","layers","source","source_vector","vector","tiles","bounds","scheme","xyz","tms","minzoom","maxzoom","attribution","promoteId","volatile","encoding","mvt","mlt","source_raster","raster","source_raster_dem","terrarium","mapbox","custom","redFactor","blueFactor","greenFactor","baseShift","source_geojson","geojson","buffer","maximum","minimum","filter","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","source_video","video","urls","coordinates","source_image","layer","fill","line","symbol","circle","heatmap","hillshade","background","paint","layout_background","visibility","visible","none","expression","interpolated","parameters","layout_fill","layout_circle","layout_heatmap","layout_line","butt","square","bevel","miter","requires","layout_symbol","point","auto","never","always","cooperative","viewport","both","tokens","left","right","top","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_operator","in","all","any","geometry_type","LineString","Polygon","function","stops","property","exponential","interval","categorical","colorSpace","rgb","lab","hcl","function_stop","anchor","position","color","intensity","exaggeration","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","linear","nearest","paint_hillshade","standard","basic","combined","igor","multidirectional","paint_background","duration","delay","constant","interpolation","interpolation_name","syntax","overloads","refProperties","deref","forEach","deepEqual","keys","addCommand","commands","command","addSource","sourceId","after","args","removeSource","sourcesRemoved","updateSource","canUpdateGeoJSON","before","prop","diffLayerPropertyChanges","layerId","klass","pluckId","indexById","group","ValidationError","identifier","__line__","extendBy","inputs","ExpressionParsingError","Scope","bindings","concat","NullType","kind","NumberType","StringType","BooleanType","ColorType","ProjectionDefinitionType","ObjectType","ValueType","CollatorType","FormattedType","PaddingType","ColorArrayType","NumberArrayType","ResolvedImageType","VariableAnchorOffsetCollectionType","array","itemType","N","typeToString","valueMemberTypes","checkSubtype","expected","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","verifyType","sample","Xn","Zn","deg2rad","rad2deg","constrainAngle","rgbToLab","r","g","alpha","xyz2lab","rgb2xyz","l","labToRgb","isNaN","lab2xyz","xyz2rgb","hasOwn","object","getOwn","parseHex","hex","parseInt","padEnd","parseAlpha","asPercentage","validateNumbers","Number","namedColors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","interpolateNumber","from","to","interpolateArray","Color","premultiplied","overwriteGetter","rgba","toLowerCase","trim","namedColorsMatch","rgbMatch","match","_","rp","f1","gp","f2","bp","f3","ap","argFormat","join","valFormat","maxValue","hslMatch","h","s","hsla","f","hslToRgb","parseCssColor","Infinity","rgbColor","NaN","rgbToHcl","getterKey","lazyValue","defineProperty","toString","interpolate","spaceKey","hue0","chroma0","light0","alphaF","hue1","chroma1","light1","alphaT","hue","chroma","dh","hclToRgb","transparent","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","VERTICAL_ALIGN_OPTIONS","FormattedSection","fontStack","textColor","verticalAlign","Formatted","sections","fromString","unformatted","isEmpty","section","factory","Padding","val","stringify","NumberArray","ColorArray","parsed_val","colors","RuntimeError","toJSON","anchors","Set","VariableAnchorOffsetCollection","anchorValue","offsetValue","toValues","fx","fy","tx","ty","ResolvedImage","available","ProjectionDefinition","validateRGBA","isValue","mixed","item","typeOf","valueToString","String","Literal","expectedType","evaluate","eachChild","outputDefined","types$1","string","number","boolean","Assertion","parsed","ctx","fn","every","arg","types","Coercion","Boolean","parseColor","pad","coll","num","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","Map","availableImages","canonical","geometryType","geometry","canonicalID","cached","ParsingContext","registry","isConstantFunc","path","scope","errors","part","_isConstant","expr","_parse","annotate","typeAnnotation","op","Expr","actual","includes","ec","Let","binding","Var","boundExpression","At","In","needle","haystack","IndexOf","fromIndex","rawIndex","Match","inputType","outputType","cases","outputs","otherwise","labels","labelContext","label","MAX_SAFE_INTEGER","Case","branches","Slice","beginIndex","endIndex","findStopLessThanOrEqualTo","lastIndex","currentValue","nextValue","lowerIndex","upperIndex","currentIndex","Step","labelKey","valueKey","stopCount","getDefaultExportFromCjs","__esModule","hasRequiredUnitbezier","unitbezierExports","requireUnitbezier","Interpolate","operator","interpolationFactor","lower","upper","exponentialInterpolation","controlPoints","rest","outputLower","outputUpper","lowerValue","upperValue","difference","progress","interpolateFactory","padding","numberArray","colorArray","variableAnchorOffsetCollection","Coalesce","parsedArgs","needsAnnotation","requestedImageName","argCount","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","lt","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","CollatorExpression","NumberFormat","currency","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","Length","getTileCoordinates","log","tilesAtZoom","getLngLatFromTileCoord","coord","mercatorX","mercatorY","atan","exp","updateBBox","bbox","boxWithinBox","bbox1","bbox2","pointOnBoundary","p1","p2","x1","y1","y2","segmentIntersectSegment","v1","v2","twoSided","lineIntersectPolygon","polygon","ring","j","pointWithinPolygon","rings","trueIfOnBoundary","inside","pointWithinPolygons","polygons","lineStringWithinPolygon","lineStringWithinPolygons","q1","q2","x3","y3","det1","det2","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","Within","geometries","polygonsCoords","features","polygonGeometry","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","TinyQueue$1","_down","_up","pop","peek","pos","current","halfLength","bestChild","quickselect","arr","defaultCompare","sd","swap","classifyRings","maxRings","ccw","area","calculateSignedArea","compareAreas","sum","FE","E2","RAD","CheapRuler","lat","coslat","w2","kx","ky","distance","pointOnLine","minX","minY","minI","minT","minDist","sqDist","deg","compareDistPair","getRangeSize","range","isRangeSafe","threshold","splitRange","isLine","size1","getBBox","coords","getPolygonBBox","isValidBBox","bboxToBBoxDistance","ruler","pointToLineDistance","nearestPoint","segmentToSegmentDistance","dist1","dist2","lineToLineDistance","line1","range1","line2","range2","pointsToPointsDistance","points1","points2","pointToPolygonDistance","front","back","lineToPolygonDistance","polygonIntersect","poly1","poly2","polygonToPolygonDistance","polygon1","polygon2","currentMiniDist","ring1","len1","ring2","len2","updateQueue","distQueue","miniDist","rangeA","tempDist","updateQueueTwoSets","pointSet1","pointSet2","pointsToPolygonDistance","TinyQueue","distPair","newRangesA","pointSetToPointSetDistance","isLine1","isLine2","rangeB","threshold1","threshold2","sublibe","newRangesB","toSimpleGeometry","lineString","Distance","flat","pointPosition","pointToGeometryDistance","linePositions","lineStringToGeometryDistance","polygonToGeometryDistance","GlobalState","globalState","expressions$1","at","case","coalesce","let","literal","var","within","CompoundExpression","_evaluate","definition","definitions","availableOverloads","signature","signatureContext","params","isExpressionConstant","argParseFailed","signatures","stringifySignature","actualTypes","register","obj","v","varargs","isTypeAnnotation","childrenConstant","child","isFeatureConstant","isGlobalPropertyConstant","isStateConstant","success","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","getType","isFunction$1","identityFunction","createFunction","propertySpec","zoomAndFeatureDependent","zoomDependent","parseFn","getParseFunction","stop","innerFun","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","evaluateIdentityFunction","getInnerFunction","hashedStops","categoricalKeyType","featureFunctions","zoomStops","featureFunctionStops","interpolationType","bind","coalesce$1","keyType","interp","evaluatedLower","evaluatedUpper","typeof","heatmapDensity","elevation","lineProgress","accumulated","ln2","LN2","pi","E","log10","LN10","ln","log2","asin","acos","ceil","binarySearch","isSupportedScript","upcase","toUpperCase","downcase","StyleExpression","_warningHistory","_evaluator","_defaultValue","getDefaultValue","_enumValues","_globalState","evaluateWithoutErrorHandling","addGlobalState","isExpression","createExpression","parser","enum","formatted","projectionDefinition","resolvedImage","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","globalStateRefs","findGlobalStateRefs","ZoomDependentExpression","createPropertyExpression","expressionInput","isFeatureConstantResult","isZoomConstant","zoomCurve","findZoomCurve","StylePropertyFunction","specification","_parameters","_specification","deserialize","serialized","serialize","childResult","results","childExpression","isExpressionFilter","filterSpec","featureFilter","needGeometry","getGlobalStateRefs","convertFilter$1","compiled","globalProperties","geometryNeeded","convertComparisonOp$1","convertNegation","filters","convertInOp$1","convertHasOp$1","sort","stringify$1","str","getKey","validateConstants","constants","unbundle","valueOf","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","validateSpec","objectKey","elementSpecKey","split","elementSpec","validateElement","validateArray","arraySpec","validateArrayElement","arrayElementValidator","arrayElementSpec","arrayIndex","validateNumber","validateFunction","functionValueSpec","functionType","stopKeyType","previousStopDomainValue","previousStopDomainZoom","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStop","validateStopDomainValue","reportValue","isFinite","validateExpression","expressionContext","expressionObj","propertyKey","propertyType","validateColor","validateEnum","validateFilter","validateNonExpressionFilter","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","exec","validatePaintProperty","validateLayoutProperty","validateLayer","ref","otherLayer","sourceType","validateString","validateSource","replace","sourceName","rasterDEM","rasterDEMSpec","rootType","isCustomEncoding","customEncodingKeys","encodingName","validateRasterDEMSource","mapExpr","reduceExpr","validateLight","lightSpec","validateSky","skySpec","validateTerrain","terrainSpec","validateSprite","allSpriteIds","allSpriteURLs","isObjectLiteral","anything","validateState","VALIDATORS","projectionSpec","isProjectionDefinitionValue","isPropertyValueSpecification","fontFaces","fontName","fontValue","fontValueType","fontFaceSpec","fontFace","entries","validate","validateGlyphsUrl","validateStyleMin","sortErrors","injectValidateSpec","validator","assign","wrapCleanErrors","inner","paintProperty","layoutProperty","visibilitySpec","VisibilityExpressionClass","setValue","_literalValue","_compiledValue","_globalStateRefs","v8","validateStyle","emitValidationErrors","emitter","hasErrors","TransferableGridIndex","extent","cells","ArrayBuffer","Int32Array","start","end","subarray","bboxesOffset","bboxes","insert","_insertReadonly","uid","_forEachCell","_insertCell","cellIndex","query","intersectionTest","_queryCell","seenUids","cell","u","arg1","arg2","cx1","_convertToCellCoord","cy1","cx2","cy2","_convertFromCellCoord","toArrayBuffer","metadataLength","totalCellLength","grid","transferables","writeable","omit","shallow","expressions","_classRegistryKey","isArrayBuffer","getClassRegistryKey","$name","isSerializeHandledByBuiltin","classRegistryKey","isRegistered","Date","RegExp","isView","ImageData","ZoomHistory","first","update","now","floorZ","lastIntegerZoom","lastIntegerZoomTime","lastZoom","lastFloorZoom","codePointAllowsIdeographicBreaking","codePoint","fromCodePoint","codePointHasUprightVerticalOrientation","charIsWhitespace","char","allowsVerticalWritingMode","chars","codePointAt","allowsLetterSpacing","charAllowsLetterSpacing","sanitizedRegExpFromScriptCodes","scriptCodes","supportedPropertyEscapes","code","pe","cursiveScriptRegExp","charHasRotatedVerticalOrientation","rtlScriptRegExp","charInRTLScript","charInSupportedScript","canRenderRTL","stringContainsRTLText","rtlWorkerPlugin","TIMEOUT","applyArabicShaping","processBidirectionalText","processStyledBidirectionalText","pluginStatus","pluginURL","loadScriptResolve","setState","getState","setMethods","rtlTextPlugin","isParsed","getRTLTextPluginStatus","syncState","incomingState","importScripts","urlToLoad","loadScriptPromise","dontWaitForeverTimeoutPromise","setTimeout","race","loadedState","EvaluationParameters","fadeDuration","zoomHistory","crossFadingFactor","getCrossfadeParameters","fraction","fromScale","toScale","isStringInSupportedScript","TRANSITION_SUFFIX","PropertyValue","normalizePropertyExpression","isDataDriven","possiblyEvaluate","TransitionablePropertyValue","transitioned","prior","TransitioningPropertyValue","untransitioned","Transitionable","_properties","_values","defaultTransitionablePropertyValues","getValue","getTransition","setTransition","Transitioning","begin","finalValue","defaultTransitioningPropertyValues","PossiblyEvaluated","hasTransition","Layout","defaultPropertyValues","hasValue","PossiblyEvaluatedPropertyValue","isConstant","constantOr","defaultPossiblyEvaluatedValues","DataConstantProperty","interpolationFn","interpolates","DataDrivenProperty","overrides","interpolatedValue","CrossFadedDataDrivenProperty","evaluatedValue","constantValue","_calculate","cameraVal","mid","CrossFadedProperty","ColorRampProperty","Properties","overridableProperties","defaultPropertyValue","defaultTransitionablePropertyValue","StyleLayer","_featureFilter","_visibilityExpression","createVisibilityExpression","sourceLayer","_unevaluatedLayout","_transitionablePaint","setPaintProperty","setLayoutProperty","_transitioningPaint","setFilter","_crossfadeParameters","getLayoutProperty","getLayoutAffectingGlobalStateRefs","globalStateRef","propertyName","getPaintAffectingGlobalStateRefs","globalThis","getVisibilityAffectingGlobalStateRefs","_validate","recalculateVisibility","getPaintProperty","endsWith","transitionable","isCrossFadedProperty","wasDataDriven","oldValue","_handleSpecialPaintPropertyUpdate","newValue","_handleOverridablePaintPropertyUpdate","isHidden","roundMinZoom","_evaluatedVisibility","updateTransitions","recalculate","is3D","isTileClipped","hasOffscreenPass","resize","properties$9","RasterStyleLayer","viewTypes","Int8","Int8Array","Uint8","Uint8Array","Int16","Int16Array","Uint16","Uint16Array","Int32","Uint32","Uint32Array","Float32","Struct","structArray","_structArray","_pos1","_pos2","_pos4","_pos8","StructArray","isTransferred","capacity","_trim","byteLength","bytesPerElement","_refreshViews","clear","reserve","oldUint8Array","uint8","createLayout","members","alignment","maxSize","member","typeSize","BYTES_PER_ELEMENT","memberOffset","align","components","StructArrayLayout2i4","int16","emplaceBack","v0","emplace","o2","StructArrayLayout3i6","StructArrayLayout4i8","v3","StructArrayLayout2i4i12","v4","v5","StructArrayLayout2i4ub8","o1","StructArrayLayout2f8","float32","o4","StructArrayLayout10ui20","uint16","v6","v7","v9","StructArrayLayout8ui16","StructArrayLayout4i4ui4i24","v10","v11","StructArrayLayout3f12","StructArrayLayout1ul4","uint32","StructArrayLayout6i1ul2ui20","StructArrayLayout2i2i2i12","StructArrayLayout2f1f2i16","StructArrayLayout2ub2f2i16","StructArrayLayout3ui6","StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48","v12","v13","v14","v15","v16","StructArrayLayout8i15ui1ul2f2ui64","v17","v18","v19","v20","v21","v22","v23","v24","v25","v26","v27","StructArrayLayout1f4","StructArrayLayout1ui2f12","StructArrayLayout1ul2ui8","StructArrayLayout2ui4","StructArrayLayout1ui2","StructArrayLayout4f16","CollisionBoxStruct","anchorPointX","anchorPointY","featureIndex","sourceLayerIndex","bucketIndex","anchorPoint","CollisionBoxArray","PlacedSymbolStruct","anchorX","anchorY","glyphStartIndex","numGlyphs","vertexStartIndex","lineStartIndex","lineLength","segment","lowerSize","upperSize","lineOffsetX","lineOffsetY","writingMode","placedOrientation","hidden","crossTileID","associatedIconIndex","PlacedSymbolArray","SymbolInstanceStruct","rightJustifiedTextSymbolIndex","centerJustifiedTextSymbolIndex","leftJustifiedTextSymbolIndex","verticalPlacedTextSymbolIndex","placedIconSymbolIndex","verticalPlacedIconSymbolIndex","textBoxStartIndex","textBoxEndIndex","verticalTextBoxStartIndex","verticalTextBoxEndIndex","iconBoxStartIndex","iconBoxEndIndex","verticalIconBoxStartIndex","verticalIconBoxEndIndex","numHorizontalGlyphVertices","numVerticalGlyphVertices","numIconVertices","numVerticalIconVertices","useRuntimeCollisionCircles","textBoxScale","collisionCircleDiameter","textAnchorOffsetStartIndex","textAnchorOffsetEndIndex","SymbolInstanceArray","GlyphOffsetArray","getoffsetX","SymbolLineVertexArray","getx","gety","gettileUnitDistanceFromAnchor","TextAnchorOffsetStruct","textAnchor","textOffset0","textOffset1","TextAnchorOffsetArray","FeatureIndexStruct","FeatureIndexArray","PosArray","CircleLayoutArray","FillLayoutArray","FillExtrusionLayoutArray","LineLayoutArray","LineExtLayoutArray","PatternLayoutArray","DashLayoutArray","SymbolLayoutArray","SymbolDynamicLayoutArray","SymbolOpacityArray","CollisionBoxLayoutArray","CollisionVertexArray","TriangleIndexArray","LineIndexArray","SegmentVector","segments","_forceNewSegmentOnNextPrepare","prepareSegment","numVertices","layoutVertexArray","indexArray","sortKey","lastSegment","MAX_VERTEX_ARRAY_LENGTH","vertexLength","createNewSegment","vertexOffset","primitiveOffset","primitiveLength","vaos","getOrCreateLatestSegment","forceNewSegmentOnNextPrepare","destroy","simpleSegment","packUint8ToFloat","patternAttributes","dashAttributes","murmur3","exports","seed","remainder","bytes","h1","h1b","c1","c2","k1","charCodeAt","murmur2","murmurhashJsModule","FeaturePositionMap","ids","positions","indexed","getNumericId","getPositions","intId","Float64Array","numValue","pivot","Uniform","gl","Uniform1f","uniform1f","Uniform4f","uniform4f","UniformColor","emptyMat4","packColor","ConstantBinder","names","uniformNames","setUniform","uniform","getBinding","CrossFadedConstantBinder","patternFrom","patternTo","pixelRatioFrom","pixelRatioTo","setConstantPatternPositions","posTo","posFrom","pixelRatio","tlbr","setConstantDashPositions","dashTo","dashFrom","uniformName","substr","SourceExpressionBinder","PaintVertexArray","paintVertexAttributes","paintVertexArray","populatePaintArray","newLength","_setPaintValue","updatePaintArray","upload","paintVertexBuffer","updateData","createVertexBuffer","CompositeExpressionBinder","useIntegerZoom","minColor","maxColor","currentZoom","factor","CrossFadedBinder","zoomInPaintVertexArray","zoomOutPaintVertexArray","_setPaintValues","getPositionIds","positionIds","attributes","getVertexAttributes","zoomInPaintVertexBuffer","zoomOutPaintVertexBuffer","CrossFadedPatternBinder","imagePositions","patterns","midPos","minMaxPos","CrossFadedDasharrayBinder","dashPositions","dashes","ProgramConfiguration","filterProperties","binders","_buffers","paintAttributeNames","propType","isCrossFaded","StructArrayLayout","layoutType","cacheKey","getMaxValue","binder","populatePaintArrays","updatePaintArrays","featureStates","featureMap","vtLayer","dirty","defines","getBinderAttributes","attribute","getBinderUniforms","uniforms","getPaintVertexBuffers","getUniforms","locations","setUniforms","binderUniforms","updatePaintBuffers","crossfade","patternVertexBuffer","ProgramConfigurationSet","programConfigurations","needsUpload","_featureMap","_bufferOffset","binderType","defaultLayouts","composite","layoutException","getLayoutException","MAX","BITS","MIN","loadGeometry","toEvaluationFeature","VERTEX_MIN_VALUE","addCircleVertex","extrudeX","extrudeY","CircleBucket","overscaling","layerIds","hasDependencies","stateDependentLayerIds","populate","styleLayer","bucketFeatures","circleSortKey","sortFeaturesByKey","subdivide","circleStyle","granularity","subdivisionGranularity","evaluationFeature","bucketFeature","addFeature","states","stateDependentLayers","uploadPending","uploaded","layoutVertexBuffer","layoutAttributes","indexBuffer","createIndexBuffer","extrudes","verticesPerAxis","vx","vy","polygonIntersectsPolygon","polygonA","polygonB","polygonContainsPoint","lineIntersectsLine","polygonIntersectsBufferedPoint","radius","pointIntersectsBufferedLine","polygonIntersectsMultiPolygon","multiPolygon","multiPolygonContainsPoint","lineIntersectsBufferedLine","lineA","lineB","a0","a1","lineSegmentIntersectsLineSegment","b0","b1","radiusSquared","distToSegmentSquared","l2","edgeIntersectsBox","e1","e2","corners","tl","br","dir","getMaximumPaintValue","bucket","translateDistance","translate","queryGeometry","translateAnchor","pt","translated","_stripDuplicates","filteredRing","prevPoint","intersectionTestMapMap","intersectionTestMapViewport","transform","unwrappedTileID","getElevation","projectTileCoordinates","signedDistanceFromCamera","cameraToCenterDistance","intersectionTestViewportMap","adjustedSize","projectPoint","intersectionTestViewportViewport","circleIntersection","pitchAlignment","pitchScale","param","tilePoint","clipPoint","properties$8","CircleStyleLayer","createBucket","queryRadius","circleBucket","queryIntersectsFeature","translatedPolygon","bearingInRadians","transformedPolygon","transformedSize","projectQueryGeometry","HeatmapBucket","properties$7","createImage","channels","RangeError","resizeImage","newImage","copyImage","srcImg","dstImg","srcPt","dstPt","srcData","dstData","srcOffset","dstOffset","AlphaImage","copy","RGBAImage","setPixel","row","col","rLocation","renderColorRamp","evaluationGlobals","resolution","clips","renderPixel","evaluationKey","pxColor","clip","HEATMAP_FULL_RENDER_FBO_KEY","HeatmapStyleLayer","heatmapFbos","_updateColorRamp","colorRamp","colorRampTexture","delete","properties$6","HillshadeStyleLayer","getIlluminationProperties","direction","altitude","highlightColor","shadowColor","numIlluminationSources","altitudeRadians","directionRadians","properties$5","Texture","texture","createTexture","useMipmap","bindTexture","TEXTURE_2D","pixelStoreUnpackFlipY","pixelStoreUnpack","pixelStoreUnpackPremultiplyAlpha","RGBA","premultiply","HTMLImageElement","HTMLCanvasElement","HTMLVideoElement","texImage2D","UNSIGNED_BYTE","texSubImage2D","isSizePowerOfTwo","generateMipmap","setDefault","minFilter","LINEAR_MIPMAP_NEAREST","LINEAR","texParameteri","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","TEXTURE_WRAP_T","deleteTexture","DEMData","dim","_idx","MIN_SAFE_INTEGER","ele","pixels","unpack","getUnpackVector","pack","packDEMData","getPixels","backfillBorder","borderTile","xMin","xMax","yMin","yMax","ox","oy","unpackVector","minScale","vScaled","ColorReliefStyleLayer","_createColorRamp","maxLength","elevationStops","colorStops","colorRampExpression","interpolater","remappedColorRamp","remapStepSize","_colorRampChanged","getColorRampTextures","colorRampTextures","colorImage","elevationImage","elevationPacked","elevationTexture","colorTexture","hasPattern","patternDependencies","patternProperty","constantPattern","addPatternDependencies","patternFeature","patternPropertyValue","linkedList","clockwise","last","signedArea","insertNode","removeNode","filterPoints","again","steiner","prev","earcutLinked","ear","triangles","invSize","pass","zOrder","prevZ","nextZ","list","numMerges","inSize","tail","q","pSize","qSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","x0","y0","pointInTriangleExceptFirst","minZ","maxZ","intersects","locallyInside","isValidDiagonal","splitPolygon","compareXYSlope","eliminateHole","hole","outerNode","bridge","hx","hy","qx","mx","my","tanMin","pointInTriangle","sectorContainsSector","findHoleBridge","bridgeReverse","getLeftmost","leftmost","px","py","intersectsPolygon","middleInside","sign","o3","onSegment","a2","createNode","b2","an","SubdivisionGranularityExpression","baseZoomGranularity","minGranularity","_baseZoomGranularity","_minGranularity","getGranularityForZoomLevel","zoomLevel","SubdivisionGranularitySetting","stencil","noSubdivision","NORTH_POLE_Y","SOUTH_POLE_Y","Subdivider","_vertexBuffer","_vertexDictionary","_used","_granularity","_granularityCellSize","_canonical","_getKey","_vertexToIndex","xInt","yInt","_subdivideTrianglesScanline","inputIndices","flattened","indices","corrected","i0","i1","i2","v0x","v0y","fixWindingOrder","finalIndices","numIndices","primitiveIndex","triangleIndices","triangleVertices","maxX","maxY","cellXmin","cellXmax","cellYmin","cellYmax","cellRow","_scanlineGenerateVertexRingForCellRow","scanlineTriangulateVertexRing","cellRowYTop","cellRowYBottom","edgeIndex","aX","aY","bX","bY","cX","cY","dirX","dirY","isParallelY","isParallelX","tTop","tBottom","tEnter","tExit","enterX","exitX","_generateIntraEdgeVertices","_generateInterEdgeVertices","leftX","rightX","edgeSubdivisionLeftCellX","edgeSubdivisionRightCellX","cellX","dir2X","dir2Y","t2Top","t2Bottom","t2Enter","t2Exit","enter2X","boundarySubdivisionLeftCellX","boundarySubdivisionRightCellX","isBoundaryLeftToRight","isParallelX2","dir3Y","enter3X","boundaryY","_generateOutline","subdividedLines","subdivideVertexLine","pathIndices","_pointArrayToIndices","lineIndices","_handlePoles","subdividedTriangles","north","south","_fillPoles","_ensureNoPoleVertices","_generatePoleQuad","v1x","poleY","southEdge","v1y","v2x","v2y","_initializeVertices","subdividePolygonInternal","generateOutlineLines","holeIndices","flatten","earcutResult","hasHoles","outerLen","queue","eliminateHoles","earcut","cut","_convertIndices","verticesFlattened","indicesTriangles","indicesLineList","vertices","oldIndices","newIndices","subdividePolygon","linePoints","isRing","addLastToFirstSegment","cellSize","finalLineVertices","totalPoints","pointIndex","linePoint0","linePoint1","lineVertex0x","lineVertex0y","lineVertex1x","lineVertex1y","dirXnonZero","dirYnonZero","absDirX","absDirY","lastPointX","lastPointY","nextBoundaryX","nextBoundaryY","axisDistanceToBoundaryX","axisDistanceToBoundaryY","axisDistanceToEndX","axisDistanceToEndY","realDistanceToBoundaryX","POSITIVE_INFINITY","realDistanceToBoundaryY","vertexBuffer","leftmostIndex","leftmostX","ringVertexLength","lastEdgeA","lastEdgeB","candidateIndexA","candidateIndexB","candidateAx","candidateBx","lastEdgeAx","lastEdgeAy","lastEdgeBy","pickA","ey","ny","fillLargeMeshArrays","addVertex","segmentsTriangles","vertexArray","triangleIndexArray","segmentsLines","lineIndexArray","lineList","hasLines","triangleSegment","triangleIndex","lineIndicesStart","lineSegment","listIndex","actualVertexIndices","totalVerticesCreated","count","currentSegmentCutoff","baseVertex","primitiveEndIndex","i0needsVertexCopy","i1needsVertexCopy","i2needsVertexCopy","actualIndex0","copyOrReuseVertex","actualIndex1","actualIndex2","fillSegmentsTriangles","lineListIndex","currentLine","lineVertex","fillSegmentsLines","oldIndex","needsCopy","newIndex","FillBucket","patternFeatures","indexArray2","segments2","fillSortKey","addFeatures","indexBuffer2","subdivided","properties$4","FillStyleLayer","outlineColor","centroidAttributes","VectorTileFeature","pbf","_pbf","_geometry","_keys","readFields","readFeature","readVarint","lines","cmd","cmdLen","readSVarint","toGeoJSON","vtCoords","projectLine","tag","readTag","VectorTileLayer","_features","readLayer","readString","readFloat","readDouble","readVarint64","readBoolean","readValueMessage","VectorTile","readTile","FACTOR","nx","nz","FillExtrusionBucket","centroidVertexArray","centroidVertexBuffer","centroid","sampleCount","oldVertexCount","processPolygon","addedVertices","centroidX","centroidY","isEntirelyOutside","accumulatePointsToCentroid","segmentReference","isPolygon","subdividedRing","_generateSideFaces","subdividedPolygon","edgeDistance","isBoundaryEdge","bottomRight","properties$3","FillExtrusionStyleLayer","pixelPosMatrix","projectedQueryGeometry","vec4.transformMat4","projected","zBase","zTop","projectedBase","projectedTop","baseXZ","baseYZ","baseZZ","baseWZ","topXZ","topYZ","topZZ","topWZ","ringBase","ringTop","sX","sY","sZ","sW","baseZ","baseW","topX","topY","topZ","topW","projectExtrusion","closestDistance","getIntersectionDistance","topA","face","checkIntersection","dot","projectedFace","ab","ac","dotABAB","dotABAC","dotACAC","dotAPAB","dotAPAC","denom","lineLayoutAttributes","lineLayoutAttributesExt","COS_HALF_SHARP_CORNER","MAX_LINE_DISTANCE","LINE_DISTANCE_BUFFER_BITS","LineBucket","lineClipsArray","gradients","layoutVertexArray2","maxLineLength","hasLineDasharray","lineSortKey","addLineDashDependencies","layoutVertexBuffer2","layoutAttributesExt","lineFeatureClips","cap","miterLimit","roundLimit","lineClips","addLine","scaledDistance","totalDistance","updateScaledDistance","sharpCornerOffset","SHARP_CORNER_OFFSET","currentVertex","prevVertex","nextVertex","prevNormal","nextNormal","joinNormal","cosAngle","cosHalfAngle","miterLength","approxAngle","isSharpCorner","lineTurnsLeft","prevSegmentLength","newPrevVertex","updateDistance","addCurrentVertex","middleVertex","currentJoin","bevelLength","offsetA","offsetB","extrude","addHalfVertex","nextSegmentLength","newCurrentVertex","normal","endLeft","endRight","rightY","up","linesofarScaled","dasharrayProperty","dasharray","minKey","midKey","maxKey","dashDependencies","properties$2","LineFloorwidthProperty","lineFloorwidthProperty","LineStyleLayer","gradientVersion","gradientExpression","stepInterpolant","isZoomExpression","lineBucket","getLineWidth","halfWidth","lineOffset","newRings","ringIndex","newRing","nextPoint","unitNormalAB","unitNormalBC","bisectorDir","offsetLine","multiLine","polygonIntersectsBufferedMultiLine","lineWidth","lineGapWidth","symbolLayoutAttributes","dynamicLayoutAttributes","collisionVertexAttributes","collisionBoxLayout","collisionCircleLayout","transformText","toLocaleUpperCase","toLocaleLowerCase","transformTextInternal","ONE_EM","verticalizedCharacterMap","$","breakable","breakableBefore","getGlyphAdvance","glyphMap","spacing","layoutTextSize","glyph","metrics","advance","imagePosition","imageName","displaySize","calculateBadness","targetWidth","penalty","isLastBreak","raggedness","calculatePenalty","nextCodePoint","penalizableIdeographicBreak","evaluateBreak","breakIndex","breakX","potentialBreaks","bestPriorBreak","bestBreakBadness","potentialBreak","breakBadness","badness","priorBreak","leastBadBreaks","lastLineBreak","TaggedString","sectionIndex","imageSectionID","fromFeature","defaultFontStack","addImageSection","addTextSection","getSection","getSectionIndex","verticalizePunctuation","prevChar","premature","Symbol","nextChars","nextChar","hasZeroWidthSpaces","leadingWhitespace","leadingLength","trailingWhitespace","trailingLength","toCodeUnitIndex","unicodeIndex","getMaxScale","reduce","getMaxImageSize","maxImageWidth","maxImageHeight","nextImageSectionCharCode","getNextImageSectionCharCode","fromCharCode","determineLineBreaks","maxWidth","potentialLineBreaks","determineAverageLineWidth","currentX","nextNextChars","nextNextChar","ideographicBreak","totalWidth","SHIFT_LEFT_32","SHIFT_RIGHT_32","utf8TextDecoder","TextDecoder","Pbf","buf","dataView","DataView","readField","startPos","skip","readMessage","readFixed32","getUint32","readSFixed32","getInt32","readFixed64","readSFixed64","getFloat32","getFloat64","isSigned","toNum","readVarintRemainder","decode","b3","bytesPerSequence","readUtf8","readBytes","readPackedVarint","readPackedEnd","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","writeVarint","realloc","finish","writeFixed32","setInt32","writeSFixed32","writeFixed64","writeSFixed64","low","high","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeSVarint","writeBoolean","writeString","lead","writeUtf8","makeRoomForExtraLength","writeFloat","setFloat32","writeDouble","setFloat64","writeBytes","writeRawMessage","writeMessage","writePackedVarint","writePackedSVarint","writePackedBoolean","writePackedFloat","writePackedDouble","writePackedFixed32","writePackedSFixed32","writePackedFixed64","writePackedSFixed64","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","extraLen","readFontstacks","readFontstack","bitmap","readGlyph","potpack","boxes","box","spaces","space","ImagePosition","paddedRect","stretchX","stretchY","textFitWidth","textFitHeight","IMAGE_PADDING","ImageAtlas","icons","iconPositions","patternPositions","haveRenderCallbacks","bins","addImages","bin","images","hasRenderCallback","patchUpdatedImages","imageManager","dispatchRenderCallbacks","updatedImages","patchUpdatedImage","getImage","WritingMode","shapeText","glyphPositions","lineHeight","textJustify","allowVerticalPlacement","layoutTextSizeThisZoom","logicalInput","lineBreaks","untaggedLines","processedLines","elapsedChars","lineBreakPoints","lineBreak","breakLines","positionedLines","shaping","iconsInText","verticalizable","maxLineHeight","justify","layoutTextSizeFactor","lineIndex","lineMaxScale","positionedLine","positionedGlyphs","imageOffset","lineShapingSize","calculateLineContentSize","isLineVertical","positionedGlyph","sectionAttributes","shapeTextSection","shapeImageSection","baselineOffset","justifyLine","currentLineHeight","horizontalAlign","getAnchorAlignment","blockHeight","lineCount","shiftX","shiftY","shapeLines","maxGlyphSize","horizontalLineContentHeight","verticalLineContentWidth","getVerticalAlignFactor","rectAndMetrics","glyphPosition","getRectAndMetrics","verticalAlignFactor","lastPositionedGlyph","lineIndent","shapeIcon","iconOffset","iconAnchor","applyTextFit","shapedIcon","iconLeft","iconTop","iconWidth","iconHeight","_b","contentAspectRatio","newIconWidth","newIconHeight","fitIconToText","shapedText","textFit","fontScale","collisionPadding","textLeft","textRight","textTop","textBottom","SIZE_PACK_FACTOR","MAX_PACKED_SIZE","MAX_GLYPH_ICON_SIZE","getSizeData","tileZoom","layoutSize","minZoom","maxZoom","minSize","getOverlapMode","overlapProp","allowOverlapProp","overlap","shaderOpacityAttributes","sizeVertex","isSDF","pixelOffsetX","pixelOffsetY","minFontScaleX","minFontScaleY","aSizeX","aSizeY","addDynamicAttributes","dynamicLayoutVertexArray","containsRTLText","formattedText","SymbolBuffers","opacityVertexArray","hasVisibleVertices","placedSymbolArray","dynamicIndexBuffer","dynamicLayoutVertexBuffer","opacityVertexBuffer","itemSize","CollisionBuffers","LayoutArray","IndexArray","collisionVertexArray","collisionVertexBuffer","SymbolBucket","collisionBoxArray","hasRTLText","sortKeyRanges","collisionCircleArray","unevaluatedLayoutValues","textSizeData","iconSizeData","canOverlap","sortFeaturesByY","writingModes","wm","sourceID","createArrays","icon","glyphOffsetArray","lineVertexArray","symbolInstances","textAnchorOffsets","calculateGlyphDependencies","textAlongLine","doesAllowVerticalWritingMode","verticalChar","textFont","textField","iconImage","hasText","hasIcon","symbolSortKey","iconDependencies","stacks","glyphDependencies","resolvedTokens","getValueAndResolveTokens","bucketHasRTLText","sectionFont","sectionStack","leftIndex","rightIndex","mergedFeatures","mergedIndex","mergeFromRight","leftKey","rightKey","geom","mergeFromLeft","onRight","mergeLines","hasDebugData","textCollisionBox","iconCollisionBox","destroyDebugData","addToLineVertexArray","sumForwardLength","sumBackwardLength","tileUnitDistanceFromAnchor","vertex","addSymbols","arrays","quads","alongLine","labelAnchor","glyphOffsetArrayStart","tr","bl","tex","pixelOffsetTL","pixelOffsetBR","glyphOffset","_addCollisionDebugVertex","addCollisionDebugVertices","boxAnchorPoint","symbolInstance","addDebugCollisionBoxes","startIndex","isText","generateCollisionDebugBuffers","_deserializeCollisionBoxesForSymbol","textStartIndex","textEndIndex","verticalTextStartIndex","verticalTextEndIndex","iconStartIndex","iconEndIndex","verticalIconStartIndex","verticalIconEndIndex","collisionArrays","textBox","textFeatureIndex","verticalTextBox","verticalTextFeatureIndex","iconBox","iconFeatureIndex","verticalIconBox","verticalIconFeatureIndex","deserializeCollisionBoxes","hasTextData","hasIconData","hasTextCollisionBoxData","hasIconCollisionBoxData","addIndicesForPlacedSymbol","iconOrText","placedSymbolIndex","placedSymbol","vertexIndex","getSortedSymbolIndexes","sortedAngle","symbolInstanceIndexes","rotatedYs","featureIndexes","aIndex","bIndex","addToSortKeyRanges","symbolInstanceIndex","symbolInstanceEnd","symbolInstanceStart","sortFeatures","featureSortOrder","MAX_GLYPHS","properties$1","runtimeType","getOverride","o","hasOverride","FormatSectionOverride","defaultValue","SymbolStyleLayer","deduped","_setPaintOverrides","unevaluated","resolveTokens","hasPaintOverride","overridden","override","styleExpression","hasOverrides","checkSections","checkExpression","BackgroundStyleLayer","CustomStyleLayer","implementation","onAdd","painter","onRemove","renderingMode","prerender","ThrottledInvoker","methodToThrottle","_methodToThrottle","_triggered","MessageChannel","_channel","port2","onmessage","trigger","port1","postMessage","remove","addEventDefaultOptions","earthRadius","LngLat","lng","toArray","distanceTo","lngLat","rad","lat1","lat2","lon","earthCircumference","circumferenceAtLatitude","latitude","mercatorXfromLng","mercatorYfromLat","mercatorZfromAltitude","lngFromMercatorX","latFromMercatorY","altitudeFromMercatorZ","MercatorCoordinate","fromLngLat","lngLatLike","toLngLat","toAltitude","meterInMercatorCoordinateUnits","getMercCoords","CanonicalTileID","isInBoundsForTileZoomXY","calculateTileKey","getTileBBox","quadkey","mask","getQuadkey","isChildOf","dz","getTilePoint","UnwrappedTileID","OverscaledTileID","terrainRttPosMatrix32f","scaledTo","targetZ","zDifference","isOverscaled","calculateScaledKey","withWrap","children","sourceMaxZoom","isLessThan","wrapped","unwrapTo","overscaleFactor","toUnwrapped","getFeatureId","mergeFeatureDiffs","merged","removeAllProperties","removeProperties","addOrUpdateProperties","findIndex","newGeometry","diffToHashed","diff","hashed","removeAll","Bounds","expandBy","amount","shrinkBy","fromPoints","contains","empty","covers","DictionaryCoder","strings","_stringToNumber","_numberToString","encode","GeoJSONFeature","vectorTileFeature","_vectorTileFeature","_x","_y","_z","Vector","_name","dataBuffer","nullabilityBuffer","_size","sizeOrNullabilityBuffer","getValueFromBuffer","FixedSizeVector","IntFlatVector","DoubleFlatVector","SequenceVector","delta","baseValueBuffer","IntSequenceVector","baseValue","of","IntConstVector","FeatureTable","_geometryVector","_idVector","_propertyVectors","_extent","propertyVectorsMap","idVector","geometryVector","propertyVectors","getPropertyVector","geometryIterator","numFeatures","containsMaxSaveIntegerValues","propertyColumn","columnName","propertyValue","numGeometries","getFeatures","getGeometries","intVector","IntWrapper","increment","LogicalLevelTechnique","PhysicalLevelTechnique","PhysicalStreamType","DictionaryType","OffsetType","LengthType","VectorType","GEOMETRY_TYPE","SINGLE_PART_GEOMETRY_TYPE","VertexBufferType","decodeVarintInt32","bufferOffset","numValues","dst","decodeVarintInt64","BigInt64Array","decodeSingleVarintInt64","decodeSingleVarintFloat64","decodeVarintRemainder","decodeFastPfor","decodeZigZagValue","encoded","decodeZigZagValueInt64","BigInt","decodeUnsignedRle","encodedData","numRuns","numTotalValues","decodedValues","runLength","decodeUnsignedRleInt64","decodeUnsignedRleFloat64","fastInverseDelta","sz0","decodeComponentwiseDeltaVec2","LogicalStreamType","_dictionaryType","_offsetType","_lengthType","dictionaryType","offsetType","lengthType","decodeStreamMetadata","streamMetadata","stream_type","physicalStreamType","logicalStreamType","DATA","OFFSET","LENGTH","encodings_header","llt1","llt2","plt","sizeInfo","logicalLevelTechnique1","logicalLevelTechnique2","physicalLevelTechnique","decompressedCount","decodeStreamMetadataInternal","MORTON","mortonInfo","numBits","coordinateShift","decodePartialMortonEncodedStreamMetadata","RLE","NONE","rleInfo","runs","numRleValues","decodePartialRleEncodedStreamMetadata","BitVector","byteIndex","getInt","getBuffer","decodeIntStream","scalingData","DELTA","outPos","previousValue","decodeDeltaRle","data1","data2","data3","data4","decodeZigZagDelta","decodeZigZagRle","decodeRle","COMPONENTWISE_DELTA","decodeZigZag","decodeIntBuffer","decodePhysicalLevelTechnique","decodeLengthStreamToOffsetBuffer","decodedData","deltaSum","zigZagValue","zigZagDeltaOfDeltaDecoding","rleDeltaDecoding","prevValue","inverseDelta","offsets","zigZagRleDeltaDecoding","decodeLengthToOffsetBuffer","FAST_PFOR","VARINT","dataOffset","decodeConstIntStream","decodeZigZagConstRle","decodeUnsignedConstRle","decodeSequenceIntStream","decodeZigZagSequenceRle","decodeSequenceLongStream","decodeZigZagSequenceRleInt64","decodeLongStream","decodeDeltaRleInt64","decodeZigZagDeltaInt64","decodeZigZagRleInt64","decodeRleInt64","decodeZigZagInt64","decodeLongBuffer","decodeConstLongStream","decodeZigZagConstRleInt64","decodeUnsignedConstRleInt64","decodeNullableIntStream","bitVector","dataCounter","decodeNullableZigZagDelta","rleMetadata","decodeNullableZigZagRle","decodeNullableUnsignedRle","decodeNullableRle","padZigZagWithZeros","padWithZeros","decodeNullableIntBuffer","getVectorType","CONST","FLAT","zigZagOne","SEQUENCE","savedOffset","byteOffset","LongFlatVector","LongSequenceVector","TopologyVector","_geometryOffsets","_partOffsets","_ringOffsets","geometryOffsets","partOffsets","ringOffsets","decodeZOrderCurve","mortonCode","decodeMorton","coordinate","MvtGeometryFactory","createPoint","createMultiPoint","createLineString","createMultiLineString","lineStrings","createPolygon","shell","createMultiPolygon","convertGeometryVector","partOffsetCounter","ringOffsetsCounter","geometryOffsetsCounter","geometryCounter","geometryFactory","vertexBufferOffset","vertexOffsetsOffset","mortonSettings","topologyVector","vertexOffsets","containsPolygon","containsPolygonGeometry","POINT","vertexBufferType","VEC_2","MULTIPOINT","numPoints","LINESTRING","decodeDictionaryEncodedLineString","decodeMortonDictionaryEncodedLineString","getLineString","POLYGON","numRings","decodeDictionaryEncodedLinearRing","decodeMortonDictionaryEncodedLinearRing","getLinearRing","MULTILINESTRING","numLineStrings","MULTIPOLYGON","numPolygons","numRingVertices","closeLineString","GeometryVector","_vertexBufferType","_topologyVector","_vertexOffsets","_mortonSettings","getSimpleEncodedVertex","getVertex","ConstGeometryVector","_numGeometries","_geometryType","containsSingleGeometryType","FlatGeometryVector","_geometryTypes","GpuVector","_triangleOffsets","_indexBuffer","triangleOffsets","topology","allRings","createConstGpuVector","ConstGpuVector","createFlatGpuVector","FlatGpuVector","decodeGeometryColumn","numStreams","geometryTypeMetadata","geometryStreamMetadata","GEOMETRIES","PARTS","RINGS","TRIANGLES","VERTEX","INDEX","createConstGeometryVector","createMortonEncodedConstGeometryVector","geometryTypeVector","decodeRootLengthStream","decodeLevel1LengthStream","rootOffsetBuffer","level1OffsetBuffer","level2LengthBuffer","level2BufferOffsets","previousOffset","level1OffsetBufferCounter","level2OffsetBufferCounter","level2LengthBufferCounter","numParts","decodeLevel2LengthStream","level1LengthBuffer","level1BufferOffsets","level1LengthCounter","decodeLevel1WithoutRingBufferLengthStream","createFlatGeometryVector","createFlatGeometryVectorMortonEncoded","rootLengthStream","bufferId","rootBufferOffsets","rootLengthCounter","isLineStringPresent","level1BufferCounter","level1LengthBufferCounter","BooleanFlatVector","dataVector","FloatFlatVector","LongConstVector","decodeBooleanRle","numBooleans","decodeByteRle","numBytes","valueOffset","header","endValueOffset","numLiterals","decodeString","VariableSizeVector","offsetBuffer","StringFlatVector","textEncoder","TextEncoder","StringDictionaryVector","dictionaryBuffer","StringFsstDictionaryVector","symbolOffsetBuffer","symbolTableBuffer","symbolLengthBuffer","lengthBuffer","decodedDictionary","offsetToLengthBuffer","symbols","symbolLengths","compressedData","symbolOffsets","symbolLength","symbolOffset","decodeFsst","decodePropertyColumn","columnMetadata","propertyColumnNames","column","nullable","presentStreamMetadata","streamDataStart","presentVector","physicalType","scalarColumn","dataStreamMetadata","vectorType","dataStream","isNullabilityBuffer","constValue","decodeIntColumn","dictionaryLengthStream","offsetStream","dictionaryStream","symbolLengthStream","symbolTableStream","presentStream","plainLengthStream","plainDataStream","PRESENT","presentData","ls","DICTIONARY","SYMBOL","ds","dictType","FSST","SINGLE","SHARED","decodeFsstDictionaryVector","decodeDictionaryVector","sparseOffsetStream","valueIndex","decodePlainStringVector","nullableBitvector","valueCounter","decodeNullableBooleanRle","decodeBooleanColumn","decodeNullableZigZagDeltaInt64","decodeNullableZigZagRleInt64","decodeNullableUnsignedRleInt64","decodeNullableRleInt64","padZigZagWithZerosInt64","padWithZerosInt64","decodeNullableLongBuffer","decodeNullableLongStream","decodeLongColumn","encodedValues","currentPos","newOffset","newBuf","fb","nullableFloatsBuffer","decodeNullableFloatsLE","decodeFloatsLE","decodeFloatColumn","nullableDoubleBuffer","decodeNullableDoublesLE","decodeDoublesLE","decodeDoubleColumn","decodeScalarPropertyColumn","scalarType","dictionaryOffsetBuffer","dictionaryStreamDecoded","childFields","complexType","stringDictionaryVectors","childField","scalarField","offsetStreamMetadata","decodeSharedDictionary","hasStreamCount","scalarCol","complexCol","textDecoder","view","decodeField","fieldOptions","isLogical","isComplex","typeValue","field","complex","logicalType","childCount","complexField","scalar","decodeColumn","typeCode","columnScope","mapScalarType","decodeColumnType","columnTypeHasName","columnTypeHasChildren","decodeEmbeddedTileSetMetadata","meta","table","columnCount","columns","featureTables","decodeIdColumn","idDataStreamMetadata","idWithinMaxSafeInteger","idDataType","decodeVarintFloat64","decodeZigZagDeltaFloat64","decodeZigZagRleFloat64","decodeRleFloat64","decodeFloat64Buffer","decodeLongFloat64Stream","MLTVectorTileFeature","_featureData","pointRing","MLTVectorTileLayer","featureTable","MLTVectorTile","geometryScaling","blockLength","blockEnd","featureTableMetadata","propertyVector","decodeTile","acc","tags","keycache","valuecache","FeatureIndex","grid3D","featureIndexArray","loadVTLayers","vtLayers","Protobuf","rawTileData","sourceLayerCoder","GEOJSON_TILE_LAYER_NAME","styleLayers","serializedLayers","sourceFeatureState","queryPadding","matching","cameraBounds","cameraQueryGeometry","matching3D","bx1","by1","bx2","by2","boxX1","boxY1","boxX2","boxY2","corner","polygonIntersectsBox","topDownFeatureComparator","previousIndex","featureGeometry","loadMatchingFeature","filterLayerIDs","layerIDs","bucketLayerIDs","sourceLayerName","getId","layerID","serializedLayer","evaluateProperties","intersectionZ","geojsonFeature","layerResult","lookupSymbolFeatures","symbolFeatureIndexes","filterParams","symbolFeatureIndex","hasLayer","sourceLayerId","cluster_id","serializedProperties","styleLayerProperties","clipLine","clippedLines","clippedLine","p0","clipGeometryOnAxis","axis","clipPoints","clipLines","clipLineInternal","intersectionPoint","intersectionPointX","intersectionPointY","newLine","pos1","pos2","exited","lastPos","Anchor","checkMaxAngle","labelLength","windowSize","maxAngle","anchorDistance","recentCorners","recentAngleDelta","angleDelta","getLineLength","getAngleWindowSize","glyphSize","boxScale","getShapedLabelLength","getCenterAnchor","angleWindowSize","prevDistance","centerDistance","segmentDistance","getAnchors","tileExtent","shapedLabelLength","isLineContinued","resample","placeAtMiddle","halfLabelLength","markedDistance","segmentDist","getIconQuads","iconRotate","isSDFIcon","hasIconTextFit","imageWidth","imageHeight","reduceRanges","stretchWidth","stretchHeight","fixedWidth","fixedHeight","stretchOffsetX","stretchContentWidth","stretchOffsetY","stretchContentHeight","fixedOffsetX","fixedContentWidth","fixedOffsetY","fixedContentHeight","contentWidth","contentHeight","sumWithinRange","makeBox","leftEm","getEmOffset","stretch","leftPx","getPxOffset","fixed","topEm","topPx","rightEm","rightPx","bottomEm","bottomPx","matrix","xCuts","stretchZonesToCuts","yCuts","xi","yi","ranges","stretchZones","fixedSize","stretchSize","cuts","stretchOffset","iconSize","fixedOffset","CollisionFeature","shaped","alignLine","boxStartIndex","circleDiameter","rotateRadians","boxEndIndex","findPoleOfInaccessibility","polygonRings","precision","debug","cellQueue","Queue","compareMax","Cell","bestCell","getCentroidCell","numProbes","minDistSq","pointToPolygonDist","SQRT2","TextAnchorEnum","INVALID_TEXT_OFFSET","evaluateVariableOffset","offsetX","offsetY","fromTextOffset","radialOffset","hypotenuse","fromRadialOffset","getTextVariableAnchorOffset","variableAnchorOffset","sourceValues","destValues","variableAnchor","textOffset","anchorOffsets","getAnchorJustification","shapedTextOrientations","imageMap","sizes","layoutIconSize","textMaxSize","defaultHorizontalShaping","getDefaultHorizontalShaping","tilePixelRatio","textMaxBoxScale","iconBoxScale","symbolMinDistance","textPadding","iconPadding","getIconPadding","textMaxAngle","iconAlongLine","symbolPlacement","textRepeatDistance","iconTextFit","verticallyShapedIcon","addSymbolAtAnchor","lineArray","textCollisionFeature","iconCollisionFeature","verticalTextCollisionFeature","verticalIconCollisionFeature","placedTextSymbolIndices","verticalTextRotation","iconQuads","verticalIconQuads","sizeData","compositeIconSizes","justifications","justification","textRotate","singleLine","addTextVertices","horizontalOnly","getCollisionCircleHeight","prevHeight","addTextVariableAnchorOffsets","addSymbol","subdividedLine","anchorIsTooClose","poi","placementTypes","placedIconIndex","glyphQuads","textureRect","rectBuffer","GLYPH_PBF_BORDER","rotateVerticalGlyph","halfAdvance","sdf","builtInOffset","verticalizedLabelOffset","textureScale","isDoubleResolution","verticalRotation","xHalfWidthOffsetCorrection","halfWidthOffsetCorrection","verticalOffsetCorrection","getGlyphQuads","compositeTextSizes","placementType","horizontalShaping","repeatDistance","compareText","otherAnchors","ARRAY_TYPES","KDBush","magic","versionAndType","ArrayType","nodeSize","numItems","IndexArrayType","arrayTypeIndex","coordsByteSize","idsByteSize","padCoords","_pos","_finished","numAdded","qy","r2","select","swapItem","PerformanceMarkers","lastFrameTime","frameTimes","frameTimeTarget","loadTimeKey","fullLoadTimeKey","PerformanceUtils","mark","marker","performance","currTimestamp","clearMetrics","clearMeasures","clearMarks","getPerformanceMetrics","measure","load","fullLoad","loadTime","getEntriesByName","fullLoadTime","totalFrames","fps","curr","droppedFrames","frameTime","percentDroppedFrames","azimuthal","polar","userAgent","navigator","safari","mapId","resolveRejects","tasks","taskQueue","abortControllers","messageHandlers","invoker","process","subscription","receive","globalScope","registerMessageHandler","handler","unregisterMessageHandler","random","cancelMessage","origin","sourceMapId","buffers","messageToPost","transfer","processTask","task","resolveReject","completeTask","responseMessage","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","a30","a31","a32","a33","prevDiff","nextDiff","nextUpdate","prevUpdate","resolveMergeConflicts","hashedToDiff","updateable","seenIds","affectedGeometries","existing","changeGeometry","changeProps","uSize","uSizeT","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","b11","det","aDeltaY","aDeltaX","bDeltaY","bDeltaX","denominator","aInterpolation","tlX","tlY","brX","brY","inViewportPixelUnitsUnits","sinA","cosA","document","createElement","muted","onloadstart","crossOrigin","appendChild","$0","$1","$2","$3","maxAge","tileIDs","edgeTiles","aWrap","bWrap","reset","removedData","timeout","clearTimeout","expiryTimeout","dataWrapper","_getAndRemoveByKey","getAndRemove","getByKey","dataIndex","setMaxSize","filterFn","removed","entry","plane","dotDirectionPlane","qz","qw","vz","tz","plane0","plane1","plane2","mat3.determinant","cross12","vec3.cross","cross20","cross01","vec3.scale","vec3.add","degreesA","degreesB","diff1","diff2","vec1x","vec1y","vec2x","vec2y","length1","length2","radiansA","radiansB","styleKey","removeOrAddSourceCommands","diffSources","beforeLayers","beforeOrder","afterOrder","beforeIndex","afterIndex","tracker","clean","beforeLayer","afterLayer","insertBeforeLayerId","lastIndexOf","diffLayers","layerObject","render","uniform1i","fovy","aspect","near","far","nf","mat4.identity","rotation","quat.fromEuler","omega","cosom","sinom","scale0","scale1","aw","bw","glMatrix.EPSILON","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","mat3.fromQuat","xAngle","hypot","oldRangeMin","oldRangeMax","newRangeMin","newRangeMax","imgBitmap","origWidth","origHeight","drawImage","imgData","clearRect","readImageDataUsingOffscreenCanvas","uniformMatrix4fv","uniform3f","uniform2f","lr","bt","uniform4fv","uniform1fv","eventType","lnglat","customProtocol","loadFn","cachedKeys","groups","iconsNeedLinear","keepUpright","textSize","fontstack","unformattedText","spacingIfAllowed","addVerticalShapingForPointLabelIfNeeded","sdfIcons","showCollisionBoxes","clippedGeometry","maxEntries","oldestKey","_marks","resourceTimingData","a3","a4","a5","a6","a7","a8","a9","a14","a15","b4","b5","b6","b7","b8","b9","b12","b13","b14","b15","lastPoint","currentPoint","pointVect","vec2.fromValues","lastPointVec","angleRadians","vec2.dot","MouseEvent","WheelEvent","img","Image","revokeObjectURL","requestAnimationFrame","createObjectURL","StyleLayerIndex","layerConfigs","keyCache","_layerConfigs","_layers","removedIds","layerConfig","createStyleLayer","familiesBySource","groupByLayout","sourceGroup","sourceLayerFamilies","GlyphAtlas","stackPositions","WorkerTile","collectResourceTiming","returnDependencies","inFlightDependencies","layerIndex","buckets","layerFamilies","family","recalculateLayers","getGlyphsPromise","getIconsPromise","getPatternsPromise","getDashesPromise","iconMap","patternMap","glyphAtlas","imageAtlas","performSymbolLayout","glyphAtlasImage","VectorTileFeatureOverzoomed","pointsArray","VectorTileLayerOverzoomed","layerName","_myFeatures","VectorTileOverzoomed","addLayer","toVirtualVectorTile","virtualVectorTile","fromVectorTileJs","vectorTile","rawData","sliceVectorTileLayer","maxZoomTileID","targetTileID","featureWrappers","clipGeometry","VectorTileWorkerSource","fetching","loading","loaded","overzoomedTileResultCache","BoundedLRUCache","loadVectorTile","getArrayBuffer","ex","errorMessage","loadTile","tileUid","overzoomParameters","overzoomRequest","perf","RequestPerformance","workerTile","overzoomTile","_getOverzoomTile","resourceTiming","maxZoomVectorTile","cachedOverzoomTile","overzoomedVectorTile","slicedTileLayer","overzoomedVectorTileResult","reloadTile","parseResult","abortTile","removeTile","RasterDEMTileWorkerSource","rawImageData","imagePixels","dem","rewindRings","outer","rewindRing","reverse","geojsonRewind","rewind","gj","defaultOptions","minPoints","props","fround","Supercluster","trees","clusterProps","time","timerId","lngX","latY","tree","_createTree","timeEnd","_cluster","getClusters","minLng","minLat","maxLng","maxLat","easternHem","westernHem","_limitZoom","clusters","getClusterJSON","getChildren","clusterId","originId","_getOriginId","originZoom","_getOriginZoom","errorMsg","getLeaves","limit","leaves","_appendLeaves","getTile","_addTileFeatures","getClusterExpansionZoom","expansionZoom","skipped","point_count","isCluster","getClusterProperties","nextData","neighborIds","numPointsOrigin","neighborId","clusterPropIndex","numPoints2","_map","original","yLat","abbrev","propIndex","point_count_abbreviated","simplify","sqTolerance","maxSqDist","minPosToMid","getSqSegDist","posToMid","createFeature","calcLineBBox","convertFeature","convertPoint","convertLine","convertLines","singleGeometry","newPolygon","projectX","projectY","k2","minAll","maxAll","clipped","newGeom","addPoint","trackMetrics","newSlice","intersect","intersectX","intersectY","segLen","shiftFeatureCoords","newFeatures","shiftCoords","newPoints","transformTile","transformed","transformPoint","createTile","numSimplified","simplified","tileFeature","isOuter","indexMaxZoom","indexMaxPoints","GeoJSONVT","tileCoords","stats","total","splitTile","toID","zoomSteps","k3","k4","z0","GeoJSONWorkerSource","createGeoJSONIndexFunc","createGeoJSONIndex","_dataUpdateable","_createGeoJSONIndex","_abortController","_geoJSONIndex","geoJSONTile","GeoJSONWrapper","loadData","_pendingRequest","_startPerformance","_pendingData","dataDiff","loadAndProcessGeoJSON","_finishPerformance","abandoned","getData","loadGeoJSONFromUrl","_loadGeoJSONFromObject","_loadGeoJSONFromDiff","_filterGeoJSON","getJSON","toUpdateable","applySourceDiff","_toFeatureCollection","_params","getClusterChildren","getClusterLeaves","superclusterOptions","mapExpressions","reduceExpressions","propertyNames","mapExpression","mapExpressionParsed","reduceExpressionParsed","pointProperties","getSuperclusterOptions","geojsonvt","geojsonVtOptions","Worker","Actor","layerIndexes","workerSources","demWorkerSources","externalWorkerSourceTypes","globalStates","registerWorkerSource","WorkerSource","addProtocol","removeProtocol","registerRTLTextPlugin","_getDEMWorkerSource","_getWorkerSource","_mapId","_syncRTLPluginState","_setImages","_getLayerIndex","_getGlobalState","workerSource","ws","_getAvailableImages","linkEl","reducedMotionQuery","reducedMotionOverride","browser","frameId","paintStartTimestamp","cancelAnimationFrame","frameAsync","getImageCanvasContext","canvas","resolveURL","hardwareConcurrency","prefersReducedMotion","matchMedia","matches","timeManager","_realTime","_frozenAt","getCurrentTime","setNow","restoreNow","isFrozen","DOM","testProp","docStyle","tagName","className","container","el","createNS","namespaceURI","createElementNS","disableDrag","selectProp","userSelect","enableDrag","setTransform","transformProp","callback","capture","suppressClickInternal","preventDefault","stopPropagation","suppressClick","getScale","element","getBoundingClientRect","offsetWidth","offsetHeight","boundingClientRect","getPoint","clientX","clientLeft","clientY","clientTop","mousePos","touchPos","touches","mouseButton","button","node","parentNode","removeChild","sanitize","html","DOMParser","parseFromString","scripts","querySelectorAll","script","innerHTML","isPossiblyDangerous","nodes","removeAttributes","elem","removeAttribute","documentElement","webpSupported","supported","testSupport","webpCheckComplete","webpImgTest","webpImgTestOnloadComplete","testWebpTextureUpload","glForTesting","isContextLost","ImageRequest","imageRequestQueue","currentParallelImageRequests","throttleControlCallbackHandleCounter","throttleControlCallbacks","resetRequestQueue","addThrottleControl","handle","removeThrottleControl","callbackHandle","processQueue","supportImageRefresh","accept","onError","onSuccess","doImageRequest","itemInQueue","canUseHTMLImageElement","getImagePromise","getImageUsingHtmlImage","arrayBufferToImageBitmap","arrayBufferToImage","maxImageRequests","isThrottled","numImageRequests","topItemInQueue","fetchPriority","RequestManager","transformRequestFn","_transformRequestFn","transformRequest","setTransformRequest","coerceSpriteToArray","resultArray","dedupArray","normalizeSpriteURL","extension","pathname","renderStyleImage","userImage","ImageManager","callbackDispatchedThisFrame","requestors","atlasImage","atlasTexture","removeImage","isLoaded","setLoaded","promiseResolve","_getImagesForIds","spriteData","addImage","valid","_validateStretch","_validateContent","updateImage","oldImage","listImages","getImages","_reject","hasAllDependencies","getPixelSize","getPattern","pattern","_updatePatternAtlas","CLAMP_TO_EDGE","beginFrame","cloneImages","clonedImages","INF","edt","gridSize","edt1d","qr","defaultStack","GlyphManager","requestManager","localIdeographFontFamily","lang","setURL","getGlyphs","glyphsPromises","_getAndCacheGlyphsPromise","updatedGlyphs","requests","_charUsesLocalIdeographFontFamily","_drawGlyph","_downloadAndCacheRangePromise","promise","loadGlyphRange","_warnOnMissingGlyphRange","padStart","codePointUsesLocalIdeographFontFamily","usesLocalIdeographFontFamily","tinySDFKey","_createTinySDF","draw","glyphWidth","glyphHeight","glyphLeft","glyphTop","glyphAdvance","fontFamilies","fontFamily","CSS","escape","TinySDF","fontSize","cutoff","fontWeight","_fontWeight","fontStyle","_fontStyle","weightsByName","thin","hairline","regular","medium","semibold","demibold","bold","heavy","weight","tinySDF","ideographTinySDF","urlTemplate","parseGlyphPbf","_createCanvas","textBaseline","textAlign","gridOuter","gridInner","actualBoundingBoxAscent","actualBoundingBoxDescent","actualBoundingBoxLeft","actualBoundingBoxRight","measureText","fillText","LightPositionProperty","sphericalToCartesian","lightProperties","Light","lightOptions","_transitionable","setLight","_transitioning","getLight","Sky","setSky","getSky","calculateFogBlendOpacity","LineAtlas","nextRow","dashEntry","getDash","addDash","getDashRanges","lineAtlasWidth","isDash","zeroLength","currentDashLength","dashLength","addRoundDash","halfStretch","currIndex","distLeft","distRight","signedDistance","distMiddle","distEdge","addRegularDash","ALPHA","REPEAT","PRELOAD_POOL_ID","WorkerPool","active","acquire","workers","workerCount","release","numActive","terminate","isPreloaded","availableLogicalProcessors","globalWorkerPool","globalDispatcher","getGlobalWorkerPool","isSafari","Dispatcher","workerPool","actors","currentActor","broadcast","promises","getActor","mapRemoved","getGlobalDispatcher","getPixelPosMatrix","mat4.create","mat4.translate","mat4.scale","calculatePosMatrix","mat4.multiply","queryRenderedFeatures","tileManager","has3DLayer","queryIncludes3DLayer","maxPitchScaleFactor","tilesIn","sortTilesIn","renderedFeatureLayers","tileIn","wrappedTileID","queryResults","featureWrapper","convertFeatureToMapFeature","convertFeaturesToMapFeatures","wrappedIDLayerMap","wrappedID","wrappedIDLayers","tileFeatures","wrappedIDFeatures","resultFeatures","mergeRenderedFeatureLayers","idA","idB","getFeatureState","loadTileJson","tileJSON","pick","vector_layers","vectorLayerIds","LngLatBounds","sw","ne","setSouthWest","setNorthEast","_ne","_sw","sw2","ne2","getCenter","getSouthWest","getNorthEast","getNorthWest","getWest","getNorth","getSouthEast","getEast","getSouth","containsLongitude","thisSpan","otherSpan","thisWest","thisEast","otherWest","otherEast","thisWraps","otherWraps","latAccuracy","lngAccuracy","adjustAntiMeridian","TileBounds","validateBounds","level","VectorTileSource","dispatcher","eventedParent","reparseOverscaled","_loaded","_options","_collectResourceTiming","dataType","_tileJSONRequest","_requestManager","tileManagers","clearTiles","tileBounds","sourceDataType","hasTile","setSourceProperty","setTiles","setUrl","getPixelRatio","_getOverzoomParameters","messageType","reloadPromise","_afterTileLoadWorkerResponse","_zoomLevelsToOverscale","maxZoomTileUrl","_refreshExpiredTiles","setExpiryData","loadVectorData","catch","unloadTile","unloadVectorData","RasterTileSource","roundZoom","sourceDataChanged","getTileTexture","saveTileTexture","RasterDEMTileSource","neighboringTiles","_getNeighboringTiles","readImageNow","needsHillshadePrepare","needsTerrainPrepare","pxw","nxw","backfilled","demTexture","fbo","getCoordinatesFromGeometry","getGeoJSONBounds","GeoJSONSource","_removed","_isUpdatingWorker","_pendingWorkerUpdate","_data","workerOptions","_pixelsToTileUnits","_getClusterMaxZoom","_hasPendingWorkerUpdate","optionsChanged","effectiveClusterMaxZoom","isInteger","_updateWorkerData","setData","waitForCompletion","updatePromise","mergeSourceDiffs","getBounds","setClusterOptions","_applyDiffToSource","shouldReloadTileOptions","_getShouldReloadTileOptions","eventData","affectedBounds","shouldReloadTile","lngMin","latMin","lngMax","latMax","tileIdToLngLatBounds","ImageSource","flippedWindingOrder","newCoordinates","_request","_finishLoading","finally","setCoordinates","cornerCoords","dMax","getCoordinatesCenterTileID","terrainTileRanges","_getOverlappingTileRanges","prepare","newTilesLoaded","MAX_TILE_ZOOM","minTileX","minTileY","maxTileX","maxTileY","VideoSource","getVideo","loop","triggerRepaint","play","pause","seek","seconds","seekableRange","seekable","currentTime","readyState","paused","CanvasSource","animate","getElementById","_hasInvalidDimensions","_playing","getCanvas","registeredSources","getSourceType","RTLPluginLoadedEventName","RTLMainThreadPlugin","_syncState","statusToSend","clearRTLTextPlugin","setRTLTextPlugin","url_1","deferred","_requestImport","lazyLoad","rtlMainThreadPlugin","rtlMainThreadPluginFactory","FadingRoles","FadingDirections","Tile","timeAdded","fadeEndTime","fadeOpacity","uniqueId","uses","expirationTime","hasSymbolBuckets","dependencies","rtt","rttCoords","expiredRequestCount","isRenderable","symbolLayer","hasData","holdingForSymbolFade","setCrossFadeLogic","fadingRole","fadingDirection","fadingParentID","resetFadeLogic","setSelfFadeLogic","selfFading","wasRequested","clearTextures","justReloaded","latestFeatureIndex","latestRawTileData","latestEncoding","getLayer","lId","deserializeBucket","imageAtlasTexture","glyphAtlasTexture","getBucket","querySourceFeatures","patternsLoaded","parsedCC","parseCacheControl","getTime","isExpired","getExpiryTimeout","setFeatureState","sourceLayerStates","symbolFadeHoldUntil","symbolFadeFinished","clearSymbolFadeHold","setSymbolHoldDuration","setDependencies","namespace","dep","hasDependency","namespaces","SourceFeatureState","stateChanges","deletedStates","updateState","featureId","newState","ft","removeFeatureState","reconciledState","featureDeletions","initializeTileState","coalesceChanges","inViewTiles","featuresChanged","layerStates","maxMercatorHorizonAngle","projectToWorldCoordinates","MAX_VALID_LATITUDE","unprojectFromWorldCoordinates","getMercatorHorizon","calculateTileMatrix","zoomScale","unwrappedX","worldMatrix","cameraMercatorCoordinateFromCenterAndRotation","centerMercator","dMercator","cameraDirectionFromPitchBearing","pitchRadians","bearingRadians","isTileVisible","frustum","tileBoundingVolume","frustumTest","intersectsFrustum","planeTest","intersectsPlane","integralOfCosXByP","createCalculateTileZoomFunction","maxZoomLevelsOnScreen","tileCountMaxMinRatio","requestedCenterZoom","distanceToTile2D","distanceToTileZ","distanceToCenter3D","cameraVerticalFOV","pitchTileLoadingBehavior","scaleZoom","centerPitch","tileCountPitch0","highestPitch","tileCount","thisTilePitch","distanceToTile3D","thisTileDesiredZ","defaultCalculateTileZoom","coveringZoomLevel","coveringTiles","getCameraFrustum","getClippingPlane","cameraCoord","screenPointToMercatorCoordinate","getCameraPoint","centerCoord","pitchInRadians","detailsProvider","getCoveringTilesDetailsProvider","allowVariableZoom","desiredZ","nominalZ","numTiles","cameraPoint","centerPoint","distanceToCenter2d","distanceZ","distanceToCenter3d","newRootTile","fullyVisible","renderWorldCopies","allowWorldCopies","it","boundingVolume","getTileBoundingVolume","intersectResult","distToTile2d","distanceToTile2d","calculateTileZoom","fov","getWrap","distanceSq","vec2.sqrLen","tileDistanceToCamera","EXTENT_BOUNDS","isRasterType","updateFadingAncestor","idealTile","retain","maxFadingAncestorLevels","sourceMinZoom","rasterFadeDuration","idealID","Base","Incoming","minAncestorZ","ancestorZ","ancestorID","ancestorTile","getLoadedTile","Parent","Departing","updateFadingDescendents","idealChildren","hasFader","updateFadingChildren","childID","childIDs","foundFader","childTile","updateFadingEdge","edgeTileIDs","fillBorder","borderId","InViewTiles","_tiles","handleWrapJump","wrapDelta","getAllTiles","getAllIds","sorted","compareTileId","getTileById","setTile","deleteTileById","isIdRenderable","getRenderableIds","renderables","a_","b_","rotatedA","rotatedB","TileManager","_dataHandler","_sourceErrored","_source","_inViewTiles","_outOfViewCache","TileCache","_unloadTile","_timers","_maxTileCacheSize","_maxTileCacheZoomLevels","_rasterFadeDuration","_maxFadingAncestorLevels","_state","_didEmitContent","_updated","_sourceLoaded","used","usedForTerrain","getSource","_paused","resume","shouldReload","_shouldReloadOnResume","reload","_loadTile","_tileLoaded","_abortTile","getIds","hasRenderableParent","parentZ","parentTile","_reloadTile","previousState","refreshedUponExpiration","_setTileReloadTimer","backfillDEM","getTileByID","_retainLoadedChildren","retainTileMap","idealTilesWithoutData","loadedDescendents","_getLoadedDescendents","incomplete","targetID","descendents","maxCoveringZoom","maxOverzooming","candidates","topZoom","topIDs","_areDescendentsComplete","targetTileIDs","generationIDs","generationZ","updateCacheSize","widthInTiles","heightInTiles","viewDependentMaxSize","_prevLng","_resetTileReloadTimers","idealTileIDs","getVisibleUnwrappedCoordinates","unwrapped","_addTerrainIdealTiles","noPendingDataEmissions","_updateRetainedTiles","isRaster","getEdgeTiles","updateFadingTiles","_cleanUpRasterTiles","_cleanUpVectorTiles","_removeTile","_fadeDuration","ancestors","parent2","releaseSymbolFadeTiles","_addTile","tileIdsWithoutData","checked","minCoveringZoom","maxUnderzooming","parentWasRequested","parentId","cancelPendingTileRequestsWhileZooming","_clearTileReloadTimer","refreshTiles","tileIds","tid","pointQueryGeometry","tileResults","cameraPointQueryGeometry","getCameraQueryGeometry","project","transformBbox","tileSpaceBounds","tileSpaceQueryGeometry","tileSpaceCameraQueryGeometry","checkWrap","getVisibleCoordinates","populateCache","hasRasterTransition","setRasterFadeDuration","tileKey","reloadTilesForDependencies","areTilesLoaded","PathInterpolator","points_","padding_","_distances","paddedLength","distOfCurrentIdx","distToTarget","idxOfPrevPoint","distOfPrevIdx","segmentLength","segmentT","overlapAllowed","overlapA","overlapB","allowed","GridIndex","boxCells","circleCells","xCellCount","yCellCount","circleKeys","boxKeys","circles","xScale","yScale","boxUid","circleUid","keysLength","_insertBoxCell","insertCircle","_insertCircleCell","_query","hitTest","overlapMode","predicate","hitTestCircle","_queryCellCircle","queryArgs","boxCell","circleCell","_circleAndRectCollide","_circlesCollide","_convertToXCellCoord","_convertToYCellCoord","r1","bothRadii","circleX","circleY","halfRectWidth","distX","halfRectHeight","distY","getPitchedLabelPlaneMatrix","rotateWithMap","vecSouth","vecEast","getTileSkewVectors","skew","mat2.create","getGlCoordMatrix","pitchWithMap","pixelsToClipSpaceMatrix","cosRoll","rollInRadians","sinRoll","cosPitch","cosBearing","sinBearing","vec2.create","vecSouthLen","vec2.length","vec2.zero","vec2.scale","vecEastLen","projectWithMatrix","xyTransformMat4","isOccluded","getPerspectiveRatio","isVisible","clippingBuffer","updateLineLabels","pitchedLabelPlaneMatrix","pitchedLabelPlaneMatrixInverse","rotateToLine","viewportWidth","viewportHeight","translation","partiallyEvaluatedSize","symbolSize.evaluateSizeForZoom","placedSymbols","aspectRatio","useVertical","hideGlyphs","tileAnchorPoint","projectionContext","projectionCache","projections","cachedAnchorPoint","anyProjectionOccluded","anchorPos","projectTileCoordinatesToClipSpace","perspectiveRatio","symbolSize.evaluateSizeForFeature","pitchScaledFontSize","getPitchedTextCorrection","placeUnflipped","placeGlyphsAlongLine","flip","notEnoughRoom","needsFlipping","placeFirstAndLastGlyph","glyphEndIndex","lineEndIndex","firstGlyphOffset","lastGlyphOffset","firstPlacedGlyph","placeGlyphAlongLine","lastPlacedGlyph","requiresOrientationChange","firstPoint","placedGlyphs","firstAndLastGlyph","projectFromLabelPlaneToClipSpace","orientationChange","glyphIndex","placedGlyph","projectTileCoordinatesToLabelPlane","tileVertexIndex","tileSegmentEnd","projectedVertex","projectTruncatedLineSegmentToLabelPlane","clipSpaceA","clipSpaceB","singleGlyph","previousTilePoint","currentTilePoint","previousProjectedPoint","minimumLength","unitVertexToBeProjected","projectedUnitVertex","projectedUnitSegment","projectLineVertexToLabelPlane","syntheticVertexArgs","previousLineVertexIndex","distanceFromAnchor","previousVertex","absOffsetX","translatedX","translatedY","transformToOffsetNormal","segmentVector","findOffsetIntersectionPoint","prevToCurrentOffsetNormal","offsetPreviousVertex","offsetCurrentVertex","currentToNextOffsetNormal","offsetNextSegmentBegin","offsetNextSegmentEnd","findLineIntersection","anchorSegment","combinedOffsetX","offsetIntersectionPoint","currentSegmentDistance","pathVertices","currentLineSegment","prevToCurrent","segmentAngle","hiddenGlyphAttributes","viewportPadding","CollisionIndex","ignoredGrid","pitchFactor","screenRightBoundary","screenBottomBoundary","gridRightBoundary","gridBottomBoundary","perspectiveRatioCutoff","placeCollisionBox","collisionBox","textPixelRatio","collisionGroupPredicate","simpleProjectionMatrix","projectedPoint","projectAndGetPerspectiveRatio","tileToViewport","projectedBox","_projectCollisionBox","pointX","pointY","allPointsOccluded","occluded","unplaceable","isInsideGrid","placeable","offscreen","isOffscreen","placeCollisionCircles","showCollisionCircles","circlePixelDiameter","textPixelPadding","placedCollisionCircles","tileUnitAnchorPoint","labelPlaneFontScale","collisionDetected","inGrid","entirelyOffscreen","screenPlaneMin","screenPlaneMax","interpolator","projectedPath","circleDist","screenSpacePath","projectPathToScreenSpace","minPoint","maxPoint","seg","numCircles","circlePosition","centerX","centerY","inverseLabelPlaneMatrix","mat4.invert","backProjected","projectPathSpecialProjection","longestUnoccludedStart","longestUnoccludedLength","currentUnoccludedStart","currentUnoccludedLength","pathSlicedToLongestUnoccluded","queryRenderedSymbols","viewportQueryGeometry","gridPoint","seenFeatures","featureKey","bucketInstanceId","intersectionTests.polygonIntersectsPolygon","insertCollisionBox","ignorePlacement","collisionGroupID","insertCollisionCircles","collisionCircles","getViewportMatrix","vecEastX","vecEastY","vecSouthX","vecSouthY","translatedAnchorX","translatedAnchorY","projectedEast","toEastX","basePointX","basePointY","distanceMultiplier","offsetXmin","offsetXmax","offsetXhalf","offsetYmin","offsetYmax","offsetYhalf","offsetsArray","anyPointVisible","getAABB","OpacityState","prevState","placed","skipFade","opacity","JointOpacityState","placedText","placedIcon","JointPlacement","RetainedQueryData","CollisionGroups","crossSourceCollisions","maxGroupID","collisionGroups","ID","nextGroupID","calculateVariableLayoutShift","Placement","prevPlacement","collisionIndex","placements","opacities","variableOffsets","stale","commitTime","retainedQueryData","collisionCircleArrays","collisionBoxArrays","placedOrientations","_getTerrainElevationFunc","getBucketParts","sortAcrossTiles","symbolBucket","bucketFeatureIndex","pixelsToTiles","translationText","translatePosition","translationIcon","projection.getPitchedLabelPlaneMatrix","holdingForFade","partiallyEvaluatedTextSize","collisionGroup","attemptAnchorPlacement","textAnchorOffset","textOverlapMode","orientation","placedGlyphBoxes","prevAnchor","markUsedJustification","markUsedOrientation","placeLayerBucketPart","bucketPart","seenCrossTileIDs","textOptional","iconOptional","textAlwaysOverlap","iconOverlapMode","iconAlwaysOverlap","zOrderByViewportY","alwaysShowText","alwaysShowIcon","getFastPathSimpleProjectionMatrix","placeSymbol","symbolIndex","placeText","placeIcon","placedVerticalText","placedGlyphCircles","placedIconBoxes","updatePreviousOrientationIfNotPlaced","isPlaced","previousOrientation","prevPlacedOrientation","placeTextForPlacementModes","placeHorizontalFn","placeVerticalFn","placementMode","textAnchorOffsetStart","textAnchorOffsetEnd","placeBox","collisionTextBox","placedFeature","placeBoxForVariableAnchors","collisionIconBox","variableIconBox","placedBox","placementPasses","prevOrientation","prevOffset","placeIconFeature","iconWithoutText","textWithoutIcon","hasIconBox","storeCollisionData","symbolIndexes","boxArray","realCollisionBox","circleArray","placedAnchor","autoIndex","indexes","horizontalIndexes","commit","zoomAtLastRecencyCheck","placementChanged","prevZoomAdjustment","zoomAdjustment","symbolFadeChange","prevOpacities","prevOffsets","prevOrientations","jointPlacement","prevOpacity","jointOpacity","lastPlacementChangeTime","updateLayerOpacities","updateBucketOpacities","duplicateOpacityState","textAllowOverlap","iconAllowOverlap","hasVariablePlacement","defaultOpacityState","addOpacities","PACKED_HIDDEN_OPACITY","boxArrays","opacityState","horizontalHidden","verticalHidden","packedOpacity","packOpacity","symbolHidden","useHorizontal","realBoxes","variableOffset","updateCollisionVertices","verticalIconUsed","hasTransitions","stillRecent","durationAdjustment","setStale","notUsed","realBox","shift25","shift24","shift17","shift16","shift9","shift8","shift1","targetBit","opacityBits","LayerPlacement","_sortAcrossTiles","_currentTileIndex","_currentPartIndex","_seenCrossTileIDs","_bucketParts","continuePlacement","placement","shouldPausePlacement","bucketParts","PauseablePlacement","forceFullPlacement","_currentPlacementIndex","_forceFullPlacement","_showCollisionBoxes","_done","isDone","layerTiles","startTime","placementZoom","_inProgressLayer","roundingFactor","TileLayerIndex","_symbolsByKey","symbolInstancesByKey","instances","crossTileIDs","getScaledCoordinates","childTileID","localX","localY","localZ","yWorld","yOffset","findMatches","newTileID","zoomCrossTileIDs","scaledSymbolCoord","thisTileSymbol","getCrossTileIDsLists","CrossTileIDs","maxCrossTileID","generate","CrossTileSymbolLayerIndex","usedCrossTileIDs","zoomIndexes","newZoomIndex","addBucket","removeBucketCrossTileIDs","childIndex","parentIndex","removedBucket","removeStaleBuckets","currentIDs","tilesChanged","CrossTileSymbolIndex","maxBucketInstanceId","bucketsInCurrentPlacement","symbolBucketsChanged","currentBucketIDs","pruneUnusedLayers","usedLayers","usedLayerMap","usedLayer","clippingMaskFrag","shaders","prelude","projectionMercator","projectionGlobe","backgroundPattern","clippingMask","heatmapTexture","collisionCircle","colorRelief","depth","fillOutline","fillOutlinePattern","fillPattern","fillExtrusion","fillExtrusionPattern","hillshadePrepare","lineGradient","linePattern","lineSDF","lineGradientSDF","symbolIcon","symbolSDF","symbolTextAndIcon","terrainDepth","terrainCoords","projectionErrorMeasurement","atmosphere","fragmentSource","vertexSource","re","vertexAttributes","fragmentUniforms","vertexUniforms","shaderUniforms","fragmentPragmas","operation","attrType","unpackType","staticAttributes","staticUniforms","Mesh","posAttributes","MercatorShaderDefine","MercatorShaderVariantKey","MercatorProjection","_cachedMesh","useSubdivision","shaderVariantName","shaderDefine","shaderPreludeCode","vertexShaderPreludeCode","useGlobeControls","transitionState","latitudeErrorCorrectionRadians","updateGPUdependent","getMeshFromTileID","_tileID","_hasBorder","_allowPoles","_usage","tileExtentArray","tileExtentBuffer","tileExtentSegments","quadTriangleIndices","quadTriangleIndexBuffer","setErrorQueryLatitudeDegrees","_value","EdgeInsets","normalizeCenter","lngRange","getTileZoom","TransformHelper","callbacks","applyConstrain","_constrainOverride","_callbacks","defaultConstrain","_tileSize","_renderWorldCopies","_minZoom","_maxZoom","_minPitch","minPitch","_maxPitch","maxPitch","constrainOverride","setMaxBounds","_width","_height","_center","_elevation","_zoom","_tileZoom","_scale","_bearingInRadians","_fovInRadians","_pitchInRadians","_rollInRadians","_unmodified","_edgeInsets","_minElevationForCurrentTile","_autoCalculateNearFarZ","thatI","constrain","forceOverrideZ","_latRange","latRange","_lngRange","minElevationForCurrentTile","fovInRadians","unmodified","_cameraToCenterDistance","_nearZ","nearZ","_farZ","farZ","autoCalculateNearFarZ","constrainInternal","_calcMatrices","_pixelsToClipSpaceMatrix","clipSpaceToPixelsMatrix","_clipSpaceToPixelsMatrix","setMinElevationForCurrentTile","pixelsToGLUnits","_pixelsToGLUnits","setMinZoom","setZoom","setMaxZoom","setMinPitch","setPitch","setMaxPitch","setRenderWorldCopies","setConstrainOverride","centerOffset","setBearing","_rotationMatrix","rotationMatrix","setRoll","setFov","constrainedZoom","setCenter","setElevation","setPadding","pixelsPerMeter","_pixelPerMeter","overrideNearFarZ","clearNearFarZOverride","isPaddingEqual","interpolatePadding","getMaxBounds","_constraining","calcMatrices","calculateCenterFromCameraLngLatAlt","alt","cameraBearing","cameraPitch","distanceToCenter","clampedElevation","_distanceToCenterFromAltElevationPitch","camMercator","metersPerMercUnit","iter","recalculateZoomAndCenter","mercUnitsPerPixel","originalPixelsPerMeter","originalCenterMercator","originalCenterPixelX","originalCenterPixelY","originalCenterPixelZ","dCamPixel","camPixelX","camPixelY","camPixelZ","distanceToCenterPixels","mercUnitsPerMeter","dzNormalized","altitudeAGL","getCameraAltitude","getCameraLngLat","pixelPerMeter","getMercatorTileCoordinates","overscaledTileID","Aabb","min_","max_","quadrant","qMin","vec3.clone","qMax","distanceX","distanceY","fullyInside","planes","planeIntersection","aabb","distMin","distMax","MercatorCoveringTilesDetailsProvider","parentWrap","minElevation","maxElevation","minMax","getMinMaxElevation","zfov","maxConstantZoomPitch","prepareNextFrame","Frustum","fromInvProjectionMatrix","invProj","horizonPlane","flippedNearFar","frustumPlanePointIndices","frustumCoords","vec4.mul","unprojectClipSpacePoint","nearPlanePointsIndices","nearPlanePointsOffset","farPlanePointsOffset","maxDist","cornerRayLengths","cornerRayNormalizedDirections","vec3.sub","vec3.length","rayPlaneIntersection","nearPlaneNormalized","nearPlaneA","nearPlaneB","vec3.normalize","vec3.dot","getNormalizedNearPlane","idealFarPlaneDistanceFromNearPlane","horizonPlaneLen","vec3.len","normalizedHorizonPlane","vec4.scale","projectedViewDirection","projectedViewLength","horizonCircleRadius","horizonCircleCenter","pointFurthestOnHorizonCircle","pointPlaneSignedDistance","getIdealNearFarPlaneDistance","idealCornerRayLength","targetLength","adjustFarPlaneByHorizonPlane","frustumPlanes","NEGATIVE_INFINITY","MercatorTransform","_helper","setTransitionState","_error","_posMatrixCache","_alignedPosMatrixCache","_fogMatrixCacheF32","almost180","scaleY","scaleX","screenWidth","screenHeight","originalX","originalY","modifiedX","modifiedY","newPoint","h2","wrappedX","_coveringTilesDetailsProvider","that","cameraPosition","_cameraPosition","projectionMatrix","_projectionMatrix","modelViewProjectionMatrix","_viewProjMatrix","inverseProjectionMatrix","_invProjMatrix","mercatorMatrix","_mercatorMatrix","utl","utr","ubl","ubr","w0","w1","extraWorldCopy","_invViewProjMatrix","screenPointToLocation","getElevationForLngLatZoom","setLocationAtPoint","screenPointToMercatorCoordinateAtZ","loc","newCenter","locationToScreenPoint","coordinatePoint","getElevationForLngLat","_pixelMatrix3D","pointCoordinate","mercatorZ","coord0","coord1","_pixelMatrixInverse","z1","pixelMatrix","_pixelMatrix","isPointOnMapSurface","aligned","useFloat32","posMatrixKey","matrices","f32","f64","tileMatrix","_alignedProjMatrix","calculateFogMatrix","fogMatrix","_fogMatrix","_calculateNearFarZIfNeeded","cameraToSeaLevelDistance","limitedPitchRadians","cameraToLowestPointDistance","lowestPlane","groundAngle","fovAboveCenter","topHalfSurfaceDistance","horizon","horizonAngle","minFovCenterToHorizonRadians","fovCenterToHorizon","topHalfSurfaceDistanceHorizon","topHalfMinDistance","mat4.perspective","mat4.clone","mat4.rotateZ","mat4.rotateX","cameraPos","xShift","yShift","angleCos","angleSin","alignedM","_clearMatrixCaches","lngLatToCameraDepth","getProjectionData","applyTerrainMatrix","mercatorTileCoordinates","tilePosMatrix","mainMatrix","createIdentityMat4f32","tileMercatorCoords","clippingPlane","projectionTransition","fallbackMatrix","isLocationOccluded","getPixelScale","getCircleRadiusCorrection","_textAnchorX","_textAnchorY","transformLightDirection","getRayDirectionFromPixel","_p","getMatrixForModel","modelAsMercatorCoordinate","createIdentityMat4f64","getProjectionDataForCustomLayer","applyGlobeMatrix","projectionData","projectionMatrixScaled","createMat4f64","cameraBoundsWarning","updateRotation","useSlerp","startRotation","rollPitchBearingToQuat","startEulerAngles","endRotation","endEulerAngles","quat.slerp","eulerAngles","getRollPitchBearing","cameraForBoxAndBearing","edgePadding","nwWorld","neWorld","seWorld","swWorld","nwRotatedWorld","neRotatedWorld","seRotatedWorld","swRotatedWorld","upperRight","lowerLeft","rotatedPaddingOffset","offsetAtFinalZoom","MercatorCameraHelper","handlePanInertia","pan","offsetLength","pixelsToHorizon","easingOffset","easingCenter","handleMapControlsRollPitchBearingZoom","deltas","bearingDelta","pitchDelta","rollDelta","zoomDelta","handleMapControlsPan","preZoomAroundLoc","around","handleJumpToCenterZoom","handleEaseTo","startZoom","startPadding","optionsZoom","doPadding","isZooming","pointAtOffset","offsetAsPoint","locationAtOffset","endZoom","finalScale","easeFunc","rollPitchBearingEqual","aroundPoint","speedup","elevationCenter","handleFlyTo","constrained","targetCenter","targetZoom","pixelPathLength","scaleOfZoom","scaleOfMinZoom","minZoomPreConstrain","centerFactor","ColorMode","blendFunction","blendColor","Replace","disabled","unblended","alphaBlended","CCW","CullFaceMode","enable","mode","frontFace","backCCW","frontCCW","DepthMode","depthFunc","depthMask","depthRange","func","ReadOnly","ReadWrite","KEEP","StencilMode","fail","depthFail","WeakMap","isWebGL2","getParameter","VERSION","ProjectionErrorMeasurement","awaitingQuery","_readbackQueue","renderContext","_readbackWaitFrames","_measureWaitFrames","_texWidth","_texHeight","_measuredError","_updateCount","_lastReadbackFrame","_cachedRenderContext","_texFormat","_texType","_fullscreenTriangle","_resultBuffer","activeTexture","TEXTURE1","NEAREST","_fbo","createFramebuffer","colorAttachment","_pbo","createBuffer","bindBuffer","PIXEL_PACK_BUFFER","bufferData","STREAM_READ","deleteBuffer","updateErrorLoop","normalizedMercatorY","expectedAngleY","currentFrame","frameNumberIssued","_tryReadback","_renderErrorTexture","_bindFramebuffer","bindFramebuffer","framebuffer","outputExpected","useProgram","u_input","u_output_expected","readBuffer","COLOR_ATTACHMENT0","readPixels","sync","fenceSync","SYNC_GPU_COMMANDS_COMPLETE","flush","waitResult","clientWaitSync","WAIT_FAILED","TIMEOUT_EXPIRED","getBufferSubData","_parseRGBA8float","EXTENT_STENCIL_BORDER","createTileMesh","forceIndicesSize","quadsPerAxisX","generateBorders","quadsPerAxisY","extendToNorthPole","extendToSouthPole","verticesPerAxisX","verticesPerAxisY","endX","endY","vertexCount","indexCount","overflows16bitIndices","use32bitIndices","vertexId","indexId","uses32bitIndices","granularitySettingsGlobe","VerticalPerspectiveProjection","_tileMeshCache","_errorCorrectionUsable","_errorMeasurementLastValue","_errorCorrectionPreviousValue","_errorMeasurementLastChangeTime","_errorMeasurement","_errorQueryLatitudeDegrees","expectedResult","_getMeshKey","hasBorder","allowPoles","_getMesh","mesh","tileMesh","createTileMeshWithBuffers","GlobeProjection","setProjection","_mercatorProjection","_verticalPerspectiveProjection","currentProjectionSpecValue","useGlobeRendering","currentProjection","getGlobeCircumferencePixels","getGlobeRadiusPixels","projectTileCoordinatesToSphere","inTileX","inTileY","tileIdX","tileIdY","tileIdZ","sphericalX","sphericalY","vec","angularCoordinatesToSurfaceVector","lngRadians","latRadians","angularCoordinatesRadiansToVector","latitudeDegrees","sphereSurfacePointToCoordinates","surface","latDegrees","lengthXZ","projX","acosZ","lngDegrees","planetScaleAtLatitude","getZoomAdjustment","oldLat","newLat","oldCircumference","newCircumference","computeGlobePanCenter","panDelta","rotatedPanDelta","normalizedGlobeZoom","lngSpeed","remapSaturate","panningDegreesPerPixel","integrateSecX","xHalf","interpolateLngLatForGlobe","deltaLng","deltaLat","interpolatedLat","samplePointStart","samplePointEnd","valueT","valueStart","valueEnd","BoundingVolumeCache","boundingVolumeFactory","_cachePrevious","_cache","_hadAnyChanges","_boundingVolumeFactory","swapBuffers","oldCache","cachedPrevious","ConvexVolume","fromAabb","fromCenterSizeAngles","halfSize","angles","axisX","vec3.transformQuat","axisY","axisZ","boxPointCount","boxPlaneCount","frustumPlaneCount","frustumPointCount","boxPointsPassed","frustumPointsPassed","pointCount","positivePoints","distanceToTileSimple","distanceToTileWrapX","tileCornerX","tileCornerY","tileCornerToPointX","GlobeCoveringTilesDetailsProvider","_boundingVolumeCache","_computeTileBoundingVolume","_bv","tileMercatorSize","smallestDistance","_parentWrap","tileX","distanceCurrent","distanceLeft","distanceRight","distanceSmallest","extremesPoints","aabbMin","aabbMax","centerEast","axisEast","axisWest","upDownMinMax","findAxisMinMax","northSouthMinMax","planeUp","planeDown","planeNorth","planeSouth","planeEast","planeWest","threePlaneIntersection","VerticalPerspectiveTransform","_cachedClippingPlane","createVec4f64","_globeViewProjMatrix32f","_globeViewProjMatrixNoCorrection","_globeViewProjMatrixNoCorrectionInverted","_globeProjMatrixInverted","createVec3f64","_globeLatitudeErrorCorrectionRadians","constrainedLat","globeLatitudeErrorCorrectionRadians","_computeClippingPlane","globeRadiusPixels","distanceCameraToB","distanceCameraToA","distanceAtoC","tangentPlaneDistanceToC","vectorCtoCamX","vectorCtoCamY","vectorCtoCamLength","planeVector","vec3.rotateZ","vec3.rotateX","vec3.rotateY","isSurfacePointVisible","sphereX","sphereY","spherePos","axisRight","axisDown","normalized","textAnchorX","textAnchorY","mercator","canonicalTileID","tileCoordinatesToMercatorCoordinates","angular","vectorMultiplier","globeMatrix","globeMatrixUncorrected","scaleVec","mat4.rotateY","zero","_cachedFrustum","_unwrappedTileID","_coords","xMid","yMid","testPoints","projectedPoints","unprojectScreenPoint","mostEast","mostWest","mostNorth","mostSouth","dLng","differenceOfAnglesDegrees","dLat","boundsArray","isSurfacePointOnScreen","vecToPixelCurrent","vecToTarget","vec3.zero","rotatedPixelVector","vecToTargetXZLengthSquared","targetXSquared","intersectionA","intersectionB","lngA","angleToRotateBetweenVectors2D","lngB","vecToTargetLngA","latA","vecToTargetLngB","latB","isValidA","isValidB","validLng","validLat","centerLngRadians","centerLatRadians","distanceOfAnglesRadians","newLng","_projectSurfacePointToScreen","_terrain","rayOrigin","rayDirection","rayPlanetIntersection","ray","rayNormalized","originDotDirection","scaledDir","discriminant","tMin","tMax","intersection","sphereSurface","directionDotPlaneXyz","distanceToIntersection","distantPoint","distanceFromPlane","horizonDisk","horizonPlaneToCenterAndRadius","relativeToCenter","clamped","vec3.scaleAndAdd","clampToSphere","globeData","GlobeTransform","constrainTransform","isGlobeRendering","_globeness","globeness","errorCorrectionValue","_verticalPerspectiveTransform","_mercatorTransform","currentTransform","mercatorProjectionData","verticalPerspectiveProjectionData","mercatorCorrection","verticalCorrection","mercatorData","VerticalPerspectiveCameraHelper","panCenter","zoomPixel","zoomLoc","oldZoomPreZoomDelta","actualZoomDelta","dLngRaw","distanceToClosestPoint","closestPoint","distanceFromSurface","distanceFactor","radiusFactor","oldCenterLat","oldZoom","heuristicCenter","exactCenter","interpolationFactorLongitude","interpolationFactorRadius","heuristicFactor","lngExactToHeuristic","latExactToHeuristic","_preZoomAroundLoc","xLeft","xRight","yTop","yBottom","flipEastWest","lngWest","lngEast","latNorth","latSouth","lngMid","latMid","clonedTr","testVectors","vecToCenter","smallestNeededScale","getLesserNonNegativeNonNull","solveVectorScale","startingLat","constrainedCenter","startCenter","preConstrainCenter","clampedPoint","endCenterWithShift","endZoomWithShift","normalizedStartZoom","normalizedEndZoom","interpolatedZoom","vecA","vecB","radians","circumference","globeDistanceOfLocationsPixels","normalizedTargetZoom","normalizedOptionsMinZoom","normalizedMinZoom","_pointAtOffset","interpolatedCenter","toCenter","targetDimension","targetValue","columnXorY","columnZ","vecDotXY","vecDotZ","toCenterDotXY","toCenterDotZ","GlobeCameraHelper","globe","_globe","_mercatorCameraHelper","_verticalPerspectiveCameraHelper","currentHelper","evented","_emitValidationErrors","emptyStyle","Style","_rtlPluginLoaded","_getMapId","getDashes","glyphLang","_container","glyphManager","lineAtlas","crossTileSymbolIndex","_setInitialValues","_resetUpdates","_validateLayer","_spritesImagesIds","_order","_availableImages","_serializedLayers","stylesheet","_changed","_updatedLayers","_updatedSources","_changedImages","_glyphsDidChange","_updatedPaintProps","_layerOrderChanged","pauseablePlacement","setGlobalStateProperty","_checkLoaded","_c","_applyGlobalStateChanges","getGlobalState","setGlobalState","newStylesheetState","changedGlobalStateRefs","sourceIdsToReload","globalStateChange","layoutAffectingGlobalStateRefs","paintAffectingGlobalStateRefs","visibilityAffectingGlobalStateRefs","_updatePaintProperty","_updateLayer","_reloadSource","loadURL","previousStyle","_loadStyleRequest","_load","loadJSON","_frameRequest","loadEmpty","nextState","transformStyle","_loadSprite","_createLayers","_setProjectionInternal","setTerrain","dereferencedLayers","derefLayers","styledLayer","isRasterStyleLayer","isUpdate","completion","_spriteRequest","originalSprite","spriteArray","jsonsMap","imagesMap","jsonRequestParameters","imageRequestParameters","spriteName","doOnceCompleted","loadSprite","spriteId","imagesToRemove","imageId","_unloadSprite","_serializeByIds","returnClone","serializedLayersDictionary","_serializedAllLayers","toPush","allLayerIds","changed","updatedIds","_removedLayers","_updateWorkerLayers","action","_clearSource","_updateTilesForChangedImages","_updateTilesForChangedGlyphs","managersUsedBefore","changedImages","serializedStyle","changes","diffStyles","operations","_getOperationsToPerform","unimplemented","styleChangeOperation","removeLayer","setLayerZoomRange","setGeoJSONSourceData","setGlyphs","setSprite","_afterImageUpdated","isSourceLoaded","geojsonSource","validateCustomStyleLayer","moveLayer","getLayersOrder","getFilter","getTerrain","myStyleSheet","_flattenAndSortRenderedFeatures","sourceResults","isLayer3D","features3D","sourceResult","layerFeatures","topmost3D","includedSources","layersAsSet","paramsStrict","renderedSymbols","bucketQueryData","queryData","bucketSymbols","layerSymbols","sortedA","symbolFeature","convertFeaturesToMapFeaturesMultiple","dataTiles","dataID","_update","getProjection","skyOptions","projectionObjects","transformConstrain","transformOptions","globeProjection","cameraHelper","createProjectionFromName","migrateProjection","_remove","_updateSources","_generateCollisionBoxes","_updatePlacement","placementCommitted","layerBucketsChanged","_releaseSymbolFadeTiles","getGlyphsUrl","glyphsUrl","dash","addSprite","spriteToAdd","updatedSprite","removeSprite","internalSpriteRepresentation","find","getSprite","rasterBoundsAttributes","VertexArrayObject","boundProgram","boundLayoutVertexBuffer","boundPaintVertexBuffers","boundIndexBuffer","boundVertexOffset","boundDynamicVertexBuffer","vao","program","paintVertexBuffers","dynamicVertexBuffer","dynamicVertexBuffer2","dynamicVertexBuffer3","paintBuffersDiffer","boundDynamicVertexBuffer2","boundDynamicVertexBuffer3","freshBind","bindVertexArray","dynamicDraw","numNextAttributes","numAttributes","createVertexArray","enableAttributes","setVertexAttribPointers","currentNumAttributes","deleteVertexArray","terrainUniformValues","eleDelta","isGlobeMode","u_texture","u_ele_delta","u_fog_matrix","u_fog_color","u_fog_ground_blend","u_fog_ground_blend_opacity","u_horizon_color","u_horizon_fog_blend","u_is_globe_mode","projectionObjectToUniformMap","getTokenizedAttributesAndUniforms","token","Program","configuration","fixedUniforms","showOverdrawInspector","hasTerrain","projectionPrelude","projectionDefine","extraDefines","createProgram","staticAttrInfo","dynamicAttrInfo","allAttrInfo","preludeUniformsInfo","projectionPreludeUniformsInfo","staticUniformsInfo","dynamicUniformsInfo","uniformList","allUniformsInfo","unshift","transpileFragmentShaderToWebGL1","transpileVertexShaderToWebGL1","fragmentShader","createShader","FRAGMENT_SHADER","failedToCreate","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","attachShader","vertexShader","VERTEX_SHADER","uniformLocations","bindAttribLocation","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","deleteShader","uniformLocation","getUniformLocation","terrainUniforms","u_depth","Uniform1i","u_terrain","u_terrain_dim","u_terrain_matrix","UniformMatrix4f","u_terrain_unpack","u_terrain_exaggeration","projectionUniforms","u_projection_matrix","u_projection_tile_mercator_coords","u_projection_clipping_plane","u_projection_transition","u_projection_fallback_matrix","drawMode","depthMode","stencilMode","colorMode","cullFaceMode","uniformValues","currentProperties","dynamicLayoutBuffer","dynamicLayoutBuffer2","dynamicLayoutBuffer3","setDepthMode","setStencilMode","setColorMode","setCullFace","TEXTURE2","depthTexture","TEXTURE3","fieldName","primitiveSize","LINES","LINE_STRIP","drawElements","UNSIGNED_SHORT","patternUniformValues","tileRatio","tileSizeAtNearestZoom","pixelX","pixelY","u_image","u_texsize","u_scale","u_fade","u_pixel_coord_upper","u_pixel_coord_lower","fillExtrusionUniformValues","shouldUseVerticalGradient","_lp","lightPos","lightMat","mat3.fromRotation","vec3.transformMat3","transformedLightPos","lightColor","u_lightpos","u_lightpos_globe","u_lightintensity","u_lightcolor","u_vertical_gradient","u_opacity","u_fill_translate","fillExtrusionPatternUniformValues","u_height_factor","fillPatternUniformValues","fillOutlineUniformValues","drawingBufferSize","u_world","fillOutlinePatternUniformValues","circleUniformValues","radiusCorrectionFactor","extrudeScale","globeExtrudeScale","u_camera_to_center_distance","u_scale_with_map","u_pitch_with_map","u_device_pixel_ratio","u_extrude_scale","u_globe_extrude_scale","u_translate","collisionUniformValues","u_pixel_extrude_scale","collisionCircleUniformValues","u_viewport_size","debugUniformValues","scaleRatio","u_color","u_overlay","u_overlay_scale","heatmapUniformValues","u_intensity","heatmapTextureUniformValues","textureUnit","colorRampUnit","mat4.ortho","u_matrix","drawingBufferWidth","drawingBufferHeight","u_color_ramp","hillshadeUniformValues","accent","illumination","u_latrange","getTileLatRange","u_exaggeration","u_altitudes","u_azimuths","u_accent","u_method","u_highlights","u_shadows","hillshadeUniformPrepareValues","u_dimension","u_zoom","u_unpack","colorReliefUniformValues","colorRampSize","u_elevation_stops","u_color_stops","u_color_ramp_size","lineUniformValues","ratioScale","u_translation","calculateTranslation","u_ratio","u_units_to_pixels","lineGradientUniformValues","u_image_height","linePatternUniformValues","tileZoomRatio","calculateTileRatio","lineSDFUniformValues","u_tileratio","u_crossfade_from","u_crossfade_to","u_mix","u_lineatlas_width","u_lineatlas_height","lineGradientSDFUniformValues","u_image_dash","rasterUniformValues","parentTL","parentScaleBy","fade","u_tl_parent","u_scale_parent","u_buffer_scale","u_fade_t","u_image0","u_image1","u_brightness_low","u_brightness_high","u_saturation_factor","saturation","u_contrast_factor","contrast","u_spin_weights","spinWeights","u_coords_top","u_coords_bottom","symbolIconUniformValues","rotateInShader","isAlongLine","isVariableAnchor","labelPlaneMatrix","glCoordMatrix","texSize","pitchedScale","u_is_size_zoom_constant","u_is_size_feature_constant","u_size_t","u_size","u_pitch","u_rotate_symbol","u_aspect_ratio","u_fade_change","u_label_plane_matrix","u_coord_matrix","u_is_text","u_is_along_line","u_is_variable_anchor","u_pitched_scale","symbolSDFUniformValues","isHalo","u_gamma_scale","u_is_halo","symbolTextAndIconUniformValues","texSizeSDF","texSizeIcon","u_texsize_icon","u_texture_icon","backgroundUniformValues","backgroundPatternUniformValues","imagePosA","imagePosB","u_pattern_tl_a","u_pattern_br_a","u_pattern_tl_b","u_pattern_br_b","u_pattern_size_a","u_pattern_size_b","u_scale_a","u_scale_b","u_tile_units_to_pixels","bgPatternUniformValues","emptyUniforms","__","programUniforms","Uniform3f","Uniform2f","UniformFloatArray","UniformColorArray","u_terrain_coords_id","u_sun_pos","u_atmosphere_blend","u_globe_position","u_globe_radius","u_inv_proj_matrix","u_sky_color","u_horizon","u_horizon_normal","u_sky_horizon_blend","u_sky_blend","IndexBuffer","unbindVAO","bindElementBuffer","ELEMENT_ARRAY_BUFFER","DYNAMIC_DRAW","STATIC_DRAW","bufferSubData","AttributeType","VertexBuffer","bindVertexBuffer","ARRAY_BUFFER","attribIndex","enableVertexAttribArray","vertexAttribPointer","BaseValue","getDefault","ClearColor","clearColor","ClearDepth","clearDepth","ClearStencil","clearStencil","ColorMask","colorMask","DepthMask","StencilMask","stencilMask","StencilFunc","ALWAYS","stencilFunc","StencilOp","stencilOp","StencilTest","STENCIL_TEST","disable","DepthRange","DepthTest","DEPTH_TEST","DepthFunc","LESS","Blend","BLEND","BlendFunc","ONE","ZERO","blendFunc","BlendColor","BlendEquation","FUNC_ADD","blendEquation","CullFace","CULL_FACE","CullFaceSide","BACK","cullFace","FrontFace","ProgramValue","ActiveTextureUnit","TEXTURE0","Viewport","BindFramebuffer","FRAMEBUFFER","BindRenderbuffer","bindRenderbuffer","RENDERBUFFER","BindTexture","BindVertexBuffer","BindElementBuffer","BindVertexArray","getExtension","bindVertexArrayOES","PixelStoreUnpack","pixelStorei","UNPACK_ALIGNMENT","PixelStoreUnpackPremultiplyAlpha","UNPACK_PREMULTIPLY_ALPHA_WEBGL","PixelStoreUnpackFlipY","UNPACK_FLIP_Y_WEBGL","FramebufferAttachment","ColorAttachment","setDirty","framebufferTexture2D","DepthAttachment","framebufferRenderbuffer","DEPTH_ATTACHMENT","DepthStencilAttachment","DEPTH_STENCIL_ATTACHMENT","FRAMEBUFFER_NOT_COMPLETE_ERROR","Framebuffer","hasDepth","hasStencil","depthAttachment","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","renderbuffer","deleteRenderbuffer","deleteFramebuffer","Context","stencilTest","depthTest","blend","cullFaceSide","extTextureFilterAnisotropic","extTextureFilterAnisotropicMax","MAX_TEXTURE_MAX_ANISOTROPY_EXT","maxTextureSize","MAX_TEXTURE_SIZE","HALF_FLOAT","extColorBufferHalfFloat","RGBA16F","RGBA16F_EXT","RGB16F","RGB16F_EXT","extTextureHalfFloat","HALF_FLOAT_OES","createRenderbuffer","storageFormat","rbo","renderbufferStorage","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT","createVertexArrayOES","deleteVertexArrayOES","quadTriangles","drawCollisionDebug","tileBatches","circleCount","circleOffset","colorModeForRenderPass","getTerrainData","circleProgram","vertexData","CollisionCircleLayoutArray","batch","circleIdx","collision","quadCount","triCount","QuadTriangleArray","idx","createQuadTriangles","identityMat4","calculateVariableRenderShift","renderTextSize","getShiftedAnchor","projectedAnchorPoint","transformAngle","pitchedTextShiftCorrection","translatedAnchor","adjustedShift","tileAnchorShifted","east","updateVariableAnchorsForBucket","tileScale","updateTextFitIcon","dynamicTextLayoutVertexArray","dynamicIconLayoutVertexArray","placedTextShifts","tileAnchor","projectedAnchor","evaluateSizeForFeature","pitchedTextCorrection","shiftedAnchor","placedIcons","getSymbolProgramName","drawLayerSymbols","rotationAlignment","isRenderingToTexture","hasSortKey","getDepthModeForSublayer","tileRenderState","pitchedTextRescaling","programConfiguration","evaluateSizeForZoom","terrainData","atlasInterpolation","atlasInterpolationIcon","atlasTextureIcon","rotating","zooming","iconScaled","glCoordMatrixForShader","hasVariableAnchors","shaderVariableAnchor","uLabelPlaneMatrix","hasHalo","oldSegments","segmentState","drawSymbolElements","prepareHeatmapTerrain","isRenderingGlobe","createHeatmapFbo","renderHeatmapTerrain","getColorRampTexture","rasterBoundsBuffer","rasterBoundsSegments","numType","internalFormat","updateGradientTexture","layerGradient","textureResolution","potentialOverzoom","nextPowerOfTwo","gradient","bindImagePatternTextures","bindDasharrayTextures","programChanged","bindGradientTextures","gradientTexture","bindGradientAndDashTextures","updatePatternPositionsInProgram","drawFillTiles","isOutline","fillPropertyName","programName","propertyFillTranslate","propertyFillTranslateAnchor","translateForUniforms","stencilModeForClipping","drawExtrusionTiles","renderHillshade","stencilModes","useBorder","moving","renderColorRelief","firstTile","TEXTURE4","textureStride","pixelData","drawTiles","flipCullfaceMode","minTileZ","rasterOpacity","rasterResampling","isTerrain","textureFilter","parentTopLeft","fadeValues","getFadeProperties","tileOpacity","parentTileOpacity","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","fadeMix","defaults","timeSinceParent","doFadeIn","opacity1","opacity2","getCrossFadeValues","timeSinceTile","getSelfFadeValues","topColor","btmColor","leftColor","rightColor","centerColor","drawHorizontalLine","drawDebugSSRect","drawVerticalLine","SCISSOR_TEST","scissor","drawDebugTile","tileRawData","tileSizeKb","tileIdText","initDebugOverlayCanvas","debugOverlayCanvas","ctx2d","shadowBlur","strokeStyle","strokeText","debugOverlayTexture","drawTextToOverlay","debugBuffer","debugSegments","tileBorderIndexBuffer","drawTerrain","renderOptions","getDepthModeFor3D","getTerrainMesh","renderToTexture","getTexture","getMeshFrameDelta","getMesh","Painter","_tileTextures","terrainFacilitator","renderTime","setup","numSublayers","depthEpsilon","debugArray","rasterBoundsArray","RasterBoundsArray","rasterBoundsArrayPosOnly","rasterBoundsBufferPosOnly","rasterBoundsSegmentsPosOnly","viewportArray","viewportBuffer","viewportSegments","tileLineStripIndices","LineStripIndexArray","stencilClearMode","tileExtentMesh","nextStencilID","currentStencilSource","_renderTileClippingMasks","stencilRefs","_renderTileMasks","_tileClippingMaskIDs","tileStencilRefs","useBorders","stencilRef","REPLACE","_renderTilesDepthBuffer","stencilModeFor3D","NOTEQUAL","EQUAL","getStencilConfigForOverlapAndUpdateStencilID","stencilValues","zToStencilMode","GEQUAL","stencilConfigForOverlapTwoPass","zToStencilModeHigh","zToStencilModeLow","GREATER","_showOverdrawInspector","CONSTANT_COLOR","renderPass","opaquePassEnabledForLayer","currentLayer","LEQUAL","depthRangeFor3D","opaquePassCutoff","coordsAscending","coordsDescending","coordsDescendingSymbol","maybeDrawDepthAndCoords","prepareForRender","renderLayer","skyUniforms","mercatorHorizon","skyBlend","drawSky","globeDepthRendered","sunPos","vec3.transformMat4","getSunPos","atmosphereBlend","globeRadius","invProjMatrix","globePosition","drawAtmosphere","showTileBoundaries","selectedSource","flatMap","vectorSources","otherSources","considerSource","selectDebugSource","drawDebug","showPadding","drawCrosshair","drawDebugPadding","requireExact","prevMatrix","currMatrix","doUpdate","mat4.exactEquals","mat4.equals","anyTilesAfterTime","mat4.copy","getRenderableTiles","getFramebuffer","devicePixelRatio","drawDepth","getCoordsTexture","coordsIndex","drawCoords","isSymbolStyleLayer","pixelToTileScale","updateVariableAnchors","drawSymbols","isCircleStyleLayer","strokeWidth","strokeOpacity","segmentsRenderStates","styleTranslate","styleTranslateAnchor","segmentsState","drawCircles","isHeatmapStyleLayer","prepareHeatmapFlat","renderHeatmapFlat","drawHeatmap","isLineStyleLayer","programId","prevProgram","constantDasharray","atlas","drawLine","isFillStyleLayer","drawFill","isFillExtrusionStyleLayer","drawFillExtrusion","isHillshadeStyleLayer","renderTexture","prepareHillshade","stencilBorderless","stencilBorders","drawHillshade","isColorReliefStyleLayer","drawColorRelief","drawRaster","isBackgroundStyleLayer","isPatternMissing","drawBackground","isCustomStyleLayer","customLayerArgs","shaderData","variantName","vertexShaderPrelude","define","defaultProjectionData","setCustomLayerDefaults","setBaseState","drawCustom","textures","forceSimpleProjection","useTerrain","deleteProgram","overLimit","throttle","lastCallArgs","pending","lastCallContext","later","Hash","hashName","_getCurrentHash","hash","_hashName","keyval","_onHashChange","_isValidHash","dragRotate","isEnabled","touchZoomRotate","getBearing","jumpTo","_updateHashUnthrottled","getHashString","history","replaceState","_removeHash","currentHash","baseHash","targetHash","replaceString","_updateHash","encodeURIComponent","addTo","mapFeedback","getZoom","getPitch","found","parts","getMinZoom","getMaxZoom","getMinPitch","getMaxPitch","defaultInertiaOptions","linearity","easing","defaultPanInertiaOptions","deceleration","maxSpeed","defaultZoomInertiaOptions","defaultBearingInertiaOptions","defaultPitchInertiaOptions","defaultRollInertiaOptions","HandlerInertia","_inertiaBuffer","record","settings","_drainInertiaBuffer","inertia","_onMoveEnd","panInertiaOptions","pinchAround","easeOptions","calculateEasing","finalPan","computedEaseOptions","extendDuration","unproject","noMoveStart","inertiaDuration","inertiaOptions","speed","MapMouseEvent","_defaultPrevented","defaultPrevented","originalEvent","MapTouchEvent","changedTouches","getCanvasContainer","lngLats","MapWheelEvent","MapEventHandler","_clickTolerance","clickTolerance","_mousedownPos","_firePreventable","mapEvent","isActive","BlockableMapEventHandler","_delayContextMenu","_ignoreContextMenu","_contextMenuEvent","TransformProvider","_requestedCameraState","BoxZoomHandler","_tr","_el","getContainer","_enabled","_active","shiftKey","_startPos","_lastPos","_box","classList","_fireEvent","cameraAnimation","fitScreenCoordinates","keydown","keyCode","indexTouches","SingleTapRecognizer","numTouches","mapTouches","timeStamp","getCentroid","newTouches","TapRecognizer","singleTap","numTaps","lastTime","lastTap","tap","soonEnough","closeEnough","TapZoomHandler","_zoomIn","_zoomOut","zoomInPoint","zoomOutPoint","easeTo","DragHandler","_moveStateManager","moveStateManager","_moveFunction","move","_activateOnStart","activateOnStart","assignEvents","_moved","_lastPoint","endMove","_move","dragStart","isValidStartEvent","startMove","dragMove","isValidMoveEvent","movePoint","dragEnd","isValidEndEvent","getClickTolerance","LEFT_BUTTON","RIGHT_BUTTON","BUTTONS_FLAGS","LEFT_BUTTON$1","RIGHT_BUTTON$1","MouseMoveStateManager","_correctEvent","checkCorrectEvent","eventButton","_eventButton","_e","flag","buttons","buttonNoLongerPressed","OneFingerTouchMoveStateManager","_firstTouch","_isOneFingerTouch","targetTouches","_isSameTouchEvent","MouseOrTouchMoveStateManager","mouseMoveStateManager","oneFingerTouchMoveStateManager","_executeRelevantHandler","onMouseEvent","onTouchEvent","TouchEvent","TouchPanHandler","_touches","_sum","_shouldBePrevented","touchesCount","cooperativeGestures","_calculateTransform","notifyGestureBlocked","touchPointSum","touchDeltaSum","touchDeltaCount","TwoFingersTouchHandler","_firstTwoTouches","_start","getTouchById","_aroundCenter","getZoomDelta","lastDistance","TwoFingersTouchZoomHandler","_distance","_startDistance","getBearingDelta","TwoFingersTouchRotateHandler","_minDiameter","_startVector","_vector","lastVector","_isBelowThreshold","bearingDeltaSinceStart","isVertical","TwoFingersTouchPitchHandler","_currentTouchCount","_valid","_firstMove","_lastPoints","vectorA","vectorB","gestureBeginsVertically","movedA","movedB","isSameDirection","panStep","bearingStep","pitchStep","KeyboardHandler","stepOptions","_panStep","_bearingStep","_pitchStep","_rotationDisabled","altKey","ctrlKey","metaKey","zoomDir","bearingDir","pitchDir","xDir","yDir","easeId","easeOut","disableRotation","enableRotation","wheelZoomDelta","wheelZoomRate","ScrollZoomHandler","triggerRenderFrame","_onTimeout","initialEvent","_type","_delta","_lastValue","_triggerRenderFrame","_defaultZoomRate","_wheelZoomRate","setZoomRate","zoomRate","setWheelZoomRate","_finishTimeout","_zooming","isBypassed","deltaMode","DOM_DELTA_LINE","deltaY","timeDelta","_lastWheelEventTime","_timeout","_lastWheelEvent","_frameId","_aroundPoint","renderFrame","_lastExpectedZoom","externalZoomChange","_startZoom","_targetZoom","_easing","_smoothOutEasing","finished","lastWheelEventTimeDiff","noInertia","needsRenderFrame","_prevEase","currentEase","DoubleClickZoomHandler","clickZoom","TapZoom","_clickZoom","_tapZoom","ClickZoomHandler","TapDragZoomHandler","_tap","_swipePoint","_swipeTouch","_tapTime","_tapPoint","swipePoint","newSwipePoint","DragPanHandler","mousePan","touchPan","_mousePan","_touchPan","_inertiaOptions","DragRotateHandler","mouseRotate","mousePitch","mouseRoll","_pitchWithRotate","pitchWithRotate","_rollEnabled","rollEnabled","_mouseRotate","_mousePitch","_mouseRoll","TwoFingersTouchZoomRotateHandler","touchZoom","touchRotate","tapDragZoom","_touchZoom","_touchRotate","_tapDragZoom","CooperativeGesturesHandler","_bypassKey","_setupUI","mapCanvasContainer","desktopMessage","_getUIString","mobileMessage","desktopDiv","textContent","mobileDiv","setAttribute","_destroyUI","gestureType","isMoving","drag","RenderFrameEvent","hasChange","HandlerManager","handleWindowEvent","handleEvent","eventName","_updatingCamera","inputEvent","mergedHandlerResult","eventsInProgress","activeHandlers","handlerName","_handlers","_blockedByActive","isPointableEvent","isTouchableEvent","_getMapTouches","isTouchableOrPointableType","mergeHandlerResult","deactivatedHandlers","_previousActiveHandlers","_changes","_stop","_inertia","_fireEvents","_handlersById","_bearingSnap","bearingSnap","_eventsInProgress","_addDefaultHandlers","passive","listenerOptions","boxZoom","interactive","tapZoom","doubleClickZoom","touchPitch","aroundCenter","minPixelCenterThreshold","rotateDegreesPerPixelMoved","getAngleDelta","generateMouseRotationHandler","pitchDegreesPerPixelMoved","generateMousePitchHandler","rollDegreesPerPixelMoved","generateMouseRollHandler","generateMousePanHandler","dragPan","scrollZoom","keyboard","allowEndAnimation","isRotating","myName","handlerResult","_applyChanges","combinedEventsInProgress","combinedDeactivatedHandlers","change","_updateMapTransform","combinedResult","_getTransformForUpdate","_terrainMovement","deltasForHelper","_handleMapControls","_applyUpdatedTransform","_elevationFreeze","newEventsInProgress","wasMoving","nowMoving","startEvents","endEvents","originalEndEvent","stillMoving","finishedMoving","getCenterClampedToGround","inertialEase","shouldSnapToNorth","essential","resetNorth","freezeElevation","_requestFrame","_renderTaskQueue","Camera","_renderFrameCallback","_easeStart","_easeOptions","_onEaseFrame","_easeFrameId","_requestRenderFrame","_moving","newTransform","newCameraHelper","getCenterElevation","setCenterElevation","_centerClampedToGround","setCenterClampedToGround","centerClampedToGround","panBy","panTo","zoomTo","zoomIn","zoomOut","getVerticalFieldOfView","setVerticalFieldOfView","getPadding","rotateTo","resetNorthPitch","snapToNorth","getRoll","cameraForBounds","_cameraForBoxAndBearing","defaultPadding","fitBounds","_fitInternal","calculatedOptions","flyTo","bearingChanged","pitchChanged","rollChanged","zoomChanged","calculateCameraOptionsFromTo","altitudeFrom","altitudeTo","fromMercator","toMercator","distance3D","groundDistance","calculateCameraOptionsFromCameraLngLatAltRotation","cameraLngLat","cameraAlt","centerInfo","startBearing","startPitch","startRoll","_normalizeBearing","currently","_rotating","pitching","_pitching","rolling","_rolling","easeHandler","_padding","_easeId","_prepareEase","_prepareElevation","_ease","_updateElevation","_fireMoveEvents","interruptingEaseId","_finalizeElevation","_afterEase","_elevationCenter","_elevationStart","_elevationTarget","getMinTileElevationForLngLatZoom","pitch1","transformCameraUpdate","_elevateCameraIfInsideTerrain","cameraAltitude","minAltitude","newCamera","modifiers","finalTransform","modifier","nextTransform","wasZooming","wasRotating","wasPitching","wasRolling","coercedOptions","curve","flyToHandler","rho","u1","rho2","zoomOutFactor","descent","sinh","cosh","r0","S","screenSpeed","maxDuration","isEasing","allowGestures","_cancelRenderFrame","_onEaseEnd","onEaseEnd","handlers","currentBearing","queryTerrainElevation","defaultAttributionControlOptions","compact","customAttribution","AttributionControl","_toggleAttribution","_updateData","_updateAttributions","_updateCompact","_compact","_updateCompactMinimize","getDefaultPosition","_compactButton","_setElementTitle","_innerContainer","_attribHTML","title","attributions","styleOwner","owner","styleId","attrib","attribHTML","_editLink","LogoControl","containerChildren","rel","display","TaskQueue","_queue","_id","_cleared","_currentlyRunning","cancelled","running","run","pos3dAttributes","TerrainTileManager","_lastTilesetChange","_renderableTilesKeys","_sourceTileCache","deltaZoom","destruct","freeRtt","getTerrainCoords","_getTerrainCoordsForTileRanges","_getTerrainCoordsForRegularTile","terrainTileID","mat","_isWithinTileRanges","dx2","dy2","getSourceTile","searchForDEM","findTileInCaches","canonicalTileRanges","Terrain","_meshCache","qualityFactor","meshSize","_demMatrixCache","_coordsTextureSize","getDEMElevation","vec2.transformMat4","isInBoundsForZoomLngLat","_getOverscaledTileIDFromLngLatZoom","terrainCoveringTiles","_emptyDemTexture","_emptyDepthTexture","_emptyDemUnpack","_emptyDemMatrix","sourceTile","matrixKey","demMatrix","mat4.fromScaling","_fboDepthTexture","_fboCoordsTexture","DEPTH_COMPONENT16","_coordsTexture","fbHeight","coordsSize","depthAtPoint","tileId","globeEnabled","northPole","southPole","Pos3dArray","meshSize2","offsetTop","offsetBottom","offsetBottomEdge","northY","northZ","southY","southZ","offsetLeft","offsetRight","mercatorCoordinate","tileY","RenderPool","_context","_objects","_recentlyUsed","_stamp","_createObject","DEPTH_STENCIL","stamp","inUse","getObjectForId","useObject","stampObject","getOrCreateFreeObject","freeObject","freeAllObjects","isFull","LAYERS","RenderToTexture","pool","_stacks","_prevType","_rttTiles","_renderableTiles","_renderableLayerIds","_coordsAscending","_coordsAscendingStr","isLastLayer","defaultLocale","packageJSON","attributionControl","maplibreLogo","refreshExpiredTiles","canvasContextAttributes","antialias","preserveDrawingBuffer","powerPreference","failIfMajorPerformanceCaveat","desynchronized","contextType","trackResize","maxTileCacheSize","maxTileCacheZoomLevels","reduceMotion","maxCanvasSize","experimentalZoomLevelsToOverscale","showCompass","showZoom","visualizePitch","visualizeRoll","MouseRotateWrapper","_rotatePitchHandler","offTemp","supportsGeolocation","smartWrap","priorPos","useNormalWrap","originalLngLat","anchorTranslate","applyAnchorClass","prefix","Marker","_onKeyPress","legacyCode","charCode","togglePopup","_onMapClick","targetElement","_element","_popup","isFullyLoaded","_lngLat","_flatPos","_offset","_rotationAlignment","_rotation","_pitchAlignment","_subpixelPositioning","_anchor","_updateOpacity","_onMove","_isDragging","_pointerdownPos","_positionDelta","setLngLat","pointerEvents","_onUp","_addDragHandler","_color","_draggable","draggable","subpixelPositioning","setOpacity","opacityWhenCovered","_defaultMarker","svg","defaultHeight","defaultWidth","setAttributeNS","markerLarge","page1","shadow","ellipses","rx","ry","ellipse","bgPath","border","borderPath","maki","circleContainer","circle1","circle2","hasAttribute","setDraggable","_opacityTimeout","getLngLat","getElement","setPopup","popup","_originalTabIndex","markerHeight","markerRadius","linearOffset","getAttribute","setSubpixelPositioning","getPopup","_opacityWhenCovered","isOpen","force","targetOpacity","_opacity","terrainDistance","metersToCenter","elevationToCenter","terrainDistanceCenter","centerIsInvisible","getOffset","setOffset","addClassName","removeClassName","toggleClassName","toggle","shouldBeDraggable","isDraggable","setRotation","getRotation","setRotationAlignment","getRotationAlignment","setPitchAlignment","getPitchAlignment","positionOptions","enableHighAccuracy","maximumAge","fitBoundsOptions","trackUserLocation","showAccuracyCircle","showUserLocation","numberOfWatches","noTimeout","updateScale","optWidth","clientHeight","clientWidth","globeWidth","maxMeters","maxFeet","setScale","maxDistance","pow10","multiplier","getDecimalRoundNum","getRoundNum","closeButton","closeOnClick","focusAfterOpen","locationOccludedOpacity","focusQuerySelector","normalizeOffset","cornerOffset","convertedOffset","_onFullscreenChange","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","shadowRoot","_fullscreen","_handleFullscreenChange","_onClickFullscreen","_isFullscreen","_exitFullscreen","_requestFullscreen","HTMLElement","_fullscreenchange","_controlContainer","_fullscreenButton","_updateTitle","_getTitle","_prevCooperativeGesturesEnabled","exitFullscreen","mozCancelFullScreen","msExitFullscreen","webkitCancelFullScreen","_togglePseudoFullScreen","requestFullscreen","mozRequestFullScreen","msRequestFullscreen","webkitRequestFullscreen","_onSuccess","_isOutOfMapMaxBounds","_setErrorState","_updateMarker","_finish","_lastKnownPosition","_watchState","_geolocateButton","_updateCamera","_dotElement","longitude","accuracy","newBounds","geolocateSource","_accuracyCircleMarker","_userLocationDotMarker","_accuracy","_updateCircleRadiusIfNeeded","_onUpdate","_onError","_geolocationWatchID","_clearWatch","_timeoutId","_finishSetupUI","_circleElement","_setup","fromResize","ResizeObserverEntry","forceRecalculation","permissions","geolocation","checkGeolocationSupport","clearWatch","userLocation","screenPosition","userLocationWith100Px","pixelsToMeters","toFixed","watchPosition","getCurrentPosition","_toggleProjection","_updateGlobeIcon","_globeButton","_idleTriggered","_crossFadingFactor","_controls","_lostContextStyle","_contextLost","_getStyleAndImages","_contextRestored","setStyle","_setupPainter","_onMapScroll","scrollTop","scrollLeft","_onWindowOnline","_interactive","_canvasContextAttributes","_trackResize","_crossSourceCollisions","_locale","_overridePixelRatio","_maxCanvasSize","_imageQueueHandle","maxBounds","_setupContainer","initialResizeEventCaptured","throttledResizeCallback","redraw","_resizeObserver","ResizeObserver","observe","_hash","shouldConstrainUsingMercatorTransform","_localIdeographFontFamily","_validateStyle","addControl","logoPosition","_resizeTransform","control","controlElement","positionContainer","_controlPositions","insertBefore","firstChild","removeControl","ci","hasControl","_containerDimensions","clampedPixelRatio","_getClampedPixelRatio","_resizeCanvas","fireMoving","maxCanvasWidth","maxCanvasHeight","canvasWidth","canvasHeight","setPixelRatio","getRenderWorldCopies","setTransformConstrain","_createDelegatedListener","mousein","existingLayers","delegates","delegate","_saveDelegatedListener","delegatedListener","_delegatedListeners","_removeDelegatedListener","layerIdsOrListener","geometryOrOptions","isGeometry","_diffStyle","_updateStyle","_lazyInitEmptyStyle","_updateDiff","getStyle","isStyleLoaded","_terrainDataCallback","thisLayer","setSourceTileLodParams","existingImage","imageData","hasImage","loadImage","beforeId","spriteUrl","_canvasContainer","_canvas","canvasContainer","dimensions","controlContainer","positionName","premultipliedAlpha","webglcontextcreationerrorDetailObject","requestedAttributes","statusMessage","msg","newProjection","_styleDirty","_sourcesDirty","updateStyle","_render","paintStartTimeStamp","crossFading","globeRenderingChanged","_d","_placementDirty","somethingDirty","_repaint","_fullyLoaded","disconnect","loseContext","isFramebufferNotCompleteError","_showTileBoundaries","_showPadding","repaint","_vertices","getCameraTargetElevation","_updateZoomButtons","isMax","isMin","_zoomInButton","_zoomOutButton","_rotateCompassArrow","_compassIcon","_setButtonTitle","_createButton","_compass","_handler","_content","_onClose","_onMouseMove","_onMouseUp","_onDrag","cursor","_trackPointer","_tip","_closeButton","anchorComponents","offsetedPos","closeOnMove","_focusFirstElement","trackPointer","setText","setDOMContent","createTextNode","setHTML","frag","createDocumentFragment","temp","getMaxWidth","setMaxWidth","htmlNode","hasChildNodes","_createCloseButton","firstFocusable","querySelector","focus","setUnit","_toggleTerrain","_updateTerrainIcon","_terrainButton","SourceType","workerUrl","numRequests","lazy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHO,MAAA,CAAA,QAAA,CAAA,CAAA,SAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,YAAA,CAAA,SAASA,EAAUC,CAAAA,CAASC,CAAAA,CAAYC,CAAAA,CAAGC,CAAAA,CAAAA,CAE9C,OAAO,IAAKD,CAAAA,GAAMA,CAAAA,CAAIE,OAAAA,CAAAA,GAAU,SAAUC,CAAAA,CAASC,CAAAA,CAAAA,CAC/C,SAASC,CAAAA,CAAUC,CAAAA,CAAAA,CAAS,IAAMC,CAAAA,CAAKN,CAAAA,CAAUO,IAAAA,CAAKF,CAAAA,CAAAA,EAAS,CAAE,MAAOG,CAAAA,CAAAA,CAAKL,CAAAA,CAAOK,CAAAA,EAAI,CAAE,CAC1F,SAASC,CAAAA,CAASJ,CAAAA,CAAAA,CAAS,IAAMC,CAAAA,CAAKN,CAAAA,CAAiB,MAAEK,CAAAA,CAAAA,EAAS,CAAE,MAAOG,CAAAA,CAAAA,CAAKL,CAAAA,CAAOK,CAAAA,EAAI,CAAE,CAC7F,SAASF,CAAAA,CAAKI,CAAAA,CAAAA,CAJlB,IAAeL,EAIaK,CAAAA,CAAOC,IAAAA,CAAOT,CAAAA,CAAQQ,CAAAA,CAAOL,QAJ1CA,CAAAA,CAIyDK,CAAAA,CAAOL,MAJhDA,CAAAA,YAAiBN,CAAAA,CAAIM,EAAQ,IAAIN,CAAAA,EAAE,SAAUG,CAAAA,CAAAA,CAAWA,EAAQG,CAAAA,EAAQ,CAAA,EAAA,EAIjBO,KAAKR,CAAAA,CAAWK,CAAAA,EAAW,CAC7GH,CAAAA,CAAAA,CAAMN,CAAAA,CAAYA,CAAAA,CAAUa,KAAA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CAAAA,CAAAA,CAAOK,WAAa3P,EAAO,EAAA,CAAA,EAAA;;AIrKlE;AACA;AACA;AACA;;;AAkBA,mBAAe,UAAU;;;;;;;;","x_google_ignoreList":[0,1,2,5,6,7,8,9,10,11,20,40,41,42,66,74,88,90,108,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,166,174,178,188,189,190,191,192,193,194,195,196,197,200,211]} \ No newline at end of file diff --git a/proxy/js/styles.mjs b/proxy/js/styles.mjs new file mode 100644 index 000000000..1f097ca57 --- /dev/null +++ b/proxy/js/styles.mjs @@ -0,0 +1,5276 @@ +import fs from 'fs' +import yaml from 'yaml' + +const signals_railway_line = yaml.parse(fs.readFileSync('features/train_protection.yaml', 'utf8')) +const loading_gauges = yaml.parse(fs.readFileSync('features/loading_gauge.yaml', 'utf8')) +const track_classes = yaml.parse(fs.readFileSync('features/track_class.yaml', 'utf8')) + +const knownStyles = [ + 'standard', + 'speed', + 'signals', + 'electrification', + 'track', + 'operator', +]; + +const defaultDate = (new Date()).getFullYear(); + +const themeSwitch = (light, dark) => + ['case', + ['==', ['global-state', 'theme'], 'light'], light, + dark + ]; + +const colors = { + text: { + main: themeSwitch('black', 'white'), + halo: themeSwitch('white', 'black'), + }, + halo: themeSwitch('white', '#333'), + iconHalo: themeSwitch('white', '#ccc'), + casing: themeSwitch('white', '#666'), + hover: { + main: themeSwitch('#ff0000', '#ff0000'), + // High speed lines and 25kV are the hover color by default + alternative: themeSwitch('#ffc107', '#ffc107'), + textHalo: themeSwitch('yellow', '#28281e'), + iconHalo: themeSwitch('yellow', '#E7E700'), + }, + railwayLine: { + text: themeSwitch('#585858', '#ccc'), + }, + route: themeSwitch('hsla(312, 100%, 50%, 0.6)', 'hsla(312, 100%, 50%, 0.6)'), + styles: { + standard: { + main: themeSwitch('#ff8100', '#ff8100'), + highspeed: themeSwitch('#ff0c00', '#ff0c00'), + branch: themeSwitch('#c4b600', '#c4b600'), + narrowGauge: themeSwitch('#c0da00', '#c0da00'), + no_usage: themeSwitch('#000000', '#000000'), + disused: themeSwitch('#70584d', '#70584d'), + tourism: themeSwitch('#5b4d70', '#5b4d70'), + military: themeSwitch('#764765', '#764765'), + test: themeSwitch('#3d634e', '#3d634e'), + abandoned: themeSwitch('#7f6a62', '#7f6a62'), + razed: themeSwitch('#94847e', '#94847e'), + tram: themeSwitch('#d877b8', '#d877b8'), + subway: themeSwitch('#0300c3', '#0300c3'), + light_rail: themeSwitch('#00bd14', '#00bd14'), + monorail: themeSwitch('#00bd8b', '#00bd8b'), + miniature: themeSwitch('#7d7094', '#7d7094'), + funicular: themeSwitch('#d87777', '#d87777'), + siding: themeSwitch('#000000', '#000000'), + crossover: themeSwitch('#000000', '#000000'), + yard: themeSwitch('#000000', '#000000'), + spur: themeSwitch('#87491d', '#87491d'), + industrial: themeSwitch('#87491d', '#87491d'), + ferry: themeSwitch('#1e81b0', '#1e81b0'), + unknown: themeSwitch('#000000', '#000000'), + casing: { + railway: themeSwitch('#ffffff', '#ffffff'), + bridge: themeSwitch('#000000', '#ddd'), + }, + tunnelCover: themeSwitch('rgba(255, 255, 255, 50%)', 'rgba(0, 0, 0, 25%)'), + turntable: { + fill: themeSwitch('#ababab', '#ababab'), + casing: themeSwitch('#808080', '#808080'), + }, + stationsText: themeSwitch('blue', '#bdcfff'), + yardText: themeSwitch('#87491D', '#ffa35f'), + tramStopText: themeSwitch('#D877B8', '#f8c7e8'), + lightRailText: themeSwitch('#0e5414', '#83ea8f'), + monorailText: themeSwitch('#00674d', '#5fffd7'), + miniatureText: themeSwitch('#503285', '#503285'), + funicularText: themeSwitch('#d75656', '#daa3a3'), + defaultText: themeSwitch('#616161', '#d2d2d2'), + past: themeSwitch('#535353', '#dadada'), + future: themeSwitch('#fff732', '#fffdcc'), + signalBox: { + text: themeSwitch('#404040', '#bfffb3'), + halo: themeSwitch('#bfffb3', '#404040'), + }, + track: { + text: themeSwitch('white', 'white'), + halo: themeSwitch('blue', '#00298d'), + hover: themeSwitch('yellow', 'yellow'), + }, + switch: { + default: themeSwitch('#003687', '#a7c6fc'), + localOperated: themeSwitch('#005129', '#85f5bd'), + resetting: themeSwitch('#414925', '#bdc2ab'), + }, + symbols: themeSwitch('black', 'white'), + platform: themeSwitch('#aaa', '#aaa'), + stationAreaGroup: themeSwitch('black', 'white'), + }, + signals: { + bufferStopDerailer: themeSwitch('#BF1A1D', '#E75454'), + }, + }, + km: { + text: themeSwitch('hsl(268, 100%, 40%)', 'hsl(268, 5%, 86%)'), + }, + signals: { + direction: themeSwitch('#a8d8bcff', '#a8d8bcff'), + }, + catenary: themeSwitch('blue', 'blue'), + substation: themeSwitch('hsl(152 100% 36.3%)', 'hsl(152 100% 25%)'), + substationText: themeSwitch('hsl(152 100% 20.8%)', 'hsl(152 100% 50%)'), +}; + +const font = { + regular: [ + 'Noto Sans Regular', + 'Noto Naskh Arabic Regular', + 'Noto Sans Armenian Regular', + 'Noto Sans Balinese Regular', + 'Noto Sans Bengali Regular', + 'Noto Sans Devanagari Regular', + 'Noto Sans Ethiopic Regular', + 'Noto Sans Georgian Regular', + 'Noto Sans Gujarati Regular', + 'Noto Sans Gurmukhi Regular', + 'Noto Sans Hebrew Regular', + 'Noto Sans Javanese Regular', + 'Noto Sans Kannada Regular', + 'Noto Sans Khmer Regular', + 'Noto Sans Lao Regular', + 'Noto Sans Mongolian Regular', + 'Noto Sans Myanmar Regular', + 'Noto Sans Oriya Regular', + 'Noto Sans Sinhala Regular', + 'Noto Sans Symbols Regular', + 'Noto Sans Tamil Regular', + 'Noto Sans Thai Regular', + 'Noto Sans Tibetan Regular', + 'Noto Sans Tifinagh Regular', + ], + bold: [ + 'Noto Sans Bold', + 'Noto Naskh Arabic Bold', + 'Noto Sans Armenian Bold', + 'Noto Sans Bengali Bold', + 'Noto Sans Devanagari Bold', + 'Noto Sans Ethiopic Bold', + 'Noto Sans Georgian Bold', + 'Noto Sans Gujarati Bold', + 'Noto Sans Gurmukhi Bold', + 'Noto Sans Hebrew Bold', + 'Noto Sans Kannada Bold', + 'Noto Sans Khmer Bold', + 'Noto Sans Lao Bold', + 'Noto Sans Myanmar Bold', + 'Noto Sans Oriya Bold', + 'Noto Sans Sinhala Bold', + 'Noto Sans Symbols Bold', + 'Noto Sans Tamil Bold', + 'Noto Sans Thai Bold', + 'Noto Sans Tibetan Bold', + // Fallback to regular fonts + 'Noto Sans Balinese Regular', + 'Noto Sans Javanese Regular', + 'Noto Sans Mongolian Regular', + 'Noto Sans Tifinagh Regular', + ], + italic: [ + 'Noto Sans Italic', + // Fallback to regular fonts + 'Noto Naskh Arabic Regular', + 'Noto Sans Armenian Regular', + 'Noto Sans Balinese Regular', + 'Noto Sans Bengali Regular', + 'Noto Sans Devanagari Regular', + 'Noto Sans Ethiopic Regular', + 'Noto Sans Georgian Regular', + 'Noto Sans Gujarati Regular', + 'Noto Sans Gurmukhi Regular', + 'Noto Sans Hebrew Regular', + 'Noto Sans Javanese Regular', + 'Noto Sans Kannada Regular', + 'Noto Sans Khmer Regular', + 'Noto Sans Lao Regular', + 'Noto Sans Mongolian Regular', + 'Noto Sans Myanmar Regular', + 'Noto Sans Oriya Regular', + 'Noto Sans Sinhala Regular', + 'Noto Sans Symbols Regular', + 'Noto Sans Tamil Regular', + 'Noto Sans Thai Regular', + 'Noto Sans Tibetan Regular', + 'Noto Sans Tifinagh Regular', + 'Noto Sans Regular', + ], +} + +const turntable_casing_width = 2; + +const trainProtectionColor = field => ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ...signals_railway_line.train_protections.flatMap(train_protection => + [['==', ['get', field], train_protection.train_protection], train_protection.color]), + 'grey', +]; + +const railway_casing_add = 1; +const bridge_casing_add = 3; + +// TODO move to variable +const abandoned_dasharray = [2.5, 2.5]; +const disused_dasharray = [2.5, 2.5]; +const razed_dasharray = [1, 5]; +const construction_dasharray = [4.5, 4.5]; +const proposed_dasharray = [1, 4]; +const present_dasharray = [1]; + +const train_protection_construction_dasharray = [2, 8]; + +// Turbo color map +// See https://research.google/blog/turbo-an-improved-rainbow-colormap-for-visualization/ +// See https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f?permalink_comment_id=3708728#gistcomment-3708728 +// See https://github.com/hiddewie/OpenRailwayMap-vector/issues/668 +const turboColorMap = (valueExpression, min, max, power) => + ['interpolate-hcl', ['linear'], ['^', ['/', ['-', ['max', min, ['min', valueExpression, max]], min], max - min], power], + 0, 'hsl(285 53.2% 15.1%)', + 25 / 255, 'hsl(231 57% 53.5%)', + 50 / 255, 'hsl(212 101.1% 62.7%)', + 75 / 255, 'hsl(179 78.2% 46.7%)', + 100 / 255, 'hsl(145 92% 45%)', + 125 / 255, 'hsl(91 100% 45%)', + 150 / 255, 'hsl(62 75.5% 55%)', + 175 / 255, 'hsl(36 99% 60.2%)', + 200 / 255, 'hsl(21 91.7% 52.5%)', + 225 / 255, 'hsl(12 96.2% 41.4%)', + 250 / 255, 'hsl(3 97.2% 27.8%)', + 255 / 255, 'hsl(1 95.2% 24.7%)', + ] + +const speedColor = ['case', + ['==', ['get', 'maxspeed'], null], 'gray', + turboColorMap(['get', 'maxspeed'], 10, 380, 0.8), +] +const speedHoverColor = ['case', + ['all', ['!=', ['get', 'maxspeed'], null], ['>=', ['get', 'maxspeed'], 200], ['<=', ['get', 'maxspeed'], 340]], colors.hover.alternative, + colors.hover.main, +] + +const electrification_construction_dashes = [2.5, 2.5]; +const electrification_proposed_dashes = [2, 4]; + +const color_no = 'black'; +const color_delectrified = '#70584D'; +const color_lt750v_dc = '#FF79B8'; +const color_750v_dc = '#F930FF'; +const color_gt750v_lt1kv_dc = '#D033FF'; +const color_1kv_dc = '#5C1CCB'; +const color_gt1kv_lt1500v_dc = '#007ACB'; +const color_1500v_dc = '#0098CB'; +const color_gt1500v_lt3kv_dc = '#00B7CB'; +const color_3kv_dc = '#0000FF'; +const color_gt3kv_dc = '#1969FF'; +const color_lt15kv_ac = '#97FF2F'; +const color_gte15kv_lt25kv_ac = '#F1F100'; +const color_gte25kv_ac = '#FF9F19'; +const color_15kv_16_67hz = '#00FF00'; +const color_15kv_16_7hz = '#00CB66'; +const color_25kv_50hz = '#FF0000'; +const color_25kv_60hz = '#C00000'; +const color_12kv_25hz = '#CCCC00'; +const color_12_5kv_60hz = '#999900'; +const color_20kv_50hz = '#FFCC66'; +const color_20kv_60hz = '#FF9966'; + +const electrificationVoltageFrequencyColor = (voltageProperty, frequencyProperty) => ['case', + ['boolean', ['feature-state', 'hover'], false], ['case', + ['==', ['get', voltageProperty], 25000], colors.hover.alternative, + colors.hover.main, + ], + ['all', ['==', ['get', frequencyProperty], 60], ['==', ['get', voltageProperty], 25000]], color_25kv_60hz, + ['all', ['==', ['get', frequencyProperty], 50], ['==', ['get', voltageProperty], 25000]], color_25kv_50hz, + ['all', ['==', ['get', frequencyProperty], 60], ['==', ['get', voltageProperty], 20000]], color_20kv_60hz, + ['all', ['==', ['get', frequencyProperty], 50], ['==', ['get', voltageProperty], 20000]], color_20kv_50hz, + ['all', ['!=', ['get', frequencyProperty], null], ['<', 16.665, ['get', frequencyProperty]], ['<', ['get', frequencyProperty], 16.675], ['==', ['get', voltageProperty], 15000]], color_15kv_16_67hz, + ['all', ['!=', ['get', frequencyProperty], null], ['<', 16.65, ['get', frequencyProperty]], ['<', ['get', frequencyProperty], 16.75], ['==', ['get', voltageProperty], 15000]], color_15kv_16_7hz, + ['all', ['==', ['get', frequencyProperty], 60], ['==', ['get', voltageProperty], 12500]], color_12_5kv_60hz, + ['all', ['==', ['get', frequencyProperty], 25], ['==', ['get', voltageProperty], 12000]], color_12kv_25hz, + ['all', ['==', ['get', frequencyProperty], 0], ['!=', ['get', voltageProperty], null], ['>', ['get', voltageProperty], 3000]], color_gt3kv_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['==', ['get', voltageProperty], 3000]], color_3kv_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['!=', ['get', voltageProperty], null], ['>', 3000, ['get', voltageProperty]], ['>', ['get', voltageProperty], 1500]], color_gt1500v_lt3kv_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['==', ['get', voltageProperty], 1500]], color_1500v_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['!=', ['get', voltageProperty], null], ['>', 1500, ['get', voltageProperty]], ['>', ['get', voltageProperty], 1000]], color_gt1kv_lt1500v_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['==', ['get', voltageProperty], 1000]], color_1kv_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['!=', ['get', voltageProperty], null], ['>', 1000, ['get', voltageProperty]], ['>', ['get', voltageProperty], 750]], color_gt750v_lt1kv_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['==', ['get', voltageProperty], 750]], color_750v_dc, + ['all', ['==', ['get', frequencyProperty], 0], ['!=', ['get', voltageProperty], null], ['>', 750, ['get', voltageProperty]]], color_lt750v_dc, + ['all', + ['!=', ['get', frequencyProperty], 0], + ['!=', ['get', voltageProperty], null], + ['any', + ['>', ['get', voltageProperty], 25000], + ['all', ['!=', ['get', frequencyProperty], 50], ['!=', ['get', frequencyProperty], 60], ['>', ['get', voltageProperty], 25000]], + ], + ], color_gte25kv_ac, + ['all', + ['!=', ['get', frequencyProperty], 0], + ['!=', ['get', voltageProperty], null], + ['all', ['>', 25000, ['get', voltageProperty]], ['>', ['get', voltageProperty], 15000]] + ], color_gte15kv_lt25kv_ac, + ['all', + ['!=', ['get', frequencyProperty], 0], + ['!=', ['get', voltageProperty], null], + ['>', 15000, ['get', voltageProperty]], + ], color_lt15kv_ac, + ['any', + ['==', ['get', 'electrification_state'], 'deelectrified'], + ['==', ['get', 'electrification_state'], 'abandoned'], + ], color_delectrified, + ['any', + ['==', ['get', 'electrification_state'], 'no'], + ['==', ['get', 'electrification_state'], 'construction'], + ['==', ['get', 'electrification_state'], 'proposed'], + ], color_no, + 'gray', +]; + +const electrificationVoltageMaximumCurrentColor = (maximumCurrentProperty) => ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['!=', ['get', maximumCurrentProperty], null], turboColorMap(['get', maximumCurrentProperty], 300, 4400, 0.9), + ['any', + ['==', ['get', 'electrification_state'], 'deelectrified'], + ['==', ['get', 'electrification_state'], 'abandoned'], + ], color_delectrified, + ['any', + ['==', ['get', 'electrification_state'], 'no'], + ['==', ['get', 'electrification_state'], 'construction'], + ['==', ['get', 'electrification_state'], 'proposed'], + ], color_no, + 'gray', +]; + +const electrificationPowerColor = (voltageProperty, maximumCurrentProperty) => ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['all', + ['!=', ['get', voltageProperty], null], + ['!=', ['get', maximumCurrentProperty], null], + ], turboColorMap(['*', ['get', voltageProperty], ['get', maximumCurrentProperty]], 1_500_000, 45_000_000, 0.3), + ['any', + ['==', ['get', 'electrification_state'], 'deelectrified'], + ['==', ['get', 'electrification_state'], 'abandoned'], + ], color_delectrified, + ['any', + ['==', ['get', 'electrification_state'], 'no'], + ['==', ['get', 'electrification_state'], 'construction'], + ['==', ['get', 'electrification_state'], 'proposed'], + ], color_no, + 'gray', +]; + +const gauge_construction_dashes = [3, 3]; +const dual_construction_dashes = [1.5, 4.5]; +const multi_construction_dashes = [0, 1, 1, 4]; +const gauge_dual_gauge_dashes = [4.5, 4.5]; +const gauge_multi_gauge_dashes = [0, 3, 3, 3]; + +const color_gauge_0064 = '#006060'; +const color_gauge_0089 = '#008080'; +const color_gauge_0127 = '#00A0A0'; +const color_gauge_0184 = '#00C0C0'; +const color_gauge_0190 = '#00E0E0'; +const color_gauge_0260 = '#00FFFF'; +const color_gauge_0381 = '#80FFFF'; +const color_gauge_0500 = '#A0FFFF'; +const color_gauge_0597 = '#C0FFFF'; +const color_gauge_0600 = '#E0FFFF'; +const color_gauge_0610 = '#FFE0FF'; +const color_gauge_0700 = '#FFC0FF'; +const color_gauge_0750 = '#FFA0FF'; +const color_gauge_0760 = '#FF80FF'; +const color_gauge_0762 = '#FF60FF'; +const color_gauge_0785 = '#FF40FF'; +const color_gauge_0800 = '#FF00FF'; +const color_gauge_0891 = '#E000FF'; +const color_gauge_0900 = '#C000FF'; +const color_gauge_0914 = '#A000FF'; +const color_gauge_0950 = '#8000FF'; +const color_gauge_1000 = '#6000FF'; +const color_gauge_1009 = '#4000FF'; +const color_gauge_1050 = '#0000FF'; +const color_gauge_1067 = '#0000E0'; +const color_gauge_1100 = '#0000C0'; +const color_gauge_1200 = '#0000A0'; +const color_gauge_1372 = '#000080'; +const color_gauge_1422 = '#000060'; +const color_gauge_1432 = '#000040'; +const color_gauge_1435 = '#000000'; +const color_gauge_1440 = '#400000'; +const color_gauge_1445 = '#600000'; +const color_gauge_1450 = '#700000'; +const color_gauge_1458 = '#800000'; +const color_gauge_1495 = '#A00000'; +const color_gauge_1520 = '#C00000'; +const color_gauge_1522 = '#E00000'; +const color_gauge_1524 = '#FF0000'; +const color_gauge_1581 = '#FF6000'; +const color_gauge_1588 = '#FF8000'; +const color_gauge_1600 = '#FFA000'; +const color_gauge_1668 = '#FFC000'; +const color_gauge_1676 = '#FFE000'; +const color_gauge_1700 = '#FFFF00'; +const color_gauge_1800 = '#E0FF00'; +const color_gauge_1880 = '#C0FF00'; +const color_gauge_2000 = '#A0FF00'; +const color_gauge_miniature = '#80C0C0'; +const color_gauge_monorail = '#C0C080'; +const color_gauge_broad = '#FFC0C0'; +const color_gauge_narrow = '#C0C0FF'; +const color_gauge_standard = '#808080'; +const color_gauge_unknown = '#C0C0C0'; + +const gaugeColor = (gaugeProperty, gaugeIntProperty) => ['case', + ['boolean', ['feature-state', 'hover'], false], ['case', + ['all', ['!=', ['get', gaugeIntProperty], null], ['>=', 1450, ['get', gaugeIntProperty]], ['<=', ['get', gaugeIntProperty], 1524]], colors.hover.alternative, + colors.hover.main, + ], + // monorails or tracks with monorail gauge value + ['any', + ['==', ['get', 'feature'], 'monorail'], + ['all', + ['==', ['get', gaugeProperty], 'monorail'], + ['any', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'feature'], 'light_rail'], + ['==', ['get', 'feature'], 'subway'], + ['==', ['get', 'feature'], 'tram'], + ], + ], + ], color_gauge_monorail, + // other tracks with inaccurate gauge value + ['all', + ['==', ['get', gaugeProperty], 'standard'], + ['any', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'feature'], 'light_rail'], + ['==', ['get', 'feature'], 'subway'], + ['==', ['get', 'feature'], 'tram'], + ], + ], color_gauge_standard, + ['all', + ['==', ['get', gaugeProperty], 'broad'], + ['any', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'feature'], 'light_rail'], + ['==', ['get', 'feature'], 'subway'], + ['==', ['get', 'feature'], 'tram'], + ], + ], color_gauge_broad, + ['any', + ['all', + ['==', ['get', gaugeProperty], 'narrow'], + ['any', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'feature'], 'light_rail'], + ['==', ['get', 'feature'], 'subway'], + ['==', ['get', 'feature'], 'tram'], + ], + ], + ['all', + ['==', ['get', 'feature'], 'narrow_gauge'], + ['any', + ['==', ['get', gaugeProperty], 'narrow'], + ['==', ['get', gaugeProperty], 'broad'], + ['==', ['get', gaugeProperty], 'standard'], + ['==', ['get', gaugeProperty], 'unknown'], + ['==', ['get', gaugeProperty], null], + ], + ], + ], color_gauge_narrow, + // miniature tracks with inaccurate gauge value + ['all', + ['==', ['get', 'feature'], 'miniature'], + ['any', + ['==', ['get', gaugeProperty], 'narrow'], + ['==', ['get', gaugeProperty], 'broad'], + ['==', ['get', gaugeProperty], 'standard'], + ['==', ['get', gaugeProperty], 'unknown'], + ['==', ['get', gaugeProperty], null], + ], + ], color_gauge_miniature, + // unknown high numeric gauge values + ['all', ['!=', ['get', gaugeIntProperty], null], ['>=', ['get', gaugeIntProperty], 3000]], color_gauge_unknown, + // colors for numeric gauge values + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 88, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 63]], color_gauge_0064, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 127, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 88]], color_gauge_0089, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 184, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 127]], color_gauge_0127, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 190, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 184]], color_gauge_0184, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 260, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 190]], color_gauge_0190, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 380, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 260]], color_gauge_0260, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 500, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 380]], color_gauge_0381, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 597, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 500]], color_gauge_0500, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 600, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 597]], color_gauge_0597, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 609, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 600]], color_gauge_0600, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 700, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 609]], color_gauge_0610, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 750, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 700]], color_gauge_0700, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 760, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 750]], color_gauge_0750, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 762, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 760]], color_gauge_0760, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 785, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 762]], color_gauge_0762, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 800, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 785]], color_gauge_0785, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 891, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 800]], color_gauge_0800, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 900, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 891]], color_gauge_0891, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 914, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 900]], color_gauge_0900, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 950, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 914]], color_gauge_0914, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1000, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 950]], color_gauge_0950, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1009, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1000]], color_gauge_1000, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1050, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1009]], color_gauge_1009, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1066, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1050]], color_gauge_1050, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1100, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1066]], color_gauge_1067, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1200, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1100]], color_gauge_1100, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1372, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1200]], color_gauge_1200, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1422, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1372]], color_gauge_1372, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1432, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1422]], color_gauge_1422, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1435, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1432]], color_gauge_1432, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1440, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1435]], color_gauge_1435, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1445, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1440]], color_gauge_1440, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1450, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1445]], color_gauge_1445, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1458, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1450]], color_gauge_1450, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1495, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1458]], color_gauge_1458, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1520, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1495]], color_gauge_1495, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1522, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1520]], color_gauge_1520, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1524, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1522]], color_gauge_1522, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1581, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1524]], color_gauge_1524, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1588, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1581]], color_gauge_1581, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1600, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1588]], color_gauge_1588, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1668, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1600]], color_gauge_1600, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1672, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1668]], color_gauge_1668, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1700, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1672]], color_gauge_1676, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1800, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1700]], color_gauge_1700, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 1880, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1800]], color_gauge_1800, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 2000, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 1880]], color_gauge_1880, + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 3000, ['get', gaugeIntProperty]], ['>=', ['get', gaugeIntProperty], 2000]], color_gauge_2000, + // color for unknown low numeric gauge values + ['all', ['!=', ['get', gaugeIntProperty], null], ['>', 63, ['get', gaugeIntProperty]], ['>', ['get', gaugeIntProperty], 0]], color_gauge_unknown, + 'gray', +]; + +const loadingGaugeFillColor = ['match', ['get', 'loading_gauge'], + ...loading_gauges.loading_gauges.flatMap(loading_gauge => + [loading_gauge.value, loading_gauge.color] + ), + 'gray', +]; +const trackClassFillColor = ['match', ['get', 'track_class'], + ...track_classes.track_classes.flatMap(track_class => + [track_class.value, track_class.color] + ), + 'gray', +]; + +const sources = { + search: { + type: 'geojson', + data: { + type: 'FeatureCollection', + features: [], + }, + }, + route: { + type: 'geojson', + // Data will be updated with URL of route GeoJSON + data: { + type: 'FeatureCollection', + features: [], + } + }, + standard_railway_line_low: { + type: 'vector', + url: '/standard_railway_line_low', + }, + speed_railway_line_low: { + type: 'vector', + url: '/speed_railway_line_low', + }, + signals_railway_line_low: { + type: 'vector', + url: '/signals_railway_line_low', + }, + electrification_railway_line_low: { + type: 'vector', + url: '/electrification_railway_line_low', + }, + track_railway_line_low: { + type: 'vector', + url: '/track_railway_line_low', + }, + operator_railway_line_low: { + type: 'vector', + url: '/operator_railway_line_low', + }, + openrailwaymap_low: { + type: 'vector', + url: '/railway_line_high', + }, + standard_railway_text_stations_low: { + type: 'vector', + url: '/standard_railway_text_stations_low', + metadata: { + supports: ['language'], + }, + }, + standard_railway_text_stations_med: { + type: 'vector', + url: '/standard_railway_text_stations_med', + metadata: { + supports: ['language'], + }, + }, + high: { + type: 'vector', + url: '/railway_line_high,railway_text_km', + }, + openrailwaymap_standard: { + type: 'vector', + url: '/standard_railway_turntables,standard_railway_text_stations,standard_railway_grouped_stations,standard_railway_grouped_station_areas,standard_railway_symbols,standard_railway_switch_ref,standard_station_entrances,standard_railway_platforms,standard_railway_platform_edges,standard_railway_stop_positions', + metadata: { + supports: ['language'], + }, + }, + openrailwaymap_speed: { + type: 'vector', + url: '/speed_railway_signals', + }, + openrailwaymap_signals: { + type: 'vector', + url: '/signals_railway_signals,signals_signal_boxes', + }, + openrailwaymap_electrification: { + type: 'vector', + url: '/electrification_signals,electrification_catenary,electrification_railway_symbols,electrification_substation', + }, + openrailwaymap_operator: { + type: 'vector', + url: '/operator_railway_symbols', + }, + openhistoricalmap: { + type: 'vector', + tiles: ['https://vtiles.openhistoricalmap.org/maps/osm/{z}/{x}/{y}.pbf'], + attribution: 'OpenHistoricalMap', + }, + dem: { + type: 'raster-dem', + tiles: [ + // See https://registry.opendata.aws/terrain-tiles/ + 'https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png' + ], + attribution: 'Mapzen Terrain', + encoding: 'terrarium', + tileSize: 256, + maxzoom: 15, + }, +}; + +const searchResults = { + id: 'search', + type: 'circle', + source: 'search', + paint: { + 'circle-radius': 8, + 'circle-color': 'rgba(183, 255, 0, 0.7)', + 'circle-stroke-width': 2, + 'circle-stroke-color': 'black', + }, +}; + +const railwayLine = (text, layers) => [ + + // Tunnels + + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, states, sort}) => + Object.entries(states).map(([state, dash]) => ({ + id: `${id}_tunnel_casing_${state}`, + type: 'line', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], state], + ['==', ['get', 'tunnel'], true], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': dash ?? undefined, + }, + })) + ), + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, color, hoverColor, states, sort}) => [ + ...Object.entries(states).map(([state, dash]) => ({ + id: `${id}_tunnel_fill_${state}`, + type: 'line', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], state], + ['==', ['get', 'tunnel'], true], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + })), + ]), + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, states, sort}) => ({ + id: `${id}_tunnel_cover`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['any', ...Object.keys(states).map(state => + state === 'construction' ? ['all', ['global-state', 'showConstructionInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'proposed' ? ['all', ['global-state', 'showProposedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'abandoned' ? ['all', ['global-state', 'showAbandonedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'razed' ? ['all', ['global-state', 'showRazedInfrastructure'], ['==', ['get', 'state'], state]] + : ['==', ['get', 'state'], state]) + ], + ['==', ['get', 'tunnel'], true], + ['>=', + ['get', 'way_length'], + ['interpolate', ["exponential", .5], ['zoom'], + 8, 1500, + 16, 0 + ], + ], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.styles.standard.tunnelCover, + 'line-width': width, + }, + })), + ...layers.flatMap(({id, visibility, filter, color, states}) => + preferredDirectionLayer(`${id}_tunnel_preferred_direction`, + ['all', + ['==', ['get', 'tunnel'], true], + ['any', ...Object.keys(states).map(state => + state === 'construction' ? ['all', ['global-state', 'showConstructionInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'proposed' ? ['all', ['global-state', 'showProposedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'abandoned' ? ['all', ['global-state', 'showAbandonedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'razed' ? ['all', ['global-state', 'showRazedInfrastructure'], ['==', ['get', 'state'], state]] + : ['==', ['get', 'state'], state]) + ], + ['any', + ['==', ['get', 'preferred_direction'], 'forward'], + ['==', ['get', 'preferred_direction'], 'backward'], + ['==', ['get', 'preferred_direction'], 'both'], + ], + filter ?? true, + ].filter(it => it !== true), + color, + visibility, + ), + ), + + // Ground + + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, states, sort}) => + Object.entries(states).map(([state, dash]) => ({ + id: `${id}_casing_${state}`, + type: 'line', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], state], + ['!=', ['==', ['get', 'bridge'], true], true], + ['!=', ['get', 'tunnel'], true], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showAbandonedInfrastructure'] + : true, 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': dash ?? undefined, + }, + })) + ), + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, color, hoverColor, states, sort}) => [ + ...Object.entries(states).map(([state, dash]) => ({ + id: `${id}_fill_${state}`, + type: 'line', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], state], + ['!=', ['==', ['get', 'bridge'], true], true], + ['!=', ['get', 'tunnel'], true], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + })), + ]), + + // Bridges + + ...layers + .filter(({states}) => 'present' in states) + .flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, sort}) => [ + { + id: `${id}_bridge_railing`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], 'present'], + ['==', ['get', 'bridge'], true], + ['>=', + ['get', 'way_length'], + ['interpolate', ["exponential", .5], ['zoom'], + 8, 1500, + 16, 0 + ], + ], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.styles.standard.casing.bridge, + 'line-width': width, + 'line-gap-width': bridge_casing_add, + } + }, + { + id: `${id}_bridge_casing`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], 'present'], + ['==', ['get', 'bridge'], true], + ['>=', + ['get', 'way_length'], + ['interpolate', ["exponential", .5], ['zoom'], + 8, 1500, + 16, 0 + ], + ], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + } + }, + ]), + + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, width, color, hoverColor, states, sort}) => [ + ...Object.entries(states).map(([state, dash]) => ({ + id: `${id}_bridge_fill_${state}`, + type: 'line', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['==', ['get', 'state'], state], + ['==', ['get', 'bridge'], true], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + })), + ]), + + // Preferred direction + + ...layers.flatMap(({id, visibility, filter, color, states}) => + preferredDirectionLayer( + `${id}_preferred_direction`, + ['all', + ['any', ...Object.keys(states).map(state => + state === 'construction' ? ['all', ['global-state', 'showConstructionInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'proposed' ? ['all', ['global-state', 'showProposedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'abandoned' ? ['all', ['global-state', 'showAbandonedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'razed' ? ['all', ['global-state', 'showRazedInfrastructure'], ['==', ['get', 'state'], state]] + : ['==', ['get', 'state'], state]) + ], + ['!=', ['get', 'tunnel'], true], + ['any', + ['==', ['get', 'preferred_direction'], 'forward'], + ['==', ['get', 'preferred_direction'], 'backward'], + ['==', ['get', 'preferred_direction'], 'both'], + ], + filter ?? true, + ].filter(it => it !== true), + color, + visibility, + ), + ), + + // Text layers + + railwayKmText, + + ...layers.flatMap(({id, minzoom, maxzoom, source, sourceLayer, visibility, filter, states}) => ({ + id: `${id}_text`, + type: 'symbol', + minzoom, + maxzoom, + source, + 'source-layer': sourceLayer || 'railway_line_high', + filter: ['all', + ['any', ...Object.keys(states).map(state => + state === 'construction' ? ['all', ['global-state', 'showConstructionInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'proposed' ? ['all', ['global-state', 'showProposedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'abandoned' ? ['all', ['global-state', 'showAbandonedInfrastructure'], ['==', ['get', 'state'], state]] + : state === 'razed' ? ['all', ['global-state', 'showRazedInfrastructure'], ['==', ['get', 'state'], state]] + : ['==', ['get', 'state'], state]) + ], + filter ?? true, + ].filter(it => it !== true), + paint: { + 'text-color': colors.railwayLine.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'symbol-placement': 'line', + 'text-field': text, + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 5, + 'symbol-spacing': 200, + }, + })), +]; + + +const historicalRailwayLine = (text, layers) => [ + + // Tunnels + + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, sort, dash}) => [ + { + id: `${id}_tunnel_casing`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['==', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': abandoned_dasharray, + }, + }, + { + id: `${id}_tunnel_casing_historical`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['==', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': dash ?? undefined, + }, + } + ]), + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, color, hoverColor, sort, dash}) => [ + { + id: `${id}_tunnel_fill`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['==', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': abandoned_dasharray, + }, + }, + { + id: `${id}_tunnel_fill_historical`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['==', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + } + ]), + ...layers.map(({id, minzoom, maxzoom, filter, width, sort}) => ({ + id: `${id}_tunnel_cover`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['==', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['!', ['global-state', 'allDates']], + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.styles.standard.tunnelCover, + 'line-width': width, + }, + })), + + // Ground + + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, sort, dash}) => [ + { + id: `${id}_casing`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['!=', ['get', 'bridge'], 1], + ['!=', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': abandoned_dasharray, + }, + }, + { + id: `${id}_casing_historical`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['!=', ['get', 'bridge'], 1], + ['!=', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + 'line-dasharray': dash ?? undefined, + }, + } + ]), + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, color, hoverColor, sort, dash}) => [ + { + id: `${id}_fill`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['!=', ['get', 'bridge'], 1], + ['!=', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': abandoned_dasharray, + }, + }, + { + id: `${id}_fill_historical`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['!=', ['get', 'bridge'], 1], + ['!=', ['get', 'tunnel'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + }, + ]), + + // Bridges + + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, sort}) => [ + { + id: `${id}_bridge_railing`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + ['==', ['get', 'bridge'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['any', + ['global-state', 'allDates'], + ['<', ['global-state', 'date'], defaultDate], + ], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.styles.standard.casing.bridge, + 'line-width': width, + 'line-gap-width': bridge_casing_add, + } + }, + { + id: `${id}_bridge_casing`, + type: 'line', + minzoom: Math.max(minzoom, 8), + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + ['==', ['get', 'bridge'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['any', + ['global-state', 'allDates'], + ['<', ['global-state', 'date'], defaultDate], + ], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': colors.casing, + 'line-width': width, + 'line-gap-width': railway_casing_add, + } + }, + ]), + + ...layers.flatMap(({id, minzoom, maxzoom, filter, width, color, hoverColor, sort, dash}) => [ + { + id: `${id}_bridge_fill`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['==', ['get', 'bridge'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': 'butt', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': abandoned_dasharray, + }, + }, + { + id: `${id}_bridge_fill_historical`, + type: 'line', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ['==', ['get', 'bridge'], 1], + filter ?? true, + ].filter(it => it !== true), + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'line-join': 'round', + 'line-cap': dash ? 'butt' : 'round', + 'line-sort-key': sort, + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], hoverColor || colors.hover.main, + color, + ], + 'line-width': width, + 'line-dasharray': dash ?? undefined, + }, + } + ]), + + // Text layers + + ...layers.flatMap(({id, minzoom, maxzoom, filter}) => ({ + id: `${id}_text`, + type: 'symbol', + minzoom, + maxzoom, + source: 'openhistoricalmap', + 'source-layer': 'transport_lines', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + filter ?? true, + ].filter(it => it !== true), + paint: { + 'text-color': colors.railwayLine.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + ['all', + ['any', + ['global-state', 'allDates'], + ['<', ['global-state', 'date'], defaultDate], + ], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + 'symbol-z-order': 'source', + 'symbol-placement': 'line', + 'text-field': text, + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 5, + 'symbol-spacing': 400, + }, + })), +]; + +const railwayKmText = { + id: 'railway_text_km', + type: 'symbol', + minzoom: 10, + source: 'high', + 'source-layer': 'railway_text_km', + filter: ['step', ['zoom'], + ['get', 'zero'], + 13, + true, + ], + paint: { + 'text-color': colors.km.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'text-field': ['step', ['zoom'], + ['get', 'pos_int'], + 13, + ['get', 'pos'], + ], + 'text-font': ['Fira Code Bold'], + 'text-size': 11, + }, +}; + +const preferredDirectionLayer = (id, filter, color, visibility) => ({ + id, + type: 'symbol', + minzoom: 15, + source: 'high', + 'source-layer': 'railway_line_high', + filter, + paint: { + 'icon-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + color, + ], + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-width': 2.0, + }, + layout: { + 'visibility': ['case', + visibility ? ['==', visibility, false] : false, 'none', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-placement': 'line', + 'symbol-spacing': 750, + 'icon-overlap': 'always', + 'icon-image': ['match', ['get', 'preferred_direction'], + 'forward', 'sdf:general/line-direction', + 'backward', 'sdf:general/line-direction', + 'both', 'sdf:general/line-direction-both', + '', + ], + 'icon-rotate': ['match', ['get', 'preferred_direction'], + 'backward', 180, + 0, + ], + }, +}); + +const imageLayerWithOutline = (id, spriteExpression, layer) => [ + { + id: `${id}_outline`, + ...layer, + paint: { + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.iconHalo, + colors.iconHalo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + }, + layout: { + ...(layer.layout || {}), + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'icon-image': ['image', ['concat', 'sdf:', spriteExpression]], + }, + }, + { + id: `${id}_image`, + ...layer, + layout: { + ...(layer.layout || {}), + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'icon-image': ['image', spriteExpression], + }, + }, +] + +const hillshade = { + id: 'hillshade', + type: 'hillshade', + source: 'dem', + paint: { + 'hillshade-method': 'combined', + 'hillshade-exaggeration': ['interpolate', ['linear'], ['zoom'], + 8, 0.2, + 12, 0.4, + 15, 0.8, + ], + }, + layout: { + visibility: ['case', + ['global-state', 'hillshade'], 'visible', + 'none', + ], + } +} + +const route = { + id: 'route', + type: 'line', + source: 'route', + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + 'line-cap': 'round', + }, + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.route, + ], + 'line-width': 5, + }, +}; +const routeText = { + id: 'route_text', + type: 'symbol', + source: 'route', + paint: { + 'text-color': colors.railwayLine.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'symbol-placement': 'line', + 'text-field': ['coalesce', ['get', 'name'], ['get', 'ref'], ''], + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 5, + 'symbol-spacing': 200, + }, +} + +/** + * Strategy for displaying railway lines + * + * Variables: + * - state + * - feature + * - usage + * - service + * + * Display tools, configurable per zoom level + * - show/not show + * - line width + * - line color + * - line dashes + */ +const layers = { + + /** + * Date support: + * - When the global state 'allDates' is true, both historical and present data is shown + * - When the global state 'allDates' is false, and the global state 'date' is less than the default date, only historical data is shown + * - When the global state 'allDates' is false, and the global state 'date' is equal to the default date, only present data is shown + */ + standard: [ + hillshade, + { + id: 'historical_railway_landuse', + type: 'line', + minzoom: 11, + source: 'openhistoricalmap', + 'source-layer': 'landuse_areas', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + ['==', ['get', 'type'], 'railway'], + ['==', ['get', 'class'], 'landuse'], + ], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.styles.standard.main, + ], + 'line-opacity': 0.3, + 'line-width': 6, + 'line-dasharray': abandoned_dasharray, + }, + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'allDates'], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + }, + }, + { + id: 'historical_railway_landuse_historical', + type: 'line', + minzoom: 11, + source: 'openhistoricalmap', + 'source-layer': 'landuse_areas', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + ['==', ['get', 'type'], 'railway'], + ['==', ['get', 'class'], 'landuse'], + ], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.styles.standard.main, + ], + 'line-opacity': 0.3, + 'line-width': 6, + }, + layout: { + 'visibility': ['case', + ['all', + ['<', ['global-state', 'date'], defaultDate], + ['global-state', 'openHistoricalMap'], + ], 'visible', + 'none', + ], + }, + }, + { + id: 'railway_grouped_station_areas', + type: 'line', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_grouped_station_areas', + paint: { + 'line-color': colors.styles.standard.stationAreaGroup, + 'line-width': 2, + 'line-dasharray': [4, 4], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: 'railway_grouped_stations', + type: 'fill', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_grouped_stations', + filter: ['all', + ['!=', ['get', 'feature'], 'yard'], // Yards only have an outline + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', ['global-state', 'showAbandonedInfrastructure'], + 'razed', ['global-state', 'showRazedInfrastructure'], + true, + ], + ], + paint: { + 'fill-color': ['case', + ['in', ['get', 'state'], ['literal', ['disused', 'abandoned', 'preserved', 'razed']]], colors.styles.standard.past, + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], colors.styles.standard.future, + ['==', ['get', 'station'], 'light_rail'], colors.styles.standard.light_rail, + ['==', ['get', 'station'], 'subway'], colors.styles.standard.subway, + ['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorail, + ['==', ['get', 'station'], 'miniature'], colors.styles.standard.miniature, + ['==', ['get', 'station'], 'funicular'], colors.styles.standard.funicular, + ['==', ['get', 'station'], 'tram'], colors.styles.standard.tram, + colors.styles.standard.main, + ], + 'fill-opacity': ['case', + ['boolean', ['feature-state', 'hover'], false], 0.3, + 0.2, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + ...Object.entries({ + present: present_dasharray, + disused: disused_dasharray, + abandoned: abandoned_dasharray, + preserved: disused_dasharray, + construction: construction_dasharray, + proposed: proposed_dasharray, + }).map(([state, dasharray]) => ({ + id: `railway_grouped_stations_outline_${state}`, + type: 'line', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_grouped_stations', + filter: ['==', ['get', 'state'], state], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['==', ['get', 'feature'], 'yard'], colors.styles.standard.yardText, + // Use outline color of feature, without taking state into account + ['==', ['get', 'station'], 'light_rail'], colors.styles.standard.light_rail, + ['==', ['get', 'station'], 'subway'], colors.styles.standard.subway, + ['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorail, + ['==', ['get', 'station'], 'miniature'], colors.styles.standard.miniature, + ['==', ['get', 'station'], 'funicular'], colors.styles.standard.funicular, + ['==', ['get', 'station'], 'tram'], colors.styles.standard.tram, + colors.styles.standard.main, + ], + 'line-opacity': ['match', ['get', 'feature'], + 'yard', 0.2, + 0.3, + ], + 'line-width': ['match', ['get', 'feature'], + 'yard', 6, + 2, + ], + 'line-dasharray': dasharray, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + } + })), + ...historicalRailwayLine( + ['step', ['zoom'], + ['coalesce', ['get', 'ref'], ''], + 11, + ['coalesce', ['get', 'name'], ''], + ], + [ + { + id: 'railway_line_historical_miniature', + minzoom: 12, + filter: ['==', ['get', 'type'], 'miniature'], + color: colors.styles.standard.miniature, + width: 2, + }, + { + id: 'railway_line_historical_funicular', + minzoom: 12, + filter: ['==', ['get', 'type'], 'funicular'], + color: colors.styles.standard.funicular, + width: 2, + }, + { + id: 'railway_line_historical_disused', + minzoom: 11, + filter: ['==', ['get', 'type'], 'disused'], + color: colors.styles.standard.disused, + dash: disused_dasharray, + width: 1.5, + }, + { + id: 'railway_line_historical_abandoned', + minzoom: 11, + filter: ['==', ['get', 'type'], 'abandoned'], + color: colors.styles.standard.abandoned, + dash: abandoned_dasharray, + width: 1.5, + }, + { + id: 'railway_line_historical_construction', + minzoom: 10, + filter: ['==', ['get', 'type'], 'construction'], + color: colors.styles.standard.main, + dash: construction_dasharray, + width: 1.5, + visibility: ['global-state', 'showConstructionInfrastructure'], + }, + { + id: 'railway_line_historical_proposed', + minzoom: 10, + filter: ['==', ['get', 'type'], 'proposed'], + color: colors.styles.standard.main, + dash: proposed_dasharray, + width: 1.5, + visibility: ['global-state', 'showProposedInfrastructure'], + }, + { + id: 'railway_line_historical_narrow_gauge', + minzoom: 10, + filter: ['all', + ['==', ['get', 'type'], 'narrow_gauge'], + ['!', + // Covered by industrial case + ['==', ['get', 'usage'], 'industrial'], + ], + ], + color: colors.styles.standard.narrowGauge, + width: 2, + }, + { + id: 'railway_line_historical_service', + minzoom: 10, + filter: ['all', + ['==', ['get', 'type'], 'rail'], + ['==', ['get', 'usage'], null], + ], + color: ['match', ['get', 'service'], + 'spur', colors.styles.standard.spur, + 'siding', colors.styles.standard.siding, + 'yard', colors.styles.standard.yard, + 'crossover', colors.styles.standard.crossover, + colors.styles.standard.unknown, + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, ['match', ['get', 'service'], + 'yard', 1, + 1.5, + ], + 15, ['match', ['get', 'service'], + 'yard', 1, + 1.5, + ], + 16, 2, + ], + }, + { + id: 'railway_line_historical_light_rail', + minzoom: 9, + filter: ['any', + ['==', ['get', 'type'], 'subway'], + ['==', ['get', 'type'], 'tram'], + ['==', ['get', 'type'], 'light_rail'], + ['==', ['get', 'type'], 'monorail'], + ], + width: 2, + color: ['match', ['get', 'type'], + 'light_rail', colors.styles.standard.light_rail, + 'monorail', colors.styles.standard.monorail, + 'subway', colors.styles.standard.subway, + 'tram', colors.styles.standard.tram, + colors.styles.standard.unknown, + ], + }, + { + id: 'railway_line_historical_test_military', + minzoom: 9, + filter: ['all', + ['==', ['get', 'type'], 'rail'], + ['any', + ['==', ['get', 'usage'], 'test'], + ['==', ['get', 'usage'], 'military'], + ], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 1.5, + 14, 1.5, + 16, 2, + ], + color: ['match', ['get', 'usage'], + 'test', colors.styles.standard.test, + 'military', colors.styles.standard.military, + colors.styles.standard.unknown, + ], + }, + { + id: 'railway_line_historical_tourism', + minzoom: 9, + filter: ['any', + ['all', + ['==', ['get', 'type'], 'rail'], + ['==', ['get', 'usage'], 'tourism'], + ], + ['==', ['get', 'type'], 'preserved'], + ], + width: 2, + color: colors.styles.standard.tourism, + }, + { + id: 'railway_line_historical_industrial', + minzoom: 9, + filter: ['all', + ['==', ['get', 'usage'], 'industrial'], + ['any', + ['==', ['get', 'type'], 'rail'], + ['==', ['get', 'type'], 'narrow_gauge'], + ], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 1.5, + 14, 1.5, + 16, 2, + ], + color: colors.styles.standard.industrial, + }, + { + id: 'railway_line_historical_branch', + minzoom: 7, + filter: ['all', + ['==', ['get', 'type'], 'rail'], + ['==', ['get', 'usage'], 'branch'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 2, + 14, 2, + 16, 3, + ], + color: colors.styles.standard.branch, + }, + { + id: 'railway_line_historical_main', + minzoom: 5, + filter: ['all', + ['==', ['get', 'type'], 'rail'], + ['==', ['get', 'usage'], 'main'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 2, + 14, 2, + 16, 3, + ], + color: ['case', + ['==', ['get', 'highspeed'], 'yes'], colors.styles.standard.highspeed, + colors.styles.standard.main, + ], + hoverColor: ['case', + ['==', ['get', 'highspeed'], 'yes'], colors.hover.alternative, + colors.hover.main, + ], + }, + { + id: 'railway_line_historical_ferry', + minzoom: 5, + filter: ['all', + ['==', ['get', 'type'], 'ferry'], + ['==', ['get', 'railway'], 'ferry'], + ], + color: colors.styles.standard.ferry, + width: 2, + }, + ], + ), + { + id: 'railway_platforms_polygon', + type: 'fill', + minzoom: 15, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platforms', + filter: ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + paint: { + 'fill-color': colors.styles.standard.platform, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: 'railway_platforms_polygon_outline', + type: 'line', + minzoom: 15, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platforms', + filter: ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + }, + paint: { + 'line-width': 2, + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.styles.standard.platform, + ], + }, + }, + { + id: 'railway_platforms_line', + type: 'line', + minzoom: 15, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platforms', + filter: ['==', ["geometry-type"], 'LineString'], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.styles.standard.platform, + ], + 'line-width': ['interpolate', ['linear'], ['zoom'], + 15, 2, + 18, 6, + 20, 10, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: 'railway_platforms_edges', + type: 'line', + minzoom: 17, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platform_edges', + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'line-join': 'round', + }, + paint: { + 'line-width': 3, + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.styles.standard.track.halo, + ], + }, + }, + ...railwayLine( + ['step', ['zoom'], + ['coalesce', ['get', 'ref'], ''], + 14, + ['coalesce', ['get', 'standard_label'], ''], + ], + [ + { + id: 'railway_line_main_low', + minzoom: 0, + maxzoom: 7, + source: 'standard_railway_line_low', + sourceLayer: 'standard_railway_line_low', + states: { + present: undefined, + }, + filter: ['==', ['get', 'feature'], 'rail'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: ['case', + ['get', 'highspeed'], colors.styles.standard.highspeed, + colors.styles.standard.main, + ], + hoverColor: ['case', + ['get', 'highspeed'], colors.hover.alternative, + colors.hover.main, + ], + }, + { + id: 'railway_ferry_main_low', + minzoom: 0, + maxzoom: 7, + source: 'standard_railway_line_low', + sourceLayer: 'standard_railway_line_low', + states: { + present: undefined, + }, + filter: ['==', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: colors.styles.standard.ferry, + hoverColor: colors.hover.main, + }, + + // Medium zooms + // ensure that width interpolation matches low zooms + + { + id: 'railway_line_main_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'usage'], 'main'], + ], + width: 2, + color: ['case', + ['get', 'highspeed'], colors.styles.standard.highspeed, + colors.styles.standard.main, + ], + hoverColor: ['case', + ['get', 'highspeed'], colors.hover.alternative, + colors.hover.main, + ], + }, + { + id: 'railway_line_branch_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'usage'], 'branch'], + ], + width: 2, + color: colors.styles.standard.branch, + }, + { + id: 'railway_ferry_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['==', ['get', 'feature'], 'ferry'], + width: 2, + color: colors.styles.standard.ferry, + }, + + // High zooms + // ensure that width interpolation matches medium zooms + { + id: 'railway_line_razed', + minzoom: 12, + source: 'high', + states: { + razed: razed_dasharray, + }, + filter: ['==', ['get', 'state'], 'razed'], + width: 2, + color: colors.styles.standard.razed, + }, + { + id: 'railway_line_abandoned', + minzoom: 12, + source: 'high', + states: { + abandoned: abandoned_dasharray, + }, + filter: ['==', ['get', 'state'], 'abandoned'], + width: 2, + color: colors.styles.standard.abandoned, + }, + { + id: 'railway_line_miniature', + minzoom: 12, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['==', ['get', 'feature'], 'miniature'], + width: 2, + color: colors.styles.standard.miniature, + }, + { + id: 'railway_line_funicular', + minzoom: 12, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['==', ['get', 'feature'], 'funicular'], + width: 2, + color: colors.styles.standard.funicular, + }, + { + id: 'railway_line_disused', + minzoom: 11, + source: 'high', + states: { + disused: disused_dasharray, + }, + width: 1.5, + color: colors.styles.standard.disused, + }, + { + id: 'railway_line_narrow_gauge', + minzoom: 10, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'narrow_gauge'], + ['!', + // Covered by industrial case + ['==', ['get', 'usage'], 'industrial'], + ], + ], + width: 2, + color: colors.styles.standard.narrowGauge, + }, + { + id: 'railway_line_service', + minzoom: 10, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'usage'], null], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, ['match', ['get', 'service'], + 'yard', 1, + 1.5, + ], + 15, ['match', ['get', 'service'], + 'yard', 1, + 1.5, + ], + 16, 2, + ], + color: ['match', ['get', 'service'], + 'spur', colors.styles.standard.spur, + 'siding', colors.styles.standard.siding, + 'yard', colors.styles.standard.yard, + 'crossover', colors.styles.standard.crossover, + colors.styles.standard.unknown, + ], + }, + { + id: 'railway_line_light_rail', + minzoom: 9, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['any', + ['==', ['get', 'feature'], 'subway'], + ['==', ['get', 'feature'], 'tram'], + ['==', ['get', 'feature'], 'light_rail'], + ['==', ['get', 'feature'], 'monorail'], + ], + width: 2, + color: ['match', ['get', 'feature'], + 'light_rail', colors.styles.standard.light_rail, + 'monorail', colors.styles.standard.monorail, + 'subway', colors.styles.standard.subway, + 'tram', colors.styles.standard.tram, + colors.styles.standard.unknown, + ], + }, + { + id: 'railway_line_test_military', + minzoom: 9, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['any', + ['==', ['get', 'usage'], 'test'], + ['==', ['get', 'usage'], 'military'], + ], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 1.5, + 14, 1.5, + 16, 2, + ], + color: ['match', ['get', 'usage'], + 'test', colors.styles.standard.test, + 'military', colors.styles.standard.military, + colors.styles.standard.unknown, + ], + }, + { + id: 'railway_line_tourism', + minzoom: 9, + source: 'high', + states: { + present: undefined, + preserved: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['any', + ['==', ['get', 'usage'], 'tourism'], + ['==', ['get', 'state'], 'preserved'], + ], + width: 2, + color: colors.styles.standard.tourism, + }, + { + id: 'railway_line_industrial', + minzoom: 9, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'usage'], 'industrial'], + ['any', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'feature'], 'narrow_gauge'], + ], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 1.5, + 14, 1.5, + 16, 2, + ], + color: colors.styles.standard.industrial, + }, + { + id: 'railway_ferry_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['==', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 2, + 14, 2, + 16, 3, + ], + color: colors.styles.standard.ferry, + }, + { + id: 'railway_line_branch_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'usage'], 'branch'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 2, + 14, 2, + 16, 3, + ], + color: colors.styles.standard.branch, + }, + { + id: 'railway_line_main_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['all', + ['==', ['get', 'feature'], 'rail'], + ['==', ['get', 'usage'], 'main'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 8, 2, + 14, 2, + 16, 3, + ], + color: ['case', + ['get', 'highspeed'], colors.styles.standard.highspeed, + colors.styles.standard.main, + ], + hoverColor: ['case', + ['get', 'highspeed'], colors.hover.alternative, + colors.hover.main, + ], + }, + ], + ), + route, + routeText, + { + id: 'railway_text_stations_low1', + type: 'symbol', + minzoom: 4, + maxzoom: 5, + source: 'standard_railway_text_stations_low', + 'source-layer': 'standard_railway_text_stations_low', + paint: { + 'icon-color': colors.styles.standard.stationsText, + 'icon-halo-width': 1, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-image': 'sdf:general/station-small', + 'icon-overlap': 'always', + }, + }, + { + id: 'railway_text_stations_low2', + type: 'symbol', + minzoom: 5, + maxzoom: 7, + source: 'standard_railway_text_stations_low', + 'source-layer': 'standard_railway_text_stations_low', + paint: { + 'text-color': colors.styles.standard.stationsText, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + 'icon-color': colors.styles.standard.stationsText, + 'icon-halo-width': 1.5, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['get', 'station_size']]], + 'icon-overlap': 'always', + 'text-field': ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_text_stations_med', + type: 'symbol', + minzoom: 7, + maxzoom: 8, + source: 'standard_railway_text_stations_med', + 'source-layer': 'standard_railway_text_stations_med', + paint: { + 'text-color': colors.styles.standard.stationsText, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + 'icon-color': colors.styles.standard.stationsText, + 'icon-halo-width': 2, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['get', 'station_size']]], + 'icon-overlap': 'always', + 'text-field': ['match', ['get', 'station_size'], + 'small', '', + ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + ], + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_turntables_fill', + type: 'fill', + minzoom: 10, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_turntables', + paint: { + 'fill-color': colors.styles.standard.turntable.fill, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: 'railway_turntables_casing', + type: 'line', + minzoom: 15, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_turntables', + paint: { + 'line-color': colors.styles.standard.turntable.casing, + 'line-width': turntable_casing_width, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: 'railway_stop_positions', + type: 'circle', + minzoom: 16, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_stop_positions', + paint: { + 'circle-radius': ['interpolate', ['linear'], ['zoom'], + 16, 2, + 19, 5, + ], + 'circle-color': ['match', ['get', 'type'], + 'train', colors.styles.standard.main, + 'tram', colors.styles.standard.tram, + 'light_rail', colors.styles.standard.light_rail, + 'subway', colors.styles.standard.subway, + 'funicular', colors.styles.standard.funicular, + 'monorail', colors.styles.standard.monorail, + 'miniature', colors.styles.standard.miniature, + colors.styles.standard.unknown, + ], + 'circle-stroke-width': 2, + 'circle-stroke-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + }, + }, + { + id: `railway_symbols_colored`, + type: 'symbol', + minzoom: 12, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_symbols', + paint: { + 'icon-color': colors.styles.standard.symbols, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + 'text-color': colors.styles.standard.symbols, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': ['concat', 'sdf:', ['get', 'feature']], + 'text-field': ['coalesce', ['get', 'ref'], ''], + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 15, + 'text-offset': [0, 1.5], + 'text-optional': true, + }, + }, + ...imageLayerWithOutline( + `railway_symbols_outline`, + ['get', 'feature'], + { + type: 'symbol', + minzoom: 12, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_symbols', + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + }, + }, + ), + { + id: 'railway_platforms_polygon_text', + type: 'symbol', + minzoom: 17, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platforms', + filter: ['all', + ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + ['!=', ["get", "name"], null], + ], + paint: { + 'text-color': colors.styles.standard.defaultText, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'text-field': '{name}', + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 10, + }, + }, + { + id: 'railway_platforms_line_text', + type: 'symbol', + minzoom: 17, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platforms', + filter: ['==', ["geometry-type"], 'LineString'], + paint: { + 'text-color': colors.styles.standard.defaultText, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'text-field': '{name}', + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 10, + 'symbol-placement': 'line', + }, + }, + { + id: 'standard_railway_platform_edges_text', + type: 'symbol', + minzoom: 17, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_platform_edges', + filter: ['!=', ['get', 'ref'], null], + paint: { + 'text-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.styles.standard.track.hover, + colors.styles.standard.track.text, + ], + 'text-halo-color': colors.styles.standard.track.halo, + 'text-halo-width': 4, + 'text-halo-blur': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-placement': 'line', + 'text-field': '{ref}', + 'text-font': font.bold, + 'text-size': 10, + 'text-padding': 10, + }, + }, + { + id: 'standard_station_entrances', + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_station_entrances', + paint: { + 'icon-color': colors.styles.standard.subway, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + 'text-color': colors.styles.standard.subway, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': 'sdf:general/subway-entrance', + 'text-field': '{label}', + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 15, + 'text-offset': [0, 1.5], + 'text-optional': true, + }, + }, + { + id: 'railway_text_track_numbers', + type: 'symbol', + minzoom: 16, + source: 'high', + 'source-layer': 'railway_line_high', + filter: ['all', + ['!=', ['get', 'track_ref'], null], + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', ['global-state', 'showAbandonedInfrastructure'], + 'razed', ['global-state', 'showRazedInfrastructure'], + true, + ], + ], + paint: { + 'text-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.styles.standard.track.hover, + colors.styles.standard.track.text, + ], + 'text-halo-color': colors.styles.standard.track.halo, + 'text-halo-width': 4, + 'text-halo-blur': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'symbol-placement': 'line', + 'text-field': '{track_ref}', + 'text-font': font.bold, + 'text-size': 10, + 'text-padding': 10, + }, + }, + { + id: `railway_switch`, + type: 'symbol', + minzoom: 17, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_switch_ref', + paint: { + 'icon-color': ['case', + ['get', 'local_operated'], colors.styles.standard.switch.localOperated, + ['get', 'resetting'], colors.styles.standard.switch.resetting, + colors.styles.standard.switch.default, + ], + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + 'text-color': ['case', + ['get', 'local_operated'], colors.styles.standard.switch.localOperated, + ['get', 'local_operated'], colors.styles.standard.switch.resetting, + colors.styles.standard.switch.default, + ], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'icon-overlap': 'always', + 'icon-image': ['image', + ['match', ['get', 'railway'], + 'switch', ['match', ['get', 'type'], + 'double_slip', 'sdf:general/switch-double-slip', + 'single_slip', 'sdf:general/switch-single-slip', + 'wye', 'sdf:general/switch-wye', + 'three_way', 'sdf:general/switch-three-way', + 'four_way', 'sdf:general/switch-four-way', + 'abt', 'sdf:general/switch-abt', + ['match', ['get', 'turnout_side'], + 'left', 'sdf:general/switch-default-left', + 'right', 'sdf:general/switch-default-right', + 'sdf:general/switch-default', + ], + ], + 'railway_crossing', 'sdf:general/railway-crossing', + 'sdf:general/switch-default', + ], + ], + 'symbol-z-order': 'source', + 'text-field': ['coalesce', ['get', 'ref'], ''], + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 15, + 'text-offset': [0, 1.5], + 'text-optional': true, + }, + }, + { + id: 'railway_text_stations', + type: 'symbol', + minzoom: 8, + maxzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_text_stations', + filter: ['step', ['zoom'], + ['all', + ['==', ['get', 'state'], 'present'], + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'yard'], + ], + ['!=', ['get', 'station'], 'light_rail'], + ['!=', ['get', 'station'], 'subway'], + ['!=', ['get', 'station'], 'monorail'], + ['!=', ['get', 'station'], 'funicular'], + ], + 9, + ['all', + ['==', ['get', 'state'], 'present'], + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'yard'], + ['==', ['get', 'feature'], 'halt'], + ], + ['!=', ['get', 'station'], 'light_rail'], + ['!=', ['get', 'station'], 'tram'], + ['!=', ['get', 'station'], 'subway'], + ['!=', ['get', 'station'], 'monorail'], + ['!=', ['get', 'station'], 'funicular'], + ], + 10, + ['all', + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'disused', false, + 'abandoned', false, + true, + ], + ['!=', ['get', 'station'], 'tram'], + ['!=', ['get', 'station'], 'funicular'], + ['!=', ['get', 'station'], 'miniature'], + ], + 11, + ['all', + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', false, + true, + ], + ['!=', ['get', 'station'], 'funicular'], + ['!=', ['get', 'station'], 'miniature'], + ], + 12, + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', ['global-state', 'showAbandonedInfrastructure'], + 'razed', ['global-state', 'showRazedInfrastructure'], + true, + ], + ], + paint: { + 'text-color': ['case', + ['==', ['get', 'feature'], 'yard'], colors.styles.standard.yardText, + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'halt'], + ['==', ['get', 'feature'], 'tram_stop'], + ], ['case', + ['==', ['get', 'station'], 'light_rail'], colors.styles.standard.lightRailText, + ['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorailText, + ['==', ['get', 'station'], 'tram'], colors.styles.standard.tramStopText, + ['==', ['get', 'station'], 'miniature'], colors.styles.standard.miniatureText, + ['==', ['get', 'station'], 'funicular'], colors.styles.standard.funicularText, + colors.styles.standard.stationsText, + ], + colors.styles.standard.defaultText, + ], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + 'icon-color': ['case', + ['==', ['get', 'feature'], 'yard'], colors.styles.standard.yardText, + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'halt'], + ['==', ['get', 'feature'], 'tram_stop'], + ], ['case', + ['==', ['get', 'station'], 'light_rail'], colors.styles.standard.lightRailText, + ['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorailText, + ['==', ['get', 'station'], 'tram'], colors.styles.standard.tramStopText, + ['==', ['get', 'station'], 'miniature'], colors.styles.standard.miniatureText, + ['==', ['get', 'station'], 'funicular'], colors.styles.standard.funicularText, + colors.styles.standard.stationsText, + ], + colors.styles.standard.defaultText, + ], + 'icon-halo-width': 1.5, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['case', + ['in', ['get', 'state'], ['literal', ['disused', 'abandoned', 'preserved', 'razed']]], 'past', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], 'future', + ['get', 'station_size'], + ]]], + 'icon-overlap': 'always', + 'text-field': ['step', ['zoom'], + ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + 10, + ['get', 'localized_name'], + 12, + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + ], + 'text-font': ['case', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], ['literal', font.italic], + ['literal', font.bold], + ], + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_text_stations_high', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_text_stations', + filter: ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', ['global-state', 'showAbandonedInfrastructure'], + 'razed', ['global-state', 'showRazedInfrastructure'], + true, + ], + paint: { + 'text-color': ['case', + ['==', ['get', 'feature'], 'yard'], colors.styles.standard.yardText, + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'halt'], + ['==', ['get', 'feature'], 'tram_stop'], + ], ['case', + ['==', ['get', 'station'], 'light_rail'], colors.styles.standard.lightRailText, + ['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorailText, + ['==', ['get', 'station'], 'miniature'], colors.styles.standard.miniatureText, + ['==', ['get', 'station'], 'funicular'], colors.styles.standard.funicularText, + ['==', ['get', 'station'], 'tram'], colors.styles.standard.tramStopText, + colors.styles.standard.stationsText, + ], + colors.styles.standard.defaultText, + ], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'visibility': ['case', + ['<', ['global-state', 'date'], defaultDate], 'none', + 'visible', + ], + 'symbol-z-order': 'source', + 'text-field': ['step', ['zoom'], + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + 15, + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['>', ['coalesce', ['get', 'count'], 0], 1], ['concat', ' (', ['get', 'count'], ')'], + '', + ], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + ], + 'text-font': ['case', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], ['literal', font.italic], + ['literal', font.bold], + ], + 'text-variable-anchor': ['center', 'top', 'bottom', 'left', 'right'], + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + }, + }, + { + id: 'historical_stations', + type: 'symbol', + minzoom: 12, + source: 'openhistoricalmap', + 'source-layer': 'transport_points_centroids', + filter: ['all', + ['any', + ['global-state', 'allDates'], + ['all', + ['<=', ['coalesce', ['get', 'start_decdate'], 0.0], ['global-state', 'date']], + ['<=', ['global-state', 'date'], ['coalesce', ['get', 'end_decdate'], 9999.0]], + ], + ], + ['==', ['get', 'class'], 'railway'], + ['in', ['get', 'type'], ['literal', ['station', 'halt']]], + ], + paint: { + 'text-color': ['case', + ['==', ['get', 'type'], 'halt'], colors.styles.standard.tramStopText, + colors.styles.standard.stationsText, + ], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + 'icon-color': ['case', + ['==', ['get', 'type'], 'halt'], colors.styles.standard.tramStopText, + colors.styles.standard.stationsText, + ], + 'icon-halo-width': 1, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'visibility': ['case', + ['all', + ['global-state', 'openHistoricalMap'], + ['any', + ['global-state', 'allDates'], + ['<', ['global-state', 'date'], defaultDate], + ], + ], 'visible', + 'none', + ], + 'symbol-z-order': 'source', + 'icon-image': ['case', + ['global-state', 'allDates'], 'sdf:general/station-past', + 'sdf:general/station-small', + ], + 'icon-overlap': 'always', + 'text-field': '{name}', + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 5, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + searchResults, + ], + + speed: [ + hillshade, + ...railwayLine( + ['coalesce', ['get', 'speed_label'], ''], + [ + { + id: 'speed_low', + minzoom: 0, + maxzoom: 7, + source: 'speed_railway_line_low', + sourceLayer: 'speed_railway_line_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: speedColor, + hoverColor: speedHoverColor, + }, + { + id: 'speed_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: 2, + color: speedColor, + hoverColor: speedHoverColor, + }, + { + id: 'speed_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + disused: disused_dasharray, + preserved: disused_dasharray, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: speedColor, + hoverColor: speedHoverColor, + }, + ], + ), + route, + routeText, + { + id: 'speed_railway_signal_direction', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_speed', + 'source-layer': 'speed_railway_signals', + filter: ['step', ['zoom'], + ['all', + ['!=', ['get', 'feature0'], null], + ['!=', ['get', 'azimuth'], null], + ['==', ['get', 'type'], 'line'], + ], + 14, + ['all', + ['!=', ['get', 'feature0'], null], + ['!=', ['get', 'azimuth'], null], + ['any', + ['==', ['get', 'type'], 'line'], + ['==', ['get', 'type'], 'tram'], + ] + ], + 16, + ['all', + ['!=', ['get', 'feature0'], null], + ['!=', ['get', 'azimuth'], null], + ], + ], + paint: { + 'icon-color': colors.signals.direction, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-width': 2.0, + 'icon-halo-blur': 1.0, + 'icon-opacity': ['interpolate', ['linear'], ['zoom'], + 15, 0.85, + 16, 0.7, + ], + }, + layout: { + 'icon-overlap': 'always', + 'icon-image': ["step", ["zoom"], + ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-both', + 'sdf:general/signal-direction', + ], + 16, ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-large-both', + 'sdf:general/signal-direction-large', + ], + ], + 'icon-anchor': ['case', + ['coalesce', ['get', 'direction_both'], false], 'center', + 'top', + ], + 'icon-rotate': ['get', 'azimuth'], + 'icon-keep-upright': true, + 'icon-rotation-alignment': 'map', + }, + }, + ...[0, 1].flatMap(featureIndex => [ + ...imageLayerWithOutline( + `speed_railway_signals_${featureIndex}`, + ['get', `feature${featureIndex}`], + { + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_speed', + 'source-layer': 'speed_railway_signals', + filter: ['step', ['zoom'], + ['all', + ['!=', ['get', `feature${featureIndex}`], null], + ['==', ['get', 'type'], 'line'], + ], + 14, + ['all', + ['!=', ['get', `feature${featureIndex}`], null], + ['any', + ['==', ['get', 'type'], 'line'], + ['==', ['get', 'type'], 'tram'], + ] + ], + 16, + ['!=', ['get', `feature${featureIndex}`], null], + ], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-offset': featureIndex === 0 + ? ['literal', [0, 0]] + : ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', ['get', `offset${featureIndex}`], 2 * featureIndex], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + }, + }, + ), + { + id: `speed_railway_signals_deactivated_${featureIndex}`, + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_speed', + 'source-layer': 'speed_railway_signals', + filter: ['==', ['get', `deactivated${featureIndex}`], true], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': 'general/signal-deactivated', + 'icon-offset': featureIndex === 0 + ? ['literal', [0, 0]] + : ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', ['get', `offset${featureIndex}`], 2 * featureIndex], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + } + }, + ]), + { + id: `speed_railway_signals_text`, + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_speed', + 'source-layer': 'speed_railway_signals', + filter: ['any', + ['!=', ['get', 'ref'], null], + ['!=', ['get', 'caption'], null], + ], + paint: { + 'text-color': colors.text.main, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo + ], + 'text-halo-width': 1.5, + 'text-halo-blur': 1, + }, + layout: { + 'text-field': ['format', + ['get', 'ref'], {}, + ['case', ['all', ['!=', ['get', 'ref'], null], ['!=', ['get', 'caption'], null]], '\n', ''], {}, + ['case', ['==', ['get', 'caption'], null], '', ['get', 'caption']], {'text-font': ['literal', font.italic]}, + ], + 'text-font': font.regular, + 'text-size': 9, + 'text-anchor': 'top', + 'text-offset': ['interpolate', ['linear'], + // 2 pixel spacing under icon + ['/', ['+', ['get', 'offset0'], 2], 9], + 0, ['literal', [0, 0]], + 20, ['literal', [0, 20]], + ], + }, + }, + searchResults, + ], + + signals: [ + hillshade, + ...railwayLine( + '', + [ + { + id: 'railway_line_low', + minzoom: 0, + maxzoom: 7, + source: 'signals_railway_line_low', + sourceLayer: 'signals_railway_line_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + sort: ['get', 'train_protection_rank'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: trainProtectionColor('train_protection'), + }, + { + id: 'railway_line_low_construction', + minzoom: 0, + maxzoom: 7, + source: 'signals_railway_line_low', + sourceLayer: 'signals_railway_line_low', + states: { + present: train_protection_construction_dasharray, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['!=', null, ['get', 'train_protection_construction']], + ], + sort: ['get', 'train_protection_construction_rank'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: trainProtectionColor('train_protection_construction'), + }, + { + id: 'railway_line_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + sort: ['get', 'train_protection_rank'], + width: 2, + color: trainProtectionColor('train_protection'), + }, + { + id: 'railway_line_med_construction', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: train_protection_construction_dasharray, + construction: train_protection_construction_dasharray, + proposed: train_protection_construction_dasharray, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['!=', null, ['get', 'train_protection_construction']], + ], + sort: ['get', 'train_protection_construction_rank'], + width: 2, + color: trainProtectionColor('train_protection_construction'), + }, + { + id: 'railway_line_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + disused: disused_dasharray, + preserved: disused_dasharray, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + sort: ['get', 'train_protection_rank'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: trainProtectionColor('train_protection'), + }, + { + id: 'railway_line_high_construction', + minzoom: 8, + source: 'high', + states: { + present: train_protection_construction_dasharray, + construction: train_protection_construction_dasharray, + proposed: train_protection_construction_dasharray, + disused: train_protection_construction_dasharray, + preserved: train_protection_construction_dasharray, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['!=', null, ['get', 'train_protection_construction']], + ], + sort: ['get', 'train_protection_construction_rank'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: trainProtectionColor('train_protection_construction'), + }, + ], + ), + route, + routeText, + { + id: 'signal_boxes_point', + type: 'circle', + minzoom: 10, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['==', ["geometry-type"], 'Point'], + paint: { + 'circle-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + '#008206', + ], + 'circle-radius': 4, + 'circle-stroke-color': 'white', + 'circle-stroke-width': 1, + }, + }, + { + id: 'signal_boxes_polygon', + type: 'fill', + minzoom: 14, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + paint: { + 'fill-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + '#008206', + ], + 'fill-outline-color': 'white', + }, + }, + { + id: 'signal_boxes_polygon_outline', + type: 'line', + minzoom: 14, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + paint: { + 'line-color': 'white', + 'line-width': 1, + }, + }, + { + id: 'railway_signals_direction', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['step', ['zoom'], + ['all', + ['==', ['get', 'railway'], 'signal'], + ['!=', ['get', 'azimuth'], null], + ['!=', ['get', 'feature0'], ''], + ], + 13, + ['all', + ['!=', ['get', 'azimuth'], null], + ['!=', ['get', 'feature0'], ''], + ], + ], + paint: { + 'icon-color': colors.signals.direction, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-width': 2.0, + 'icon-halo-blur': 1.0, + 'icon-opacity': ['interpolate', ['linear'], ['zoom'], + 15, 0.85, + 16, 0.7, + ], + }, + layout: { + 'icon-overlap': 'always', + 'icon-image': ["step", ["zoom"], + ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-both', + 'sdf:general/signal-direction', + ], + 16, ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-large-both', + 'sdf:general/signal-direction-large', + ], + ], + 'icon-anchor': ['case', + ['coalesce', ['get', 'direction_both'], false], 'center', + 'top', + ], + 'icon-rotate': ['get', 'azimuth'], + 'icon-keep-upright': true, + 'icon-rotation-alignment': 'map', + }, + }, + // Show at most 2 combined features + ...[0, 1].flatMap(featureIndex => [ + ...imageLayerWithOutline( + `railway_signals_medium_${featureIndex}`, + ['get', `feature${featureIndex}`], + { + type: 'symbol', + minzoom: 13, + maxzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['all', + ['==', ['get', 'railway'], 'signal'], + ['!=', ['get', `feature${featureIndex}`], null], + ], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-offset': featureIndex === 0 + ? ['literal', [0, 0]] + : ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', ['get', `offset${featureIndex}`], 2 * featureIndex], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + }, + }, + ), + { + id: `railway_signals_medium_deactivated_${featureIndex}`, + type: 'symbol', + minzoom: 13, + maxzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['==', ['get', `deactivated${featureIndex}`], true], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': 'general/signal-deactivated', + 'icon-offset': featureIndex === 0 + ? ['literal', [0, 0]] + : ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', ['get', `offset${featureIndex}`], 2 * featureIndex], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + } + }, + ]), + { + id: 'railway_signals_high_derail_buffer_stop', + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['in', ['get', 'railway'], ['literal', ['derail', 'buffer_stop']]], + paint: { + 'icon-color': colors.styles.signals.bufferStopDerailer, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-width': 1, + }, + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': ['case', + ['==', ['get', 'railway'], 'derail'], 'sdf:general/derail', + ['==', ['get', 'railway'], 'buffer_stop'], 'sdf:general/buffer_stop-signal', + '' + ], + 'icon-rotate': ['get', 'azimuth'], + 'icon-keep-upright': true, + 'icon-rotation-alignment': 'map', + }, + }, + ...[0, 1, 2, 3, 4, 5].flatMap(featureIndex => [ + ...imageLayerWithOutline( + `railway_signals_high_${featureIndex}`, + ['get', `feature${featureIndex}`], + { + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['!=', ['get', `feature${featureIndex}`], null], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-anchor': 'center', + 'icon-offset': ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', + featureIndex === 0 ? 0 : ['get', `offset${featureIndex}`], + ['case', + ['in', ['get', 'railway'], ['literal', ['derail', 'buffer_stop']]], 16, + 0 + ], + 2 * featureIndex + ], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + }, + }, + ), + { + id: `railway_signals_high_deactivated_${featureIndex}`, + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['==', ['get', `deactivated${featureIndex}`], true], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': 'general/signal-deactivated', + 'icon-offset': featureIndex === 0 + ? ['literal', [0, 0]] + : ['interpolate', ['linear'], + // Gap of 2 pixels for halo and spacing + ['+', ['get', `offset${featureIndex}`], 2 * featureIndex], + 0, ['literal', [0, 0]], + 1000, ['literal', [0, -1000]], + ], + } + }, + ]), + { + id: `railway_signals_high_text`, + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_railway_signals', + filter: ['all', + ['any', + ['!=', ['get', 'ref'], null], + ['!=', ['get', 'caption'], null], + ], + ['!=', ['get', 'feature0'], null], + ], + paint: { + 'text-color': colors.text.main, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo + ], + 'text-halo-width': 1.5, + 'text-halo-blur': 1, + }, + layout: { + 'symbol-z-order': 'source', + 'text-field': ['format', + ['get', 'ref'], {}, + ['case', ['all', ['!=', ['get', 'ref'], null], ['!=', ['get', 'caption'], null]], '\n', ''], {}, + ['case', ['==', ['get', 'caption'], null], '', ['get', 'caption']], {'text-font': ['literal', font.italic]}, + ], + 'text-font': font.regular, + 'text-size': 9, + 'text-anchor': 'top', + 'text-offset': ['interpolate', ['linear'], + // 2 pixel spacing under icon + ['/', ['+', ['get', 'offset0'], 2], 9], + 0, ['literal', [0, 0]], + 20, ['literal', [0, 20]], + ], + }, + }, + { + id: 'signal_boxes_text_medium', + type: 'symbol', + minzoom: 12, + maxzoom: 15, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['!=', ['get', 'ref'], null], + paint: { + 'text-color': colors.styles.standard.signalBox.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.styles.standard.signalBox.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'text-field': '{ref}', + 'text-font': font.bold, + 'text-size': 11, + 'text-offset': ['literal', [0, 1]], + } + }, + { + id: 'signal_boxes_text_high', + type: 'symbol', + minzoom: 15, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['any', + ['!=', ['get', 'name'], null], + ['!=', ['get', 'ref'], null], + ], + paint: { + 'text-color': colors.styles.standard.signalBox.text, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.styles.standard.signalBox.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'text-field': ['coalesce', ['get', 'name'], ['get', 'ref'], ''], + 'text-font': font.bold, + 'text-size': 11, + } + }, + searchResults, + ], + + electrification: [ + hillshade, + ...railwayLine( + ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', ['case', + ['!=', ['get', 'maximum_current'], null], ['concat', ['number-format', ['get', 'maximum_current'], {}], ' A'], + '', + ], + 'power', ['case', + ['all', + ['!=', ['get', 'voltage'], null], + ['!=', ['get', 'maximum_current'], null], + ], ['concat', ['number-format', ['*', ['get', 'voltage'], ['get', 'maximum_current'], 0.000001], {'max-fraction-digits': 1}], ' MW'], + '', + ], + ['get', 'electrification_label'], + ], + [ + { + id: 'railway_line_low', + minzoom: 0, + maxzoom: 7, + source: 'electrification_railway_line_low', + sourceLayer: 'electrification_railway_line_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', electrificationVoltageMaximumCurrentColor('maximum_current'), + 'power', electrificationPowerColor('voltage', 'maximum_current'), + electrificationVoltageFrequencyColor('voltage', 'frequency'), + ], + }, + { + id: 'railway_line_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: 2, + color: ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', electrificationVoltageMaximumCurrentColor('maximum_current'), + 'power', electrificationPowerColor('voltage', 'maximum_current'), + electrificationVoltageFrequencyColor('voltage', 'frequency'), + ], + }, + { + id: 'railway_line_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: undefined, + proposed: undefined, + disused: undefined, + preserved: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, ['match', ['get', 'state'], + 'present', 2, + 1.5, + ], + 16, ['match', ['get', 'state'], + 'present', 3, + 2, + ], + ], + color: ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', electrificationVoltageMaximumCurrentColor('maximum_current'), + 'power', electrificationPowerColor('voltage', 'maximum_current'), + electrificationVoltageFrequencyColor('voltage', 'frequency'), + ], + }, + { + id: 'railway_line_high_proposed', + minzoom: 8, + source: 'high', + states: { + present: electrification_proposed_dashes, + construction: electrification_proposed_dashes, + proposed: electrification_proposed_dashes, + disused: electrification_proposed_dashes, + preserved: electrification_proposed_dashes, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['==', ['get', 'electrification_state'], 'proposed'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, ['match', ['get', 'state'], + 'present', 2, + 1.5, + ], + 16, ['match', ['get', 'state'], + 'present', 3, + 2, + ], + ], + color: ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', electrificationVoltageMaximumCurrentColor('future_maximum_current'), + 'power', electrificationPowerColor('future_voltage', 'future_maximum_current'), + electrificationVoltageFrequencyColor('future_voltage', 'future_frequency'), + ], + }, + { + id: 'railway_line_high_construction', + minzoom: 8, + source: 'high', + states: { + present: electrification_construction_dashes, + construction: electrification_construction_dashes, + proposed: electrification_construction_dashes, + disused: electrification_construction_dashes, + preserved: electrification_construction_dashes, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['==', ['get', 'electrification_state'], 'construction'], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: ['match', ['global-state', 'electrificationRailwayLine'], + 'maximumCurrent', electrificationVoltageMaximumCurrentColor('future_maximum_current'), + 'power', electrificationPowerColor('future_voltage', 'future_maximum_current'), + electrificationVoltageFrequencyColor('future_voltage', 'future_frequency'), + ], + }, + ], + ), + route, + routeText, + { + id: 'electrification_substation', + type: 'fill', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_substation', + paint: { + 'fill-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + colors.substation, + ], + }, + }, + { + id: `electrification_substation_outline`, + type: 'line', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_substation', + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'line-width': 2, + }, + }, + { + id: 'electrification_catenary_mast', + type: 'symbol', + minzoom: 14, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_catenary', + filter: ['==', ['get', 'feature'], 'mast'], + paint: { + 'icon-color': colors.catenary, + 'icon-halo-width': 2, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'icon-image': ['case', + ['get', 'transition'], 'sdf:general/catenary-mast-transition', + 'sdf:general/catenary-mast', + ], + 'icon-overlap': 'always', + 'icon-size': ['interpolate', ['exponential', 1.2], ['zoom'], + 14, 0.5, + 15, 0.75, + 17, 1.0, + ], + }, + }, + { + id: 'electrification_catenary_mast_text', + type: 'symbol', + minzoom: 17, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_catenary', + filter: ['all', + ['==', ['get', 'feature'], 'mast'], + ['!=', ['get', 'ref'], null], + ], + paint: { + 'text-color': colors.catenary, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'text-field': '{ref}', + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 6, + 'text-max-width': 5, + 'text-offset': [0, 1], + }, + }, + { + id: 'electrification_catenary_portal', + type: 'line', + minzoom: 14, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_catenary', + filter: ['==', ['get', 'feature'], 'portal'], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.catenary, + ], + 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], + 14, 1.5, + 15, 2.0, + ], + }, + }, + { + id: 'electrification_signals_direction', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_signals', + filter: ['all', + ['!=', ['get', 'azimuth'], null], + ['!=', ['get', 'feature'], ''], + ], + paint: { + 'icon-color': colors.signals.direction, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-width': 2.0, + 'icon-halo-blur': 1.0, + 'icon-opacity': ['interpolate', ['linear'], ['zoom'], + 15, 0.85, + 16, 0.7, + ], + }, + layout: { + 'icon-overlap': 'always', + 'icon-image': ["step", ["zoom"], + ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-both', + 'sdf:general/signal-direction', + ], + 16, ['case', + ['coalesce', ['get', 'direction_both'], false], 'sdf:general/signal-direction-large-both', + 'sdf:general/signal-direction-large', + ], + ], + 'icon-anchor': ['case', + ['coalesce', ['get', 'direction_both'], false], 'center', + 'top', + ], + 'icon-rotate': ['get', 'azimuth'], + 'icon-keep-upright': true, + 'icon-rotation-alignment': 'map', + }, + }, + ...imageLayerWithOutline( + 'electrification_signals', + ['get', 'feature'], + { + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_signals', + paint: { + 'text-color': colors.text.main, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo + ], + 'text-halo-width': 1.5, + 'text-halo-blur': 1, + }, + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'text-field': '{ref}', + 'text-font': font.regular, + 'text-size': 9, + 'text-optional': true, + 'text-anchor': 'top', + 'text-offset': ['literal', [0, 1.5]], + }, + }, + ), + { + id: 'electrification_signals_deactivated', + type: 'symbol', + minzoom: 15, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_signals', + filter: ['get', 'deactivated'], + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': 'general/signal-deactivated', + } + }, + { + id: `electrification_signals_text`, + type: 'symbol', + minzoom: 16, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_signals', + filter: ['any', + ['!=', ['get', 'ref'], null], + ['!=', ['get', 'caption'], null], + ], + paint: { + 'text-color': colors.text.main, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo + ], + 'text-halo-width': 1.5, + 'text-halo-blur': 1, + }, + layout: { + 'text-field': ['format', + ['get', 'ref'], {}, + ['case', ['all', ['!=', ['get', 'ref'], null], ['!=', ['get', 'caption'], null]], '\n', ''], {}, + ['case', ['==', ['get', 'caption'], null], '', ['get', 'caption']], {'text-font': ['literal', font.italic]}, + ], + 'text-font': font.regular, + 'text-size': 9, + 'text-anchor': 'top', + 'text-offset': ['interpolate', ['linear'], + // 2 pixel spacing under icon + ['/', ['+', ['get', 'offset'], 2], 9], + 0, ['literal', [0, 0]], + 20, ['literal', [0, 20]], + ], + }, + }, + { + id: `electrification_symbols`, + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_railway_symbols', + paint: { + 'icon-color': colors.styles.standard.symbols, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + 'text-color': colors.styles.standard.symbols, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': ['concat', 'sdf:', ['get', 'feature']], + 'text-field': ['coalesce', ['get', 'ref'], ''], + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 15, + 'text-offset': [0, 1.5], + 'text-optional': true, + }, + }, + { + id: 'electrification_substation_text', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_electrification', + 'source-layer': 'electrification_substation', + filter: ['!=', ['get', 'name'], null], + paint: { + 'text-color': colors.substationText, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'text-field': '{name}', + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 6, + 'text-max-width': 5, + }, + }, + searchResults, + ], + + track: [ + hillshade, + ...railwayLine( + ['match', ['global-state', 'trackRailwayLine'], + 'gauge', ['coalesce', ['get', 'gauge_label'], ''], + 'loadingGauge', ['coalesce', ['get', 'loading_gauge'], ''], + 'trackClass', ['coalesce', ['get', 'track_class'], ''], + '', + ], + [ + { + id: 'railway_line_low', + minzoom: 0, + maxzoom: 7, + source: 'track_railway_line_low', + sourceLayer: 'track_railway_line_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: ['match', ['global-state', 'trackRailwayLine'], + 'loadingGauge', loadingGaugeFillColor, + 'trackClass', trackClassFillColor, + gaugeColor('gauge0', 'gaugeint0'), + ], + }, + { + id: 'railway_line_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: 2, + color: ['match', ['global-state', 'trackRailwayLine'], + 'loadingGauge', loadingGaugeFillColor, + 'trackClass', trackClassFillColor, + gaugeColor('gauge0', 'gaugeint0'), + ], + }, + { + id: 'railway_line_high_gauge', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: gauge_construction_dashes, + disused: disused_dasharray, + preserved: disused_dasharray, + }, + filter: ['!=', ['get', 'feature'], 'ferry'], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: gaugeColor('gauge0', 'gaugeint0'), + visibility: ['==', ['global-state', 'trackRailwayLine'], 'gauge'], + }, + { + id: 'railway_line_high_dual_gauge', + minzoom: 8, + source: 'high', + states: { + present: gauge_dual_gauge_dashes, + construction: dual_construction_dashes, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['!=', ['get', 'gauge1'], null], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: gaugeColor('gauge1', 'gaugeint1'), + visibility: ['==', ['global-state', 'trackRailwayLine'], 'gauge'], + }, + { + id: 'railway_line_high_multi_gauge', + minzoom: 8, + source: 'high', + states: { + present: gauge_multi_gauge_dashes, + construction: multi_construction_dashes, + }, + filter: ['all', + ['!=', ['get', 'feature'], 'ferry'], + ['!=', ['get', 'gauge2'], null], + ], + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: gaugeColor('gauge2', 'gaugeint2'), + visibility: ['==', ['global-state', 'trackRailwayLine'], 'gauge'], + }, + { + id: 'railway_line_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + disused: disused_dasharray, + preserved: disused_dasharray, + }, + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: ['match', ['global-state', 'trackRailwayLine'], + 'loadingGauge', loadingGaugeFillColor, + 'trackClass', trackClassFillColor, + 'gray', + ], + visibility: ['!=', ['global-state', 'trackRailwayLine'], 'gauge'], + }, + ], + ), + route, + routeText, + searchResults, + ], + + operator: [ + hillshade, + { + id: 'railway_grouped_stations', + type: 'fill', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_grouped_stations', + filter: ['all', + ['!=', ['get', 'operator'], null], + ['!=', ['get', 'feature'], 'yard'], // Yards only have an outline + ['match', ['get', 'state'], + 'construction', ['global-state', 'showConstructionInfrastructure'], + 'proposed', ['global-state', 'showProposedInfrastructure'], + 'abandoned', ['global-state', 'showAbandonedInfrastructure'], + 'razed', ['global-state', 'showRazedInfrastructure'], + true, + ], + ], + paint: { + 'fill-color': ['get', 'operator_color'], + 'fill-opacity': ['case', + ['boolean', ['feature-state', 'hover'], false], 0.3, + 0.2, + ], + }, + }, + ...Object.entries({ + present: present_dasharray, + disused: disused_dasharray, + abandoned: abandoned_dasharray, + preserved: disused_dasharray, + construction: construction_dasharray, + proposed: proposed_dasharray, + }).map(([state, dasharray]) => ({ + id: `railway_grouped_stations_outline_${state}`, + type: 'line', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_grouped_stations', + filter: ['all', + ['!=', ['get', 'operator'], null], + ['==', ['get', 'state'], state], + ], + paint: { + 'line-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['get', 'operator_color'], + ], + 'line-opacity': ['match', ['get', 'feature'], + 'yard', 0.2, + 0.3, + ], + 'line-width': ['match', ['get', 'feature'], + 'yard', 6, + 2, + ], + 'line-dasharray': dasharray, + }, + layout: { + 'visibility': ['case', + state === 'construction' ? ['global-state', 'showConstructionInfrastructure'] + : state === 'proposed' ? ['global-state', 'showProposedInfrastructure'] + : state === 'abandoned' ? ['global-state', 'showAbandonedInfrastructure'] + : state === 'razed' ? ['global-state', 'showRazedInfrastructure'] + : true, 'visible', + 'none', + ], + } + })), + ...railwayLine( + ['coalesce', ['get', 'primary_operator'], ''], + [ + { + id: 'railway_line_low', + minzoom: 0, + maxzoom: 7, + source: 'operator_railway_line_low', + sourceLayer: 'operator_railway_line_low', + states: { + present: undefined, + }, + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 0, 0.5, + 7, 2, + ], + color: ['coalesce', ['get', 'operator_color'], 'gray'], + }, + { + id: 'railway_line_med', + minzoom: 7, + maxzoom: 8, + source: 'openrailwaymap_low', + states: { + present: undefined, + }, + width: 2, + color: ['coalesce', ['get', 'operator_color'], 'gray'], + }, + { + id: 'railway_line_high', + minzoom: 8, + source: 'high', + states: { + present: undefined, + construction: construction_dasharray, + proposed: proposed_dasharray, + disused: disused_dasharray, + preserved: disused_dasharray, + }, + width: ["interpolate", ["exponential", 1.2], ["zoom"], + 14, 2, + 16, 3, + ], + color: ['coalesce', ['get', 'operator_color'], 'gray'], + }, + ], + ), + route, + routeText, + { + id: 'signal_boxes_point', + type: 'circle', + minzoom: 10, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['all', + ['!=', ["get", 'operator'], null], + ['==', ["geometry-type"], 'Point'], + ], + paint: { + 'circle-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['get', 'operator_color'], + ], + 'circle-radius': 4, + 'circle-stroke-color': 'white', + 'circle-stroke-width': 1, + }, + }, + { + id: 'signal_boxes_polygon', + type: 'fill', + minzoom: 14, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['all', + ['!=', ["get", 'operator'], null], + ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + ], + paint: { + 'fill-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.main, + ['get', 'operator_color'], + ], + 'fill-outline-color': 'white', + }, + }, + { + id: 'signal_boxes_polygon_outline', + type: 'line', + minzoom: 14, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['all', + ['!=', ["get", 'operator'], null], + ['any', + ['==', ["geometry-type"], 'Polygon'], + ['==', ["geometry-type"], 'MultiPolygon'], + ], + ], + paint: { + 'line-color': 'white', + 'line-width': 1, + }, + }, + { + id: 'railway_text_stations_low1', + type: 'symbol', + minzoom: 4, + maxzoom: 5, + source: 'standard_railway_text_stations_low', + 'source-layer': 'standard_railway_text_stations_low', + filter: ['!=', ['get', 'operator'], null], + paint: { + 'icon-color': ['get', 'operator_color'], + 'icon-halo-width': 1, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'symbol-z-order': 'source', + 'icon-image': 'sdf:general/station-small', + 'icon-overlap': 'always', + }, + }, + { + id: 'railway_text_stations_low2', + type: 'symbol', + minzoom: 5, + maxzoom: 7, + source: 'standard_railway_text_stations_low', + 'source-layer': 'standard_railway_text_stations_low', + filter: ['!=', ['get', 'operator'], null], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + 'icon-color': ['get', 'operator_color'], + 'icon-halo-width': 1.5, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['get', 'station_size']]], + 'icon-overlap': 'always', + 'text-field': ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_text_stations_med', + type: 'symbol', + minzoom: 7, + maxzoom: 8, + source: 'standard_railway_text_stations_med', + 'source-layer': 'standard_railway_text_stations_med', + filter: ['!=', ['get', 'operator'], null], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + 'icon-color': ['get', 'operator_color'], + 'icon-halo-width': 2, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['get', 'station_size']]], + 'icon-overlap': 'always', + 'text-field': ['match', ['get', 'station_size'], + 'small', '', + ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + ], + 'text-font': font.bold, + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_text_stations', + type: 'symbol', + minzoom: 8, + maxzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_text_stations', + filter: ['step', ['zoom'], + ['all', + ['!=', ['get', 'operator'], null], + ['==', ['get', 'state'], 'present'], + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'yard'], + ], + ['!=', ['get', 'station'], 'light_rail'], + ['!=', ['get', 'station'], 'subway'], + ['!=', ['get', 'station'], 'monorail'], + ['!=', ['get', 'station'], 'funicular'], + ], + 9, + ['all', + ['!=', ['get', 'operator'], null], + ['==', ['get', 'state'], 'present'], + ['any', + ['==', ['get', 'feature'], 'station'], + ['==', ['get', 'feature'], 'yard'], + ['==', ['get', 'feature'], 'halt'], + ], + ['!=', ['get', 'station'], 'light_rail'], + ['!=', ['get', 'station'], 'tram'], + ['!=', ['get', 'station'], 'subway'], + ['!=', ['get', 'station'], 'monorail'], + ['!=', ['get', 'station'], 'funicular'], + ], + 10, + ['all', + ['!=', ['get', 'operator'], null], + ['!=', ['get', 'station'], 'tram'], + ['!=', ['get', 'station'], 'funicular'], + ['!=', ['get', 'station'], 'miniature'], + ], + 11, + ['all', + ['!=', ['get', 'operator'], null], + ['!=', ['get', 'station'], 'funicular'], + ['!=', ['get', 'station'], 'miniature'], + ], + ], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + 'icon-color': ['get', 'operator_color'], + 'icon-halo-width': 1.5, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + }, + layout: { + 'symbol-z-order': 'source', + 'icon-image': ['image', ['concat', 'sdf:general/station-', ['case', + ['in', ['get', 'state'], ['literal', ['disused', 'abandoned', 'preserved', 'razed']]], 'past', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], 'future', + ['get', 'station_size'], + ]]], + 'icon-overlap': 'always', + 'text-field': ['step', ['zoom'], + ['match', ['global-state', 'stationLowZoomLabel'], + 'label', ['get', 'label'], + 'name', ['get', 'localized_name'], + '', + ], + 10, + ['get', 'localized_name'], + 12, + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + ], + 'text-font': ['case', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], ['literal', font.italic], + ['literal', font.bold], + ], + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + 'text-optional': true, + 'text-variable-anchor': ['top', 'bottom', 'left', 'right'], + }, + }, + { + id: 'railway_text_stations_high', + type: 'symbol', + minzoom: 13, + source: 'openrailwaymap_standard', + 'source-layer': 'standard_railway_text_stations', + filter: ['!=', ['get', 'operator'], null], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'symbol-z-order': 'source', + 'text-field': ['step', ['zoom'], + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + 15, + ['format', + ['get', 'localized_name'], + {}, + ['case', + ['>', ['coalesce', ['get', 'count'], 0], 1], ['concat', ' (', ['get', 'count'], ')'], + '', + ], + {}, + ['case', + ['!=', ['get', 'name'], ['get', 'localized_name']], ['concat', '\n', ['get', 'name']], + '', + ], + { + 'text-font': ['literal', font.regular], + }, + ], + ], + 'text-font': ['case', + ['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], ['literal', font.italic], + ['literal', font.bold], + ], + 'text-variable-anchor': ['center', 'top', 'bottom', 'left', 'right'], + 'text-size': 11, + 'text-padding': 10, + 'text-max-width': 8, + }, + }, + { + id: 'signal_boxes_text_medium', + type: 'symbol', + minzoom: 12, + maxzoom: 15, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['all', + ['!=', ["get", 'operator'], null], + ['!=', ['get', 'ref'], null], + ], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'text-field': '{ref}', + 'text-font': font.bold, + 'text-size': 11, + 'text-offset': ['literal', [0, 1]], + } + }, + { + id: 'signal_boxes_text_high', + type: 'symbol', + minzoom: 15, + source: 'openrailwaymap_signals', + 'source-layer': 'signals_signal_boxes', + filter: ['all', + ['!=', ["get", 'operator'], null], + ['!=', ['get', 'name'], null], + ], + paint: { + 'text-color': ['get', 'operator_color'], + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 1.5, + }, + layout: { + 'text-field': '{name}', + 'text-font': font.bold, + 'text-size': 11, + } + }, + { + id: `operator_symbols`, + type: 'symbol', + minzoom: 10, + source: 'openrailwaymap_operator', + 'source-layer': 'operator_railway_symbols', + paint: { + 'icon-color': colors.styles.standard.symbols, + 'icon-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'icon-halo-blur': ['case', + ['boolean', ['feature-state', 'hover'], false], 1.0, + 0.0, + ], + 'icon-halo-width': ['case', + ['boolean', ['feature-state', 'hover'], false], 3.0, + 2.0, + ], + 'text-color': colors.styles.standard.symbols, + 'text-halo-color': ['case', + ['boolean', ['feature-state', 'hover'], false], colors.hover.textHalo, + colors.halo, + ], + 'text-halo-width': 2, + }, + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + 'icon-image': ['concat', 'sdf:', ['get', 'feature']], + 'text-field': ['coalesce', ['get', 'ref'], ''], + 'text-font': font.regular, + 'text-size': 11, + 'text-padding': 15, + 'text-offset': [0, 1.5], + 'text-optional': true, + }, + }, + ...imageLayerWithOutline( + `operator_symbols_outline`, + ['get', 'feature'], + { + type: 'symbol', + minzoom: 10, + source: 'openrailwaymap_operator', + 'source-layer': 'operator_railway_symbols', + layout: { + 'symbol-z-order': 'source', + 'icon-overlap': 'always', + }, + }, + ), + searchResults, + ], +}; + +const makeStyle = selectedStyle => ({ + center: [12.55, 51.14], // default + zoom: 3.75, // default + glyphs: '/font/{fontstack}/{range}', + metadata: {}, + name: `OpenRailwayMap ${selectedStyle}`, + sources, + sprite: [ + { + id: 'sdf', + url: '/sdf_sprite/symbols' + }, + { + id: 'default', + url: '/sprite/symbols' + } + ], + version: 8, + layers: layers[selectedStyle], + state: { + date: { + default: defaultDate, + }, + allDates: { + default: false, + }, + theme: { + default: 'light', + }, + stationLowZoomLabel: { + default: 'label', + }, + showConstructionInfrastructure: { + default: true, + }, + showProposedInfrastructure: { + default: true, + }, + showAbandonedInfrastructure: { + default: false, + }, + showRazedInfrastructure: { + default: false, + }, + openHistoricalMap: { + default: true, + }, + hillshade: { + default: false, + }, + electrificationRailwayLine: { + default: 'voltageFrequency', + }, + trackRailwayLine: { + default: 'gauge', + }, + }, +}); + +knownStyles.forEach(style => { + fs.writeFileSync(`${style}.json`, JSON.stringify(makeStyle(style))); +}); diff --git a/proxy/js/swagger-ui/swagger-ui.js b/proxy/js/swagger-ui/swagger-ui.js new file mode 100644 index 000000000..90d411f91 --- /dev/null +++ b/proxy/js/swagger-ui/swagger-ui.js @@ -0,0 +1,3 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function webpackUniversalModuleDefinition(s,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.SwaggerUIBundle=i():s.SwaggerUIBundle=i()}(this,(()=>(()=>{var s,i,u={22851:(s,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.BLANK_URL=i.relativeFirstCharacters=i.urlSchemeRegex=i.ctrlCharactersRegex=i.htmlCtrlEntityRegex=i.htmlEntitiesRegex=i.invalidProtocolRegex=void 0,i.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,i.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,i.htmlCtrlEntityRegex=/&(newline|tab);/gi,i.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,i.urlSchemeRegex=/^.+(:|:)/gim,i.relativeFirstCharacters=[".","/"],i.BLANK_URL="about:blank"},17967:(s,i,u)=>{"use strict";i.N=void 0;var _=u(22851);i.N=function sanitizeUrl(s){if(!s)return _.BLANK_URL;var i=function decodeHtmlCharacters(s){return s.replace(_.ctrlCharactersRegex,"").replace(_.htmlEntitiesRegex,(function(s,i){return String.fromCharCode(i)}))}(s).replace(_.htmlCtrlEntityRegex,"").replace(_.ctrlCharactersRegex,"").trim();if(!i)return _.BLANK_URL;if(function isRelativeUrlWithoutProtocol(s){return _.relativeFirstCharacters.indexOf(s[0])>-1}(i))return i;var u=i.match(_.urlSchemeRegex);if(!u)return i;var w=u[0];return _.invalidProtocolRegex.test(w)?_.BLANK_URL:i}},79742:(s,i)=>{"use strict";i.byteLength=function byteLength(s){var i=getLens(s),u=i[0],_=i[1];return 3*(u+_)/4-_},i.toByteArray=function toByteArray(s){var i,u,x=getLens(s),j=x[0],P=x[1],B=new w(function _byteLength(s,i,u){return 3*(i+u)/4-u}(0,j,P)),$=0,U=P>0?j-4:j;for(u=0;u>16&255,B[$++]=i>>8&255,B[$++]=255&i;2===P&&(i=_[s.charCodeAt(u)]<<2|_[s.charCodeAt(u+1)]>>4,B[$++]=255&i);1===P&&(i=_[s.charCodeAt(u)]<<10|_[s.charCodeAt(u+1)]<<4|_[s.charCodeAt(u+2)]>>2,B[$++]=i>>8&255,B[$++]=255&i);return B},i.fromByteArray=function fromByteArray(s){for(var i,_=s.length,w=_%3,x=[],j=16383,P=0,B=_-w;PB?B:P+j));1===w?(i=s[_-1],x.push(u[i>>2]+u[i<<4&63]+"==")):2===w&&(i=(s[_-2]<<8)+s[_-1],x.push(u[i>>10]+u[i>>4&63]+u[i<<2&63]+"="));return x.join("")};for(var u=[],_=[],w="undefined"!=typeof Uint8Array?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j=0;j<64;++j)u[j]=x[j],_[x.charCodeAt(j)]=j;function getLens(s){var i=s.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=s.indexOf("=");return-1===u&&(u=i),[u,u===i?0:4-u%4]}function encodeChunk(s,i,_){for(var w,x,j=[],P=i;P<_;P+=3)w=(s[P]<<16&16711680)+(s[P+1]<<8&65280)+(255&s[P+2]),j.push(u[(x=w)>>18&63]+u[x>>12&63]+u[x>>6&63]+u[63&x]);return j.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},48764:(s,i,u)=>{"use strict";const _=u(79742),w=u(80645),x="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=Buffer,i.SlowBuffer=function SlowBuffer(s){+s!=s&&(s=0);return Buffer.alloc(+s)},i.INSPECT_MAX_BYTES=50;const j=2147483647;function createBuffer(s){if(s>j)throw new RangeError('The value "'+s+'" is invalid for option "size"');const i=new Uint8Array(s);return Object.setPrototypeOf(i,Buffer.prototype),i}function Buffer(s,i,u){if("number"==typeof s){if("string"==typeof i)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(s)}return from(s,i,u)}function from(s,i,u){if("string"==typeof s)return function fromString(s,i){"string"==typeof i&&""!==i||(i="utf8");if(!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i);const u=0|byteLength(s,i);let _=createBuffer(u);const w=_.write(s,i);w!==u&&(_=_.slice(0,w));return _}(s,i);if(ArrayBuffer.isView(s))return function fromArrayView(s){if(isInstance(s,Uint8Array)){const i=new Uint8Array(s);return fromArrayBuffer(i.buffer,i.byteOffset,i.byteLength)}return fromArrayLike(s)}(s);if(null==s)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s);if(isInstance(s,ArrayBuffer)||s&&isInstance(s.buffer,ArrayBuffer))return fromArrayBuffer(s,i,u);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(s,SharedArrayBuffer)||s&&isInstance(s.buffer,SharedArrayBuffer)))return fromArrayBuffer(s,i,u);if("number"==typeof s)throw new TypeError('The "value" argument must not be of type number. Received type number');const _=s.valueOf&&s.valueOf();if(null!=_&&_!==s)return Buffer.from(_,i,u);const w=function fromObject(s){if(Buffer.isBuffer(s)){const i=0|checked(s.length),u=createBuffer(i);return 0===u.length||s.copy(u,0,0,i),u}if(void 0!==s.length)return"number"!=typeof s.length||numberIsNaN(s.length)?createBuffer(0):fromArrayLike(s);if("Buffer"===s.type&&Array.isArray(s.data))return fromArrayLike(s.data)}(s);if(w)return w;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof s[Symbol.toPrimitive])return Buffer.from(s[Symbol.toPrimitive]("string"),i,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s)}function assertSize(s){if("number"!=typeof s)throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checked(s))}function fromArrayLike(s){const i=s.length<0?0:0|checked(s.length),u=createBuffer(i);for(let _=0;_=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return 0|s}function byteLength(s,i){if(Buffer.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||isInstance(s,ArrayBuffer))return s.byteLength;if("string"!=typeof s)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);const u=s.length,_=arguments.length>2&&!0===arguments[2];if(!_&&0===u)return 0;let w=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return utf8ToBytes(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*u;case"hex":return u>>>1;case"base64":return base64ToBytes(s).length;default:if(w)return _?-1:utf8ToBytes(s).length;i=(""+i).toLowerCase(),w=!0}}function slowToString(s,i,u){let _=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return"";if((void 0===u||u>this.length)&&(u=this.length),u<=0)return"";if((u>>>=0)<=(i>>>=0))return"";for(s||(s="utf8");;)switch(s){case"hex":return hexSlice(this,i,u);case"utf8":case"utf-8":return utf8Slice(this,i,u);case"ascii":return asciiSlice(this,i,u);case"latin1":case"binary":return latin1Slice(this,i,u);case"base64":return base64Slice(this,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,i,u);default:if(_)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),_=!0}}function swap(s,i,u){const _=s[i];s[i]=s[u],s[u]=_}function bidirectionalIndexOf(s,i,u,_,w){if(0===s.length)return-1;if("string"==typeof u?(_=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),numberIsNaN(u=+u)&&(u=w?0:s.length-1),u<0&&(u=s.length+u),u>=s.length){if(w)return-1;u=s.length-1}else if(u<0){if(!w)return-1;u=0}if("string"==typeof i&&(i=Buffer.from(i,_)),Buffer.isBuffer(i))return 0===i.length?-1:arrayIndexOf(s,i,u,_,w);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?w?Uint8Array.prototype.indexOf.call(s,i,u):Uint8Array.prototype.lastIndexOf.call(s,i,u):arrayIndexOf(s,[i],u,_,w);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(s,i,u,_,w){let x,j=1,P=s.length,B=i.length;if(void 0!==_&&("ucs2"===(_=String(_).toLowerCase())||"ucs-2"===_||"utf16le"===_||"utf-16le"===_)){if(s.length<2||i.length<2)return-1;j=2,P/=2,B/=2,u/=2}function read(s,i){return 1===j?s[i]:s.readUInt16BE(i*j)}if(w){let _=-1;for(x=u;xP&&(u=P-B),x=u;x>=0;x--){let u=!0;for(let _=0;_w&&(_=w):_=w;const x=i.length;let j;for(_>x/2&&(_=x/2),j=0;j<_;++j){const _=parseInt(i.substr(2*j,2),16);if(numberIsNaN(_))return j;s[u+j]=_}return j}function utf8Write(s,i,u,_){return blitBuffer(utf8ToBytes(i,s.length-u),s,u,_)}function asciiWrite(s,i,u,_){return blitBuffer(function asciiToBytes(s){const i=[];for(let u=0;u>8,w=u%256,x.push(w),x.push(_);return x}(i,s.length-u),s,u,_)}function base64Slice(s,i,u){return 0===i&&u===s.length?_.fromByteArray(s):_.fromByteArray(s.slice(i,u))}function utf8Slice(s,i,u){u=Math.min(s.length,u);const _=[];let w=i;for(;w239?4:i>223?3:i>191?2:1;if(w+j<=u){let u,_,P,B;switch(j){case 1:i<128&&(x=i);break;case 2:u=s[w+1],128==(192&u)&&(B=(31&i)<<6|63&u,B>127&&(x=B));break;case 3:u=s[w+1],_=s[w+2],128==(192&u)&&128==(192&_)&&(B=(15&i)<<12|(63&u)<<6|63&_,B>2047&&(B<55296||B>57343)&&(x=B));break;case 4:u=s[w+1],_=s[w+2],P=s[w+3],128==(192&u)&&128==(192&_)&&128==(192&P)&&(B=(15&i)<<18|(63&u)<<12|(63&_)<<6|63&P,B>65535&&B<1114112&&(x=B))}}null===x?(x=65533,j=1):x>65535&&(x-=65536,_.push(x>>>10&1023|55296),x=56320|1023&x),_.push(x),w+=j}return function decodeCodePointsArray(s){const i=s.length;if(i<=P)return String.fromCharCode.apply(String,s);let u="",_=0;for(;__.length?(Buffer.isBuffer(i)||(i=Buffer.from(i)),i.copy(_,w)):Uint8Array.prototype.set.call(_,i,w);else{if(!Buffer.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(_,w)}w+=i.length}return _},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const s=this.length;if(s%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;iu&&(s+=" ... "),""},x&&(Buffer.prototype[x]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(s,i,u,_,w){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),!Buffer.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(void 0===i&&(i=0),void 0===u&&(u=s?s.length:0),void 0===_&&(_=0),void 0===w&&(w=this.length),i<0||u>s.length||_<0||w>this.length)throw new RangeError("out of range index");if(_>=w&&i>=u)return 0;if(_>=w)return-1;if(i>=u)return 1;if(this===s)return 0;let x=(w>>>=0)-(_>>>=0),j=(u>>>=0)-(i>>>=0);const P=Math.min(x,j),B=this.slice(_,w),$=s.slice(i,u);for(let s=0;s>>=0,isFinite(u)?(u>>>=0,void 0===_&&(_="utf8")):(_=u,u=void 0)}const w=this.length-i;if((void 0===u||u>w)&&(u=w),s.length>0&&(u<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");_||(_="utf8");let x=!1;for(;;)switch(_){case"hex":return hexWrite(this,s,i,u);case"utf8":case"utf-8":return utf8Write(this,s,i,u);case"ascii":case"latin1":case"binary":return asciiWrite(this,s,i,u);case"base64":return base64Write(this,s,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,s,i,u);default:if(x)throw new TypeError("Unknown encoding: "+_);_=(""+_).toLowerCase(),x=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function asciiSlice(s,i,u){let _="";u=Math.min(s.length,u);for(let w=i;w_)&&(u=_);let w="";for(let _=i;_u)throw new RangeError("Trying to access beyond buffer length")}function checkInt(s,i,u,_,w,x){if(!Buffer.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>w||is.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,u}function wrtBigUInt64BE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u+7]=x,x>>=8,s[u+6]=x,x>>=8,s[u+5]=x,x>>=8,s[u+4]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u+3]=j,j>>=8,s[u+2]=j,j>>=8,s[u+1]=j,j>>=8,s[u]=j,u+8}function checkIEEE754(s,i,u,_,w,x){if(u+_>s.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function writeFloat(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,4),w.write(s,i,u,_,23,4),u+4}function writeDouble(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,8),w.write(s,i,u,_,52,8),u+8}Buffer.prototype.slice=function slice(s,i){const u=this.length;(s=~~s)<0?(s+=u)<0&&(s=0):s>u&&(s=u),(i=void 0===i?u:~~i)<0?(i+=u)<0&&(i=0):i>u&&(i=u),i>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s+--i],w=1;for(;i>0&&(w*=256);)_+=this[s+--i]*w;return _},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),this[s]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]|this[s+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]<<8|this[s+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(s){validateNumber(s>>>=0,"offset");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i+256*this[++s]+65536*this[++s]+this[++s]*2**24,w=this[++s]+256*this[++s]+65536*this[++s]+u*2**24;return BigInt(_)+(BigInt(w)<>>=0,"offset");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i*2**24+65536*this[++s]+256*this[++s]+this[++s],w=this[++s]*2**24+65536*this[++s]+256*this[++s]+u;return(BigInt(_)<>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x=w&&(_-=Math.pow(2,8*i)),_},Buffer.prototype.readIntBE=function readIntBE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=i,w=1,x=this[s+--_];for(;_>0&&(w*=256);)x+=this[s+--_]*w;return w*=128,x>=w&&(x-=Math.pow(2,8*i)),x},Buffer.prototype.readInt8=function readInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},Buffer.prototype.readInt16LE=function readInt16LE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s]|this[s+1]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt16BE=function readInt16BE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s+1]|this[s]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt32LE=function readInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(s){validateNumber(s>>>=0,"offset");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=this[s+4]+256*this[s+5]+65536*this[s+6]+(u<<24);return(BigInt(_)<>>=0,"offset");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=(i<<24)+65536*this[++s]+256*this[++s]+this[++s];return(BigInt(_)<>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(s,i,u,_){if(s=+s,i>>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=1,x=0;for(this[i]=255&s;++x>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=u-1,x=1;for(this[i+w]=255&s;--w>=0&&(x*=256);)this[i+w]=s/x&255;return i+u},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,255,0),this[i]=255&s,i+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i+3]=s>>>24,this[i+2]=s>>>16,this[i+1]=s>>>8,this[i]=255&s,i+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=0,x=1,j=0;for(this[i]=255&s;++w>0)-j&255;return i+u},Buffer.prototype.writeIntBE=function writeIntBE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=u-1,x=1,j=0;for(this[i+w]=255&s;--w>=0&&(x*=256);)s<0&&0===j&&0!==this[i+w+1]&&(j=1),this[i+w]=(s/x>>0)-j&255;return i+u},Buffer.prototype.writeInt8=function writeInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,127,-128),s<0&&(s=255+s+1),this[i]=255&s,i+1},Buffer.prototype.writeInt16LE=function writeInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeInt16BE=function writeInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeInt32LE=function writeInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),this[i]=255&s,this[i+1]=s>>>8,this[i+2]=s>>>16,this[i+3]=s>>>24,i+4},Buffer.prototype.writeInt32BE=function writeInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(s,i,u){return writeFloat(this,s,i,!0,u)},Buffer.prototype.writeFloatBE=function writeFloatBE(s,i,u){return writeFloat(this,s,i,!1,u)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(s,i,u){return writeDouble(this,s,i,!0,u)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(s,i,u){return writeDouble(this,s,i,!1,u)},Buffer.prototype.copy=function copy(s,i,u,_){if(!Buffer.isBuffer(s))throw new TypeError("argument should be a Buffer");if(u||(u=0),_||0===_||(_=this.length),i>=s.length&&(i=s.length),i||(i=0),_>0&&_=this.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("sourceEnd out of bounds");_>this.length&&(_=this.length),s.length-i<_-u&&(_=s.length-i+u);const w=_-u;return this===s&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(i,u,_):Uint8Array.prototype.set.call(s,this.subarray(u,_),i),w},Buffer.prototype.fill=function fill(s,i,u,_){if("string"==typeof s){if("string"==typeof i?(_=i,i=0,u=this.length):"string"==typeof u&&(_=u,u=this.length),void 0!==_&&"string"!=typeof _)throw new TypeError("encoding must be a string");if("string"==typeof _&&!Buffer.isEncoding(_))throw new TypeError("Unknown encoding: "+_);if(1===s.length){const i=s.charCodeAt(0);("utf8"===_&&i<128||"latin1"===_)&&(s=i)}}else"number"==typeof s?s&=255:"boolean"==typeof s&&(s=Number(s));if(i<0||this.length>>=0,u=void 0===u?this.length:u>>>0,s||(s=0),"number"==typeof s)for(w=i;w=_+4;u-=3)i=`_${s.slice(u-3,u)}${i}`;return`${s.slice(0,u)}${i}`}function checkIntBI(s,i,u,_,w,x){if(s>u||s3?0===i||i===BigInt(0)?`>= 0${_} and < 2${_} ** ${8*(x+1)}${_}`:`>= -(2${_} ** ${8*(x+1)-1}${_}) and < 2 ** ${8*(x+1)-1}${_}`:`>= ${i}${_} and <= ${u}${_}`,new B.ERR_OUT_OF_RANGE("value",w,s)}!function checkBounds(s,i,u){validateNumber(i,"offset"),void 0!==s[i]&&void 0!==s[i+u]||boundsError(i,s.length-(u+1))}(_,w,x)}function validateNumber(s,i){if("number"!=typeof s)throw new B.ERR_INVALID_ARG_TYPE(i,"number",s)}function boundsError(s,i,u){if(Math.floor(s)!==s)throw validateNumber(s,u),new B.ERR_OUT_OF_RANGE(u||"offset","an integer",s);if(i<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${i}`,s)}E("ERR_BUFFER_OUT_OF_BOUNDS",(function(s){return s?`${s} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),E("ERR_INVALID_ARG_TYPE",(function(s,i){return`The "${s}" argument must be of type number. Received type ${typeof i}`}),TypeError),E("ERR_OUT_OF_RANGE",(function(s,i,u){let _=`The value of "${s}" is out of range.`,w=u;return Number.isInteger(u)&&Math.abs(u)>2**32?w=addNumericalSeparator(String(u)):"bigint"==typeof u&&(w=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(w=addNumericalSeparator(w)),w+="n"),_+=` It must be ${i}. Received ${w}`,_}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(s,i){let u;i=i||1/0;const _=s.length;let w=null;const x=[];for(let j=0;j<_;++j){if(u=s.charCodeAt(j),u>55295&&u<57344){if(!w){if(u>56319){(i-=3)>-1&&x.push(239,191,189);continue}if(j+1===_){(i-=3)>-1&&x.push(239,191,189);continue}w=u;continue}if(u<56320){(i-=3)>-1&&x.push(239,191,189),w=u;continue}u=65536+(w-55296<<10|u-56320)}else w&&(i-=3)>-1&&x.push(239,191,189);if(w=null,u<128){if((i-=1)<0)break;x.push(u)}else if(u<2048){if((i-=2)<0)break;x.push(u>>6|192,63&u|128)}else if(u<65536){if((i-=3)<0)break;x.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(u<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;x.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return x}function base64ToBytes(s){return _.toByteArray(function base64clean(s){if((s=(s=s.split("=")[0]).trim().replace($,"")).length<2)return"";for(;s.length%4!=0;)s+="=";return s}(s))}function blitBuffer(s,i,u,_){let w;for(w=0;w<_&&!(w+u>=i.length||w>=s.length);++w)i[w+u]=s[w];return w}function isInstance(s,i){return s instanceof i||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===i.name}function numberIsNaN(s){return s!=s}const U=function(){const s="0123456789abcdef",i=new Array(256);for(let u=0;u<16;++u){const _=16*u;for(let w=0;w<16;++w)i[_+w]=s[u]+s[w]}return i}();function defineBigIntMethod(s){return"undefined"==typeof BigInt?BufferBigIntNotDefined:s}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}},21924:(s,i,u)=>{"use strict";var _=u(40210),w=u(55559),x=w(_("String.prototype.indexOf"));s.exports=function callBoundIntrinsic(s,i){var u=_(s,!!i);return"function"==typeof u&&x(s,".prototype.")>-1?w(u):u}},55559:(s,i,u)=>{"use strict";var _=u(58612),w=u(40210),x=u(67771),j=w("%TypeError%"),P=w("%Function.prototype.apply%"),B=w("%Function.prototype.call%"),$=w("%Reflect.apply%",!0)||_.call(B,P),U=w("%Object.defineProperty%",!0),Y=w("%Math.max%");if(U)try{U({},"a",{value:1})}catch(s){U=null}s.exports=function callBind(s){if("function"!=typeof s)throw new j("a function is required");var i=$(_,B,arguments);return x(i,1+Y(0,s.length-(arguments.length-1)),!0)};var X=function applyBind(){return $(_,P,arguments)};U?U(s.exports,"apply",{value:X}):s.exports.apply=X},20640:(s,i,u)=>{"use strict";var _=u(11742),w={"text/plain":"Text","text/html":"Url",default:"Text"};s.exports=function copy(s,i){var u,x,j,P,B,$,U=!1;i||(i={}),u=i.debug||!1;try{if(j=_(),P=document.createRange(),B=document.getSelection(),($=document.createElement("span")).textContent=s,$.ariaHidden="true",$.style.all="unset",$.style.position="fixed",$.style.top=0,$.style.clip="rect(0, 0, 0, 0)",$.style.whiteSpace="pre",$.style.webkitUserSelect="text",$.style.MozUserSelect="text",$.style.msUserSelect="text",$.style.userSelect="text",$.addEventListener("copy",(function(_){if(_.stopPropagation(),i.format)if(_.preventDefault(),void 0===_.clipboardData){u&&console.warn("unable to use e.clipboardData"),u&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var x=w[i.format]||w.default;window.clipboardData.setData(x,s)}else _.clipboardData.clearData(),_.clipboardData.setData(i.format,s);i.onCopy&&(_.preventDefault(),i.onCopy(_.clipboardData))})),document.body.appendChild($),P.selectNodeContents($),B.addRange(P),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");U=!0}catch(_){u&&console.error("unable to copy using execCommand: ",_),u&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",s),i.onCopy&&i.onCopy(window.clipboardData),U=!0}catch(_){u&&console.error("unable to copy using clipboardData: ",_),u&&console.error("falling back to prompt"),x=function format(s){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return s.replace(/#{\s*key\s*}/g,i)}("message"in i?i.message:"Copy to clipboard: #{key}, Enter"),window.prompt(x,s)}}finally{B&&("function"==typeof B.removeRange?B.removeRange(P):B.removeAllRanges()),$&&document.body.removeChild($),j()}return U}},8269:function(s,i,u){var _;_=void 0!==u.g?u.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var i,u=String(s),_=u.length,w=-1,x="",j=u.charCodeAt(0);++w<_;)0!=(i=u.charCodeAt(w))?x+=i>=1&&i<=31||127==i||0==w&&i>=48&&i<=57||1==w&&i>=48&&i<=57&&45==j?"\\"+i.toString(16)+" ":0==w&&1==_&&45==i||!(i>=128||45==i||95==i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122)?"\\"+u.charAt(w):u.charAt(w):x+="�";return x};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(_)},27698:(s,i,u)=>{"use strict";var _=u(48764).Buffer;function isSpecificValue(s){return s instanceof _||s instanceof Date||s instanceof RegExp}function cloneSpecificValue(s){if(s instanceof _){var i=_.alloc?_.alloc(s.length):new _(s.length);return s.copy(i),i}if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error("Unexpected situation")}function deepCloneArray(s){var i=[];return s.forEach((function(s,u){"object"==typeof s&&null!==s?Array.isArray(s)?i[u]=deepCloneArray(s):isSpecificValue(s)?i[u]=cloneSpecificValue(s):i[u]=w({},s):i[u]=s})),i}function safeGetProperty(s,i){return"__proto__"===i?void 0:s[i]}var w=s.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var s,i,u=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(_){"object"!=typeof _||null===_||Array.isArray(_)||Object.keys(_).forEach((function(x){return i=safeGetProperty(u,x),(s=safeGetProperty(_,x))===u?void 0:"object"!=typeof s||null===s?void(u[x]=s):Array.isArray(s)?void(u[x]=deepCloneArray(s)):isSpecificValue(s)?void(u[x]=cloneSpecificValue(s)):"object"!=typeof i||null===i||Array.isArray(i)?void(u[x]=w({},s)):void(u[x]=w(i,s))}))})),u}},9996:s=>{"use strict";var i=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&"object"==typeof s}(s)&&!function isSpecial(s){var i=Object.prototype.toString.call(s);return"[object RegExp]"===i||"[object Date]"===i||function isReactElement(s){return s.$$typeof===u}(s)}(s)};var u="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function cloneUnlessOtherwiseSpecified(s,i){return!1!==i.clone&&i.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,i):s}function defaultArrayMerge(s,i,u){return s.concat(i).map((function(s){return cloneUnlessOtherwiseSpecified(s,u)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(i){return Object.propertyIsEnumerable.call(s,i)})):[]}(s))}function propertyIsOnObject(s,i){try{return i in s}catch(s){return!1}}function mergeObject(s,i,u){var _={};return u.isMergeableObject(s)&&getKeys(s).forEach((function(i){_[i]=cloneUnlessOtherwiseSpecified(s[i],u)})),getKeys(i).forEach((function(w){(function propertyIsUnsafe(s,i){return propertyIsOnObject(s,i)&&!(Object.hasOwnProperty.call(s,i)&&Object.propertyIsEnumerable.call(s,i))})(s,w)||(propertyIsOnObject(s,w)&&u.isMergeableObject(i[w])?_[w]=function getMergeFunction(s,i){if(!i.customMerge)return deepmerge;var u=i.customMerge(s);return"function"==typeof u?u:deepmerge}(w,u)(s[w],i[w],u):_[w]=cloneUnlessOtherwiseSpecified(i[w],u))})),_}function deepmerge(s,u,_){(_=_||{}).arrayMerge=_.arrayMerge||defaultArrayMerge,_.isMergeableObject=_.isMergeableObject||i,_.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var w=Array.isArray(u);return w===Array.isArray(s)?w?_.arrayMerge(s,u,_):mergeObject(s,u,_):cloneUnlessOtherwiseSpecified(u,_)}deepmerge.all=function deepmergeAll(s,i){if(!Array.isArray(s))throw new Error("first argument should be an array");return s.reduce((function(s,u){return deepmerge(s,u,i)}),{})};var _=deepmerge;s.exports=_},12296:(s,i,u)=>{"use strict";var _=u(31044)(),w=u(40210),x=_&&w("%Object.defineProperty%",!0);if(x)try{x({},"a",{value:1})}catch(s){x=!1}var j=w("%SyntaxError%"),P=w("%TypeError%"),B=u(27296);s.exports=function defineDataProperty(s,i,u){if(!s||"object"!=typeof s&&"function"!=typeof s)throw new P("`obj` must be an object or a function`");if("string"!=typeof i&&"symbol"!=typeof i)throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new P("`loose`, if provided, must be a boolean");var _=arguments.length>3?arguments[3]:null,w=arguments.length>4?arguments[4]:null,$=arguments.length>5?arguments[5]:null,U=arguments.length>6&&arguments[6],Y=!!B&&B(s,i);if(x)x(s,i,{configurable:null===$&&Y?Y.configurable:!$,enumerable:null===_&&Y?Y.enumerable:!_,value:u,writable:null===w&&Y?Y.writable:!w});else{if(!U&&(_||w||$))throw new j("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");s[i]=u}}},27856:function(s){s.exports=function(){"use strict";const{entries:s,setPrototypeOf:i,isFrozen:u,getPrototypeOf:_,getOwnPropertyDescriptor:w}=Object;let{freeze:x,seal:j,create:P}=Object,{apply:B,construct:$}="undefined"!=typeof Reflect&&Reflect;x||(x=function freeze(s){return s}),j||(j=function seal(s){return s}),B||(B=function apply(s,i,u){return s.apply(i,u)}),$||($=function construct(s,i){return new s(...i)});const U=unapply(Array.prototype.forEach),Y=unapply(Array.prototype.pop),X=unapply(Array.prototype.push),Z=unapply(String.prototype.toLowerCase),ee=unapply(String.prototype.toString),ae=unapply(String.prototype.match),ie=unapply(String.prototype.replace),le=unapply(String.prototype.indexOf),ce=unapply(String.prototype.trim),pe=unapply(RegExp.prototype.test),de=unconstruct(TypeError);function unapply(s){return function(i){for(var u=arguments.length,_=new Array(u>1?u-1:0),w=1;w2&&void 0!==arguments[2]?arguments[2]:Z;i&&i(s,null);let x=_.length;for(;x--;){let i=_[x];if("string"==typeof i){const s=w(i);s!==i&&(u(_)||(_[x]=s),i=s)}s[i]=!0}return s}function clone(i){const u=P(null);for(const[_,x]of s(i))void 0!==w(i,_)&&(u[_]=x);return u}function lookupGetter(s,i){for(;null!==s;){const u=w(s,i);if(u){if(u.get)return unapply(u.get);if("function"==typeof u.value)return unapply(u.value)}s=_(s)}function fallbackValue(s){return console.warn("fallback value for",s),null}return fallbackValue}const fe=x(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=x(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=x(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_e=x(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),we=x(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Se=x(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xe=x(["#text"]),Pe=x(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Te=x(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Re=x(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qe=x(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$e=j(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ze=j(/<%[\w\W]*|[\w\W]*%>/gm),We=j(/\${[\w\W]*}/gm),He=j(/^data-[\-\w.\u00B7-\uFFFF]/),Ye=j(/^aria-[\-\w]+$/),Xe=j(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qe=j(/^(?:\w+script|data):/i),et=j(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tt=j(/^html$/i);var rt=Object.freeze({__proto__:null,MUSTACHE_EXPR:$e,ERB_EXPR:ze,TMPLIT_EXPR:We,DATA_ATTR:He,ARIA_ATTR:Ye,IS_ALLOWED_URI:Xe,IS_SCRIPT_OR_DATA:Qe,ATTR_WHITESPACE:et,DOCTYPE_NAME:tt});const nt=function getGlobal(){return"undefined"==typeof window?null:window},ot=function _createTrustedTypesPolicy(s,i){if("object"!=typeof s||"function"!=typeof s.createPolicy)return null;let u=null;const _="data-tt-policy-suffix";i&&i.hasAttribute(_)&&(u=i.getAttribute(_));const w="dompurify"+(u?"#"+u:"");try{return s.createPolicy(w,{createHTML:s=>s,createScriptURL:s=>s})}catch(s){return console.warn("TrustedTypes policy "+w+" could not be created."),null}};function createDOMPurify(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt();const DOMPurify=s=>createDOMPurify(s);if(DOMPurify.version="3.0.6",DOMPurify.removed=[],!i||!i.document||9!==i.document.nodeType)return DOMPurify.isSupported=!1,DOMPurify;let{document:u}=i;const _=u,w=_.currentScript,{DocumentFragment:j,HTMLTemplateElement:B,Node:$,Element:$e,NodeFilter:ze,NamedNodeMap:We=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:He,DOMParser:Ye,trustedTypes:Qe}=i,et=$e.prototype,st=lookupGetter(et,"cloneNode"),at=lookupGetter(et,"nextSibling"),it=lookupGetter(et,"childNodes"),lt=lookupGetter(et,"parentNode");if("function"==typeof B){const s=u.createElement("template");s.content&&s.content.ownerDocument&&(u=s.content.ownerDocument)}let ct,ut="";const{implementation:pt,createNodeIterator:ht,createDocumentFragment:dt,getElementsByTagName:mt}=u,{importNode:gt}=_;let yt={};DOMPurify.isSupported="function"==typeof s&&"function"==typeof lt&&pt&&void 0!==pt.createHTMLDocument;const{MUSTACHE_EXPR:bt,ERB_EXPR:vt,TMPLIT_EXPR:_t,DATA_ATTR:wt,ARIA_ATTR:Et,IS_SCRIPT_OR_DATA:St,ATTR_WHITESPACE:xt}=rt;let{IS_ALLOWED_URI:kt}=rt,Ot=null;const Ct=addToSet({},[...fe,...ye,...be,...we,...xe]);let At=null;const jt=addToSet({},[...Pe,...Te,...Re,...qe]);let It=Object.seal(P(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pt=null,Nt=null,Tt=!0,Mt=!0,Rt=!1,Dt=!0,Bt=!1,Lt=!1,Ft=!1,qt=!1,$t=!1,Ut=!1,zt=!1,Vt=!0,Wt=!1;const Kt="user-content-";let Ht=!0,Jt=!1,Gt={},Yt=null;const Xt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qt=null;const Zt=addToSet({},["audio","video","img","source","image","track"]);let er=null;const tr=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rr="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",sr="http://www.w3.org/1999/xhtml";let ar=sr,ir=!1,lr=null;const cr=addToSet({},[rr,nr,sr],ee);let ur=null;const pr=["application/xhtml+xml","text/html"],dr="text/html";let fr=null,mr=null;const gr=u.createElement("form"),yr=function isRegexOrFunction(s){return s instanceof RegExp||s instanceof Function},br=function _parseConfig(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mr||mr!==s){if(s&&"object"==typeof s||(s={}),s=clone(s),ur=ur=-1===pr.indexOf(s.PARSER_MEDIA_TYPE)?dr:s.PARSER_MEDIA_TYPE,fr="application/xhtml+xml"===ur?ee:Z,Ot="ALLOWED_TAGS"in s?addToSet({},s.ALLOWED_TAGS,fr):Ct,At="ALLOWED_ATTR"in s?addToSet({},s.ALLOWED_ATTR,fr):jt,lr="ALLOWED_NAMESPACES"in s?addToSet({},s.ALLOWED_NAMESPACES,ee):cr,er="ADD_URI_SAFE_ATTR"in s?addToSet(clone(tr),s.ADD_URI_SAFE_ATTR,fr):tr,Qt="ADD_DATA_URI_TAGS"in s?addToSet(clone(Zt),s.ADD_DATA_URI_TAGS,fr):Zt,Yt="FORBID_CONTENTS"in s?addToSet({},s.FORBID_CONTENTS,fr):Xt,Pt="FORBID_TAGS"in s?addToSet({},s.FORBID_TAGS,fr):{},Nt="FORBID_ATTR"in s?addToSet({},s.FORBID_ATTR,fr):{},Gt="USE_PROFILES"in s&&s.USE_PROFILES,Tt=!1!==s.ALLOW_ARIA_ATTR,Mt=!1!==s.ALLOW_DATA_ATTR,Rt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=!1!==s.ALLOW_SELF_CLOSE_IN_ATTR,Bt=s.SAFE_FOR_TEMPLATES||!1,Lt=s.WHOLE_DOCUMENT||!1,$t=s.RETURN_DOM||!1,Ut=s.RETURN_DOM_FRAGMENT||!1,zt=s.RETURN_TRUSTED_TYPE||!1,qt=s.FORCE_BODY||!1,Vt=!1!==s.SANITIZE_DOM,Wt=s.SANITIZE_NAMED_PROPS||!1,Ht=!1!==s.KEEP_CONTENT,Jt=s.IN_PLACE||!1,kt=s.ALLOWED_URI_REGEXP||Xe,ar=s.NAMESPACE||sr,It=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&yr(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(It.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&yr(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(It.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(It.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(Mt=!1),Ut&&($t=!0),Gt&&(Ot=addToSet({},[...xe]),At=[],!0===Gt.html&&(addToSet(Ot,fe),addToSet(At,Pe)),!0===Gt.svg&&(addToSet(Ot,ye),addToSet(At,Te),addToSet(At,qe)),!0===Gt.svgFilters&&(addToSet(Ot,be),addToSet(At,Te),addToSet(At,qe)),!0===Gt.mathMl&&(addToSet(Ot,we),addToSet(At,Re),addToSet(At,qe))),s.ADD_TAGS&&(Ot===Ct&&(Ot=clone(Ot)),addToSet(Ot,s.ADD_TAGS,fr)),s.ADD_ATTR&&(At===jt&&(At=clone(At)),addToSet(At,s.ADD_ATTR,fr)),s.ADD_URI_SAFE_ATTR&&addToSet(er,s.ADD_URI_SAFE_ATTR,fr),s.FORBID_CONTENTS&&(Yt===Xt&&(Yt=clone(Yt)),addToSet(Yt,s.FORBID_CONTENTS,fr)),Ht&&(Ot["#text"]=!0),Lt&&addToSet(Ot,["html","head","body"]),Ot.table&&(addToSet(Ot,["tbody"]),delete Pt.tbody),s.TRUSTED_TYPES_POLICY){if("function"!=typeof s.TRUSTED_TYPES_POLICY.createHTML)throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof s.TRUSTED_TYPES_POLICY.createScriptURL)throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ct=s.TRUSTED_TYPES_POLICY,ut=ct.createHTML("")}else void 0===ct&&(ct=ot(Qe,w)),null!==ct&&"string"==typeof ut&&(ut=ct.createHTML(""));x&&x(s),mr=s}},vr=addToSet({},["mi","mo","mn","ms","mtext"]),_r=addToSet({},["foreignobject","desc","title","annotation-xml"]),wr=addToSet({},["title","style","font","a","script"]),Er=addToSet({},ye);addToSet(Er,be),addToSet(Er,_e);const Sr=addToSet({},we);addToSet(Sr,Se);const xr=function _checkValidNamespace(s){let i=lt(s);i&&i.tagName||(i={namespaceURI:ar,tagName:"template"});const u=Z(s.tagName),_=Z(i.tagName);return!!lr[s.namespaceURI]&&(s.namespaceURI===nr?i.namespaceURI===sr?"svg"===u:i.namespaceURI===rr?"svg"===u&&("annotation-xml"===_||vr[_]):Boolean(Er[u]):s.namespaceURI===rr?i.namespaceURI===sr?"math"===u:i.namespaceURI===nr?"math"===u&&_r[_]:Boolean(Sr[u]):s.namespaceURI===sr?!(i.namespaceURI===nr&&!_r[_])&&!(i.namespaceURI===rr&&!vr[_])&&!Sr[u]&&(wr[u]||!Er[u]):!("application/xhtml+xml"!==ur||!lr[s.namespaceURI]))},kr=function _forceRemove(s){X(DOMPurify.removed,{element:s});try{s.parentNode.removeChild(s)}catch(i){s.remove()}},Or=function _removeAttribute(s,i){try{X(DOMPurify.removed,{attribute:i.getAttributeNode(s),from:i})}catch(s){X(DOMPurify.removed,{attribute:null,from:i})}if(i.removeAttribute(s),"is"===s&&!At[s])if($t||Ut)try{kr(i)}catch(s){}else try{i.setAttribute(s,"")}catch(s){}},Cr=function _initDocument(s){let i=null,_=null;if(qt)s=""+s;else{const i=ae(s,/^[\r\n\t ]+/);_=i&&i[0]}"application/xhtml+xml"===ur&&ar===sr&&(s=''+s+"");const w=ct?ct.createHTML(s):s;if(ar===sr)try{i=(new Ye).parseFromString(w,ur)}catch(s){}if(!i||!i.documentElement){i=pt.createDocument(ar,"template",null);try{i.documentElement.innerHTML=ir?ut:w}catch(s){}}const x=i.body||i.documentElement;return s&&_&&x.insertBefore(u.createTextNode(_),x.childNodes[0]||null),ar===sr?mt.call(i,Lt?"html":"body")[0]:Lt?i.documentElement:x},Ar=function _createNodeIterator(s){return ht.call(s.ownerDocument||s,s,ze.SHOW_ELEMENT|ze.SHOW_COMMENT|ze.SHOW_TEXT,null)},jr=function _isClobbered(s){return s instanceof He&&("string"!=typeof s.nodeName||"string"!=typeof s.textContent||"function"!=typeof s.removeChild||!(s.attributes instanceof We)||"function"!=typeof s.removeAttribute||"function"!=typeof s.setAttribute||"string"!=typeof s.namespaceURI||"function"!=typeof s.insertBefore||"function"!=typeof s.hasChildNodes)},Ir=function _isNode(s){return"function"==typeof $&&s instanceof $},Pr=function _executeHook(s,i,u){yt[s]&&U(yt[s],(s=>{s.call(DOMPurify,i,u,mr)}))},Nr=function _sanitizeElements(s){let i=null;if(Pr("beforeSanitizeElements",s,null),jr(s))return kr(s),!0;const u=fr(s.nodeName);if(Pr("uponSanitizeElement",s,{tagName:u,allowedTags:Ot}),s.hasChildNodes()&&!Ir(s.firstElementChild)&&pe(/<[/\w]/g,s.innerHTML)&&pe(/<[/\w]/g,s.textContent))return kr(s),!0;if(!Ot[u]||Pt[u]){if(!Pt[u]&&Mr(u)){if(It.tagNameCheck instanceof RegExp&&pe(It.tagNameCheck,u))return!1;if(It.tagNameCheck instanceof Function&&It.tagNameCheck(u))return!1}if(Ht&&!Yt[u]){const i=lt(s)||s.parentNode,u=it(s)||s.childNodes;if(u&&i)for(let _=u.length-1;_>=0;--_)i.insertBefore(st(u[_],!0),at(s))}return kr(s),!0}return s instanceof $e&&!xr(s)?(kr(s),!0):"noscript"!==u&&"noembed"!==u&&"noframes"!==u||!pe(/<\/no(script|embed|frames)/i,s.innerHTML)?(Bt&&3===s.nodeType&&(i=s.textContent,U([bt,vt,_t],(s=>{i=ie(i,s," ")})),s.textContent!==i&&(X(DOMPurify.removed,{element:s.cloneNode()}),s.textContent=i)),Pr("afterSanitizeElements",s,null),!1):(kr(s),!0)},Tr=function _isValidAttribute(s,i,_){if(Vt&&("id"===i||"name"===i)&&(_ in u||_ in gr))return!1;if(Mt&&!Nt[i]&&pe(wt,i));else if(Tt&&pe(Et,i));else if(!At[i]||Nt[i]){if(!(Mr(s)&&(It.tagNameCheck instanceof RegExp&&pe(It.tagNameCheck,s)||It.tagNameCheck instanceof Function&&It.tagNameCheck(s))&&(It.attributeNameCheck instanceof RegExp&&pe(It.attributeNameCheck,i)||It.attributeNameCheck instanceof Function&&It.attributeNameCheck(i))||"is"===i&&It.allowCustomizedBuiltInElements&&(It.tagNameCheck instanceof RegExp&&pe(It.tagNameCheck,_)||It.tagNameCheck instanceof Function&&It.tagNameCheck(_))))return!1}else if(er[i]);else if(pe(kt,ie(_,xt,"")));else if("src"!==i&&"xlink:href"!==i&&"href"!==i||"script"===s||0!==le(_,"data:")||!Qt[s])if(Rt&&!pe(St,ie(_,xt,"")));else if(_)return!1;return!0},Mr=function _isBasicCustomElement(s){return s.indexOf("-")>0},Rr=function _sanitizeAttributes(s){Pr("beforeSanitizeAttributes",s,null);const{attributes:i}=s;if(!i)return;const u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:At};let _=i.length;for(;_--;){const w=i[_],{name:x,namespaceURI:j,value:P}=w,B=fr(x);let $="value"===x?P:ce(P);if(u.attrName=B,u.attrValue=$,u.keepAttr=!0,u.forceKeepAttr=void 0,Pr("uponSanitizeAttribute",s,u),$=u.attrValue,u.forceKeepAttr)continue;if(Or(x,s),!u.keepAttr)continue;if(!Dt&&pe(/\/>/i,$)){Or(x,s);continue}Bt&&U([bt,vt,_t],(s=>{$=ie($,s," ")}));const X=fr(s.nodeName);if(Tr(X,B,$)){if(!Wt||"id"!==B&&"name"!==B||(Or(x,s),$=Kt+$),ct&&"object"==typeof Qe&&"function"==typeof Qe.getAttributeType)if(j);else switch(Qe.getAttributeType(X,B)){case"TrustedHTML":$=ct.createHTML($);break;case"TrustedScriptURL":$=ct.createScriptURL($)}try{j?s.setAttributeNS(j,x,$):s.setAttribute(x,$),Y(DOMPurify.removed)}catch(s){}}}Pr("afterSanitizeAttributes",s,null)},Dr=function _sanitizeShadowDOM(s){let i=null;const u=Ar(s);for(Pr("beforeSanitizeShadowDOM",s,null);i=u.nextNode();)Pr("uponSanitizeShadowNode",i,null),Nr(i)||(i.content instanceof j&&_sanitizeShadowDOM(i.content),Rr(i));Pr("afterSanitizeShadowDOM",s,null)};return DOMPurify.sanitize=function(s){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=null,w=null,x=null,P=null;if(ir=!s,ir&&(s="\x3c!--\x3e"),"string"!=typeof s&&!Ir(s)){if("function"!=typeof s.toString)throw de("toString is not a function");if("string"!=typeof(s=s.toString()))throw de("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return s;if(Ft||br(i),DOMPurify.removed=[],"string"==typeof s&&(Jt=!1),Jt){if(s.nodeName){const i=fr(s.nodeName);if(!Ot[i]||Pt[i])throw de("root node is forbidden and cannot be sanitized in-place")}}else if(s instanceof $)u=Cr("\x3c!----\x3e"),w=u.ownerDocument.importNode(s,!0),1===w.nodeType&&"BODY"===w.nodeName||"HTML"===w.nodeName?u=w:u.appendChild(w);else{if(!$t&&!Bt&&!Lt&&-1===s.indexOf("<"))return ct&&zt?ct.createHTML(s):s;if(u=Cr(s),!u)return $t?null:zt?ut:""}u&&qt&&kr(u.firstChild);const B=Ar(Jt?s:u);for(;x=B.nextNode();)Nr(x)||(x.content instanceof j&&Dr(x.content),Rr(x));if(Jt)return s;if($t){if(Ut)for(P=dt.call(u.ownerDocument);u.firstChild;)P.appendChild(u.firstChild);else P=u;return(At.shadowroot||At.shadowrootmode)&&(P=gt.call(_,P,!0)),P}let Y=Lt?u.outerHTML:u.innerHTML;return Lt&&Ot["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&pe(tt,u.ownerDocument.doctype.name)&&(Y="\n"+Y),Bt&&U([bt,vt,_t],(s=>{Y=ie(Y,s," ")})),ct&&zt?ct.createHTML(Y):Y},DOMPurify.setConfig=function(){br(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},DOMPurify.clearConfig=function(){mr=null,Ft=!1},DOMPurify.isValidAttribute=function(s,i,u){mr||br({});const _=fr(s),w=fr(i);return Tr(_,w,u)},DOMPurify.addHook=function(s,i){"function"==typeof i&&(yt[s]=yt[s]||[],X(yt[s],i))},DOMPurify.removeHook=function(s){if(yt[s])return Y(yt[s])},DOMPurify.removeHooks=function(s){yt[s]&&(yt[s]=[])},DOMPurify.removeAllHooks=function(){yt={}},DOMPurify}return createDOMPurify()}()},69450:s=>{"use strict";class SubRange{constructor(s,i){this.low=s,this.high=i,this.length=1+i-s}overlaps(s){return!(this.highs.high)}touches(s){return!(this.high+1s.high)}add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.low&&s.highs+i.length),0)}add(s,i){var _add=s=>{for(var i=0;i{for(var i=0;i{for(var i=0;i{for(var u=i.low;u<=i.high;)s.push(u),u++;return s}),[])}subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:1+s.high-s.low})))}}s.exports=DRange},17187:s=>{"use strict";var i,u="object"==typeof Reflect?Reflect:null,_=u&&"function"==typeof u.apply?u.apply:function ReflectApply(s,i,u){return Function.prototype.apply.call(s,i,u)};i=u&&"function"==typeof u.ownKeys?u.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s)};var w=Number.isNaN||function NumberIsNaN(s){return s!=s};function EventEmitter(){EventEmitter.init.call(this)}s.exports=EventEmitter,s.exports.once=function once(s,i){return new Promise((function(u,_){function errorListener(u){s.removeListener(i,resolver),_(u)}function resolver(){"function"==typeof s.removeListener&&s.removeListener("error",errorListener),u([].slice.call(arguments))}eventTargetAgnosticAddListener(s,i,resolver,{once:!0}),"error"!==i&&function addErrorHandlerIfEventEmitter(s,i,u){"function"==typeof s.on&&eventTargetAgnosticAddListener(s,"error",i,u)}(s,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var x=10;function checkListener(s){if("function"!=typeof s)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof s)}function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitter.defaultMaxListeners:s._maxListeners}function _addListener(s,i,u,_){var w,x,j;if(checkListener(u),void 0===(x=s._events)?(x=s._events=Object.create(null),s._eventsCount=0):(void 0!==x.newListener&&(s.emit("newListener",i,u.listener?u.listener:u),x=s._events),j=x[i]),void 0===j)j=x[i]=u,++s._eventsCount;else if("function"==typeof j?j=x[i]=_?[u,j]:[j,u]:_?j.unshift(u):j.push(u),(w=_getMaxListeners(s))>0&&j.length>w&&!j.warned){j.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=s,P.type=i,P.count=j.length,function ProcessEmitWarning(s){console&&console.warn&&console.warn(s)}(P)}return s}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(s,i,u){var _={fired:!1,wrapFn:void 0,target:s,type:i,listener:u},w=onceWrapper.bind(_);return w.listener=u,_.wrapFn=w,w}function _listeners(s,i,u){var _=s._events;if(void 0===_)return[];var w=_[i];return void 0===w?[]:"function"==typeof w?u?[w.listener||w]:[w]:u?function unwrapListeners(s){for(var i=new Array(s.length),u=0;u0&&(j=i[0]),j instanceof Error)throw j;var P=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw P.context=j,P}var B=x[s];if(void 0===B)return!1;if("function"==typeof B)_(B,this,i);else{var $=B.length,U=arrayClone(B,$);for(u=0;u<$;++u)_(U[u],this,i)}return!0},EventEmitter.prototype.addListener=function addListener(s,i){return _addListener(this,s,i,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(s,i){return _addListener(this,s,i,!0)},EventEmitter.prototype.once=function once(s,i){return checkListener(i),this.on(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(s,i){return checkListener(i),this.prependListener(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.removeListener=function removeListener(s,i){var u,_,w,x,j;if(checkListener(i),void 0===(_=this._events))return this;if(void 0===(u=_[s]))return this;if(u===i||u.listener===i)0==--this._eventsCount?this._events=Object.create(null):(delete _[s],_.removeListener&&this.emit("removeListener",s,u.listener||i));else if("function"!=typeof u){for(w=-1,x=u.length-1;x>=0;x--)if(u[x]===i||u[x].listener===i){j=u[x].listener,w=x;break}if(w<0)return this;0===w?u.shift():function spliceOne(s,i){for(;i+1=0;_--)this.removeListener(s,i[_]);return this},EventEmitter.prototype.listeners=function listeners(s){return _listeners(this,s,!0)},EventEmitter.prototype.rawListeners=function rawListeners(s){return _listeners(this,s,!1)},EventEmitter.listenerCount=function(s,i){return"function"==typeof s.listenerCount?s.listenerCount(i):listenerCount.call(s,i)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?i(this._events):[]}},21102:(s,i,u)=>{"use strict";var _=u(46291),w=create(Error);function create(s){return FormattedError.displayName=s.displayName||s.name,FormattedError;function FormattedError(i){return i&&(i=_.apply(null,arguments)),new s(i)}}s.exports=w,w.eval=create(EvalError),w.range=create(RangeError),w.reference=create(ReferenceError),w.syntax=create(SyntaxError),w.type=create(TypeError),w.uri=create(URIError),w.create=create},46291:s=>{!function(){var i;function format(s){for(var i,u,_,w,x=1,j=[].slice.call(arguments),P=0,B=s.length,$="",U=!1,Y=!1,nextArg=function(){return j[x++]},slurpNumber=function(){for(var u="";/\d/.test(s[P]);)u+=s[P++],i=s[P];return u.length>0?parseInt(u):null};P{"use strict";var i=Object.prototype.toString,u=Math.max,_=function concatty(s,i){for(var u=[],_=0;_{"use strict";var _=u(17648);s.exports=Function.prototype.bind||_},40210:(s,i,u)=>{"use strict";var _,w=SyntaxError,x=Function,j=TypeError,getEvalledConstructor=function(s){try{return x('"use strict"; return ('+s+").constructor;")()}catch(s){}},P=Object.getOwnPropertyDescriptor;if(P)try{P({},"")}catch(s){P=null}var throwTypeError=function(){throw new j},B=P?function(){try{return throwTypeError}catch(s){try{return P(arguments,"callee").get}catch(s){return throwTypeError}}}():throwTypeError,$=u(41405)(),U=u(28185)(),Y=Object.getPrototypeOf||(U?function(s){return s.__proto__}:null),X={},Z="undefined"!=typeof Uint8Array&&Y?Y(Uint8Array):_,ee={"%AggregateError%":"undefined"==typeof AggregateError?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?_:ArrayBuffer,"%ArrayIteratorPrototype%":$&&Y?Y([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":X,"%AsyncGenerator%":X,"%AsyncGeneratorFunction%":X,"%AsyncIteratorPrototype%":X,"%Atomics%":"undefined"==typeof Atomics?_:Atomics,"%BigInt%":"undefined"==typeof BigInt?_:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?_:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?_:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?_:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?_:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":X,"%Int8Array%":"undefined"==typeof Int8Array?_:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?_:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$&&Y?Y(Y([][Symbol.iterator]())):_,"%JSON%":"object"==typeof JSON?JSON:_,"%Map%":"undefined"==typeof Map?_:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&$&&Y?Y((new Map)[Symbol.iterator]()):_,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?_:Promise,"%Proxy%":"undefined"==typeof Proxy?_:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?_:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?_:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&$&&Y?Y((new Set)[Symbol.iterator]()):_,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$&&Y?Y(""[Symbol.iterator]()):_,"%Symbol%":$?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":B,"%TypedArray%":Z,"%TypeError%":j,"%Uint8Array%":"undefined"==typeof Uint8Array?_:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?_:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?_:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?_:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?_:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?_:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?_:WeakSet};if(Y)try{null.error}catch(s){var ae=Y(Y(s));ee["%Error.prototype%"]=ae}var ie=function doEval(s){var i;if("%AsyncFunction%"===s)i=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===s)i=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===s)i=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===s){var u=doEval("%AsyncGeneratorFunction%");u&&(i=u.prototype)}else if("%AsyncIteratorPrototype%"===s){var _=doEval("%AsyncGenerator%");_&&Y&&(i=Y(_.prototype))}return ee[s]=i,i},le={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ce=u(58612),pe=u(48824),de=ce.call(Function.call,Array.prototype.concat),fe=ce.call(Function.apply,Array.prototype.splice),ye=ce.call(Function.call,String.prototype.replace),be=ce.call(Function.call,String.prototype.slice),_e=ce.call(Function.call,RegExp.prototype.exec),we=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Se=/\\(\\)?/g,xe=function getBaseIntrinsic(s,i){var u,_=s;if(pe(le,_)&&(_="%"+(u=le[_])[0]+"%"),pe(ee,_)){var x=ee[_];if(x===X&&(x=ie(_)),void 0===x&&!i)throw new j("intrinsic "+s+" exists, but is not available. Please file an issue!");return{alias:u,name:_,value:x}}throw new w("intrinsic "+s+" does not exist!")};s.exports=function GetIntrinsic(s,i){if("string"!=typeof s||0===s.length)throw new j("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof i)throw new j('"allowMissing" argument must be a boolean');if(null===_e(/^%?[^%]*%?$/,s))throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var u=function stringToPath(s){var i=be(s,0,1),u=be(s,-1);if("%"===i&&"%"!==u)throw new w("invalid intrinsic syntax, expected closing `%`");if("%"===u&&"%"!==i)throw new w("invalid intrinsic syntax, expected opening `%`");var _=[];return ye(s,we,(function(s,i,u,w){_[_.length]=u?ye(w,Se,"$1"):i||s})),_}(s),_=u.length>0?u[0]:"",x=xe("%"+_+"%",i),B=x.name,$=x.value,U=!1,Y=x.alias;Y&&(_=Y[0],fe(u,de([0,1],Y)));for(var X=1,Z=!0;X=u.length){var ce=P($,ae);$=(Z=!!ce)&&"get"in ce&&!("originalValue"in ce.get)?ce.get:$[ae]}else Z=pe($,ae),$=$[ae];Z&&!U&&(ee[B]=$)}}return $}},27296:(s,i,u)=>{"use strict";var _=u(40210)("%Object.getOwnPropertyDescriptor%",!0);if(_)try{_([],"length")}catch(s){_=null}s.exports=_},31044:(s,i,u)=>{"use strict";var _=u(40210)("%Object.defineProperty%",!0),w=function hasPropertyDescriptors(){if(_)try{return _({},"a",{value:1}),!0}catch(s){return!1}return!1};w.hasArrayLengthDefineBug=function hasArrayLengthDefineBug(){if(!w())return null;try{return 1!==_([],"length",{value:1}).length}catch(s){return!0}},s.exports=w},28185:s=>{"use strict";var i={foo:{}},u=Object;s.exports=function hasProto(){return{__proto__:i}.foo===i.foo&&!({__proto__:null}instanceof u)}},41405:(s,i,u)=>{"use strict";var _="undefined"!=typeof Symbol&&Symbol,w=u(55419);s.exports=function hasNativeSymbols(){return"function"==typeof _&&("function"==typeof Symbol&&("symbol"==typeof _("foo")&&("symbol"==typeof Symbol("bar")&&w())))}},55419:s=>{"use strict";s.exports=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var s={},i=Symbol("test"),u=Object(i);if("string"==typeof i)return!1;if("[object Symbol]"!==Object.prototype.toString.call(i))return!1;if("[object Symbol]"!==Object.prototype.toString.call(u))return!1;for(i in s[i]=42,s)return!1;if("function"==typeof Object.keys&&0!==Object.keys(s).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(s).length)return!1;var _=Object.getOwnPropertySymbols(s);if(1!==_.length||_[0]!==i)return!1;if(!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var w=Object.getOwnPropertyDescriptor(s,i);if(42!==w.value||!0!==w.enumerable)return!1}return!0}},48824:(s,i,u)=>{"use strict";var _=Function.prototype.call,w=Object.prototype.hasOwnProperty,x=u(58612);s.exports=x.call(_,w)},47802:s=>{function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=function(){throw new Error("map is read-only")}:s instanceof Set&&(s.add=s.clear=s.delete=function(){throw new Error("set is read-only")}),Object.freeze(s),Object.getOwnPropertyNames(s).forEach((function(i){var u=s[i];"object"!=typeof u||Object.isFrozen(u)||deepFreeze(u)})),s}var i=deepFreeze,u=deepFreeze;i.default=u;class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(s){return s.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit(s,...i){const u=Object.create(null);for(const i in s)u[i]=s[i];return i.forEach((function(s){for(const i in s)u[i]=s[i]})),u}const emitsWrappingTags=s=>!!s.kind;class HTMLRenderer{constructor(s,i){this.buffer="",this.classPrefix=i.classPrefix,s.walk(this)}addText(s){this.buffer+=escapeHTML(s)}openNode(s){if(!emitsWrappingTags(s))return;let i=s.kind;s.sublanguage||(i=`${this.classPrefix}${i}`),this.span(i)}closeNode(s){emitsWrappingTags(s)&&(this.buffer+="")}value(){return this.buffer}span(s){this.buffer+=``}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(s){this.top.children.push(s)}openNode(s){const i={kind:s,children:[]};this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(s){return this.constructor._walk(s,this.rootNode)}static _walk(s,i){return"string"==typeof i?s.addText(i):i.children&&(s.openNode(i),i.children.forEach((i=>this._walk(s,i))),s.closeNode(i)),s}static _collapse(s){"string"!=typeof s&&s.children&&(s.children.every((s=>"string"==typeof s))?s.children=[s.children.join("")]:s.children.forEach((s=>{TokenTree._collapse(s)})))}}class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.options=s}addKeyword(s,i){""!==s&&(this.openNode(i),this.addText(s),this.closeNode())}addText(s){""!==s&&this.add(s)}addSublanguage(s,i){const u=s.root;u.kind=i,u.sublanguage=!0,this.add(u)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(s){return s?"string"==typeof s?s:s.source:null}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const w="[a-zA-Z]\\w*",x="[a-zA-Z_]\\w*",j="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",B="\\b(0b[01]+)",$={begin:"\\\\[\\s\\S]",relevance:0},U={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[$]},Y={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[$]},X={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT=function(s,i,u={}){const _=inherit({className:"comment",begin:s,end:i,contains:[]},u);return _.contains.push(X),_.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),_},Z=COMMENT("//","$"),ee=COMMENT("/\\*","\\*/"),ae=COMMENT("#","$"),ie={className:"number",begin:j,relevance:0},le={className:"number",begin:P,relevance:0},ce={className:"number",begin:B,relevance:0},pe={className:"number",begin:j+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},de={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[$,{begin:/\[/,end:/\]/,relevance:0,contains:[$]}]}]},fe={className:"title",begin:w,relevance:0},ye={className:"title",begin:x,relevance:0},be={begin:"\\.\\s*"+x,relevance:0};var _e=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:w,UNDERSCORE_IDENT_RE:x,NUMBER_RE:j,C_NUMBER_RE:P,BINARY_NUMBER_RE:B,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(s={})=>{const i=/^#![ ]*\//;return s.binary&&(s.begin=function concat(...s){return s.map((s=>source(s))).join("")}(i,/.*\b/,s.binary,/\b.*/)),inherit({className:"meta",begin:i,end:/$/,relevance:0,"on:begin":(s,i)=>{0!==s.index&&i.ignoreMatch()}},s)},BACKSLASH_ESCAPE:$,APOS_STRING_MODE:U,QUOTE_STRING_MODE:Y,PHRASAL_WORDS_MODE:X,COMMENT,C_LINE_COMMENT_MODE:Z,C_BLOCK_COMMENT_MODE:ee,HASH_COMMENT_MODE:ae,NUMBER_MODE:ie,C_NUMBER_MODE:le,BINARY_NUMBER_MODE:ce,CSS_NUMBER_MODE:pe,REGEXP_MODE:de,TITLE_MODE:fe,UNDERSCORE_TITLE_MODE:ye,METHOD_GUARD:be,END_SAME_AS_BEGIN:function(s){return Object.assign(s,{"on:begin":(s,i)=>{i.data._beginMatch=s[1]},"on:end":(s,i)=>{i.data._beginMatch!==s[1]&&i.ignoreMatch()}})}});function skipIfhasPrecedingDot(s,i){"."===s.input[s.index-1]&&i.ignoreMatch()}function beginKeywords(s,i){i&&s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",s.__beforeBegin=skipIfhasPrecedingDot,s.keywords=s.keywords||s.beginKeywords,delete s.beginKeywords,void 0===s.relevance&&(s.relevance=0))}function compileIllegal(s,i){Array.isArray(s.illegal)&&(s.illegal=function either(...s){return"("+s.map((s=>source(s))).join("|")+")"}(...s.illegal))}function compileMatch(s,i){if(s.match){if(s.begin||s.end)throw new Error("begin & end are not supported with match");s.begin=s.match,delete s.match}}function compileRelevance(s,i){void 0===s.relevance&&(s.relevance=1)}const we=["of","and","for","in","not","or","if","then","parent","list","value"],Se="keyword";function compileKeywords(s,i,u=Se){const _={};return"string"==typeof s?compileList(u,s.split(" ")):Array.isArray(s)?compileList(u,s):Object.keys(s).forEach((function(u){Object.assign(_,compileKeywords(s[u],i,u))})),_;function compileList(s,u){i&&(u=u.map((s=>s.toLowerCase()))),u.forEach((function(i){const u=i.split("|");_[u[0]]=[s,scoreForKeyword(u[0],u[1])]}))}}function scoreForKeyword(s,i){return i?Number(i):function commonKeyword(s){return we.includes(s.toLowerCase())}(s)?0:1}function compileLanguage(s,{plugins:i}){function langRe(i,u){return new RegExp(source(i),"m"+(s.case_insensitive?"i":"")+(u?"g":""))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,i){i.position=this.position++,this.matchIndexes[this.matchAt]=i,this.regexes.push([i,s]),this.matchAt+=function countMatchGroups(s){return new RegExp(s.toString()+"|").exec("").length-1}(s)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const s=this.regexes.map((s=>s[1]));this.matcherRe=langRe(function join(s,i="|"){let u=0;return s.map((s=>{u+=1;const i=u;let w=source(s),x="";for(;w.length>0;){const s=_.exec(w);if(!s){x+=w;break}x+=w.substring(0,s.index),w=w.substring(s.index+s[0].length),"\\"===s[0][0]&&s[1]?x+="\\"+String(Number(s[1])+i):(x+=s[0],"("===s[0]&&u++)}return x})).map((s=>`(${s})`)).join(i)}(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const i=this.matcherRe.exec(s);if(!i)return null;const u=i.findIndex(((s,i)=>i>0&&void 0!==s)),_=this.matchIndexes[u];return i.splice(0,u),Object.assign(i,_)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const i=new MultiRegex;return this.rules.slice(s).forEach((([s,u])=>i.addRule(s,u))),i.compile(),this.multiRegexes[s]=i,i}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(s,i){this.rules.push([s,i]),"begin"===i.type&&this.count++}exec(s){const i=this.getMatcher(this.regexIndex);i.lastIndex=this.lastIndex;let u=i.exec(s);if(this.resumingScanAtSamePosition())if(u&&u.index===this.lastIndex);else{const i=this.getMatcher(0);i.lastIndex=this.lastIndex+1,u=i.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}if(s.compilerExtensions||(s.compilerExtensions=[]),s.contains&&s.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return s.classNameAliases=inherit(s.classNameAliases||{}),function compileMode(i,u){const _=i;if(i.isCompiled)return _;[compileMatch].forEach((s=>s(i,u))),s.compilerExtensions.forEach((s=>s(i,u))),i.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((s=>s(i,u))),i.isCompiled=!0;let w=null;if("object"==typeof i.keywords&&(w=i.keywords.$pattern,delete i.keywords.$pattern),i.keywords&&(i.keywords=compileKeywords(i.keywords,s.case_insensitive)),i.lexemes&&w)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return w=w||i.lexemes||/\w+/,_.keywordPatternRe=langRe(w,!0),u&&(i.begin||(i.begin=/\B|\b/),_.beginRe=langRe(i.begin),i.endSameAsBegin&&(i.end=i.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(_.endRe=langRe(i.end)),_.terminatorEnd=source(i.end)||"",i.endsWithParent&&u.terminatorEnd&&(_.terminatorEnd+=(i.end?"|":"")+u.terminatorEnd)),i.illegal&&(_.illegalRe=langRe(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(s){return function expandOrCloneMode(s){s.variants&&!s.cachedVariants&&(s.cachedVariants=s.variants.map((function(i){return inherit(s,{variants:null},i)})));if(s.cachedVariants)return s.cachedVariants;if(dependencyOnParent(s))return inherit(s,{starts:s.starts?inherit(s.starts):null});if(Object.isFrozen(s))return inherit(s);return s}("self"===s?i:s)}))),i.contains.forEach((function(s){compileMode(s,_)})),i.starts&&compileMode(i.starts,u),_.matcher=function buildModeRegex(s){const i=new ResumableMultiRegex;return s.contains.forEach((s=>i.addRule(s.begin,{rule:s,type:"begin"}))),s.terminatorEnd&&i.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&i.addRule(s.illegal,{type:"illegal"}),i}(_),_}(s)}function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyOnParent(s.starts))}function BuildVuePlugin(s){const i={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!s.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let i={};return this.autoDetect?(i=s.highlightAuto(this.code),this.detectedLanguage=i.language):(i=s.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),i.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(s){return Boolean(s||""===s)}(this.autodetect)},ignoreIllegals:()=>!0},render(s){return s("pre",{},[s("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:i,VuePlugin:{install(s){s.component("highlightjs",i)}}}}const xe={"after:highlightElement":({el:s,result:i,text:u})=>{const _=nodeStream(s);if(!_.length)return;const w=document.createElement("div");w.innerHTML=i.value,i.value=function mergeStreams(s,i,u){let _=0,w="";const x=[];function selectStream(){return s.length&&i.length?s[0].offset!==i[0].offset?s[0].offset"}function close(s){w+=""}function render(s){("start"===s.event?open:close)(s.node)}for(;s.length||i.length;){let i=selectStream();if(w+=escapeHTML(u.substring(_,i[0].offset)),_=i[0].offset,i===s){x.reverse().forEach(close);do{render(i.splice(0,1)[0]),i=selectStream()}while(i===s&&i.length&&i[0].offset===_);x.reverse().forEach(open)}else"start"===i[0].event?x.push(i[0].node):x.pop(),render(i.splice(0,1)[0])}return w+escapeHTML(u.substr(_))}(_,nodeStream(w),u)}};function tag(s){return s.nodeName.toLowerCase()}function nodeStream(s){const i=[];return function _nodeStream(s,u){for(let _=s.firstChild;_;_=_.nextSibling)3===_.nodeType?u+=_.nodeValue.length:1===_.nodeType&&(i.push({event:"start",offset:u,node:_}),u=_nodeStream(_,u),tag(_).match(/br|hr|img|input/)||i.push({event:"stop",offset:u,node:_}));return u}(s,0),i}const Pe={},error=s=>{console.error(s)},warn=(s,...i)=>{console.log(`WARN: ${s}`,...i)},deprecated=(s,i)=>{Pe[`${s}/${i}`]||(console.log(`Deprecated as of ${s}. ${i}`),Pe[`${s}/${i}`]=!0)},Te=escapeHTML,Re=inherit,qe=Symbol("nomatch");var $e=function(s){const u=Object.create(null),_=Object.create(null),w=[];let x=!0;const j=/(^(<[^>]+>|\t|)+|\n)/gm,P="Could not find the language '{}', did you forget to load/include a language module?",B={disableAutodetect:!0,name:"Plain text",contains:[]};let $={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(s){return $.noHighlightRe.test(s)}function highlight(s,i,u,_){let w="",x="";"object"==typeof i?(w=s,u=i.ignoreIllegals,x=i.language,_=void 0):(deprecated("10.7.0","highlight(lang, code, ...args) has been deprecated."),deprecated("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),x=s,w=i);const j={code:w,language:x};fire("before:highlight",j);const P=j.result?j.result:_highlight(j.language,j.code,u,_);return P.code=j.code,fire("after:highlight",P),P}function _highlight(s,i,_,j){function keywordData(s,i){const u=U.case_insensitive?i[0].toLowerCase():i[0];return Object.prototype.hasOwnProperty.call(s.keywords,u)&&s.keywords[u]}function processBuffer(){null!=Z.subLanguage?function processSubLanguage(){if(""===ie)return;let s=null;if("string"==typeof Z.subLanguage){if(!u[Z.subLanguage])return void ae.addText(ie);s=_highlight(Z.subLanguage,ie,!0,ee[Z.subLanguage]),ee[Z.subLanguage]=s.top}else s=highlightAuto(ie,Z.subLanguage.length?Z.subLanguage:null);Z.relevance>0&&(le+=s.relevance),ae.addSublanguage(s.emitter,s.language)}():function processKeywords(){if(!Z.keywords)return void ae.addText(ie);let s=0;Z.keywordPatternRe.lastIndex=0;let i=Z.keywordPatternRe.exec(ie),u="";for(;i;){u+=ie.substring(s,i.index);const _=keywordData(Z,i);if(_){const[s,w]=_;if(ae.addText(u),u="",le+=w,s.startsWith("_"))u+=i[0];else{const u=U.classNameAliases[s]||s;ae.addKeyword(i[0],u)}}else u+=i[0];s=Z.keywordPatternRe.lastIndex,i=Z.keywordPatternRe.exec(ie)}u+=ie.substr(s),ae.addText(u)}(),ie=""}function startNewMode(s){return s.className&&ae.openNode(U.classNameAliases[s.className]||s.className),Z=Object.create(s,{parent:{value:Z}}),Z}function endOfMode(s,i,u){let _=function startsWith(s,i){const u=s&&s.exec(i);return u&&0===u.index}(s.endRe,u);if(_){if(s["on:end"]){const u=new Response(s);s["on:end"](i,u),u.isMatchIgnored&&(_=!1)}if(_){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return endOfMode(s.parent,i,u)}function doIgnore(s){return 0===Z.matcher.regexIndex?(ie+=s[0],1):(de=!0,0)}function doBeginMatch(s){const i=s[0],u=s.rule,_=new Response(u),w=[u.__beforeBegin,u["on:begin"]];for(const u of w)if(u&&(u(s,_),_.isMatchIgnored))return doIgnore(i);return u&&u.endSameAsBegin&&(u.endRe=function escape(s){return new RegExp(s.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}(i)),u.skip?ie+=i:(u.excludeBegin&&(ie+=i),processBuffer(),u.returnBegin||u.excludeBegin||(ie=i)),startNewMode(u),u.returnBegin?0:i.length}function doEndMatch(s){const u=s[0],_=i.substr(s.index),w=endOfMode(Z,s,_);if(!w)return qe;const x=Z;x.skip?ie+=u:(x.returnEnd||x.excludeEnd||(ie+=u),processBuffer(),x.excludeEnd&&(ie=u));do{Z.className&&ae.closeNode(),Z.skip||Z.subLanguage||(le+=Z.relevance),Z=Z.parent}while(Z!==w.parent);return w.starts&&(w.endSameAsBegin&&(w.starts.endRe=w.endRe),startNewMode(w.starts)),x.returnEnd?0:u.length}let B={};function processLexeme(u,w){const j=w&&w[0];if(ie+=u,null==j)return processBuffer(),0;if("begin"===B.type&&"end"===w.type&&B.index===w.index&&""===j){if(ie+=i.slice(w.index,w.index+1),!x){const i=new Error("0 width match regex");throw i.languageName=s,i.badRule=B.rule,i}return 1}if(B=w,"begin"===w.type)return doBeginMatch(w);if("illegal"===w.type&&!_){const s=new Error('Illegal lexeme "'+j+'" for mode "'+(Z.className||"")+'"');throw s.mode=Z,s}if("end"===w.type){const s=doEndMatch(w);if(s!==qe)return s}if("illegal"===w.type&&""===j)return 1;if(pe>1e5&&pe>3*w.index){throw new Error("potential infinite loop, way more iterations than matches")}return ie+=j,j.length}const U=getLanguage(s);if(!U)throw error(P.replace("{}",s)),new Error('Unknown language: "'+s+'"');const Y=compileLanguage(U,{plugins:w});let X="",Z=j||Y;const ee={},ae=new $.__emitter($);!function processContinuations(){const s=[];for(let i=Z;i!==U;i=i.parent)i.className&&s.unshift(i.className);s.forEach((s=>ae.openNode(s)))}();let ie="",le=0,ce=0,pe=0,de=!1;try{for(Z.matcher.considerAll();;){pe++,de?de=!1:Z.matcher.considerAll(),Z.matcher.lastIndex=ce;const s=Z.matcher.exec(i);if(!s)break;const u=processLexeme(i.substring(ce,s.index),s);ce=s.index+u}return processLexeme(i.substr(ce)),ae.closeAllNodes(),ae.finalize(),X=ae.toHTML(),{relevance:Math.floor(le),value:X,language:s,illegal:!1,emitter:ae,top:Z}}catch(u){if(u.message&&u.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:u.message,context:i.slice(ce-100,ce+100),mode:u.mode},sofar:X,relevance:0,value:Te(i),emitter:ae};if(x)return{illegal:!1,relevance:0,value:Te(i),emitter:ae,language:s,top:Z,errorRaised:u};throw u}}function highlightAuto(s,i){i=i||$.languages||Object.keys(u);const _=function justTextHighlightResult(s){const i={relevance:0,emitter:new $.__emitter($),value:Te(s),illegal:!1,top:B};return i.emitter.addText(s),i}(s),w=i.filter(getLanguage).filter(autoDetection).map((i=>_highlight(i,s,!1)));w.unshift(_);const x=w.sort(((s,i)=>{if(s.relevance!==i.relevance)return i.relevance-s.relevance;if(s.language&&i.language){if(getLanguage(s.language).supersetOf===i.language)return 1;if(getLanguage(i.language).supersetOf===s.language)return-1}return 0})),[j,P]=x,U=j;return U.second_best=P,U}const U={"before:highlightElement":({el:s})=>{$.useBR&&(s.innerHTML=s.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:s})=>{$.useBR&&(s.value=s.value.replace(/\n/g,"
"))}},Y=/^(<[^>]+>|\t)+/gm,X={"after:highlightElement":({result:s})=>{$.tabReplace&&(s.value=s.value.replace(Y,(s=>s.replace(/\t/g,$.tabReplace))))}};function highlightElement(s){let i=null;const u=function blockLanguage(s){let i=s.className+" ";i+=s.parentNode?s.parentNode.className:"";const u=$.languageDetectRe.exec(i);if(u){const i=getLanguage(u[1]);return i||(warn(P.replace("{}",u[1])),warn("Falling back to no-highlight mode for this block.",s)),i?u[1]:"no-highlight"}return i.split(/\s+/).find((s=>shouldNotHighlight(s)||getLanguage(s)))}(s);if(shouldNotHighlight(u))return;fire("before:highlightElement",{el:s,language:u}),i=s;const w=i.textContent,x=u?highlight(w,{language:u,ignoreIllegals:!0}):highlightAuto(w);fire("after:highlightElement",{el:s,result:x,text:w}),s.innerHTML=x.value,function updateClassName(s,i,u){const w=i?_[i]:u;s.classList.add("hljs"),w&&s.classList.add(w)}(s,u,x.language),s.result={language:x.language,re:x.relevance,relavance:x.relevance},x.second_best&&(s.second_best={language:x.second_best.language,re:x.second_best.relevance,relavance:x.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(highlightElement)};let Z=!1;function highlightAll(){if("loading"===document.readyState)return void(Z=!0);document.querySelectorAll("pre code").forEach(highlightElement)}function getLanguage(s){return s=(s||"").toLowerCase(),u[s]||u[_[s]]}function registerAliases(s,{languageName:i}){"string"==typeof s&&(s=[s]),s.forEach((s=>{_[s.toLowerCase()]=i}))}function autoDetection(s){const i=getLanguage(s);return i&&!i.disableAutodetect}function fire(s,i){const u=s;w.forEach((function(s){s[u]&&s[u](i)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function boot(){Z&&highlightAll()}),!1),Object.assign(s,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(s){return deprecated("10.2.0","fixMarkup will be removed entirely in v11.0"),deprecated("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),function fixMarkup(s){return $.tabReplace||$.useBR?s.replace(j,(s=>"\n"===s?$.useBR?"
":s:$.tabReplace?s.replace(/\t/g,$.tabReplace):s)):s}(s)},highlightElement,highlightBlock:function deprecateHighlightBlock(s){return deprecated("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated("10.7.0","Please use highlightElement now."),highlightElement(s)},configure:function configure(s){s.useBR&&(deprecated("10.3.0","'useBR' will be removed entirely in v11.0"),deprecated("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),$=Re($,s)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),Z=!0},registerLanguage:function registerLanguage(i,_){let w=null;try{w=_(s)}catch(s){if(error("Language definition for '{}' could not be registered.".replace("{}",i)),!x)throw s;error(s),w=B}w.name||(w.name=i),u[i]=w,w.rawDefinition=_.bind(null,s),w.aliases&®isterAliases(w.aliases,{languageName:i})},unregisterLanguage:function unregisterLanguage(s){delete u[s];for(const i of Object.keys(_))_[i]===s&&delete _[i]},listLanguages:function listLanguages(){return Object.keys(u)},getLanguage,registerAliases,requireLanguage:function requireLanguage(s){deprecated("10.4.0","requireLanguage will be removed entirely in v11."),deprecated("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const i=getLanguage(s);if(i)return i;throw new Error("The '{}' language is required, but not loaded.".replace("{}",s))},autoDetection,inherit:Re,addPlugin:function addPlugin(s){!function upgradePluginAPI(s){s["before:highlightBlock"]&&!s["before:highlightElement"]&&(s["before:highlightElement"]=i=>{s["before:highlightBlock"](Object.assign({block:i.el},i))}),s["after:highlightBlock"]&&!s["after:highlightElement"]&&(s["after:highlightElement"]=i=>{s["after:highlightBlock"](Object.assign({block:i.el},i))})}(s),w.push(s)},vuePlugin:BuildVuePlugin(s).VuePlugin}),s.debugMode=function(){x=!1},s.safeMode=function(){x=!0},s.versionString="10.7.3";for(const s in _e)"object"==typeof _e[s]&&i(_e[s]);return Object.assign(s,_e),s.addPlugin(U),s.addPlugin(xe),s.addPlugin(X),s}({});s.exports=$e},61519:s=>{function concat(...s){return s.map((s=>function source(s){return s?"string"==typeof s?s:s.source:null}(s))).join("")}s.exports=function bash(s){const i={},u={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},u]});const _={className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},w={begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},x={className:"string",begin:/"/,end:/"/,contains:[s.BACKSLASH_ESCAPE,i,_]};_.contains.push(x);const j={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,i]},P=s.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),B={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"},contains:[P,s.SHEBANG(),B,j,s.HASH_COMMENT_MODE,w,x,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},i]}}},30786:s=>{function concat(...s){return s.map((s=>function source(s){return s?"string"==typeof s?s:s.source:null}(s))).join("")}s.exports=function http(s){const i="HTTP/(2|1\\.[01])",u={className:"attribute",begin:concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},_=[u,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+i+" \\d{3})",end:/$/,contains:[{className:"meta",begin:i},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:_}},{begin:"(?=^[A-Z]+ (.*?) "+i+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:i},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:_}},s.inherit(u,{relevance:0})]}}},96344:s=>{const i="[A-Za-z$_][0-9A-Za-z$_]*",u=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],_=["true","false","null","undefined","NaN","Infinity"],w=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function lookahead(s){return concat("(?=",s,")")}function concat(...s){return s.map((s=>function source(s){return s?"string"==typeof s?s:s.source:null}(s))).join("")}s.exports=function javascript(s){const x=i,j="<>",P="",B={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(s,i)=>{const u=s[0].length+s.index,_=s.input[u];"<"!==_?">"===_&&(((s,{after:i})=>{const u="",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:$,contains:fe}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:j,end:P},{begin:B.begin,"on:begin":B.isTrulyOpeningTag,end:B.end}],subLanguage:"xml",contains:[{begin:B.begin,end:B.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:$,contains:["self",s.inherit(s.TITLE_MODE,{begin:x}),ye],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:s.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[ye,s.inherit(s.TITLE_MODE,{begin:x})]},{variants:[{begin:"\\."+x},{begin:"\\$"+x}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},s.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[s.inherit(s.TITLE_MODE,{begin:x}),"self",ye]},{begin:"(get|set)\\s+(?="+x+"\\()",end:/\{/,keywords:"get set",contains:[s.inherit(s.TITLE_MODE,{begin:x}),{begin:/\(\)/},ye]},{begin:/\$[(.]/}]}}},82026:s=>{s.exports=function json(s){const i={literal:"true false null"},u=[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],_=[s.QUOTE_STRING_MODE,s.C_NUMBER_MODE],w={end:",",endsWithParent:!0,excludeEnd:!0,contains:_,keywords:i},x={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[s.BACKSLASH_ESCAPE],illegal:"\\n"},s.inherit(w,{begin:/:/})].concat(u),illegal:"\\S"},j={begin:"\\[",end:"\\]",contains:[s.inherit(w)],illegal:"\\S"};return _.push(x,j),u.forEach((function(s){_.push(s)})),{name:"JSON",contains:_,keywords:i,illegal:"\\S"}}},66336:s=>{s.exports=function powershell(s){const i={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},u={begin:"`[\\s\\S]",relevance:0},_={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},w={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[u,_,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},x={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},j=s.inherit(s.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),P={className:"built_in",variants:[{begin:"(".concat("Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",")+(-)[\\w\\d]+")}]},B={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[s.TITLE_MODE]},$={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:/\w[\w\d]*((-)[\w\d]+)*/,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[_]}]},U={begin:/using\s/,end:/$/,returnBegin:!0,contains:[w,x,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},Y={variants:[{className:"operator",begin:"(".concat("-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",")\\b")},{className:"literal",begin:/(-)[\w\d]+/,relevance:0}]},X={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(i.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},s.inherit(s.TITLE_MODE,{endsParent:!0})]},Z=[X,j,u,s.NUMBER_MODE,w,x,P,_,{className:"literal",begin:/\$(null|true|false)\b/},{className:"selector-tag",begin:/@\B/,relevance:0}],ee={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",Z,{begin:"("+["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"].join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return X.contains.unshift(ee),{name:"PowerShell",aliases:["ps","ps1"],case_insensitive:!0,keywords:i,contains:Z.concat(B,$,U,Y,ee)}}},42157:s=>{function source(s){return s?"string"==typeof s?s:s.source:null}function lookahead(s){return concat("(?=",s,")")}function concat(...s){return s.map((s=>source(s))).join("")}function either(...s){return"("+s.map((s=>source(s))).join("|")+")"}s.exports=function xml(s){const i=concat(/[A-Z_]/,function optional(s){return concat("(",s,")?")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),u={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},_={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},w=s.inherit(_,{begin:/\(/,end:/\)/}),x=s.inherit(s.APOS_STRING_MODE,{className:"meta-string"}),j=s.inherit(s.QUOTE_STRING_MODE,{className:"meta-string"}),P={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[_,j,x,w,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[_,w,j,x]}]}]},s.COMMENT(//,{relevance:10}),{begin://,relevance:10},u,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[P],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[P],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:P}]},{className:"tag",begin:concat(/<\//,lookahead(concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},54587:s=>{s.exports=function yaml(s){var i="true false yes no null",u="[\\w#;/?:@&=+$,.~*'()[\\]]+",_={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},w=s.inherit(_,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},j={end:",",endsWithParent:!0,excludeEnd:!0,keywords:i,relevance:0},P={begin:/\{/,end:/\}/,contains:[j],illegal:"\\n",relevance:0},B={begin:"\\[",end:"\\]",contains:[j],illegal:"\\n",relevance:0},$=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+u},{className:"type",begin:"!<"+u+">"},{className:"type",begin:"!"+u},{className:"type",begin:"!!"+u},{className:"meta",begin:"&"+s.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+s.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:i,keywords:{literal:i}},x,{className:"number",begin:s.C_NUMBER_RE+"\\b",relevance:0},P,B,_],U=[...$];return U.pop(),U.push(w),j.contains=U,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:$}}},80645:(s,i)=>{i.read=function(s,i,u,_,w){var x,j,P=8*w-_-1,B=(1<>1,U=-7,Y=u?w-1:0,X=u?-1:1,Z=s[i+Y];for(Y+=X,x=Z&(1<<-U)-1,Z>>=-U,U+=P;U>0;x=256*x+s[i+Y],Y+=X,U-=8);for(j=x&(1<<-U)-1,x>>=-U,U+=_;U>0;j=256*j+s[i+Y],Y+=X,U-=8);if(0===x)x=1-$;else{if(x===B)return j?NaN:1/0*(Z?-1:1);j+=Math.pow(2,_),x-=$}return(Z?-1:1)*j*Math.pow(2,x-_)},i.write=function(s,i,u,_,w,x){var j,P,B,$=8*x-w-1,U=(1<<$)-1,Y=U>>1,X=23===w?Math.pow(2,-24)-Math.pow(2,-77):0,Z=_?0:x-1,ee=_?1:-1,ae=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(P=isNaN(i)?1:0,j=U):(j=Math.floor(Math.log(i)/Math.LN2),i*(B=Math.pow(2,-j))<1&&(j--,B*=2),(i+=j+Y>=1?X/B:X*Math.pow(2,1-Y))*B>=2&&(j++,B/=2),j+Y>=U?(P=0,j=U):j+Y>=1?(P=(i*B-1)*Math.pow(2,w),j+=Y):(P=i*Math.pow(2,Y-1)*Math.pow(2,w),j=0));w>=8;s[u+Z]=255&P,Z+=ee,P/=256,w-=8);for(j=j<0;s[u+Z]=255&j,Z+=ee,j/=256,$-=8);s[u+Z-ee]|=128*ae}},43393:function(s){s.exports=function(){"use strict";var s=Array.prototype.slice;function createClass(s,i){i&&(s.prototype=Object.create(i.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[i])}function isKeyed(s){return!(!s||!s[u])}function isIndexed(s){return!(!s||!s[_])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[w])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var i="@@__IMMUTABLE_ITERABLE__@@",u="@@__IMMUTABLE_KEYED__@@",_="@@__IMMUTABLE_INDEXED__@@",w="@@__IMMUTABLE_ORDERED__@@",x="delete",j=5,P=1<>>0;if(""+u!==i||4294967295===u)return NaN;i=u}return i<0?ensureSize(s)+i:i}function returnTrue(){return!0}function wholeSlice(s,i,u){return(0===s||void 0!==u&&s<=-u)&&(void 0===i||void 0!==u&&i>=u)}function resolveBegin(s,i){return resolveIndex(s,i,0)}function resolveEnd(s,i){return resolveIndex(s,i,i)}function resolveIndex(s,i,u){return void 0===s?u:s<0?Math.max(0,i+s):void 0===i?s:Math.min(i,s)}var X=0,Z=1,ee=2,ae="function"==typeof Symbol&&Symbol.iterator,ie="@@iterator",le=ae||ie;function Iterator(s){this.next=s}function iteratorValue(s,i,u,_){var w=0===s?i:1===s?u:[i,u];return _?_.value=w:_={value:w,done:!1},_}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&"function"==typeof s.next}function getIterator(s){var i=getIteratorFn(s);return i&&i.call(s)}function getIteratorFn(s){var i=s&&(ae&&s[ae]||s[ie]);if("function"==typeof i)return i}function isArrayLike(s){return s&&"number"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=X,Iterator.VALUES=Z,Iterator.ENTRIES=ee,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[le]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!0)},Seq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!1)},IndexedSeq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ce,pe,de,fe="@@__IMMUTABLE_SEQ__@@";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var i=Object.keys(s);this._object=s,this._keys=i,this.size=i.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[fe])}function emptySequence(){return ce||(ce=new ArraySeq([]))}function keyedSeqFromValue(s){var i=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():"object"==typeof s?new ObjectSeq(s):void 0;if(!i)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+s);return i}function indexedSeqFromValue(s){var i=maybeIndexedSeqFromValue(s);if(!i)throw new TypeError("Expected Array or iterable object of values: "+s);return i}function seqFromValue(s){var i=maybeIndexedSeqFromValue(s)||"object"==typeof s&&new ObjectSeq(s);if(!i)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+s);return i}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,i,u,_){var w=s._cache;if(w){for(var x=w.length-1,j=0;j<=x;j++){var P=w[u?x-j:j];if(!1===i(P[1],_?P[0]:j,s))return j+1}return j}return s.__iterateUncached(i,u)}function seqIterator(s,i,u,_){var w=s._cache;if(w){var x=w.length-1,j=0;return new Iterator((function(){var s=w[u?x-j:j];return j++>x?iteratorDone():iteratorValue(i,_?s[0]:j-1,s[1])}))}return s.__iteratorUncached(i,u)}function fromJS(s,i){return i?fromJSWith(i,s,"",{"":s}):fromJSDefault(s)}function fromJSWith(s,i,u,_){return Array.isArray(i)?s.call(_,u,IndexedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):isPlainObj(i)?s.call(_,u,KeyedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):i}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,i){if(s===i||s!=s&&i!=i)return!0;if(!s||!i)return!1;if("function"==typeof s.valueOf&&"function"==typeof i.valueOf){if((s=s.valueOf())===(i=i.valueOf())||s!=s&&i!=i)return!0;if(!s||!i)return!1}return!("function"!=typeof s.equals||"function"!=typeof i.equals||!s.equals(i))}function deepEqual(s,i){if(s===i)return!0;if(!isIterable(i)||void 0!==s.size&&void 0!==i.size&&s.size!==i.size||void 0!==s.__hash&&void 0!==i.__hash&&s.__hash!==i.__hash||isKeyed(s)!==isKeyed(i)||isIndexed(s)!==isIndexed(i)||isOrdered(s)!==isOrdered(i))return!1;if(0===s.size&&0===i.size)return!0;var u=!isAssociative(s);if(isOrdered(s)){var _=s.entries();return i.every((function(s,i){var w=_.next().value;return w&&is(w[1],s)&&(u||is(w[0],i))}))&&_.next().done}var w=!1;if(void 0===s.size)if(void 0===i.size)"function"==typeof s.cacheResult&&s.cacheResult();else{w=!0;var x=s;s=i,i=x}var j=!0,P=i.__iterate((function(i,_){if(u?!s.has(i):w?!is(i,s.get(_,$)):!is(s.get(_,$),i))return j=!1,!1}));return j&&s.size===P}function Repeat(s,i){if(!(this instanceof Repeat))return new Repeat(s,i);if(this._value=s,this.size=void 0===i?1/0:Math.max(0,i),0===this.size){if(pe)return pe;pe=this}}function invariant(s,i){if(!s)throw new Error(i)}function Range(s,i,u){if(!(this instanceof Range))return new Range(s,i,u);if(invariant(0!==u,"Cannot step a Range by 0"),s=s||0,void 0===i&&(i=1/0),u=void 0===u?1:Math.abs(u),i_?iteratorDone():iteratorValue(s,w,u[i?_-w++:w++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,i){return void 0===i||this.has(s)?this._object[s]:i},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,i){for(var u=this._object,_=this._keys,w=_.length-1,x=0;x<=w;x++){var j=_[i?w-x:x];if(!1===s(u[j],j,this))return x+1}return x},ObjectSeq.prototype.__iterator=function(s,i){var u=this._object,_=this._keys,w=_.length-1,x=0;return new Iterator((function(){var j=_[i?w-x:x];return x++>w?iteratorDone():iteratorValue(s,j,u[j])}))},ObjectSeq.prototype[w]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);var u=getIterator(this._iterable),_=0;if(isIterator(u))for(var w;!(w=u.next()).done&&!1!==s(w.value,_++,this););return _},IterableSeq.prototype.__iteratorUncached=function(s,i){if(i)return this.cacheResult().__iterator(s,i);var u=getIterator(this._iterable);if(!isIterator(u))return new Iterator(iteratorDone);var _=0;return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,_++,i.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);for(var u,_=this._iterator,w=this._iteratorCache,x=0;x=_.length){var i=u.next();if(i.done)return i;_[w]=i.value}return iteratorValue(s,w,_[w++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(s,i){return this.has(s)?this._value:i},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,i){var u=this.size;return wholeSlice(s,i,u)?this:new Repeat(this._value,resolveEnd(i,u)-resolveBegin(s,u))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,i){for(var u=0;u=0&&i=0&&uu?iteratorDone():iteratorValue(s,x++,j)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var ye="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,i){var u=65535&(s|=0),_=65535&(i|=0);return u*_+((s>>>16)*_+u*(i>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if("function"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var i=typeof s;if("number"===i){if(s!=s||s===1/0)return 0;var u=0|s;for(u!==s&&(u^=4294967295*s);s>4294967295;)u^=s/=4294967295;return smi(u)}if("string"===i)return s.length>Te?cachedHashString(s):hashString(s);if("function"==typeof s.hashCode)return s.hashCode();if("object"===i)return hashJSObj(s);if("function"==typeof s.toString)return hashString(s.toString());throw new Error("Value type "+i+" cannot be hashed.")}function cachedHashString(s){var i=$e[s];return void 0===i&&(i=hashString(s),qe===Re&&(qe=0,$e={}),qe++,$e[s]=i),i}function hashString(s){for(var i=0,u=0;u0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var we,Se="function"==typeof WeakMap;Se&&(we=new WeakMap);var xe=0,Pe="__immutablehash__";"function"==typeof Symbol&&(Pe=Symbol(Pe));var Te=16,Re=255,qe=0,$e={};function assertNotInfinite(s){invariant(s!==1/0,"Cannot perform this action with an infinite size.")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(i){var u=KeyedIterable(s);assertNotInfinite(u.size),u.forEach((function(s,u){return i.set(u,s)}))}))}function isMap(s){return!(!s||!s[We])}createClass(Map,KeyedCollection),Map.of=function(){var i=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var u=0;u=i.length)throw new Error("Missing value for key: "+i[u]);s.set(i[u],i[u+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(s,i){return this._root?this._root.get(0,void 0,s,i):i},Map.prototype.set=function(s,i){return updateMap(this,s,i)},Map.prototype.setIn=function(s,i){return this.updateIn(s,$,(function(){return i}))},Map.prototype.remove=function(s){return updateMap(this,s,$)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return $}))},Map.prototype.update=function(s,i,u){return 1===arguments.length?s(this):this.updateIn([s],i,u)},Map.prototype.updateIn=function(s,i,u){u||(u=i,i=void 0);var _=updateInDeepMap(this,forceIterator(s),i,u);return _===$?void 0:_},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(i){return mergeIntoMapWith(this,i,s.call(arguments,1))},Map.prototype.mergeIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return"function"==typeof s.merge?s.merge.apply(s,u):u[u.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(i){var u=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(i),u)},Map.prototype.mergeDeepIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return"function"==typeof s.mergeDeep?s.mergeDeep.apply(s,u):u[u.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,i){return OrderedMap(sortFactory(this,i,s))},Map.prototype.withMutations=function(s){var i=this.asMutable();return s(i),i.wasAltered()?i.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,i){return new MapIterator(this,s,i)},Map.prototype.__iterate=function(s,i){var u=this,_=0;return this._root&&this._root.iterate((function(i){return _++,s(i[1],i[0],u)}),i),_},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var ze,We="@@__IMMUTABLE_MAP__@@",He=Map.prototype;function ArrayMapNode(s,i){this.ownerID=s,this.entries=i}function BitmapIndexedNode(s,i,u){this.ownerID=s,this.bitmap=i,this.nodes=u}function HashArrayMapNode(s,i,u){this.ownerID=s,this.count=i,this.nodes=u}function HashCollisionNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entries=u}function ValueNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entry=u}function MapIterator(s,i,u){this._type=i,this._reverse=u,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,i){return iteratorValue(s,i[0],i[1])}function mapIteratorFrame(s,i){return{node:s,index:0,__prev:i}}function makeMap(s,i,u,_){var w=Object.create(He);return w.size=s,w._root=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyMap(){return ze||(ze=makeMap(0))}function updateMap(s,i,u){var _,w;if(s._root){var x=MakeRef(U),j=MakeRef(Y);if(_=updateNode(s._root,s.__ownerID,0,void 0,i,u,x,j),!j.value)return s;w=s.size+(x.value?u===$?-1:1:0)}else{if(u===$)return s;w=1,_=new ArrayMapNode(s.__ownerID,[[i,u]])}return s.__ownerID?(s.size=w,s._root=_,s.__hash=void 0,s.__altered=!0,s):_?makeMap(w,_):emptyMap()}function updateNode(s,i,u,_,w,x,j,P){return s?s.update(i,u,_,w,x,j,P):x===$?s:(SetRef(P),SetRef(j),new ValueNode(i,_,[w,x]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,i,u,_,w){if(s.keyHash===_)return new HashCollisionNode(i,_,[s.entry,w]);var x,P=(0===u?s.keyHash:s.keyHash>>>u)&B,$=(0===u?_:_>>>u)&B;return new BitmapIndexedNode(i,1<>>=1)j[B]=1&u?i[x++]:void 0;return j[_]=w,new HashArrayMapNode(s,x+1,j)}function mergeIntoMapWith(s,i,u){for(var _=[],w=0;w>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,i,u,_){var w=_?s:arrCopy(s);return w[i]=u,w}function spliceIn(s,i,u,_){var w=s.length+1;if(_&&i+1===w)return s[i]=u,s;for(var x=new Array(w),j=0,P=0;P=Ye)return createNodes(s,B,_,w);var Z=s&&s===this.ownerID,ee=Z?B:arrCopy(B);return X?P?U===Y-1?ee.pop():ee[U]=ee.pop():ee[U]=[_,w]:ee.push([_,w]),Z?(this.entries=ee,this):new ArrayMapNode(s,ee)}},BitmapIndexedNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=1<<((0===s?i:i>>>s)&B),x=this.bitmap;return 0==(x&w)?_:this.nodes[popCount(x&w-1)].get(s+j,i,u,_)},BitmapIndexedNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=1<=Xe)return expandNodes(s,ae,X,U,le);if(Z&&!le&&2===ae.length&&isLeafNode(ae[1^ee]))return ae[1^ee];if(Z&&le&&1===ae.length&&isLeafNode(le))return le;var ce=s&&s===this.ownerID,pe=Z?le?X:X^Y:X|Y,de=Z?le?setIn(ae,ee,le,ce):spliceOut(ae,ee,ce):spliceIn(ae,ee,le,ce);return ce?(this.bitmap=pe,this.nodes=de,this):new BitmapIndexedNode(s,pe,de)},HashArrayMapNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=(0===s?i:i>>>s)&B,x=this.nodes[w];return x?x.get(s+j,i,u,_):_},HashArrayMapNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=w===$,X=this.nodes,Z=X[U];if(Y&&!Z)return this;var ee=updateNode(Z,s,i+j,u,_,w,x,P);if(ee===Z)return this;var ae=this.count;if(Z){if(!ee&&--ae0&&_=0&&s>>i&B;if(_>=this.array.length)return new VNode([],s);var w,x=0===_;if(i>0){var P=this.array[_];if((w=P&&P.removeBefore(s,i-j,u))===P&&x)return this}if(x&&!w)return this;var $=editableVNode(this,s);if(!x)for(var U=0;U<_;U++)$.array[U]=void 0;return w&&($.array[_]=w),$},VNode.prototype.removeAfter=function(s,i,u){if(u===(i?1<>>i&B;if(w>=this.array.length)return this;if(i>0){var x=this.array[w];if((_=x&&x.removeAfter(s,i-j,u))===x&&w===this.array.length-1)return this}var P=editableVNode(this,s);return P.array.splice(w+1),_&&(P.array[w]=_),P};var rt,nt,ot={};function iterateList(s,i){var u=s._origin,_=s._capacity,w=getTailOffset(_),x=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,i,u){return 0===i?iterateLeaf(s,u):iterateNode(s,i,u)}function iterateLeaf(s,j){var B=j===w?x&&x.array:s&&s.array,$=j>u?0:u-j,U=_-j;return U>P&&(U=P),function(){if($===U)return ot;var s=i?--U:$++;return B&&B[s]}}function iterateNode(s,w,x){var B,$=s&&s.array,U=x>u?0:u-x>>w,Y=1+(_-x>>w);return Y>P&&(Y=P),function(){for(;;){if(B){var s=B();if(s!==ot)return s;B=null}if(U===Y)return ot;var u=i?--Y:U++;B=iterateNodeOrLeaf($&&$[u],w-j,x+(u<=s.size||i<0)return s.withMutations((function(s){i<0?setListBounds(s,i).set(0,u):setListBounds(s,0,i+1).set(i,u)}));i+=s._origin;var _=s._tail,w=s._root,x=MakeRef(Y);return i>=getTailOffset(s._capacity)?_=updateVNode(_,s.__ownerID,0,i,u,x):w=updateVNode(w,s.__ownerID,s._level,i,u,x),x.value?s.__ownerID?(s._root=w,s._tail=_,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,w,_):s}function updateVNode(s,i,u,_,w,x){var P,$=_>>>u&B,U=s&&$0){var Y=s&&s.array[$],X=updateVNode(Y,i,u-j,_,w,x);return X===Y?s:((P=editableVNode(s,i)).array[$]=X,P)}return U&&s.array[$]===w?s:(SetRef(x),P=editableVNode(s,i),void 0===w&&$===P.array.length-1?P.array.pop():P.array[$]=w,P)}function editableVNode(s,i){return i&&s&&i===s.ownerID?s:new VNode(s?s.array.slice():[],i)}function listNodeFor(s,i){if(i>=getTailOffset(s._capacity))return s._tail;if(i<1<0;)u=u.array[i>>>_&B],_-=j;return u}}function setListBounds(s,i,u){void 0!==i&&(i|=0),void 0!==u&&(u|=0);var _=s.__ownerID||new OwnerID,w=s._origin,x=s._capacity,P=w+i,$=void 0===u?x:u<0?x+u:w+u;if(P===w&&$===x)return s;if(P>=$)return s.clear();for(var U=s._level,Y=s._root,X=0;P+X<0;)Y=new VNode(Y&&Y.array.length?[void 0,Y]:[],_),X+=1<<(U+=j);X&&(P+=X,w+=X,$+=X,x+=X);for(var Z=getTailOffset(x),ee=getTailOffset($);ee>=1<Z?new VNode([],_):ae;if(ae&&ee>Z&&Pj;ce-=j){var pe=Z>>>ce&B;le=le.array[pe]=editableVNode(le.array[pe],_)}le.array[Z>>>j&B]=ae}if($=ee)P-=ee,$-=ee,U=j,Y=null,ie=ie&&ie.removeBefore(_,0,P);else if(P>w||ee>>U&B;if(de!==ee>>>U&B)break;de&&(X+=(1<w&&(Y=Y.removeBefore(_,U,P-X)),Y&&eew&&(w=P.size),isIterable(j)||(P=P.map((function(s){return fromJS(s)}))),_.push(P)}return w>s.size&&(s=s.setSize(w)),mergeIntoCollectionWith(s,i,_)}function getTailOffset(s){return s>>j<=P&&j.size>=2*x.size?(_=(w=j.filter((function(s,i){return void 0!==s&&B!==i}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(_.__ownerID=w.__ownerID=s.__ownerID)):(_=x.remove(i),w=B===j.size-1?j.pop():j.set(B,void 0))}else if(U){if(u===j.get(B)[1])return s;_=x,w=j.set(B,[i,u])}else _=x.set(i,j.size),w=j.set(j.size,[i,u]);return s.__ownerID?(s.size=_.size,s._map=_,s._list=w,s.__hash=void 0,s):makeOrderedMap(_,w)}function ToKeyedSequence(s,i){this._iter=s,this._useKeys=i,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.flip=function(){return s},i.reverse=function(){var i=s.reverse.apply(this);return i.flip=function(){return s.reverse()},i},i.has=function(i){return s.includes(i)},i.includes=function(i){return s.has(i)},i.cacheResult=cacheResultThrough,i.__iterateUncached=function(i,u){var _=this;return s.__iterate((function(s,u){return!1!==i(u,s,_)}),u)},i.__iteratorUncached=function(i,u){if(i===ee){var _=s.__iterator(i,u);return new Iterator((function(){var s=_.next();if(!s.done){var i=s.value[0];s.value[0]=s.value[1],s.value[1]=i}return s}))}return s.__iterator(i===Z?X:Z,u)},i}function mapFactory(s,i,u){var _=makeSequence(s);return _.size=s.size,_.has=function(i){return s.has(i)},_.get=function(_,w){var x=s.get(_,$);return x===$?w:i.call(u,x,_,s)},_.__iterateUncached=function(_,w){var x=this;return s.__iterate((function(s,w,j){return!1!==_(i.call(u,s,w,j),w,x)}),w)},_.__iteratorUncached=function(_,w){var x=s.__iterator(ee,w);return new Iterator((function(){var w=x.next();if(w.done)return w;var j=w.value,P=j[0];return iteratorValue(_,P,i.call(u,j[1],P,s),w)}))},_}function reverseFactory(s,i){var u=makeSequence(s);return u._iter=s,u.size=s.size,u.reverse=function(){return s},s.flip&&(u.flip=function(){var i=flipFactory(s);return i.reverse=function(){return s.flip()},i}),u.get=function(u,_){return s.get(i?u:-1-u,_)},u.has=function(u){return s.has(i?u:-1-u)},u.includes=function(i){return s.includes(i)},u.cacheResult=cacheResultThrough,u.__iterate=function(i,u){var _=this;return s.__iterate((function(s,u){return i(s,u,_)}),!u)},u.__iterator=function(i,u){return s.__iterator(i,!u)},u}function filterFactory(s,i,u,_){var w=makeSequence(s);return _&&(w.has=function(_){var w=s.get(_,$);return w!==$&&!!i.call(u,w,_,s)},w.get=function(_,w){var x=s.get(_,$);return x!==$&&i.call(u,x,_,s)?x:w}),w.__iterateUncached=function(w,x){var j=this,P=0;return s.__iterate((function(s,x,B){if(i.call(u,s,x,B))return P++,w(s,_?x:P-1,j)}),x),P},w.__iteratorUncached=function(w,x){var j=s.__iterator(ee,x),P=0;return new Iterator((function(){for(;;){var x=j.next();if(x.done)return x;var B=x.value,$=B[0],U=B[1];if(i.call(u,U,$,s))return iteratorValue(w,_?$:P++,U,x)}}))},w}function countByFactory(s,i,u){var _=Map().asMutable();return s.__iterate((function(w,x){_.update(i.call(u,w,x,s),0,(function(s){return s+1}))})),_.asImmutable()}function groupByFactory(s,i,u){var _=isKeyed(s),w=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(x,j){w.update(i.call(u,x,j,s),(function(s){return(s=s||[]).push(_?[j,x]:x),s}))}));var x=iterableClass(s);return w.map((function(i){return reify(s,x(i))}))}function sliceFactory(s,i,u,_){var w=s.size;if(void 0!==i&&(i|=0),void 0!==u&&(u===1/0?u=w:u|=0),wholeSlice(i,u,w))return s;var x=resolveBegin(i,w),j=resolveEnd(u,w);if(x!=x||j!=j)return sliceFactory(s.toSeq().cacheResult(),i,u,_);var P,B=j-x;B==B&&(P=B<0?0:B);var $=makeSequence(s);return $.size=0===P?P:s.size&&P||void 0,!_&&isSeq(s)&&P>=0&&($.get=function(i,u){return(i=wrapIndex(this,i))>=0&&iP)return iteratorDone();var s=w.next();return _||i===Z?s:iteratorValue(i,B-1,i===X?void 0:s.value[1],s)}))},$}function takeWhileFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterate(_,w);var j=0;return s.__iterate((function(s,w,P){return i.call(u,s,w,P)&&++j&&_(s,w,x)})),j},_.__iteratorUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterator(_,w);var j=s.__iterator(ee,w),P=!0;return new Iterator((function(){if(!P)return iteratorDone();var s=j.next();if(s.done)return s;var w=s.value,B=w[0],$=w[1];return i.call(u,$,B,x)?_===ee?s:iteratorValue(_,B,$,s):(P=!1,iteratorDone())}))},_}function skipWhileFactory(s,i,u,_){var w=makeSequence(s);return w.__iterateUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterate(w,x);var P=!0,B=0;return s.__iterate((function(s,x,$){if(!P||!(P=i.call(u,s,x,$)))return B++,w(s,_?x:B-1,j)})),B},w.__iteratorUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterator(w,x);var P=s.__iterator(ee,x),B=!0,$=0;return new Iterator((function(){var s,x,U;do{if((s=P.next()).done)return _||w===Z?s:iteratorValue(w,$++,w===X?void 0:s.value[1],s);var Y=s.value;x=Y[0],U=Y[1],B&&(B=i.call(u,U,x,j))}while(B);return w===ee?s:iteratorValue(w,x,U,s)}))},w}function concatFactory(s,i){var u=isKeyed(s),_=[s].concat(i).map((function(s){return isIterable(s)?u&&(s=KeyedIterable(s)):s=u?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===_.length)return s;if(1===_.length){var w=_[0];if(w===s||u&&isKeyed(w)||isIndexed(s)&&isIndexed(w))return w}var x=new ArraySeq(_);return u?x=x.toKeyedSeq():isIndexed(s)||(x=x.toSetSeq()),(x=x.flatten(!0)).size=_.reduce((function(s,i){if(void 0!==s){var u=i.size;if(void 0!==u)return s+u}}),0),x}function flattenFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=0,j=!1;function flatDeep(s,P){var B=this;s.__iterate((function(s,w){return(!i||P0}function zipWithFactory(s,i,u){var _=makeSequence(s);return _.size=new ArraySeq(u).map((function(s){return s.size})).min(),_.__iterate=function(s,i){for(var u,_=this.__iterator(Z,i),w=0;!(u=_.next()).done&&!1!==s(u.value,w++,this););return w},_.__iteratorUncached=function(s,_){var w=u.map((function(s){return s=Iterable(s),getIterator(_?s.reverse():s)})),x=0,j=!1;return new Iterator((function(){var u;return j||(u=w.map((function(s){return s.next()})),j=u.some((function(s){return s.done}))),j?iteratorDone():iteratorValue(s,x++,i.apply(null,u.map((function(s){return s.value}))))}))},_}function reify(s,i){return isSeq(s)?i:s.constructor(i)}function validateEntry(s){if(s!==Object(s))throw new TypeError("Expected [K, V] tuple: "+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,i){return s>i?1:s=0;u--)i={value:arguments[u],next:i};return this.__ownerID?(this.size=s,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(s,i)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var i=this.size,u=this._head;return s.reverse().forEach((function(s){i++,u={value:s,next:u}})),this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(i,u)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,i){if(wholeSlice(s,i,this.size))return this;var u=resolveBegin(s,this.size);if(resolveEnd(i,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,i);for(var _=this.size-u,w=this._head;u--;)w=w.next;return this.__ownerID?(this.size=_,this._head=w,this.__hash=void 0,this.__altered=!0,this):makeStack(_,w)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,i){if(i)return this.reverse().__iterate(s);for(var u=0,_=this._head;_&&!1!==s(_.value,u++,this);)_=_.next;return u},Stack.prototype.__iterator=function(s,i){if(i)return this.reverse().__iterator(s);var u=0,_=this._head;return new Iterator((function(){if(_){var i=_.value;return _=_.next,iteratorValue(s,u++,i)}return iteratorDone()}))},Stack.isStack=isStack;var pt,ht="@@__IMMUTABLE_STACK__@@",dt=Stack.prototype;function makeStack(s,i,u,_){var w=Object.create(dt);return w.size=s,w._head=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyStack(){return pt||(pt=makeStack(0))}function mixin(s,i){var keyCopier=function(u){s.prototype[u]=i[u]};return Object.keys(i).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(keyCopier),s}dt[ht]=!0,dt.withMutations=He.withMutations,dt.asMutable=He.asMutable,dt.asImmutable=He.asImmutable,dt.wasAltered=He.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(i,u){s[u]=i})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&"function"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&"function"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(i,u){s[u]=i})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(s,i){return 0===this.size?s+i:s+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+i},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(i){return is(i,s)}))},entries:function(){return this.__iterator(ee)},every:function(s,i){assertNotInfinite(this.size);var u=!0;return this.__iterate((function(_,w,x){if(!s.call(i,_,w,x))return u=!1,!1})),u},filter:function(s,i){return reify(this,filterFactory(this,s,i,!0))},find:function(s,i,u){var _=this.findEntry(s,i);return _?_[1]:u},forEach:function(s,i){return assertNotInfinite(this.size),this.__iterate(i?s.bind(i):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?""+s:",";var i="",u=!0;return this.__iterate((function(_){u?u=!1:i+=s,i+=null!=_?_.toString():""})),i},keys:function(){return this.__iterator(X)},map:function(s,i){return reify(this,mapFactory(this,s,i))},reduce:function(s,i,u){var _,w;return assertNotInfinite(this.size),arguments.length<2?w=!0:_=i,this.__iterate((function(i,x,j){w?(w=!1,_=i):_=s.call(u,_,i,x,j)})),_},reduceRight:function(s,i,u){var _=this.toKeyedSeq().reverse();return _.reduce.apply(_,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!0))},some:function(s,i){return!this.every(not(s),i)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(Z)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,i){return ensureSize(s?this.toSeq().filter(s,i):this)},countBy:function(s,i){return countByFactory(this,s,i)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var i=s.toSeq().map(entryMapper).toIndexedSeq();return i.fromEntrySeq=function(){return s.toSeq()},i},filterNot:function(s,i){return this.filter(not(s),i)},findEntry:function(s,i,u){var _=u;return this.__iterate((function(u,w,x){if(s.call(i,u,w,x))return _=[w,u],!1})),_},findKey:function(s,i){var u=this.findEntry(s,i);return u&&u[0]},findLast:function(s,i,u){return this.toKeyedSeq().reverse().find(s,i,u)},findLastEntry:function(s,i,u){return this.toKeyedSeq().reverse().findEntry(s,i,u)},findLastKey:function(s,i){return this.toKeyedSeq().reverse().findKey(s,i)},first:function(){return this.find(returnTrue)},flatMap:function(s,i){return reify(this,flatMapFactory(this,s,i))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,i){return this.find((function(i,u){return is(u,s)}),void 0,i)},getIn:function(s,i){for(var u,_=this,w=forceIterator(s);!(u=w.next()).done;){var x=u.value;if((_=_&&_.get?_.get(x,$):$)===$)return i}return _},groupBy:function(s,i){return groupByFactory(this,s,i)},has:function(s){return this.get(s,$)!==$},hasIn:function(s){return this.getIn(s,$)!==$},isSubset:function(s){return s="function"==typeof s.includes?s:Iterable(s),this.every((function(i){return s.includes(i)}))},isSuperset:function(s){return(s="function"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(i){return is(i,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,i){return maxFactory(this,i,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,i){return maxFactory(this,i?neg(i):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,i){return reify(this,skipWhileFactory(this,s,i,!0))},skipUntil:function(s,i){return this.skipWhile(not(s),i)},sortBy:function(s,i){return reify(this,sortFactory(this,i,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,i){return reify(this,takeWhileFactory(this,s,i))},takeUntil:function(s,i){return this.takeWhile(not(s),i)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var mt=Iterable.prototype;mt[i]=!0,mt[le]=mt.values,mt.__toJS=mt.toArray,mt.__toStringMapper=quoteString,mt.inspect=mt.toSource=function(){return this.toString()},mt.chain=mt.flatMap,mt.contains=mt.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,i){var u=this,_=0;return reify(this,this.toSeq().map((function(w,x){return s.call(i,[x,w],_++,u)})).fromEntrySeq())},mapKeys:function(s,i){var u=this;return reify(this,this.toSeq().flip().map((function(_,w){return s.call(i,_,w,u)})).flip())}});var gt=KeyedIterable.prototype;function keyMapper(s,i){return i}function entryMapper(s,i){return[i,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return"string"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,i){return si?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var i=isOrdered(s),u=isKeyed(s),_=i?1:0;return murmurHashOfSize(s.__iterate(u?i?function(s,i){_=31*_+hashMerge(hash(s),hash(i))|0}:function(s,i){_=_+hashMerge(hash(s),hash(i))|0}:i?function(s){_=31*_+hash(s)|0}:function(s){_=_+hash(s)|0}),_)}function murmurHashOfSize(s,i){return i=ye(i,3432918353),i=ye(i<<15|i>>>-15,461845907),i=ye(i<<13|i>>>-13,5),i=ye((i=(i+3864292196|0)^s)^i>>>16,2246822507),i=smi((i=ye(i^i>>>13,3266489909))^i>>>16)}function hashMerge(s,i){return s^i+2654435769+(s<<6)+(s>>2)|0}return gt[u]=!0,gt[le]=mt.entries,gt.__toJS=mt.toObject,gt.__toStringMapper=function(s,i){return JSON.stringify(i)+": "+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,i){return reify(this,filterFactory(this,s,i,!1))},findIndex:function(s,i){var u=this.findEntry(s,i);return u?u[0]:-1},indexOf:function(s){var i=this.keyOf(s);return void 0===i?-1:i},lastIndexOf:function(s){var i=this.lastKeyOf(s);return void 0===i?-1:i},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!1))},splice:function(s,i){var u=arguments.length;if(i=Math.max(0|i,0),0===u||2===u&&!i)return this;s=resolveBegin(s,s<0?this.count():this.size);var _=this.slice(0,s);return reify(this,1===u?_:_.concat(arrCopy(arguments,2),this.slice(s+i)))},findLastIndex:function(s,i){var u=this.findLastEntry(s,i);return u?u[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,i){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?i:this.find((function(i,u){return u===s}),void 0,i)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s{"function"==typeof Object.create?s.exports=function inherits(s,i){i&&(s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function inherits(s,i){if(i){s.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype,s.prototype=new TempCtor,s.prototype.constructor=s}}},35823:s=>{s.exports=function(s,i,u,_){var w=new Blob(void 0!==_?[_,s]:[s],{type:u||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(w,i);else{var x=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(w):window.webkitURL.createObjectURL(w),j=document.createElement("a");j.style.display="none",j.href=x,j.setAttribute("download",i),void 0===j.download&&j.setAttribute("target","_blank"),document.body.appendChild(j),j.click(),setTimeout((function(){document.body.removeChild(j),window.URL.revokeObjectURL(x)}),200)}}},91296:(s,i,u)=>{var _=NaN,w="[object Symbol]",x=/^\s+|\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt,U="object"==typeof u.g&&u.g&&u.g.Object===Object&&u.g,Y="object"==typeof self&&self&&self.Object===Object&&self,X=U||Y||Function("return this")(),Z=Object.prototype.toString,ee=Math.max,ae=Math.min,now=function(){return X.Date.now()};function isObject(s){var i=typeof s;return!!s&&("object"==i||"function"==i)}function toNumber(s){if("number"==typeof s)return s;if(function isSymbol(s){return"symbol"==typeof s||function isObjectLike(s){return!!s&&"object"==typeof s}(s)&&Z.call(s)==w}(s))return _;if(isObject(s)){var i="function"==typeof s.valueOf?s.valueOf():s;s=isObject(i)?i+"":i}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(x,"");var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?_:+s}s.exports=function debounce(s,i,u){var _,w,x,j,P,B,$=0,U=!1,Y=!1,X=!0;if("function"!=typeof s)throw new TypeError("Expected a function");function invokeFunc(i){var u=_,x=w;return _=w=void 0,$=i,j=s.apply(x,u)}function shouldInvoke(s){var u=s-B;return void 0===B||u>=i||u<0||Y&&s-$>=x}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);P=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-B);return Y?ae(u,x-(s-$)):u}(s))}function trailingEdge(s){return P=void 0,X&&_?invokeFunc(s):(_=w=void 0,j)}function debounced(){var s=now(),u=shouldInvoke(s);if(_=arguments,w=this,B=s,u){if(void 0===P)return function leadingEdge(s){return $=s,P=setTimeout(timerExpired,i),U?invokeFunc(s):j}(B);if(Y)return P=setTimeout(timerExpired,i),invokeFunc(B)}return void 0===P&&(P=setTimeout(timerExpired,i)),j}return i=toNumber(i)||0,isObject(u)&&(U=!!u.leading,x=(Y="maxWait"in u)?ee(toNumber(u.maxWait)||0,i):x,X="trailing"in u?!!u.trailing:X),debounced.cancel=function cancel(){void 0!==P&&clearTimeout(P),$=0,_=B=w=P=void 0},debounced.flush=function flush(){return void 0===P?j:trailingEdge(now())},debounced}},18552:(s,i,u)=>{var _=u(10852)(u(55639),"DataView");s.exports=_},1989:(s,i,u)=>{var _=u(51789),w=u(80401),x=u(57667),j=u(21327),P=u(81866);function Hash(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i{var _=u(3118),w=u(9435);function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=_(w.prototype),LazyWrapper.prototype.constructor=LazyWrapper,s.exports=LazyWrapper},38407:(s,i,u)=>{var _=u(27040),w=u(14125),x=u(82117),j=u(67518),P=u(54705);function ListCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i{var _=u(3118),w=u(9435);function LodashWrapper(s,i){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=_(w.prototype),LodashWrapper.prototype.constructor=LodashWrapper,s.exports=LodashWrapper},57071:(s,i,u)=>{var _=u(10852)(u(55639),"Map");s.exports=_},83369:(s,i,u)=>{var _=u(24785),w=u(11285),x=u(96e3),j=u(49916),P=u(95265);function MapCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i{var _=u(10852)(u(55639),"Promise");s.exports=_},58525:(s,i,u)=>{var _=u(10852)(u(55639),"Set");s.exports=_},88668:(s,i,u)=>{var _=u(83369),w=u(90619),x=u(72385);function SetCache(s){var i=-1,u=null==s?0:s.length;for(this.__data__=new _;++i{var _=u(38407),w=u(37465),x=u(63779),j=u(67599),P=u(44758),B=u(34309);function Stack(s){var i=this.__data__=new _(s);this.size=i.size}Stack.prototype.clear=w,Stack.prototype.delete=x,Stack.prototype.get=j,Stack.prototype.has=P,Stack.prototype.set=B,s.exports=Stack},62705:(s,i,u)=>{var _=u(55639).Symbol;s.exports=_},11149:(s,i,u)=>{var _=u(55639).Uint8Array;s.exports=_},70577:(s,i,u)=>{var _=u(10852)(u(55639),"WeakMap");s.exports=_},96874:s=>{s.exports=function apply(s,i,u){switch(u.length){case 0:return s.call(i);case 1:return s.call(i,u[0]);case 2:return s.call(i,u[0],u[1]);case 3:return s.call(i,u[0],u[1],u[2])}return s.apply(i,u)}},77412:s=>{s.exports=function arrayEach(s,i){for(var u=-1,_=null==s?0:s.length;++u<_&&!1!==i(s[u],u,s););return s}},34963:s=>{s.exports=function arrayFilter(s,i){for(var u=-1,_=null==s?0:s.length,w=0,x=[];++u<_;){var j=s[u];i(j,u,s)&&(x[w++]=j)}return x}},47443:(s,i,u)=>{var _=u(42118);s.exports=function arrayIncludes(s,i){return!!(null==s?0:s.length)&&_(s,i,0)>-1}},14636:(s,i,u)=>{var _=u(22545),w=u(35694),x=u(1469),j=u(44144),P=u(65776),B=u(36719),$=Object.prototype.hasOwnProperty;s.exports=function arrayLikeKeys(s,i){var u=x(s),U=!u&&w(s),Y=!u&&!U&&j(s),X=!u&&!U&&!Y&&B(s),Z=u||U||Y||X,ee=Z?_(s.length,String):[],ae=ee.length;for(var ie in s)!i&&!$.call(s,ie)||Z&&("length"==ie||Y&&("offset"==ie||"parent"==ie)||X&&("buffer"==ie||"byteLength"==ie||"byteOffset"==ie)||P(ie,ae))||ee.push(ie);return ee}},29932:s=>{s.exports=function arrayMap(s,i){for(var u=-1,_=null==s?0:s.length,w=Array(_);++u<_;)w[u]=i(s[u],u,s);return w}},62488:s=>{s.exports=function arrayPush(s,i){for(var u=-1,_=i.length,w=s.length;++u<_;)s[w+u]=i[u];return s}},62663:s=>{s.exports=function arrayReduce(s,i,u,_){var w=-1,x=null==s?0:s.length;for(_&&x&&(u=s[++w]);++w{s.exports=function arraySome(s,i){for(var u=-1,_=null==s?0:s.length;++u<_;)if(i(s[u],u,s))return!0;return!1}},44286:s=>{s.exports=function asciiToArray(s){return s.split("")}},49029:s=>{var i=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;s.exports=function asciiWords(s){return s.match(i)||[]}},86556:(s,i,u)=>{var _=u(89465),w=u(77813);s.exports=function assignMergeValue(s,i,u){(void 0!==u&&!w(s[i],u)||void 0===u&&!(i in s))&&_(s,i,u)}},34865:(s,i,u)=>{var _=u(89465),w=u(77813),x=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,i,u){var j=s[i];x.call(s,i)&&w(j,u)&&(void 0!==u||i in s)||_(s,i,u)}},18470:(s,i,u)=>{var _=u(77813);s.exports=function assocIndexOf(s,i){for(var u=s.length;u--;)if(_(s[u][0],i))return u;return-1}},44037:(s,i,u)=>{var _=u(98363),w=u(3674);s.exports=function baseAssign(s,i){return s&&_(i,w(i),s)}},63886:(s,i,u)=>{var _=u(98363),w=u(81704);s.exports=function baseAssignIn(s,i){return s&&_(i,w(i),s)}},89465:(s,i,u)=>{var _=u(38777);s.exports=function baseAssignValue(s,i,u){"__proto__"==i&&_?_(s,i,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[i]=u}},85990:(s,i,u)=>{var _=u(46384),w=u(77412),x=u(34865),j=u(44037),P=u(63886),B=u(64626),$=u(278),U=u(18805),Y=u(1911),X=u(58234),Z=u(46904),ee=u(64160),ae=u(43824),ie=u(29148),le=u(38517),ce=u(1469),pe=u(44144),de=u(56688),fe=u(13218),ye=u(72928),be=u(3674),_e=u(81704),we="[object Arguments]",Se="[object Function]",xe="[object Object]",Pe={};Pe[we]=Pe["[object Array]"]=Pe["[object ArrayBuffer]"]=Pe["[object DataView]"]=Pe["[object Boolean]"]=Pe["[object Date]"]=Pe["[object Float32Array]"]=Pe["[object Float64Array]"]=Pe["[object Int8Array]"]=Pe["[object Int16Array]"]=Pe["[object Int32Array]"]=Pe["[object Map]"]=Pe["[object Number]"]=Pe[xe]=Pe["[object RegExp]"]=Pe["[object Set]"]=Pe["[object String]"]=Pe["[object Symbol]"]=Pe["[object Uint8Array]"]=Pe["[object Uint8ClampedArray]"]=Pe["[object Uint16Array]"]=Pe["[object Uint32Array]"]=!0,Pe["[object Error]"]=Pe[Se]=Pe["[object WeakMap]"]=!1,s.exports=function baseClone(s,i,u,Te,Re,qe){var $e,ze=1&i,We=2&i,He=4&i;if(u&&($e=Re?u(s,Te,Re,qe):u(s)),void 0!==$e)return $e;if(!fe(s))return s;var Ye=ce(s);if(Ye){if($e=ae(s),!ze)return $(s,$e)}else{var Xe=ee(s),Qe=Xe==Se||"[object GeneratorFunction]"==Xe;if(pe(s))return B(s,ze);if(Xe==xe||Xe==we||Qe&&!Re){if($e=We||Qe?{}:le(s),!ze)return We?Y(s,P($e,s)):U(s,j($e,s))}else{if(!Pe[Xe])return Re?s:{};$e=ie(s,Xe,ze)}}qe||(qe=new _);var et=qe.get(s);if(et)return et;qe.set(s,$e),ye(s)?s.forEach((function(_){$e.add(baseClone(_,i,u,_,s,qe))})):de(s)&&s.forEach((function(_,w){$e.set(w,baseClone(_,i,u,w,s,qe))}));var tt=Ye?void 0:(He?We?Z:X:We?_e:be)(s);return w(tt||s,(function(_,w){tt&&(_=s[w=_]),x($e,w,baseClone(_,i,u,w,s,qe))})),$e}},3118:(s,i,u)=>{var _=u(13218),w=Object.create,x=function(){function object(){}return function(s){if(!_(s))return{};if(w)return w(s);object.prototype=s;var i=new object;return object.prototype=void 0,i}}();s.exports=x},89881:(s,i,u)=>{var _=u(47816),w=u(99291)(_);s.exports=w},41848:s=>{s.exports=function baseFindIndex(s,i,u,_){for(var w=s.length,x=u+(_?1:-1);_?x--:++x{var _=u(62488),w=u(37285);s.exports=function baseFlatten(s,i,u,x,j){var P=-1,B=s.length;for(u||(u=w),j||(j=[]);++P0&&u($)?i>1?baseFlatten($,i-1,u,x,j):_(j,$):x||(j[j.length]=$)}return j}},28483:(s,i,u)=>{var _=u(25063)();s.exports=_},47816:(s,i,u)=>{var _=u(28483),w=u(3674);s.exports=function baseForOwn(s,i){return s&&_(s,i,w)}},97786:(s,i,u)=>{var _=u(71811),w=u(40327);s.exports=function baseGet(s,i){for(var u=0,x=(i=_(i,s)).length;null!=s&&u{var _=u(62488),w=u(1469);s.exports=function baseGetAllKeys(s,i,u){var x=i(s);return w(s)?x:_(x,u(s))}},44239:(s,i,u)=>{var _=u(62705),w=u(89607),x=u(2333),j=_?_.toStringTag:void 0;s.exports=function baseGetTag(s){return null==s?void 0===s?"[object Undefined]":"[object Null]":j&&j in Object(s)?w(s):x(s)}},13:s=>{s.exports=function baseHasIn(s,i){return null!=s&&i in Object(s)}},42118:(s,i,u)=>{var _=u(41848),w=u(62722),x=u(42351);s.exports=function baseIndexOf(s,i,u){return i==i?x(s,i,u):_(s,w,u)}},9454:(s,i,u)=>{var _=u(44239),w=u(37005);s.exports=function baseIsArguments(s){return w(s)&&"[object Arguments]"==_(s)}},90939:(s,i,u)=>{var _=u(2492),w=u(37005);s.exports=function baseIsEqual(s,i,u,x,j){return s===i||(null==s||null==i||!w(s)&&!w(i)?s!=s&&i!=i:_(s,i,u,x,baseIsEqual,j))}},2492:(s,i,u)=>{var _=u(46384),w=u(67114),x=u(18351),j=u(16096),P=u(64160),B=u(1469),$=u(44144),U=u(36719),Y="[object Arguments]",X="[object Array]",Z="[object Object]",ee=Object.prototype.hasOwnProperty;s.exports=function baseIsEqualDeep(s,i,u,ae,ie,le){var ce=B(s),pe=B(i),de=ce?X:P(s),fe=pe?X:P(i),ye=(de=de==Y?Z:de)==Z,be=(fe=fe==Y?Z:fe)==Z,_e=de==fe;if(_e&&$(s)){if(!$(i))return!1;ce=!0,ye=!1}if(_e&&!ye)return le||(le=new _),ce||U(s)?w(s,i,u,ae,ie,le):x(s,i,de,u,ae,ie,le);if(!(1&u)){var we=ye&&ee.call(s,"__wrapped__"),Se=be&&ee.call(i,"__wrapped__");if(we||Se){var xe=we?s.value():s,Pe=Se?i.value():i;return le||(le=new _),ie(xe,Pe,u,ae,le)}}return!!_e&&(le||(le=new _),j(s,i,u,ae,ie,le))}},25588:(s,i,u)=>{var _=u(64160),w=u(37005);s.exports=function baseIsMap(s){return w(s)&&"[object Map]"==_(s)}},2958:(s,i,u)=>{var _=u(46384),w=u(90939);s.exports=function baseIsMatch(s,i,u,x){var j=u.length,P=j,B=!x;if(null==s)return!P;for(s=Object(s);j--;){var $=u[j];if(B&&$[2]?$[1]!==s[$[0]]:!($[0]in s))return!1}for(;++j{s.exports=function baseIsNaN(s){return s!=s}},28458:(s,i,u)=>{var _=u(23560),w=u(15346),x=u(13218),j=u(80346),P=/^\[object .+?Constructor\]$/,B=Function.prototype,$=Object.prototype,U=B.toString,Y=$.hasOwnProperty,X=RegExp("^"+U.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s.exports=function baseIsNative(s){return!(!x(s)||w(s))&&(_(s)?X:P).test(j(s))}},29221:(s,i,u)=>{var _=u(64160),w=u(37005);s.exports=function baseIsSet(s){return w(s)&&"[object Set]"==_(s)}},38749:(s,i,u)=>{var _=u(44239),w=u(41780),x=u(37005),j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object Boolean]"]=j["[object DataView]"]=j["[object Date]"]=j["[object Error]"]=j["[object Function]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object WeakMap]"]=!1,s.exports=function baseIsTypedArray(s){return x(s)&&w(s.length)&&!!j[_(s)]}},67206:(s,i,u)=>{var _=u(91573),w=u(16432),x=u(6557),j=u(1469),P=u(39601);s.exports=function baseIteratee(s){return"function"==typeof s?s:null==s?x:"object"==typeof s?j(s)?w(s[0],s[1]):_(s):P(s)}},280:(s,i,u)=>{var _=u(25726),w=u(86916),x=Object.prototype.hasOwnProperty;s.exports=function baseKeys(s){if(!_(s))return w(s);var i=[];for(var u in Object(s))x.call(s,u)&&"constructor"!=u&&i.push(u);return i}},10313:(s,i,u)=>{var _=u(13218),w=u(25726),x=u(33498),j=Object.prototype.hasOwnProperty;s.exports=function baseKeysIn(s){if(!_(s))return x(s);var i=w(s),u=[];for(var P in s)("constructor"!=P||!i&&j.call(s,P))&&u.push(P);return u}},9435:s=>{s.exports=function baseLodash(){}},91573:(s,i,u)=>{var _=u(2958),w=u(1499),x=u(42634);s.exports=function baseMatches(s){var i=w(s);return 1==i.length&&i[0][2]?x(i[0][0],i[0][1]):function(u){return u===s||_(u,s,i)}}},16432:(s,i,u)=>{var _=u(90939),w=u(27361),x=u(79095),j=u(15403),P=u(89162),B=u(42634),$=u(40327);s.exports=function baseMatchesProperty(s,i){return j(s)&&P(i)?B($(s),i):function(u){var j=w(u,s);return void 0===j&&j===i?x(u,s):_(i,j,3)}}},42980:(s,i,u)=>{var _=u(46384),w=u(86556),x=u(28483),j=u(59783),P=u(13218),B=u(81704),$=u(36390);s.exports=function baseMerge(s,i,u,U,Y){s!==i&&x(i,(function(x,B){if(Y||(Y=new _),P(x))j(s,i,B,u,baseMerge,U,Y);else{var X=U?U($(s,B),x,B+"",s,i,Y):void 0;void 0===X&&(X=x),w(s,B,X)}}),B)}},59783:(s,i,u)=>{var _=u(86556),w=u(64626),x=u(77133),j=u(278),P=u(38517),B=u(35694),$=u(1469),U=u(29246),Y=u(44144),X=u(23560),Z=u(13218),ee=u(68630),ae=u(36719),ie=u(36390),le=u(59881);s.exports=function baseMergeDeep(s,i,u,ce,pe,de,fe){var ye=ie(s,u),be=ie(i,u),_e=fe.get(be);if(_e)_(s,u,_e);else{var we=de?de(ye,be,u+"",s,i,fe):void 0,Se=void 0===we;if(Se){var xe=$(be),Pe=!xe&&Y(be),Te=!xe&&!Pe&&ae(be);we=be,xe||Pe||Te?$(ye)?we=ye:U(ye)?we=j(ye):Pe?(Se=!1,we=w(be,!0)):Te?(Se=!1,we=x(be,!0)):we=[]:ee(be)||B(be)?(we=ye,B(ye)?we=le(ye):Z(ye)&&!X(ye)||(we=P(be))):Se=!1}Se&&(fe.set(be,we),pe(we,be,ce,de,fe),fe.delete(be)),_(s,u,we)}}},40371:s=>{s.exports=function baseProperty(s){return function(i){return null==i?void 0:i[s]}}},79152:(s,i,u)=>{var _=u(97786);s.exports=function basePropertyDeep(s){return function(i){return _(i,s)}}},18674:s=>{s.exports=function basePropertyOf(s){return function(i){return null==s?void 0:s[i]}}},10107:s=>{s.exports=function baseReduce(s,i,u,_,w){return w(s,(function(s,w,x){u=_?(_=!1,s):i(u,s,w,x)})),u}},5976:(s,i,u)=>{var _=u(6557),w=u(45357),x=u(30061);s.exports=function baseRest(s,i){return x(w(s,i,_),s+"")}},10611:(s,i,u)=>{var _=u(34865),w=u(71811),x=u(65776),j=u(13218),P=u(40327);s.exports=function baseSet(s,i,u,B){if(!j(s))return s;for(var $=-1,U=(i=w(i,s)).length,Y=U-1,X=s;null!=X&&++${var _=u(6557),w=u(89250),x=w?function(s,i){return w.set(s,i),s}:_;s.exports=x},56560:(s,i,u)=>{var _=u(75703),w=u(38777),x=u(6557),j=w?function(s,i){return w(s,"toString",{configurable:!0,enumerable:!1,value:_(i),writable:!0})}:x;s.exports=j},14259:s=>{s.exports=function baseSlice(s,i,u){var _=-1,w=s.length;i<0&&(i=-i>w?0:w+i),(u=u>w?w:u)<0&&(u+=w),w=i>u?0:u-i>>>0,i>>>=0;for(var x=Array(w);++_{var _=u(89881);s.exports=function baseSome(s,i){var u;return _(s,(function(s,_,w){return!(u=i(s,_,w))})),!!u}},22545:s=>{s.exports=function baseTimes(s,i){for(var u=-1,_=Array(s);++u{var _=u(62705),w=u(29932),x=u(1469),j=u(33448),P=_?_.prototype:void 0,B=P?P.toString:void 0;s.exports=function baseToString(s){if("string"==typeof s)return s;if(x(s))return w(s,baseToString)+"";if(j(s))return B?B.call(s):"";var i=s+"";return"0"==i&&1/s==-Infinity?"-0":i}},27561:(s,i,u)=>{var _=u(67990),w=/^\s+/;s.exports=function baseTrim(s){return s?s.slice(0,_(s)+1).replace(w,""):s}},7518:s=>{s.exports=function baseUnary(s){return function(i){return s(i)}}},57406:(s,i,u)=>{var _=u(71811),w=u(10928),x=u(40292),j=u(40327);s.exports=function baseUnset(s,i){return i=_(i,s),null==(s=x(s,i))||delete s[j(w(i))]}},1757:s=>{s.exports=function baseZipObject(s,i,u){for(var _=-1,w=s.length,x=i.length,j={};++_{s.exports=function cacheHas(s,i){return s.has(i)}},71811:(s,i,u)=>{var _=u(1469),w=u(15403),x=u(55514),j=u(79833);s.exports=function castPath(s,i){return _(s)?s:w(s,i)?[s]:x(j(s))}},40180:(s,i,u)=>{var _=u(14259);s.exports=function castSlice(s,i,u){var w=s.length;return u=void 0===u?w:u,!i&&u>=w?s:_(s,i,u)}},74318:(s,i,u)=>{var _=u(11149);s.exports=function cloneArrayBuffer(s){var i=new s.constructor(s.byteLength);return new _(i).set(new _(s)),i}},64626:(s,i,u)=>{s=u.nmd(s);var _=u(55639),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w?_.Buffer:void 0,P=j?j.allocUnsafe:void 0;s.exports=function cloneBuffer(s,i){if(i)return s.slice();var u=s.length,_=P?P(u):new s.constructor(u);return s.copy(_),_}},57157:(s,i,u)=>{var _=u(74318);s.exports=function cloneDataView(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}},93147:s=>{var i=/\w*$/;s.exports=function cloneRegExp(s){var u=new s.constructor(s.source,i.exec(s));return u.lastIndex=s.lastIndex,u}},40419:(s,i,u)=>{var _=u(62705),w=_?_.prototype:void 0,x=w?w.valueOf:void 0;s.exports=function cloneSymbol(s){return x?Object(x.call(s)):{}}},77133:(s,i,u)=>{var _=u(74318);s.exports=function cloneTypedArray(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}},52157:s=>{var i=Math.max;s.exports=function composeArgs(s,u,_,w){for(var x=-1,j=s.length,P=_.length,B=-1,$=u.length,U=i(j-P,0),Y=Array($+U),X=!w;++B<$;)Y[B]=u[B];for(;++x{var i=Math.max;s.exports=function composeArgsRight(s,u,_,w){for(var x=-1,j=s.length,P=-1,B=_.length,$=-1,U=u.length,Y=i(j-B,0),X=Array(Y+U),Z=!w;++x{s.exports=function copyArray(s,i){var u=-1,_=s.length;for(i||(i=Array(_));++u<_;)i[u]=s[u];return i}},98363:(s,i,u)=>{var _=u(34865),w=u(89465);s.exports=function copyObject(s,i,u,x){var j=!u;u||(u={});for(var P=-1,B=i.length;++P{var _=u(98363),w=u(99551);s.exports=function copySymbols(s,i){return _(s,w(s),i)}},1911:(s,i,u)=>{var _=u(98363),w=u(51442);s.exports=function copySymbolsIn(s,i){return _(s,w(s),i)}},14429:(s,i,u)=>{var _=u(55639)["__core-js_shared__"];s.exports=_},97991:s=>{s.exports=function countHolders(s,i){for(var u=s.length,_=0;u--;)s[u]===i&&++_;return _}},21463:(s,i,u)=>{var _=u(5976),w=u(16612);s.exports=function createAssigner(s){return _((function(i,u){var _=-1,x=u.length,j=x>1?u[x-1]:void 0,P=x>2?u[2]:void 0;for(j=s.length>3&&"function"==typeof j?(x--,j):void 0,P&&w(u[0],u[1],P)&&(j=x<3?void 0:j,x=1),i=Object(i);++_{var _=u(98612);s.exports=function createBaseEach(s,i){return function(u,w){if(null==u)return u;if(!_(u))return s(u,w);for(var x=u.length,j=i?x:-1,P=Object(u);(i?j--:++j{s.exports=function createBaseFor(s){return function(i,u,_){for(var w=-1,x=Object(i),j=_(i),P=j.length;P--;){var B=j[s?P:++w];if(!1===u(x[B],B,x))break}return i}}},22402:(s,i,u)=>{var _=u(71774),w=u(55639);s.exports=function createBind(s,i,u){var x=1&i,j=_(s);return function wrapper(){return(this&&this!==w&&this instanceof wrapper?j:s).apply(x?u:this,arguments)}}},98805:(s,i,u)=>{var _=u(40180),w=u(62689),x=u(83140),j=u(79833);s.exports=function createCaseFirst(s){return function(i){i=j(i);var u=w(i)?x(i):void 0,P=u?u[0]:i.charAt(0),B=u?_(u,1).join(""):i.slice(1);return P[s]()+B}}},35393:(s,i,u)=>{var _=u(62663),w=u(53816),x=u(58748),j=RegExp("['’]","g");s.exports=function createCompounder(s){return function(i){return _(x(w(i).replace(j,"")),s,"")}}},71774:(s,i,u)=>{var _=u(3118),w=u(13218);s.exports=function createCtor(s){return function(){var i=arguments;switch(i.length){case 0:return new s;case 1:return new s(i[0]);case 2:return new s(i[0],i[1]);case 3:return new s(i[0],i[1],i[2]);case 4:return new s(i[0],i[1],i[2],i[3]);case 5:return new s(i[0],i[1],i[2],i[3],i[4]);case 6:return new s(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new s(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var u=_(s.prototype),x=s.apply(u,i);return w(x)?x:u}}},46347:(s,i,u)=>{var _=u(96874),w=u(71774),x=u(86935),j=u(94487),P=u(20893),B=u(46460),$=u(55639);s.exports=function createCurry(s,i,u){var U=w(s);return function wrapper(){for(var w=arguments.length,Y=Array(w),X=w,Z=P(wrapper);X--;)Y[X]=arguments[X];var ee=w<3&&Y[0]!==Z&&Y[w-1]!==Z?[]:B(Y,Z);return(w-=ee.length){var _=u(67206),w=u(98612),x=u(3674);s.exports=function createFind(s){return function(i,u,j){var P=Object(i);if(!w(i)){var B=_(u,3);i=x(i),u=function(s){return B(P[s],s,P)}}var $=s(i,u,j);return $>-1?P[B?i[$]:$]:void 0}}},86935:(s,i,u)=>{var _=u(52157),w=u(14054),x=u(97991),j=u(71774),P=u(94487),B=u(20893),$=u(90451),U=u(46460),Y=u(55639);s.exports=function createHybrid(s,i,u,X,Z,ee,ae,ie,le,ce){var pe=128&i,de=1&i,fe=2&i,ye=24&i,be=512&i,_e=fe?void 0:j(s);return function wrapper(){for(var we=arguments.length,Se=Array(we),xe=we;xe--;)Se[xe]=arguments[xe];if(ye)var Pe=B(wrapper),Te=x(Se,Pe);if(X&&(Se=_(Se,X,Z,ye)),ee&&(Se=w(Se,ee,ae,ye)),we-=Te,ye&&we1&&Se.reverse(),pe&&le{var _=u(96874),w=u(71774),x=u(55639);s.exports=function createPartial(s,i,u,j){var P=1&i,B=w(s);return function wrapper(){for(var i=-1,w=arguments.length,$=-1,U=j.length,Y=Array(U+w),X=this&&this!==x&&this instanceof wrapper?B:s;++${var _=u(86528),w=u(258),x=u(69255);s.exports=function createRecurry(s,i,u,j,P,B,$,U,Y,X){var Z=8&i;i|=Z?32:64,4&(i&=~(Z?64:32))||(i&=-4);var ee=[s,i,P,Z?B:void 0,Z?$:void 0,Z?void 0:B,Z?void 0:$,U,Y,X],ae=u.apply(void 0,ee);return _(s)&&w(ae,ee),ae.placeholder=j,x(ae,s,i)}},97727:(s,i,u)=>{var _=u(28045),w=u(22402),x=u(46347),j=u(86935),P=u(84375),B=u(66833),$=u(63833),U=u(258),Y=u(69255),X=u(40554),Z=Math.max;s.exports=function createWrap(s,i,u,ee,ae,ie,le,ce){var pe=2&i;if(!pe&&"function"!=typeof s)throw new TypeError("Expected a function");var de=ee?ee.length:0;if(de||(i&=-97,ee=ae=void 0),le=void 0===le?le:Z(X(le),0),ce=void 0===ce?ce:X(ce),de-=ae?ae.length:0,64&i){var fe=ee,ye=ae;ee=ae=void 0}var be=pe?void 0:B(s),_e=[s,i,u,ee,ae,fe,ye,ie,le,ce];if(be&&$(_e,be),s=_e[0],i=_e[1],u=_e[2],ee=_e[3],ae=_e[4],!(ce=_e[9]=void 0===_e[9]?pe?0:s.length:Z(_e[9]-de,0))&&24&i&&(i&=-25),i&&1!=i)we=8==i||16==i?x(s,i,ce):32!=i&&33!=i||ae.length?j.apply(void 0,_e):P(s,i,u,ee);else var we=w(s,i,u);return Y((be?_:U)(we,_e),s,i)}},60696:(s,i,u)=>{var _=u(68630);s.exports=function customOmitClone(s){return _(s)?void 0:s}},69389:(s,i,u)=>{var _=u(18674)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});s.exports=_},38777:(s,i,u)=>{var _=u(10852),w=function(){try{var s=_(Object,"defineProperty");return s({},"",{}),s}catch(s){}}();s.exports=w},67114:(s,i,u)=>{var _=u(88668),w=u(82908),x=u(74757);s.exports=function equalArrays(s,i,u,j,P,B){var $=1&u,U=s.length,Y=i.length;if(U!=Y&&!($&&Y>U))return!1;var X=B.get(s),Z=B.get(i);if(X&&Z)return X==i&&Z==s;var ee=-1,ae=!0,ie=2&u?new _:void 0;for(B.set(s,i),B.set(i,s);++ee{var _=u(62705),w=u(11149),x=u(77813),j=u(67114),P=u(68776),B=u(21814),$=_?_.prototype:void 0,U=$?$.valueOf:void 0;s.exports=function equalByTag(s,i,u,_,$,Y,X){switch(u){case"[object DataView]":if(s.byteLength!=i.byteLength||s.byteOffset!=i.byteOffset)return!1;s=s.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(s.byteLength!=i.byteLength||!Y(new w(s),new w(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return x(+s,+i);case"[object Error]":return s.name==i.name&&s.message==i.message;case"[object RegExp]":case"[object String]":return s==i+"";case"[object Map]":var Z=P;case"[object Set]":var ee=1&_;if(Z||(Z=B),s.size!=i.size&&!ee)return!1;var ae=X.get(s);if(ae)return ae==i;_|=2,X.set(s,i);var ie=j(Z(s),Z(i),_,$,Y,X);return X.delete(s),ie;case"[object Symbol]":if(U)return U.call(s)==U.call(i)}return!1}},16096:(s,i,u)=>{var _=u(58234),w=Object.prototype.hasOwnProperty;s.exports=function equalObjects(s,i,u,x,j,P){var B=1&u,$=_(s),U=$.length;if(U!=_(i).length&&!B)return!1;for(var Y=U;Y--;){var X=$[Y];if(!(B?X in i:w.call(i,X)))return!1}var Z=P.get(s),ee=P.get(i);if(Z&&ee)return Z==i&&ee==s;var ae=!0;P.set(s,i),P.set(i,s);for(var ie=B;++Y{var _=u(85564),w=u(45357),x=u(30061);s.exports=function flatRest(s){return x(w(s,void 0,_),s+"")}},31957:(s,i,u)=>{var _="object"==typeof u.g&&u.g&&u.g.Object===Object&&u.g;s.exports=_},58234:(s,i,u)=>{var _=u(68866),w=u(99551),x=u(3674);s.exports=function getAllKeys(s){return _(s,x,w)}},46904:(s,i,u)=>{var _=u(68866),w=u(51442),x=u(81704);s.exports=function getAllKeysIn(s){return _(s,x,w)}},66833:(s,i,u)=>{var _=u(89250),w=u(50308),x=_?function(s){return _.get(s)}:w;s.exports=x},97658:(s,i,u)=>{var _=u(52060),w=Object.prototype.hasOwnProperty;s.exports=function getFuncName(s){for(var i=s.name+"",u=_[i],x=w.call(_,i)?u.length:0;x--;){var j=u[x],P=j.func;if(null==P||P==s)return j.name}return i}},20893:s=>{s.exports=function getHolder(s){return s.placeholder}},45050:(s,i,u)=>{var _=u(37019);s.exports=function getMapData(s,i){var u=s.__data__;return _(i)?u["string"==typeof i?"string":"hash"]:u.map}},1499:(s,i,u)=>{var _=u(89162),w=u(3674);s.exports=function getMatchData(s){for(var i=w(s),u=i.length;u--;){var x=i[u],j=s[x];i[u]=[x,j,_(j)]}return i}},10852:(s,i,u)=>{var _=u(28458),w=u(47801);s.exports=function getNative(s,i){var u=w(s,i);return _(u)?u:void 0}},85924:(s,i,u)=>{var _=u(5569)(Object.getPrototypeOf,Object);s.exports=_},89607:(s,i,u)=>{var _=u(62705),w=Object.prototype,x=w.hasOwnProperty,j=w.toString,P=_?_.toStringTag:void 0;s.exports=function getRawTag(s){var i=x.call(s,P),u=s[P];try{s[P]=void 0;var _=!0}catch(s){}var w=j.call(s);return _&&(i?s[P]=u:delete s[P]),w}},99551:(s,i,u)=>{var _=u(34963),w=u(70479),x=Object.prototype.propertyIsEnumerable,j=Object.getOwnPropertySymbols,P=j?function(s){return null==s?[]:(s=Object(s),_(j(s),(function(i){return x.call(s,i)})))}:w;s.exports=P},51442:(s,i,u)=>{var _=u(62488),w=u(85924),x=u(99551),j=u(70479),P=Object.getOwnPropertySymbols?function(s){for(var i=[];s;)_(i,x(s)),s=w(s);return i}:j;s.exports=P},64160:(s,i,u)=>{var _=u(18552),w=u(57071),x=u(53818),j=u(58525),P=u(70577),B=u(44239),$=u(80346),U="[object Map]",Y="[object Promise]",X="[object Set]",Z="[object WeakMap]",ee="[object DataView]",ae=$(_),ie=$(w),le=$(x),ce=$(j),pe=$(P),de=B;(_&&de(new _(new ArrayBuffer(1)))!=ee||w&&de(new w)!=U||x&&de(x.resolve())!=Y||j&&de(new j)!=X||P&&de(new P)!=Z)&&(de=function(s){var i=B(s),u="[object Object]"==i?s.constructor:void 0,_=u?$(u):"";if(_)switch(_){case ae:return ee;case ie:return U;case le:return Y;case ce:return X;case pe:return Z}return i}),s.exports=de},47801:s=>{s.exports=function getValue(s,i){return null==s?void 0:s[i]}},58775:s=>{var i=/\{\n\/\* \[wrapped with (.+)\] \*/,u=/,? & /;s.exports=function getWrapDetails(s){var _=s.match(i);return _?_[1].split(u):[]}},222:(s,i,u)=>{var _=u(71811),w=u(35694),x=u(1469),j=u(65776),P=u(41780),B=u(40327);s.exports=function hasPath(s,i,u){for(var $=-1,U=(i=_(i,s)).length,Y=!1;++${var i=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");s.exports=function hasUnicode(s){return i.test(s)}},93157:s=>{var i=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;s.exports=function hasUnicodeWord(s){return i.test(s)}},51789:(s,i,u)=>{var _=u(94536);s.exports=function hashClear(){this.__data__=_?_(null):{},this.size=0}},80401:s=>{s.exports=function hashDelete(s){var i=this.has(s)&&delete this.__data__[s];return this.size-=i?1:0,i}},57667:(s,i,u)=>{var _=u(94536),w=Object.prototype.hasOwnProperty;s.exports=function hashGet(s){var i=this.__data__;if(_){var u=i[s];return"__lodash_hash_undefined__"===u?void 0:u}return w.call(i,s)?i[s]:void 0}},21327:(s,i,u)=>{var _=u(94536),w=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var i=this.__data__;return _?void 0!==i[s]:w.call(i,s)}},81866:(s,i,u)=>{var _=u(94536);s.exports=function hashSet(s,i){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=_&&void 0===i?"__lodash_hash_undefined__":i,this}},43824:s=>{var i=Object.prototype.hasOwnProperty;s.exports=function initCloneArray(s){var u=s.length,_=new s.constructor(u);return u&&"string"==typeof s[0]&&i.call(s,"index")&&(_.index=s.index,_.input=s.input),_}},29148:(s,i,u)=>{var _=u(74318),w=u(57157),x=u(93147),j=u(40419),P=u(77133);s.exports=function initCloneByTag(s,i,u){var B=s.constructor;switch(i){case"[object ArrayBuffer]":return _(s);case"[object Boolean]":case"[object Date]":return new B(+s);case"[object DataView]":return w(s,u);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return P(s,u);case"[object Map]":case"[object Set]":return new B;case"[object Number]":case"[object String]":return new B(s);case"[object RegExp]":return x(s);case"[object Symbol]":return j(s)}}},38517:(s,i,u)=>{var _=u(3118),w=u(85924),x=u(25726);s.exports=function initCloneObject(s){return"function"!=typeof s.constructor||x(s)?{}:_(w(s))}},83112:s=>{var i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;s.exports=function insertWrapDetails(s,u){var _=u.length;if(!_)return s;var w=_-1;return u[w]=(_>1?"& ":"")+u[w],u=u.join(_>2?", ":" "),s.replace(i,"{\n/* [wrapped with "+u+"] */\n")}},37285:(s,i,u)=>{var _=u(62705),w=u(35694),x=u(1469),j=_?_.isConcatSpreadable:void 0;s.exports=function isFlattenable(s){return x(s)||w(s)||!!(j&&s&&s[j])}},65776:s=>{var i=/^(?:0|[1-9]\d*)$/;s.exports=function isIndex(s,u){var _=typeof s;return!!(u=null==u?9007199254740991:u)&&("number"==_||"symbol"!=_&&i.test(s))&&s>-1&&s%1==0&&s{var _=u(77813),w=u(98612),x=u(65776),j=u(13218);s.exports=function isIterateeCall(s,i,u){if(!j(u))return!1;var P=typeof i;return!!("number"==P?w(u)&&x(i,u.length):"string"==P&&i in u)&&_(u[i],s)}},15403:(s,i,u)=>{var _=u(1469),w=u(33448),x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/;s.exports=function isKey(s,i){if(_(s))return!1;var u=typeof s;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=s&&!w(s))||(j.test(s)||!x.test(s)||null!=i&&s in Object(i))}},37019:s=>{s.exports=function isKeyable(s){var i=typeof s;return"string"==i||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==s:null===s}},86528:(s,i,u)=>{var _=u(96425),w=u(66833),x=u(97658),j=u(8111);s.exports=function isLaziable(s){var i=x(s),u=j[i];if("function"!=typeof u||!(i in _.prototype))return!1;if(s===u)return!0;var P=w(u);return!!P&&s===P[0]}},15346:(s,i,u)=>{var _,w=u(14429),x=(_=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"";s.exports=function isMasked(s){return!!x&&x in s}},25726:s=>{var i=Object.prototype;s.exports=function isPrototype(s){var u=s&&s.constructor;return s===("function"==typeof u&&u.prototype||i)}},89162:(s,i,u)=>{var _=u(13218);s.exports=function isStrictComparable(s){return s==s&&!_(s)}},27040:s=>{s.exports=function listCacheClear(){this.__data__=[],this.size=0}},14125:(s,i,u)=>{var _=u(18470),w=Array.prototype.splice;s.exports=function listCacheDelete(s){var i=this.__data__,u=_(i,s);return!(u<0)&&(u==i.length-1?i.pop():w.call(i,u,1),--this.size,!0)}},82117:(s,i,u)=>{var _=u(18470);s.exports=function listCacheGet(s){var i=this.__data__,u=_(i,s);return u<0?void 0:i[u][1]}},67518:(s,i,u)=>{var _=u(18470);s.exports=function listCacheHas(s){return _(this.__data__,s)>-1}},54705:(s,i,u)=>{var _=u(18470);s.exports=function listCacheSet(s,i){var u=this.__data__,w=_(u,s);return w<0?(++this.size,u.push([s,i])):u[w][1]=i,this}},24785:(s,i,u)=>{var _=u(1989),w=u(38407),x=u(57071);s.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new _,map:new(x||w),string:new _}}},11285:(s,i,u)=>{var _=u(45050);s.exports=function mapCacheDelete(s){var i=_(this,s).delete(s);return this.size-=i?1:0,i}},96e3:(s,i,u)=>{var _=u(45050);s.exports=function mapCacheGet(s){return _(this,s).get(s)}},49916:(s,i,u)=>{var _=u(45050);s.exports=function mapCacheHas(s){return _(this,s).has(s)}},95265:(s,i,u)=>{var _=u(45050);s.exports=function mapCacheSet(s,i){var u=_(this,s),w=u.size;return u.set(s,i),this.size+=u.size==w?0:1,this}},68776:s=>{s.exports=function mapToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s,_){u[++i]=[_,s]})),u}},42634:s=>{s.exports=function matchesStrictComparable(s,i){return function(u){return null!=u&&(u[s]===i&&(void 0!==i||s in Object(u)))}}},24523:(s,i,u)=>{var _=u(88306);s.exports=function memoizeCapped(s){var i=_(s,(function(s){return 500===u.size&&u.clear(),s})),u=i.cache;return i}},63833:(s,i,u)=>{var _=u(52157),w=u(14054),x=u(46460),j="__lodash_placeholder__",P=128,B=Math.min;s.exports=function mergeData(s,i){var u=s[1],$=i[1],U=u|$,Y=U<131,X=$==P&&8==u||$==P&&256==u&&s[7].length<=i[8]||384==$&&i[7].length<=i[8]&&8==u;if(!Y&&!X)return s;1&$&&(s[2]=i[2],U|=1&u?0:4);var Z=i[3];if(Z){var ee=s[3];s[3]=ee?_(ee,Z,i[4]):Z,s[4]=ee?x(s[3],j):i[4]}return(Z=i[5])&&(ee=s[5],s[5]=ee?w(ee,Z,i[6]):Z,s[6]=ee?x(s[5],j):i[6]),(Z=i[7])&&(s[7]=Z),$&P&&(s[8]=null==s[8]?i[8]:B(s[8],i[8])),null==s[9]&&(s[9]=i[9]),s[0]=i[0],s[1]=U,s}},89250:(s,i,u)=>{var _=u(70577),w=_&&new _;s.exports=w},94536:(s,i,u)=>{var _=u(10852)(Object,"create");s.exports=_},86916:(s,i,u)=>{var _=u(5569)(Object.keys,Object);s.exports=_},33498:s=>{s.exports=function nativeKeysIn(s){var i=[];if(null!=s)for(var u in Object(s))i.push(u);return i}},31167:(s,i,u)=>{s=u.nmd(s);var _=u(31957),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w&&_.process,P=function(){try{var s=x&&x.require&&x.require("util").types;return s||j&&j.binding&&j.binding("util")}catch(s){}}();s.exports=P},2333:s=>{var i=Object.prototype.toString;s.exports=function objectToString(s){return i.call(s)}},5569:s=>{s.exports=function overArg(s,i){return function(u){return s(i(u))}}},45357:(s,i,u)=>{var _=u(96874),w=Math.max;s.exports=function overRest(s,i,u){return i=w(void 0===i?s.length-1:i,0),function(){for(var x=arguments,j=-1,P=w(x.length-i,0),B=Array(P);++j{var _=u(97786),w=u(14259);s.exports=function parent(s,i){return i.length<2?s:_(s,w(i,0,-1))}},52060:s=>{s.exports={}},90451:(s,i,u)=>{var _=u(278),w=u(65776),x=Math.min;s.exports=function reorder(s,i){for(var u=s.length,j=x(i.length,u),P=_(s);j--;){var B=i[j];s[j]=w(B,u)?P[B]:void 0}return s}},46460:s=>{var i="__lodash_placeholder__";s.exports=function replaceHolders(s,u){for(var _=-1,w=s.length,x=0,j=[];++_{var _=u(31957),w="object"==typeof self&&self&&self.Object===Object&&self,x=_||w||Function("return this")();s.exports=x},36390:s=>{s.exports=function safeGet(s,i){if(("constructor"!==i||"function"!=typeof s[i])&&"__proto__"!=i)return s[i]}},90619:s=>{s.exports=function setCacheAdd(s){return this.__data__.set(s,"__lodash_hash_undefined__"),this}},72385:s=>{s.exports=function setCacheHas(s){return this.__data__.has(s)}},258:(s,i,u)=>{var _=u(28045),w=u(21275)(_);s.exports=w},21814:s=>{s.exports=function setToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s){u[++i]=s})),u}},30061:(s,i,u)=>{var _=u(56560),w=u(21275)(_);s.exports=w},69255:(s,i,u)=>{var _=u(58775),w=u(83112),x=u(30061),j=u(87241);s.exports=function setWrapToString(s,i,u){var P=i+"";return x(s,w(P,j(_(P),u)))}},21275:s=>{var i=Date.now;s.exports=function shortOut(s){var u=0,_=0;return function(){var w=i(),x=16-(w-_);if(_=w,x>0){if(++u>=800)return arguments[0]}else u=0;return s.apply(void 0,arguments)}}},37465:(s,i,u)=>{var _=u(38407);s.exports=function stackClear(){this.__data__=new _,this.size=0}},63779:s=>{s.exports=function stackDelete(s){var i=this.__data__,u=i.delete(s);return this.size=i.size,u}},67599:s=>{s.exports=function stackGet(s){return this.__data__.get(s)}},44758:s=>{s.exports=function stackHas(s){return this.__data__.has(s)}},34309:(s,i,u)=>{var _=u(38407),w=u(57071),x=u(83369);s.exports=function stackSet(s,i){var u=this.__data__;if(u instanceof _){var j=u.__data__;if(!w||j.length<199)return j.push([s,i]),this.size=++u.size,this;u=this.__data__=new x(j)}return u.set(s,i),this.size=u.size,this}},42351:s=>{s.exports=function strictIndexOf(s,i,u){for(var _=u-1,w=s.length;++_{var _=u(44286),w=u(62689),x=u(676);s.exports=function stringToArray(s){return w(s)?x(s):_(s)}},55514:(s,i,u)=>{var _=u(24523),w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,j=_((function(s){var i=[];return 46===s.charCodeAt(0)&&i.push(""),s.replace(w,(function(s,u,_,w){i.push(_?w.replace(x,"$1"):u||s)})),i}));s.exports=j},40327:(s,i,u)=>{var _=u(33448);s.exports=function toKey(s){if("string"==typeof s||_(s))return s;var i=s+"";return"0"==i&&1/s==-Infinity?"-0":i}},80346:s=>{var i=Function.prototype.toString;s.exports=function toSource(s){if(null!=s){try{return i.call(s)}catch(s){}try{return s+""}catch(s){}}return""}},67990:s=>{var i=/\s/;s.exports=function trimmedEndIndex(s){for(var u=s.length;u--&&i.test(s.charAt(u)););return u}},676:s=>{var i="\\ud800-\\udfff",u="["+i+"]",_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",w="\\ud83c[\\udffb-\\udfff]",x="[^"+i+"]",j="(?:\\ud83c[\\udde6-\\uddff]){2}",P="[\\ud800-\\udbff][\\udc00-\\udfff]",B="(?:"+_+"|"+w+")"+"?",$="[\\ufe0e\\ufe0f]?",U=$+B+("(?:\\u200d(?:"+[x,j,P].join("|")+")"+$+B+")*"),Y="(?:"+[x+_+"?",_,j,P,u].join("|")+")",X=RegExp(w+"(?="+w+")|"+Y+U,"g");s.exports=function unicodeToArray(s){return s.match(X)||[]}},2757:s=>{var i="\\ud800-\\udfff",u="\\u2700-\\u27bf",_="a-z\\xdf-\\xf6\\xf8-\\xff",w="A-Z\\xc0-\\xd6\\xd8-\\xde",x="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",j="["+x+"]",P="\\d+",B="["+u+"]",$="["+_+"]",U="[^"+i+x+P+u+_+w+"]",Y="(?:\\ud83c[\\udde6-\\uddff]){2}",X="[\\ud800-\\udbff][\\udc00-\\udfff]",Z="["+w+"]",ee="(?:"+$+"|"+U+")",ae="(?:"+Z+"|"+U+")",ie="(?:['’](?:d|ll|m|re|s|t|ve))?",le="(?:['’](?:D|LL|M|RE|S|T|VE))?",ce="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",pe="[\\ufe0e\\ufe0f]?",de=pe+ce+("(?:\\u200d(?:"+["[^"+i+"]",Y,X].join("|")+")"+pe+ce+")*"),fe="(?:"+[B,Y,X].join("|")+")"+de,ye=RegExp([Z+"?"+$+"+"+ie+"(?="+[j,Z,"$"].join("|")+")",ae+"+"+le+"(?="+[j,Z+ee,"$"].join("|")+")",Z+"?"+ee+"+"+ie,Z+"+"+le,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",P,fe].join("|"),"g");s.exports=function unicodeWords(s){return s.match(ye)||[]}},87241:(s,i,u)=>{var _=u(77412),w=u(47443),x=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];s.exports=function updateWrapDetails(s,i){return _(x,(function(u){var _="_."+u[0];i&u[1]&&!w(s,_)&&s.push(_)})),s.sort()}},21913:(s,i,u)=>{var _=u(96425),w=u(7548),x=u(278);s.exports=function wrapperClone(s){if(s instanceof _)return s.clone();var i=new w(s.__wrapped__,s.__chain__);return i.__actions__=x(s.__actions__),i.__index__=s.__index__,i.__values__=s.__values__,i}},39514:(s,i,u)=>{var _=u(97727);s.exports=function ary(s,i,u){return i=u?void 0:i,i=s&&null==i?s.length:i,_(s,128,void 0,void 0,void 0,void 0,i)}},68929:(s,i,u)=>{var _=u(48403),w=u(35393)((function(s,i,u){return i=i.toLowerCase(),s+(u?_(i):i)}));s.exports=w},48403:(s,i,u)=>{var _=u(79833),w=u(11700);s.exports=function capitalize(s){return w(_(s).toLowerCase())}},66678:(s,i,u)=>{var _=u(85990);s.exports=function clone(s){return _(s,4)}},75703:s=>{s.exports=function constant(s){return function(){return s}}},40087:(s,i,u)=>{var _=u(97727);function curry(s,i,u){var w=_(s,8,void 0,void 0,void 0,void 0,void 0,i=u?void 0:i);return w.placeholder=curry.placeholder,w}curry.placeholder={},s.exports=curry},23279:(s,i,u)=>{var _=u(13218),w=u(7771),x=u(14841),j=Math.max,P=Math.min;s.exports=function debounce(s,i,u){var B,$,U,Y,X,Z,ee=0,ae=!1,ie=!1,le=!0;if("function"!=typeof s)throw new TypeError("Expected a function");function invokeFunc(i){var u=B,_=$;return B=$=void 0,ee=i,Y=s.apply(_,u)}function shouldInvoke(s){var u=s-Z;return void 0===Z||u>=i||u<0||ie&&s-ee>=U}function timerExpired(){var s=w();if(shouldInvoke(s))return trailingEdge(s);X=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-Z);return ie?P(u,U-(s-ee)):u}(s))}function trailingEdge(s){return X=void 0,le&&B?invokeFunc(s):(B=$=void 0,Y)}function debounced(){var s=w(),u=shouldInvoke(s);if(B=arguments,$=this,Z=s,u){if(void 0===X)return function leadingEdge(s){return ee=s,X=setTimeout(timerExpired,i),ae?invokeFunc(s):Y}(Z);if(ie)return clearTimeout(X),X=setTimeout(timerExpired,i),invokeFunc(Z)}return void 0===X&&(X=setTimeout(timerExpired,i)),Y}return i=x(i)||0,_(u)&&(ae=!!u.leading,U=(ie="maxWait"in u)?j(x(u.maxWait)||0,i):U,le="trailing"in u?!!u.trailing:le),debounced.cancel=function cancel(){void 0!==X&&clearTimeout(X),ee=0,B=Z=$=X=void 0},debounced.flush=function flush(){return void 0===X?Y:trailingEdge(w())},debounced}},53816:(s,i,u)=>{var _=u(69389),w=u(79833),x=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,j=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");s.exports=function deburr(s){return(s=w(s))&&s.replace(x,_).replace(j,"")}},77813:s=>{s.exports=function eq(s,i){return s===i||s!=s&&i!=i}},13311:(s,i,u)=>{var _=u(67740)(u(30998));s.exports=_},30998:(s,i,u)=>{var _=u(41848),w=u(67206),x=u(40554),j=Math.max;s.exports=function findIndex(s,i,u){var P=null==s?0:s.length;if(!P)return-1;var B=null==u?0:x(u);return B<0&&(B=j(P+B,0)),_(s,w(i,3),B)}},85564:(s,i,u)=>{var _=u(21078);s.exports=function flatten(s){return(null==s?0:s.length)?_(s,1):[]}},84599:(s,i,u)=>{var _=u(68836),w=u(69306),x=Array.prototype.push;function baseAry(s,i){return 2==i?function(i,u){return s(i,u)}:function(i){return s(i)}}function cloneArray(s){for(var i=s?s.length:0,u=Array(i);i--;)u[i]=s[i];return u}function wrapImmutable(s,i){return function(){var u=arguments.length;if(u){for(var _=Array(u);u--;)_[u]=arguments[u];var w=_[0]=i.apply(void 0,_);return s.apply(void 0,_),w}}}s.exports=function baseConvert(s,i,u,j){var P="function"==typeof i,B=i===Object(i);if(B&&(j=u,u=i,i=void 0),null==u)throw new TypeError;j||(j={});var $={cap:!("cap"in j)||j.cap,curry:!("curry"in j)||j.curry,fixed:!("fixed"in j)||j.fixed,immutable:!("immutable"in j)||j.immutable,rearg:!("rearg"in j)||j.rearg},U=P?u:w,Y="curry"in j&&j.curry,X="fixed"in j&&j.fixed,Z="rearg"in j&&j.rearg,ee=P?u.runInContext():void 0,ae=P?u:{ary:s.ary,assign:s.assign,clone:s.clone,curry:s.curry,forEach:s.forEach,isArray:s.isArray,isError:s.isError,isFunction:s.isFunction,isWeakMap:s.isWeakMap,iteratee:s.iteratee,keys:s.keys,rearg:s.rearg,toInteger:s.toInteger,toPath:s.toPath},ie=ae.ary,le=ae.assign,ce=ae.clone,pe=ae.curry,de=ae.forEach,fe=ae.isArray,ye=ae.isError,be=ae.isFunction,_e=ae.isWeakMap,we=ae.keys,Se=ae.rearg,xe=ae.toInteger,Pe=ae.toPath,Te=we(_.aryMethod),Re={castArray:function(s){return function(){var i=arguments[0];return fe(i)?s(cloneArray(i)):s.apply(void 0,arguments)}},iteratee:function(s){return function(){var i=arguments[1],u=s(arguments[0],i),_=u.length;return $.cap&&"number"==typeof i?(i=i>2?i-2:1,_&&_<=i?u:baseAry(u,i)):u}},mixin:function(s){return function(i){var u=this;if(!be(u))return s(u,Object(i));var _=[];return de(we(i),(function(s){be(i[s])&&_.push([s,u.prototype[s]])})),s(u,Object(i)),de(_,(function(s){var i=s[1];be(i)?u.prototype[s[0]]=i:delete u.prototype[s[0]]})),u}},nthArg:function(s){return function(i){var u=i<0?1:xe(i)+1;return pe(s(i),u)}},rearg:function(s){return function(i,u){var _=u?u.length:0;return pe(s(i,u),_)}},runInContext:function(i){return function(u){return baseConvert(s,i(u),j)}}};function castCap(s,i){if($.cap){var u=_.iterateeRearg[s];if(u)return function iterateeRearg(s,i){return overArg(s,(function(s){var u=i.length;return function baseArity(s,i){return 2==i?function(i,u){return s.apply(void 0,arguments)}:function(i){return s.apply(void 0,arguments)}}(Se(baseAry(s,u),i),u)}))}(i,u);var w=!P&&_.iterateeAry[s];if(w)return function iterateeAry(s,i){return overArg(s,(function(s){return"function"==typeof s?baseAry(s,i):s}))}(i,w)}return i}function castFixed(s,i,u){if($.fixed&&(X||!_.skipFixed[s])){var w=_.methodSpread[s],j=w&&w.start;return void 0===j?ie(i,u):function flatSpread(s,i){return function(){for(var u=arguments.length,_=u-1,w=Array(u);u--;)w[u]=arguments[u];var j=w[i],P=w.slice(0,i);return j&&x.apply(P,j),i!=_&&x.apply(P,w.slice(i+1)),s.apply(this,P)}}(i,j)}return i}function castRearg(s,i,u){return $.rearg&&u>1&&(Z||!_.skipRearg[s])?Se(i,_.methodRearg[s]||_.aryRearg[u]):i}function cloneByPath(s,i){for(var u=-1,_=(i=Pe(i)).length,w=_-1,x=ce(Object(s)),j=x;null!=j&&++u<_;){var P=i[u],B=j[P];null==B||be(B)||ye(B)||_e(B)||(j[P]=ce(u==w?B:Object(B))),j=j[P]}return x}function createConverter(s,i){var u=_.aliasToReal[s]||s,w=_.remap[u]||u,x=j;return function(s){var _=P?ee:ae,j=P?ee[w]:i,B=le(le({},x),s);return baseConvert(_,u,j,B)}}function overArg(s,i){return function(){var u=arguments.length;if(!u)return s();for(var _=Array(u);u--;)_[u]=arguments[u];var w=$.rearg?0:u-1;return _[w]=i(_[w]),s.apply(void 0,_)}}function wrap(s,i,u){var w,x=_.aliasToReal[s]||s,j=i,P=Re[x];return P?j=P(i):$.immutable&&(_.mutate.array[x]?j=wrapImmutable(i,cloneArray):_.mutate.object[x]?j=wrapImmutable(i,function createCloner(s){return function(i){return s({},i)}}(i)):_.mutate.set[x]&&(j=wrapImmutable(i,cloneByPath))),de(Te,(function(s){return de(_.aryMethod[s],(function(i){if(x==i){var u=_.methodSpread[x],P=u&&u.afterRearg;return w=P?castFixed(x,castRearg(x,j,s),s):castRearg(x,castFixed(x,j,s),s),w=function castCurry(s,i,u){return Y||$.curry&&u>1?pe(i,u):i}(0,w=castCap(x,w),s),!1}})),!w})),w||(w=j),w==i&&(w=Y?pe(w,1):function(){return i.apply(this,arguments)}),w.convert=createConverter(x,i),w.placeholder=i.placeholder=u,w}if(!B)return wrap(i,u,U);var qe=u,$e=[];return de(Te,(function(s){de(_.aryMethod[s],(function(s){var i=qe[_.remap[s]||s];i&&$e.push([s,wrap(s,i,qe)])}))})),de(we(qe),(function(s){var i=qe[s];if("function"==typeof i){for(var u=$e.length;u--;)if($e[u][0]==s)return;i.convert=createConverter(s,i),$e.push([s,i])}})),de($e,(function(s){qe[s[0]]=s[1]})),qe.convert=function convertLib(s){return qe.runInContext.convert(s)(void 0)},qe.placeholder=qe,de(we(qe),(function(s){de(_.realToAlias[s]||[],(function(i){qe[i]=qe[s]}))})),qe}},68836:(s,i)=>{i.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},i.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},i.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},i.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},i.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},i.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},i.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},i.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},i.realToAlias=function(){var s=Object.prototype.hasOwnProperty,u=i.aliasToReal,_={};for(var w in u){var x=u[w];s.call(_,x)?_[x].push(w):_[x]=[w]}return _}(),i.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},i.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},i.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},4269:(s,i,u)=>{s.exports={ary:u(39514),assign:u(44037),clone:u(66678),curry:u(40087),forEach:u(77412),isArray:u(1469),isError:u(64647),isFunction:u(23560),isWeakMap:u(81018),iteratee:u(72594),keys:u(280),rearg:u(4963),toInteger:u(40554),toPath:u(30084)}},72700:(s,i,u)=>{s.exports=u(28252)},92822:(s,i,u)=>{var _=u(84599),w=u(4269);s.exports=function convert(s,i,u){return _(w,s,i,u)}},69306:s=>{s.exports={}},28252:(s,i,u)=>{var _=u(92822)("set",u(36968));_.placeholder=u(69306),s.exports=_},27361:(s,i,u)=>{var _=u(97786);s.exports=function get(s,i,u){var w=null==s?void 0:_(s,i);return void 0===w?u:w}},79095:(s,i,u)=>{var _=u(13),w=u(222);s.exports=function hasIn(s,i){return null!=s&&w(s,i,_)}},6557:s=>{s.exports=function identity(s){return s}},35694:(s,i,u)=>{var _=u(9454),w=u(37005),x=Object.prototype,j=x.hasOwnProperty,P=x.propertyIsEnumerable,B=_(function(){return arguments}())?_:function(s){return w(s)&&j.call(s,"callee")&&!P.call(s,"callee")};s.exports=B},1469:s=>{var i=Array.isArray;s.exports=i},98612:(s,i,u)=>{var _=u(23560),w=u(41780);s.exports=function isArrayLike(s){return null!=s&&w(s.length)&&!_(s)}},29246:(s,i,u)=>{var _=u(98612),w=u(37005);s.exports=function isArrayLikeObject(s){return w(s)&&_(s)}},51584:(s,i,u)=>{var _=u(44239),w=u(37005);s.exports=function isBoolean(s){return!0===s||!1===s||w(s)&&"[object Boolean]"==_(s)}},44144:(s,i,u)=>{s=u.nmd(s);var _=u(55639),w=u(95062),x=i&&!i.nodeType&&i,j=x&&s&&!s.nodeType&&s,P=j&&j.exports===x?_.Buffer:void 0,B=(P?P.isBuffer:void 0)||w;s.exports=B},41609:(s,i,u)=>{var _=u(280),w=u(64160),x=u(35694),j=u(1469),P=u(98612),B=u(44144),$=u(25726),U=u(36719),Y=Object.prototype.hasOwnProperty;s.exports=function isEmpty(s){if(null==s)return!0;if(P(s)&&(j(s)||"string"==typeof s||"function"==typeof s.splice||B(s)||U(s)||x(s)))return!s.length;var i=w(s);if("[object Map]"==i||"[object Set]"==i)return!s.size;if($(s))return!_(s).length;for(var u in s)if(Y.call(s,u))return!1;return!0}},18446:(s,i,u)=>{var _=u(90939);s.exports=function isEqual(s,i){return _(s,i)}},64647:(s,i,u)=>{var _=u(44239),w=u(37005),x=u(68630);s.exports=function isError(s){if(!w(s))return!1;var i=_(s);return"[object Error]"==i||"[object DOMException]"==i||"string"==typeof s.message&&"string"==typeof s.name&&!x(s)}},23560:(s,i,u)=>{var _=u(44239),w=u(13218);s.exports=function isFunction(s){if(!w(s))return!1;var i=_(s);return"[object Function]"==i||"[object GeneratorFunction]"==i||"[object AsyncFunction]"==i||"[object Proxy]"==i}},41780:s=>{s.exports=function isLength(s){return"number"==typeof s&&s>-1&&s%1==0&&s<=9007199254740991}},56688:(s,i,u)=>{var _=u(25588),w=u(7518),x=u(31167),j=x&&x.isMap,P=j?w(j):_;s.exports=P},45220:s=>{s.exports=function isNull(s){return null===s}},81763:(s,i,u)=>{var _=u(44239),w=u(37005);s.exports=function isNumber(s){return"number"==typeof s||w(s)&&"[object Number]"==_(s)}},13218:s=>{s.exports=function isObject(s){var i=typeof s;return null!=s&&("object"==i||"function"==i)}},37005:s=>{s.exports=function isObjectLike(s){return null!=s&&"object"==typeof s}},68630:(s,i,u)=>{var _=u(44239),w=u(85924),x=u(37005),j=Function.prototype,P=Object.prototype,B=j.toString,$=P.hasOwnProperty,U=B.call(Object);s.exports=function isPlainObject(s){if(!x(s)||"[object Object]"!=_(s))return!1;var i=w(s);if(null===i)return!0;var u=$.call(i,"constructor")&&i.constructor;return"function"==typeof u&&u instanceof u&&B.call(u)==U}},72928:(s,i,u)=>{var _=u(29221),w=u(7518),x=u(31167),j=x&&x.isSet,P=j?w(j):_;s.exports=P},47037:(s,i,u)=>{var _=u(44239),w=u(1469),x=u(37005);s.exports=function isString(s){return"string"==typeof s||!w(s)&&x(s)&&"[object String]"==_(s)}},33448:(s,i,u)=>{var _=u(44239),w=u(37005);s.exports=function isSymbol(s){return"symbol"==typeof s||w(s)&&"[object Symbol]"==_(s)}},36719:(s,i,u)=>{var _=u(38749),w=u(7518),x=u(31167),j=x&&x.isTypedArray,P=j?w(j):_;s.exports=P},81018:(s,i,u)=>{var _=u(64160),w=u(37005);s.exports=function isWeakMap(s){return w(s)&&"[object WeakMap]"==_(s)}},72594:(s,i,u)=>{var _=u(85990),w=u(67206);s.exports=function iteratee(s){return w("function"==typeof s?s:_(s,1))}},3674:(s,i,u)=>{var _=u(14636),w=u(280),x=u(98612);s.exports=function keys(s){return x(s)?_(s):w(s)}},81704:(s,i,u)=>{var _=u(14636),w=u(10313),x=u(98612);s.exports=function keysIn(s){return x(s)?_(s,!0):w(s)}},10928:s=>{s.exports=function last(s){var i=null==s?0:s.length;return i?s[i-1]:void 0}},88306:(s,i,u)=>{var _=u(83369);function memoize(s,i){if("function"!=typeof s||null!=i&&"function"!=typeof i)throw new TypeError("Expected a function");var memoized=function(){var u=arguments,_=i?i.apply(this,u):u[0],w=memoized.cache;if(w.has(_))return w.get(_);var x=s.apply(this,u);return memoized.cache=w.set(_,x)||w,x};return memoized.cache=new(memoize.Cache||_),memoized}memoize.Cache=_,s.exports=memoize},82492:(s,i,u)=>{var _=u(42980),w=u(21463)((function(s,i,u){_(s,i,u)}));s.exports=w},94885:s=>{s.exports=function negate(s){if("function"!=typeof s)throw new TypeError("Expected a function");return function(){var i=arguments;switch(i.length){case 0:return!s.call(this);case 1:return!s.call(this,i[0]);case 2:return!s.call(this,i[0],i[1]);case 3:return!s.call(this,i[0],i[1],i[2])}return!s.apply(this,i)}}},50308:s=>{s.exports=function noop(){}},7771:(s,i,u)=>{var _=u(55639);s.exports=function(){return _.Date.now()}},57557:(s,i,u)=>{var _=u(29932),w=u(85990),x=u(57406),j=u(71811),P=u(98363),B=u(60696),$=u(99021),U=u(46904),Y=$((function(s,i){var u={};if(null==s)return u;var $=!1;i=_(i,(function(i){return i=j(i,s),$||($=i.length>1),i})),P(s,U(s),u),$&&(u=w(u,7,B));for(var Y=i.length;Y--;)x(u,i[Y]);return u}));s.exports=Y},39601:(s,i,u)=>{var _=u(40371),w=u(79152),x=u(15403),j=u(40327);s.exports=function property(s){return x(s)?_(j(s)):w(s)}},4963:(s,i,u)=>{var _=u(97727),w=u(99021),x=w((function(s,i){return _(s,256,void 0,void 0,void 0,i)}));s.exports=x},54061:(s,i,u)=>{var _=u(62663),w=u(89881),x=u(67206),j=u(10107),P=u(1469);s.exports=function reduce(s,i,u){var B=P(s)?_:j,$=arguments.length<3;return B(s,x(i,4),u,$,w)}},36968:(s,i,u)=>{var _=u(10611);s.exports=function set(s,i,u){return null==s?s:_(s,i,u)}},59704:(s,i,u)=>{var _=u(82908),w=u(67206),x=u(5076),j=u(1469),P=u(16612);s.exports=function some(s,i,u){var B=j(s)?_:x;return u&&P(s,i,u)&&(i=void 0),B(s,w(i,3))}},70479:s=>{s.exports=function stubArray(){return[]}},95062:s=>{s.exports=function stubFalse(){return!1}},18601:(s,i,u)=>{var _=u(14841),w=1/0;s.exports=function toFinite(s){return s?(s=_(s))===w||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},40554:(s,i,u)=>{var _=u(18601);s.exports=function toInteger(s){var i=_(s),u=i%1;return i==i?u?i-u:i:0}},7334:(s,i,u)=>{var _=u(79833);s.exports=function toLower(s){return _(s).toLowerCase()}},14841:(s,i,u)=>{var _=u(27561),w=u(13218),x=u(33448),j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt;s.exports=function toNumber(s){if("number"==typeof s)return s;if(x(s))return NaN;if(w(s)){var i="function"==typeof s.valueOf?s.valueOf():s;s=w(i)?i+"":i}if("string"!=typeof s)return 0===s?s:+s;s=_(s);var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?NaN:+s}},30084:(s,i,u)=>{var _=u(29932),w=u(278),x=u(1469),j=u(33448),P=u(55514),B=u(40327),$=u(79833);s.exports=function toPath(s){return x(s)?_(s,B):j(s)?[s]:w(P($(s)))}},59881:(s,i,u)=>{var _=u(98363),w=u(81704);s.exports=function toPlainObject(s){return _(s,w(s))}},79833:(s,i,u)=>{var _=u(80531);s.exports=function toString(s){return null==s?"":_(s)}},11700:(s,i,u)=>{var _=u(98805)("toUpperCase");s.exports=_},58748:(s,i,u)=>{var _=u(49029),w=u(93157),x=u(79833),j=u(2757);s.exports=function words(s,i,u){return s=x(s),void 0===(i=u?void 0:i)?w(s)?j(s):_(s):s.match(i)||[]}},8111:(s,i,u)=>{var _=u(96425),w=u(7548),x=u(9435),j=u(1469),P=u(37005),B=u(21913),$=Object.prototype.hasOwnProperty;function lodash(s){if(P(s)&&!j(s)&&!(s instanceof _)){if(s instanceof w)return s;if($.call(s,"__wrapped__"))return B(s)}return new w(s)}lodash.prototype=x.prototype,lodash.prototype.constructor=lodash,s.exports=lodash},7287:(s,i,u)=>{var _=u(34865),w=u(1757);s.exports=function zipObject(s,i){return w(s||[],i||[],_)}},96470:(s,i,u)=>{"use strict";var _=u(47802),w=u(21102);i.highlight=highlight,i.highlightAuto=function highlightAuto(s,i){var u,j,P,B,$=i||{},U=$.subset||_.listLanguages(),Y=$.prefix,X=U.length,Z=-1;null==Y&&(Y=x);if("string"!=typeof s)throw w("Expected `string` for value, got `%s`",s);j={relevance:0,language:null,value:[]},u={relevance:0,language:null,value:[]};for(;++Zj.relevance&&(j=P),P.relevance>u.relevance&&(j=u,u=P));j.language&&(u.secondBest=j);return u},i.registerLanguage=function registerLanguage(s,i){_.registerLanguage(s,i)},i.listLanguages=function listLanguages(){return _.listLanguages()},i.registerAlias=function registerAlias(s,i){var u,w=s;i&&((w={})[s]=i);for(u in w)_.registerAliases(w[u],{languageName:u})},Emitter.prototype.addText=function text(s){var i,u,_=this.stack;if(""===s)return;i=_[_.length-1],(u=i.children[i.children.length-1])&&"text"===u.type?u.value+=s:i.children.push({type:"text",value:s})},Emitter.prototype.addKeyword=function addKeyword(s,i){this.openNode(i),this.addText(s),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(s,i){var u=this.stack,_=u[u.length-1],w=s.rootNode.children,x=i?{type:"element",tagName:"span",properties:{className:[i]},children:w}:w;_.children=_.children.concat(x)},Emitter.prototype.openNode=function open(s){var i=this.stack,u=this.options.classPrefix+s,_=i[i.length-1],w={type:"element",tagName:"span",properties:{className:[u]},children:[]};_.children.push(w),i.push(w)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return""};var x="hljs-";function highlight(s,i,u){var j,P=_.configure({}),B=(u||{}).prefix;if("string"!=typeof s)throw w("Expected `string` for name, got `%s`",s);if(!_.getLanguage(s))throw w("Unknown language: `%s` is not registered",s);if("string"!=typeof i)throw w("Expected `string` for value, got `%s`",i);if(null==B&&(B=x),_.configure({__emitter:Emitter,classPrefix:B}),j=_.highlight(i,{language:s,ignoreIllegals:!0}),_.configure(P||{}),j.errorRaised)throw j.errorRaised;return{relevance:j.relevance,language:j.language,value:j.emitter.rootNode.children}}function Emitter(s){this.options=s,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},42566:(s,i,u)=>{const _=u(94885);function coerceElementMatchingCallback(s){return"string"==typeof s?i=>i.element===s:s.constructor&&s.extend?i=>i instanceof s:s}class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return this.elements.map((s=>s.toValue()))}map(s,i){return this.elements.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(s,i))}reject(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(_(s),i))}find(s,i){return s=coerceElementMatchingCallback(s),this.elements.find(s,i)}forEach(s,i){this.elements.forEach(s,i)}reduce(s,i){return this.elements.reduce(s,i)}includes(s){return this.elements.some((i=>i.equals(s)))}shift(){return this.elements.shift()}unshift(s){this.elements.unshift(this.refract(s))}push(s){return this.elements.push(this.refract(s)),this}add(s){this.push(s)}get(s){return this.elements[s]}getValue(s){const i=this.elements[s];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}"undefined"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),s.exports=ArraySlice},17645:s=>{class KeyValuePair{constructor(s,i){this.key=s,this.value=i}clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clone()),this.value&&(s.value=this.value.clone()),s}}s.exports=KeyValuePair},72267:(s,i,u)=>{const _=u(45220),w=u(47037),x=u(81763),j=u(51584),P=u(13218),B=u(28219),$=u(99829);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=$.Element,this.KeyValuePair=$.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register("null",$.NullElement).register("string",$.StringElement).register("number",$.NumberElement).register("boolean",$.BooleanElement).register("array",$.ArrayElement).register("object",$.ObjectElement).register("member",$.MemberElement).register("ref",$.RefElement).register("link",$.LinkElement),this.detect(_,$.NullElement,!1).detect(w,$.StringElement,!1).detect(x,$.NumberElement,!1).detect(j,$.BooleanElement,!1).detect(Array.isArray,$.ArrayElement,!1).detect(P,$.ObjectElement,!1),this}register(s,i){return this._elements=void 0,this.elementMap[s]=i,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,i,u){return void 0===u||u?this.elementDetection.unshift([s,i]):this.elementDetection.push([s,i]),this}toElement(s){if(s instanceof this.Element)return s;let i;for(let u=0;u{const i=s[0].toUpperCase()+s.substr(1);this._elements[i]=this.elementMap[s]}))),this._elements}get serialiser(){return new B(this)}}B.prototype.Namespace=Namespace,s.exports=Namespace},87526:(s,i,u)=>{const _=u(94885),w=u(42566);class ObjectSlice extends w{map(s,i){return this.elements.map((u=>s.bind(i)(u.value,u.key,u)))}filter(s,i){return new ObjectSlice(this.elements.filter((u=>s.bind(i)(u.value,u.key,u))))}reject(s,i){return this.filter(_(s.bind(i)))}forEach(s,i){return this.elements.forEach(((u,_)=>{s.bind(i)(u.value,u.key,u,_)}))}keys(){return this.map(((s,i)=>i.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},99829:(s,i,u)=>{const _=u(3079),w=u(96295),x=u(16036),j=u(91090),P=u(18866),B=u(35804),$=u(5946),U=u(76735),Y=u(59964),X=u(38588),Z=u(42566),ee=u(87526),ae=u(17645);function refract(s){if(s instanceof _)return s;if("string"==typeof s)return new x(s);if("number"==typeof s)return new j(s);if("boolean"==typeof s)return new P(s);if(null===s)return new w;if(Array.isArray(s))return new B(s.map(refract));if("object"==typeof s){return new U(s)}return s}_.prototype.ObjectElement=U,_.prototype.RefElement=X,_.prototype.MemberElement=$,_.prototype.refract=refract,Z.prototype.refract=refract,s.exports={Element:_,NullElement:w,StringElement:x,NumberElement:j,BooleanElement:P,ArrayElement:B,MemberElement:$,ObjectElement:U,LinkElement:Y,RefElement:X,refract,ArraySlice:Z,ObjectSlice:ee,KeyValuePair:ae}},59964:(s,i,u)=>{const _=u(3079);s.exports=class LinkElement extends _{constructor(s,i,u){super(s||[],i,u),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(s){this.attributes.set("relation",s)}get href(){return this.attributes.get("href")}set href(s){this.attributes.set("href",s)}}},38588:(s,i,u)=>{const _=u(3079);s.exports=class RefElement extends _{constructor(s,i,u){super(s||[],i,u),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(s){this.attributes.set("path",s)}}},43500:(s,i,u)=>{const _=u(72267),w=u(99829);i.lS=_,i.KeyValuePair=u(17645),i.O4=w.ArraySlice,i.rm=w.ObjectSlice,i.W_=w.Element,i.RP=w.StringElement,i.VL=w.NumberElement,i.hh=w.BooleanElement,i.zr=w.NullElement,i.ON=w.ArrayElement,i.Sb=w.ObjectElement,i.c6=w.MemberElement,i.tK=w.RefElement,i.EA=w.LinkElement,i.Qc=w.refract,u(28219),u(3414)},35804:(s,i,u)=>{const _=u(94885),w=u(3079),x=u(42566);class ArrayElement extends w{constructor(s,i,u){super(s||[],i,u),this.element="array"}primitive(){return"array"}get(s){return this.content[s]}getValue(s){const i=this.get(s);if(i)return i.toValue()}getIndex(s){return this.content[s]}set(s,i){return this.content[s]=this.refract(i),this}remove(s){const i=this.content.splice(s,1);return i.length?i[0]:null}map(s,i){return this.content.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return new x(this.content.filter(s,i))}reject(s,i){return this.filter(_(s),i)}reduce(s,i){let u,_;void 0!==i?(u=0,_=this.refract(i)):(u=1,_="object"===this.primitive()?this.first.value:this.first);for(let i=u;i{s.bind(i)(u,this.refract(_))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,i){const u=i||{},_=!!u.recursive,w=void 0===u.results?[]:u.results;return this.forEach(((i,u,x)=>{_&&void 0!==i.findElements&&i.findElements(s,{results:w,recursive:_}),s(i,u,x)&&w.push(i)})),w}find(s){return new x(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((i=>i.element===s))}findByClass(s){return this.find((i=>i.classes.includes(s)))}getById(s){return this.find((i=>i.id.toValue()===s)).first}includes(s){return this.content.some((i=>i.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}"fantasy-land/concat"(s){return this.concat(s)}"fantasy-land/map"(s){return new this.constructor(this.map(s))}"fantasy-land/chain"(s){return this.map((i=>s(i)),this).reduce(((s,i)=>s.concat(i)),this.empty())}"fantasy-land/filter"(s){return new this.constructor(this.content.filter(s))}"fantasy-land/reduce"(s,i){return this.content.reduce(s,i)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement["fantasy-land/empty"]=ArrayElement.empty,"undefined"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},18866:(s,i,u)=>{const _=u(3079);s.exports=class BooleanElement extends _{constructor(s,i,u){super(s,i,u),this.element="boolean"}primitive(){return"boolean"}}},3079:(s,i,u)=>{const _=u(18446),w=u(17645),x=u(42566);class Element{constructor(s,i,u){i&&(this.meta=i),u&&(this.attributes=u),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const i=new this.RefElement(this.id.toValue());return s&&(i.path=s),i}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const i=s.pop();let u=new x;const append=(s,i)=>(s.push(i),s),checkElement=(s,u)=>{u.element===i&&s.push(u);const _=u.findRecursive(i);return _&&_.reduce(append,s),u.content instanceof w&&(u.content.key&&checkElement(s,u.content.key),u.content.value&&checkElement(s,u.content.value)),s};return this.content&&(this.content.element&&checkElement(u,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,u)),s.isEmpty||(u=u.filter((i=>{let u=i.parents.map((s=>s.element));for(const i in s){const _=s[i],w=u.indexOf(_);if(-1===w)return!1;u=u.splice(0,w)}return!0}))),u}set(s){return this.content=s,this}equals(s){return _(this.toValue(),s)}getMetaProperty(s,i){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(i);return s.freeze(),s}this.meta.set(s,i)}return this.meta.get(s)}setMetaProperty(s,i){this.meta.set(s,i)}get element(){return this._storedElement||"element"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof x)this.content=s.elements;else if("string"==typeof s||"number"==typeof s||"boolean"==typeof s||"null"===s||null==s)this._content=s;else if(s instanceof w)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if("object"!=typeof s)throw new Error("Cannot set content to given value");this._content=Object.keys(s).map((i=>new this.MemberElement(i,s[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty("id","")}set id(s){this.setMetaProperty("id",s)}get classes(){return this.getMetaProperty("classes",[])}set classes(s){this.setMetaProperty("classes",s)}get title(){return this.getMetaProperty("title","")}set title(s){this.setMetaProperty("title",s)}get description(){return this.getMetaProperty("description","")}set description(s){this.setMetaProperty("description",s)}get links(){return this.getMetaProperty("links",[])}set links(s){this.setMetaProperty("links",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const i=new x;for(;s;)i.push(s),s=s.parent;return i}get children(){if(Array.isArray(this.content))return new x(this.content);if(this.content instanceof w){const s=new x([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new x([this.content]):new x}get recursiveChildren(){const s=new x;return this.children.forEach((i=>{s.push(i),i.recursiveChildren.forEach((i=>{s.push(i)}))})),s}}s.exports=Element},5946:(s,i,u)=>{const _=u(17645),w=u(3079);s.exports=class MemberElement extends w{constructor(s,i,u,w){super(new _,u,w),this.element="member",this.key=s,this.value=i}get key(){return this.content.key}set key(s){this.content.key=this.refract(s)}get value(){return this.content.value}set value(s){this.content.value=this.refract(s)}}},96295:(s,i,u)=>{const _=u(3079);s.exports=class NullElement extends _{constructor(s,i,u){super(s||null,i,u),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}},91090:(s,i,u)=>{const _=u(3079);s.exports=class NumberElement extends _{constructor(s,i,u){super(s,i,u),this.element="number"}primitive(){return"number"}}},76735:(s,i,u)=>{const _=u(94885),w=u(13218),x=u(35804),j=u(5946),P=u(87526);s.exports=class ObjectElement extends x{constructor(s,i,u){super(s||[],i,u),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((s,i)=>(s[i.key.toValue()]=i.value?i.value.toValue():void 0,s)),{})}get(s){const i=this.getMember(s);if(i)return i.value}getMember(s){if(void 0!==s)return this.content.find((i=>i.key.toValue()===s))}remove(s){let i=null;return this.content=this.content.filter((u=>u.key.toValue()!==s||(i=u,!1))),i}getKey(s){const i=this.getMember(s);if(i)return i.key}set(s,i){if(w(s))return Object.keys(s).forEach((i=>{this.set(i,s[i])})),this;const u=s,_=this.getMember(u);return _?_.value=i:this.content.push(new j(u,i)),this}keys(){return this.content.map((s=>s.key.toValue()))}values(){return this.content.map((s=>s.value.toValue()))}hasKey(s){return this.content.some((i=>i.key.equals(s)))}items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}map(s,i){return this.content.map((u=>s.bind(i)(u.value,u.key,u)))}compactMap(s,i){const u=[];return this.forEach(((_,w,x)=>{const j=s.bind(i)(_,w,x);j&&u.push(j)})),u}filter(s,i){return new P(this.content).filter(s,i)}reject(s,i){return this.filter(_(s),i)}forEach(s,i){return this.content.forEach((u=>s.bind(i)(u.value,u.key,u)))}}},16036:(s,i,u)=>{const _=u(3079);s.exports=class StringElement extends _{constructor(s,i,u){super(s,i,u),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},3414:(s,i,u)=>{const _=u(28219);s.exports=class JSON06Serialiser extends _{serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${s}\` is not an Element instance`);let i;s._attributes&&s.attributes.get("variable")&&(i=s.attributes.get("variable"));const u={element:s.element};s._meta&&s._meta.length>0&&(u.meta=this.serialiseObject(s.meta));const _="enum"===s.element||-1!==s.attributes.keys().indexOf("enumerations");if(_){const i=this.enumSerialiseAttributes(s);i&&(u.attributes=i)}else if(s._attributes&&s._attributes.length>0){let{attributes:_}=s;_.get("metadata")&&(_=_.clone(),_.set("meta",_.get("metadata")),_.remove("metadata")),"member"===s.element&&i&&(_=_.clone(),_.remove("variable")),_.length>0&&(u.attributes=this.serialiseObject(_))}if(_)u.content=this.enumSerialiseContent(s,u);else if(this[`${s.element}SerialiseContent`])u.content=this[`${s.element}SerialiseContent`](s,u);else if(void 0!==s.content){let _;i&&s.content.key?(_=s.content.clone(),_.key.attributes.set("variable",i),_=this.serialiseContent(_)):_=this.serialiseContent(s.content),this.shouldSerialiseContent(s,_)&&(u.content=_)}else this.shouldSerialiseContent(s,s.content)&&s instanceof this.namespace.elements.Array&&(u.content=[]);return u}shouldSerialiseContent(s,i){return"parseResult"===s.element||"httpRequest"===s.element||"httpResponse"===s.element||"category"===s.element||"link"===s.element||void 0!==i&&(!Array.isArray(i)||0!==i.length)}refSerialiseContent(s,i){return delete i.attributes,{href:s.toValue(),path:s.path.toValue()}}sourceMapSerialiseContent(s){return s.toValue()}dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}enumSerialiseAttributes(s){const i=s.attributes.clone(),u=i.remove("enumerations")||new this.namespace.elements.Array([]),_=i.get("default");let w=i.get("samples")||new this.namespace.elements.Array([]);if(_&&_.content&&(_.content.attributes&&_.content.attributes.remove("typeAttributes"),i.set("default",new this.namespace.elements.Array([_.content]))),w.forEach((s=>{s.content&&s.content.element&&s.content.attributes.remove("typeAttributes")})),s.content&&0!==u.length&&w.unshift(s.content),w=w.map((s=>s instanceof this.namespace.elements.Array?[s]:new this.namespace.elements.Array([s.content]))),w.length&&i.set("samples",w),i.length>0)return this.serialiseObject(i)}enumSerialiseContent(s){if(s._attributes){const i=s.attributes.get("enumerations");if(i&&i.length>0)return i.content.map((s=>{const i=s.clone();return i.attributes.remove("typeAttributes"),this.serialise(i)}))}if(s.content){const i=s.content.clone();return i.attributes.remove("typeAttributes"),[this.serialise(i)]}return[]}deserialise(s){if("string"==typeof s)return new this.namespace.elements.String(s);if("number"==typeof s)return new this.namespace.elements.Number(s);if("boolean"==typeof s)return new this.namespace.elements.Boolean(s);if(null===s)return new this.namespace.elements.Null;if(Array.isArray(s))return new this.namespace.elements.Array(s.map(this.deserialise,this));const i=this.namespace.getElementClass(s.element),u=new i;u.element!==s.element&&(u.element=s.element),s.meta&&this.deserialiseObject(s.meta,u.meta),s.attributes&&this.deserialiseObject(s.attributes,u.attributes);const _=this.deserialiseContent(s.content);if(void 0===_&&null!==u.content||(u.content=_),"enum"===u.element){u.content&&u.attributes.set("enumerations",u.content);let s=u.attributes.get("samples");if(u.attributes.remove("samples"),s){const _=s;s=new this.namespace.elements.Array,_.forEach((_=>{_.forEach((_=>{const w=new i(_);w.element=u.element,s.push(w)}))}));const w=s.shift();u.content=w?w.content:void 0,u.attributes.set("samples",s)}else u.content=void 0;let _=u.attributes.get("default");if(_&&_.length>0){_=_.get(0);const s=new i(_);s.element=u.element,u.attributes.set("default",s)}}else if("dataStructure"===u.element&&Array.isArray(u.content))[u.content]=u.content;else if("category"===u.element){const s=u.attributes.get("meta");s&&(u.attributes.set("metadata",s),u.attributes.remove("meta"))}else"member"===u.element&&u.key&&u.key._attributes&&u.key._attributes.getValue("variable")&&(u.attributes.set("variable",u.key.attributes.get("variable")),u.key.attributes.remove("variable"));return u}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}return s&&s.map?s.map(this.serialise,this):s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._meta&&s.meta.keys().length)||"enum"!==s.element&&(s.element!==s.primitive()||"member"===s.element)}convertKeyToRefract(s,i){return this.shouldRefract(i)?this.serialise(i):"enum"===i.element?this.serialiseEnum(i):"array"===i.element?i.map((i=>this.shouldRefract(i)||"default"===s?this.serialise(i):"array"===i.element||"object"===i.element||"enum"===i.element?i.children.map((s=>this.serialise(s))):i.toValue())):"object"===i.element?(i.content||[]).map(this.serialise,this):i.toValue()}serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}serialiseObject(s){const i={};return s.forEach(((s,u)=>{if(s){const _=u.toValue();i[_]=this.convertKeyToRefract(_,s)}})),i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},28219:s=>{s.exports=class JSONSerialiser{constructor(s){this.namespace=s||new this.Namespace}serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${s}\` is not an Element instance`);const i={element:s.element};s._meta&&s._meta.length>0&&(i.meta=this.serialiseObject(s.meta)),s._attributes&&s._attributes.length>0&&(i.attributes=this.serialiseObject(s.attributes));const u=this.serialiseContent(s.content);return void 0!==u&&(i.content=u),i}deserialise(s){if(!s.element)throw new Error("Given value is not an object containing an element name");const i=new(this.namespace.getElementClass(s.element));i.element!==s.element&&(i.element=s.element),s.meta&&this.deserialiseObject(s.meta,i.meta),s.attributes&&this.deserialiseObject(s.attributes,i.attributes);const u=this.deserialiseContent(s.content);return void 0===u&&null!==i.content||(i.content=u),i}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}if(s&&s.map){if(0===s.length)return;return s.map(this.serialise,this)}return s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}serialiseObject(s){const i={};if(s.forEach(((s,u)=>{s&&(i[u.toValue()]=this.serialise(s))})),0!==Object.keys(i).length)return i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},70631:(s,i,u)=>{var _="function"==typeof Map&&Map.prototype,w=Object.getOwnPropertyDescriptor&&_?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,x=_&&w&&"function"==typeof w.get?w.get:null,j=_&&Map.prototype.forEach,P="function"==typeof Set&&Set.prototype,B=Object.getOwnPropertyDescriptor&&P?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$=P&&B&&"function"==typeof B.get?B.get:null,U=P&&Set.prototype.forEach,Y="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,X="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Z="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,ae=Object.prototype.toString,ie=Function.prototype.toString,le=String.prototype.match,ce=String.prototype.slice,pe=String.prototype.replace,de=String.prototype.toUpperCase,fe=String.prototype.toLowerCase,ye=RegExp.prototype.test,be=Array.prototype.concat,_e=Array.prototype.join,we=Array.prototype.slice,Se=Math.floor,xe="function"==typeof BigInt?BigInt.prototype.valueOf:null,Pe=Object.getOwnPropertySymbols,Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Re="function"==typeof Symbol&&"object"==typeof Symbol.iterator,qe="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Re||"symbol")?Symbol.toStringTag:null,$e=Object.prototype.propertyIsEnumerable,ze=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function addNumericSeparator(s,i){if(s===1/0||s===-1/0||s!=s||s&&s>-1e3&&s<1e3||ye.call(/e/,i))return i;var u=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof s){var _=s<0?-Se(-s):Se(s);if(_!==s){var w=String(_),x=ce.call(i,w.length+1);return pe.call(w,u,"$&_")+"."+pe.call(pe.call(x,/([0-9]{3})/g,"$&_"),/_$/,"")}}return pe.call(i,u,"$&_")}var We=u(24654),He=We.custom,Ye=isSymbol(He)?He:null;function wrapQuotes(s,i,u){var _="double"===(u.quoteStyle||i)?'"':"'";return _+s+_}function quote(s){return pe.call(String(s),/"/g,""")}function isArray(s){return!("[object Array]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}function isRegExp(s){return!("[object RegExp]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}function isSymbol(s){if(Re)return s&&"object"==typeof s&&s instanceof Symbol;if("symbol"==typeof s)return!0;if(!s||"object"!=typeof s||!Te)return!1;try{return Te.call(s),!0}catch(s){}return!1}s.exports=function inspect_(s,i,_,w){var P=i||{};if(has(P,"quoteStyle")&&"single"!==P.quoteStyle&&"double"!==P.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(P,"maxStringLength")&&("number"==typeof P.maxStringLength?P.maxStringLength<0&&P.maxStringLength!==1/0:null!==P.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var B=!has(P,"customInspect")||P.customInspect;if("boolean"!=typeof B&&"symbol"!==B)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(P,"indent")&&null!==P.indent&&"\t"!==P.indent&&!(parseInt(P.indent,10)===P.indent&&P.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(P,"numericSeparator")&&"boolean"!=typeof P.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ae=P.numericSeparator;if(void 0===s)return"undefined";if(null===s)return"null";if("boolean"==typeof s)return s?"true":"false";if("string"==typeof s)return inspectString(s,P);if("number"==typeof s){if(0===s)return 1/0/s>0?"0":"-0";var de=String(s);return ae?addNumericSeparator(s,de):de}if("bigint"==typeof s){var ye=String(s)+"n";return ae?addNumericSeparator(s,ye):ye}var Se=void 0===P.depth?5:P.depth;if(void 0===_&&(_=0),_>=Se&&Se>0&&"object"==typeof s)return isArray(s)?"[Array]":"[Object]";var Pe=function getIndent(s,i){var u;if("\t"===s.indent)u="\t";else{if(!("number"==typeof s.indent&&s.indent>0))return null;u=_e.call(Array(s.indent+1)," ")}return{base:u,prev:_e.call(Array(i+1),u)}}(P,_);if(void 0===w)w=[];else if(indexOf(w,s)>=0)return"[Circular]";function inspect(s,i,u){if(i&&(w=we.call(w)).push(i),u){var x={depth:P.depth};return has(P,"quoteStyle")&&(x.quoteStyle=P.quoteStyle),inspect_(s,x,_+1,w)}return inspect_(s,P,_+1,w)}if("function"==typeof s&&!isRegExp(s)){var He=function nameOf(s){if(s.name)return s.name;var i=le.call(ie.call(s),/^function\s*([\w$]+)/);if(i)return i[1];return null}(s),Xe=arrObjKeys(s,inspect);return"[Function"+(He?": "+He:" (anonymous)")+"]"+(Xe.length>0?" { "+_e.call(Xe,", ")+" }":"")}if(isSymbol(s)){var Qe=Re?pe.call(String(s),/^(Symbol\(.*\))_[^)]*$/,"$1"):Te.call(s);return"object"!=typeof s||Re?Qe:markBoxed(Qe)}if(function isElement(s){if(!s||"object"!=typeof s)return!1;if("undefined"!=typeof HTMLElement&&s instanceof HTMLElement)return!0;return"string"==typeof s.nodeName&&"function"==typeof s.getAttribute}(s)){for(var et="<"+fe.call(String(s.nodeName)),tt=s.attributes||[],rt=0;rt"}if(isArray(s)){if(0===s.length)return"[]";var nt=arrObjKeys(s,inspect);return Pe&&!function singleLineValues(s){for(var i=0;i=0)return!1;return!0}(nt)?"["+indentedJoin(nt,Pe)+"]":"[ "+_e.call(nt,", ")+" ]"}if(function isError(s){return!("[object Error]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}(s)){var ot=arrObjKeys(s,inspect);return"cause"in Error.prototype||!("cause"in s)||$e.call(s,"cause")?0===ot.length?"["+String(s)+"]":"{ ["+String(s)+"] "+_e.call(ot,", ")+" }":"{ ["+String(s)+"] "+_e.call(be.call("[cause]: "+inspect(s.cause),ot),", ")+" }"}if("object"==typeof s&&B){if(Ye&&"function"==typeof s[Ye]&&We)return We(s,{depth:Se-_});if("symbol"!==B&&"function"==typeof s.inspect)return s.inspect()}if(function isMap(s){if(!x||!s||"object"!=typeof s)return!1;try{x.call(s);try{$.call(s)}catch(s){return!0}return s instanceof Map}catch(s){}return!1}(s)){var st=[];return j&&j.call(s,(function(i,u){st.push(inspect(u,s,!0)+" => "+inspect(i,s))})),collectionOf("Map",x.call(s),st,Pe)}if(function isSet(s){if(!$||!s||"object"!=typeof s)return!1;try{$.call(s);try{x.call(s)}catch(s){return!0}return s instanceof Set}catch(s){}return!1}(s)){var at=[];return U&&U.call(s,(function(i){at.push(inspect(i,s))})),collectionOf("Set",$.call(s),at,Pe)}if(function isWeakMap(s){if(!Y||!s||"object"!=typeof s)return!1;try{Y.call(s,Y);try{X.call(s,X)}catch(s){return!0}return s instanceof WeakMap}catch(s){}return!1}(s))return weakCollectionOf("WeakMap");if(function isWeakSet(s){if(!X||!s||"object"!=typeof s)return!1;try{X.call(s,X);try{Y.call(s,Y)}catch(s){return!0}return s instanceof WeakSet}catch(s){}return!1}(s))return weakCollectionOf("WeakSet");if(function isWeakRef(s){if(!Z||!s||"object"!=typeof s)return!1;try{return Z.call(s),!0}catch(s){}return!1}(s))return weakCollectionOf("WeakRef");if(function isNumber(s){return!("[object Number]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}(s))return markBoxed(inspect(Number(s)));if(function isBigInt(s){if(!s||"object"!=typeof s||!xe)return!1;try{return xe.call(s),!0}catch(s){}return!1}(s))return markBoxed(inspect(xe.call(s)));if(function isBoolean(s){return!("[object Boolean]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}(s))return markBoxed(ee.call(s));if(function isString(s){return!("[object String]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}(s))return markBoxed(inspect(String(s)));if("undefined"!=typeof window&&s===window)return"{ [object Window] }";if(s===u.g)return"{ [object globalThis] }";if(!function isDate(s){return!("[object Date]"!==toStr(s)||qe&&"object"==typeof s&&qe in s)}(s)&&!isRegExp(s)){var it=arrObjKeys(s,inspect),lt=ze?ze(s)===Object.prototype:s instanceof Object||s.constructor===Object,ct=s instanceof Object?"":"null prototype",ut=!lt&&qe&&Object(s)===s&&qe in s?ce.call(toStr(s),8,-1):ct?"Object":"",pt=(lt||"function"!=typeof s.constructor?"":s.constructor.name?s.constructor.name+" ":"")+(ut||ct?"["+_e.call(be.call([],ut||[],ct||[]),": ")+"] ":"");return 0===it.length?pt+"{}":Pe?pt+"{"+indentedJoin(it,Pe)+"}":pt+"{ "+_e.call(it,", ")+" }"}return String(s)};var Xe=Object.prototype.hasOwnProperty||function(s){return s in this};function has(s,i){return Xe.call(s,i)}function toStr(s){return ae.call(s)}function indexOf(s,i){if(s.indexOf)return s.indexOf(i);for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}function inspectString(s,i){if(s.length>i.maxStringLength){var u=s.length-i.maxStringLength,_="... "+u+" more character"+(u>1?"s":"");return inspectString(ce.call(s,0,i.maxStringLength),i)+_}return wrapQuotes(pe.call(pe.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",i)}function lowbyte(s){var i=s.charCodeAt(0),u={8:"b",9:"t",10:"n",12:"f",13:"r"}[i];return u?"\\"+u:"\\x"+(i<16?"0":"")+de.call(i.toString(16))}function markBoxed(s){return"Object("+s+")"}function weakCollectionOf(s){return s+" { ? }"}function collectionOf(s,i,u,_){return s+" ("+i+") {"+(_?indentedJoin(u,_):_e.call(u,", "))+"}"}function indentedJoin(s,i){if(0===s.length)return"";var u="\n"+i.prev+i.base;return u+_e.call(s,","+u)+"\n"+i.prev}function arrObjKeys(s,i){var u=isArray(s),_=[];if(u){_.length=s.length;for(var w=0;w{var i,u,_=s.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(s){if(i===setTimeout)return setTimeout(s,0);if((i===defaultSetTimout||!i)&&setTimeout)return i=setTimeout,setTimeout(s,0);try{return i(s,0)}catch(u){try{return i.call(null,s,0)}catch(u){return i.call(this,s,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(s){i=defaultSetTimout}try{u="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(s){u=defaultClearTimeout}}();var w,x=[],j=!1,P=-1;function cleanUpNextTick(){j&&w&&(j=!1,w.length?x=w.concat(x):P=-1,x.length&&drainQueue())}function drainQueue(){if(!j){var s=runTimeout(cleanUpNextTick);j=!0;for(var i=x.length;i;){for(w=x,x=[];++P1)for(var u=1;u{"use strict";var _=u(50414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,i,u,w,x,j){if(j!==_){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},45697:(s,i,u)=>{s.exports=u(92703)()},50414:s=>{"use strict";s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},55798:s=>{"use strict";var i=String.prototype.replace,u=/%20/g,_="RFC1738",w="RFC3986";s.exports={default:w,formatters:{RFC1738:function(s){return i.call(s,u,"+")},RFC3986:function(s){return String(s)}},RFC1738:_,RFC3986:w}},80129:(s,i,u)=>{"use strict";var _=u(58261),w=u(55235),x=u(55798);s.exports={formats:x,parse:w,stringify:_}},55235:(s,i,u)=>{"use strict";var _=u(12769),w=Object.prototype.hasOwnProperty,x=Array.isArray,j={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:_.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(s){return s.replace(/&#(\d+);/g,(function(s,i){return String.fromCharCode(parseInt(i,10))}))},parseArrayValue=function(s,i){return s&&"string"==typeof s&&i.comma&&s.indexOf(",")>-1?s.split(","):s},P=function parseQueryStringKeys(s,i,u,_){if(s){var x=u.allowDots?s.replace(/\.([^.[]+)/g,"[$1]"):s,j=/(\[[^[\]]*])/g,P=u.depth>0&&/(\[[^[\]]*])/.exec(x),B=P?x.slice(0,P.index):x,$=[];if(B){if(!u.plainObjects&&w.call(Object.prototype,B)&&!u.allowPrototypes)return;$.push(B)}for(var U=0;u.depth>0&&null!==(P=j.exec(x))&&U=0;--x){var j,P=s[x];if("[]"===P&&u.parseArrays)j=[].concat(w);else{j=u.plainObjects?Object.create(null):{};var B="["===P.charAt(0)&&"]"===P.charAt(P.length-1)?P.slice(1,-1):P,$=parseInt(B,10);u.parseArrays||""!==B?!isNaN($)&&P!==B&&String($)===B&&$>=0&&u.parseArrays&&$<=u.arrayLimit?(j=[])[$]=w:"__proto__"!==B&&(j[B]=w):j={0:w}}w=j}return w}($,i,u,_)}};s.exports=function(s,i){var u=function normalizeParseOptions(s){if(!s)return j;if(null!==s.decoder&&void 0!==s.decoder&&"function"!=typeof s.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==s.charset&&"utf-8"!==s.charset&&"iso-8859-1"!==s.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=void 0===s.charset?j.charset:s.charset;return{allowDots:void 0===s.allowDots?j.allowDots:!!s.allowDots,allowPrototypes:"boolean"==typeof s.allowPrototypes?s.allowPrototypes:j.allowPrototypes,allowSparse:"boolean"==typeof s.allowSparse?s.allowSparse:j.allowSparse,arrayLimit:"number"==typeof s.arrayLimit?s.arrayLimit:j.arrayLimit,charset:i,charsetSentinel:"boolean"==typeof s.charsetSentinel?s.charsetSentinel:j.charsetSentinel,comma:"boolean"==typeof s.comma?s.comma:j.comma,decoder:"function"==typeof s.decoder?s.decoder:j.decoder,delimiter:"string"==typeof s.delimiter||_.isRegExp(s.delimiter)?s.delimiter:j.delimiter,depth:"number"==typeof s.depth||!1===s.depth?+s.depth:j.depth,ignoreQueryPrefix:!0===s.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof s.interpretNumericEntities?s.interpretNumericEntities:j.interpretNumericEntities,parameterLimit:"number"==typeof s.parameterLimit?s.parameterLimit:j.parameterLimit,parseArrays:!1!==s.parseArrays,plainObjects:"boolean"==typeof s.plainObjects?s.plainObjects:j.plainObjects,strictNullHandling:"boolean"==typeof s.strictNullHandling?s.strictNullHandling:j.strictNullHandling}}(i);if(""===s||null==s)return u.plainObjects?Object.create(null):{};for(var B="string"==typeof s?function parseQueryStringValues(s,i){var u,P={},B=i.ignoreQueryPrefix?s.replace(/^\?/,""):s,$=i.parameterLimit===1/0?void 0:i.parameterLimit,U=B.split(i.delimiter,$),Y=-1,X=i.charset;if(i.charsetSentinel)for(u=0;u-1&&(ee=x(ee)?[ee]:ee),w.call(P,Z)?P[Z]=_.combine(P[Z],ee):P[Z]=ee}return P}(s,u):s,$=u.plainObjects?Object.create(null):{},U=Object.keys(B),Y=0;Y{"use strict";var _=u(37478),w=u(12769),x=u(55798),j=Object.prototype.hasOwnProperty,P={brackets:function brackets(s){return s+"[]"},comma:"comma",indices:function indices(s,i){return s+"["+i+"]"},repeat:function repeat(s){return s}},B=Array.isArray,$=String.prototype.split,U=Array.prototype.push,pushToArray=function(s,i){U.apply(s,B(i)?i:[i])},Y=Date.prototype.toISOString,X=x.default,Z={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:w.encode,encodeValuesOnly:!1,format:X,formatter:x.formatters[X],indices:!1,serializeDate:function serializeDate(s){return Y.call(s)},skipNulls:!1,strictNullHandling:!1},ee={},ae=function stringify(s,i,u,x,j,P,U,Y,X,ae,ie,le,ce,pe,de,fe){for(var ye=s,be=fe,_e=0,we=!1;void 0!==(be=be.get(ee))&&!we;){var Se=be.get(s);if(_e+=1,void 0!==Se){if(Se===_e)throw new RangeError("Cyclic object value");we=!0}void 0===be.get(ee)&&(_e=0)}if("function"==typeof Y?ye=Y(i,ye):ye instanceof Date?ye=ie(ye):"comma"===u&&B(ye)&&(ye=w.maybeMap(ye,(function(s){return s instanceof Date?ie(s):s}))),null===ye){if(j)return U&&!pe?U(i,Z.encoder,de,"key",le):i;ye=""}if(function isNonNullishPrimitive(s){return"string"==typeof s||"number"==typeof s||"boolean"==typeof s||"symbol"==typeof s||"bigint"==typeof s}(ye)||w.isBuffer(ye)){if(U){var xe=pe?i:U(i,Z.encoder,de,"key",le);if("comma"===u&&pe){for(var Pe=$.call(String(ye),","),Te="",Re=0;Re0?ye.join(",")||null:void 0}];else if(B(Y))qe=Y;else{var ze=Object.keys(ye);qe=X?ze.sort(X):ze}for(var We=x&&B(ye)&&1===ye.length?i+"[]":i,He=0;He0?de+pe:""}},12769:(s,i,u)=>{"use strict";var _=u(55798),w=Object.prototype.hasOwnProperty,x=Array.isArray,j=function(){for(var s=[],i=0;i<256;++i)s.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return s}(),P=function arrayToObject(s,i){for(var u=i&&i.plainObjects?Object.create(null):{},_=0;_1;){var i=s.pop(),u=i.obj[i.prop];if(x(u)){for(var _=[],w=0;w=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||x===_.RFC1738&&(40===U||41===U)?B+=P.charAt($):U<128?B+=j[U]:U<2048?B+=j[192|U>>6]+j[128|63&U]:U<55296||U>=57344?B+=j[224|U>>12]+j[128|U>>6&63]+j[128|63&U]:($+=1,U=65536+((1023&U)<<10|1023&P.charCodeAt($)),B+=j[240|U>>18]+j[128|U>>12&63]+j[128|U>>6&63]+j[128|63&U])}return B},isBuffer:function isBuffer(s){return!(!s||"object"!=typeof s)&&!!(s.constructor&&s.constructor.isBuffer&&s.constructor.isBuffer(s))},isRegExp:function isRegExp(s){return"[object RegExp]"===Object.prototype.toString.call(s)},maybeMap:function maybeMap(s,i){if(x(s)){for(var u=[],_=0;_{"use strict";var u=Object.prototype.hasOwnProperty;function decode(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch(s){return null}}function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}i.stringify=function querystringify(s,i){i=i||"";var _,w,x=[];for(w in"string"!=typeof i&&(i="?"),s)if(u.call(s,w)){if((_=s[w])||null!=_&&!isNaN(_)||(_=""),w=encode(w),_=encode(_),null===w||null===_)continue;x.push(w+"="+_)}return x.length?i+x.join("&"):""},i.parse=function querystring(s){for(var i,u=/([^=?#&]+)=?([^&]*)/g,_={};i=u.exec(s);){var w=decode(i[1]),x=decode(i[2]);null===w||null===x||w in _||(_[w]=x)}return _}},14419:(s,i,u)=>{const _=u(60697),w=u(69450),x=_.types;s.exports=class RandExp{constructor(s,i){if(this._setDefaults(s),s instanceof RegExp)this.ignoreCase=s.ignoreCase,this.multiline=s.multiline,s=s.source;else{if("string"!=typeof s)throw new Error("Expected a regexp or string");this.ignoreCase=i&&-1!==i.indexOf("i"),this.multiline=i&&-1!==i.indexOf("m")}this.tokens=_(s)}_setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=s.defaultRange?s.defaultRange:this.defaultRange.clone(),s.randInt&&(this.randInt=s.randInt)}gen(){return this._gen(this.tokens,[])}_gen(s,i){var u,_,w,j,P;switch(s.type){case x.ROOT:case x.GROUP:if(s.followedBy||s.notFollowedBy)return"";for(s.remember&&void 0===s.groupNumber&&(s.groupNumber=i.push(null)-1),_="",j=0,P=(u=s.options?this._randSelect(s.options):s.stack).length;j{"use strict";var _=u(34155),w=65536,x=4294967295;var j=u(89509).Buffer,P=u.g.crypto||u.g.msCrypto;P&&P.getRandomValues?s.exports=function randomBytes(s,i){if(s>x)throw new RangeError("requested too many random bytes");var u=j.allocUnsafe(s);if(s>0)if(s>w)for(var B=0;B{"use strict";function _typeof(s){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_typeof(s)}Object.defineProperty(i,"__esModule",{value:!0}),i.CopyToClipboard=void 0;var _=_interopRequireDefault(u(67294)),w=_interopRequireDefault(u(20640)),x=["text","onCopy","options","children"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function _defineProperties(s,i){for(var u=0;u{"use strict";var _=u(74300).CopyToClipboard;_.CopyToClipboard=_,s.exports=_},53441:(s,i,u)=>{"use strict";function _typeof(s){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_typeof(s)}Object.defineProperty(i,"__esModule",{value:!0}),i.DebounceInput=void 0;var _=_interopRequireDefault(u(67294)),w=_interopRequireDefault(u(91296)),x=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i=_?u.notify(s):i.length>w.length&&u.notify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:""})}))}))})),_defineProperty(_assertThisInitialized(u),"onKeyDown",(function(s){"Enter"===s.key&&u.forceNotify(s);var i=u.props.onKeyDown;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),"onBlur",(function(s){u.forceNotify(s);var i=u.props.onBlur;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),"createNotifier",(function(s){if(s<0)u.notify=function(){return null};else if(0===s)u.notify=u.doNotify;else{var i=(0,w.default)((function(s){u.isDebouncing=!1,u.doNotify(s)}),s);u.notify=function(s){u.isDebouncing=!0,i(s)},u.flush=function(){return i.flush()},u.cancel=function(){u.isDebouncing=!1,i.cancel()}}})),_defineProperty(_assertThisInitialized(u),"doNotify",(function(){u.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(u),"forceNotify",(function(s){var i=u.props.debounceTimeout;if(u.isDebouncing||!(i>0)){u.cancel&&u.cancel();var _=u.state.value,w=u.props.minLength;_.length>=w?u.doNotify(s):u.doNotify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:_})}))}})),u.isDebouncing=!1,u.state={value:void 0===s.value||null===s.value?"":s.value};var _=u.props.debounceTimeout;return u.createNotifier(_),u}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,"prototype",{writable:!1}),s}(DebounceInput,[{key:"componentDidUpdate",value:function componentDidUpdate(s){if(!this.isDebouncing){var i=this.props,u=i.value,_=i.debounceTimeout,w=s.debounceTimeout,x=s.value,j=this.state.value;void 0!==u&&x!==u&&j!==u&&this.setState({value:u}),_!==w&&this.createNotifier(_)}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:"render",value:function render(){var s,i,u=this.props,w=u.element,j=(u.onChange,u.value,u.minLength,u.debounceTimeout,u.forceNotifyByEnter),P=u.forceNotifyOnBlur,B=u.onKeyDown,$=u.onBlur,U=u.inputRef,Y=_objectWithoutProperties(u,x),X=this.state.value;s=j?{onKeyDown:this.onKeyDown}:B?{onKeyDown:B}:{},i=P?{onBlur:this.onBlur}:$?{onBlur:$}:{};var Z=U?{ref:U}:{};return _.default.createElement(w,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},Y),{},{onChange:this.onChange,value:X},s),i),Z))}}]),DebounceInput}(_.default.PureComponent);i.DebounceInput=j,_defineProperty(j,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},775:(s,i,u)=>{"use strict";var _=u(53441).DebounceInput;_.DebounceInput=_,s.exports=_},64448:(s,i,u)=>{"use strict";var _=u(67294),w=u(63840);function p(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,u=1;u